From a9760eab39afd476713c681d29e5a0d42869cb97 Mon Sep 17 00:00:00 2001 From: Thomas Durieux <5577568+tdurieux@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:38:33 +0200 Subject: [PATCH] perf: avoid needless downloads and track request latency (#876) * perf: avoid needless downloads and track request latency * fix: correct request timing and monitoring revalidation --- docker-compose.yml | 10 + docs/performance-monitoring.md | 90 ++++++++ public/asset-manifest.json | 2 +- public/partials/admin/overview.htm | 48 ++++ public/script/admin.js | 39 ++++ public/script/vendor.min.js | 44 ++-- src/core/AnonymizedFile.ts | 7 + src/core/GitHubUtils.ts | 6 + src/core/anonymization-pool.ts | 21 +- src/core/performance-monitoring.ts | 213 ++++++++++++++++++ src/core/request-monitoring.ts | 159 +++++++++++++ src/core/source/GitHubStream.ts | 60 ++--- src/core/transformed-cache.ts | 4 +- src/core/zipStream.ts | 5 + src/server/index.ts | 19 +- src/server/routes/admin.ts | 17 +- src/server/routes/file.ts | 13 +- src/server/routes/repository-public.ts | 8 + src/server/routes/route-utils.ts | 4 +- src/server/routes/webview.ts | 20 +- src/streamer/index.ts | 5 + test/download-header-performance.test.js | 107 +++++++++ test/monitoring-access.test.js | 32 +++ ...performance-monitoring-integration.test.js | 95 ++++++++ test/production-regressions.test.js | 1 + test/request-monitoring.test.js | 176 +++++++++++++++ test/vue-ui.test.js | 53 +++++ test/zip-proxy-errors.test.js | 23 ++ 28 files changed, 1208 insertions(+), 73 deletions(-) create mode 100644 docs/performance-monitoring.md create mode 100644 src/core/performance-monitoring.ts create mode 100644 src/core/request-monitoring.ts create mode 100644 test/download-header-performance.test.js create mode 100644 test/monitoring-access.test.js create mode 100644 test/performance-monitoring-integration.test.js create mode 100644 test/request-monitoring.test.js diff --git a/docker-compose.yml b/docker-compose.yml index 0561dab..98054ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,10 @@ services: anonymous_github: + logging: + driver: json-file + options: + max-size: "25m" + max-file: "4" build: . restart: always image: tdurieux/anonymous_github:v2 @@ -36,6 +41,11 @@ services: condition: service_healthy streamer: + logging: + driver: json-file + options: + max-size: "25m" + max-file: "4" build: . restart: always image: tdurieux/anonymous_github:v2 diff --git a/docs/performance-monitoring.md b/docs/performance-monitoring.md new file mode 100644 index 0000000..7bfa57c --- /dev/null +++ b/docs/performance-monitoring.md @@ -0,0 +1,90 @@ +# Request performance monitoring + +The admin overview shows API and streamer request latency, interrupted responses, +first-byte latency, work stages and process resources. It uses the existing Redis +service. `/api/admin/performance?minutes=15` returns the same data after the existing +admin authentication and authorization checks. The other supported window is 60 +minutes. Responses are private and never HTTP-cached. + +Request measurement starts before body parsing, authentication and rate limiting. +Each response is counted once on completion or premature close. A response that +sent HTTP 200 and then disconnected is reported as interrupted. Completion means +Node handed the response to the operating system; it does not prove client receipt. +First-byte timing measures the first response headers, including explicit header +flushes. Byte counts measure encoded response body writes and exclude HTTP headers. + +## Latency and diagnosis + +The latency histograms use millisecond boundaries of 10, 50, 100, 250, 500, 1000, +2500, 5000, 10000, 30000 and 60000, plus an overflow bucket. Displayed p95 and p99 +values are bucket upper bounds, not exact percentiles. No samples or a percentile +above 60 seconds produces `null`; the UI distinguishes these cases using count. +Downloads include body transfer time, so compare their first-byte and total latency +before treating a long transfer as slow processing. + +Slow requests produce structured warning logs above one second for ordinary API +calls and above ten seconds for file, website and streamer transfers. Interrupted +requests also produce warnings. These thresholds identify requests for diagnosis; +they do not automatically page anyone. Healthcheck timings are counted separately +and successful healthchecks do not produce access logs. + +Logs contain a generated request ID, a fixed route label, method, status, terminal +outcome, duration, first-byte time, body bytes and work stages. API calls forward +the request ID to streamers. Repository IDs, source names, file paths, bodies and +query values are absent from these new request records and metric labels. + +Stages include repository lookup, authorization, GitHub requests, source-cache +lookup and fill, worker admission, worker anonymization and streamer response +headers. Source and transformed-cache hits and misses are counted separately. +Source download timing includes waiting for response headers and failures before +streaming begins. +Stages can overlap and must not be summed to reconstruct total latency. An archive +upstream span also includes downstream backpressure; it is not pure network time. +Work outside HTTP requests, such as background download jobs, stays in the existing +queue monitoring rather than these request histograms. + +## Resources, retention and overhead + +Each process batches at most 512 metric groups every 15 seconds. Minute counters +expire after two hours and survive application rollouts. Read windows are restricted +to 15 or 60 minutes, with a ten-second cache and at most 32 live instances. Redis +commands have a two-second monitoring deadline and offline command queuing is +disabled. Monitoring never awaits Redis from an HTTP request handler, except the +admin report itself. Failures discard a bounded batch and show unavailable reports +or dropped-batch counters instead of silently implying healthy coverage. + +Samples include process RSS, heap, external buffers, CPU usage, cgroup memory +limit, event-loop p95 and maximum delay, active requests, PID-owned sockets and +CLOSE_WAIT states, and worker activity, queue and byte reservations. Samples expire +after 90 seconds. The UI highlights samples older than 45 seconds, dropped metrics, +CLOSE_WAIT, event-loop p95 above 100 ms and RSS above 80 percent of its limit. +CPU usage is relative to one CPU and can exceed 100 percent across multiple cores. +RSS is process memory, not Docker's accounting of the entire cgroup. + +A bounded runtime history keeps 240 API samples and 960 streamer samples, enough +for roughly one hour at one API and four streamers. The response includes this +history and the UI shows each live process's peak observed RSS in the selected +window. Additional replicas or rollout overlap shorten the history. Retired +processes disappear from the live table while retained request counters and +resource history remain available. Missing samples do not establish health. + +Application Docker logs rotate at 25 MB with four files per container. The admin +overview's disk check runs asynchronously and caches its result for 30 seconds. +These settings avoid making monitoring itself block the Node event loop or fill +the host disk with unbounded access logs. + +## Performance changes + +ZIP HEAD requests check repository access and download permission, then return +headers without requesting a token, counting a view or generating an archive. +File and website HEAD requests validate metadata and content gates before ending +without content download or transformation. File validators accept weak and +multiple If-None-Match values using Express freshness handling. + +Website responses use private, revalidated ETags covering content SHA, commit, +tree generation, cache revision, file path, rendering version and current options. +Validation follows repository lifecycle, page settings and content checks. Matching +validators avoid fetching and rendering content again; changed terms or content +invalidate them. +Raw Markdown served after a rendering failure has a separate validator, so later +requests retry rendering when the transient failure clears. diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 2e44a50..fa9610c 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,6 +1,6 @@ { "core.min.js": "core.3b07189932.min.js", - "vendor.min.js": "vendor.a1e4517da7.min.js", + "vendor.min.js": "vendor.ae4f635979.min.js", "mermaid.min.js": "mermaid.f848a72d16.min.js", "all.min.css": "all.947ab87f1c.min.css", "markdown.min.js": "markdown.44f2e93820.min.js", diff --git a/public/partials/admin/overview.htm b/public/partials/admin/overview.htm index 0f1658d..1fc424e 100644 --- a/public/partials/admin/overview.htm +++ b/public/partials/admin/overview.htm @@ -17,6 +17,54 @@
Loading overview…
{{ error }}
+
+
+ Request performance + +
+

{{ performanceError }}

+

Loading performance monitoring…

+
+

Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds. Samples refresh every 30 seconds.

+
+ + + + + + + +
ServiceRouteRequestsAverageFirst byte p95p95p99Interrupted5xxSlow
{{ row.service }}{{ row.method }} {{ row.route }}{{ row.count }}{{ row.avgMs }} ms{{ firstByteBound(row) }}{{ latencyBound(row, 'p95UpperMs') }}{{ latencyBound(row, 'p99UpperMs') }}{{ row.aborted }}{{ row.errors }}{{ row.slow }}
+
+

No recorded requests in this window yet.

+

API and streamer processes

+

No recent process samples. Monitoring coverage is incomplete.

+
+ + + + + + + + + +
ProcessRSS / limitPeak RSS in windowCPUEvent loop p95Active requestsSockets / CLOSE_WAITWorkers / waitingSample ageDropped batches / metrics
{{ sample.instance }}{{ humanBytes(sample.memory.rss) }} / {{ humanBytes(sample.memoryLimitBytes) }}{{ humanBytes(peakRss(sample)) }}{{ sample.cpuPercent.toFixed(1) }}%{{ sample.eventLoop.p95Ms.toFixed(1) }} ms{{ sample.activeRequests }}{{ sample.sockets?.descriptors ?? 'Unavailable' }} / {{ sample.sockets?.closeWait ?? 'Unavailable' }}{{ sample.workers?.running ?? 0 }} / {{ sample.workers?.waiting ?? 0 }}{{ sampleAge(sample) }} s{{ sample.droppedBatches }} / {{ sample.droppedMetrics }}
+
+

Work stages and cache results

+
+ + + + + +
ServiceStageSamplesAveragep95
{{ row.service }}{{ row.metric }}{{ row.count }}{{ row.avgMs }} ms{{ latencyBound(row, 'p95UpperMs') }}
+
+
+
+
diff --git a/public/script/admin.js b/public/script/admin.js index d99c46b..89cecea 100644 --- a/public/script/admin.js +++ b/public/script/admin.js @@ -1734,6 +1734,44 @@ export const overviewAdminController = function (state, http, location, interval state.data = null; state.loading = true; state.error = null; + state.performance = null; + state.performanceMinutes = 15; + state.performanceError = null; + state.latencyBound = function (row, field) { + if (!row.count) return "No samples"; + return row[field] == null ? "> 60 s" : "\u2264 " + row[field] + " ms"; + }; + state.firstByteBound = function (row) { + return state.latencyBound({ count: row.firstByteCount, p95UpperMs: row.firstByteP95UpperMs }, "p95UpperMs"); + }; + state.sampleAge = function (sample) { return Math.max(0, Math.round((Date.now() - sample.sampledAt) / 1000)); }; + state.peakRss = function (sample) { + return (state.performance.runtimeSeries || []).filter(function (point) { return point.instance === sample.instance; }) + .reduce(function (peak, point) { return Math.max(peak, point.rss); }, sample.memory.rss); + }; + state.performanceWarning = function (sample) { + return state.sampleAge(sample) > 45 || sample.droppedBatches || sample.droppedMetrics || + sample.sockets?.closeWait > 0 || sample.eventLoop.p95Ms > 100 || + sample.memoryLimitBytes && sample.memory.rss > sample.memoryLimitBytes * 0.8; + }; + var performanceLoading = false; + state.loadPerformance = function () { + var minutes = state.performanceMinutes; + if (state.performance?.windowMinutes && state.performance.windowMinutes !== minutes) state.performance = null; + if (performanceLoading) return; + performanceLoading = true; + http.get("/api/admin/performance", { params: { minutes: minutes } }).then(function (r) { + if (minutes !== state.performanceMinutes) return; + state.performance = r.data; + state.performanceError = r.data.available ? null : "Performance monitoring is unavailable. Request history may be incomplete."; + }, function () { + if (minutes !== state.performanceMinutes) return; + state.performanceError = "Could not refresh performance monitoring. Displayed samples may be stale."; + }).finally(function () { + performanceLoading = false; + if (minutes !== state.performanceMinutes) state.loadPerformance(); + }); + }; function humanBytes(b) { if (b == null) return "—"; @@ -1834,6 +1872,7 @@ export const overviewAdminController = function (state, http, location, interval }; function load() { + state.loadPerformance(); http.get("/api/admin/overview").then(function (r) { r.data.history = computeDailyHistory(r.data.history); r.data.daily = { diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index 3968c25..74762a5 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -1,30 +1,30 @@ -"use strict";(()=>{var xl=Object.defineProperty;var ed=(e,t)=>{for(var n in t)xl(e,n,{get:t[n],enumerable:!0})};var me=["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={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};var us=new Map,sd=ve;function Jt(e){if(!us.has(e)){let t=document.createElement("script");t.src=sd[e];let n=new Promise((r,s)=>{t.onload=r,t.onerror=()=>{us.delete(e),t.remove(),s(new Error(`Unable to load ${e}. Please retry.`))}});us.set(e,n),document.head.appendChild(t)}return us.get(e)}async function lr(){await Jt("editor"),ace.config.set("basePath","/script/external/ace/")}function po(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return n=>n in t}var Pe={},Qt=[],at=()=>{},sn=()=>!1,fo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ho=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Oo=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},nd=Object.prototype.hasOwnProperty,De=(e,t)=>nd.call(e,t),be=Array.isArray,$t=e=>Io(e)==="[object Map]",co=e=>Io(e)==="[object Set]",dr=e=>Io(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",ht=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",nn=e=>(Te(e)||we(e))&&we(e.then)&&we(e.catch),pr=Object.prototype.toString,Io=e=>pr.call(e),rn=e=>Io(e).slice(8,-1),cs=e=>Io(e)==="[object Object]",ps=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mo=po(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var fs=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rd=/-\w/g,Je=fs(e=>e.replace(rd,t=>t.slice(1).toUpperCase())),id=/\B([A-Z])/g,St=fs(e=>e.replace(id,"-$1").toLowerCase()),Xt=fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Po=fs(e=>e?`on${Xt(e)}`:""),gt=(e,t)=>!Object.is(e,t),vo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Vo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var ur,qo=()=>ur||(ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(be(e)){let t={};for(let n=0;n{if(n){let r=n.split(ld);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function A(e){let t="";if(ze(e))t=e;else if(be(e))for(let n=0;n!!(e&&e.__v_isRef===!0),c=e=>ze(e)?e:e==null?"":be(e)||Te(e)&&(e.toString===pr||!we(e.toString))?mr(e)?c(e.value):JSON.stringify(e,vr,2):String(e),vr=(e,t)=>mr(t)?vr(e,t.value):$t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[on(r,i)+" =>"]=s,n),{})}:co(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>on(n))}:ht(t)?on(t):Te(t)&&!be(t)&&!cs(t)?String(t):t,on=(e,t="")=>{var n;return ht(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function fd(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Qe,Uo=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Qe&&(Qe.active?(this.parent=Qe,this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Qe===this)Qe=this.prevScope;else{let t=Qe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Lo){let t=Lo;for(Lo=void 0;t;){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;$o;){let t=$o;for($o=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Er(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Cr(e){let t,n=e.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),wn(r),hd(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function un(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(_r(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function _r(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Fo)||(e.globalVersion=Fo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!un(e))))return;e.flags|=2;let t=e.dep,n=Fe,r=Et;Fe=e,Et=!0;try{Er(e);let s=e.fn(e._value);(t.version===0||gt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Fe=n,Et=r,Cr(e),e.flags&=-3}}function wn(e,t=!1){let{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)wn(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function hd(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Et=!0,Sr=[];function Tt(){Sr.push(Et),Et=!1}function At(){let e=Sr.pop();Et=e===void 0?!0:e}function gr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=Fe;Fe=void 0;try{t()}finally{Fe=n}}}var Fo=0,cn=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},zo=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Fe||!Et||Fe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Fe)n=this.activeLink=new cn(Fe,this),Fe.deps?(n.prevDep=Fe.depsTail,Fe.depsTail.nextDep=n,Fe.depsTail=n):Fe.deps=Fe.depsTail=n,Nr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Fe.depsTail,n.nextDep=void 0,Fe.depsTail.nextDep=n,Fe.depsTail=n,Fe.deps===n&&(Fe.deps=r)}return n}trigger(t){this.version++,Fo++,this.notify(t)}notify(t){yn();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{bn()}}};function Nr(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Nr(r)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var pn=new WeakMap,xt=Symbol(""),fn=Symbol(""),Ho=Symbol("");function xe(e,t,n){if(Et&&Fe){let r=pn.get(e);r||pn.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new zo),s.map=r,s.key=n),s.track()}}function Dt(e,t,n,r,s,i){let a=pn.get(e);if(!a){Fo++;return}let u=f=>{f&&f.trigger()};if(yn(),t==="clear")a.forEach(u);else{let f=be(e),m=f&&ps(n);if(f&&n==="length"){let g=Number(r);a.forEach((w,h)=>{(h==="length"||h===Ho||!ht(h)&&h>=g)&&u(w)})}else switch((n!==void 0||a.has(void 0))&&u(a.get(n)),m&&u(a.get(Ho)),t){case"add":f?m&&u(a.get("length")):(u(a.get(xt)),$t(e)&&u(a.get(fn)));break;case"delete":f||(u(a.get(xt)),$t(e)&&u(a.get(fn)));break;case"set":$t(e)&&u(a.get(xt));break}}bn()}function yo(e){let t=Re(e);return t===e?t:(xe(t,"iterate",Ho),lt(e)?t:t.map(yt))}function Bo(e){return xe(e=Re(e),"iterate",Ho),e}function Nt(e,t){return Ct(e)?eo(Ut(e)?yt(t):t):yt(t)}var md={__proto__:null,[Symbol.iterator](){return ln(this,Symbol.iterator,e=>Nt(this,e))},concat(...e){return yo(this).concat(...e.map(t=>be(t)?yo(t):t))},entries(){return ln(this,"entries",e=>(e[1]=Nt(this,e[1]),e))},every(e,t){return Lt(this,"every",e,t,void 0,arguments)},filter(e,t){return Lt(this,"filter",e,t,n=>n.map(r=>Nt(this,r)),arguments)},find(e,t){return Lt(this,"find",e,t,n=>Nt(this,n),arguments)},findIndex(e,t){return Lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lt(this,"findLast",e,t,n=>Nt(this,n),arguments)},findLastIndex(e,t){return Lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return dn(this,"includes",e)},indexOf(...e){return dn(this,"indexOf",e)},join(e){return yo(this).join(e)},lastIndexOf(...e){return dn(this,"lastIndexOf",e)},map(e,t){return Lt(this,"map",e,t,void 0,arguments)},pop(){return Mo(this,"pop")},push(...e){return Mo(this,"push",e)},reduce(e,...t){return yr(this,"reduce",e,t)},reduceRight(e,...t){return yr(this,"reduceRight",e,t)},shift(){return Mo(this,"shift")},some(e,t){return Lt(this,"some",e,t,void 0,arguments)},splice(...e){return Mo(this,"splice",e)},toReversed(){return yo(this).toReversed()},toSorted(e){return yo(this).toSorted(e)},toSpliced(...e){return yo(this).toSpliced(...e)},unshift(...e){return Mo(this,"unshift",e)},values(){return ln(this,"values",e=>Nt(this,e))}};function ln(e,t,n){let r=Bo(e),s=r[t]();return r!==e&&!lt(e)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.done||(i.value=n(i.value)),i}),s}var vd=Array.prototype;function Lt(e,t,n,r,s,i){let a=Bo(e),u=a!==e&&!lt(e),f=a[t];if(f!==vd[t]){let w=f.apply(e,i);return u?yt(w):w}let m=n;a!==e&&(u?m=function(w,h){return n.call(this,Nt(e,w),h,e)}:n.length>2&&(m=function(w,h){return n.call(this,w,h,e)}));let g=f.call(a,m,r);return u&&s?s(g):g}function yr(e,t,n,r){let s=Bo(e),i=s!==e&&!lt(e),a=n,u=!1;s!==e&&(i?(u=r.length===0,a=function(m,g,w){return u&&(u=!1,m=Nt(e,m)),n.call(this,m,Nt(e,g),w,e)}):n.length>3&&(a=function(m,g,w){return n.call(this,m,g,w,e)}));let f=s[t](a,...r);return u?Nt(e,f):f}function dn(e,t,n){let r=Re(e);xe(r,"iterate",Ho);let s=r[t](...n);return(s===-1||s===!1)&&Wo(n[0])?(n[0]=Re(n[0]),r[t](...n)):s}function Mo(e,t,n=[]){Tt(),yn();let r=Re(e)[t].apply(e,n);return bn(),At(),r}var gd=po("__proto__,__v_isRef,__isVue"),Dr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ht));function yd(e){ht(e)||(e=String(e));let t=Re(this);return xe(t,"has",e),t.hasOwnProperty(e)}var bs=class{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Dd:Ar:i?Tr:Rr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=be(t);if(!s){let f;if(a&&(f=md[n]))return f;if(n==="hasOwnProperty")return yd}let u=Reflect.get(t,n,Ze(t)?t:r);if((ht(n)?Dr.has(n):gd(n))||(s||xe(t,"get",n),i))return u;if(Ze(u)){let f=a&&ps(n)?u:u.value;return s&&Te(f)?ks(f):f}return Te(u)?s?ks(u):He(u):u}},ws=class extends bs{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n],a=be(t)&&ps(n);if(!this._isShallow){let m=Ct(i);if(!lt(r)&&!Ct(r)&&(i=Re(i),r=Re(r)),!a&&Ze(i)&&!Ze(r))return m||(i.value=r),!0}let u=a?Number(n)e,vs=e=>Reflect.getPrototypeOf(e);function Ed(e,t,n){return function(...r){let s=this.__v_raw,i=Re(s),a=$t(i),u=e==="entries"||e===Symbol.iterator&&a,f=e==="keys"&&a,m=s[e](...r),g=n?mn:t?eo:yt;return!t&&xe(i,"iterate",f?fn:xt),Ge(Object.create(m),{next(){let{value:w,done:h}=m.next();return h?{value:w,done:h}:{value:u?[g(w[0]),g(w[1])]:g(w),done:h}}})}}function gs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Cd(e,t){let n={get(s){let i=this.__v_raw,a=Re(i),u=Re(s);e||(gt(s,u)&&xe(a,"get",s),xe(a,"get",u));let{has:f}=vs(a),m=t?mn:e?eo:yt;if(f.call(a,s))return m(i.get(s));if(f.call(a,u))return m(i.get(u));i!==a&&i.get(s)},get size(){let s=this.__v_raw;return!e&&xe(Re(s),"iterate",xt),s.size},has(s){let i=this.__v_raw,a=Re(i),u=Re(s);return e||(gt(s,u)&&xe(a,"has",s),xe(a,"has",u)),s===u?i.has(s):i.has(s)||i.has(u)},forEach(s,i){let a=this,u=a.__v_raw,f=Re(u),m=t?mn:e?eo:yt;return!e&&xe(f,"iterate",xt),u.forEach((g,w)=>s.call(i,m(g),m(w),a))}};return Ge(n,e?{add:gs("add"),set:gs("set"),delete:gs("delete"),clear:gs("clear")}:{add(s){let i=Re(this),a=vs(i),u=Re(s),f=!t&&!lt(s)&&!Ct(s)?u:s;return a.has.call(i,f)||gt(s,f)&&a.has.call(i,s)||gt(u,f)&&a.has.call(i,u)||(i.add(f),Dt(i,"add",f,f)),this},set(s,i){!t&&!lt(i)&&!Ct(i)&&(i=Re(i));let a=Re(this),{has:u,get:f}=vs(a),m=u.call(a,s);m||(s=Re(s),m=u.call(a,s));let g=f.call(a,s);return a.set(s,i),m?gt(i,g)&&Dt(a,"set",s,i,g):Dt(a,"add",s,i),this},delete(s){let i=Re(this),{has:a,get:u}=vs(i),f=a.call(i,s);f||(s=Re(s),f=a.call(i,s));let m=u?u.call(i,s):void 0,g=i.delete(s);return f&&Dt(i,"delete",s,void 0,m),g},clear(){let s=Re(this),i=s.size!==0,a=void 0,u=s.clear();return i&&Dt(s,"clear",void 0,void 0,a),u}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Ed(s,e,t)}),n}function kn(e,t){let n=Cd(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(De(n,s)&&s in r?n:r,s,i)}var _d={get:kn(!1,!1)},Sd={get:kn(!1,!0)},Nd={get:kn(!0,!1)};var Rr=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Dd=new WeakMap;function Rd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function He(e){return Ct(e)?e:En(e,!1,bd,_d,Rr)}function Go(e){return En(e,!1,kd,Sd,Tr)}function ks(e){return En(e,!0,wd,Nd,Ar)}function En(e,t,n,r,s){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let i=s.get(e);if(i)return i;let a=Rd(rn(e));if(a===0)return e;let u=new Proxy(e,a===2?r:n);return s.set(e,u),u}function Ut(e){return Ct(e)?Ut(e.__v_raw):!!(e&&e.__v_isReactive)}function Ct(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function Wo(e){return e?!!e.__v_raw:!1}function Re(e){let t=e&&e.__v_raw;return t?Re(t):e}function Cn(e){return!De(e,"__v_skip")&&Object.isExtensible(e)&&hs(e,"__v_skip",!0),e}var yt=e=>Te(e)?He(e):e,eo=e=>Te(e)?ks(e):e;function Ze(e){return e?e.__v_isRef===!0:!1}function et(e){return Or(e,!1)}function Cs(e){return Or(e,!0)}function Or(e,t){return Ze(e)?e:new vn(e,t)}var vn=class{constructor(t,n){this.dep=new zo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Re(t),this._value=n?t:yt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){let n=this._rawValue,r=this.__v_isShallow||lt(t)||Ct(t);t=r?t:Re(t),gt(t,n)&&(this._rawValue=t,this._value=r?t:yt(t),this.dep.trigger())}};function Ft(e){return Ze(e)?e.value:e}var Td={get:(e,t,n)=>t==="__v_raw"?e:Ft(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let s=e[t];return Ze(s)&&!Ze(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function _s(e){return Ut(e)?e:new Proxy(e,Td)}var gn=class{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return kr(this,!0),!0}get value(){let t=this.dep.track();return _r(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Ir(e,t,n=!1){let r,s;return we(e)?r=e:(r=e.get,s=e.set),new gn(r,s,n)}var ys={},Es=new WeakMap,Zt;function Pr(e,t=!1,n=Zt){if(n){let r=Es.get(n);r||Es.set(n,r=[]),r.push(e)}}function Vr(e,t,n=Pe){let{immediate:r,deep:s,once:i,scheduler:a,augmentJob:u,call:f}=n,m=q=>{(n.onWarn||fd)("Invalid watch source: ",q,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},g=q=>s?q:lt(q)||s===!1||s===0?Rt(q,1):Rt(q),w,h,b,E,k=!1,R=!1;if(Ze(e)?(h=()=>e.value,k=lt(e)):Ut(e)?(h=()=>g(e),k=!0):be(e)?(R=!0,k=e.some(q=>Ut(q)||lt(q)),h=()=>e.map(q=>{if(Ze(q))return q.value;if(Ut(q))return g(q);if(we(q))return f?f(q,2):q()})):we(e)?t?h=f?()=>f(e,2):e:h=()=>{if(b){Tt();try{b()}finally{At()}}let q=Zt;Zt=w;try{return f?f(e,3,[E]):e(E)}finally{Zt=q}}:h=at,t&&s){let q=h,U=s===!0?1/0:s;h=()=>Rt(q(),U)}let D=br(),T=()=>{w.stop(),D&&D.active&&Oo(D.effects,w)};if(i&&t){let q=t;t=(...U)=>{let ie=q(...U);return T(),ie}}let P=R?new Array(e.length).fill(ys):ys,H=q=>{if(!(!(w.flags&1)||!w.dirty&&!q))if(t){let U=w.run();if(q||s||k||(R?U.some((ie,re)=>gt(ie,P[re])):gt(U,P))){b&&b();let ie=Zt;Zt=w;try{let re=[U,P===ys?void 0:R&&P[0]===ys?[]:P,E];P=U,f?f(t,3,re):t(...re)}finally{Zt=ie}}}else w.run()};return u&&u(H),w=new bo(h),w.scheduler=a?()=>a(H,!1):H,E=q=>Pr(q,!1,w),b=w.onStop=()=>{let q=Es.get(w);if(q){if(f)f(q,4);else for(let U of q)U();Es.delete(w)}},t?r?H(!0):P=w.run():a?a(H.bind(null,!0),!0):w.run(),T.pause=w.pause.bind(w),T.resume=w.resume.bind(w),T.stop=T,T}function Rt(e,t=1/0,n){if(t<=0||!Te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ze(e))Rt(e.value,t,n);else if(be(e))for(let r=0;r{Rt(r,t,n)});else if(cs(e)){for(let r in e)Rt(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Rt(e[r],t,n)}return e}function os(e,t,n,r){try{return r?e(...r):e()}catch(s){ss(s,t,n)}}function bt(e,t,n,r){if(we(e)){let s=os(e,t,n,r);return s&&nn(s)&&s.catch(i=>{ss(i,t,n)}),s}if(be(e)){let s=[];for(let i=0;i>>1,s=nt[r],i=xo(s);i=xo(n)?nt.push(e):nt.splice(Vd(t),0,e),e.flags|=1,Zr()}}function Zr(){Ds||(Ds=Xr.then(ti))}function xr(e){if(!be(e))Yt&&e.id===-1?Yt.splice(wo+1,0,e):e.flags&1||(ko.push(e),e.flags|=1);else for(let t=0;txo(n)-xo(r));if(ko.length=0,Yt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function ti(e){let t=at;try{for(It=0;It{r._d&&Os(-1);let i=Rs(t),a=so.length,u;try{u=e(...s)}finally{for(let f=so.length;f>a;f--)Oi();Rs(i),r._d&&Os(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function N(e,t){if(mt===null)return e;let n=zs(mt),r=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&we(t)?t.call(r&&r.proxy):t}}var Md=Symbol.for("v-scx"),$d=()=>{{let e=ut(Md);return e}};function je(e,t,n){return si(e,t,n)}function si(e,t,n=Pe){let{immediate:r,deep:s,flush:i,once:a}=n,u=Ge({},n),f=t&&r||!t&&i!=="post",m;if(_o){if(i==="sync"){let b=$d();m=b.__watcherHandles||(b.__watcherHandles=[])}else if(!f){let b=()=>{};return b.stop=at,b.resume=at,b.pause=at,b}}let g=tt;u.call=(b,E,k)=>bt(b,g,E,k);let w=!1;i==="post"?u.scheduler=b=>{dt(b,g&&g.suspense)}:i!=="sync"&&(w=!0,u.scheduler=(b,E)=>{E?b():In(b)}),u.augmentJob=b=>{t&&(b.flags|=4),w&&(b.flags|=2,g&&(b.id=g.uid,b.i=g))};let h=Vr(e,t,u);return _o&&(m?m.push(h):f&&h()),h}function Ld(e,t,n){let r=this.proxy,s=ze(e)?e.includes(".")?ni(r,e):()=>r[e]:e.bind(r,r),i;we(t)?i=t:(i=t.handler,n=t);let a=is(this),u=si(s,i.bind(r),n);return a(),u}function ni(e,t){let n=t.split(".");return()=>{let r=e;for(let s=0;se.__isTeleport;var _n=Symbol("_leaveCb");function Fd(e){let t=e[0];if(e.length>1){let n=!1;for(let r of e)if(r.type!==Ht){t=r,n=!0;break}}return t}function ri(e){if(!$s(e))return qs(e.type)&&e.children?Fd(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&we(n.default))return n.default()}}function Ms(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Ms(qs(n.type)&&ri(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ns(e,t){return we(e)?Ge({name:e.name},t,{setup:e}):e}function Pn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Ts=new WeakMap;function Jo(e,t,n,r,s=!1){if(be(e)){e.forEach((k,R)=>Jo(k,t&&(be(t)?t[R]:t),n,r,s));return}if(Qo(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Jo(e,t,n,r.component.subTree);return}let i=r.shapeFlag&4?zs(r.component):r.el,a=s?null:i,{i:u,r:f}=e,m=t&&t.r,g=u.refs===Pe?u.refs={}:u.refs,w=u.setupState,h=Re(w),b=w===Pe?sn:k=>Mr(g,k)?!1:De(h,k),E=(k,R)=>!(R&&Mr(g,R));if(m!=null&&m!==f){if($r(t),ze(m))g[m]=null,b(m)&&(w[m]=null);else if(Ze(m)){let k=t;E(m,k.k)&&(m.value=null),k.k&&(g[k.k]=null)}}if(we(f))os(f,u,12,[a,g]);else{let k=ze(f),R=Ze(f);if(k||R){let D=()=>{if(e.f){let T=k?b(f)?w[f]:g[f]:E(f)||!e.k?f.value:g[e.k];if(s)be(T)&&Oo(T,i);else if(be(T))T.includes(i)||T.push(i);else if(k)g[f]=[i],b(f)&&(w[f]=g[f]);else{let P=[i];E(f,e.k)&&(f.value=P),e.k&&(g[e.k]=P)}}else k?(g[f]=a,b(f)&&(w[f]=a)):R&&(E(f,e.k)&&(f.value=a),e.k&&(g[e.k]=a))};if(a){let T=()=>{D(),Ts.delete(e)};T.id=-1,Ts.set(e,T),dt(T,n)}else $r(e),D()}}}function $r(e){let t=Ts.get(e);t&&(t.flags|=8,Ts.delete(e))}var Lr=e=>e.nodeType===8;var Q8=qo().requestIdleCallback||(e=>setTimeout(e,1)),X8=qo().cancelIdleCallback||(e=>clearTimeout(e));function zd(e,t){if(Lr(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Lr(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}var Qo=e=>!!e.type.__asyncLoader;function ii(e){we(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:i,timeout:a,suspensible:u=!0,onError:f}=e,m=null,g,w=0,h=()=>(w++,m=null,b()),b=()=>{let E;return m||(E=m=t().catch(k=>{if(k=k instanceof Error?k:new Error(String(k)),f)return new Promise((R,D)=>{f(k,()=>R(h()),()=>D(k),w+1)});throw k}).then(k=>E!==m&&m?m:(k&&(k.__esModule||k[Symbol.toStringTag]==="Module")&&(k=k.default),g=k,k)))};return ns({name:"AsyncComponentWrapper",__asyncLoader:b,__asyncHydrate(E,k,R){let D=E.isConnected,T=!1;(k.bu||(k.bu=[])).push(()=>T=!0);let P=()=>{T||!E.parentNode||D&&!E.isConnected||R()},H=i?()=>{let q=i(P,U=>zd(E,U));q&&(k.bum||(k.bum=[])).push(q)}:P;g?H():b().then(()=>!k.isUnmounted&&H())},get __asyncResolved(){return g},setup(){let E=tt;if(Pn(E),g)return()=>Ss(g,E);let k=q=>{m=null,ss(q,E,13,!r)};if(u&&E.suspense||_o)return b().then(q=>()=>Ss(q,E)).catch(q=>(k(q),()=>r?Ce(r,{error:q}):null));let R=et(!1),D=et(),T=et(!!s),P,H;return rs(()=>{P!=null&&clearTimeout(P),H!=null&&clearTimeout(H)}),s&&(H=setTimeout(()=>{E.isUnmounted||(T.value=!1)},s)),a!=null&&(P=setTimeout(()=>{if(!E.isUnmounted&&!R.value&&!D.value){let q=new Error(`Async component timed out after ${a}ms.`);k(q),D.value=q}},a)),b().then(()=>{E.isUnmounted||(R.value=!0,E.parent&&$s(E.parent.vnode)&&E.parent.update())}).catch(q=>{if(E.isUnmounted){m=null;return}k(q),D.value=q}),()=>{if(R.value&&g)return Ss(g,E);if(D.value&&r)return Ce(r,{error:D.value});if(n&&!T.value)return Ss(n,E)}}})}function Ss(e,t){let{ref:n,props:r,children:s,ce:i}=t.vnode,a=Ce(e,r,s);return a.ref=n,a.ce=i,delete t.vnode.ce,a}var $s=e=>e.type.__isKeepAlive;function ai(e,t){di(e,"a",t)}function li(e,t){di(e,"da",t)}function di(e,t,n=tt){let r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ls(t,r,n),n){let s=n.parent;for(;s&&s.parent;)$s(s.parent.vnode)&&Hd(r,t,n,s),s=s.parent}}function Hd(e,t,n,r){let s=Ls(t,e,r,!0);rs(()=>{Oo(r[t],s)},n)}function Ls(e,t,n=tt,r=!1){if(n){let s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{Tt();let u=is(n),f=bt(t,n,e,a);return u(),At(),f});return r?s.unshift(i):s.push(i),i}}var jt=e=>(t,n=tt)=>{(!_o||e==="sp")&&Ls(e,(...r)=>t(...r),n)},jd=jt("bm"),Vt=jt("m"),ui=jt("bu"),ci=jt("u"),ro=jt("bum"),rs=jt("um"),Bd=jt("sp"),Gd=jt("rtg"),Wd=jt("rtc");function Kd(e,t=tt){Ls("ec",e,t)}var pi="components",Yd="directives";function We(e,t){return fi(pi,e,!0,t)||e}var Jd=Symbol.for("v-ndc");function ye(e){return fi(Yd,e)}function fi(e,t,n=!0,r=!1){let s=mt||tt;if(s){let i=s.type;if(e===pi){let u=Iu(i,!1);if(u&&(u===t||u===Je(t)||u===Xt(Je(t))))return i}let a=Ur(s[e]||i[e],t)||Ur(s.appContext[e],t);return!a&&r?i:a}}function Ur(e,t){return e&&(e[t]||e[Je(t)]||e[Xt(Je(t))])}function ae(e,t,n,r){let s,i=n&&n[r],a=be(e);if(a||ze(e)){let u=a&&Ut(e),f=!1,m=!1;u&&(f=!lt(e),m=Ct(e),e=Bo(e)),s=new Array(e.length);for(let g=0,w=e.length;gt(u,f,void 0,i&&i[f]));else{let u=Object.keys(e);s=new Array(u.length);for(let f=0,m=u.length;fe?Vi(e)?zs(e):Rn(e.parent):null;var Xo=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Rn(e.parent),$root:e=>Rn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vn(e),$forceUpdate:e=>e.f||(e.f=()=>{In(e.update)}),$nextTick:e=>e.n||(e.n=rt.bind(e.proxy)),$watch:e=>Ld.bind(e)});var Sn=(e,t)=>e!==Pe&&!e.__isScriptSetup&&De(e,t),Qd={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:n,setupState:r,data:s,props:i,accessCache:a,type:u,appContext:f}=e;if(t[0]!=="$"){let h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Sn(r,t))return a[t]=1,r[t];if(s!==Pe&&De(s,t))return a[t]=2,s[t];if(De(i,t))return a[t]=3,i[t];if(n!==Pe&&De(n,t))return a[t]=4,n[t];Tn&&(a[t]=0)}}let m=Xo[t],g,w;if(m)return t==="$attrs"&&xe(e.attrs,"get",""),m(e);if((g=u.__cssModules)&&(g=g[t]))return g;if(n!==Pe&&De(n,t))return a[t]=4,n[t];if(w=f.config.globalProperties,De(w,t))return w[t]},set({_:e},t,n){let{data:r,setupState:s,ctx:i}=e;return Sn(s,t)?(s[t]=n,!0):r!==Pe&&De(r,t)?(r[t]=n,!0):De(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:i,type:a}},u){let f;return!!(n[u]||e!==Pe&&u[0]!=="$"&&De(e,u)||Sn(t,u)||De(i,u)||De(r,u)||De(Xo,u)||De(s.config.globalProperties,u)||(f=a.__cssModules)&&f[u])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Fr(e){return be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}var Tn=!0;function Xd(e){let t=Vn(e),n=e.proxy,r=e.ctx;Tn=!1,t.beforeCreate&&zr(t.beforeCreate,e,"bc");let{data:s,computed:i,methods:a,watch:u,provide:f,inject:m,created:g,beforeMount:w,mounted:h,beforeUpdate:b,updated:E,activated:k,deactivated:R,beforeDestroy:D,beforeUnmount:T,destroyed:P,unmounted:H,render:q,renderTracked:U,renderTriggered:ie,errorCaptured:re,serverPrefetch:C,expose:O,inheritAttrs:G,components:J,directives:ee,filters:Q}=t;if(m&&Zd(m,r,null),a)for(let pe in a){let le=a[pe];we(le)&&(r[pe]=le.bind(n))}if(s){let pe=s.call(n,n);Te(pe)&&(e.data=He(pe))}if(Tn=!0,i)for(let pe in i){let le=i[pe],Ie=we(le)?le.bind(n,n):we(le.get)?le.get.bind(n,n):at,_e=!we(le)&&we(le.set)?le.set.bind(n):at,Ae=ot({get:Ie,set:_e});Object.defineProperty(r,pe,{enumerable:!0,configurable:!0,get:()=>Ae.value,set:Ee=>Ae.value=Ee})}if(u)for(let pe in u)hi(u[pe],r,n,pe);if(f){let pe=we(f)?f.call(n):f;Reflect.ownKeys(pe).forEach(le=>{no(le,pe[le])})}g&&zr(g,e,"c");function ue(pe,le){be(le)?le.forEach(Ie=>pe(Ie.bind(n))):le&&pe(le.bind(n))}if(ue(jd,w),ue(Vt,h),ue(ui,b),ue(ci,E),ue(ai,k),ue(li,R),ue(Kd,re),ue(Wd,U),ue(Gd,ie),ue(ro,T),ue(rs,H),ue(Bd,C),be(O))if(O.length){let pe=e.exposed||(e.exposed={});O.forEach(le=>{Object.defineProperty(pe,le,{get:()=>n[le],set:Ie=>n[le]=Ie,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===at&&(e.render=q),G!=null&&(e.inheritAttrs=G),J&&(e.components=J),ee&&(e.directives=ee),C&&Pn(e)}function Zd(e,t,n=at){be(e)&&(e=An(e));for(let r in e){let s=e[r],i;Te(s)?"default"in s?i=ut(s.from||r,s.default,!0):i=ut(s.from||r):i=ut(s),Ze(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function zr(e,t,n){bt(be(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function hi(e,t,n,r){let s=r.includes(".")?ni(n,r):()=>n[r];if(ze(e)){let i=t[e];we(i)&&je(s,i)}else if(we(e))je(s,e.bind(n));else if(Te(e))if(be(e))e.forEach(i=>hi(i,t,n,r));else{let i=we(e.handler)?e.handler.bind(n):t[e.handler];we(i)&&je(s,i,e)}}function Vn(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,u=i.get(t),f;return u?f=u:!s.length&&!n&&!r?f=t:(f={},s.length&&s.forEach(m=>As(f,m,a,!0)),As(f,t,a)),Te(t)&&i.set(t,f),f}function As(e,t,n,r=!1){let{mixins:s,extends:i}=t;i&&As(e,i,n,!0),s&&s.forEach(a=>As(e,a,n,!0));for(let a in t)if(!(r&&a==="expose")){let u=xd[a]||n&&n[a];e[a]=u?u(e[a],t[a]):t[a]}return e}var xd={data:Hr,props:jr,emits:jr,methods:Yo,computed:Yo,beforeCreate:st,created:st,beforeMount:st,mounted:st,beforeUpdate:st,updated:st,beforeDestroy:st,beforeUnmount:st,destroyed:st,unmounted:st,activated:st,deactivated:st,errorCaptured:st,serverPrefetch:st,components:Yo,directives:Yo,watch:tu,provide:Hr,inject:eu};function Hr(e,t){return t?e?function(){return Ge(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function eu(e,t){return Yo(An(e),An(t))}function An(e){if(be(e)){let t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${St(t)}Modifiers`];function ru(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||Pe,s=n,i=t.startsWith("update:"),a=i&&nu(r,t.slice(7));a&&(a.trim&&(s=n.map(g=>ze(g)?g.trim():g)),a.number&&(s=s.map(Vo)));let u,f=r[u=Po(t)]||r[u=Po(Je(t))];!f&&i&&(f=r[u=Po(St(t))]),f&&bt(f,e,6,s);let m=r[u+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,bt(m,e,6,s)}}var iu=new WeakMap;function vi(e,t,n=!1){let r=n?iu:t.emitsCache,s=r.get(e);if(s!==void 0)return s;let i=e.emits,a={},u=!1;if(!we(e)){let f=m=>{let g=vi(m,t,!0);g&&(u=!0,Ge(a,g))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!u?(Te(e)&&r.set(e,null),null):(be(i)?i.forEach(f=>a[f]=null):Ge(a,i),Te(e)&&r.set(e,a),a)}function Us(e,t){return!e||!fo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,St(t))||De(e,t))}function Nn(e){let{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:a,attrs:u,emit:f,render:m,renderCache:g,props:w,data:h,setupState:b,ctx:E,inheritAttrs:k}=e,R=Rs(e),D,T;try{if(n.shapeFlag&4){let q=s||r,U=q;D=Pt(m.call(U,q,g,w,b,h,E)),T=u}else{let q=t;D=Pt(q.length>1?q(w,{attrs:u,slots:a,emit:f}):q(w,null)),T=t.props?u:au(u)}}catch(q){so.length=0,ss(q,e,1),D=Ce(Ht)}let P=D,H;if(T&&k!==!1){let q=Object.keys(T),{shapeFlag:U}=P;q.length&&U&7&&(i&&q.some(ho)&&(T=lu(T,i)),P=Co(P,T,!1,!0))}if(n.dirs&&(P=Co(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition){let q=qs(P.type)&&ri(P)||P;Ms(q,n.transition)}return D=P,Rs(R),D}var au=e=>{let t;for(let n in e)(n==="class"||n==="style"||fo(n))&&((t||(t={}))[n]=e[n]);return t},lu=(e,t)=>{let n={};for(let r in e)(!ho(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function du(e,t,n){let{props:r,children:s,component:i}=e,{props:a,children:u,patchFlag:f}=t,m=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return r?Br(r,a,m):!!a;if(f&8){let g=t.dynamicProps;for(let w=0;wObject.create(yi),wi=e=>Object.getPrototypeOf(e)===yi;function cu(e,t,n,r=!1){let s={},i=bi();e.propsDefaults=Object.create(null),ki(e,t,s,i);for(let a in e.propsOptions[0])a in s||(s[a]=void 0);n?e.props=r?s:Go(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function pu(e,t,n,r){let{props:s,attrs:i,vnode:{patchFlag:a}}=e,u=Re(s),[f]=e.propsOptions,m=!1;if((r||a>0)&&!(a&16)){if(a&8){let g=e.vnode.dynamicProps;for(let w=0;w{f=!0;let[h,b]=Ei(w,t,!0);Ge(a,h),b&&u.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!i&&!f)return Te(e)&&r.set(e,Qt),Qt;if(be(i))for(let g=0;ge==="_"||e==="_ctx"||e==="$stable",Mn=e=>be(e)?e.map(Pt):[Pt(e)],hu=(e,t,n)=>{if(t._n)return t;let r=qd((...s)=>Mn(t(...s)),n);return r._c=!1,r},Ci=(e,t,n)=>{let r=e._ctx;for(let s in e){if(qn(s))continue;let i=e[s];if(we(i))t[s]=hu(s,i,r);else if(i!=null){let a=Mn(i);t[s]=()=>a}}},_i=(e,t)=>{let n=Mn(t);e.slots.default=()=>n},Si=(e,t,n)=>{for(let r in t)(n||!qn(r))&&(e[r]=t[r])},mu=(e,t,n)=>{let r=e.slots=bi();if(e.vnode.shapeFlag&32){let s=t._;s?(Si(r,t,n),n&&hs(r,"_",s,!0)):Ci(t,r)}else t&&_i(e,t)},vu=(e,t,n)=>{let{vnode:r,slots:s}=e,i=!0,a=Pe;if(r.shapeFlag&32){let u=t._;u?n&&u===1?i=!1:Si(s,t,n):(i=!t.$stable,Ci(t,s)),a=t}else t&&(_i(e,t),a={default:1});if(i)for(let u in s)!qn(u)&&a[u]==null&&delete s[u]};function gu(){let e=[]}var dt=ku;function Ni(e){return yu(e)}function yu(e,t){gu();let n=qo();n.__VUE__=!0;let{insert:r,remove:s,patchProp:i,createElement:a,createText:u,createComment:f,setText:m,setElementText:g,parentNode:w,nextSibling:h,setScopeId:b=at,insertStaticContent:E}=e,k=(v,S,V,F=null,B=null,L=null,W=void 0,x=null,Z=!!S.dynamicChildren)=>{if(v===S)return;v&&!Ko(v,S)&&(F=ne(v),Ve(v,B,L,!0),v=null),S.patchFlag===-2&&(Z=!1,S.dynamicChildren=null);let{type:K,ref:fe,shapeFlag:se}=S;switch(K){case Fs:R(v,S,V,F);break;case Ht:D(v,S,V,F);break;case Zo:v==null&&T(S,V,F,W);break;case X:ee(v,S,V,F,B,L,W,x,Z);break;default:se&1?U(v,S,V,F,B,L,W,x,Z):se&6?Q(v,S,V,F,B,L,W,x,Z):(se&64||se&128)&&K.process(v,S,V,F,B,L,W,x,Z,I)}fe!=null&&B?Jo(fe,v&&v.ref,L,S||v,!S):fe==null&&v&&v.ref!=null&&Jo(v.ref,null,L,v,!0)},R=(v,S,V,F)=>{if(v==null)r(S.el=u(S.children),V,F);else{let B=S.el=v.el;S.children!==v.children&&m(B,S.children)}},D=(v,S,V,F)=>{v==null?r(S.el=f(S.children||""),V,F):S.el=v.el},T=(v,S,V,F)=>{[v.el,v.anchor]=E(v.children,S,V,F,v.el,v.anchor)},P=(v,S,V,F)=>{if(S.children!==v.children){let B=h(v.anchor);q(v),[S.el,S.anchor]=E(S.children,V,B,F)}else S.el=v.el,S.anchor=v.anchor},H=({el:v,anchor:S},V,F)=>{let B;for(;v&&v!==S;)B=h(v),r(v,V,F),v=B;r(S,V,F)},q=({el:v,anchor:S})=>{let V;for(;v&&v!==S;)V=h(v),s(v),v=V;s(S)},U=(v,S,V,F,B,L,W,x,Z)=>{if(S.type==="svg"?W="svg":S.type==="math"&&(W="mathml"),v==null)ie(S,V,F,B,L,W,x,Z);else{let K=v.el&&v.el._isVueCE?v.el:null;try{K&&K._beginPatch(),O(v,S,B,L,W,x,Z)}finally{K&&K._endPatch()}}},ie=(v,S,V,F,B,L,W,x)=>{let Z,K,{props:fe,shapeFlag:se,transition:de,dirs:ge}=v;if(Z=v.el=a(v.type,L,fe&&fe.is,fe),se&8?g(Z,v.children):se&16&&C(v.children,Z,null,F,B,Dn(v,L),W,x),ge&&to(v,null,F,"created"),re(Z,v,v.scopeId,W,F),fe){for(let $e in fe)$e!=="value"&&!mo($e)&&i(Z,$e,null,fe[$e],L,F);"value"in fe&&i(Z,"value",null,fe.value,L),(K=fe.onVnodeBeforeMount)&&Ot(K,F,v)}ge&&to(v,null,F,"beforeMount");let Ne=bu(B,de);Ne&&de.beforeEnter(Z),r(Z,S,V),((K=fe&&fe.onVnodeMounted)||Ne||ge)&&dt(()=>{let qe;try{K&&Ot(K,F,v),Ne&&de.enter(Z),ge&&to(v,null,F,"mounted")}finally{}},B)},re=(v,S,V,F,B)=>{if(V&&b(v,V),F)for(let L=0;L{for(let K=Z;K{let x=S.el=v.el,{patchFlag:Z,dynamicChildren:K,dirs:fe}=S;Z|=v.patchFlag&16;let se=v.props||Pe,de=S.props||Pe,ge;if(V&&oo(V,!1),(ge=de.onVnodeBeforeUpdate)&&Ot(ge,V,S,v),fe&&to(S,v,V,"beforeUpdate"),V&&oo(V,!0),K&&(!v.dynamicChildren||v.dynamicChildren.length!==K.length)&&(Z=0,W=!1,K=null),(se.innerHTML&&de.innerHTML==null||se.textContent&&de.textContent==null)&&g(x,""),K?G(v.dynamicChildren,K,x,V,F,Dn(S,B),L):W||Ie(v,S,x,null,V,F,Dn(S,B),L,!1),Z>0){if(Z&16)J(x,se,de,V,B);else if(Z&2&&se.class!==de.class&&i(x,"class",null,de.class,B),Z&4&&i(x,"style",se.style,de.style,B),Z&8){let Ne=S.dynamicProps;for(let $e=0;$e{ge&&Ot(ge,V,S,v),fe&&to(S,v,V,"updated")},F)},G=(v,S,V,F,B,L,W)=>{for(let x=0;x{if(S!==V){if(S!==Pe)for(let L in S)!mo(L)&&!(L in V)&&i(v,L,S[L],null,B,F);for(let L in V){if(mo(L))continue;let W=V[L],x=S[L];W!==x&&L!=="value"&&i(v,L,x,W,B,F)}"value"in V&&i(v,"value",S.value,V.value,B)}},ee=(v,S,V,F,B,L,W,x,Z)=>{let K=S.el=v?v.el:u(""),fe=S.anchor=v?v.anchor:u(""),{patchFlag:se,dynamicChildren:de,slotScopeIds:ge}=S;ge&&(x=x?x.concat(ge):ge),v==null?(r(K,V,F),r(fe,V,F),C(S.children||[],V,fe,B,L,W,x,Z)):se>0&&se&64&&de&&v.dynamicChildren&&v.dynamicChildren.length===de.length?(G(v.dynamicChildren,de,V,B,L,W,x),(S.key!=null||B&&S===B.subTree)&&Di(v,S,!0)):Ie(v,S,V,fe,B,L,W,x,Z)},Q=(v,S,V,F,B,L,W,x,Z)=>{S.slotScopeIds=x,v==null?S.shapeFlag&512?B.ctx.activate(S,V,F,W,Z):oe(S,V,F,B,L,W,Z):ue(v,S,Z)},oe=(v,S,V,F,B,L,W)=>{let x=v.component=Du(v,F,B);if($s(v)&&(x.ctx.renderer=I),Ru(x,!1,W),x.asyncDep){if(B&&B.registerDep(x,pe,W),!v.el){let Z=x.subTree=Ce(Ht);D(null,Z,S,V),v.placeholder=Z.el}}else pe(x,v,S,V,B,L,W)},ue=(v,S,V)=>{let F=S.component=v.component;if(du(v,S,V))if(F.asyncDep&&!F.asyncResolved){le(F,S,V);return}else F.next=S,F.update();else S.el=v.el,F.vnode=S},pe=(v,S,V,F,B,L,W)=>{let x=()=>{if(v.isMounted){let{next:se,bu:de,u:ge,parent:Ne,vnode:$e}=v;{let pt=Ri(v);if(pt){se&&(se.el=$e.el,le(v,se,W)),pt.asyncDep.then(()=>{dt(()=>{v.isUnmounted||K()},B)});return}}let qe=se,Ke;oo(v,!1),se?(se.el=$e.el,le(v,se,W)):se=$e,de&&vo(de),(Ke=se.props&&se.props.onVnodeBeforeUpdate)&&Ot(Ke,Ne,se,$e),oo(v,!0);let Ye=Nn(v),kt=v.subTree;v.subTree=Ye,k(kt,Ye,w(kt.el),ne(kt),v,B,L),se.el=Ye.el,qe===null&&uu(v,Ye.el),ge&&dt(ge,B),(Ke=se.props&&se.props.onVnodeUpdated)&&dt(()=>Ot(Ke,Ne,se,$e),B)}else{let se,{el:de,props:ge}=S,{bm:Ne,m:$e,parent:qe,root:Ke,type:Ye}=v,kt=Qo(S);if(oo(v,!1),Ne&&vo(Ne),!kt&&(se=ge&&ge.onVnodeBeforeMount)&&Ot(se,qe,S),oo(v,!0),de&&M){let pt=()=>{v.subTree=Nn(v),M(de,v.subTree,v,B,null)};kt&&Ye.__asyncHydrate?Ye.__asyncHydrate(de,v,pt):pt()}else{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(Ye,v.parent?v.parent.type:void 0);let pt=v.subTree=Nn(v);k(null,pt,V,F,v,B,L),S.el=pt.el}if($e&&dt($e,B),!kt&&(se=ge&&ge.onVnodeMounted)){let pt=S;dt(()=>Ot(se,qe,pt),B)}(S.shapeFlag&256||qe&&Qo(qe.vnode)&&qe.vnode.shapeFlag&256)&&v.a&&dt(v.a,B),v.isMounted=!0,S=V=F=null}};v.scope.on();let Z=v.effect=new bo(x);v.scope.off();let K=v.update=Z.run.bind(Z),fe=v.job=Z.runIfDirty.bind(Z);fe.i=v,fe.id=v.uid,Z.scheduler=()=>In(fe),oo(v,!0),K()},le=(v,S,V)=>{S.component=v;let F=v.vnode.props;v.vnode=S,v.next=null,pu(v,S.props,F,V),vu(v,S.children,V),Tt(),qr(v),At()},Ie=(v,S,V,F,B,L,W,x,Z=!1)=>{let K=v&&v.children,fe=v?v.shapeFlag:0,se=S.children,{patchFlag:de,shapeFlag:ge}=S;if(de>0){if(de&128){Ae(K,se,V,F,B,L,W,x,Z);return}else if(de&256){_e(K,se,V,F,B,L,W,x,Z);return}}ge&8?(fe&16&&z(K,B,L),se!==K&&g(V,se)):fe&16?ge&16?Ae(K,se,V,F,B,L,W,x,Z):z(K,B,L,!0):(fe&8&&g(V,""),ge&16&&C(se,V,F,B,L,W,x,Z))},_e=(v,S,V,F,B,L,W,x,Z)=>{v=v||Qt,S=S||Qt;let K=v.length,fe=S.length,se=Math.min(K,fe),de;for(de=0;defe?z(v,B,L,!0,!1,se):C(S,V,F,B,L,W,x,Z,se)},Ae=(v,S,V,F,B,L,W,x,Z)=>{let K=0,fe=S.length,se=v.length-1,de=fe-1;for(;K<=se&&K<=de;){let ge=v[K],Ne=S[K]=Z?zt(S[K]):Pt(S[K]);if(Ko(ge,Ne))k(ge,Ne,V,null,B,L,W,x,Z);else break;K++}for(;K<=se&&K<=de;){let ge=v[se],Ne=S[de]=Z?zt(S[de]):Pt(S[de]);if(Ko(ge,Ne))k(ge,Ne,V,null,B,L,W,x,Z);else break;se--,de--}if(K>se){if(K<=de){let ge=de+1,Ne=gede)for(;K<=se;)Ve(v[K],B,L,!0),K++;else{let ge=K,Ne=K,$e=new Map;for(K=Ne;K<=de;K++){let ft=S[K]=Z?zt(S[K]):Pt(S[K]);ft.key!=null&&$e.set(ft.key,K)}let qe,Ke=0,Ye=de-Ne+1,kt=!1,pt=0,Ao=new Array(Ye);for(K=0;K=Ye){Ve(ft,B,L,!0);continue}let _t;if(ft.key!=null)_t=$e.get(ft.key);else for(qe=Ne;qe<=de;qe++)if(Ao[qe-Ne]===0&&Ko(ft,S[qe])){_t=qe;break}_t===void 0?Ve(ft,B,L,!0):(Ao[_t-Ne]=K+1,_t>=pt?pt=_t:kt=!0,k(ft,S[_t],V,null,B,L,W,x,Z),Ke++)}let rr=kt?wu(Ao):Qt;for(qe=rr.length-1,K=Ye-1;K>=0;K--){let ft=Ne+K,_t=S[ft],ir=S[ft+1],ar=ft+1{let{el:L,type:W,transition:x,children:Z,shapeFlag:K}=v;if(K&6){Ee(v.component.subTree,S,V,F);return}if(K&128){v.suspense.move(S,V,F);return}if(K&64){W.move(v,S,V,I);return}if(W===X){r(L,S,V);for(let se=0;sex.enter(L),B));else{let{leave:se,delayLeave:de,afterLeave:ge}=x,Ne=()=>{v.ctx.isUnmounted?s(L):r(L,S,V)},$e=()=>{let qe=L._isLeaving||!!L[_n];L._isLeaving&&L[_n](!0),x.persisted&&!qe?Ne():se(L,()=>{Ne(),ge&&ge()})};de?de(L,Ne,$e):$e()}else r(L,S,V)},Ve=(v,S,V,F=!1,B=!1)=>{let{type:L,props:W,ref:x,children:Z,dynamicChildren:K,shapeFlag:fe,patchFlag:se,dirs:de,cacheIndex:ge,memo:Ne}=v;if(se===-2&&(B=!1),x!=null&&(Tt(),Jo(x,null,V,v,!0),At()),ge!=null&&(S.renderCache[ge]=void 0),fe&256){S.ctx.deactivate(v);return}let $e=fe&1&&de,qe=!Qo(v),Ke;if(qe&&(Ke=W&&W.onVnodeBeforeUnmount)&&Ot(Ke,S,v),fe&6)Ue(v.component,V,F);else{if(fe&128){v.suspense.unmount(V,F);return}$e&&to(v,null,S,"beforeUnmount"),fe&64?v.type.remove(v,S,V,I,F):K&&!K.hasOnce&&(L!==X||se>0&&se&64)?z(K,S,V,!1,!0):(L===X&&se&384||!B&&fe&16)&&z(Z,S,V),F&&Se(v)}let Ye=Ne!=null&&ge==null;(qe&&(Ke=W&&W.onVnodeUnmounted)||$e||Ye)&&dt(()=>{Ke&&Ot(Ke,S,v),$e&&to(v,null,S,"unmounted"),Ye&&(v.el=null)},V)},Se=v=>{let{type:S,el:V,anchor:F,transition:B}=v;if(S===X){Le(V,F);return}if(S===Zo){q(v);return}let L=()=>{s(V),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(v.shapeFlag&1&&B&&!B.persisted){let{leave:W,delayLeave:x}=B,Z=()=>W(V,L);x?x(v.el,L,Z):Z()}else L()},Le=(v,S)=>{let V;for(;v!==S;)V=h(v),s(v),v=V;s(S)},Ue=(v,S,V)=>{let{bum:F,scope:B,job:L,subTree:W,um:x,m:Z,a:K}=v;Wr(Z),Wr(K),F&&vo(F),B.stop(),L&&(L.flags|=8,Ve(W,v,S,V)),x&&dt(x,S),dt(()=>{v.isUnmounted=!0},S)},z=(v,S,V,F=!1,B=!1,L=0)=>{for(let W=L;W{if(v.shapeFlag&6)return ne(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();let S=h(v.anchor||v.el),V=S&&S[Ud];return V?h(V):S},te=!1,_=(v,S,V)=>{let F;v==null?S._vnode&&(Ve(S._vnode,null,null,!0),F=S._vnode.component):k(S._vnode||null,v,S,null,null,null,V),S._vnode=v,te||(te=!0,qr(F),ei(),te=!1)},I={p:k,um:Ve,m:Ee,r:Se,mt:oe,mc:C,pc:Ie,pbc:G,n:ne,o:e},j,M;return t&&([j,M]=t(I)),{render:_,hydrate:j,createApp:su(_,j)}}function Dn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function oo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function bu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Di(e,t,n=!1){let r=e.children,s=t.children;if(be(r)&&be(s))for(let i=0;i>1,e[n[u]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function Ri(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ri(t)}function Wr(e){if(e)for(let t=0;te.__isSuspense;function ku(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):xr(e)}var X=Symbol.for("v-fgt"),Fs=Symbol.for("v-txt"),Ht=Symbol.for("v-cmt"),Zo=Symbol.for("v-stc"),so=[],vt=null;function l(e=!1){so.push(vt=e?null:[])}function Oi(){so.pop(),vt=so[so.length-1]||null}var es=1;function Os(e,t=!1){es+=e,e<0&&vt&&t&&(vt.hasOnce=!0)}function Ii(e){return e.dynamicChildren=es>0?vt||Qt:null,Oi(),es>0&&vt&&vt.push(e),e}function d(e,t,n,r,s,i){return Ii(o(e,t,n,r,s,i,!0))}function qt(e,t,n,r,s){return Ii(Ce(e,t,n,r,s,!0))}function Is(e){return e?e.__v_isVNode===!0:!1}function Ko(e,t){return e.type===t.type&&e.key===t.key}var Pi=({key:e})=>e??null,Ns=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||Ze(e)||we(e)?{i:mt,r:e,k:t,f:!!n}:e:null);function o(e,t=null,n=null,r=0,s=null,i=e===X?0:1,a=!1,u=!1){let f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pi(t),ref:t&&Ns(t),scopeId:oi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:mt};return u?(Ps(f,n),i&128&&e.normalize(f)):n&&(f.shapeFlag|=ze(n)?8:16),es>0&&!a&&vt&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&vt.push(f),f}var Ce=Eu;function Eu(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===Jd)&&(e=Ht),Is(e)){let u=Co(e,t,!0);return n&&Ps(u,n),es>0&&!i&&vt&&(u.shapeFlag&6?vt[vt.indexOf(e)]=u:vt.push(u)),u.patchFlag=-2,u}if(Pu(e)&&(e=e.__vccOpts),t){t=Cu(t);let{class:u,style:f}=t;u&&!ze(u)&&(t.class=A(u)),Te(f)&&(Wo(f)&&!be(f)&&(f=Ge({},f)),t.style=Me(f))}let a=ze(e)?1:Ai(e)?128:qs(e)?64:Te(e)?4:we(e)?2:0;return o(e,t,n,r,s,a,i,!0)}function Cu(e){return e?Wo(e)||wi(e)?Ge({},e):e:null}function Co(e,t,n=!1,r=!1){let{props:s,ref:i,patchFlag:a,children:u,transition:f}=e,m=t?_u(s||{},t):s,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Pi(m),ref:t&&t.ref?n&&i?be(i)?i.concat(Ns(t)):[i,Ns(t)]:Ns(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==X?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Co(e.ssContent),ssFallback:e.ssFallback&&Co(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&r&&Ms(g,f.clone(g)),g}function y(e=" ",t=0){return Ce(Fs,null,e,t)}function ce(e,t){let n=Ce(Zo,null,e);return n.staticCount=t,n}function p(e="",t=!1){return t?(l(),qt(Ht,null,e)):Ce(Ht,null,e)}function Pt(e){return e==null||typeof e=="boolean"?Ce(Ht):be(e)?Ce(X,null,e.slice()):Is(e)?zt(e):Ce(Fs,null,String(e))}function zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Co(e)}function Ps(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(be(t))n=16;else if(typeof t=="object")if(r&65){let s=t.default;s&&(s._c&&(s._d=!1),Ps(e,s()),s._c&&(s._d=!0));return}else{n=32;let s=t._;!s&&!wi(t)?t._ctx=mt:s===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(we(t)){if(r&65){Ps(e,{default:t});return}t={default:t,_ctx:mt},n=32}else t=String(t),r&64?(n=16,t=[y(t)]):n=8;e.children=t,e.shapeFlag|=n}function _u(...e){let t={};for(let n=0;ntt||mt,Vs,ts;{let e=qo(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(a=>a(i)):s[0](i)}};Vs=t("__VUE_INSTANCE_SETTERS__",n=>tt=n),ts=t("__VUE_SSR_SETTERS__",n=>_o=n)}var is=e=>{let t=tt;return Vs(e),e.scope.on(),()=>{e.scope.off(),Vs(t)}},Kr=()=>{tt&&tt.scope.off(),Vs(null)};function Vi(e){return e.vnode.shapeFlag&4}var _o=!1;function Ru(e,t=!1,n=!1){t&&ts(t);let{props:r,children:s}=e.vnode,i=Vi(e);cu(e,r,i,t),mu(e,s,n||t);let a=i?Tu(e,t):void 0;return t&&ts(!1),a}function Tu(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Qd);let{setup:r}=n;if(r){Tt();let s=e.setupContext=r.length>1?Ou(e):null,i=is(e),a=os(r,e,0,[e.props,s]),u=nn(a);if(At(),i(),(u||e.sp)&&!Qo(e)&&Pn(e),u){if(a.then(Kr,Kr),t)return a.then(f=>{ts(!0);try{Yr(e,f,t)}finally{ts(!1)}}).catch(f=>{ss(f,e,0)});e.asyncDep=a}else Yr(e,a,t)}else qi(e,t)}function Yr(e,t,n){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=_s(t)),qi(e,n)}var Jr,Qr;function qi(e,t,n){let r=e.type;if(!e.render){if(!t&&Jr&&!r.render){let s=r.template||Vn(e).template;if(s){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:f}=r,m=Ge(Ge({isCustomElement:i,delimiters:u},a),f);r.render=Jr(s,m)}}e.render=r.render||at,Qr&&Qr(e)}{let s=is(e);Tt();try{Xd(e)}finally{At(),s()}}}var Au={get(e,t){return xe(e,"get",""),e[t]}};function Ou(e){let t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Au),slots:e.slots,emit:e.emit,expose:t}}function zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_s(Cn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Xo)return Xo[n](e)},has(t,n){return n in t||n in Xo}})):e.proxy}function Iu(e,t=!0){return we(e)?e.displayName||e.name:e.name||t&&e.__name}function Pu(e){return we(e)&&"__vccOpts"in e}var ot=(e,t)=>Ir(e,t,_o);function ke(e,t,n){try{Os(-1);let r=arguments.length;return r===2?Te(t)&&!be(t)?Is(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Is(n)&&(n=[n]),Ce(e,t,n))}finally{Os(1)}}var Vu="3.5.42";var zn,Mi=typeof window<"u"&&window.trustedTypes;if(Mi)try{zn=Mi.createPolicy("vue",{createHTML:e=>e})}catch{}var Ki=zn?e=>zn.createHTML(e):e=>e,qu="http://www.w3.org/2000/svg",Mu="http://www.w3.org/1998/Math/MathML",Bt=typeof document<"u"?document:null,$i=Bt&&Bt.createElement("template"),$u={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let s=t==="svg"?Bt.createElementNS(qu,e):t==="mathml"?Bt.createElementNS(Mu,e):n?Bt.createElement(e,{is:n}):Bt.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Bt.createTextNode(e),createComment:e=>Bt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){let a=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{$i.innerHTML=Ki(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);let u=$i.content;if(r==="svg"||r==="mathml"){let f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};var Lu=Symbol("_vtc");function Uu(e,t,n){let r=e[Lu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}var Gs=Symbol("_vod"),Yi=Symbol("_vsh"),Y={name:"show",beforeMount(e,{value:t},{transition:n}){e[Gs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):as(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),as(e,!0),r.enter(e)):r.leave(e,()=>{as(e,!1)}):as(e,t))},beforeUnmount(e,{value:t}){as(e,t)}};function as(e,t){e.style.display=t?e[Gs]:"none",e[Yi]=!t}var Fu=Symbol("");var zu=/(?:^|;)\s*display\s*:/;function Hu(e,t,n){let r=e.style,s=ze(n),i=!1;if(n&&!s){if(t)if(ze(t))for(let a of t.split(";")){let u=a.slice(0,a.indexOf(":")).trim();n[u]==null&&ls(r,u,"")}else for(let a in t)n[a]==null&&ls(r,a,"");for(let a in n){a==="display"&&(i=!0);let u=n[a];u!=null?Bu(e,a,!ze(t)&&t?t[a]:void 0,u)||ls(r,a,u):ls(r,a,"")}}else if(s){if(t!==n){let a=r[Fu];a&&(n+=";"+a),r.cssText=n,i=zu.test(n)}}else t&&e.removeAttribute("style");Gs in e&&(e[Gs]=i?r.display:"",e[Yi]&&(r.display="none"))}var Hs=/\s*!important$/;function ls(e,t,n){if(be(n))n.forEach(r=>ls(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))Hs.test(n)?e.setProperty(t,n.replace(Hs,""),"important"):e.setProperty(t,n);else{let r=ju(e,t);Hs.test(n)?e.setProperty(St(r),n.replace(Hs,""),"important"):e[r]=n}}var Li=["Webkit","Moz","ms"],Ln={};function ju(e,t){let n=Ln[t];if(n)return n;let r=Je(t);if(r!=="filter"&&r in e)return Ln[t]=r;r=Xt(r);for(let s=0;sUn||(Qu.then(()=>Un=0),Un=Date.now());function Zu(e,t){let n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;let s=n.value;if(be(s)){let i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};let a=s.slice(),u=[r];for(let f=0;fe.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xu=(e,t,n,r,s,i)=>{let a=s==="svg";t==="class"?Uu(e,r,a):t==="style"?Hu(e,n,r):fo(t)?ho(t)||Wu(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ec(e,t,r,a))?(zi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Fi(e,t,r,a,i,t!=="value")):e._isVueCE&&(tc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ze(r)))?zi(e,Je(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Fi(e,t,r,a))};function ec(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&ji(t)&&we(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return ji(t)&&ze(n)?!1:t in e}function tc(e,t){let n=e._def.props;if(!n)return!1;let r=Je(t);return Array.isArray(n)?n.some(s=>Je(s)===r):Object.keys(n).some(s=>Je(s)===r)}var Bi=e=>{let t=e.props["onUpdate:modelValue"]||!1;return be(t)?n=>vo(t,n):t};function oc(e){e.target.composing=!0}function Gi(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var js=Symbol("_assign"),Bs=Symbol("_initialValue");function Fn(e,t,n){return t&&(e=e.trim()),n&&(e=Vo(e)),e}var Ji={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e.parentNode&&(e.type==="text"?e[Bs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Bs]=e.defaultValue.replace(/\r\n?/g,` -`))),e[js]=Bi(s);let i=r||s.props&&s.props.type==="number";So(e,t?"change":"input",a=>{a.target.composing||e[js](Fn(e.value,n,i))}),(n||i)&&So(e,"change",()=>{e.value=Fn(e.value,n,i)}),t||(So(e,"compositionstart",oc),So(e,"compositionend",Gi),So(e,"change",Gi))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let s=t??"",i=e[Bs];delete e[Bs],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[js](Fn(e.value,n,r)):e.value=s},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},a){if(e[js]=Bi(a),e.composing)return;let u=(i||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,f=t??"";if(u===f)return;let m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===f)||(e.value=f)}};var sc=["ctrl","shift","alt","meta"],nc={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)=>sc.some(n=>e[`${n}Key`]&&!t.includes(n))},he=(e,t)=>{if(!e)return e;let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...i)=>{for(let a=0;a{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;let i=St(s.key);if(t.some(a=>a===i||rc[a]===i))return e(s)}))},ic=Ge({patchProp:xu},$u),Wi;function ac(){return Wi||(Wi=Ni(ic))}var Qi=((...e)=>{let t=ac().createApp(...e),{mount:n}=t;return t.mount=r=>{let s=dc(r);if(!s)return;let i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=n(s,!1,lc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function lc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dc(e){return ze(e)?document.querySelector(e):e}var lo=typeof document<"u";function Zi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Zi(e.default)}var Oe=Object.assign;function Ws(e,t){let n={};for(let r in t){let s=t[r];n[r]=wt(s)?s.map(e):e(s)}return n}var Ro=()=>{},wt=Array.isArray;function Bn(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var xi=/#/g,cc=/&/g,pc=/\//g,fc=/=/g,hc=/\?/g,ea=/\+/g,mc=/%5B/g,vc=/%5D/g,ta=/%5E/g,gc=/%60/g,oa=/%7B/g,yc=/%7C/g,sa=/%7D/g,bc=/%20/g;function Gn(e){return e==null?"":encodeURI(""+e).replace(yc,"|").replace(mc,"[").replace(vc,"]")}function na(e){return Gn(e).replace(oa,"{").replace(sa,"}").replace(ta,"^")}function Hn(e){return Gn(e).replace(ea,"%2B").replace(bc,"+").replace(xi,"%23").replace(cc,"%26").replace(gc,"`").replace(oa,"{").replace(sa,"}").replace(ta,"^")}function wc(e){return Hn(e).replace(fc,"%3D")}function kc(e){return Gn(e).replace(xi,"%23").replace(hc,"%3F")}function ra(e){return kc(e).replace(pc,"%2F")}function Do(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Ec=/\/$/,Cc=e=>e.replace(Ec,"");function Ks(e,t,n="/"){let r,s={},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),s=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=Sc(r??t,n),{fullPath:r+i+a,path:r,query:s,hash:Do(a)}}function ia(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function aa(e,t,n){let r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&io(t.matched[r],n.matched[s])&&Kn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function io(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Kn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_c(e[n],t[n]))return!1;return!0}function _c(e,t){return wt(e)?Xi(e,t):wt(t)?Xi(t,e):e?.valueOf()===t?.valueOf()}function Xi(e,t){return wt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Sc(e,t){if(e.startsWith("/"))return e;if(!e)return t;let n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,a,u;for(a=0;a1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Wt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ys=(function(e){return e.pop="pop",e.push="push",e})({}),Js=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function la(e){if(!e)if(lo){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Cc(e)}var Nc=/^[^#]+#/;function da(e,t){return e.replace(Nc,"#")+t}function Dc(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ds=()=>({left:window.scrollX,top:window.scrollY});function ua(e){let t;if("el"in e){let n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Dc(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Yn(e,t){return(history.state?history.state.position-t:-1)+e}var jn=new Map;function ca(e,t){jn.set(e,t)}function pa(e){let t=jn.get(e);return jn.delete(e),t}function Rc(e){return typeof e=="string"||e&&typeof e=="object"}function Jn(e){return typeof e=="string"||typeof e=="symbol"}var Be=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),fa=Symbol("");var TM={[Be.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for +"use strict";(()=>{var sd=Object.defineProperty;var nd=(e,t)=>{for(var s in t)sd(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={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};var cs=new Map,ad=ve;function Xt(e){if(!cs.has(e)){let t=document.createElement("script");t.src=ad[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 ur(){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)},ld=Object.prototype.hasOwnProperty,De=(e,t)=>ld.call(e,t),ye=Array.isArray,$t=e=>Vo(e)==="[object Map]",Ut=e=>Vo(e)==="[object Set]",cr=e=>Vo(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",mt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",an=e=>(Te(e)||we(e))&&we(e.then)&&we(e.catch),mr=Object.prototype.toString,Vo=e=>mr.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)))},dd=/-\w/g,Je=ms(e=>e.replace(dd,t=>t.slice(1).toUpperCase())),ud=/\B([A-Z])/g,St=ms(e=>e.replace(ud,"-$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{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:s})},wo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var pr,Mo=()=>pr||(pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(ye(e)){let t={};for(let s=0;s{if(s){let r=s.split(pd);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function A(e){let t="";if(ze(e))t=e;else if(ye(e))for(let s=0;sNt(s,t))}var yr=e=>!!(e&&e.__v_isRef===!0),c=e=>ze(e)?e:e==null?"":ye(e)||Te(e)&&(e.toString===mr||!we(e.toString))?yr(e)?c(e.value):JSON.stringify(e,br,2):String(e),br=(e,t)=>yr(t)?br(e,t.value):$t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[r,n],i)=>(s[nn(r,i)+" =>"]=n,s),{})}:Ut(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>nn(s))}:mt(t)?nn(t):Te(t)&&!ye(t)&&!ps(t)?String(t):t,nn=(e,t="")=>{var s;return mt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function gd(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Qe,Fo=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Qe&&(Qe.active?(this.parent=Qe,this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){let r=this.scopes.slice();for(t=0,s=r.length;t0&&--this._on===0){if(Qe===this)Qe=this.prevScope;else{let t=Qe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,r;for(s=0,r=this.effects.length;s0)return;if(Uo){let t=Uo;for(Uo=void 0;t;){let s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;$o;){let t=$o;for($o=void 0;t;){let s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=s}}if(e)throw e}function Sr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Nr(e){let t,s=e.depsTail,r=s;for(;r;){let n=r.prevDep;r.version===-1?(r===s&&(s=n),En(r),yd(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=t,e.depsTail=s}function pn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zo)||(e.globalVersion=zo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!pn(e))))return;e.flags|=2;let t=e.dep,s=Fe,r=Et;Fe=e,Et=!0;try{Sr(e);let n=e.fn(e._value);(t.version===0||gt(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{Fe=s,Et=r,Nr(e),e.flags&=-3}}function En(e,t=!1){let{dep:s,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),s.subs===e&&(s.subs=r,!r&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)En(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function yd(e){let{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}var Et=!0,Rr=[];function At(){Rr.push(Et),Et=!1}function Ot(){let e=Rr.pop();Et=e===void 0?!0:e}function wr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let s=Fe;Fe=void 0;try{t()}finally{Fe=s}}}var zo=0,fn=class{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ho=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Fe||!Et||Fe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Fe)s=this.activeLink=new fn(Fe,this),Fe.deps?(s.prevDep=Fe.depsTail,Fe.depsTail.nextDep=s,Fe.depsTail=s):Fe.deps=Fe.depsTail=s,Tr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){let r=s.nextDep;r.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=r),s.prevDep=Fe.depsTail,s.nextDep=void 0,Fe.depsTail.nextDep=s,Fe.depsTail=s,Fe.deps===s&&(Fe.deps=r)}return s}trigger(t){this.version++,zo++,this.notify(t)}notify(t){wn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{kn()}}};function Tr(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Tr(r)}let s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}var mn=new WeakMap,to=Symbol(""),hn=Symbol(""),Bo=Symbol("");function xe(e,t,s){if(Et&&Fe){let r=mn.get(e);r||mn.set(e,r=new Map);let n=r.get(s);n||(r.set(s,n=new Ho),n.map=r,n.key=s),n.track()}}function Rt(e,t,s,r,n,i){let a=mn.get(e);if(!a){zo++;return}let u=f=>{f&&f.trigger()};if(wn(),t==="clear")a.forEach(u);else{let f=ye(e),h=f&&fs(s);if(f&&s==="length"){let v=Number(r);a.forEach((k,m)=>{(m==="length"||m===Bo||!mt(m)&&m>=v)&&u(k)})}else switch((s!==void 0||a.has(void 0))&&u(a.get(s)),h&&u(a.get(Bo)),t){case"add":f?h&&u(a.get("length")):(u(a.get(to)),$t(e)&&u(a.get(hn)));break;case"delete":f||(u(a.get(to)),$t(e)&&u(a.get(hn)));break;case"set":$t(e)&&u(a.get(to));break}}kn()}function ko(e){let t=Re(e);return t===e?t:(xe(t,"iterate",Bo),lt(e)?t:t.map(yt))}function Go(e){return xe(e=Re(e),"iterate",Bo),e}function Dt(e,t){return Ct(e)?oo(zt(e)?yt(t):t):yt(t)}var bd={__proto__:null,[Symbol.iterator](){return un(this,Symbol.iterator,e=>Dt(this,e))},concat(...e){return ko(this).concat(...e.map(t=>ye(t)?ko(t):t))},entries(){return un(this,"entries",e=>(e[1]=Dt(this,e[1]),e))},every(e,t){return Ft(this,"every",e,t,void 0,arguments)},filter(e,t){return Ft(this,"filter",e,t,s=>s.map(r=>Dt(this,r)),arguments)},find(e,t){return Ft(this,"find",e,t,s=>Dt(this,s),arguments)},findIndex(e,t){return Ft(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ft(this,"findLast",e,t,s=>Dt(this,s),arguments)},findLastIndex(e,t){return Ft(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ft(this,"forEach",e,t,void 0,arguments)},includes(...e){return cn(this,"includes",e)},indexOf(...e){return cn(this,"indexOf",e)},join(e){return ko(this).join(e)},lastIndexOf(...e){return cn(this,"lastIndexOf",e)},map(e,t){return Ft(this,"map",e,t,void 0,arguments)},pop(){return Lo(this,"pop")},push(...e){return Lo(this,"push",e)},reduce(e,...t){return kr(this,"reduce",e,t)},reduceRight(e,...t){return kr(this,"reduceRight",e,t)},shift(){return Lo(this,"shift")},some(e,t){return Ft(this,"some",e,t,void 0,arguments)},splice(...e){return Lo(this,"splice",e)},toReversed(){return ko(this).toReversed()},toSorted(e){return ko(this).toSorted(e)},toSpliced(...e){return ko(this).toSpliced(...e)},unshift(...e){return Lo(this,"unshift",e)},values(){return un(this,"values",e=>Dt(this,e))}};function un(e,t,s){let r=Go(e),n=r[t]();return r!==e&&!lt(e)&&(n._next=n.next,n.next=()=>{let i=n._next();return i.done||(i.value=s(i.value)),i}),n}var wd=Array.prototype;function Ft(e,t,s,r,n,i){let a=Go(e),u=a!==e&&!lt(e),f=a[t];if(f!==wd[t]){let k=f.apply(e,i);return u?yt(k):k}let h=s;a!==e&&(u?h=function(k,m){return s.call(this,Dt(e,k),m,e)}:s.length>2&&(h=function(k,m){return s.call(this,k,m,e)}));let v=f.call(a,h,r);return u&&n?n(v):v}function kr(e,t,s,r){let n=Go(e),i=n!==e&&!lt(e),a=s,u=!1;n!==e&&(i?(u=r.length===0,a=function(h,v,k){return u&&(u=!1,h=Dt(e,h)),s.call(this,h,Dt(e,v),k,e)}):s.length>3&&(a=function(h,v,k){return s.call(this,h,v,k,e)}));let f=n[t](a,...r);return u?Dt(e,f):f}function cn(e,t,s){let r=Re(e);xe(r,"iterate",Bo);let n=r[t](...s);return(n===-1||n===!1)&&Ko(s[0])?(s[0]=Re(s[0]),r[t](...s)):n}function Lo(e,t,s=[]){At(),wn();let r=Re(e)[t].apply(e,s);return kn(),Ot(),r}var kd=ho("__proto__,__v_isRef,__isVue"),Ar=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mt));function Ed(e){mt(e)||(e=String(e));let t=Re(this);return xe(t,"has",e),t.hasOwnProperty(e)}var ws=class{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,r){if(s==="__v_skip")return t.__v_skip;let n=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!n;if(s==="__v_isReadonly")return n;if(s==="__v_isShallow")return i;if(s==="__v_raw")return r===(n?i?Od:Pr:i?Ir:Or).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=ye(t);if(!n){let f;if(a&&(f=bd[s]))return f;if(s==="hasOwnProperty")return Ed}let u=Reflect.get(t,s,Ze(t)?t:r);if((mt(s)?Ar.has(s):kd(s))||(n||xe(t,"get",s),i))return u;if(Ze(u)){let f=a&&fs(s)?u:u.value;return n&&Te(f)?Es(f):f}return Te(u)?n?Es(u):He(u):u}},ks=class extends ws{constructor(t=!1){super(!1,t)}set(t,s,r,n){let i=t[s],a=ye(t)&&fs(s);if(!this._isShallow){let h=Ct(i);if(!lt(r)&&!Ct(r)&&(i=Re(i),r=Re(r)),!a&&Ze(i)&&!Ze(r))return h||(i.value=r),!0}let u=a?Number(s)e,gs=e=>Reflect.getPrototypeOf(e);function Nd(e,t,s){return function(...r){let n=this.__v_raw,i=Re(n),a=$t(i),u=e==="entries"||e===Symbol.iterator&&a,f=e==="keys"&&a,h=n[e](...r),v=s?gn:t?oo:yt;return!t&&xe(i,"iterate",f?hn:to),Ge(Object.create(h),{next(){let{value:k,done:m}=h.next();return m?{value:k,done:m}:{value:u?[v(k[0]),v(k[1])]:v(k),done:m}}})}}function ys(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Dd(e,t){let s={get(n){let i=this.__v_raw,a=Re(i),u=Re(n);e||(gt(n,u)&&xe(a,"get",n),xe(a,"get",u));let{has:f}=gs(a),h=t?gn:e?oo:yt;if(f.call(a,n))return h(i.get(n));if(f.call(a,u))return h(i.get(u));i!==a&&i.get(n)},get size(){let n=this.__v_raw;return!e&&xe(Re(n),"iterate",to),n.size},has(n){let i=this.__v_raw,a=Re(i),u=Re(n);return e||(gt(n,u)&&xe(a,"has",n),xe(a,"has",u)),n===u?i.has(n):i.has(n)||i.has(u)},forEach(n,i){let a=this,u=a.__v_raw,f=Re(u),h=t?gn:e?oo:yt;return!e&&xe(f,"iterate",to),u.forEach((v,k)=>n.call(i,h(v),h(k),a))}};return Ge(s,e?{add:ys("add"),set:ys("set"),delete:ys("delete"),clear:ys("clear")}:{add(n){let i=Re(this),a=gs(i),u=Re(n),f=!t&&!lt(n)&&!Ct(n)?u:n;return a.has.call(i,f)||gt(n,f)&&a.has.call(i,n)||gt(u,f)&&a.has.call(i,u)||(i.add(f),Rt(i,"add",f,f)),this},set(n,i){!t&&!lt(i)&&!Ct(i)&&(i=Re(i));let a=Re(this),{has:u,get:f}=gs(a),h=u.call(a,n);h||(n=Re(n),h=u.call(a,n));let v=f.call(a,n);return a.set(n,i),h?gt(i,v)&&Rt(a,"set",n,i,v):Rt(a,"add",n,i),this},delete(n){let i=Re(this),{has:a,get:u}=gs(i),f=a.call(i,n);f||(n=Re(n),f=a.call(i,n));let h=u?u.call(i,n):void 0,v=i.delete(n);return f&&Rt(i,"delete",n,void 0,h),v},clear(){let n=Re(this),i=n.size!==0,a=void 0,u=n.clear();return i&&Rt(n,"clear",void 0,void 0,a),u}}),["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=Nd(n,e,t)}),s}function Cn(e,t){let s=Dd(e,t);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(De(s,n)&&n in r?s:r,n,i)}var Rd={get:Cn(!1,!1)},Td={get:Cn(!1,!0)},Ad={get:Cn(!0,!1)};var Or=new WeakMap,Ir=new WeakMap,Pr=new WeakMap,Od=new WeakMap;function Id(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function He(e){return Ct(e)?e:_n(e,!1,Cd,Rd,Or)}function Wo(e){return _n(e,!1,Sd,Td,Ir)}function Es(e){return _n(e,!0,_d,Ad,Pr)}function _n(e,t,s,r,n){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let i=n.get(e);if(i)return i;let a=Id(ln(e));if(a===0)return e;let u=new Proxy(e,a===2?r:s);return n.set(e,u),u}function zt(e){return Ct(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ct(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function Ko(e){return e?!!e.__v_raw:!1}function Re(e){let t=e&&e.__v_raw;return t?Re(t):e}function Sn(e){return!De(e,"__v_skip")&&Object.isExtensible(e)&&hs(e,"__v_skip",!0),e}var yt=e=>Te(e)?He(e):e,oo=e=>Te(e)?Es(e):e;function Ze(e){return e?e.__v_isRef===!0:!1}function et(e){return Vr(e,!1)}function _s(e){return Vr(e,!0)}function Vr(e,t){return Ze(e)?e:new yn(e,t)}var yn=class{constructor(t,s){this.dep=new Ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Re(t),this._value=s?t:yt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){let s=this._rawValue,r=this.__v_isShallow||lt(t)||Ct(t);t=r?t:Re(t),gt(t,s)&&(this._rawValue=t,this._value=r?t:yt(t),this.dep.trigger())}};function Ht(e){return Ze(e)?e.value:e}var Pd={get:(e,t,s)=>t==="__v_raw"?e:Ht(Reflect.get(e,t,s)),set:(e,t,s,r)=>{let n=e[t];return Ze(n)&&!Ze(s)?(n.value=s,!0):Reflect.set(e,t,s,r)}};function Ss(e){return zt(e)?e:new Proxy(e,Pd)}var bn=class{constructor(t,s,r){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return _r(this,!0),!0}get value(){let t=this.dep.track();return Dr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function qr(e,t,s=!1){let r,n;return we(e)?r=e:(r=e.get,n=e.set),new bn(r,n,s)}var bs={},Cs=new WeakMap,eo;function Mr(e,t=!1,s=eo){if(s){let r=Cs.get(s);r||Cs.set(s,r=[]),r.push(e)}}function Lr(e,t,s=Pe){let{immediate:r,deep:n,once:i,scheduler:a,augmentJob:u,call:f}=s,h=q=>{(s.onWarn||gd)("Invalid watch source: ",q,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},v=q=>n?q:lt(q)||n===!1||n===0?Tt(q,1):Tt(q),k,m,y,E,w=!1,R=!1;if(Ze(e)?(m=()=>e.value,w=lt(e)):zt(e)?(m=()=>v(e),w=!0):ye(e)?(R=!0,w=e.some(q=>zt(q)||lt(q)),m=()=>e.map(q=>{if(Ze(q))return q.value;if(zt(q))return v(q);if(we(q))return f?f(q,2):q()})):we(e)?t?m=f?()=>f(e,2):e:m=()=>{if(y){At();try{y()}finally{Ot()}}let q=eo;eo=k;try{return f?f(e,3,[E]):e(E)}finally{eo=q}}:m=at,t&&n){let q=m,U=n===!0?1/0:n;m=()=>Tt(q(),U)}let D=Er(),T=()=>{k.stop(),D&&D.active&&Po(D.effects,k)};if(i&&t){let q=t;t=(...U)=>{let ae=q(...U);return T(),ae}}let P=R?new Array(e.length).fill(bs):bs,H=q=>{if(!(!(k.flags&1)||!k.dirty&&!q))if(t){let U=k.run();if(q||n||w||(R?U.some((ae,ie)=>gt(ae,P[ie])):gt(U,P))){y&&y();let ae=eo;eo=k;try{let ie=[U,P===bs?void 0:R&&P[0]===bs?[]:P,E];P=U,f?f(t,3,ie):t(...ie)}finally{eo=ae}}}else k.run()};return u&&u(H),k=new Eo(m),k.scheduler=a?()=>a(H,!1):H,E=q=>Mr(q,!1,k),y=k.onStop=()=>{let q=Cs.get(k);if(q){if(f)f(q,4);else for(let U of q)U();Cs.delete(k)}},t?r?H(!0):P=k.run():a?a(H.bind(null,!0),!0):k.run(),T.pause=k.pause.bind(k),T.resume=k.resume.bind(k),T.stop=T,T}function Tt(e,t=1/0,s){if(t<=0||!Te(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ze(e))Tt(e.value,t,s);else if(ye(e))for(let r=0;r{Tt(r,t,s)});else if(ps(e)){for(let r in e)Tt(e[r],t,s);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Tt(e[r],t,s)}return e}function ss(e,t,s,r){try{return r?e(...r):e()}catch(n){ns(n,t,s)}}function bt(e,t,s,r){if(we(e)){let n=ss(e,t,s,r);return n&&an(n)&&n.catch(i=>{ns(i,t,s)}),n}if(ye(e)){let n=[];for(let i=0;i>>1,n=rt[r],i=es(n);i=es(s)?rt.push(e):rt.splice($d(t),0,e),e.flags|=1,ti()}}function ti(){Rs||(Rs=ei.then(ni))}function oi(e){if(!ye(e))Qt&&e.id===-1?Qt.splice(Co+1,0,e):e.flags&1||(_o.push(e),e.flags|=1);else for(let t=0;tes(s)-es(r));if(_o.length=0,Qt){for(let s=0;se.id==null?e.flags&2?-1:1/0:e.id;function ni(e){let t=at;try{for(Pt=0;Pt{r._d&&Is(-1);let i=Ts(t),a=ro.length,u;try{u=e(...n)}finally{for(let f=ro.length;f>a;f--)Vi();Ts(i),r._d&&Is(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function N(e,t){if(ht===null)return e;let s=Hs(ht),r=e.dirs||(e.dirs=[]);for(let n=0;n1)return s&&we(t)?t.call(r&&r.proxy):t}}var Fd=Symbol.for("v-scx"),zd=()=>{{let e=ut(Fd);return e}};function Be(e,t,s){return ii(e,t,s)}function ii(e,t,s=Pe){let{immediate:r,deep:n,flush:i,once:a}=s,u=Ge({},s),f=t&&r||!t&&i!=="post",h;if(Do){if(i==="sync"){let y=zd();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!f){let y=()=>{};return y.stop=at,y.resume=at,y.pause=at,y}}let v=tt;u.call=(y,E,w)=>bt(y,v,E,w);let k=!1;i==="post"?u.scheduler=y=>{dt(y,v&&v.suspense)}:i!=="sync"&&(k=!0,u.scheduler=(y,E)=>{E?y():Vn(y)}),u.augmentJob=y=>{t&&(y.flags|=4),k&&(y.flags|=2,v&&(y.id=v.uid,y.i=v))};let m=Lr(e,t,u);return Do&&(h?h.push(m):f&&m()),m}function Hd(e,t,s){let r=this.proxy,n=ze(e)?e.includes(".")?ai(r,e):()=>r[e]:e.bind(r,r),i;we(t)?i=t:(i=t.handler,s=t);let a=as(this),u=ii(n,i.bind(r),s);return a(),u}function ai(e,t){let s=t.split(".");return()=>{let r=e;for(let n=0;ne.__isTeleport;var Nn=Symbol("_leaveCb");function jd(e){let t=e[0];if(e.length>1){let s=!1;for(let r of e)if(r.type!==jt){t=r,s=!0;break}}return t}function li(e){if(!$s(e))return Ms(e.type)&&e.children?jd(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&we(s.default))return s.default()}}function Ls(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let s=e.component.subTree;Ls(Ms(s.type)&&li(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function rs(e,t){return we(e)?Ge({name:e.name},t,{setup:e}):e}function qn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ur(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}var As=new WeakMap;function Qo(e,t,s,r,n=!1){if(ye(e)){e.forEach((w,R)=>Qo(w,t&&(ye(t)?t[R]:t),s,r,n));return}if(Xo(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Qo(e,t,s,r.component.subTree);return}let i=r.shapeFlag&4?Hs(r.component):r.el,a=n?null:i,{i:u,r:f}=e,h=t&&t.r,v=u.refs===Pe?u.refs={}:u.refs,k=u.setupState,m=Re(k),y=k===Pe?rn:w=>Ur(v,w)?!1:De(m,w),E=(w,R)=>!(R&&Ur(v,R));if(h!=null&&h!==f){if(Fr(t),ze(h))v[h]=null,y(h)&&(k[h]=null);else if(Ze(h)){let w=t;E(h,w.k)&&(h.value=null),w.k&&(v[w.k]=null)}}if(we(f))ss(f,u,12,[a,v]);else{let w=ze(f),R=Ze(f);if(w||R){let D=()=>{if(e.f){let T=w?y(f)?k[f]:v[f]:E(f)||!e.k?f.value:v[e.k];if(n)ye(T)&&Po(T,i);else if(ye(T))T.includes(i)||T.push(i);else if(w)v[f]=[i],y(f)&&(k[f]=v[f]);else{let P=[i];E(f,e.k)&&(f.value=P),e.k&&(v[e.k]=P)}}else w?(v[f]=a,y(f)&&(k[f]=a)):R&&(E(f,e.k)&&(f.value=a),e.k&&(v[e.k]=a))};if(a){let T=()=>{D(),As.delete(e)};T.id=-1,As.set(e,T),dt(T,s)}else Fr(e),D()}}}function Fr(e){let t=As.get(e);t&&(t.flags|=8,As.delete(e))}var zr=e=>e.nodeType===8;var m8=Mo().requestIdleCallback||(e=>setTimeout(e,1)),h8=Mo().cancelIdleCallback||(e=>clearTimeout(e));function Gd(e,t){if(zr(e)&&e.data==="["){let s=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(zr(r))if(r.data==="]"){if(--s===0)break}else r.data==="["&&s++;r=r.nextSibling}}else t(e)}var Xo=e=>!!e.type.__asyncLoader;function di(e){we(e)&&(e={loader:e});let{loader:t,loadingComponent:s,errorComponent:r,delay:n=200,hydrate:i,timeout:a,suspensible:u=!0,onError:f}=e,h=null,v,k=0,m=()=>(k++,h=null,y()),y=()=>{let E;return h||(E=h=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),f)return new Promise((R,D)=>{f(w,()=>R(m()),()=>D(w),k+1)});throw w}).then(w=>E!==h&&h?h:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),v=w,w)))};return rs({name:"AsyncComponentWrapper",__asyncLoader:y,__asyncHydrate(E,w,R){let D=E.isConnected,T=!1;(w.bu||(w.bu=[])).push(()=>T=!0);let P=()=>{T||!E.parentNode||D&&!E.isConnected||R()},H=i?()=>{let q=i(P,U=>Gd(E,U));q&&(w.bum||(w.bum=[])).push(q)}:P;v?H():y().then(()=>!w.isUnmounted&&H())},get __asyncResolved(){return v},setup(){let E=tt;if(qn(E),v)return()=>Ns(v,E);let w=q=>{h=null,ns(q,E,13,!r)};if(u&&E.suspense||Do)return y().then(q=>()=>Ns(q,E)).catch(q=>(w(q),()=>r?Ce(r,{error:q}):null));let R=et(!1),D=et(),T=et(!!n),P,H;return is(()=>{P!=null&&clearTimeout(P),H!=null&&clearTimeout(H)}),n&&(H=setTimeout(()=>{E.isUnmounted||(T.value=!1)},n)),a!=null&&(P=setTimeout(()=>{if(!E.isUnmounted&&!R.value&&!D.value){let q=new Error(`Async component timed out after ${a}ms.`);w(q),D.value=q}},a)),y().then(()=>{E.isUnmounted||(R.value=!0,E.parent&&$s(E.parent.vnode)&&E.parent.update())}).catch(q=>{if(E.isUnmounted){h=null;return}w(q),D.value=q}),()=>{if(R.value&&v)return Ns(v,E);if(D.value&&r)return Ce(r,{error:D.value});if(s&&!T.value)return Ns(s,E)}}})}function Ns(e,t){let{ref:s,props:r,children:n,ce:i}=t.vnode,a=Ce(e,r,n);return a.ref=s,a.ce=i,delete t.vnode.ce,a}var $s=e=>e.type.__isKeepAlive;function ui(e,t){pi(e,"a",t)}function ci(e,t){pi(e,"da",t)}function pi(e,t,s=tt){let r=e.__wdc||(e.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Us(t,r,s),s){let n=s.parent;for(;n&&n.parent;)$s(n.parent.vnode)&&Wd(r,t,s,n),n=n.parent}}function Wd(e,t,s,r){let n=Us(t,e,r,!0);is(()=>{Po(r[t],n)},s)}function Us(e,t,s=tt,r=!1){if(s){let n=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...a)=>{At();let u=as(s),f=bt(t,s,e,a);return u(),Ot(),f});return r?n.unshift(i):n.push(i),i}}var Gt=e=>(t,s=tt)=>{(!Do||e==="sp")&&Us(e,(...r)=>t(...r),s)},Kd=Gt("bm"),qt=Gt("m"),fi=Gt("bu"),mi=Gt("u"),ao=Gt("bum"),is=Gt("um"),Yd=Gt("sp"),Jd=Gt("rtg"),Qd=Gt("rtc");function Xd(e,t=tt){Us("ec",e,t)}var hi="components",Zd="directives";function We(e,t){return vi(hi,e,!0,t)||e}var xd=Symbol.for("v-ndc");function be(e){return vi(Zd,e)}function vi(e,t,s=!0,r=!1){let n=ht||tt;if(n){let i=n.type;if(e===hi){let u=Mu(i,!1);if(u&&(u===t||u===Je(t)||u===xt(Je(t))))return i}let a=Hr(n[e]||i[e],t)||Hr(n.appContext[e],t);return!a&&r?i:a}}function Hr(e,t){return e&&(e[t]||e[Je(t)]||e[xt(Je(t))])}function re(e,t,s,r){let n,i=s&&s[r],a=ye(e);if(a||ze(e)){let u=a&&zt(e),f=!1,h=!1;u&&(f=!lt(e),h=Ct(e),e=Go(e)),n=new Array(e.length);for(let v=0,k=e.length;vt(u,f,void 0,i&&i[f]));else{let u=Object.keys(e);n=new Array(u.length);for(let f=0,h=u.length;fe?Li(e)?Hs(e):An(e.parent):null;var Zo=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>An(e.parent),$root:e=>An(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mn(e),$forceUpdate:e=>e.f||(e.f=()=>{Vn(e.update)}),$nextTick:e=>e.n||(e.n=st.bind(e.proxy)),$watch:e=>Hd.bind(e)});var Dn=(e,t)=>e!==Pe&&!e.__isScriptSetup&&De(e,t),eu={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:s,setupState:r,data:n,props:i,accessCache:a,type:u,appContext:f}=e;if(t[0]!=="$"){let m=a[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return n[t];case 4:return s[t];case 3:return i[t]}else{if(Dn(r,t))return a[t]=1,r[t];if(n!==Pe&&De(n,t))return a[t]=2,n[t];if(De(i,t))return a[t]=3,i[t];if(s!==Pe&&De(s,t))return a[t]=4,s[t];On&&(a[t]=0)}}let h=Zo[t],v,k;if(h)return t==="$attrs"&&xe(e.attrs,"get",""),h(e);if((v=u.__cssModules)&&(v=v[t]))return v;if(s!==Pe&&De(s,t))return a[t]=4,s[t];if(k=f.config.globalProperties,De(k,t))return k[t]},set({_:e},t,s){let{data:r,setupState:n,ctx:i}=e;return Dn(n,t)?(n[t]=s,!0):r!==Pe&&De(r,t)?(r[t]=s,!0):De(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:r,appContext:n,props:i,type:a}},u){let f;return!!(s[u]||e!==Pe&&u[0]!=="$"&&De(e,u)||Dn(t,u)||De(i,u)||De(r,u)||De(Zo,u)||De(n.config.globalProperties,u)||(f=a.__cssModules)&&f[u])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:De(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Br(e){return ye(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}var On=!0;function tu(e){let t=Mn(e),s=e.proxy,r=e.ctx;On=!1,t.beforeCreate&&jr(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:u,provide:f,inject:h,created:v,beforeMount:k,mounted:m,beforeUpdate:y,updated:E,activated:w,deactivated:R,beforeDestroy:D,beforeUnmount:T,destroyed:P,unmounted:H,render:q,renderTracked:U,renderTriggered:ae,errorCaptured:ie,serverPrefetch:C,expose:O,inheritAttrs:G,components:J,directives:ee,filters:Q}=t;if(h&&ou(h,r,null),a)for(let pe in a){let le=a[pe];we(le)&&(r[pe]=le.bind(s))}if(n){let pe=n.call(s,s);Te(pe)&&(e.data=He(pe))}if(On=!0,i)for(let pe in i){let le=i[pe],Ie=we(le)?le.bind(s,s):we(le.get)?le.get.bind(s,s):at,_e=!we(le)&&we(le.set)?le.set.bind(s):at,Ae=ot({get:Ie,set:_e});Object.defineProperty(r,pe,{enumerable:!0,configurable:!0,get:()=>Ae.value,set:Ee=>Ae.value=Ee})}if(u)for(let pe in u)gi(u[pe],r,s,pe);if(f){let pe=we(f)?f.call(s):f;Reflect.ownKeys(pe).forEach(le=>{io(le,pe[le])})}v&&jr(v,e,"c");function ue(pe,le){ye(le)?le.forEach(Ie=>pe(Ie.bind(s))):le&&pe(le.bind(s))}if(ue(Kd,k),ue(qt,m),ue(fi,y),ue(mi,E),ue(ui,w),ue(ci,R),ue(Xd,ie),ue(Qd,U),ue(Jd,ae),ue(ao,T),ue(is,H),ue(Yd,C),ye(O))if(O.length){let pe=e.exposed||(e.exposed={});O.forEach(le=>{Object.defineProperty(pe,le,{get:()=>s[le],set:Ie=>s[le]=Ie,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===at&&(e.render=q),G!=null&&(e.inheritAttrs=G),J&&(e.components=J),ee&&(e.directives=ee),C&&qn(e)}function ou(e,t,s=at){ye(e)&&(e=In(e));for(let r in e){let n=e[r],i;Te(n)?"default"in n?i=ut(n.from||r,n.default,!0):i=ut(n.from||r):i=ut(n),Ze(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function jr(e,t,s){bt(ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,s)}function gi(e,t,s,r){let n=r.includes(".")?ai(s,r):()=>s[r];if(ze(e)){let i=t[e];we(i)&&Be(n,i)}else if(we(e))Be(n,e.bind(s));else if(Te(e))if(ye(e))e.forEach(i=>gi(i,t,s,r));else{let i=we(e.handler)?e.handler.bind(s):t[e.handler];we(i)&&Be(n,i,e)}}function Mn(e){let t=e.type,{mixins:s,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,u=i.get(t),f;return u?f=u:!n.length&&!s&&!r?f=t:(f={},n.length&&n.forEach(h=>Os(f,h,a,!0)),Os(f,t,a)),Te(t)&&i.set(t,f),f}function Os(e,t,s,r=!1){let{mixins:n,extends:i}=t;i&&Os(e,i,s,!0),n&&n.forEach(a=>Os(e,a,s,!0));for(let a in t)if(!(r&&a==="expose")){let u=su[a]||s&&s[a];e[a]=u?u(e[a],t[a]):t[a]}return e}var su={data:Gr,props:Wr,emits:Wr,methods:Jo,computed:Jo,beforeCreate:nt,created:nt,beforeMount:nt,mounted:nt,beforeUpdate:nt,updated:nt,beforeDestroy:nt,beforeUnmount:nt,destroyed:nt,unmounted:nt,activated:nt,deactivated:nt,errorCaptured:nt,serverPrefetch:nt,components:Jo,directives:Jo,watch:ru,provide:Gr,inject:nu};function Gr(e,t){return t?e?function(){return Ge(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function nu(e,t){return Jo(In(e),In(t))}function In(e){if(ye(e)){let t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${St(t)}Modifiers`];function du(e,t,...s){if(e.isUnmounted)return;let r=e.vnode.props||Pe,n=s,i=t.startsWith("update:"),a=i&&lu(r,t.slice(7));a&&(a.trim&&(n=s.map(v=>ze(v)?v.trim():v)),a.number&&(n=n.map(wo)));let u,f=r[u=qo(t)]||r[u=qo(Je(t))];!f&&i&&(f=r[u=qo(St(t))]),f&&bt(f,e,6,n);let h=r[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,bt(h,e,6,n)}}var uu=new WeakMap;function bi(e,t,s=!1){let r=s?uu:t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},u=!1;if(!we(e)){let f=h=>{let v=bi(h,t,!0);v&&(u=!0,Ge(a,v))};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!u?(Te(e)&&r.set(e,null),null):(ye(i)?i.forEach(f=>a[f]=null):Ge(a,i),Te(e)&&r.set(e,a),a)}function Fs(e,t){return!e||!vo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,St(t))||De(e,t))}function Rn(e){let{type:t,vnode:s,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:u,emit:f,render:h,renderCache:v,props:k,data:m,setupState:y,ctx:E,inheritAttrs:w}=e,R=Ts(e),D,T;try{if(s.shapeFlag&4){let q=n||r,U=q;D=Vt(h.call(U,q,v,k,y,m,E)),T=u}else{let q=t;D=Vt(q.length>1?q(k,{attrs:u,slots:a,emit:f}):q(k,null)),T=t.props?u:cu(u)}}catch(q){ro.length=0,ns(q,e,1),D=Ce(jt)}let P=D,H;if(T&&w!==!1){let q=Object.keys(T),{shapeFlag:U}=P;q.length&&U&7&&(i&&q.some(go)&&(T=pu(T,i)),P=No(P,T,!1,!0))}if(s.dirs&&(P=No(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(s.dirs):s.dirs),s.transition){let q=Ms(P.type)&&li(P)||P;Ls(q,s.transition)}return D=P,Ts(R),D}var cu=e=>{let t;for(let s in e)(s==="class"||s==="style"||vo(s))&&((t||(t={}))[s]=e[s]);return t},pu=(e,t)=>{let s={};for(let r in e)(!go(r)||!(r.slice(9)in t))&&(s[r]=e[r]);return s};function fu(e,t,s){let{props:r,children:n,component:i}=e,{props:a,children:u,patchFlag:f}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&f>=0){if(f&1024)return!0;if(f&16)return r?Kr(r,a,h):!!a;if(f&8){let v=t.dynamicProps;for(let k=0;kObject.create(ki),Ci=e=>Object.getPrototypeOf(e)===ki;function hu(e,t,s,r=!1){let n={},i=Ei();e.propsDefaults=Object.create(null),_i(e,t,n,i);for(let a in e.propsOptions[0])a in n||(n[a]=void 0);s?e.props=r?n:Wo(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function vu(e,t,s,r){let{props:n,attrs:i,vnode:{patchFlag:a}}=e,u=Re(n),[f]=e.propsOptions,h=!1;if((r||a>0)&&!(a&16)){if(a&8){let v=e.vnode.dynamicProps;for(let k=0;k{f=!0;let[m,y]=Si(k,t,!0);Ge(a,m),y&&u.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!i&&!f)return Te(e)&&r.set(e,Zt),Zt;if(ye(i))for(let v=0;ve==="_"||e==="_ctx"||e==="$stable",$n=e=>ye(e)?e.map(Vt):[Vt(e)],yu=(e,t,s)=>{if(t._n)return t;let r=Ud((...n)=>$n(t(...n)),s);return r._c=!1,r},Ni=(e,t,s)=>{let r=e._ctx;for(let n in e){if(Ln(n))continue;let i=e[n];if(we(i))t[n]=yu(n,i,r);else if(i!=null){let a=$n(i);t[n]=()=>a}}},Di=(e,t)=>{let s=$n(t);e.slots.default=()=>s},Ri=(e,t,s)=>{for(let r in t)(s||!Ln(r))&&(e[r]=t[r])},bu=(e,t,s)=>{let r=e.slots=Ei();if(e.vnode.shapeFlag&32){let n=t._;n?(Ri(r,t,s),s&&hs(r,"_",n,!0)):Ni(t,r)}else t&&Di(e,t)},wu=(e,t,s)=>{let{vnode:r,slots:n}=e,i=!0,a=Pe;if(r.shapeFlag&32){let u=t._;u?s&&u===1?i=!1:Ri(n,t,s):(i=!t.$stable,Ni(t,n)),a=t}else t&&(Di(e,t),a={default:1});if(i)for(let u in n)!Ln(u)&&a[u]==null&&delete n[u]};function ku(){let e=[]}var dt=Su;function Ti(e){return Eu(e)}function Eu(e,t){ku();let s=Mo();s.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:u,createComment:f,setText:h,setElementText:v,parentNode:k,nextSibling:m,setScopeId:y=at,insertStaticContent:E}=e,w=(g,S,V,F=null,j=null,L=null,W=void 0,x=null,Z=!!S.dynamicChildren)=>{if(g===S)return;g&&!Yo(g,S)&&(F=ne(g),Ve(g,j,L,!0),g=null),S.patchFlag===-2&&(Z=!1,S.dynamicChildren=null);let{type:K,ref:fe,shapeFlag:se}=S;switch(K){case zs:R(g,S,V,F);break;case jt:D(g,S,V,F);break;case xo:g==null&&T(S,V,F,W);break;case X:ee(g,S,V,F,j,L,W,x,Z);break;default:se&1?U(g,S,V,F,j,L,W,x,Z):se&6?Q(g,S,V,F,j,L,W,x,Z):(se&64||se&128)&&K.process(g,S,V,F,j,L,W,x,Z,I)}fe!=null&&j?Qo(fe,g&&g.ref,L,S||g,!S):fe==null&&g&&g.ref!=null&&Qo(g.ref,null,L,g,!0)},R=(g,S,V,F)=>{if(g==null)r(S.el=u(S.children),V,F);else{let j=S.el=g.el;S.children!==g.children&&h(j,S.children)}},D=(g,S,V,F)=>{g==null?r(S.el=f(S.children||""),V,F):S.el=g.el},T=(g,S,V,F)=>{[g.el,g.anchor]=E(g.children,S,V,F,g.el,g.anchor)},P=(g,S,V,F)=>{if(S.children!==g.children){let j=m(g.anchor);q(g),[S.el,S.anchor]=E(S.children,V,j,F)}else S.el=g.el,S.anchor=g.anchor},H=({el:g,anchor:S},V,F)=>{let j;for(;g&&g!==S;)j=m(g),r(g,V,F),g=j;r(S,V,F)},q=({el:g,anchor:S})=>{let V;for(;g&&g!==S;)V=m(g),n(g),g=V;n(S)},U=(g,S,V,F,j,L,W,x,Z)=>{if(S.type==="svg"?W="svg":S.type==="math"&&(W="mathml"),g==null)ae(S,V,F,j,L,W,x,Z);else{let K=g.el&&g.el._isVueCE?g.el:null;try{K&&K._beginPatch(),O(g,S,j,L,W,x,Z)}finally{K&&K._endPatch()}}},ae=(g,S,V,F,j,L,W,x)=>{let Z,K,{props:fe,shapeFlag:se,transition:de,dirs:ge}=g;if(Z=g.el=a(g.type,L,fe&&fe.is,fe),se&8?v(Z,g.children):se&16&&C(g.children,Z,null,F,j,Tn(g,L),W,x),ge&&so(g,null,F,"created"),ie(Z,g,g.scopeId,W,F),fe){for(let Le in fe)Le!=="value"&&!yo(Le)&&i(Z,Le,null,fe[Le],L,F);"value"in fe&&i(Z,"value",null,fe.value,L),(K=fe.onVnodeBeforeMount)&&It(K,F,g)}ge&&so(g,null,F,"beforeMount");let Ne=Cu(j,de);Ne&&de.beforeEnter(Z),r(Z,S,V),((K=fe&&fe.onVnodeMounted)||Ne||ge)&&dt(()=>{let qe;try{K&&It(K,F,g),Ne&&de.enter(Z),ge&&so(g,null,F,"mounted")}finally{}},j)},ie=(g,S,V,F,j)=>{if(V&&y(g,V),F)for(let L=0;L{for(let K=Z;K{let x=S.el=g.el,{patchFlag:Z,dynamicChildren:K,dirs:fe}=S;Z|=g.patchFlag&16;let se=g.props||Pe,de=S.props||Pe,ge;if(V&&no(V,!1),(ge=de.onVnodeBeforeUpdate)&&It(ge,V,S,g),fe&&so(S,g,V,"beforeUpdate"),V&&no(V,!0),K&&(!g.dynamicChildren||g.dynamicChildren.length!==K.length)&&(Z=0,W=!1,K=null),(se.innerHTML&&de.innerHTML==null||se.textContent&&de.textContent==null)&&v(x,""),K?G(g.dynamicChildren,K,x,V,F,Tn(S,j),L):W||Ie(g,S,x,null,V,F,Tn(S,j),L,!1),Z>0){if(Z&16)J(x,se,de,V,j);else if(Z&2&&se.class!==de.class&&i(x,"class",null,de.class,j),Z&4&&i(x,"style",se.style,de.style,j),Z&8){let Ne=S.dynamicProps;for(let Le=0;Le{ge&&It(ge,V,S,g),fe&&so(S,g,V,"updated")},F)},G=(g,S,V,F,j,L,W)=>{for(let x=0;x{if(S!==V){if(S!==Pe)for(let L in S)!yo(L)&&!(L in V)&&i(g,L,S[L],null,j,F);for(let L in V){if(yo(L))continue;let W=V[L],x=S[L];W!==x&&L!=="value"&&i(g,L,x,W,j,F)}"value"in V&&i(g,"value",S.value,V.value,j)}},ee=(g,S,V,F,j,L,W,x,Z)=>{let K=S.el=g?g.el:u(""),fe=S.anchor=g?g.anchor:u(""),{patchFlag:se,dynamicChildren:de,slotScopeIds:ge}=S;ge&&(x=x?x.concat(ge):ge),g==null?(r(K,V,F),r(fe,V,F),C(S.children||[],V,fe,j,L,W,x,Z)):se>0&&se&64&&de&&g.dynamicChildren&&g.dynamicChildren.length===de.length?(G(g.dynamicChildren,de,V,j,L,W,x),(S.key!=null||j&&S===j.subTree)&&Ai(g,S,!0)):Ie(g,S,V,fe,j,L,W,x,Z)},Q=(g,S,V,F,j,L,W,x,Z)=>{S.slotScopeIds=x,g==null?S.shapeFlag&512?j.ctx.activate(S,V,F,W,Z):oe(S,V,F,j,L,W,Z):ue(g,S,Z)},oe=(g,S,V,F,j,L,W)=>{let x=g.component=Ou(g,F,j);if($s(g)&&(x.ctx.renderer=I),Iu(x,!1,W),x.asyncDep){if(j&&j.registerDep(x,pe,W),!g.el){let Z=x.subTree=Ce(jt);D(null,Z,S,V),g.placeholder=Z.el}}else pe(x,g,S,V,j,L,W)},ue=(g,S,V)=>{let F=S.component=g.component;if(fu(g,S,V))if(F.asyncDep&&!F.asyncResolved){le(F,S,V);return}else F.next=S,F.update();else S.el=g.el,F.vnode=S},pe=(g,S,V,F,j,L,W)=>{let x=()=>{if(g.isMounted){let{next:se,bu:de,u:ge,parent:Ne,vnode:Le}=g;{let pt=Oi(g);if(pt){se&&(se.el=Le.el,le(g,se,W)),pt.asyncDep.then(()=>{dt(()=>{g.isUnmounted||K()},j)});return}}let qe=se,Ke;no(g,!1),se?(se.el=Le.el,le(g,se,W)):se=Le,de&&bo(de),(Ke=se.props&&se.props.onVnodeBeforeUpdate)&&It(Ke,Ne,se,Le),no(g,!0);let Ye=Rn(g),kt=g.subTree;g.subTree=Ye,w(kt,Ye,k(kt.el),ne(kt),g,j,L),se.el=Ye.el,qe===null&&mu(g,Ye.el),ge&&dt(ge,j),(Ke=se.props&&se.props.onVnodeUpdated)&&dt(()=>It(Ke,Ne,se,Le),j)}else{let se,{el:de,props:ge}=S,{bm:Ne,m:Le,parent:qe,root:Ke,type:Ye}=g,kt=Xo(S);if(no(g,!1),Ne&&bo(Ne),!kt&&(se=ge&&ge.onVnodeBeforeMount)&&It(se,qe,S),no(g,!0),de&&M){let pt=()=>{g.subTree=Rn(g),M(de,g.subTree,g,j,null)};kt&&Ye.__asyncHydrate?Ye.__asyncHydrate(de,g,pt):pt()}else{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(Ye,g.parent?g.parent.type:void 0);let pt=g.subTree=Rn(g);w(null,pt,V,F,g,j,L),S.el=pt.el}if(Le&&dt(Le,j),!kt&&(se=ge&&ge.onVnodeMounted)){let pt=S;dt(()=>It(se,qe,pt),j)}(S.shapeFlag&256||qe&&Xo(qe.vnode)&&qe.vnode.shapeFlag&256)&&g.a&&dt(g.a,j),g.isMounted=!0,S=V=F=null}};g.scope.on();let Z=g.effect=new Eo(x);g.scope.off();let K=g.update=Z.run.bind(Z),fe=g.job=Z.runIfDirty.bind(Z);fe.i=g,fe.id=g.uid,Z.scheduler=()=>Vn(fe),no(g,!0),K()},le=(g,S,V)=>{S.component=g;let F=g.vnode.props;g.vnode=S,g.next=null,vu(g,S.props,F,V),wu(g,S.children,V),At(),$r(g),Ot()},Ie=(g,S,V,F,j,L,W,x,Z=!1)=>{let K=g&&g.children,fe=g?g.shapeFlag:0,se=S.children,{patchFlag:de,shapeFlag:ge}=S;if(de>0){if(de&128){Ae(K,se,V,F,j,L,W,x,Z);return}else if(de&256){_e(K,se,V,F,j,L,W,x,Z);return}}ge&8?(fe&16&&z(K,j,L),se!==K&&v(V,se)):fe&16?ge&16?Ae(K,se,V,F,j,L,W,x,Z):z(K,j,L,!0):(fe&8&&v(V,""),ge&16&&C(se,V,F,j,L,W,x,Z))},_e=(g,S,V,F,j,L,W,x,Z)=>{g=g||Zt,S=S||Zt;let K=g.length,fe=S.length,se=Math.min(K,fe),de;for(de=0;defe?z(g,j,L,!0,!1,se):C(S,V,F,j,L,W,x,Z,se)},Ae=(g,S,V,F,j,L,W,x,Z)=>{let K=0,fe=S.length,se=g.length-1,de=fe-1;for(;K<=se&&K<=de;){let ge=g[K],Ne=S[K]=Z?Bt(S[K]):Vt(S[K]);if(Yo(ge,Ne))w(ge,Ne,V,null,j,L,W,x,Z);else break;K++}for(;K<=se&&K<=de;){let ge=g[se],Ne=S[de]=Z?Bt(S[de]):Vt(S[de]);if(Yo(ge,Ne))w(ge,Ne,V,null,j,L,W,x,Z);else break;se--,de--}if(K>se){if(K<=de){let ge=de+1,Ne=gede)for(;K<=se;)Ve(g[K],j,L,!0),K++;else{let ge=K,Ne=K,Le=new Map;for(K=Ne;K<=de;K++){let ft=S[K]=Z?Bt(S[K]):Vt(S[K]);ft.key!=null&&Le.set(ft.key,K)}let qe,Ke=0,Ye=de-Ne+1,kt=!1,pt=0,Io=new Array(Ye);for(K=0;K=Ye){Ve(ft,j,L,!0);continue}let _t;if(ft.key!=null)_t=Le.get(ft.key);else for(qe=Ne;qe<=de;qe++)if(Io[qe-Ne]===0&&Yo(ft,S[qe])){_t=qe;break}_t===void 0?Ve(ft,j,L,!0):(Io[_t-Ne]=K+1,_t>=pt?pt=_t:kt=!0,w(ft,S[_t],V,null,j,L,W,x,Z),Ke++)}let ar=kt?_u(Io):Zt;for(qe=ar.length-1,K=Ye-1;K>=0;K--){let ft=Ne+K,_t=S[ft],lr=S[ft+1],dr=ft+1{let{el:L,type:W,transition:x,children:Z,shapeFlag:K}=g;if(K&6){Ee(g.component.subTree,S,V,F);return}if(K&128){g.suspense.move(S,V,F);return}if(K&64){W.move(g,S,V,I);return}if(W===X){r(L,S,V);for(let se=0;sex.enter(L),j));else{let{leave:se,delayLeave:de,afterLeave:ge}=x,Ne=()=>{g.ctx.isUnmounted?n(L):r(L,S,V)},Le=()=>{let qe=L._isLeaving||!!L[Nn];L._isLeaving&&L[Nn](!0),x.persisted&&!qe?Ne():se(L,()=>{Ne(),ge&&ge()})};de?de(L,Ne,Le):Le()}else r(L,S,V)},Ve=(g,S,V,F=!1,j=!1)=>{let{type:L,props:W,ref:x,children:Z,dynamicChildren:K,shapeFlag:fe,patchFlag:se,dirs:de,cacheIndex:ge,memo:Ne}=g;if(se===-2&&(j=!1),x!=null&&(At(),Qo(x,null,V,g,!0),Ot()),ge!=null&&(S.renderCache[ge]=void 0),fe&256){S.ctx.deactivate(g);return}let Le=fe&1&&de,qe=!Xo(g),Ke;if(qe&&(Ke=W&&W.onVnodeBeforeUnmount)&&It(Ke,S,g),fe&6)Ue(g.component,V,F);else{if(fe&128){g.suspense.unmount(V,F);return}Le&&so(g,null,S,"beforeUnmount"),fe&64?g.type.remove(g,S,V,I,F):K&&!K.hasOnce&&(L!==X||se>0&&se&64)?z(K,S,V,!1,!0):(L===X&&se&384||!j&&fe&16)&&z(Z,S,V),F&&Se(g)}let Ye=Ne!=null&&ge==null;(qe&&(Ke=W&&W.onVnodeUnmounted)||Le||Ye)&&dt(()=>{Ke&&It(Ke,S,g),Le&&so(g,null,S,"unmounted"),Ye&&(g.el=null)},V)},Se=g=>{let{type:S,el:V,anchor:F,transition:j}=g;if(S===X){$e(V,F);return}if(S===xo){q(g);return}let L=()=>{n(V),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(g.shapeFlag&1&&j&&!j.persisted){let{leave:W,delayLeave:x}=j,Z=()=>W(V,L);x?x(g.el,L,Z):Z()}else L()},$e=(g,S)=>{let V;for(;g!==S;)V=m(g),n(g),g=V;n(S)},Ue=(g,S,V)=>{let{bum:F,scope:j,job:L,subTree:W,um:x,m:Z,a:K}=g;Jr(Z),Jr(K),F&&bo(F),j.stop(),L&&(L.flags|=8,Ve(W,g,S,V)),x&&dt(x,S),dt(()=>{g.isUnmounted=!0},S)},z=(g,S,V,F=!1,j=!1,L=0)=>{for(let W=L;W{if(g.shapeFlag&6)return ne(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();let S=m(g.anchor||g.el),V=S&&S[Bd];return V?m(V):S},te=!1,_=(g,S,V)=>{let F;g==null?S._vnode&&(Ve(S._vnode,null,null,!0),F=S._vnode.component):w(S._vnode||null,g,S,null,null,null,V),S._vnode=g,te||(te=!0,$r(F),si(),te=!1)},I={p:w,um:Ve,m:Ee,r:Se,mt:oe,mc:C,pc:Ie,pbc:G,n:ne,o:e},B,M;return t&&([B,M]=t(I)),{render:_,hydrate:B,createApp:au(_,B)}}function Tn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function no({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Cu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ai(e,t,s=!1){let r=e.children,n=t.children;if(ye(r)&&ye(n))for(let i=0;i>1,e[s[u]]0&&(t[r]=s[i-1]),s[i]=r)}}for(i=s.length,a=s[i-1];i-- >0;)s[i]=a,a=t[a];return s}function Oi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Oi(t)}function Jr(e){if(e)for(let t=0;te.__isSuspense;function Su(e,t){t&&t.pendingBranch?ye(e)?t.effects.push(...e):t.effects.push(e):oi(e)}var X=Symbol.for("v-fgt"),zs=Symbol.for("v-txt"),jt=Symbol.for("v-cmt"),xo=Symbol.for("v-stc"),ro=[],vt=null;function l(e=!1){ro.push(vt=e?null:[])}function Vi(){ro.pop(),vt=ro[ro.length-1]||null}var ts=1;function Is(e,t=!1){ts+=e,e<0&&vt&&t&&(vt.hasOnce=!0)}function qi(e){return e.dynamicChildren=ts>0?vt||Zt:null,Vi(),ts>0&&vt&&vt.push(e),e}function d(e,t,s,r,n,i){return qi(o(e,t,s,r,n,i,!0))}function Mt(e,t,s,r,n){return qi(Ce(e,t,s,r,n,!0))}function Ps(e){return e?e.__v_isVNode===!0:!1}function Yo(e,t){return e.type===t.type&&e.key===t.key}var Mi=({key:e})=>e??null,Ds=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||Ze(e)||we(e)?{i:ht,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,r=0,n=null,i=e===X?0:1,a=!1,u=!1){let f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mi(t),ref:t&&Ds(t),scopeId:ri,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:ht};return u?(Vs(f,s),i&128&&e.normalize(f)):s&&(f.shapeFlag|=ze(s)?8:16),ts>0&&!a&&vt&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&vt.push(f),f}var Ce=Nu;function Nu(e,t=null,s=null,r=0,n=null,i=!1){if((!e||e===xd)&&(e=jt),Ps(e)){let u=No(e,t,!0);return s&&Vs(u,s),ts>0&&!i&&vt&&(u.shapeFlag&6?vt[vt.indexOf(e)]=u:vt.push(u)),u.patchFlag=-2,u}if(Lu(e)&&(e=e.__vccOpts),t){t=Du(t);let{class:u,style:f}=t;u&&!ze(u)&&(t.class=A(u)),Te(f)&&(Ko(f)&&!ye(f)&&(f=Ge({},f)),t.style=Me(f))}let a=ze(e)?1:Pi(e)?128:Ms(e)?64:Te(e)?4:we(e)?2:0;return o(e,t,s,r,n,a,i,!0)}function Du(e){return e?Ko(e)||Ci(e)?Ge({},e):e:null}function No(e,t,s=!1,r=!1){let{props:n,ref:i,patchFlag:a,children:u,transition:f}=e,h=t?Ru(n||{},t):n,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Mi(h),ref:t&&t.ref?s&&i?ye(i)?i.concat(Ds(t)):[i,Ds(t)]:Ds(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==X?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&No(e.ssContent),ssFallback:e.ssFallback&&No(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&r&&Ls(v,f.clone(v)),v}function b(e=" ",t=0){return Ce(zs,null,e,t)}function ce(e,t){let s=Ce(xo,null,e);return s.staticCount=t,s}function p(e="",t=!1){return t?(l(),Mt(jt,null,e)):Ce(jt,null,e)}function Vt(e){return e==null||typeof e=="boolean"?Ce(jt):ye(e)?Ce(X,null,e.slice()):Ps(e)?Bt(e):Ce(zs,null,String(e))}function Bt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:No(e)}function Vs(e,t){let s=0,{shapeFlag:r}=e;if(t==null)t=null;else if(ye(t))s=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Vs(e,n()),n._c&&(n._d=!0));return}else{s=32;let n=t._;!n&&!Ci(t)?t._ctx=ht:n===3&&ht&&(ht.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(we(t)){if(r&65){Vs(e,{default:t});return}t={default:t,_ctx:ht},s=32}else t=String(t),r&64?(s=16,t=[b(t)]):s=8;e.children=t,e.shapeFlag|=s}function Ru(...e){let t={};for(let s=0;stt||ht,qs,os;{let e=Mo(),t=(s,r)=>{let n;return(n=e[s])||(n=e[s]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};qs=t("__VUE_INSTANCE_SETTERS__",s=>tt=s),os=t("__VUE_SSR_SETTERS__",s=>Do=s)}var as=e=>{let t=tt;return qs(e),e.scope.on(),()=>{e.scope.off(),qs(t)}},Qr=()=>{tt&&tt.scope.off(),qs(null)};function Li(e){return e.vnode.shapeFlag&4}var Do=!1;function Iu(e,t=!1,s=!1){t&&os(t);let{props:r,children:n}=e.vnode,i=Li(e);hu(e,r,i,t),bu(e,n,s||t);let a=i?Pu(e,t):void 0;return t&&os(!1),a}function Pu(e,t){let s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,eu);let{setup:r}=s;if(r){At();let n=e.setupContext=r.length>1?qu(e):null,i=as(e),a=ss(r,e,0,[e.props,n]),u=an(a);if(Ot(),i(),(u||e.sp)&&!Xo(e)&&qn(e),u){if(a.then(Qr,Qr),t)return a.then(f=>{os(!0);try{Xr(e,f,t)}finally{os(!1)}}).catch(f=>{ns(f,e,0)});e.asyncDep=a}else Xr(e,a,t)}else $i(e,t)}function Xr(e,t,s){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=Ss(t)),$i(e,s)}var Zr,xr;function $i(e,t,s){let r=e.type;if(!e.render){if(!t&&Zr&&!r.render){let n=r.template||Mn(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:f}=r,h=Ge(Ge({isCustomElement:i,delimiters:u},a),f);r.render=Zr(n,h)}}e.render=r.render||at,xr&&xr(e)}{let n=as(e);At();try{tu(e)}finally{Ot(),n()}}}var Vu={get(e,t){return xe(e,"get",""),e[t]}};function qu(e){let t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Vu),slots:e.slots,emit:e.emit,expose:t}}function Hs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ss(Sn(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Zo)return Zo[s](e)},has(t,s){return s in t||s in Zo}})):e.proxy}function Mu(e,t=!0){return we(e)?e.displayName||e.name:e.name||t&&e.__name}function Lu(e){return we(e)&&"__vccOpts"in e}var ot=(e,t)=>qr(e,t,Do);function ke(e,t,s){try{Is(-1);let r=arguments.length;return r===2?Te(t)&&!ye(t)?Ps(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(r>3?s=Array.prototype.slice.call(arguments,2):r===3&&Ps(s)&&(s=[s]),Ce(e,t,s))}finally{Is(1)}}var $u="3.5.42";var Bn,Ui=typeof window<"u"&&window.trustedTypes;if(Ui)try{Bn=Ui.createPolicy("vue",{createHTML:e=>e})}catch{}var Qi=Bn?e=>Bn.createHTML(e):e=>e,Uu="http://www.w3.org/2000/svg",Fu="http://www.w3.org/1998/Math/MathML",Wt=typeof document<"u"?document:null,Fi=Wt&&Wt.createElement("template"),zu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,r)=>{let n=t==="svg"?Wt.createElementNS(Uu,e):t==="mathml"?Wt.createElementNS(Fu,e):s?Wt.createElement(e,{is:s}):Wt.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>Wt.createTextNode(e),createComment:e=>Wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,r,n,i){let a=s?s.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),s),!(n===i||!(n=n.nextSibling)););else{Fi.innerHTML=Qi(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);let u=Fi.content;if(r==="svg"||r==="mathml"){let f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,s)}return[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};var Hu=Symbol("_vtc");function Bu(e,t,s){let r=e[Hu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}var Gs=Symbol("_vod"),Xi=Symbol("_vsh"),Y={name:"show",beforeMount(e,{value:t},{transition:s}){e[Gs]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):ls(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:r}){!t!=!s&&(r?t?(r.beforeEnter(e),ls(e,!0),r.enter(e)):r.leave(e,()=>{ls(e,!1)}):ls(e,t))},beforeUnmount(e,{value:t}){ls(e,t)}};function ls(e,t){e.style.display=t?e[Gs]:"none",e[Xi]=!t}var ju=Symbol("");var Gu=/(?:^|;)\s*display\s*:/;function Wu(e,t,s){let r=e.style,n=ze(s),i=!1;if(s&&!n){if(t)if(ze(t))for(let a of t.split(";")){let u=a.slice(0,a.indexOf(":")).trim();s[u]==null&&ds(r,u,"")}else for(let a in t)s[a]==null&&ds(r,a,"");for(let a in s){a==="display"&&(i=!0);let u=s[a];u!=null?Yu(e,a,!ze(t)&&t?t[a]:void 0,u)||ds(r,a,u):ds(r,a,"")}}else if(n){if(t!==s){let a=r[ju];a&&(s+=";"+a),r.cssText=s,i=Gu.test(s)}}else t&&e.removeAttribute("style");Gs in e&&(e[Gs]=i?r.display:"",e[Xi]&&(r.display="none"))}var Bs=/\s*!important$/;function ds(e,t,s){if(ye(s))s.forEach(r=>ds(e,t,r));else if(s==null&&(s=""),t.startsWith("--"))Bs.test(s)?e.setProperty(t,s.replace(Bs,""),"important"):e.setProperty(t,s);else{let r=Ku(e,t);Bs.test(s)?e.setProperty(St(r),s.replace(Bs,""),"important"):e[r]=s}}var zi=["Webkit","Moz","ms"],Fn={};function Ku(e,t){let s=Fn[t];if(s)return s;let r=Je(t);if(r!=="filter"&&r in e)return Fn[t]=r;r=xt(r);for(let n=0;nzn||(ec.then(()=>zn=0),zn=Date.now());function oc(e,t){let s=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=s.attached)return;let n=s.value;if(ye(n)){let i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};let a=n.slice(),u=[r];for(let f=0;fe.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,sc=(e,t,s,r,n,i)=>{let a=n==="svg";t==="class"?Bu(e,r,a):t==="style"?Wu(e,s,r):vo(t)?go(t)||Qu(e,t,s,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nc(e,t,r,a))?(ji(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Bi(e,t,r,a,i,t!=="value")):e._isVueCE&&(rc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ze(r)))?ji(e,Je(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Bi(e,t,r,a))};function nc(e,t,s,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wi(t)&&we(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Wi(t)&&ze(s)?!1:t in e}function rc(e,t){let s=e._def.props;if(!s)return!1;let r=Je(t);return Array.isArray(s)?s.some(n=>Je(n)===r):Object.keys(s).some(n=>Je(n)===r)}var Ws=e=>{let t=e.props["onUpdate:modelValue"]||!1;return ye(t)?s=>bo(t,s):t};function ic(e){e.target.composing=!0}function Ki(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var uo=Symbol("_assign"),js=Symbol("_initialValue");function Hn(e,t,s){return t&&(e=e.trim()),s&&(e=wo(e)),e}var Zi={created(e,{modifiers:{lazy:t,trim:s,number:r}},n){e.parentNode&&(e.type==="text"?e[js]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[js]=e.defaultValue.replace(/\r\n?/g,` +`))),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",ic),lo(e,"compositionend",Ki),lo(e,"change",Ki))},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 h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(r&&t===s||n&&e.value.trim()===f)||(e.value=f)}};var xi={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}){Yi(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||!ac(t,s[1],s[0]))&&Yi(e,t)}};function ac(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 Yi(e,t){let s=e.multiple,r=ye(t);if(!(s&&!r&&!Ut(t))){for(let n=0,i=e.options.length;nString(h)===String(u)):a.selected=gr(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 lc=["ctrl","shift","alt","meta"],dc={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)=>lc.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{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||uc[a]===i))return e(n)}))},cc=Ge({patchProp:sc},zu),Ji;function pc(){return Ji||(Ji=Ti(cc))}var ea=((...e)=>{let t=pc().createApp(...e),{mount:s}=t;return t.mount=r=>{let n=mc(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,fc(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t});function fc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mc(e){return ze(e)?document.querySelector(e):e}var fo=typeof document<"u";function oa(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function hc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&oa(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 sa=/#/g,vc=/&/g,gc=/\//g,yc=/=/g,bc=/\?/g,na=/\+/g,wc=/%5B/g,kc=/%5D/g,ra=/%5E/g,Ec=/%60/g,ia=/%7B/g,Cc=/%7C/g,aa=/%7D/g,_c=/%20/g;function Kn(e){return e==null?"":encodeURI(""+e).replace(Cc,"|").replace(wc,"[").replace(kc,"]")}function la(e){return Kn(e).replace(ia,"{").replace(aa,"}").replace(ra,"^")}function jn(e){return Kn(e).replace(na,"%2B").replace(_c,"+").replace(sa,"%23").replace(vc,"%26").replace(Ec,"`").replace(ia,"{").replace(aa,"}").replace(ra,"^")}function Sc(e){return jn(e).replace(yc,"%3D")}function Nc(e){return Kn(e).replace(sa,"%23").replace(bc,"%3F")}function da(e){return Nc(e).replace(gc,"%2F")}function To(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Dc=/\/$/,Rc=e=>e.replace(Dc,"");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=Ac(r??t,s),{fullPath:r+i+a,path:r,query:n,hash:To(a)}}function ua(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Yn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ca(e,t,s){let r=t.matched.length-1,n=s.matched.length-1;return r>-1&&r===n&&co(t.matched[r],s.matched[n])&&Jn(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function co(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Jn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Tc(e[s],t[s]))return!1;return!0}function Tc(e,t){return wt(e)?ta(e,t):wt(t)?ta(t,e):e?.valueOf()===t?.valueOf()}function ta(e,t){return wt(t)?e.length===t.length&&e.every((s,r)=>s===t[r]):e.length===1&&e[0]===t}function Ac(e,t){if(e.startsWith("/"))return e;if(!e)return t;let s=t.split("/"),r=e.split("/"),n=r[r.length-1];(n===".."||n===".")&&r.push("");let i=s.length-1,a,u;for(a=0;a1&&i--;else break;return s.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Yt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Qs=(function(e){return e.pop="pop",e.push="push",e})({}),Xs=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function pa(e){if(!e)if(fo){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Rc(e)}var Oc=/^[^#]+#/;function fa(e,t){return e.replace(Oc,"#")+t}function Ic(e,t){let s=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-s.left-(t.left||0),top:r.top-s.top-(t.top||0)}}var us=()=>({left:window.scrollX,top:window.scrollY});function ma(e){let t;if("el"in e){let s=e.el,r=typeof s=="string"&&s.startsWith("#"),n=typeof s=="string"?r?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!n)return;t=Ic(n,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Qn(e,t){return(history.state?history.state.position-t:-1)+e}var Gn=new Map;function ha(e,t){Gn.set(e,t)}function va(e){let t=Gn.get(e);return Gn.delete(e),t}function Pc(e){return typeof e=="string"||e&&typeof e=="object"}function Xn(e){return typeof e=="string"||typeof e=="symbol"}var je=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),ga=Symbol("");var W8={[je.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ac(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ao(e,t){return Oe(new Error,{type:e,[fa]:!0},t)}function Mt(e,t){return e instanceof Error&&fa in e&&(t==null||!!(e.type&t))}var Tc=["params","query","hash"];function Ac(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let n of Tc)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ha(e){let t={};if(e===""||e==="?")return t;let n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;rs&&Hn(s)):[r&&Hn(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function ma(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=wt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}var va=Symbol(""),Xn=Symbol(""),Qs=Symbol(""),Xs=Symbol(""),Zs=Symbol("");function To(){let e=[];function t(r){return e.push(r),()=>{let s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Gt(e,t,n,r,s,i=a=>a()){let a=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,f)=>{let m=h=>{h===!1?f(ao(Be.NAVIGATION_ABORTED,{from:n,to:t})):h instanceof Error?f(h):Rc(h)?f(ao(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(a&&r.enterCallbacks[s]===a&&typeof h=="function"&&a.push(h),u())},g=i(()=>e.call(r&&r.instances[s],t,n,m)),w=Promise.resolve(g);e.length<3&&(w=w.then(m)),w.catch(h=>f(h))})}function xs(e,t,n,r,s=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(Zi(f)){let m=(f.__vccOpts||f)[t];m&&i.push(Gt(m,n,r,a,u,s))}else{let m=f();i.push(()=>m.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let w=uc(g)?g.default:g;a.mods[u]=g,a.components[u]=w;let h=(w.__vccOpts||w)[t];return h&&Gt(h,n,r,a,u,s)()}))}}return i}function ga(e,t){let n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aio(m,u))?r.push(u):n.push(u));let f=e.matched[a];f&&(t.matched.find(m=>io(m,f))||s.push(f))}return[n,r,s]}var Oc=()=>location.protocol+"//"+location.host;function Ra(e,t){let{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(a);return u[0]!=="/"&&(u="/"+u),Wn(u,"")}return Wn(n,e)+r+s}function Ic(e,t,n,r){let s=[],i=[],a=null,u=({state:h})=>{let b=Ra(e,location),E=n.value,k=t.value,R=0;if(h){if(n.value=b,t.value=h,a&&a===E){a=null;return}R=k?h.position-k.position:0}else r(b);s.forEach(D=>{D(n.value,E,{delta:R,type:Ys.pop,direction:R?R>0?Js.forward:Js.back:Js.unknown})})};function f(){a=n.value}function m(h){s.push(h);let b=()=>{let E=s.indexOf(h);E>-1&&s.splice(E,1)};return i.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:h}=window;if(!h.state)return;h.replaceState(Oe({},h.state,{scroll:ds()}),"")}}function w(){for(let h of i)h();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:f,listen:m,destroy:w}}function ya(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?ds():null}}function Pc(e){let{history:t,location:n}=window,r={value:Ra(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(f,m,g){let w=e.indexOf("#"),h=w>-1?(n.host&&document.querySelector("base")?e:e.slice(w))+f:Oc()+e+f;try{t[g?"replaceState":"pushState"](m,"",h),s.value=m}catch(b){console.error(b),n[g?"replace":"assign"](h)}}function a(f,m){i(f,Oe({},t.state,ya(s.value.back,f,s.value.forward,!0),m,{position:s.value.position}),!0),r.value=f}function u(f,m){let g=Oe({},s.value,t.state,{forward:f,scroll:ds()});i(g.current,g,!0),i(f,Oe({},ya(r.value,f,null),{position:g.position+1},m),!1),r.value=f}return{location:r,state:s,push:u,replace:a}}function Ta(e){e=la(e);let t=Pc(e),n=Ic(e,t.state,t.location,t.replace);function r(i,a=!0){a||n.pauseListeners(),history.go(i)}let s=Oe({location:"",base:e,go:r,createHref:da.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}var uo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),Xe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Xe||{}),Vc={type:uo.Static,value:""},qc=/[a-zA-Z0-9_]/;function Mc(e){if(!e)return[[]];if(e==="/")return[[Vc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${m}": ${b}`)}let n=Xe.Static,r=n,s=[],i;function a(){i&&s.push(i),i=[]}let u=0,f,m="",g="";function w(){m&&(n===Xe.Static?i.push({type:uo.Static,value:m}):n===Xe.Param||n===Xe.ParamRegExp||n===Xe.ParamRegExpEnd?(i.length>1&&(f==="*"||f==="+")&&t(`A repeatable param (${m}) must be alone in its segment. eg: '/:ids+.`),i.push({type:uo.Param,value:m,regexp:g,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):t("Invalid state to consume buffer"),m="")}function h(){m+=f}for(;ut.length?t.length===1&&t[0]===it.Static+it.Segment?1:-1:0}function Aa(e,t){let n=0,r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}var zc={strict:!1,end:!0,sensitive:!1};function Hc(e,t,n){let r=Uc(Mc(e.path),n),s=Oe(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function jc(e,t){let n=[],r=new Map;t=Bn(zc,t);function s(w){return r.get(w)}function i(w,h,b){let E=!b,k=Ea(w);k.aliasOf=b&&b.record;let R=Bn(t,w),D=[k];if("alias"in w){let H=typeof w.alias=="string"?[w.alias]:w.alias;for(let q of H)D.push(Ea(Oe({},k,{components:b?b.record.components:k.components,path:q,aliasOf:b?b.record:k})))}let T,P;for(let H of D){let{path:q}=H;if(h&&q[0]!=="/"){let U=h.record.path,ie=U[U.length-1]==="/"?"":"/";H.path=h.record.path+(q&&ie+q)}if(T=Hc(H,h,R),b?b.alias.push(T):(P=P||T,P!==T&&P.alias.push(T),E&&w.name&&!Ca(T)&&a(w.name)),Oa(T)&&f(T),k.children){let U=k.children;for(let ie=0;ie{a(P)}:Ro}function a(w){if(Jn(w)){let h=r.get(w);h&&(r.delete(w),n.splice(n.indexOf(h),1),h.children.forEach(a),h.alias.forEach(a))}else{let h=n.indexOf(w);h>-1&&(n.splice(h,1),w.record.name&&r.delete(w.record.name),w.children.forEach(a),w.alias.forEach(a))}}function u(){return n}function f(w){let h=Wc(w,n);n.splice(h,0,w),w.record.name&&!Ca(w)&&r.set(w.record.name,w)}function m(w,h){let b,E={},k,R;if("name"in w&&w.name){if(b=r.get(w.name),!b)throw ao(Be.MATCHER_NOT_FOUND,{location:w});R=b.record.name,E=Oe(ka(h.params,b.keys.filter(P=>!P.optional).concat(b.parent?b.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),w.params&&ka(w.params,b.keys.map(P=>P.name))),k=b.stringify(E)}else if(w.path!=null)k=w.path,b=n.find(P=>P.re.test(k)),b&&(E=b.parse(k),R=b.record.name);else{if(b=h.name?r.get(h.name):n.find(P=>P.re.test(h.path)),!b)throw ao(Be.MATCHER_NOT_FOUND,{location:w,currentLocation:h});R=b.record.name,E=Oe({},h.params,w.params),k=b.stringify(E)}let D=[],T=b;for(;T;)D.unshift(T.record),T=T.parent;return{name:R,path:k,params:E,matched:D,meta:Gc(D)}}e.forEach(w=>i(w));function g(){n.length=0,r.clear()}return{addRoute:i,resolve:m,removeRoute:a,clearRoutes:g,getRoutes:u,getRecordMatcher:s}}function ka(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ea(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Bc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Bc(e){let t={},n=e.props||!1;if("component"in e)t.default=n;else for(let r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Ca(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Gc(e){return e.reduce((t,n)=>Oe(t,n.meta),{})}function Wc(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Aa(e,t[i])<0?r=i:n=i+1}let s=Kc(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Kc(e){let t=e;for(;t=t.parent;)if(Oa(t)&&Aa(e,t)===0)return t}function Oa({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function _a(e){let t=ut(Qs),n=ut(Xs),r=!1,s=null,i=ot(()=>{let g=Ft(e.to);return t.resolve(g)}),a=ot(()=>{let{matched:g}=i.value,{length:w}=g,h=g[w-1],b=n.matched;if(!h||!b.length)return-1;let E=b.findIndex(io.bind(null,h));if(E>-1)return E;let k=Sa(g[w-2]);return w>1&&Sa(h)===k&&b[b.length-1].path!==k?b.findIndex(io.bind(null,g[w-2])):E}),u=ot(()=>a.value>-1&&Zc(n.params,i.value.params)),f=ot(()=>a.value>-1&&a.value===n.matched.length-1&&Kn(n.params,i.value.params));function m(g={}){if(Xc(g)){let w=t[Ft(e.replace)?"replace":"push"](Ft(e.to)).catch(Ro);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>w),w}return Promise.resolve()}return{route:i,href:ot(()=>i.value.href),isActive:u,isExactActive:f,navigate:m}}function Yc(e){return e.length===1?e[0]:e}var Jc=ns({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:_a,setup(e,{slots:t}){let n=He(_a(e)),{options:r}=ut(Qs),s=ot(()=>({[Na(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Na(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{let i=t.default&&Yc(t.default(n));return e.custom?i:ke("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Qc=Jc;function Xc(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Zc(e,t){for(let n in t){let r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!wt(s)||s.length!==r.length||r.some((i,a)=>i.valueOf()!==s[a].valueOf()))return!1}return!0}function Sa(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Na=(e,t,n)=>e??t??n,xc=ns({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=ut(Zs),s=ot(()=>e.route||r.value),i=ut(Xn,0),a=ot(()=>{let m=Ft(i),{matched:g}=s.value,w;for(;(w=g[m])&&!w.components;)m++;return m}),u=ot(()=>s.value.matched[a.value]);no(Xn,ot(()=>a.value+1)),no(va,u),no(Zs,s);let f=et();return je(()=>[f.value,u.value,e.name],([m,g,w],[h,b,E])=>{g&&(g.instances[w]=m,b&&b!==g&&m&&m===h&&(g.leaveGuards.size||(g.leaveGuards=b.leaveGuards),g.updateGuards.size||(g.updateGuards=b.updateGuards))),m&&g&&(!b||!io(g,b)||!h)&&(g.enterCallbacks[w]||[]).forEach(k=>k(m))},{flush:"post"}),()=>{let m=s.value,g=e.name,w=u.value,h=w&&w.components[g];if(!h)return Da(n.default,{Component:h,route:m});let b=w.props[g],E=b?b===!0?m.params:typeof b=="function"?b(m):b:null,R=ke(h,Oe({},E,t,{onVnodeUnmounted:D=>{D.component.isUnmounted&&(w.instances[g]=null)},ref:f}));return Da(n.default,{Component:R,route:m})||R}}});function Da(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Zn=xc;function Ia(e){let t=jc(e.routes,e),n=e.parseQuery||ha,r=e.stringifyQuery||Qn,s=e.history,i=To(),a=To(),u=To(),f=Cs(Wt),m=Wt;lo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let g=Ws.bind(null,z=>""+z),w=Ws.bind(null,ra),h=Ws.bind(null,Do);function b(z,ne){let te,_;return Jn(z)?(te=t.getRecordMatcher(z),_=ne):_=z,t.addRoute(_,te)}function E(z){let ne=t.getRecordMatcher(z);ne&&t.removeRoute(ne)}function k(){return t.getRoutes().map(z=>z.record)}function R(z){return!!t.getRecordMatcher(z)}function D(z,ne){if(ne=Oe({},ne||f.value),typeof z=="string"){let v=Ks(n,z,ne.path),S=t.resolve({path:v.path},ne),V=s.createHref(v.fullPath);return Oe(v,S,{params:h(S.params),hash:Do(v.hash),redirectedFrom:void 0,href:V})}let te;if(z.path!=null)te=Oe({},z,{path:Ks(n,z.path,ne.path).path});else{let v=Oe({},z.params);for(let S in v)v[S]==null&&delete v[S];te=Oe({},z,{params:w(v)}),ne.params=w(ne.params)}let _=t.resolve(te,ne),I=z.hash||"";_.params=g(h(_.params));let j=ia(r,Oe({},z,{hash:na(I),path:_.path})),M=s.createHref(j);return Oe({fullPath:j,hash:I,query:r===Qn?ma(z.query):z.query||{}},_,{redirectedFrom:void 0,href:M})}function T(z){return typeof z=="string"?Ks(n,z,f.value.path):Oe({},z)}function P(z,ne){if(m!==z)return ao(Be.NAVIGATION_CANCELLED,{from:ne,to:z})}function H(z){return ie(z)}function q(z){return H(Oe(T(z),{replace:!0}))}function U(z,ne){let te=z.matched[z.matched.length-1];if(te&&te.redirect){let{redirect:_}=te,I=typeof _=="function"?_(z,ne):_;return typeof I=="string"&&(I=I.includes("?")||I.includes("#")?I=T(I):{path:I},I.params={}),Oe({query:z.query,hash:z.hash,params:I.path!=null?{}:z.params},I)}}function ie(z,ne){let te=m=D(z),_=f.value,I=z.state,j=z.force,M=z.replace===!0,v=U(te,_);if(v)return ie(Oe(T(v),{state:typeof v=="object"?Oe({},I,v.state):I,force:j,replace:M}),ne||te);let S=te;S.redirectedFrom=ne;let V;return!j&&aa(r,_,te)&&(V=ao(Be.NAVIGATION_DUPLICATED,{to:S,from:_}),Ae(_,_,!0,!1)),(V?Promise.resolve(V):O(S,_)).catch(F=>Mt(F)?Mt(F,Be.NAVIGATION_GUARD_REDIRECT)?F:_e(F):le(F,S,_)).then(F=>{if(F){if(Mt(F,Be.NAVIGATION_GUARD_REDIRECT))return ie(Oe({replace:M},T(F.to),{state:typeof F.to=="object"?Oe({},I,F.to.state):I,force:j}),ne||S)}else F=J(S,_,!0,M,I);return G(S,_,F),F})}function re(z,ne){let te=P(z,ne);return te?Promise.reject(te):Promise.resolve()}function C(z){let ne=Se.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(z):z()}function O(z,ne){let te,[_,I,j]=ga(z,ne);te=xs(_.reverse(),"beforeRouteLeave",z,ne);for(let v of _)v.leaveGuards.forEach(S=>{te.push(Gt(S,z,ne))});let M=re.bind(null,z,ne);return te.push(M),Ue(te).then(()=>{te=[];for(let v of i.list())te.push(Gt(v,z,ne));return te.push(M),Ue(te)}).then(()=>{te=xs(I,"beforeRouteUpdate",z,ne);for(let v of I)v.updateGuards.forEach(S=>{te.push(Gt(S,z,ne))});return te.push(M),Ue(te)}).then(()=>{te=[];for(let v of j)if(v.beforeEnter)if(wt(v.beforeEnter))for(let S of v.beforeEnter)te.push(Gt(S,z,ne));else te.push(Gt(v.beforeEnter,z,ne));return te.push(M),Ue(te)}).then(()=>(z.matched.forEach(v=>v.enterCallbacks={}),te=xs(j,"beforeRouteEnter",z,ne,C),te.push(M),Ue(te))).then(()=>{te=[];for(let v of a.list())te.push(Gt(v,z,ne));return te.push(M),Ue(te)}).catch(v=>Mt(v,Be.NAVIGATION_CANCELLED)?v:Promise.reject(v))}function G(z,ne,te){u.list().forEach(_=>C(()=>_(z,ne,te)))}function J(z,ne,te,_,I){let j=P(z,ne);if(j)return j;let M=ne===Wt,v=lo?history.state:{};te&&(_||M?s.replace(z.fullPath,Oe({scroll:M&&v&&v.scroll},I)):s.push(z.fullPath,I)),f.value=z,Ae(z,ne,te,M),_e()}let ee;function Q(){ee||(ee=s.listen((z,ne,te)=>{if(!Le.listening)return;let _=D(z),I=U(_,Le.currentRoute.value);if(I){ie(Oe(I,{replace:!0,force:!0}),_).catch(Ro);return}m=_;let j=f.value;lo&&ca(Yn(j.fullPath,te.delta),ds()),O(_,j).catch(M=>Mt(M,Be.NAVIGATION_ABORTED|Be.NAVIGATION_CANCELLED)?M:Mt(M,Be.NAVIGATION_GUARD_REDIRECT)?(ie(Oe(T(M.to),{force:!0}),_).then(v=>{Mt(v,Be.NAVIGATION_ABORTED|Be.NAVIGATION_DUPLICATED)&&!te.delta&&te.type===Ys.pop&&s.go(-1,!1)}).catch(Ro),Promise.reject()):(te.delta&&s.go(-te.delta,!1),le(M,_,j))).then(M=>{M=M||J(_,j,!1),M&&(te.delta&&!Mt(M,Be.NAVIGATION_CANCELLED)?s.go(-te.delta,!1):te.type===Ys.pop&&Mt(M,Be.NAVIGATION_ABORTED|Be.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),G(_,j,M)}).catch(Ro)}))}let oe=To(),ue=To(),pe;function le(z,ne,te){_e(z);let _=ue.list();return _.length?_.forEach(I=>I(z,ne,te)):console.error(z),Promise.reject(z)}function Ie(){return pe&&f.value!==Wt?Promise.resolve():new Promise((z,ne)=>{oe.add([z,ne])})}function _e(z){return pe||(pe=!z,Q(),oe.list().forEach(([ne,te])=>z?te(z):ne()),oe.reset()),z}function Ae(z,ne,te,_){let{scrollBehavior:I}=e;if(!lo||!I)return Promise.resolve();let j=!te&&pa(Yn(z.fullPath,0))||(_||!te)&&history.state&&history.state.scroll||null;return rt().then(()=>I(z,ne,j)).then(M=>M&&ua(M)).catch(M=>le(M,z,ne))}let Ee=z=>s.go(z),Ve,Se=new Set,Le={currentRoute:f,listening:!0,addRoute:b,removeRoute:E,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:k,resolve:D,options:e,push:H,replace:q,go:Ee,back:()=>Ee(-1),forward:()=>Ee(1),beforeEach:i.add,beforeResolve:a.add,afterEach:u.add,onError:ue.add,isReady:Ie,install(z){z.component("RouterLink",Qc),z.component("RouterView",Zn),z.config.globalProperties.$router=Le,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(f)}),lo&&!Ve&&f.value===Wt&&(Ve=!0,H(s.location).catch(_=>{}));let ne={};for(let _ in Wt)Object.defineProperty(ne,_,{get:()=>f.value[_],enumerable:!0});z.provide(Qs,Le),z.provide(Xs,Go(ne)),z.provide(Zs,f);let te=z.unmount;Se.add(z),z.unmount=function(){Se.delete(z),Se.size<1&&(m=Wt,ee&&ee(),ee=null,f.value=Wt,Ve=!1,pe=!1),te()}}};function Ue(z){return z.reduce((ne,te)=>ne.then(()=>C(te)),Promise.resolve())}return Le}function Pa(e){return ut(Xs)}function Va(e,t){return t?.split(".").reduce((n,r)=>n?.[r],e)}function xn(e=null,t=new Map){let n=He({}),r=[],s=!1,i=new Proxy(n,{get(a,u){return typeof u=="string"&&u.startsWith("__v_")||Reflect.has(a,u)?Reflect.get(a,u):e?.[u]}});return Object.defineProperty(n,"parent",{value:e,configurable:!0}),Object.defineProperty(n,"viewState",{get:()=>i}),i.watch=(a,u,f=!1,m=!0)=>{let g=typeof a=="function"?()=>a(i):()=>Va(i,a),w=je(g,u,{deep:f,flush:"post"});return r.push(w),m&&rt(()=>{s||u(g(),g())}),w},i.watchGroup=(a,u,f=!0)=>i.watch(()=>a.map(m=>Va(i,m)),u,!0,f),i.on=(a,u)=>{if(a==="dispose")return r.push(u),()=>{};t.has(a)||t.set(a,new Set),t.get(a).add(u);let f=()=>t.get(a)?.delete(u);return r.push(f),f},i.emit=(a,...u)=>{for(let f of[...t.get(a)||[]])f({},...u)},i.dispose=()=>{s=!0,r.splice(0).reverse().forEach(a=>a())},jo(i.dispose),i}function ct(){let e=new Set,t=new Set,n=!1,r=(i,a=0)=>{if(n)return;let u=setTimeout(()=>{e.delete(u),i()},a);return e.add(u),u};r.cancel=i=>{clearTimeout(i),e.delete(i)};let s=(i,a)=>{if(n)return;let u=setInterval(i,a);return t.add(u),u};return s.cancel=i=>{clearInterval(i),t.delete(i)},jo(()=>{n=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:r,interval:s}}function Kt(){let e=new Set;return jo(()=>{e.forEach(t=>t()),e.clear()}),(t,n,r,s)=>{t.addEventListener(n,r,s);let i=()=>{t.removeEventListener(n,r,s),e.delete(i)};return e.add(i),i}}function er(e,t,n){let r,s=!1,i="form-draft:"+n,a=()=>Object.fromEntries(t.map(h=>[h,e[h]])),u=()=>JSON.stringify(a()),f=h=>{for(let b of t)Object.prototype.hasOwnProperty.call(h,b)&&(e[b]=h[b]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},m=()=>{try{window.sessionStorage.removeItem(i)}catch{}},g=(h=!1)=>{if(r!==void 0){if(h&&document.querySelectorAll("input, select, textarea").forEach(b=>{b._field?.binding.state===e&&b._field.timer&&b._field.commit()}),e.unsavedChanges=u()!==r,e.draftSaved=!1,!e.unsavedChanges){m();return}try{window.sessionStorage.setItem(i,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:a()})),e.draftSaved=!0}catch{}}},w=()=>g(!0);return e.on("routeLeave",w),window.addEventListener("beforeunload",w),e.on("dispose",()=>window.removeEventListener("beforeunload",w)),{restore(){r=u();let h;try{h=JSON.parse(window.sessionStorage.getItem(i)||"null")}catch{}let b=h&&h.account===(e.user?.username||null)&&Date.now()-h.savedAt<30*6e4&&h.values;return b&&(f(h.values),e.draftRestored=!0),s||(s=!0,e.watch(()=>a(),()=>g(),!0)),e.unsavedChanges=u()!==r,!!b},checkpoint(){return JSON.parse(u())},accept(h){r=JSON.stringify(h),e.draftRestored=!1,g()},discard(){document.querySelectorAll("input, select, textarea").forEach(h=>{h._field?.binding.state!==e||!h._field.timer||(clearTimeout(h._field.timer),h._field.timer=null,h.value=h._field.binding.value??"")}),r!==void 0&&f(JSON.parse(r)),e.draftRestored=!1,g()},clear(){r=u(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,m()}}}function ep(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],n=t.indexOf(e.currentTarget),r=e.key==="Home"?0:e.key==="End"?t.length-1:(n+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[r]?.focus(),t[r]?.click()}var qa=function(e,t,n,r){e.previewTabKeydown=ep,e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(f){let m=e.toasts.indexOf(f);m!==-1&&e.toasts.splice(m,1)},e.addToast=function(f){return e.toasts.push(f),r(function(){e.removeToast(f)},8e3),f},e.path=n.url(),e.paths=n.path().substring(1).split("/"),e.darkMode=function(f){localStorage.setItem("darkMode",f),e.isDarkMode=f;let m="/css/prism-okaidia.css",g="/css/prism.css";if(f){$("body").addClass("dark-mode");let h=document.createElement("link");h.href=m,h.rel="stylesheet",document.head.append(h),$(`link[href='${g}']`).remove()}else{$("body").removeClass("dark-mode");let h=document.createElement("link");h.href=g,h.rel="stylesheet",document.head.append(h),$(`link[href='${m}']`).remove()}let w=document.querySelector("[class*='floatingchat-container-wrap'] [class*='floating-chat-kofi-text-container-wrap']");w&&(w.style.backgroundColor=f?"#FAF9F6":"#1A1815",w.style.color=f?"#1A1815":"#FAF9F6"),e.emit("dark-mode",f)},e.darkMode(localStorage.getItem("darkMode")=="true");function s(){t.get("/api/user").then(f=>{f&&(e.user=f.data)},()=>{e.user=null})}s();function i(){t.get("/api/options").then(f=>{f&&(e.site_options=f.data)},()=>{e.site_options=null})}i();function a(){t.get("/api/message").then(f=>{f&&(e.generalMessage=f.data)},()=>{e.generalMessage=null})}a();function u(f,m){m&&(e.title=m.title),e.path=n.url(),e.paths=n.path().substring(1).split("/")}e.on("routeChange",u),e.on("routeUpdate",u)},Ma=function(e,t){let n=Kt(),r=ct(),s=()=>{let i=window.location.hash.slice(1),a=document.getElementById(i);if(!a?.classList.contains("panel-collapse"))return;$(a).collapse("show");let u=document.getElementById(a.getAttribute("aria-labelledby"));u?.setAttribute("tabindex","-1"),u?.focus({preventScroll:!0}),u?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>r.timeout(s,0)),n(window,"hashchange",s),r.timeout(s,0)},$a=function(e,t,n,r,s){e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,s.load().then(f=>{e.quota=f},console.error);let i=er(e,["terms","options"],"profile");e.discardDraft=()=>i.discard();function a(){t.get("/api/user/default").then(f=>{let m=f.data||{};m.terms&&(e.terms=m.terms.join(` -`)),e.options=Object.assign({},e.options,m.options),i.restore()})}a();let u=null;e.saveDefault=f=>{if(f&&f.preventDefault&&f.preventDefault(),e.saving)return;let m=i.checkpoint(),g={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",g).then(()=>{i.accept(m),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",u&&r.cancel(u),u=r(()=>{e.message=null},2500)},w=>{e.saving=!1;let b="ERRORS."+(w&&w.data&&w.data.error);n(b).then(E=>{e.error=E&&E!==b?E:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},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."}))}},La=function(e,t,n){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{n.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ua=function(e,t,n,r,s){e.user&&!e.user.status&&n.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&n.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 m={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(m===void 0)return;u.preventDefault();let g=e.features.length,w=m==="first"?0:m==="last"?g-1:(f+m+g)%g;e.feature=e.features[w].key,s(()=>{let h=r.document.getElementById("feature-tab-"+e.feature);h&&h.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 m=new Array(u.length-1);for(let k=1;k=2){let k=m[g-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(m=>m.nbRepositories||0)),users:a(f.map(m=>m.nbUsers||0)),pageViews:a(f.map(m=>m.nbPageViews||0)),pullRequests:a(f.map(m=>m.nbPullRequests||0))}})},Fa=function(e,t,n,r,s,i){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,rt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Kt()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||f(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await rt();let O=document.getElementById(e.projectDetailsId(C));O?.focus(),O?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,rt(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let O=e.projectName.trim();if(O.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:O});C.projectName=G.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=O?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await H(),e.selectedProject===C&&(e.selectedProject=e.items.find(J=>J._type===C._type&&J._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let O=new URL(C._viewUrl,s.location.origin).href;e.copyingId=C._type+":"+C._id;try{if(s.navigator.clipboard?.writeText)await s.navigator.clipboard.writeText(O);else{let G=document.createElement("textarea");G.value=O,G.setAttribute("readonly",""),G.style.position="fixed",G.style.opacity="0";let J=document.activeElement;document.body.appendChild(G);try{if(G.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{G.remove(),J?.focus()}}e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:O})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let u=["queue","download","downloaded","preparing","anonymizing"];function f(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired":C==="removed"||C==="removing"?"removed":(u.indexOf(C)>-1,"progress")}let m=7200*1e3,g="dashboard.filterPrefs",w={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},h=loadFilterPrefs(g)||{};e.typeFilter=h.typeFilter||w.typeFilter,e.filters={status:Object.assign({},w.filters.status,h.filters&&h.filters.status||{})},e.orderBy=h.orderBy||w.orderBy;let b={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=b,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let C=b[e.sortField()];return C?C.label:"Custom"},e.isSortedBy=C=>e.sortField()===C,e.setSort=(C,O)=>{typeof O!="boolean"&&(O=e.isSortedBy(C)?!e.sortDesc():!!(b[C]&&b[C].defaultDesc)),e.orderBy=(O?"-":"")+C},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(g,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),i.load().then(C=>{e.quota=C},console.error);function E(C,O,G,J,ee,Q){C.pageView||(C.pageView=0),C.lastView||(C.lastView=""),C.options=C.options||{},C.options.terms=(C.options.terms||[]).filter(ue=>ue),C._id=O||"",C._source=J,C._broken=!O,C._name=O||J||"(unnamed)",C._fallbackLabel=C._type==="gist"?"Gist "+(O||J||"without an ID"):J||G||C._name,C._label=C.projectName||C._fallbackLabel,C._editUrl=O?ee:null,C._viewUrl=O?Q:null,C._broken&&(C.status="error",C.statusMessage="incomplete_record"),C._statusKey=f(C.status);let oe=C.anonymizeDate||C.lastView;return C._stale=C._statusKey==="progress"&&!!oe&&Date.now()-new Date(oe).getTime()>m,C.status==="expired"||C.status==="expiring"?C._expiry={kind:"expired",date:C.options.expirationDate}:C.status!=="ready"?C._expiry={kind:"none"}:C.options.expirationMode==="never"||!C.options.expirationDate?C._expiry={kind:"never"}:C._expiry={kind:"date",date:C.options.expirationDate},C}function k(C){return t.get(C).then(O=>O.data||[],O=>(console.error(O),[]))}function R(){return e.loading=!0,r.all([k("/api/user/anonymized_repositories"),k("/api/user/anonymized_pull_requests"),k("/api/user/anonymized_gists")]).then(C=>{let O=C[0],G=C[1],J=C[2],ee=[];O.forEach(Q=>{Q._type="repo";let oe=Q.source||{};ee.push(E(Q,Q.repoId,Q.repoId,oe.fullName,"/anonymize/"+Q.repoId,"/r/"+Q.repoId+"/"))}),G.forEach(Q=>{Q._type="pr";let oe=Q.source||{};ee.push(E(Q,Q.pullRequestId,Q.pullRequestId,oe.repositoryFullName?oe.repositoryFullName+"#"+oe.pullRequestId:void 0,"/pull-request-anonymize/"+Q.pullRequestId,"/pr/"+Q.pullRequestId+"/"))}),J.forEach(Q=>{Q._type="gist";let oe=Q.source||{};ee.push(E(Q,Q.gistId,Q.gistId,oe.gistId,"/gist-anonymize/"+Q.gistId,"/gist/"+Q.gistId+"/"))}),e.items=ee,e.loading=!1})}let D=0,T=!1;e.dashboardCursor=null,e.dashboardError="";function P(C){let O=C.source||{};return C._type==="repo"?E(C,C.repoId,C.repoId,O.fullName,"/anonymize/"+C.repoId,"/r/"+C.repoId+"/"):C._type==="pr"?E(C,C.pullRequestId,C.pullRequestId,O.repositoryFullName?O.repositoryFullName+"#"+O.pullRequestId:void 0,"/pull-request-anonymize/"+C.pullRequestId,"/pr/"+C.pullRequestId+"/"):E(C,C.gistId,C.gistId,O.gistId,"/gist-anonymize/"+C.gistId,"/gist/"+C.gistId+"/")}function H(C=!1){if(T)return R();let O=++D;return e.loading=!C,e.loadingMore=C,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(G=>e.filters.status[G]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:C?e.dashboardCursor:void 0}}).then(G=>{if(O===D){if(!Array.isArray(G.data?.items))return T=!0,R();e.items=(C?e.items:[]).concat(G.data.items.map(P)),e.dashboardCursor=G.data.cursor,e.dashboardTotals=G.data}},G=>{if(O===D){if(G.status===404)return T=!0,R();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{O===D&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>H(!0);let q;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{T||(q&&a.timeout.cancel(q),q=a.timeout(()=>H(),150))},!1),e.watch("filters",()=>{T||H()},!0,!1),e.on("dispose",()=>{D++}),H(),e.openItem=(C,O)=>{if(!C._viewUrl)return;let G=O&&O.target;G&&G.closest&&G.closest("a, button, .dropdown, input")||(s.location.href=C._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(C=>e.filters.status[C]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(C=>e.filters.status[C]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.hiddenStatusCount()>1,e.clearFilters=()=>{e.projectView="all",e.typeFilter="all",e.search="",Object.keys(e.filters.status).forEach(C=>{e.filters.status[C]=!0})};function U(C,O,G,J){t.get("/api/repo/"+C).then(async ee=>{let Q=J!==void 0&&J!==ee.data.status;for(let oe of e.items)if(oe._type==="repo"&&oe.repoId==C){Q=Q||oe.status!==ee.data.status;let ue=e.needsAttention(oe);oe.status=ee.data.status,oe.statusMessage=ee.data.statusMessage,oe._statusKey=f(oe.status),oe._statusKey!=="progress"&&(oe._stale=!1);let pe=e.needsAttention(oe);e.dashboardTotals&&ue!==pe&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(pe?1:-1)));break}if(Q&&!T){e.dashboardCursor=null;let oe=e.selectedProject;await H(),oe&&e.selectedProject===oe&&(e.selectedProject=e.items.find(ue=>ue._type===oe._type&&ue._id===oe._id)||null)}if(ee.data.status=="ready"||ee.data.status=="error"||ee.data.status=="removed"||ee.data.status=="expired"){O(ee.data);return}a.timeout(()=>U(C,O,G,ee.data.status),2500)},G)}let ie=C=>C==="repo"?"repository":C==="gist"?"gist":"pull request",re=C=>C==="repo"?"/api/repo":C==="gist"?"/api/gist":"/api/pr";e.removeItem=C=>{let O=ie(C._type);if(confirm(`Are you sure that you want to remove the ${O} ${C._id}?`)){let G=He({title:`Removing ${C._id}...`,date:new Date,body:`The ${O} ${C._id} is going to be removed.`});e.addToast(G);let J=`${re(C._type)}/${C._id}`;t.delete(J).then(()=>{C._type==="repo"?U(C._id,()=>{G.title=`${C._id} is removed.`,G.body=`The ${O} ${C._id} is removed.`},void 0,C.status):(G.title=`${C._id} is removed.`,G.body=`The ${O} ${C._id} is removed.`,H())},ee=>{G.title=`Error during the removal of ${C._id}.`,G.body=ee.body,H()})}},e.refreshItem=C=>{let O=ie(C._type),G=He({title:`Refreshing ${C._id}...`,date:new Date,body:`The ${O} ${C._id} is going to be refreshed.`});e.addToast(G);let J=Q=>{G.title=`Error during the refresh of ${C._id}.`,G.body=Q.data?.error||Q.body||"The refresh could not be completed. Please try again.",H()},ee=`${re(C._type)}/${C._id}/refresh`;t.post(ee).then(()=>{C._type==="repo"?U(C._id,Q=>{if(Q.status!=="ready"){J({body:Q.statusMessage||`The repository is ${Q.status}.`});return}G.title=`${C._id} is refreshed.`,G.body=`The ${O} ${C._id} is refreshed.`},J,C.status):(G.title=`${C._id} is refreshed.`,G.body=`The ${O} ${C._id} is refreshed.`,H())},J)},e.extendItem=C=>{let O=ie(C._type),G=He({title:`Extending ${C._id}...`,date:new Date,body:`The expiration of ${O} ${C._id} is going to be extended by 6 months.`});e.addToast(G);let J=`${re(C._type)}/${C._id}/extend`;t.post(J).then(()=>{C._type==="repo"?U(C._id,()=>{G.title=`${C._id} is extended.`,G.body=`The expiration of ${O} ${C._id} is extended by 6 months.`},void 0,C.status):(G.title=`${C._id} is extended.`,G.body=`The expiration of ${O} ${C._id} is extended by 6 months.`,H())},ee=>{G.title=`Error during the extension of ${C._id}.`,G.body=ee.data&&ee.data.error||ee.body,H()})},e.itemFilter=C=>{if(e.projectView==="attention"&&!e.needsAttention(C)||e.typeFilter!=="all"&&C._type!==e.typeFilter||e.filters.status[C._statusKey]===!1)return!1;let O=e.search.trim().toLowerCase();return!!(O.length==0||C._label&&String(C._label).toLowerCase().indexOf(O)>-1||C._source&&String(C._source).toLowerCase().indexOf(O)>-1||C._id&&String(C._id).toLowerCase().indexOf(O)>-1||C.conference&&String(C.conference).toLowerCase().indexOf(O)>-1)}};var za=function(e,t,n){let r=ct();e.repoId=n.repoId,e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="";var s=null;let i=null,a=!1;function u(m){e.rateLimitResetAt=m,s&&r.interval.cancel(s);function g(){var w=Math.max(0,Math.ceil((m-Date.now())/1e3));if(w<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,r.interval.cancel(s),s=null;else{var h=Math.floor(w/60),b=w%60;e.rateLimitCountdown=h>0?h+"m "+b+"s":b+"s"}}g(),s=r.interval(g,1e3)}e.on("dispose",function(){a=!0,s&&r.interval.cancel(s),i&&r.timeout.cancel(i)});function f(m){if(!m)return m;var g=m.match(/^rate_limited:(\d+)$/);return g?(u(parseInt(g[1],10)),null):(e.rateLimitResetAt=0,m)}e.getStatus=()=>{a||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(m=>{if(!a){e.repo=m.data,m.data.rateLimitResetAt?u(m.data.rateLimitResetAt):e.repo.statusMessage=f(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var g=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(g=!1),g&&(i=r.timeout(e.getStatus,2e3))}},m=>{e.error=m.data.error})},e.getStatus()},en=function(e,t,n,r,s,i,a){e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let u=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!u?.matches,u?.addEventListener&&Kt()(u,"change",_=>{e.mobileWorkspace=_.matches}),e.selectMobilePane=_=>{e.mobilePane=_};let f=0,m=!1,g=new Set,w=(_,I=!1)=>!m&&_.generation===f&&_.url===e.sourceUrl.trim()&&_.connection===e.githubConnection&&(!I||_.branch===e.source.branch),h=()=>{let _={generation:f,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return g.add(_),e.sourceLoading=!0,_},b=_=>{g.delete(_),m||(e.sourceLoading=[...g].some(I=>w(I)))};e.on("dispose",()=>{m=!0,f++});let E=null,k=_=>_.gistId&&!_.repo?"gist:"+_.gistId.toLowerCase():(_.owner+"/"+_.repo).toLowerCase()+(_.pullRequestId?"/pull/"+_.pullRequestId:""),R=er(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(s.path?.()||""));e.discardDraft=async()=>{R.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(f++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",oe.cancel(),_e.cancel(),Se.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let D=()=>{let _={};for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])_[I]=e[I];sessionStorage.setItem("github-access-draft",JSON.stringify({path:s.path(),savedAt:Date.now(),draft:_}))};e.connectGistApp=()=>{D(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(s.path())},e.connectGistOAuth=()=>{D(),window.location.href="/github/login?returnTo="+encodeURIComponent(s.path())},e.grantGitHubAccess=()=>{D();let _=s.path(),I=ie(e.sourceUrl)||"",j=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=j+"?returnTo="+encodeURIComponent(_)+"&repository="+encodeURIComponent(I)+"&install=1"},e.chooseGitHubConnection=async _=>{e.githubConnection=_,e.readme="",e.sourceUrl&&await C()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function T(){let _=new Date;return _.setMonth(_.getMonth()+6),_}e.options.expirationDate=T();function P(_){let I=_.getFullYear(),j=String(_.getMonth()+1).padStart(2,"0"),M=String(_.getDate()).padStart(2,"0");return`${I}-${j}-${M}`}e.minExpirationDate=P(new Date);let H=new Date;H.setFullYear(H.getFullYear()+1),e.maxExpirationDate=P(H),e.anonymize_readme="",e.readme="",e.html_readme="",e.isUpdate=!1;function q(_){t.get("/api/user/default").then(I=>{let j=I.data;j.terms&&(e.defaultTerms=j.terms.join(` -`)),e.options=Object.assign({},e.options,j.options),e.options.expirationDate=j.options&&j.options.expirationDate?new Date(j.options.expirationDate):T(),!r.repoId&&!r.pullRequestId&&!r.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),_&&_()})}function U(_,I,j){e.anonymize&&e.anonymize[_]&&e.anonymize[_].setValidity(I,j)}function ie(_){try{let I=parseGithubUrl(_);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 G()}catch{}}};function re(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ie(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function C(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function O(){let _;try{_=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!_||_.path!==s.path()||Date.now()-_.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await C(),!0):!1;R.restore();for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,I)&&(e[I]=_.draft[I]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await C(),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 _=>{e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.fullName,e._originalFullName=_.data.source.fullName,e.terms=_.data.options.terms.filter(I=>I).join(` -`),e.source=_.data.source,e.role=_.data.role||"owner",e.coauthors=_.data.coauthors||[],e._originalBranch=_.data.source.branch,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,e.repositoryID=_.data.source.repositoryID,e._originalRepositoryID=_.data.source.repositoryID,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O()&&(await Promise.all([G(),J()]),ue())},()=>{s.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async _=>{if(e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.repositoryFullName+"/pull/"+_.data.source.pullRequestId,e.terms=_.data.options.terms.filter(I=>I).join(` -`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O())try{await pe()}catch{}},()=>{s.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.gistId,t.get("/api/gist/"+e.gistId).then(async _=>{e.sourceUrl="https://gist.github.com/"+_.data.source.gistId,e.terms=_.data.options.terms.filter(I=>I).join(` -`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=k(parseGithubUrl(e.sourceUrl)),!await O()&&await Ae()},()=>{s.url("/404")}))}),t.get("/github/connections").then(_=>{e.githubConnections=_.data,!r.repoId&&!r.pullRequestId&&!r.gistId&&e.githubConnection===void 0&&_.data.appEnabled&&_.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&C())}).catch(()=>{}),e.urlSelected=async(_=!1)=>{let I=++f,j;try{j=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,oe.cancel(),_e.cancel(),Se.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",U("sourceUrl","github",!1);return}let M=k(j),v=_||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,!v&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],v||(e.source={type:"GitHubStream",branch:"",commit:""}),oe.cancel(),_e.cancel(),Se.cancel(),le.clear(),Ee.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=v;try{j.gistId&&!j.repo?(e.detectedType="gist",e.source={gistId:j.gistId},await Ae()):j.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:j.owner+"/"+j.repo,pullRequestId:j.pullRequestId},await pe()):(e.detectedType="repo",await Promise.all([G(),J()]),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 _=e.branches.filter(j=>j.name==e.source.branch)[0];if(!_)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=_.commit),e.readme=_.readme,await J(),ue()}),e.getBranches=async _=>{let I=parseGithubUrl(e.sourceUrl),j=h();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&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:_===!0||e.reconnectingSource?"1":"0",repositoryID:re()}});if(!w(j))return;e.branches=M.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let v=e.branches.filter(S=>S.name==e.source.branch);v.length>0&&(!(!e.reconnectingSource&&!_&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=v[0].commit),e.readme=v[0].readme,await J(_))}catch(M){if(!w(j))return;e.branches=[],e.sourceUnreachable=M&&(M.status===404||M.data&&M.data.error==="repo_not_found");let v=M&&M.data&&M.data.error||(M&&M.status===404?"repo_not_found":"unknown_error");i("ERRORS."+v).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{b(j)}};async function G(){let _=parseGithubUrl(e.sourceUrl),I=h();try{z();let j=await t.get(`/api/repo/${_.owner}/${_.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,repositoryID:re(),force:"1"}});if(!w(I))return;e.details=j.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(j){if(!w(I))return;throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}async function J(_){if(e.readme&&!_)return e.readme;let I=parseGithubUrl(e.sourceUrl),j=h();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&&ie(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:_===!0?"1":"0",branch:e.source.branch,repositoryID:re()}});w(j,!0)&&(e.readme=M.data)}catch{w(j,!0)&&(e.readme="")}finally{b(j)}}function ee(){let _={terms:e.terms?e.terms.split(` -`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(_.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);_.repoName=`${I.owner}/${I.repo}`}catch{}return _}function Q(_,I,j){let M=null,v=0,S=()=>{if(e.detectedType!==_)return;M&&a.cancel(M);let V=++v;e.previewStatus="loading",M=a(()=>{M=null;let F=I();if(!F){e.previewStatus="idle";return}t.post("/api/anonymize-preview",F).then(B=>{V===v&&(j(B.data,F),e.previewStatus="ready")}).catch(()=>{V===v&&(e.previewStatus="error")})},200)};return S.cancel=()=>{v++,M&&a.cancel(M),M=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&oe(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()};let oe=Q("repo",()=>e.readme?{content:e.readme,options:ee()}:null,_=>{if(typeof _?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=_.content;let I="";try{let M=parseGithubUrl(e.sourceUrl),v=e.source.branch||e.details&&e.details.defaultBranch||"main";I=`https://github.com/${M.owner}/${M.repo}/raw/${v}/`}catch{}let j=renderMD(e.anonymize_readme,I);e.html_readme=j,a(Prism.highlightAll,150)});function ue(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),oe())}async function pe(){let _=parseGithubUrl(e.sourceUrl),I=h();try{z();let j=await t.get(`/api/pr/${_.owner}/${_.repo}/${_.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(I))return;e.details=j.data,e.pullRequestId||(e.pullRequestId=_.repo+"-PR"+_.pullRequestId+"-"+generateRandomId(4))}catch(j){if(!w(I))return;throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}let le=He(new Map);function Ie(){let _=new Set,I=e.details&&e.details.pullRequest;if(!I)return _;typeof I.title=="string"&&_.add(I.title),typeof I.body=="string"&&_.add(I.body),typeof I.diff=="string"&&_.add(I.diff);let j=I.comments||[];for(let M of j)typeof M.author=="string"&&_.add(M.author),typeof M.body=="string"&&_.add(M.body);return _}let _e=Q("pr",()=>{let _=Ie(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(v=>typeof v!="string"))throw Error("Invalid preview response");let j=I.contents,M=new Map;for(let v=0;vle.set(S,v))});e.anonymizePrContent=function(_){return _&&(le.has(_)?le.get(_):"")};async function Ae(){let _=parseGithubUrl(e.sourceUrl),I=h();try{z(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let j=await t.get(`/api/gist/source/${_.gistId}`);if(!w(I))return;e.details=j.data,e.gistId||(e.gistId="gist-"+_.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(j){if(!w(I))return;if(j.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,U("sourceUrl","missing",!1);return}if(j.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,U("sourceUrl","missing",!1);return}throw j.data&&(i("ERRORS."+j.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),te(j.data.error)),U("sourceUrl","missing",!1),j}finally{b(I)}}let Ee=He(new Map);function Ve(){let _=new Set,I=e.details&&e.details.gist;if(!I)return _;typeof I.description=="string"&&_.add(I.description),typeof I.ownerLogin=="string"&&_.add(I.ownerLogin);let j=I.files||[];for(let v of j)typeof v.filename=="string"&&_.add(v.filename),typeof v.content=="string"&&_.add(v.content);let M=I.comments||[];for(let v of M)typeof v.author=="string"&&_.add(v.author),typeof v.body=="string"&&_.add(v.body);return _}let Se=Q("gist",()=>{let _=Ve(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(v=>typeof v!="string"))throw Error("Invalid preview response");let j=I.contents,M=new Map;for(let v=0;vEe.set(S,v)),Le()});e.anonymizeGistContent=function(_){return _&&(Ee.has(_)?Ee.get(_):"")},e.previewGistFiles=[];function Le(){let _=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=_.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",Le,!0),e.watch("terms",Le);function Ue(){let _=e.conference;if(e.conference_data=null,!_)return;let I=e.isUpdate&&_===e._originalConference;t.get("/api/conferences/"+_).then(j=>{e.conference===_&&(e.conference_data=j.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===_&&(e.conference_data=null)})}function z(){U("repoId","used",!0),U("repoId","format",!0),U("pullRequestId","used",!0),U("pullRequestId","format",!0),U("gistId","used",!0),U("gistId","format",!0),U("sourceUrl","used",!0),U("sourceUrl","missing",!0),U("sourceUrl","access",!0),U("sourceUrl","github",!0),U("commit","exists",!0),U("conference","activated",!0),U("terms","format",!0),e.termsRegexWarning=!1}function ne(){let _=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||_&&_.invalid?(_&&_.setDirty&&_.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function te(_){let I=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(_){case"repoId_already_used":U(I,"used",!1);break;case"invalid_repoId":U(I,"format",!1);break;case"options_not_provided":U(I,"format",!1);break;case"repo_already_anonymized":U("sourceUrl","used",!1);break;case"invalid_terms_format":U("terms","format",!1);break;case"repo_not_found":U("sourceUrl","missing",!1);break;case"repo_not_accessible":U("sourceUrl","access",!1);break;case"commit_not_found":U("commit","exists",!1);break;case"conf_not_activated":U("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let _=(e.coauthorSearch||"").trim();if(e.coauthorError="",_.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:_}}).then(I=>{let j=new Set((e.coauthors||[]).map(M=>(M.username||"").toLowerCase()));e.coauthorResults=(I.data||[]).filter(M=>!j.has((M.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(_,I)=>{I&&I.preventDefault(),!(!_||!_.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:_.username}).then(j=>{e.coauthors=j.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},j=>{let M=j&&j.data&&j.data.error||"unknown_error";e.coauthorError=M})},e.removeCoauthor=_=>{!_||!_.username||confirm("Remove co-author "+_.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(_.username)).then(I=>{e.coauthors=I.data||[]},I=>{let j=I&&I.data&&I.data.error||"unknown_error";e.coauthorError=j})},e.anonymizeRepo=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId||ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let j=parseGithubUrl(e.sourceUrl),M={repoId:e.repoId,terms:e.terms.trim().split(` -`).filter(S=>S),connection:e.githubConnection,fullName:`${j.owner}/${j.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(M.options.pageSource=e.details.pageSource),z();let v=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(v,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizeGist=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let j=parseGithubUrl(e.sourceUrl),M={gistId:e.gistId,terms:e.terms.trim().split(` -`).filter(S=>S),source:{gistId:j.gistId},options:e.options,conference:e.conference};z();let v=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(v,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let j=parseGithubUrl(e.sourceUrl),M={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(` -`).filter(S=>S),source:{repositoryFullName:`${j.owner}/${j.repo}`,pullRequestId:j.pullRequestId},options:e.options,conference:e.conference};z();let v=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(v,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Ue()}),e.watch("terms",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("details",()=>{e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()},!0)},tr=function(e,t,n,r,s,i){let a=ct(),u=Kt();e.on("dark-mode",(O,G)=>{e.aceOption&&(G?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,m=!1;e.on("dispose",()=>{m=!0,f++,g&&g.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 G=document.querySelector(".tree-search-input");G&&(G.focus(),G.select())}});var g=null;e.onFileSearchChange=function(){g&&(g.resolve(),g=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let G=i.defer();g=G,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:G.promise}).then(function(J){if(!(m||g!==G)){g=null,e.fileSearchLoading=!1;var ee={};e.files.forEach(function(z){ee[(z.path||"")+"/"+z.name]=!0});for(var Q=[],oe={},ue=0;ue0&&e.files.push.apply(e.files,Q);for(var Ve=[],Se=0;Se0&&e.files.push.apply(e.files,Ve),e.fileSearchResults=J.data}},function(){!m&&g===G&&(g=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let w={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},h=["license","txt"],b=["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,G){if(e.repoId!=r.repoId)return C();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(J=>J&&J.trim().length>0),re();for(let J=0;J0?e.paths.slice(0,J).join("/"):"";e.files.some(oe=>oe.path===ee)||e.getFiles(ee)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],G={};for(let ee of e.files)ee.name.toLowerCase().indexOf("readme")>-1&&(G[ee.name.toLowerCase()]=ee.name);let J=null;for(let ee of O)if(G[ee]){J=ee;break}if(!J&&Object.keys(G).length>0&&(J=Object.keys(G)[0]),J){let ee=n.url();ee[ee.length-1]!="/"&&(ee+="/"),n.url(ee+encodePathForUrl(G[J]))}}e.fileCounts=null,e.getFiles=function(O){let G=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(J){if(m||G!==e.repoId)return[];let ee=O||"";return e.files=e.files.filter(Q=>Q.path!==ee),e.files.push(...J.data),J.data},function(J){if(m||G!==e.repoId)return[];e.type="error",e.content=J&&J.data&&J.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(G){m||O!==e.repoId||(e.fileCounts=G.data)},function(){e.fileCounts={}})}function T(){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(m)return;let G=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(J=>{if(!(m||G!==e.repoId)){if(e.options=J.data,e.options.url){window.location=e.options.url;return}O&&O(J.data)}},J=>{if(!(m||G!==e.repoId)){var ee=J.data||{};if(ee.error==="rate_limited"&&ee.resetAt){let oe=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 Q=oe;e.type="rate_limited",e.rateLimitResetAt=ee.resetAt,P&&a.interval.cancel(P),oe(),P=a.interval(oe,1e3)}else ee.error==="repository_not_ready"?(e.type="loading",a.timeout(function(){H(O)},3e3)):(e.type="error",e.content=ee.error)}})}e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};function q(O){return w[O]?w[O]:O}function U(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":O=="md"?"md":O=="org"?"org":O=="ipynb"?"IPython":h.indexOf(O)>-1?"text":b.indexOf(O)>-1?"image":k.indexOf(O)>-1?"media":E.indexOf(O)>-1?"audio":"code"}function ie(O,G){let J=f;if(!O){e.type="error",e.content="no_file_selected";return}let ee=e.type;e.type="loading",e.content="loading";let Q=G&&G.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(O)}?v=`+Q,{transformResponse:oe=>oe}).then(oe=>{if(!(m||J!==f)){if(e.type=ee,e.content=oe.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(oe.data,n.url()+"/../"),e.type="html"),e.type=="org"){let pe=contentAbs2Relative(oe.data);var ue=new Org.Parser().parse(pe).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(ue.toString()),e.type="html"}e.type=="code"&&oe.headers("content-type")=="application/octet-stream"&&(e.type="binary",e.content="binary"),a.timeout(()=>{Prism.highlightAll()},50)}},oe=>{if(!(m||J!==f)){e.type="error",e.content="unknown_error";try{oe.data=JSON.parse(oe.data),oe.data.error?e.content=oe.data.error:e.content=oe.data}catch{console.log(oe),oe.status==-1?e.content="request_error":oe.status==502&&(e.content="unreachable")}}})}function re(){f++,e.content="",e.file=T();let O="0";e.file&&e.file.sha&&(O=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${O}`;let G=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);e.fileBaseUrl=`/api/repo/${e.repoId}/file/${G?encodePathForUrl(G):""}`,e.showSource=!1,e.allowScripts=!1;let J=e.filePath.toLowerCase(),ee=J.lastIndexOf(".");if(ee>-1&&(J=J.substring(ee+1)),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:15,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!0,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:q(J),onLoad:function(Q){let oe=ace.require("ace/range").Range,ue=null;function pe(Ae,Ee){ue!==null&&(Q.session.removeMarker(ue),ue=null),Ae!=null&&(ue=Q.session.addMarker(new oe(Ae,0,Ee,1),"highlighted-line","fullLine"))}function le(Ae){let Ee=window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Ee){pe(null);return}let Ve=parseInt(Ee[1])-1,Se=Ee[2]?parseInt(Ee[2])-1:Ve;pe(Ve,Se),Ae&&a.timeout(()=>{Q.scrollToLine(Ve,!0,!0,function(){})},100)}le(!0);let Ie=null;Q.on("guttermousedown",function(Ae){let Ee=Ae.getDocumentPosition().row,Ve=Ae.domEvent&&Ae.domEvent.shiftKey,Se=Ee,Le=Ee;Ve&&Ie!==null?(Se=Math.min(Ie,Ee),Le=Math.max(Ie,Ee)):Ie=Ee;let Ue=Se===Le?`#L${Se+1}`:`#L${Se+1}-L${Le+1}`,z=window.location.pathname+window.location.search+Ue;window.history.replaceState(null,"",z),pe(Se,Le),Ae.stop()});let _e=u(window,"hashchange",()=>le(!1));return Q.setFontSize(e.aceOption.fontSize),Q.setReadOnly(e.aceOption.readOnly),Q.setKeyboardHandler(e.aceOption.keyBinding),Q.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),Q.setOption("displayIndentGuides",!0),Q.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(Q.renderer.$cursorLayer.element.style.display="none"),Q.setHighlightGutterLine(e.aceOption.highlightGutterLine),Q.setShowInvisibles(e.aceOption.showInvisibles),Q.setDisplayIndentGuides(e.aceOption.showIndentGuides),Q.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),Q.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),Q.session.setUseSoftTabs(e.aceOption.useSoftTab),Q.session.setTabSize(e.aceOption.tabSize),Q.setBehavioursEnabled(e.aceOption.enableBehaviours),Q.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets),_e}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=U(J),e.type=="pdf"){e.content="pdf";return}ie(e.filePath,e.file)}function C(){f++,e.files=[],e.content=null,e.fileCounts=null,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=r.repoId,e.type="loading",e.filePath=r.path||"",e.paths=e.filePath.split("/");let O=e.repoId;H(function(G){D();var J=i.resolve();for(let ee=0;ee0?e.paths.slice(0,ee).join("/"):"";J=J.then(function(){return e.getFiles(Q)}).then(function(){if(e.type==="error")return i.reject("error")})}J.then(function(){m||O!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(R(),re()))})})}C()},Ha=function(e,t,n,r,s){async function i(f){t.get(`/api/pr/${e.pullRequestId}/options`).then(m=>{if(e.options=m.data,e.options.url){window.location=e.options.url;return}f&&f(m.data)},m=>{e.type="error",e.content=m.data.error})}async function a(f){t.get(`/api/pr/${e.pullRequestId}/content`).then(m=>{e.details=m.data,e.tabState={active:m.data.diff?"diff":"comments"},f&&f(m.data)},m=>{e.type="error",e.content=m.data.error})}function u(){e.pullRequestId=r.pullRequestId,e.type="loading",i(f=>{a()})}u()},ja=function(e,t,n,r,s){async function i(f){t.get(`/api/gist/${e.gistId}/options`).then(m=>{if(e.options=m.data,e.options.url){window.location=e.options.url;return}f&&f(m.data)},m=>{e.type="error",e.content=m.data.error})}async function a(f){t.get(`/api/gist/${e.gistId}/content`).then(m=>{e.details=m.data;let g=m.data&&m.data.files&&m.data.files.length;e.tabState={active:g?"files":"comments"},f&&f(m.data)},m=>{e.type="error",e.content=m.data.error})}function u(){e.gistId=r.gistId,e.type="loading",i(()=>{a()})}u()},Ba=function(e,t,n){e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let r="conferences.filterPrefs",s={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},i=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},s.filters.status,i.filters&&i.filters.status||{})},e.orderBy=i.orderBy||s.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(a){if(!a.removing&&confirm(`Are you sure that you want to remove the conference ${a.name}? All the repositories linked to this conference will expire.`)){a.removing=!0;let u=He({title:`Removing ${a.name}...`,date:new Date,body:`The conference ${a.name} is going to be removed.`});e.addToast(u),t.delete(`/api/conferences/${a.conferenceID}`).then(()=>{u.title=`${a.name} is removed.`,u.body=`The conference ${a.name} is removed.`,e.loadConferences()}).catch(()=>{u.title="Unable to remove conference",u.body="Please try again. The conference has not been removed."}).finally(()=>{a.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(a=>{e.conferences=a.data||[]},a=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=a=>{if(e.filters.status[a.status]==!1)return!1;let u=e.search.trim().toLowerCase();return!!(!u||(a.name||"").toLowerCase().includes(u)||(a.conferenceID||"").toLowerCase().includes(u))}},or=function(e,t,n,r){e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.plans=[],e.editionMode=!1,e.saving=!1,e.error="";function s(){t.get("/api/conferences/"+r.conferenceId).then(g=>{e.options={...e.options,...g.data,billing:g.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}r.conferenceId&&(e.editionMode=!0,s());function i(){t.get("/api/conferences/plans").then(g=>{e.plans=g.data,e.plan=e.plans.filter(w=>w.id==e.options.plan.planID)[0]})}i();let a=new Date;a.setDate(1),a.setMonth(a.getMonth()+1);let u=new Date(a);u.setMonth(a.getMonth()+7,0),e.options={billing:{},startDate:a,endDate:u,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(g=>g.id==e.options.plan.planID)[0]});function f(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function m(g){switch(g){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let g=JSON.parse(JSON.stringify(e.options)),w=He({title:`Creating ${g.name}...`,date:new Date,body:`The conference ${g.conferenceID} is in creation.`});e.editionMode&&(w.title=`Updating ${g.name}...`,w.body=`The conference '${g.conferenceID}' is updating.`),e.addToast(w),f(),t.post("/api/conferences/"+(e.editionMode?g.conferenceID:""),g).then(()=>{e.editionMode?(w.title=`${g.name} updated`,w.body=`The conference '${g.conferenceID}' is updated.`):(w.title=`${g.name} created`,w.body=`The conference '${g.conferenceID}' is created.`),n.url("/conference/"+g.conferenceID)},h=>{m(h.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(w)}).finally(()=>{e.saving=!1})}},Ga=function(e,t,n,r){e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,expired:!1,removed:!1}},e.orderBy="-anonymizeDate",e.repoFiler=i=>{if(e.filters.status[i.status]==!1)return!1;let a=e.search.trim().toLowerCase();return!!(!a||(i.source?.fullName||"").toLowerCase().includes(a)||(i.repoId||"").toLowerCase().includes(a))};function s(){t.get("/api/conferences/"+r.conferenceId).then(i=>{e.conference=i.data})}s()},Wa=function(e,t){e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(n=>{e.connections=n.data}).catch(n=>{e.connectionError=n.data?.error||"Unable to load connections."}),e.changeConnection=async(n,r,s)=>{e.busy=!0,e.connectionError="";try{let i=await t.post("/github/connections/migrate",{type:n.type,id:n.id,connection:r,preview:s},{headers:{"X-CSRF-Token":e.connections.csrf}});s?n.eligible=i.data.eligible:await e.loadConnections()}catch(i){e.connectionError=i.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(n){e.connectionError=n.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},Ka=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(n=>{e.accountRecovery=n.data.required}).catch(()=>{})};var Ya=function(e,t,n){let r=ct(),s=Kt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;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()}};s(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.owner&&E.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&E.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=E};e.showStatusMessage=E=>{let k=E.statusMessage||"(no message)";window.prompt(`Status message for ${E.repoId} (${E.status}):`,k)},e.fetchGithubInfo=E=>{let k=window.open("","_blank");k&&k.document.write("
Loading GitHub info for "+E.repoId+"...
"),t.get("/api/admin/repos/"+E.repoId+"/github").then(R=>{k&&(k.document.open(),k.document.write('
'+JSON.stringify(R.data,null,2).replace(/[<>]/g,D=>D==="<"?"<":">")+"
"),k.document.close())},R=>{let D=R&&R.data?JSON.stringify(R.data,null,2):String(R);k&&(k.document.body.innerHTML='
'+D+"
")})},e.statusCountFor=E=>{let k=(e.statusCounts||[]).find(R=>R._id===E);return k?k.count:0},e.statusStorageFor=E=>{let k=(e.statusCounts||[]).find(R=>R._id===E);return k?k.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=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.repos.filterPrefs",f={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},m=loadFilterPrefs(u)||{};e.query=Object.assign({},f,m,{page:1,search:""});let g=n.search();g.owner&&(e.query.owner=g.owner),g.conference&&(e.query.conference=g.conference),g.search&&(e.query.search=g.search);let w="admin.repos.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,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(E=>{e.selected[E.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(E=>e.selected[E.repoId]),e.bulkRefresh=()=>{let E=e.selectedRepos();E.length&&confirm(`Force refresh ${E.length} repositories?`)&&E.forEach(k=>e.updateRepository(k))},e.bulkRemoveCache=()=>{let E=e.selectedRepos();E.length&&confirm(`Purge cache for ${E.length} repositories?`)&&E.forEach(k=>e.removeCache(k))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,k])=>k!==""&&k!==!1&&k!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/repos?"+E.toString(),"_blank")},e.removeCache=E=>{confirm("Remove cached files for "+E.repoId+"?")&&t.delete("/api/admin/repos/"+E.repoId).then(()=>h(),k=>console.error(k))},e.removeRepository=E=>{confirm("Remove repository "+E.repoId+"?")&&t.delete("/api/repo/"+E.repoId+"/").then(()=>h(),k=>console.error(k))},e.updateRepository=E=>{let k=He({title:`Refreshing ${E.repoId}...`,date:new Date,body:`The repository ${E.repoId} is going to be refreshed.`});e.toasts.push(k),t.post(`/api/repo/${E.repoId}/refresh`).then(R=>{R.data.status=="ready"?k.title=`${E.repoId} is refreshed.`:k.title=`Refreshing of ${E.repoId}.`},R=>{k.title=`Error during the refresh of ${E.repoId}.`,k.body=R.body})},e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.repositories=E.data.results,e.statusCounts=E.data.statusCounts||[],e.totalSize=E.data.totalSize||0,e.allSelected=!1},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load repositories",console.error(E)})}h();let b=null;e.watch("query",()=>{r.timeout.cancel(b),b=r.timeout(h,500);let{page:E,search:k,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},Ja=function(e,t,n){let r=ct(),s=Kt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let i=h=>{if(h.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){h.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};s(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=h=>{h==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[h]="",e.query.page=1},e.chips=[];let a=()=>{let h=[];e.query.role&&h.push({key:"role",label:"Role",value:e.query.role}),e.chips=h};e.statusCountFor=h=>{let b=(e.statusCounts||[]).find(E=>E._id===h);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.query.page=1},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.users.filterPrefs",f={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},m=loadFilterPrefs(u)||{};e.query=Object.assign({},f,m,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(h=>{e.selected[h.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(h=>e.selected[h.username]),e.banUser=h=>{confirm(`Ban user ${h.username}?`)&&t.post(`/api/admin/users/${h.username}/ban`).then(g,b=>console.error(b))},e.activateUser=h=>{t.post(`/api/admin/users/${h.username}/activate`).then(g,b=>console.error(b))},e.bulkBan=()=>{let h=e.selectedUsers();h.length&&confirm(`Ban ${h.length} users?`)&&h.forEach(b=>e.banUser(b))},e.exportCsv=()=>{let h=new URLSearchParams(Object.entries(e.query).filter(([,b])=>b!==""&&b!==!1&&b!=null));h.set("format","csv"),h.set("limit","10000"),window.open("/api/admin/users?"+h.toString(),"_blank")},e.fetchError=null;function g(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(h=>{e.total=h.data.total,e.totalPage=Math.ceil(h.data.total/e.query.limit),e.users=h.data.results,e.statusCounts=h.data.statusCounts||[],e.allSelected=!1},h=>{e.fetchError=h&&h.data&&h.data.error||"Failed to load users",console.error(h)})}g();let w=null;e.watch("query",()=>{r.timeout.cancel(w),w=r.timeout(g,500);let{page:h,search:b,...E}=e.query;saveFilterPrefs(u,E),a()},!0),a()},Qa=function(e,t,n,r){let s=ct();e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let i="admin.user.filterPrefs",a={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},u=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},a.filters.status,u.filters&&u.filters.status||{})},e.query={sort:u.sort||a.sort,direction:u.direction||a.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=h=>(e.repositories||[]).filter(b=>b.status===h).length,e.repoFiler=h=>e.filters.status[h.status]==!1?!1:!!(e.search.trim().length==0||h.source.fullName.indexOf(e.search)>-1||h.repoId.indexOf(e.search)>-1||h.statusMessage&&h.statusMessage.indexOf(e.search)>-1||h.conference&&h.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(h=>{e.selected[h.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(h=>e.selected[h.repoId]),e.bulkRefresh=()=>{let h=e.selectedRepos();h.length&&confirm(`Force refresh ${h.length} repositories?`)&&h.forEach(b=>e.updateRepository(b))},e.bulkRemoveCache=()=>{let h=e.selectedRepos();h.length&&confirm(`Purge cache for ${h.length} repositories?`)&&h.forEach(b=>e.removeCache(b))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let h=e.filteredRepositories||e.repositories,E=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),k=h.map(T=>[T.repoId,T.status,T.statusMessage||"",T.pageView||0,T.anonymizeDate||"",T.source&&T.source.fullName||"",T.conference||"",T.size&&T.size.storage||0].map(P=>{let H=String(P??"");return/[",\n\r]/.test(H)?'"'+H.replace(/"/g,'""')+'"':H}).join(",")),R=new Blob([E+` -`+k.join(` -`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=r.username+"-repositories.csv",D.click()},e.showStatusMessage=h=>{let b=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,b)},e.fetchGithubInfo=h=>{let b=window.open("","_blank");b&&b.document.write("
Loading GitHub info for "+h.repoId+"...
"),t.get("/api/admin/repos/"+h.repoId+"/github").then(E=>{b&&(b.document.open(),b.document.write('
'+JSON.stringify(E.data,null,2).replace(/[<>]/g,k=>k==="<"?"<":">")+"
"),b.document.close())},E=>{let k=E&&E.data?JSON.stringify(E.data,null,2):String(E);b&&(b.document.body.innerHTML='
'+k+"
")})};function f(h){t.get("/api/admin/users/"+h+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function m(h){t.get("/api/admin/users/"+h,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}m(r.username),f(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>m(r.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>m(r.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>m(r.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>m(r.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",g()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>g(),b=>console.error(b))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>f(r.username),b=>console.error(b))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>f(r.username),b=>console.error(b))},e.updateRepository=h=>{let b=He({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${h.repoId}/refresh`).then(E=>{E.data.status=="ready"?b.title=`${h.repoId} is refreshed.`:b.title=`Refreshing of ${h.repoId}.`},E=>{b.title=`Error during the refresh of ${h.repoId}.`,b.body=E.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let w=null;e.watch("query",()=>{s.timeout.cancel(w),w=s.timeout(()=>{f(r.username)},500)},!0)},Xa=function(e,t,n){let r=ct(),s=Kt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.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()}};s(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},m=loadFilterPrefs(u)||{};e.query=Object.assign({},f,m,{page:1,search:""});let g=n.search();g.search&&(e.query.search=g.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,JSON.stringify(e.presets))},e.removeConference=E=>{confirm("Remove conference "+E.conferenceID+"?")&&t.delete("/api/admin/conferences/"+E.conferenceID).then(()=>h(),k=>console.error(k))},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,k])=>k!==""&&k!==!1&&k!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/conferences?"+E.toString(),"_blank")},e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.conferences=E.data.results,e.statusCounts=E.data.statusCounts||[]},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load conferences",console.error(E)})}h();let b=null;e.watch("query",()=>{r.timeout.cancel(b),b=r.timeout(h,500);let{page:E,search:k,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},Za=function(e,t,n,r,s){let i=ct();e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(k=>e.stateFilter[k._state]),e.jobProgressPct=k=>k&&k.progress&&typeof k.progress=="object"&&typeof k.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(k.progress.percent))):typeof k.progress=="number"?Math.max(0,Math.min(100,Math.round(k.progress))):null,e.jobDuration=k=>{if(!k.processedOn)return"-";let D=(k.finishedOn||Date.now())-k.processedOn;return D<1e3?D+"ms":(D/1e3).toFixed(1)+"s"},e.metricsPoints=[],e.selectQueue=k=>{e.selectedQueue=k,a(),u()},e.setRange=k=>{e.range=k,u()};function a(){let k={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:k}).then(R=>{e.queueList=R.data.queues||[],e.jobs=R.data.jobs||[],e.selectedStats=e.queueList.find(D=>D.key===e.selectedQueue)||e.queueList[0]||null},R=>console.error(R))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(k=>{e.metricsPoints=k.data.points||[],s(h,0)},k=>console.error(k))}a(),u();let f=r(()=>{e.query.autoRefresh&&(a(),u())},15e3);e.on("dispose",()=>r.cancel(f)),e.refreshNow=function(){a(),u()};function m(k){let R=k&&k.data&&(k.data.message||k.data.error)||"Request failed";e.actionError=R,s(()=>{e.actionError=null},5e3),console.error(k)}e.actionError=null,e.removeJob=k=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${k.id}`).then(a,m)},e.retryJob=k=>{t.post(`/api/admin/queue/${e.selectedQueue}/${k.id}`).then(a,m)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(a,k=>console.error(k))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(a,k=>console.error(k))},e.togglePause=()=>{let k=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${k}`).then(a,R=>console.error(R))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(a,k=>console.error(k))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(a,k=>console.error(k))};let g=null;e.watch("query.search",()=>{i.timeout.cancel(g),g=i.timeout(a,350)}),e.expanded={},e.toggleJob=k=>{e.expanded[k.id]=!e.expanded[k.id]},e.humanTime=k=>{if(!k)return"";let R=new Date(k);return R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+R.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=k=>{if(!k)return"";var R=Math.max(0,Math.ceil((k-Date.now())/1e3));if(R<=0)return"resuming soon";var D=Math.floor(R/60),T=R%60;return"in "+(D>0?D+"m "+T+"s":T+"s")};function w(k){if(k<=0)return{ticks:[0],niceMax:1};let R=Math.pow(10,Math.floor(Math.log10(k))),D=R;k/D<2?D=R/2:k/D>5&&(D=R*2);let T=Math.ceil(k/D)*D,P=[];for(let H=0;H<=T;H+=D)P.push(H);return{ticks:P,niceMax:T}}function h(){var k=document.getElementById("q-throughput-chart");if(!k)return;var R=k.getContext("2d"),D=window.devicePixelRatio||1,T=k.parentElement.getBoundingClientRect(),P=44,H=50,q=20,U=T.width-40,ie=180,re=U-P-H,C=ie-q;k.width=U*D,k.height=ie*D,k.style.width=U+"px",k.style.height=ie+"px",R.setTransform(D,0,0,D,0,0);var O=document.body.classList.contains("dark-mode"),G="#8A857C",J=O?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",ee=O?"#A7B2FF":"#3B4AD6",Q=O?"rgba(167,178,255,0.12)":"rgba(59,74,214,0.08)",oe=O?"#F08A82":"#B42318",ue=O?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",pe=O?"#F5C842":"#B8860B",le=e.metricsPoints||[];if(le.length===0){R.fillStyle=G,R.font="12px monospace",R.textAlign="center",R.fillText("No metrics data yet",U/2,ie/2),b=null;return}var Ie=le.map(function(L){return L.completed}),_e=le.map(function(L){return L.failed}),Ae=le.map(function(L){return L.avgMs}),Ee=le.length,Ve=re/(Ee-1||1),Se=Math.max(1,Math.max.apply(null,Ie),Math.max.apply(null,_e)),Le=w(Se),Ue=Math.max.apply(null,Ae),z=Ue>0?w(Ue):{ticks:[0],niceMax:1},ne=function(L){return C-L/Le.niceMax*(C-10)},te=function(L){return C-L/z.niceMax*(C-10)},_=function(L){return P+L*Ve};R.textAlign="right",R.textBaseline="middle",R.font="10px monospace",Le.ticks.forEach(function(L){var W=ne(L);R.strokeStyle=J,R.lineWidth=1,R.beginPath(),R.moveTo(P,W),R.lineTo(U-H,W),R.stroke(),R.fillStyle=G,R.fillText(L>=1e3?(L/1e3).toFixed(1)+"k":String(L),P-6,W)}),Ue>0&&(R.textAlign="left",z.ticks.forEach(function(L){var W=te(L);R.fillStyle=pe,R.fillText(L>=1e3?(L/1e3).toFixed(1)+"s":L+"ms",U-H+6,W)}));var I=Date.now(),j=Math.min(6,Ee);R.textAlign="center",R.textBaseline="top";for(var M=0;M0&&(R.beginPath(),Ae.forEach(function(L,W){var x=_(W),Z=te(L);if(W===0)R.moveTo(x,Z);else{var K=(_(W-1)+x)/2;R.bezierCurveTo(K,te(Ae[W-1]),K,Z,x,Z)}}),R.strokeStyle=pe,R.lineWidth=1,R.setLineDash([4,3]),R.stroke(),R.setLineDash([])),b={pts:le,maxLen:Ee,marginLeft:P,step:Ve,totalW:U,toX:_}}var b=null;function E(){var k=document.getElementById("q-throughput-chart");if(!(!k||k._tipBound)){k._tipBound=!0;var R=document.getElementById("q-chart-tooltip"),D=document.getElementById("q-chart-crosshair");k.addEventListener("mousemove",function(T){if(!(!b||!R||!D)){var P=b,H=k.getBoundingClientRect(),q=T.clientX-H.left,U=Math.round((q-P.marginLeft)/P.step);if(U<0||U>=P.maxLen){R.style.display="none",D.style.display="none";return}var ie=P.pts[U],re=Date.now(),C=Math.round((re-ie.ts)/6e4),O;if(C<=0)O="now";else if(C<60)O=C+"m ago";else if(C<1440){var G=Math.floor(C/60),J=C%60;O=G+"h"+(J?" "+J+"m":"")+" ago"}else O=Math.round(C/1440)+"d ago";var ee='
'+O+'
● completed: '+ie.completed+'/min
● failed: '+ie.failed+"/min
";if(ie.avgMs>0){var Q=ie.avgMs>=1e3?(ie.avgMs/1e3).toFixed(1)+"s":ie.avgMs+"ms";ee+='
● avg time: '+Q+"
"}R.innerHTML=ee;var oe=P.toX(U),ue=R.offsetWidth,pe=oe+10;pe+ue>P.totalW&&(pe=oe-ue-10),R.style.display="block",R.style.left=pe+"px",R.style.top="8px",D.style.display="block",D.style.left=oe+"px"}}),k.addEventListener("mouseleave",function(){R&&(R.style.display="none"),D&&(D.style.display="none")})}}e.watch("metricsPoints",function(){s(E,50)})},xa=function(e,t,n,r){let s=ct();e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null&&n.url("/"),e.entries=[],e.visible=[],e.available=!0,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=D=>{if(!D)return"";let T=new Date(D).getTime();if(isNaN(T))return D;let P=Math.max(0,Date.now()-T),H=Math.floor(P/1e3);if(H<5)return"just now";if(H<60)return`${H}s ago`;let q=Math.floor(H/60);if(q<60)return`${q}m ago`;let U=Math.floor(q/60);if(U<24)return`${U}h ago`;let ie=Math.floor(U/24);return ie<7?`${ie}d ago`:new Date(D).toLocaleDateString()},e.absTime=D=>{if(!D)return"";let T=new Date(D);return isNaN(T.getTime())?D:T.toLocaleString()},e.absTimeShort=D=>{if(!D)return"";let T=new Date(D);return isNaN(T.getTime())?D:T.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let i=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function a(D,T){let P=D&&(D.httpStatus||D.status)||null;if(typeof P=="number"){if(P>=500)return"error";if(P===401||P===403||P===404)return"info";if(P>=400)return"warn"}return T==="error"?"error":T==="warn"?"warn":"info"}function u(D){let T=(D.raw||[]).find(U=>U&&typeof U=="object"&&!Array.isArray(U));if(T){T.message&&i.test(T.message)?(D.displayMessage=T.message,D.displayContext=D.message):T.code&&i.test(String(T.code))?(D.displayMessage=String(T.code),D.displayContext=D.message):T.name&&T.name!=="AnonymousError"&&T.name!=="Error"?(D.displayMessage=T.name,D.displayContext=T.message||D.message):D.displayMessage=D.message,D._status=T.httpStatus||T.status||null,D._url=T.url||null,D._method=T.method||null,D._repoId=T.repoId||T.detail||null,D._detail=T.detail&&T.detail!==D._repoId?T.detail:null;let U=typeof T.stack=="string"?T.stack:null;for(var P=[T.cause,T.err].filter(Boolean),H=0;!U&&H{C==null||C===""||P.push([re,C])};H("name",T&&T.name),H("code",D.displayMessage||T&&T.message),D._bucket&&H("kind",D._bucket),H("httpStatus",T&&T.httpStatus),T&&T.status&&!T.httpStatus&&H("status",T.status),H("module",D.module);let q=T&&T.detail;if(typeof q=="string"){let re=q.trim();if(re[0]==="{"||re[0]==="[")try{q=JSON.parse(q)}catch{}}if(H("detail",q),H("repoId",T&&T.repoId),H("filePath",T&&T.filePath),H("upstreamStatus",T&&T.upstreamStatus),H("upstreamBody",T&&T.upstreamBody),H("url",D._url),H("err",T&&T.err),H("cause",T&&!T.err&&T.cause),H("ts",D.ts),!P.length)return JSON.stringify(D,null,2);let U=P.reduce((re,C)=>Math.max(re,C[0].length),0),ie=["{"];return P.forEach(([re,C],O)=>{let J=` ${`"${re}":`.padEnd(U+3," ")} `,ee=On&&jn(n)):[r&&jn(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+s,n!=null&&(t+="="+n))})}return t}function ba(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 wa=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 h=m=>{m===!1?f(po(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?f(m):Pc(m)?f(po(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&r.enterCallbacks[n]===a&&typeof m=="function"&&a.push(m),u())},v=i(()=>e.call(r&&r.instances[n],t,s,h)),k=Promise.resolve(v);e.length<3&&(k=k.then(h)),k.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(oa(f)){let h=(f.__vccOpts||f)[t];h&&i.push(Kt(h,s,r,a,u,n))}else{let h=f();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let k=hc(v)?v.default:v;a.mods[u]=v,a.components[u]=k;let m=(k.__vccOpts||k)[t];return m&&Kt(m,s,r,a,u,n)()}))}}return i}function ka(e,t){let s=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aco(h,u))?r.push(u):s.push(u));let f=e.matched[a];f&&(t.matched.find(h=>co(h,f))||n.push(f))}return[s,r,n]}var Mc=()=>location.protocol+"//"+location.host;function Ia(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 Lc(e,t,s,r){let n=[],i=[],a=null,u=({state:m})=>{let y=Ia(e,location),E=s.value,w=t.value,R=0;if(m){if(s.value=y,t.value=m,a&&a===E){a=null;return}R=w?m.position-w.position:0}else r(y);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 h(m){n.push(m);let y=()=>{let E=n.indexOf(m);E>-1&&n.splice(E,1)};return i.push(y),y}function v(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:us()}),"")}}function k(){for(let m of i)m();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:f,listen:h,destroy:k}}function Ea(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 $c(e){let{history:t,location:s}=window,r={value:Ia(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,h,v){let k=e.indexOf("#"),m=k>-1?(s.host&&document.querySelector("base")?e:e.slice(k))+f:Mc()+e+f;try{t[v?"replaceState":"pushState"](h,"",m),n.value=h}catch(y){console.error(y),s[v?"replace":"assign"](m)}}function a(f,h){i(f,Oe({},t.state,Ea(n.value.back,f,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=f}function u(f,h){let v=Oe({},n.value,t.state,{forward:f,scroll:us()});i(v.current,v,!0),i(f,Oe({},Ea(r.value,f,null),{position:v.position+1},h),!1),r.value=f}return{location:r,state:n,push:u,replace:a}}function Pa(e){e=pa(e);let t=$c(e),s=Lc(e,t.state,t.location,t.replace);function r(i,a=!0){a||s.pauseListeners(),history.go(i)}let n=Oe({location:"",base:e,go:r,createHref:fa.bind(null,e)},t,s);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}var mo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),Xe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Xe||{}),Uc={type:mo.Static,value:""},Fc=/[a-zA-Z0-9_]/;function zc(e){if(!e)return[[]];if(e==="/")return[[Uc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${s})/"${h}": ${y}`)}let s=Xe.Static,r=s,n=[],i;function a(){i&&n.push(i),i=[]}let u=0,f,h="",v="";function k(){h&&(s===Xe.Static?i.push({type:mo.Static,value:h}):s===Xe.Param||s===Xe.ParamRegExp||s===Xe.ParamRegExpEnd?(i.length>1&&(f==="*"||f==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),i.push({type:mo.Param,value:h,regexp:v,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):t("Invalid state to consume buffer"),h="")}function m(){h+=f}for(;ut.length?t.length===1&&t[0]===it.Static+it.Segment?1:-1:0}function Va(e,t){let s=0,r=e.score,n=t.score;for(;s0&&t[t.length-1]<0}var Wc={strict:!1,end:!0,sensitive:!1};function Kc(e,t,s){let r=jc(zc(e.path),s),n=Oe(r,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function Yc(e,t){let s=[],r=new Map;t=Wn(Wc,t);function n(k){return r.get(k)}function i(k,m,y){let E=!y,w=Na(k);w.aliasOf=y&&y.record;let R=Wn(t,k),D=[w];if("alias"in k){let H=typeof k.alias=="string"?[k.alias]:k.alias;for(let q of H)D.push(Na(Oe({},w,{components:y?y.record.components:w.components,path:q,aliasOf:y?y.record:w})))}let T,P;for(let H of D){let{path:q}=H;if(m&&q[0]!=="/"){let U=m.record.path,ae=U[U.length-1]==="/"?"":"/";H.path=m.record.path+(q&&ae+q)}if(T=Kc(H,m,R),y?y.alias.push(T):(P=P||T,P!==T&&P.alias.push(T),E&&k.name&&!Da(T)&&a(k.name)),qa(T)&&f(T),w.children){let U=w.children;for(let ae=0;ae{a(P)}:Ao}function a(k){if(Xn(k)){let m=r.get(k);m&&(r.delete(k),s.splice(s.indexOf(m),1),m.children.forEach(a),m.alias.forEach(a))}else{let m=s.indexOf(k);m>-1&&(s.splice(m,1),k.record.name&&r.delete(k.record.name),k.children.forEach(a),k.alias.forEach(a))}}function u(){return s}function f(k){let m=Xc(k,s);s.splice(m,0,k),k.record.name&&!Da(k)&&r.set(k.record.name,k)}function h(k,m){let y,E={},w,R;if("name"in k&&k.name){if(y=r.get(k.name),!y)throw po(je.MATCHER_NOT_FOUND,{location:k});R=y.record.name,E=Oe(Sa(m.params,y.keys.filter(P=>!P.optional).concat(y.parent?y.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),k.params&&Sa(k.params,y.keys.map(P=>P.name))),w=y.stringify(E)}else if(k.path!=null)w=k.path,y=s.find(P=>P.re.test(w)),y&&(E=y.parse(w),R=y.record.name);else{if(y=m.name?r.get(m.name):s.find(P=>P.re.test(m.path)),!y)throw po(je.MATCHER_NOT_FOUND,{location:k,currentLocation:m});R=y.record.name,E=Oe({},m.params,k.params),w=y.stringify(E)}let D=[],T=y;for(;T;)D.unshift(T.record),T=T.parent;return{name:R,path:w,params:E,matched:D,meta:Qc(D)}}e.forEach(k=>i(k));function v(){s.length=0,r.clear()}return{addRoute:i,resolve:h,removeRoute:a,clearRoutes:v,getRoutes:u,getRecordMatcher:n}}function Sa(e,t){let s={};for(let r of t)r in e&&(s[r]=e[r]);return s}function Na(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Jc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Jc(e){let t={},s=e.props||!1;if("component"in e)t.default=s;else for(let r in e.components)t[r]=typeof s=="object"?s[r]:s;return t}function Da(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qc(e){return e.reduce((t,s)=>Oe(t,s.meta),{})}function Xc(e,t){let s=0,r=t.length;for(;s!==r;){let i=s+r>>1;Va(e,t[i])<0?r=i:s=i+1}let n=Zc(e);return n&&(r=t.lastIndexOf(n,r-1)),r}function Zc(e){let t=e;for(;t=t.parent;)if(qa(t)&&Va(e,t)===0)return t}function qa({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ra(e){let t=ut(Zs),s=ut(xs),r=!1,n=null,i=ot(()=>{let v=Ht(e.to);return t.resolve(v)}),a=ot(()=>{let{matched:v}=i.value,{length:k}=v,m=v[k-1],y=s.matched;if(!m||!y.length)return-1;let E=y.findIndex(co.bind(null,m));if(E>-1)return E;let w=Ta(v[k-2]);return k>1&&Ta(m)===w&&y[y.length-1].path!==w?y.findIndex(co.bind(null,v[k-2])):E}),u=ot(()=>a.value>-1&&sp(s.params,i.value.params)),f=ot(()=>a.value>-1&&a.value===s.matched.length-1&&Jn(s.params,i.value.params));function h(v={}){if(op(v)){let k=t[Ht(e.replace)?"replace":"push"](Ht(e.to)).catch(Ao);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>k),k}return Promise.resolve()}return{route:i,href:ot(()=>i.value.href),isActive:u,isExactActive:f,navigate:h}}function xc(e){return e.length===1?e[0]:e}var ep=rs({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Ra,setup(e,{slots:t}){let s=He(Ra(e)),{options:r}=ut(Zs),n=ot(()=>({[Aa(e.activeClass,r.linkActiveClass,"router-link-active")]:s.isActive,[Aa(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{let i=t.default&&xc(t.default(s));return e.custom?i:ke("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:n.value},i)}}}),tp=ep;function op(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sp(e,t){for(let s in t){let r=t[s],n=e[s];if(typeof r=="string"){if(r!==n)return!1}else if(!wt(n)||n.length!==r.length||r.some((i,a)=>i.valueOf()!==n[a].valueOf()))return!1}return!0}function Ta(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Aa=(e,t,s)=>e??t??s,np=rs({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){let r=ut(en),n=ot(()=>e.route||r.value),i=ut(xn,0),a=ot(()=>{let h=Ht(i),{matched:v}=n.value,k;for(;(k=v[h])&&!k.components;)h++;return h}),u=ot(()=>n.value.matched[a.value]);io(xn,ot(()=>a.value+1)),io(wa,u),io(en,n);let f=et();return Be(()=>[f.value,u.value,e.name],([h,v,k],[m,y,E])=>{v&&(v.instances[k]=h,y&&y!==v&&h&&h===m&&(v.leaveGuards.size||(v.leaveGuards=y.leaveGuards),v.updateGuards.size||(v.updateGuards=y.updateGuards))),h&&v&&(!y||!co(v,y)||!m)&&(v.enterCallbacks[k]||[]).forEach(w=>w(h))},{flush:"post"}),()=>{let h=n.value,v=e.name,k=u.value,m=k&&k.components[v];if(!m)return Oa(s.default,{Component:m,route:h});let y=k.props[v],E=y?y===!0?h.params:typeof y=="function"?y(h):y:null,R=ke(m,Oe({},E,t,{onVnodeUnmounted:D=>{D.component.isUnmounted&&(k.instances[v]=null)},ref:f}));return Oa(s.default,{Component:R,route:h})||R}}});function Oa(e,t){if(!e)return null;let s=e(t);return s.length===1?s[0]:s}var er=np;function Ma(e){let t=Yc(e.routes,e),s=e.parseQuery||ya,r=e.stringifyQuery||Zn,n=e.history,i=Oo(),a=Oo(),u=Oo(),f=_s(Yt),h=Yt;fo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let v=Ys.bind(null,z=>""+z),k=Ys.bind(null,da),m=Ys.bind(null,To);function y(z,ne){let te,_;return Xn(z)?(te=t.getRecordMatcher(z),_=ne):_=z,t.addRoute(_,te)}function E(z){let ne=t.getRecordMatcher(z);ne&&t.removeRoute(ne)}function w(){return t.getRoutes().map(z=>z.record)}function R(z){return!!t.getRecordMatcher(z)}function D(z,ne){if(ne=Oe({},ne||f.value),typeof z=="string"){let g=Js(s,z,ne.path),S=t.resolve({path:g.path},ne),V=n.createHref(g.fullPath);return Oe(g,S,{params:m(S.params),hash:To(g.hash),redirectedFrom:void 0,href:V})}let te;if(z.path!=null)te=Oe({},z,{path:Js(s,z.path,ne.path).path});else{let g=Oe({},z.params);for(let S in g)g[S]==null&&delete g[S];te=Oe({},z,{params:k(g)}),ne.params=k(ne.params)}let _=t.resolve(te,ne),I=z.hash||"";_.params=v(m(_.params));let B=ua(r,Oe({},z,{hash:la(I),path:_.path})),M=n.createHref(B);return Oe({fullPath:B,hash:I,query:r===Zn?ba(z.query):z.query||{}},_,{redirectedFrom:void 0,href:M})}function T(z){return typeof z=="string"?Js(s,z,f.value.path):Oe({},z)}function P(z,ne){if(h!==z)return po(je.NAVIGATION_CANCELLED,{from:ne,to:z})}function H(z){return ae(z)}function q(z){return H(Oe(T(z),{replace:!0}))}function U(z,ne){let te=z.matched[z.matched.length-1];if(te&&te.redirect){let{redirect:_}=te,I=typeof _=="function"?_(z,ne):_;return typeof I=="string"&&(I=I.includes("?")||I.includes("#")?I=T(I):{path:I},I.params={}),Oe({query:z.query,hash:z.hash,params:I.path!=null?{}:z.params},I)}}function ae(z,ne){let te=h=D(z),_=f.value,I=z.state,B=z.force,M=z.replace===!0,g=U(te,_);if(g)return ae(Oe(T(g),{state:typeof g=="object"?Oe({},I,g.state):I,force:B,replace:M}),ne||te);let S=te;S.redirectedFrom=ne;let V;return!B&&ca(r,_,te)&&(V=po(je.NAVIGATION_DUPLICATED,{to:S,from:_}),Ae(_,_,!0,!1)),(V?Promise.resolve(V):O(S,_)).catch(F=>Lt(F)?Lt(F,je.NAVIGATION_GUARD_REDIRECT)?F:_e(F):le(F,S,_)).then(F=>{if(F){if(Lt(F,je.NAVIGATION_GUARD_REDIRECT))return ae(Oe({replace:M},T(F.to),{state:typeof F.to=="object"?Oe({},I,F.to.state):I,force:B}),ne||S)}else F=J(S,_,!0,M,I);return G(S,_,F),F})}function ie(z,ne){let te=P(z,ne);return te?Promise.reject(te):Promise.resolve()}function C(z){let ne=Se.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(z):z()}function O(z,ne){let te,[_,I,B]=ka(z,ne);te=tn(_.reverse(),"beforeRouteLeave",z,ne);for(let g of _)g.leaveGuards.forEach(S=>{te.push(Kt(S,z,ne))});let M=ie.bind(null,z,ne);return te.push(M),Ue(te).then(()=>{te=[];for(let g of i.list())te.push(Kt(g,z,ne));return te.push(M),Ue(te)}).then(()=>{te=tn(I,"beforeRouteUpdate",z,ne);for(let g of I)g.updateGuards.forEach(S=>{te.push(Kt(S,z,ne))});return te.push(M),Ue(te)}).then(()=>{te=[];for(let g of B)if(g.beforeEnter)if(wt(g.beforeEnter))for(let S of g.beforeEnter)te.push(Kt(S,z,ne));else te.push(Kt(g.beforeEnter,z,ne));return te.push(M),Ue(te)}).then(()=>(z.matched.forEach(g=>g.enterCallbacks={}),te=tn(B,"beforeRouteEnter",z,ne,C),te.push(M),Ue(te))).then(()=>{te=[];for(let g of a.list())te.push(Kt(g,z,ne));return te.push(M),Ue(te)}).catch(g=>Lt(g,je.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function G(z,ne,te){u.list().forEach(_=>C(()=>_(z,ne,te)))}function J(z,ne,te,_,I){let B=P(z,ne);if(B)return B;let M=ne===Yt,g=fo?history.state:{};te&&(_||M?n.replace(z.fullPath,Oe({scroll:M&&g&&g.scroll},I)):n.push(z.fullPath,I)),f.value=z,Ae(z,ne,te,M),_e()}let ee;function Q(){ee||(ee=n.listen((z,ne,te)=>{if(!$e.listening)return;let _=D(z),I=U(_,$e.currentRoute.value);if(I){ae(Oe(I,{replace:!0,force:!0}),_).catch(Ao);return}h=_;let B=f.value;fo&&ha(Qn(B.fullPath,te.delta),us()),O(_,B).catch(M=>Lt(M,je.NAVIGATION_ABORTED|je.NAVIGATION_CANCELLED)?M:Lt(M,je.NAVIGATION_GUARD_REDIRECT)?(ae(Oe(T(M.to),{force:!0}),_).then(g=>{Lt(g,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&!te.delta&&te.type===Qs.pop&&n.go(-1,!1)}).catch(Ao),Promise.reject()):(te.delta&&n.go(-te.delta,!1),le(M,_,B))).then(M=>{M=M||J(_,B,!1),M&&(te.delta&&!Lt(M,je.NAVIGATION_CANCELLED)?n.go(-te.delta,!1):te.type===Qs.pop&&Lt(M,je.NAVIGATION_ABORTED|je.NAVIGATION_DUPLICATED)&&n.go(-1,!1)),G(_,B,M)}).catch(Ao)}))}let oe=Oo(),ue=Oo(),pe;function le(z,ne,te){_e(z);let _=ue.list();return _.length?_.forEach(I=>I(z,ne,te)):console.error(z),Promise.reject(z)}function Ie(){return pe&&f.value!==Yt?Promise.resolve():new Promise((z,ne)=>{oe.add([z,ne])})}function _e(z){return pe||(pe=!z,Q(),oe.list().forEach(([ne,te])=>z?te(z):ne()),oe.reset()),z}function Ae(z,ne,te,_){let{scrollBehavior:I}=e;if(!fo||!I)return Promise.resolve();let B=!te&&va(Qn(z.fullPath,0))||(_||!te)&&history.state&&history.state.scroll||null;return st().then(()=>I(z,ne,B)).then(M=>M&&ma(M)).catch(M=>le(M,z,ne))}let Ee=z=>n.go(z),Ve,Se=new Set,$e={currentRoute:f,listening:!0,addRoute:y,removeRoute:E,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:w,resolve:D,options:e,push:H,replace:q,go:Ee,back:()=>Ee(-1),forward:()=>Ee(1),beforeEach:i.add,beforeResolve:a.add,afterEach:u.add,onError:ue.add,isReady:Ie,install(z){z.component("RouterLink",tp),z.component("RouterView",er),z.config.globalProperties.$router=$e,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>Ht(f)}),fo&&!Ve&&f.value===Yt&&(Ve=!0,H(n.location).catch(_=>{}));let ne={};for(let _ in Yt)Object.defineProperty(ne,_,{get:()=>f.value[_],enumerable:!0});z.provide(Zs,$e),z.provide(xs,Wo(ne)),z.provide(en,f);let te=z.unmount;Se.add(z),z.unmount=function(){Se.delete(z),Se.size<1&&(h=Yt,ee&&ee(),ee=null,f.value=Yt,Ve=!1,pe=!1),te()}}};function Ue(z){return z.reduce((ne,te)=>ne.then(()=>C(te)),Promise.resolve())}return $e}function La(e){return ut(xs)}function $a(e,t){return t?.split(".").reduce((s,r)=>s?.[r],e)}function tr(e=null,t=new Map){let s=He({}),r=[],n=!1,i=new Proxy(s,{get(a,u){return typeof u=="string"&&u.startsWith("__v_")||Reflect.has(a,u)?Reflect.get(a,u):e?.[u]}});return Object.defineProperty(s,"parent",{value:e,configurable:!0}),Object.defineProperty(s,"viewState",{get:()=>i}),i.watch=(a,u,f=!1,h=!0)=>{let v=typeof a=="function"?()=>a(i):()=>$a(i,a),k=Be(v,u,{deep:f,flush:"post"});return r.push(k),h&&st(()=>{n||u(v(),v())}),k},i.watchGroup=(a,u,f=!0)=>i.watch(()=>a.map(h=>$a(i,h)),u,!0,f),i.on=(a,u)=>{if(a==="dispose")return r.push(u),()=>{};t.has(a)||t.set(a,new Set),t.get(a).add(u);let f=()=>t.get(a)?.delete(u);return r.push(f),f},i.emit=(a,...u)=>{for(let f of[...t.get(a)||[]])f({},...u)},i.dispose=()=>{n=!0,r.splice(0).reverse().forEach(a=>a())},jo(i.dispose),i}function ct(){let e=new Set,t=new Set,s=!1,r=(i,a=0)=>{if(s)return;let u=setTimeout(()=>{e.delete(u),i()},a);return e.add(u),u};r.cancel=i=>{clearTimeout(i),e.delete(i)};let n=(i,a)=>{if(s)return;let u=setInterval(i,a);return t.add(u),u};return n.cancel=i=>{clearInterval(i),t.delete(i)},jo(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:r,interval:n}}function Jt(){let e=new Set;return jo(()=>{e.forEach(t=>t()),e.clear()}),(t,s,r,n)=>{t.addEventListener(s,r,n);let i=()=>{t.removeEventListener(s,r,n),e.delete(i)};return e.add(i),i}}function or(e,t,s){let r,n=!1,i="form-draft:"+s,a=()=>Object.fromEntries(t.map(m=>[m,e[m]])),u=()=>JSON.stringify(a()),f=m=>{for(let y of t)Object.prototype.hasOwnProperty.call(m,y)&&(e[y]=m[y]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},h=()=>{try{window.sessionStorage.removeItem(i)}catch{}},v=(m=!1)=>{if(r!==void 0){if(m&&document.querySelectorAll("input, select, textarea").forEach(y=>{y._field?.binding.state===e&&y._field.timer&&y._field.commit()}),e.unsavedChanges=u()!==r,e.draftSaved=!1,!e.unsavedChanges){h();return}try{window.sessionStorage.setItem(i,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:a()})),e.draftSaved=!0}catch{}}},k=()=>v(!0);return e.on("routeLeave",k),window.addEventListener("beforeunload",k),e.on("dispose",()=>window.removeEventListener("beforeunload",k)),{restore(){r=u();let m;try{m=JSON.parse(window.sessionStorage.getItem(i)||"null")}catch{}let y=m&&m.account===(e.user?.username||null)&&Date.now()-m.savedAt<30*6e4&&m.values;return y&&(f(m.values),e.draftRestored=!0),n||(n=!0,e.watch(()=>a(),()=>v(),!0)),e.unsavedChanges=u()!==r,!!y},checkpoint(){return JSON.parse(u())},accept(m){r=JSON.stringify(m),e.draftRestored=!1,v()},discard(){document.querySelectorAll("input, select, textarea").forEach(m=>{m._field?.binding.state!==e||!m._field.timer||(clearTimeout(m._field.timer),m._field.timer=null,m.value=m._field.binding.value??"")}),r!==void 0&&f(JSON.parse(r)),e.draftRestored=!1,v()},clear(){r=u(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,h()}}}function rp(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],s=t.indexOf(e.currentTarget),r=e.key==="Home"?0:e.key==="End"?t.length-1:(s+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[r]?.focus(),t[r]?.click()}var Ua=function(e,t,s,r){e.previewTabKeydown=rp,e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(f){let h=e.toasts.indexOf(f);h!==-1&&e.toasts.splice(h,1)},e.addToast=function(f){return e.toasts.push(f),r(function(){e.removeToast(f)},8e3),f},e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.darkMode=function(f){localStorage.setItem("darkMode",f),e.isDarkMode=f;let h="/css/prism-okaidia.css",v="/css/prism.css";if(f){$("body").addClass("dark-mode");let m=document.createElement("link");m.href=h,m.rel="stylesheet",document.head.append(m),$(`link[href='${v}']`).remove()}else{$("body").removeClass("dark-mode");let m=document.createElement("link");m.href=v,m.rel="stylesheet",document.head.append(m),$(`link[href='${h}']`).remove()}let k=document.querySelector("[class*='floatingchat-container-wrap'] [class*='floating-chat-kofi-text-container-wrap']");k&&(k.style.backgroundColor=f?"#FAF9F6":"#1A1815",k.style.color=f?"#1A1815":"#FAF9F6"),e.emit("dark-mode",f)},e.darkMode(localStorage.getItem("darkMode")=="true");function n(){t.get("/api/user").then(f=>{f&&(e.user=f.data)},()=>{e.user=null})}n();function i(){t.get("/api/options").then(f=>{f&&(e.site_options=f.data)},()=>{e.site_options=null})}i();function a(){t.get("/api/message").then(f=>{f&&(e.generalMessage=f.data)},()=>{e.generalMessage=null})}a();function u(f,h){h&&(e.title=h.title),e.path=s.url(),e.paths=s.path().substring(1).split("/")}e.on("routeChange",u),e.on("routeUpdate",u)},Fa=function(e,t){let s=Jt(),r=ct(),n=()=>{let i=window.location.hash.slice(1),a=document.getElementById(i);if(!a?.classList.contains("panel-collapse"))return;$(a).collapse("show");let u=document.getElementById(a.getAttribute("aria-labelledby"));u?.setAttribute("tabindex","-1"),u?.focus({preventScroll:!0}),u?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>r.timeout(n,0)),s(window,"hashchange",n),r.timeout(n,0)},za=function(e,t,s,r,n){e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,n.load().then(f=>{e.quota=f},console.error);let i=or(e,["terms","options"],"profile");e.discardDraft=()=>i.discard();function a(){t.get("/api/user/default").then(f=>{let h=f.data||{};h.terms&&(e.terms=h.terms.join(` +`)),e.options=Object.assign({},e.options,h.options),i.restore()})}a();let u=null;e.saveDefault=f=>{if(f&&f.preventDefault&&f.preventDefault(),e.saving)return;let h=i.checkpoint(),v={terms:e.terms.split(` +`).map(k=>k.trim()).filter(k=>k.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",v).then(()=>{i.accept(h),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",u&&r.cancel(u),u=r(()=>{e.message=null},2500)},k=>{e.saving=!1;let y="ERRORS."+(k&&k.data&&k.data.error);s(y).then(E=>{e.error=E&&E!==y?E:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},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."}))}},Ha=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)})}},Ba=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 h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(h===void 0)return;u.preventDefault();let v=e.features.length,k=h==="first"?0:h==="last"?v-1:(f+h+v)%v;e.feature=e.features[k].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 h=new Array(u.length-1);for(let w=1;w=2){let w=h[v-2];w&&(f.pctChange=(f.deltaToday-w)/w*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(h=>h.nbRepositories||0)),users:a(f.map(h=>h.nbUsers||0)),pageViews:a(f.map(h=>h.nbPageViews||0)),pullRequests:a(f.map(h=>h.nbPullRequests||0))}})},ja=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",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||f(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await st();let O=document.getElementById(e.projectDetailsId(C));O?.focus(),O?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,st(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let O=e.projectName.trim();if(O.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let G=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:O});C.projectName=G.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=O?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await H(),e.selectedProject===C&&(e.selectedProject=e.items.find(J=>J._type===C._type&&J._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let O=new URL(C._viewUrl,n.location.origin).href;e.copyingId=C._type+":"+C._id;try{if(n.navigator.clipboard?.writeText)await n.navigator.clipboard.writeText(O);else{let G=document.createElement("textarea");G.value=O,G.setAttribute("readonly",""),G.style.position="fixed",G.style.opacity="0";let J=document.activeElement;document.body.appendChild(G);try{if(G.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{G.remove(),J?.focus()}}e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:O})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let u=["queue","download","downloaded","preparing","anonymizing"];function f(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired":C==="removed"||C==="removing"?"removed":(u.indexOf(C)>-1,"progress")}let h=7200*1e3,v="dashboard.filterPrefs",k={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},m=loadFilterPrefs(v)||{};e.typeFilter=m.typeFilter||k.typeFilter,e.filters={status:Object.assign({},k.filters.status,m.filters&&m.filters.status||{})},e.orderBy=m.orderBy||k.orderBy;let y={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=y,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let C=y[e.sortField()];return C?C.label:"Custom"},e.isSortedBy=C=>e.sortField()===C,e.setSort=(C,O)=>{typeof O!="boolean"&&(O=e.isSortedBy(C)?!e.sortDesc():!!(y[C]&&y[C].defaultDesc)),e.orderBy=(O?"-":"")+C},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(v,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(v,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),i.load().then(C=>{e.quota=C},console.error);function E(C,O,G,J,ee,Q){C.pageView||(C.pageView=0),C.lastView||(C.lastView=""),C.options=C.options||{},C.options.terms=(C.options.terms||[]).filter(ue=>ue),C._id=O||"",C._source=J,C._broken=!O,C._name=O||J||"(unnamed)",C._fallbackLabel=C._type==="gist"?"Gist "+(O||J||"without an ID"):J||G||C._name,C._label=C.projectName||C._fallbackLabel,C._editUrl=O?ee:null,C._viewUrl=O?Q:null,C._broken&&(C.status="error",C.statusMessage="incomplete_record"),C._statusKey=f(C.status);let oe=C.anonymizeDate||C.lastView;return C._stale=C._statusKey==="progress"&&!!oe&&Date.now()-new Date(oe).getTime()>h,C.status==="expired"||C.status==="expiring"?C._expiry={kind:"expired",date:C.options.expirationDate}:C.status!=="ready"?C._expiry={kind:"none"}:C.options.expirationMode==="never"||!C.options.expirationDate?C._expiry={kind:"never"}:C._expiry={kind:"date",date:C.options.expirationDate},C}function w(C){return t.get(C).then(O=>O.data||[],O=>(console.error(O),[]))}function R(){return e.loading=!0,r.all([w("/api/user/anonymized_repositories"),w("/api/user/anonymized_pull_requests"),w("/api/user/anonymized_gists")]).then(C=>{let O=C[0],G=C[1],J=C[2],ee=[];O.forEach(Q=>{Q._type="repo";let oe=Q.source||{};ee.push(E(Q,Q.repoId,Q.repoId,oe.fullName,"/anonymize/"+Q.repoId,"/r/"+Q.repoId+"/"))}),G.forEach(Q=>{Q._type="pr";let oe=Q.source||{};ee.push(E(Q,Q.pullRequestId,Q.pullRequestId,oe.repositoryFullName?oe.repositoryFullName+"#"+oe.pullRequestId:void 0,"/pull-request-anonymize/"+Q.pullRequestId,"/pr/"+Q.pullRequestId+"/"))}),J.forEach(Q=>{Q._type="gist";let oe=Q.source||{};ee.push(E(Q,Q.gistId,Q.gistId,oe.gistId,"/gist-anonymize/"+Q.gistId,"/gist/"+Q.gistId+"/"))}),e.items=ee,e.loading=!1})}let D=0,T=!1;e.dashboardCursor=null,e.dashboardError="";function P(C){let O=C.source||{};return C._type==="repo"?E(C,C.repoId,C.repoId,O.fullName,"/anonymize/"+C.repoId,"/r/"+C.repoId+"/"):C._type==="pr"?E(C,C.pullRequestId,C.pullRequestId,O.repositoryFullName?O.repositoryFullName+"#"+O.pullRequestId:void 0,"/pull-request-anonymize/"+C.pullRequestId,"/pr/"+C.pullRequestId+"/"):E(C,C.gistId,C.gistId,O.gistId,"/gist-anonymize/"+C.gistId,"/gist/"+C.gistId+"/")}function H(C=!1){if(T)return R();let O=++D;return e.loading=!C,e.loadingMore=C,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(G=>e.filters.status[G]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:C?e.dashboardCursor:void 0}}).then(G=>{if(O===D){if(!Array.isArray(G.data?.items))return T=!0,R();e.items=(C?e.items:[]).concat(G.data.items.map(P)),e.dashboardCursor=G.data.cursor,e.dashboardTotals=G.data}},G=>{if(O===D){if(G.status===404)return T=!0,R();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{O===D&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>H(!0);let q;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{T||(q&&a.timeout.cancel(q),q=a.timeout(()=>H(),150))},!1),e.watch("filters",()=>{T||H()},!0,!1),e.on("dispose",()=>{D++}),H(),e.openItem=(C,O)=>{if(!C._viewUrl)return;let G=O&&O.target;G&&G.closest&&G.closest("a, button, .dropdown, input")||(n.location.href=C._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(C=>e.filters.status[C]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(C=>e.filters.status[C]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.hiddenStatusCount()>1,e.clearFilters=()=>{e.projectView="all",e.typeFilter="all",e.search="",Object.keys(e.filters.status).forEach(C=>{e.filters.status[C]=!0})};function U(C,O,G,J){t.get("/api/repo/"+C).then(async ee=>{let Q=J!==void 0&&J!==ee.data.status;for(let oe of e.items)if(oe._type==="repo"&&oe.repoId==C){Q=Q||oe.status!==ee.data.status;let ue=e.needsAttention(oe);oe.status=ee.data.status,oe.statusMessage=ee.data.statusMessage,oe._statusKey=f(oe.status),oe._statusKey!=="progress"&&(oe._stale=!1);let pe=e.needsAttention(oe);e.dashboardTotals&&ue!==pe&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(pe?1:-1)));break}if(Q&&!T){e.dashboardCursor=null;let oe=e.selectedProject;await H(),oe&&e.selectedProject===oe&&(e.selectedProject=e.items.find(ue=>ue._type===oe._type&&ue._id===oe._id)||null)}if(ee.data.status=="ready"||ee.data.status=="error"||ee.data.status=="removed"||ee.data.status=="expired"){O(ee.data);return}a.timeout(()=>U(C,O,G,ee.data.status),2500)},G)}let ae=C=>C==="repo"?"repository":C==="gist"?"gist":"pull request",ie=C=>C==="repo"?"/api/repo":C==="gist"?"/api/gist":"/api/pr";e.removeItem=C=>{let O=ae(C._type);if(confirm(`Are you sure that you want to remove the ${O} ${C._id}?`)){let G=He({title:`Removing ${C._id}...`,date:new Date,body:`The ${O} ${C._id} is going to be removed.`});e.addToast(G);let J=`${ie(C._type)}/${C._id}`;t.delete(J).then(()=>{C._type==="repo"?U(C._id,()=>{G.title=`${C._id} is removed.`,G.body=`The ${O} ${C._id} is removed.`},void 0,C.status):(G.title=`${C._id} is removed.`,G.body=`The ${O} ${C._id} is removed.`,H())},ee=>{G.title=`Error during the removal of ${C._id}.`,G.body=ee.body,H()})}},e.refreshItem=C=>{let O=ae(C._type),G=He({title:`Refreshing ${C._id}...`,date:new Date,body:`The ${O} ${C._id} is going to be refreshed.`});e.addToast(G);let J=Q=>{G.title=`Error during the refresh of ${C._id}.`,G.body=Q.data?.error||Q.body||"The refresh could not be completed. Please try again.",H()},ee=`${ie(C._type)}/${C._id}/refresh`;t.post(ee).then(()=>{C._type==="repo"?U(C._id,Q=>{if(Q.status!=="ready"){J({body:Q.statusMessage||`The repository is ${Q.status}.`});return}G.title=`${C._id} is refreshed.`,G.body=`The ${O} ${C._id} is refreshed.`},J,C.status):(G.title=`${C._id} is refreshed.`,G.body=`The ${O} ${C._id} is refreshed.`,H())},J)},e.extendItem=C=>{let O=ae(C._type),G=He({title:`Extending ${C._id}...`,date:new Date,body:`The expiration of ${O} ${C._id} is going to be extended by 6 months.`});e.addToast(G);let J=`${ie(C._type)}/${C._id}/extend`;t.post(J).then(()=>{C._type==="repo"?U(C._id,()=>{G.title=`${C._id} is extended.`,G.body=`The expiration of ${O} ${C._id} is extended by 6 months.`},void 0,C.status):(G.title=`${C._id} is extended.`,G.body=`The expiration of ${O} ${C._id} is extended by 6 months.`,H())},ee=>{G.title=`Error during the extension of ${C._id}.`,G.body=ee.data&&ee.data.error||ee.body,H()})},e.itemFilter=C=>{if(e.projectView==="attention"&&!e.needsAttention(C)||e.typeFilter!=="all"&&C._type!==e.typeFilter||e.filters.status[C._statusKey]===!1)return!1;let O=e.search.trim().toLowerCase();return!!(O.length==0||C._label&&String(C._label).toLowerCase().indexOf(O)>-1||C._source&&String(C._source).toLowerCase().indexOf(O)>-1||C._id&&String(C._id).toLowerCase().indexOf(O)>-1||C.conference&&String(C.conference).toLowerCase().indexOf(O)>-1)}};var Ga=function(e,t,s){let r=ct();e.repoId=s.repoId,e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="";var n=null;let i=null,a=!1;function u(h){e.rateLimitResetAt=h,n&&r.interval.cancel(n);function v(){var k=Math.max(0,Math.ceil((h-Date.now())/1e3));if(k<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,r.interval.cancel(n),n=null;else{var m=Math.floor(k/60),y=k%60;e.rateLimitCountdown=m>0?m+"m "+y+"s":y+"s"}}v(),n=r.interval(v,1e3)}e.on("dispose",function(){a=!0,n&&r.interval.cancel(n),i&&r.timeout.cancel(i)});function f(h){if(!h)return h;var v=h.match(/^rate_limited:(\d+)$/);return v?(u(parseInt(v[1],10)),null):(e.rateLimitResetAt=0,h)}e.getStatus=()=>{a||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(h=>{if(!a){e.repo=h.data,h.data.rateLimitResetAt?u(h.data.rateLimitResetAt):e.repo.statusMessage=f(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var v=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(v=!1),v&&(i=r.timeout(e.getStatus,2e3))}},h=>{e.error=h.data.error})},e.getStatus()},on=function(e,t,s,r,n,i,a){e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let u=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!u?.matches,u?.addEventListener&&Jt()(u,"change",_=>{e.mobileWorkspace=_.matches}),e.selectMobilePane=_=>{e.mobilePane=_};let f=0,h=!1,v=new Set,k=(_,I=!1)=>!h&&_.generation===f&&_.url===e.sourceUrl.trim()&&_.connection===e.githubConnection&&(!I||_.branch===e.source.branch),m=()=>{let _={generation:f,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return v.add(_),e.sourceLoading=!0,_},y=_=>{v.delete(_),h||(e.sourceLoading=[...v].some(I=>k(I)))};e.on("dispose",()=>{h=!0,f++});let E=null,w=_=>_.gistId&&!_.repo?"gist:"+_.gistId.toLowerCase():(_.owner+"/"+_.repo).toLowerCase()+(_.pullRequestId?"/pull/"+_.pullRequestId:""),R=or(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(n.path?.()||""));e.discardDraft=async()=>{R.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(f++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",oe.cancel(),_e.cancel(),Se.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let D=()=>{let _={};for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])_[I]=e[I];sessionStorage.setItem("github-access-draft",JSON.stringify({path:n.path(),savedAt:Date.now(),draft:_}))};e.connectGistApp=()=>{D(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(n.path())},e.connectGistOAuth=()=>{D(),window.location.href="/github/login?returnTo="+encodeURIComponent(n.path())},e.grantGitHubAccess=()=>{D();let _=n.path(),I=ae(e.sourceUrl)||"",B=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=B+"?returnTo="+encodeURIComponent(_)+"&repository="+encodeURIComponent(I)+"&install=1"},e.chooseGitHubConnection=async _=>{e.githubConnection=_,e.readme="",e.sourceUrl&&await C()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function T(){let _=new Date;return _.setMonth(_.getMonth()+6),_}e.options.expirationDate=T();function P(_){let I=_.getFullYear(),B=String(_.getMonth()+1).padStart(2,"0"),M=String(_.getDate()).padStart(2,"0");return`${I}-${B}-${M}`}e.minExpirationDate=P(new Date);let H=new Date;H.setFullYear(H.getFullYear()+1),e.maxExpirationDate=P(H),e.anonymize_readme="",e.readme="",e.html_readme="",e.isUpdate=!1;function q(_){t.get("/api/user/default").then(I=>{let B=I.data;B.terms&&(e.defaultTerms=B.terms.join(` +`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):T(),!r.repoId&&!r.pullRequestId&&!r.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),_&&_()})}function U(_,I,B){e.anonymize&&e.anonymize[_]&&e.anonymize[_].setValidity(I,B)}function ae(_){try{let I=parseGithubUrl(_);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 G()}catch{}}};function ie(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ae(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function C(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function O(){let _;try{_=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!_||_.path!==n.path()||Date.now()-_.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await C(),!0):!1;R.restore();for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,I)&&(e[I]=_.draft[I]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await C(),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 _=>{e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.fullName,e._originalFullName=_.data.source.fullName,e.terms=_.data.options.terms.filter(I=>I).join(` +`),e.source=_.data.source,e.role=_.data.role||"owner",e.coauthors=_.data.coauthors||[],e._originalBranch=_.data.source.branch,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,e.repositoryID=_.data.source.repositoryID,e._originalRepositoryID=_.data.source.repositoryID,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=w(parseGithubUrl(e.sourceUrl)),!await O()&&(await Promise.all([G(),J()]),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 _=>{if(e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.repositoryFullName+"/pull/"+_.data.source.pullRequestId,e.terms=_.data.options.terms.filter(I=>I).join(` +`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=w(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 _=>{e.sourceUrl="https://gist.github.com/"+_.data.source.gistId,e.terms=_.data.options.terms.filter(I=>I).join(` +`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),E=w(parseGithubUrl(e.sourceUrl)),!await O()&&await Ae()},()=>{n.url("/404")}))}),t.get("/github/connections").then(_=>{e.githubConnections=_.data,!r.repoId&&!r.pullRequestId&&!r.gistId&&e.githubConnection===void 0&&_.data.appEnabled&&_.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&C())}).catch(()=>{}),e.urlSelected=async(_=!1)=>{let I=++f,B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,oe.cancel(),_e.cancel(),Se.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",U("sourceUrl","github",!1);return}let M=w(B),g=_||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,!g&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],g||(e.source={type:"GitHubStream",branch:"",commit:""}),oe.cancel(),_e.cancel(),Se.cancel(),le.clear(),Ee.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=g;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Ae()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await pe()):(e.detectedType="repo",await Promise.all([G(),J()]),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 _=e.branches.filter(B=>B.name==e.source.branch)[0];if(!_)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=_.commit),e.readme=_.readme,await J(),ue()}),e.getBranches=async _=>{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:_===!0||e.reconnectingSource?"1":"0",repositoryID:ie()}});if(!k(B))return;e.branches=M.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let g=e.branches.filter(S=>S.name==e.source.branch);g.length>0&&(!(!e.reconnectingSource&&!_&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=g[0].commit),e.readme=g[0].readme,await J(_))}catch(M){if(!k(B))return;e.branches=[],e.sourceUnreachable=M&&(M.status===404||M.data&&M.data.error==="repo_not_found");let g=M&&M.data&&M.data.error||(M&&M.status===404?"repo_not_found":"unknown_error");i("ERRORS."+g).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{y(B)}};async function G(){let _=parseGithubUrl(e.sourceUrl),I=m();try{z();let B=await t.get(`/api/repo/${_.owner}/${_.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(!k(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(!k(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),te(B.data.error)),U("sourceUrl","missing",!1),B}finally{y(I)}}async function J(_){if(e.readme&&!_)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:_===!0?"1":"0",branch:e.source.branch,repositoryID:ie()}});k(B,!0)&&(e.readme=M.data)}catch{k(B,!0)&&(e.readme="")}finally{y(B)}}function ee(){let _={terms:e.terms?e.terms.split(` +`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(_.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);_.repoName=`${I.owner}/${I.repo}`}catch{}return _}function Q(_,I,B){let M=null,g=0,S=()=>{if(e.detectedType!==_)return;M&&a.cancel(M);let V=++g;e.previewStatus="loading",M=a(()=>{M=null;let F=I();if(!F){e.previewStatus="idle";return}t.post("/api/anonymize-preview",F).then(j=>{V===g&&(B(j.data,F),e.previewStatus="ready")}).catch(()=>{V===g&&(e.previewStatus="error")})},200)};return S.cancel=()=>{g++,M&&a.cancel(M),M=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&oe(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()};let oe=Q("repo",()=>e.readme?{content:e.readme,options:ee()}:null,_=>{if(typeof _?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=_.content;let I="";try{let M=parseGithubUrl(e.sourceUrl),g=e.source.branch||e.details&&e.details.defaultBranch||"main";I=`https://github.com/${M.owner}/${M.repo}/raw/${g}/`}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),oe())}async function pe(){let _=parseGithubUrl(e.sourceUrl),I=m();try{z();let B=await t.get(`/api/pr/${_.owner}/${_.repo}/${_.pullRequestId}`,{params:{connection:e.githubConnection}});if(!k(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=_.repo+"-PR"+_.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!k(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),te(B.data.error)),U("sourceUrl","missing",!1),B}finally{y(I)}}let le=He(new Map);function Ie(){let _=new Set,I=e.details&&e.details.pullRequest;if(!I)return _;typeof I.title=="string"&&_.add(I.title),typeof I.body=="string"&&_.add(I.body),typeof I.diff=="string"&&_.add(I.diff);let B=I.comments||[];for(let M of B)typeof M.author=="string"&&_.add(M.author),typeof M.body=="string"&&_.add(M.body);return _}let _e=Q("pr",()=>{let _=Ie(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(g=>typeof g!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let g=0;gle.set(S,g))});e.anonymizePrContent=function(_){return _&&(le.has(_)?le.get(_):"")};async function Ae(){let _=parseGithubUrl(e.sourceUrl),I=m();try{z(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${_.gistId}`);if(!k(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+_.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!k(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),te(B.data.error)),U("sourceUrl","missing",!1),B}finally{y(I)}}let Ee=He(new Map);function Ve(){let _=new Set,I=e.details&&e.details.gist;if(!I)return _;typeof I.description=="string"&&_.add(I.description),typeof I.ownerLogin=="string"&&_.add(I.ownerLogin);let B=I.files||[];for(let g of B)typeof g.filename=="string"&&_.add(g.filename),typeof g.content=="string"&&_.add(g.content);let M=I.comments||[];for(let g of M)typeof g.author=="string"&&_.add(g.author),typeof g.body=="string"&&_.add(g.body);return _}let Se=Q("gist",()=>{let _=Ve(),I=Array.from(_);return I.length===0?null:{contents:I,options:ee()}},(_,I)=>{if(!Array.isArray(_?.contents)||_.contents.length!==I.contents.length||_.contents.some(g=>typeof g!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let g=0;gEe.set(S,g)),$e()});e.anonymizeGistContent=function(_){return _&&(Ee.has(_)?Ee.get(_):"")},e.previewGistFiles=[];function $e(){let _=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=_.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 Ue(){let _=e.conference;if(e.conference_data=null,!_)return;let I=e.isUpdate&&_===e._originalConference;t.get("/api/conferences/"+_).then(B=>{e.conference===_&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===_&&(e.conference_data=null)})}function z(){U("repoId","used",!0),U("repoId","format",!0),U("pullRequestId","used",!0),U("pullRequestId","format",!0),U("gistId","used",!0),U("gistId","format",!0),U("sourceUrl","used",!0),U("sourceUrl","missing",!0),U("sourceUrl","access",!0),U("sourceUrl","github",!0),U("commit","exists",!0),U("conference","activated",!0),U("terms","format",!0),e.termsRegexWarning=!1}function ne(){let _=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||_&&_.invalid?(_&&_.setDirty&&_.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function te(_){let I=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(_){case"repoId_already_used":U(I,"used",!1);break;case"invalid_repoId":U(I,"format",!1);break;case"options_not_provided":U(I,"format",!1);break;case"repo_already_anonymized":U("sourceUrl","used",!1);break;case"invalid_terms_format":U("terms","format",!1);break;case"repo_not_found":U("sourceUrl","missing",!1);break;case"repo_not_accessible":U("sourceUrl","access",!1);break;case"commit_not_found":U("commit","exists",!1);break;case"conf_not_activated":U("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let _=(e.coauthorSearch||"").trim();if(e.coauthorError="",_.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:_}}).then(I=>{let B=new Set((e.coauthors||[]).map(M=>(M.username||"").toLowerCase()));e.coauthorResults=(I.data||[]).filter(M=>!B.has((M.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(_,I)=>{I&&I.preventDefault(),!(!_||!_.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:_.username}).then(B=>{e.coauthors=B.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},B=>{let M=B&&B.data&&B.data.error||"unknown_error";e.coauthorError=M})},e.removeCoauthor=_=>{!_||!_.username||confirm("Remove co-author "+_.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(_.username)).then(I=>{e.coauthors=I.data||[]},I=>{let B=I&&I.data&&I.data.error||"unknown_error";e.coauthorError=B})},e.anonymizeRepo=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId||ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),M={repoId:e.repoId,terms:e.terms.trim().split(` +`).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),z();let g=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(g,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizeGist=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.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};z();let g=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(g,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ne())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=_.currentTarget||_.target.closest?.("button")||_.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};z();let g=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(g,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),te(S.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Ue()}),e.watch("terms",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()}),e.watch("details",()=>{e.detectedType==="pr"&&_e(),e.detectedType==="gist"&&Se()},!0)},sr=function(e,t,s,r,n,i){let a=ct(),u=Jt();e.on("dark-mode",(O,G)=>{e.aceOption&&(G?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,h=!1;e.on("dispose",()=>{h=!0,f++,v&&v.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 G=document.querySelector(".tree-search-input");G&&(G.focus(),G.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let G=i.defer();v=G,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:G.promise}).then(function(J){if(!(h||v!==G)){v=null,e.fileSearchLoading=!1;var ee={};e.files.forEach(function(z){ee[(z.path||"")+"/"+z.name]=!0});for(var Q=[],oe={},ue=0;ue0&&e.files.push.apply(e.files,Q);for(var Ve=[],Se=0;Se0&&e.files.push.apply(e.files,Ve),e.fileSearchResults=J.data}},function(){!h&&v===G&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let k={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],y=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],E=["wav","mp3","ogg","wma","flac","aac","m4a"],w=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,G){if(e.repoId!=r.repoId)return C();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(J=>J&&J.trim().length>0),ie();for(let J=0;J0?e.paths.slice(0,J).join("/"):"";e.files.some(oe=>oe.path===ee)||e.getFiles(ee)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],G={};for(let ee of e.files)ee.name.toLowerCase().indexOf("readme")>-1&&(G[ee.name.toLowerCase()]=ee.name);let J=null;for(let ee of O)if(G[ee]){J=ee;break}if(!J&&Object.keys(G).length>0&&(J=Object.keys(G)[0]),J){let ee=s.url();ee[ee.length-1]!="/"&&(ee+="/"),s.url(ee+encodePathForUrl(G[J]))}}e.fileCounts=null,e.getFiles=function(O){let G=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(J){if(h||G!==e.repoId)return[];let ee=O||"";return e.files=e.files.filter(Q=>Q.path!==ee),e.files.push(...J.data),J.data},function(J){if(h||G!==e.repoId)return[];e.type="error",e.content=J&&J.data&&J.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(G){h||O!==e.repoId||(e.fileCounts=G.data)},function(){e.fileCounts={}})}function T(){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(h)return;let G=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(J=>{if(!(h||G!==e.repoId)){if(e.options=J.data,e.options.url){window.location=e.options.url;return}O&&O(J.data)}},J=>{if(!(h||G!==e.repoId)){var ee=J.data||{};if(ee.error==="rate_limited"&&ee.resetAt){let oe=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 Q=oe;e.type="rate_limited",e.rateLimitResetAt=ee.resetAt,P&&a.interval.cancel(P),oe(),P=a.interval(oe,1e3)}else ee.error==="repository_not_ready"?(e.type="loading",a.timeout(function(){H(O)},3e3)):(e.type="error",e.content=ee.error)}})}e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};function q(O){return k[O]?k[O]:O}function U(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":O=="md"?"md":O=="org"?"org":O=="ipynb"?"IPython":m.indexOf(O)>-1?"text":y.indexOf(O)>-1?"image":w.indexOf(O)>-1?"media":E.indexOf(O)>-1?"audio":"code"}function ae(O,G){let J=f;if(!O){e.type="error",e.content="no_file_selected";return}let ee=e.type;e.type="loading",e.content="loading";let Q=G&&G.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(O)}?v=`+Q,{transformResponse:oe=>oe}).then(oe=>{if(!(h||J!==f)){if(e.type=ee,e.content=oe.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(oe.data,s.url()+"/../"),e.type="html"),e.type=="org"){let pe=contentAbs2Relative(oe.data);var ue=new Org.Parser().parse(pe).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(ue.toString()),e.type="html"}e.type=="code"&&oe.headers("content-type")=="application/octet-stream"&&(e.type="binary",e.content="binary"),a.timeout(()=>{Prism.highlightAll()},50)}},oe=>{if(!(h||J!==f)){e.type="error",e.content="unknown_error";try{oe.data=JSON.parse(oe.data),oe.data.error?e.content=oe.data.error:e.content=oe.data}catch{console.log(oe),oe.status==-1?e.content="request_error":oe.status==502&&(e.content="unreachable")}}})}function ie(){f++,e.content="",e.file=T();let O="0";e.file&&e.file.sha&&(O=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${O}`;let G=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);e.fileBaseUrl=`/api/repo/${e.repoId}/file/${G?encodePathForUrl(G):""}`,e.showSource=!1,e.allowScripts=!1;let J=e.filePath.toLowerCase(),ee=J.lastIndexOf(".");if(ee>-1&&(J=J.substring(ee+1)),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:15,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!0,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:q(J),onLoad:function(Q){let oe=ace.require("ace/range").Range,ue=null;function pe(Ae,Ee){ue!==null&&(Q.session.removeMarker(ue),ue=null),Ae!=null&&(ue=Q.session.addMarker(new oe(Ae,0,Ee,1),"highlighted-line","fullLine"))}function le(Ae){let Ee=window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Ee){pe(null);return}let Ve=parseInt(Ee[1])-1,Se=Ee[2]?parseInt(Ee[2])-1:Ve;pe(Ve,Se),Ae&&a.timeout(()=>{Q.scrollToLine(Ve,!0,!0,function(){})},100)}le(!0);let Ie=null;Q.on("guttermousedown",function(Ae){let Ee=Ae.getDocumentPosition().row,Ve=Ae.domEvent&&Ae.domEvent.shiftKey,Se=Ee,$e=Ee;Ve&&Ie!==null?(Se=Math.min(Ie,Ee),$e=Math.max(Ie,Ee)):Ie=Ee;let Ue=Se===$e?`#L${Se+1}`:`#L${Se+1}-L${$e+1}`,z=window.location.pathname+window.location.search+Ue;window.history.replaceState(null,"",z),pe(Se,$e),Ae.stop()});let _e=u(window,"hashchange",()=>le(!1));return Q.setFontSize(e.aceOption.fontSize),Q.setReadOnly(e.aceOption.readOnly),Q.setKeyboardHandler(e.aceOption.keyBinding),Q.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),Q.setOption("displayIndentGuides",!0),Q.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(Q.renderer.$cursorLayer.element.style.display="none"),Q.setHighlightGutterLine(e.aceOption.highlightGutterLine),Q.setShowInvisibles(e.aceOption.showInvisibles),Q.setDisplayIndentGuides(e.aceOption.showIndentGuides),Q.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),Q.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),Q.session.setUseSoftTabs(e.aceOption.useSoftTab),Q.session.setTabSize(e.aceOption.tabSize),Q.setBehavioursEnabled(e.aceOption.enableBehaviours),Q.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets),_e}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=U(J),e.type=="pdf"){e.content="pdf";return}ae(e.filePath,e.file)}function C(){f++,e.files=[],e.content=null,e.fileCounts=null,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=r.repoId,e.type="loading",e.filePath=r.path||"",e.paths=e.filePath.split("/");let O=e.repoId;H(function(G){D();var J=i.resolve();for(let ee=0;ee0?e.paths.slice(0,ee).join("/"):"";J=J.then(function(){return e.getFiles(Q)}).then(function(){if(e.type==="error")return i.reject("error")})}J.then(function(){h||O!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(R(),ie()))})})}C()},Wa=function(e,t,s,r,n){async function i(f){t.get(`/api/pr/${e.pullRequestId}/options`).then(h=>{if(e.options=h.data,e.options.url){window.location=e.options.url;return}f&&f(h.data)},h=>{e.type="error",e.content=h.data.error})}async function a(f){t.get(`/api/pr/${e.pullRequestId}/content`).then(h=>{e.details=h.data,e.tabState={active:h.data.diff?"diff":"comments"},f&&f(h.data)},h=>{e.type="error",e.content=h.data.error})}function u(){e.pullRequestId=r.pullRequestId,e.type="loading",i(f=>{a()})}u()},Ka=function(e,t,s,r,n){async function i(f){t.get(`/api/gist/${e.gistId}/options`).then(h=>{if(e.options=h.data,e.options.url){window.location=e.options.url;return}f&&f(h.data)},h=>{e.type="error",e.content=h.data.error})}async function a(f){t.get(`/api/gist/${e.gistId}/content`).then(h=>{e.details=h.data;let v=h.data&&h.data.files&&h.data.files.length;e.tabState={active:v?"files":"comments"},f&&f(h.data)},h=>{e.type="error",e.content=h.data.error})}function u(){e.gistId=r.gistId,e.type="loading",i(()=>{a()})}u()},Ya=function(e,t,s){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let r="conferences.filterPrefs",n={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},i=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},n.filters.status,i.filters&&i.filters.status||{})},e.orderBy=i.orderBy||n.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(a){if(!a.removing&&confirm(`Are you sure that you want to remove the conference ${a.name}? All the repositories linked to this conference will expire.`)){a.removing=!0;let u=He({title:`Removing ${a.name}...`,date:new Date,body:`The conference ${a.name} is going to be removed.`});e.addToast(u),t.delete(`/api/conferences/${a.conferenceID}`).then(()=>{u.title=`${a.name} is removed.`,u.body=`The conference ${a.name} is removed.`,e.loadConferences()}).catch(()=>{u.title="Unable to remove conference",u.body="Please try again. The conference has not been removed."}).finally(()=>{a.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(a=>{e.conferences=a.data||[]},a=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=a=>{if(e.filters.status[a.status]==!1)return!1;let u=e.search.trim().toLowerCase();return!!(!u||(a.name||"").toLowerCase().includes(u)||(a.conferenceID||"").toLowerCase().includes(u))}},nr=function(e,t,s,r){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.plans=[],e.editionMode=!1,e.saving=!1,e.error="";function n(){t.get("/api/conferences/"+r.conferenceId).then(v=>{e.options={...e.options,...v.data,billing:v.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}r.conferenceId&&(e.editionMode=!0,n());function i(){t.get("/api/conferences/plans").then(v=>{e.plans=v.data,e.plan=e.plans.filter(k=>k.id==e.options.plan.planID)[0]})}i();let a=new Date;a.setDate(1),a.setMonth(a.getMonth()+1);let u=new Date(a);u.setMonth(a.getMonth()+7,0),e.options={billing:{},startDate:a,endDate:u,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(v=>v.id==e.options.plan.planID)[0]});function f(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function h(v){switch(v){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let v=JSON.parse(JSON.stringify(e.options)),k=He({title:`Creating ${v.name}...`,date:new Date,body:`The conference ${v.conferenceID} is in creation.`});e.editionMode&&(k.title=`Updating ${v.name}...`,k.body=`The conference '${v.conferenceID}' is updating.`),e.addToast(k),f(),t.post("/api/conferences/"+(e.editionMode?v.conferenceID:""),v).then(()=>{e.editionMode?(k.title=`${v.name} updated`,k.body=`The conference '${v.conferenceID}' is updated.`):(k.title=`${v.name} created`,k.body=`The conference '${v.conferenceID}' is created.`),s.url("/conference/"+v.conferenceID)},m=>{h(m.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(k)}).finally(()=>{e.saving=!1})}},Ja=function(e,t,s,r){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,expired:!1,removed:!1}},e.orderBy="-anonymizeDate",e.repoFiler=i=>{if(e.filters.status[i.status]==!1)return!1;let a=e.search.trim().toLowerCase();return!!(!a||(i.source?.fullName||"").toLowerCase().includes(a)||(i.repoId||"").toLowerCase().includes(a))};function n(){t.get("/api/conferences/"+r.conferenceId).then(i=>{e.conference=i.data})}n()},Qa=function(e,t){e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(s=>{e.connections=s.data}).catch(s=>{e.connectionError=s.data?.error||"Unable to load connections."}),e.changeConnection=async(s,r,n)=>{e.busy=!0,e.connectionError="";try{let i=await t.post("/github/connections/migrate",{type:s.type,id:s.id,connection:r,preview:n},{headers:{"X-CSRF-Token":e.connections.csrf}});n?s.eligible=i.data.eligible:await e.loadConnections()}catch(i){e.connectionError=i.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(s){e.connectionError=s.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},Xa=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(s=>{e.accountRecovery=s.data.required}).catch(()=>{})};var Za=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.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let i=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.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.owner&&E.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&E.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=E};e.showStatusMessage=E=>{let w=E.statusMessage||"(no message)";window.prompt(`Status message for ${E.repoId} (${E.status}):`,w)},e.fetchGithubInfo=E=>{let w=window.open("","_blank");w&&w.document.write("
Loading GitHub info for "+E.repoId+"...
"),t.get("/api/admin/repos/"+E.repoId+"/github").then(R=>{w&&(w.document.open(),w.document.write('
'+JSON.stringify(R.data,null,2).replace(/[<>]/g,D=>D==="<"?"<":">")+"
"),w.document.close())},R=>{let D=R&&R.data?JSON.stringify(R.data,null,2):String(R);w&&(w.document.body.innerHTML='
'+D+"
")})},e.statusCountFor=E=>{let w=(e.statusCounts||[]).find(R=>R._id===E);return w?w.count:0},e.statusStorageFor=E=>{let w=(e.statusCounts||[]).find(R=>R._id===E);return w?w.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=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.repos.filterPrefs",f={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},f,h,{page:1,search:""});let v=s.search();v.owner&&(e.query.owner=v.owner),v.conference&&(e.query.conference=v.conference),v.search&&(e.query.search=v.search);let k="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(k)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let w=Object.assign({},e.query);delete w.page,e.presets=(e.presets||[]).filter(R=>R.name!==E),e.presets.push({name:E,query:w}),localStorage.setItem(k,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(w=>w.name!==E.name),localStorage.setItem(k,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(E=>{e.selected[E.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(E=>e.selected[E.repoId]),e.bulkRefresh=()=>{let E=e.selectedRepos();E.length&&confirm(`Force refresh ${E.length} repositories?`)&&E.forEach(w=>e.updateRepository(w))},e.bulkRemoveCache=()=>{let E=e.selectedRepos();E.length&&confirm(`Purge cache for ${E.length} repositories?`)&&E.forEach(w=>e.removeCache(w))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,w])=>w!==""&&w!==!1&&w!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/repos?"+E.toString(),"_blank")},e.removeCache=E=>{confirm("Remove cached files for "+E.repoId+"?")&&t.delete("/api/admin/repos/"+E.repoId).then(()=>m(),w=>console.error(w))},e.removeRepository=E=>{confirm("Remove repository "+E.repoId+"?")&&t.delete("/api/repo/"+E.repoId+"/").then(()=>m(),w=>console.error(w))},e.updateRepository=E=>{let w=He({title:`Refreshing ${E.repoId}...`,date:new Date,body:`The repository ${E.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${E.repoId}/refresh`).then(R=>{R.data.status=="ready"?w.title=`${E.repoId} is refreshed.`:w.title=`Refreshing of ${E.repoId}.`},R=>{w.title=`Error during the refresh of ${E.repoId}.`,w.body=R.body})},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.repositories=E.data.results,e.statusCounts=E.data.statusCounts||[],e.totalSize=E.data.totalSize||0,e.allSelected=!1},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load repositories",console.error(E)})}m();let y=null;e.watch("query",()=>{r.timeout.cancel(y),y=r.timeout(m,500);let{page:E,search:w,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},xa=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.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let i=m=>{if(m.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){m.preventDefault();let y=document.querySelector('.admin-filter-toolbar input[type="search"]');y&&y.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=m=>{m==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[m]="",e.query.page=1},e.chips=[];let a=()=>{let m=[];e.query.role&&m.push({key:"role",label:"Role",value:e.query.role}),e.chips=m};e.statusCountFor=m=>{let y=(e.statusCounts||[]).find(E=>E._id===m);return y?y.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.query.page=1},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.users.filterPrefs",f={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},h=loadFilterPrefs(u)||{};e.query=Object.assign({},f,h,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(m=>{e.selected[m.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(m=>e.selected[m.username]),e.banUser=m=>{confirm(`Ban user ${m.username}?`)&&t.post(`/api/admin/users/${m.username}/ban`).then(v,y=>console.error(y))},e.activateUser=m=>{t.post(`/api/admin/users/${m.username}/activate`).then(v,y=>console.error(y))},e.bulkBan=()=>{let m=e.selectedUsers();m.length&&confirm(`Ban ${m.length} users?`)&&m.forEach(y=>e.banUser(y))},e.exportCsv=()=>{let m=new URLSearchParams(Object.entries(e.query).filter(([,y])=>y!==""&&y!==!1&&y!=null));m.set("format","csv"),m.set("limit","10000"),window.open("/api/admin/users?"+m.toString(),"_blank")},e.fetchError=null;function v(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(m=>{e.total=m.data.total,e.totalPage=Math.ceil(m.data.total/e.query.limit),e.users=m.data.results,e.statusCounts=m.data.statusCounts||[],e.allSelected=!1},m=>{e.fetchError=m&&m.data&&m.data.error||"Failed to load users",console.error(m)})}v();let k=null;e.watch("query",()=>{r.timeout.cancel(k),k=r.timeout(v,500);let{page:m,search:y,...E}=e.query;saveFilterPrefs(u,E),a()},!0),a()},el=function(e,t,s,r){let n=ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let i="admin.user.filterPrefs",a={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},u=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},a.filters.status,u.filters&&u.filters.status||{})},e.query={sort:u.sort||a.sort,direction:u.direction||a.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=m=>{e.query.sort===m?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=m,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=m=>e.query.sort===m?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=m=>(e.repositories||[]).filter(y=>y.status===m).length,e.repoFiler=m=>e.filters.status[m.status]==!1?!1:!!(e.search.trim().length==0||m.source.fullName.indexOf(e.search)>-1||m.repoId.indexOf(e.search)>-1||m.statusMessage&&m.statusMessage.indexOf(e.search)>-1||m.conference&&m.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(m=>{e.selected[m.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(m=>e.selected[m.repoId]),e.bulkRefresh=()=>{let m=e.selectedRepos();m.length&&confirm(`Force refresh ${m.length} repositories?`)&&m.forEach(y=>e.updateRepository(y))},e.bulkRemoveCache=()=>{let m=e.selectedRepos();m.length&&confirm(`Purge cache for ${m.length} repositories?`)&&m.forEach(y=>e.removeCache(y))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let m=e.filteredRepositories||e.repositories,E=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),w=m.map(T=>[T.repoId,T.status,T.statusMessage||"",T.pageView||0,T.anonymizeDate||"",T.source&&T.source.fullName||"",T.conference||"",T.size&&T.size.storage||0].map(P=>{let H=String(P??"");return/[",\n\r]/.test(H)?'"'+H.replace(/"/g,'""')+'"':H}).join(",")),R=new Blob([E+` +`+w.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 y=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,y)},e.fetchGithubInfo=m=>{let y=window.open("","_blank");y&&y.document.write("
Loading GitHub info for "+m.repoId+"...
"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{y&&(y.document.open(),y.document.write('
'+JSON.stringify(E.data,null,2).replace(/[<>]/g,w=>w==="<"?"<":">")+"
"),y.document.close())},E=>{let w=E&&E.data?JSON.stringify(E.data,null,2):String(E);y&&(y.document.body.innerHTML='
'+w+"
")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(y=>{e.repositories=y.data},y=>{console.error(y)})}function h(m){t.get("/api/admin/users/"+m,{}).then(y=>{e.userInfo=y.data},y=>{console.error(y)})}h(r.username),f(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}v(),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="",v()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>v(),y=>console.error(y))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(r.username),y=>console.error(y))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(r.username),y=>console.error(y))},e.updateRepository=m=>{let y=He({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(y),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?y.title=`${m.repoId} is refreshed.`:y.title=`Refreshing of ${m.repoId}.`},E=>{y.title=`Error during the refresh of ${m.repoId}.`,y.body=E.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(y=>{e.userInfo.repositories=y.data})};let k=null;e.watch("query",()=>{n.timeout.cancel(k),k=n.timeout(()=>{f(r.username)},500)},!0)},tl=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 w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.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 w=(e.statusCounts||[]).find(R=>R._id===E);return w?w.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},h=loadFilterPrefs(u)||{};e.query=Object.assign({},f,h,{page:1,search:""});let v=s.search();v.search&&(e.query.search=v.search);let k="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(k)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let w=Object.assign({},e.query);delete w.page,e.presets=(e.presets||[]).filter(R=>R.name!==E),e.presets.push({name:E,query:w}),localStorage.setItem(k,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(w=>w.name!==E.name),localStorage.setItem(k,JSON.stringify(e.presets))},e.removeConference=E=>{confirm("Remove conference "+E.conferenceID+"?")&&t.delete("/api/admin/conferences/"+E.conferenceID).then(()=>m(),w=>console.error(w))},e.exportCsv=()=>{let E=new URLSearchParams(Object.entries(e.query).filter(([,w])=>w!==""&&w!==!1&&w!=null));E.set("format","csv"),E.set("limit","10000"),window.open("/api/admin/conferences?"+E.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(E=>{e.total=E.data.total,e.totalPage=Math.ceil(E.data.total/e.query.limit),e.conferences=E.data.results,e.statusCounts=E.data.statusCounts||[]},E=>{e.fetchError=E&&E.data&&E.data.error||"Failed to load conferences",console.error(E)})}m();let y=null;e.watch("query",()=>{r.timeout.cancel(y),y=r.timeout(m,500);let{page:E,search:w,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},ol=function(e,t,s,r,n){let i=ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(w=>e.stateFilter[w._state]),e.jobProgressPct=w=>w&&w.progress&&typeof w.progress=="object"&&typeof w.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(w.progress.percent))):typeof w.progress=="number"?Math.max(0,Math.min(100,Math.round(w.progress))):null,e.jobDuration=w=>{if(!w.processedOn)return"-";let D=(w.finishedOn||Date.now())-w.processedOn;return D<1e3?D+"ms":(D/1e3).toFixed(1)+"s"},e.metricsPoints=[],e.selectQueue=w=>{e.selectedQueue=w,a(),u()},e.setRange=w=>{e.range=w,u()};function a(){let w={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:w}).then(R=>{e.queueList=R.data.queues||[],e.jobs=R.data.jobs||[],e.selectedStats=e.queueList.find(D=>D.key===e.selectedQueue)||e.queueList[0]||null},R=>console.error(R))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(w=>{e.metricsPoints=w.data.points||[],n(m,0)},w=>console.error(w))}a(),u();let f=r(()=>{e.query.autoRefresh&&(a(),u())},15e3);e.on("dispose",()=>r.cancel(f)),e.refreshNow=function(){a(),u()};function h(w){let R=w&&w.data&&(w.data.message||w.data.error)||"Request failed";e.actionError=R,n(()=>{e.actionError=null},5e3),console.error(w)}e.actionError=null,e.removeJob=w=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${w.id}`).then(a,h)},e.retryJob=w=>{t.post(`/api/admin/queue/${e.selectedQueue}/${w.id}`).then(a,h)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(a,w=>console.error(w))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(a,w=>console.error(w))},e.togglePause=()=>{let w=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${w}`).then(a,R=>console.error(R))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(a,w=>console.error(w))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(a,w=>console.error(w))};let v=null;e.watch("query.search",()=>{i.timeout.cancel(v),v=i.timeout(a,350)}),e.expanded={},e.toggleJob=w=>{e.expanded[w.id]=!e.expanded[w.id]},e.humanTime=w=>{if(!w)return"";let R=new Date(w);return R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+R.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=w=>{if(!w)return"";var R=Math.max(0,Math.ceil((w-Date.now())/1e3));if(R<=0)return"resuming soon";var D=Math.floor(R/60),T=R%60;return"in "+(D>0?D+"m "+T+"s":T+"s")};function k(w){if(w<=0)return{ticks:[0],niceMax:1};let R=Math.pow(10,Math.floor(Math.log10(w))),D=R;w/D<2?D=R/2:w/D>5&&(D=R*2);let T=Math.ceil(w/D)*D,P=[];for(let H=0;H<=T;H+=D)P.push(H);return{ticks:P,niceMax:T}}function m(){var w=document.getElementById("q-throughput-chart");if(!w)return;var R=w.getContext("2d"),D=window.devicePixelRatio||1,T=w.parentElement.getBoundingClientRect(),P=44,H=50,q=20,U=T.width-40,ae=180,ie=U-P-H,C=ae-q;w.width=U*D,w.height=ae*D,w.style.width=U+"px",w.style.height=ae+"px",R.setTransform(D,0,0,D,0,0);var O=document.body.classList.contains("dark-mode"),G="#8A857C",J=O?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",ee=O?"#A7B2FF":"#3B4AD6",Q=O?"rgba(167,178,255,0.12)":"rgba(59,74,214,0.08)",oe=O?"#F08A82":"#B42318",ue=O?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",pe=O?"#F5C842":"#B8860B",le=e.metricsPoints||[];if(le.length===0){R.fillStyle=G,R.font="12px monospace",R.textAlign="center",R.fillText("No metrics data yet",U/2,ae/2),y=null;return}var Ie=le.map(function(L){return L.completed}),_e=le.map(function(L){return L.failed}),Ae=le.map(function(L){return L.avgMs}),Ee=le.length,Ve=ie/(Ee-1||1),Se=Math.max(1,Math.max.apply(null,Ie),Math.max.apply(null,_e)),$e=k(Se),Ue=Math.max.apply(null,Ae),z=Ue>0?k(Ue):{ticks:[0],niceMax:1},ne=function(L){return C-L/$e.niceMax*(C-10)},te=function(L){return C-L/z.niceMax*(C-10)},_=function(L){return P+L*Ve};R.textAlign="right",R.textBaseline="middle",R.font="10px monospace",$e.ticks.forEach(function(L){var W=ne(L);R.strokeStyle=J,R.lineWidth=1,R.beginPath(),R.moveTo(P,W),R.lineTo(U-H,W),R.stroke(),R.fillStyle=G,R.fillText(L>=1e3?(L/1e3).toFixed(1)+"k":String(L),P-6,W)}),Ue>0&&(R.textAlign="left",z.ticks.forEach(function(L){var W=te(L);R.fillStyle=pe,R.fillText(L>=1e3?(L/1e3).toFixed(1)+"s":L+"ms",U-H+6,W)}));var I=Date.now(),B=Math.min(6,Ee);R.textAlign="center",R.textBaseline="top";for(var M=0;M0&&(R.beginPath(),Ae.forEach(function(L,W){var x=_(W),Z=te(L);if(W===0)R.moveTo(x,Z);else{var K=(_(W-1)+x)/2;R.bezierCurveTo(K,te(Ae[W-1]),K,Z,x,Z)}}),R.strokeStyle=pe,R.lineWidth=1,R.setLineDash([4,3]),R.stroke(),R.setLineDash([])),y={pts:le,maxLen:Ee,marginLeft:P,step:Ve,totalW:U,toX:_}}var y=null;function E(){var w=document.getElementById("q-throughput-chart");if(!(!w||w._tipBound)){w._tipBound=!0;var R=document.getElementById("q-chart-tooltip"),D=document.getElementById("q-chart-crosshair");w.addEventListener("mousemove",function(T){if(!(!y||!R||!D)){var P=y,H=w.getBoundingClientRect(),q=T.clientX-H.left,U=Math.round((q-P.marginLeft)/P.step);if(U<0||U>=P.maxLen){R.style.display="none",D.style.display="none";return}var ae=P.pts[U],ie=Date.now(),C=Math.round((ie-ae.ts)/6e4),O;if(C<=0)O="now";else if(C<60)O=C+"m ago";else if(C<1440){var G=Math.floor(C/60),J=C%60;O=G+"h"+(J?" "+J+"m":"")+" ago"}else O=Math.round(C/1440)+"d ago";var ee='
'+O+'
● completed: '+ae.completed+'/min
● failed: '+ae.failed+"/min
";if(ae.avgMs>0){var Q=ae.avgMs>=1e3?(ae.avgMs/1e3).toFixed(1)+"s":ae.avgMs+"ms";ee+='
● avg time: '+Q+"
"}R.innerHTML=ee;var oe=P.toX(U),ue=R.offsetWidth,pe=oe+10;pe+ue>P.totalW&&(pe=oe-ue-10),R.style.display="block",R.style.left=pe+"px",R.style.top="8px",D.style.display="block",D.style.left=oe+"px"}}),w.addEventListener("mouseleave",function(){R&&(R.style.display="none"),D&&(D.style.display="none")})}}e.watch("metricsPoints",function(){n(E,50)})},sl=function(e,t,s,r){let n=ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.entries=[],e.visible=[],e.available=!0,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=D=>{if(!D)return"";let T=new Date(D).getTime();if(isNaN(T))return D;let P=Math.max(0,Date.now()-T),H=Math.floor(P/1e3);if(H<5)return"just now";if(H<60)return`${H}s ago`;let q=Math.floor(H/60);if(q<60)return`${q}m ago`;let U=Math.floor(q/60);if(U<24)return`${U}h ago`;let ae=Math.floor(U/24);return ae<7?`${ae}d ago`:new Date(D).toLocaleDateString()},e.absTime=D=>{if(!D)return"";let T=new Date(D);return isNaN(T.getTime())?D:T.toLocaleString()},e.absTimeShort=D=>{if(!D)return"";let T=new Date(D);return isNaN(T.getTime())?D:T.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let i=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function a(D,T){let P=D&&(D.httpStatus||D.status)||null;if(typeof P=="number"){if(P>=500)return"error";if(P===401||P===403||P===404)return"info";if(P>=400)return"warn"}return T==="error"?"error":T==="warn"?"warn":"info"}function u(D){let T=(D.raw||[]).find(U=>U&&typeof U=="object"&&!Array.isArray(U));if(T){T.message&&i.test(T.message)?(D.displayMessage=T.message,D.displayContext=D.message):T.code&&i.test(String(T.code))?(D.displayMessage=String(T.code),D.displayContext=D.message):T.name&&T.name!=="AnonymousError"&&T.name!=="Error"?(D.displayMessage=T.name,D.displayContext=T.message||D.message):D.displayMessage=D.message,D._status=T.httpStatus||T.status||null,D._url=T.url||null,D._method=T.method||null,D._repoId=T.repoId||T.detail||null,D._detail=T.detail&&T.detail!==D._repoId?T.detail:null;let U=typeof T.stack=="string"?T.stack:null;for(var P=[T.cause,T.err].filter(Boolean),H=0;!U&&H{C==null||C===""||P.push([ie,C])};H("name",T&&T.name),H("code",D.displayMessage||T&&T.message),D._bucket&&H("kind",D._bucket),H("httpStatus",T&&T.httpStatus),T&&T.status&&!T.httpStatus&&H("status",T.status),H("module",D.module);let q=T&&T.detail;if(typeof q=="string"){let ie=q.trim();if(ie[0]==="{"||ie[0]==="[")try{q=JSON.parse(q)}catch{}}if(H("detail",q),H("repoId",T&&T.repoId),H("filePath",T&&T.filePath),H("upstreamStatus",T&&T.upstreamStatus),H("upstreamBody",T&&T.upstreamBody),H("url",D._url),H("err",T&&T.err),H("cause",T&&!T.err&&T.cause),H("ts",D.ts),!P.length)return JSON.stringify(D,null,2);let U=P.reduce((ie,C)=>Math.max(ie,C[0].length),0),ae=["{"];return P.forEach(([ie,C],O)=>{let J=` ${`"${ie}":`.padEnd(U+3," ")} `,ee=Ope===0?ue:oe+ue).join(` -`)}else typeof C=="number"||typeof C=="boolean"?Q=String(C):Q=JSON.stringify(C);ie.push(`${J}${Q}${ee}`)}),ie.push("}"),ie.join(` -`)}function m(D){let T=[],P="",H=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,U;for(;U=H.exec(D);)P+=D.slice(q,U.index),q=H.lastIndex,T.push({key:U[1],op:U[2]||"=",val:U[3]});return P+=D.slice(q),{filters:T,free:P.trim().toLowerCase()}}function g(D,T){for(let P of T.filters){let H=(U,ie,re)=>{let C=parseFloat(U),O=parseFloat(ie);return re==="="?String(U)===String(ie):re==="!="?String(U)!==String(ie):re===">="?C>=O:re==="<="?C<=O:re===">"?C>O:re==="<"?CT&&q._bucket!==T?!1:g(q,D)),H=e.query.group;if(H){let q=re=>H==="module"?re.module:re.displayMessage||re.message||"_",U=new Map;for(let re of P){let C=q(re);if(U.has(C)){let O=U.get(C);O.count++,O._related.push(re),new Date(re.ts)>new Date(O.ts)&&(O.ts=re.ts,O._url=re._url,O._status=re._status),new Date(re.ts)new Date(C.ts).getTime()>=ie).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 h(D){let T=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:T,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=()=>h(!0),e.canLoadMore=()=>e.entries.length{let T=D.data||{},P=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:P,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function E(){h(),b()}e.barPx=(D,T)=>{let P=e.stats.buckets||[],H=0;for(let re of P)H=Math.max(H,(re.error||0)+(re.warn||0)+(re.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),ie=D[T]||0;return Math.round(ie/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"],T=[D.join(",")];for(let U of e.visible)T.push(D.map(ie=>{let re=U[ie]==null?"":String(U[ie]);return/[",\n]/.test(re)?`"${re.replace(/"/g,'""')}"`:re}).join(","));let P=new Blob([T.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`,s.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)},el=function(e,t,n,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&n.url("/")}),e.user==null){n.url("/");return}e.data=null,e.loading=!0,e.error=null;function s(h){if(h==null)return"\u2014";for(var b=["B","KB","MB","GB","TB"],E=0,k=h;k>=1024&&E0?1:0)+" "+b[E]}e.humanBytes=s;function i(h){if(!h)return"\u2014";var b=Math.floor(h/86400),E=Math.floor(h%86400/3600),k=Math.floor(h%3600/60);return b>0?b+"d "+(E<10?"0":"")+E+"h":E>0?E+"h "+(k<10?"0":"")+k+"m":k+"m"}e.humanDuration=i;function a(h){return h==null?"\u2014":h>=1e6?(h/1e6).toFixed(1)+"M":h>=1e3?(h/1e3).toFixed(1)+"K":String(h)}e.humanNum=a,e.queueTotal=function(h){return h?(h.waiting||0)+(h.active||0)+(h.delayed||0)+(h.failed||0):0},e.statusCount=function(h){if(!e.data||!e.data.repos)return 0;for(var b=e.data.repos.statusBreakdown||[],E=0;Em[E])&&(m[E]=b[E])})})},function(h){e.loading=!1,e.error=h.data&&h.data.error||"Failed to load overview"})}g();var w=r(g,3e4);e.on("dispose",function(){r.cancel(w)})};var tl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wa(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ka(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ua(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fa(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>en(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>en(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>en(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>za(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ba(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>or(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>or(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ga(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ma(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>$a(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>La(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ha(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ja(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>tr(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>tr(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ja(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Qa(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Xa(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Za(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var sp={class:"container paper-page connections-page"},np={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},rp={key:1,role:"status"},ip=["disabled"],ap={key:3},lp={class:"connections-grid"},dp={key:0},up={class:"connection-title"},cp={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},pp={class:"connection-actions"},fp={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},hp={key:1,class:"connection-installations"},mp={key:0},vp=["href"],gp={class:"sr-only"},yp=["disabled"],bp={class:"connection-title"},wp={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},kp={key:1,class:"connection-revoke"},Ep={key:0},Cp=["disabled"],_p={class:"connection-resources"},Sp={class:"connection-title"},Np={class:"connection-count"},Dp={key:0,class:"connection-empty"},Rp={class:"connection-resource-name"},Tp={key:0,class:"connection-resource-actions"},Ap=["disabled","onClick"],Op=["disabled","onClick"],Ip={key:1,class:"connection-help",role:"status"},Pp=["disabled","onClick"];function ol(e,t){return l(),d("div",sp,[t[20]||(t[20]=ce('
My work / GitHub connections

GitHub connections

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

',2)),e.connectionError?(l(),d("p",np,c(e.connectionError),1)):p("v-if",!0),!e.connections&&!e.connectionError?(l(),d("p",rp,"Loading your connections\u2026")):p("v-if",!0),!e.connections&&e.connectionError?(l(),d("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=n=>e.loadConnections())},"Try again",8,ip)):p("v-if",!0),e.connections?(l(),d("div",ap,[o("div",lp,[e.connections.appEnabled?(l(),d("section",dp,[t[8]||(t[8]=o("div",{class:"connection-top"},[o("i",{class:"fab fa-github","aria-hidden":"true"}),o("span",{class:"connection-badge"},"Recommended")],-1)),o("div",up,[t[3]||(t[3]=o("h2",null,"GitHub App",-1)),o("span",{class:A(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},c(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[9]||(t[9]=o("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(l(),d("p",cp,c(e.connections.appError)+". Reconnect to restore access.",1)):p("v-if",!0),o("div",pp,[e.connections.appConnected&&!e.connections.appError?(l(),d("a",fp,[...t[4]||(t[4]=[y("Manage repository access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),o("a",{class:A(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},c(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3)]),t[10]||(t[10]=o("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(l(),d("ul",hp,[(l(!0),d(X,null,ae(e.connections.installations,n=>(l(),d("li",{key:n.id},[o("div",null,[o("strong",null,c(n.account),1),n.suspended?(l(),d("span",mp," \xB7 Suspended")):p("v-if",!0)]),o("a",{target:"_self",href:"/github/app/install?installationId="+n.id},[t[5]||(t[5]=y("Manage access ",-1)),o("span",gp,"for "+c(n.account),1),t[6]||(t[6]=y(" \u2192",-1))],8,vp)]))),128))])):p("v-if",!0),o("button",{class:"connection-link",disabled:e.busy,onClick:t[1]||(t[1]=n=>e.loadConnections())},[...t[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Refresh access",-1)])],8,yp)])):p("v-if",!0),o("section",null,[t[13]||(t[13]=o("div",{class:"connection-top"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-key"})]),o("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),o("div",bp,[t[11]||(t[11]=o("h2",null,"GitHub OAuth",-1)),o("span",{class:A(["connection-status",{"is-connected":e.connections.oauthConnected}])},c(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[14]||(t[14]=o("p",null,"For existing OAuth anonymizations.",-1)),t[15]||(t[15]=o("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(l(),d("a",wp,c(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):p("v-if",!0),e.connections.oauthConnected?(l(),d("div",kp,[e.connections.gistCount?(l(),d("p",Ep,c(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):p("v-if",!0),t[12]||(t[12]=o("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(l(),d("button",{key:1,class:"connection-link connection-danger",disabled:e.busy||e.connections.resources.some(n=>n.connection==="oauth"),onClick:t[2]||(t[2]=n=>e.disconnectOAuth())},"Revoke OAuth access",8,Cp)):p("v-if",!0)])):p("v-if",!0)])]),o("section",_p,[o("div",Sp,[t[16]||(t[16]=o("h2",null,"Repository connections",-1)),o("span",Np,c(e.connections.resources?.length||0)+" resources",1)]),t[18]||(t[18]=o("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?p("v-if",!0):(l(),d("div",Dp,[...t[17]||(t[17]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),o("div",null,[o("h3",null,"No repository connections yet"),o("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),o("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(l(!0),d(X,null,ae(e.connections.resources,n=>(l(),d("div",{class:"connection-resource",key:n.type+n.id},[o("div",Rp,[o("strong",null,c(n.name||n.id),1),o("small",null,c(n.type)+" \xB7 "+c(n.id),1)]),o("span",{class:A(["connection-badge",{"connection-badge-muted":n.connection==="oauth"}])},c(n.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(n.status)&&(n.status!=="download"||n.type==="pull-request"&&(!n.statusDate||new Date(n.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(l(),d("div",Tp,[o("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:r=>e.changeConnection(n,"github-app",!0)},"Check read-only access",8,Ap),n.eligible?(l(),d("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:r=>e.changeConnection(n,"github-app",!1)},c(n.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,Op)):p("v-if",!0),n.eligible===!1?(l(),d("span",Ip,"Access unavailable. Allow this repository on GitHub, then check again.")):p("v-if",!0)])):p("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(n.status)&&(n.status!=="download"||n.type==="pull-request"&&(!n.statusDate||new Date(n.statusDate).getTime()<=Date.now()-3e5))&&n.connection==="github-app"&&e.connections.oauthConnected?(l(),d("button",{key:1,class:"connection-link",disabled:e.busy,onClick:r=>e.changeConnection(n,"oauth",!1)},"Use OAuth",8,Pp)):p("v-if",!0)]))),128)),t[19]||(t[19]=o("p",{class:"connection-footnote"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),y(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):p("v-if",!0)])}var Vp={class:"container paper-page auth-page"},qp={class:"auth-layout"},Mp={class:"auth-options"},$p={key:0},Lp={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},Up={key:1},Fp={key:1},zp={key:2,class:"auth-legacy"},Hp={key:3,role:"status"};function sl(e,t){return l(),d("div",Vp,[t[5]||(t[5]=o("a",{class:"auth-back",href:"/"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-arrow-left"})]),y(" Anonymous GitHub")],-1)),o("div",qp,[t[4]||(t[4]=ce('
Your research, ready for review

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

Sign in to create and manage your anonymizations.

',1)),o("div",Mp,[e.accountRecovery?(l(),d("section",$p,[t[0]||(t[0]=o("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=o("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(l(),d("a",Lp,"Verify with previous GitHub connection")):(l(),d("p",Up,"Account verification is currently unavailable. Please try again later."))])):p("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(l(),d("section",Fp,[...t[2]||(t[2]=[ce('
Read-only access

Continue with GitHub

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

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHub Your existing anonymizations and connections stay with your account.',6)])])):p("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(l(),d("section",zp,[...t[3]||(t[3]=[o("div",{class:"connection-title"},[o("h2",null,"Continue with GitHub")],-1),o("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),o("a",{class:"connection-link",target:"_self",href:"/github/login"},[y("Sign in with GitHub "),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-arrow-right"})])],-1)])])):p("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(l(),d("p",Hp,"GitHub sign-in is currently unavailable. Please try again later.")):p("v-if",!0)])])])}var jp={class:"paper-empty"};function nl(e,t){return l(),d("div",jp,[...t[0]||(t[0]=[ce('
Error \xB7 404

This link
isn\u2019t here.

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

',1)])])}var Bp={class:"container paper-page admin-page"},Gp={class:"admin-summary"},Wp={class:"summary-total"},Kp=["aria-pressed"],Yp={class:"count"},Jp=["aria-pressed"],Qp={class:"count"},Xp=["aria-pressed"],Zp={class:"count"},xp=["aria-pressed"],ef={class:"count"},tf=["aria-pressed"],of={class:"count"},sf={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},nf={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},rf={class:"admin-filter-row"},af={class:"search-wrap"},lf={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},df={key:0,class:"admin-search-hint"},uf={class:"admin-filter-inline","aria-label":"Pagination"},cf=["disabled"],pf={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},ff=["disabled"],hf={key:0,class:"admin-filter-row"},mf={class:"admin-active-chips"},vf={class:"key"},gf=["onClick"],yf={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},bf={class:"paper-table-head",role:"row"},wf={role:"columnheader"},kf={role:"columnheader"},Ef={role:"columnheader"},Cf={class:"paper-table-row",role:"row"},_f={class:"cell-anon",role:"cell"},Sf={class:"anon-text"},Nf=["textContent","href"],Df={class:"anon-sub"},Rf={class:"cell-status",role:"cell"},Tf=["textContent"],Af={class:"cell-views num",role:"cell"},Of=["textContent","href"],If={class:"cell-expires",role:"cell"},Pf={class:"cell-actions",role:"cell"},Vf={class:"dropdown"},qf={class:"dropdown-menu dropdown-menu-right"},Mf=["href"],$f=["href"],Lf=["href"],Uf=["onClick"],Ff={key:0,class:"paper-table-empty"},zf={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},Hf={style:{"font-size":"12px",color:"var(--ink-muted)"}},jf={key:0,class:"pagination-compact"},Bf=["disabled"],Gf=["max"],Wf=["disabled"],Kf={class:"admin-filter-inline"},Yf={class:"form-control form-control-sm"};function rl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",Bp,[t[47]||(t[47]=ce('
Admin \xA0/\xA0 Conferences

Conferences

',3)),o("div",Gp,[o("span",Wp,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=s=>{e.query.ready=!e.query.ready,e.query.page=1}),"aria-pressed":!!e.query?.ready},[t[13]||(t[13]=y("Ready ",-1)),o("span",Yp,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,Kp),o("button",{type:"button",class:A(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=s=>{e.query.preparing=!e.query.preparing,e.query.page=1}),"aria-pressed":!!e.query?.preparing},[t[14]||(t[14]=y("Preparing ",-1)),o("span",Qp,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],10,Jp),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=s=>{e.query.error=!e.query.error,e.query.page=1}),"aria-pressed":!!e.query?.error},[t[15]||(t[15]=y("Errored ",-1)),o("span",Zp,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,Xp),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=s=>{e.query.expired=!e.query.expired,e.query.page=1}),"aria-pressed":!!e.query?.expired},[t[16]||(t[16]=y("Expired ",-1)),o("span",ef,c(e.fmt?.number(e.statusCountFor("expired"))),1)],10,xp),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=s=>{e.query.removed=!e.query.removed,e.query.page=1}),"aria-pressed":!!e.query?.removed},[t[17]||(t[17]=y("Removed ",-1)),o("span",of,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,tf)]),e.fetchError?(l(),d("div",sf,[t[18]||(t[18]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",nf,[o("div",rf,[o("div",af,[N(o("input",lf,null,512),[[n,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",df,"/"))]),t[22]||(t[22]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=s=>e.exportCsv())},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),y(" Export",-1)])]),o("span",uf,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,cf),o("span",pf,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,ff)])]),e.chips?.length?(l(),d("div",hf,[o("div",mf,[(l(!0),d(X,null,ae(e.chips,(s,i)=>(l(),d("span",{class:"admin-active-chip",key:s?.key},[o("span",vf,c(s?.label),1),o("span",null,c(s?.value),1),o("button",{type:"button",onClick:a=>e.clearFilter(s.key),"aria-label":"Clear filter"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,gf)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),o("div",yf,[o("div",bf,[o("div",wf,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="name"}]),onClick:t[8]||(t[8]=s=>e.sortBy("name"))},[t[25]||(t[25]=y("Conference ",-1)),e.sortIcon("name")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[24]||(t[24]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",kf,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[9]||(t[9]=s=>e.sortBy("status"))},[t[27]||(t[27]=y("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[26]||(t[26]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[30]||(t[30]=o("div",{role:"columnheader",class:"num"},"Repos",-1)),o("div",Ef,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[10]||(t[10]=s=>e.sortBy("startDate"))},[t[29]||(t[29]=y("Window ",-1)),e.sortIcon("startDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[31]||(t[31]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,ae(e.filteredConferences,(s,i)=>(l(),d("div",Cf,[o("div",_f,[t[33]||(t[33]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[o("use",{href:"#project-icon-conference"})],-1)),o("div",Sf,[o("a",{class:"repo-name",textContent:c(s?.name),href:e.safeUrl("/conference/"+s?.conferenceID)},null,8,Nf),o("div",Df,[o("span",null,c(s?.conferenceID),1),t[32]||(t[32]=y("\xA0\xB7\xA0",-1)),o("span",null,c(e.fmt?.number(s?.price||0))+" \u20AC",1)])])]),o("div",Rf,[o("span",{class:A(["status-dot",{"status-removed":s?.status=="removed"||s?.status=="expired","status-ready":s?.status=="ready","status-error":s?.status=="error","status-preparing":s?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(s?.status))},null,8,Tf)]),o("div",Af,[t[34]||(t[34]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),o("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(s?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+s?.conferenceID)},null,8,Of)]),o("div",If,[t[35]||(t[35]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),y(" "+c(e.fmt?.date(s?.startDate))+" \u2013 "+c(e.fmt?.date(s?.endDate)),1)]),o("div",Pf,[o("div",Vf,[t[41]||(t[41]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",qf,[o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/edit")},[...t[36]||(t[36]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit",-1)])],8,Mf),o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/")},[...t[37]||(t[37]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View",-1)])],8,$f),o("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+s?.conferenceID)},[...t[38]||(t[38]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),y(" View repositories",-1)])],8,Lf),t[40]||(t[40]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:he(a=>e.removeConference(s),["prevent"])},[...t[39]||(t[39]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove",-1)])],8,Uf),[[Y,s?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(l(),d("div",Ff,[...t[42]||(t[42]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No conferences match the current filters.",-1)])])):p("v-if",!0)]),o("div",zf,[o("span",Hf,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",jf,[o("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),y(" Previous",-1)])],8,Bf),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Gf),[[n,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[44]||(t[44]=[y("Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Wf)])):p("v-if",!0),o("span",Kf,[t[46]||(t[46]=o("label",null,"Per page",-1)),N((l(),d("select",Yf,[...t[45]||(t[45]=[ce('',5)])])),[[n,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var Jf={class:"container paper-page admin-page errors-page"},Qf={class:"errors-header"},Xf={class:"errors-actions"},Zf={class:"kpi-grid"},xf={class:"kpi-card"},eh={class:"kpi-value"},th={key:0},oh={key:1},sh={class:"kpi-card kpi-error"},nh={class:"kpi-value"},rh={class:"kpi-sub"},ih={class:"kpi-card kpi-warn"},ah={class:"kpi-value"},lh={class:"kpi-sub"},dh={class:"kpi-card kpi-info"},uh={class:"kpi-value"},ch={class:"kpi-sub"},ph={class:"kpi-value"},fh={class:"kpi-sub"},hh={key:0,class:"dropped-warn"},mh={class:"volume-chart"},vh={class:"volume-bars"},gh=["title"],yh={class:"errors-toolbar","aria-label":"Error filters"},bh={class:"seg-tabs"},wh={class:"search-wrap"},kh={type:"search",class:"form-control",placeholder:"code:repo_not_found module:route status:>=400",autocomplete:"off"},Eh={key:0,class:"filter-count"},Ch={class:"select-wrap"},_h={class:"form-control form-control-sm"},Sh={class:"select-wrap"},Nh={class:"form-control form-control-sm"},Dh={class:"autoref"},Rh={type:"checkbox"},Th={key:0,class:"admin-empty"},Ah={key:1,class:"errors-pager"},Oh={key:2,class:"errors-list"},Ih=["onClick"],Ph={class:"col-when"},Vh={class:"when-rel"},qh={class:"when-abs"},Mh={class:"col-sev"},$h={class:"sev-label"},Lh={class:"col-mod"},Uh={class:"pill pill-module"},Fh={class:"col-msg"},zh={class:"msg-code"},Hh={key:0,class:"msg-context"},jh={key:1,class:"msg-detail"},Bh={key:2,class:"msg-url"},Gh={class:"col-count"},Wh={key:0,class:"count-pill"},Kh={key:1,class:"count-pill count-pill-muted"},Yh={class:"col-status"},Jh={key:0,class:"errors-row-detail"},Qh={class:"detail-tabs"},Xh=["onClick"],Zh=["onClick"],xh=["onClick"],em={class:"detail-body"},tm={class:"detail-main"},om={key:0},sm={key:1,class:"stack-pre"},nm={key:2,class:"related-list"},rm={class:"when-abs"},im={class:"msg-url"},am={class:"detail-actions"},lm=["onClick"],dm=["onClick"],um={key:0,class:"copy-hint"},cm={class:"detail-aside"},pm={class:"aside-block"},fm=["title"],hm={class:"aside-block"},mm=["title"],vm={class:"aside-block"},gm={class:"aside-value"},ym={key:0,class:"aside-sub"},bm={key:0,class:"aside-block"},wm=["href"],km={key:1,class:"aside-block"},Em={class:"aside-value mono"};function il(e,t){let n=ye("field"),r=ye("form");return l(),d("div",Jf,[t[32]||(t[32]=o("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),o("span",{class:"here"},"Errors")],-1)),o("header",Qf,[t[10]||(t[10]=o("h1",{class:"paper-page-title"},"Errors",-1)),o("div",Xf,[o("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=s=>e.exportCsv())},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),y(" Export CSV",-1)])]),o("button",{class:"btn btn-sm btn-danger",type:"button",onClick:t[1]||(t[1]=s=>e.clearAll())},[...t[9]||(t[9]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Clear all",-1)])])])]),t[33]||(t[33]=ce('',1)),o("section",Zf,[o("div",xf,[t[11]||(t[11]=o("div",{class:"kpi-label"},"Last 24h",-1)),o("div",eh,c(e.stats?.last24h),1),o("div",{class:A(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h?(l(),d("span",th,c(e.stats?.delta>0?"+":"")+c(e.stats?.delta)+"% vs yesterday",1)):p("v-if",!0),e.stats?.prev24h?p("v-if",!0):(l(),d("span",oh,"no prior baseline"))],2)]),o("div",sh,[t[12]||(t[12]=o("div",{class:"kpi-label"},"Errors (5xx)",-1)),o("div",nh,c(e.stats?.severity?.error),1),o("div",rh,c(e.stats?.unique?.error)+" unique",1)]),o("div",ih,[t[13]||(t[13]=o("div",{class:"kpi-label"},"Warnings (4xx)",-1)),o("div",ah,c(e.stats?.severity?.warn),1),o("div",lh,c(e.stats?.unique?.warn)+" unique",1)]),o("div",dh,[t[14]||(t[14]=o("div",{class:"kpi-label"},"Info (auth, 404)",-1)),o("div",uh,c(e.stats?.severity?.info),1),o("div",ch,c(e.stats?.unique?.info)+" unique",1)]),o("div",{class:A(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[15]||(t[15]=o("div",{class:"kpi-label"},"Captured",-1)),o("div",ph,c(e.total),1),o("div",fh,[y(" cap "+c(e.cap)+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(l(),d("span",hh," \xB7 "+c(e.stats?.dropped)+" dropped",1)):p("v-if",!0)])],2)]),o("section",mh,[t[16]||(t[16]=ce('
Volume \xB7 24h \xB7 1h bucketserror warn info
',1)),o("div",vh,[(l(!0),d(X,null,ae(e.stats?.buckets,(s,i)=>(l(),d("div",{class:"volume-bar",key:i,title:e.bucketTitle(s)},[o("span",{class:"seg seg-error",style:Me({height:e.barPx(s,"error")+"px"})},null,4),o("span",{class:"seg seg-warn",style:Me({height:e.barPx(s,"warn")+"px"})},null,4),o("span",{class:"seg seg-info",style:Me({height:e.barPx(s,"info")+"px"})},null,4)],8,gh))),128))])]),N((l(),d("form",yh,[o("div",bh,[o("button",{type:"button",class:A({active:e.query?.bucket===""}),onClick:t[2]||(t[2]=s=>e.setBucket(""))},"All",2),o("button",{type:"button",class:A({active:e.query?.bucket==="error"}),onClick:t[3]||(t[3]=s=>e.setBucket("error"))},"5xx",2),o("button",{type:"button",class:A({active:e.query?.bucket==="warn"}),onClick:t[4]||(t[4]=s=>e.setBucket("warn"))},"4xx",2),o("button",{type:"button",class:A({active:e.query?.bucket==="info"}),onClick:t[5]||(t[5]=s=>e.setBucket("info"))},"Info",2)]),o("div",wh,[t[17]||(t[17]=o("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-search"})],-1)),N(o("input",kh,null,512),[[n,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(l(),d("span",Eh,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):p("v-if",!0)]),o("div",Ch,[t[19]||(t[19]=o("label",null,"Sort",-1)),N((l(),d("select",_h,[...t[18]||(t[18]=[o("option",{value:"recent"},"Most recent",-1),o("option",{value:"count"},"Most frequent",-1)])])),[[n,{state:e.viewState,set:s=>{e.query.sort=s},value:e.query?.sort,form:null,options:{}}]])]),o("div",Sh,[t[21]||(t[21]=o("label",null,"Group",-1)),N((l(),d("select",Nh,[...t[20]||(t[20]=[o("option",{value:""},"Off",-1),o("option",{value:"code"},"By code",-1),o("option",{value:"module"},"By module",-1)])])),[[n,{state:e.viewState,set:s=>{e.query.group=s},value:e.query?.group,form:null,options:{}}]])]),o("label",Dh,[N(o("input",Rh,null,512),[[n,{state:e.viewState,set:s=>{e.query.autoRefresh=s},value:e.query?.autoRefresh,form:null,options:{}}]]),t[22]||(t[22]=y(" Auto-refresh ",-1))]),o("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[6]||(t[6]=s=>e.refreshNow()),"aria-label":"Refresh"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])])),[[r,e.viewState]]),e.visible?.length?p("v-if",!0):(l(),d("div",Th,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(l(),d("div",Ah,[o("span",null,"Showing "+c(e.entries?.length)+" of "+c(e.total)+" captured",1),o("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=s=>e.loadMore())},"Load older")])):p("v-if",!0),e.visible?.length?(l(),d("div",Oh,[t[31]||(t[31]=ce('
WhenSeverityModuleMessageCountStatus
',1)),(l(!0),d(X,null,ae(e.visible,(s,i)=>(l(),d("div",{class:A(["errors-row",{open:e.expanded[s?._key]}]),key:s?._key},[o("div",{class:"errors-row-main",onClick:a=>e.toggle(s)},[o("div",Ph,[o("div",Vh,c(e.relTime(s?.ts)),1),o("div",qh,c(e.absTimeShort(s?.ts)),1)]),o("div",Mh,[o("span",{class:A(["sev-dot","sev-"+s?._bucket])},null,2),o("span",$h,c(e.fmt?.uppercase(s?._bucket)),1)]),o("div",Lh,[o("span",Uh,c(s?.module),1)]),o("div",Fh,[o("strong",zh,c(s?.displayMessage),1),s?.displayContext&&s?.displayContext!==s?.displayMessage?(l(),d("span",Hh,c(s?.displayContext),1)):p("v-if",!0),s?._detail?(l(),d("span",jh,c(s?._detail),1)):p("v-if",!0),s?._url?(l(),d("div",Bh,c(s?._url),1)):p("v-if",!0)]),o("div",Gh,[s?.count>1?(l(),d("span",Wh,"\xD7"+c(s?.count),1)):p("v-if",!0),s?.count===1?(l(),d("span",Kh,"\xD71")):p("v-if",!0)]),o("div",Yh,[s?._status?(l(),d("span",{key:0,class:A(["status-pill","status-"+s?._bucket])},c(s?._status),3)):p("v-if",!0)])],8,Ih),e.expanded[s?._key]?(l(),d("div",Jh,[o("div",Qh,[o("button",{type:"button",class:A({active:e.detailTab[s?._key]==="raw"||!e.detailTab[s?._key]}),onClick:a=>e.detailTab[s._key]="raw"},"Raw",10,Xh),s?._stack?(l(),d("button",{key:0,type:"button",class:A({active:e.detailTab[s?._key]==="stack"}),onClick:a=>e.detailTab[s._key]="stack"},"Stack",10,Zh)):p("v-if",!0),s?.count>1?(l(),d("button",{key:1,type:"button",class:A({active:e.detailTab[s?._key]==="related"}),onClick:a=>e.detailTab[s._key]="related"},"Related ("+c(s?.count)+")",11,xh)):p("v-if",!0)]),o("div",em,[o("div",tm,[(e.detailTab[s?._key]||"raw")==="raw"?(l(),d("pre",om,c(s?._detailJson),1)):p("v-if",!0),e.detailTab[s?._key]==="stack"?(l(),d("pre",sm,c(s?._stack),1)):p("v-if",!0),e.detailTab[s?._key]==="related"?(l(),d("div",nm,[(l(!0),d(X,null,ae(s?._related,(a,u)=>(l(),d("div",{class:"related-row",key:u},[o("span",rm,c(e.absTimeShort(a?.ts)),1),o("span",im,c(a?._url),1),a?._status?(l(),d("span",{key:0,class:A(["status-pill","status-"+a?._bucket])},c(a?._status),3)):p("v-if",!0)]))),128))])):p("v-if",!0),o("div",am,[o("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:a=>e.copyCurl(s)},[...t[24]||(t[24]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),y(" Copy curl",-1)])],8,lm),o("button",{class:"btn btn-sm",type:"button",onClick:a=>e.copyJson(s)},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-clipboard"})],-1),y(" Copy JSON",-1)])],8,dm),e.copyHint?(l(),d("span",um,c(e.copyHint),1)):p("v-if",!0)])]),o("aside",cm,[o("div",pm,[t[26]||(t[26]=o("div",{class:"aside-label"},"First seen",-1)),o("div",{class:"aside-value",title:e.absTime(s?._firstSeen)},c(e.relTime(s?._firstSeen)),9,fm)]),o("div",hm,[t[27]||(t[27]=o("div",{class:"aside-label"},"Last seen",-1)),o("div",{class:"aside-value",title:e.absTime(s?.ts)},c(e.relTime(s?.ts)),9,mm)]),o("div",vm,[t[28]||(t[28]=o("div",{class:"aside-label"},"Occurrences",-1)),o("div",gm,[y(c(s?.count),1),s?._lastHourCount?(l(),d("span",ym," \xB7 "+c(s?._lastHourCount)+" this hour",1)):p("v-if",!0)])]),s?._repoId?(l(),d("div",bm,[t[29]||(t[29]=o("div",{class:"aside-label"},"Repository",-1)),o("a",{class:"aside-value",href:e.safeUrl("/r/"+s?._repoId)},c(s?._repoId),9,wm)])):p("v-if",!0),s?._url?(l(),d("div",km,[t[30]||(t[30]=o("div",{class:"aside-label"},"URL",-1)),o("div",Em,c(s?._url),1)])):p("v-if",!0)])])])):p("v-if",!0)],2))),128))])):p("v-if",!0)])}var Cm={class:"container paper-page admin-page overview-page"},_m={key:0,class:"admin-empty"},Sm={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},Nm={key:2},Dm={class:"ov-kpi-row"},Rm={class:"ov-kpi-card"},Tm={class:"ov-kpi-value"},Am={class:"ov-kpi-sub"},Om={class:"ov-kpi-card"},Im={class:"ov-kpi-sub"},Pm={class:"ov-kpi-card"},Vm={class:"ov-kpi-sub"},qm={class:"ov-kpi-card"},Mm={class:"ov-kpi-sub"},$m={class:"ov-kpi-card"},Lm={class:"ov-kpi-value"},Um={class:"ov-kpi-sub"},Fm={class:"ov-daily-row"},zm={class:"ov-daily-card"},Hm={class:"ov-daily-value"},jm={class:"ov-daily-card"},Bm={class:"ov-daily-value"},Gm={class:"ov-daily-sub"},Wm={class:"ov-daily-card"},Km={class:"ov-daily-value"},Ym={class:"ov-chart-row"},Jm={class:"ov-chart-card"},Qm={key:0,class:"ov-spark-bars"},Xm=["data-tip","aria-label"],Zm={key:1,class:"ov-spark-x"},xm={class:"ov-chart-card"},ev={key:0,class:"ov-spark-bars"},tv=["data-tip","aria-label"],ov={key:1,class:"ov-spark-x"},sv={class:"ov-chart-card"},nv={key:0,class:"ov-spark-bars"},rv=["data-tip","aria-label"],iv={key:1,class:"ov-spark-x"},av={class:"ov-chart-card"},lv={key:0,class:"ov-spark-bars"},dv=["data-tip","aria-label"],uv={key:1,class:"ov-spark-x"},cv={class:"ov-triple-row"},pv={class:"ov-panel-card"},fv={class:"ov-panel-head"},hv={class:"ov-panel-meta"},mv={class:"ov-stacked-bar"},vv={class:"ov-bar-legend"},gv={href:"/admin/repositories",class:"ov-legend-item"},yv={class:"ov-legend-n"},bv={href:"/admin/repositories",class:"ov-legend-item"},wv={class:"ov-legend-n"},kv={href:"/admin/repositories",class:"ov-legend-item"},Ev={class:"ov-legend-n"},Cv={href:"/admin/repositories",class:"ov-legend-item"},_v={class:"ov-legend-n"},Sv={href:"/admin/repositories",class:"ov-legend-item"},Nv={class:"ov-legend-n"},Dv={class:"ov-panel-card"},Rv={class:"ov-panel-head"},Tv={class:"ov-panel-meta"},Av={class:"ov-error-bars"},Ov={class:"ov-ebar-row"},Iv={class:"ov-ebar-track"},Pv={class:"ov-ebar-n"},Vv={class:"ov-ebar-row"},qv={class:"ov-ebar-track"},Mv={class:"ov-ebar-n"},$v={class:"ov-ebar-row"},Lv={class:"ov-ebar-track"},Uv={class:"ov-ebar-n"},Fv={key:0,class:"ov-panel-foot"},zv={href:"/admin/errors"},Hv={class:"ov-panel-card"},jv={class:"ov-routes-table"},Bv={class:"ov-route-row",href:"/admin/queues"},Gv={class:"ov-route-n"},Wv={class:"ov-route-n"},Kv={class:"ov-route-row",href:"/admin/queues"},Yv={class:"ov-route-n"},Jv={class:"ov-route-n"},Qv={class:"ov-route-row",href:"/admin/queues"},Xv={class:"ov-route-n"},Zv={class:"ov-route-n"},xv={class:"ov-services-card"},eg={class:"ov-services-head"},tg={class:"ov-panel-meta"},og={class:"ov-services-grid"},sg={class:"ov-svc"},ng={class:"ov-svc-info"},rg={class:"ov-svc-meta"},ig={class:"ov-svc-detail"},ag={class:"ov-svc"},lg={class:"ov-svc-info"},dg={key:0,class:"ov-svc-meta"},ug={key:1,class:"ov-svc-meta"},cg={class:"ov-svc"},pg={class:"ov-svc-info"},fg={key:0,class:"ov-svc-meta"},hg={key:1,class:"ov-svc-meta"},mg={class:"ov-svc"},vg={class:"ov-svc-info"},gg={key:0,class:"ov-svc-meta"},yg={key:1,class:"ov-svc-meta"},bg={class:"ov-svc"},wg={class:"ov-svc-info"},kg={class:"ov-svc-meta"};function al(e,t){return l(),d("div",Cm,[t[42]||(t[42]=ce('
Admin \xB7 System Health

Overview

',3)),e.loading?(l(),d("div",_m,"Loading overview\u2026")):p("v-if",!0),e.error?(l(),d("div",Sm,[t[0]||(t[0]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.error),1)])):p("v-if",!0),e.data?(l(),d("div",Nm,[p(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",Dm,[o("div",Rm,[t[1]||(t[1]=o("div",{class:"ov-kpi-label"},[y("Repositories "),o("span",{class:"ov-dot ov-dot-ok"})],-1)),o("div",Tm,c(e.humanNum(e.data?.repos?.total)),1),o("div",Am,"+"+c(e.data?.repos?.newRepos24h)+" \xB7 last 24h",1)]),o("div",Om,[t[2]||(t[2]=o("div",{class:"ov-kpi-label"},"CPU",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>80}])},c(e.data?.system?.cpuPercent)+"%",3),o("div",Im,c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)]),o("div",Pm,[t[3]||(t[3]=o("div",{class:"ov-kpi-label"},"Memory",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>85}])},c(e.data?.system?.memPercent)+"%",3),o("div",Vm,c(e.humanBytes(e.data?.system?.memUsed))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)]),o("div",qm,[t[4]||(t[4]=o("div",{class:"ov-kpi-label"},"Disk",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>85}])},c(e.data?.system?.diskPercent)+"%",3),o("div",Mm,c(e.humanBytes(e.data?.system?.diskUsed))+" / "+c(e.humanBytes(e.data?.system?.diskTotal))+" \xB7 "+c(e.data?.system?.diskMount),1)]),o("div",$m,[t[5]||(t[5]=o("div",{class:"ov-kpi-label"},"Uptime",-1)),o("div",Lm,c(e.humanDuration(e.data?.system?.uptime)),1),o("div",Um,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),p(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",Fm,[o("div",zm,[t[6]||(t[6]=o("div",{class:"ov-daily-label"},"New repos today",-1)),o("div",Hm,"+"+c(e.fmt?.number(e.data?.daily?.today?.repositories)),1),t[7]||(t[7]=o("div",{class:"ov-daily-sub"},"since yesterday",-1))]),o("div",jm,[t[8]||(t[8]=o("div",{class:"ov-daily-label"},"New users today",-1)),o("div",Bm,"+"+c(e.fmt?.number(e.data?.daily?.today?.users)),1),o("div",Gm,c(e.fmt?.number(e.data?.users?.total))+" total users",1)]),o("div",Wm,[t[9]||(t[9]=o("div",{class:"ov-daily-label"},"Page views today",-1)),o("div",Km,"+"+c(e.fmt?.number(e.data?.daily?.today?.pageViews)),1),t[10]||(t[10]=o("div",{class:"ov-daily-sub"},"since yesterday",-1))])]),p(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",Ym,[o("div",Jm,[t[11]||(t[11]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"Daily page views \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-accent"}),y("views/day")])],-1)),e.data?.history?.length?(l(),d("div",Qm,[(l(!0),d(X,null,ae(e.data?.history,(n,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyPageViews)+" views","aria-label":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyPageViews)+" views"},[o("span",{class:"ov-spark-fill",style:Me({height:e.historyBarH(n,"dailyPageViews")+"px"})},null,4)],8,Xm))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",Zm,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",xm,[t[12]||(t[12]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"New repos \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-ok-fill"}),y("repos/day")])],-1)),e.data?.history?.length?(l(),d("div",ev,[(l(!0),d(X,null,ae(e.data?.history,(n,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyRepositories)+" repos","aria-label":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyRepositories)+" repos"},[o("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Me({height:e.historyBarH(n,"dailyRepositories")+"px"})},null,4)],8,tv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",ov,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",sv,[t[13]||(t[13]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"Users \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-user-fill"}),y("total users")])],-1)),e.data?.history?.length?(l(),d("div",nv,[(l(!0),d(X,null,ae(e.data?.history,(n,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(n)+": "+e.fmt?.number(n?.nbUsers)+" users","aria-label":e.historyLabel(n)+": "+e.fmt?.number(n?.nbUsers)+" users"},[o("span",{class:"ov-spark-fill ov-spark-fill-user",style:Me({height:e.historyBarH(n,"nbUsers")+"px"})},null,4)],8,rv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",iv,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",av,[t[14]||(t[14]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"New users \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-new-user-fill"}),y("users/day")])],-1)),e.data?.history?.length?(l(),d("div",lv,[(l(!0),d(X,null,ae(e.data?.history,(n,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyUsers)+" users","aria-label":e.historyLabel(n)+": +"+e.fmt?.number(n?.dailyUsers)+" users"},[o("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Me({height:e.historyBarH(n,"dailyUsers")+"px"})},null,4)],8,dv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",uv,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)])]),p(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",cv,[p(" Repo status breakdown "),o("div",pv,[o("div",fv,[t[15]||(t[15]=o("span",{class:"ov-panel-title"},"Repo status",-1)),o("span",hv,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),o("div",mv,[o("span",{class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Me({width:e.barPct("ready")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Me({width:e.barPct("preparing")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-error",title:"Error",style:Me({width:e.barPct("error")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-expired",title:"Expired",style:Me({width:e.barPct("expired")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-removed",title:"Removed",style:Me({width:e.barPct("removed")+"%"})},null,4)]),o("div",vv,[o("a",gv,[t[16]||(t[16]=o("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[17]||(t[17]=y(" ready ",-1)),o("span",yv,c(e.fmt?.number(e.statusCount("ready"))),1)]),o("a",bv,[t[18]||(t[18]=o("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[19]||(t[19]=y(" preparing ",-1)),o("span",wv,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),o("a",kv,[t[20]||(t[20]=o("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[21]||(t[21]=y(" error ",-1)),o("span",Ev,c(e.fmt?.number(e.statusCount("error"))),1)]),o("a",Cv,[t[22]||(t[22]=o("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[23]||(t[23]=y(" expired ",-1)),o("span",_v,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),o("a",Sv,[t[24]||(t[24]=o("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[25]||(t[25]=y(" removed ",-1)),o("span",Nv,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),p(" Error breakdown "),o("div",Dv,[o("div",Rv,[t[26]||(t[26]=o("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),o("span",Tv,c(e.data?.errors?.last24h)+" total",1)]),o("div",Av,[o("div",Ov,[t[27]||(t[27]=o("span",{class:"ov-ebar-label"},"5xx",-1)),o("span",Iv,[o("span",{class:"ov-ebar-fill ov-ebar-error",style:Me({width:e.errPct("error")+"%"})},null,4)]),o("span",Pv,c(e.data?.errors?.severity?.error),1)]),o("div",Vv,[t[28]||(t[28]=o("span",{class:"ov-ebar-label"},"4xx",-1)),o("span",qv,[o("span",{class:"ov-ebar-fill ov-ebar-warn",style:Me({width:e.errPct("warn")+"%"})},null,4)]),o("span",Mv,c(e.data?.errors?.severity?.warn),1)]),o("div",$v,[t[29]||(t[29]=o("span",{class:"ov-ebar-label"},"Info",-1)),o("span",Lv,[o("span",{class:"ov-ebar-fill ov-ebar-info",style:Me({width:e.errPct("info")+"%"})},null,4)]),o("span",Uv,c(e.data?.errors?.severity?.info),1)])]),e.data?.repos?.recentErrors24h?(l(),d("div",Fv,[o("a",zv,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):p("v-if",!0)]),p(" Top routes / queues "),o("div",Hv,[t[34]||(t[34]=o("div",{class:"ov-panel-head"},[o("span",{class:"ov-panel-title"},"Queues"),o("span",{class:"ov-panel-meta"},"by state")],-1)),o("div",jv,[t[33]||(t[33]=ce('
QueueActiveWaitFailed
',1)),o("a",Bv,[t[30]||(t[30]=o("span",{class:"ov-route-name"},"download",-1)),o("span",Gv,c(e.data?.queues?.download?.active),1),o("span",Wv,c(e.data?.queues?.download?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),o("a",Kv,[t[31]||(t[31]=o("span",{class:"ov-route-name"},"remove",-1)),o("span",Yv,c(e.data?.queues?.remove?.active),1),o("span",Jv,c(e.data?.queues?.remove?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),o("a",Qv,[t[32]||(t[32]=o("span",{class:"ov-route-name"},"cache",-1)),o("span",Xv,c(e.data?.queues?.cache?.active),1),o("span",Zv,c(e.data?.queues?.cache?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),p(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",xv,[o("div",eg,[t[35]||(t[35]=o("span",{class:"ov-panel-title"},"Services",-1)),o("span",tg,c(e.fmt?.number(e.data?.users?.total))+" users \xB7 "+c(e.data?.conferences?.total)+" conferences",1)]),o("div",og,[o("div",sg,[t[37]||(t[37]=o("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),o("div",ng,[t[36]||(t[36]=o("span",{class:"ov-svc-name"},"web",-1)),o("span",rg,c(e.data?.system?.nodeVersion),1)]),o("span",ig,"uptime "+c(e.humanDuration(e.data?.system?.uptime)),1)]),o("div",ag,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",lg,[t[38]||(t[38]=o("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(l(),d("span",dg,c(e.queueTotal(e.data?.queues?.download))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.download)?p("v-if",!0):(l(),d("span",ug,"idle"))])]),o("div",cg,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",pg,[t[39]||(t[39]=o("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(l(),d("span",fg,c(e.queueTotal(e.data?.queues?.cache))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.cache)?p("v-if",!0):(l(),d("span",hg,"idle"))])]),o("div",mg,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",vg,[t[40]||(t[40]=o("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(l(),d("span",gg,c(e.queueTotal(e.data?.queues?.remove))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.remove)?p("v-if",!0):(l(),d("span",yg,"idle"))])]),o("div",bg,[o("span",{class:A(["ov-svc-dot",e.data?.repos?.recentErrors24h>10?"ov-dot-warn":"ov-dot-ok"])},null,2),o("div",wg,[t[41]||(t[41]=o("span",{class:"ov-svc-name"},"errors",-1)),o("span",kg,c(e.data?.errors?.last24h)+" / 24h",1)])])])])])):p("v-if",!0)])}var Eg={class:"container paper-page admin-page"},Cg={class:"q-header"},_g={class:"q-header-actions"},Sg={class:"q-range-btns"},Ng={class:"q-cards"},Dg=["aria-pressed","onKeydown","onClick"],Rg={class:"q-card-head"},Tg=["textContent"],Ag=["textContent"],Og={class:"q-card-sub"},Ig={key:0,class:"q-card-bar"},Pg={key:0,class:"q-detail"},Vg={class:"q-throughput"},qg={class:"q-section-label"},Mg={class:"q-section-right"},$g={class:"q-stats-panel"},Lg={class:"q-section-label"},Ug={class:"q-stats-grid"},Fg={class:"q-stat"},zg=["textContent"],Hg={class:"q-stat"},jg=["textContent"],Bg={class:"q-stat"},Gg=["textContent"],Wg={class:"q-stat"},Kg=["textContent"],Yg={class:"q-stat"},Jg=["textContent"],Qg={class:"q-stat"},Xg=["textContent"],Zg={class:"q-stats-actions"},xg=["disabled"],ey={class:"q-jobs"},ty={class:"q-jobs-header"},oy={class:"q-section-label"},sy={class:"q-state-filters"},ny={class:"q-state-toggle"},ry={type:"checkbox"},iy={class:"q-search-row"},ay={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},ly={class:"q-auto-refresh"},dy={type:"checkbox"},uy={key:0,class:"q-table"},cy=["onClick"],py={class:"q-cell-state"},fy=["textContent"],hy=["textContent"],my={class:"q-cell-id"},vy=["textContent","href"],gy={class:"q-cell-payload"},yy=["textContent"],by={key:0,class:"q-payload-detail"},wy=["textContent"],ky=["textContent"],Ey={class:"q-cell-progress"},Cy={key:0,class:"q-progress-wrap"},_y=["textContent"],Sy={class:"q-cell-actions"},Ny=["onClick"],Dy=["onClick"],Ry={key:0,class:"q-detail-row"},Ty={colspan:"7"},Ay={class:"q-job-detail"},Oy={class:"q-job-detail-grid"},Iy={class:"q-job-detail-item"},Py={class:"q-job-detail-value"},Vy=["textContent","href"],qy={class:"q-job-detail-item"},My={class:"q-job-detail-value"},$y=["textContent"],Ly={key:0,class:"q-job-detail-item"},Uy=["textContent"],Fy={key:1,class:"q-job-detail-item"},zy=["textContent"],Hy={key:2,class:"q-job-detail-item"},jy={class:"q-job-detail-value"},By={key:3,class:"q-job-detail-item"},Gy=["textContent"],Wy={key:4,class:"q-job-detail-item"},Ky=["textContent"],Yy={key:5,class:"q-job-detail-item"},Jy=["textContent"],Qy={key:6,class:"q-job-detail-item"},Xy=["textContent"],Zy={key:7,class:"q-job-detail-item"},xy=["textContent"],eb={key:0,class:"q-job-detail-error"},tb=["textContent"],ob={key:1},sb=["textContent"],rb={class:"q-job-detail-actions"},ib=["onClick"],ab=["onClick"],lb=["href"],db={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},ub={key:0},cb={key:1};function ll(e,t){let n=ye("field");return l(),d("div",Eg,[t[48]||(t[48]=o("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),o("span",{class:"here"},"Queues")],-1)),o("div",Cg,[t[12]||(t[12]=o("h1",{class:"paper-page-title"},"Queues",-1)),o("div",_g,[o("div",Sg,[o("button",{class:A(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[0]||(t[0]=r=>e.setRange("1h"))},"1h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[1]||(t[1]=r=>e.setRange("6h"))},"6h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[2]||(t[2]=r=>e.setRange("24h"))},"24h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[3]||(t[3]=r=>e.setRange("7d"))},"7d",2)]),o("button",{class:"btn btn-sm",onClick:t[4]||(t[4]=r=>e.pauseAll())},"Pause all"),o("button",{class:"btn btn-sm btn-dark",onClick:t[5]||(t[5]=r=>e.drainSelected())},"Drain "+c(e.selectedQueue),1)])]),t[49]||(t[49]=ce('',1)),p(" Queue overview cards "),o("div",Ng,[(l(!0),d(X,null,ae(e.queueList,(r,s)=>(l(),d("div",{class:A(["q-card",{selected:e.selectedQueue==r?.key,paused:r?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===r.key,onKeydown:[No(he(i=>e.selectQueue(r.key),["prevent"]),["enter"]),No(he(i=>e.selectQueue(r.key),["prevent"]),["space"])],onClick:i=>e.selectQueue(r.key)},[o("div",Rg,[o("span",{class:A(["q-dot",{"q-dot-red":r?.paused||r?.counts?.failed>0}])},null,2),o("span",{class:"q-card-name",textContent:c(r?.label)},null,8,Tg)]),o("div",{class:"q-card-count",textContent:c((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0))},null,8,Ag),o("div",Og,[o("span",null,"waiting \xB7 "+c(r?.counts?.active||0)+" active",1),r?.counts?.active?(l(),d("div",Ig,[o("div",{class:"q-card-bar-fill",style:Me({width:r?.counts?.active/((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0)||1)*100+"%"})},null,4)])):p("v-if",!0)])],42,Dg))),256))]),p(" Detail: throughput chart + stats panel "),e.selectedStats?(l(),d("div",Pg,[o("div",Vg,[o("div",qg,[y(c(e.selectedQueue)+"\xB7throughput ",1),o("span",Mg,[t[13]||(t[13]=o("span",{class:"q-legend-completed"},"\u25CF",-1)),t[14]||(t[14]=y(" completed ",-1)),t[15]||(t[15]=o("span",{class:"q-legend-failed"},"\u25CF",-1)),t[16]||(t[16]=y(" failed ",-1)),t[17]||(t[17]=o("span",{class:"q-legend-exec"},"- -",-1)),y(" avg time \xB7 "+c(e.fmt?.uppercase(e.range)),1)])]),t[18]||(t[18]=o("div",{class:"q-chart-wrap"},[o("canvas",{id:"q-throughput-chart",height:"180"}),o("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}}),o("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}})],-1))]),o("div",$g,[o("div",Lg,c(e.selectedQueue)+"\xB7stats",1),o("div",Ug,[o("div",Fg,[t[19]||(t[19]=o("div",{class:"q-stat-label"},"WAITING",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,zg)]),o("div",Hg,[t[20]||(t[20]=o("div",{class:"q-stat-label"},"ACTIVE",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,jg)]),o("div",Bg,[t[21]||(t[21]=o("div",{class:"q-stat-label"},"COMPLETED (24H)",-1)),o("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,Gg)]),o("div",Wg,[t[22]||(t[22]=o("div",{class:"q-stat-label"},"FAILED (24H)",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,Kg)]),o("div",Yg,[t[23]||(t[23]=o("div",{class:"q-stat-label"},"DELAYED",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,Jg)]),o("div",Qg,[t[24]||(t[24]=o("div",{class:"q-stat-label"},"WORKERS",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,Xg)])]),o("div",Zg,[o("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=r=>e.togglePause())},c(e.selectedStats?.paused?"Resume":"Pause"),1),o("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=r=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,xg),o("button",{class:"btn btn-sm",onClick:t[8]||(t[8]=r=>e.emptyQueue())},"Empty")])])])):p("v-if",!0),e.actionError?(l(),d("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=r=>e.actionError=null)},[t[25]||(t[25]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),y(" "+c(e.actionError),1)])):p("v-if",!0),p(" Jobs table "),o("div",ey,[o("div",ty,[o("div",oy,"ALL JOBS \xB7 "+c(e.fmt?.uppercase(e.selectedQueue)),1),o("div",sy,[(l(!0),d(X,null,ae(e.allStates,(r,s)=>(l(),d("label",ny,[N(o("input",ry,null,512),[[n,{state:e.viewState,set:i=>{e.stateFilter[r]=i},value:e.stateFilter[r],form:null,options:{}}]]),o("span",{class:A("q-state-chip q-state-"+r)},c(r),3)]))),256))])]),o("div",iy,[N(o("input",ay,null,512),[[n,{state:e.viewState,set:r=>{e.query.search=r},value:e.query?.search,form:null,options:{}}]]),o("label",ly,[N(o("input",dy,null,512),[[n,{state:e.viewState,set:r=>{e.query.autoRefresh=r},value:e.query?.autoRefresh,form:null,options:{}}]]),t[26]||(t[26]=y(" Auto-refresh ",-1))]),o("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[10]||(t[10]=r=>e.refreshNow()),"aria-label":"Refresh"},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(l(),d("table",uy,[t[46]||(t[46]=o("thead",null,[o("tr",null,[o("th",null,"STATE"),o("th",null,"JOB ID"),o("th",null,"PAYLOAD"),o("th",null,"ATTEMPTS"),o("th",null,"DURATION"),o("th",null,"PROGRESS"),o("th")])],-1)),(l(!0),d(X,null,ae(e.filteredJobs(),(r,s)=>(l(),d("tbody",null,[o("tr",{style:{cursor:"pointer"},class:A({"q-row-failed":r?._state=="failed","q-row-expanded":e.expanded[r?.id]}),onClick:i=>e.toggleJob(r)},[o("td",py,[o("span",{textContent:c(r?._state),class:A("q-state-badge q-state-"+r?._state)},null,10,fy),r?._state=="delayed"&&r?.delayUntil?(l(),d("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(r?.delayUntil))},null,8,hy)):p("v-if",!0)]),o("td",my,[(l(),d("svg",{class:A(["ui-icon q-chevron",{"q-chevron-open":e.expanded[r?.id]}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),o("a",{target:"_blank",textContent:c("job:"+e.fmt.limitTo(r?.id,6)),onClick:t[11]||(t[11]=i=>i.stopPropagation()),href:e.safeUrl("/r/"+r?.id)},null,8,vy)]),o("td",gy,[o("span",{textContent:c(r?.name||"anonymize")},null,8,yy),r?.data?.repoId&&r?.data?.repoId!==r?.name?(l(),d("span",by," \xB7 "+c(r?.data?.repoId),1)):p("v-if",!0)]),o("td",{class:"q-cell-num",textContent:c(r?.attemptsMade||1)},null,8,wy),o("td",{class:"q-cell-num",textContent:c(e.jobDuration(r))},null,8,ky),o("td",Ey,[e.jobProgressPct(r)!==null?(l(),d("div",Cy,[o("div",{class:"q-progress-bar",style:Me({"--pct":e.jobProgressPct(r)+"%"})},null,4),o("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(r)+"%")},null,8,_y)])):p("v-if",!0)]),o("td",Sy,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:i=>{e.retryJob(r),i.stopPropagation()},"aria-label":"Retry job"},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])],8,Ny)):p("v-if",!0),o("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:i=>{e.removeJob(r),i.stopPropagation()}},[...t[30]||(t[30]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)])],8,Dy)])],10,cy),e.expanded[r?.id]?(l(),d("tr",Ry,[o("td",Ty,[o("div",Ay,[o("div",Oy,[o("div",Iy,[t[31]||(t[31]=o("span",{class:"q-job-detail-label"},"JOB ID",-1)),o("span",Py,[o("a",{target:"_blank",textContent:c(r?.id),href:e.safeUrl("/r/"+r?.id)},null,8,Vy)])]),o("div",qy,[t[32]||(t[32]=o("span",{class:"q-job-detail-label"},"STATE",-1)),o("span",My,[o("span",{textContent:c(r?._state),class:A("q-state-badge q-state-"+r?._state)},null,10,$y)])]),r?.data?.repoId?(l(),d("div",Ly,[t[33]||(t[33]=o("span",{class:"q-job-detail-label"},"REPO ID",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.data?.repoId)},null,8,Uy)])):p("v-if",!0),r?.timestamp?(l(),d("div",Fy,[t[34]||(t[34]=o("span",{class:"q-job-detail-label"},"CREATED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.timestamp))},null,8,zy)])):p("v-if",!0),r?._state=="delayed"&&r?.delayUntil?(l(),d("div",Hy,[t[35]||(t[35]=o("span",{class:"q-job-detail-label"},"RETRY AT",-1)),o("span",jy,c(e.humanTime(r?.delayUntil))+" ("+c(e.delayCountdown(r?.delayUntil))+")",1)])):p("v-if",!0),r?.processedOn?(l(),d("div",By,[t[36]||(t[36]=o("span",{class:"q-job-detail-label"},"PROCESSED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.processedOn))},null,8,Gy)])):p("v-if",!0),r?.finishedOn?(l(),d("div",Wy,[t[37]||(t[37]=o("span",{class:"q-job-detail-label"},"FINISHED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.finishedOn))},null,8,Ky)])):p("v-if",!0),r?.attemptsMade?(l(),d("div",Yy,[t[38]||(t[38]=o("span",{class:"q-job-detail-label"},"ATTEMPTS",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.attemptsMade)},null,8,Jy)])):p("v-if",!0),r?.progress&&r?.progress?.status?(l(),d("div",Qy,[t[39]||(t[39]=o("span",{class:"q-job-detail-label"},"STATUS",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.progress?.status)},null,8,Xy)])):p("v-if",!0),e.jobProgressPct(r)!==null?(l(),d("div",Zy,[t[40]||(t[40]=o("span",{class:"q-job-detail-label"},"PROGRESS",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(r)+"%")},null,8,xy)])):p("v-if",!0)]),r?.failedReason?(l(),d("div",eb,[t[41]||(t[41]=o("span",{class:"q-job-detail-label"},"ERROR",-1)),o("div",{class:"q-error-reason",textContent:c(r?.failedReason)},null,8,tb)])):p("v-if",!0),r?.stacktrace?.length?(l(),d("div",ob,[t[42]||(t[42]=o("span",{class:"q-job-detail-label"},"STACKTRACE",-1)),(l(!0),d(X,null,ae(r?.stacktrace,(i,a)=>(l(),d("pre",{class:"q-error-stack",key:a},[o("code",{textContent:c(i)},null,8,sb)]))),128))])):p("v-if",!0),o("div",rb,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",onClick:i=>e.retryJob(r)},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Retry",-1)])],8,ib)):p("v-if",!0),o("button",{class:"btn btn-sm",onClick:i=>e.removeJob(r)},[...t[44]||(t[44]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove",-1)])],8,ab),o("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+r?.id)},[...t[45]||(t[45]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1),y(" View repo",-1)])],8,lb)])])])])):p("v-if",!0)]))),256))])):p("v-if",!0),e.filteredJobs().length==0?(l(),d("div",db,[t[47]||(t[47]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?p("v-if",!0):(l(),d("span",ub,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(l(),d("span",cb,"No jobs match the current filters.")):p("v-if",!0)])):p("v-if",!0)])])}var pb={class:"container paper-page admin-page"},fb={class:"admin-summary"},hb={class:"summary-total"},mb={class:"summary-meta"},vb=["aria-pressed"],gb={class:"count"},yb=["aria-pressed"],bb={class:"count"},wb=["aria-pressed"],kb={class:"count"},Eb=["aria-pressed"],Cb={class:"count"},_b=["aria-pressed"],Sb={class:"count"},Nb={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Db={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},Rb={class:"admin-filter-row"},Tb={class:"search-wrap"},Ab={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},Ob={key:0,class:"admin-search-hint"},Ib={class:"admin-filter-inline"},Pb={type:"text",class:"form-control form-control-sm",placeholder:"username"},Vb={class:"admin-filter-inline"},qb={type:"text",class:"form-control form-control-sm",placeholder:"ID"},Mb={class:"admin-filter-inline","aria-label":"Pagination"},$b=["disabled"],Lb={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},Ub=["disabled"],Fb={key:0,class:"admin-filter-row"},zb={class:"admin-active-chips"},Hb={class:"key"},jb=["onClick"],Bb={key:1,class:"bulk-bar"},Gb={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},Wb={class:"paper-table-head",role:"row"},Kb={role:"columnheader",style:{width:"28px"}},Yb=["checked"],Jb={role:"columnheader"},Qb={role:"columnheader"},Xb={role:"columnheader",class:"num"},Zb={role:"columnheader"},xb={role:"cell",style:{width:"28px"}},e1={type:"checkbox","aria-label":"Select repository"},t1={class:"cell-anon",role:"cell"},o1={class:"anon-text"},s1=["textContent","href"],n1={class:"anon-sub"},r1=["textContent","href"],i1={key:0},a1=["textContent","href"],l1={key:1},d1=["textContent","href"],u1={key:2},c1={class:"cell-status",role:"cell"},p1={class:"status-line"},f1=["textContent"],h1=["textContent","title"],m1={class:"cell-views num",role:"cell"},v1=["textContent"],g1={class:"cell-expires",role:"cell"},y1=["textContent"],b1={class:"cell-actions",role:"cell"},w1={class:"dropdown"},k1={class:"dropdown-menu dropdown-menu-right"},E1=["href"],C1=["href"],_1=["href"],S1=["onClick"],N1=["onClick"],D1=["onClick"],R1=["onClick"],T1=["onClick"],A1=["onClick"],O1={key:0,class:"paper-table-empty"},I1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},P1={style:{"font-size":"12px",color:"var(--ink-muted)"}},V1={key:0,class:"pagination-compact"},q1=["disabled"],M1=["max"],$1=["disabled"],L1={class:"admin-filter-inline"},U1={class:"form-control form-control-sm"};function dl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",pb,[t[69]||(t[69]=ce('
Admin \xA0/\xA0 Repositories

Repositories

',3)),o("div",fb,[o("span",hb,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("span",mb,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=s=>{e.query.ready=!e.query.ready,e.query.page=1}),"aria-pressed":!!e.query?.ready},[t[18]||(t[18]=y("Ready ",-1)),o("span",gb,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,vb),o("button",{type:"button",class:A(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=s=>{e.query.preparing=!e.query.preparing,e.query.page=1}),"aria-pressed":!!e.query?.preparing},[t[19]||(t[19]=y("Preparing ",-1)),o("span",bb,c(e.fmt?.number(e.statusCountFor("preparing")+e.statusCountFor("download"))),1)],10,yb),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=s=>{e.query.error=!e.query.error,e.query.page=1}),"aria-pressed":!!e.query?.error},[t[20]||(t[20]=y("Errored ",-1)),o("span",kb,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,wb),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=s=>{e.query.expired=!e.query.expired,e.query.page=1}),"aria-pressed":!!e.query?.expired},[t[21]||(t[21]=y("Expired ",-1)),o("span",Cb,c(e.fmt?.number(e.statusCountFor("expired")+e.statusCountFor("expiring"))),1)],10,Eb),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=s=>{e.query.removed=!e.query.removed,e.query.page=1}),"aria-pressed":!!e.query?.removed},[t[22]||(t[22]=y("Removed ",-1)),o("span",Sb,c(e.fmt?.number(e.statusCountFor("removed")+e.statusCountFor("removing"))),1)],10,_b)]),e.fetchError?(l(),d("div",Nb,[t[23]||(t[23]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",Db,[p(" Row 1: search + scoped inputs + headline actions "),o("div",Rb,[o("div",Tb,[N(o("input",Ab,null,512),[[n,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",Ob,"/"))]),o("span",Ib,[t[24]||(t[24]=o("label",null,"Owner",-1)),N(o("input",Pb,null,512),[[n,{state:e.viewState,set:s=>{e.query.owner=s},value:e.query?.owner,form:null,options:{}}]])]),o("span",Vb,[t[25]||(t[25]=o("label",null,"Conference",-1)),N(o("input",qb,null,512),[[n,{state:e.viewState,set:s=>{e.query.conference=s},value:e.query?.conference,form:null,options:{}}]])]),t[29]||(t[29]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[5]||(t[5]=s=>e.exportCsv())},[...t[26]||(t[26]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),y(" Export",-1)])]),o("span",Mb,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,$b),o("span",Lb,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[28]||(t[28]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Ub)])]),p(" Row 2: appears only when there are active filter chips "),e.chips?.length?(l(),d("div",Fb,[o("div",zb,[(l(!0),d(X,null,ae(e.chips,(s,i)=>(l(),d("span",{class:"admin-active-chip",key:s?.key},[o("span",Hb,c(s?.label),1),o("span",null,c(s?.value),1),o("button",{type:"button","aria-label":"Remove filter",onClick:a=>e.clearFilter(s.key)},[...t[30]||(t[30]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,jb)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",Bb,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[31]||(t[31]=y(" selected",-1))]),o("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=s=>e.bulkRefresh())},[...t[32]||(t[32]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Force refresh",-1)])]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[9]||(t[9]=s=>e.bulkRemoveCache())},[...t[33]||(t[33]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),y(" Remove cache",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=s=>e.clearSelection())},"Clear")])):p("v-if",!0),o("div",Gb,[o("div",Wb,[o("div",Kb,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[11]||(t[11]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,Yb)]),o("div",Jb,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[12]||(t[12]=s=>e.sortBy("source.repositoryName"))},[t[35]||(t[35]=y("Repository ",-1)),e.sortIcon("source.repositoryName")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",Qb,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[13]||(t[13]=s=>e.sortBy("status"))},[t[37]||(t[37]=y("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",Xb,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[14]||(t[14]=s=>e.sortBy("pageView"))},[t[39]||(t[39]=y("Views ",-1)),e.sortIcon("pageView")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[38]||(t[38]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",Zb,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[15]||(t[15]=s=>e.sortBy("anonymizeDate"))},[t[41]||(t[41]=y("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[40]||(t[40]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[42]||(t[42]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,ae(e.filteredRepositories,(s,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error","row-selected":e.selected[s?.repoId]}]),role:"row"},[o("div",xb,[N(o("input",e1,null,512),[[n,{state:e.viewState,set:a=>{e.selected[s.repoId]=a},value:e.selected[s?.repoId],form:null,options:{}}]])]),o("div",t1,[t[47]||(t[47]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",o1,[o("a",{class:"repo-name",target:"_blank",textContent:c(s?.repoId),href:e.safeUrl("/r/"+s?.repoId)},null,8,s1),o("div",n1,[o("a",{textContent:c(s?.source?.repositoryName),href:e.safeUrl("https://github.com/"+s?.source?.repositoryName+"/")},null,8,r1),s?.options?.update?(l(),d("span",i1,[t[43]||(t[43]=y("\xA0\xB7\xA0",-1)),o("a",{textContent:c(s?.source?.branch),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.branch)},null,8,a1)])):p("v-if",!0),s?.options?.update?p("v-if",!0):(l(),d("span",l1,[t[44]||(t[44]=y("\xA0\xB7\xA0@",-1)),o("a",{textContent:c(s?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.commit)},null,8,d1)])),s?.conference?(l(),d("span",u1,[t[45]||(t[45]=y("\xA0\xB7\xA0",-1)),t[46]||(t[46]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),y(" "+c(s?.conference),1)])):p("v-if",!0),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(s?.size?.storage)),1),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(s?.options?.terms?.length))+" terms",1)])])]),o("div",c1,[o("span",p1,[o("span",{class:A(["status-dot",{"status-removed":s?.status=="removed"||s?.status=="expired","status-ready":s?.status=="ready","status-error":s?.status=="error","status-preparing":s?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(s?.status))},null,8,f1)]),s?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(s?.statusMessage)),title:s?.statusMessage},null,8,h1)):p("v-if",!0)]),o("div",m1,[t[48]||(t[48]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),t[49]||(t[49]=y()),o("span",{textContent:c(e.fmt?.number(s?.pageView||0))},null,8,v1)]),o("div",g1,[t[50]||(t[50]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[51]||(t[51]=y()),o("span",{textContent:c(e.fmt?.humanTime(s?.anonymizeDate))},null,8,y1)]),o("div",b1,[o("div",w1,[t[63]||(t[63]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",k1,[o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},[...t[52]||(t[52]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit",-1)])],8,E1),o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},[...t[53]||(t[53]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View repo",-1)])],8,C1),s?.options?.page&&s?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+s?.repoId+"/")},[...t[54]||(t[54]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),y(" View page",-1)])],8,_1)):p("v-if",!0),o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.fetchGithubInfo(s),["prevent"])},[...t[55]||(t[55]=[o("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,S1),t[61]||(t[61]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updateRepository(s),["prevent"])},[...t[56]||(t[56]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Force update",-1)])],8,N1),[[Y,s?.status=="ready"||s?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updateRepository(s),["prevent"])},[...t[57]||(t[57]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),y(" Enable",-1)])],8,D1),[[Y,s?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.showStatusMessage(s),["prevent"])},[...t[58]||(t[58]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1),y(" View status message",-1)])],8,R1),[[Y,s?.statusMessage]]),t[62]||(t[62]=o("div",{class:"dropdown-divider"},null,-1)),o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.removeCache(s),["prevent"])},[...t[59]||(t[59]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),y(" Remove cache",-1)])],8,T1),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:he(a=>e.removeRepository(s),["prevent"])},[...t[60]||(t[60]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove",-1)])],8,A1),[[Y,s?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",O1,[...t[64]||(t[64]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No repositories match the current filters.",-1)])])):p("v-if",!0)]),o("div",I1,[o("span",P1,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",V1,[o("button",{class:"btn btn-sm",onClick:t[16]||(t[16]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[65]||(t[65]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),y(" Previous ",-1)])],8,q1),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,M1),[[n,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[17]||(t[17]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[66]||(t[66]=[y(" Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,$1)])):p("v-if",!0),o("span",L1,[t[68]||(t[68]=o("label",null,"Per page",-1)),N((l(),d("select",U1,[...t[67]||(t[67]=[ce('',5)])])),[[n,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var F1={class:"container paper-page admin-page"},z1={class:"paper-crumbs"},H1={class:"here"},j1={class:"paper-page-title"},B1={key:0,class:"user-detail-card"},G1={class:"user-header"},W1=["src"],K1={class:"status-dot-wrap"},Y1=["textContent"],J1={key:0,class:"type-badge type-repo"},Q1={class:"user-actions",style:{"margin-top":"4px"}},X1={class:"user-detail-grid"},Z1={class:"detail-value"},x1={class:"detail-value"},ew={class:"detail-value",style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},tw={class:"detail-value"},ow=["href"],sw={class:"detail-value"},nw={class:"detail-value"},rw={key:0},iw={key:1,class:"text-muted"},aw={class:"detail-value"},lw={key:0,style:{"margin-top":"20px"}},dw={class:"paper-table w-100",style:{"margin-top":"10px"}},uw={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},cw={class:"cell-anon",role:"cell"},pw={class:"anon-text"},fw=["textContent"],hw={class:"cell-expires",role:"cell"},mw={key:1,class:"admin-section-header"},vw={class:"section-count"},gw={key:2,class:"user-detail-card"},yw={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},bw={key:0,class:"alert alert-warning",role:"alert"},ww={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},kw={key:1,class:"paper-table w-100"},Ew={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},Cw=["textContent"],_w=["textContent"],Sw={role:"cell"},Nw={key:0},Dw={key:1,class:"text-muted"},Rw={role:"cell"},Tw=["onClick"],Aw={key:2,class:"paper-table-empty"},Ow={class:"admin-section-header"},Iw={class:"section-count"},Pw={class:"admin-summary"},Vw={class:"summary-total"},qw=["aria-pressed"],Mw={class:"count"},$w=["aria-pressed"],Lw={class:"count"},Uw=["aria-pressed"],Fw={class:"count"},zw=["aria-pressed"],Hw={class:"count"},jw=["aria-pressed"],Bw={class:"count"},Gw={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},Ww={class:"admin-filter-row"},Kw={class:"search-wrap"},Yw={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},Jw={key:3,class:"bulk-bar"},Qw={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},Xw={class:"paper-table-head",role:"row"},Zw={role:"columnheader",style:{width:"28px"}},xw=["checked"],ek={role:"columnheader"},tk={role:"columnheader"},ok={role:"columnheader",class:"num"},sk={role:"columnheader"},nk={role:"cell",style:{width:"28px"}},rk={type:"checkbox","aria-label":"Select repository"},ik={class:"cell-anon",role:"cell"},ak={class:"anon-text"},lk=["textContent","href"],dk={class:"anon-sub"},uk=["textContent","href"],ck={key:0},pk=["textContent","href"],fk={key:1},hk=["textContent","href"],mk={key:2},vk={class:"cell-status",role:"cell"},gk={class:"status-line"},yk=["textContent"],bk=["textContent","title"],wk=["textContent"],kk=["textContent"],Ek={class:"cell-actions",role:"cell"},Ck={class:"dropdown"},_k={class:"dropdown-menu dropdown-menu-right"},Sk=["href"],Nk=["href"],Dk=["href"],Rk=["onClick"],Tk=["onClick"],Ak=["onClick"],Ok=["onClick"],Ik=["onClick"],Pk=["onClick"],Vk={key:0,class:"paper-table-empty"};function ul(e,t){let n=ye("field"),r=ye("form");return l(),d("div",F1,[o("div",z1,[t[22]||(t[22]=o("a",{href:"/admin/users"},"Users",-1)),t[23]||(t[23]=y(" \xA0/\xA0 ",-1)),o("span",H1,c(e.userInfo?.username||"Profile"),1)]),o("h1",j1,c(e.userInfo?.username||"User"),1),t[85]||(t[85]=ce('',1)),e.userInfo?(l(),d("div",B1,[o("div",G1,[e.userInfo?.photo?(l(),d("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,W1)):p("v-if",!0),o("div",null,[o("h2",null,[y(c(e.userInfo?.username)+" ",1),o("span",K1,[o("span",{class:A(["status-dot",{"status-ready":e.userInfo?.status=="active","status-removed":e.userInfo?.status!="active"}])},null,2),o("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,Y1)]),e.userInfo?.isAdmin?(l(),d("span",J1,"Admin")):p("v-if",!0)]),o("div",Q1,[e.userInfo?.status!=="banned"?(l(),d("button",{key:0,class:"btn btn-sm text-danger",onClick:t[0]||(t[0]=s=>e.banUser())},[...t[24]||(t[24]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),y(" Ban",-1)])])):p("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(l(),d("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=s=>e.activateUser())},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),y(" Activate",-1)])])):p("v-if",!0),e.userInfo?.isAdmin?p("v-if",!0):(l(),d("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=s=>e.promoteUser())},[...t[26]||(t[26]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user-shield"})],-1),y(" Promote to admin",-1)])])),e.userInfo?.isAdmin?(l(),d("button",{key:3,class:"btn btn-sm text-danger",onClick:t[3]||(t[3]=s=>e.demoteUser())},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user-minus"})],-1),y(" Remove admin",-1)])])):p("v-if",!0)])])]),o("div",X1,[t[30]||(t[30]=o("div",{class:"detail-label"},"ID",-1)),o("div",Z1,c(e.userInfo?._id),1),t[31]||(t[31]=o("div",{class:"detail-label"},"Email",-1)),o("div",x1,c(e.userInfo?.emails?.[0]?.email),1),t[32]||(t[32]=o("div",{class:"detail-label"},"Access token",-1)),o("div",ew,c(e.userInfo?.accessTokens?.github),1),t[33]||(t[33]=o("div",{class:"detail-label"},"GitHub",-1)),o("div",tw,[o("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[28]||(t[28]=o("i",{class:"fab fa-github"},null,-1)),y(" "+c(e.userInfo?.username),1)],8,ow)]),t[34]||(t[34]=o("div",{class:"detail-label"},"Created",-1)),o("div",sw,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[35]||(t[35]=o("div",{class:"detail-label"},"Last connection",-1)),o("div",nw,[e.userInfo?.accessTokenDates?.github?(l(),d("span",rw,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):p("v-if",!0),e.userInfo?.accessTokenDates?.github?p("v-if",!0):(l(),d("span",iw,"never"))]),t[36]||(t[36]=o("div",{class:"detail-label"},"GitHub repos",-1)),o("div",aw,[y(c(e.userInfo?.repositories?.length)+" repositories ",1),o("button",{class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=s=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide":"Show"),1),o("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=s=>e.getGitHubRepositories())},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Refresh ",-1)])])])]),e.showRepos?(l(),d("div",lw,[t[39]||(t[39]=o("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),o("div",dw,[(l(!0),d(X,null,ae(e.userInfo?.repositories,(s,i)=>(l(),d("div",uw,[o("div",cw,[t[37]||(t[37]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",pw,[o("span",{class:"repo-name",textContent:c(s?.name)},null,8,fw)])]),o("div",hw,[t[38]||(t[38]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-database"})],-1)),y(" "+c(e.fmt?.humanFileSize(s?.size)),1)])]))),256))])])):p("v-if",!0)])):p("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",mw,[t[40]||(t[40]=o("h2",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-key"})]),y(" API tokens")],-1)),o("span",vw,c(e.tokens?.length),1)])):p("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",gw,[t[46]||(t[46]=o("p",{class:"paper-page-lede"},[y("Personal API tokens for this admin account. Send as "),o("code",null,"Authorization: Bearer "),y(" to authenticate without GitHub OAuth (useful for development).")],-1)),N((l(),d("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=he(s=>e.submitForm(s,()=>{e.createToken()}),["prevent"]))},[N(o("input",yw,null,512),[[n,{state:e.viewState,set:s=>{e.tokenForm.name=s},value:e.tokenForm?.name,form:null,options:{}}]]),t[41]||(t[41]=o("button",{type:"submit",class:"btn btn-primary"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})]),y(" Generate")],-1))],32)),[[r,e.viewState]]),e.tokenForm?.plaintext?(l(),d("div",bw,[t[42]||(t[42]=o("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),o("pre",ww,c(e.tokenForm?.plaintext),1),o("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=s=>e.tokenForm.plaintext=null)},"Dismiss")])):p("v-if",!0),e.tokens?.length?(l(),d("div",kw,[t[44]||(t[44]=o("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[o("div",{role:"columnheader"},"Name"),o("div",{role:"columnheader"},"Created"),o("div",{role:"columnheader"},"Last used"),o("div",{role:"columnheader","aria-label":"Actions"})],-1)),(l(!0),d(X,null,ae(e.tokens,(s,i)=>(l(),d("div",Ew,[o("div",{role:"cell",textContent:c(s?.name)},null,8,Cw),o("div",{role:"cell",textContent:c(e.fmt?.humanTime(s?.createdAt))},null,8,_w),o("div",Sw,[s?.lastUsedAt?(l(),d("span",Nw,c(e.fmt?.humanTime(s?.lastUsedAt)),1)):p("v-if",!0),s?.lastUsedAt?p("v-if",!0):(l(),d("span",Dw,"never"))]),o("div",Rw,[o("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:a=>e.revokeToken(s)},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)])],8,Tw)])]))),256))])):p("v-if",!0),e.tokens?.length?p("v-if",!0):(l(),d("div",Aw,[...t[45]||(t[45]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No tokens yet.",-1)])]))])):p("v-if",!0),o("div",Ow,[t[47]||(t[47]=o("h2",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})]),y(" Anonymized repositories")],-1)),o("span",Iw,c(e.repositories?.length),1)]),o("div",Pw,[o("span",Vw,c(e.fmt?.number(e.repositories?.length)),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.filters?.status?.ready===!1}]),title:"Toggle ready filter",onClick:t[8]||(t[8]=s=>e.filters.status.ready=!e.filters.status.ready),"aria-pressed":e.filters?.status?.ready===!1},[t[48]||(t[48]=y("Ready ",-1)),o("span",Mw,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,qw),o("button",{type:"button",class:A(["summary-pill warn",{active:e.filters?.status?.preparing===!1}]),title:"Toggle preparing filter",onClick:t[9]||(t[9]=s=>e.filters.status.preparing=!e.filters.status.preparing),"aria-pressed":e.filters?.status?.preparing===!1},[t[49]||(t[49]=y("Preparing ",-1)),o("span",Lw,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],10,$w),o("button",{type:"button",class:A(["summary-pill error",{active:e.filters?.status?.error===!1}]),title:"Toggle errored filter",onClick:t[10]||(t[10]=s=>e.filters.status.error=!e.filters.status.error),"aria-pressed":e.filters?.status?.error===!1},[t[50]||(t[50]=y("Errored ",-1)),o("span",Fw,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,Uw),o("button",{type:"button",class:A(["summary-pill",{active:e.filters?.status?.expired===!1}]),title:"Toggle expired filter",onClick:t[11]||(t[11]=s=>e.filters.status.expired=!e.filters.status.expired),"aria-pressed":e.filters?.status?.expired===!1},[t[51]||(t[51]=y("Expired ",-1)),o("span",Hw,c(e.fmt?.number(e.statusCountFor("expired"))),1)],10,zw),o("button",{type:"button",class:A(["summary-pill",{active:e.filters?.status?.removed===!1}]),title:"Toggle removed filter",onClick:t[12]||(t[12]=s=>e.filters.status.removed=!e.filters.status.removed),"aria-pressed":e.filters?.status?.removed===!1},[t[52]||(t[52]=y("Removed ",-1)),o("span",Bw,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,jw)]),N((l(),d("form",Gw,[o("div",Ww,[o("div",Kw,[N(o("input",Yw,null,512),[[n,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),t[54]||(t[54]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[13]||(t[13]=s=>e.exportCsv())},[...t[53]||(t[53]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),y(" Export",-1)])])])])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",Jw,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[55]||(t[55]=y(" selected",-1))]),o("button",{class:"btn btn-sm",type:"button",onClick:t[14]||(t[14]=s=>e.bulkRefresh())},[...t[56]||(t[56]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Force refresh",-1)])]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[15]||(t[15]=s=>e.bulkRemoveCache())},[...t[57]||(t[57]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),y(" Remove cache",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[16]||(t[16]=s=>e.clearSelection())},"Clear")])):p("v-if",!0),o("div",Qw,[o("div",Xw,[o("div",Zw,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[17]||(t[17]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,xw)]),o("div",ek,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[18]||(t[18]=s=>e.sortBy("source.repositoryName"))},[t[59]||(t[59]=y("Repository ",-1)),e.sortIcon("source.repositoryName")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[58]||(t[58]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",tk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[19]||(t[19]=s=>e.sortBy("status"))},[t[61]||(t[61]=y("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[60]||(t[60]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",ok,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[20]||(t[20]=s=>e.sortBy("pageView"))},[t[63]||(t[63]=y("Views ",-1)),e.sortIcon("pageView")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[62]||(t[62]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",sk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[21]||(t[21]=s=>e.sortBy("anonymizeDate"))},[t[65]||(t[65]=y("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[64]||(t[64]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[66]||(t[66]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,ae(e.filteredRepositories,(s,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error","row-selected":e.selected[s?.repoId]}]),role:"row"},[o("div",nk,[N(o("input",rk,null,512),[[n,{state:e.viewState,set:a=>{e.selected[s.repoId]=a},value:e.selected[s?.repoId],form:null,options:{}}]])]),o("div",ik,[t[71]||(t[71]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",ak,[o("a",{class:"repo-name",target:"_blank",textContent:c(s?.repoId),href:e.safeUrl("/r/"+s?.repoId)},null,8,lk),o("div",dk,[o("a",{textContent:c(s?.source?.fullName),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/")},null,8,uk),s?.options?.update?(l(),d("span",ck,[t[67]||(t[67]=y("\xA0\xB7\xA0",-1)),o("a",{textContent:c(s?.source?.branch),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.branch)},null,8,pk)])):p("v-if",!0),s?.options?.update?p("v-if",!0):(l(),d("span",fk,[t[68]||(t[68]=y("\xA0\xB7\xA0@",-1)),o("a",{textContent:c(s?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.commit)},null,8,hk)])),s?.conference?(l(),d("span",mk,[t[69]||(t[69]=y("\xA0\xB7\xA0",-1)),t[70]||(t[70]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),y(" "+c(s?.conference),1)])):p("v-if",!0),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(s?.size?.storage)),1),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(s?.options?.terms?.length))+" terms",1)])])]),o("div",vk,[o("span",gk,[o("span",{class:A(["status-dot",{"status-removed":s?.status=="removed"||s?.status=="expired","status-ready":s?.status=="ready","status-error":s?.status=="error","status-preparing":s?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(s?.status))},null,8,yk)]),s?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(s?.statusMessage)),title:s?.statusMessage},null,8,bk)):p("v-if",!0)]),o("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(s?.pageView||0))},null,8,wk),o("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(s?.anonymizeDate))},null,8,kk),o("div",Ek,[o("div",Ck,[t[83]||(t[83]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",_k,[o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},[...t[72]||(t[72]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit",-1)])],8,Sk),o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},[...t[73]||(t[73]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View repo",-1)])],8,Nk),s?.options?.page&&s?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+s?.repoId+"/")},[...t[74]||(t[74]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),y(" View page",-1)])],8,Dk)):p("v-if",!0),o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.fetchGithubInfo(s),["prevent"])},[...t[75]||(t[75]=[o("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Rk),t[81]||(t[81]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updateRepository(s),["prevent"])},[...t[76]||(t[76]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Force update",-1)])],8,Tk),[[Y,s?.status=="ready"||s?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updateRepository(s),["prevent"])},[...t[77]||(t[77]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),y(" Enable",-1)])],8,Ak),[[Y,s?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.showStatusMessage(s),["prevent"])},[...t[78]||(t[78]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1),y(" View status message",-1)])],8,Ok),[[Y,s?.statusMessage]]),t[82]||(t[82]=o("div",{class:"dropdown-divider"},null,-1)),o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.removeCache(s),["prevent"])},[...t[79]||(t[79]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),y(" Remove cache",-1)])],8,Ik),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:he(a=>e.removeRepository(s),["prevent"])},[...t[80]||(t[80]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove",-1)])],8,Pk),[[Y,s?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",Vk,[...t[84]||(t[84]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No repositories match the current filters.",-1)])])):p("v-if",!0)])])}var qk={class:"container paper-page admin-page"},Mk={class:"admin-summary"},$k={class:"summary-total"},Lk=["aria-pressed"],Uk={class:"count"},Fk=["aria-pressed"],zk={class:"count"},Hk=["aria-pressed"],jk={class:"count"},Bk={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Gk={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},Wk={class:"admin-filter-row"},Kk={class:"search-wrap"},Yk={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},Jk={key:0,class:"admin-search-hint"},Qk={class:"admin-filter-inline"},Xk={class:"form-control form-control-sm"},Zk={class:"admin-filter-inline","aria-label":"Pagination"},xk=["disabled"],e0={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},t0=["disabled"],o0={key:0,class:"admin-filter-row"},s0={class:"admin-active-chips"},n0={class:"key"},r0=["onClick"],i0={key:1,class:"bulk-bar"},a0={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},l0={class:"paper-table-head admin-users-row",role:"row"},d0={role:"columnheader",style:{width:"28px"}},u0=["checked"],c0={role:"columnheader"},p0={role:"columnheader"},f0={role:"cell",style:{width:"28px"}},h0={type:"checkbox","aria-label":"Select user"},m0={class:"cell-anon",role:"cell"},v0=["src"],g0={class:"anon-text"},y0=["textContent","href"],b0={class:"anon-sub"},w0={key:0},k0={key:1},E0=["href"],C0={key:2},_0={class:"cell-views num",role:"cell"},S0=["textContent","href"],N0={class:"cell-status",role:"cell"},D0=["textContent"],R0={class:"cell-status",role:"cell"},T0={key:0,class:"type-badge type-repo"},A0={key:1,class:"empty-dash"},O0={class:"cell-actions",role:"cell"},I0={class:"dropdown"},P0={class:"dropdown-menu dropdown-menu-right"},V0=["href"],q0=["href"],M0=["onClick"],$0=["onClick"],L0={key:0,class:"paper-table-empty"},U0={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},F0={style:{"font-size":"12px",color:"var(--ink-muted)"}},z0={key:0,class:"pagination-compact"},H0=["disabled"],j0=["max"],B0=["disabled"],G0={class:"admin-filter-inline"},W0={class:"form-control form-control-sm"};function cl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",qk,[t[46]||(t[46]=ce('
Admin \xA0/\xA0 Users

Users

',3)),o("div",Mk,[o("span",$k,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.status=="active"}]),onClick:t[0]||(t[0]=s=>{e.query.status=e.query.status=="active"?"":"active",e.query.page=1}),"aria-pressed":e.query?.status=="active"},[t[13]||(t[13]=y("Active ",-1)),o("span",Uk,c(e.fmt?.number(e.statusCountFor("active"))),1)],10,Lk),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.status=="banned"}]),onClick:t[1]||(t[1]=s=>{e.query.status=e.query.status=="banned"?"":"banned",e.query.page=1}),"aria-pressed":e.query?.status=="banned"},[t[14]||(t[14]=y("Banned ",-1)),o("span",zk,c(e.fmt?.number(e.statusCountFor("banned"))),1)],10,Fk),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.status=="removed"}]),onClick:t[2]||(t[2]=s=>{e.query.status=e.query.status=="removed"?"":"removed",e.query.page=1}),"aria-pressed":e.query?.status=="removed"},[t[15]||(t[15]=y("Removed ",-1)),o("span",jk,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,Hk)]),e.fetchError?(l(),d("div",Bk,[t[16]||(t[16]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",Gk,[o("div",Wk,[o("div",Kk,[N(o("input",Yk,null,512),[[n,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",Jk,"/"))]),o("span",Qk,[t[18]||(t[18]=o("label",null,"Role",-1)),N((l(),d("select",Xk,[...t[17]||(t[17]=[o("option",{value:""},"Any",-1),o("option",{value:"admin"},"Admin",-1)])])),[[n,{state:e.viewState,set:s=>{e.query.role=s},value:e.query?.role,form:null,options:{}}]])]),t[22]||(t[22]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",onClick:t[3]||(t[3]=s=>e.exportCsv())},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),y(" Export",-1)])]),o("span",Zk,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[4]||(t[4]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,xk),o("span",e0,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,t0)])]),e.chips?.length?(l(),d("div",o0,[o("div",s0,[(l(!0),d(X,null,ae(e.chips,(s,i)=>(l(),d("span",{class:"admin-active-chip",key:s?.key},[o("span",n0,c(s?.label),1),o("span",null,c(s?.value),1),o("button",{type:"button",onClick:a=>e.clearFilter(s.key),"aria-label":"Clear filter"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,r0)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",i0,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[24]||(t[24]=y(" selected",-1))]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[6]||(t[6]=s=>e.bulkBan())},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),y(" Ban",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=s=>{e.selected={},e.allSelected=!1})},"Clear")])):p("v-if",!0),o("div",a0,[o("div",l0,[o("div",d0,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[8]||(t[8]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,u0)]),o("div",c0,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="username"}]),onClick:t[9]||(t[9]=s=>e.sortBy("username"))},[t[27]||(t[27]=y("User ",-1)),e.sortIcon("username")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[26]||(t[26]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[30]||(t[30]=o("div",{role:"columnheader",class:"num"},"Repos",-1)),o("div",p0,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=s=>e.sortBy("status"))},[t[29]||(t[29]=y("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[31]||(t[31]=o("div",{role:"columnheader"},"Role",-1)),t[32]||(t[32]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,ae(e.filteredUsers,(s,i)=>(l(),d("div",{class:A(["paper-table-row admin-users-row",{"row-selected":e.selected[s?.username]}]),role:"row"},[o("div",f0,[N(o("input",h0,null,512),[[n,{state:e.viewState,set:a=>{e.selected[s.username]=a},value:e.selected[s?.username],form:null,options:{}}]])]),o("div",m0,[s?.photo?(l(),d("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(s?.photo)},null,8,v0)):p("v-if",!0),o("div",g0,[o("a",{class:"repo-name",textContent:c(s?.username),href:e.safeUrl("/admin/users/"+s?.username)},null,8,y0),o("div",b0,[s?.emails[0].email?(l(),d("span",w0,c(s?.emails[0].email),1)):p("v-if",!0),s?.emails[0].email?(l(),d("span",k0,"\xA0\xB7\xA0")):p("v-if",!0),o("a",{target:"_blank",href:e.safeUrl("https://github.com/"+s?.username)},[t[33]||(t[33]=o("i",{class:"fab fa-github"},null,-1)),y(" "+c(s?.username),1)],8,E0),s?.dateOfEntry?(l(),d("span",C0,"\xA0\xB7\xA0Joined "+c(e.fmt?.humanTime(s?.dateOfEntry)),1)):p("v-if",!0)])])]),o("div",_0,[t[34]||(t[34]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),o("a",{title:"Show this user's repositories",textContent:c(e.fmt?.number(s?.repoCount||0)),href:e.safeUrl("/admin/?owner="+s?.username)},null,8,S0)]),o("div",N0,[o("span",{class:A(["status-dot",{"status-ready":s?.status=="active","status-removed":s?.status=="removed"||s?.status=="banned"}])},null,2),o("span",{textContent:c(e.fmt?.title(s?.status))},null,8,D0)]),o("div",R0,[s?.isAdmin?(l(),d("span",T0,"Admin")):p("v-if",!0),s?.isAdmin?p("v-if",!0):(l(),d("span",A0,"\u2014"))]),o("div",O0,[o("div",I0,[t[40]||(t[40]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",P0,[o("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+s?.username)},[...t[35]||(t[35]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View details",-1)])],8,V0),o("a",{class:"dropdown-item",href:e.safeUrl("/admin/?owner="+s?.username)},[...t[36]||(t[36]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),y(" View repositories",-1)])],8,q0),t[39]||(t[39]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:he(a=>e.banUser(s),["prevent"])},[...t[37]||(t[37]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),y(" Ban",-1)])],8,M0),[[Y,s?.status=="active"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.activateUser(s),["prevent"])},[...t[38]||(t[38]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),y(" Activate",-1)])],8,$0),[[Y,s?.status=="removed"||s?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(l(),d("div",L0,[...t[41]||(t[41]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No users match the current filters.",-1)])])):p("v-if",!0)]),o("div",U0,[o("span",F0,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",z0,[o("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[42]||(t[42]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),y(" Previous",-1)])],8,H0),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,j0),[[n,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[43]||(t[43]=[y("Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,B0)])):p("v-if",!0),o("span",G0,[t[45]||(t[45]=o("label",null,"Per page",-1)),N((l(),d("select",W0,[...t[44]||(t[44]=[o("option",{value:"10"},"10",-1),o("option",{value:"25"},"25",-1),o("option",{value:"50"},"50",-1),o("option",{value:"100"},"100",-1)])])),[[n,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var K0={class:"anonymize-landing"},Y0={class:"anonymize-landing-inner"},J0={class:"form-group mt-4 mb-2"},Q0={class:"source-url-label-row"},X0={key:0,class:"repo-access","aria-label":"GitHub access"},Z0={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},x0=["aria-pressed","disabled"],eE=["aria-pressed","disabled"],tE={key:1,class:"connection-badge"},oE={id:"sourceUrl-landing",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},sE={key:0,class:"draft-status",role:"status"},nE={key:1,class:"text-danger",role:"alert"},rE={key:2,class:"repo-access-details","aria-label":"GitHub access"},iE={class:"repo-access-main"},aE={class:"repo-access-controls"},lE={key:1,class:"connection-link",href:"/connections"},dE={class:"repo-access-note"},uE={key:0},cE={class:"anonymize-workspace"},pE={class:"anonymize-topbar"},fE={class:"anonymize-topbar-inner"},hE={class:"paper-crumbs"},mE={class:"here"},vE={class:"anonymize-topbar-head"},gE={class:"paper-page-title anonymize-topbar-title"},yE={key:0},bE={key:1},wE={key:0,class:"alert alert-info",role:"status"},kE={key:1,class:"alert alert-info",role:"status"},EE={key:1},CE={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},_E=["aria-selected","tabindex"],SE=["aria-selected","tabindex"],NE={key:2,class:"anonymize-preview-empty",id:"workspace-preview",role:"status"},DE={class:"anonymize-split"},RE=["role","aria-labelledby"],TE={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},AE={class:"paper-settings-section"},OE={class:"form-group"},IE={class:"source-url-label-row"},PE={key:0,class:"repo-access","aria-label":"GitHub access"},VE={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},qE=["aria-pressed","disabled"],ME=["aria-pressed","disabled"],$E={key:1,class:"connection-badge"},LE=["disabled"],UE={class:"invalid-feedback"},FE={class:"invalid-feedback"},zE={class:"invalid-feedback"},HE={class:"invalid-feedback"},jE={key:0,class:"repo-access-details","aria-label":"GitHub access"},BE={class:"repo-access-main"},GE={class:"repo-access-controls"},WE={key:1,class:"connection-link",href:"/connections"},KE={class:"repo-access-note"},YE={key:0},JE={key:1,class:"repo-access-details"},QE={key:0,role:"status"},XE={key:2,class:"form-grid-2"},ZE={class:"form-group"},xE={class:"input-group"},eC={class:"form-control",id:"branch",name:"branch"},tC=["textContent","value"],oC={class:"input-group-append"},sC={class:"form-group"},nC=["disabled"],rC={class:"invalid-feedback"},iC={class:"invalid-feedback"},aC={class:"form-check"},lC={class:"form-check-input",type:"checkbox",id:"update",name:"update"},dC={class:"paper-settings-section"},uC={class:"form-group"},cC=["disabled"],pC={class:"form-text text-muted"},fC={class:"invalid-feedback"},hC={class:"form-group"},mC=["disabled"],vC={class:"form-text text-muted"},gC={class:"invalid-feedback"},yC={class:"form-group"},bC=["disabled"],wC={class:"form-text text-muted"},kC={class:"invalid-feedback"},EC={class:"form-group"},CC={class:"form-text text-muted"},_C=["href"],SC={class:"invalid-feedback"},NC={class:"form-text text-muted"},DC={class:"paper-settings-section"},RC={class:"form-group"},TC={class:"form-text text-muted"},AC={class:"warning-feedback"},OC={class:"invalid-feedback"},IC={class:"paper-settings-section"},PC={class:"form-check"},VC={class:"form-check-input",type:"checkbox",id:"link",name:"link"},qC={class:"form-check"},MC={class:"form-check-input",type:"checkbox",id:"image",name:"image"},$C={class:"form-check"},LC={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},UC={class:"form-check"},FC={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},zC={class:"form-check"},HC=["disabled"],jC={key:0,class:"form-text text-muted"},BC={key:1,class:"form-text text-muted"},GC={class:"form-check"},WC={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},KC={class:"form-check"},YC={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},JC={class:"form-check"},QC={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},XC={class:"form-check"},ZC={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},xC={class:"form-check"},e_={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},t_={class:"form-check"},o_={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},s_={class:"form-check"},n_={class:"form-check-input",type:"checkbox",id:"title",name:"title"},r_={class:"form-check"},i_={class:"form-check-input",type:"checkbox",id:"body",name:"body"},a_={class:"form-check"},l_={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},d_={class:"form-check"},u_={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},c_={class:"form-check"},p_={class:"form-check-input",type:"checkbox",id:"username",name:"username"},f_={class:"form-check"},h_={class:"form-check-input",type:"checkbox",id:"date",name:"date"},m_={class:"form-check"},v_={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},g_={class:"paper-settings-section"},y_={class:"form-grid-2"},b_={class:"form-group"},w_={class:"form-control",id:"expiration",name:"expiration"},k_={class:"form-group"},E_=["min","max"],C_={class:"invalid-feedback"},__={class:"invalid-feedback"},S_={class:"paper-settings-section"},N_={class:"form-group"},D_={style:{position:"relative"}},R_={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},T_={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},A_=["onClick"],O_=["src"],I_=["textContent"],P_=["textContent"],V_={class:"coauthor-list"},q_={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},M_=["src"],$_=["textContent","href"],L_=["onClick"],U_={class:"form-text text-muted"},F_=["textContent"],z_={key:1,class:"draft-status",role:"status"},H_={key:2,class:"draft-status"},j_={key:3,class:"anonymize-review-note"},B_={class:"anonymize-submit-bar"},G_=["disabled"],W_=["disabled"],K_=["disabled"],Y_=["disabled"],J_=["disabled"],Q_=["disabled"],X_=["role","aria-labelledby"],Z_={class:"anonymize-preview-head"},x_={class:"anonymize-preview-sub"},e2={key:0,class:"anonymize-preview-status",role:"status"},t2={key:1,class:"anonymize-preview-status",role:"status"},o2={key:2,class:"anonymize-preview-status",role:"alert"},s2={key:3,class:"anonymize-preview-status"},n2=["innerHTML"],r2=["role","aria-labelledby"],i2={class:"anonymize-preview-head"},a2={class:"anonymize-preview-sub"},l2={key:0,class:"anonymize-preview-status",role:"status"},d2={key:1,class:"anonymize-preview-status",role:"status"},u2={key:2,class:"anonymize-preview-status",role:"alert"},c2={key:3,class:"anonymize-preview-body"},p2={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},f2={class:"pr-title mb-1"},h2={key:0},m2=["textContent"],v2={key:0},g2={key:1},y2={key:2},b2={class:"pr-comments mt-3"},w2={class:"pr-comment"},k2={class:"pr-comment-head"},E2=["textContent"],C2={key:0,class:"pr-comment-date"},_2={key:3},S2={class:"pr-comments"},N2={class:"pr-comment"},D2={class:"pr-comment-head"},R2={key:0,class:"pr-comment-author"},T2=["textContent"],A2=["textContent"],O2={key:0,class:"pr-comment-body"},I2=["role","aria-labelledby"],P2={class:"anonymize-preview-head"},V2={class:"anonymize-preview-sub"},q2={key:0,class:"anonymize-preview-status",role:"status"},M2={key:1,class:"anonymize-preview-status",role:"status"},$2={key:2,class:"anonymize-preview-status",role:"alert"},L2={key:3,class:"anonymize-preview-body"},U2={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},F2={class:"pr-title mb-1"},z2={key:0},H2=["textContent"],j2={key:0},B2={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--paper-bg-alt)"}},G2={key:2,class:"paper-tabs",role:"tablist"},W2=["aria-selected","tabindex"],K2=["aria-selected","tabindex"],Y2=["textContent"],J2={key:3,class:"anonymize-preview-status"},Q2={class:"paper-tab-content"},X2={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},Z2=["innerHTML"],x2={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},eS={class:"pr-comments"},tS={class:"pr-comment"},oS={class:"pr-comment-head"},sS={key:0,class:"pr-comment-author"},nS=["textContent"],rS=["textContent"],iS={key:0,class:"pr-comment-body"};function pl(e,t){let n=We("gist-file"),r=We("markdown"),s=ye("field"),i=ye("form");return l(),d("div",{class:A(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview"}])},[p(" ===== STATE 1: No URL \u2014 centered input ===== "),N(o("div",K0,[o("div",Y0,[t[36]||(t[36]=o("div",{class:"paper-crumbs"},[y("My work \xA0/\xA0 "),o("span",{class:"here"},"New anonymization")],-1)),t[37]||(t[37]=o("h1",{class:"paper-page-title"},[y("New "),o("em",null,"anonymization")],-1)),t[38]||(t[38]=o("p",{class:"paper-page-lede"}," Paste a GitHub repository, pull-request, or gist URL. We\u2019ll fetch it, redact the terms you choose in text files, and give you a share link. Images and PDFs are served unchanged when enabled. Review them before sharing. ",-1)),o("div",J0,[o("div",Q0,[t[32]||(t[32]=o("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",X0,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",Z0,[o("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=a=>e.chooseGitHubConnection("github-app"))},[...t[31]||(t[31]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(),o("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,x0),o("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,eE)])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",tE,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):p("v-if",!0)])):p("v-if",!0)]),N(o("input",oE,null,512),[[s,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]])]),e.draftRestored?(l(),d("div",sE,[t[33]||(t[33]=y("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[2]||(t[2]=a=>e.discardDraft())},"Discard draft")])):p("v-if",!0),e.sourceUrlError?(l(),d("p",nE,c(e.sourceUrlError),1)):p("v-if",!0),t[39]||(t[39]=o("small",{class:"form-text",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",rE,[o("div",iE,[o("div",aE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=a=>e.grantGitHubAccess())},[...t[34]||(t[34]=[y("Manage access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",lE,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):p("v-if",!0)])]),o("div",dE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",uE,"Select repositories on GitHub, then return here.")):p("v-if",!0),t[35]||(t[35]=o("span",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),y(" Selected content will be published, including content from private repositories.")],-1))])])):p("v-if",!0)])],512),[[Y,!e.workspaceOpen&&!e.isUpdate]]),p(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),N(o("div",cE,[o("header",pE,[o("div",fE,[o("div",hE,[t[40]||(t[40]=o("a",{href:"/dashboard"},"My work",-1)),t[41]||(t[41]=y(" \xA0/\xA0 ",-1)),o("span",mE,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),o("div",vE,[o("h1",gE,[e.isUpdate?p("v-if",!0):(l(),d("span",yE,[...t[42]||(t[42]=[y("New ",-1),o("em",null,"anonymization",-1)])])),e.isUpdate?(l(),d("span",bE,[...t[43]||(t[43]=[y("Edit ",-1),o("em",null,"anonymization",-1)])])):p("v-if",!0)]),N(o("span",{class:A(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repo":e.detectedType==="pr"?"PR":"Gist"),3),[[Y,e.detectedType]])])])]),e.detectedType==="gist"&&e.gistAppRequired?(l(),d("aside",wE,[t[44]||(t[44]=o("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),o("button",{type:"button",class:"btn btn-ink",onClick:t[4]||(t[4]=a=>e.connectGistApp())},"Connect GitHub App to access gists")])):p("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(l(),d("aside",kE,[t[45]||(t[45]=o("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[46]||(t[46]=o("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(l(),d("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[5]||(t[5]=a=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(l(),d("p",EE,"GitHub OAuth is currently unavailable. Please try again later."))])):p("v-if",!0),o("nav",CE,[o("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[6]||(t[6]=a=>e.previewTabKeydown(a)),onClick:t[7]||(t[7]=a=>e.selectMobilePane("settings"))},"Settings",40,_E),o("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[8]||(t[8]=a=>e.previewTabKeydown(a)),onClick:t[9]||(t[9]=a=>e.selectMobilePane("preview"))},"Reviewer preview",40,SE)]),e.detectedType!=="repo"&&!e.details?(l(),d("div",NE,c(e.sourceLoading?"Loading source\u2026":"Choose an accessible source to see its preview."),1)):p("v-if",!0),o("div",DE,[p(" Form column (left) "),o("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[N((l(),d("form",TE,[o("section",AE,[t[57]||(t[57]=o("div",{class:"paper-section-eyebrow"},"Source",-1)),o("div",OE,[o("div",IE,[t[48]||(t[48]=o("label",{class:"paper-field-label",for:"sourceUrl"},"GitHub URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",PE,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",VE,[o("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[10]||(t[10]=a=>e.chooseGitHubConnection("github-app"))},[...t[47]||(t[47]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(),o("span",{class:"sr-only"},"Read-only ",-1),y("GitHub App",-1)])],8,qE),o("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[11]||(t[11]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,ME)])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",$E,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):p("v-if",!0)])):p("v-if",!0)]),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,LE),[[s,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),N(o("div",UE," Please provide a valid GitHub URL. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.github]]),N(o("div",FE," Not accessible. The organization may restrict access. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.access]]),N(o("div",zE," Does not exist or is not accessible. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.missing]]),N(o("div",HE," Already anonymized. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.used]])]),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",jE,[o("div",BE,[o("div",GE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=a=>e.grantGitHubAccess())},[...t[49]||(t[49]=[y("Manage access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",WE,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):p("v-if",!0)])]),o("div",KE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",YE,"Select repositories on GitHub, then return here.")):p("v-if",!0),t[50]||(t[50]=o("span",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),y(" Selected content will be published, including content from private repositories.")],-1))])])):p("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(l(),d("aside",JE,[t[51]||(t[51]=o("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[13]||(t[13]=a=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(l(),d("p",QE,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):p("v-if",!0)])):p("v-if",!0),e.detectedType==="repo"?(l(),d("div",XE,[o("div",ZE,[t[53]||(t[53]=o("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),o("div",xE,[N((l(),d("select",eC,[(l(!0),d(X,null,ae(e.branches,(a,u)=>(l(),d("option",{textContent:c(a?.name),value:a?.name},null,8,tC))),256))])),[[s,{state:e.viewState,set:a=>{e.source.branch=a},value:e.source?.branch,form:"anonymize",options:{}}]]),o("div",oC,[o("button",{class:"btn btn-icon",type:"button",title:"Refresh","data-toggle":"tooltip","data-placement":"bottom",onClick:t[14]||(t[14]=a=>e.getBranches(!0)),"aria-label":"Refresh"},[...t[52]||(t[52]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])])])]),o("div",sC,[t[54]||(t[54]=o("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,nC),[[s,{state:e.viewState,set:a=>{e.source.commit=a},value:e.source?.commit,form:"anonymize",options:{}}]]),N(o("div",rC," The commit SHA is not valid. ",512),[[Y,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),N(o("div",iC," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Y,e.anonymize?.commit?.errors?.exists]])])])):p("v-if",!0),N(o("div",aC,[N(o("input",lC,null,512),[[s,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"anonymize",options:{}}]]),t[55]||(t[55]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[56]||(t[56]=o("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))],512),[[Y,e.detectedType]])]),N(o("section",dC,[t[68]||(t[68]=o("div",{class:"paper-section-eyebrow"},"Identity",-1)),N(o("div",uC,[t[60]||(t[60]=o("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,cC),[[s,{state:e.viewState,set:a=>{e.repoId=a},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",pC,[t[58]||(t[58]=y("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/r/"+c(e.repoId),1),t[59]||(t[59]=y(".",-1))]),N(o("div",fC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.repoId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[Y,e.anonymize?.repoId?.errors?.used]])],512),[[Y,e.detectedType==="repo"]]),N(o("div",hC,[t[63]||(t[63]=o("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,mC),[[s,{state:e.viewState,set:a=>{e.pullRequestId=a},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",vC,[t[61]||(t[61]=y("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/pr/"+c(e.pullRequestId),1),t[62]||(t[62]=y(".",-1))]),N(o("div",gC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.pullRequestId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[Y,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Y,e.detectedType==="pr"]]),N(o("div",yC,[t[66]||(t[66]=o("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,bC),[[s,{state:e.viewState,set:a=>{e.gistId=a},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",wC,[t[64]||(t[64]=y("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/gist/"+c(e.gistId),1),t[65]||(t[65]=y(".",-1))]),N(o("div",kC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.gistId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[Y,e.anonymize?.gistId?.errors?.used]])],512),[[Y,e.detectedType==="gist"]]),o("div",EC,[t[67]||(t[67]=o("label",{class:"paper-field-label",for:"conference"},[y("Conference "),o("span",{class:"paper-optional"},"(optional)")],-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[s,{state:e.viewState,set:a=>{e.conference=a},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),N(o("small",CC,[o("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,_C),y(" expires "+c(e.fmt?.date(e.conference_data?.endDate))+". ",1)],512),[[Y,e.conference_data]]),N(o("div",SC,"The conference is not activated.",512),[[Y,e.anonymize?.conference?.errors?.activated]]),N(o("small",NC,"Link to a conference to apply its shared defaults.",512),[[Y,!e.conference_data]])])],512),[[Y,e.detectedType]]),N(o("section",DC,[t[76]||(t[76]=o("div",{class:"paper-section-eyebrow"},"Anonymization",-1)),o("div",RC,[t[75]||(t[75]=o("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),N(o("textarea",{class:A(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"4"},null,2),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),o("small",TC,[t[69]||(t[69]=y("One term per line (regex allowed). Replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[70]||(t[70]=y(", or use ",-1)),t[71]||(t[71]=o("code",null,"term=>replacement",-1)),t[72]||(t[72]=y(" to pick your own (e.g. ",-1)),t[73]||(t[73]=o("code",null,"Anonymous=>ABC",-1)),t[74]||(t[74]=y(").",-1))]),N(o("div",AC,"Regex characters detected. Escape them if unintentional.",512),[[Y,e.termsRegexWarning]]),N(o("div",OC,"Terms are in an invalid format.",512),[[Y,e.anonymize?.terms?.errors?.format]])])],512),[[Y,e.detectedType]]),N(o("section",IC,[t[97]||(t[97]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),N(o("div",null,[o("div",PC,[N(o("input",VC,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[77]||(t[77]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),o("div",qC,[N(o("input",MC,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[78]||(t[78]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[79]||(t[79]=o("small",{class:"form-text text-muted"},"Images are served unchanged and may contain names or affiliations.",-1))]),o("div",$C,[N(o("input",LC,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[80]||(t[80]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[81]||(t[81]=o("small",{class:"form-text text-muted"},[y("PDF contents and metadata are served unchanged. "),o("a",{href:"/faq#formats"},"About supported formats")],-1))]),o("div",UC,[N(o("input",FC,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[82]||(t[82]=o("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),o("div",zC,[N(o("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,HC),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[83]||(t[83]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?p("v-if",!0):(l(),d("small",jC,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(l(),d("small",BC,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):p("v-if",!0)])],512),[[Y,e.detectedType==="repo"]]),N(o("div",null,[o("div",GC,[N(o("input",WC,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[84]||(t[84]=o("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),o("div",KC,[N(o("input",YC,null,512),[[s,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[85]||(t[85]=o("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),o("div",JC,[N(o("input",QC,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[86]||(t[86]=o("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),o("div",XC,[N(o("input",ZC,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[87]||(t[87]=o("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),o("div",xC,[N(o("input",e_,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[88]||(t[88]=o("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),o("div",t_,[N(o("input",o_,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[89]||(t[89]=o("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Y,e.detectedType==="gist"]]),N(o("div",null,[o("div",s_,[N(o("input",n_,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[90]||(t[90]=o("label",{class:"form-check-label",for:"title"},"PR title",-1))]),o("div",r_,[N(o("input",i_,null,512),[[s,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[91]||(t[91]=o("label",{class:"form-check-label",for:"body"},"PR body",-1))]),o("div",a_,[N(o("input",l_,null,512),[[s,{state:e.viewState,set:a=>{e.options.diff=a},value:e.options?.diff,form:"anonymize",options:{}}]]),t[92]||(t[92]=o("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),o("div",d_,[N(o("input",u_,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[93]||(t[93]=o("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),o("div",c_,[N(o("input",p_,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[94]||(t[94]=o("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),o("div",f_,[N(o("input",h_,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[95]||(t[95]=o("label",{class:"form-check-label",for:"date"},"Dates",-1))]),o("div",m_,[N(o("input",v_,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[96]||(t[96]=o("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[Y,e.detectedType==="pr"]])],512),[[Y,e.detectedType]]),N(o("section",g_,[t[101]||(t[101]=o("div",{class:"paper-section-eyebrow"},"Expiration",-1)),o("div",y_,[o("div",b_,[t[99]||(t[99]=o("label",{class:"paper-field-label",for:"expiration"},"Strategy",-1)),N((l(),d("select",w_,[...t[98]||(t[98]=[o("option",{value:"redirect"},"Redirect to GitHub when expired",-1),o("option",{value:"remove",selected:""},"Remove when expired",-1)])])),[[s,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"anonymize",options:{}}]])]),o("div",k_,[t[100]||(t[100]=o("label",{class:"paper-field-label",for:"expirationDate"},"Expiration date",-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,E_),[[s,{state:e.viewState,set:a=>{e.options.expirationDate=a},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),N(o("div",C_,"Pick a date in the future.",512),[[Y,e.anonymize?.expirationDate?.errors?.min]]),N(o("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[Y,e.anonymize?.expirationDate?.errors?.max]]),N(o("div",__,"Enter a valid expiration date.",512),[[Y,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the content will be removed.",513),[[Y,e.options?.expirationMode=="remove"&&e.options?.expirationDate]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", visitors will be redirected to GitHub.",513),[[Y,e.options?.expirationMode=="redirect"&&e.options?.expirationDate]])],512),[[Y,e.detectedType]]),N(o("section",S_,[t[105]||(t[105]=o("div",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[106]||(t[106]=o("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),N(o("div",N_,[t[102]||(t[102]=o("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),o("div",D_,[N(o("input",R_,null,512),[[s,{state:e.viewState,set:a=>{e.coauthorSearch=a},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),N(o("div",T_,[(l(!0),d(X,null,ae(e.coauthorResults,(a,u)=>(l(),d("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:he(f=>e.addCoauthor(a,f),["prevent"])},[o("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(a?.photo)},null,8,O_),o("span",{textContent:c(a?.username)},null,8,I_)],8,A_))),256))],512),[[Y,e.coauthorResults?.length>0]])]),N(o("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,P_),[[Y,e.coauthorError]])],512),[[Y,e.role==="owner"||e.role==="admin"]]),o("div",V_,[(l(!0),d(X,null,ae(e.coauthors,(a,u)=>(l(),d("div",q_,[a?.photo?(l(),d("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(a?.photo)},null,8,M_)):p("v-if",!0),o("a",{target:"_blank",textContent:c(a?.username),href:e.safeUrl("https://github.com/"+a?.username)},null,8,$_),t[104]||(t[104]=o("span",{class:"type-badge type-coauthor"},"Co-author",-1)),N(o("button",{type:"button",class:"btn btn-sm btn-icon",style:{"margin-left":"auto"},title:"Remove co-author",onClick:f=>e.removeCoauthor(a),"aria-label":"Remove co-author"},[...t[103]||(t[103]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,L_),[[Y,e.role==="owner"||e.role==="admin"]])]))),256)),N(o("div",U_," No co-authors yet. ",512),[[Y,!e.coauthors||e.coauthors?.length===0]])])],512),[[Y,e.isUpdate&&e.detectedType==="repo"]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,F_)):p("v-if",!0),e.draftRestored?(l(),d("div",z_,[t[107]||(t[107]=y("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[15]||(t[15]=a=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(l(),d("div",H_,[y(c(e.draftSaved?"Draft saved in this tab for 30 minutes.":"Unsaved changes. Keep this tab open until you save.")+" ",1),o("button",{type:"button",class:"draft-discard",onClick:t[16]||(t[16]=a=>e.discardDraft())},c(e.isUpdate?"Restore saved settings":"Discard changes"),1)])):p("v-if",!0),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",j_,"Review enabled images and PDFs before sharing. Their contents are not anonymized.")):p("v-if",!0),o("button",{type:"button",class:"btn btn-outline-ink mobile-preview-jump",onClick:t[17]||(t[17]=a=>e.selectMobilePane("preview"))},[...t[108]||(t[108]=[y("Review preview ",-1),o("span",{"aria-hidden":"true"},"\u2192",-1)])]),N(o("div",B_,[e.detectedType==="repo"&&!e.isUpdate?(l(),d("button",{key:0,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[18]||(t[18]=he(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[109]||(t[109]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(" Anonymize Repository ",-1)])],8,G_)):p("v-if",!0),e.detectedType==="repo"&&e.isUpdate?(l(),d("button",{key:1,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[19]||(t[19]=he(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[110]||(t[110]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),y(" Update Repository ",-1)])],8,W_)):p("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(l(),d("button",{key:2,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[20]||(t[20]=he(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[111]||(t[111]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(" Anonymize Pull Request ",-1)])],8,K_)):p("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(l(),d("button",{key:3,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[21]||(t[21]=he(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[112]||(t[112]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),y(" Update Pull Request ",-1)])],8,Y_)):p("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(l(),d("button",{key:4,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[22]||(t[22]=he(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[113]||(t[113]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(" Anonymize Gist ",-1)])],8,J_)):p("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(l(),d("button",{key:5,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[23]||(t[23]=he(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[114]||(t[114]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),y(" Update Gist ",-1)])],8,Q_)):p("v-if",!0)],512),[[Y,e.detectedType]])])),[[i,e.viewState]])],8,RE),p(" Preview column (right) "),e.detectedType==="repo"?(l(),d("div",{key:0,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",Z_,[t[115]||(t[115]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",x_,c(e.previewStatus==="ready"?"README with redactions applied":"README preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",e2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",t2,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",o2,[t[116]||(t[116]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[24]||(t[24]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),!e.sourceLoading&&!e.readme&&e.previewStatus==="idle"?(l(),d("div",s2,"No README is available to preview. Review the published files before sharing.")):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",{key:4,class:"anonymize-preview-body markdown-body body",innerHTML:e.sanitize(e.html_readme)},null,8,n2)):p("v-if",!0)],8,X_)):p("v-if",!0),e.detectedType==="gist"&&e.details?(l(),d("div",{key:1,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",i2,[t[117]||(t[117]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",a2,c(e.previewStatus==="ready"?"Gist with redactions applied":"Gist preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",l2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",d2,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",u2,[t[118]||(t[118]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[25]||(t[25]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",c2,[o("div",p2,[o("h2",f2,[e.options?.title?(l(),d("span",h2,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,m2)):p("v-if",!0)]),e.options?.origin?(l(),d("small",v2,"Gist ID: "+c(e.details?.source?.gistId),1)):p("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(l(),d("small",g2,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):p("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(l(),d("div",y2,[o("ul",b2,[(l(!0),d(X,null,ae(e.previewGistFiles,(a,u)=>(l(),d("li",w2,[o("div",k2,[o("strong",{textContent:c(a?.filename)},null,8,E2),a?.language?(l(),d("span",C2,c(a?.language),1)):p("v-if",!0)]),Ce(n,{file:a,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):p("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(l(),d("div",_2,[t[121]||(t[121]=o("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),o("ul",S2,[(l(!0),d(X,null,ae(e.details?.gist?.comments,(a,u)=>(l(),d("li",N2,[o("div",D2,[e.options?.username?(l(),d("span",R2,[t[119]||(t[119]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[120]||(t[120]=y(" @",-1)),o("span",{textContent:c(e.anonymizeGistContent(a?.author))},null,8,T2)])):p("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,A2)):p("v-if",!0)]),e.options?.body?(l(),d("div",O2,[Ce(r,{content:e.anonymizeGistContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0)]))),256))])])):p("v-if",!0)])):p("v-if",!0)],8,r2)):p("v-if",!0),e.detectedType==="pr"&&e.details?(l(),d("div",{key:2,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",P2,[t[122]||(t[122]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",V2,c(e.previewStatus==="ready"?"Pull request with redactions applied":"Pull request preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",q2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",M2,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",$2,[t[123]||(t[123]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[26]||(t[26]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",L2,[o("div",U2,[o("h2",F2,[e.options?.title?(l(),d("span",z2,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,H2)):p("v-if",!0)]),e.options?.origin?(l(),d("small",j2,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):p("v-if",!0),e.options?.body?(l(),d("div",B2,[Ce(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0),e.options?.diff||e.options?.comments?(l(),d("nav",G2,[e.options?.diff?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",id:"preview-pr-diff-tab","aria-selected":e.prTabState?.active==="diff","aria-controls":"preview-pr-diff-panel",tabindex:e.prTabState?.active==="diff"?0:-1,onKeydown:t[27]||(t[27]=a=>e.previewTabKeydown(a)),onClick:t[28]||(t[28]=a=>e.prTabState.active="diff")},[...t[124]||(t[124]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),y(" Diff ",-1)])],42,W2)):p("v-if",!0),e.options?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",id:"preview-pr-comments-tab","aria-selected":e.prTabState?.active==="comments","aria-controls":"preview-pr-comments-panel",tabindex:e.prTabState?.active==="comments"?0:-1,onKeydown:t[29]||(t[29]=a=>e.previewTabKeydown(a)),onClick:t[30]||(t[30]=a=>e.prTabState.active="comments")},[t[125]||(t[125]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,Y2)],42,K2)):p("v-if",!0)])):p("v-if",!0),!e.options?.diff&&!e.options?.comments?(l(),d("div",J2,"Diff and comments are hidden by your display settings.")):p("v-if",!0),o("div",Q2,[e.options?.diff&&e.prTabState?.active=="diff"?(l(),d("div",X2,[o("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,Z2)])):p("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(l(),d("div",x2,[o("ul",eS,[(l(!0),d(X,null,ae(e.details?.pullRequest?.comments,(a,u)=>(l(),d("li",tS,[o("div",oS,[e.options?.username?(l(),d("span",sS,[t[126]||(t[126]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[127]||(t[127]=y(" @",-1)),o("span",{textContent:c(e.anonymizePrContent(a?.author))},null,8,nS)])):p("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,rS)):p("v-if",!0)]),e.options?.body?(l(),d("div",iS,[Ce(r,{content:e.anonymizePrContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0)]))),256))])])):p("v-if",!0)])])):p("v-if",!0)],8,I2)):p("v-if",!0)])],512),[[Y,e.workspaceOpen||e.isUpdate]])],2)}var aS={class:"container-fluid h-100 anonymize-page"},lS={class:"row h-100 flex-column flex-md-row"},dS={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},uS={class:"form-group"},cS={class:"form-group"},pS={class:"form-check"},fS={class:"form-check-input",type:"checkbox",id:"update",name:"update"},hS={class:"form-group"},mS={class:"form-text text-muted"},vS=["href"],gS={class:"invalid-feedback"},yS={class:"form-text text-muted"},bS={class:"form-group"},wS={id:"idHelp",class:"form-text text-muted"},kS={class:"invalid-feedback"},ES={class:"form-group"},CS={class:"invalid-feedback"},_S={class:"form-group"},SS={class:"form-control",id:"expiration",name:"expiration"},NS={class:"form-group",id:"expiration-date-form"},DS={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},RS={class:"accordion mb-3",id:"options"},TS={class:"card"},AS={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},OS={class:"card-body"},IS={class:"form-group mb-0"},PS={class:"form-check"},VS={class:"form-check-input",type:"checkbox",id:"link",name:"link"},qS={class:"form-check"},MS={class:"form-check-input",type:"checkbox",id:"image",name:"image"},$S={class:"form-check"},LS={class:"form-check-input",type:"checkbox",id:"date",name:"date"},US={class:"form-check"},FS={class:"form-check-input",type:"checkbox",id:"username",name:"username"},zS={class:"form-check"},HS={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},jS={class:"form-check"},BS={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},GS={class:"form-check"},WS={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},KS={class:"form-check"},YS={class:"form-check-input",type:"checkbox",id:"title",name:"title"},JS={class:"form-check"},QS={class:"form-check-input",type:"checkbox",id:"body",name:"body"},XS=["textContent"],ZS={class:"anonymize-submit-bar"},xS={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},eN={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},tN={class:"pr-title mb-1"},oN={key:0},sN=["textContent"],nN={key:0},rN={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},iN={class:"nav nav-tabs",id:"myTab",role:"tablist"},aN={key:0,class:"nav-item",role:"presentation"},lN={key:1,class:"nav-item",role:"presentation"},dN=["textContent"],uN={class:"tab-content",id:"pills-tabContent"},cN={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},pN={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},fN={style:{"overflow-x":"auto"}},hN=["innerHTML"],mN={key:0,class:"pr-comments list-group"},vN={class:"pr-comment list-group-item"},gN={class:"d-flex w-100 justify-content-between flex-wrap"},yN={key:0,class:"mb-1"},bN=["textContent"],wN={class:"mb-1"};function fl(e,t){let n=We("markdown"),r=ye("field"),s=ye("form");return l(),d("div",aS,[o("div",lS,[o("div",dS,[o("div",{class:A(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[N((l(),d("form",{class:A(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=ce('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

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

Source
',4)),p(" pullRequestUrl "),o("div",uS,[t[2]||(t[2]=o("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestUrl=i},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.access]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.missing]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.used]])]),N(o("div",null,[o("div",cS,[o("div",pS,[N(o("input",fS,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=o("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=o("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=o("div",{class:"paper-section-eyebrow anonymize-section-title"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})]),y(" Conference ID ")],-1)),p(" Conference "),o("div",hS,[t[5]||(t[5]=o("label",{for:"conference"},[y("Conference ID "),o("span",{class:"text-muted"},"(Optional)")],-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[r,{state:e.viewState,set:i=>{e.conference=i},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),N(o("small",mS,[o("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,vS),y(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[Y,e.conference_data]]),N(o("div",gS," The conference is not activated. ",512),[[Y,e.anonymize?.conference?.errors?.activated]]),N(o("small",yS," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[Y,!e.conference_data]])]),t[27]||(t[27]=o("div",{class:"paper-section-eyebrow anonymize-section-title"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),y(" Anonymization Options ")],-1)),p(" Pull Request ID "),o("div",bS,[t[6]||(t[6]=o("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestId=i},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",wS,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),N(o("div",kS," Repository id can only contain letters and numbers ",512),[[Y,e.anonymize?.pullRequestId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[Y,e.anonymize?.pullRequestId?.errors?.used]])]),p(" Terms "),o("div",ES,[t[7]||(t[7]=o("label",{for:"terms"},"Terms to anonymize",-1)),N(o("textarea",{class:A(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=o("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),N(o("div",CS," Terms are in an invalid format ",512),[[Y,e.anonymize?.terms?.errors?.format]])]),o("div",_S,[t[10]||(t[10]=o("label",{for:"expiration"},"Expiration strategy",-1)),N((l(),d("select",SS,[...t[9]||(t[9]=[o("option",{value:"never",selected:""},"Never expire",-1),o("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),o("option",{value:"remove"},"Remove when expired",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=o("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),N(o("div",NS,[t[12]||(t[12]=o("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),N(o("input",DS,null,512),[[r,{state:e.viewState,set:i=>{e.options.expirationDate=i},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[Y,e.options?.expirationMode=="remove"]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[Y,e.options?.expirationMode=="redirect"]])],512),[[Y,e.options?.expirationMode!="never"]]),o("div",RS,[o("div",TS,[t[25]||(t[25]=ce('

',1)),o("div",AS,[o("div",OS,[o("div",IS,[o("div",PS,[N(o("input",VS,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=o("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),o("div",qS,[N(o("input",MS,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),o("div",$S,[N(o("input",LS,null,512),[[r,{state:e.viewState,set:i=>{e.options.date=i},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=o("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=o("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),o("div",US,[N(o("input",FS,null,512),[[r,{state:e.viewState,set:i=>{e.options.username=i},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=o("label",{class:"form-check-label",for:"username"},"Display username",-1))]),o("div",zS,[N(o("input",HS,null,512),[[r,{state:e.viewState,set:i=>{e.options.comments=i},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=o("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),o("div",jS,[N(o("input",BS,null,512),[[r,{state:e.viewState,set:i=>{e.options.diff=i},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=o("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),o("div",GS,[N(o("input",WS,null,512),[[r,{state:e.viewState,set:i=>{e.options.origin=i},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=o("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),o("div",KS,[N(o("input",YS,null,512),[[r,{state:e.viewState,set:i=>{e.options.title=i},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=o("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),o("div",JS,[N(o("input",QS,null,512),[[r,{state:e.viewState,set:i=>{e.options.body=i},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=o("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[Y,e.pullRequestUrl]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,XS)):p("v-if",!0),N(o("div",ZS,[e.isUpdate?p("v-if",!0):(l(),d("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=he(i=>e.submitForm(i,()=>{e.anonymizePullRequest(i)}),["prevent"]))},[...t[28]||(t[28]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(" Anonymize ",-1)])])),e.isUpdate?(l(),d("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=he(i=>e.submitForm(i,()=>{e.updatePullRequest(i)}),["prevent"]))},[...t[29]||(t[29]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),y(" Update ",-1)])])):p("v-if",!0)],512),[[Y,e.pullRequestUrl]])],2)),[[s,e.viewState]])],2)]),e.details?(l(),d("div",xS,[o("div",eN,[o("h2",tN,[e.options?.title?(l(),d("span",oN,c(e.anonymize(e.details?.pullRequest?.title)),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,sN)):p("v-if",!0)]),e.options?.origin?(l(),d("small",nN,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):p("v-if",!0),e.options?.body?(l(),d("div",rN,[Ce(n,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0),o("ul",iN,[e.options?.diff?(l(),d("li",aN,[...t[31]||(t[31]=[o("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):p("v-if",!0),e.options?.comments?(l(),d("li",lN,[o("button",{class:A(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[o("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,dN)],2)])):p("v-if",!0)]),o("div",uN,[o("div",cN,[e.options?.diff?(l(),d("div",pN,[o("pre",fN,[o("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,hN)])])):p("v-if",!0)]),o("div",{class:A(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(l(),d("ul",mN,[(l(!0),d(X,null,ae(e.details?.pullRequest?.comments,(i,a)=>(l(),d("li",vN,[o("div",gN,[e.options?.username?(l(),d("h5",yN," @"+c(e.anonymize(i?.author)),1)):p("v-if",!0),e.options?.date?(l(),d("small",{key:1,textContent:c(e.fmt?.date(i?.updatedDate))},null,8,bN)):p("v-if",!0)]),o("p",wN,[e.options?.body?(l(),qt(n,{key:0,class:"pr-comment-body",content:e.anonymize(i?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):p("v-if",!0)])]))),256))])):p("v-if",!0)],2)])])):p("v-if",!0)])])}var kN={class:"container paper-page claim-page"},EN={class:"paper-settings-main claim-form"},CN={class:"form-group"},_N={class:"invalid-feedback"},SN={class:"form-group"};function hl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",kN,[t[6]||(t[6]=ce('
My work \xA0/\xA0 Claim

Claim an anonymization

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

',3)),o("div",EN,[t[5]||(t[5]=o("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),N((l(),d("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=he(s=>e.submitForm(s,()=>{e.claim()}),["prevent"]))},[o("div",CN,[t[1]||(t[1]=o("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",required:""},null,2),[[n,{state:e.viewState,set:s=>{e.repoUrl=s},value:e.repoUrl,form:"claimForm",options:{}}]]),N(o("div",_N," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Y,e.claimForm?.repoUrl?.errors?.not_found]])]),o("div",SN,[t[2]||(t[2]=o("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",required:""},null,2),[[n,{state:e.viewState,set:s=>{e.repoId=s},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=o("small",{id:"idHelp",class:"form-text text-muted"},[y("The ID is the last part of the anonymized URL: "),o("code",null,"anonymous.4open.science/r/"),y(".")],-1))]),t[4]||(t[4]=o("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[r,e.viewState]])])])}var NN={class:"container page paper-page conference-page"},DN={class:"paper-crumbs"},RN={class:"here"},TN={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},AN=["textContent"],ON={key:0,class:"paper-page-lede"},IN=["textContent","href"],PN={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},VN=["textContent"],qN=["href"],MN={class:"paper-meta-rule"},$N=["textContent"],LN=["textContent"],UN={key:0},FN={class:"search-wrap"},zN={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search by ID or source repository\u2026",autocomplete:"off"},HN={class:"dashboard-filter-controls"},jN={class:"dropdown"},BN={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},GN={class:"filter-btn-value"},WN={class:"dropdown-menu","aria-labelledby":"dropdownSort"},KN={class:"form-check dropdown-item"},YN={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},JN={class:"form-check dropdown-item"},QN={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},XN={class:"form-check dropdown-item"},ZN={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},xN={class:"form-check dropdown-item"},eD={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},tD={class:"dropdown"},oD={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},sD={key:0,class:"filter-btn-value"},nD={key:1,class:"filter-btn-value"},rD={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},iD={class:"form-check dropdown-item"},aD=["id"],lD=["for"],dD={class:"dashboard-meta"},uD={class:"dashboard-count"},cD={key:0},pD={key:0},fD={key:1},hD={key:1},mD={key:0,class:"filter-chip"},vD=["onClick","aria-label"],gD={class:"paper-table paper-table-repos w-100",role:"table","aria-label":"Repositories"},yD={class:"cell-anon",role:"cell"},bD={class:"anon-text"},wD=["textContent","href"],kD={class:"anon-sub"},ED={class:"anon-source"},CD=["textContent","href"],_D={key:0},SD=["textContent","href"],ND={key:1},DD=["href"],RD={class:"cell-status",role:"cell"},TD={class:"status-line"},AD=["textContent"],OD={key:0,class:"status-sub"},ID={class:"cell-views num",role:"cell"},PD=["textContent"],VD={class:"cell-expires",role:"cell"},qD={key:0,class:"expires-never"},MD=["textContent"],$D={key:2,class:"expires-past"},LD={key:0},UD={key:3,class:"empty-dash","aria-label":"Not applicable"},FD={class:"cell-actions",role:"cell"},zD={class:"dropdown"},HD=["aria-label"],jD={class:"dropdown-menu dropdown-menu-right"},BD=["href"],GD=["href"],WD={key:0,class:"paper-table-empty"},KD={key:0},YD={key:1},JD={key:2,class:"paper-table-empty-actions"};function ml(e,t){let n=ye("field"),r=ye("form");return l(),d("div",NN,[o("div",null,[o("div",DN,[t[2]||(t[2]=o("a",{href:"/dashboard"},"My work",-1)),t[3]||(t[3]=y(" \xA0/\xA0 ",-1)),t[4]||(t[4]=o("a",{href:"/conferences"},"Conferences",-1)),t[5]||(t[5]=y(" \xA0/\xA0 ",-1)),o("span",RN,c(e.conference?.conferenceID),1)]),o("div",TN,[o("div",null,[o("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,AN),e.conference?.url?(l(),d("p",ON,[o("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,IN)])):p("v-if",!0)]),o("div",PN,[o("span",{class:A(["status-pill",{"status-pill-ready":e.conference?.status=="ready","status-pill-removed":e.conference?.status=="removed"||e.conference?.status=="expired"}])},[o("span",{class:A(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),o("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,VN)],2),o("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[6]||(t[6]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit conference",-1)])],8,qN)])]),o("div",MN,[o("span",null,[t[7]||(t[7]=y("ID ",-1)),o("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,$N)]),o("span",null,[t[8]||(t[8]=y("Review window ",-1)),o("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),o("span",null,[t[9]||(t[9]=y("Repositories ",-1)),o("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),o("span",null,[t[10]||(t[10]=y("Plan ",-1)),o("b",{textContent:c(e.conference?.plan?.name||e.conference?.plan?.planID||"Free")},null,8,LN)]),e.conference?.price?(l(),d("span",UN,[t[11]||(t[11]=y("Cost so far ",-1)),o("b",null,c(e.fmt?.number(e.conference?.price,2))+" \u20AC",1)])):p("v-if",!0)]),t[32]||(t[32]=o("div",{class:"paper-section-eyebrow"},"Repositories",-1)),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=he(s=>e.submitForm(s,()=>{s.preventDefault()}),["prevent"]))},[o("div",FN,[N(o("input",zN,null,512),[[n,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),o("div",HN,[o("div",jN,[o("button",BN,[t[12]||(t[12]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",GN,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),o("div",WN,[t[17]||(t[17]=o("h6",{class:"dropdown-header"},"Order by",-1)),o("div",KN,[N(o("input",YN,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[13]||(t[13]=o("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),o("div",JN,[N(o("input",QN,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[14]||(t[14]=o("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),o("div",XN,[N(o("input",ZN,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),o("div",xN,[N(o("input",eD,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[16]||(t[16]=o("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])]),o("div",tD,[o("button",oD,[t[18]||(t[18]=o("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",sD,"All")):p("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?p("v-if",!0):(l(),d("span",nD,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),o("div",rD,[t[19]||(t[19]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,ae(e.statusLabels,(s,i,a)=>(l(),d("div",iD,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,aD),[[n,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+i},c(s),9,lD)]))),256))])])])],32)),[[r,e.viewState]]),o("div",dD,[o("span",uD,[e.filteredRepositories?.length===e.conference?.repositories?.length?(l(),d("span",cD,[y(c(e.fmt?.number(e.conference?.repositories?.length))+" repositor",1),e.conference?.repositories?.length===1?(l(),d("span",pD,"y")):p("v-if",!0),e.conference?.repositories?.length!==1?(l(),d("span",fD,"ies")):p("v-if",!0)])):p("v-if",!0),e.filteredRepositories?.length!==e.conference?.repositories?.length?(l(),d("span",hD,c(e.fmt?.number(e.filteredRepositories?.length))+" of "+c(e.fmt?.number(e.conference?.repositories?.length))+" shown",1)):p("v-if",!0)]),(l(!0),d(X,null,ae(e.filters?.status,(s,i,a)=>(l(),d(X,null,[s===!1?(l(),d("span",mD,[y(" Hiding "+c(e.statusLabels[i])+" ",1),o("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,vD)])):p("v-if",!0)],64))),256))]),o("div",gD,[t[31]||(t[31]=o("div",{class:"paper-table-head",role:"row"},[o("div",{role:"columnheader"},"Repository"),o("div",{role:"columnheader"},"Status"),o("div",{role:"columnheader",class:"num"},"Views"),o("div",{role:"columnheader"},"Expires"),o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(X,null,ae(e.filteredRepositories,(s,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error"}]),role:"row",key:s?.repoId},[o("div",yD,[t[22]||(t[22]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",bD,[o("a",{class:"repo-name",textContent:c(s?.repoId),href:e.safeUrl("/r/"+s?.repoId+"/")},null,8,wD),o("div",kD,[o("span",ED,[o("a",{target:"_blank",rel:"noopener",textContent:c(s?.source?.fullName),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/")},null,8,CD),s?.options?.update&&s?.source?.branch?(l(),d("span",_D,[t[20]||(t[20]=y(" \xB7 ",-1)),o("a",{target:"_blank",rel:"noopener",textContent:c(s?.source?.branch),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.branch)},null,8,SD)])):p("v-if",!0),s?.source?.commit?(l(),d("span",ND,[t[21]||(t[21]=y(" \xB7 ",-1)),o("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.commit)},"@"+c(s?.source?.commit?.substring(0,8)),9,DD)])):p("v-if",!0)])])])]),o("div",RD,[o("div",TD,[o("span",{class:A(["status-dot","status-"+(s?.status=="error"?"error":s?.status=="ready"?"ready":s?.status=="expired"||s?.status=="removed"?s?.status:"progress")]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(s?.status))},null,8,AD)]),s?.anonymizeDate?(l(),d("div",OD,"anonymized "+c(e.fmt?.humanTime(s?.anonymizeDate)),1)):p("v-if",!0)]),o("div",ID,[t[23]||(t[23]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),t[24]||(t[24]=y()),o("span",{textContent:c(e.fmt?.number(s?.pageView))},null,8,PD)]),o("div",VD,[t[26]||(t[26]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),s?.status=="ready"&&(s?.options?.expirationMode==="never"||!s?.options?.expirationDate)?(l(),d("span",qD,"Never")):p("v-if",!0),s?.status=="ready"&&s?.options?.expirationMode!=="never"&&s?.options?.expirationDate?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(s?.options?.expirationDate))},null,8,MD)):p("v-if",!0),s?.status=="expired"?(l(),d("span",$D,[t[25]||(t[25]=y("Expired",-1)),s?.options?.expirationDate?(l(),d("span",LD,c(e.fmt?.humanTime(s?.options?.expirationDate)),1)):p("v-if",!0)])):p("v-if",!0),s?.status!="ready"&&s?.status!="expired"?(l(),d("span",UD,"\u2014")):p("v-if",!0)]),o("div",FD,[o("div",zD,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+s?.repoId},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,HD),o("div",jD,[o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},[...t[28]||(t[28]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View ",-1)])],8,BD),o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit ",-1)])],8,GD)])])])],2))),128)),e.filteredRepositories?.length==0?(l(),d("div",WD,[t[30]||(t[30]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.conference?.repositories?.length?p("v-if",!0):(l(),d("span",KD,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(l(),d("span",YD,"Nothing matches the current filters.")):p("v-if",!0),e.conference?.repositories?.length?(l(),d("div",JD,[o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=s=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")])):p("v-if",!0)])):p("v-if",!0)])])])}var QD={class:"container page paper-page conferences-page"},XD={class:"row"},ZD={class:"w-100"},xD={class:"search-wrap"},eR={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},tR={class:"dashboard-filter-controls"},oR={class:"dropdown"},sR={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},nR={class:"filter-btn-value"},rR={class:"dropdown-menu","aria-labelledby":"dropdownSort"},iR={class:"form-check dropdown-item"},aR={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},lR={class:"form-check dropdown-item"},dR={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},uR={class:"form-check dropdown-item"},cR={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},pR={class:"dropdown"},fR={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},hR={key:0,class:"filter-btn-value"},mR={key:1,class:"filter-btn-value"},vR={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},gR={class:"form-check dropdown-item"},yR=["id"],bR=["for"],wR={class:"dashboard-meta"},kR={class:"dashboard-count"},ER={key:0},CR={key:0},_R={key:1},SR={key:0,class:"filter-chip"},NR=["onClick","aria-label"],DR={key:0,class:"conference-feedback",role:"alert"},RR={key:1,class:"conference-feedback",role:"status"},TR={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},AR={class:"cell-anon",role:"cell"},OR={class:"anon-text"},IR=["textContent","href"],PR={class:"anon-sub"},VR={class:"anon-source"},qR=["textContent"],MR={key:0},$R=["textContent","href"],LR={class:"cell-status",role:"cell"},UR={class:"status-line"},FR=["textContent"],zR={class:"cell-views num",role:"cell"},HR=["textContent"],jR={class:"cell-expires",role:"cell"},BR={key:0},GR={key:1,class:"empty-dash","aria-label":"No review window"},WR={class:"cell-actions",role:"cell"},KR={class:"dropdown"},YR=["disabled","aria-label"],JR={class:"dropdown-menu dropdown-menu-right"},QR=["href"],XR=["href"],ZR={key:0},xR=["onClick"],eT={key:0,class:"paper-table-empty"},tT={key:0},oT={key:1},sT={class:"paper-table-empty-actions"},nT={key:1,href:"/conference/new",class:"btn btn-ink"};function vl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",QD,[o("div",XD,[o("div",ZD,[t[10]||(t[10]=ce('
My work \xA0/\xA0 Conferences

Your conferences

Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.

New conference
',2)),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=he(s=>e.submitForm(s,()=>{s.preventDefault()}),["prevent"]))},[o("div",xD,[N(o("input",eR,null,512),[[n,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),o("div",tR,[o("div",oR,[o("button",sR,[t[3]||(t[3]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",nR,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),o("div",rR,[t[7]||(t[7]=o("h6",{class:"dropdown-header"},"Order by",-1)),o("div",iR,[N(o("input",aR,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=o("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),o("div",lR,[N(o("input",dR,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[5]||(t[5]=o("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),o("div",uR,[N(o("input",cR,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[6]||(t[6]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),o("div",pR,[o("button",fR,[t[8]||(t[8]=o("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",hR,"All")):p("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?p("v-if",!0):(l(),d("span",mR,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),o("div",vR,[t[9]||(t[9]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,ae(e.statusLabels,(s,i,a)=>(l(),d("div",gR,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,yR),[[n,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+i},c(s),9,bR)]))),256))])])])],32)),[[r,e.viewState]]),o("div",wR,[o("span",kR,[e.filteredConferences?.length===e.conferences?.length?(l(),d("span",ER,[y(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(l(),d("span",CR,"s")):p("v-if",!0)])):p("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(l(),d("span",_R,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):p("v-if",!0)]),(l(!0),d(X,null,ae(e.filters?.status,(s,i,a)=>(l(),d(X,null,[s===!1?(l(),d("span",SR,[y(" Hiding "+c(e.statusLabels[i])+" ",1),o("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,NR)])):p("v-if",!0)],64))),256))])]),e.error?(l(),d("div",DR,[o("span",null,c(e.error),1),o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=s=>e.loadConferences())},"Retry")])):p("v-if",!0),e.loading?(l(),d("div",RR,"Loading conferences\u2026")):p("v-if",!0),o("div",TR,[t[24]||(t[24]=o("div",{class:"paper-table-head",role:"row"},[o("div",{role:"columnheader"},"Conference"),o("div",{role:"columnheader"},"Status"),o("div",{role:"columnheader",class:"num"},"Repos"),o("div",{role:"columnheader"},"Review window"),o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(X,null,ae(e.filteredConferences,(s,i)=>(l(),d("div",{class:A(["paper-table-row row-clickable",{"repo-inactive":s?.status=="expired"||s?.status=="removed"}]),role:"row",key:s?.conferenceID},[o("div",AR,[t[13]||(t[13]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[o("use",{href:"#project-icon-conference"})],-1)),o("div",OR,[o("a",{class:"repo-name",textContent:c(s?.name),href:e.safeUrl("/conference/"+s?.conferenceID)},null,8,IR),o("div",PR,[o("span",VR,[t[12]||(t[12]=y("ID ",-1)),o("span",{class:"commit-hash",textContent:c(s?.conferenceID)},null,8,qR),s?.url?(l(),d("span",MR,[t[11]||(t[11]=y(" \xB7 ",-1)),o("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(s?.url,60)),href:e.safeUrl(s?.url)},null,8,$R)])):p("v-if",!0)])])])]),o("div",LR,[o("div",UR,[o("span",{class:A(["status-dot","status-"+s?.status]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(s?.status))},null,8,FR)])]),o("div",zR,[t[14]||(t[14]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),t[15]||(t[15]=y()),o("span",{textContent:c(e.fmt?.number(s?.nbRepositories||0))},null,8,HR)]),o("div",jR,[t[16]||(t[16]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),s?.startDate?(l(),d("span",BR,c(e.fmt?.date(s?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(s?.endDate,"mediumDate")),1)):p("v-if",!0),s?.startDate?p("v-if",!0):(l(),d("span",GR,"\u2014"))]),o("div",WR,[o("div",KR,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:s?.removing,"aria-label":"Actions for "+s?.name},[...t[17]||(t[17]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,YR),o("div",JR,[o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/")},[...t[18]||(t[18]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View ",-1)])],8,QR),o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/edit")},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit ",-1)])],8,XR),s?.status!="removed"?(l(),d("div",ZR,[t[21]||(t[21]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeConference(s)},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove ",-1)])],8,xR)])):p("v-if",!0)])])])],2))),128)),!e.loading&&!e.error&&e.filteredConferences?.length==0?(l(),d("div",eT,[t[23]||(t[23]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.conferences?.length==0?(l(),d("span",tT,"You have not created a conference yet.")):p("v-if",!0),e.conferences?.length>0?(l(),d("span",oT,"Nothing matches the current filters.")):p("v-if",!0),o("div",sT,[e.conferences?.length>0?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[2]||(t[2]=s=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):p("v-if",!0),e.conferences?.length==0?(l(),d("a",nT,[...t[22]||(t[22]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})],-1),y(" New conference",-1)])])):p("v-if",!0)])])):p("v-if",!0)])])])}var rT={class:"container page dashboard-page paper-page"},iT={class:"row"},aT={class:"w-100"},lT={class:"dashboard-heading"},dT=["open"],uT=["aria-expanded"],cT=["stroke-dasharray"],pT={key:1,d:"M7 12c0-4 4-4 5 0s5 4 5 0-4-4-5 0-5 4-5 0",class:"quota-ring-unlimited"},fT={key:0,class:"quota-summary-value"},hT={key:0},mT={class:"quota-panel",id:"dashboard-usage"},vT={class:"quota-panel-heading"},gT={key:1,class:"quota-loading",role:"status"},yT={class:"search-wrap"},bT={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search projects, IDs, or conferences\u2026",autocomplete:"off"},wT=["aria-expanded"],kT={class:"btn-group",role:"group","aria-label":"Type"},ET=["aria-pressed"],CT=["aria-pressed"],_T=["aria-pressed"],ST=["aria-pressed"],NT={class:"dropdown"},DT={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},RT={class:"filter-btn-value"},TT={class:"sr-only"},AT={class:"dropdown-menu","aria-labelledby":"dropdownSort"},OT={class:"form-check dropdown-item"},IT=["onClick","checked","id"],PT=["for"],VT={class:"dropdown"},qT={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},MT={key:0,class:"filter-btn-value"},$T={key:1,class:"filter-btn-value"},LT={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},UT={class:"form-check dropdown-item"},FT=["id"],zT=["for"],HT={key:0,class:"dashboard-meta"},jT={class:"dashboard-view-tabs",role:"group","aria-label":"Project view"},BT=["aria-pressed"],GT=["aria-pressed","aria-label"],WT={class:"dashboard-count"},KT={key:0},YT={key:0},JT={key:1},QT={class:"dashboard-active-filters"},XT=["onClick","aria-label","title"],ZT=["aria-busy"],xT={class:"paper-table-head",role:"row"},eA=["aria-sort"],tA=["aria-sort"],oA=["aria-sort"],sA=["aria-sort"],nA={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},rA=["onClick"],iA={class:"cell-anon",role:"cell"},aA=["aria-label","title"],lA={class:"project-type-svg","aria-hidden":"true"},dA=["href"],uA={class:"anon-text"},cA={class:"anon-title"},pA=["title","textContent","href"],fA=["textContent"],hA={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},mA={class:"anon-sub"},vA=["title"],gA=["title"],yA=["title"],bA=["textContent"],wA={class:"dashboard-row-meta",role:"presentation"},kA={class:"cell-status",role:"cell"},EA={class:"status-line"},CA=["textContent"],_A=["textContent","title"],SA=["title"],NA=["href"],DA=["onClick"],RA={key:4,class:"status-sub status-sub-date"},TA=["aria-label"],AA={class:"cell-expires",role:"cell"},OA={key:0,class:"expires-never"},IA=["textContent"],PA={key:2,class:"expires-past"},VA={key:3,class:"expires-past"},qA={key:4,class:"empty-dash","aria-label":"Not applicable"},MA={class:"cell-actions",role:"cell"},$A=["onClick","disabled","title","aria-label"],LA=["onClick","data-project-actions","aria-controls","aria-expanded"],UA={key:2,class:"dropdown"},FA=["data-project-actions","aria-label"],zA={class:"dropdown-menu dropdown-menu-right"},HA=["onClick","aria-controls","aria-expanded"],jA=["href"],BA=["href"],GA=["onClick","disabled"],WA=["href"],KA=["onClick"],YA=["onClick"],JA=["onClick"],QA={key:5},XA=["onClick"],ZA={key:1,class:"project-details-row",role:"row"},xA=["id","onKeydown"],eO={class:"project-details-heading"},tO=["onClick"],oO={class:"project-details-list"},sO={key:0},nO={key:1},rO={key:0},iO={key:2},aO={key:0,class:"project-progress-help"},lO=["href"],dO=["onSubmit"],uO=["for"],cO=["id"],pO={class:"project-name-controls"},fO=["id","aria-describedby","disabled"],hO=["disabled"],mO={key:0,class:"project-name-error",role:"alert"},vO={key:1,role:"status"},gO={key:0,class:"paper-table-empty"},yO={key:0},bO={key:1},wO={class:"paper-table-empty-actions"},kO={key:1,href:"/anonymize",class:"btn btn-ink"},EO={key:0,class:"dashboard-pagination"},CO={key:0,role:"alert"},_O=["disabled"];function gl(e,t){let n=We("quota-usage"),r=ye("field"),s=ye("form");return l(),d("div",rT,[o("div",iT,[o("div",aT,[o("div",lT,[o("div",null,[t[27]||(t[27]=o("h1",{class:"paper-page-title"},"Projects",-1)),t[28]||(t[28]=o("p",{class:"paper-page-lede"},"Manage your anonymous links.",-1)),o("details",{class:"dashboard-quota",open:e.quotaExpanded,onToggle:t[1]||(t[1]=i=>e.quotaExpanded=i.target.open),onKeydown:t[2]||(t[2]=No(he(i=>e.closeQuota(),["prevent","stop"]),["esc"]))},[o("summary",{"aria-controls":"dashboard-usage","aria-expanded":e.quotaExpanded},[(l(),d("svg",{class:A(["quota-summary-ring",e.quota?"quota-"+e.quota.repository.level:""]),viewBox:"0 0 24 24","aria-hidden":"true"},[t[21]||(t[21]=o("circle",{class:"quota-ring-track",cx:"12",cy:"12",r:"9"},null,-1)),e.quota&&!e.quota.repository.unlimited?(l(),d("circle",{key:0,class:"quota-ring-fill",cx:"12",cy:"12",r:"9",pathLength:"100","stroke-dasharray":e.quota.repository.percent+" 100"},null,8,cT)):p("v-if",!0),e.quota?.repository.unlimited?(l(),d("path",pT)):p("v-if",!0)],2)),t[23]||(t[23]=o("span",{class:"quota-summary-label"},"Usage",-1)),e.quota?(l(),d("span",fT,[y(c(e.fmt.number(e.quota.repository.used)),1),e.quota.repository.unlimited?p("v-if",!0):(l(),d("span",hT," / "+c(e.fmt.number(e.quota.repository.total)),1)),t[22]||(t[22]=y(" repos",-1))])):p("v-if",!0),t[24]||(t[24]=o("svg",{class:"project-type-svg quota-summary-chevron","aria-hidden":"true"},[o("use",{href:"#project-icon-chevron"})],-1))],8,uT),o("div",mT,[o("div",vT,[t[26]||(t[26]=o("h2",null,"Account usage",-1)),o("button",{type:"button",class:"project-close","aria-label":"Close usage",onClick:t[0]||(t[0]=i=>e.closeQuota())},[...t[25]||(t[25]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])])]),e.quota?(l(),qt(n,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(l(),d("p",gT,"Loading usage\u2026"))])],40,dT)]),t[29]||(t[29]=ce('',1))]),p(" Search + filters "),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[9]||(t[9]=he(i=>e.submitForm(i,()=>{i.preventDefault()}),["prevent"]))},[o("div",yT,[N(o("input",bT,null,512),[[r,{state:e.viewState,set:i=>{e.search=i},value:e.search,form:null,options:{}}]])]),o("button",{class:"btn dashboard-filters-toggle",type:"button","aria-expanded":e.filtersExpanded,"aria-controls":"dashboard-filter-controls",onClick:t[3]||(t[3]=i=>e.filtersExpanded=!e.filtersExpanded)},[...t[30]||(t[30]=[y("Filters",-1),o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})],-1)])],8,wT),o("div",{id:"dashboard-filter-controls",class:A(["dashboard-filter-controls",{expanded:e.filtersExpanded}])},[o("div",kT,[o("button",{type:"button",class:A(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[4]||(t[4]=i=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,ET),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="repo"}]),title:"Repositories",onClick:t[5]||(t[5]=i=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},[...t[31]||(t[31]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),o("span",{class:"type-filter-label"},"Repos",-1)])],10,CT),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="pr"}]),title:"Pull requests",onClick:t[6]||(t[6]=i=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},[...t[32]||(t[32]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-pr"})],-1),o("span",{class:"type-filter-label"},"PRs",-1)])],10,_T),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="gist"}]),title:"Gists",onClick:t[7]||(t[7]=i=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},[...t[33]||(t[33]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-gist"})],-1),o("span",{class:"type-filter-label"},"Gists",-1)])],10,ST)]),o("div",{id:"dashboard-extra-filters",class:A(["dashboard-extra-filters",{expanded:e.filtersExpanded}])},[o("div",NT,[o("button",DT,[t[35]||(t[35]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",RT,c(e.sortLabel()),1),(l(),d("svg",{class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[34]||(t[34]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)),o("span",TT,c(e.sortDesc()?"descending":"ascending"),1)]),o("div",AT,[t[36]||(t[36]=o("h6",{class:"dropdown-header"},"Order by",-1)),(l(!0),d(X,null,ae(e.sortFields,(i,a,u)=>(l(),d("div",OT,[o("input",{class:"form-check-input",type:"radio",name:"sort",onClick:f=>e.setSort(a,i.defaultDesc),checked:e.isSortedBy(a),id:"sort-"+u},null,8,IT),o("label",{class:"form-check-label",for:"sort-"+u},c(i?.label),9,PT)]))),256)),t[37]||(t[37]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item",onClick:t[8]||(t[8]=i=>e.toggleSortDirection())},c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])]),o("div",VT,[o("button",qT,[t[38]||(t[38]=o("span",{class:"filter-btn-label"},"Status",-1)),e.hasHiddenStatus()?p("v-if",!0):(l(),d("span",MT,"All")),e.hasHiddenStatus()?(l(),d("span",$T,c(e.hiddenStatusCount())+" hidden",1)):p("v-if",!0)]),o("div",LT,[t[39]||(t[39]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,ae(e.statusKeyLabels,(i,a,u)=>(l(),d("div",UT,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+a},null,8,FT),[[r,{state:e.viewState,set:f=>{e.filters.status[a]=f},value:e.filters?.status[a],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+a},c(i),9,zT)]))),256))])])],2)],2)],32)),[[s,e.viewState]]),p(" Result count + active filter chips "),e.loading?p("v-if",!0):(l(),d("div",HT,[o("div",jT,[o("button",{type:"button","aria-pressed":e.projectView==="all",onClick:t[10]||(t[10]=i=>e.setProjectView("all")),"aria-label":"All projects"},[...t[40]||(t[40]=[o("span",{class:"dashboard-view-long"},"All projects",-1),o("span",{class:"dashboard-view-short","aria-hidden":"true"},"All",-1)])],8,BT),o("button",{type:"button","aria-pressed":e.projectView==="attention",onClick:t[11]||(t[11]=i=>e.setProjectView("attention")),"aria-label":"Needs attention "+e.attentionCount()},[t[41]||(t[41]=o("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[42]||(t[42]=o("span",null,"attention",-1)),t[43]||(t[43]=y()),o("span",{class:A(["attention-count",{"has-attention":e.attentionCount()>0}])},c(e.attentionCount()),3)],8,GT)]),o("span",WT,[(e.dashboardTotals?.filtered??e.filteredItems?.length)===(e.dashboardTotals?.total??e.items?.length)?(l(),d("span",KT,[y(c(e.fmt?.number(e.dashboardTotals?.total??e.items?.length))+" project",1),(e.dashboardTotals?.total??e.items?.length)!==1?(l(),d("span",YT,"s")):p("v-if",!0)])):(l(),d("span",JT,c(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" of "+c(e.fmt?.number(e.dashboardTotals?.total??e.items?.length))+" shown",1))]),o("div",QT,[(l(!0),d(X,null,ae(e.filters?.status,(i,a,u)=>(l(),d(X,null,[i===!1?(l(),d("button",{key:0,type:"button",class:"filter-chip",onClick:f=>e.filters.status[a]=!0,"aria-label":"Show "+e.statusKeyLabels[a]+" again",title:"Show "+e.statusKeyLabels[a]+" again"},[y(c(e.statusKeyLabels[a])+" hidden",1),t[44]||(t[44]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1))],8,XT)):p("v-if",!0)],64))),256)),e.typeFilter!=="all"?(l(),d("button",{key:0,type:"button",class:"filter-chip",onClick:t[12]||(t[12]=i=>e.typeFilter="all"),"aria-label":"Show all project types"},[y(c(e.typeFilter==="repo"?"Repositories":e.typeFilter==="pr"?"Pull requests":"Gists"),1),t[45]||(t[45]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1))])):p("v-if",!0),e.showClearFilters()?(l(),d("button",{key:1,type:"button",class:"btn-link-inline",onClick:t[13]||(t[13]=i=>e.clearFilters())},"Clear filters")):p("v-if",!0)])]))]),p(" Table "),o("div",{class:"paper-table paper-table-dashboard",role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[o("div",xT,[o("div",{role:"columnheader","aria-sort":e.isSortedBy("_label")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("_label")}]),onClick:t[14]||(t[14]=i=>e.setSort("_label"))},[t[47]||(t[47]=y(" Project ",-1)),e.isSortedBy("_label")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[46]||(t[46]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,eA),o("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("status")}]),onClick:t[15]||(t[15]=i=>e.setSort("status"))},[t[49]||(t[49]=y(" Status ",-1)),e.isSortedBy("status")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[48]||(t[48]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,tA),o("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[16]||(t[16]=i=>e.setSort("pageView"))},[t[51]||(t[51]=y(" Views ",-1)),e.isSortedBy("pageView")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[50]||(t[50]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,oA),o("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[17]||(t[17]=i=>e.setSort("options.expirationDate"))},[t[53]||(t[53]=y(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[52]||(t[52]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,sA),t[54]||(t[54]=o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")],-1))]),p(" Loading skeleton: keeps the layout stable while the three lists load "),(l(),d(X,null,ae([1,2,3,4],(i,a)=>(l(),d(X,null,[e.loading?(l(),d("div",nA,[...t[55]||(t[55]=[o("div",{class:"cell-anon",role:"cell"},[o("span",{class:"skeleton skeleton-badge"}),o("div",{class:"anon-text"},[o("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),o("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),o("div",{class:"cell-status",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),o("div",{class:"cell-views num",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),o("div",{class:"cell-expires",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),o("div",{class:"cell-actions",role:"cell"},null,-1)])])):p("v-if",!0)],64))),64)),(l(!0),d(X,null,ae(e.filteredItems,(i,a)=>(l(),d(X,{key:i?._type+":"+(i?._id||a)},[e.loading?p("v-if",!0):(l(),d("div",{key:0,class:A(["paper-table-row",{"repo-inactive":i?._statusKey=="expired"||i?._statusKey=="removed","repo-error":i?.status=="error","row-clickable":!!i?._viewUrl}]),role:"row",onClick:u=>e.openItem(i,u)},[o("div",iA,[o("span",{class:"project-type-icon",role:"img","aria-label":i?._type==="repo"?"Repository":i?._type==="pr"?"Pull request":"Gist",title:i?._type==="repo"?"Repository":i?._type==="pr"?"Pull request":"Gist"},[(l(),d("svg",lA,[o("use",{href:"#project-type-"+i._type},null,8,dA)]))],8,aA),o("div",uA,[o("div",cA,[i?._viewUrl?(l(),d("a",{key:0,class:"repo-name",title:i._label,textContent:c(i?._label),href:e.safeUrl(i?._viewUrl)},null,8,pA)):p("v-if",!0),i?._viewUrl?p("v-if",!0):(l(),d("span",{key:1,class:"repo-name repo-name-static",textContent:c(i?._label)},null,8,fA)),i?.role==="coauthor"?(l(),d("span",hA,"Co-author")):p("v-if",!0)]),o("div",mA,[i?._id?(l(),d("code",{key:0,class:"anonymous-id",title:i._id},c(i._id),9,vA)):p("v-if",!0),i?._type==="repo"&&i?.source?.commit?(l(),d("span",{key:1,class:"commit-hash",title:i.source.commit},c(i.source.commit.substring(0,8)),9,gA)):p("v-if",!0),i?.conference?(l(),d("span",{key:2,class:"cell-conf conf-tag",title:i?.conference},[t[56]||(t[56]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),t[57]||(t[57]=y()),o("span",{textContent:c(i?.conference)},null,8,bA)],8,yA)):p("v-if",!0)])])]),o("div",wA,[o("div",kA,[o("div",EA,[o("span",{class:A(["status-dot","status-"+i?._statusKey]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(i?.status))},null,8,CA)]),i?.status=="error"&&i?.statusMessage?(l(),d("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(i?.statusMessage)),title:i?.statusMessage},null,8,_A)):p("v-if",!0),i?._stale?(l(),d("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(i?.anonymizeDate||i?.lastView)}," Last activity "+c(e.fmt?.humanTime(i?.anonymizeDate||i?.lastView))+" \xB7 may be stuck ",9,SA)):p("v-if",!0),i.status==="error"&&i._editUrl?(l(),d("a",{key:2,class:"project-attention-action",href:e.safeUrl(i._editUrl)},"Fix source",8,NA)):p("v-if",!0),i._stale||i._broken?(l(),d("button",{key:3,type:"button",class:"project-attention-action",onClick:he(u=>e.showProjectDetails(i),["stop"])},c(i._broken?"Review details":"Check progress"),9,DA)):p("v-if",!0),i?.status!="error"&&!i?._stale&&i?.anonymizeDate?(l(),d("div",RA," anonymized "+c(e.fmt?.humanTime(i?.anonymizeDate)),1)):p("v-if",!0)]),o("div",{class:"cell-views num",role:"cell","aria-label":e.fmt.number(i.pageView)+" views"},[t[58]||(t[58]=o("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),o("span",null,c(e.fmt.number(i.pageView)),1)],8,TA),o("div",AA,[t[59]||(t[59]=o("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),i?._expiry?.kind==="never"?(l(),d("span",OA,"Never")):p("v-if",!0),i?._expiry?.kind==="date"?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(i?._expiry?.date))},null,8,IA)):p("v-if",!0),i?._expiry?.kind==="expired"&&i?._expiry?.date?(l(),d("span",PA,"Expired "+c(e.fmt?.humanTime(i?._expiry?.date)),1)):p("v-if",!0),i?._expiry?.kind==="expired"&&!i?._expiry?.date?(l(),d("span",VA,"Expired")):p("v-if",!0),i?._expiry?.kind==="none"?(l(),d("span",qA,"\u2014")):p("v-if",!0)])]),o("div",MA,[i._viewUrl?(l(),d("button",{key:0,type:"button",class:"copy-link-inline",onClick:he(u=>e.copyLink(i),["stop"]),disabled:!!e.copyingId,title:"Copy anonymous link for "+i._label,"aria-label":"Copy anonymous link for "+i._label},[...t[60]||(t[60]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-copy"})],-1)])],8,$A)):p("v-if",!0),i._broken?(l(),d("button",{key:1,type:"button",class:"project-details-button",onClick:he(u=>e.showProjectDetails(i),["stop"]),"data-project-actions":encodeURIComponent(i._type+":"+i._id),"aria-controls":e.projectDetailsId(i),"aria-expanded":e.selectedProject===i},"Details",8,LA)):p("v-if",!0),i?._broken?p("v-if",!0):(l(),d("div",UA,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","data-project-actions":encodeURIComponent(i._type+":"+i._id),"aria-label":"Actions for "+i?._name},[...t[61]||(t[61]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,FA),o("div",zA,[o("button",{type:"button",class:"dropdown-item",onClick:u=>e.showProjectDetails(i),"aria-controls":e.projectDetailsId(i),"aria-expanded":e.selectedProject===i},"Project details & name",8,HA),o("a",{class:"dropdown-item",href:e.safeUrl(i?._viewUrl)}," View ",8,jA),i?._type==="repo"&&i?.options?.page&&i?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+i?.repoId+"/")}," View page ",8,BA)):p("v-if",!0),i?._viewUrl?(l(),d("button",{key:1,type:"button",class:"dropdown-item",onClick:u=>e.copyLink(i),disabled:!!e.copyingId}," Copy anonymous link ",8,GA)):p("v-if",!0),o("a",{class:"dropdown-item",href:e.safeUrl(i?._editUrl)}," Edit ",8,WA),i?.status=="ready"||i?.status=="error"?(l(),d("button",{key:2,type:"button",class:"dropdown-item",onClick:u=>e.refreshItem(i)}," Force update ",8,KA)):p("v-if",!0),i?.status=="removed"?(l(),d("button",{key:3,type:"button",class:"dropdown-item",onClick:u=>e.refreshItem(i)}," Enable ",8,YA)):p("v-if",!0),i?.status=="expired"?(l(),d("button",{key:4,type:"button",class:"dropdown-item",onClick:u=>e.extendItem(i)}," Extend 6 months ",8,JA)):p("v-if",!0),(i?.status=="ready"||i?.status=="expired"||i?.status=="error")&&i?.role!=="coauthor"?(l(),d("div",QA,[t[62]||(t[62]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:u=>e.removeItem(i)}," Remove ",8,XA)])):p("v-if",!0)])]))])],10,rA)),!e.loading&&e.selectedProject===i?(l(),d("div",ZA,[o("div",{class:"project-details",role:"cell","aria-colspan":"5",id:e.projectDetailsId(i),tabindex:"-1",onKeydown:No(he(u=>e.closeProjectDetails(i),["stop"]),["esc"])},[o("div",eO,[t[64]||(t[64]=o("h2",null,"Project details",-1)),o("button",{type:"button",class:"project-close",onClick:u=>e.closeProjectDetails(i),"aria-label":"Close project details"},[...t[63]||(t[63]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,tO)]),o("dl",oO,[o("div",null,[t[65]||(t[65]=o("dt",null,"Source",-1)),o("dd",null,c(i._source||"Not available"),1)]),o("div",null,[t[66]||(t[66]=o("dt",null,"Anonymous ID",-1)),o("dd",null,[o("code",null,c(i._id||"Missing identifier"),1)])]),i.source?.commit?(l(),d("div",sO,[t[67]||(t[67]=o("dt",null,"Commit",-1)),o("dd",null,[o("code",null,c(i.source.commit),1)])])):p("v-if",!0),i.conference?(l(),d("div",nO,[t[68]||(t[68]=o("dt",null,"Conference",-1)),o("dd",null,c(i.conference),1)])):p("v-if",!0),o("div",null,[t[69]||(t[69]=o("dt",null,"Status",-1)),o("dd",null,[y(c(e.fmt.statusLabel(i.status)),1),i.statusMessage?(l(),d("span",rO," \xB7 "+c(e.fmt.statusMsg(i.statusMessage)),1)):p("v-if",!0)])]),i.anonymizeDate?(l(),d("div",iO,[t[70]||(t[70]=o("dt",null,"Last anonymized",-1)),o("dd",null,c(e.fmt.humanTime(i.anonymizeDate)),1)])):p("v-if",!0)]),i._stale?(l(),d("p",aO,"This download has not progressed recently. Check the source access and selected branch before retrying.")):p("v-if",!0),i._editUrl?(l(),d("a",{key:1,class:"project-attention-action",href:e.safeUrl(i._editUrl)},c(e.needsAttention(i)?"Check source settings":"Edit anonymization settings"),9,lO)):p("v-if",!0),i._id?(l(),d("form",{key:2,class:"project-name-form",onSubmit:he(u=>e.saveProjectName(i),["prevent"])},[o("label",{for:"project-name-"+i._type+"-"+i._id},"Project name",8,uO),o("p",{id:"project-name-help-"+i._type+"-"+i._id},"Only you see this name. Leave it blank to use the default.",8,cO),o("div",pO,[N(o("input",{class:"form-control",type:"text",id:"project-name-"+i._type+"-"+i._id,"aria-describedby":"project-name-help-"+i._type+"-"+i._id,maxlength:"100","onUpdate:modelValue":t[18]||(t[18]=u=>e.projectName=u),disabled:e.nameSaving},null,8,fO),[[Ji,e.projectName]]),o("button",{class:"btn btn-ink",type:"submit",disabled:e.nameSaving},c(e.nameSaving?"Saving\u2026":"Save name"),9,hO)]),e.nameError?(l(),d("p",mO,c(e.nameError),1)):p("v-if",!0),e.nameMessage?(l(),d("p",vO,c(e.nameMessage),1)):p("v-if",!0)],40,dO)):p("v-if",!0)],40,xA)])):p("v-if",!0)],64))),128)),!e.loading&&e.filteredItems?.length==0?(l(),d("div",gO,[t[72]||(t[72]=o("svg",{class:"project-type-svg project-empty-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.hasProjects()?p("v-if",!0):(l(),d("span",yO,"You have no anonymizations yet.")),e.hasProjects()?(l(),d("span",bO,"Nothing matches the current filters.")):p("v-if",!0),o("div",wO,[e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=i=>e.clearFilters())},"Clear filters")):p("v-if",!0),e.hasProjects()?p("v-if",!0):(l(),d("a",kO,[...t[71]||(t[71]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})],-1),y(" New anonymization",-1)])]))])])):p("v-if",!0)],8,ZT)]),e.dashboardCursor||e.dashboardError?(l(),d("div",EO,[e.dashboardError?(l(),d("p",CO,c(e.dashboardError),1)):p("v-if",!0),e.dashboardCursor?(l(),d("button",{key:1,type:"button",class:"btn",onClick:t[20]||(t[20]=i=>e.loadMoreProjects()),disabled:e.loadingMore},c(e.loadingMore?"Loading\u2026":"Load more projects"),9,_O)):p("v-if",!0)])):p("v-if",!0)])}var SO={class:"explorer-page"},NO=["aria-label"],DO={class:"ui-icon","aria-hidden":"true"},RO=["href"],TO=["textContent"],AO={class:"leftCol-head"},OO={class:"leftCol-search"},IO={class:"tree-search-box"},PO=["href"],VO={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},qO={class:"leftCol-project-header"},MO=["textContent"],$O={class:"project-file-count"},LO={class:"leftCol-body"},UO={key:0,class:"paper-inline-warning",role:"alert"},FO={key:1,class:"paper-inline-warning",role:"alert"},zO={class:"leftCol-foot"},HO=["title"],jO=["title"],BO=["title"],GO={key:2,class:"last-update",title:"Older repositories have no recorded publication date. The source commit date does not establish when files became available here."},WO={class:"explorer-main"},KO={class:"status-bar"},YO={class:"breadcrumb paths","aria-label":"Path"},JO=["textContent"],QO={class:"status-bar-actions"},XO=["href"],ZO={class:"d-none d-md-inline"},xO={class:"ui-icon","aria-hidden":"true"},eI=["href"],tI={class:"d-none d-md-inline"},oI=["href"],sI=["href"],nI=["href"],rI=["href"],iI={class:"explorer-content"};function yl(e,t){let n=We("tree"),r=We("partial-view"),s=ye("field");return l(),d("div",SO,[N(o("button",{class:"sidebar-toggle",onClick:t[0]||(t[0]=i=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[(l(),d("svg",DO,[o("use",{href:e.sidebarCollapsed?"#ui-icon-folder":"#project-icon-close"},null,8,RO)])),o("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,TO)],8,NO),[[Y,e.files?.length]]),N(o("div",{class:A(["leftCol",{collapsed:e.sidebarCollapsed}])},[o("div",AO,[t[7]||(t[7]=o("span",{class:"leftCol-eyebrow"},"Files",-1)),o("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[1]||(t[1]=i=>e.sidebarCollapsed=!0)},[...t[6]||(t[6]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])])]),o("div",OO,[o("div",IO,[(l(),d("svg",{class:A(["ui-icon tree-search-icon",{"fa-spin":e.fileSearchLoading}]),"aria-hidden":"true"},[o("use",{href:e.fileSearchLoading?"#ui-icon-spinner":"#ui-icon-search"},null,8,PO)],2)),N(o("input",VO,null,512),[[s,{state:e.viewState,set:i=>{e.fileSearchQuery=i},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),N(o("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[Y,!e.fileSearchQuery]]),N(o("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[2]||(t[2]=i=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[Y,e.fileSearchQuery]])])]),o("div",qO,[o("span",{class:"project-name",textContent:c(e.repoId)},null,8,MO),o("span",$O,c(e.fileCounts?.[""]||e.files?.length)+" files",1)]),o("div",LO,[e.options?.truncatedFolders?.length>0?(l(),d("div",UO,[t[8]||(t[8]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):p("v-if",!0),e.options?.hasSubmodules?(l(),d("div",FO,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),y(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):p("v-if",!0),Ce(n,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])]),o("div",zO,[o("span",{class:"last-update",title:e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate},c(e.options?.sourceCommitDate?"Source commit":e.options?.anonymizedAt?"Anonymized":"Updated")+" "+c(e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),9,HO),e.options?.settingsSavedAt?(l(),d("span",{key:0,class:"last-update",title:e.options.settingsSavedAt}," Settings saved "+c(e.fmt?.date(e.options.settingsSavedAt)),9,jO)):p("v-if",!0),e.options?.publishedAt?(l(),d("span",{key:1,class:"last-update",title:e.options.publishedAt}," Snapshot ready "+c(e.fmt?.date(e.options.publishedAt)),9,BO)):p("v-if",!0),e.options?.anonymizedAt&&!e.options?.publishedAt?(l(),d("span",GO," Snapshot ready date not recorded ")):p("v-if",!0)])],2),[[Y,e.files?.length]]),N(o("div",{class:"leftCol-backdrop",onClick:t[3]||(t[3]=i=>e.sidebarCollapsed=!0)},null,512),[[Y,e.files?.length&&!e.sidebarCollapsed]]),o("div",WO,[o("div",KO,[o("ol",YO,[(l(!0),d(X,null,ae(e.paths,(i,a)=>(l(),d("li",{class:"breadcrumb-item",textContent:c(i)},null,8,JO))),256))]),o("div",QO,[e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[10]||(t[10]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,XO)):p("v-if",!0),e.type=="html-doc"&&!e.showSource?(l(),d("button",{key:1,class:A(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[4]||(t[4]=i=>e.toggleAllowScripts())},[t[11]||(t[11]=o("i",{class:"fab fa-js"},null,-1)),o("span",ZO,c(e.allowScripts?"JS on":"JS off"),1)],2)):p("v-if",!0),e.type=="html-doc"?(l(),d("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[5]||(t[5]=i=>e.toggleSource())},[(l(),d("svg",xO,[o("use",{href:e.showSource?"#project-icon-eye":"#ui-icon-code"},null,8,eI)])),o("span",tI,c(e.showSource?"Rendered":"Source"),1)])):p("v-if",!0),N(o("a",{target:"_self",class:"btn btn-sm","aria-label":"View raw current file",title:"View the raw content of the current file",href:e.safeUrl(e.url)},[...t[12]||(t[12]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-file"})],-1),o("span",{class:"d-none d-md-inline"}," Raw",-1)])],8,oI),[[Y,e.content!=null]]),N(o("a",{target:"_self",class:"btn btn-sm","aria-label":"Download current file",title:"Download the current file",href:e.safeUrl(e.url+"&download=true")},[...t[13]||(t[13]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-download"})],-1),o("span",{class:"d-none d-md-inline"}," Download",-1)])],8,sI),[[Y,e.content!=null]]),e.options?.download?(l(),d("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Download full repository as ZIP",title:"Download the full repository as a ZIP archive",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[14]||(t[14]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-archive"})],-1),o("span",{class:"d-none d-md-inline"}," Full repo ZIP",-1)])],8,nI)):p("v-if",!0),e.options?.hasWebsite?(l(),d("a",{key:4,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[15]||(t[15]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),o("span",{class:"d-none d-md-inline"}," Website",-1)])],8,rI)):p("v-if",!0)])]),o("div",iI,[Ce(r,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])])}var aI={class:"paper-faq"};function bl(e,t){return l(),d("div",aI,[...t[0]||(t[0]=[ce('
Help

Answers to the questions that come up most.

If something's missing, write to us \u2014 report a bug on GitHub.

',1),o("div",{class:"paper-faq-body"},[o("aside",{class:"paper-faq-toc"},[o("div",{class:"paper-faq-toc-head"},"Contents"),o("nav",null,[o("a",{href:"#faq-general"},"General"),o("a",{href:"#faq-features"},"Features"),o("a",{href:"#faq-limitations"},"Limitations"),o("a",{href:"#faq-privacy"},"Privacy & Security"),o("a",{href:"#faq-hosting"},"Self-Hosting")])]),o("section",{class:"faq-section","aria-label":"FAQs"},[o("div",null,[p(" General "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),y("General ")]),o("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"false","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),o("div",{id:"whatIs",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhatIs"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub is a free, open-source tool that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information \u2014 such as the repository owner, organization name, and custom terms \u2014 so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),o("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),o("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[o("div",{class:"panel-body p-3"},[o("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix \u2014 not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),o("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[o("div",{class:"panel-body p-3"},[o("p",null,[y(" Anonymous GitHub is completely free to use. However, the server costs hundreds of dollars per year to maintain. If you find the service useful, a small donation would be greatly appreciated. You can support the project by "),o("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank"},"sponsoring on GitHub"),y(", donating through "),o("a",{href:"https://ko-fi.com/tdurieux",target:"_blank"},"Ko-fi"),y(', or by clicking the "Support me" button on the site. ')])])])])]),p(" Features "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})]),y("Features ")]),o("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),o("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub can display and render a wide variety of file types: "),o("ul",null,[o("li",null,[o("strong",null,"Text and source code"),y(" \u2014 displayed with syntax highlighting")]),o("li",null,[o("strong",null,"Markdown"),y(" \u2014 rendered as formatted HTML")]),o("li",null,[o("strong",null,"Images"),y(" (PNG, JPG, SVG, etc.) \u2014 displayed inline")]),o("li",null,[o("strong",null,"PDFs"),y(" \u2014 rendered directly in the browser")]),o("li",null,[o("strong",null,"Jupyter Notebooks"),y(" \u2014 rendered with code cells and outputs")])]),o("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),o("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),o("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[o("div",{class:"panel-body p-3"},[o("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),o("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[o("div",{class:"panel-body p-3"},[o("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),o("ul",null,[o("li",null,[o("strong",null,"Never expire"),y(" \u2014 the anonymized repository remains accessible indefinitely.")]),o("li",null,[o("strong",null,"Redirect to GitHub"),y(" \u2014 after expiration, visitors are redirected to the original GitHub repository.")]),o("li",null,[o("strong",null,"Remove content"),y(" \u2014 after expiration, the anonymized content is deleted from the server.")])])])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),o("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),o("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. The anonymized repository tracks the source on GitHub: when you push new commits to the original repository, the anonymized view picks up those changes (cached files are refreshed against GitHub). This means you can keep iterating on the code while reviewers have the link, and you do not need to recreate the anonymized repository every time you update the source. "),o("p",null," A few practical implications worth keeping in mind: "),o("ul",null,[o("li",null," You can safely create the anonymized repository early in the writing process \u2014 later commits will be visible to reviewers without any additional action. "),o("li",null," If you rename files, add new identifiers, or introduce new contributor names after creation, revisit the anonymization options (custom terms, file filters) to make sure the new content is still properly anonymized. "),o("li",null," If the original repository is made private or deleted, the anonymized repository will no longer be able to fetch updated content. ")])])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),o("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),o("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[o("code",null,`npm install -g @tdurieux/anonymous_github -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"})]),y("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"})]),y("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,[y("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"),y(" 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"})]),y("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,[y(" Yes. Anonymous GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),o("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(". ")]),o("p",null," The basic steps are: "),o("ol",null,[o("li",null,"Clone the repository and install dependencies"),o("li",null,[y("Create a "),o("code",null,".env"),y(" file with your GitHub token, OAuth client ID, and client secret")]),o("li",null,[y("Run "),o("code",null,"docker-compose up -d")])])])])])]),o("div",{class:"text-center mt-5 mb-5 p-4",style:{"background-color":"var(--hover-bg-color)","border-radius":"8px"}},[o("p",{class:"mb-2",style:{"font-size":"1.1rem"}}," Still have questions? "),o("p",{class:"text-muted mb-0"},[y(" Open an issue on the "),o("a",{href:"https://github.com/tdurieux/anonymous_github/issues",target:"_blank"},"GitHub repository"),y(" and we'll be happy to help. ")])])])])],-1)])])}var lI={class:"pr-page"},dI={class:"container paper-page pr-page-inner"},uI={class:"pr-header"},cI={class:"pr-title-row"},pI={class:"paper-page-title pr-title"},fI=["textContent"],hI={key:1,class:"text-muted"},mI=["href"],vI={class:"pr-header-meta"},gI={key:0,class:"pr-meta-item"},yI=["textContent"],bI={key:1,class:"pr-meta-item"},wI=["textContent"],kI={key:2,class:"pr-meta-item"},EI=["textContent"],CI={key:0,class:"paper-tabs",role:"tablist"},_I=["aria-selected","tabindex"],SI=["textContent"],NI=["aria-selected","tabindex"],DI=["textContent"],RI={class:"paper-tab-content"},TI={key:0,role:"tabpanel",id:"gist-files-panel","aria-labelledby":"gist-files-tab"},AI={class:"pr-comments"},OI={class:"pr-comment"},II={class:"pr-comment-head"},PI=["textContent"],VI={key:0,class:"pr-comment-date"},qI={key:0,class:"paper-table-empty"},MI={key:1,role:"tabpanel",id:"gist-comments-panel","aria-labelledby":"gist-comments-tab"},$I={class:"pr-comments"},LI={class:"pr-comment"},UI={class:"pr-comment-head"},FI={key:0,class:"pr-comment-author"},zI=["textContent"],HI=["textContent"],jI={key:0,class:"pr-comment-body"},BI={key:0,class:"paper-table-empty"};function wl(e,t){let n=We("gist-file"),r=We("markdown");return l(),d("div",lI,[o("div",dI,[t[17]||(t[17]=o("div",{class:"paper-crumbs"},[o("a",{href:"/dashboard"},"Reviewer"),y(" \xA0/\xA0 "),o("span",{class:"here"},"Gist")],-1)),o("header",uI,[o("div",cI,[o("h1",pI,[e.details?.description?(l(),d("span",{key:0,textContent:c(e.details?.description)},null,8,fI)):p("v-if",!0),e.details?.description?p("v-if",!0):(l(),d("span",hI,"Untitled gist"))]),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[4]||(t[4]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,mI)):p("v-if",!0)]),o("div",vI,[o("span",{class:A(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},c(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(l(),d("span",gI,[t[5]||(t[5]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[6]||(t[6]=y(" @",-1)),o("span",{textContent:c(e.details?.ownerLogin)},null,8,yI)])):p("v-if",!0),e.details?.updatedDate?(l(),d("span",bI,[t[7]||(t[7]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=y()),o("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,wI)])):p("v-if",!0),e.details?.anonymizeDate?(l(),d("span",kI,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=y(" Anonymized ",-1)),o("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,EI)])):p("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(l(),d("nav",CI,[e.details?.files?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",id:"gist-files-tab","aria-selected":e.tabState?.active==="files","aria-controls":"gist-files-panel",tabindex:e.tabState?.active==="files"?0:-1,onKeydown:t[0]||(t[0]=s=>e.previewTabKeydown(s)),onClick:t[1]||(t[1]=s=>e.tabState.active="files")},[t[11]||(t[11]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-gist"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,SI)],42,_I)):p("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"gist-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"gist-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=s=>e.previewTabKeydown(s)),onClick:t[3]||(t[3]=s=>e.tabState.active="comments")},[t[12]||(t[12]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,DI)],42,NI)):p("v-if",!0)])):p("v-if",!0),o("div",RI,[e.details?.files&&e.tabState?.active=="files"?(l(),d("div",TI,[o("ul",AI,[(l(!0),d(X,null,ae(e.details?.files,(s,i)=>(l(),d("li",OI,[o("div",II,[o("strong",{textContent:c(s?.filename)},null,8,PI),s?.language?(l(),d("span",VI,c(s?.language),1)):p("v-if",!0)]),Ce(n,{file:s},null,8,["file"])]))),256)),e.details?.files?.length?p("v-if",!0):(l(),d("li",qI,[...t[13]||(t[13]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-file"})],-1),o("span",null,"No files in this gist.",-1)])]))])])):p("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",MI,[o("ul",$I,[(l(!0),d(X,null,ae(e.details?.comments,(s,i)=>(l(),d("li",LI,[o("div",UI,[s?.author?(l(),d("span",FI,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=y(" @",-1)),o("span",{textContent:c(s?.author)},null,8,zI)])):p("v-if",!0),s?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(s?.updatedDate))},null,8,HI)):p("v-if",!0)]),s?.body?(l(),d("div",jI,[Ce(r,{content:s?.body},null,8,["content"])])):p("v-if",!0)]))),256)),e.details?.comments?.length?p("v-if",!0):(l(),d("li",BI,[...t[16]||(t[16]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1),o("span",null,"No comments on this gist.",-1)])]))])])):p("v-if",!0)])])])}var GI={class:"collapse navbar-collapse",id:"navbarSupportedContent"},WI={class:"navbar-nav mr-auto smooth-scroll"},KI={key:0,class:"nav-item"},YI={key:1,class:"nav-item"},JI={key:2,class:"nav-item"},QI={key:3,class:"nav-item"},XI={class:"nav-item"},ZI={key:4,class:"nav-item"},xI={class:"navbar-nav"},e4={key:0,class:"nav-item"},t4={key:1,class:"nav-item"},o4={key:2,class:"nav-item"},s4={key:3,class:"nav-item dropdown user-chip-wrap"},n4={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},r4=["src"],i4={class:"user-chip-name"},a4={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},l4={class:"dropdown-header"},d4=["innerHTML"];function kl(e,t){return l(),d(X,null,[o("nav",{class:A(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[13]||(t[13]=ce('Anonymous GitHubSupport',3)),o("div",GI,[o("ul",WI,[e.user?p("v-if",!0):(l(),d("li",KI,[o("a",{class:A(["nav-link",{active:e.path=="/"}]),href:"/"}," Home ",2)])),e.user?(l(),d("li",YI,[o("a",{class:A(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[2]||(t[2]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-grid"})],-1),y(" My work ",-1)])],2)])):p("v-if",!0),e.user?(l(),d("li",JI,[o("a",{class:A(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[3]||(t[3]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),y(" Anonymize ",-1)])],2)])):p("v-if",!0),e.user?(l(),d("li",QI,[o("a",{class:A(["nav-link",{active:e.path=="/conferences"}]),href:"/conferences"},[...t[4]||(t[4]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1),y(" Conferences ",-1)])],2)])):p("v-if",!0),o("li",XI,[o("a",{class:A(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[5]||(t[5]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-help"})],-1),y("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(l(),d("li",ZI,[o("a",{class:A(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[6]||(t[6]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})],-1),y(" Admin ",-1)])],2)])):p("v-if",!0)]),o("ul",xI,[t[11]||(t[11]=o("li",{class:"nav-item"},[o("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[o("i",{class:"fab fa-github","aria-hidden":"true"})])],-1)),p(` "Report a bug" is about this service. Reviewers who land on an +`)}else typeof C=="number"||typeof C=="boolean"?Q=String(C):Q=JSON.stringify(C);ae.push(`${J}${Q}${ee}`)}),ae.push("}"),ae.join(` +`)}function h(D){let T=[],P="",H=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,U;for(;U=H.exec(D);)P+=D.slice(q,U.index),q=H.lastIndex,T.push({key:U[1],op:U[2]||"=",val:U[3]});return P+=D.slice(q),{filters:T,free:P.trim().toLowerCase()}}function v(D,T){for(let P of T.filters){let H=(U,ae,ie)=>{let C=parseFloat(U),O=parseFloat(ae);return ie==="="?String(U)===String(ae):ie==="!="?String(U)!==String(ae):ie===">="?C>=O:ie==="<="?C<=O:ie===">"?C>O:ie==="<"?CT&&q._bucket!==T?!1:v(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 C=q(ie);if(U.has(C)){let O=U.get(C);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(C.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 T=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:T,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,k()},H=>console.error(H))}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length{let T=D.data||{},P=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:P,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function E(){m(),y()}e.barPx=(D,T)=>{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[T]||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"],T=[D.join(",")];for(let U of e.visible)T.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([T.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 w(D){e.copyHint=`${D} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>w("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(()=>w("curl"))},E();let R=r(()=>{e.query.autoRefresh&&E()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},nl=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.performanceError=null,e.latencyBound=function(y,E){return y.count?y[E]==null?"> 60 s":"\u2264 "+y[E]+" ms":"No samples"},e.firstByteBound=function(y){return e.latencyBound({count:y.firstByteCount,p95UpperMs:y.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(y){return Math.max(0,Math.round((Date.now()-y.sampledAt)/1e3))},e.peakRss=function(y){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===y.instance}).reduce(function(E,w){return Math.max(E,w.rss)},y.memory.rss)},e.performanceWarning=function(y){return e.sampleAge(y)>45||y.droppedBatches||y.droppedMetrics||y.sockets?.closeWait>0||y.eventLoop.p95Ms>100||y.memoryLimitBytes&&y.memory.rss>y.memoryLimitBytes*.8};var n=!1;e.loadPerformance=function(){var y=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==y&&(e.performance=null),!n&&(n=!0,t.get("/api/admin/performance",{params:{minutes:y}}).then(function(E){y===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){y===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){n=!1,y!==e.performanceMinutes&&e.loadPerformance()}))};function i(y){if(y==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],w=0,R=y;R>=1024&&w0?1:0)+" "+E[w]}e.humanBytes=i;function a(y){if(!y)return"\u2014";var E=Math.floor(y/86400),w=Math.floor(y%86400/3600),R=Math.floor(y%3600/60);return E>0?E+"d "+(w<10?"0":"")+w+"h":w>0?w+"h "+(R<10?"0":"")+R+"m":R+"m"}e.humanDuration=a;function u(y){return y==null?"\u2014":y>=1e6?(y/1e6).toFixed(1)+"M":y>=1e3?(y/1e3).toFixed(1)+"K":String(y)}e.humanNum=u,e.queueTotal=function(y){return y?(y.waiting||0)+(y.active||0)+(y.delayed||0)+(y.failed||0):0},e.statusCount=function(y){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],w=0;wv[w])&&(v[w]=E[w])})})},function(y){e.loading=!1,e.error=y.data&&y.data.error||"Failed to load overview"})}k();var m=r(k,3e4);e.on("dispose",function(){r.cancel(m)})};var rl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Qa(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Xa(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>Ba(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ja(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>on(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>on(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>on(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ga(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>nr(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>nr(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ja(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fa(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>za(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ha(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wa(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ka(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>sr(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>sr(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>nl(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Za(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>xa(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ol(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>sl(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var lp={class:"container paper-page connections-page"},dp={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},up={key:1,role:"status"},cp=["disabled"],pp={key:3},fp={class:"connections-grid"},mp={key:0},hp={class:"connection-title"},vp={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},gp={class:"connection-actions"},yp={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},bp={key:1,class:"connection-installations"},wp={key:0},kp=["href"],Ep={class:"sr-only"},Cp=["disabled"],_p={class:"connection-title"},Sp={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},Np={key:1,class:"connection-revoke"},Dp={key:0},Rp=["disabled"],Tp={class:"connection-resources"},Ap={class:"connection-title"},Op={class:"connection-count"},Ip={key:0,class:"connection-empty"},Pp={class:"connection-resource-name"},Vp={key:0,class:"connection-resource-actions"},qp=["disabled","onClick"],Mp=["disabled","onClick"],Lp={key:1,class:"connection-help",role:"status"},$p=["disabled","onClick"];function il(e,t){return l(),d("div",lp,[t[20]||(t[20]=ce('
My work / GitHub connections

GitHub connections

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

',2)),e.connectionError?(l(),d("p",dp,c(e.connectionError),1)):p("v-if",!0),!e.connections&&!e.connectionError?(l(),d("p",up,"Loading your connections\u2026")):p("v-if",!0),!e.connections&&e.connectionError?(l(),d("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=s=>e.loadConnections())},"Try again",8,cp)):p("v-if",!0),e.connections?(l(),d("div",pp,[o("div",fp,[e.connections.appEnabled?(l(),d("section",mp,[t[8]||(t[8]=o("div",{class:"connection-top"},[o("i",{class:"fab fa-github","aria-hidden":"true"}),o("span",{class:"connection-badge"},"Recommended")],-1)),o("div",hp,[t[3]||(t[3]=o("h2",null,"GitHub App",-1)),o("span",{class:A(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},c(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[9]||(t[9]=o("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(l(),d("p",vp,c(e.connections.appError)+". Reconnect to restore access.",1)):p("v-if",!0),o("div",gp,[e.connections.appConnected&&!e.connections.appError?(l(),d("a",yp,[...t[4]||(t[4]=[b("Manage repository access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),o("a",{class:A(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},c(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3)]),t[10]||(t[10]=o("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(l(),d("ul",bp,[(l(!0),d(X,null,re(e.connections.installations,s=>(l(),d("li",{key:s.id},[o("div",null,[o("strong",null,c(s.account),1),s.suspended?(l(),d("span",wp," \xB7 Suspended")):p("v-if",!0)]),o("a",{target:"_self",href:"/github/app/install?installationId="+s.id},[t[5]||(t[5]=b("Manage access ",-1)),o("span",Ep,"for "+c(s.account),1),t[6]||(t[6]=b(" \u2192",-1))],8,kp)]))),128))])):p("v-if",!0),o("button",{class:"connection-link",disabled:e.busy,onClick:t[1]||(t[1]=s=>e.loadConnections())},[...t[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Refresh access",-1)])],8,Cp)])):p("v-if",!0),o("section",null,[t[13]||(t[13]=o("div",{class:"connection-top"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-key"})]),o("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),o("div",_p,[t[11]||(t[11]=o("h2",null,"GitHub OAuth",-1)),o("span",{class:A(["connection-status",{"is-connected":e.connections.oauthConnected}])},c(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[14]||(t[14]=o("p",null,"For existing OAuth anonymizations.",-1)),t[15]||(t[15]=o("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(l(),d("a",Sp,c(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):p("v-if",!0),e.connections.oauthConnected?(l(),d("div",Np,[e.connections.gistCount?(l(),d("p",Dp,c(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):p("v-if",!0),t[12]||(t[12]=o("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(l(),d("button",{key:1,class:"connection-link connection-danger",disabled:e.busy||e.connections.resources.some(s=>s.connection==="oauth"),onClick:t[2]||(t[2]=s=>e.disconnectOAuth())},"Revoke OAuth access",8,Rp)):p("v-if",!0)])):p("v-if",!0)])]),o("section",Tp,[o("div",Ap,[t[16]||(t[16]=o("h2",null,"Repository connections",-1)),o("span",Op,c(e.connections.resources?.length||0)+" resources",1)]),t[18]||(t[18]=o("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?p("v-if",!0):(l(),d("div",Ip,[...t[17]||(t[17]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),o("div",null,[o("h3",null,"No repository connections yet"),o("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),o("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(l(!0),d(X,null,re(e.connections.resources,s=>(l(),d("div",{class:"connection-resource",key:s.type+s.id},[o("div",Pp,[o("strong",null,c(s.name||s.id),1),o("small",null,c(s.type)+" \xB7 "+c(s.id),1)]),o("span",{class:A(["connection-badge",{"connection-badge-muted":s.connection==="oauth"}])},c(s.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(l(),d("div",Vp,[o("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:r=>e.changeConnection(s,"github-app",!0)},"Check read-only access",8,qp),s.eligible?(l(),d("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:r=>e.changeConnection(s,"github-app",!1)},c(s.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,Mp)):p("v-if",!0),s.eligible===!1?(l(),d("span",Lp,"Access unavailable. Allow this repository on GitHub, then check again.")):p("v-if",!0)])):p("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&s.connection==="github-app"&&e.connections.oauthConnected?(l(),d("button",{key:1,class:"connection-link",disabled:e.busy,onClick:r=>e.changeConnection(s,"oauth",!1)},"Use OAuth",8,$p)):p("v-if",!0)]))),128)),t[19]||(t[19]=o("p",{class:"connection-footnote"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),b(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):p("v-if",!0)])}var Up={class:"container paper-page auth-page"},Fp={class:"auth-layout"},zp={class:"auth-options"},Hp={key:0},Bp={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},jp={key:1},Gp={key:1},Wp={key:2,class:"auth-legacy"},Kp={key:3,role:"status"};function al(e,t){return l(),d("div",Up,[t[5]||(t[5]=o("a",{class:"auth-back",href:"/"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-arrow-left"})]),b(" Anonymous GitHub")],-1)),o("div",Fp,[t[4]||(t[4]=ce('
Your research, ready for review

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

Sign in to create and manage your anonymizations.

',1)),o("div",zp,[e.accountRecovery?(l(),d("section",Hp,[t[0]||(t[0]=o("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=o("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(l(),d("a",Bp,"Verify with previous GitHub connection")):(l(),d("p",jp,"Account verification is currently unavailable. Please try again later."))])):p("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(l(),d("section",Gp,[...t[2]||(t[2]=[ce('
Read-only access

Continue with GitHub

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

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHub Your existing anonymizations and connections stay with your account.',6)])])):p("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(l(),d("section",Wp,[...t[3]||(t[3]=[o("div",{class:"connection-title"},[o("h2",null,"Continue with GitHub")],-1),o("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),o("a",{class:"connection-link",target:"_self",href:"/github/login"},[b("Sign in with GitHub "),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-arrow-right"})])],-1)])])):p("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(l(),d("p",Kp,"GitHub sign-in is currently unavailable. Please try again later.")):p("v-if",!0)])])])}var Yp={class:"paper-empty"};function ll(e,t){return l(),d("div",Yp,[...t[0]||(t[0]=[ce('
Error \xB7 404

This link
isn\u2019t here.

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

',1)])])}var Jp={class:"container paper-page admin-page"},Qp={class:"admin-summary"},Xp={class:"summary-total"},Zp=["aria-pressed"],xp={class:"count"},ef=["aria-pressed"],tf={class:"count"},of=["aria-pressed"],sf={class:"count"},nf=["aria-pressed"],rf={class:"count"},af=["aria-pressed"],lf={class:"count"},df={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},uf={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},cf={class:"admin-filter-row"},pf={class:"search-wrap"},ff={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},mf={key:0,class:"admin-search-hint"},hf={class:"admin-filter-inline","aria-label":"Pagination"},vf=["disabled"],gf={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},yf=["disabled"],bf={key:0,class:"admin-filter-row"},wf={class:"admin-active-chips"},kf={class:"key"},Ef=["onClick"],Cf={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},_f={class:"paper-table-head",role:"row"},Sf={role:"columnheader"},Nf={role:"columnheader"},Df={role:"columnheader"},Rf={class:"paper-table-row",role:"row"},Tf={class:"cell-anon",role:"cell"},Af={class:"anon-text"},Of=["textContent","href"],If={class:"anon-sub"},Pf={class:"cell-status",role:"cell"},Vf=["textContent"],qf={class:"cell-views num",role:"cell"},Mf=["textContent","href"],Lf={class:"cell-expires",role:"cell"},$f={class:"cell-actions",role:"cell"},Uf={class:"dropdown"},Ff={class:"dropdown-menu dropdown-menu-right"},zf=["href"],Hf=["href"],Bf=["href"],jf=["onClick"],Gf={key:0,class:"paper-table-empty"},Wf={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},Kf={style:{"font-size":"12px",color:"var(--ink-muted)"}},Yf={key:0,class:"pagination-compact"},Jf=["disabled"],Qf=["max"],Xf=["disabled"],Zf={class:"admin-filter-inline"},xf={class:"form-control form-control-sm"};function dl(e,t){let s=be("field"),r=be("form");return l(),d("div",Jp,[t[47]||(t[47]=ce('
Admin \xA0/\xA0 Conferences

Conferences

',3)),o("div",Qp,[o("span",Xp,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1}),"aria-pressed":!!e.query?.ready},[t[13]||(t[13]=b("Ready ",-1)),o("span",xp,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,Zp),o("button",{type:"button",class:A(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1}),"aria-pressed":!!e.query?.preparing},[t[14]||(t[14]=b("Preparing ",-1)),o("span",tf,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],10,ef),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1}),"aria-pressed":!!e.query?.error},[t[15]||(t[15]=b("Errored ",-1)),o("span",sf,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,of),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1}),"aria-pressed":!!e.query?.expired},[t[16]||(t[16]=b("Expired ",-1)),o("span",rf,c(e.fmt?.number(e.statusCountFor("expired"))),1)],10,nf),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1}),"aria-pressed":!!e.query?.removed},[t[17]||(t[17]=b("Removed ",-1)),o("span",lf,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,af)]),e.fetchError?(l(),d("div",df,[t[18]||(t[18]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",uf,[o("div",cf,[o("div",pf,[N(o("input",ff,null,512),[[s,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",mf,"/"))]),t[22]||(t[22]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),b(" Export",-1)])]),o("span",hf,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,vf),o("span",gf,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,yf)])]),e.chips?.length?(l(),d("div",bf,[o("div",wf,[(l(!0),d(X,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[o("span",kf,c(n?.label),1),o("span",null,c(n?.value),1),o("button",{type:"button",onClick:a=>e.clearFilter(n.key),"aria-label":"Clear filter"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,Ef)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),o("div",Cf,[o("div",_f,[o("div",Sf,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="name"}]),onClick:t[8]||(t[8]=n=>e.sortBy("name"))},[t[25]||(t[25]=b("Conference ",-1)),e.sortIcon("name")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[24]||(t[24]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",Nf,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[9]||(t[9]=n=>e.sortBy("status"))},[t[27]||(t[27]=b("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[26]||(t[26]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[30]||(t[30]=o("div",{role:"columnheader",class:"num"},"Repos",-1)),o("div",Df,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[10]||(t[10]=n=>e.sortBy("startDate"))},[t[29]||(t[29]=b("Window ",-1)),e.sortIcon("startDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[31]||(t[31]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,re(e.filteredConferences,(n,i)=>(l(),d("div",Rf,[o("div",Tf,[t[33]||(t[33]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[o("use",{href:"#project-icon-conference"})],-1)),o("div",Af,[o("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,Of),o("div",If,[o("span",null,c(n?.conferenceID),1),t[32]||(t[32]=b("\xA0\xB7\xA0",-1)),o("span",null,c(e.fmt?.number(n?.price||0))+" \u20AC",1)])])]),o("div",Pf,[o("span",{class:A(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Vf)]),o("div",qf,[t[34]||(t[34]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),o("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(n?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+n?.conferenceID)},null,8,Mf)]),o("div",Lf,[t[35]||(t[35]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),b(" "+c(e.fmt?.date(n?.startDate))+" \u2013 "+c(e.fmt?.date(n?.endDate)),1)]),o("div",$f,[o("div",Uf,[t[41]||(t[41]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",Ff,[o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[36]||(t[36]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit",-1)])],8,zf),o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[37]||(t[37]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View",-1)])],8,Hf),o("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+n?.conferenceID)},[...t[38]||(t[38]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),b(" View repositories",-1)])],8,Bf),t[40]||(t[40]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:me(a=>e.removeConference(n),["prevent"])},[...t[39]||(t[39]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove",-1)])],8,jf),[[Y,n?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(l(),d("div",Gf,[...t[42]||(t[42]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No conferences match the current filters.",-1)])])):p("v-if",!0)]),o("div",Wf,[o("span",Kf,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",Yf,[o("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),b(" Previous",-1)])],8,Jf),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Qf),[[s,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[44]||(t[44]=[b("Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Xf)])):p("v-if",!0),o("span",Zf,[t[46]||(t[46]=o("label",null,"Per page",-1)),N((l(),d("select",xf,[...t[45]||(t[45]=[ce('',5)])])),[[s,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var em={class:"container paper-page admin-page errors-page"},tm={class:"errors-header"},om={class:"errors-actions"},sm={class:"kpi-grid"},nm={class:"kpi-card"},rm={class:"kpi-value"},im={key:0},am={key:1},lm={class:"kpi-card kpi-error"},dm={class:"kpi-value"},um={class:"kpi-sub"},cm={class:"kpi-card kpi-warn"},pm={class:"kpi-value"},fm={class:"kpi-sub"},mm={class:"kpi-card kpi-info"},hm={class:"kpi-value"},vm={class:"kpi-sub"},gm={class:"kpi-value"},ym={class:"kpi-sub"},bm={key:0,class:"dropped-warn"},wm={class:"volume-chart"},km={class:"volume-bars"},Em=["title"],Cm={class:"errors-toolbar","aria-label":"Error filters"},_m={class:"seg-tabs"},Sm={class:"search-wrap"},Nm={type:"search",class:"form-control",placeholder:"code:repo_not_found module:route status:>=400",autocomplete:"off"},Dm={key:0,class:"filter-count"},Rm={class:"select-wrap"},Tm={class:"form-control form-control-sm"},Am={class:"select-wrap"},Om={class:"form-control form-control-sm"},Im={class:"autoref"},Pm={type:"checkbox"},Vm={key:0,class:"admin-empty"},qm={key:1,class:"errors-pager"},Mm={key:2,class:"errors-list"},Lm=["onClick"],$m={class:"col-when"},Um={class:"when-rel"},Fm={class:"when-abs"},zm={class:"col-sev"},Hm={class:"sev-label"},Bm={class:"col-mod"},jm={class:"pill pill-module"},Gm={class:"col-msg"},Wm={class:"msg-code"},Km={key:0,class:"msg-context"},Ym={key:1,class:"msg-detail"},Jm={key:2,class:"msg-url"},Qm={class:"col-count"},Xm={key:0,class:"count-pill"},Zm={key:1,class:"count-pill count-pill-muted"},xm={class:"col-status"},eh={key:0,class:"errors-row-detail"},th={class:"detail-tabs"},oh=["onClick"],sh=["onClick"],nh=["onClick"],rh={class:"detail-body"},ih={class:"detail-main"},ah={key:0},lh={key:1,class:"stack-pre"},dh={key:2,class:"related-list"},uh={class:"when-abs"},ch={class:"msg-url"},ph={class:"detail-actions"},fh=["onClick"],mh=["onClick"],hh={key:0,class:"copy-hint"},vh={class:"detail-aside"},gh={class:"aside-block"},yh=["title"],bh={class:"aside-block"},wh=["title"],kh={class:"aside-block"},Eh={class:"aside-value"},Ch={key:0,class:"aside-sub"},_h={key:0,class:"aside-block"},Sh=["href"],Nh={key:1,class:"aside-block"},Dh={class:"aside-value mono"};function ul(e,t){let s=be("field"),r=be("form");return l(),d("div",em,[t[32]||(t[32]=o("div",{class:"paper-crumbs"},[b("Admin \xA0/\xA0 "),o("span",{class:"here"},"Errors")],-1)),o("header",tm,[t[10]||(t[10]=o("h1",{class:"paper-page-title"},"Errors",-1)),o("div",om,[o("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=n=>e.exportCsv())},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),b(" Export CSV",-1)])]),o("button",{class:"btn btn-sm btn-danger",type:"button",onClick:t[1]||(t[1]=n=>e.clearAll())},[...t[9]||(t[9]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Clear all",-1)])])])]),t[33]||(t[33]=ce('',1)),o("section",sm,[o("div",nm,[t[11]||(t[11]=o("div",{class:"kpi-label"},"Last 24h",-1)),o("div",rm,c(e.stats?.last24h),1),o("div",{class:A(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h?(l(),d("span",im,c(e.stats?.delta>0?"+":"")+c(e.stats?.delta)+"% vs yesterday",1)):p("v-if",!0),e.stats?.prev24h?p("v-if",!0):(l(),d("span",am,"no prior baseline"))],2)]),o("div",lm,[t[12]||(t[12]=o("div",{class:"kpi-label"},"Errors (5xx)",-1)),o("div",dm,c(e.stats?.severity?.error),1),o("div",um,c(e.stats?.unique?.error)+" unique",1)]),o("div",cm,[t[13]||(t[13]=o("div",{class:"kpi-label"},"Warnings (4xx)",-1)),o("div",pm,c(e.stats?.severity?.warn),1),o("div",fm,c(e.stats?.unique?.warn)+" unique",1)]),o("div",mm,[t[14]||(t[14]=o("div",{class:"kpi-label"},"Info (auth, 404)",-1)),o("div",hm,c(e.stats?.severity?.info),1),o("div",vm,c(e.stats?.unique?.info)+" unique",1)]),o("div",{class:A(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[15]||(t[15]=o("div",{class:"kpi-label"},"Captured",-1)),o("div",gm,c(e.total),1),o("div",ym,[b(" cap "+c(e.cap)+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(l(),d("span",bm," \xB7 "+c(e.stats?.dropped)+" dropped",1)):p("v-if",!0)])],2)]),o("section",wm,[t[16]||(t[16]=ce('
Volume \xB7 24h \xB7 1h bucketserror warn info
',1)),o("div",km,[(l(!0),d(X,null,re(e.stats?.buckets,(n,i)=>(l(),d("div",{class:"volume-bar",key:i,title:e.bucketTitle(n)},[o("span",{class:"seg seg-error",style:Me({height:e.barPx(n,"error")+"px"})},null,4),o("span",{class:"seg seg-warn",style:Me({height:e.barPx(n,"warn")+"px"})},null,4),o("span",{class:"seg seg-info",style:Me({height:e.barPx(n,"info")+"px"})},null,4)],8,Em))),128))])]),N((l(),d("form",Cm,[o("div",_m,[o("button",{type:"button",class:A({active:e.query?.bucket===""}),onClick:t[2]||(t[2]=n=>e.setBucket(""))},"All",2),o("button",{type:"button",class:A({active:e.query?.bucket==="error"}),onClick:t[3]||(t[3]=n=>e.setBucket("error"))},"5xx",2),o("button",{type:"button",class:A({active:e.query?.bucket==="warn"}),onClick:t[4]||(t[4]=n=>e.setBucket("warn"))},"4xx",2),o("button",{type:"button",class:A({active:e.query?.bucket==="info"}),onClick:t[5]||(t[5]=n=>e.setBucket("info"))},"Info",2)]),o("div",Sm,[t[17]||(t[17]=o("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-search"})],-1)),N(o("input",Nm,null,512),[[s,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(l(),d("span",Dm,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):p("v-if",!0)]),o("div",Rm,[t[19]||(t[19]=o("label",null,"Sort",-1)),N((l(),d("select",Tm,[...t[18]||(t[18]=[o("option",{value:"recent"},"Most recent",-1),o("option",{value:"count"},"Most frequent",-1)])])),[[s,{state:e.viewState,set:n=>{e.query.sort=n},value:e.query?.sort,form:null,options:{}}]])]),o("div",Am,[t[21]||(t[21]=o("label",null,"Group",-1)),N((l(),d("select",Om,[...t[20]||(t[20]=[o("option",{value:""},"Off",-1),o("option",{value:"code"},"By code",-1),o("option",{value:"module"},"By module",-1)])])),[[s,{state:e.viewState,set:n=>{e.query.group=n},value:e.query?.group,form:null,options:{}}]])]),o("label",Im,[N(o("input",Pm,null,512),[[s,{state:e.viewState,set:n=>{e.query.autoRefresh=n},value:e.query?.autoRefresh,form:null,options:{}}]]),t[22]||(t[22]=b(" Auto-refresh ",-1))]),o("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[6]||(t[6]=n=>e.refreshNow()),"aria-label":"Refresh"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])])),[[r,e.viewState]]),e.visible?.length?p("v-if",!0):(l(),d("div",Vm,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(l(),d("div",qm,[o("span",null,"Showing "+c(e.entries?.length)+" of "+c(e.total)+" captured",1),o("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.loadMore())},"Load older")])):p("v-if",!0),e.visible?.length?(l(),d("div",Mm,[t[31]||(t[31]=ce('
WhenSeverityModuleMessageCountStatus
',1)),(l(!0),d(X,null,re(e.visible,(n,i)=>(l(),d("div",{class:A(["errors-row",{open:e.expanded[n?._key]}]),key:n?._key},[o("div",{class:"errors-row-main",onClick:a=>e.toggle(n)},[o("div",$m,[o("div",Um,c(e.relTime(n?.ts)),1),o("div",Fm,c(e.absTimeShort(n?.ts)),1)]),o("div",zm,[o("span",{class:A(["sev-dot","sev-"+n?._bucket])},null,2),o("span",Hm,c(e.fmt?.uppercase(n?._bucket)),1)]),o("div",Bm,[o("span",jm,c(n?.module),1)]),o("div",Gm,[o("strong",Wm,c(n?.displayMessage),1),n?.displayContext&&n?.displayContext!==n?.displayMessage?(l(),d("span",Km,c(n?.displayContext),1)):p("v-if",!0),n?._detail?(l(),d("span",Ym,c(n?._detail),1)):p("v-if",!0),n?._url?(l(),d("div",Jm,c(n?._url),1)):p("v-if",!0)]),o("div",Qm,[n?.count>1?(l(),d("span",Xm,"\xD7"+c(n?.count),1)):p("v-if",!0),n?.count===1?(l(),d("span",Zm,"\xD71")):p("v-if",!0)]),o("div",xm,[n?._status?(l(),d("span",{key:0,class:A(["status-pill","status-"+n?._bucket])},c(n?._status),3)):p("v-if",!0)])],8,Lm),e.expanded[n?._key]?(l(),d("div",eh,[o("div",th,[o("button",{type:"button",class:A({active:e.detailTab[n?._key]==="raw"||!e.detailTab[n?._key]}),onClick:a=>e.detailTab[n._key]="raw"},"Raw",10,oh),n?._stack?(l(),d("button",{key:0,type:"button",class:A({active:e.detailTab[n?._key]==="stack"}),onClick:a=>e.detailTab[n._key]="stack"},"Stack",10,sh)):p("v-if",!0),n?.count>1?(l(),d("button",{key:1,type:"button",class:A({active:e.detailTab[n?._key]==="related"}),onClick:a=>e.detailTab[n._key]="related"},"Related ("+c(n?.count)+")",11,nh)):p("v-if",!0)]),o("div",rh,[o("div",ih,[(e.detailTab[n?._key]||"raw")==="raw"?(l(),d("pre",ah,c(n?._detailJson),1)):p("v-if",!0),e.detailTab[n?._key]==="stack"?(l(),d("pre",lh,c(n?._stack),1)):p("v-if",!0),e.detailTab[n?._key]==="related"?(l(),d("div",dh,[(l(!0),d(X,null,re(n?._related,(a,u)=>(l(),d("div",{class:"related-row",key:u},[o("span",uh,c(e.absTimeShort(a?.ts)),1),o("span",ch,c(a?._url),1),a?._status?(l(),d("span",{key:0,class:A(["status-pill","status-"+a?._bucket])},c(a?._status),3)):p("v-if",!0)]))),128))])):p("v-if",!0),o("div",ph,[o("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:a=>e.copyCurl(n)},[...t[24]||(t[24]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),b(" Copy curl",-1)])],8,fh),o("button",{class:"btn btn-sm",type:"button",onClick:a=>e.copyJson(n)},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-clipboard"})],-1),b(" Copy JSON",-1)])],8,mh),e.copyHint?(l(),d("span",hh,c(e.copyHint),1)):p("v-if",!0)])]),o("aside",vh,[o("div",gh,[t[26]||(t[26]=o("div",{class:"aside-label"},"First seen",-1)),o("div",{class:"aside-value",title:e.absTime(n?._firstSeen)},c(e.relTime(n?._firstSeen)),9,yh)]),o("div",bh,[t[27]||(t[27]=o("div",{class:"aside-label"},"Last seen",-1)),o("div",{class:"aside-value",title:e.absTime(n?.ts)},c(e.relTime(n?.ts)),9,wh)]),o("div",kh,[t[28]||(t[28]=o("div",{class:"aside-label"},"Occurrences",-1)),o("div",Eh,[b(c(n?.count),1),n?._lastHourCount?(l(),d("span",Ch," \xB7 "+c(n?._lastHourCount)+" this hour",1)):p("v-if",!0)])]),n?._repoId?(l(),d("div",_h,[t[29]||(t[29]=o("div",{class:"aside-label"},"Repository",-1)),o("a",{class:"aside-value",href:e.safeUrl("/r/"+n?._repoId)},c(n?._repoId),9,Sh)])):p("v-if",!0),n?._url?(l(),d("div",Nh,[t[30]||(t[30]=o("div",{class:"aside-label"},"URL",-1)),o("div",Dh,c(n?._url),1)])):p("v-if",!0)])])])):p("v-if",!0)],2))),128))])):p("v-if",!0)])}var Rh={class:"container paper-page admin-page overview-page"},Th={key:0,class:"admin-empty"},Ah={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},Oh={class:"ov-panel-card",style:{margin:"16px 0"}},Ih={class:"ov-panel-head"},Ph={key:0,class:"alert alert-warning"},Vh={key:1},qh={key:2},Mh={class:"table-responsive"},Lh={class:"table table-sm"},$h={key:0},Uh={key:1,class:"alert alert-warning"},Fh={class:"table-responsive"},zh={class:"table table-sm"},Hh={class:"table-responsive"},Bh={class:"table table-sm"},jh={key:2},Gh={class:"ov-kpi-row"},Wh={class:"ov-kpi-card"},Kh={class:"ov-kpi-value"},Yh={class:"ov-kpi-sub"},Jh={class:"ov-kpi-card"},Qh={class:"ov-kpi-sub"},Xh={class:"ov-kpi-card"},Zh={class:"ov-kpi-sub"},xh={class:"ov-kpi-card"},ev={class:"ov-kpi-sub"},tv={class:"ov-kpi-card"},ov={class:"ov-kpi-value"},sv={class:"ov-kpi-sub"},nv={class:"ov-daily-row"},rv={class:"ov-daily-card"},iv={class:"ov-daily-value"},av={class:"ov-daily-card"},lv={class:"ov-daily-value"},dv={class:"ov-daily-sub"},uv={class:"ov-daily-card"},cv={class:"ov-daily-value"},pv={class:"ov-chart-row"},fv={class:"ov-chart-card"},mv={key:0,class:"ov-spark-bars"},hv=["data-tip","aria-label"],vv={key:1,class:"ov-spark-x"},gv={class:"ov-chart-card"},yv={key:0,class:"ov-spark-bars"},bv=["data-tip","aria-label"],wv={key:1,class:"ov-spark-x"},kv={class:"ov-chart-card"},Ev={key:0,class:"ov-spark-bars"},Cv=["data-tip","aria-label"],_v={key:1,class:"ov-spark-x"},Sv={class:"ov-chart-card"},Nv={key:0,class:"ov-spark-bars"},Dv=["data-tip","aria-label"],Rv={key:1,class:"ov-spark-x"},Tv={class:"ov-triple-row"},Av={class:"ov-panel-card"},Ov={class:"ov-panel-head"},Iv={class:"ov-panel-meta"},Pv={class:"ov-stacked-bar"},Vv={class:"ov-bar-legend"},qv={href:"/admin/repositories",class:"ov-legend-item"},Mv={class:"ov-legend-n"},Lv={href:"/admin/repositories",class:"ov-legend-item"},$v={class:"ov-legend-n"},Uv={href:"/admin/repositories",class:"ov-legend-item"},Fv={class:"ov-legend-n"},zv={href:"/admin/repositories",class:"ov-legend-item"},Hv={class:"ov-legend-n"},Bv={href:"/admin/repositories",class:"ov-legend-item"},jv={class:"ov-legend-n"},Gv={class:"ov-panel-card"},Wv={class:"ov-panel-head"},Kv={class:"ov-panel-meta"},Yv={class:"ov-error-bars"},Jv={class:"ov-ebar-row"},Qv={class:"ov-ebar-track"},Xv={class:"ov-ebar-n"},Zv={class:"ov-ebar-row"},xv={class:"ov-ebar-track"},eg={class:"ov-ebar-n"},tg={class:"ov-ebar-row"},og={class:"ov-ebar-track"},sg={class:"ov-ebar-n"},ng={key:0,class:"ov-panel-foot"},rg={href:"/admin/errors"},ig={class:"ov-panel-card"},ag={class:"ov-routes-table"},lg={class:"ov-route-row",href:"/admin/queues"},dg={class:"ov-route-n"},ug={class:"ov-route-n"},cg={class:"ov-route-row",href:"/admin/queues"},pg={class:"ov-route-n"},fg={class:"ov-route-n"},mg={class:"ov-route-row",href:"/admin/queues"},hg={class:"ov-route-n"},vg={class:"ov-route-n"},gg={class:"ov-services-card"},yg={class:"ov-services-head"},bg={class:"ov-panel-meta"},wg={class:"ov-services-grid"},kg={class:"ov-svc"},Eg={class:"ov-svc-info"},Cg={class:"ov-svc-meta"},_g={class:"ov-svc-detail"},Sg={class:"ov-svc"},Ng={class:"ov-svc-info"},Dg={key:0,class:"ov-svc-meta"},Rg={key:1,class:"ov-svc-meta"},Tg={class:"ov-svc"},Ag={class:"ov-svc-info"},Og={key:0,class:"ov-svc-meta"},Ig={key:1,class:"ov-svc-meta"},Pg={class:"ov-svc"},Vg={class:"ov-svc-info"},qg={key:0,class:"ov-svc-meta"},Mg={key:1,class:"ov-svc-meta"},Lg={class:"ov-svc"},$g={class:"ov-svc-info"},Ug={class:"ov-svc-meta"};function cl(e,t){return l(),d("div",Rh,[t[52]||(t[52]=ce('
Admin \xB7 System Health

Overview

',3)),e.loading?(l(),d("div",Th,"Loading overview\u2026")):p("v-if",!0),e.error?(l(),d("div",Ah,[t[2]||(t[2]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.error),1)])):p("v-if",!0),o("section",Oh,[o("div",Ih,[t[4]||(t[4]=o("span",{class:"ov-panel-title"},"Request performance",-1)),N(o("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>e.performanceMinutes=s),onChange:t[1]||(t[1]=s=>e.loadPerformance()),"aria-label":"Performance time range"},[...t[3]||(t[3]=[o("option",{value:15},"Last 15 minutes",-1),o("option",{value:60},"Last hour",-1)])],544),[[xi,e.performanceMinutes,void 0,{number:!0}]])]),e.performanceError?(l(),d("p",Ph,c(e.performanceError),1)):p("v-if",!0),!e.performance&&!e.performanceError?(l(),d("p",Vh,"Loading performance monitoring\u2026")):p("v-if",!0),e.performance?.available?(l(),d("div",qh,[t[8]||(t[8]=o("p",null,"Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds. Samples refresh every 30 seconds.",-1)),o("div",Mh,[o("table",Lh,[t[5]||(t[5]=o("thead",null,[o("tr",null,[o("th",null,"Service"),o("th",null,"Route"),o("th",null,"Requests"),o("th",null,"Average"),o("th",null,"First byte p95"),o("th",null,"p95"),o("th",null,"p99"),o("th",null,"Interrupted"),o("th",null,"5xx"),o("th",null,"Slow")])],-1)),o("tbody",null,[(l(!0),d(X,null,re(e.performance.routes,s=>(l(),d("tr",{key:s.service+s.method+s.route},[o("td",null,c(s.service),1),o("td",null,c(s.method)+" "+c(s.route),1),o("td",null,c(s.count),1),o("td",null,c(s.avgMs)+" ms",1),o("td",null,c(e.firstByteBound(s)),1),o("td",null,c(e.latencyBound(s,"p95UpperMs")),1),o("td",null,c(e.latencyBound(s,"p99UpperMs")),1),o("td",null,c(s.aborted),1),o("td",null,c(s.errors),1),o("td",null,c(s.slow),1)]))),128))])])]),e.performance.routes?.length?p("v-if",!0):(l(),d("p",$h,"No recorded requests in this window yet.")),t[9]||(t[9]=o("h3",null,"API and streamer processes",-1)),e.performance.instances?.length?p("v-if",!0):(l(),d("p",Uh,"No recent process samples. Monitoring coverage is incomplete.")),o("div",Fh,[o("table",zh,[t[6]||(t[6]=o("thead",null,[o("tr",null,[o("th",null,"Process"),o("th",null,"RSS / limit"),o("th",null,"Peak RSS in window"),o("th",null,"CPU"),o("th",null,"Event loop p95"),o("th",null,"Active requests"),o("th",null,"Sockets / CLOSE_WAIT"),o("th",null,"Workers / waiting"),o("th",null,"Sample age"),o("th",null,"Dropped batches / metrics")])],-1)),o("tbody",null,[(l(!0),d(X,null,re(e.performance.instances,s=>(l(),d("tr",{key:s.instance,class:A({"table-warning":e.performanceWarning(s)})},[o("td",null,c(s.instance),1),o("td",null,c(e.humanBytes(s.memory.rss))+" / "+c(e.humanBytes(s.memoryLimitBytes)),1),o("td",null,c(e.humanBytes(e.peakRss(s))),1),o("td",null,c(s.cpuPercent.toFixed(1))+"%",1),o("td",null,c(s.eventLoop.p95Ms.toFixed(1))+" ms",1),o("td",null,c(s.activeRequests),1),o("td",null,c(s.sockets?.descriptors??"Unavailable")+" / "+c(s.sockets?.closeWait??"Unavailable"),1),o("td",null,c(s.workers?.running??0)+" / "+c(s.workers?.waiting??0),1),o("td",null,c(e.sampleAge(s))+" s",1),o("td",null,c(s.droppedBatches)+" / "+c(s.droppedMetrics),1)],2))),128))])])]),t[10]||(t[10]=o("h3",null,"Work stages and cache results",-1)),o("div",Hh,[o("table",Bh,[t[7]||(t[7]=o("thead",null,[o("tr",null,[o("th",null,"Service"),o("th",null,"Stage"),o("th",null,"Samples"),o("th",null,"Average"),o("th",null,"p95")])],-1)),o("tbody",null,[(l(!0),d(X,null,re(e.performance.stages.filter(s=>s.metric!=="first_byte"),s=>(l(),d("tr",{key:s.service+s.metric},[o("td",null,c(s.service),1),o("td",null,c(s.metric),1),o("td",null,c(s.count),1),o("td",null,c(s.avgMs)+" ms",1),o("td",null,c(e.latencyBound(s,"p95UpperMs")),1)]))),128))])])])])):p("v-if",!0)]),e.data?(l(),d("div",jh,[p(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",Gh,[o("div",Wh,[t[11]||(t[11]=o("div",{class:"ov-kpi-label"},[b("Repositories "),o("span",{class:"ov-dot ov-dot-ok"})],-1)),o("div",Kh,c(e.humanNum(e.data?.repos?.total)),1),o("div",Yh,"+"+c(e.data?.repos?.newRepos24h)+" \xB7 last 24h",1)]),o("div",Jh,[t[12]||(t[12]=o("div",{class:"ov-kpi-label"},"CPU",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>80}])},c(e.data?.system?.cpuPercent)+"%",3),o("div",Qh,c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)]),o("div",Xh,[t[13]||(t[13]=o("div",{class:"ov-kpi-label"},"Memory",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>85}])},c(e.data?.system?.memPercent)+"%",3),o("div",Zh,c(e.humanBytes(e.data?.system?.memUsed))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)]),o("div",xh,[t[14]||(t[14]=o("div",{class:"ov-kpi-label"},"Disk",-1)),o("div",{class:A(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>85}])},c(e.data?.system?.diskPercent)+"%",3),o("div",ev,c(e.humanBytes(e.data?.system?.diskUsed))+" / "+c(e.humanBytes(e.data?.system?.diskTotal))+" \xB7 "+c(e.data?.system?.diskMount),1)]),o("div",tv,[t[15]||(t[15]=o("div",{class:"ov-kpi-label"},"Uptime",-1)),o("div",ov,c(e.humanDuration(e.data?.system?.uptime)),1),o("div",sv,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),p(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",nv,[o("div",rv,[t[16]||(t[16]=o("div",{class:"ov-daily-label"},"New repos today",-1)),o("div",iv,"+"+c(e.fmt?.number(e.data?.daily?.today?.repositories)),1),t[17]||(t[17]=o("div",{class:"ov-daily-sub"},"since yesterday",-1))]),o("div",av,[t[18]||(t[18]=o("div",{class:"ov-daily-label"},"New users today",-1)),o("div",lv,"+"+c(e.fmt?.number(e.data?.daily?.today?.users)),1),o("div",dv,c(e.fmt?.number(e.data?.users?.total))+" total users",1)]),o("div",uv,[t[19]||(t[19]=o("div",{class:"ov-daily-label"},"Page views today",-1)),o("div",cv,"+"+c(e.fmt?.number(e.data?.daily?.today?.pageViews)),1),t[20]||(t[20]=o("div",{class:"ov-daily-sub"},"since yesterday",-1))])]),p(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",pv,[o("div",fv,[t[21]||(t[21]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"Daily page views \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-accent"}),b("views/day")])],-1)),e.data?.history?.length?(l(),d("div",mv,[(l(!0),d(X,null,re(e.data?.history,(s,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+" views","aria-label":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+" views"},[o("span",{class:"ov-spark-fill",style:Me({height:e.historyBarH(s,"dailyPageViews")+"px"})},null,4)],8,hv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",vv,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",gv,[t[22]||(t[22]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"New repos \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-ok-fill"}),b("repos/day")])],-1)),e.data?.history?.length?(l(),d("div",yv,[(l(!0),d(X,null,re(e.data?.history,(s,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+" repos","aria-label":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+" repos"},[o("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Me({height:e.historyBarH(s,"dailyRepositories")+"px"})},null,4)],8,bv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",wv,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",kv,[t[23]||(t[23]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"Users \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-user-fill"}),b("total users")])],-1)),e.data?.history?.length?(l(),d("div",Ev,[(l(!0),d(X,null,re(e.data?.history,(s,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(s)+": "+e.fmt?.number(s?.nbUsers)+" users","aria-label":e.historyLabel(s)+": "+e.fmt?.number(s?.nbUsers)+" users"},[o("span",{class:"ov-spark-fill ov-spark-fill-user",style:Me({height:e.historyBarH(s,"nbUsers")+"px"})},null,4)],8,Cv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",_v,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)]),o("div",Sv,[t[24]||(t[24]=o("div",{class:"ov-chart-head"},[o("span",{class:"ov-chart-title"},"New users \xB7 30d"),o("span",{class:"ov-chart-legend"},[o("span",{class:"ov-dot-legend ov-dot-new-user-fill"}),b("users/day")])],-1)),e.data?.history?.length?(l(),d("div",Nv,[(l(!0),d(X,null,re(e.data?.history,(s,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+" users","aria-label":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+" users"},[o("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Me({height:e.historyBarH(s,"dailyUsers")+"px"})},null,4)],8,Dv))),128))])):p("v-if",!0),e.data?.history?.length?(l(),d("div",Rv,[o("span",null,c(e.historyLabel(e.data?.history[0])),1),o("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),o("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):p("v-if",!0)])]),p(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",Tv,[p(" Repo status breakdown "),o("div",Av,[o("div",Ov,[t[25]||(t[25]=o("span",{class:"ov-panel-title"},"Repo status",-1)),o("span",Iv,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),o("div",Pv,[o("span",{class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Me({width:e.barPct("ready")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Me({width:e.barPct("preparing")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-error",title:"Error",style:Me({width:e.barPct("error")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-expired",title:"Expired",style:Me({width:e.barPct("expired")+"%"})},null,4),o("span",{class:"ov-bar-seg ov-bar-removed",title:"Removed",style:Me({width:e.barPct("removed")+"%"})},null,4)]),o("div",Vv,[o("a",qv,[t[26]||(t[26]=o("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[27]||(t[27]=b(" ready ",-1)),o("span",Mv,c(e.fmt?.number(e.statusCount("ready"))),1)]),o("a",Lv,[t[28]||(t[28]=o("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[29]||(t[29]=b(" preparing ",-1)),o("span",$v,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),o("a",Uv,[t[30]||(t[30]=o("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[31]||(t[31]=b(" error ",-1)),o("span",Fv,c(e.fmt?.number(e.statusCount("error"))),1)]),o("a",zv,[t[32]||(t[32]=o("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[33]||(t[33]=b(" expired ",-1)),o("span",Hv,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),o("a",Bv,[t[34]||(t[34]=o("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[35]||(t[35]=b(" removed ",-1)),o("span",jv,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),p(" Error breakdown "),o("div",Gv,[o("div",Wv,[t[36]||(t[36]=o("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),o("span",Kv,c(e.data?.errors?.last24h)+" total",1)]),o("div",Yv,[o("div",Jv,[t[37]||(t[37]=o("span",{class:"ov-ebar-label"},"5xx",-1)),o("span",Qv,[o("span",{class:"ov-ebar-fill ov-ebar-error",style:Me({width:e.errPct("error")+"%"})},null,4)]),o("span",Xv,c(e.data?.errors?.severity?.error),1)]),o("div",Zv,[t[38]||(t[38]=o("span",{class:"ov-ebar-label"},"4xx",-1)),o("span",xv,[o("span",{class:"ov-ebar-fill ov-ebar-warn",style:Me({width:e.errPct("warn")+"%"})},null,4)]),o("span",eg,c(e.data?.errors?.severity?.warn),1)]),o("div",tg,[t[39]||(t[39]=o("span",{class:"ov-ebar-label"},"Info",-1)),o("span",og,[o("span",{class:"ov-ebar-fill ov-ebar-info",style:Me({width:e.errPct("info")+"%"})},null,4)]),o("span",sg,c(e.data?.errors?.severity?.info),1)])]),e.data?.repos?.recentErrors24h?(l(),d("div",ng,[o("a",rg,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):p("v-if",!0)]),p(" Top routes / queues "),o("div",ig,[t[44]||(t[44]=o("div",{class:"ov-panel-head"},[o("span",{class:"ov-panel-title"},"Queues"),o("span",{class:"ov-panel-meta"},"by state")],-1)),o("div",ag,[t[43]||(t[43]=ce('
QueueActiveWaitFailed
',1)),o("a",lg,[t[40]||(t[40]=o("span",{class:"ov-route-name"},"download",-1)),o("span",dg,c(e.data?.queues?.download?.active),1),o("span",ug,c(e.data?.queues?.download?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),o("a",cg,[t[41]||(t[41]=o("span",{class:"ov-route-name"},"remove",-1)),o("span",pg,c(e.data?.queues?.remove?.active),1),o("span",fg,c(e.data?.queues?.remove?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),o("a",mg,[t[42]||(t[42]=o("span",{class:"ov-route-name"},"cache",-1)),o("span",hg,c(e.data?.queues?.cache?.active),1),o("span",vg,c(e.data?.queues?.cache?.waiting),1),o("span",{class:A(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),p(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),o("section",gg,[o("div",yg,[t[45]||(t[45]=o("span",{class:"ov-panel-title"},"Services",-1)),o("span",bg,c(e.fmt?.number(e.data?.users?.total))+" users \xB7 "+c(e.data?.conferences?.total)+" conferences",1)]),o("div",wg,[o("div",kg,[t[47]||(t[47]=o("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),o("div",Eg,[t[46]||(t[46]=o("span",{class:"ov-svc-name"},"web",-1)),o("span",Cg,c(e.data?.system?.nodeVersion),1)]),o("span",_g,"uptime "+c(e.humanDuration(e.data?.system?.uptime)),1)]),o("div",Sg,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",Ng,[t[48]||(t[48]=o("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(l(),d("span",Dg,c(e.queueTotal(e.data?.queues?.download))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.download)?p("v-if",!0):(l(),d("span",Rg,"idle"))])]),o("div",Tg,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",Ag,[t[49]||(t[49]=o("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(l(),d("span",Og,c(e.queueTotal(e.data?.queues?.cache))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.cache)?p("v-if",!0):(l(),d("span",Ig,"idle"))])]),o("div",Pg,[o("span",{class:A(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),o("div",Vg,[t[50]||(t[50]=o("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(l(),d("span",qg,c(e.queueTotal(e.data?.queues?.remove))+" jobs",1)):p("v-if",!0),e.queueTotal(e.data?.queues?.remove)?p("v-if",!0):(l(),d("span",Mg,"idle"))])]),o("div",Lg,[o("span",{class:A(["ov-svc-dot",e.data?.repos?.recentErrors24h>10?"ov-dot-warn":"ov-dot-ok"])},null,2),o("div",$g,[t[51]||(t[51]=o("span",{class:"ov-svc-name"},"errors",-1)),o("span",Ug,c(e.data?.errors?.last24h)+" / 24h",1)])])])])])):p("v-if",!0)])}var Fg={class:"container paper-page admin-page"},zg={class:"q-header"},Hg={class:"q-header-actions"},Bg={class:"q-range-btns"},jg={class:"q-cards"},Gg=["aria-pressed","onKeydown","onClick"],Wg={class:"q-card-head"},Kg=["textContent"],Yg=["textContent"],Jg={class:"q-card-sub"},Qg={key:0,class:"q-card-bar"},Xg={key:0,class:"q-detail"},Zg={class:"q-throughput"},xg={class:"q-section-label"},ey={class:"q-section-right"},ty={class:"q-stats-panel"},oy={class:"q-section-label"},sy={class:"q-stats-grid"},ny={class:"q-stat"},ry=["textContent"],iy={class:"q-stat"},ay=["textContent"],ly={class:"q-stat"},dy=["textContent"],uy={class:"q-stat"},cy=["textContent"],py={class:"q-stat"},fy=["textContent"],my={class:"q-stat"},hy=["textContent"],vy={class:"q-stats-actions"},gy=["disabled"],yy={class:"q-jobs"},by={class:"q-jobs-header"},wy={class:"q-section-label"},ky={class:"q-state-filters"},Ey={class:"q-state-toggle"},Cy={type:"checkbox"},_y={class:"q-search-row"},Sy={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},Ny={class:"q-auto-refresh"},Dy={type:"checkbox"},Ry={key:0,class:"q-table"},Ty=["onClick"],Ay={class:"q-cell-state"},Oy=["textContent"],Iy=["textContent"],Py={class:"q-cell-id"},Vy=["textContent","href"],qy={class:"q-cell-payload"},My=["textContent"],Ly={key:0,class:"q-payload-detail"},$y=["textContent"],Uy=["textContent"],Fy={class:"q-cell-progress"},zy={key:0,class:"q-progress-wrap"},Hy=["textContent"],By={class:"q-cell-actions"},jy=["onClick"],Gy=["onClick"],Wy={key:0,class:"q-detail-row"},Ky={colspan:"7"},Yy={class:"q-job-detail"},Jy={class:"q-job-detail-grid"},Qy={class:"q-job-detail-item"},Xy={class:"q-job-detail-value"},Zy=["textContent","href"],xy={class:"q-job-detail-item"},eb={class:"q-job-detail-value"},tb=["textContent"],ob={key:0,class:"q-job-detail-item"},sb=["textContent"],rb={key:1,class:"q-job-detail-item"},ib=["textContent"],ab={key:2,class:"q-job-detail-item"},lb={class:"q-job-detail-value"},db={key:3,class:"q-job-detail-item"},ub=["textContent"],cb={key:4,class:"q-job-detail-item"},pb=["textContent"],fb={key:5,class:"q-job-detail-item"},mb=["textContent"],hb={key:6,class:"q-job-detail-item"},vb=["textContent"],gb={key:7,class:"q-job-detail-item"},yb=["textContent"],bb={key:0,class:"q-job-detail-error"},wb=["textContent"],kb={key:1},Eb=["textContent"],Cb={class:"q-job-detail-actions"},_b=["onClick"],Sb=["onClick"],Nb=["href"],Db={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},Rb={key:0},Tb={key:1};function pl(e,t){let s=be("field");return l(),d("div",Fg,[t[48]||(t[48]=o("div",{class:"paper-crumbs"},[b("Admin \xA0/\xA0 "),o("span",{class:"here"},"Queues")],-1)),o("div",zg,[t[12]||(t[12]=o("h1",{class:"paper-page-title"},"Queues",-1)),o("div",Hg,[o("div",Bg,[o("button",{class:A(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[0]||(t[0]=r=>e.setRange("1h"))},"1h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[1]||(t[1]=r=>e.setRange("6h"))},"6h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[2]||(t[2]=r=>e.setRange("24h"))},"24h",2),o("button",{class:A(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[3]||(t[3]=r=>e.setRange("7d"))},"7d",2)]),o("button",{class:"btn btn-sm",onClick:t[4]||(t[4]=r=>e.pauseAll())},"Pause all"),o("button",{class:"btn btn-sm btn-dark",onClick:t[5]||(t[5]=r=>e.drainSelected())},"Drain "+c(e.selectedQueue),1)])]),t[49]||(t[49]=ce('',1)),p(" Queue overview cards "),o("div",jg,[(l(!0),d(X,null,re(e.queueList,(r,n)=>(l(),d("div",{class:A(["q-card",{selected:e.selectedQueue==r?.key,paused:r?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===r.key,onKeydown:[Ro(me(i=>e.selectQueue(r.key),["prevent"]),["enter"]),Ro(me(i=>e.selectQueue(r.key),["prevent"]),["space"])],onClick:i=>e.selectQueue(r.key)},[o("div",Wg,[o("span",{class:A(["q-dot",{"q-dot-red":r?.paused||r?.counts?.failed>0}])},null,2),o("span",{class:"q-card-name",textContent:c(r?.label)},null,8,Kg)]),o("div",{class:"q-card-count",textContent:c((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0))},null,8,Yg),o("div",Jg,[o("span",null,"waiting \xB7 "+c(r?.counts?.active||0)+" active",1),r?.counts?.active?(l(),d("div",Qg,[o("div",{class:"q-card-bar-fill",style:Me({width:r?.counts?.active/((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0)||1)*100+"%"})},null,4)])):p("v-if",!0)])],42,Gg))),256))]),p(" Detail: throughput chart + stats panel "),e.selectedStats?(l(),d("div",Xg,[o("div",Zg,[o("div",xg,[b(c(e.selectedQueue)+"\xB7throughput ",1),o("span",ey,[t[13]||(t[13]=o("span",{class:"q-legend-completed"},"\u25CF",-1)),t[14]||(t[14]=b(" completed ",-1)),t[15]||(t[15]=o("span",{class:"q-legend-failed"},"\u25CF",-1)),t[16]||(t[16]=b(" failed ",-1)),t[17]||(t[17]=o("span",{class:"q-legend-exec"},"- -",-1)),b(" avg time \xB7 "+c(e.fmt?.uppercase(e.range)),1)])]),t[18]||(t[18]=o("div",{class:"q-chart-wrap"},[o("canvas",{id:"q-throughput-chart",height:"180"}),o("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}}),o("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}})],-1))]),o("div",ty,[o("div",oy,c(e.selectedQueue)+"\xB7stats",1),o("div",sy,[o("div",ny,[t[19]||(t[19]=o("div",{class:"q-stat-label"},"WAITING",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,ry)]),o("div",iy,[t[20]||(t[20]=o("div",{class:"q-stat-label"},"ACTIVE",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,ay)]),o("div",ly,[t[21]||(t[21]=o("div",{class:"q-stat-label"},"COMPLETED (24H)",-1)),o("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,dy)]),o("div",uy,[t[22]||(t[22]=o("div",{class:"q-stat-label"},"FAILED (24H)",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,cy)]),o("div",py,[t[23]||(t[23]=o("div",{class:"q-stat-label"},"DELAYED",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,fy)]),o("div",my,[t[24]||(t[24]=o("div",{class:"q-stat-label"},"WORKERS",-1)),o("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,hy)])]),o("div",vy,[o("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=r=>e.togglePause())},c(e.selectedStats?.paused?"Resume":"Pause"),1),o("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=r=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,gy),o("button",{class:"btn btn-sm",onClick:t[8]||(t[8]=r=>e.emptyQueue())},"Empty")])])])):p("v-if",!0),e.actionError?(l(),d("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=r=>e.actionError=null)},[t[25]||(t[25]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),b(" "+c(e.actionError),1)])):p("v-if",!0),p(" Jobs table "),o("div",yy,[o("div",by,[o("div",wy,"ALL JOBS \xB7 "+c(e.fmt?.uppercase(e.selectedQueue)),1),o("div",ky,[(l(!0),d(X,null,re(e.allStates,(r,n)=>(l(),d("label",Ey,[N(o("input",Cy,null,512),[[s,{state:e.viewState,set:i=>{e.stateFilter[r]=i},value:e.stateFilter[r],form:null,options:{}}]]),o("span",{class:A("q-state-chip q-state-"+r)},c(r),3)]))),256))])]),o("div",_y,[N(o("input",Sy,null,512),[[s,{state:e.viewState,set:r=>{e.query.search=r},value:e.query?.search,form:null,options:{}}]]),o("label",Ny,[N(o("input",Dy,null,512),[[s,{state:e.viewState,set:r=>{e.query.autoRefresh=r},value:e.query?.autoRefresh,form:null,options:{}}]]),t[26]||(t[26]=b(" Auto-refresh ",-1))]),o("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[10]||(t[10]=r=>e.refreshNow()),"aria-label":"Refresh"},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(l(),d("table",Ry,[t[46]||(t[46]=o("thead",null,[o("tr",null,[o("th",null,"STATE"),o("th",null,"JOB ID"),o("th",null,"PAYLOAD"),o("th",null,"ATTEMPTS"),o("th",null,"DURATION"),o("th",null,"PROGRESS"),o("th")])],-1)),(l(!0),d(X,null,re(e.filteredJobs(),(r,n)=>(l(),d("tbody",null,[o("tr",{style:{cursor:"pointer"},class:A({"q-row-failed":r?._state=="failed","q-row-expanded":e.expanded[r?.id]}),onClick:i=>e.toggleJob(r)},[o("td",Ay,[o("span",{textContent:c(r?._state),class:A("q-state-badge q-state-"+r?._state)},null,10,Oy),r?._state=="delayed"&&r?.delayUntil?(l(),d("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(r?.delayUntil))},null,8,Iy)):p("v-if",!0)]),o("td",Py,[(l(),d("svg",{class:A(["ui-icon q-chevron",{"q-chevron-open":e.expanded[r?.id]}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),o("a",{target:"_blank",textContent:c("job:"+e.fmt.limitTo(r?.id,6)),onClick:t[11]||(t[11]=i=>i.stopPropagation()),href:e.safeUrl("/r/"+r?.id)},null,8,Vy)]),o("td",qy,[o("span",{textContent:c(r?.name||"anonymize")},null,8,My),r?.data?.repoId&&r?.data?.repoId!==r?.name?(l(),d("span",Ly," \xB7 "+c(r?.data?.repoId),1)):p("v-if",!0)]),o("td",{class:"q-cell-num",textContent:c(r?.attemptsMade||1)},null,8,$y),o("td",{class:"q-cell-num",textContent:c(e.jobDuration(r))},null,8,Uy),o("td",Fy,[e.jobProgressPct(r)!==null?(l(),d("div",zy,[o("div",{class:"q-progress-bar",style:Me({"--pct":e.jobProgressPct(r)+"%"})},null,4),o("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(r)+"%")},null,8,Hy)])):p("v-if",!0)]),o("td",By,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:i=>{e.retryJob(r),i.stopPropagation()},"aria-label":"Retry job"},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])],8,jy)):p("v-if",!0),o("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:i=>{e.removeJob(r),i.stopPropagation()}},[...t[30]||(t[30]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)])],8,Gy)])],10,Ty),e.expanded[r?.id]?(l(),d("tr",Wy,[o("td",Ky,[o("div",Yy,[o("div",Jy,[o("div",Qy,[t[31]||(t[31]=o("span",{class:"q-job-detail-label"},"JOB ID",-1)),o("span",Xy,[o("a",{target:"_blank",textContent:c(r?.id),href:e.safeUrl("/r/"+r?.id)},null,8,Zy)])]),o("div",xy,[t[32]||(t[32]=o("span",{class:"q-job-detail-label"},"STATE",-1)),o("span",eb,[o("span",{textContent:c(r?._state),class:A("q-state-badge q-state-"+r?._state)},null,10,tb)])]),r?.data?.repoId?(l(),d("div",ob,[t[33]||(t[33]=o("span",{class:"q-job-detail-label"},"REPO ID",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.data?.repoId)},null,8,sb)])):p("v-if",!0),r?.timestamp?(l(),d("div",rb,[t[34]||(t[34]=o("span",{class:"q-job-detail-label"},"CREATED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.timestamp))},null,8,ib)])):p("v-if",!0),r?._state=="delayed"&&r?.delayUntil?(l(),d("div",ab,[t[35]||(t[35]=o("span",{class:"q-job-detail-label"},"RETRY AT",-1)),o("span",lb,c(e.humanTime(r?.delayUntil))+" ("+c(e.delayCountdown(r?.delayUntil))+")",1)])):p("v-if",!0),r?.processedOn?(l(),d("div",db,[t[36]||(t[36]=o("span",{class:"q-job-detail-label"},"PROCESSED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.processedOn))},null,8,ub)])):p("v-if",!0),r?.finishedOn?(l(),d("div",cb,[t[37]||(t[37]=o("span",{class:"q-job-detail-label"},"FINISHED",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.finishedOn))},null,8,pb)])):p("v-if",!0),r?.attemptsMade?(l(),d("div",fb,[t[38]||(t[38]=o("span",{class:"q-job-detail-label"},"ATTEMPTS",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.attemptsMade)},null,8,mb)])):p("v-if",!0),r?.progress&&r?.progress?.status?(l(),d("div",hb,[t[39]||(t[39]=o("span",{class:"q-job-detail-label"},"STATUS",-1)),o("span",{class:"q-job-detail-value",textContent:c(r?.progress?.status)},null,8,vb)])):p("v-if",!0),e.jobProgressPct(r)!==null?(l(),d("div",gb,[t[40]||(t[40]=o("span",{class:"q-job-detail-label"},"PROGRESS",-1)),o("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(r)+"%")},null,8,yb)])):p("v-if",!0)]),r?.failedReason?(l(),d("div",bb,[t[41]||(t[41]=o("span",{class:"q-job-detail-label"},"ERROR",-1)),o("div",{class:"q-error-reason",textContent:c(r?.failedReason)},null,8,wb)])):p("v-if",!0),r?.stacktrace?.length?(l(),d("div",kb,[t[42]||(t[42]=o("span",{class:"q-job-detail-label"},"STACKTRACE",-1)),(l(!0),d(X,null,re(r?.stacktrace,(i,a)=>(l(),d("pre",{class:"q-error-stack",key:a},[o("code",{textContent:c(i)},null,8,Eb)]))),128))])):p("v-if",!0),o("div",Cb,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",onClick:i=>e.retryJob(r)},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Retry",-1)])],8,_b)):p("v-if",!0),o("button",{class:"btn btn-sm",onClick:i=>e.removeJob(r)},[...t[44]||(t[44]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove",-1)])],8,Sb),o("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+r?.id)},[...t[45]||(t[45]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1),b(" View repo",-1)])],8,Nb)])])])])):p("v-if",!0)]))),256))])):p("v-if",!0),e.filteredJobs().length==0?(l(),d("div",Db,[t[47]||(t[47]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?p("v-if",!0):(l(),d("span",Rb,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(l(),d("span",Tb,"No jobs match the current filters.")):p("v-if",!0)])):p("v-if",!0)])])}var Ab={class:"container paper-page admin-page"},Ob={class:"admin-summary"},Ib={class:"summary-total"},Pb={class:"summary-meta"},Vb=["aria-pressed"],qb={class:"count"},Mb=["aria-pressed"],Lb={class:"count"},$b=["aria-pressed"],Ub={class:"count"},Fb=["aria-pressed"],zb={class:"count"},Hb=["aria-pressed"],Bb={class:"count"},jb={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Gb={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},Wb={class:"admin-filter-row"},Kb={class:"search-wrap"},Yb={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},Jb={key:0,class:"admin-search-hint"},Qb={class:"admin-filter-inline"},Xb={type:"text",class:"form-control form-control-sm",placeholder:"username"},Zb={class:"admin-filter-inline"},xb={type:"text",class:"form-control form-control-sm",placeholder:"ID"},e1={class:"admin-filter-inline","aria-label":"Pagination"},t1=["disabled"],o1={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},s1=["disabled"],n1={key:0,class:"admin-filter-row"},r1={class:"admin-active-chips"},i1={class:"key"},a1=["onClick"],l1={key:1,class:"bulk-bar"},d1={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},u1={class:"paper-table-head",role:"row"},c1={role:"columnheader",style:{width:"28px"}},p1=["checked"],f1={role:"columnheader"},m1={role:"columnheader"},h1={role:"columnheader",class:"num"},v1={role:"columnheader"},g1={role:"cell",style:{width:"28px"}},y1={type:"checkbox","aria-label":"Select repository"},b1={class:"cell-anon",role:"cell"},w1={class:"anon-text"},k1=["textContent","href"],E1={class:"anon-sub"},C1=["textContent","href"],_1={key:0},S1=["textContent","href"],N1={key:1},D1=["textContent","href"],R1={key:2},T1={class:"cell-status",role:"cell"},A1={class:"status-line"},O1=["textContent"],I1=["textContent","title"],P1={class:"cell-views num",role:"cell"},V1=["textContent"],q1={class:"cell-expires",role:"cell"},M1=["textContent"],L1={class:"cell-actions",role:"cell"},$1={class:"dropdown"},U1={class:"dropdown-menu dropdown-menu-right"},F1=["href"],z1=["href"],H1=["href"],B1=["onClick"],j1=["onClick"],G1=["onClick"],W1=["onClick"],K1=["onClick"],Y1=["onClick"],J1={key:0,class:"paper-table-empty"},Q1={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},X1={style:{"font-size":"12px",color:"var(--ink-muted)"}},Z1={key:0,class:"pagination-compact"},x1=["disabled"],ew=["max"],tw=["disabled"],ow={class:"admin-filter-inline"},sw={class:"form-control form-control-sm"};function fl(e,t){let s=be("field"),r=be("form");return l(),d("div",Ab,[t[69]||(t[69]=ce('
Admin \xA0/\xA0 Repositories

Repositories

',3)),o("div",Ob,[o("span",Ib,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("span",Pb,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1}),"aria-pressed":!!e.query?.ready},[t[18]||(t[18]=b("Ready ",-1)),o("span",qb,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,Vb),o("button",{type:"button",class:A(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1}),"aria-pressed":!!e.query?.preparing},[t[19]||(t[19]=b("Preparing ",-1)),o("span",Lb,c(e.fmt?.number(e.statusCountFor("preparing")+e.statusCountFor("download"))),1)],10,Mb),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1}),"aria-pressed":!!e.query?.error},[t[20]||(t[20]=b("Errored ",-1)),o("span",Ub,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,$b),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1}),"aria-pressed":!!e.query?.expired},[t[21]||(t[21]=b("Expired ",-1)),o("span",zb,c(e.fmt?.number(e.statusCountFor("expired")+e.statusCountFor("expiring"))),1)],10,Fb),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1}),"aria-pressed":!!e.query?.removed},[t[22]||(t[22]=b("Removed ",-1)),o("span",Bb,c(e.fmt?.number(e.statusCountFor("removed")+e.statusCountFor("removing"))),1)],10,Hb)]),e.fetchError?(l(),d("div",jb,[t[23]||(t[23]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",Gb,[p(" Row 1: search + scoped inputs + headline actions "),o("div",Wb,[o("div",Kb,[N(o("input",Yb,null,512),[[s,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",Jb,"/"))]),o("span",Qb,[t[24]||(t[24]=o("label",null,"Owner",-1)),N(o("input",Xb,null,512),[[s,{state:e.viewState,set:n=>{e.query.owner=n},value:e.query?.owner,form:null,options:{}}]])]),o("span",Zb,[t[25]||(t[25]=o("label",null,"Conference",-1)),N(o("input",xb,null,512),[[s,{state:e.viewState,set:n=>{e.query.conference=n},value:e.query?.conference,form:null,options:{}}]])]),t[29]||(t[29]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[26]||(t[26]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),b(" Export",-1)])]),o("span",e1,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,t1),o("span",o1,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[28]||(t[28]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,s1)])]),p(" Row 2: appears only when there are active filter chips "),e.chips?.length?(l(),d("div",n1,[o("div",r1,[(l(!0),d(X,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[o("span",i1,c(n?.label),1),o("span",null,c(n?.value),1),o("button",{type:"button","aria-label":"Remove filter",onClick:a=>e.clearFilter(n.key)},[...t[30]||(t[30]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,a1)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",l1,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[31]||(t[31]=b(" selected",-1))]),o("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=n=>e.bulkRefresh())},[...t[32]||(t[32]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Force refresh",-1)])]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[9]||(t[9]=n=>e.bulkRemoveCache())},[...t[33]||(t[33]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),b(" Remove cache",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=n=>e.clearSelection())},"Clear")])):p("v-if",!0),o("div",d1,[o("div",u1,[o("div",c1,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[11]||(t[11]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,p1)]),o("div",f1,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[12]||(t[12]=n=>e.sortBy("source.repositoryName"))},[t[35]||(t[35]=b("Repository ",-1)),e.sortIcon("source.repositoryName")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",m1,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[13]||(t[13]=n=>e.sortBy("status"))},[t[37]||(t[37]=b("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",h1,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[14]||(t[14]=n=>e.sortBy("pageView"))},[t[39]||(t[39]=b("Views ",-1)),e.sortIcon("pageView")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[38]||(t[38]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",v1,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[15]||(t[15]=n=>e.sortBy("anonymizeDate"))},[t[41]||(t[41]=b("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[40]||(t[40]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[42]||(t[42]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[o("div",g1,[N(o("input",y1,null,512),[[s,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),o("div",b1,[t[47]||(t[47]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",w1,[o("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,k1),o("div",E1,[o("a",{textContent:c(n?.source?.repositoryName),href:e.safeUrl("https://github.com/"+n?.source?.repositoryName+"/")},null,8,C1),n?.options?.update?(l(),d("span",_1,[t[43]||(t[43]=b("\xA0\xB7\xA0",-1)),o("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,S1)])):p("v-if",!0),n?.options?.update?p("v-if",!0):(l(),d("span",N1,[t[44]||(t[44]=b("\xA0\xB7\xA0@",-1)),o("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,D1)])),n?.conference?(l(),d("span",R1,[t[45]||(t[45]=b("\xA0\xB7\xA0",-1)),t[46]||(t[46]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),b(" "+c(n?.conference),1)])):p("v-if",!0),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),o("div",T1,[o("span",A1,[o("span",{class:A(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(n?.status))},null,8,O1)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,I1)):p("v-if",!0)]),o("div",P1,[t[48]||(t[48]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),t[49]||(t[49]=b()),o("span",{textContent:c(e.fmt?.number(n?.pageView||0))},null,8,V1)]),o("div",q1,[t[50]||(t[50]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[51]||(t[51]=b()),o("span",{textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,M1)]),o("div",L1,[o("div",$1,[t[63]||(t[63]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",U1,[o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[52]||(t[52]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit",-1)])],8,F1),o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[53]||(t[53]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View repo",-1)])],8,z1),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[54]||(t[54]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),b(" View page",-1)])],8,H1)):p("v-if",!0),o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.fetchGithubInfo(n),["prevent"])},[...t[55]||(t[55]=[o("i",{class:"fab fa-github"},null,-1),b(" Live GitHub info",-1)])],8,B1),t[61]||(t[61]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updateRepository(n),["prevent"])},[...t[56]||(t[56]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Force update",-1)])],8,j1),[[Y,n?.status=="ready"||n?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updateRepository(n),["prevent"])},[...t[57]||(t[57]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),b(" Enable",-1)])],8,G1),[[Y,n?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.showStatusMessage(n),["prevent"])},[...t[58]||(t[58]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1),b(" View status message",-1)])],8,W1),[[Y,n?.statusMessage]]),t[62]||(t[62]=o("div",{class:"dropdown-divider"},null,-1)),o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.removeCache(n),["prevent"])},[...t[59]||(t[59]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),b(" Remove cache",-1)])],8,K1),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:me(a=>e.removeRepository(n),["prevent"])},[...t[60]||(t[60]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove",-1)])],8,Y1),[[Y,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",J1,[...t[64]||(t[64]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No repositories match the current filters.",-1)])])):p("v-if",!0)]),o("div",Q1,[o("span",X1,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",Z1,[o("button",{class:"btn btn-sm",onClick:t[16]||(t[16]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[65]||(t[65]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),b(" Previous ",-1)])],8,x1),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,ew),[[s,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[17]||(t[17]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[66]||(t[66]=[b(" Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,tw)])):p("v-if",!0),o("span",ow,[t[68]||(t[68]=o("label",null,"Per page",-1)),N((l(),d("select",sw,[...t[67]||(t[67]=[ce('',5)])])),[[s,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var nw={class:"container paper-page admin-page"},rw={class:"paper-crumbs"},iw={class:"here"},aw={class:"paper-page-title"},lw={key:0,class:"user-detail-card"},dw={class:"user-header"},uw=["src"],cw={class:"status-dot-wrap"},pw=["textContent"],fw={key:0,class:"type-badge type-repo"},mw={class:"user-actions",style:{"margin-top":"4px"}},hw={class:"user-detail-grid"},vw={class:"detail-value"},gw={class:"detail-value"},yw={class:"detail-value",style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},bw={class:"detail-value"},ww=["href"],kw={class:"detail-value"},Ew={class:"detail-value"},Cw={key:0},_w={key:1,class:"text-muted"},Sw={class:"detail-value"},Nw={key:0,style:{"margin-top":"20px"}},Dw={class:"paper-table w-100",style:{"margin-top":"10px"}},Rw={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},Tw={class:"cell-anon",role:"cell"},Aw={class:"anon-text"},Ow=["textContent"],Iw={class:"cell-expires",role:"cell"},Pw={key:1,class:"admin-section-header"},Vw={class:"section-count"},qw={key:2,class:"user-detail-card"},Mw={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},Lw={key:0,class:"alert alert-warning",role:"alert"},$w={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},Uw={key:1,class:"paper-table w-100"},Fw={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},zw=["textContent"],Hw=["textContent"],Bw={role:"cell"},jw={key:0},Gw={key:1,class:"text-muted"},Ww={role:"cell"},Kw=["onClick"],Yw={key:2,class:"paper-table-empty"},Jw={class:"admin-section-header"},Qw={class:"section-count"},Xw={class:"admin-summary"},Zw={class:"summary-total"},xw=["aria-pressed"],ek={class:"count"},tk=["aria-pressed"],ok={class:"count"},sk=["aria-pressed"],nk={class:"count"},rk=["aria-pressed"],ik={class:"count"},ak=["aria-pressed"],lk={class:"count"},dk={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},uk={class:"admin-filter-row"},ck={class:"search-wrap"},pk={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},fk={key:3,class:"bulk-bar"},mk={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},hk={class:"paper-table-head",role:"row"},vk={role:"columnheader",style:{width:"28px"}},gk=["checked"],yk={role:"columnheader"},bk={role:"columnheader"},wk={role:"columnheader",class:"num"},kk={role:"columnheader"},Ek={role:"cell",style:{width:"28px"}},Ck={type:"checkbox","aria-label":"Select repository"},_k={class:"cell-anon",role:"cell"},Sk={class:"anon-text"},Nk=["textContent","href"],Dk={class:"anon-sub"},Rk=["textContent","href"],Tk={key:0},Ak=["textContent","href"],Ok={key:1},Ik=["textContent","href"],Pk={key:2},Vk={class:"cell-status",role:"cell"},qk={class:"status-line"},Mk=["textContent"],Lk=["textContent","title"],$k=["textContent"],Uk=["textContent"],Fk={class:"cell-actions",role:"cell"},zk={class:"dropdown"},Hk={class:"dropdown-menu dropdown-menu-right"},Bk=["href"],jk=["href"],Gk=["href"],Wk=["onClick"],Kk=["onClick"],Yk=["onClick"],Jk=["onClick"],Qk=["onClick"],Xk=["onClick"],Zk={key:0,class:"paper-table-empty"};function ml(e,t){let s=be("field"),r=be("form");return l(),d("div",nw,[o("div",rw,[t[22]||(t[22]=o("a",{href:"/admin/users"},"Users",-1)),t[23]||(t[23]=b(" \xA0/\xA0 ",-1)),o("span",iw,c(e.userInfo?.username||"Profile"),1)]),o("h1",aw,c(e.userInfo?.username||"User"),1),t[85]||(t[85]=ce('',1)),e.userInfo?(l(),d("div",lw,[o("div",dw,[e.userInfo?.photo?(l(),d("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,uw)):p("v-if",!0),o("div",null,[o("h2",null,[b(c(e.userInfo?.username)+" ",1),o("span",cw,[o("span",{class:A(["status-dot",{"status-ready":e.userInfo?.status=="active","status-removed":e.userInfo?.status!="active"}])},null,2),o("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,pw)]),e.userInfo?.isAdmin?(l(),d("span",fw,"Admin")):p("v-if",!0)]),o("div",mw,[e.userInfo?.status!=="banned"?(l(),d("button",{key:0,class:"btn btn-sm text-danger",onClick:t[0]||(t[0]=n=>e.banUser())},[...t[24]||(t[24]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),b(" Ban",-1)])])):p("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(l(),d("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=n=>e.activateUser())},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),b(" Activate",-1)])])):p("v-if",!0),e.userInfo?.isAdmin?p("v-if",!0):(l(),d("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=n=>e.promoteUser())},[...t[26]||(t[26]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user-shield"})],-1),b(" Promote to admin",-1)])])),e.userInfo?.isAdmin?(l(),d("button",{key:3,class:"btn btn-sm text-danger",onClick:t[3]||(t[3]=n=>e.demoteUser())},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user-minus"})],-1),b(" Remove admin",-1)])])):p("v-if",!0)])])]),o("div",hw,[t[30]||(t[30]=o("div",{class:"detail-label"},"ID",-1)),o("div",vw,c(e.userInfo?._id),1),t[31]||(t[31]=o("div",{class:"detail-label"},"Email",-1)),o("div",gw,c(e.userInfo?.emails?.[0]?.email),1),t[32]||(t[32]=o("div",{class:"detail-label"},"Access token",-1)),o("div",yw,c(e.userInfo?.accessTokens?.github),1),t[33]||(t[33]=o("div",{class:"detail-label"},"GitHub",-1)),o("div",bw,[o("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[28]||(t[28]=o("i",{class:"fab fa-github"},null,-1)),b(" "+c(e.userInfo?.username),1)],8,ww)]),t[34]||(t[34]=o("div",{class:"detail-label"},"Created",-1)),o("div",kw,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[35]||(t[35]=o("div",{class:"detail-label"},"Last connection",-1)),o("div",Ew,[e.userInfo?.accessTokenDates?.github?(l(),d("span",Cw,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):p("v-if",!0),e.userInfo?.accessTokenDates?.github?p("v-if",!0):(l(),d("span",_w,"never"))]),t[36]||(t[36]=o("div",{class:"detail-label"},"GitHub repos",-1)),o("div",Sw,[b(c(e.userInfo?.repositories?.length)+" repositories ",1),o("button",{class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=n=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide":"Show"),1),o("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=n=>e.getGitHubRepositories())},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Refresh ",-1)])])])]),e.showRepos?(l(),d("div",Nw,[t[39]||(t[39]=o("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),o("div",Dw,[(l(!0),d(X,null,re(e.userInfo?.repositories,(n,i)=>(l(),d("div",Rw,[o("div",Tw,[t[37]||(t[37]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",Aw,[o("span",{class:"repo-name",textContent:c(n?.name)},null,8,Ow)])]),o("div",Iw,[t[38]||(t[38]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-database"})],-1)),b(" "+c(e.fmt?.humanFileSize(n?.size)),1)])]))),256))])])):p("v-if",!0)])):p("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",Pw,[t[40]||(t[40]=o("h2",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-key"})]),b(" API tokens")],-1)),o("span",Vw,c(e.tokens?.length),1)])):p("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",qw,[t[46]||(t[46]=o("p",{class:"paper-page-lede"},[b("Personal API tokens for this admin account. Send as "),o("code",null,"Authorization: Bearer "),b(" to authenticate without GitHub OAuth (useful for development).")],-1)),N((l(),d("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=me(n=>e.submitForm(n,()=>{e.createToken()}),["prevent"]))},[N(o("input",Mw,null,512),[[s,{state:e.viewState,set:n=>{e.tokenForm.name=n},value:e.tokenForm?.name,form:null,options:{}}]]),t[41]||(t[41]=o("button",{type:"submit",class:"btn btn-primary"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})]),b(" Generate")],-1))],32)),[[r,e.viewState]]),e.tokenForm?.plaintext?(l(),d("div",Lw,[t[42]||(t[42]=o("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),o("pre",$w,c(e.tokenForm?.plaintext),1),o("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=n=>e.tokenForm.plaintext=null)},"Dismiss")])):p("v-if",!0),e.tokens?.length?(l(),d("div",Uw,[t[44]||(t[44]=o("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[o("div",{role:"columnheader"},"Name"),o("div",{role:"columnheader"},"Created"),o("div",{role:"columnheader"},"Last used"),o("div",{role:"columnheader","aria-label":"Actions"})],-1)),(l(!0),d(X,null,re(e.tokens,(n,i)=>(l(),d("div",Fw,[o("div",{role:"cell",textContent:c(n?.name)},null,8,zw),o("div",{role:"cell",textContent:c(e.fmt?.humanTime(n?.createdAt))},null,8,Hw),o("div",Bw,[n?.lastUsedAt?(l(),d("span",jw,c(e.fmt?.humanTime(n?.lastUsedAt)),1)):p("v-if",!0),n?.lastUsedAt?p("v-if",!0):(l(),d("span",Gw,"never"))]),o("div",Ww,[o("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:a=>e.revokeToken(n)},[...t[43]||(t[43]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)])],8,Kw)])]))),256))])):p("v-if",!0),e.tokens?.length?p("v-if",!0):(l(),d("div",Yw,[...t[45]||(t[45]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No tokens yet.",-1)])]))])):p("v-if",!0),o("div",Jw,[t[47]||(t[47]=o("h2",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})]),b(" Anonymized repositories")],-1)),o("span",Qw,c(e.repositories?.length),1)]),o("div",Xw,[o("span",Zw,c(e.fmt?.number(e.repositories?.length)),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.filters?.status?.ready===!1}]),title:"Toggle ready filter",onClick:t[8]||(t[8]=n=>e.filters.status.ready=!e.filters.status.ready),"aria-pressed":e.filters?.status?.ready===!1},[t[48]||(t[48]=b("Ready ",-1)),o("span",ek,c(e.fmt?.number(e.statusCountFor("ready"))),1)],10,xw),o("button",{type:"button",class:A(["summary-pill warn",{active:e.filters?.status?.preparing===!1}]),title:"Toggle preparing filter",onClick:t[9]||(t[9]=n=>e.filters.status.preparing=!e.filters.status.preparing),"aria-pressed":e.filters?.status?.preparing===!1},[t[49]||(t[49]=b("Preparing ",-1)),o("span",ok,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],10,tk),o("button",{type:"button",class:A(["summary-pill error",{active:e.filters?.status?.error===!1}]),title:"Toggle errored filter",onClick:t[10]||(t[10]=n=>e.filters.status.error=!e.filters.status.error),"aria-pressed":e.filters?.status?.error===!1},[t[50]||(t[50]=b("Errored ",-1)),o("span",nk,c(e.fmt?.number(e.statusCountFor("error"))),1)],10,sk),o("button",{type:"button",class:A(["summary-pill",{active:e.filters?.status?.expired===!1}]),title:"Toggle expired filter",onClick:t[11]||(t[11]=n=>e.filters.status.expired=!e.filters.status.expired),"aria-pressed":e.filters?.status?.expired===!1},[t[51]||(t[51]=b("Expired ",-1)),o("span",ik,c(e.fmt?.number(e.statusCountFor("expired"))),1)],10,rk),o("button",{type:"button",class:A(["summary-pill",{active:e.filters?.status?.removed===!1}]),title:"Toggle removed filter",onClick:t[12]||(t[12]=n=>e.filters.status.removed=!e.filters.status.removed),"aria-pressed":e.filters?.status?.removed===!1},[t[52]||(t[52]=b("Removed ",-1)),o("span",lk,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,ak)]),N((l(),d("form",dk,[o("div",uk,[o("div",ck,[N(o("input",pk,null,512),[[s,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),t[54]||(t[54]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[13]||(t[13]=n=>e.exportCsv())},[...t[53]||(t[53]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),b(" Export",-1)])])])])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",fk,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[55]||(t[55]=b(" selected",-1))]),o("button",{class:"btn btn-sm",type:"button",onClick:t[14]||(t[14]=n=>e.bulkRefresh())},[...t[56]||(t[56]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Force refresh",-1)])]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[15]||(t[15]=n=>e.bulkRemoveCache())},[...t[57]||(t[57]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),b(" Remove cache",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[16]||(t[16]=n=>e.clearSelection())},"Clear")])):p("v-if",!0),o("div",mk,[o("div",hk,[o("div",vk,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[17]||(t[17]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,gk)]),o("div",yk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[18]||(t[18]=n=>e.sortBy("source.repositoryName"))},[t[59]||(t[59]=b("Repository ",-1)),e.sortIcon("source.repositoryName")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[58]||(t[58]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",bk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[19]||(t[19]=n=>e.sortBy("status"))},[t[61]||(t[61]=b("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[60]||(t[60]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",wk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[20]||(t[20]=n=>e.sortBy("pageView"))},[t[63]||(t[63]=b("Views ",-1)),e.sortIcon("pageView")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[62]||(t[62]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),o("div",kk,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[21]||(t[21]=n=>e.sortBy("anonymizeDate"))},[t[65]||(t[65]=b("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[64]||(t[64]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[66]||(t[66]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[o("div",Ek,[N(o("input",Ck,null,512),[[s,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),o("div",_k,[t[71]||(t[71]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",Sk,[o("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Nk),o("div",Dk,[o("a",{textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,Rk),n?.options?.update?(l(),d("span",Tk,[t[67]||(t[67]=b("\xA0\xB7\xA0",-1)),o("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,Ak)])):p("v-if",!0),n?.options?.update?p("v-if",!0):(l(),d("span",Ok,[t[68]||(t[68]=b("\xA0\xB7\xA0@",-1)),o("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,Ik)])),n?.conference?(l(),d("span",Pk,[t[69]||(t[69]=b("\xA0\xB7\xA0",-1)),t[70]||(t[70]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),b(" "+c(n?.conference),1)])):p("v-if",!0),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),o("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),o("div",Vk,[o("span",qk,[o("span",{class:A(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),o("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Mk)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,Lk)):p("v-if",!0)]),o("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,$k),o("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,Uk),o("div",Fk,[o("div",zk,[t[83]||(t[83]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",Hk,[o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[72]||(t[72]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit",-1)])],8,Bk),o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[73]||(t[73]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View repo",-1)])],8,jk),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[74]||(t[74]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),b(" View page",-1)])],8,Gk)):p("v-if",!0),o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.fetchGithubInfo(n),["prevent"])},[...t[75]||(t[75]=[o("i",{class:"fab fa-github"},null,-1),b(" Live GitHub info",-1)])],8,Wk),t[81]||(t[81]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updateRepository(n),["prevent"])},[...t[76]||(t[76]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Force update",-1)])],8,Kk),[[Y,n?.status=="ready"||n?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updateRepository(n),["prevent"])},[...t[77]||(t[77]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),b(" Enable",-1)])],8,Yk),[[Y,n?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.showStatusMessage(n),["prevent"])},[...t[78]||(t[78]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1),b(" View status message",-1)])],8,Jk),[[Y,n?.statusMessage]]),t[82]||(t[82]=o("div",{class:"dropdown-divider"},null,-1)),o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.removeCache(n),["prevent"])},[...t[79]||(t[79]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-broom"})],-1),b(" Remove cache",-1)])],8,Qk),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:me(a=>e.removeRepository(n),["prevent"])},[...t[80]||(t[80]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove",-1)])],8,Xk),[[Y,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",Zk,[...t[84]||(t[84]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No repositories match the current filters.",-1)])])):p("v-if",!0)])])}var xk={class:"container paper-page admin-page"},e0={class:"admin-summary"},t0={class:"summary-total"},o0=["aria-pressed"],s0={class:"count"},n0=["aria-pressed"],r0={class:"count"},i0=["aria-pressed"],a0={class:"count"},l0={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},d0={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},u0={class:"admin-filter-row"},c0={class:"search-wrap"},p0={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},f0={key:0,class:"admin-search-hint"},m0={class:"admin-filter-inline"},h0={class:"form-control form-control-sm"},v0={class:"admin-filter-inline","aria-label":"Pagination"},g0=["disabled"],y0={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},b0=["disabled"],w0={key:0,class:"admin-filter-row"},k0={class:"admin-active-chips"},E0={class:"key"},C0=["onClick"],_0={key:1,class:"bulk-bar"},S0={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},N0={class:"paper-table-head admin-users-row",role:"row"},D0={role:"columnheader",style:{width:"28px"}},R0=["checked"],T0={role:"columnheader"},A0={role:"columnheader"},O0={role:"cell",style:{width:"28px"}},I0={type:"checkbox","aria-label":"Select user"},P0={class:"cell-anon",role:"cell"},V0=["src"],q0={class:"anon-text"},M0=["textContent","href"],L0={class:"anon-sub"},$0={key:0},U0={key:1},F0=["href"],z0={key:2},H0={class:"cell-views num",role:"cell"},B0=["textContent","href"],j0={class:"cell-status",role:"cell"},G0=["textContent"],W0={class:"cell-status",role:"cell"},K0={key:0,class:"type-badge type-repo"},Y0={key:1,class:"empty-dash"},J0={class:"cell-actions",role:"cell"},Q0={class:"dropdown"},X0={class:"dropdown-menu dropdown-menu-right"},Z0=["href"],x0=["href"],eE=["onClick"],tE=["onClick"],oE={key:0,class:"paper-table-empty"},sE={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},nE={style:{"font-size":"12px",color:"var(--ink-muted)"}},rE={key:0,class:"pagination-compact"},iE=["disabled"],aE=["max"],lE=["disabled"],dE={class:"admin-filter-inline"},uE={class:"form-control form-control-sm"};function hl(e,t){let s=be("field"),r=be("form");return l(),d("div",xk,[t[46]||(t[46]=ce('
Admin \xA0/\xA0 Users

Users

',3)),o("div",e0,[o("span",t0,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),o("button",{type:"button",class:A(["summary-pill ok",{active:e.query?.status=="active"}]),onClick:t[0]||(t[0]=n=>{e.query.status=e.query.status=="active"?"":"active",e.query.page=1}),"aria-pressed":e.query?.status=="active"},[t[13]||(t[13]=b("Active ",-1)),o("span",s0,c(e.fmt?.number(e.statusCountFor("active"))),1)],10,o0),o("button",{type:"button",class:A(["summary-pill error",{active:e.query?.status=="banned"}]),onClick:t[1]||(t[1]=n=>{e.query.status=e.query.status=="banned"?"":"banned",e.query.page=1}),"aria-pressed":e.query?.status=="banned"},[t[14]||(t[14]=b("Banned ",-1)),o("span",r0,c(e.fmt?.number(e.statusCountFor("banned"))),1)],10,n0),o("button",{type:"button",class:A(["summary-pill",{active:e.query?.status=="removed"}]),onClick:t[2]||(t[2]=n=>{e.query.status=e.query.status=="removed"?"":"removed",e.query.page=1}),"aria-pressed":e.query?.status=="removed"},[t[15]||(t[15]=b("Removed ",-1)),o("span",a0,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,i0)]),e.fetchError?(l(),d("div",l0,[t[16]||(t[16]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.fetchError),1)])):p("v-if",!0),N((l(),d("form",d0,[o("div",u0,[o("div",c0,[N(o("input",p0,null,512),[[s,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?p("v-if",!0):(l(),d("span",f0,"/"))]),o("span",m0,[t[18]||(t[18]=o("label",null,"Role",-1)),N((l(),d("select",h0,[...t[17]||(t[17]=[o("option",{value:""},"Any",-1),o("option",{value:"admin"},"Admin",-1)])])),[[s,{state:e.viewState,set:n=>{e.query.role=n},value:e.query?.role,form:null,options:{}}]])]),t[22]||(t[22]=o("span",{class:"admin-filter-spacer"},null,-1)),o("button",{class:"btn btn-sm",type:"button",onClick:t[3]||(t[3]=n=>e.exportCsv())},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-export"})],-1),b(" Export",-1)])]),o("span",v0,[o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[4]||(t[4]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1)])],8,g0),o("span",y0,c(e.query?.page)+"/"+c(e.totalPage||1),1),o("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,b0)])]),e.chips?.length?(l(),d("div",w0,[o("div",k0,[(l(!0),d(X,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[o("span",E0,c(n?.label),1),o("span",null,c(n?.value),1),o("button",{type:"button",onClick:a=>e.clearFilter(n.key),"aria-label":"Clear filter"},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,C0)]))),128))])])):p("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",_0,[o("span",null,[o("strong",null,c(e.selectedCount()),1),t[24]||(t[24]=b(" selected",-1))]),o("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[6]||(t[6]=n=>e.bulkBan())},[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),b(" Ban",-1)])]),o("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>{e.selected={},e.allSelected=!1})},"Clear")])):p("v-if",!0),o("div",S0,[o("div",N0,[o("div",D0,[o("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[8]||(t[8]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,R0)]),o("div",T0,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="username"}]),onClick:t[9]||(t[9]=n=>e.sortBy("username"))},[t[27]||(t[27]=b("User ",-1)),e.sortIcon("username")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[26]||(t[26]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[30]||(t[30]=o("div",{role:"columnheader",class:"num"},"Repos",-1)),o("div",A0,[o("button",{type:"button",class:A(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=n=>e.sortBy("status"))},[t[29]||(t[29]=b("Status ",-1)),e.sortIcon("status")?(l(),d("svg",{key:0,class:A(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[28]||(t[28]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)]),t[31]||(t[31]=o("div",{role:"columnheader"},"Role",-1)),t[32]||(t[32]=o("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(X,null,re(e.filteredUsers,(n,i)=>(l(),d("div",{class:A(["paper-table-row admin-users-row",{"row-selected":e.selected[n?.username]}]),role:"row"},[o("div",O0,[N(o("input",I0,null,512),[[s,{state:e.viewState,set:a=>{e.selected[n.username]=a},value:e.selected[n?.username],form:null,options:{}}]])]),o("div",P0,[n?.photo?(l(),d("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(n?.photo)},null,8,V0)):p("v-if",!0),o("div",q0,[o("a",{class:"repo-name",textContent:c(n?.username),href:e.safeUrl("/admin/users/"+n?.username)},null,8,M0),o("div",L0,[n?.emails[0].email?(l(),d("span",$0,c(n?.emails[0].email),1)):p("v-if",!0),n?.emails[0].email?(l(),d("span",U0,"\xA0\xB7\xA0")):p("v-if",!0),o("a",{target:"_blank",href:e.safeUrl("https://github.com/"+n?.username)},[t[33]||(t[33]=o("i",{class:"fab fa-github"},null,-1)),b(" "+c(n?.username),1)],8,F0),n?.dateOfEntry?(l(),d("span",z0,"\xA0\xB7\xA0Joined "+c(e.fmt?.humanTime(n?.dateOfEntry)),1)):p("v-if",!0)])])]),o("div",H0,[t[34]||(t[34]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),o("a",{title:"Show this user's repositories",textContent:c(e.fmt?.number(n?.repoCount||0)),href:e.safeUrl("/admin/?owner="+n?.username)},null,8,B0)]),o("div",j0,[o("span",{class:A(["status-dot",{"status-ready":n?.status=="active","status-removed":n?.status=="removed"||n?.status=="banned"}])},null,2),o("span",{textContent:c(e.fmt?.title(n?.status))},null,8,G0)]),o("div",W0,[n?.isAdmin?(l(),d("span",K0,"Admin")):p("v-if",!0),n?.isAdmin?p("v-if",!0):(l(),d("span",Y0,"\u2014"))]),o("div",J0,[o("div",Q0,[t[40]||(t[40]=o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})])],-1)),o("div",X0,[o("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+n?.username)},[...t[35]||(t[35]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View details",-1)])],8,Z0),o("a",{class:"dropdown-item",href:e.safeUrl("/admin/?owner="+n?.username)},[...t[36]||(t[36]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),b(" View repositories",-1)])],8,x0),t[39]||(t[39]=o("div",{class:"dropdown-divider"},null,-1)),N(o("a",{class:"dropdown-item text-danger",href:"#",onClick:me(a=>e.banUser(n),["prevent"])},[...t[37]||(t[37]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-ban"})],-1),b(" Ban",-1)])],8,eE),[[Y,n?.status=="active"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.activateUser(n),["prevent"])},[...t[38]||(t[38]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),b(" Activate",-1)])],8,tE),[[Y,n?.status=="removed"||n?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(l(),d("div",oE,[...t[41]||(t[41]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No users match the current filters.",-1)])])):p("v-if",!0)]),o("div",sE,[o("span",nE,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",rE,[o("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[42]||(t[42]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-left"})],-1),b(" Previous",-1)])],8,iE),N(o("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,aE),[[s,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),o("span",null,"of "+c(e.totalPage),1),o("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[43]||(t[43]=[b("Next ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-chevron-right"})],-1)])],8,lE)])):p("v-if",!0),o("span",dE,[t[45]||(t[45]=o("label",null,"Per page",-1)),N((l(),d("select",uE,[...t[44]||(t[44]=[o("option",{value:"10"},"10",-1),o("option",{value:"25"},"25",-1),o("option",{value:"50"},"50",-1),o("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var cE={class:"anonymize-landing"},pE={class:"anonymize-landing-inner"},fE={class:"form-group mt-4 mb-2"},mE={class:"source-url-label-row"},hE={key:0,class:"repo-access","aria-label":"GitHub access"},vE={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},gE=["aria-pressed","disabled"],yE=["aria-pressed","disabled"],bE={key:1,class:"connection-badge"},wE={id:"sourceUrl-landing",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},kE={key:0,class:"draft-status",role:"status"},EE={key:1,class:"text-danger",role:"alert"},CE={key:2,class:"repo-access-details","aria-label":"GitHub access"},_E={class:"repo-access-main"},SE={class:"repo-access-controls"},NE={key:1,class:"connection-link",href:"/connections"},DE={class:"repo-access-note"},RE={key:0},TE={class:"anonymize-workspace"},AE={class:"anonymize-topbar"},OE={class:"anonymize-topbar-inner"},IE={class:"paper-crumbs"},PE={class:"here"},VE={class:"anonymize-topbar-head"},qE={class:"paper-page-title anonymize-topbar-title"},ME={key:0},LE={key:1},$E={key:0,class:"alert alert-info",role:"status"},UE={key:1,class:"alert alert-info",role:"status"},FE={key:1},zE={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},HE=["aria-selected","tabindex"],BE=["aria-selected","tabindex"],jE={key:2,class:"anonymize-preview-empty",id:"workspace-preview",role:"status"},GE={class:"anonymize-split"},WE=["role","aria-labelledby"],KE={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},YE={class:"paper-settings-section"},JE={class:"form-group"},QE={class:"source-url-label-row"},XE={key:0,class:"repo-access","aria-label":"GitHub access"},ZE={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},xE=["aria-pressed","disabled"],eC=["aria-pressed","disabled"],tC={key:1,class:"connection-badge"},oC=["disabled"],sC={class:"invalid-feedback"},nC={class:"invalid-feedback"},rC={class:"invalid-feedback"},iC={class:"invalid-feedback"},aC={key:0,class:"repo-access-details","aria-label":"GitHub access"},lC={class:"repo-access-main"},dC={class:"repo-access-controls"},uC={key:1,class:"connection-link",href:"/connections"},cC={class:"repo-access-note"},pC={key:0},fC={key:1,class:"repo-access-details"},mC={key:0,role:"status"},hC={key:2,class:"form-grid-2"},vC={class:"form-group"},gC={class:"input-group"},yC={class:"form-control",id:"branch",name:"branch"},bC=["textContent","value"],wC={class:"input-group-append"},kC={class:"form-group"},EC=["disabled"],CC={class:"invalid-feedback"},_C={class:"invalid-feedback"},SC={class:"form-check"},NC={class:"form-check-input",type:"checkbox",id:"update",name:"update"},DC={class:"paper-settings-section"},RC={class:"form-group"},TC=["disabled"],AC={class:"form-text text-muted"},OC={class:"invalid-feedback"},IC={class:"form-group"},PC=["disabled"],VC={class:"form-text text-muted"},qC={class:"invalid-feedback"},MC={class:"form-group"},LC=["disabled"],$C={class:"form-text text-muted"},UC={class:"invalid-feedback"},FC={class:"form-group"},zC={class:"form-text text-muted"},HC=["href"],BC={class:"invalid-feedback"},jC={class:"form-text text-muted"},GC={class:"paper-settings-section"},WC={class:"form-group"},KC={class:"form-text text-muted"},YC={class:"warning-feedback"},JC={class:"invalid-feedback"},QC={class:"paper-settings-section"},XC={class:"form-check"},ZC={class:"form-check-input",type:"checkbox",id:"link",name:"link"},xC={class:"form-check"},e_={class:"form-check-input",type:"checkbox",id:"image",name:"image"},t_={class:"form-check"},o_={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},s_={class:"form-check"},n_={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},r_={class:"form-check"},i_=["disabled"],a_={key:0,class:"form-text text-muted"},l_={key:1,class:"form-text text-muted"},d_={class:"form-check"},u_={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},c_={class:"form-check"},p_={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},f_={class:"form-check"},m_={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},h_={class:"form-check"},v_={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},g_={class:"form-check"},y_={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},b_={class:"form-check"},w_={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},k_={class:"form-check"},E_={class:"form-check-input",type:"checkbox",id:"title",name:"title"},C_={class:"form-check"},__={class:"form-check-input",type:"checkbox",id:"body",name:"body"},S_={class:"form-check"},N_={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},D_={class:"form-check"},R_={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},T_={class:"form-check"},A_={class:"form-check-input",type:"checkbox",id:"username",name:"username"},O_={class:"form-check"},I_={class:"form-check-input",type:"checkbox",id:"date",name:"date"},P_={class:"form-check"},V_={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},q_={class:"paper-settings-section"},M_={class:"form-grid-2"},L_={class:"form-group"},$_={class:"form-control",id:"expiration",name:"expiration"},U_={class:"form-group"},F_=["min","max"],z_={class:"invalid-feedback"},H_={class:"invalid-feedback"},B_={class:"paper-settings-section"},j_={class:"form-group"},G_={style:{position:"relative"}},W_={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},K_={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},Y_=["onClick"],J_=["src"],Q_=["textContent"],X_=["textContent"],Z_={class:"coauthor-list"},x_={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},e2=["src"],t2=["textContent","href"],o2=["onClick"],s2={class:"form-text text-muted"},n2=["textContent"],r2={key:1,class:"draft-status",role:"status"},i2={key:2,class:"draft-status"},a2={key:3,class:"anonymize-review-note"},l2={class:"anonymize-submit-bar"},d2=["disabled"],u2=["disabled"],c2=["disabled"],p2=["disabled"],f2=["disabled"],m2=["disabled"],h2=["role","aria-labelledby"],v2={class:"anonymize-preview-head"},g2={class:"anonymize-preview-sub"},y2={key:0,class:"anonymize-preview-status",role:"status"},b2={key:1,class:"anonymize-preview-status",role:"status"},w2={key:2,class:"anonymize-preview-status",role:"alert"},k2={key:3,class:"anonymize-preview-status"},E2=["innerHTML"],C2=["role","aria-labelledby"],_2={class:"anonymize-preview-head"},S2={class:"anonymize-preview-sub"},N2={key:0,class:"anonymize-preview-status",role:"status"},D2={key:1,class:"anonymize-preview-status",role:"status"},R2={key:2,class:"anonymize-preview-status",role:"alert"},T2={key:3,class:"anonymize-preview-body"},A2={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},O2={class:"pr-title mb-1"},I2={key:0},P2=["textContent"],V2={key:0},q2={key:1},M2={key:2},L2={class:"pr-comments mt-3"},$2={class:"pr-comment"},U2={class:"pr-comment-head"},F2=["textContent"],z2={key:0,class:"pr-comment-date"},H2={key:3},B2={class:"pr-comments"},j2={class:"pr-comment"},G2={class:"pr-comment-head"},W2={key:0,class:"pr-comment-author"},K2=["textContent"],Y2=["textContent"],J2={key:0,class:"pr-comment-body"},Q2=["role","aria-labelledby"],X2={class:"anonymize-preview-head"},Z2={class:"anonymize-preview-sub"},x2={key:0,class:"anonymize-preview-status",role:"status"},eS={key:1,class:"anonymize-preview-status",role:"status"},tS={key:2,class:"anonymize-preview-status",role:"alert"},oS={key:3,class:"anonymize-preview-body"},sS={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},nS={class:"pr-title mb-1"},rS={key:0},iS=["textContent"],aS={key:0},lS={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--paper-bg-alt)"}},dS={key:2,class:"paper-tabs",role:"tablist"},uS=["aria-selected","tabindex"],cS=["aria-selected","tabindex"],pS=["textContent"],fS={key:3,class:"anonymize-preview-status"},mS={class:"paper-tab-content"},hS={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},vS=["innerHTML"],gS={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},yS={class:"pr-comments"},bS={class:"pr-comment"},wS={class:"pr-comment-head"},kS={key:0,class:"pr-comment-author"},ES=["textContent"],CS=["textContent"],_S={key:0,class:"pr-comment-body"};function vl(e,t){let s=We("gist-file"),r=We("markdown"),n=be("field"),i=be("form");return l(),d("div",{class:A(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview"}])},[p(" ===== STATE 1: No URL \u2014 centered input ===== "),N(o("div",cE,[o("div",pE,[t[36]||(t[36]=o("div",{class:"paper-crumbs"},[b("My work \xA0/\xA0 "),o("span",{class:"here"},"New anonymization")],-1)),t[37]||(t[37]=o("h1",{class:"paper-page-title"},[b("New "),o("em",null,"anonymization")],-1)),t[38]||(t[38]=o("p",{class:"paper-page-lede"}," Paste a GitHub repository, pull-request, or gist URL. We\u2019ll fetch it, redact the terms you choose in text files, and give you a share link. Images and PDFs are served unchanged when enabled. Review them before sharing. ",-1)),o("div",fE,[o("div",mE,[t[32]||(t[32]=o("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",hE,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",vE,[o("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=a=>e.chooseGitHubConnection("github-app"))},[...t[31]||(t[31]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(),o("span",{class:"sr-only"},"Read-only ",-1),b("GitHub App",-1)])],8,gE),o("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,yE)])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",bE,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):p("v-if",!0)])):p("v-if",!0)]),N(o("input",wE,null,512),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]])]),e.draftRestored?(l(),d("div",kE,[t[33]||(t[33]=b("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[2]||(t[2]=a=>e.discardDraft())},"Discard draft")])):p("v-if",!0),e.sourceUrlError?(l(),d("p",EE,c(e.sourceUrlError),1)):p("v-if",!0),t[39]||(t[39]=o("small",{class:"form-text",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",CE,[o("div",_E,[o("div",SE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=a=>e.grantGitHubAccess())},[...t[34]||(t[34]=[b("Manage access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",NE,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):p("v-if",!0)])]),o("div",DE,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",RE,"Select repositories on GitHub, then return here.")):p("v-if",!0),t[35]||(t[35]=o("span",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),b(" Selected content will be published, including content from private repositories.")],-1))])])):p("v-if",!0)])],512),[[Y,!e.workspaceOpen&&!e.isUpdate]]),p(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),N(o("div",TE,[o("header",AE,[o("div",OE,[o("div",IE,[t[40]||(t[40]=o("a",{href:"/dashboard"},"My work",-1)),t[41]||(t[41]=b(" \xA0/\xA0 ",-1)),o("span",PE,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),o("div",VE,[o("h1",qE,[e.isUpdate?p("v-if",!0):(l(),d("span",ME,[...t[42]||(t[42]=[b("New ",-1),o("em",null,"anonymization",-1)])])),e.isUpdate?(l(),d("span",LE,[...t[43]||(t[43]=[b("Edit ",-1),o("em",null,"anonymization",-1)])])):p("v-if",!0)]),N(o("span",{class:A(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repo":e.detectedType==="pr"?"PR":"Gist"),3),[[Y,e.detectedType]])])])]),e.detectedType==="gist"&&e.gistAppRequired?(l(),d("aside",$E,[t[44]||(t[44]=o("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),o("button",{type:"button",class:"btn btn-ink",onClick:t[4]||(t[4]=a=>e.connectGistApp())},"Connect GitHub App to access gists")])):p("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(l(),d("aside",UE,[t[45]||(t[45]=o("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[46]||(t[46]=o("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(l(),d("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[5]||(t[5]=a=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(l(),d("p",FE,"GitHub OAuth is currently unavailable. Please try again later."))])):p("v-if",!0),o("nav",zE,[o("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[6]||(t[6]=a=>e.previewTabKeydown(a)),onClick:t[7]||(t[7]=a=>e.selectMobilePane("settings"))},"Settings",40,HE),o("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[8]||(t[8]=a=>e.previewTabKeydown(a)),onClick:t[9]||(t[9]=a=>e.selectMobilePane("preview"))},"Reviewer preview",40,BE)]),e.detectedType!=="repo"&&!e.details?(l(),d("div",jE,c(e.sourceLoading?"Loading source\u2026":"Choose an accessible source to see its preview."),1)):p("v-if",!0),o("div",GE,[p(" Form column (left) "),o("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[N((l(),d("form",KE,[o("section",YE,[t[57]||(t[57]=o("div",{class:"paper-section-eyebrow"},"Source",-1)),o("div",JE,[o("div",QE,[t[48]||(t[48]=o("label",{class:"paper-field-label",for:"sourceUrl"},"GitHub URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",XE,[!e.isUpdate&&e.detectedType!=="gist"?(l(),d("div",ZE,[o("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[10]||(t[10]=a=>e.chooseGitHubConnection("github-app"))},[...t[47]||(t[47]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(),o("span",{class:"sr-only"},"Read-only ",-1),b("GitHub App",-1)])],8,xE),o("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[11]||(t[11]=a=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,eC)])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"?(l(),d("span",tC,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):p("v-if",!0)])):p("v-if",!0)]),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,oC),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),N(o("div",sC," Please provide a valid GitHub URL. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.github]]),N(o("div",nC," Not accessible. The organization may restrict access. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.access]]),N(o("div",rC," Does not exist or is not accessible. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.missing]]),N(o("div",iC," Already anonymized. ",512),[[Y,e.anonymize?.sourceUrl?.errors?.used]])]),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(l(),d("aside",aC,[o("div",lC,[o("div",dC,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=a=>e.grantGitHubAccess())},[...t[49]||(t[49]=[b("Manage access ",-1),o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-external-link"})],-1)])])):p("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(l(),d("a",uC,c(e.isUpdate?"Change connection":"Manage connections")+" \u2192",1)):p("v-if",!0)])]),o("div",cC,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(l(),d("span",pC,"Select repositories on GitHub, then return here.")):p("v-if",!0),t[50]||(t[50]=o("span",null,[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),b(" Selected content will be published, including content from private repositories.")],-1))])])):p("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(l(),d("aside",fC,[t[51]||(t[51]=o("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[13]||(t[13]=a=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(l(),d("p",mC,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):p("v-if",!0)])):p("v-if",!0),e.detectedType==="repo"?(l(),d("div",hC,[o("div",vC,[t[53]||(t[53]=o("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),o("div",gC,[N((l(),d("select",yC,[(l(!0),d(X,null,re(e.branches,(a,u)=>(l(),d("option",{textContent:c(a?.name),value:a?.name},null,8,bC))),256))])),[[n,{state:e.viewState,set:a=>{e.source.branch=a},value:e.source?.branch,form:"anonymize",options:{}}]]),o("div",wC,[o("button",{class:"btn btn-icon",type:"button",title:"Refresh","data-toggle":"tooltip","data-placement":"bottom",onClick:t[14]||(t[14]=a=>e.getBranches(!0)),"aria-label":"Refresh"},[...t[52]||(t[52]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1)])])])])]),o("div",kC,[t[54]||(t[54]=o("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,EC),[[n,{state:e.viewState,set:a=>{e.source.commit=a},value:e.source?.commit,form:"anonymize",options:{}}]]),N(o("div",CC," The commit SHA is not valid. ",512),[[Y,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),N(o("div",_C," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Y,e.anonymize?.commit?.errors?.exists]])])])):p("v-if",!0),N(o("div",SC,[N(o("input",NC,null,512),[[n,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"anonymize",options:{}}]]),t[55]||(t[55]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[56]||(t[56]=o("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))],512),[[Y,e.detectedType]])]),N(o("section",DC,[t[68]||(t[68]=o("div",{class:"paper-section-eyebrow"},"Identity",-1)),N(o("div",RC,[t[60]||(t[60]=o("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,TC),[[n,{state:e.viewState,set:a=>{e.repoId=a},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",AC,[t[58]||(t[58]=b("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/r/"+c(e.repoId),1),t[59]||(t[59]=b(".",-1))]),N(o("div",OC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.repoId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[Y,e.anonymize?.repoId?.errors?.used]])],512),[[Y,e.detectedType==="repo"]]),N(o("div",IC,[t[63]||(t[63]=o("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,PC),[[n,{state:e.viewState,set:a=>{e.pullRequestId=a},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",VC,[t[61]||(t[61]=b("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/pr/"+c(e.pullRequestId),1),t[62]||(t[62]=b(".",-1))]),N(o("div",qC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.pullRequestId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[Y,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Y,e.detectedType==="pr"]]),N(o("div",MC,[t[66]||(t[66]=o("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,LC),[[n,{state:e.viewState,set:a=>{e.gistId=a},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",$C,[t[64]||(t[64]=b("Your share link will be ",-1)),o("code",null,"anonymous.4open.science/gist/"+c(e.gistId),1),t[65]||(t[65]=b(".",-1))]),N(o("div",UC,"ID can only contain letters and numbers.",512),[[Y,e.anonymize?.gistId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[Y,e.anonymize?.gistId?.errors?.used]])],512),[[Y,e.detectedType==="gist"]]),o("div",FC,[t[67]||(t[67]=o("label",{class:"paper-field-label",for:"conference"},[b("Conference "),o("span",{class:"paper-optional"},"(optional)")],-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[n,{state:e.viewState,set:a=>{e.conference=a},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),N(o("small",zC,[o("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,HC),b(" expires "+c(e.fmt?.date(e.conference_data?.endDate))+". ",1)],512),[[Y,e.conference_data]]),N(o("div",BC,"The conference is not activated.",512),[[Y,e.anonymize?.conference?.errors?.activated]]),N(o("small",jC,"Link to a conference to apply its shared defaults.",512),[[Y,!e.conference_data]])])],512),[[Y,e.detectedType]]),N(o("section",GC,[t[76]||(t[76]=o("div",{class:"paper-section-eyebrow"},"Anonymization",-1)),o("div",WC,[t[75]||(t[75]=o("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),N(o("textarea",{class:A(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"4"},null,2),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),o("small",KC,[t[69]||(t[69]=b("One term per line (regex allowed). Replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[70]||(t[70]=b(", or use ",-1)),t[71]||(t[71]=o("code",null,"term=>replacement",-1)),t[72]||(t[72]=b(" to pick your own (e.g. ",-1)),t[73]||(t[73]=o("code",null,"Anonymous=>ABC",-1)),t[74]||(t[74]=b(").",-1))]),N(o("div",YC,"Regex characters detected. Escape them if unintentional.",512),[[Y,e.termsRegexWarning]]),N(o("div",JC,"Terms are in an invalid format.",512),[[Y,e.anonymize?.terms?.errors?.format]])])],512),[[Y,e.detectedType]]),N(o("section",QC,[t[97]||(t[97]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),N(o("div",null,[o("div",XC,[N(o("input",ZC,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[77]||(t[77]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),o("div",xC,[N(o("input",e_,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[78]||(t[78]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[79]||(t[79]=o("small",{class:"form-text text-muted"},"Images are served unchanged and may contain names or affiliations.",-1))]),o("div",t_,[N(o("input",o_,null,512),[[n,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[80]||(t[80]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[81]||(t[81]=o("small",{class:"form-text text-muted"},[b("PDF contents and metadata are served unchanged. "),o("a",{href:"/faq#formats"},"About supported formats")],-1))]),o("div",s_,[N(o("input",n_,null,512),[[n,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[82]||(t[82]=o("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),o("div",r_,[N(o("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,i_),[[n,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[83]||(t[83]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?p("v-if",!0):(l(),d("small",a_,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(l(),d("small",l_,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):p("v-if",!0)])],512),[[Y,e.detectedType==="repo"]]),N(o("div",null,[o("div",d_,[N(o("input",u_,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[84]||(t[84]=o("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),o("div",c_,[N(o("input",p_,null,512),[[n,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[85]||(t[85]=o("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),o("div",f_,[N(o("input",m_,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[86]||(t[86]=o("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),o("div",h_,[N(o("input",v_,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[87]||(t[87]=o("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),o("div",g_,[N(o("input",y_,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[88]||(t[88]=o("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),o("div",b_,[N(o("input",w_,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[89]||(t[89]=o("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Y,e.detectedType==="gist"]]),N(o("div",null,[o("div",k_,[N(o("input",E_,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[90]||(t[90]=o("label",{class:"form-check-label",for:"title"},"PR title",-1))]),o("div",C_,[N(o("input",__,null,512),[[n,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[91]||(t[91]=o("label",{class:"form-check-label",for:"body"},"PR body",-1))]),o("div",S_,[N(o("input",N_,null,512),[[n,{state:e.viewState,set:a=>{e.options.diff=a},value:e.options?.diff,form:"anonymize",options:{}}]]),t[92]||(t[92]=o("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),o("div",D_,[N(o("input",R_,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[93]||(t[93]=o("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),o("div",T_,[N(o("input",A_,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[94]||(t[94]=o("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),o("div",O_,[N(o("input",I_,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[95]||(t[95]=o("label",{class:"form-check-label",for:"date"},"Dates",-1))]),o("div",P_,[N(o("input",V_,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[96]||(t[96]=o("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[Y,e.detectedType==="pr"]])],512),[[Y,e.detectedType]]),N(o("section",q_,[t[101]||(t[101]=o("div",{class:"paper-section-eyebrow"},"Expiration",-1)),o("div",M_,[o("div",L_,[t[99]||(t[99]=o("label",{class:"paper-field-label",for:"expiration"},"Strategy",-1)),N((l(),d("select",$_,[...t[98]||(t[98]=[o("option",{value:"redirect"},"Redirect to GitHub when expired",-1),o("option",{value:"remove",selected:""},"Remove when expired",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"anonymize",options:{}}]])]),o("div",U_,[t[100]||(t[100]=o("label",{class:"paper-field-label",for:"expirationDate"},"Expiration date",-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,F_),[[n,{state:e.viewState,set:a=>{e.options.expirationDate=a},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),N(o("div",z_,"Pick a date in the future.",512),[[Y,e.anonymize?.expirationDate?.errors?.min]]),N(o("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[Y,e.anonymize?.expirationDate?.errors?.max]]),N(o("div",H_,"Enter a valid expiration date.",512),[[Y,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the content will be removed.",513),[[Y,e.options?.expirationMode=="remove"&&e.options?.expirationDate]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", visitors will be redirected to GitHub.",513),[[Y,e.options?.expirationMode=="redirect"&&e.options?.expirationDate]])],512),[[Y,e.detectedType]]),N(o("section",B_,[t[105]||(t[105]=o("div",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[106]||(t[106]=o("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),N(o("div",j_,[t[102]||(t[102]=o("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),o("div",G_,[N(o("input",W_,null,512),[[n,{state:e.viewState,set:a=>{e.coauthorSearch=a},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),N(o("div",K_,[(l(!0),d(X,null,re(e.coauthorResults,(a,u)=>(l(),d("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:me(f=>e.addCoauthor(a,f),["prevent"])},[o("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(a?.photo)},null,8,J_),o("span",{textContent:c(a?.username)},null,8,Q_)],8,Y_))),256))],512),[[Y,e.coauthorResults?.length>0]])]),N(o("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,X_),[[Y,e.coauthorError]])],512),[[Y,e.role==="owner"||e.role==="admin"]]),o("div",Z_,[(l(!0),d(X,null,re(e.coauthors,(a,u)=>(l(),d("div",x_,[a?.photo?(l(),d("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(a?.photo)},null,8,e2)):p("v-if",!0),o("a",{target:"_blank",textContent:c(a?.username),href:e.safeUrl("https://github.com/"+a?.username)},null,8,t2),t[104]||(t[104]=o("span",{class:"type-badge type-coauthor"},"Co-author",-1)),N(o("button",{type:"button",class:"btn btn-sm btn-icon",style:{"margin-left":"auto"},title:"Remove co-author",onClick:f=>e.removeCoauthor(a),"aria-label":"Remove co-author"},[...t[103]||(t[103]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,o2),[[Y,e.role==="owner"||e.role==="admin"]])]))),256)),N(o("div",s2," No co-authors yet. ",512),[[Y,!e.coauthors||e.coauthors?.length===0]])])],512),[[Y,e.isUpdate&&e.detectedType==="repo"]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,n2)):p("v-if",!0),e.draftRestored?(l(),d("div",r2,[t[107]||(t[107]=b("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[15]||(t[15]=a=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(l(),d("div",i2,[b(c(e.draftSaved?"Draft saved in this tab for 30 minutes.":"Unsaved changes. Keep this tab open until you save.")+" ",1),o("button",{type:"button",class:"draft-discard",onClick:t[16]||(t[16]=a=>e.discardDraft())},c(e.isUpdate?"Restore saved settings":"Discard changes"),1)])):p("v-if",!0),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",a2,"Review enabled images and PDFs before sharing. Their contents are not anonymized.")):p("v-if",!0),o("button",{type:"button",class:"btn btn-outline-ink mobile-preview-jump",onClick:t[17]||(t[17]=a=>e.selectMobilePane("preview"))},[...t[108]||(t[108]=[b("Review preview ",-1),o("span",{"aria-hidden":"true"},"\u2192",-1)])]),N(o("div",l2,[e.detectedType==="repo"&&!e.isUpdate?(l(),d("button",{key:0,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[18]||(t[18]=me(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[109]||(t[109]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(" Anonymize Repository ",-1)])],8,d2)):p("v-if",!0),e.detectedType==="repo"&&e.isUpdate?(l(),d("button",{key:1,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[19]||(t[19]=me(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[110]||(t[110]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),b(" Update Repository ",-1)])],8,u2)):p("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(l(),d("button",{key:2,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[20]||(t[20]=me(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[111]||(t[111]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(" Anonymize Pull Request ",-1)])],8,c2)):p("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(l(),d("button",{key:3,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[21]||(t[21]=me(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[112]||(t[112]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),b(" Update Pull Request ",-1)])],8,p2)):p("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(l(),d("button",{key:4,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[22]||(t[22]=me(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[113]||(t[113]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(" Anonymize Gist ",-1)])],8,f2)):p("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(l(),d("button",{key:5,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[23]||(t[23]=me(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[114]||(t[114]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),b(" Update Gist ",-1)])],8,m2)):p("v-if",!0)],512),[[Y,e.detectedType]])])),[[i,e.viewState]])],8,WE),p(" Preview column (right) "),e.detectedType==="repo"?(l(),d("div",{key:0,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",v2,[t[115]||(t[115]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",g2,c(e.previewStatus==="ready"?"README with redactions applied":"README preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",y2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",b2,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",w2,[t[116]||(t[116]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[24]||(t[24]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),!e.sourceLoading&&!e.readme&&e.previewStatus==="idle"?(l(),d("div",k2,"No README is available to preview. Review the published files before sharing.")):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",{key:4,class:"anonymize-preview-body markdown-body body",innerHTML:e.sanitize(e.html_readme)},null,8,E2)):p("v-if",!0)],8,h2)):p("v-if",!0),e.detectedType==="gist"&&e.details?(l(),d("div",{key:1,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",_2,[t[117]||(t[117]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",S2,c(e.previewStatus==="ready"?"Gist with redactions applied":"Gist preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",N2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",D2,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",R2,[t[118]||(t[118]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[25]||(t[25]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",T2,[o("div",A2,[o("h2",O2,[e.options?.title?(l(),d("span",I2,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,P2)):p("v-if",!0)]),e.options?.origin?(l(),d("small",V2,"Gist ID: "+c(e.details?.source?.gistId),1)):p("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(l(),d("small",q2,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):p("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(l(),d("div",M2,[o("ul",L2,[(l(!0),d(X,null,re(e.previewGistFiles,(a,u)=>(l(),d("li",$2,[o("div",U2,[o("strong",{textContent:c(a?.filename)},null,8,F2),a?.language?(l(),d("span",z2,c(a?.language),1)):p("v-if",!0)]),Ce(s,{file:a,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):p("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(l(),d("div",H2,[t[121]||(t[121]=o("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),o("ul",B2,[(l(!0),d(X,null,re(e.details?.gist?.comments,(a,u)=>(l(),d("li",j2,[o("div",G2,[e.options?.username?(l(),d("span",W2,[t[119]||(t[119]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[120]||(t[120]=b(" @",-1)),o("span",{textContent:c(e.anonymizeGistContent(a?.author))},null,8,K2)])):p("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,Y2)):p("v-if",!0)]),e.options?.body?(l(),d("div",J2,[Ce(r,{content:e.anonymizeGistContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0)]))),256))])])):p("v-if",!0)])):p("v-if",!0)],8,C2)):p("v-if",!0),e.detectedType==="pr"&&e.details?(l(),d("div",{key:2,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col"},[o("div",X2,[t[122]||(t[122]=o("span",{class:"paper-eyebrow"},"Live preview",-1)),o("span",Z2,c(e.previewStatus==="ready"?"Pull request with redactions applied":"Pull request preview"),1)]),e.sourceLoading&&e.previewStatus==="idle"?(l(),d("div",x2,"Loading source\u2026")):p("v-if",!0),e.previewStatus==="loading"?(l(),d("div",eS,"Updating the anonymized preview\u2026")):p("v-if",!0),e.previewStatus==="error"?(l(),d("div",tS,[t[123]||(t[123]=o("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),o("button",{class:"btn btn-outline-ink",type:"button",onClick:t[26]||(t[26]=a=>e.retryPreview())},"Retry preview")])):p("v-if",!0),e.previewStatus==="ready"?(l(),d("div",oS,[o("div",sS,[o("h2",nS,[e.options?.title?(l(),d("span",rS,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,iS)):p("v-if",!0)]),e.options?.origin?(l(),d("small",aS,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):p("v-if",!0),e.options?.body?(l(),d("div",lS,[Ce(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0),e.options?.diff||e.options?.comments?(l(),d("nav",dS,[e.options?.diff?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",id:"preview-pr-diff-tab","aria-selected":e.prTabState?.active==="diff","aria-controls":"preview-pr-diff-panel",tabindex:e.prTabState?.active==="diff"?0:-1,onKeydown:t[27]||(t[27]=a=>e.previewTabKeydown(a)),onClick:t[28]||(t[28]=a=>e.prTabState.active="diff")},[...t[124]||(t[124]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),b(" Diff ",-1)])],42,uS)):p("v-if",!0),e.options?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",id:"preview-pr-comments-tab","aria-selected":e.prTabState?.active==="comments","aria-controls":"preview-pr-comments-panel",tabindex:e.prTabState?.active==="comments"?0:-1,onKeydown:t[29]||(t[29]=a=>e.previewTabKeydown(a)),onClick:t[30]||(t[30]=a=>e.prTabState.active="comments")},[t[125]||(t[125]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,pS)],42,cS)):p("v-if",!0)])):p("v-if",!0),!e.options?.diff&&!e.options?.comments?(l(),d("div",fS,"Diff and comments are hidden by your display settings.")):p("v-if",!0),o("div",mS,[e.options?.diff&&e.prTabState?.active=="diff"?(l(),d("div",hS,[o("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,vS)])):p("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(l(),d("div",gS,[o("ul",yS,[(l(!0),d(X,null,re(e.details?.pullRequest?.comments,(a,u)=>(l(),d("li",bS,[o("div",wS,[e.options?.username?(l(),d("span",kS,[t[126]||(t[126]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[127]||(t[127]=b(" @",-1)),o("span",{textContent:c(e.anonymizePrContent(a?.author))},null,8,ES)])):p("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,CS)):p("v-if",!0)]),e.options?.body?(l(),d("div",_S,[Ce(r,{content:e.anonymizePrContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0)]))),256))])])):p("v-if",!0)])])):p("v-if",!0)],8,Q2)):p("v-if",!0)])],512),[[Y,e.workspaceOpen||e.isUpdate]])],2)}var SS={class:"container-fluid h-100 anonymize-page"},NS={class:"row h-100 flex-column flex-md-row"},DS={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},RS={class:"form-group"},TS={class:"form-group"},AS={class:"form-check"},OS={class:"form-check-input",type:"checkbox",id:"update",name:"update"},IS={class:"form-group"},PS={class:"form-text text-muted"},VS=["href"],qS={class:"invalid-feedback"},MS={class:"form-text text-muted"},LS={class:"form-group"},$S={id:"idHelp",class:"form-text text-muted"},US={class:"invalid-feedback"},FS={class:"form-group"},zS={class:"invalid-feedback"},HS={class:"form-group"},BS={class:"form-control",id:"expiration",name:"expiration"},jS={class:"form-group",id:"expiration-date-form"},GS={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},WS={class:"accordion mb-3",id:"options"},KS={class:"card"},YS={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},JS={class:"card-body"},QS={class:"form-group mb-0"},XS={class:"form-check"},ZS={class:"form-check-input",type:"checkbox",id:"link",name:"link"},xS={class:"form-check"},eN={class:"form-check-input",type:"checkbox",id:"image",name:"image"},tN={class:"form-check"},oN={class:"form-check-input",type:"checkbox",id:"date",name:"date"},sN={class:"form-check"},nN={class:"form-check-input",type:"checkbox",id:"username",name:"username"},rN={class:"form-check"},iN={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},aN={class:"form-check"},lN={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},dN={class:"form-check"},uN={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},cN={class:"form-check"},pN={class:"form-check-input",type:"checkbox",id:"title",name:"title"},fN={class:"form-check"},mN={class:"form-check-input",type:"checkbox",id:"body",name:"body"},hN=["textContent"],vN={class:"anonymize-submit-bar"},gN={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},yN={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},bN={class:"pr-title mb-1"},wN={key:0},kN=["textContent"],EN={key:0},CN={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},_N={class:"nav nav-tabs",id:"myTab",role:"tablist"},SN={key:0,class:"nav-item",role:"presentation"},NN={key:1,class:"nav-item",role:"presentation"},DN=["textContent"],RN={class:"tab-content",id:"pills-tabContent"},TN={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},AN={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},ON={style:{"overflow-x":"auto"}},IN=["innerHTML"],PN={key:0,class:"pr-comments list-group"},VN={class:"pr-comment list-group-item"},qN={class:"d-flex w-100 justify-content-between flex-wrap"},MN={key:0,class:"mb-1"},LN=["textContent"],$N={class:"mb-1"};function gl(e,t){let s=We("markdown"),r=be("field"),n=be("form");return l(),d("div",SS,[o("div",NS,[o("div",DS,[o("div",{class:A(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[N((l(),d("form",{class:A(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=ce('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

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

Source
',4)),p(" pullRequestUrl "),o("div",RS,[t[2]||(t[2]=o("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestUrl=i},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.access]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.missing]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[Y,e.anonymize?.pullRequestUrl?.errors?.used]])]),N(o("div",null,[o("div",TS,[o("div",AS,[N(o("input",OS,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=o("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=o("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=o("div",{class:"paper-section-eyebrow anonymize-section-title"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})]),b(" Conference ID ")],-1)),p(" Conference "),o("div",IS,[t[5]||(t[5]=o("label",{for:"conference"},[b("Conference ID "),o("span",{class:"text-muted"},"(Optional)")],-1)),N(o("input",{class:A(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[r,{state:e.viewState,set:i=>{e.conference=i},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),N(o("small",PS,[o("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,VS),b(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[Y,e.conference_data]]),N(o("div",qS," The conference is not activated. ",512),[[Y,e.anonymize?.conference?.errors?.activated]]),N(o("small",MS," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[Y,!e.conference_data]])]),t[27]||(t[27]=o("div",{class:"paper-section-eyebrow anonymize-section-title"},[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),b(" Anonymization Options ")],-1)),p(" Pull Request ID "),o("div",LS,[t[6]||(t[6]=o("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestId=i},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),o("small",$S,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),N(o("div",US," Repository id can only contain letters and numbers ",512),[[Y,e.anonymize?.pullRequestId?.errors?.format]]),N(o("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[Y,e.anonymize?.pullRequestId?.errors?.used]])]),p(" Terms "),o("div",FS,[t[7]||(t[7]=o("label",{for:"terms"},"Terms to anonymize",-1)),N(o("textarea",{class:A(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=o("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),N(o("div",zS," Terms are in an invalid format ",512),[[Y,e.anonymize?.terms?.errors?.format]])]),o("div",HS,[t[10]||(t[10]=o("label",{for:"expiration"},"Expiration strategy",-1)),N((l(),d("select",BS,[...t[9]||(t[9]=[o("option",{value:"never",selected:""},"Never expire",-1),o("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),o("option",{value:"remove"},"Remove when expired",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=o("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),N(o("div",jS,[t[12]||(t[12]=o("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),N(o("input",GS,null,512),[[r,{state:e.viewState,set:i=>{e.options.expirationDate=i},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[Y,e.options?.expirationMode=="remove"]]),N(o("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[Y,e.options?.expirationMode=="redirect"]])],512),[[Y,e.options?.expirationMode!="never"]]),o("div",WS,[o("div",KS,[t[25]||(t[25]=ce('

',1)),o("div",YS,[o("div",JS,[o("div",QS,[o("div",XS,[N(o("input",ZS,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=o("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),o("div",xS,[N(o("input",eN,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),o("div",tN,[N(o("input",oN,null,512),[[r,{state:e.viewState,set:i=>{e.options.date=i},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=o("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=o("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),o("div",sN,[N(o("input",nN,null,512),[[r,{state:e.viewState,set:i=>{e.options.username=i},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=o("label",{class:"form-check-label",for:"username"},"Display username",-1))]),o("div",rN,[N(o("input",iN,null,512),[[r,{state:e.viewState,set:i=>{e.options.comments=i},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=o("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),o("div",aN,[N(o("input",lN,null,512),[[r,{state:e.viewState,set:i=>{e.options.diff=i},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=o("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),o("div",dN,[N(o("input",uN,null,512),[[r,{state:e.viewState,set:i=>{e.options.origin=i},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=o("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),o("div",cN,[N(o("input",pN,null,512),[[r,{state:e.viewState,set:i=>{e.options.title=i},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=o("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),o("div",fN,[N(o("input",mN,null,512),[[r,{state:e.viewState,set:i=>{e.options.body=i},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=o("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[Y,e.pullRequestUrl]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,hN)):p("v-if",!0),N(o("div",vN,[e.isUpdate?p("v-if",!0):(l(),d("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=me(i=>e.submitForm(i,()=>{e.anonymizePullRequest(i)}),["prevent"]))},[...t[28]||(t[28]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(" Anonymize ",-1)])])),e.isUpdate?(l(),d("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=me(i=>e.submitForm(i,()=>{e.updatePullRequest(i)}),["prevent"]))},[...t[29]||(t[29]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-save"})],-1),b(" Update ",-1)])])):p("v-if",!0)],512),[[Y,e.pullRequestUrl]])],2)),[[n,e.viewState]])],2)]),e.details?(l(),d("div",gN,[o("div",yN,[o("h2",bN,[e.options?.title?(l(),d("span",wN,c(e.anonymize(e.details?.pullRequest?.title)),1)):p("v-if",!0),o("span",{class:A(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,kN)):p("v-if",!0)]),e.options?.origin?(l(),d("small",EN,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):p("v-if",!0),e.options?.body?(l(),d("div",CN,[Ce(s,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):p("v-if",!0),o("ul",_N,[e.options?.diff?(l(),d("li",SN,[...t[31]||(t[31]=[o("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):p("v-if",!0),e.options?.comments?(l(),d("li",NN,[o("button",{class:A(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[o("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,DN)],2)])):p("v-if",!0)]),o("div",RN,[o("div",TN,[e.options?.diff?(l(),d("div",AN,[o("pre",ON,[o("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,IN)])])):p("v-if",!0)]),o("div",{class:A(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(l(),d("ul",PN,[(l(!0),d(X,null,re(e.details?.pullRequest?.comments,(i,a)=>(l(),d("li",VN,[o("div",qN,[e.options?.username?(l(),d("h5",MN," @"+c(e.anonymize(i?.author)),1)):p("v-if",!0),e.options?.date?(l(),d("small",{key:1,textContent:c(e.fmt?.date(i?.updatedDate))},null,8,LN)):p("v-if",!0)]),o("p",$N,[e.options?.body?(l(),Mt(s,{key:0,class:"pr-comment-body",content:e.anonymize(i?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):p("v-if",!0)])]))),256))])):p("v-if",!0)],2)])])):p("v-if",!0)])])}var UN={class:"container paper-page claim-page"},FN={class:"paper-settings-main claim-form"},zN={class:"form-group"},HN={class:"invalid-feedback"},BN={class:"form-group"};function yl(e,t){let s=be("field"),r=be("form");return l(),d("div",UN,[t[6]||(t[6]=ce('
My work \xA0/\xA0 Claim

Claim an anonymization

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

',3)),o("div",FN,[t[5]||(t[5]=o("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),N((l(),d("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=me(n=>e.submitForm(n,()=>{e.claim()}),["prevent"]))},[o("div",zN,[t[1]||(t[1]=o("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",required:""},null,2),[[s,{state:e.viewState,set:n=>{e.repoUrl=n},value:e.repoUrl,form:"claimForm",options:{}}]]),N(o("div",HN," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Y,e.claimForm?.repoUrl?.errors?.not_found]])]),o("div",BN,[t[2]||(t[2]=o("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",required:""},null,2),[[s,{state:e.viewState,set:n=>{e.repoId=n},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=o("small",{id:"idHelp",class:"form-text text-muted"},[b("The ID is the last part of the anonymized URL: "),o("code",null,"anonymous.4open.science/r/"),b(".")],-1))]),t[4]||(t[4]=o("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[r,e.viewState]])])])}var jN={class:"container page paper-page conference-page"},GN={class:"paper-crumbs"},WN={class:"here"},KN={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},YN=["textContent"],JN={key:0,class:"paper-page-lede"},QN=["textContent","href"],XN={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},ZN=["textContent"],xN=["href"],eD={class:"paper-meta-rule"},tD=["textContent"],oD=["textContent"],sD={key:0},nD={class:"search-wrap"},rD={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search by ID or source repository\u2026",autocomplete:"off"},iD={class:"dashboard-filter-controls"},aD={class:"dropdown"},lD={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},dD={class:"filter-btn-value"},uD={class:"dropdown-menu","aria-labelledby":"dropdownSort"},cD={class:"form-check dropdown-item"},pD={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},fD={class:"form-check dropdown-item"},mD={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},hD={class:"form-check dropdown-item"},vD={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},gD={class:"form-check dropdown-item"},yD={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},bD={class:"dropdown"},wD={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},kD={key:0,class:"filter-btn-value"},ED={key:1,class:"filter-btn-value"},CD={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},_D={class:"form-check dropdown-item"},SD=["id"],ND=["for"],DD={class:"dashboard-meta"},RD={class:"dashboard-count"},TD={key:0},AD={key:0},OD={key:1},ID={key:1},PD={key:0,class:"filter-chip"},VD=["onClick","aria-label"],qD={class:"paper-table paper-table-repos w-100",role:"table","aria-label":"Repositories"},MD={class:"cell-anon",role:"cell"},LD={class:"anon-text"},$D=["textContent","href"],UD={class:"anon-sub"},FD={class:"anon-source"},zD=["textContent","href"],HD={key:0},BD=["textContent","href"],jD={key:1},GD=["href"],WD={class:"cell-status",role:"cell"},KD={class:"status-line"},YD=["textContent"],JD={key:0,class:"status-sub"},QD={class:"cell-views num",role:"cell"},XD=["textContent"],ZD={class:"cell-expires",role:"cell"},xD={key:0,class:"expires-never"},eR=["textContent"],tR={key:2,class:"expires-past"},oR={key:0},sR={key:3,class:"empty-dash","aria-label":"Not applicable"},nR={class:"cell-actions",role:"cell"},rR={class:"dropdown"},iR=["aria-label"],aR={class:"dropdown-menu dropdown-menu-right"},lR=["href"],dR=["href"],uR={key:0,class:"paper-table-empty"},cR={key:0},pR={key:1},fR={key:2,class:"paper-table-empty-actions"};function bl(e,t){let s=be("field"),r=be("form");return l(),d("div",jN,[o("div",null,[o("div",GN,[t[2]||(t[2]=o("a",{href:"/dashboard"},"My work",-1)),t[3]||(t[3]=b(" \xA0/\xA0 ",-1)),t[4]||(t[4]=o("a",{href:"/conferences"},"Conferences",-1)),t[5]||(t[5]=b(" \xA0/\xA0 ",-1)),o("span",WN,c(e.conference?.conferenceID),1)]),o("div",KN,[o("div",null,[o("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,YN),e.conference?.url?(l(),d("p",JN,[o("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,QN)])):p("v-if",!0)]),o("div",XN,[o("span",{class:A(["status-pill",{"status-pill-ready":e.conference?.status=="ready","status-pill-removed":e.conference?.status=="removed"||e.conference?.status=="expired"}])},[o("span",{class:A(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),o("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,ZN)],2),o("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[6]||(t[6]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit conference",-1)])],8,xN)])]),o("div",eD,[o("span",null,[t[7]||(t[7]=b("ID ",-1)),o("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,tD)]),o("span",null,[t[8]||(t[8]=b("Review window ",-1)),o("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),o("span",null,[t[9]||(t[9]=b("Repositories ",-1)),o("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),o("span",null,[t[10]||(t[10]=b("Plan ",-1)),o("b",{textContent:c(e.conference?.plan?.name||e.conference?.plan?.planID||"Free")},null,8,oD)]),e.conference?.price?(l(),d("span",sD,[t[11]||(t[11]=b("Cost so far ",-1)),o("b",null,c(e.fmt?.number(e.conference?.price,2))+" \u20AC",1)])):p("v-if",!0)]),t[32]||(t[32]=o("div",{class:"paper-section-eyebrow"},"Repositories",-1)),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=me(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[o("div",nD,[N(o("input",rD,null,512),[[s,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),o("div",iD,[o("div",aD,[o("button",lD,[t[12]||(t[12]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",dD,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),o("div",uD,[t[17]||(t[17]=o("h6",{class:"dropdown-header"},"Order by",-1)),o("div",cD,[N(o("input",pD,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[13]||(t[13]=o("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),o("div",fD,[N(o("input",mD,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[14]||(t[14]=o("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),o("div",hD,[N(o("input",vD,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),o("div",gD,[N(o("input",yD,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[16]||(t[16]=o("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])]),o("div",bD,[o("button",wD,[t[18]||(t[18]=o("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",kD,"All")):p("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?p("v-if",!0):(l(),d("span",ED,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),o("div",CD,[t[19]||(t[19]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,re(e.statusLabels,(n,i,a)=>(l(),d("div",_D,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,SD),[[s,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+i},c(n),9,ND)]))),256))])])])],32)),[[r,e.viewState]]),o("div",DD,[o("span",RD,[e.filteredRepositories?.length===e.conference?.repositories?.length?(l(),d("span",TD,[b(c(e.fmt?.number(e.conference?.repositories?.length))+" repositor",1),e.conference?.repositories?.length===1?(l(),d("span",AD,"y")):p("v-if",!0),e.conference?.repositories?.length!==1?(l(),d("span",OD,"ies")):p("v-if",!0)])):p("v-if",!0),e.filteredRepositories?.length!==e.conference?.repositories?.length?(l(),d("span",ID,c(e.fmt?.number(e.filteredRepositories?.length))+" of "+c(e.fmt?.number(e.conference?.repositories?.length))+" shown",1)):p("v-if",!0)]),(l(!0),d(X,null,re(e.filters?.status,(n,i,a)=>(l(),d(X,null,[n===!1?(l(),d("span",PD,[b(" Hiding "+c(e.statusLabels[i])+" ",1),o("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,VD)])):p("v-if",!0)],64))),256))]),o("div",qD,[t[31]||(t[31]=o("div",{class:"paper-table-head",role:"row"},[o("div",{role:"columnheader"},"Repository"),o("div",{role:"columnheader"},"Status"),o("div",{role:"columnheader",class:"num"},"Views"),o("div",{role:"columnheader"},"Expires"),o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(X,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:A(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error"}]),role:"row",key:n?.repoId},[o("div",MD,[t[22]||(t[22]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[o("use",{href:"#project-type-repo"})],-1)),o("div",LD,[o("a",{class:"repo-name",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId+"/")},null,8,$D),o("div",UD,[o("span",FD,[o("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,zD),n?.options?.update&&n?.source?.branch?(l(),d("span",HD,[t[20]||(t[20]=b(" \xB7 ",-1)),o("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,BD)])):p("v-if",!0),n?.source?.commit?(l(),d("span",jD,[t[21]||(t[21]=b(" \xB7 ",-1)),o("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,GD)])):p("v-if",!0)])])])]),o("div",WD,[o("div",KD,[o("span",{class:A(["status-dot","status-"+(n?.status=="error"?"error":n?.status=="ready"?"ready":n?.status=="expired"||n?.status=="removed"?n?.status:"progress")]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,YD)]),n?.anonymizeDate?(l(),d("div",JD,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):p("v-if",!0)]),o("div",QD,[t[23]||(t[23]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),t[24]||(t[24]=b()),o("span",{textContent:c(e.fmt?.number(n?.pageView))},null,8,XD)]),o("div",ZD,[t[26]||(t[26]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),n?.status=="ready"&&(n?.options?.expirationMode==="never"||!n?.options?.expirationDate)?(l(),d("span",xD,"Never")):p("v-if",!0),n?.status=="ready"&&n?.options?.expirationMode!=="never"&&n?.options?.expirationDate?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?.options?.expirationDate))},null,8,eR)):p("v-if",!0),n?.status=="expired"?(l(),d("span",tR,[t[25]||(t[25]=b("Expired",-1)),n?.options?.expirationDate?(l(),d("span",oR,c(e.fmt?.humanTime(n?.options?.expirationDate)),1)):p("v-if",!0)])):p("v-if",!0),n?.status!="ready"&&n?.status!="expired"?(l(),d("span",sR,"\u2014")):p("v-if",!0)]),o("div",nR,[o("div",rR,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.repoId},[...t[27]||(t[27]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,iR),o("div",aR,[o("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[28]||(t[28]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View ",-1)])],8,lR),o("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[29]||(t[29]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit ",-1)])],8,dR)])])])],2))),128)),e.filteredRepositories?.length==0?(l(),d("div",uR,[t[30]||(t[30]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.conference?.repositories?.length?p("v-if",!0):(l(),d("span",cR,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(l(),d("span",pR,"Nothing matches the current filters.")):p("v-if",!0),e.conference?.repositories?.length?(l(),d("div",fR,[o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")])):p("v-if",!0)])):p("v-if",!0)])])])}var mR={class:"container page paper-page conferences-page"},hR={class:"row"},vR={class:"w-100"},gR={class:"search-wrap"},yR={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},bR={class:"dashboard-filter-controls"},wR={class:"dropdown"},kR={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},ER={class:"filter-btn-value"},CR={class:"dropdown-menu","aria-labelledby":"dropdownSort"},_R={class:"form-check dropdown-item"},SR={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},NR={class:"form-check dropdown-item"},DR={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},RR={class:"form-check dropdown-item"},TR={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},AR={class:"dropdown"},OR={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},IR={key:0,class:"filter-btn-value"},PR={key:1,class:"filter-btn-value"},VR={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},qR={class:"form-check dropdown-item"},MR=["id"],LR=["for"],$R={class:"dashboard-meta"},UR={class:"dashboard-count"},FR={key:0},zR={key:0},HR={key:1},BR={key:0,class:"filter-chip"},jR=["onClick","aria-label"],GR={key:0,class:"conference-feedback",role:"alert"},WR={key:1,class:"conference-feedback",role:"status"},KR={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},YR={class:"cell-anon",role:"cell"},JR={class:"anon-text"},QR=["textContent","href"],XR={class:"anon-sub"},ZR={class:"anon-source"},xR=["textContent"],eT={key:0},tT=["textContent","href"],oT={class:"cell-status",role:"cell"},sT={class:"status-line"},nT=["textContent"],rT={class:"cell-views num",role:"cell"},iT=["textContent"],aT={class:"cell-expires",role:"cell"},lT={key:0},dT={key:1,class:"empty-dash","aria-label":"No review window"},uT={class:"cell-actions",role:"cell"},cT={class:"dropdown"},pT=["disabled","aria-label"],fT={class:"dropdown-menu dropdown-menu-right"},mT=["href"],hT=["href"],vT={key:0},gT=["onClick"],yT={key:0,class:"paper-table-empty"},bT={key:0},wT={key:1},kT={class:"paper-table-empty-actions"},ET={key:1,href:"/conference/new",class:"btn btn-ink"};function wl(e,t){let s=be("field"),r=be("form");return l(),d("div",mR,[o("div",hR,[o("div",vR,[t[10]||(t[10]=ce('
My work \xA0/\xA0 Conferences

Your conferences

Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.

New conference
',2)),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=me(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[o("div",gR,[N(o("input",yR,null,512),[[s,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),o("div",bR,[o("div",wR,[o("button",kR,[t[3]||(t[3]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",ER,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),o("div",CR,[t[7]||(t[7]=o("h6",{class:"dropdown-header"},"Order by",-1)),o("div",_R,[N(o("input",SR,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=o("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),o("div",NR,[N(o("input",DR,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[5]||(t[5]=o("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),o("div",RR,[N(o("input",TR,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[6]||(t[6]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),o("div",AR,[o("button",OR,[t[8]||(t[8]=o("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",IR,"All")):p("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?p("v-if",!0):(l(),d("span",PR,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),o("div",VR,[t[9]||(t[9]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,re(e.statusLabels,(n,i,a)=>(l(),d("div",qR,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,MR),[[s,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+i},c(n),9,LR)]))),256))])])])],32)),[[r,e.viewState]]),o("div",$R,[o("span",UR,[e.filteredConferences?.length===e.conferences?.length?(l(),d("span",FR,[b(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(l(),d("span",zR,"s")):p("v-if",!0)])):p("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(l(),d("span",HR,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):p("v-if",!0)]),(l(!0),d(X,null,re(e.filters?.status,(n,i,a)=>(l(),d(X,null,[n===!1?(l(),d("span",BR,[b(" Hiding "+c(e.statusLabels[i])+" ",1),o("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,jR)])):p("v-if",!0)],64))),256))])]),e.error?(l(),d("div",GR,[o("span",null,c(e.error),1),o("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>e.loadConferences())},"Retry")])):p("v-if",!0),e.loading?(l(),d("div",WR,"Loading conferences\u2026")):p("v-if",!0),o("div",KR,[t[24]||(t[24]=o("div",{class:"paper-table-head",role:"row"},[o("div",{role:"columnheader"},"Conference"),o("div",{role:"columnheader"},"Status"),o("div",{role:"columnheader",class:"num"},"Repos"),o("div",{role:"columnheader"},"Review window"),o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(X,null,re(e.filteredConferences,(n,i)=>(l(),d("div",{class:A(["paper-table-row row-clickable",{"repo-inactive":n?.status=="expired"||n?.status=="removed"}]),role:"row",key:n?.conferenceID},[o("div",YR,[t[13]||(t[13]=o("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[o("use",{href:"#project-icon-conference"})],-1)),o("div",JR,[o("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,QR),o("div",XR,[o("span",ZR,[t[12]||(t[12]=b("ID ",-1)),o("span",{class:"commit-hash",textContent:c(n?.conferenceID)},null,8,xR),n?.url?(l(),d("span",eT,[t[11]||(t[11]=b(" \xB7 ",-1)),o("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(n?.url,60)),href:e.safeUrl(n?.url)},null,8,tT)])):p("v-if",!0)])])])]),o("div",oT,[o("div",sT,[o("span",{class:A(["status-dot","status-"+n?.status]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,nT)])]),o("div",rT,[t[14]||(t[14]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1)),t[15]||(t[15]=b()),o("span",{textContent:c(e.fmt?.number(n?.nbRepositories||0))},null,8,iT)]),o("div",aT,[t[16]||(t[16]=o("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),n?.startDate?(l(),d("span",lT,c(e.fmt?.date(n?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(n?.endDate,"mediumDate")),1)):p("v-if",!0),n?.startDate?p("v-if",!0):(l(),d("span",dT,"\u2014"))]),o("div",uT,[o("div",cT,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:n?.removing,"aria-label":"Actions for "+n?.name},[...t[17]||(t[17]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,pT),o("div",fT,[o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[18]||(t[18]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View ",-1)])],8,mT),o("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit ",-1)])],8,hT),n?.status!="removed"?(l(),d("div",vT,[t[21]||(t[21]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeConference(n)},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove ",-1)])],8,gT)])):p("v-if",!0)])])])],2))),128)),!e.loading&&!e.error&&e.filteredConferences?.length==0?(l(),d("div",yT,[t[23]||(t[23]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.conferences?.length==0?(l(),d("span",bT,"You have not created a conference yet.")):p("v-if",!0),e.conferences?.length>0?(l(),d("span",wT,"Nothing matches the current filters.")):p("v-if",!0),o("div",kT,[e.conferences?.length>0?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[2]||(t[2]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):p("v-if",!0),e.conferences?.length==0?(l(),d("a",ET,[...t[22]||(t[22]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})],-1),b(" New conference",-1)])])):p("v-if",!0)])])):p("v-if",!0)])])])}var CT={class:"container page dashboard-page paper-page"},_T={class:"row"},ST={class:"w-100"},NT={class:"dashboard-heading"},DT=["open"],RT=["aria-expanded"],TT=["stroke-dasharray"],AT={key:1,d:"M7 12c0-4 4-4 5 0s5 4 5 0-4-4-5 0-5 4-5 0",class:"quota-ring-unlimited"},OT={key:0,class:"quota-summary-value"},IT={key:0},PT={class:"quota-panel",id:"dashboard-usage"},VT={class:"quota-panel-heading"},qT={key:1,class:"quota-loading",role:"status"},MT={class:"search-wrap"},LT={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search projects, IDs, or conferences\u2026",autocomplete:"off"},$T=["aria-expanded"],UT={class:"btn-group",role:"group","aria-label":"Type"},FT=["aria-pressed"],zT=["aria-pressed"],HT=["aria-pressed"],BT=["aria-pressed"],jT={class:"dropdown"},GT={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},WT={class:"filter-btn-value"},KT={class:"sr-only"},YT={class:"dropdown-menu","aria-labelledby":"dropdownSort"},JT={class:"form-check dropdown-item"},QT=["onClick","checked","id"],XT=["for"],ZT={class:"dropdown"},xT={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},eA={key:0,class:"filter-btn-value"},tA={key:1,class:"filter-btn-value"},oA={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},sA={class:"form-check dropdown-item"},nA=["id"],rA=["for"],iA={key:0,class:"dashboard-meta"},aA={class:"dashboard-view-tabs",role:"group","aria-label":"Project view"},lA=["aria-pressed"],dA=["aria-pressed","aria-label"],uA={class:"dashboard-count"},cA={key:0},pA={key:0},fA={key:1},mA={class:"dashboard-active-filters"},hA=["onClick","aria-label","title"],vA=["aria-busy"],gA={class:"paper-table-head",role:"row"},yA=["aria-sort"],bA=["aria-sort"],wA=["aria-sort"],kA=["aria-sort"],EA={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},CA=["onClick"],_A={class:"cell-anon",role:"cell"},SA=["aria-label","title"],NA={class:"project-type-svg","aria-hidden":"true"},DA=["href"],RA={class:"anon-text"},TA={class:"anon-title"},AA=["title","textContent","href"],OA=["textContent"],IA={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},PA={class:"anon-sub"},VA=["title"],qA=["title"],MA=["title"],LA=["textContent"],$A={class:"dashboard-row-meta",role:"presentation"},UA={class:"cell-status",role:"cell"},FA={class:"status-line"},zA=["textContent"],HA=["textContent","title"],BA=["title"],jA=["href"],GA=["onClick"],WA={key:4,class:"status-sub status-sub-date"},KA=["aria-label"],YA={class:"cell-expires",role:"cell"},JA={key:0,class:"expires-never"},QA=["textContent"],XA={key:2,class:"expires-past"},ZA={key:3,class:"expires-past"},xA={key:4,class:"empty-dash","aria-label":"Not applicable"},eO={class:"cell-actions",role:"cell"},tO=["onClick","disabled","title","aria-label"],oO=["onClick","data-project-actions","aria-controls","aria-expanded"],sO={key:2,class:"dropdown"},nO=["data-project-actions","aria-label"],rO={class:"dropdown-menu dropdown-menu-right"},iO=["onClick","aria-controls","aria-expanded"],aO=["href"],lO=["href"],dO=["onClick","disabled"],uO=["href"],cO=["onClick"],pO=["onClick"],fO=["onClick"],mO={key:5},hO=["onClick"],vO={key:1,class:"project-details-row",role:"row"},gO=["id","onKeydown"],yO={class:"project-details-heading"},bO=["onClick"],wO={class:"project-details-list"},kO={key:0},EO={key:1},CO={key:0},_O={key:2},SO={key:0,class:"project-progress-help"},NO=["href"],DO=["onSubmit"],RO=["for"],TO=["id"],AO={class:"project-name-controls"},OO=["id","aria-describedby","disabled"],IO=["disabled"],PO={key:0,class:"project-name-error",role:"alert"},VO={key:1,role:"status"},qO={key:0,class:"paper-table-empty"},MO={key:0},LO={key:1},$O={class:"paper-table-empty-actions"},UO={key:1,href:"/anonymize",class:"btn btn-ink"},FO={key:0,class:"dashboard-pagination"},zO={key:0,role:"alert"},HO=["disabled"];function kl(e,t){let s=We("quota-usage"),r=be("field"),n=be("form");return l(),d("div",CT,[o("div",_T,[o("div",ST,[o("div",NT,[o("div",null,[t[27]||(t[27]=o("h1",{class:"paper-page-title"},"Projects",-1)),t[28]||(t[28]=o("p",{class:"paper-page-lede"},"Manage your anonymous links.",-1)),o("details",{class:"dashboard-quota",open:e.quotaExpanded,onToggle:t[1]||(t[1]=i=>e.quotaExpanded=i.target.open),onKeydown:t[2]||(t[2]=Ro(me(i=>e.closeQuota(),["prevent","stop"]),["esc"]))},[o("summary",{"aria-controls":"dashboard-usage","aria-expanded":e.quotaExpanded},[(l(),d("svg",{class:A(["quota-summary-ring",e.quota?"quota-"+e.quota.repository.level:""]),viewBox:"0 0 24 24","aria-hidden":"true"},[t[21]||(t[21]=o("circle",{class:"quota-ring-track",cx:"12",cy:"12",r:"9"},null,-1)),e.quota&&!e.quota.repository.unlimited?(l(),d("circle",{key:0,class:"quota-ring-fill",cx:"12",cy:"12",r:"9",pathLength:"100","stroke-dasharray":e.quota.repository.percent+" 100"},null,8,TT)):p("v-if",!0),e.quota?.repository.unlimited?(l(),d("path",AT)):p("v-if",!0)],2)),t[23]||(t[23]=o("span",{class:"quota-summary-label"},"Usage",-1)),e.quota?(l(),d("span",OT,[b(c(e.fmt.number(e.quota.repository.used)),1),e.quota.repository.unlimited?p("v-if",!0):(l(),d("span",IT," / "+c(e.fmt.number(e.quota.repository.total)),1)),t[22]||(t[22]=b(" repos",-1))])):p("v-if",!0),t[24]||(t[24]=o("svg",{class:"project-type-svg quota-summary-chevron","aria-hidden":"true"},[o("use",{href:"#project-icon-chevron"})],-1))],8,RT),o("div",PT,[o("div",VT,[t[26]||(t[26]=o("h2",null,"Account usage",-1)),o("button",{type:"button",class:"project-close","aria-label":"Close usage",onClick:t[0]||(t[0]=i=>e.closeQuota())},[...t[25]||(t[25]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])])]),e.quota?(l(),Mt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(l(),d("p",qT,"Loading usage\u2026"))])],40,DT)]),t[29]||(t[29]=ce('',1))]),p(" Search + filters "),N((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[9]||(t[9]=me(i=>e.submitForm(i,()=>{i.preventDefault()}),["prevent"]))},[o("div",MT,[N(o("input",LT,null,512),[[r,{state:e.viewState,set:i=>{e.search=i},value:e.search,form:null,options:{}}]])]),o("button",{class:"btn dashboard-filters-toggle",type:"button","aria-expanded":e.filtersExpanded,"aria-controls":"dashboard-filter-controls",onClick:t[3]||(t[3]=i=>e.filtersExpanded=!e.filtersExpanded)},[...t[30]||(t[30]=[b("Filters",-1),o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})],-1)])],8,$T),o("div",{id:"dashboard-filter-controls",class:A(["dashboard-filter-controls",{expanded:e.filtersExpanded}])},[o("div",UT,[o("button",{type:"button",class:A(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[4]||(t[4]=i=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,FT),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="repo"}]),title:"Repositories",onClick:t[5]||(t[5]=i=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},[...t[31]||(t[31]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-repo"})],-1),o("span",{class:"type-filter-label"},"Repos",-1)])],10,zT),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="pr"}]),title:"Pull requests",onClick:t[6]||(t[6]=i=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},[...t[32]||(t[32]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-pr"})],-1),o("span",{class:"type-filter-label"},"PRs",-1)])],10,HT),o("button",{type:"button",class:A(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="gist"}]),title:"Gists",onClick:t[7]||(t[7]=i=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},[...t[33]||(t[33]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-type-gist"})],-1),o("span",{class:"type-filter-label"},"Gists",-1)])],10,BT)]),o("div",{id:"dashboard-extra-filters",class:A(["dashboard-extra-filters",{expanded:e.filtersExpanded}])},[o("div",jT,[o("button",GT,[t[35]||(t[35]=o("span",{class:"filter-btn-label"},"Sort",-1)),o("span",WT,c(e.sortLabel()),1),(l(),d("svg",{class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[34]||(t[34]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)),o("span",KT,c(e.sortDesc()?"descending":"ascending"),1)]),o("div",YT,[t[36]||(t[36]=o("h6",{class:"dropdown-header"},"Order by",-1)),(l(!0),d(X,null,re(e.sortFields,(i,a,u)=>(l(),d("div",JT,[o("input",{class:"form-check-input",type:"radio",name:"sort",onClick:f=>e.setSort(a,i.defaultDesc),checked:e.isSortedBy(a),id:"sort-"+u},null,8,QT),o("label",{class:"form-check-label",for:"sort-"+u},c(i?.label),9,XT)]))),256)),t[37]||(t[37]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item",onClick:t[8]||(t[8]=i=>e.toggleSortDirection())},c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])]),o("div",ZT,[o("button",xT,[t[38]||(t[38]=o("span",{class:"filter-btn-label"},"Status",-1)),e.hasHiddenStatus()?p("v-if",!0):(l(),d("span",eA,"All")),e.hasHiddenStatus()?(l(),d("span",tA,c(e.hiddenStatusCount())+" hidden",1)):p("v-if",!0)]),o("div",oA,[t[39]||(t[39]=o("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(X,null,re(e.statusKeyLabels,(i,a,u)=>(l(),d("div",sA,[N(o("input",{class:"form-check-input",type:"checkbox",id:"status-"+a},null,8,nA),[[r,{state:e.viewState,set:f=>{e.filters.status[a]=f},value:e.filters?.status[a],form:null,options:{}}]]),o("label",{class:"form-check-label",for:"status-"+a},c(i),9,rA)]))),256))])])],2)],2)],32)),[[n,e.viewState]]),p(" Result count + active filter chips "),e.loading?p("v-if",!0):(l(),d("div",iA,[o("div",aA,[o("button",{type:"button","aria-pressed":e.projectView==="all",onClick:t[10]||(t[10]=i=>e.setProjectView("all")),"aria-label":"All projects"},[...t[40]||(t[40]=[o("span",{class:"dashboard-view-long"},"All projects",-1),o("span",{class:"dashboard-view-short","aria-hidden":"true"},"All",-1)])],8,lA),o("button",{type:"button","aria-pressed":e.projectView==="attention",onClick:t[11]||(t[11]=i=>e.setProjectView("attention")),"aria-label":"Needs attention "+e.attentionCount()},[t[41]||(t[41]=o("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[42]||(t[42]=o("span",null,"attention",-1)),t[43]||(t[43]=b()),o("span",{class:A(["attention-count",{"has-attention":e.attentionCount()>0}])},c(e.attentionCount()),3)],8,dA)]),o("span",uA,[(e.dashboardTotals?.filtered??e.filteredItems?.length)===(e.dashboardTotals?.total??e.items?.length)?(l(),d("span",cA,[b(c(e.fmt?.number(e.dashboardTotals?.total??e.items?.length))+" project",1),(e.dashboardTotals?.total??e.items?.length)!==1?(l(),d("span",pA,"s")):p("v-if",!0)])):(l(),d("span",fA,c(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" of "+c(e.fmt?.number(e.dashboardTotals?.total??e.items?.length))+" shown",1))]),o("div",mA,[(l(!0),d(X,null,re(e.filters?.status,(i,a,u)=>(l(),d(X,null,[i===!1?(l(),d("button",{key:0,type:"button",class:"filter-chip",onClick:f=>e.filters.status[a]=!0,"aria-label":"Show "+e.statusKeyLabels[a]+" again",title:"Show "+e.statusKeyLabels[a]+" again"},[b(c(e.statusKeyLabels[a])+" hidden",1),t[44]||(t[44]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1))],8,hA)):p("v-if",!0)],64))),256)),e.typeFilter!=="all"?(l(),d("button",{key:0,type:"button",class:"filter-chip",onClick:t[12]||(t[12]=i=>e.typeFilter="all"),"aria-label":"Show all project types"},[b(c(e.typeFilter==="repo"?"Repositories":e.typeFilter==="pr"?"Pull requests":"Gists"),1),t[45]||(t[45]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1))])):p("v-if",!0),e.showClearFilters()?(l(),d("button",{key:1,type:"button",class:"btn-link-inline",onClick:t[13]||(t[13]=i=>e.clearFilters())},"Clear filters")):p("v-if",!0)])]))]),p(" Table "),o("div",{class:"paper-table paper-table-dashboard",role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[o("div",gA,[o("div",{role:"columnheader","aria-sort":e.isSortedBy("_label")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("_label")}]),onClick:t[14]||(t[14]=i=>e.setSort("_label"))},[t[47]||(t[47]=b(" Project ",-1)),e.isSortedBy("_label")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[46]||(t[46]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,yA),o("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("status")}]),onClick:t[15]||(t[15]=i=>e.setSort("status"))},[t[49]||(t[49]=b(" Status ",-1)),e.isSortedBy("status")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[48]||(t[48]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,bA),o("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[16]||(t[16]=i=>e.setSort("pageView"))},[t[51]||(t[51]=b(" Views ",-1)),e.isSortedBy("pageView")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[50]||(t[50]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,wA),o("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[o("button",{type:"button",class:A(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[17]||(t[17]=i=>e.setSort("options.expirationDate"))},[t[53]||(t[53]=b(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(l(),d("svg",{key:0,class:A(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[52]||(t[52]=[o("use",{href:"#project-icon-arrow"},null,-1)])],2)):p("v-if",!0)],2)],8,kA),t[54]||(t[54]=o("div",{role:"columnheader"},[o("span",{class:"sr-only"},"Actions")],-1))]),p(" Loading skeleton: keeps the layout stable while the three lists load "),(l(),d(X,null,re([1,2,3,4],(i,a)=>(l(),d(X,null,[e.loading?(l(),d("div",EA,[...t[55]||(t[55]=[o("div",{class:"cell-anon",role:"cell"},[o("span",{class:"skeleton skeleton-badge"}),o("div",{class:"anon-text"},[o("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),o("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),o("div",{class:"cell-status",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),o("div",{class:"cell-views num",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),o("div",{class:"cell-expires",role:"cell"},[o("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),o("div",{class:"cell-actions",role:"cell"},null,-1)])])):p("v-if",!0)],64))),64)),(l(!0),d(X,null,re(e.filteredItems,(i,a)=>(l(),d(X,{key:i?._type+":"+(i?._id||a)},[e.loading?p("v-if",!0):(l(),d("div",{key:0,class:A(["paper-table-row",{"repo-inactive":i?._statusKey=="expired"||i?._statusKey=="removed","repo-error":i?.status=="error","row-clickable":!!i?._viewUrl}]),role:"row",onClick:u=>e.openItem(i,u)},[o("div",_A,[o("span",{class:"project-type-icon",role:"img","aria-label":i?._type==="repo"?"Repository":i?._type==="pr"?"Pull request":"Gist",title:i?._type==="repo"?"Repository":i?._type==="pr"?"Pull request":"Gist"},[(l(),d("svg",NA,[o("use",{href:"#project-type-"+i._type},null,8,DA)]))],8,SA),o("div",RA,[o("div",TA,[i?._viewUrl?(l(),d("a",{key:0,class:"repo-name",title:i._label,textContent:c(i?._label),href:e.safeUrl(i?._viewUrl)},null,8,AA)):p("v-if",!0),i?._viewUrl?p("v-if",!0):(l(),d("span",{key:1,class:"repo-name repo-name-static",textContent:c(i?._label)},null,8,OA)),i?.role==="coauthor"?(l(),d("span",IA,"Co-author")):p("v-if",!0)]),o("div",PA,[i?._id?(l(),d("code",{key:0,class:"anonymous-id",title:i._id},c(i._id),9,VA)):p("v-if",!0),i?._type==="repo"&&i?.source?.commit?(l(),d("span",{key:1,class:"commit-hash",title:i.source.commit},c(i.source.commit.substring(0,8)),9,qA)):p("v-if",!0),i?.conference?(l(),d("span",{key:2,class:"cell-conf conf-tag",title:i?.conference},[t[56]||(t[56]=o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),t[57]||(t[57]=b()),o("span",{textContent:c(i?.conference)},null,8,LA)],8,MA)):p("v-if",!0)])])]),o("div",$A,[o("div",UA,[o("div",FA,[o("span",{class:A(["status-dot","status-"+i?._statusKey]),"aria-hidden":"true"},null,2),o("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(i?.status))},null,8,zA)]),i?.status=="error"&&i?.statusMessage?(l(),d("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(i?.statusMessage)),title:i?.statusMessage},null,8,HA)):p("v-if",!0),i?._stale?(l(),d("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(i?.anonymizeDate||i?.lastView)}," Last activity "+c(e.fmt?.humanTime(i?.anonymizeDate||i?.lastView))+" \xB7 may be stuck ",9,BA)):p("v-if",!0),i.status==="error"&&i._editUrl?(l(),d("a",{key:2,class:"project-attention-action",href:e.safeUrl(i._editUrl)},"Fix source",8,jA)):p("v-if",!0),i._stale||i._broken?(l(),d("button",{key:3,type:"button",class:"project-attention-action",onClick:me(u=>e.showProjectDetails(i),["stop"])},c(i._broken?"Review details":"Check progress"),9,GA)):p("v-if",!0),i?.status!="error"&&!i?._stale&&i?.anonymizeDate?(l(),d("div",WA," anonymized "+c(e.fmt?.humanTime(i?.anonymizeDate)),1)):p("v-if",!0)]),o("div",{class:"cell-views num",role:"cell","aria-label":e.fmt.number(i.pageView)+" views"},[t[58]||(t[58]=o("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),o("span",null,c(e.fmt.number(i.pageView)),1)],8,KA),o("div",YA,[t[59]||(t[59]=o("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),i?._expiry?.kind==="never"?(l(),d("span",JA,"Never")):p("v-if",!0),i?._expiry?.kind==="date"?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(i?._expiry?.date))},null,8,QA)):p("v-if",!0),i?._expiry?.kind==="expired"&&i?._expiry?.date?(l(),d("span",XA,"Expired "+c(e.fmt?.humanTime(i?._expiry?.date)),1)):p("v-if",!0),i?._expiry?.kind==="expired"&&!i?._expiry?.date?(l(),d("span",ZA,"Expired")):p("v-if",!0),i?._expiry?.kind==="none"?(l(),d("span",xA,"\u2014")):p("v-if",!0)])]),o("div",eO,[i._viewUrl?(l(),d("button",{key:0,type:"button",class:"copy-link-inline",onClick:me(u=>e.copyLink(i),["stop"]),disabled:!!e.copyingId,title:"Copy anonymous link for "+i._label,"aria-label":"Copy anonymous link for "+i._label},[...t[60]||(t[60]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-copy"})],-1)])],8,tO)):p("v-if",!0),i._broken?(l(),d("button",{key:1,type:"button",class:"project-details-button",onClick:me(u=>e.showProjectDetails(i),["stop"]),"data-project-actions":encodeURIComponent(i._type+":"+i._id),"aria-controls":e.projectDetailsId(i),"aria-expanded":e.selectedProject===i},"Details",8,oO)):p("v-if",!0),i?._broken?p("v-if",!0):(l(),d("div",sO,[o("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","data-project-actions":encodeURIComponent(i._type+":"+i._id),"aria-label":"Actions for "+i?._name},[...t[61]||(t[61]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-more"})],-1)])],8,nO),o("div",rO,[o("button",{type:"button",class:"dropdown-item",onClick:u=>e.showProjectDetails(i),"aria-controls":e.projectDetailsId(i),"aria-expanded":e.selectedProject===i},"Project details & name",8,iO),o("a",{class:"dropdown-item",href:e.safeUrl(i?._viewUrl)}," View ",8,aO),i?._type==="repo"&&i?.options?.page&&i?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+i?.repoId+"/")}," View page ",8,lO)):p("v-if",!0),i?._viewUrl?(l(),d("button",{key:1,type:"button",class:"dropdown-item",onClick:u=>e.copyLink(i),disabled:!!e.copyingId}," Copy anonymous link ",8,dO)):p("v-if",!0),o("a",{class:"dropdown-item",href:e.safeUrl(i?._editUrl)}," Edit ",8,uO),i?.status=="ready"||i?.status=="error"?(l(),d("button",{key:2,type:"button",class:"dropdown-item",onClick:u=>e.refreshItem(i)}," Force update ",8,cO)):p("v-if",!0),i?.status=="removed"?(l(),d("button",{key:3,type:"button",class:"dropdown-item",onClick:u=>e.refreshItem(i)}," Enable ",8,pO)):p("v-if",!0),i?.status=="expired"?(l(),d("button",{key:4,type:"button",class:"dropdown-item",onClick:u=>e.extendItem(i)}," Extend 6 months ",8,fO)):p("v-if",!0),(i?.status=="ready"||i?.status=="expired"||i?.status=="error")&&i?.role!=="coauthor"?(l(),d("div",mO,[t[62]||(t[62]=o("div",{class:"dropdown-divider"},null,-1)),o("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:u=>e.removeItem(i)}," Remove ",8,hO)])):p("v-if",!0)])]))])],10,CA)),!e.loading&&e.selectedProject===i?(l(),d("div",vO,[o("div",{class:"project-details",role:"cell","aria-colspan":"5",id:e.projectDetailsId(i),tabindex:"-1",onKeydown:Ro(me(u=>e.closeProjectDetails(i),["stop"]),["esc"])},[o("div",yO,[t[64]||(t[64]=o("h2",null,"Project details",-1)),o("button",{type:"button",class:"project-close",onClick:u=>e.closeProjectDetails(i),"aria-label":"Close project details"},[...t[63]||(t[63]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])],8,bO)]),o("dl",wO,[o("div",null,[t[65]||(t[65]=o("dt",null,"Source",-1)),o("dd",null,c(i._source||"Not available"),1)]),o("div",null,[t[66]||(t[66]=o("dt",null,"Anonymous ID",-1)),o("dd",null,[o("code",null,c(i._id||"Missing identifier"),1)])]),i.source?.commit?(l(),d("div",kO,[t[67]||(t[67]=o("dt",null,"Commit",-1)),o("dd",null,[o("code",null,c(i.source.commit),1)])])):p("v-if",!0),i.conference?(l(),d("div",EO,[t[68]||(t[68]=o("dt",null,"Conference",-1)),o("dd",null,c(i.conference),1)])):p("v-if",!0),o("div",null,[t[69]||(t[69]=o("dt",null,"Status",-1)),o("dd",null,[b(c(e.fmt.statusLabel(i.status)),1),i.statusMessage?(l(),d("span",CO," \xB7 "+c(e.fmt.statusMsg(i.statusMessage)),1)):p("v-if",!0)])]),i.anonymizeDate?(l(),d("div",_O,[t[70]||(t[70]=o("dt",null,"Last anonymized",-1)),o("dd",null,c(e.fmt.humanTime(i.anonymizeDate)),1)])):p("v-if",!0)]),i._stale?(l(),d("p",SO,"This download has not progressed recently. Check the source access and selected branch before retrying.")):p("v-if",!0),i._editUrl?(l(),d("a",{key:1,class:"project-attention-action",href:e.safeUrl(i._editUrl)},c(e.needsAttention(i)?"Check source settings":"Edit anonymization settings"),9,NO)):p("v-if",!0),i._id?(l(),d("form",{key:2,class:"project-name-form",onSubmit:me(u=>e.saveProjectName(i),["prevent"])},[o("label",{for:"project-name-"+i._type+"-"+i._id},"Project name",8,RO),o("p",{id:"project-name-help-"+i._type+"-"+i._id},"Only you see this name. Leave it blank to use the default.",8,TO),o("div",AO,[N(o("input",{class:"form-control",type:"text",id:"project-name-"+i._type+"-"+i._id,"aria-describedby":"project-name-help-"+i._type+"-"+i._id,maxlength:"100","onUpdate:modelValue":t[18]||(t[18]=u=>e.projectName=u),disabled:e.nameSaving},null,8,OO),[[Zi,e.projectName]]),o("button",{class:"btn btn-ink",type:"submit",disabled:e.nameSaving},c(e.nameSaving?"Saving\u2026":"Save name"),9,IO)]),e.nameError?(l(),d("p",PO,c(e.nameError),1)):p("v-if",!0),e.nameMessage?(l(),d("p",VO,c(e.nameMessage),1)):p("v-if",!0)],40,DO)):p("v-if",!0)],40,gO)])):p("v-if",!0)],64))),128)),!e.loading&&e.filteredItems?.length==0?(l(),d("div",qO,[t[72]||(t[72]=o("svg",{class:"project-type-svg project-empty-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1)),e.hasProjects()?p("v-if",!0):(l(),d("span",MO,"You have no anonymizations yet.")),e.hasProjects()?(l(),d("span",LO,"Nothing matches the current filters.")):p("v-if",!0),o("div",$O,[e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=i=>e.clearFilters())},"Clear filters")):p("v-if",!0),e.hasProjects()?p("v-if",!0):(l(),d("a",UO,[...t[71]||(t[71]=[o("svg",{class:"project-type-svg","aria-hidden":"true"},[o("use",{href:"#project-icon-plus"})],-1),b(" New anonymization",-1)])]))])])):p("v-if",!0)],8,vA)]),e.dashboardCursor||e.dashboardError?(l(),d("div",FO,[e.dashboardError?(l(),d("p",zO,c(e.dashboardError),1)):p("v-if",!0),e.dashboardCursor?(l(),d("button",{key:1,type:"button",class:"btn",onClick:t[20]||(t[20]=i=>e.loadMoreProjects()),disabled:e.loadingMore},c(e.loadingMore?"Loading\u2026":"Load more projects"),9,HO)):p("v-if",!0)])):p("v-if",!0)])}var BO={class:"explorer-page"},jO=["aria-label"],GO={class:"ui-icon","aria-hidden":"true"},WO=["href"],KO=["textContent"],YO={class:"leftCol-head"},JO={class:"leftCol-search"},QO={class:"tree-search-box"},XO=["href"],ZO={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},xO={class:"leftCol-project-header"},eI=["textContent"],tI={class:"project-file-count"},oI={class:"leftCol-body"},sI={key:0,class:"paper-inline-warning",role:"alert"},nI={key:1,class:"paper-inline-warning",role:"alert"},rI={class:"leftCol-foot"},iI=["title"],aI=["title"],lI=["title"],dI={key:2,class:"last-update",title:"Older repositories have no recorded publication date. The source commit date does not establish when files became available here."},uI={class:"explorer-main"},cI={class:"status-bar"},pI={class:"breadcrumb paths","aria-label":"Path"},fI=["textContent"],mI={class:"status-bar-actions"},hI=["href"],vI={class:"d-none d-md-inline"},gI={class:"ui-icon","aria-hidden":"true"},yI=["href"],bI={class:"d-none d-md-inline"},wI=["href"],kI=["href"],EI=["href"],CI=["href"],_I={class:"explorer-content"};function El(e,t){let s=We("tree"),r=We("partial-view"),n=be("field");return l(),d("div",BO,[N(o("button",{class:"sidebar-toggle",onClick:t[0]||(t[0]=i=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[(l(),d("svg",GO,[o("use",{href:e.sidebarCollapsed?"#ui-icon-folder":"#project-icon-close"},null,8,WO)])),o("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,KO)],8,jO),[[Y,e.files?.length]]),N(o("div",{class:A(["leftCol",{collapsed:e.sidebarCollapsed}])},[o("div",YO,[t[7]||(t[7]=o("span",{class:"leftCol-eyebrow"},"Files",-1)),o("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[1]||(t[1]=i=>e.sidebarCollapsed=!0)},[...t[6]||(t[6]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-close"})],-1)])])]),o("div",JO,[o("div",QO,[(l(),d("svg",{class:A(["ui-icon tree-search-icon",{"fa-spin":e.fileSearchLoading}]),"aria-hidden":"true"},[o("use",{href:e.fileSearchLoading?"#ui-icon-spinner":"#ui-icon-search"},null,8,XO)],2)),N(o("input",ZO,null,512),[[n,{state:e.viewState,set:i=>{e.fileSearchQuery=i},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),N(o("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[Y,!e.fileSearchQuery]]),N(o("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[2]||(t[2]=i=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[Y,e.fileSearchQuery]])])]),o("div",xO,[o("span",{class:"project-name",textContent:c(e.repoId)},null,8,eI),o("span",tI,c(e.fileCounts?.[""]||e.files?.length)+" files",1)]),o("div",oI,[e.options?.truncatedFolders?.length>0?(l(),d("div",sI,[t[8]||(t[8]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):p("v-if",!0),e.options?.hasSubmodules?(l(),d("div",nI,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})],-1)),b(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):p("v-if",!0),Ce(s,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])]),o("div",rI,[o("span",{class:"last-update",title:e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate},c(e.options?.sourceCommitDate?"Source commit":e.options?.anonymizedAt?"Anonymized":"Updated")+" "+c(e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),9,iI),e.options?.settingsSavedAt?(l(),d("span",{key:0,class:"last-update",title:e.options.settingsSavedAt}," Settings saved "+c(e.fmt?.date(e.options.settingsSavedAt)),9,aI)):p("v-if",!0),e.options?.publishedAt?(l(),d("span",{key:1,class:"last-update",title:e.options.publishedAt}," Snapshot ready "+c(e.fmt?.date(e.options.publishedAt)),9,lI)):p("v-if",!0),e.options?.anonymizedAt&&!e.options?.publishedAt?(l(),d("span",dI," Snapshot ready date not recorded ")):p("v-if",!0)])],2),[[Y,e.files?.length]]),N(o("div",{class:"leftCol-backdrop",onClick:t[3]||(t[3]=i=>e.sidebarCollapsed=!0)},null,512),[[Y,e.files?.length&&!e.sidebarCollapsed]]),o("div",uI,[o("div",cI,[o("ol",pI,[(l(!0),d(X,null,re(e.paths,(i,a)=>(l(),d("li",{class:"breadcrumb-item",textContent:c(i)},null,8,fI))),256))]),o("div",mI,[e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[10]||(t[10]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,hI)):p("v-if",!0),e.type=="html-doc"&&!e.showSource?(l(),d("button",{key:1,class:A(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[4]||(t[4]=i=>e.toggleAllowScripts())},[t[11]||(t[11]=o("i",{class:"fab fa-js"},null,-1)),o("span",vI,c(e.allowScripts?"JS on":"JS off"),1)],2)):p("v-if",!0),e.type=="html-doc"?(l(),d("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[5]||(t[5]=i=>e.toggleSource())},[(l(),d("svg",gI,[o("use",{href:e.showSource?"#project-icon-eye":"#ui-icon-code"},null,8,yI)])),o("span",bI,c(e.showSource?"Rendered":"Source"),1)])):p("v-if",!0),N(o("a",{target:"_self",class:"btn btn-sm","aria-label":"View raw current file",title:"View the raw content of the current file",href:e.safeUrl(e.url)},[...t[12]||(t[12]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-file"})],-1),o("span",{class:"d-none d-md-inline"}," Raw",-1)])],8,wI),[[Y,e.content!=null]]),N(o("a",{target:"_self",class:"btn btn-sm","aria-label":"Download current file",title:"Download the current file",href:e.safeUrl(e.url+"&download=true")},[...t[13]||(t[13]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-download"})],-1),o("span",{class:"d-none d-md-inline"}," Download",-1)])],8,kI),[[Y,e.content!=null]]),e.options?.download?(l(),d("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Download full repository as ZIP",title:"Download the full repository as a ZIP archive",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[14]||(t[14]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-archive"})],-1),o("span",{class:"d-none d-md-inline"}," Full repo ZIP",-1)])],8,EI)):p("v-if",!0),e.options?.hasWebsite?(l(),d("a",{key:4,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[15]||(t[15]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),o("span",{class:"d-none d-md-inline"}," Website",-1)])],8,CI)):p("v-if",!0)])]),o("div",_I,[Ce(r,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])])}var SI={class:"paper-faq"};function Cl(e,t){return l(),d("div",SI,[...t[0]||(t[0]=[ce('
Help

Answers to the questions that come up most.

If something's missing, write to us \u2014 report a bug on GitHub.

',1),o("div",{class:"paper-faq-body"},[o("aside",{class:"paper-faq-toc"},[o("div",{class:"paper-faq-toc-head"},"Contents"),o("nav",null,[o("a",{href:"#faq-general"},"General"),o("a",{href:"#faq-features"},"Features"),o("a",{href:"#faq-limitations"},"Limitations"),o("a",{href:"#faq-privacy"},"Privacy & Security"),o("a",{href:"#faq-hosting"},"Self-Hosting")])]),o("section",{class:"faq-section","aria-label":"FAQs"},[o("div",null,[p(" General "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})]),b("General ")]),o("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"false","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),o("div",{id:"whatIs",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhatIs"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub is a free, open-source tool that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information \u2014 such as the repository owner, organization name, and custom terms \u2014 so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),o("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),o("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[o("div",{class:"panel-body p-3"},[o("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix \u2014 not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),o("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[o("div",{class:"panel-body p-3"},[o("p",null,[b(" Anonymous GitHub is completely free to use. However, the server costs hundreds of dollars per year to maintain. If you find the service useful, a small donation would be greatly appreciated. You can support the project by "),o("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank"},"sponsoring on GitHub"),b(", donating through "),o("a",{href:"https://ko-fi.com/tdurieux",target:"_blank"},"Ko-fi"),b(', or by clicking the "Support me" button on the site. ')])])])])]),p(" Features "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})]),b("Features ")]),o("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),o("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[o("div",{class:"panel-body p-3"},[o("p",null," Anonymous GitHub can display and render a wide variety of file types: "),o("ul",null,[o("li",null,[o("strong",null,"Text and source code"),b(" \u2014 displayed with syntax highlighting")]),o("li",null,[o("strong",null,"Markdown"),b(" \u2014 rendered as formatted HTML")]),o("li",null,[o("strong",null,"Images"),b(" (PNG, JPG, SVG, etc.) \u2014 displayed inline")]),o("li",null,[o("strong",null,"PDFs"),b(" \u2014 rendered directly in the browser")]),o("li",null,[o("strong",null,"Jupyter Notebooks"),b(" \u2014 rendered with code cells and outputs")])]),o("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),o("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),o("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[o("div",{class:"panel-body p-3"},[o("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),o("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[o("div",{class:"panel-body p-3"},[o("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),o("ul",null,[o("li",null,[o("strong",null,"Never expire"),b(" \u2014 the anonymized repository remains accessible indefinitely.")]),o("li",null,[o("strong",null,"Redirect to GitHub"),b(" \u2014 after expiration, visitors are redirected to the original GitHub repository.")]),o("li",null,[o("strong",null,"Remove content"),b(" \u2014 after expiration, the anonymized content is deleted from the server.")])])])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),o("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),o("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. The anonymized repository tracks the source on GitHub: when you push new commits to the original repository, the anonymized view picks up those changes (cached files are refreshed against GitHub). This means you can keep iterating on the code while reviewers have the link, and you do not need to recreate the anonymized repository every time you update the source. "),o("p",null," A few practical implications worth keeping in mind: "),o("ul",null,[o("li",null," You can safely create the anonymized repository early in the writing process \u2014 later commits will be visible to reviewers without any additional action. "),o("li",null," If you rename files, add new identifiers, or introduce new contributor names after creation, revisit the anonymization options (custom terms, file filters) to make sure the new content is still properly anonymized. "),o("li",null," If the original repository is made private or deleted, the anonymized repository will no longer be able to fetch updated content. ")])])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[o("h3",{class:"panel-title"},[o("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),o("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[o("div",{class:"panel-body p-3"},[o("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),o("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[o("code",null,`npm install -g @tdurieux/anonymous_github +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 GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),o("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),b(". ")]),o("p",null," The basic steps are: "),o("ol",null,[o("li",null,"Clone the repository and install dependencies"),o("li",null,[b("Create a "),o("code",null,".env"),b(" file with your GitHub token, OAuth client ID, and client secret")]),o("li",null,[b("Run "),o("code",null,"docker-compose up -d")])])])])])]),o("div",{class:"text-center mt-5 mb-5 p-4",style:{"background-color":"var(--hover-bg-color)","border-radius":"8px"}},[o("p",{class:"mb-2",style:{"font-size":"1.1rem"}}," Still have questions? "),o("p",{class:"text-muted mb-0"},[b(" Open an issue on the "),o("a",{href:"https://github.com/tdurieux/anonymous_github/issues",target:"_blank"},"GitHub repository"),b(" and we'll be happy to help. ")])])])])],-1)])])}var NI={class:"pr-page"},DI={class:"container paper-page pr-page-inner"},RI={class:"pr-header"},TI={class:"pr-title-row"},AI={class:"paper-page-title pr-title"},OI=["textContent"],II={key:1,class:"text-muted"},PI=["href"],VI={class:"pr-header-meta"},qI={key:0,class:"pr-meta-item"},MI=["textContent"],LI={key:1,class:"pr-meta-item"},$I=["textContent"],UI={key:2,class:"pr-meta-item"},FI=["textContent"],zI={key:0,class:"paper-tabs",role:"tablist"},HI=["aria-selected","tabindex"],BI=["textContent"],jI=["aria-selected","tabindex"],GI=["textContent"],WI={class:"paper-tab-content"},KI={key:0,role:"tabpanel",id:"gist-files-panel","aria-labelledby":"gist-files-tab"},YI={class:"pr-comments"},JI={class:"pr-comment"},QI={class:"pr-comment-head"},XI=["textContent"],ZI={key:0,class:"pr-comment-date"},xI={key:0,class:"paper-table-empty"},e4={key:1,role:"tabpanel",id:"gist-comments-panel","aria-labelledby":"gist-comments-tab"},t4={class:"pr-comments"},o4={class:"pr-comment"},s4={class:"pr-comment-head"},n4={key:0,class:"pr-comment-author"},r4=["textContent"],i4=["textContent"],a4={key:0,class:"pr-comment-body"},l4={key:0,class:"paper-table-empty"};function _l(e,t){let s=We("gist-file"),r=We("markdown");return l(),d("div",NI,[o("div",DI,[t[17]||(t[17]=o("div",{class:"paper-crumbs"},[o("a",{href:"/dashboard"},"Reviewer"),b(" \xA0/\xA0 "),o("span",{class:"here"},"Gist")],-1)),o("header",RI,[o("div",TI,[o("h1",AI,[e.details?.description?(l(),d("span",{key:0,textContent:c(e.details?.description)},null,8,OI)):p("v-if",!0),e.details?.description?p("v-if",!0):(l(),d("span",II,"Untitled gist"))]),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[4]||(t[4]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,PI)):p("v-if",!0)]),o("div",VI,[o("span",{class:A(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},c(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(l(),d("span",qI,[t[5]||(t[5]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[6]||(t[6]=b(" @",-1)),o("span",{textContent:c(e.details?.ownerLogin)},null,8,MI)])):p("v-if",!0),e.details?.updatedDate?(l(),d("span",LI,[t[7]||(t[7]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=b()),o("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,$I)])):p("v-if",!0),e.details?.anonymizeDate?(l(),d("span",UI,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=b(" Anonymized ",-1)),o("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,FI)])):p("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(l(),d("nav",zI,[e.details?.files?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",id:"gist-files-tab","aria-selected":e.tabState?.active==="files","aria-controls":"gist-files-panel",tabindex:e.tabState?.active==="files"?0:-1,onKeydown:t[0]||(t[0]=n=>e.previewTabKeydown(n)),onClick:t[1]||(t[1]=n=>e.tabState.active="files")},[t[11]||(t[11]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-type-gist"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,BI)],42,HI)):p("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"gist-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"gist-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=n=>e.previewTabKeydown(n)),onClick:t[3]||(t[3]=n=>e.tabState.active="comments")},[t[12]||(t[12]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,GI)],42,jI)):p("v-if",!0)])):p("v-if",!0),o("div",WI,[e.details?.files&&e.tabState?.active=="files"?(l(),d("div",KI,[o("ul",YI,[(l(!0),d(X,null,re(e.details?.files,(n,i)=>(l(),d("li",JI,[o("div",QI,[o("strong",{textContent:c(n?.filename)},null,8,XI),n?.language?(l(),d("span",ZI,c(n?.language),1)):p("v-if",!0)]),Ce(s,{file:n},null,8,["file"])]))),256)),e.details?.files?.length?p("v-if",!0):(l(),d("li",xI,[...t[13]||(t[13]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-file"})],-1),o("span",null,"No files in this gist.",-1)])]))])])):p("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",e4,[o("ul",t4,[(l(!0),d(X,null,re(e.details?.comments,(n,i)=>(l(),d("li",o4,[o("div",s4,[n?.author?(l(),d("span",n4,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=b(" @",-1)),o("span",{textContent:c(n?.author)},null,8,r4)])):p("v-if",!0),n?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(n?.updatedDate))},null,8,i4)):p("v-if",!0)]),n?.body?(l(),d("div",a4,[Ce(r,{content:n?.body},null,8,["content"])])):p("v-if",!0)]))),256)),e.details?.comments?.length?p("v-if",!0):(l(),d("li",l4,[...t[16]||(t[16]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1),o("span",null,"No comments on this gist.",-1)])]))])])):p("v-if",!0)])])])}var d4={class:"collapse navbar-collapse",id:"navbarSupportedContent"},u4={class:"navbar-nav mr-auto smooth-scroll"},c4={key:0,class:"nav-item"},p4={key:1,class:"nav-item"},f4={key:2,class:"nav-item"},m4={key:3,class:"nav-item"},h4={class:"nav-item"},v4={key:4,class:"nav-item"},g4={class:"navbar-nav"},y4={key:0,class:"nav-item"},b4={key:1,class:"nav-item"},w4={key:2,class:"nav-item"},k4={key:3,class:"nav-item dropdown user-chip-wrap"},E4={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},C4=["src"],_4={class:"user-chip-name"},S4={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},N4={class:"dropdown-header"},D4=["innerHTML"];function Sl(e,t){return l(),d(X,null,[o("nav",{class:A(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[13]||(t[13]=ce('Anonymous GitHubSupport',3)),o("div",d4,[o("ul",u4,[e.user?p("v-if",!0):(l(),d("li",c4,[o("a",{class:A(["nav-link",{active:e.path=="/"}]),href:"/"}," Home ",2)])),e.user?(l(),d("li",p4,[o("a",{class:A(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[2]||(t[2]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-grid"})],-1),b(" My work ",-1)])],2)])):p("v-if",!0),e.user?(l(),d("li",f4,[o("a",{class:A(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[3]||(t[3]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1),b(" Anonymize ",-1)])],2)])):p("v-if",!0),e.user?(l(),d("li",m4,[o("a",{class:A(["nav-link",{active:e.path=="/conferences"}]),href:"/conferences"},[...t[4]||(t[4]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1),b(" Conferences ",-1)])],2)])):p("v-if",!0),o("li",h4,[o("a",{class:A(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[5]||(t[5]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-help"})],-1),b("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(l(),d("li",v4,[o("a",{class:A(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[6]||(t[6]=[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-filter"})],-1),b(" Admin ",-1)])],2)])):p("v-if",!0)]),o("ul",g4,[t[11]||(t[11]=o("li",{class:"nav-item"},[o("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[o("i",{class:"fab fa-github","aria-hidden":"true"})])],-1)),p(` "Report a bug" is about this service. Reviewers who land on an anonymized repository often think it is about the paper, so the - label names the service and the tooltip says who to contact. `),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"})]),y("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",e4,[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]=he(n=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",t4,[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]=he(n=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),e.user?p("v-if",!0):(l(),d("li",o4,[...t[9]||(t[9]=[o("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[o("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",s4,[o("a",n4,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,r4)):p("v-if",!0),o("span",i4,c(e.user?.username),1)]),o("div",a4,[o("h6",l4,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=ce('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource codeSupport the projectSign out',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,d4)):p("v-if",!0)],64)}var u4={class:"paper-landing"},c4={class:"paper-hero"},p4={class:"paper-hero-copy"},f4={class:"paper-cta-row"},h4={key:0,href:"/signin",target:"_self",class:"btn-hero"},m4={key:1,href:"/anonymize",class:"btn-hero"},v4={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},g4={class:"paper-stats-grid"},y4={class:"paper-stat-value"},b4={class:"paper-stat-label"},w4=["viewBox"],k4=["x","y","width","height"],E4={key:1,class:"paper-stat-delta"},C4={class:"paper-features paper-wrap","aria-label":"Product features"},_4={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},S4=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],N4={class:"paper-eyebrow"},D4={class:"paper-feature-title"},R4={class:"paper-feature-more"},T4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},A4=["href","target"],O4={class:"paper-features-stage"},I4=["id","aria-labelledby"],P4={class:"paper-frame"},V4={class:"paper-frame-bar","aria-hidden":"true"},q4={class:"url"},M4=["src","alt"],$4={class:"paper-footer"},L4={class:"paper-footer-inner"},U4={class:"paper-footer-col"},F4={key:0,href:"/dashboard"},z4={key:1,href:"/conferences"},H4={class:"paper-footer-foot"};function El(e,t){return l(),d("div",u4,[p(" Hero: copy on the left, the product on the right "),o("section",c4,[o("div",p4,[t[2]||(t[2]=o("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=o("h1",{class:"hero-title"},[y(" Share the code,"),o("br"),o("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=o("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist. It redacts the terms you choose in text files, so reviewers can browse your artifact through an anonymous link. ",-1)),o("div",f4,[e.user?p("v-if",!0):(l(),d("a",h4,[...t[0]||(t[0]=[o("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",m4," Anonymize a repository \u2192 ")):p("v-if",!0),t[1]||(t[1]=o("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[5]||(t[5]=o("ul",{class:"paper-reassure"},[o("li",null,"Free and open source"),o("li",null,"Read-only: never writes to your repos"),o("li",null,"Expires on the date you set")],-1))]),t[6]||(t[6]=ce('
A reviewer preview with the author, affiliation, and email replaced by anonymous terms
',1))]),p(" Proof "),t[16]||(t[16]=ce('
Trusted by authors at
ICSEFSEOOPSLA
',1)),p(" Live stats "),o("section",v4,[t[7]||(t[7]=o("div",{class:"paper-stats-meta"},[o("div",{class:"paper-stats-meta-left"},"Live \xB7 last 60 days"),o("div",{class:"paper-stats-meta-right"},[o("span",{class:"paper-stats-dot","aria-hidden":"true"}),y(" updated daily ")])],-1)),o("div",g4,[(l(!0),d(X,null,ae(e.cards,(n,r)=>(l(),d("div",{class:"paper-stat-card",key:n?.key},[o("div",y4,c(e.fmt?.bigNum(n?.total)),1),o("div",b4,c(n?.label),1),e.history[n?.key].bars?.length>1?(l(),d("svg",{key:0,class:"paper-stat-bars",preserveAspectRatio:"none","aria-hidden":"true",viewBox:"0 0 "+e.history[n?.key].viewW+" 36"},[(l(!0),d(X,null,ae(e.history[n?.key].bars,(s,i)=>(l(),d("rect",{key:i,class:A({"is-latest":i===e.history[n.key].bars.length-1}),x:s?.x,y:s?.y,width:s?.w,height:s?.h},null,10,k4))),128))],8,w4)):p("v-if",!0),e.history[n?.key].bars?.length>1?(l(),d("div",E4," +"+c(e.fmt?.number(e.history[n?.key].deltaToday))+" today ",1)):p("v-if",!0)]))),128))])]),p(" Before / after "),t[17]||(t[17]=o("section",{class:"paper-section-head paper-wrap"},[o("div",null,[o("div",{class:"paper-eyebrow"},"Before \xB7 after"),o("h2",null,[y("The same repository, "),o("em",null,"minus you.")])]),o("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),t[18]||(t[18]=o("div",{class:"paper-preview paper-wrap","aria-label":"Before and after example"},[o("div",{class:"pane"},[o("div",{class:"pane-header"},[o("span",{class:"pane-label"},"Before \xB7 your repo"),o("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")]),o("div",{class:"pane-body"},[o("div",null,[o("span",{class:"tok"},"#"),y(),o("strong",null,"DeepLearnUtils")]),o("div",null,"Developed by Jane Smith at MIT CSAIL."),o("div",null,"See Smith et\xA0al., \u201CAttention That Works,\u201D 2026."),o("div",null,"Contact: jane.smith@mit.edu")])]),o("div",{class:"pane"},[o("div",{class:"pane-header"},[o("span",{class:"pane-label"},"After \xB7 anonymous mirror"),o("span",{class:"pane-url"},"anonymous.4open.science/r/paper-7f2a")]),o("div",{class:"pane-body"},[o("div",null,[o("span",{class:"tok"},"#"),y(),o("strong",null,"DeepLearnUtils")]),o("div",null,[y("Developed by "),o("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" at "),o("span",{class:"redact",role:"img","aria-label":"redacted affiliation"},"XXXX-2"),y(".")]),o("div",null,[y("See "),o("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" et\xA0al., \u201CAttention That Works,\u201D 2026.")]),o("div",null,[y("Contact: "),o("span",{class:"redact",role:"img","aria-label":"redacted email address"},"XXXX-3")])])])],-1)),p(" What you get: one screenshot, three tabs "),t[19]||(t[19]=o("section",{class:"paper-section-head paper-wrap",id:"about"},[o("div",null,[o("div",{class:"paper-eyebrow"},"What you get"),o("h2",null,[y("Anonymize, review, "),o("em",null,"manage.")])]),o("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),o("section",C4,[o("div",_4,[(l(!0),d(X,null,ae(e.features,(n,r)=>(l(),d("div",{class:A(["paper-feature",{"is-on":e.feature===n?.key}]),key:n?.key},[o("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:s=>e.selectFeature(n.key),onKeydown:s=>e.featureKeydown(s,r),id:"feature-tab-"+n?.key,"aria-controls":"feature-panel-"+n?.key,"aria-selected":e.feature===n?.key,tabindex:e.feature===n?.key?0:-1},[o("span",N4,c(n?.num)+" \xB7 "+c(n?.eyebrow),1),o("span",D4,[y(c(n?.title)+" ",1),o("em",null,c(n?.accent),1)])],40,S4),o("div",R4,[o("span",T4,[y(c(n?.title)+" ",1),o("em",null,c(n?.accent),1)]),o("p",null,c(n?.text),1),o("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(n)),target:e.featureTarget(n)},c(n?.cta)+" \u2192",9,A4)])],2))),128))]),o("div",O4,[(l(!0),d(X,null,ae(e.features,(n,r)=>N((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:n?.key,id:"feature-panel-"+n?.key,"aria-labelledby":"feature-tab-"+n?.key},[o("div",P4,[o("div",V4,[t[8]||(t[8]=o("span",{class:"dots"},[o("i"),o("i"),o("i")],-1)),o("span",q4,c(n?.url),1)]),o("div",{class:A("paper-crop paper-crop-"+n?.key)},[o("img",{loading:"lazy",width:"2880",height:"1800",src:e.safeUrl(n?.img),alt:n?.alt},null,8,M4)],2)])],8,I4)),[[Y,e.feature===n?.key]])),128))])]),p(" FAQ teaser "),t[20]||(t[20]=ce('
Before you sign in

The questions that come up most.

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

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

Which file formats are supported?

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

What happens when an anonymized repository expires?

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

',1)),o("footer",$4,[o("div",L4,[t[12]||(t[12]=o("div",{class:"paper-footer-brand"},[o("div",{class:"paper-footer-mark"},[y("Anonymous "),o("em",null,"GitHub")]),o("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),o("div",U4,[t[9]||(t[9]=o("div",{class:"paper-footer-head"},"Product",-1)),t[10]||(t[10]=o("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",F4,"My work")):p("v-if",!0),e.user?(l(),d("a",z4,"Conferences")):p("v-if",!0),t[11]||(t[11]=o("a",{href:"/faq"},"FAQ",-1))]),t[13]||(t[13]=ce('',2))]),t[15]||(t[15]=o("div",{class:"paper-footer-rule"},null,-1)),o("div",H4,[o("span",null,"\xA9 "+c(e.year||2026)+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[14]||(t[14]=o("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var j4={class:"paper-empty"},B4={class:"paper-empty-inner"},G4={key:0,class:"paper-eyebrow"},W4={key:1,class:"paper-eyebrow"},K4={key:2,class:"paper-empty-title"},Y4=["textContent"];function Cl(e,t){return l(),d("div",j4,[o("div",B4,[e.error?p("v-if",!0):(l(),d("div",G4,"Working")),e.error?(l(),d("div",W4,"Error")):p("v-if",!0),e.error?p("v-if",!0):(l(),d("h1",K4,[...t[0]||(t[0]=[y(" Loading",-1),o("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,Y4)):p("v-if",!0)])])}var J4={class:"container paper-page paper-settings"},Q4={class:"paper-crumbs"},X4={class:"here"},Z4={class:"paper-page-title"},x4={class:"paper-settings-body"},e3={class:"paper-settings-toc"},t3={href:"#conf-billing"},o3={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},s3={id:"conf-basics",class:"paper-settings-section"},n3={class:"form-group"},r3={class:"invalid-feedback"},i3={class:"invalid-feedback"},a3={class:"form-group"},l3={class:"invalid-feedback"},d3={class:"form-group"},u3={class:"invalid-feedback"},c3={class:"invalid-feedback"},p3={id:"conf-window",class:"paper-settings-section"},f3={class:"form-grid-2"},h3={class:"form-group"},m3={class:"invalid-feedback"},v3={class:"invalid-feedback"},g3={class:"form-group"},y3={class:"invalid-feedback"},b3={class:"invalid-feedback"},w3={id:"conf-rendering",class:"paper-settings-section"},k3={class:"form-check"},E3={class:"form-check-input",type:"checkbox",id:"link",name:"link"},C3={class:"form-check"},_3={class:"form-check-input",type:"checkbox",id:"image",name:"image"},S3={class:"form-check"},N3={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},D3={class:"form-check"},R3={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},T3={id:"conf-features",class:"paper-settings-section"},A3={class:"form-check"},O3={class:"form-check-input",type:"checkbox",id:"update",name:"update"},I3={class:"form-check"},P3={class:"form-check-input",type:"checkbox",id:"page",name:"page"},V3={id:"conf-plan",class:"paper-settings-section"},q3={class:"paper-plan-grid"},M3=["value"],$3=["textContent"],L3={class:"paper-plan-price"},U3=["innerHTML"],F3={key:0,id:"conf-billing",class:"paper-settings-section"},z3={class:"form-group"},H3={class:"form-group"},j3={class:"form-group"},B3={class:"form-group"},G3={class:"form-grid-3"},W3={class:"form-group"},K3={class:"form-group"},Y3={class:"form-group"},J3={class:"form-group"},Q3={class:"paper-settings-footer"},X3=["textContent"],Z3=["textContent"],x3=["disabled"];function _l(e,t){let n=ye("paper-scrollspy"),r=ye("field"),s=ye("form");return l(),d("div",J4,[o("div",Q4,[t[1]||(t[1]=o("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=y(" \xA0/\xA0 ",-1)),t[3]||(t[3]=o("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=y(" \xA0/\xA0 ",-1)),o("span",X4,c(e.editionMode?"Edit":"New"),1)]),o("h1",Z4,[y(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=o("em",null,"conference",-1))]),t[42]||(t[42]=o("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue, and lift author quotas during the review window. ",-1)),o("div",x4,[N((l(),d("aside",e3,[t[7]||(t[7]=o("div",{class:"paper-settings-toc-head"},"On this page",-1)),o("nav",null,[t[6]||(t[6]=ce('BasicsReview windowRendering defaultsFeaturesPlan',5)),N(o("a",t3,"Billing",512),[[Y,e.plan?.pricePerRepo>0]])])])),[[n]]),N((l(),d("form",o3,[o("section",s3,[t[12]||(t[12]=o("div",{class:"paper-section-eyebrow"},"Basics",-1)),o("div",n3,[t[8]||(t[8]=o("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[r,{state:e.viewState,set:i=>{e.options.name=i},value:e.options?.name,form:"conference",options:{}}]]),N(o("div",r3," The name of the conference is invalid. ",512),[[Y,e.conference?.name?.errors?.invalid]]),N(o("div",i3," The name of the conference is required. ",512),[[Y,e.conference?.name?.errors?.required]])]),o("div",a3,[t[9]||(t[9]=o("label",{class:"paper-field-label",for:"url"},"Website",-1)),N(o("input",{type:"url",class:A(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.url=i},value:e.options?.url,form:"conference",options:{}}]]),N(o("div",l3," The url of the conference is invalid. ",512),[[Y,e.conference?.url?.errors?.url]])]),o("div",d3,[t[10]||(t[10]=o("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[r,{state:e.viewState,set:i=>{e.options.conferenceID=i},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=o("small",{class:"form-text text-muted"},[y("3\u201310 characters, letters, numbers, "),o("code",null,"-"),y(" and "),o("code",null,"_"),y(". Authors reference this when they anonymize.")],-1)),N(o("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[Y,e.conference?.conferenceID?.errors?.used]]),N(o("div",u3," The conference ID is required. ",512),[[Y,e.conference?.conferenceID?.errors?.required]]),N(o("div",c3," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[Y,e.conference?.conferenceID?.errors?.pattern]])])]),o("section",p3,[t[17]||(t[17]=o("div",{class:"paper-section-eyebrow"},"Review window",-1)),o("div",f3,[o("div",h3,[t[13]||(t[13]=o("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),N(o("input",{type:"date",class:A(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.startDate=i},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=o("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),N(o("div",m3," Start date is required. ",512),[[Y,e.conference?.startDate?.errors?.required]]),N(o("div",v3," Start date must be before end date. ",512),[[Y,e.conference?.startDate?.errors?.invalid]])]),o("div",g3,[t[15]||(t[15]=o("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),N(o("input",{type:"date",class:A(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.endDate=i},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),N(o("div",y3," End date is required. ",512),[[Y,e.conference?.endDate?.errors?.required]]),N(o("div",b3," End date is invalid. ",512),[[Y,e.conference?.endDate?.errors?.invalid]])])])]),o("section",w3,[t[25]||(t[25]=o("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),o("div",k3,[N(o("input",E3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.link=i},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=o("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),o("div",C3,[N(o("input",_3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.image=i},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=o("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),o("div",S3,[N(o("input",N3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.pdf=i},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=o("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),o("div",D3,[N(o("input",R3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.notebook=i},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=o("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))])]),o("section",T3,[t[30]||(t[30]=o("div",{class:"paper-section-eyebrow"},"Features",-1)),o("div",A3,[N(o("input",O3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.update=i},value:e.options?.options?.update,form:"conference",options:{}}]]),t[26]||(t[26]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[27]||(t[27]=o("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),o("div",I3,[N(o("input",P3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.page=i},value:e.options?.options?.page,form:"conference",options:{}}]]),t[28]||(t[28]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[29]||(t[29]=o("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),o("section",V3,[t[32]||(t[32]=o("div",{class:"paper-section-eyebrow"},"Plan",-1)),t[33]||(t[33]=o("p",{class:"paper-section-copy"},"Billed per repository per month, prorated by the day for as long as a repository stays in the conference.",-1)),o("div",q3,[(l(!0),d(X,null,ae(e.plans,(i,a)=>(l(),d("label",{class:A(["paper-plan-card",{selected:e.options?.plan?.planID==i?.id}])},[N(o("input",{type:"radio",name:"planPicker",value:i?.id},null,8,M3),[[r,{state:e.viewState,set:u=>{e.options.plan.planID=u},value:e.options?.plan?.planID,form:"conference",options:{}}]]),o("div",{class:"paper-plan-head",textContent:c(i?.name)},null,8,$3),o("div",L3,[y(c(e.fmt?.number(i?.pricePerRepo))+"\u20AC ",1),t[31]||(t[31]=o("span",{class:"paper-plan-per"},"/ repo / month",-1))]),o("div",{class:"paper-plan-desc",innerHTML:e.sanitize(i?.description)},null,8,U3)],2))),256))])]),e.plan?.pricePerRepo>0?(l(),d("section",F3,[t[41]||(t[41]=o("div",{class:"paper-section-eyebrow"},"Billing",-1)),o("div",z3,[t[34]||(t[34]=o("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.name=i},value:e.options?.billing?.name,form:"conference",options:{}}]])]),o("div",H3,[t[35]||(t[35]=o("label",{class:"paper-field-label",for:"email"},"Email",-1)),N(o("input",{type:"email",class:A(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.email=i},value:e.options?.billing?.email,form:"conference",options:{}}]])]),o("div",j3,[t[36]||(t[36]=o("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address=i},value:e.options?.billing?.address,form:"conference",options:{}}]])]),o("div",B3,[N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address2=i},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),o("div",G3,[o("div",W3,[t[37]||(t[37]=o("label",{class:"paper-field-label",for:"city"},"City",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.city=i},value:e.options?.billing?.city,form:"conference",options:{}}]])]),o("div",K3,[t[38]||(t[38]=o("label",{class:"paper-field-label",for:"country"},"Country",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.country=i},value:e.options?.billing?.country,form:"conference",options:{}}]])]),o("div",Y3,[t[39]||(t[39]=o("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.zip=i},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),o("div",J3,[t[40]||(t[40]=o("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.vat=i},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):p("v-if",!0),o("div",Q3,[e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,X3)):p("v-if",!0),e.message?(l(),d("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,Z3)):p("v-if",!0),o("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=he(i=>e.submitForm(i,()=>{e.submit(i)}),["prevent"]))},c(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,x3)])])),[[s,e.viewState]])])])}var eP={key:0},tP=["innerHTML"],oP={key:3},sP=["src"],nP=["src"],rP={key:7},iP={controls:"controls"},aP=["src"],lP={key:8},dP={key:9,class:"file-error container d-flex h-100"},uP={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},cP={class:"paper-error-msg"},pP={key:10,class:"file-error container d-flex h-100"},fP=["textContent"],hP={key:11,class:"file-error container d-flex h-100"},mP={key:12,class:"file-error container d-flex h-100"},vP={key:13,class:"file-error container d-flex h-100"},gP={key:14,class:"file-error container d-flex h-100"},yP={class:"paper-empty-title m-auto"},bP=["href"];function Sl(e,t){let n=We("html-doc"),r=We("pdfviewer"),s=We("notebook"),i=ye("code-editor");return l(),d(X,null,[e.type=="text"?N((l(),d("div",eP,null,512)),[[i,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="html"?(l(),d("div",{key:1,class:"file-content markdown-body",innerHTML:e.sanitize(e.content)},null,8,tP)):p("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),qt(n,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):p("v-if",!0),(e.type=="code"||e.type=="html-doc"&&e.showSource)&&e.content!=null?N((l(),d("div",oP,null,512)),[[i,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="image"?(l(),d("img",{key:4,class:"image-content",src:e.safeUrl(e.url)},null,8,sP)):p("v-if",!0),e.type=="media"?(l(),d("iframe",{key:5,class:"h-100 overflow-auto w-100 b-0",src:e.safeUrl(e.url)},null,8,nP)):p("v-if",!0),e.type=="pdf"?(l(),qt(r,{key:6,src:e.safeUrl(e.url)},null,8,["src"])):p("v-if",!0),e.type=="audio"?(l(),d("div",rP,[o("audio",iP,[o("source",{src:e.safeUrl(e.url)},null,8,aP)])])):p("v-if",!0),e.type=="IPython"?(l(),d("div",lP,[Ce(s,{file:e.url,content:e.content},null,8,["file","content"])])):p("v-if",!0),e.type=="rate_limited"?(l(),d("div",dP,[o("div",uP,[t[2]||(t[2]=ce('
Temporarily paused
GitHub API rate limit reached
',1)),o("p",cP,[t[0]||(t[0]=y("This repository will be available in ",-1)),o("strong",null,c(e.rateLimitCountdown),1),t[1]||(t[1]=y(". The page will reload automatically.",-1))])])])):p("v-if",!0),e.type=="error"?(l(),d("div",pP,[o("h1",{class:"paper-empty-title m-auto",textContent:c(e.fmt.translate("ERRORS."+e.content))},null,8,fP)])):p("v-if",!0),e.type=="loading"&&!e.error?(l(),d("div",hP,[...t[3]||(t[3]=[o("h1",{class:"paper-empty-title m-auto"},"Loading\u2026",-1)])])):p("v-if",!0),e.type=="empty"?(l(),d("div",mP,[...t[4]||(t[4]=[o("h1",{class:"paper-empty-title m-auto"},[y("Empty "),o("em",null,"repository"),y(".")],-1)])])):p("v-if",!0),e.content==null&&e.type!="empty"?(l(),d("div",vP,[...t[5]||(t[5]=[o("h1",{class:"paper-empty-title m-auto"},[y("Empty "),o("em",null,"file"),y(".")],-1)])])):p("v-if",!0),e.type=="binary"?(l(),d("div",gP,[o("h1",yP,[t[6]||(t[6]=y("Unsupported ",-1)),t[7]||(t[7]=o("em",null,"binary file",-1)),t[8]||(t[8]=y(". You can ",-1)),o("a",{target:"_blank",href:e.safeUrl(e.url+"&download=true")},"download it",8,bP),t[9]||(t[9]=y(".",-1))])])):p("v-if",!0)],64)}var wP={class:"container page dashboard-page paper-page"},kP={class:"row"},EP={class:"w-100"},CP={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},_P={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},SP={class:"flex-grow-1"},NP={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},DP={class:"d-flex flex-wrap",style:{gap:"6px"}},RP={class:"dropdown"},TP={class:"dropdown-menu","aria-labelledby":"dropdownSort"},AP={class:"form-check dropdown-item"},OP={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},IP={class:"form-check dropdown-item"},PP={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},VP={class:"form-check dropdown-item"},qP={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},MP={class:"form-check dropdown-item"},$P={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},LP={class:"form-check dropdown-item"},UP={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},FP={class:"dropdown"},zP={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},HP={class:"form-check dropdown-item"},jP={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},BP={class:"form-check dropdown-item"},GP={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},WP={class:"form-check dropdown-item"},KP={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},YP={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},JP={class:"filter-chip"},QP=["onClick"],XP={class:"repo-list w-100"},ZP={class:"repo-list-item-content"},xP={class:"repo-list-item-main"},eV={class:"repo-list-item-header"},tV=["textContent","href"],oV=["textContent"],sV=["textContent"],nV={class:"repo-source"},rV=["href"],iV={class:"repo-date"},aV={class:"repo-meta"},lV={key:0,title:"Conference"},dV=["title"],uV=["title"],cV=["title"],pV={key:1},fV={class:"repo-list-item-actions"},hV={class:"dropdown"},mV={class:"dropdown-menu dropdown-menu-right"},vV=["href"],gV=["onClick"],yV=["onClick"],bV=["onClick"],wV=["href"],kV={key:0,class:"repo-list-empty"};function Nl(e,t){let n=ye("field"),r=ye("form");return l(),d("div",wP,[o("div",kP,[o("div",EP,[t[12]||(t[12]=ce('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

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

',2)),p(" Search + filters row "),N((l(),d("form",CP,[o("div",_P,[o("div",SP,[N(o("input",NP,null,512),[[n,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),o("div",DP,[o("div",RP,[t[6]||(t[6]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),o("div",TP,[t[5]||(t[5]=o("h6",{class:"dropdown-header"},"Select order",-1)),o("div",AP,[N(o("input",OP,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=o("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),o("div",IP,[N(o("input",PP,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=o("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),o("div",VP,[N(o("input",qP,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),o("div",MP,[N(o("input",$P,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=o("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),o("div",LP,[N(o("input",UP,null,512),[[n,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=o("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),o("div",FP,[t[11]||(t[11]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),o("div",zP,[t[10]||(t[10]=o("h6",{class:"dropdown-header"},"Select status",-1)),o("div",HP,[N(o("input",jP,null,512),[[n,{state:e.viewState,set:s=>{e.filters.status.ready=s},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=o("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),o("div",BP,[N(o("input",GP,null,512),[[n,{state:e.viewState,set:s=>{e.filters.status.expired=s},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=o("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),o("div",WP,[N(o("input",KP,null,512),[[n,{state:e.viewState,set:s=>{e.filters.status.removed=s},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=o("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[r,e.viewState]]),p(" Active filter chips "),N(o("div",YP,[(l(!0),d(X,null,ae(e.filters?.status,(s,i,a)=>N((l(),d("span",JP,[y(c(e.fmt?.title(i))+" ",1),o("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:u=>{e.filters.status[i]=!0}}," \xD7 ",8,QP)],512)),[[Y,!s]])),256))],512),[[Y,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),p(" Pull request list "),o("ul",XP,[(l(!0),d(X,null,ae(e.filteredPullRequests,(s,i)=>(l(),d("li",{class:A(["repo-list-item",{"repo-inactive":s?.status=="expired"||s?.status=="removed"||s?.status=="error"}])},[o("div",ZP,[o("div",xP,[o("div",eV,[o("a",{class:"repo-name",textContent:c(s?.pullRequestId),href:e.safeUrl("/pr/"+s?.pullRequestId)},null,8,tV),o("span",{class:A(["status-badge",{"status-removed":s?.status=="removed"||s?.status=="expired"||s?.status=="removing"||s?.status=="expiring","status-preparing":s?.status=="preparing"||s?.status=="download","status-ready":s?.status=="ready","status-error":s?.status=="error"}])},[o("span",{textContent:c(e.fmt?.title(s?.status))},null,8,oV),s?.status=="error"?(l(),d("span",{key:0,textContent:c(": "+s?.statusMessage)},null,8,sV)):p("v-if",!0)],2)]),o("div",nV,[o("span",null,[t[13]||(t[13]=o("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),o("a",{href:e.safeUrl("https://github.com/"+s?.source?.repositoryFullName+"/pull/"+s?.source?.pullRequestId)},c(s?.source?.repositoryFullName)+"#"+c(s?.source?.pullRequestId),9,rV)]),o("span",{class:A(["status-badge",{"status-ready":s?.merged,"status-removed":s?.state=="open","status-error":s?.state=="closed"&&!s?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(s?.merged?"merged":s?.state)),3),o("span",iV,"anonymized "+c(e.fmt?.humanTime(s?.anonymizeDate)),1)])]),o("div",aV,[s?.conference?(l(),d("span",lV,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),y(" "+c(s?.conference),1)])):p("v-if",!0),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+s?.options?.terms?.join(", ")},[t[15]||(t[15]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),y(" "+c(e.fmt?.number(s?.options?.terms?.length)),1)],8,dV),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(s?.pageView)},[t[16]||(t[16]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),y(" "+c(e.fmt?.number(s?.pageView)),1)],8,uV),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(s?.lastView)},[t[17]||(t[17]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-calendar"})],-1)),y(" "+c(e.fmt?.humanTime(s?.lastView)),1)],8,cV),s?.options?.expirationMode!="never"&&s?.status=="ready"?(l(),d("span",pV,[t[18]||(t[18]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),y(" Expire: "+c(e.fmt?.humanTime(s?.options?.expirationDate)),1)])):p("v-if",!0)])]),o("div",fV,[o("div",hV,[t[24]||(t[24]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),o("div",mV,[o("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+s?.pullRequestId)},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit ",-1)])],8,vV),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updatePullRequest(s),["prevent"])},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),y(" Force update ",-1)])],8,gV),[[Y,s?.status=="ready"||s?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.updatePullRequest(s),["prevent"])},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),y(" Enable ",-1)])],8,yV),[[Y,s?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:he(a=>e.removePullRequest(s),["prevent"])},[...t[22]||(t[22]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),y(" Remove ",-1)])],8,bV),[[Y,s?.status=="ready"]]),o("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+s?.pullRequestId+"/")},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" View PR ",-1)])],8,wV)])])])],2))),256)),e.filteredPullRequests?.length==0?(l(),d("li",kV,[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No pull requests to display.",-1)])])):p("v-if",!0)])])])}var EV={class:"container paper-page paper-settings"},CV={class:"paper-settings-body"},_V={class:"paper-settings-toc"},SV={class:"paper-settings-main"},NV={id:"settings-quota",class:"paper-settings-section"},DV={key:1,class:"quota-row","aria-hidden":"true"},RV={class:"quota-item"},TV={id:"settings-terms",class:"paper-settings-section"},AV={class:"form-group"},OV={class:"form-control",id:"terms",name:"terms",rows:"4",placeholder:`Jane Smith + 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",y4,[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[7]||(t[7]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",b4,[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[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),e.user?p("v-if",!0):(l(),d("li",w4,[...t[9]||(t[9]=[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)])])),e.user?(l(),d("li",k4,[o("a",E4,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,C4)):p("v-if",!0),o("span",_4,c(e.user?.username),1)]),o("div",S4,[o("h6",N4,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=ce('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource codeSupport the projectSign out',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,D4)):p("v-if",!0)],64)}var R4={class:"paper-landing"},T4={class:"paper-hero"},A4={class:"paper-hero-copy"},O4={class:"paper-cta-row"},I4={key:0,href:"/signin",target:"_self",class:"btn-hero"},P4={key:1,href:"/anonymize",class:"btn-hero"},V4={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},q4={class:"paper-stats-grid"},M4={class:"paper-stat-value"},L4={class:"paper-stat-label"},$4=["viewBox"],U4=["x","y","width","height"],F4={key:1,class:"paper-stat-delta"},z4={class:"paper-features paper-wrap","aria-label":"Product features"},H4={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},B4=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],j4={class:"paper-eyebrow"},G4={class:"paper-feature-title"},W4={class:"paper-feature-more"},K4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},Y4=["href","target"],J4={class:"paper-features-stage"},Q4=["id","aria-labelledby"],X4={class:"paper-frame"},Z4={class:"paper-frame-bar","aria-hidden":"true"},x4={class:"url"},e3=["src","alt"],t3={class:"paper-footer"},o3={class:"paper-footer-inner"},s3={class:"paper-footer-col"},n3={key:0,href:"/dashboard"},r3={key:1,href:"/conferences"},i3={class:"paper-footer-foot"};function Nl(e,t){return l(),d("div",R4,[p(" Hero: copy on the left, the product on the right "),o("section",T4,[o("div",A4,[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",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist. It redacts the terms you choose in text files, so reviewers can browse your artifact through an anonymous link. ",-1)),o("div",O4,[e.user?p("v-if",!0):(l(),d("a",I4,[...t[0]||(t[0]=[o("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),b("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",P4," Anonymize a repository \u2192 ")):p("v-if",!0),t[1]||(t[1]=o("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[5]||(t[5]=o("ul",{class:"paper-reassure"},[o("li",null,"Free and open source"),o("li",null,"Read-only: never writes to your repos"),o("li",null,"Expires on the date you set")],-1))]),t[6]||(t[6]=ce('
A reviewer preview with the author, affiliation, and email replaced by anonymous terms
',1))]),p(" Proof "),t[16]||(t[16]=ce('
Trusted by authors at
ICSEFSEOOPSLA
',1)),p(" Live stats "),o("section",V4,[t[7]||(t[7]=o("div",{class:"paper-stats-meta"},[o("div",{class:"paper-stats-meta-left"},"Live \xB7 last 60 days"),o("div",{class:"paper-stats-meta-right"},[o("span",{class:"paper-stats-dot","aria-hidden":"true"}),b(" updated daily ")])],-1)),o("div",q4,[(l(!0),d(X,null,re(e.cards,(s,r)=>(l(),d("div",{class:"paper-stat-card",key:s?.key},[o("div",M4,c(e.fmt?.bigNum(s?.total)),1),o("div",L4,c(s?.label),1),e.history[s?.key].bars?.length>1?(l(),d("svg",{key:0,class:"paper-stat-bars",preserveAspectRatio:"none","aria-hidden":"true",viewBox:"0 0 "+e.history[s?.key].viewW+" 36"},[(l(!0),d(X,null,re(e.history[s?.key].bars,(n,i)=>(l(),d("rect",{key:i,class:A({"is-latest":i===e.history[s.key].bars.length-1}),x:n?.x,y:n?.y,width:n?.w,height:n?.h},null,10,U4))),128))],8,$4)):p("v-if",!0),e.history[s?.key].bars?.length>1?(l(),d("div",F4," +"+c(e.fmt?.number(e.history[s?.key].deltaToday))+" today ",1)):p("v-if",!0)]))),128))])]),p(" Before / after "),t[17]||(t[17]=o("section",{class:"paper-section-head paper-wrap"},[o("div",null,[o("div",{class:"paper-eyebrow"},"Before \xB7 after"),o("h2",null,[b("The same repository, "),o("em",null,"minus you.")])]),o("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),t[18]||(t[18]=o("div",{class:"paper-preview paper-wrap","aria-label":"Before and after example"},[o("div",{class:"pane"},[o("div",{class:"pane-header"},[o("span",{class:"pane-label"},"Before \xB7 your repo"),o("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")]),o("div",{class:"pane-body"},[o("div",null,[o("span",{class:"tok"},"#"),b(),o("strong",null,"DeepLearnUtils")]),o("div",null,"Developed by Jane Smith at MIT CSAIL."),o("div",null,"See Smith et\xA0al., \u201CAttention That Works,\u201D 2026."),o("div",null,"Contact: jane.smith@mit.edu")])]),o("div",{class:"pane"},[o("div",{class:"pane-header"},[o("span",{class:"pane-label"},"After \xB7 anonymous mirror"),o("span",{class:"pane-url"},"anonymous.4open.science/r/paper-7f2a")]),o("div",{class:"pane-body"},[o("div",null,[o("span",{class:"tok"},"#"),b(),o("strong",null,"DeepLearnUtils")]),o("div",null,[b("Developed by "),o("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),b(" at "),o("span",{class:"redact",role:"img","aria-label":"redacted affiliation"},"XXXX-2"),b(".")]),o("div",null,[b("See "),o("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),b(" et\xA0al., \u201CAttention That Works,\u201D 2026.")]),o("div",null,[b("Contact: "),o("span",{class:"redact",role:"img","aria-label":"redacted email address"},"XXXX-3")])])])],-1)),p(" What you get: one screenshot, three tabs "),t[19]||(t[19]=o("section",{class:"paper-section-head paper-wrap",id:"about"},[o("div",null,[o("div",{class:"paper-eyebrow"},"What you get"),o("h2",null,[b("Anonymize, review, "),o("em",null,"manage.")])]),o("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),o("section",z4,[o("div",H4,[(l(!0),d(X,null,re(e.features,(s,r)=>(l(),d("div",{class:A(["paper-feature",{"is-on":e.feature===s?.key}]),key:s?.key},[o("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:n=>e.selectFeature(s.key),onKeydown:n=>e.featureKeydown(n,r),id:"feature-tab-"+s?.key,"aria-controls":"feature-panel-"+s?.key,"aria-selected":e.feature===s?.key,tabindex:e.feature===s?.key?0:-1},[o("span",j4,c(s?.num)+" \xB7 "+c(s?.eyebrow),1),o("span",G4,[b(c(s?.title)+" ",1),o("em",null,c(s?.accent),1)])],40,B4),o("div",W4,[o("span",K4,[b(c(s?.title)+" ",1),o("em",null,c(s?.accent),1)]),o("p",null,c(s?.text),1),o("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(s)),target:e.featureTarget(s)},c(s?.cta)+" \u2192",9,Y4)])],2))),128))]),o("div",J4,[(l(!0),d(X,null,re(e.features,(s,r)=>N((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:s?.key,id:"feature-panel-"+s?.key,"aria-labelledby":"feature-tab-"+s?.key},[o("div",X4,[o("div",Z4,[t[8]||(t[8]=o("span",{class:"dots"},[o("i"),o("i"),o("i")],-1)),o("span",x4,c(s?.url),1)]),o("div",{class:A("paper-crop paper-crop-"+s?.key)},[o("img",{loading:"lazy",width:"2880",height:"1800",src:e.safeUrl(s?.img),alt:s?.alt},null,8,e3)],2)])],8,Q4)),[[Y,e.feature===s?.key]])),128))])]),p(" FAQ teaser "),t[20]||(t[20]=ce('
Before you sign in

The questions that come up most.

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

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

Which file formats are supported?

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

What happens when an anonymized repository expires?

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

',1)),o("footer",t3,[o("div",o3,[t[12]||(t[12]=o("div",{class:"paper-footer-brand"},[o("div",{class:"paper-footer-mark"},[b("Anonymous "),o("em",null,"GitHub")]),o("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),o("div",s3,[t[9]||(t[9]=o("div",{class:"paper-footer-head"},"Product",-1)),t[10]||(t[10]=o("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",n3,"My work")):p("v-if",!0),e.user?(l(),d("a",r3,"Conferences")):p("v-if",!0),t[11]||(t[11]=o("a",{href:"/faq"},"FAQ",-1))]),t[13]||(t[13]=ce('',2))]),t[15]||(t[15]=o("div",{class:"paper-footer-rule"},null,-1)),o("div",i3,[o("span",null,"\xA9 "+c(e.year||2026)+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[14]||(t[14]=o("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var a3={class:"paper-empty"},l3={class:"paper-empty-inner"},d3={key:0,class:"paper-eyebrow"},u3={key:1,class:"paper-eyebrow"},c3={key:2,class:"paper-empty-title"},p3=["textContent"];function Dl(e,t){return l(),d("div",a3,[o("div",l3,[e.error?p("v-if",!0):(l(),d("div",d3,"Working")),e.error?(l(),d("div",u3,"Error")):p("v-if",!0),e.error?p("v-if",!0):(l(),d("h1",c3,[...t[0]||(t[0]=[b(" Loading",-1),o("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,p3)):p("v-if",!0)])])}var f3={class:"container paper-page paper-settings"},m3={class:"paper-crumbs"},h3={class:"here"},v3={class:"paper-page-title"},g3={class:"paper-settings-body"},y3={class:"paper-settings-toc"},b3={href:"#conf-billing"},w3={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},k3={id:"conf-basics",class:"paper-settings-section"},E3={class:"form-group"},C3={class:"invalid-feedback"},_3={class:"invalid-feedback"},S3={class:"form-group"},N3={class:"invalid-feedback"},D3={class:"form-group"},R3={class:"invalid-feedback"},T3={class:"invalid-feedback"},A3={id:"conf-window",class:"paper-settings-section"},O3={class:"form-grid-2"},I3={class:"form-group"},P3={class:"invalid-feedback"},V3={class:"invalid-feedback"},q3={class:"form-group"},M3={class:"invalid-feedback"},L3={class:"invalid-feedback"},$3={id:"conf-rendering",class:"paper-settings-section"},U3={class:"form-check"},F3={class:"form-check-input",type:"checkbox",id:"link",name:"link"},z3={class:"form-check"},H3={class:"form-check-input",type:"checkbox",id:"image",name:"image"},B3={class:"form-check"},j3={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},G3={class:"form-check"},W3={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},K3={id:"conf-features",class:"paper-settings-section"},Y3={class:"form-check"},J3={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Q3={class:"form-check"},X3={class:"form-check-input",type:"checkbox",id:"page",name:"page"},Z3={id:"conf-plan",class:"paper-settings-section"},x3={class:"paper-plan-grid"},eP=["value"],tP=["textContent"],oP={class:"paper-plan-price"},sP=["innerHTML"],nP={key:0,id:"conf-billing",class:"paper-settings-section"},rP={class:"form-group"},iP={class:"form-group"},aP={class:"form-group"},lP={class:"form-group"},dP={class:"form-grid-3"},uP={class:"form-group"},cP={class:"form-group"},pP={class:"form-group"},fP={class:"form-group"},mP={class:"paper-settings-footer"},hP=["textContent"],vP=["textContent"],gP=["disabled"];function Rl(e,t){let s=be("paper-scrollspy"),r=be("field"),n=be("form");return l(),d("div",f3,[o("div",m3,[t[1]||(t[1]=o("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=b(" \xA0/\xA0 ",-1)),t[3]||(t[3]=o("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=b(" \xA0/\xA0 ",-1)),o("span",h3,c(e.editionMode?"Edit":"New"),1)]),o("h1",v3,[b(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=o("em",null,"conference",-1))]),t[42]||(t[42]=o("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue, and lift author quotas during the review window. ",-1)),o("div",g3,[N((l(),d("aside",y3,[t[7]||(t[7]=o("div",{class:"paper-settings-toc-head"},"On this page",-1)),o("nav",null,[t[6]||(t[6]=ce('BasicsReview windowRendering defaultsFeaturesPlan',5)),N(o("a",b3,"Billing",512),[[Y,e.plan?.pricePerRepo>0]])])])),[[s]]),N((l(),d("form",w3,[o("section",k3,[t[12]||(t[12]=o("div",{class:"paper-section-eyebrow"},"Basics",-1)),o("div",E3,[t[8]||(t[8]=o("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[r,{state:e.viewState,set:i=>{e.options.name=i},value:e.options?.name,form:"conference",options:{}}]]),N(o("div",C3," The name of the conference is invalid. ",512),[[Y,e.conference?.name?.errors?.invalid]]),N(o("div",_3," The name of the conference is required. ",512),[[Y,e.conference?.name?.errors?.required]])]),o("div",S3,[t[9]||(t[9]=o("label",{class:"paper-field-label",for:"url"},"Website",-1)),N(o("input",{type:"url",class:A(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.url=i},value:e.options?.url,form:"conference",options:{}}]]),N(o("div",N3," The url of the conference is invalid. ",512),[[Y,e.conference?.url?.errors?.url]])]),o("div",D3,[t[10]||(t[10]=o("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[r,{state:e.viewState,set:i=>{e.options.conferenceID=i},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=o("small",{class:"form-text text-muted"},[b("3\u201310 characters, letters, numbers, "),o("code",null,"-"),b(" and "),o("code",null,"_"),b(". Authors reference this when they anonymize.")],-1)),N(o("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[Y,e.conference?.conferenceID?.errors?.used]]),N(o("div",R3," The conference ID is required. ",512),[[Y,e.conference?.conferenceID?.errors?.required]]),N(o("div",T3," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[Y,e.conference?.conferenceID?.errors?.pattern]])])]),o("section",A3,[t[17]||(t[17]=o("div",{class:"paper-section-eyebrow"},"Review window",-1)),o("div",O3,[o("div",I3,[t[13]||(t[13]=o("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),N(o("input",{type:"date",class:A(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.startDate=i},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=o("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),N(o("div",P3," Start date is required. ",512),[[Y,e.conference?.startDate?.errors?.required]]),N(o("div",V3," Start date must be before end date. ",512),[[Y,e.conference?.startDate?.errors?.invalid]])]),o("div",q3,[t[15]||(t[15]=o("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),N(o("input",{type:"date",class:A(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.endDate=i},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),N(o("div",M3," End date is required. ",512),[[Y,e.conference?.endDate?.errors?.required]]),N(o("div",L3," End date is invalid. ",512),[[Y,e.conference?.endDate?.errors?.invalid]])])])]),o("section",$3,[t[25]||(t[25]=o("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),o("div",U3,[N(o("input",F3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.link=i},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=o("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),o("div",z3,[N(o("input",H3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.image=i},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=o("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),o("div",B3,[N(o("input",j3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.pdf=i},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=o("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),o("div",G3,[N(o("input",W3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.notebook=i},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=o("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))])]),o("section",K3,[t[30]||(t[30]=o("div",{class:"paper-section-eyebrow"},"Features",-1)),o("div",Y3,[N(o("input",J3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.update=i},value:e.options?.options?.update,form:"conference",options:{}}]]),t[26]||(t[26]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[27]||(t[27]=o("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),o("div",Q3,[N(o("input",X3,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.page=i},value:e.options?.options?.page,form:"conference",options:{}}]]),t[28]||(t[28]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[29]||(t[29]=o("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),o("section",Z3,[t[32]||(t[32]=o("div",{class:"paper-section-eyebrow"},"Plan",-1)),t[33]||(t[33]=o("p",{class:"paper-section-copy"},"Billed per repository per month, prorated by the day for as long as a repository stays in the conference.",-1)),o("div",x3,[(l(!0),d(X,null,re(e.plans,(i,a)=>(l(),d("label",{class:A(["paper-plan-card",{selected:e.options?.plan?.planID==i?.id}])},[N(o("input",{type:"radio",name:"planPicker",value:i?.id},null,8,eP),[[r,{state:e.viewState,set:u=>{e.options.plan.planID=u},value:e.options?.plan?.planID,form:"conference",options:{}}]]),o("div",{class:"paper-plan-head",textContent:c(i?.name)},null,8,tP),o("div",oP,[b(c(e.fmt?.number(i?.pricePerRepo))+"\u20AC ",1),t[31]||(t[31]=o("span",{class:"paper-plan-per"},"/ repo / month",-1))]),o("div",{class:"paper-plan-desc",innerHTML:e.sanitize(i?.description)},null,8,sP)],2))),256))])]),e.plan?.pricePerRepo>0?(l(),d("section",nP,[t[41]||(t[41]=o("div",{class:"paper-section-eyebrow"},"Billing",-1)),o("div",rP,[t[34]||(t[34]=o("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.name=i},value:e.options?.billing?.name,form:"conference",options:{}}]])]),o("div",iP,[t[35]||(t[35]=o("label",{class:"paper-field-label",for:"email"},"Email",-1)),N(o("input",{type:"email",class:A(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.email=i},value:e.options?.billing?.email,form:"conference",options:{}}]])]),o("div",aP,[t[36]||(t[36]=o("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address=i},value:e.options?.billing?.address,form:"conference",options:{}}]])]),o("div",lP,[N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address2=i},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),o("div",dP,[o("div",uP,[t[37]||(t[37]=o("label",{class:"paper-field-label",for:"city"},"City",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.city=i},value:e.options?.billing?.city,form:"conference",options:{}}]])]),o("div",cP,[t[38]||(t[38]=o("label",{class:"paper-field-label",for:"country"},"Country",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.country=i},value:e.options?.billing?.country,form:"conference",options:{}}]])]),o("div",pP,[t[39]||(t[39]=o("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.zip=i},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),o("div",fP,[t[40]||(t[40]=o("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),N(o("input",{type:"text",class:A(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.vat=i},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):p("v-if",!0),o("div",mP,[e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,hP)):p("v-if",!0),e.message?(l(),d("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,vP)):p("v-if",!0),o("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=me(i=>e.submitForm(i,()=>{e.submit(i)}),["prevent"]))},c(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,gP)])])),[[n,e.viewState]])])])}var yP={key:0},bP=["innerHTML"],wP={key:3},kP=["src"],EP=["src"],CP={key:7},_P={controls:"controls"},SP=["src"],NP={key:8},DP={key:9,class:"file-error container d-flex h-100"},RP={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},TP={class:"paper-error-msg"},AP={key:10,class:"file-error container d-flex h-100"},OP=["textContent"],IP={key:11,class:"file-error container d-flex h-100"},PP={key:12,class:"file-error container d-flex h-100"},VP={key:13,class:"file-error container d-flex h-100"},qP={key:14,class:"file-error container d-flex h-100"},MP={class:"paper-empty-title m-auto"},LP=["href"];function Tl(e,t){let s=We("html-doc"),r=We("pdfviewer"),n=We("notebook"),i=be("code-editor");return l(),d(X,null,[e.type=="text"?N((l(),d("div",yP,null,512)),[[i,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="html"?(l(),d("div",{key:1,class:"file-content markdown-body",innerHTML:e.sanitize(e.content)},null,8,bP)):p("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),Mt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):p("v-if",!0),(e.type=="code"||e.type=="html-doc"&&e.showSource)&&e.content!=null?N((l(),d("div",wP,null,512)),[[i,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="image"?(l(),d("img",{key:4,class:"image-content",src:e.safeUrl(e.url)},null,8,kP)):p("v-if",!0),e.type=="media"?(l(),d("iframe",{key:5,class:"h-100 overflow-auto w-100 b-0",src:e.safeUrl(e.url)},null,8,EP)):p("v-if",!0),e.type=="pdf"?(l(),Mt(r,{key:6,src:e.safeUrl(e.url)},null,8,["src"])):p("v-if",!0),e.type=="audio"?(l(),d("div",CP,[o("audio",_P,[o("source",{src:e.safeUrl(e.url)},null,8,SP)])])):p("v-if",!0),e.type=="IPython"?(l(),d("div",NP,[Ce(n,{file:e.url,content:e.content},null,8,["file","content"])])):p("v-if",!0),e.type=="rate_limited"?(l(),d("div",DP,[o("div",RP,[t[2]||(t[2]=ce('
Temporarily paused
GitHub API rate limit reached
',1)),o("p",TP,[t[0]||(t[0]=b("This repository will be available in ",-1)),o("strong",null,c(e.rateLimitCountdown),1),t[1]||(t[1]=b(". The page will reload automatically.",-1))])])])):p("v-if",!0),e.type=="error"?(l(),d("div",AP,[o("h1",{class:"paper-empty-title m-auto",textContent:c(e.fmt.translate("ERRORS."+e.content))},null,8,OP)])):p("v-if",!0),e.type=="loading"&&!e.error?(l(),d("div",IP,[...t[3]||(t[3]=[o("h1",{class:"paper-empty-title m-auto"},"Loading\u2026",-1)])])):p("v-if",!0),e.type=="empty"?(l(),d("div",PP,[...t[4]||(t[4]=[o("h1",{class:"paper-empty-title m-auto"},[b("Empty "),o("em",null,"repository"),b(".")],-1)])])):p("v-if",!0),e.content==null&&e.type!="empty"?(l(),d("div",VP,[...t[5]||(t[5]=[o("h1",{class:"paper-empty-title m-auto"},[b("Empty "),o("em",null,"file"),b(".")],-1)])])):p("v-if",!0),e.type=="binary"?(l(),d("div",qP,[o("h1",MP,[t[6]||(t[6]=b("Unsupported ",-1)),t[7]||(t[7]=o("em",null,"binary file",-1)),t[8]||(t[8]=b(". You can ",-1)),o("a",{target:"_blank",href:e.safeUrl(e.url+"&download=true")},"download it",8,LP),t[9]||(t[9]=b(".",-1))])])):p("v-if",!0)],64)}var $P={class:"container page dashboard-page paper-page"},UP={class:"row"},FP={class:"w-100"},zP={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},HP={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},BP={class:"flex-grow-1"},jP={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},GP={class:"d-flex flex-wrap",style:{gap:"6px"}},WP={class:"dropdown"},KP={class:"dropdown-menu","aria-labelledby":"dropdownSort"},YP={class:"form-check dropdown-item"},JP={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},QP={class:"form-check dropdown-item"},XP={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},ZP={class:"form-check dropdown-item"},xP={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},eV={class:"form-check dropdown-item"},tV={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},oV={class:"form-check dropdown-item"},sV={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},nV={class:"dropdown"},rV={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},iV={class:"form-check dropdown-item"},aV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},lV={class:"form-check dropdown-item"},dV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},uV={class:"form-check dropdown-item"},cV={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},pV={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},fV={class:"filter-chip"},mV=["onClick"],hV={class:"repo-list w-100"},vV={class:"repo-list-item-content"},gV={class:"repo-list-item-main"},yV={class:"repo-list-item-header"},bV=["textContent","href"],wV=["textContent"],kV=["textContent"],EV={class:"repo-source"},CV=["href"],_V={class:"repo-date"},SV={class:"repo-meta"},NV={key:0,title:"Conference"},DV=["title"],RV=["title"],TV=["title"],AV={key:1},OV={class:"repo-list-item-actions"},IV={class:"dropdown"},PV={class:"dropdown-menu dropdown-menu-right"},VV=["href"],qV=["onClick"],MV=["onClick"],LV=["onClick"],$V=["href"],UV={key:0,class:"repo-list-empty"};function Al(e,t){let s=be("field"),r=be("form");return l(),d("div",$P,[o("div",UP,[o("div",FP,[t[12]||(t[12]=ce('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

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

',2)),p(" Search + filters row "),N((l(),d("form",zP,[o("div",HP,[o("div",BP,[N(o("input",jP,null,512),[[s,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),o("div",GP,[o("div",WP,[t[6]||(t[6]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),o("div",KP,[t[5]||(t[5]=o("h6",{class:"dropdown-header"},"Select order",-1)),o("div",YP,[N(o("input",JP,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=o("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),o("div",QP,[N(o("input",XP,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=o("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),o("div",ZP,[N(o("input",xP,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=o("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),o("div",eV,[N(o("input",tV,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=o("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),o("div",oV,[N(o("input",sV,null,512),[[s,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=o("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),o("div",nV,[t[11]||(t[11]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),o("div",rV,[t[10]||(t[10]=o("h6",{class:"dropdown-header"},"Select status",-1)),o("div",iV,[N(o("input",aV,null,512),[[s,{state:e.viewState,set:n=>{e.filters.status.ready=n},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=o("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),o("div",lV,[N(o("input",dV,null,512),[[s,{state:e.viewState,set:n=>{e.filters.status.expired=n},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=o("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),o("div",uV,[N(o("input",cV,null,512),[[s,{state:e.viewState,set:n=>{e.filters.status.removed=n},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=o("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[r,e.viewState]]),p(" Active filter chips "),N(o("div",pV,[(l(!0),d(X,null,re(e.filters?.status,(n,i,a)=>N((l(),d("span",fV,[b(c(e.fmt?.title(i))+" ",1),o("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:u=>{e.filters.status[i]=!0}}," \xD7 ",8,mV)],512)),[[Y,!n]])),256))],512),[[Y,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),p(" Pull request list "),o("ul",hV,[(l(!0),d(X,null,re(e.filteredPullRequests,(n,i)=>(l(),d("li",{class:A(["repo-list-item",{"repo-inactive":n?.status=="expired"||n?.status=="removed"||n?.status=="error"}])},[o("div",vV,[o("div",gV,[o("div",yV,[o("a",{class:"repo-name",textContent:c(n?.pullRequestId),href:e.safeUrl("/pr/"+n?.pullRequestId)},null,8,bV),o("span",{class:A(["status-badge",{"status-removed":n?.status=="removed"||n?.status=="expired"||n?.status=="removing"||n?.status=="expiring","status-preparing":n?.status=="preparing"||n?.status=="download","status-ready":n?.status=="ready","status-error":n?.status=="error"}])},[o("span",{textContent:c(e.fmt?.title(n?.status))},null,8,wV),n?.status=="error"?(l(),d("span",{key:0,textContent:c(": "+n?.statusMessage)},null,8,kV)):p("v-if",!0)],2)]),o("div",EV,[o("span",null,[t[13]||(t[13]=o("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),o("a",{href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},c(n?.source?.repositoryFullName)+"#"+c(n?.source?.pullRequestId),9,CV)]),o("span",{class:A(["status-badge",{"status-ready":n?.merged,"status-removed":n?.state=="open","status-error":n?.state=="closed"&&!n?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(n?.merged?"merged":n?.state)),3),o("span",_V,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)])]),o("div",SV,[n?.conference?(l(),d("span",NV,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-conference"})],-1)),b(" "+c(n?.conference),1)])):p("v-if",!0),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+n?.options?.terms?.join(", ")},[t[15]||(t[15]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),b(" "+c(e.fmt?.number(n?.options?.terms?.length)),1)],8,DV),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(n?.pageView)},[t[16]||(t[16]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1)),b(" "+c(e.fmt?.number(n?.pageView)),1)],8,RV),o("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(n?.lastView)},[t[17]||(t[17]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-calendar"})],-1)),b(" "+c(e.fmt?.humanTime(n?.lastView)),1)],8,TV),n?.options?.expirationMode!="never"&&n?.status=="ready"?(l(),d("span",AV,[t[18]||(t[18]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),b(" Expire: "+c(e.fmt?.humanTime(n?.options?.expirationDate)),1)])):p("v-if",!0)])]),o("div",OV,[o("div",IV,[t[24]||(t[24]=o("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),o("div",PV,[o("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+n?.pullRequestId)},[...t[19]||(t[19]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit ",-1)])],8,VV),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updatePullRequest(n),["prevent"])},[...t[20]||(t[20]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-refresh"})],-1),b(" Force update ",-1)])],8,qV),[[Y,n?.status=="ready"||n?.status=="error"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.updatePullRequest(n),["prevent"])},[...t[21]||(t[21]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-check-circle"})],-1),b(" Enable ",-1)])],8,MV),[[Y,n?.status=="removed"]]),N(o("a",{class:"dropdown-item",href:"#",onClick:me(a=>e.removePullRequest(n),["prevent"])},[...t[22]||(t[22]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1),b(" Remove ",-1)])],8,LV),[[Y,n?.status=="ready"]]),o("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+n?.pullRequestId+"/")},[...t[23]||(t[23]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" View PR ",-1)])],8,$V)])])])],2))),256)),e.filteredPullRequests?.length==0?(l(),d("li",UV,[...t[25]||(t[25]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-inbox"})],-1),o("span",null,"No pull requests to display.",-1)])])):p("v-if",!0)])])])}var FV={class:"container paper-page paper-settings"},zV={class:"paper-settings-body"},HV={class:"paper-settings-toc"},BV={class:"paper-settings-main"},jV={id:"settings-quota",class:"paper-settings-section"},GV={key:1,class:"quota-row","aria-hidden":"true"},WV={class:"quota-item"},KV={id:"settings-terms",class:"paper-settings-section"},YV={class:"form-group"},JV={class:"form-control",id:"terms",name:"terms",rows:"4",placeholder:`Jane Smith MIT CSAIL -jane.smith@example.org`},IV={id:"termsHelp",class:"form-text text-muted"},PV={class:"invalid-feedback"},VV={id:"settings-display",class:"paper-settings-section"},qV={class:"form-group paper-check-list"},MV={class:"form-check"},$V={class:"form-check-input",type:"checkbox",id:"link",name:"link"},LV={class:"form-check"},UV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},FV={class:"form-check"},zV={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},HV={class:"form-check"},jV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},BV={id:"settings-features",class:"paper-settings-section"},GV={class:"form-group paper-check-list"},WV={class:"form-check"},KV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},YV={class:"form-check"},JV={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},QV={class:"form-check"},XV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},ZV={class:"form-group"},xV={class:"form-control",id:"mode",name:"mode"},e5={class:"form-text text-muted"},t5={id:"settings-expiration",class:"paper-settings-section"},o5={class:"form-group"},s5={class:"form-control",id:"expiration",name:"expiration"},n5={key:0,class:"draft-status",role:"status"},r5={key:1,class:"draft-status"},i5={class:"paper-settings-footer"},a5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},l5=["textContent"],d5={class:"paper-settings-actions"},u5=["disabled"],c5={key:0,class:"ui-icon mr-1","aria-hidden":"true"},p5={id:"settings-account",class:"paper-settings-section"},f5={class:"paper-account-card"},h5=["src"],m5={class:"paper-account-identity"},v5={class:"paper-account-name"},g5={class:"paper-danger-zone"},y5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},b5=["textContent"],w5=["disabled"];function Dl(e,t){let n=We("quota-usage"),r=ye("paper-scrollspy"),s=ye("field"),i=ye("form");return l(),d("div",EV,[t[52]||(t[52]=ce('
My work \xA0/\xA0 Settings

Your settings

Defaults applied to every new anonymization, your quotas, and your account.

',3)),o("div",CV,[N((l(),d("aside",_V,[...t[4]||(t[4]=[ce('
On this page
',2)])])),[[r]]),o("div",SV,[p(" Account usage shares the dashboard component. "),o("section",NV,[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(),qt(n,{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",DV,[(l(),d(X,null,ae([1,2,3],(a,u)=>o("div",RV,[...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]=he(a=>e.submitForm(a,()=>{e.saveDefault(a)}),["prevent"]))},[o("section",TV,[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",AV,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",OV,null,512),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",IV,[t[8]||(t[8]=y(" 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]=y(", or use ",-1)),t[10]||(t[10]=o("code",null,"term=>replacement",-1)),t[11]||(t[11]=y(" to pick your own. ",-1))]),N(o("div",PV," Terms are in an invalid format ",512),[[Y,e.defaultsForm?.terms?.errors?.format]])])]),o("section",VV,[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",qV,[o("div",MV,[N(o("input",$V,null,512),[[s,{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",LV,[N(o("input",UV,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[17]||(t[17]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[18]||(t[18]=o("small",{class:"form-text text-muted"},"Images are shown as is. They are not anonymized.",-1))]),o("div",FV,[N(o("input",zV,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[19]||(t[19]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[20]||(t[20]=o("small",{class:"form-text text-muted"},"PDFs are shown as is. They are not anonymized.",-1))]),o("div",HV,[N(o("input",jV,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[21]||(t[21]=o("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[22]||(t[22]=o("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])])]),o("section",BV,[t[33]||(t[33]=o("div",{class:"paper-section-eyebrow"},"Features",-1)),o("div",GV,[o("div",WV,[N(o("input",KV,null,512),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[26]||(t[26]=o("small",{class:"form-text text-muted"},"Serve an anonymized copy of the repository's GitHub Pages site. Only pages built from the anonymized branch are supported.",-1))]),o("div",YV,[N(o("input",JV,null,512),[[s,{state:e.viewState,set:a=>{e.options.loc=a},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=o("label",{class:"form-check-label",for:"loc"},"Lines of code",-1)),t[28]||(t[28]=o("small",{class:"form-text text-muted"},"Show the line count of the repository in the explorer.",-1))]),o("div",QV,[N(o("input",XV,null,512),[[s,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[30]||(t[30]=o("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))])]),o("div",ZV,[t[32]||(t[32]=o("label",{class:"paper-field-label",for:"mode"},"Fetch mode",-1)),N((l(),d("select",xV,[...t[31]||(t[31]=[o("option",{value:"GitHubStream",selected:""},"Stream from GitHub on demand",-1),o("option",{value:"GitHubDownload"},"Download to Anonymous GitHub",-1)])])),[[s,{state:e.viewState,set:a=>{e.options.mode=a},value:e.options?.mode,form:"defaultsForm",options:{}}]]),o("small",e5," Download is faster for reviewers and enables every feature. Streaming is the only option above "+c(e.fmt?.humanFileSize(e.site_options?.MAX_REPO_SIZE*1024))+". ",1)])]),o("section",t5,[t[37]||(t[37]=o("div",{class:"paper-section-eyebrow"},"Expiration",-1)),o("div",o5,[t[35]||(t[35]=o("label",{class:"paper-field-label",for:"expiration"},"When an anonymization expires",-1)),N((l(),d("select",s5,[...t[34]||(t[34]=[o("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),o("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[s,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=o("small",{class:"form-text text-muted"}," The expiration date itself is chosen per anonymization. Redirecting reveals the source repository, so pick it only once the review is over. ",-1))])]),e.draftRestored?(l(),d("div",n5,[t[38]||(t[38]=y("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[0]||(t[0]=a=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(l(),d("div",r5,[y(c(e.draftSaved?"Draft saved in this tab for 30 minutes.":"Unsaved changes. Keep this tab open until you save.")+" ",1),o("button",{type:"button",class:"draft-discard",onClick:t[1]||(t[1]=a=>e.discardDraft())},c(e.isUpdate?"Restore saved settings":"Discard changes"),1)])):p("v-if",!0),o("div",i5,[e.error?(l(),d("div",a5,[t[39]||(t[39]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),t[40]||(t[40]=y()),o("span",{textContent:c(e.error)},null,8,l5)])):p("v-if",!0),o("div",d5,[o("button",{id:"save",type:"submit",class:"btn btn-ink",disabled:e.saving},[e.message?(l(),d("svg",c5,[...t[41]||(t[41]=[o("use",{href:"#ui-icon-check"},null,-1)])])):p("v-if",!0),y(c(e.saving?"Saving\u2026":e.message?"Saved":"Save defaults"),1)],8,u5),t[42]||(t[42]=o("span",{class:"paper-settings-hint"},"Applies to new anonymizations only. Existing ones keep their settings.",-1))])])],32)),[[i,e.viewState]]),o("section",p5,[t[50]||(t[50]=o("div",{class:"paper-section-eyebrow"},"Account",-1)),o("div",f5,[e.user?.photo?(l(),d("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,h5)):p("v-if",!0),o("div",m5,[o("div",v5,"@"+c(e.user?.username),1),t[43]||(t[43]=o("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[44]||(t[44]=o("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),t[51]||(t[51]=o("a",{class:"paper-settings-connection-link",href:"/connections"},[o("i",{class:"fab fa-github","aria-hidden":"true"}),o("span",null,[y("GitHub connections"),o("small",null,"Manage repository access and legacy OAuth.")]),o("span",{"aria-hidden":"true"},"\u2192")],-1)),o("div",g5,[t[48]||(t[48]=o("div",{class:"paper-danger-head"},"Delete account",-1)),t[49]||(t[49]=o("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(l(),d("div",y5,[t[45]||(t[45]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),t[46]||(t[46]=y()),o("span",{textContent:c(e.deleteError)},null,8,b5)])):p("v-if",!0),o("button",{type:"button",class:"btn btn-outline-danger",onClick:t[3]||(t[3]=a=>e.deleteAccount()),disabled:e.deletingAccount},[t[47]||(t[47]=o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)),y(c(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,w5)])])])])])}var k5={class:"pr-page"},E5={class:"container paper-page pr-page-inner"},C5={class:"pr-header"},_5={class:"pr-title-row"},S5={class:"paper-page-title pr-title"},N5=["textContent"],D5={key:1,class:"text-muted"},R5=["href"],T5={class:"pr-header-meta"},A5={key:0,class:"pr-meta-item"},O5=["textContent"],I5={key:1,class:"pr-meta-item"},P5=["textContent"],V5={key:2,class:"pr-meta-item"},q5=["textContent"],M5={key:0,class:"pr-body-card"},$5={key:1,class:"paper-tabs",role:"tablist"},L5=["aria-selected","tabindex"],U5=["aria-selected","tabindex"],F5=["textContent"],z5={class:"paper-tab-content"},H5={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},j5=["innerHTML"],B5={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},G5={class:"pr-comments"},W5={class:"pr-comment"},K5={class:"pr-comment-head"},Y5={key:0,class:"pr-comment-author"},J5=["textContent"],Q5=["textContent"],X5={key:0,class:"pr-comment-body"},Z5={key:0,class:"paper-table-empty"};function Rl(e,t){let n=We("markdown");return l(),d("div",k5,[o("div",E5,[t[17]||(t[17]=o("div",{class:"paper-crumbs"},[o("a",{href:"/dashboard"},"Reviewer"),y(" \xA0/\xA0 "),o("span",{class:"here"},"Pull request")],-1)),o("header",C5,[o("div",_5,[o("h1",S5,[e.details?.title?(l(),d("span",{key:0,textContent:c(e.details?.title)},null,8,N5)):p("v-if",!0),e.details?.title?p("v-if",!0):(l(),d("span",D5,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,R5)):p("v-if",!0)]),o("div",T5,[o("span",{class:A(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[o("span",{class:A(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),y(" "+c(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(l(),d("span",A5,[t[5]||(t[5]=o("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=y()),o("span",{textContent:c(e.details?.baseRepositoryFullName)},null,8,O5)])):p("v-if",!0),e.details?.updatedDate?(l(),d("span",I5,[t[7]||(t[7]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=y()),o("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,P5)])):p("v-if",!0),e.details?.anonymizeDate?(l(),d("span",V5,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=y(" Anonymized ",-1)),o("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,q5)])):p("v-if",!0)])]),e.details?.body?(l(),d("section",M5,[t[11]||(t[11]=o("div",{class:"paper-section-eyebrow"},"Description",-1)),Ce(n,{content:e.details?.body},null,8,["content"])])):p("v-if",!0),e.details?.diff||e.details?.comments?(l(),d("nav",$5,[e.details?.diff?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=r=>e.previewTabKeydown(r)),onClick:t[1]||(t[1]=r=>e.tabState.active="diff")},[...t[12]||(t[12]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),y(" Diff ",-1)])],42,L5)):p("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=r=>e.previewTabKeydown(r)),onClick:t[3]||(t[3]=r=>e.tabState.active="comments")},[t[13]||(t[13]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,F5)],42,U5)):p("v-if",!0)])):p("v-if",!0),o("div",z5,[e.details?.diff&&e.tabState?.active=="diff"?(l(),d("div",H5,[o("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,j5)])):p("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",B5,[o("ul",G5,[(l(!0),d(X,null,ae(e.details?.comments,(r,s)=>(l(),d("li",W5,[o("div",K5,[r?.author?(l(),d("span",Y5,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=y(" @",-1)),o("span",{textContent:c(r?.author)},null,8,J5)])):p("v-if",!0),r?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(r?.updatedDate))},null,8,Q5)):p("v-if",!0)]),r?.body?(l(),d("div",X5,[Ce(n,{content:r?.body},null,8,["content"])])):p("v-if",!0)]))),256)),e.details?.comments?.length?p("v-if",!0):(l(),d("li",Z5,[...t[16]||(t[16]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1),o("span",null,"No comments on this pull request.",-1)])]))])])):p("v-if",!0)])])])}var x5={class:"container paper-page status-page"},eq={class:"d-flex align-items-end justify-content-between flex-wrap",style:{gap:"12px"}},tq={class:"paper-page-title"},oq=["textContent"],sq={key:1},nq={class:"paper-settings-section"},rq={key:0,class:"paper-ratelimit-card",role:"status"},iq={class:"paper-error-msg"},aq=["aria-valuenow"],lq={class:"paper-progress-label"},dq=["textContent"],uq={key:0},cq=["textContent"],pq={class:"paper-progress-pct"},fq={key:2,class:"paper-error-card",role:"alert"},hq={key:0,class:"paper-error-msg"},mq={key:1,class:"paper-error-msg"},vq={class:"paper-error-actions"},gq=["href"],yq={class:"paper-detail-grid"},bq={class:"detail-value"},wq=["href"],kq={key:0,class:"detail-label"},Eq={key:1,class:"detail-value"},Cq=["href"],_q={key:3,class:"anonymize-submit-bar"},Sq=["href"],Nq=["href"];function Tl(e,t){return l(),d("div",x5,[t[15]||(t[15]=o("div",{class:"paper-crumbs"},[y("Anonymization \xA0/\xA0 "),o("span",{class:"here"},"Status")],-1)),o("div",eq,[o("div",null,[o("h1",tq,[t[0]||(t[0]=y("Status of ",-1)),o("em",null,c(e.repoId),1)]),t[1]||(t[1]=o("p",{class:"paper-page-lede"},"Track progress as your anonymization is prepared.",-1))]),o("span",{class:A(["status-pill",{"status-pill-ready":e.repo?.status=="ready","status-pill-error":e.repo?.status=="error","status-pill-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-pill-ratelimit":e.rateLimitResetAt}])},[o("span",{class:A(["status-dot",{"status-ready":e.repo?.status=="ready","status-error":e.repo?.status=="error","status-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-ratelimit":e.rateLimitResetAt}])},null,2),e.rateLimitResetAt?p("v-if",!0):(l(),d("span",{key:0,textContent:c(e.fmt?.title(e.repo?.status))},null,8,oq)),e.rateLimitResetAt?(l(),d("span",sq,"Rate limited")):p("v-if",!0)],2)]),o("section",nq,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Progress",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},[y(" The repository will take a few minutes to get ready, depending on its size. Visit the "),o("a",{href:"/faq"},"FAQ"),y(" for more information. ")],-1)),e.rateLimitResetAt?(l(),d("div",rq,[t[4]||(t[4]=ce('
Temporarily paused
GitHub API rate limit reached
',1)),o("p",iq,[t[2]||(t[2]=y("Anonymization will resume automatically in ",-1)),o("strong",null,c(e.rateLimitCountdown),1),t[3]||(t[3]=y(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):p("v-if",!0),e.repo?.status!="error"&&!e.rateLimitResetAt?(l(),d("div",{key:1,class:A(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[o("div",{class:"paper-progress-bar",style:Me("width: "+e.progress+"%;")},null,4),o("div",lq,[o("span",{textContent:c(e.fmt?.title(e.repo?.status))},null,8,dq),e.repo?.statusMessage?(l(),d("span",uq,[t[5]||(t[5]=y("\xA0\xB7\xA0",-1)),o("span",{textContent:c(e.repo?.statusMessage)},null,8,cq)])):p("v-if",!0),o("span",pq,c(e.progress||0)+"%",1)])],10,aq)):p("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(l(),d("div",fq,[t[8]||(t[8]=ce('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(l(),d("p",hq,c(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):p("v-if",!0),e.repo?.statusMessage?p("v-if",!0):(l(),d("p",mq,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),t[9]||(t[9]=o("ul",{class:"paper-error-hints"},[o("li",null,"Make sure the source URL points to a repository or pull request you can access."),o("li",null,"Check that the chosen branch and commit still exist on GitHub."),o("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),o("div",vq,[o("a",{class:"btn btn-ink",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[6]||(t[6]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),y(" Edit anonymization",-1)])],8,gq),t[7]||(t[7]=ce(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):p("v-if",!0),o("div",yq,[t[10]||(t[10]=o("div",{class:"detail-label"},"Repository",-1)),o("div",bq,[o("a",{target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},"/r/"+c(e.repoId)+"/",9,wq)]),e.repo?.options?.page?(l(),d("div",kq,"GitHub Page")):p("v-if",!0),e.repo?.options?.page?(l(),d("div",Eq,[o("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"/w/"+c(e.repoId)+"/",9,Cq)])):p("v-if",!0)]),e.repo?.status=="ready"?(l(),d("div",_q,[o("a",{class:"btn btn-ink",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[11]||(t[11]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),y(" Go to anonymized repository ",-1)])],8,Sq),e.repo?.options?.page?(l(),d("a",{key:0,class:"btn",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[12]||(t[12]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),y(" Go to anonymized GitHub page ",-1)])],8,Nq)):p("v-if",!0)])):p("v-if",!0)]),t[16]||(t[16]=ce('
Support Anonymous GitHub

A small team keeps this running. If it helps you, please consider contributing back \u2014 in code, ideas, or coffee.

',1))])}var tn={"partials/connections.htm":ol,"partials/signin.htm":sl,"partials/404.htm":nl,"partials/admin/conferences.htm":rl,"partials/admin/errors.htm":il,"partials/admin/overview.htm":al,"partials/admin/queues.htm":ll,"partials/admin/repositories.htm":dl,"partials/admin/user.htm":ul,"partials/admin/users.htm":cl,"partials/anonymize.htm":pl,"partials/anonymizePullRequest.htm":fl,"partials/claim.htm":hl,"partials/conference.htm":ml,"partials/conferences.htm":vl,"partials/dashboard.htm":gl,"partials/explorer.htm":yl,"partials/faq.htm":bl,"partials/gist.htm":wl,"partials/header.htm":kl,"partials/home.htm":El,"partials/loading.htm":Cl,"partials/newConference.htm":_l,"partials/pageView.htm":Sl,"partials/pr-dashboard.htm":Nl,"partials/profile.htm":Dl,"partials/pullRequest.htm":Rl,"partials/status.htm":Tl};var Dq={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function Al(e,t){return l(),d("svg",Dq,[...t[0]||(t[0]=[ce('',1)])])}function Ol(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let r={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(r){let s=ot(()=>t.fmt.orderBy(t.fmt.filter(r[1](),t[r[2]]),t.orderBy));Object.defineProperty(t,r[0],{configurable:!0,get:()=>s.value})}}function Il(e=(...t)=>fetch(...t)){async function t(r,s,i,a={}){let u=new URL(s,window.location.href);for(let[g,w]of Object.entries(a.params||{}))if(w!=null)for(let h of Array.isArray(w)?w:[w])u.searchParams.append(g,typeof h=="object"?JSON.stringify(h):h);let f=new AbortController,m;a.timeout?.then?a.timeout.then(()=>f.abort()):a.timeout&&(m=setTimeout(()=>f.abort(),a.timeout));try{let g={Accept:"application/json, text/plain, */*",...a.headers},w=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);w&&u.origin===window.location.origin&&(g["X-XSRF-TOKEN"]=decodeURIComponent(w[1]));let h;i!==void 0&&(i instanceof FormData?h=i:(g["Content-Type"]||(g["Content-Type"]="application/json;charset=utf-8"),h=JSON.stringify(i)));let b=await e(u.href,{method:r,headers:g,body:h,credentials:"same-origin",signal:f.signal}),E=await b.text(),k=E;if(a.transformResponse)k=a.transformResponse(E);else if(E&&(/json/i.test(b.headers.get("content-type")||"")||/^[\[{]/.test(E.trim())))try{k=JSON.parse(E)}catch{}let R={data:k,status:b.status,headers:D=>b.headers.get(D)};if(!b.ok)throw R;return R}catch(g){throw g.name==="AbortError"?{status:-1,data:null}:g}finally{clearTimeout(m)}}let n={};for(let r of["get","delete","head"])n[r]=(s,i)=>t(r.toUpperCase(),s,void 0,i);for(let r of["post","put","patch"])n[r]=(s,i,a)=>t(r.toUpperCase(),s,i,a);return n}var Pl={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}};var Vl=function(e){function t(n){return n=n||{used:0,total:0},n.unlimited=!n.total,n.percent=n.unlimited?0:Math.min(100,n.used*100/n.total),n.level=n.unlimited?"unlimited":n.percent>=95?"danger":n.percent>=80?"warn":"ok",n}return{decorate:t,load:function(){return e.get("/api/user/quota").then(n=>{let r=n.data||{};return r.storage=t(r.storage),r.file=t(r.file),r.repository=t(r.repository),r})}}};var sr={};ed(sr,{bigNum:()=>Tq,date:()=>Fq,diff:()=>Vq,filter:()=>Lq,humanFileSize:()=>Rq,humanTime:()=>Aq,limitTo:()=>$q,number:()=>qq,orderBy:()=>Uq,plural:()=>zq,statusLabel:()=>Iq,statusMsg:()=>Pq,title:()=>Oq,uppercase:()=>Mq});var Rq=e=>window.humanFileSize(e),Tq=(function(){return function(t){let n=Number(t)||0,r=Math.abs(n);return r<1e3?String(n):r<1e4?(n/1e3).toFixed(1).replace(/\.0$/,"")+"k":r<1e6?Math.round(n/1e3)+"k":r<1e7?(n/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(n/1e6)+"M"}})(),Aq=(function(){return function(t){if(!t)return"never";t instanceof Date&&(t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(t=Math.round((Date.now()-new Date(t))/1e3));var n=t<0?"from now":"ago";if(Math.abs(t)>7200*24){let f=new Date;return f.setSeconds(f.getSeconds()-t),"on "+f.toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}t=Math.abs(t);for(var r=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],s=["year","month","week","day","hour","minute","second"],i=0;i1&&(u+="s"),a>=1)return a+" "+u+" "+n}return"0 seconds "+n}})(),Oq=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),n=t.map(function(r){return r.charAt(0).toUpperCase()+r.substring(1,r.length)});return n.join(" ")}})(),Iq=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var n=String(t).replace(/[_-]+/g," ").toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}})(),Pq=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var n=t.match(/^rate_limited:(\d+)$/);if(n){var r=Math.max(0,Math.ceil((parseInt(n[1],10)-Date.now())/1e3));if(r<=0)return"Rate limited \u2014 resuming soon";var s=Math.floor(r/60),i=r%60;return"Rate limited \u2014 retrying in "+(s>0?s+"m "+i+"s":i+"s")}if(e[t])return e[t];if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var a=t.replace(/_/g," ");return a.charAt(0).toUpperCase()+a.slice(1)}return t}})(),Vq=(function(e){let t=r=>r.replace(/&/g,"&").replace(//g,">");function n(r,s){if(!s)return;let i=s.newPath&&s.newPath!=="/dev/null"?s.newPath:s.oldPath||"",a=s.oldPath==="/dev/null"?"added":s.newPath==="/dev/null"?"deleted":s.oldPath&&s.newPath&&s.oldPath!==s.newPath?"renamed":"modified";if(r.push('
'),r.push('
'+t(i)+''+a+"
"),s.lines.length){r.push('');for(let u of s.lines)r.push('");r.push("
'+(u.oldNo||"")+''+(u.newNo||"")+''+(u.kind==="add"?"+":u.kind==="remove"?"-":u.kind==="hunk"?"@":"")+''+t(u.text)+"
")}r.push("
")}return function(r){if(!r)return r;let s=[],i=null,a=0,u=0,f=()=>(i||(i={oldPath:"",newPath:"",lines:[]}),i),m=()=>{i&&(i.lines.length||i.oldPath||i.newPath)&&(n(s,i),i=null)},g=r.split(` -`);for(let w=0;we});function qq(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function Mq(e){return String(e??"").toUpperCase()}function $q(e,t,n=0){return(e||[]).slice(n,n+t)}function Lq(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Uq(e,t){if(!t)return e||[];let n=Array.isArray(t)?t:[t];return[...e||[]].sort((r,s)=>{for(let i of n){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((m,g)=>m?.[g],r),f=i.split(".").reduce((m,g)=>m?.[g],s);if(typeof u=="string"&&(u=u.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),u!==f)return(u==null?-1:f==null?1:ur[s])}function zq(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ql={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 is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please try again shortly.",pull_request_not_available:"This pull request is currently not available.",invalid_pullRequestId:"The pull request ID is invalid.",pullRequestId_already_used:"This pull request ID is already in use. Please choose a different one.",repository_not_specified:"A repository must be specified for this pull request.",pullRequestId_not_specified:"A pull request ID must be specified.",pullRequestId_is_not_a_number:"The source pull request ID must be a number.",options_not_provided:"Anonymization options are mandatory.",terms_not_specified:"Anonymization terms must be specified.",invalid_terms_format:"Terms are in an invalid format.",missing_content:"No content was provided to the anonymization preview.",unable_to_anonymize:"An error happened during the anonymization process. Please try later or report the issue.",non_supported_mode:"The selected anonymization mode is invalid, only download and stream are supported.",invalid_path:"The provided path is invalid or missing.",path_not_specified:"A file path must be specified.",path_not_defined:"The file path has not been resolved yet.",invalid_file_path:"The requested file path is not valid.",invalid_request:"The request is missing required fields or is malformed.",invalid_project_name:"Use a project name of up to 100 characters without line breaks or control characters.",no_file_selected:"Please select a file.",file_not_found:"The requested file is not found.",file_not_accessible:"The requested file is not accessible.",file_not_supported:"The file type is not supported. Anonymous GitHub cannot handle it.",file_too_big:"The file size exceeds the limit of Anonymous GitHub.",is_folder:"The path points to a folder.",folder_not_supported:"The path points to a folder. Please select a file.",unable_to_write_file:"Unable to write file on disk.",download_not_enabled:"Repository downloads are not enabled on this server.",unable_to_download:"The repository could not be downloaded. Please try again later.",s3_config_not_provided:"Object storage has not been configured on this server.",stats_unsupported:"Statistics are only supported in download mode.",branches_not_found:"The requested branch is not found.",readme_not_available:"No README for the repository is found.",page_not_supported_on_different_branch:"GitHub Pages is served from a different branch than the one selected. Pick the branch that GitHub Pages is configured to use.",page_not_activated:"GitHub Pages is not enabled on this repository. Enable it in the repository settings on GitHub before anonymizing.",is_removed:"This resource has been removed and is no longer available.",conf_name_missing:"A conference name is required.",conf_id_missing:"A conference ID is required.",conf_id_used:"This conference ID is already in use. Please choose a different one.",conf_start_date_missing:"A start date is required for the conference.",conf_end_date_missing:"An end date is required for the conference.",conf_start_date_invalid:"The start date must be before the end date.",conf_end_date_invalid:"The end date must be in the future.",invalid_plan:"The selected plan is not valid.",conference_not_found:"The requested conference could not be found.",conf_not_found:"The requested conference could not be found.",conf_not_activated:"The conference is not activated.",billing_missing:"Billing information is required for this plan.",billing_name_missing:"A billing name is required.",billing_email_missing:"A billing email is required.",billing_address_missing:"A billing address is required.",billing_city_missing:"A billing city is required.",billing_zip_missing:"A billing ZIP/postal code is required.",billing_country_missing:"A billing country is required.",queue_not_found:"The specified queue could not be found.",job_not_found:"The specified job could not be found in the queue.",error_retrying_job:"An error occurred while retrying the job.",gist_expired:"The gist is expired.",gist_not_ready:"Anonymous GitHub is still processing the gist, it can take several minutes.",gist_not_found:"The requested gist could not be found.",gist_not_available:"This gist is currently not available.",invalid_gistId:"The format of the gist ID is invalid.",gistId_not_specified:"A gist ID must be provided.",gistId_already_used:"The gist ID is already used.",missing_token:"An authentication token is required.",invalid_token:"The provided authentication token is invalid.",login_failed:"Login failed. Please try again.",server_error:"An unexpected server error occurred. Please try again later.",username_not_defined:"A username must be provided.",github_user_not_found:"The specified GitHub user could not be found.",cannot_coauthor_self:"You cannot add yourself as a co-author.",storage_write_size_mismatch:"The downloaded file was smaller than expected. The upstream source may have returned an incomplete response \u2014 please try again.",storage_read_error:"An error occurred while reading the file from storage \u2014 please try again.",upstream_error:"A temporary error occurred while fetching from GitHub \u2014 please try again.",token_expired:"Your GitHub access token has expired. Please log out and log in again to refresh it.",job_is_active:"This job is currently running \u2014 wait for it to finish or remove it first.",github_app_access_required:"Allow this repository on GitHub using the read-only access button, then retry. Organization access may require administrator approval.",github_app_reconnect_required:"Reconnect your GitHub App account to restore read-only access.",github_app_disabled:"New GitHub App connections are currently unavailable.",github_oauth_required:"Connect legacy GitHub OAuth to use this feature.",github_identity_mismatch:"Use the same GitHub account that you are signed in with here.",github_app_permissions_invalid:"The GitHub App must be configured with read-only permissions.",github_unavailable:"GitHub is temporarily unavailable. Please retry.",connection_changed:"The repository connection changed. Reload and try again.",repository_busy:"Wait for the repository operation to finish before changing its connection.",invalid_connection:"Select a supported GitHub connection.",github_oauth_disabled:"Legacy OAuth sign-in is currently disabled.",invalid_auth_state:"The authorization session expired. Please start again from Anonymous GitHub.",invalid_webhook_signature:"The webhook signature is invalid.",webhook_processing_failed:"Webhook processing failed. Retry the delivery.",github_app_authorization_cancelled:"GitHub authorization was cancelled.",github_account_link_required:"Verify your existing account with your previous GitHub connection. Future sign-ins will use the GitHub App.",github_app_refresh_busy:"GitHub credentials are being renewed. Please retry shortly.",github_grant_revocation_failed:"Unable to revoke the GitHub grant. Please retry.",another_login_required:"Connect and verify another sign-in method before disconnecting OAuth.",oauth_resources_remaining:"Some resources still require OAuth. Migrate or remove them before disconnecting.",invalid_github_path:"The GitHub repository path is invalid."},WARNINGS:{page_not_enabled_on_repo:"GitHub Pages is not enabled on this repository. Enable it in the repository's Settings \u2192 Pages on GitHub, then refresh.",page_branch_mismatch:"GitHub Pages on this repository is served from the '{{pageBranch}}' branch, but you selected '{{selectedBranch}}'. Switch the branch above to '{{pageBranch}}' to anonymize the Pages site.",folder_truncated:"This folder has more than 10,000 entries; only a partial listing is shown.",repo_truncated:"Some folders in this repository have too many files to be fully listed. Affected folders are marked with a warning icon.",submodules_not_included:"This repository uses git submodules. Submodule contents are not included in the anonymized repository and appear as empty folders."}};var Ml={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=et(null);return Vt(()=>{let r=[t.value][0];r.classList.add("html-doc");function s(){r.innerHTML="";let i=e.content;if(typeof i!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let u=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&u.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",u.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),r.appendChild(a);let f="";e.baseUrl&&(f=''),a.srcdoc=f+i}je(()=>e.content,s,{immediate:!0}),je(()=>e.baseUrl,s,{immediate:!0}),je(()=>e.allowScripts,s,{immediate:!0})}),()=>ke("html-doc",{ref:t})}};var $l={name:"pdfviewer",props:["src"],setup(e){let t=et(null);return Vt(()=>{let n=[t.value],r=400,s=[.5,.75,1,1.25,1.5,2,3],i=1e3,a=n[0];a.classList.add("pdf-viewer");let u=null,f=[],m=!1,g=null,w=1,h=1,b=0,E=0,k=612/792,R=0,D=null,T=new Map,P=0;function H(M){let v=T.get(M);v&&(v.cancelled=!0,v.task?.cancel?.(),T.delete(M));let S=M.querySelector("canvas");S&&(S.width=0,S.height=0),M.innerHTML="",delete M.dataset.state}let q=document.createElement("div");q.className="pdf-toolbar";let U=document.createElement("div");U.className="pdf-pages",U.tabIndex=0,U.setAttribute("aria-label","PDF pages"),a.appendChild(q),a.appendChild(U);function ie(M,v,S){let V=document.createElement("button");return V.type="button",V.className="pdf-toolbar-btn",V.title=v,V.setAttribute("aria-label",v),V.innerHTML='',V.addEventListener("click",S),V}let re=ie("fa-chevron-up","Previous page",function(){_e(h-1)}),C=ie("fa-chevron-down","Next page",function(){_e(h+1)}),O=document.createElement("input");O.type="text",O.className="pdf-toolbar-page",O.setAttribute("aria-label","Page number"),O.title="Page number \u2014 type a page and press Enter",O.addEventListener("keydown",function(M){M.key==="Enter"&&(_e(parseInt(O.value,10)),O.blur())}),O.addEventListener("blur",function(){O.value=String(h)});let G=document.createElement("span");G.className="pdf-toolbar-count";let J=ie("fa-search-minus","Zoom out",function(){_(s[Math.max(0,pe()-1)])}),ee=ie("fa-search-plus","Zoom in",function(){_(s[Math.min(s.length-1,pe()+1)])}),Q=document.createElement("button");Q.type="button",Q.className="pdf-toolbar-btn pdf-toolbar-zoom",Q.title="Reset zoom to fit the width",Q.setAttribute("aria-label","Reset zoom to fit the width"),Q.addEventListener("click",function(){_(1)}),q.appendChild(re),q.appendChild(C);let oe=document.createElement("span");oe.className="pdf-toolbar-group",oe.appendChild(O),oe.appendChild(G),q.appendChild(oe);let ue=document.createElement("span");ue.className="pdf-toolbar-group pdf-toolbar-right",ue.appendChild(J),ue.appendChild(Q),ue.appendChild(ee),q.appendChild(ue);function pe(){let M=0;for(let v=0;v=M,Q.textContent=Math.round(w*100)+"%",J.disabled=pe()===0,ee.disabled=pe()===s.length-1}function Ie(M){let v=f[M-1];v&&(U.scrollTop+=v.getBoundingClientRect().top-U.getBoundingClientRect().top)}function _e(M){if(!u||isNaN(M))return;let v=Math.min(Math.max(1,M),u.numPages);f[v-1]&&(Ie(v),h=v,b=v,E=Date.now()+800,le(),Ue())}function Ae(){if(!f.length||Date.now(){}),D=null),g&&(clearTimeout(g),g=null),u&&(u.destroy(),u=null),f=[],h=1,U.innerHTML="",le()}function Ve(){U.innerHTML="";let M=document.createElement("div");M.className="pdf-viewer-error",M.textContent="This PDF could not be displayed.",U.appendChild(M)}function Se(){let M=Math.max(120,U.clientWidth-24);return Math.round(Math.min(M,i)*w)}function Le(M,v,S){let V=window.devicePixelRatio||1,F=M.getViewport({scale:1}),B=parseFloat(v.style.width);if(!B)return;let L=M.getViewport({scale:B/F.width*V}),W=document.createElement("canvas");return W.width=Math.floor(L.width),W.height=Math.floor(L.height),W.style.width=B+"px",W.style.height=Math.floor(L.height/V)+"px",v.innerHTML="",v.appendChild(W),v.style.height=W.style.height,S.task=M.render({canvasContext:W.getContext("2d"),viewport:L}),S.task.promise}function Ue(){if(!u)return;let M=R,v=U.getBoundingClientRect(),S=v.top-r,V=v.top+U.clientHeight+r,F=f.map((L,W)=>({slot:L,i:W,rect:L.getBoundingClientRect()})).filter(L=>L.rect.top<=V&&L.rect.bottom>=S).sort((L,W)=>Math.abs(L.rect.top-v.top)-Math.abs(W.rect.top-v.top)).slice(0,6),B=new Set(F.map(L=>L.slot));for(let L of T.keys())B.has(L)||H(L);for(let{slot:L,i:W}of F){if(L.dataset.state||P>=2)continue;let x={cancelled:!1,task:null};T.set(L,x),P++,L.dataset.state="rendering";let Z;u.getPage(W+1).then(K=>{if(Z=K,!(x.cancelled||M!==R))return Le(Z,L,x)}).then(()=>{x.cancelled||M!==R||(L.dataset.state="done",b&&Date.now(){!x.cancelled&&M===R&&(L.dataset.state="failed")}).finally(()=>{P--,Z?.cleanup?.(),u&&Ue()})}}function z(){m||(m=!0,window.requestAnimationFrame(function(){m=!1,Ae(),Ue()}))}function ne(){let M=!1;function v(){M||(M=!0,Ue())}window.requestAnimationFrame(v),window.setTimeout(v,50)}function te(){R++,f.forEach(H);let M=Se();f.forEach(function(v){delete v.dataset.state,v.innerHTML="",v.style.width=M+"px",v.style.height=Math.round(M/k)+"px"}),Ue()}function _(M){if(!u||!f.length||M===w)return;let v=h;w=M,le(),te(),_e(v)}function I(){u&&(g&&clearTimeout(g),g=setTimeout(function(){g=null,u&&f.length&&te()},250))}function j(M){if(Ee(),!M)return;let v=R;D=pdfjsLib.getDocument({url:M,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),D.promise.then(function(S){if(v!==R){S.destroy();return}return u=S,u.getPage(1).then(function(V){if(v!==R)return;let F=V.getViewport({scale:1});F.width&&F.height&&(k=F.width/F.height);let B=Se();for(let L=1;L<=u.numPages;L++){let W=document.createElement("div");W.className="pdf-viewer-page",W.style.width=B+"px",W.style.height=Math.round(B/k)+"px",U.appendChild(W),f.push(W)}le(),ne()})}).catch(function(){v===R&&Ve()})}U.addEventListener("scroll",z,{passive:!0}),$(window).on("resize",I),le(),je(()=>e.src,j,{immediate:!0}),ro(function(){U.removeEventListener("scroll",z),$(window).off("resize",I),Ee()})}),()=>ke("pdfviewer",{ref:t})}};var jq={key:0,class:"quota-row quota-usage"},Bq={class:"quota-header"},Gq={class:"quota-label"},Wq={class:"project-type-svg","aria-hidden":"true"},Kq=["href"],Yq={key:0,class:"quota-percent"},Jq={key:1,class:"quota-unlimited-tag"},Qq={class:"quota-value"},Xq={key:0},Zq=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],xq={key:1,class:"quota-remaining"},e8={key:2,class:"quota-remaining quota-limit"};function Ll(e,t){return e.quota?(l(),d("div",jq,[(l(),d(X,null,ae([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],n=>o("div",{class:A(["quota-item","quota-"+e.quota[n.key].level]),key:n.key},[o("div",Bq,[o("span",Gq,[(l(),d("svg",Wq,[o("use",{href:"#"+n.icon},null,8,Kq)])),y(c(n.label),1)]),e.quota[n.key].unlimited?p("v-if",!0):(l(),d("span",Yq,c(e.fmt.number(e.quota[n.key].percent,0))+"% used",1)),e.quota[n.key].unlimited?(l(),d("span",Jq,"Unlimited")):p("v-if",!0)]),o("div",Qq,[o("strong",null,c(e.formatAmount(e.quota[n.key].used,n.kind)),1),e.quota[n.key].unlimited?p("v-if",!0):(l(),d("span",Xq," / "+c(e.formatAmount(e.quota[n.key].total,n.kind)),1))]),e.quota[n.key].unlimited?p("v-if",!0):(l(),d("div",{key:0,class:A(["quota-track","quota-"+e.quota[n.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":n.label+" quota","aria-valuenow":Math.min(e.quota[n.key].used,e.quota[n.key].total),"aria-valuemax":e.quota[n.key].total,"aria-valuetext":e.fmt.number(e.quota[n.key].percent,0)+"% used"},[e.quota[n?.key].unlimited?p("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Me({width:e.quota[n.key].percent+"%"})},null,4))],10,Zq)),!e.quota[n.key].unlimited&&e.quota[n.key].used=e.quota[n.key].total?(l(),d("p",e8,c(e.quota[n.key].used>e.quota[n.key].total?"Limit exceeded":"Limit reached"),1)):p("v-if",!0)],2)),64))])):p("v-if",!0)}var t8={props:["quota","fmt"],setup(e){return{formatAmount:(t,n)=>n==="bytes"?e.fmt.humanFileSize(t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Ll},o8=new Set(me),Fl={props:["content","terms","options"],setup(e){let t=et(null),n=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../")};return Vt(()=>{n(),je(()=>[e.content,e.terms,e.options],n,{deep:!0})}),()=>ke("markdown",{ref:t})}},s8={props:["file","terms","options"],setup(e){let t=et(null),n=()=>rt(()=>t.value?.querySelectorAll("pre code").forEach(r=>window.Prism?.highlightElement(r)));return Vt(n),je(()=>[e.file?.content,e.terms,e.options],n,{deep:!0}),()=>{let r=e.file||{},s=(r.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(s)||r.language==="Markdown")return ke("gist-file",{ref:t},ke(Fl,{content:r.content,terms:e.terms,options:e.options}));let i={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},a=(r.language||s||"none").toLowerCase();return ke("gist-file",{ref:t},ke("pre",{class:"line-numbers"},ke("code",{class:"language-"+(i[a]||a),key:r.content},r.content||"")))}}},n8={props:["file","content"],setup(e){let t=et(null),n=0,r,s=async()=>{let i=++n;r?.abort(),r=new AbortController;try{let a=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:r.signal}).then(u=>{if(!u.ok)throw Error("Notebook request failed");return u.json()});if(await Jt("notebook"),i!==n)return;t.value.innerHTML=DOMPurify.sanitize(nb.parse(a).render()),t.value.querySelectorAll("pre code").forEach(u=>window.Prism?.highlightElement(u))}catch(a){i===n&&a.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return Vt(()=>{s(),je(()=>[e.file,e.content],s)}),ro(()=>{n++,r?.abort()}),()=>ke("notebook",{ref:t})}},r8={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,r])=>r.code),n=t.reduce((r,[,s])=>r+s.code,0);return ke("loc",t.map(([r,s])=>ke("div",{class:"lang",title:`${r}: ${s.code.toLocaleString()} lines`,style:{width:s.code*100/n+"%",background:langColors[r]}})))}}},zl={Markdown:Fl,GistFile:s8,Notebook:n8,Loc:r8,HtmlDoc:Ml,QuotaUsage:t8,Pdfviewer:ii(async()=>(await Jt("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",$l))},Hl={async mounted(e,{value:t}){e._editorValue=t;try{if(await lr(),e._editorDisposed)return;let n=e._editorValue,r=ace.edit(e);e._editor=r,r.setValue(String(n.content??""),-1),Ul(e,n.options),e._editorCleanup=n.options?.onLoad?.(r)}catch(n){e._editorDisposed||(e.textContent=n.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Ul(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Ul(e,t={}){let n=o8.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+n),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var jl={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],n=new Set,r=new IntersectionObserver(s=>{s.forEach(a=>a.isIntersecting?n.add(a.target.id):n.delete(a.target.id));let i=t.find(a=>n.has(a.hash.slice(1)));t.forEach(a=>a.classList.toggle("active",a===i))},{rootMargin:"-20% 0px -60% 0px",threshold:0});rt(()=>t.forEach(s=>{let i=document.getElementById(s.hash.slice(1));i&&r.observe(i)})),e._observer=r},beforeUnmount(e){e._observer?.disconnect()}};function i8(e){let t={children:[]},n=new Map([["",t]]);function r(s){if(n.has(s))return n.get(s);let i=s.lastIndexOf("/"),a=r(i<0?"":s.slice(0,i)),u={name:s.slice(i+1),children:[]};return n.set(s,u),a.children.push(u),u}for(let s of e||[]){let i=s.path?`${s.path}/${s.name}`:s.name;s.size==null?r(i):r(s.path||"").children.push({...s})}return t.children}var Bl={name:"FileTree",props:["file","parent","searchQuery","searchResults","page"],setup(e){let t=Pa(),n=et(null),r=He(Object.create(null)),s=null,i=ot(()=>i8(e.file)),a=()=>"/"+(Array.isArray(t.params.path)?t.params.path.join("/"):t.params.path||"");je(()=>[t.params.repoId,t.params.path],()=>{let h="";a().split("/").filter(Boolean).forEach(b=>{h+="/"+b,r[h]=!0})},{immediate:!0});let u=ot(()=>{if(!e.searchQuery||!e.searchResults)return null;let h=new Set,b=new Set;return e.searchResults.forEach(E=>{h.add(E.path?`${E.path}/${E.name}`:E.name);let k="";(E.path||"").split("/").filter(Boolean).forEach(R=>{k=k?k+"/"+R:R,b.add(k)})}),{files:h,folders:b}}),f=()=>[...n.value.querySelectorAll("li > a")],m=h=>{n.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),h&&(s=h.dataset.path,h.classList.add("tree-focused"),h.scrollIntoView?.({block:"nearest"}),n.value.focus())};function g(h){let b=f(),E=n.value.querySelector(".tree-focused")||b[0],k=b.indexOf(E);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(h.key)||(h.preventDefault(),h.key==="ArrowDown"&&m(b[(k+1)%b.length]),h.key==="ArrowUp"&&m(b[(k-1+b.length)%b.length]),!E))return;let R=E.closest("li");h.key==="ArrowRight"&&R.classList.contains("folder")&&(R.classList.contains("open")?m(R.querySelector(":scope > ul > li > a")):E.click()),h.key==="ArrowLeft"&&(R.classList.contains("folder")&&R.classList.contains("open")?E.click():m(R.parentElement.closest("li.folder")?.querySelector(":scope > a"))),h.key==="Enter"&&E.click()}function w(h,b=""){let E=[...h].sort((k,R)=>+!!R.children-+!!k.children||k.name.localeCompare(R.name));return ke("ul",E.flatMap(k=>{let R=k,D=R.name,T=(b+"/"+D).slice(1);if(u.value&&!u.value.files.has(T)&&!u.value.folders.has(T))return[];for(;R.children?.length===1;)R=R.children[0],D+="/"+R.name;let P=b+"/"+D,H=!!R.children,q=u.value?r[P]!==!1:!!r[P],U=H&&e.page?.options?.truncatedFolders?.includes(P.slice(1)),ie=e.page?.fileCounts?.[P.slice(1)]||0,re=ke("span",{class:H?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},H?ke("svg",{viewBox:"0 0 14 12",focusable:"false"},ke("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),C=ke("span",{class:"tree-name"},D),O=J=>{m(J.currentTarget),H&&(J.preventDefault(),r[P]=!q,r[P]&&!R.children.length&&e.page.getFiles(P.slice(1)),rt(()=>m(f().find(ee=>ee.dataset.path===s))))},G=ke("a",{"data-path":P,href:H?void 0:`/r/${encodeURIComponent(t.params.repoId)}${encodePathForUrl(P)}`,class:{"tree-focused":s===P},onClick:O},[H?ke("span",{class:"tree-toggle"}):b?ke("span",{class:"tree-spacer"}):null,re,C,U?ke("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},ke("i",{class:"fas fa-exclamation-triangle"})):null,H&&ie?ke("span",{class:"tree-count"},ie):null]);return ke("li",{key:P,class:{file:!0,folder:H,open:q,active:a()===P,truncated:U},title:H?"":`Size: ${humanFileSize(R.size||0)}`},[G,H&&q?w(R.children,P):null])}))}return()=>ke("tree",{ref:n,tabindex:0,onKeydown:g},e.file?.length?u.value?.files.size===0?ke("div",{class:"tree-search-empty"},"No files found"):w(i.value):"Empty repository")}};function Wl(){return He({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function Kl(e,t){if(!e[t]){let n=Wl();Object.defineProperty(n,"invalid",{get(){return Object.values(n.errors).some(Boolean)||Object.keys(n).some(r=>r!=="invalid"&&n[r]&&typeof n[r]=="object"&&n[r].invalid)}}),e[t]=n}return e[t]}var Yl={beforeMount(e,{value:t}){e._formState=Kl(t,e.name),e.addEventListener("submit",n=>n.preventDefault())}};function a8(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Gl(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?a8(t):t??""),nr(e)}function nr(e){let t=e._field.validation;if(!t)return;let n=e.validity;for(let[r,s]of Object.entries({required:n.valueMissing,pattern:n.patternMismatch,min:n.rangeUnderflow,max:n.rangeOverflow,date:n.badInput,email:n.typeMismatch&&e.type==="email",url:n.typeMismatch&&e.type==="url"}))t.setValidity(r,e.disabled||!s)}var Jl={beforeMount(e,{value:t}){var a;let n=t.form&&Kl(t.state,t.form),r=n&&e.name?n[a=e.name]||(n[a]=Wl()):null;e._field={binding:t,validation:r,timer:null};let s=()=>{clearTimeout(e._field.timer),e._field.timer=null;let u=e._field.binding,f=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(f=e.value===""?null:Number(e.value)),e.type==="date"&&(f=e.value?new Date(e.value+"T00:00:00"):null),r){r.setDirty();for(let m of Object.keys(r.errors))r.setValidity(m,!0)}u.set(f),nr(e),u.change?.()}};e._field.commit=s;let i=u=>{let f=e._field.binding.options?.debounce||0,m=typeof f=="number"?f:f[u.type]??f.default??0;clearTimeout(e._field.timer),m?e._field.timer=setTimeout(s,m):s()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",i),e.addEventListener("blur",()=>{r&&(r.touched=!0),e._field.timer&&s()})},mounted:Gl,updated(e,{value:t}){e._field.binding=t,Gl(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:n}=e._field,r=t.form&&t.state[t.form];r&&r[e.name]===n&&delete r[e.name]}};function Ql(e,t){let n=e.target.closest("form");if(n?._formState&&(n._formState.submitted=!0),n?.querySelectorAll("input, select, textarea").forEach(r=>{r._field?.timer&&r._field.commit(),r._field&&nr(r)}),n&&!n.checkValidity()){let r=n.querySelector(":invalid");r?.scrollIntoView?.({block:"center"}),r?.focus(),n.reportValidity();return}return t()}var Xl=Symbol("session"),l8=/^\/(w|api|github)(\/|$)/;function Zl(e,t={}){let n=e?.split(".").reduce((r,s)=>r?.[s],ql);return String(n??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(r,s)=>t[s]??"")}var d8={...sr,translate:Zl};function u8(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function c8(e="#app",t={}){!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let n=new Map,r=Il(t.fetch),s,i;function a(){let m=ct(),g={url(h){return h===void 0?i.currentRoute.value.fullPath:(i.push(h),g)},path(){return i.currentRoute.value.path},search(){return i.currentRoute.value.query}},w=new Proxy({},{get(h,b){let E=i.currentRoute.value.params[b];return Array.isArray(E)?E.join("/"):E}});return{http:r,...m,location:g,params:w,window,promises:Pl,html:{trustAsHtml:h=>h},translate:(h,b)=>Promise.resolve(Zl(h,b)),quotaService:Vl(r)}}function u(m){return{name:m.template,setup(){let g=xn(ut(Xl),n);m.setup(g,a()),Ol(m.template,g);let w=[];return()=>tn[m.template](g,w)}}}i=Ia({history:t.history||Ta(),routes:tl.map(m=>m.redirect?m:{path:m.path,component:u(m),meta:{title:m.title,preserveExplorer:m.preserveExplorer}})});let f=Qi({setup(){s=xn(null,n),s.fmt=d8,s.window=window,s.Math=Math,s.sanitize=h=>DOMPurify.sanitize(h??""),s.submitForm=Ql,s.safeUrl=u8;let m=a();qa(s,m.http,m.location,m.timeout),no(Xl,s),je(()=>s.title,h=>{document.title=h||"Anonymous GitHub"});let g=[],w=h=>{let b=h.target.closest?.("a[href]");if(h.defaultPrevented||h.button!==0||h.metaKey||h.ctrlKey||h.shiftKey||h.altKey||!b||b.hasAttribute("download")||b.target&&b.target!=="_self"||b.dataset.toggle||b.getAttribute("href").startsWith("#"))return;let k=new URL(b.href,window.location.href);k.origin!==window.location.origin||l8.test(k.pathname)||(h.preventDefault(),i.push(k.pathname+k.search+k.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",w),ro(()=>document.removeEventListener("click",w)),()=>[Al(s,[]),ke("header",{class:"app-header"},tn["partials/header.htm"](s,g)),ke("main",{class:"app-view align-items-stretch w-100"},ke(Zn,null,{default:({Component:h,route:b})=>h?ke(h,{key:b.meta.preserveExplorer?b.matched[0]?.path:b.path}):null})),ke("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},s.toasts.map((h,b)=>ke("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:b},[ke("div",{class:"toast-header"},[ke("strong",{class:"mr-auto"},h.title),ke("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>s.removeToast(h)},"\xD7")]),ke("div",{class:"toast-body"},h.body)])))]}});for(let[m,g]of Object.entries(zl))f.component(m,g);return f.component("Tree",Bl),f.component("PartialView",{props:["name","state"],setup(m){let g=[];return()=>tn[m.name](m.state,g)}}),f.directive("field",Jl),f.directive("form",Yl),f.directive("code-editor",Hl),f.directive("paper-scrollspy",jl),f.use(i),i.beforeEach(async m=>{s?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(m.path)&&await Jt("markdown"),/^\/(r|repository)\//.test(m.path)&&await Jt("org")}),i.afterEach(m=>{if(!s)return;s.title=m.meta.title,s.emit("routeChange",{title:m.meta.title}),s.emit("routeUpdate",{title:m.meta.title});let g=document.querySelector(".app-view");!m.meta.preserveExplorer&&g&&(g.scrollTop=0)}),f.mount(e),{app:f,router:i,state:s}}document.querySelector("#app")&&(window.anonymousApp=c8());})(); +jane.smith@example.org`},QV={id:"termsHelp",class:"form-text text-muted"},XV={class:"invalid-feedback"},ZV={id:"settings-display",class:"paper-settings-section"},xV={class:"form-group paper-check-list"},e5={class:"form-check"},t5={class:"form-check-input",type:"checkbox",id:"link",name:"link"},o5={class:"form-check"},s5={class:"form-check-input",type:"checkbox",id:"image",name:"image"},n5={class:"form-check"},r5={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},i5={class:"form-check"},a5={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},l5={id:"settings-features",class:"paper-settings-section"},d5={class:"form-group paper-check-list"},u5={class:"form-check"},c5={class:"form-check-input",type:"checkbox",id:"page",name:"page"},p5={class:"form-check"},f5={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},m5={class:"form-check"},h5={class:"form-check-input",type:"checkbox",id:"update",name:"update"},v5={class:"form-group"},g5={class:"form-control",id:"mode",name:"mode"},y5={class:"form-text text-muted"},b5={id:"settings-expiration",class:"paper-settings-section"},w5={class:"form-group"},k5={class:"form-control",id:"expiration",name:"expiration"},E5={key:0,class:"draft-status",role:"status"},C5={key:1,class:"draft-status"},_5={class:"paper-settings-footer"},S5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},N5=["textContent"],D5={class:"paper-settings-actions"},R5=["disabled"],T5={key:0,class:"ui-icon mr-1","aria-hidden":"true"},A5={id:"settings-account",class:"paper-settings-section"},O5={class:"paper-account-card"},I5=["src"],P5={class:"paper-account-identity"},V5={class:"paper-account-name"},q5={class:"paper-danger-zone"},M5={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},L5=["textContent"],$5=["disabled"];function Ol(e,t){let s=We("quota-usage"),r=be("paper-scrollspy"),n=be("field"),i=be("form");return l(),d("div",FV,[t[52]||(t[52]=ce('
My work \xA0/\xA0 Settings

Your settings

Defaults applied to every new anonymization, your quotas, and your account.

',3)),o("div",zV,[N((l(),d("aside",HV,[...t[4]||(t[4]=[ce('
On this page
',2)])])),[[r]]),o("div",BV,[p(" Account usage shares the dashboard component. "),o("section",jV,[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",GV,[(l(),d(X,null,re([1,2,3],(a,u)=>o("div",WV,[...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",KV,[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",YV,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",JV,null,512),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",QV,[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",XV," Terms are in an invalid format ",512),[[Y,e.defaultsForm?.terms?.errors?.format]])])]),o("section",ZV,[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",xV,[o("div",e5,[N(o("input",t5,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",o5,[N(o("input",s5,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[17]||(t[17]=o("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[18]||(t[18]=o("small",{class:"form-text text-muted"},"Images are shown as is. They are not anonymized.",-1))]),o("div",n5,[N(o("input",r5,null,512),[[n,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[19]||(t[19]=o("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[20]||(t[20]=o("small",{class:"form-text text-muted"},"PDFs are shown as is. They are not anonymized.",-1))]),o("div",i5,[N(o("input",a5,null,512),[[n,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[21]||(t[21]=o("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[22]||(t[22]=o("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])])]),o("section",l5,[t[33]||(t[33]=o("div",{class:"paper-section-eyebrow"},"Features",-1)),o("div",d5,[o("div",u5,[N(o("input",c5,null,512),[[n,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=o("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[26]||(t[26]=o("small",{class:"form-text text-muted"},"Serve an anonymized copy of the repository's GitHub Pages site. Only pages built from the anonymized branch are supported.",-1))]),o("div",p5,[N(o("input",f5,null,512),[[n,{state:e.viewState,set:a=>{e.options.loc=a},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=o("label",{class:"form-check-label",for:"loc"},"Lines of code",-1)),t[28]||(t[28]=o("small",{class:"form-text text-muted"},"Show the line count of the repository in the explorer.",-1))]),o("div",m5,[N(o("input",h5,null,512),[[n,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=o("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[30]||(t[30]=o("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))])]),o("div",v5,[t[32]||(t[32]=o("label",{class:"paper-field-label",for:"mode"},"Fetch mode",-1)),N((l(),d("select",g5,[...t[31]||(t[31]=[o("option",{value:"GitHubStream",selected:""},"Stream from GitHub on demand",-1),o("option",{value:"GitHubDownload"},"Download to Anonymous GitHub",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.mode=a},value:e.options?.mode,form:"defaultsForm",options:{}}]]),o("small",y5," Download is faster for reviewers and enables every feature. Streaming is the only option above "+c(e.fmt?.humanFileSize(e.site_options?.MAX_REPO_SIZE*1024))+". ",1)])]),o("section",b5,[t[37]||(t[37]=o("div",{class:"paper-section-eyebrow"},"Expiration",-1)),o("div",w5,[t[35]||(t[35]=o("label",{class:"paper-field-label",for:"expiration"},"When an anonymization expires",-1)),N((l(),d("select",k5,[...t[34]||(t[34]=[o("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),o("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=o("small",{class:"form-text text-muted"}," The expiration date itself is chosen per anonymization. Redirecting reveals the source repository, so pick it only once the review is over. ",-1))])]),e.draftRestored?(l(),d("div",E5,[t[38]||(t[38]=b("Your unsaved draft was restored. ",-1)),o("button",{type:"button",class:"draft-discard",onClick:t[0]||(t[0]=a=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(l(),d("div",C5,[b(c(e.draftSaved?"Draft saved in this tab for 30 minutes.":"Unsaved changes. Keep this tab open until you save.")+" ",1),o("button",{type:"button",class:"draft-discard",onClick:t[1]||(t[1]=a=>e.discardDraft())},c(e.isUpdate?"Restore saved settings":"Discard changes"),1)])):p("v-if",!0),o("div",_5,[e.error?(l(),d("div",S5,[t[39]||(t[39]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),t[40]||(t[40]=b()),o("span",{textContent:c(e.error)},null,8,N5)])):p("v-if",!0),o("div",D5,[o("button",{id:"save",type:"submit",class:"btn btn-ink",disabled:e.saving},[e.message?(l(),d("svg",T5,[...t[41]||(t[41]=[o("use",{href:"#ui-icon-check"},null,-1)])])):p("v-if",!0),b(c(e.saving?"Saving\u2026":e.message?"Saved":"Save defaults"),1)],8,R5),t[42]||(t[42]=o("span",{class:"paper-settings-hint"},"Applies to new anonymizations only. Existing ones keep their settings.",-1))])])],32)),[[i,e.viewState]]),o("section",A5,[t[50]||(t[50]=o("div",{class:"paper-section-eyebrow"},"Account",-1)),o("div",O5,[e.user?.photo?(l(),d("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,I5)):p("v-if",!0),o("div",P5,[o("div",V5,"@"+c(e.user?.username),1),t[43]||(t[43]=o("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[44]||(t[44]=o("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),t[51]||(t[51]=o("a",{class:"paper-settings-connection-link",href:"/connections"},[o("i",{class:"fab fa-github","aria-hidden":"true"}),o("span",null,[b("GitHub connections"),o("small",null,"Manage repository access and legacy OAuth.")]),o("span",{"aria-hidden":"true"},"\u2192")],-1)),o("div",q5,[t[48]||(t[48]=o("div",{class:"paper-danger-head"},"Delete account",-1)),t[49]||(t[49]=o("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(l(),d("div",M5,[t[45]||(t[45]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-info"})],-1)),t[46]||(t[46]=b()),o("span",{textContent:c(e.deleteError)},null,8,L5)])):p("v-if",!0),o("button",{type:"button",class:"btn btn-outline-danger",onClick:t[3]||(t[3]=a=>e.deleteAccount()),disabled:e.deletingAccount},[t[47]||(t[47]=o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-trash"})],-1)),b(c(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,$5)])])])])])}var U5={class:"pr-page"},F5={class:"container paper-page pr-page-inner"},z5={class:"pr-header"},H5={class:"pr-title-row"},B5={class:"paper-page-title pr-title"},j5=["textContent"],G5={key:1,class:"text-muted"},W5=["href"],K5={class:"pr-header-meta"},Y5={key:0,class:"pr-meta-item"},J5=["textContent"],Q5={key:1,class:"pr-meta-item"},X5=["textContent"],Z5={key:2,class:"pr-meta-item"},x5=["textContent"],eq={key:0,class:"pr-body-card"},tq={key:1,class:"paper-tabs",role:"tablist"},oq=["aria-selected","tabindex"],sq=["aria-selected","tabindex"],nq=["textContent"],rq={class:"paper-tab-content"},iq={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},aq=["innerHTML"],lq={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},dq={class:"pr-comments"},uq={class:"pr-comment"},cq={class:"pr-comment-head"},pq={key:0,class:"pr-comment-author"},fq=["textContent"],mq=["textContent"],hq={key:0,class:"pr-comment-body"},vq={key:0,class:"paper-table-empty"};function Il(e,t){let s=We("markdown");return l(),d("div",U5,[o("div",F5,[t[17]||(t[17]=o("div",{class:"paper-crumbs"},[o("a",{href:"/dashboard"},"Reviewer"),b(" \xA0/\xA0 "),o("span",{class:"here"},"Pull request")],-1)),o("header",z5,[o("div",H5,[o("h1",B5,[e.details?.title?(l(),d("span",{key:0,textContent:c(e.details?.title)},null,8,j5)):p("v-if",!0),e.details?.title?p("v-if",!0):(l(),d("span",G5,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),o("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,W5)):p("v-if",!0)]),o("div",K5,[o("span",{class:A(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[o("span",{class:A(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),b(" "+c(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(l(),d("span",Y5,[t[5]||(t[5]=o("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=b()),o("span",{textContent:c(e.details?.baseRepositoryFullName)},null,8,J5)])):p("v-if",!0),e.details?.updatedDate?(l(),d("span",Q5,[t[7]||(t[7]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=b()),o("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,X5)])):p("v-if",!0),e.details?.anonymizeDate?(l(),d("span",Z5,[t[9]||(t[9]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=b(" Anonymized ",-1)),o("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,x5)])):p("v-if",!0)])]),e.details?.body?(l(),d("section",eq,[t[11]||(t[11]=o("div",{class:"paper-section-eyebrow"},"Description",-1)),Ce(s,{content:e.details?.body},null,8,["content"])])):p("v-if",!0),e.details?.diff||e.details?.comments?(l(),d("nav",tq,[e.details?.diff?(l(),d("button",{key:0,class:A(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=r=>e.previewTabKeydown(r)),onClick:t[1]||(t[1]=r=>e.tabState.active="diff")},[...t[12]||(t[12]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-code"})],-1),b(" Diff ",-1)])],42,oq)):p("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:A(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=r=>e.previewTabKeydown(r)),onClick:t[3]||(t[3]=r=>e.tabState.active="comments")},[t[13]||(t[13]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1)),o("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,nq)],42,sq)):p("v-if",!0)])):p("v-if",!0),o("div",rq,[e.details?.diff&&e.tabState?.active=="diff"?(l(),d("div",iq,[o("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,aq)])):p("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",lq,[o("ul",dq,[(l(!0),d(X,null,re(e.details?.comments,(r,n)=>(l(),d("li",uq,[o("div",cq,[r?.author?(l(),d("span",pq,[t[14]||(t[14]=o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=b(" @",-1)),o("span",{textContent:c(r?.author)},null,8,fq)])):p("v-if",!0),r?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(r?.updatedDate))},null,8,mq)):p("v-if",!0)]),r?.body?(l(),d("div",hq,[Ce(s,{content:r?.body},null,8,["content"])])):p("v-if",!0)]))),256)),e.details?.comments?.length?p("v-if",!0):(l(),d("li",vq,[...t[16]||(t[16]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-comment"})],-1),o("span",null,"No comments on this pull request.",-1)])]))])])):p("v-if",!0)])])])}var gq={class:"container paper-page status-page"},yq={class:"d-flex align-items-end justify-content-between flex-wrap",style:{gap:"12px"}},bq={class:"paper-page-title"},wq=["textContent"],kq={key:1},Eq={class:"paper-settings-section"},Cq={key:0,class:"paper-ratelimit-card",role:"status"},_q={class:"paper-error-msg"},Sq=["aria-valuenow"],Nq={class:"paper-progress-label"},Dq=["textContent"],Rq={key:0},Tq=["textContent"],Aq={class:"paper-progress-pct"},Oq={key:2,class:"paper-error-card",role:"alert"},Iq={key:0,class:"paper-error-msg"},Pq={key:1,class:"paper-error-msg"},Vq={class:"paper-error-actions"},qq=["href"],Mq={class:"paper-detail-grid"},Lq={class:"detail-value"},$q=["href"],Uq={key:0,class:"detail-label"},Fq={key:1,class:"detail-value"},zq=["href"],Hq={key:3,class:"anonymize-submit-bar"},Bq=["href"],jq=["href"];function Pl(e,t){return l(),d("div",gq,[t[15]||(t[15]=o("div",{class:"paper-crumbs"},[b("Anonymization \xA0/\xA0 "),o("span",{class:"here"},"Status")],-1)),o("div",yq,[o("div",null,[o("h1",bq,[t[0]||(t[0]=b("Status of ",-1)),o("em",null,c(e.repoId),1)]),t[1]||(t[1]=o("p",{class:"paper-page-lede"},"Track progress as your anonymization is prepared.",-1))]),o("span",{class:A(["status-pill",{"status-pill-ready":e.repo?.status=="ready","status-pill-error":e.repo?.status=="error","status-pill-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-pill-ratelimit":e.rateLimitResetAt}])},[o("span",{class:A(["status-dot",{"status-ready":e.repo?.status=="ready","status-error":e.repo?.status=="error","status-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-ratelimit":e.rateLimitResetAt}])},null,2),e.rateLimitResetAt?p("v-if",!0):(l(),d("span",{key:0,textContent:c(e.fmt?.title(e.repo?.status))},null,8,wq)),e.rateLimitResetAt?(l(),d("span",kq,"Rate limited")):p("v-if",!0)],2)]),o("section",Eq,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Progress",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},[b(" The repository will take a few minutes to get ready, depending on its size. Visit the "),o("a",{href:"/faq"},"FAQ"),b(" for more information. ")],-1)),e.rateLimitResetAt?(l(),d("div",Cq,[t[4]||(t[4]=ce('
Temporarily paused
GitHub API rate limit reached
',1)),o("p",_q,[t[2]||(t[2]=b("Anonymization will resume automatically in ",-1)),o("strong",null,c(e.rateLimitCountdown),1),t[3]||(t[3]=b(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):p("v-if",!0),e.repo?.status!="error"&&!e.rateLimitResetAt?(l(),d("div",{key:1,class:A(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[o("div",{class:"paper-progress-bar",style:Me("width: "+e.progress+"%;")},null,4),o("div",Nq,[o("span",{textContent:c(e.fmt?.title(e.repo?.status))},null,8,Dq),e.repo?.statusMessage?(l(),d("span",Rq,[t[5]||(t[5]=b("\xA0\xB7\xA0",-1)),o("span",{textContent:c(e.repo?.statusMessage)},null,8,Tq)])):p("v-if",!0),o("span",Aq,c(e.progress||0)+"%",1)])],10,Sq)):p("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(l(),d("div",Oq,[t[8]||(t[8]=ce('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(l(),d("p",Iq,c(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):p("v-if",!0),e.repo?.statusMessage?p("v-if",!0):(l(),d("p",Pq,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),t[9]||(t[9]=o("ul",{class:"paper-error-hints"},[o("li",null,"Make sure the source URL points to a repository or pull request you can access."),o("li",null,"Check that the chosen branch and commit still exist on GitHub."),o("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),o("div",Vq,[o("a",{class:"btn btn-ink",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[6]||(t[6]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-edit"})],-1),b(" Edit anonymization",-1)])],8,qq),t[7]||(t[7]=ce(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):p("v-if",!0),o("div",Mq,[t[10]||(t[10]=o("div",{class:"detail-label"},"Repository",-1)),o("div",Lq,[o("a",{target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},"/r/"+c(e.repoId)+"/",9,$q)]),e.repo?.options?.page?(l(),d("div",Uq,"GitHub Page")):p("v-if",!0),e.repo?.options?.page?(l(),d("div",Fq,[o("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"/w/"+c(e.repoId)+"/",9,zq)])):p("v-if",!0)]),e.repo?.status=="ready"?(l(),d("div",Hq,[o("a",{class:"btn btn-ink",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[11]||(t[11]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#project-icon-eye"})],-1),b(" Go to anonymized repository ",-1)])],8,Bq),e.repo?.options?.page?(l(),d("a",{key:0,class:"btn",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[12]||(t[12]=[o("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-globe"})],-1),b(" Go to anonymized GitHub page ",-1)])],8,jq)):p("v-if",!0)])):p("v-if",!0)]),t[16]||(t[16]=ce('
Support Anonymous GitHub

A small team keeps this running. If it helps you, please consider contributing back \u2014 in code, ideas, or coffee.

',1))])}var sn={"partials/connections.htm":il,"partials/signin.htm":al,"partials/404.htm":ll,"partials/admin/conferences.htm":dl,"partials/admin/errors.htm":ul,"partials/admin/overview.htm":cl,"partials/admin/queues.htm":pl,"partials/admin/repositories.htm":fl,"partials/admin/user.htm":ml,"partials/admin/users.htm":hl,"partials/anonymize.htm":vl,"partials/anonymizePullRequest.htm":gl,"partials/claim.htm":yl,"partials/conference.htm":bl,"partials/conferences.htm":wl,"partials/dashboard.htm":kl,"partials/explorer.htm":El,"partials/faq.htm":Cl,"partials/gist.htm":_l,"partials/header.htm":Sl,"partials/home.htm":Nl,"partials/loading.htm":Dl,"partials/newConference.htm":Rl,"partials/pageView.htm":Tl,"partials/pr-dashboard.htm":Al,"partials/profile.htm":Ol,"partials/pullRequest.htm":Il,"partials/status.htm":Pl};var Gq={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function Vl(e,t){return l(),d("svg",Gq,[...t[0]||(t[0]=[ce('',1)])])}function ql(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let r={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(r){let n=ot(()=>t.fmt.orderBy(t.fmt.filter(r[1](),t[r[2]]),t.orderBy));Object.defineProperty(t,r[0],{configurable:!0,get:()=>n.value})}}function Ml(e=(...t)=>fetch(...t)){async function t(r,n,i,a={}){let u=new URL(n,window.location.href);for(let[v,k]of Object.entries(a.params||{}))if(k!=null)for(let m of Array.isArray(k)?k:[k])u.searchParams.append(v,typeof m=="object"?JSON.stringify(m):m);let f=new AbortController,h;a.timeout?.then?a.timeout.then(()=>f.abort()):a.timeout&&(h=setTimeout(()=>f.abort(),a.timeout));try{let v={Accept:"application/json, text/plain, */*",...a.headers},k=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);k&&u.origin===window.location.origin&&(v["X-XSRF-TOKEN"]=decodeURIComponent(k[1]));let m;i!==void 0&&(i instanceof FormData?m=i:(v["Content-Type"]||(v["Content-Type"]="application/json;charset=utf-8"),m=JSON.stringify(i)));let y=await e(u.href,{method:r,headers:v,body:m,credentials:"same-origin",signal:f.signal}),E=await y.text(),w=E;if(a.transformResponse)w=a.transformResponse(E);else if(E&&(/json/i.test(y.headers.get("content-type")||"")||/^[\[{]/.test(E.trim())))try{w=JSON.parse(E)}catch{}let R={data:w,status:y.status,headers:D=>y.headers.get(D)};if(!y.ok)throw R;return R}catch(v){throw v.name==="AbortError"?{status:-1,data:null}:v}finally{clearTimeout(h)}}let s={};for(let r of["get","delete","head"])s[r]=(n,i)=>t(r.toUpperCase(),n,void 0,i);for(let r of["post","put","patch"])s[r]=(n,i,a)=>t(r.toUpperCase(),n,i,a);return s}var Ll={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}};var $l=function(e){function t(s){return s=s||{used:0,total:0},s.unlimited=!s.total,s.percent=s.unlimited?0:Math.min(100,s.used*100/s.total),s.level=s.unlimited?"unlimited":s.percent>=95?"danger":s.percent>=80?"warn":"ok",s}return{decorate:t,load:function(){return e.get("/api/user/quota").then(s=>{let r=s.data||{};return r.storage=t(r.storage),r.file=t(r.file),r.repository=t(r.repository),r})}}};var rr={};nd(rr,{bigNum:()=>Kq,date:()=>nM,diff:()=>Zq,filter:()=>oM,humanFileSize:()=>Wq,humanTime:()=>Yq,limitTo:()=>tM,number:()=>xq,orderBy:()=>sM,plural:()=>rM,statusLabel:()=>Qq,statusMsg:()=>Xq,title:()=>Jq,uppercase:()=>eM});var Wq=e=>window.humanFileSize(e),Kq=(function(){return function(t){let s=Number(t)||0,r=Math.abs(s);return r<1e3?String(s):r<1e4?(s/1e3).toFixed(1).replace(/\.0$/,"")+"k":r<1e6?Math.round(s/1e3)+"k":r<1e7?(s/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(s/1e6)+"M"}})(),Yq=(function(){return function(t){if(!t)return"never";t instanceof Date&&(t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(t=Math.round((Date.now()-new Date(t))/1e3));var s=t<0?"from now":"ago";if(Math.abs(t)>7200*24){let f=new Date;return f.setSeconds(f.getSeconds()-t),"on "+f.toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}t=Math.abs(t);for(var r=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],n=["year","month","week","day","hour","minute","second"],i=0;i1&&(u+="s"),a>=1)return a+" "+u+" "+s}return"0 seconds "+s}})(),Jq=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),s=t.map(function(r){return r.charAt(0).toUpperCase()+r.substring(1,r.length)});return s.join(" ")}})(),Qq=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var s=String(t).replace(/[_-]+/g," ").toLowerCase();return s.charAt(0).toUpperCase()+s.slice(1)}})(),Xq=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var s=t.match(/^rate_limited:(\d+)$/);if(s){var r=Math.max(0,Math.ceil((parseInt(s[1],10)-Date.now())/1e3));if(r<=0)return"Rate limited \u2014 resuming soon";var n=Math.floor(r/60),i=r%60;return"Rate limited \u2014 retrying in "+(n>0?n+"m "+i+"s":i+"s")}if(e[t])return e[t];if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var a=t.replace(/_/g," ");return a.charAt(0).toUpperCase()+a.slice(1)}return t}})(),Zq=(function(e){let t=r=>r.replace(/&/g,"&").replace(//g,">");function s(r,n){if(!n)return;let i=n.newPath&&n.newPath!=="/dev/null"?n.newPath:n.oldPath||"",a=n.oldPath==="/dev/null"?"added":n.newPath==="/dev/null"?"deleted":n.oldPath&&n.newPath&&n.oldPath!==n.newPath?"renamed":"modified";if(r.push('
'),r.push('
'+t(i)+''+a+"
"),n.lines.length){r.push('');for(let u of n.lines)r.push('");r.push("
'+(u.oldNo||"")+''+(u.newNo||"")+''+(u.kind==="add"?"+":u.kind==="remove"?"-":u.kind==="hunk"?"@":"")+''+t(u.text)+"
")}r.push("
")}return function(r){if(!r)return r;let n=[],i=null,a=0,u=0,f=()=>(i||(i={oldPath:"",newPath:"",lines:[]}),i),h=()=>{i&&(i.lines.length||i.oldPath||i.newPath)&&(s(n,i),i=null)},v=r.split(` +`);for(let k=0;ke});function xq(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function eM(e){return String(e??"").toUpperCase()}function tM(e,t,s=0){return(e||[]).slice(s,s+t)}function oM(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function sM(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((h,v)=>h?.[v],r),f=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),u!==f)return(u==null?-1:f==null?1:ur[n])}function rM(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var Ul={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 is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please try again shortly.",pull_request_not_available:"This pull request is currently not available.",invalid_pullRequestId:"The pull request ID is invalid.",pullRequestId_already_used:"This pull request ID is already in use. Please choose a different one.",repository_not_specified:"A repository must be specified for this pull request.",pullRequestId_not_specified:"A pull request ID must be specified.",pullRequestId_is_not_a_number:"The source pull request ID must be a number.",options_not_provided:"Anonymization options are mandatory.",terms_not_specified:"Anonymization terms must be specified.",invalid_terms_format:"Terms are in an invalid format.",missing_content:"No content was provided to the anonymization preview.",unable_to_anonymize:"An error happened during the anonymization process. Please try later or report the issue.",non_supported_mode:"The selected anonymization mode is invalid, only download and stream are supported.",invalid_path:"The provided path is invalid or missing.",path_not_specified:"A file path must be specified.",path_not_defined:"The file path has not been resolved yet.",invalid_file_path:"The requested file path is not valid.",invalid_request:"The request is missing required fields or is malformed.",invalid_project_name:"Use a project name of up to 100 characters without line breaks or control characters.",no_file_selected:"Please select a file.",file_not_found:"The requested file is not found.",file_not_accessible:"The requested file is not accessible.",file_not_supported:"The file type is not supported. Anonymous GitHub cannot handle it.",file_too_big:"The file size exceeds the limit of Anonymous GitHub.",is_folder:"The path points to a folder.",folder_not_supported:"The path points to a folder. Please select a file.",unable_to_write_file:"Unable to write file on disk.",download_not_enabled:"Repository downloads are not enabled on this server.",unable_to_download:"The repository could not be downloaded. Please try again later.",s3_config_not_provided:"Object storage has not been configured on this server.",stats_unsupported:"Statistics are only supported in download mode.",branches_not_found:"The requested branch is not found.",readme_not_available:"No README for the repository is found.",page_not_supported_on_different_branch:"GitHub Pages is served from a different branch than the one selected. Pick the branch that GitHub Pages is configured to use.",page_not_activated:"GitHub Pages is not enabled on this repository. Enable it in the repository settings on GitHub before anonymizing.",is_removed:"This resource has been removed and is no longer available.",conf_name_missing:"A conference name is required.",conf_id_missing:"A conference ID is required.",conf_id_used:"This conference ID is already in use. Please choose a different one.",conf_start_date_missing:"A start date is required for the conference.",conf_end_date_missing:"An end date is required for the conference.",conf_start_date_invalid:"The start date must be before the end date.",conf_end_date_invalid:"The end date must be in the future.",invalid_plan:"The selected plan is not valid.",conference_not_found:"The requested conference could not be found.",conf_not_found:"The requested conference could not be found.",conf_not_activated:"The conference is not activated.",billing_missing:"Billing information is required for this plan.",billing_name_missing:"A billing name is required.",billing_email_missing:"A billing email is required.",billing_address_missing:"A billing address is required.",billing_city_missing:"A billing city is required.",billing_zip_missing:"A billing ZIP/postal code is required.",billing_country_missing:"A billing country is required.",queue_not_found:"The specified queue could not be found.",job_not_found:"The specified job could not be found in the queue.",error_retrying_job:"An error occurred while retrying the job.",gist_expired:"The gist is expired.",gist_not_ready:"Anonymous GitHub is still processing the gist, it can take several minutes.",gist_not_found:"The requested gist could not be found.",gist_not_available:"This gist is currently not available.",invalid_gistId:"The format of the gist ID is invalid.",gistId_not_specified:"A gist ID must be provided.",gistId_already_used:"The gist ID is already used.",missing_token:"An authentication token is required.",invalid_token:"The provided authentication token is invalid.",login_failed:"Login failed. Please try again.",server_error:"An unexpected server error occurred. Please try again later.",username_not_defined:"A username must be provided.",github_user_not_found:"The specified GitHub user could not be found.",cannot_coauthor_self:"You cannot add yourself as a co-author.",storage_write_size_mismatch:"The downloaded file was smaller than expected. The upstream source may have returned an incomplete response \u2014 please try again.",storage_read_error:"An error occurred while reading the file from storage \u2014 please try again.",upstream_error:"A temporary error occurred while fetching from GitHub \u2014 please try again.",token_expired:"Your GitHub access token has expired. Please log out and log in again to refresh it.",job_is_active:"This job is currently running \u2014 wait for it to finish or remove it first.",github_app_access_required:"Allow this repository on GitHub using the read-only access button, then retry. Organization access may require administrator approval.",github_app_reconnect_required:"Reconnect your GitHub App account to restore read-only access.",github_app_disabled:"New GitHub App connections are currently unavailable.",github_oauth_required:"Connect legacy GitHub OAuth to use this feature.",github_identity_mismatch:"Use the same GitHub account that you are signed in with here.",github_app_permissions_invalid:"The GitHub App must be configured with read-only permissions.",github_unavailable:"GitHub is temporarily unavailable. Please retry.",connection_changed:"The repository connection changed. Reload and try again.",repository_busy:"Wait for the repository operation to finish before changing its connection.",invalid_connection:"Select a supported GitHub connection.",github_oauth_disabled:"Legacy OAuth sign-in is currently disabled.",invalid_auth_state:"The authorization session expired. Please start again from Anonymous GitHub.",invalid_webhook_signature:"The webhook signature is invalid.",webhook_processing_failed:"Webhook processing failed. Retry the delivery.",github_app_authorization_cancelled:"GitHub authorization was cancelled.",github_account_link_required:"Verify your existing account with your previous GitHub connection. Future sign-ins will use the GitHub App.",github_app_refresh_busy:"GitHub credentials are being renewed. Please retry shortly.",github_grant_revocation_failed:"Unable to revoke the GitHub grant. Please retry.",another_login_required:"Connect and verify another sign-in method before disconnecting OAuth.",oauth_resources_remaining:"Some resources still require OAuth. Migrate or remove them before disconnecting.",invalid_github_path:"The GitHub repository path is invalid."},WARNINGS:{page_not_enabled_on_repo:"GitHub Pages is not enabled on this repository. Enable it in the repository's Settings \u2192 Pages on GitHub, then refresh.",page_branch_mismatch:"GitHub Pages on this repository is served from the '{{pageBranch}}' branch, but you selected '{{selectedBranch}}'. Switch the branch above to '{{pageBranch}}' to anonymize the Pages site.",folder_truncated:"This folder has more than 10,000 entries; only a partial listing is shown.",repo_truncated:"Some folders in this repository have too many files to be fully listed. Affected folders are marked with a warning icon.",submodules_not_included:"This repository uses git submodules. Submodule contents are not included in the anonymized repository and appear as empty folders."}};var Fl={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=et(null);return qt(()=>{let r=[t.value][0];r.classList.add("html-doc");function n(){r.innerHTML="";let i=e.content;if(typeof i!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let u=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&u.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",u.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),r.appendChild(a);let f="";e.baseUrl&&(f=''),a.srcdoc=f+i}Be(()=>e.content,n,{immediate:!0}),Be(()=>e.baseUrl,n,{immediate:!0}),Be(()=>e.allowScripts,n,{immediate:!0})}),()=>ke("html-doc",{ref:t})}};var zl={name:"pdfviewer",props:["src"],setup(e){let t=et(null);return qt(()=>{let s=[t.value],r=400,n=[.5,.75,1,1.25,1.5,2,3],i=1e3,a=s[0];a.classList.add("pdf-viewer");let u=null,f=[],h=!1,v=null,k=1,m=1,y=0,E=0,w=612/792,R=0,D=null,T=new Map,P=0;function H(M){let g=T.get(M);g&&(g.cancelled=!0,g.task?.cancel?.(),T.delete(M));let S=M.querySelector("canvas");S&&(S.width=0,S.height=0),M.innerHTML="",delete M.dataset.state}let q=document.createElement("div");q.className="pdf-toolbar";let U=document.createElement("div");U.className="pdf-pages",U.tabIndex=0,U.setAttribute("aria-label","PDF pages"),a.appendChild(q),a.appendChild(U);function ae(M,g,S){let V=document.createElement("button");return V.type="button",V.className="pdf-toolbar-btn",V.title=g,V.setAttribute("aria-label",g),V.innerHTML='',V.addEventListener("click",S),V}let ie=ae("fa-chevron-up","Previous page",function(){_e(m-1)}),C=ae("fa-chevron-down","Next page",function(){_e(m+1)}),O=document.createElement("input");O.type="text",O.className="pdf-toolbar-page",O.setAttribute("aria-label","Page number"),O.title="Page number \u2014 type a page and press Enter",O.addEventListener("keydown",function(M){M.key==="Enter"&&(_e(parseInt(O.value,10)),O.blur())}),O.addEventListener("blur",function(){O.value=String(m)});let G=document.createElement("span");G.className="pdf-toolbar-count";let J=ae("fa-search-minus","Zoom out",function(){_(n[Math.max(0,pe()-1)])}),ee=ae("fa-search-plus","Zoom in",function(){_(n[Math.min(n.length-1,pe()+1)])}),Q=document.createElement("button");Q.type="button",Q.className="pdf-toolbar-btn pdf-toolbar-zoom",Q.title="Reset zoom to fit the width",Q.setAttribute("aria-label","Reset zoom to fit the width"),Q.addEventListener("click",function(){_(1)}),q.appendChild(ie),q.appendChild(C);let oe=document.createElement("span");oe.className="pdf-toolbar-group",oe.appendChild(O),oe.appendChild(G),q.appendChild(oe);let ue=document.createElement("span");ue.className="pdf-toolbar-group pdf-toolbar-right",ue.appendChild(J),ue.appendChild(Q),ue.appendChild(ee),q.appendChild(ue);function pe(){let M=0;for(let g=0;g=M,Q.textContent=Math.round(k*100)+"%",J.disabled=pe()===0,ee.disabled=pe()===n.length-1}function Ie(M){let g=f[M-1];g&&(U.scrollTop+=g.getBoundingClientRect().top-U.getBoundingClientRect().top)}function _e(M){if(!u||isNaN(M))return;let g=Math.min(Math.max(1,M),u.numPages);f[g-1]&&(Ie(g),m=g,y=g,E=Date.now()+800,le(),Ue())}function Ae(){if(!f.length||Date.now(){}),D=null),v&&(clearTimeout(v),v=null),u&&(u.destroy(),u=null),f=[],m=1,U.innerHTML="",le()}function Ve(){U.innerHTML="";let M=document.createElement("div");M.className="pdf-viewer-error",M.textContent="This PDF could not be displayed.",U.appendChild(M)}function Se(){let M=Math.max(120,U.clientWidth-24);return Math.round(Math.min(M,i)*k)}function $e(M,g,S){let V=window.devicePixelRatio||1,F=M.getViewport({scale:1}),j=parseFloat(g.style.width);if(!j)return;let L=M.getViewport({scale:j/F.width*V}),W=document.createElement("canvas");return W.width=Math.floor(L.width),W.height=Math.floor(L.height),W.style.width=j+"px",W.style.height=Math.floor(L.height/V)+"px",g.innerHTML="",g.appendChild(W),g.style.height=W.style.height,S.task=M.render({canvasContext:W.getContext("2d"),viewport:L}),S.task.promise}function Ue(){if(!u)return;let M=R,g=U.getBoundingClientRect(),S=g.top-r,V=g.top+U.clientHeight+r,F=f.map((L,W)=>({slot:L,i:W,rect:L.getBoundingClientRect()})).filter(L=>L.rect.top<=V&&L.rect.bottom>=S).sort((L,W)=>Math.abs(L.rect.top-g.top)-Math.abs(W.rect.top-g.top)).slice(0,6),j=new Set(F.map(L=>L.slot));for(let L of T.keys())j.has(L)||H(L);for(let{slot:L,i:W}of F){if(L.dataset.state||P>=2)continue;let x={cancelled:!1,task:null};T.set(L,x),P++,L.dataset.state="rendering";let Z;u.getPage(W+1).then(K=>{if(Z=K,!(x.cancelled||M!==R))return $e(Z,L,x)}).then(()=>{x.cancelled||M!==R||(L.dataset.state="done",y&&Date.now(){!x.cancelled&&M===R&&(L.dataset.state="failed")}).finally(()=>{P--,Z?.cleanup?.(),u&&Ue()})}}function z(){h||(h=!0,window.requestAnimationFrame(function(){h=!1,Ae(),Ue()}))}function ne(){let M=!1;function g(){M||(M=!0,Ue())}window.requestAnimationFrame(g),window.setTimeout(g,50)}function te(){R++,f.forEach(H);let M=Se();f.forEach(function(g){delete g.dataset.state,g.innerHTML="",g.style.width=M+"px",g.style.height=Math.round(M/w)+"px"}),Ue()}function _(M){if(!u||!f.length||M===k)return;let g=m;k=M,le(),te(),_e(g)}function I(){u&&(v&&clearTimeout(v),v=setTimeout(function(){v=null,u&&f.length&&te()},250))}function B(M){if(Ee(),!M)return;let g=R;D=pdfjsLib.getDocument({url:M,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),D.promise.then(function(S){if(g!==R){S.destroy();return}return u=S,u.getPage(1).then(function(V){if(g!==R)return;let F=V.getViewport({scale:1});F.width&&F.height&&(w=F.width/F.height);let j=Se();for(let L=1;L<=u.numPages;L++){let W=document.createElement("div");W.className="pdf-viewer-page",W.style.width=j+"px",W.style.height=Math.round(j/w)+"px",U.appendChild(W),f.push(W)}le(),ne()})}).catch(function(){g===R&&Ve()})}U.addEventListener("scroll",z,{passive:!0}),$(window).on("resize",I),le(),Be(()=>e.src,B,{immediate:!0}),ao(function(){U.removeEventListener("scroll",z),$(window).off("resize",I),Ee()})}),()=>ke("pdfviewer",{ref:t})}};var aM={key:0,class:"quota-row quota-usage"},lM={class:"quota-header"},dM={class:"quota-label"},uM={class:"project-type-svg","aria-hidden":"true"},cM=["href"],pM={key:0,class:"quota-percent"},fM={key:1,class:"quota-unlimited-tag"},mM={class:"quota-value"},hM={key:0},vM=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],gM={key:1,class:"quota-remaining"},yM={key:2,class:"quota-remaining quota-limit"};function Hl(e,t){return e.quota?(l(),d("div",aM,[(l(),d(X,null,re([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],s=>o("div",{class:A(["quota-item","quota-"+e.quota[s.key].level]),key:s.key},[o("div",lM,[o("span",dM,[(l(),d("svg",uM,[o("use",{href:"#"+s.icon},null,8,cM)])),b(c(s.label),1)]),e.quota[s.key].unlimited?p("v-if",!0):(l(),d("span",pM,c(e.fmt.number(e.quota[s.key].percent,0))+"% used",1)),e.quota[s.key].unlimited?(l(),d("span",fM,"Unlimited")):p("v-if",!0)]),o("div",mM,[o("strong",null,c(e.formatAmount(e.quota[s.key].used,s.kind)),1),e.quota[s.key].unlimited?p("v-if",!0):(l(),d("span",hM," / "+c(e.formatAmount(e.quota[s.key].total,s.kind)),1))]),e.quota[s.key].unlimited?p("v-if",!0):(l(),d("div",{key:0,class:A(["quota-track","quota-"+e.quota[s.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":s.label+" quota","aria-valuenow":Math.min(e.quota[s.key].used,e.quota[s.key].total),"aria-valuemax":e.quota[s.key].total,"aria-valuetext":e.fmt.number(e.quota[s.key].percent,0)+"% used"},[e.quota[s?.key].unlimited?p("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Me({width:e.quota[s.key].percent+"%"})},null,4))],10,vM)),!e.quota[s.key].unlimited&&e.quota[s.key].used=e.quota[s.key].total?(l(),d("p",yM,c(e.quota[s.key].used>e.quota[s.key].total?"Limit exceeded":"Limit reached"),1)):p("v-if",!0)],2)),64))])):p("v-if",!0)}var bM={props:["quota","fmt"],setup(e){return{formatAmount:(t,s)=>s==="bytes"?e.fmt.humanFileSize(t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Hl},wM=new Set(he),jl={props:["content","terms","options"],setup(e){let t=et(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../")};return qt(()=>{s(),Be(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>ke("markdown",{ref:t})}},kM={props:["file","terms","options"],setup(e){let t=et(null),s=()=>st(()=>t.value?.querySelectorAll("pre code").forEach(r=>window.Prism?.highlightElement(r)));return qt(s),Be(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let r=e.file||{},n=(r.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(n)||r.language==="Markdown")return ke("gist-file",{ref:t},ke(jl,{content:r.content,terms:e.terms,options:e.options}));let i={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},a=(r.language||n||"none").toLowerCase();return ke("gist-file",{ref:t},ke("pre",{class:"line-numbers"},ke("code",{class:"language-"+(i[a]||a),key:r.content},r.content||"")))}}},EM={props:["file","content"],setup(e){let t=et(null),s=0,r,n=async()=>{let i=++s;r?.abort(),r=new AbortController;try{let a=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:r.signal}).then(u=>{if(!u.ok)throw Error("Notebook request failed");return u.json()});if(await Xt("notebook"),i!==s)return;t.value.innerHTML=DOMPurify.sanitize(nb.parse(a).render()),t.value.querySelectorAll("pre code").forEach(u=>window.Prism?.highlightElement(u))}catch(a){i===s&&a.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return qt(()=>{n(),Be(()=>[e.file,e.content],n)}),ao(()=>{s++,r?.abort()}),()=>ke("notebook",{ref:t})}},CM={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,r])=>r.code),s=t.reduce((r,[,n])=>r+n.code,0);return ke("loc",t.map(([r,n])=>ke("div",{class:"lang",title:`${r}: ${n.code.toLocaleString()} lines`,style:{width:n.code*100/s+"%",background:langColors[r]}})))}}},Gl={Markdown:jl,GistFile:kM,Notebook:EM,Loc:CM,HtmlDoc:Fl,QuotaUsage:bM,Pdfviewer:di(async()=>(await Xt("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",zl))},Wl={async mounted(e,{value:t}){e._editorValue=t;try{if(await ur(),e._editorDisposed)return;let s=e._editorValue,r=ace.edit(e);e._editor=r,r.setValue(String(s.content??""),-1),Bl(e,s.options),e._editorCleanup=s.options?.onLoad?.(r)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Bl(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Bl(e,t={}){let s=wM.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Kl={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,r=new IntersectionObserver(n=>{n.forEach(a=>a.isIntersecting?s.add(a.target.id):s.delete(a.target.id));let i=t.find(a=>s.has(a.hash.slice(1)));t.forEach(a=>a.classList.toggle("active",a===i))},{rootMargin:"-20% 0px -60% 0px",threshold:0});st(()=>t.forEach(n=>{let i=document.getElementById(n.hash.slice(1));i&&r.observe(i)})),e._observer=r},beforeUnmount(e){e._observer?.disconnect()}};function _M(e){let t={children:[]},s=new Map([["",t]]);function r(n){if(s.has(n))return s.get(n);let i=n.lastIndexOf("/"),a=r(i<0?"":n.slice(0,i)),u={name:n.slice(i+1),children:[]};return s.set(n,u),a.children.push(u),u}for(let n of e||[]){let i=n.path?`${n.path}/${n.name}`:n.name;n.size==null?r(i):r(n.path||"").children.push({...n})}return t.children}var Yl={name:"FileTree",props:["file","parent","searchQuery","searchResults","page"],setup(e){let t=La(),s=et(null),r=He(Object.create(null)),n=null,i=ot(()=>_M(e.file)),a=()=>"/"+(Array.isArray(t.params.path)?t.params.path.join("/"):t.params.path||"");Be(()=>[t.params.repoId,t.params.path],()=>{let m="";a().split("/").filter(Boolean).forEach(y=>{m+="/"+y,r[m]=!0})},{immediate:!0});let u=ot(()=>{if(!e.searchQuery||!e.searchResults)return null;let m=new Set,y=new Set;return e.searchResults.forEach(E=>{m.add(E.path?`${E.path}/${E.name}`:E.name);let w="";(E.path||"").split("/").filter(Boolean).forEach(R=>{w=w?w+"/"+R:R,y.add(w)})}),{files:m,folders:y}}),f=()=>[...s.value.querySelectorAll("li > a")],h=m=>{s.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),m&&(n=m.dataset.path,m.classList.add("tree-focused"),m.scrollIntoView?.({block:"nearest"}),s.value.focus())};function v(m){let y=f(),E=s.value.querySelector(".tree-focused")||y[0],w=y.indexOf(E);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(m.key)||(m.preventDefault(),m.key==="ArrowDown"&&h(y[(w+1)%y.length]),m.key==="ArrowUp"&&h(y[(w-1+y.length)%y.length]),!E))return;let R=E.closest("li");m.key==="ArrowRight"&&R.classList.contains("folder")&&(R.classList.contains("open")?h(R.querySelector(":scope > ul > li > a")):E.click()),m.key==="ArrowLeft"&&(R.classList.contains("folder")&&R.classList.contains("open")?E.click():h(R.parentElement.closest("li.folder")?.querySelector(":scope > a"))),m.key==="Enter"&&E.click()}function k(m,y=""){let E=[...m].sort((w,R)=>+!!R.children-+!!w.children||w.name.localeCompare(R.name));return ke("ul",E.flatMap(w=>{let R=w,D=R.name,T=(y+"/"+D).slice(1);if(u.value&&!u.value.files.has(T)&&!u.value.folders.has(T))return[];for(;R.children?.length===1;)R=R.children[0],D+="/"+R.name;let P=y+"/"+D,H=!!R.children,q=u.value?r[P]!==!1:!!r[P],U=H&&e.page?.options?.truncatedFolders?.includes(P.slice(1)),ae=e.page?.fileCounts?.[P.slice(1)]||0,ie=ke("span",{class:H?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},H?ke("svg",{viewBox:"0 0 14 12",focusable:"false"},ke("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),C=ke("span",{class:"tree-name"},D),O=J=>{h(J.currentTarget),H&&(J.preventDefault(),r[P]=!q,r[P]&&!R.children.length&&e.page.getFiles(P.slice(1)),st(()=>h(f().find(ee=>ee.dataset.path===n))))},G=ke("a",{"data-path":P,href:H?void 0:`/r/${encodeURIComponent(t.params.repoId)}${encodePathForUrl(P)}`,class:{"tree-focused":n===P},onClick:O},[H?ke("span",{class:"tree-toggle"}):y?ke("span",{class:"tree-spacer"}):null,ie,C,U?ke("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},ke("i",{class:"fas fa-exclamation-triangle"})):null,H&&ae?ke("span",{class:"tree-count"},ae):null]);return ke("li",{key:P,class:{file:!0,folder:H,open:q,active:a()===P,truncated:U},title:H?"":`Size: ${humanFileSize(R.size||0)}`},[G,H&&q?k(R.children,P):null])}))}return()=>ke("tree",{ref:s,tabindex:0,onKeydown:v},e.file?.length?u.value?.files.size===0?ke("div",{class:"tree-search-empty"},"No files found"):k(i.value):"Empty repository")}};function Ql(){return He({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function Xl(e,t){if(!e[t]){let s=Ql();Object.defineProperty(s,"invalid",{get(){return Object.values(s.errors).some(Boolean)||Object.keys(s).some(r=>r!=="invalid"&&s[r]&&typeof s[r]=="object"&&s[r].invalid)}}),e[t]=s}return e[t]}var Zl={beforeMount(e,{value:t}){e._formState=Xl(t,e.name),e.addEventListener("submit",s=>s.preventDefault())}};function SM(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Jl(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?SM(t):t??""),ir(e)}function ir(e){let t=e._field.validation;if(!t)return;let s=e.validity;for(let[r,n]of Object.entries({required:s.valueMissing,pattern:s.patternMismatch,min:s.rangeUnderflow,max:s.rangeOverflow,date:s.badInput,email:s.typeMismatch&&e.type==="email",url:s.typeMismatch&&e.type==="url"}))t.setValidity(r,e.disabled||!n)}var xl={beforeMount(e,{value:t}){var a;let s=t.form&&Xl(t.state,t.form),r=s&&e.name?s[a=e.name]||(s[a]=Ql()):null;e._field={binding:t,validation:r,timer:null};let n=()=>{clearTimeout(e._field.timer),e._field.timer=null;let u=e._field.binding,f=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(f=e.value===""?null:Number(e.value)),e.type==="date"&&(f=e.value?new Date(e.value+"T00:00:00"):null),r){r.setDirty();for(let h of Object.keys(r.errors))r.setValidity(h,!0)}u.set(f),ir(e),u.change?.()}};e._field.commit=n;let i=u=>{let f=e._field.binding.options?.debounce||0,h=typeof f=="number"?f:f[u.type]??f.default??0;clearTimeout(e._field.timer),h?e._field.timer=setTimeout(n,h):n()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",i),e.addEventListener("blur",()=>{r&&(r.touched=!0),e._field.timer&&n()})},mounted:Jl,updated(e,{value:t}){e._field.binding=t,Jl(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:s}=e._field,r=t.form&&t.state[t.form];r&&r[e.name]===s&&delete r[e.name]}};function ed(e,t){let s=e.target.closest("form");if(s?._formState&&(s._formState.submitted=!0),s?.querySelectorAll("input, select, textarea").forEach(r=>{r._field?.timer&&r._field.commit(),r._field&&ir(r)}),s&&!s.checkValidity()){let r=s.querySelector(":invalid");r?.scrollIntoView?.({block:"center"}),r?.focus(),s.reportValidity();return}return t()}var td=Symbol("session"),NM=/^\/(w|api|github)(\/|$)/;function od(e,t={}){let s=e?.split(".").reduce((r,n)=>r?.[n],Ul);return String(s??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(r,n)=>t[n]??"")}var DM={...rr,translate:od};function RM(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function TM(e="#app",t={}){!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let s=new Map,r=Ml(t.fetch),n,i;function a(){let h=ct(),v={url(m){return m===void 0?i.currentRoute.value.fullPath:(i.push(m),v)},path(){return i.currentRoute.value.path},search(){return i.currentRoute.value.query}},k=new Proxy({},{get(m,y){let E=i.currentRoute.value.params[y];return Array.isArray(E)?E.join("/"):E}});return{http:r,...h,location:v,params:k,window,promises:Ll,html:{trustAsHtml:m=>m},translate:(m,y)=>Promise.resolve(od(m,y)),quotaService:$l(r)}}function u(h){return{name:h.template,setup(){let v=tr(ut(td),s);h.setup(v,a()),ql(h.template,v);let k=[];return()=>sn[h.template](v,k)}}}i=Ma({history:t.history||Pa(),routes:rl.map(h=>h.redirect?h:{path:h.path,component:u(h),meta:{title:h.title,preserveExplorer:h.preserveExplorer}})});let f=ea({setup(){n=tr(null,s),n.fmt=DM,n.window=window,n.Math=Math,n.sanitize=m=>DOMPurify.sanitize(m??""),n.submitForm=ed,n.safeUrl=RM;let h=a();Ua(n,h.http,h.location,h.timeout),io(td,n),Be(()=>n.title,m=>{document.title=m||"Anonymous GitHub"});let v=[],k=m=>{let y=m.target.closest?.("a[href]");if(m.defaultPrevented||m.button!==0||m.metaKey||m.ctrlKey||m.shiftKey||m.altKey||!y||y.hasAttribute("download")||y.target&&y.target!=="_self"||y.dataset.toggle||y.getAttribute("href").startsWith("#"))return;let w=new URL(y.href,window.location.href);w.origin!==window.location.origin||NM.test(w.pathname)||(m.preventDefault(),i.push(w.pathname+w.search+w.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",k),ao(()=>document.removeEventListener("click",k)),()=>[Vl(n,[]),ke("header",{class:"app-header"},sn["partials/header.htm"](n,v)),ke("main",{class:"app-view align-items-stretch w-100"},ke(er,null,{default:({Component:m,route:y})=>m?ke(m,{key:y.meta.preserveExplorer?y.matched[0]?.path:y.path}):null})),ke("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},n.toasts.map((m,y)=>ke("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:y},[ke("div",{class:"toast-header"},[ke("strong",{class:"mr-auto"},m.title),ke("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>n.removeToast(m)},"\xD7")]),ke("div",{class:"toast-body"},m.body)])))]}});for(let[h,v]of Object.entries(Gl))f.component(h,v);return f.component("Tree",Yl),f.component("PartialView",{props:["name","state"],setup(h){let v=[];return()=>sn[h.name](h.state,v)}}),f.directive("field",xl),f.directive("form",Zl),f.directive("code-editor",Wl),f.directive("paper-scrollspy",Kl),f.use(i),i.beforeEach(async h=>{n?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(h.path)&&await Xt("markdown"),/^\/(r|repository)\//.test(h.path)&&await Xt("org")}),i.afterEach(h=>{if(!n)return;n.title=h.meta.title,n.emit("routeChange",{title:h.meta.title}),n.emit("routeUpdate",{title:h.meta.title});let v=document.querySelector(".app-view");!h.meta.preserveExplorer&&v&&(v.scrollTop=0)}),f.mount(e),{app:f,router:i,state:n}}document.querySelector("#app")&&(window.anonymousApp=TM());})(); /*! Bundled license information: @vue/shared/dist/shared.esm-bundler.js: diff --git a/src/core/AnonymizedFile.ts b/src/core/AnonymizedFile.ts index fa063ad..09c684d 100644 --- a/src/core/AnonymizedFile.ts +++ b/src/core/AnonymizedFile.ts @@ -22,6 +22,7 @@ import { IFile } from "./model/files/files.types"; import { FilterQuery } from "mongoose"; import { createLogger, serializeError } from "./logger"; import { githubTokenForStreamer } from "./github-token-context"; +import { requestHeaders, startStage } from "./request-monitoring"; const logger = createLogger("anonymized-file"); @@ -379,6 +380,7 @@ export default class AnonymizedFile { // use the streamer service return got.stream(join(config.STREAMER_ENTRYPOINT, "api"), { method: "POST", + headers: requestHeaders(), json: { token: await githubTokenForStreamer(await this.repository.getToken(), this.repository.model.source.repositoryName), repoFullName: this.repository.model.source.repositoryName, @@ -423,9 +425,11 @@ export default class AnonymizedFile { this.size(), this.repository.getToken(), ]); + const headersDone = startStage("streamer_headers"); const resStream = got .stream(join(config.STREAMER_ENTRYPOINT, "api"), { method: "POST", + headers: requestHeaders(), json: { sha, size, @@ -445,6 +449,7 @@ export default class AnonymizedFile { // this, the parent response has no Content-Type and the browser // guesses (text renders as download, images as octet-stream). resStream.on("response", (upstream: { headers: Record }) => { + headersDone(); if (res.headersSent) return; const ct = upstream.headers["content-type"]; if (typeof ct === "string") { @@ -455,6 +460,8 @@ export default class AnonymizedFile { else if (isTextFile(this.anonymizedPath)) res.contentType("text/plain"); } }); + resStream.once("error", () => headersDone(true)); + resStream.once("close", () => headersDone()); await streamResponse(resStream, res, (err: Error) => { const { error } = streamerErrorToAnonymous( err as Error & { diff --git a/src/core/GitHubUtils.ts b/src/core/GitHubUtils.ts index e47f5ea..c851145 100644 --- a/src/core/GitHubUtils.ts +++ b/src/core/GitHubUtils.ts @@ -11,6 +11,7 @@ import Repository from "./Repository"; import { getCredential, replaceCredential, getCredentialToken } from "./credentials"; import config from "../config"; import { createLogger } from "./logger"; +import { measureStage } from "./request-monitoring"; const logger = createLogger("github"); @@ -281,6 +282,7 @@ export function octokit(token: string) { } throw err; }); + oct.hook.wrap("request", (request, options) => measureStage("upstream", async () => request(options))); return oct; } @@ -308,6 +310,10 @@ export async function checkToken(token: string) { const checkedRepositoryTokens = new WeakMap(); export async function getToken(repository: Repository) { + return measureStage("authorization", () => resolveRepositoryToken(repository)); +} + +async function resolveRepositoryToken(repository: Repository) { repository.assertNotArchived(); logger.debug("getToken", { repoId: repository.repoId }); if (isConnected && !repository.model.isNew) { diff --git a/src/core/anonymization-pool.ts b/src/core/anonymization-pool.ts index 697a03e..1d62d66 100644 --- a/src/core/anonymization-pool.ts +++ b/src/core/anonymization-pool.ts @@ -1,6 +1,8 @@ import { Worker } from "worker_threads"; import { existsSync } from "fs"; import { join } from "path"; +import { startStage } from "./request-monitoring"; +import { AsyncResource } from "async_hooks"; const MEMORY_BUDGET = Math.max(128, Number(process.env.ANONYMIZATION_MEMORY_MB) || 512) * 1024 * 1024; const MAX_WORKERS = Math.min(4, Math.max(1, Number(process.env.ANONYMIZATION_WORKERS) || 1)); @@ -12,6 +14,8 @@ interface Job { reject: (error: Error) => void; timer?: NodeJS.Timeout; abort?: () => void; + waitingDone: ReturnType; + transformDone: () => ReturnType; } const waiting: Job[] = []; const idle: Worker[] = []; @@ -23,16 +27,20 @@ export function anonymizeOnWorker(message: Job["message"], size: number, signal: if (weight > MEMORY_BUDGET) return Promise.reject(new Error("anonymization_memory_budget_exceeded")); if (waiting.length >= 16) return Promise.reject(new Error("anonymization_queue_full")); return new Promise((resolve, reject) => { - const job: Job = { message, weight, signal, resolve, reject }; + const waitingDone = startStage("worker_wait"); + // Bind the stage factory to the submitting request, not the preceding job. + const transformDone = AsyncResource.bind(() => startStage("anonymize")); + const job: Job = { message, weight, signal, resolve, reject, waitingDone, transformDone }; job.abort = () => { const index = waiting.indexOf(job); if (index < 0) return; waiting.splice(index, 1); clearTimeout(job.timer); signal.removeEventListener("abort", job.abort!); + waitingDone(true); reject(new Error("anonymization_cancelled")); }; - if (signal.aborted) return reject(new Error("anonymization_cancelled")); + if (signal.aborted) { waitingDone(true); return reject(new Error("anonymization_cancelled")); } signal.addEventListener("abort", job.abort, { once: true }); job.timer = setTimeout(job.abort, 30_000); waiting.push(job); @@ -42,6 +50,8 @@ export function anonymizeOnWorker(message: Job["message"], size: number, signal: function pump() { while (waiting.length && running < MAX_WORKERS && bytes + waiting[0].weight <= MEMORY_BUDGET) { const job = waiting.shift()!; + job.waitingDone(); + const transformDone = job.transformDone(); clearTimeout(job.timer); job.signal.removeEventListener("abort", job.abort!); running++; @@ -51,12 +61,13 @@ function pump() { try { worker = idle.pop() || new Worker(existsSync(compiled) ? compiled : join(__dirname, "anonymization.worker.ts"), { execArgv: existsSync(compiled) ? [] : ["-r", require.resolve("ts-node/register/transpile-only")], resourceLimits: { maxOldGenerationSizeMb: Math.ceil(MEMORY_BUDGET / 1024 / 1024) }, - }); } catch (error) { running--; bytes -= job.weight; job.reject(error as Error); continue; } + }); } catch (error) { running--; bytes -= job.weight; transformDone(true); job.reject(error as Error); continue; } worker.ref(); let finished = false; const finish = (error?: Error, changed = false) => { if (finished) return; finished = true; + transformDone(!!error); clearTimeout(deadline); job.signal.removeEventListener("abort", cancel); worker.removeListener("message", message); @@ -89,3 +100,7 @@ export function reserveSpool(bytes: number) { spoolBytes += bytes; } export function releaseSpool(bytes: number) { spoolBytes -= bytes; } +export function getAnonymizationPoolStats() { + return { running, waiting: waiting.length, idle: idle.length, reservedBytes: bytes, spoolBytes, + maxWorkers: MAX_WORKERS, maxWaiting: 16, memoryBudgetBytes: MEMORY_BUDGET }; +} diff --git a/src/core/performance-monitoring.ts b/src/core/performance-monitoring.ts new file mode 100644 index 0000000..223554a --- /dev/null +++ b/src/core/performance-monitoring.ts @@ -0,0 +1,213 @@ +import { createClient, RedisClientType } from "redis"; +import { hostname } from "os"; +import { readdir, readFile, readlink } from "fs/promises"; +import { monitorEventLoopDelay, performance } from "perf_hooks"; +import config from "../config"; +import { AsyncCache } from "./async-cache"; +import { activeRequestCount, LATENCY_BUCKETS, Metric, requestMetrics, Service } from "./request-monitoring"; + +const PREFIX = "performance:v1:"; +const RETENTION = 2 * 3600; +let client: RedisClientType | undefined; +let stop: (() => Promise) | undefined; +let flushNow: (() => Promise) | undefined; +const reports = new AsyncCache(10000, 2); +const emptyMetric = (metric: string, route: string, method: string): Metric => ({ metric, route, method, + count: 0, sumMs: 0, bytes: 0, aborted: 0, errors: 0, slow: 0, buckets: Array(LATENCY_BUCKETS.length + 1).fill(0) }); + +async function containerMemoryLimit() { + for (const path of ["/sys/fs/cgroup/memory.max", "/sys/fs/cgroup/memory/memory.limit_in_bytes"]) { + const raw = await readFile(path, "utf8").catch(() => ""); + const value = Number(raw.trim()); + if (value > 0 && value < Number.MAX_SAFE_INTEGER) return value; + } + return null; +} + +async function redisDeadline(work: Promise, redis: RedisClientType): Promise { + let timer: NodeJS.Timeout | undefined; + try { + return await Promise.race([work, new Promise((_resolve, reject) => { + timer = setTimeout(() => { + reject(new Error("performance_monitoring_timeout")); + if (redis.isOpen) void redis.disconnect().then(() => client === redis ? redis.connect() : undefined).catch(() => {}); + }, 2000); timer.unref(); + })]); + } finally { clearTimeout(timer); } +} + +export async function flushPerformanceMetrics() { await flushNow?.(); reports.clear(); } + +export function percentileUpperBound(buckets: number[], percentile: number): number | null { + const total = buckets.reduce((sum, count) => sum + count, 0); + if (!total) return null; + let count = 0; + for (let i = 0; i < buckets.length; i++) { + count += buckets[i]; + if (count >= Math.ceil(total * percentile)) return LATENCY_BUCKETS[i] ?? null; + } + return null; +} + +/** PID-owned sockets only: /proc/net also includes healthcheck subprocesses. */ +export async function socketSnapshot() { + try { + const descriptors = (await readdir("/proc/self/fd")).slice(0, 4096); + const sockets = new Set(); + for (let i = 0; i < descriptors.length; i += 32) { + const links = await Promise.all(descriptors.slice(i, i + 32).map(fd => readlink(`/proc/self/fd/${fd}`).catch(() => ""))); + for (const link of links) { const match = /^socket:\[(\d+)\]$/.exec(link); if (match) sockets.add(match[1]); } + } + const states: Record = {}; + for (const file of ["/proc/self/net/tcp", "/proc/self/net/tcp6"]) { + const table = await readFile(file, "utf8"); + for (const line of table.trim().split("\n").slice(1)) { + const columns = line.trim().split(/\s+/); + if (sockets.has(columns[9])) states[columns[3]] = (states[columns[3]] || 0) + 1; + } + } + return { descriptors: sockets.size, established: states["01"] || 0, closeWait: states["08"] || 0, + listening: states["0A"] || 0, truncated: descriptors.length === 4096 }; + } catch { return null; } +} + +/** One bounded batch every 15s. Redis outages never queue commands or hold HTTP requests. */ +export function startPerformanceMonitoring(service: Service, workers: () => unknown = () => null) { + if (stop) return stop; + const redis = createClient({ disableOfflineQueue: true, socket: { host: config.REDIS_HOSTNAME, + port: config.REDIS_PORT, connectTimeout: 2000, reconnectStrategy: retries => Math.min(5000, 250 * (retries + 1)) } }) as RedisClientType; + client = redis; + redis.on("error", () => {}); + void redis.connect().catch(() => {}); + const loop = monitorEventLoopDelay({ resolution: 20 }); loop.enable(); + let previousUtilization = performance.eventLoopUtilization(); + let previousCpu = process.cpuUsage(); + let previousCpuAt = performance.now(); + let busy = false; + let droppedBatches = 0; + let lastFlushAt: number | null = null; + let stopped = false; + const instance = `${service}:${hostname()}`; + const flush = async () => { + if (busy || stopped) return; + busy = true; + const entries = requestMetrics.drain(); + try { + if (!redis.isReady) { droppedBatches += entries.length ? 1 : 0; return; } + const utilization = performance.eventLoopUtilization(previousUtilization); + previousUtilization = performance.eventLoopUtilization(); + const cpu = process.cpuUsage(previousCpu); + const cpuAt = performance.now(); + const cpuPercent = (cpu.user + cpu.system) / ((cpuAt - previousCpuAt) * 1000) * 100; + previousCpu = process.cpuUsage(); previousCpuAt = cpuAt; + const runtime = { instance, service, sampledAt: Date.now(), uptime: process.uptime(), + cpuPercent, memoryLimitBytes: await containerMemoryLimit(), + memory: process.memoryUsage(), activeRequests: activeRequestCount(), sockets: await socketSnapshot(), workers: workers(), + eventLoop: { utilization: utilization.utilization, p95Ms: loop.percentile(95) / 1e6, + maxMs: Number.isFinite(loop.max) ? loop.max / 1e6 : 0 }, + droppedMetrics: requestMetrics.dropped, droppedBatches, lastFlushAt }; + loop.reset(); + const tx = redis.multi(); + const touched = new Set(); + for (const { minute, data } of entries) { + const key = `${PREFIX}minute:${service}:${minute}`; + touched.add(key); + const label = JSON.stringify([data.metric, data.route, data.method]); + const fields: Record = { count: data.count, sumMs: data.sumMs, bytes: data.bytes, + aborted: data.aborted, errors: data.errors, slow: data.slow }; + data.buckets.forEach((count, i) => { fields[`b${i}`] = count; }); + for (const [field, value] of Object.entries(fields)) if (value) tx.hIncrBy(key, `${label}|${field}`, value); + } + for (const key of touched) tx.expire(key, RETENTION); + tx.set(`${PREFIX}instance:${instance}`, JSON.stringify(runtime), { EX: 90 }); + tx.zAdd(`${PREFIX}instances`, { score: runtime.sampledAt, value: instance }); + tx.zRemRangeByScore(`${PREFIX}instances`, 0, runtime.sampledAt - 90000); + tx.expire(`${PREFIX}instances`, 120); + tx.lPush(`${PREFIX}runtime:${service}`, JSON.stringify(runtime)); + tx.lTrim(`${PREFIX}runtime:${service}`, 0, service === "api" ? 239 : 959); + tx.expire(`${PREFIX}runtime:${service}`, RETENTION); + await redisDeadline(tx.exec(), redis); lastFlushAt = Date.now(); + } catch { droppedBatches++; } + finally { busy = false; } + }; + const timer = setInterval(() => { void flush(); }, 15000); timer.unref(); + flushNow = flush; + void flush(); + stop = async () => { + stopped = true; clearInterval(timer); loop.disable(); + if (redis.isOpen) await redis.disconnect(); + client = undefined; stop = undefined; flushNow = undefined; reports.clear(); + }; + return stop; +} + +export async function performanceReport(minutes: number) { + const windowMinutes = minutes === 60 ? 60 : 15; + if (!client?.isReady) return { available: false, windowMinutes, instances: [], routes: [], stages: [] }; + const redis = client; + return reports.get(String(windowMinutes), async () => { + const minute = Math.floor(Date.now() / 60000) * 60000; + const groups = new Map(); + const tx = redis.multi(); + const requests: { service: Service; minute: number }[] = []; + for (const service of ["api", "streamer"] as const) { + for (let i = 0; i < windowMinutes; i++) { + requests.push({ service, minute: minute - i * 60000 }); + tx.hGetAll(`${PREFIX}minute:${service}:${minute - i * 60000}`); + } + } + const values = await redisDeadline(tx.exec(), redis) as unknown as Record[]; + const series = new Map(); + values.forEach((hash, index) => { + for (const [key, raw] of Object.entries(hash || {})) { + const split = key.lastIndexOf("|"); + const label = key.slice(0, split); const field = key.slice(split + 1); + const [metric, route, method] = JSON.parse(label) as string[]; + const service = requests[index].service; + const id = `${service}:${label}`; + let row = groups.get(id); + if (!row) { row = { ...emptyMetric(metric, route, method), service }; groups.set(id, row); } + const value = Number(raw) || 0; + if (/^b\d+$/.test(field)) row.buckets[Number(field.slice(1))] += value; + else if (["count", "sumMs", "bytes", "aborted", "errors", "slow"].includes(field)) { + const numericField = field as "count" | "sumMs" | "bytes" | "aborted" | "errors" | "slow"; + row[numericField] += value; + } + if (metric === "request" && service === "api") { + const timestamp = requests[index].minute; + const point = series.get(timestamp) || { minute: timestamp, requests: 0, aborted: 0, errors: 0, sumMs: 0 }; + if (field === "count") point.requests += value; + if (field === "sumMs") point.sumMs += value; + if (field === "aborted") point.aborted += value; + if (field === "errors") point.errors += value; + series.set(timestamp, point); + } + } + }); + const ids = await redisDeadline(redis.zRangeByScore(`${PREFIX}instances`, Date.now() - 90000, "+inf", { LIMIT: { offset: 0, count: 32 } }), redis); + const samples = ids.length ? await redisDeadline(redis.mGet(ids.map(id => `${PREFIX}instance:${id}`)), redis) : []; + const instances = samples.filter((sample): sample is string => !!sample).map(sample => JSON.parse(sample)); + const runtimeSeries: { instance: string; service: string; sampledAt: number; rss: number; heapUsed: number; external: number; + cpuPercent: number; loopP95Ms: number; sockets: number | null; closeWait: number | null; waiting: number; reservedBytes: number }[] = []; + for (const service of ["api", "streamer"]) { + const samples = await redisDeadline(redis.lRange(`${PREFIX}runtime:${service}`, 0, service === "api" ? 239 : 959), redis); + for (const raw of samples) { + const sample = JSON.parse(raw); + if (sample.sampledAt >= Date.now() - windowMinutes * 60000) runtimeSeries.push({ service, instance: sample.instance, + sampledAt: sample.sampledAt, rss: sample.memory.rss, heapUsed: sample.memory.heapUsed, external: sample.memory.external, + cpuPercent: sample.cpuPercent, loopP95Ms: sample.eventLoop.p95Ms, sockets: sample.sockets?.descriptors ?? null, + closeWait: sample.sockets?.closeWait ?? null, waiting: sample.workers?.waiting || 0, reservedBytes: sample.workers?.reservedBytes || 0 }); + } + } + const rows = [...groups.values()].map(row => ({ ...row, avgMs: row.count ? Math.round(row.sumMs / row.count) : 0, + p95UpperMs: percentileUpperBound(row.buckets, .95), p99UpperMs: percentileUpperBound(row.buckets, .99) })); + return { available: true, generatedAt: Date.now(), windowMinutes, instances, + routes: rows.filter(row => row.metric === "request").map(row => { + const firstByte = rows.find(sample => sample.metric === "first_byte" && sample.service === row.service && sample.route === row.route && sample.method === row.method); + return { ...row, firstByteCount: firstByte?.count || 0, firstByteP95UpperMs: firstByte?.p95UpperMs ?? null }; + }).sort((a, b) => b.sumMs - a.sumMs), + stages: rows.filter(row => row.metric !== "request"), series: [...series.values()].sort((a, b) => a.minute - b.minute), + runtimeSeries, latencyBucketsMs: LATENCY_BUCKETS, + percentileNote: "Percentiles are histogram bucket upper bounds; null means no samples or above 60s." }; + }); +} diff --git a/src/core/request-monitoring.ts b/src/core/request-monitoring.ts new file mode 100644 index 0000000..9c794e0 --- /dev/null +++ b/src/core/request-monitoring.ts @@ -0,0 +1,159 @@ +import { AsyncLocalStorage } from "async_hooks"; +import { randomUUID } from "crypto"; +import { performance } from "perf_hooks"; +import { RequestHandler } from "express"; +import { createLogger } from "./logger"; + +export const LATENCY_BUCKETS = [10, 50, 100, 250, 500, 1000, 2500, 5000, 10000, 30000, 60000]; +export type Service = "api" | "streamer"; +export type Stage = "repository" | "authorization" | "upstream" | "cache_lookup" | "cache_fill" | "worker_wait" | "anonymize" | "streamer_headers"; +export interface Metric { + metric: string; route: string; method: string; count: number; sumMs: number; + bytes: number; aborted: number; errors: number; slow: number; buckets: number[]; +} +const logger = createLogger("requests"); +const context = new AsyncLocalStorage<{ id: string; service: Service; stages: Partial> }>(); +const methods = new Set(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]); +const staticRoutes = new Set([ + "/", "/dashboard", "/anonymize", "/healthcheck", "/api/healthcheck", "/api/stat", "/api/stat/history", + "/api/options", "/api/message", "/api/user", "/api/user/quota", "/api/user/dashboard", "/api/repo", + "/api/anonymize-preview", "/api/admin/overview", "/api/admin/performance", "/api/admin/errors", + "/api/admin/errors/stats", "/api/admin/queues", "/api/admin/queues/metrics", "/github/app/webhook", +]); + +/** Fixed labels: never use repository IDs, file names or query strings as metric keys. */ +export function requestRoute(url: string, service: Service): string { + const path = url.split("?", 1)[0].replace(/\/+$/, "") || "/"; + if (service === "streamer") return ["/api/download", "/api", "/healthcheck"].includes(path) ? path : "other"; + if (staticRoutes.has(path)) return path; + if (/^\/api\/repo\//.test(path)) { + const match = path.match(/^\/api\/repo\/[^/]+\/(file|files|zip|options|refresh|coauthors|extend)(?:\/|$)/); + if (match) { + const subroute = match[1] === "files" && /\/(counts|search)$/.exec(path); + return `/api/repo/:repoId/${match[1]}${match[1] === "file" ? "/:path" : subroute ? `/${subroute[1]}` : ""}`; + } + const github = path.match(/^\/api\/repo\/[^/]+\/[^/]+\/(readme|branches)$/); + if (github) return `/api/repo/:owner/:repo/${github[1]}`; + return "/api/repo/:repoId"; + } + if (path.startsWith("/w/")) return "/w/:repoId/:path"; + if (/^\/(r|repository)\//.test(path)) return "/r/:repoId/:path"; + if (/^\/api\/(pr|gist)\//.test(path)) return `/api/${path.split("/")[2]}/:id/:path`; + if (/^\/(script|css|favicon|fonts|partials)\//.test(path)) return "/assets/:path"; + if (path.startsWith("/github/")) return "/github/:action"; + if (path.startsWith("/api/admin/")) return "/api/admin/:action"; + if (path.startsWith("/api/user/")) return "/api/user/:action"; + return "other"; +} + +export class RequestMetrics { + private pending = new Map(); + dropped = 0; + constructor(private capacity = 512, private now = () => Date.now()) {} + get size() { return this.pending.size; } + observe(metric: string, route: string, method: string, ms: number, + detail: { bytes?: number; aborted?: boolean; error?: boolean; slow?: boolean } = {}) { + const minute = Math.floor(this.now() / 60000) * 60000; + const key = JSON.stringify([minute, metric, route, method]); + let entry = this.pending.get(key); + if (!entry) { + if (this.pending.size >= this.capacity) { this.dropped++; return; } + entry = { minute, data: { metric, route, method, count: 0, sumMs: 0, bytes: 0, + aborted: 0, errors: 0, slow: 0, buckets: Array(LATENCY_BUCKETS.length + 1).fill(0) } }; + this.pending.set(key, entry); + } + const duration = Math.max(0, Number.isFinite(ms) ? ms : 0); + const data = entry.data; + data.count++; data.sumMs += Math.round(duration); data.bytes += detail.bytes || 0; + data.aborted += Number(!!detail.aborted); data.errors += Number(!!detail.error); data.slow += Number(!!detail.slow); + let bucket = LATENCY_BUCKETS.findIndex(bound => duration <= bound); + if (bucket < 0) bucket = LATENCY_BUCKETS.length; + data.buckets[bucket]++; + } + drain() { const entries = [...this.pending.values()]; this.pending.clear(); return entries; } +} +export const requestMetrics = new RequestMetrics(); +let activeRequests = 0; +export function activeRequestCount() { return activeRequests; } +export function requestHeaders(): Record { + const id = context.getStore()?.id; + return id ? { "x-request-id": id } : {}; +} +export function recordCacheHit(cache: "source" | "transformed", hit: boolean) { + if (context.getStore()) requestMetrics.observe(`${cache}_${hit ? "hit" : "miss"}`, "all", "all", 0); +} + +/** Capture the context now: worker admission can resume from another request's callback. */ +export function startStage(stage: Stage) { + const started = performance.now(); + const trace = context.getStore(); + let ended = false; + return (error = false) => { + if (ended) return; ended = true; + if (!trace) return; + const ms = performance.now() - started; + trace.stages[stage] = (trace.stages[stage] || 0) + ms; + requestMetrics.observe(stage, "all", "all", ms, { error }); + }; +} +export async function measureStage(stage: Stage, work: () => Promise): Promise { + const done = startStage(stage); + try { const value = await work(); done(); return value; } + catch (error) { done(true); throw error; } +} + +export function monitorRequests(service: Service, metrics = requestMetrics, + log: Pick = logger): RequestHandler { + return (req, res, next) => { + const forwarded = service === "streamer" ? req.get("x-request-id") : undefined; + const id = forwarded && /^[a-f0-9-]{36}$/.test(forwarded) ? forwarded : randomUUID(); + const trace = { id, service, stages: {} }; + const route = requestRoute(req.originalUrl, service); + const method = methods.has(req.method) ? req.method : "OTHER"; + const started = performance.now(); + let firstByteMs: number | undefined; + let bytes = 0; + let ended = false; + activeRequests++; + res.setHeader("X-Request-ID", id); + const writeHead = res.writeHead; + res.writeHead = function (this: typeof res, ...args: unknown[]): typeof res { + firstByteMs ??= performance.now() - started; + return Reflect.apply(writeHead, this, args); + }; + const count = (chunk: unknown, encoding: unknown) => { + if (req.method === "HEAD") return; + if (typeof chunk === "string") bytes += Buffer.byteLength(chunk, typeof encoding === "string" ? encoding as BufferEncoding : undefined); + else if (chunk instanceof Uint8Array) bytes += chunk.byteLength; + }; + // Preserve callbacks, return values and receiver. Installed before compression, + // these count encoded body bytes without changing stream backpressure. + const write = res.write; + res.write = function (this: typeof res, ...args: unknown[]): boolean { + count(args[0], args[1]); + return Reflect.apply(write, this, args); + }; + const end = res.end; + res.end = function (this: typeof res, ...args: unknown[]): typeof res { + count(args[0], args[1]); + return Reflect.apply(end, this, args); + }; + const done = () => { + if (ended) return; ended = true; + activeRequests--; + res.removeListener("finish", done); res.removeListener("close", done); + const ms = performance.now() - started; + const aborted = !res.writableFinished; + const transfer = /\/(file|zip)(?:\/|$)/.test(route) || route.startsWith("/w/") || service === "streamer"; + const slow = ms > (transfer ? 10000 : 1000); + metrics.observe("request", route, method, ms, { bytes, aborted, error: res.statusCode >= 500, slow }); + if (firstByteMs != null) metrics.observe("first_byte", route, method, firstByteMs); + const detail = { requestId: id, service, method, route, status: res.statusCode, + outcome: aborted ? "interrupted" : "completed", ms: Math.round(ms), firstByteMs: firstByteMs == null ? null : Math.round(firstByteMs), bytes, stages: trace.stages }; + if (slow || aborted) log.warn(aborted ? "request interrupted" : "slow request", detail); + else if (!route.includes("healthcheck")) log.info("request", detail); + }; + res.once("finish", done); res.once("close", done); + context.run(trace, next); + }; +} diff --git a/src/core/source/GitHubStream.ts b/src/core/source/GitHubStream.ts index 147807b..897d697 100644 --- a/src/core/source/GitHubStream.ts +++ b/src/core/source/GitHubStream.ts @@ -18,6 +18,7 @@ import { octokit, waitForTokenGate } from "../GitHubUtils"; import FileModel from "../model/files/files.model"; import { IFile } from "../model/files/files.types"; import { createLogger, serializeError } from "../logger"; +import { measureStage, recordCacheHit } from "../request-monitoring"; import config from "../../config"; import { isConnected } from "../../server/database"; import AnonymizedRepositoryModel from "../model/anonymizedRepositories/anonymizedRepositories.model"; @@ -286,7 +287,9 @@ export default class GitHubStream extends GitHubBase { return undefined; } }; - if (await cached()) return storage.read(repoId, cachePath); + const hit = await measureStage("cache_lookup", cached); + recordCacheHit("source", !!hit); + if (hit) return storage.read(repoId, cachePath); if (expected.size != null && expected.size > config.MAX_FILE_SIZE) { throw new AnonymousError("file_too_big", { httpStatus: 413, object: filePath }); } @@ -295,37 +298,40 @@ export default class GitHubStream extends GitHubBase { if (cacheFills.size >= 64) throw new AnonymousError("cache_busy", { httpStatus: 503 }); filling = coordinatedFill(key, cached, async () => { await assertActive(); - const content = await this.downloadWithFallback(await this.data.getToken(), expected.sha, filePath); - let count = 0; - const limited = new stream.Transform({ transform(chunk, encoding, callback) { - count += chunk.length; - callback(count > config.MAX_FILE_SIZE ? new AnonymousError("file_too_big", { httpStatus: 413 }) : null, chunk); - } }); - content.on("error", error => { - if (error instanceof AnonymousError) { limited.destroy(error); return; } - const status = (error as { response?: { statusCode?: number }; status?: number; httpStatus?: number }); - const httpStatus = status.response?.statusCode ?? status.status ?? status.httpStatus; - const code = httpStatus === 403 ? "file_not_accessible" - : httpStatus === 404 ? "file_not_found" - : httpStatus === 422 ? "file_too_big" : "upstream_error"; - limited.destroy(new AnonymousError(code, { httpStatus: httpStatus || 502, cause: error, object: filePath })); + const token = await this.data.getToken(); + return measureStage("upstream", async () => { + const content = await this.downloadWithFallback(token, expected.sha, filePath); + let count = 0; + const limited = new stream.Transform({ transform(chunk, encoding, callback) { + count += chunk.length; + callback(count > config.MAX_FILE_SIZE ? new AnonymousError("file_too_big", { httpStatus: 413 }) : null, chunk); + } }); + content.on("error", error => { + if (error instanceof AnonymousError) { limited.destroy(error); return; } + const status = (error as { response?: { statusCode?: number }; status?: number; httpStatus?: number }); + const httpStatus = status.response?.statusCode ?? status.status ?? status.httpStatus; + const code = httpStatus === 403 ? "file_not_accessible" + : httpStatus === 404 ? "file_not_found" + : httpStatus === 422 ? "file_too_big" : "upstream_error"; + limited.destroy(new AnonymousError(code, { httpStatus: httpStatus || 502, cause: error, object: filePath })); + }); + limited.once("close", () => content.destroy()); + limited.on("error", () => {}); + content.pipe(limited); + const deadline = setTimeout(() => limited.destroy(new AnonymousError("upstream_error", { httpStatus: 502 })), 120_000); + try { + await storage.write(repoId, cachePath, limited, this.type, expected.size); + try { await assertActive(); } + catch (error) { await storage.rm(repoId, cachePath); throw error; } + } + finally { clearTimeout(deadline); limited.destroy(); content.destroy(); } + return true; }); - limited.once("close", () => content.destroy()); - limited.on("error", () => {}); - content.pipe(limited); - const deadline = setTimeout(() => limited.destroy(new AnonymousError("upstream_error", { httpStatus: 502 })), 120_000); - try { - await storage.write(repoId, cachePath, limited, this.type, expected.size); - try { await assertActive(); } - catch (error) { await storage.rm(repoId, cachePath); throw error; } - } - finally { clearTimeout(deadline); limited.destroy(); content.destroy(); } - return true; }).then(() => {}); cacheFills.set(key, filling); void filling.finally(() => { if (cacheFills.get(key) === filling) cacheFills.delete(key); }).catch(() => {}); } - await filling; + await measureStage("cache_fill", () => filling!); return storage.read(repoId, cachePath); } diff --git a/src/core/transformed-cache.ts b/src/core/transformed-cache.ts index 304274c..52a2fcc 100644 --- a/src/core/transformed-cache.ts +++ b/src/core/transformed-cache.ts @@ -8,6 +8,7 @@ import { isConnected } from "../server/database"; import RepositoryModel from "./model/anonymizedRepositories/anonymizedRepositories.model"; import { RepositoryStatus } from "./types"; import AnonymousError from "./AnonymousError"; +import { recordCacheHit } from "./request-monitoring"; const root = join(tmpdir(), "anonymous-transformed-v1"); const TTL = 3600_000; const DISK_BUDGET = 512 * 1024 * 1024; @@ -62,8 +63,9 @@ export async function transformedFile(digest: string, options: unknown, output: }; const hit = await read(); if (hit !== undefined) { - try { return await copyCached(hit); } catch { /* eviction: retry the transformation */ } + try { const copied = await copyCached(hit); recordCacheHit("transformed", true); return copied; } catch { /* eviction: retry the transformation */ } } + recordCacheHit("transformed", false); const pending = fills.get(key); if (pending) { await pending.catch(() => {}); diff --git a/src/core/zipStream.ts b/src/core/zipStream.ts index 453dcee..ade41b6 100644 --- a/src/core/zipStream.ts +++ b/src/core/zipStream.ts @@ -12,6 +12,7 @@ import { compileTerms, } from "./anonymize-utils"; import { createLogger, serializeError } from "./logger"; +import { startStage } from "./request-monitoring"; const logger = createLogger("zip-stream"); @@ -111,7 +112,11 @@ export async function streamAnonymizedZip( }, }); } + const upstreamDone = startStage("upstream"); const downloadStream = got.stream(response.url); + downloadStream.once("end", () => upstreamDone()); + downloadStream.once("error", () => upstreamDone(true)); + downloadStream.once("close", () => upstreamDone(!downloadStream.readableEnded)); const archive = archiver("zip", {}); const parser = Parse() as Transform; diff --git a/src/server/index.ts b/src/server/index.ts index 7f476c1..2258654 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -36,6 +36,9 @@ import { getUser } from "./routes/route-utils"; import config from "../config"; import { resolveTrustProxy, isCloudflareIP } from "./trustProxy"; import { createLogger, serializeError } from "../core/logger"; +import { monitorRequests } from "../core/request-monitoring"; +import { startPerformanceMonitoring } from "../core/performance-monitoring"; +import { getAnonymizationPoolStats } from "../core/anonymization-pool"; const logger = createLogger("server"); @@ -99,6 +102,8 @@ function indexResponse(req: express.Request, res: express.Response) { export default async function start() { const app = express(); + app.use(monitorRequests("api")); + startPerformanceMonitoring("api", getAnonymizationPoolStats); app.set("query parser", "extended"); app.use("/github/app/webhook", githubAppWebhook); app.use(express.json()); @@ -228,20 +233,6 @@ export default async function start() { keyGenerator, }); - app.use(function (req, res, next) { - const start = Date.now(); - res.on("finish", function () { - const time = Date.now() - start; - logger.info("request", { - method: req.method, - status: res.statusCode, - url: join(req.baseUrl || "", req.url || ""), - ms: time, - }); - }); - next(); - }); - app.use("/github", rate, speedLimiter, githubAppRouter); app.use("/github", rate, speedLimiter, connectionRouter); diff --git a/src/server/routes/admin.ts b/src/server/routes/admin.ts index de09b4b..c574f40 100644 --- a/src/server/routes/admin.ts +++ b/src/server/routes/admin.ts @@ -1,6 +1,7 @@ import { AsyncCache } from "../../core/async-cache"; import * as os from "os"; -import { execSync } from "child_process"; +import { execFile } from "child_process"; +import { promisify } from "util"; import { Queue, JobType } from "bullmq"; import * as express from "express"; import AnonymousError from "../../core/AnonymousError"; @@ -30,8 +31,11 @@ import { } from "../../core/logger"; import { createClient, RedisClientType } from "redis"; import config from "../../config"; +import { performanceReport } from "../../core/performance-monitoring"; const logger = createLogger("admin"); +const execFileAsync = promisify(execFile); +const diskUsageCache = new AsyncCache(30000, 1); let errorLogClient: RedisClientType | null = null; @@ -78,6 +82,12 @@ router.use( router.use("/tokens", adminTokensRouter); +router.get("/performance", async (req, res) => { + res.set("Cache-Control", "no-store"); + try { res.json(await performanceReport(Number(req.query.minutes))); } + catch { res.json({ available: false, instances: [], routes: [], stages: [] }); } +}); + function dashboardCache( _req: express.Request, res: express.Response, @@ -627,7 +637,10 @@ router.get("/overview", async (req, res) => { // Disk usage via df (root partition) let diskTotal = 0, diskUsed = 0, diskFree = 0, diskPercent = 0, diskMount = "/"; try { - const dfOut = execSync("df -k / 2>/dev/null", { timeout: 3000 }).toString(); + const dfOut = await diskUsageCache.get("root", async () => { + const result = await execFileAsync("df", ["-k", "/"], { timeout: 3000, maxBuffer: 16384 }); + return result.stdout; + }); const lines = dfOut.trim().split("\n"); if (lines.length >= 2) { const cols = lines[1].split(/\s+/); diff --git a/src/server/routes/file.ts b/src/server/routes/file.ts index 95ffd38..779864b 100644 --- a/src/server/routes/file.ts +++ b/src/server/routes/file.ts @@ -3,6 +3,9 @@ import AnonymizedFile from "../../core/AnonymizedFile"; import AnonymousError from "../../core/AnonymousError"; import { getRepo, handleError } from "./route-utils"; import { fileETag } from "./file-etag"; +import config from "../../config"; +import { lookup } from "mime-types"; +import { isTextFile } from "../../core/anonymize-utils"; export const router = express.Router(); @@ -142,9 +145,17 @@ router.get( // anonymization term list left old anonymizations cached under the // same URL. res.header("Cache-Control", "private, no-cache, must-revalidate"); - if (req.headers["if-none-match"] === etag) { + if (req.fresh) { return res.status(304).end(); } + if (req.method === "HEAD") { + const size = await f.size(); + if (size != null && size > config.MAX_FILE_SIZE) throw new AnonymousError("file_too_big", { httpStatus: 413 }); + const mime = lookup(originalPath); + if (mime && !originalPath.endsWith(".ts")) res.type(mime); + else if (isTextFile(originalPath)) res.type("text/plain"); + res.end(); return; + } await f.send(res); await repo.countView(); } catch (error) { diff --git a/src/server/routes/repository-public.ts b/src/server/routes/repository-public.ts index 87a9300..9150bd3 100644 --- a/src/server/routes/repository-public.ts +++ b/src/server/routes/repository-public.ts @@ -14,6 +14,7 @@ import FileModel from "../../core/model/files/files.model"; import { createLogger, serializeError } from "../../core/logger"; import { githubTokenForStreamer } from "../../core/github-token-context"; import gh = require("parse-github-url"); +import { requestHeaders, startStage } from "../../core/request-monitoring"; const logger = createLogger("repository-public"); @@ -52,16 +53,20 @@ router.get( }); } + res.attachment(`${repo.repoId}.zip`); + if (req.method === "HEAD") { res.end(); return; } await repo.countView(); if (config.STREAMER_ENTRYPOINT) { // use the streamer service const token = await repo.getToken(); const anonymizer = repo.generateAnonymizeTransformer(""); + const headersDone = startStage("streamer_headers"); res.attachment(`${repo.repoId}.zip`); const reqStream = got .stream(join(config.STREAMER_ENTRYPOINT, "api/download"), { method: "POST", + headers: requestHeaders(), json: { token: await githubTokenForStreamer(token, repo.model.source.repositoryName), repoFullName: repo.model.source.repositoryName, @@ -76,6 +81,7 @@ router.get( }, }) .on("error", (err: Error & { response?: { statusCode?: number; body?: unknown } }) => { + headersDone(true); const upstreamStatus = err?.response?.statusCode; let upstreamBody: string | undefined; let errCode = "zip_not_available"; @@ -130,6 +136,8 @@ router.get( // instead of waiting forever for the ZIP's central directory. if (streaming && !res.writableEnded) res.destroy(); }); + reqStream.once("response", () => headersDone()); + reqStream.once("close", () => headersDone()); reqStream.pipe(res); res.on("close", () => { reqStream.destroy(); diff --git a/src/server/routes/route-utils.ts b/src/server/routes/route-utils.ts index a4edefa..295bb01 100644 --- a/src/server/routes/route-utils.ts +++ b/src/server/routes/route-utils.ts @@ -8,6 +8,7 @@ import { HTTPError } from "got"; import { RepositoryStatus } from "../../core/types"; import { createLogger, serializeError } from "../../core/logger"; import { isDisabledAccount } from "./auth-utils"; +import { measureStage } from "../../core/request-monitoring"; const logger = createLogger("route"); @@ -81,7 +82,8 @@ export async function getRepo( if (typeof req.params.repoId !== "string") { throw new AnonymousError("invalid_path", { httpStatus: 400 }); } - const repo = await db.getRepository(req.params.repoId); + const repoId = req.params.repoId; + const repo = await measureStage("repository", () => db.getRepository(repoId)); if (opt.nocheck !== true) { // redirect if the repository is expired if ( diff --git a/src/server/routes/webview.ts b/src/server/routes/webview.ts index dd0d460..43eb5a5 100644 --- a/src/server/routes/webview.ts +++ b/src/server/routes/webview.ts @@ -5,8 +5,11 @@ import AnonymizedFile from "../../core/AnonymizedFile"; import AnonymousError from "../../core/AnonymousError"; import * as marked from "marked"; import * as sanitizeHtml from "sanitize-html"; -import { streamToString } from "../../core/anonymize-utils"; +import { streamToString, isTextFile } from "../../core/anonymize-utils"; import { IFile } from "../../core/model/files/files.types"; +import { fileETag } from "./file-etag"; +import { lookup } from "mime-types"; +import config from "../../config"; function escapeHtml(str: string): string { return str @@ -170,6 +173,19 @@ async function webView( object: f, }); } + res.set("Cache-Control", "private, no-cache, must-revalidate"); + const pageETag = fileETag(JSON.stringify(["web-v1", repo.model.source.commit, repo.model.treeGeneration, repo.model.contentCacheRevision, + await f.sha(), repo.model.source.repositoryName, repo.model.source.branch, config.APP_HOSTNAME, config.ANONYMIZATION_MASK]), + requestPath, repo.options); + res.set("ETag", pageETag); + if (req.fresh) { res.status(304).end(); return; } + if (req.method === "HEAD") { + const size = await f.size(); + if (size != null && size > config.MAX_FILE_SIZE) throw new AnonymousError("file_too_big", { httpStatus: 413 }); + const mime = lookup(requestPath); + res.type(f.extension() === "md" ? "text/html" : mime && !requestPath.endsWith(".ts") ? mime : isTextFile(requestPath) ? "text/plain" : "application/octet-stream"); + res.end(); return; + } if (f.extension() == "md") { try { const content = await streamToString(await f.anonymizedContent()); @@ -177,6 +193,8 @@ async function webView( const html = `Content
${body}
`; res.contentType("text/html").send(html); } catch { + // Raw Markdown must re-enter rendering when a transient failure clears. + res.set("ETag", fileETag(`web-raw:${pageETag}`, requestPath, repo.options)); await f.send(res); } } else { diff --git a/src/streamer/index.ts b/src/streamer/index.ts index d0539e0..28106b0 100644 --- a/src/streamer/index.ts +++ b/src/streamer/index.ts @@ -11,10 +11,14 @@ import AnonymousError from "../core/AnonymousError"; import { createLogger, serializeError } from "../core/logger"; import { connect } from "../server/database"; import { startTemporaryStorageMaintenance } from "../core/temporary-storage"; +import { monitorRequests } from "../core/request-monitoring"; +import { startPerformanceMonitoring } from "../core/performance-monitoring"; +import { getAnonymizationPoolStats } from "../core/anonymization-pool"; const logger = createLogger("streamer"); const app = express(); +app.use(monitorRequests("streamer")); app.use(express.json()); app.use( @@ -46,6 +50,7 @@ app.all("/{*path}", (req, res) => { ); }); async function start() { + startPerformanceMonitoring("streamer", getAnonymizationPoolStats); await connect({ appName: "Anonymous GitHub Streamer", maxPoolSize: 10, minPoolSize: 0 }); await startTemporaryStorageMaintenance(); app.listen(config.PORT, (error?: Error) => { diff --git a/test/download-header-performance.test.js b/test/download-header-performance.test.js new file mode 100644 index 0000000..bba40ca --- /dev/null +++ b/test/download-header-performance.test.js @@ -0,0 +1,107 @@ +const { expect } = require("chai"); +const express = require("express"); +const http = require("node:http"); +const { Readable } = require("node:stream"); +require("ts-node/register/transpile-only"); +const utils = require("../src/server/routes/route-utils"); +const AnonymizedFile = require("../src/core/AnonymizedFile").default; +const fileRouter = require("../src/server/routes/file").default; +const webRouter = require("../src/server/routes/webview").default; +const config = require("../src/config").default; + +describe("download headers and website revalidation", function () { + let server, restore, repo, transfers, blobSha; + beforeEach(async function () { + const originalGetRepo = utils.getRepo; + const originals = Object.fromEntries(["originalPath", "sha", "size", "send", "getFileInfo", "anonymizedContent"].map(key => [key, AnonymizedFile.prototype[key]])); + restore = () => { utils.getRepo = originalGetRepo; Object.assign(AnonymizedFile.prototype, originals); }; + transfers = 0; blobSha = "first"; + repo = { repoId: "fixture", options: { terms: ["author"], image: true, pdf: true, page: true, pageSource: { branch: "main", path: "/" } }, + model: { source: { commit: "commit", branch: "main" }, treeGeneration: "first" }, isReady: async () => true, countView: async () => {} }; + utils.getRepo = async () => repo; + AnonymizedFile.prototype.originalPath = async function () { return this.anonymizedPath; }; + AnonymizedFile.prototype.sha = async () => blobSha; + AnonymizedFile.prototype.size = async () => 10; + AnonymizedFile.prototype.getFileInfo = async () => ({ name: "page.md", path: "", size: 10 }); + AnonymizedFile.prototype.send = async function (res) { transfers++; res.send("fixture content"); }; + AnonymizedFile.prototype.anonymizedContent = async () => { transfers++; return Readable.from(["# Anonymized page"]); }; + const app = express(); app.use("/api/repo", fileRouter); app.use("/w", webRouter); + server = await new Promise(resolve => { const s = app.listen(0, "127.0.0.1", () => resolve(s)); }); + }); + afterEach(async function () { server.closeAllConnections(); await new Promise(resolve => server.close(resolve)); restore(); }); + function fetch(path, method = "GET", headers = {}) { + return new Promise((resolve, reject) => { + http.request({ host: "127.0.0.1", port: server.address().port, path, method, headers }, res => { + let body = ""; res.on("data", chunk => { body += chunk; }); + res.on("end", () => resolve({ status: res.statusCode, headers: res.headers, body })); + }).on("error", reject).end(); + }); + } + it("serves file HEAD metadata without reading content", async function () { + const response = await fetch("/api/repo/fixture/file/data.txt", "HEAD"); + expect(response.status).to.equal(200); expect(response.body).to.equal(""); + expect(response.headers["etag"]).to.match(/^"f-/); expect(response.headers["content-type"]).to.include("text/plain"); + expect(transfers).to.equal(0); + }); + it("preserves content gates for HEAD", async function () { + repo.options.pdf = false; + expect((await fetch("/api/repo/fixture/file/private.pdf", "HEAD")).status).to.equal(403); + expect(transfers).to.equal(0); + }); + it("rejects oversized file HEAD without downloading", async function () { + AnonymizedFile.prototype.size = async () => config.MAX_FILE_SIZE + 1; + expect((await fetch("/api/repo/fixture/file/huge.txt", "HEAD")).status).to.equal(413); expect(transfers).to.equal(0); + }); + it("accepts weak and multiple validators without transferring file content", async function () { + const first = await fetch("/api/repo/fixture/file/data.txt", "HEAD"); + const response = await fetch("/api/repo/fixture/file/data.txt", "GET", { "If-None-Match": `"unrelated", W/${first.headers.etag}` }); + expect(response.status).to.equal(304); expect(transfers).to.equal(0); + }); + it("revalidates a Markdown website before fetching or rendering it again", async function () { + const first = await fetch("/w/fixture/page.md"); + expect(first.status).to.equal(200); expect(first.body).to.include("Anonymized page"); expect(transfers).to.equal(1); + const second = await fetch("/w/fixture/page.md", "GET", { "If-None-Match": `W/${first.headers.etag}` }); + expect(second.status).to.equal(304); expect(second.body).to.equal(""); expect(transfers).to.equal(1); + expect(second.headers["content-security-policy"]).to.include("sandbox"); + }); + it("renders Markdown again after a transient failure served the raw fallback", async function () { + const marked = require("marked"), render = marked.marked; + let first; + try { + marked.marked = () => { throw Error("transient rendering failure"); }; + first = await fetch("/w/fixture/page.md"); + expect(first.status).to.equal(200); expect(first.body).to.equal("fixture content"); + } finally { marked.marked = render; } + const recovered = await fetch("/w/fixture/page.md", "GET", { "If-None-Match": first.headers.etag }); + expect(recovered.status).to.equal(200); expect(recovered.body).to.include("Anonymized page"); + expect(recovered.headers.etag).not.to.equal(first.headers.etag); + const revalidated = await fetch("/w/fixture/page.md", "GET", { "If-None-Match": recovered.headers.etag }); + expect(revalidated.status).to.equal(304); expect(transfers).to.equal(3); + }); + it("serves website HEAD without reading or rendering Markdown", async function () { + const response = await fetch("/w/fixture/page.md", "HEAD"); + expect(response.status).to.equal(200); expect(response.headers["content-type"]).to.include("text/html"); expect(transfers).to.equal(0); + }); + it("serves TypeScript website HEAD with the same text MIME policy as GET", async function () { + const response = await fetch("/w/fixture/code.ts", "HEAD"); + expect(response.status).to.equal(200); expect(response.headers["content-type"]).to.include("text/plain"); expect(transfers).to.equal(0); + }); + for (const change of ["terms", "commit", "tree", "cache", "blob", "source name"]) { + it(`invalidates the website validator when ${change} changes`, async function () { + const first = await fetch("/w/fixture/page.md"); + if (change === "terms") repo.options.terms = ["new author"]; + if (change === "commit") repo.model.source.commit = "new commit"; + if (change === "tree") repo.model.treeGeneration = "new tree"; + if (change === "cache") repo.model.contentCacheRevision = "new cache"; + if (change === "blob") blobSha = "new blob"; + if (change === "source name") repo.model.source.repositoryName = "new/source"; + const second = await fetch("/w/fixture/page.md", "GET", { "If-None-Match": first.headers.etag }); + expect(second.status).to.equal(200); expect(second.headers.etag).not.to.equal(first.headers.etag); expect(transfers).to.equal(2); + }); + } + it("checks website permissions before honoring an old validator", async function () { + const first = await fetch("/w/fixture/page.md"); repo.options.page = false; + expect((await fetch("/w/fixture/page.md", "GET", { "If-None-Match": first.headers.etag })).status).to.equal(400); + expect(transfers).to.equal(1); + }); +}); diff --git a/test/monitoring-access.test.js b/test/monitoring-access.test.js new file mode 100644 index 0000000..ebe2575 --- /dev/null +++ b/test/monitoring-access.test.js @@ -0,0 +1,32 @@ +const { expect } = require("chai"); +const express = require("express"); +const http = require("node:http"); +require("ts-node/register/transpile-only"); +const utils = require("../src/server/routes/route-utils"); +const admin = require("../src/server/routes/admin").default; + +describe("performance report access", function () { + let server, original; + before(async function () { + original = utils.getUser; + utils.getUser = async req => ({ isAdmin: req.get("x-fixture-user") === "admin", model: { id: "fixture" } }); + const app = express(); + app.use((req, _res, next) => { req.isAuthenticated = () => !!req.get("x-fixture-user"); next(); }); + app.use("/api/admin", admin); + server = await new Promise(resolve => { const s = app.listen(0, "127.0.0.1", () => resolve(s)); }); + }); + after(async function () { server.closeAllConnections(); await new Promise(resolve => server.close(resolve)); utils.getUser = original; }); + async function request(user) { + return new Promise((resolve, reject) => { + http.get({ host: "127.0.0.1", port: server.address().port, path: "/api/admin/performance", headers: user ? { "x-fixture-user": user } : {} }, res => { + let body = ""; res.on("data", chunk => { body += chunk; }); res.on("end", () => resolve({ status: res.statusCode, body, headers: res.headers })); + }).on("error", reject); + }); + } + it("rejects anonymous requests", async function () { expect((await request()).status).to.equal(401); }); + it("rejects non-admin users", async function () { expect((await request("regular")).status).to.equal(401); }); + it("allows admins and disables HTTP caching", async function () { + const result = await request("admin"); expect(result.status).to.equal(200); + expect(JSON.parse(result.body).available).to.equal(false); expect(result.headers["cache-control"]).to.equal("no-store"); + }); +}); diff --git a/test/performance-monitoring-integration.test.js b/test/performance-monitoring-integration.test.js new file mode 100644 index 0000000..5065de5 --- /dev/null +++ b/test/performance-monitoring-integration.test.js @@ -0,0 +1,95 @@ +const { expect } = require("chai"); +const { createClient } = require("redis"); +const net = require("node:net"); +const { setTimeout } = require("node:timers"); +require("ts-node/register/transpile-only"); +const config = require("../src/config").default; +const { requestMetrics } = require("../src/core/request-monitoring"); +const { startPerformanceMonitoring, flushPerformanceMetrics, performanceReport } = require("../src/core/performance-monitoring"); +const port = Number(process.env.PERFORMANCE_REDIS_PORT); + +(port ? describe : describe.skip)("request monitoring persistence", function () { + this.timeout(15000); + let stop, redis, previous; + before(async function () { + previous = { host: config.REDIS_HOSTNAME, port: config.REDIS_PORT }; + config.REDIS_HOSTNAME = "127.0.0.1"; config.REDIS_PORT = port; + redis = createClient({ socket: { host: "127.0.0.1", port, reconnectStrategy: false } }); await redis.connect(); + }); + beforeEach(async function () { + const keys = []; + for await (const key of redis.scanIterator({ MATCH: "performance:v1:*" })) keys.push(key); + if (keys.length) await redis.del(keys); + requestMetrics.drain(); + }); + afterEach(async function () { if (stop) { await stop(); stop = null; } requestMetrics.drain(); }); + after(async function () { await redis.disconnect(); config.REDIS_HOSTNAME = previous.host; config.REDIS_PORT = previous.port; }); + async function start(service) { + stop = startPerformanceMonitoring(service, () => ({ running: 0, waiting: 0 })); + const deadline = Date.now() + 4000; + while (!(await performanceReport(15)).available) { + if (Date.now() > deadline) throw Error("Monitoring did not connect"); + await new Promise(resolve => setTimeout(resolve, 20)); + } + } + it("batches latency, failures, interruptions and resource history with bounded retention", async function () { + await start("api"); + requestMetrics.observe("request", "/api/repo/:repoId/zip", "GET", 8000, { bytes: 12345 }); + requestMetrics.observe("request", "/api/repo/:repoId/zip", "GET", 1500, { aborted: true, error: true }); + requestMetrics.observe("upstream", "all", "all", 90); + await flushPerformanceMetrics(); + const result = await performanceReport(15); + expect(result.available).to.equal(true); expect(result.routes).to.have.length(1); + expect(result.routes[0]).to.include({ count: 2, aborted: 1, errors: 1, bytes: 12345, avgMs: 4750, p95UpperMs: 10000 }); + expect(result.stages[0]).to.include({ metric: "upstream", count: 1 }); + expect(result.instances).to.have.length(1); expect(result.instances[0].memory.rss).to.be.greaterThan(0); + expect(result.runtimeSeries).to.have.length(1); expect(result.series[0].requests).to.equal(2); + const minuteKey = `performance:v1:minute:api:${Math.floor(Date.now() / 60000) * 60000}`; + expect(await redis.ttl(minuteKey)).to.be.within(7100, 7200); + expect(await redis.ttl(`performance:v1:instance:${result.instances[0].instance}`)).to.be.within(80, 90); + await flushPerformanceMetrics(); expect((await performanceReport(15)).routes[0].count).to.equal(2); + }); + it("retains counters across process restarts and combines all streamers", async function () { + await start("api"); requestMetrics.observe("request", "/api/repo/:repoId/file/:path", "GET", 20); + await flushPerformanceMetrics(); await stop(); stop = null; + await start("streamer"); requestMetrics.observe("request", "/api", "POST", 10); await flushPerformanceMetrics(); + const result = await performanceReport(60); + expect(result.routes.map(row => row.service).sort()).to.deep.equal(["api", "streamer"]); + expect(result.runtimeSeries.map(row => row.service).sort()).to.deep.equal(["api", "streamer"]); + expect(result.windowMinutes).to.equal(60); + }); + it("bounds requested history and excludes expired process heartbeats", async function () { + await start("api"); await flushPerformanceMetrics(); + await redis.zAdd("performance:v1:instances", { score: Date.now() - 100000, value: "retired" }); + await redis.set("performance:v1:instance:retired", '{"instance":"retired"}'); + const result = await performanceReport(1000000); + expect(result.windowMinutes).to.equal(15); expect(result.instances).to.have.length(1); + expect(result.instances[0].instance).not.to.equal("retired"); + }); + it("returns unavailable promptly and stays bounded when the Redis endpoint never replies", async function () { + const connections = []; + const blackhole = net.createServer(socket => { connections.push(socket); socket.on("error", () => {}); }); + await new Promise(resolve => blackhole.listen(0, "127.0.0.1", resolve)); + config.REDIS_PORT = blackhole.address().port; + try { + stop = startPerformanceMonitoring("api"); + for (let i = 0; i < 10000; i++) requestMetrics.observe("request", "other", "GET", 10); + const started = Date.now(); await flushPerformanceMetrics(); + expect((await performanceReport(60)).available).to.equal(false); + expect(Date.now() - started).to.be.lessThan(500); expect(requestMetrics.size).to.equal(0); + await stop(); stop = null; + } finally { + connections.forEach(socket => socket.destroy()); await new Promise(resolve => blackhole.close(resolve)); config.REDIS_PORT = port; + } + }); + it("cuts off an in-flight batch when a connected Redis server stops responding", async function () { + await start("api"); + requestMetrics.observe("request", "other", "GET", 15); + await redis.sendCommand(["CLIENT", "PAUSE", "2500", "ALL"]); + const started = Date.now(); + await flushPerformanceMetrics(); + expect(Date.now() - started).to.be.within(1800, 2800); + expect(requestMetrics.size).to.equal(0); + expect((await performanceReport(15)).available).to.equal(false); + }); +}); diff --git a/test/production-regressions.test.js b/test/production-regressions.test.js index 6ae0b6e..c58664c 100644 --- a/test/production-regressions.test.js +++ b/test/production-regressions.test.js @@ -217,6 +217,7 @@ describe("production regressions", function () { function response() { return { headers: {}, header(key, value) { this.headers[key] = value; return this; }, + set(key, value) { return this.header(key, value); }, contentType() { return this; }, status(value) { this.statusCode = value; return this; }, end() {}, send() {} }; } function fileRoute(originalName) { diff --git a/test/request-monitoring.test.js b/test/request-monitoring.test.js new file mode 100644 index 0000000..4b29ecc --- /dev/null +++ b/test/request-monitoring.test.js @@ -0,0 +1,176 @@ +const { expect } = require("chai"); +const express = require("express"); +const compression = require("compression"); +const http = require("node:http"); +const net = require("node:net"); +const { setTimeout } = require("node:timers"); +const { gunzipSync } = require("node:zlib"); +const { Readable } = require("node:stream"); +const { setTimeout: delay } = require("node:timers/promises"); +require("ts-node/register/transpile-only"); +const { RequestMetrics, monitorRequests, requestRoute, requestHeaders, startStage, requestMetrics, activeRequestCount } = require("../src/core/request-monitoring"); +const { percentileUpperBound, socketSnapshot, performanceReport } = require("../src/core/performance-monitoring"); +const GitHubStream = require("../src/core/source/GitHubStream").default; +const storage = require("../src/core/storage").default; + +function fetch(server, path, options = {}) { + return new Promise((resolve, reject) => { + http.request({ host: "127.0.0.1", port: server.address().port, path, ...options }, res => { + const chunks = []; res.on("data", chunk => chunks.push(chunk)); res.on("error", reject); + res.on("end", () => resolve({ status: res.statusCode, headers: res.headers, body: Buffer.concat(chunks) })); + }).on("error", reject).end(); + }); +} + +describe("bounded request monitoring", function () { + let server, metrics, logs, app; + beforeEach(function () { + metrics = new RequestMetrics(); logs = []; requestMetrics.drain(); + app = express(); app.use(monitorRequests("api", metrics, { info: (...args) => logs.push(args), warn: (...args) => logs.push(args) })); + app.use(compression({ filter: () => true })); + }); + afterEach(async function () { + if (server) { server.closeAllConnections(); await new Promise(resolve => server.close(resolve)); server = null; } + requestMetrics.drain(); + }); + async function listen() { server = await new Promise(resolve => { const s = app.listen(0, "127.0.0.1", () => resolve(s)); }); } + + it("keeps labels bounded and removes source identities and query values", function () { + expect(requestRoute("/api/repo/private-name/file/secret.txt?token=abc", "api")).to.equal("/api/repo/:repoId/file/:path"); + expect(requestRoute("/api/repo/secret-owner/secret-repo/readme?branch=secret", "api")).to.equal("/api/repo/:owner/:repo/readme"); + expect(requestRoute("/api/repo/id/files/counts", "api")).to.equal("/api/repo/:repoId/files/counts"); + const labels = new Set(Array.from({ length: 10000 }, (_, i) => requestRoute(`/unknown-${i}/private-${i}`, "api"))); + expect([...labels]).to.deep.equal(["other"]); + expect(requestRoute("/healthcheck", "streamer")).to.equal("/healthcheck"); + const bounded = new RequestMetrics(3); + for (let i = 0; i < 1000; i++) bounded.observe("request", String(i), "GET", 10); + expect(bounded.size).to.equal(3); expect(bounded.dropped).to.equal(997); + }); + + it("records histogram upper bounds and releases the batch after flushing", function () { + [1, 20, 51, 150, 501, 50000, 70000].forEach(ms => metrics.observe("request", "other", "GET", ms)); + const row = metrics.drain()[0].data; + expect(row.count).to.equal(7); expect(row.sumMs).to.equal(120723); + expect(percentileUpperBound(row.buckets, .5)).to.equal(250); + expect(percentileUpperBound(row.buckets, .95)).to.equal(null); + expect(metrics.size).to.equal(0); expect(metrics.drain()).to.deep.equal([]); + }); + + for (const gzip of [false, true]) { + it(`preserves backpressure and ${gzip ? "gzip" : "plain"} bytes`, async function () { + this.timeout(10000); + const body = Buffer.alloc(2 * 1024 * 1024, "content-"); + let drains = 0, callbacks = 0; + app.get("/api/repo/:repoId/file/*path", async (_req, res) => { + res.type("text/plain"); + for (let i = 0; i < body.length; i += 16384) { + if (!res.write(body.subarray(i, i + 16384), () => callbacks++)) { + drains++; + await new Promise(resolve => { + const drained = () => { emitter.removeListener("drain", drained); resolve(); }; + const emitter = res.on("drain", drained); + }); + } + } + res.end(); + }); + await listen(); + const result = await fetch(server, "/api/repo/private/file/private.txt?token=secret", { headers: { "Accept-Encoding": gzip ? "gzip" : "identity" } }); + expect(gzip ? gunzipSync(result.body) : result.body).to.deep.equal(body); + expect(drains).to.be.greaterThan(0); + // Compression omits write callbacks; the plain writable must retain them. + expect(callbacks).to.equal(gzip ? 0 : body.length / 16384); + const row = metrics.drain().find(row => row.data.metric === "request").data; + expect(row.bytes).to.equal(result.body.length); expect(row.aborted).to.equal(0); expect(row.count).to.equal(1); + expect(JSON.stringify(logs)).not.to.include("private.txt"); expect(JSON.stringify(logs)).not.to.include("secret"); + expect(logs[0][1].requestId).to.equal(result.headers["x-request-id"]); + expect(activeRequestCount()).to.equal(0); + }); + } + + it("counts HEAD as a zero-byte response even when a handler writes a body", async function () { + app.get("/", (_req, res) => res.send("body omitted by Node")); await listen(); + const result = await fetch(server, "/", { method: "HEAD" }); + expect(result.body.length).to.equal(0); + expect(metrics.drain().find(row => row.data.metric === "request").data.bytes).to.equal(0); + }); + + for (const headersSent of [false, true]) { + it(`records a disconnect ${headersSent ? "after" : "before"} headers exactly once`, async function () { + let arrived; const ready = new Promise(resolve => { arrived = resolve; }); + let finished; const terminal = new Promise(resolve => { finished = resolve; }); + app.get("/", (_req, res) => { if (headersSent) { res.type("text/plain"); res.write("partial"); } arrived(); res.on("close", finished); }); + await listen(); + const client = http.get({ host: "127.0.0.1", port: server.address().port, path: "/" }); client.on("error", () => {}); + await ready; client.destroy(); await terminal; + expect(logs).to.have.length(1); expect(logs[0][0]).to.equal("request interrupted"); + expect(logs[0][1].outcome).to.equal("interrupted"); + const row = metrics.drain().find(row => row.data.metric === "request").data; + expect(row.count).to.equal(1); expect(row.aborted).to.equal(1); expect(activeRequestCount()).to.equal(0); + if (!headersSent) expect(logs[0][1].firstByteMs).to.equal(null); + }); + } + + it("keeps overlapping request IDs and asynchronous stages isolated", async function () { + let doneA, doneB; + app.get("/a", (_req, res) => { doneA = startStage("upstream"); setTimeout(() => { doneA(); doneA(); res.json(requestHeaders()); }, 30); }); + app.get("/b", (_req, res) => { doneB = startStage("repository"); setTimeout(() => { doneB(); res.json(requestHeaders()); }, 10); }); + await listen(); const results = await Promise.all([fetch(server, "/a"), fetch(server, "/b")]); + for (const result of results) expect(JSON.parse(result.body)["x-request-id"]).to.equal(result.headers["x-request-id"]); + expect(results[0].headers["x-request-id"]).not.to.equal(results[1].headers["x-request-id"]); + expect(logs.filter(row => row[1].stages.upstream)).to.have.length(1); + expect(logs.filter(row => row[1].stages.repository)).to.have.length(1); + expect(requestMetrics.drain().reduce((count, row) => count + row.data.count, 0)).to.equal(2); + expect(requestHeaders()).to.deep.equal({}); + }); + + it("covers delays and errors before route handling", async function () { + app.use((_req, _res, next) => setTimeout(next, 35)); app.use(express.json()); + app.get("/", (_req, res) => res.status(503).json({ error: "unavailable" })); await listen(); + const response = await fetch(server, "/"); expect(response.status).to.equal(503); + const row = metrics.drain().find(row => row.data.metric === "request").data; + expect(row.errors).to.equal(1); expect(row.sumMs).to.be.at.least(30); + }); + + for (const failure of [false, true]) { + it(`includes GitHub response-header waits in upstream timing${failure ? " on failure" : ""}`, async function () { + const originals = { fileInfo: storage.fileInfo, write: storage.write, read: storage.read }; + const source = new GitHubStream({ repoId: `headers-${failure}`, organization: "owner", repoName: "repo", commit: "abc", getToken: async () => "token" }); + const upstreamError = Error("headers failed"); + source.downloadWithFallback = async () => { + await delay(120); + if (failure) throw upstreamError; + return Readable.from([Buffer.from("content")]); + }; + storage.fileInfo = async () => { throw Error("cache miss"); }; + storage.write = async (_repo, _path, input) => { for await (const chunk of input) void chunk; }; + storage.read = async () => Readable.from([Buffer.from("content")]); + app.get("/", async (_req, res) => { + try { + const input = await source.getFileContentCache("file.txt", source.data.repoId, () => ({ sha: "blob", size: 7 })); + input.destroy(); res.send("ok"); + } catch (error) { res.status(502).send(error === upstreamError ? "original error" : "unexpected error"); } + }); + try { + await listen(); const response = await fetch(server, "/"); + expect(response.status).to.equal(failure ? 502 : 200); + if (failure) expect(response.body.toString()).to.equal("original error"); + expect(logs[0][1].stages.upstream).to.be.at.least(100); + const row = requestMetrics.drain().find(entry => entry.data.metric === "upstream").data; + expect(row.count).to.equal(1); expect(row.errors).to.equal(Number(failure)); + } finally { Object.assign(storage, originals); } + }); + } + + it("counts PID-owned network sockets without blocking the event loop", async function () { + const listener = net.createServer(socket => socket.end()); await new Promise(resolve => listener.listen(0, "127.0.0.1", resolve)); + try { + const snapshot = await socketSnapshot(); + if (process.platform === "linux") { expect(snapshot.listening).to.be.at.least(1); expect(snapshot.truncated).to.equal(false); } + } finally { await new Promise(resolve => listener.close(resolve)); } + }); + + it("reports missing monitoring as unavailable", async function () { + expect((await performanceReport(60000)).available).to.equal(false); + }); +}); diff --git a/test/vue-ui.test.js b/test/vue-ui.test.js index 596f58e..b68ad2a 100644 --- a/test/vue-ui.test.js +++ b/test/vue-ui.test.js @@ -446,6 +446,59 @@ describe("Vue 3 UI", function () { expect(ui.errors).to.deep.equal([]); }); + it("shows latency bounds, interruptions and resource samples on the admin overview", async function () { + const sample = { instance: "streamer:fixture", service: "streamer", sampledAt: Date.now(), cpuPercent: 2, + memory: { rss: 16 * 1024 * 1024 }, memoryLimitBytes: 128 * 1024 * 1024, + eventLoop: { p95Ms: 20 }, activeRequests: 2, sockets: { descriptors: 15, closeWait: 1 }, + workers: { running: 1, waiting: 2 }, droppedBatches: 0, droppedMetrics: 0 }; + const row = { service: "api", method: "GET", route: "/api/repo/:repoId/file/:path", count: 10, + avgMs: 120, p95UpperMs: 250, p99UpperMs: 500, aborted: 1, errors: 0, slow: 0, firstByteCount: 10, firstByteP95UpperMs: 50 }; + ui = await browser("/", { "/api/user": { username: "admin", isAdmin: true }, + "/api/admin/overview": { history: [] }, + "/api/admin/performance": { available: true, instances: [sample], routes: [row], stages: [], + runtimeSeries: [{ instance: sample.instance, rss: 20 * 1024 * 1024 }] } }); + await ui.go("/admin/"); + const text = ui.window.document.querySelector(".app-view").textContent; + expect(text).to.include("Request performance"); expect(text).to.include("\u2264 250 ms"); + expect(text).to.include("\u2264 50 ms"); expect(text).to.include("streamer:fixture"); expect(text).to.include("20.0 MB"); + expect(ui.window.document.querySelector(".table-warning")).not.to.equal(null); + await ui.input('select[aria-label="Performance time range"]', "60", "change"); + expect(ui.requests.filter(request => request.url.pathname === "/api/admin/performance").at(-1).url.searchParams.get("minutes")).to.equal("60"); + expect(ui.errors).to.deep.equal([]); + }); + + it("shows missing monitoring as unavailable on the admin overview", async function () { + ui = await browser("/", { "/api/user": { username: "admin", isAdmin: true }, + "/api/admin/overview": { history: [] }, "/api/admin/performance": { available: false } }); + await ui.go("/admin/"); + expect(ui.window.document.querySelector(".app-view").textContent).to.include("Performance monitoring is unavailable"); + expect(ui.errors).to.deep.equal([]); + }); + + for (const failure of [false, true]) { + it(`refreshes the selected performance window after an old request ${failure ? "fails" : "completes"}`, async function () { + let finishOld, finishNew; + const report = minutes => ({ available: true, windowMinutes: minutes, instances: [], stages: [], runtimeSeries: [], + routes: [{ service: "api", method: "GET", route: `window-${minutes}`, count: 1, avgMs: 1, p95UpperMs: 10, p99UpperMs: 10 }] }); + ui = await browser("/", { "/api/user": { username: "admin", isAdmin: true }, "/api/admin/overview": { history: [] }, + "/api/admin/performance": request => new Promise(resolve => { + if (request.url.searchParams.get("minutes") === "15") finishOld = () => resolve(failure ? { __status: 503, body: {} } : report(15)); + else finishNew = () => resolve(report(60)); + }) }); + await ui.go("/admin/"); + await ui.input('select[aria-label="Performance time range"]', "60", "change"); + expect(ui.requests.filter(request => request.url.pathname === "/api/admin/performance")).to.have.length(1); + finishOld(); await delay(20); + const calls = ui.requests.filter(request => request.url.pathname === "/api/admin/performance"); + expect(calls.map(request => request.url.searchParams.get("minutes"))).to.deep.equal(["15", "60"]); + expect(ui.window.document.querySelector(".app-view").textContent).not.to.include("window-15"); + expect(ui.window.document.querySelector(".app-view").textContent).not.to.include("Could not refresh performance monitoring"); + finishNew(); await delay(20); + expect(ui.window.document.querySelector(".app-view").textContent).to.include("window-60"); + expect(ui.errors).to.deep.equal([]); + }); + } + it("offers one App sign-in for new and existing accounts", async function () { ui = await browser("/signin", { "/api/options": { GITHUB_APP_ENABLED: true, GITHUB_OAUTH_ENABLED: true } }); expect(ui.window.document.querySelector('a[href="/github/app/login"]')).not.to.equal(null); diff --git a/test/zip-proxy-errors.test.js b/test/zip-proxy-errors.test.js index d6a1ebe..626e081 100644 --- a/test/zip-proxy-errors.test.js +++ b/test/zip-proxy-errors.test.js @@ -42,6 +42,29 @@ describe("ZIP proxy failures", function () { function request(onResponse, headers = {}) { return http.get(`http://127.0.0.1:${server.address().port}/test/zip`, { headers }, onResponse); } + it("answers HEAD without counting a view, obtaining a token or starting a ZIP stream", async function () { + utils.getRepo = async () => ({ repoId: "test", countView: () => { throw Error("view counted"); }, + getToken: () => { throw Error("token requested"); }, generateAnonymizeTransformer: () => { throw Error("transform requested"); } }); + got.stream = () => { throw Error("archive requested"); }; + const result = await new Promise((resolve, reject) => { + http.request(`http://127.0.0.1:${server.address().port}/test/zip`, { method: "HEAD" }, res => { + const chunks = []; res.on("data", chunk => chunks.push(chunk)); + res.on("end", () => resolve({ status: res.statusCode, headers: res.headers, body: Buffer.concat(chunks) })); + }).on("error", reject).end(); + }); + expect(result.status).to.equal(200); + expect(result.headers["content-disposition"]).to.include("test.zip"); + expect(result.body.length).to.equal(0); + }); + it("still denies HEAD when downloads are disabled", async function () { + config.ENABLE_DOWNLOAD = false; + const status = await new Promise((resolve, reject) => { + http.request(`http://127.0.0.1:${server.address().port}/test/zip`, { method: "HEAD" }, res => { + res.resume(); res.on("end", () => resolve(res.statusCode)); + }).on("error", reject).end(); + }); + expect(status).to.equal(403); + }); it("aborts a partial ZIP when the upstream fails after headers", async function () { const result = new Promise((resolve, reject) => { const client = request(response => {