From c91ad90856c83442cfca52953d32bf6aab2a1900 Mon Sep 17 00:00:00 2001 From: Thomas Durieux <5577568+tdurieux@users.noreply.github.com> Date: Sat, 14 Nov 2026 16:31:30 +0000 Subject: [PATCH] Add Go expiration email parity and stop hosting quota retry loops --- backend/README.md | 6 +- backend/contracts/routes.cjs | 9 +- backend/contracts/routes.json | 70 ++++--- backend/internal/server/admin_emails.go | 176 ++++++++++++++++++ backend/internal/server/email_history.go | 109 +++++++++++ .../server/email_history_integration_test.go | 149 +++++++++++++++ backend/internal/server/indexes.go | 9 +- backend/internal/server/integration_test.go | 2 + backend/internal/server/job_result.go | 9 +- backend/internal/server/jobs.go | 11 +- backend/internal/server/owner_alerts.go | 4 +- backend/internal/server/providers_test.go | 11 ++ .../server/quota_job_integration_test.go | 100 ++++++++++ backend/internal/server/refresh.go | 3 + backend/internal/server/resources.go | 25 +++ backend/internal/server/routes.go | 2 + backend/reports/main-alignment.json | 50 ++++- public/asset-manifest.json | 4 +- public/css/all.min.css | 2 +- public/css/style.css | 54 ++++++ public/i18n/locale-en.json | 1 + public/partials/admin/billing.htm | 1 + public/partials/admin/conferences.htm | 1 + public/partials/admin/emails.htm | 57 ++++++ public/partials/admin/errors.htm | 1 + public/partials/admin/overview.htm | 1 + public/partials/admin/queues.htm | 1 + public/partials/admin/repositories.htm | 1 + public/partials/admin/user.htm | 1 + public/partials/admin/users.htm | 1 + public/script/admin.js | 157 ++++++++++++++++ public/script/routes.js | 1 + public/script/templates.js | 2 + public/script/vendor.min.js | 98 +++++----- scripts/dev-mock.js | 63 +++++++ src/core/Repository.ts | 2 + src/core/email-history.ts | 60 ++++++ .../anonymizedRepositories.schema.ts | 1 + src/core/owner-notifications.ts | 4 +- src/core/repository-expiration-email.ts | 48 +++++ src/server/routes/admin-emails.ts | 102 ++++++++++ src/server/routes/admin.ts | 2 + test/email-admin-ui.test.js | 157 ++++++++++++++++ test/email-history.test.js | 167 +++++++++++++++++ test/repository-activity.test.js | 6 +- test/repository-expiration-email.test.js | 84 +++++++++ test/vue-ui.test.js | 4 +- 47 files changed, 1721 insertions(+), 108 deletions(-) create mode 100644 backend/internal/server/admin_emails.go create mode 100644 backend/internal/server/email_history.go create mode 100644 backend/internal/server/email_history_integration_test.go create mode 100644 backend/internal/server/quota_job_integration_test.go create mode 100644 public/partials/admin/emails.htm create mode 100644 src/core/email-history.ts create mode 100644 src/core/repository-expiration-email.ts create mode 100644 src/server/routes/admin-emails.ts create mode 100644 test/email-admin-ui.test.js create mode 100644 test/email-history.test.js create mode 100644 test/repository-expiration-email.test.js diff --git a/backend/README.md b/backend/README.md index 21ece2c..be3b573 100644 --- a/backend/README.md +++ b/backend/README.md @@ -2,9 +2,11 @@ ## Branch alignment status, November 14, 2026 -This branch includes `main` through `511dcd7`. Go now implements the 13 APIs added since the previous migration, along with paid hosting, bibliography preservation, account email preferences, access notifications, direct public GitHub submodules, and the mounted review-service capability endpoint. The current 125-route inventory and Node differential contracts are checked in CI. See [the alignment report](reports/main-alignment.json) for validation and remaining staging checks. Route coverage alone does not establish complete behavioral equivalence. +This branch includes `main` through `511dcd7`. Go now implements the 13 APIs added since the previous migration, along with paid hosting, bibliography preservation, account email preferences, access notifications, direct public GitHub submodules, and the mounted review-service capability endpoint. The current 127-route inventory and Node differential contracts are checked in CI. See [the alignment report](reports/main-alignment.json) for validation and remaining staging checks. Route coverage alone does not establish complete behavioral equivalence. +The migration branch also includes PR #953’s expiration emails and admin delivery history, with a Go implementation backed by the same collection. Hosting-quota failures no longer enter automatic retry loops. Open PR #956 still needs a Go logging adapter for its JSON collector; its operational stack has not been deployed. + This directory implements the API, authentication, repository processing, file serving, storage adapters and background jobs in Go. The existing browser application remains JavaScript. Node is used to build browser assets, run differential tests and perform offline data migration; it is absent from the runtime image. The root Docker deployment runs Go. The Node backend remains available through the explicit rollback configuration. Do not switch production based only on route registration or the synthetic benchmarks below. Live OAuth callbacks, installation changes, existing database upgrades, and browser flows need validation against an isolated staging copy. @@ -94,7 +96,7 @@ Anonymization defaults to one child process, a queue of 16, and a 512 MiB weight ## Verified behavior -Implementation verification is complete under the documented policy of preserving supported functionality without reproducing TypeScript bugs. The final full backend race suite, 64 CI contract commands, static checks and isolated deployment smoke test passed. Beta is healthy. Production-data cutover and shipping additional provider adapters remain separate operational work. See `reports/implementation-completion-audit.json` for requirement-by-requirement evidence and limits. +Earlier migration verification is recorded in `reports/implementation-completion-audit.json`. Those results describe the earlier code and deployment, not the current live beta state. Use `reports/main-alignment.json` for current-main alignment, open-PR gaps and validation. Production-data cutover and additional provider adapters remain separate operational work. Reports in `reports/` record the comparison and benchmark results. `reports/compatibility-audit.json` records the 64-command CI contract run, race/integration results, static checks, source fingerprints and rollback-image checks. `reports/implementation-completion-audit.json` maps the implementation requirements to their verification evidence. Its limits distinguish automated evidence from pending live staging validation: diff --git a/backend/contracts/routes.cjs b/backend/contracts/routes.cjs index 2b3401c..62c8335 100644 --- a/backend/contracts/routes.cjs +++ b/backend/contracts/routes.cjs @@ -11,9 +11,14 @@ function sourceFile(file) { file=path.normalize(file); if(modules.has(file)) return modules.get(file); const tree=ts.createSourceFile(file,fs.readFileSync(file,'utf8'),ts.ScriptTarget.Latest,true); - const m={file,tree,imports:new Map(),aliases:new Map(),roots:new Set(),exports:new Map(),calls:[]}; + const m={file,tree,imports:new Map(),aliases:new Map(),roots:new Set(),routerFactories:new Set(["express.Router","express"]),exports:new Map(),calls:[]}; modules.set(file,m); for(const node of tree.statements) { + if(ts.isImportDeclaration(node) && node.importClause && node.moduleSpecifier.text==='express') { + if(node.importClause.name) { m.routerFactories.add(node.importClause.name.text); m.routerFactories.add(node.importClause.name.text+'.Router'); } + const bindings=node.importClause.namedBindings; + if(bindings && ts.isNamedImports(bindings)) for(const item of bindings.elements) if((item.propertyName||item.name).text==='Router') m.routerFactories.add(item.name.text); + } if(ts.isImportDeclaration(node) && node.importClause && node.moduleSpecifier.text.startsWith('.')) { const base=path.resolve(path.dirname(file),node.moduleSpecifier.text); const target=fs.existsSync(base+'.ts')?base+'.ts':path.join(base,'index.ts'); @@ -27,7 +32,7 @@ function sourceFile(file) { if(ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) { const name=node.name.text,value=node.initializer; if(ts.isIdentifier(value) || ts.isPropertyAccessExpression(value)) m.aliases.set(name,value); - if(ts.isCallExpression(value) && (value.expression.getText(tree)==='express.Router' || value.expression.getText(tree)==='express')) m.roots.add(name); + if(ts.isCallExpression(value) && m.routerFactories.has(value.expression.getText(tree))) m.roots.add(name); } if(ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) m.calls.push(node); ts.forEachChild(node,walk); diff --git a/backend/contracts/routes.json b/backend/contracts/routes.json index a90aa4d..3efe21b 100644 --- a/backend/contracts/routes.json +++ b/backend/contracts/routes.json @@ -216,200 +216,214 @@ "line": 24, "verification": "first matching Go handler; behavior verified separately" }, + { + "method": "GET", + "path": "/api/admin/emails/summary", + "source": "src/server/routes/admin-emails.ts", + "line": 63, + "verification": "first matching Go handler; behavior verified separately" + }, + { + "method": "GET", + "path": "/api/admin/emails", + "source": "src/server/routes/admin-emails.ts", + "line": 86, + "verification": "first matching Go handler; behavior verified separately" + }, { "method": "GET", "path": "/api/admin/performance", "source": "src/server/routes/admin.ts", - "line": 89, + "line": 91, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/cache", "source": "src/server/routes/admin.ts", - "line": 95, + "line": 97, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/:repo_id", "source": "src/server/routes/admin.ts", - "line": 182, + "line": 184, "verification": "first matching Go handler; behavior verified separately" }, { "method": "DELETE", "path": "/api/admin/queue/:name/:repo_id", "source": "src/server/routes/admin.ts", - "line": 207, + "line": 209, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/retry-failed", "source": "src/server/routes/admin.ts", - "line": 235, + "line": 237, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/drain", "source": "src/server/routes/admin.ts", - "line": 256, + "line": 258, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/pause", "source": "src/server/routes/admin.ts", - "line": 267, + "line": 269, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/resume", "source": "src/server/routes/admin.ts", - "line": 278, + "line": 280, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queue/:name/empty", "source": "src/server/routes/admin.ts", - "line": 289, + "line": 291, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/queues/pause-all", "source": "src/server/routes/admin.ts", - "line": 300, + "line": 302, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/queues/metrics", "source": "src/server/routes/admin.ts", - "line": 356, + "line": 358, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/queues", "source": "src/server/routes/admin.ts", - "line": 371, + "line": 373, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/errors", "source": "src/server/routes/admin.ts", - "line": 441, + "line": 443, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/errors/stats", "source": "src/server/routes/admin.ts", - "line": 486, + "line": 488, "verification": "first matching Go handler; behavior verified separately" }, { "method": "DELETE", "path": "/api/admin/errors", "source": "src/server/routes/admin.ts", - "line": 617, + "line": 619, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/overview", "source": "src/server/routes/admin.ts", - "line": 647, + "line": 649, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/stats", "source": "src/server/routes/admin.ts", - "line": 832, + "line": 834, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/repos", "source": "src/server/routes/admin.ts", - "line": 861, + "line": 863, "verification": "first matching Go handler; behavior verified separately" }, { "method": "DELETE", "path": "/api/admin/repos/:repoId", "source": "src/server/routes/admin.ts", - "line": 980, + "line": 982, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/repos/:repoId/github", "source": "src/server/routes/admin.ts", - "line": 995, + "line": 997, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/users", "source": "src/server/routes/admin.ts", - "line": 1088, + "line": 1090, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/users/:username", "source": "src/server/routes/admin.ts", - "line": 1152, + "line": 1154, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/users/:username/repos", "source": "src/server/routes/admin.ts", - "line": 1179, + "line": 1181, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/users/:username/ban", "source": "src/server/routes/admin.ts", - "line": 1200, + "line": 1202, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/users/:username/activate", "source": "src/server/routes/admin.ts", - "line": 1236, + "line": 1238, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/users/:username/promote", "source": "src/server/routes/admin.ts", - "line": 1254, + "line": 1256, "verification": "first matching Go handler; behavior verified separately" }, { "method": "POST", "path": "/api/admin/users/:username/demote", "source": "src/server/routes/admin.ts", - "line": 1272, + "line": 1274, "verification": "first matching Go handler; behavior verified separately" }, { "method": "GET", "path": "/api/admin/conferences", "source": "src/server/routes/admin.ts", - "line": 1290, + "line": 1292, "verification": "first matching Go handler; behavior verified separately" }, { diff --git a/backend/internal/server/admin_emails.go b/backend/internal/server/admin_emails.go new file mode 100644 index 0000000..bfa81d9 --- /dev/null +++ b/backend/internal/server/admin_emails.go @@ -0,0 +1,176 @@ +package server + +import ( + "context" + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo/options" + "regexp" + "strings" + "time" +) + +type emailPeriod struct { + name string + days int + start time.Time +} + +var emailCursorID = regexp.MustCompile(`^[0-9a-f-]{36}$`) + +func emailHistoryFilters(raw string, summary bool, now time.Time) (M, emailPeriod, error) { + values := parseExtendedQuery(raw).object + period := emailPeriod{name: "all", days: 30} + bad := func() (M, emailPeriod, error) { return nil, period, fail("Invalid email history filters.", 400) } + if v := values["period"]; v != nil { + if v.kind != 's' { + return bad() + } + period.name = v.scalar + switch v.scalar { + case "all": + case "7d": + period.days = 7 + case "30d": + case "90d": + period.days = 90 + default: + return bad() + } + } + today := now.UTC() + period.start = time.Date(today.Year(), today.Month(), today.Day(), 0, 0, 0, 0, time.UTC).AddDate(0, 0, 1-period.days) + filter := M{} + if period.name != "all" { + filter["createdAt"] = M{"$gte": period.start} + } + for key, allowed := range map[string][]string{"state": {"sending", "accepted", "rejected", "unknown"}, "kind": {"repository-expiration", "owner-access"}} { + if summary && key == "state" { + continue + } + v := values[key] + if v == nil || !v.truthy() { + continue + } + if v.kind != 's' { + return bad() + } + valid := false + for _, option := range allowed { + if v.scalar == option { + valid = true + } + } + if !valid { + return bad() + } + filter[key] = v.scalar + } + if v := values["search"]; v != nil { + if v.kind != 's' || utf16Length(v.scalar) > 200 { + return bad() + } + if search := strings.TrimSpace(v.scalar); search != "" { + filter["$or"] = []M{{"recipient": M{"$regex": regexp.QuoteMeta(search), "$options": "i"}}, {"_id": search}, {"ownerId": search}, {"resourceId": search}} + } + } + if v := values["before"]; !summary && v != nil && v.truthy() { + if v.kind != 's' || utf16Length(v.scalar) > 200 { + return bad() + } + parts := strings.Split(v.scalar, "|") + if len(parts) != 2 || !emailCursorID.MatchString(parts[1]) { + return bad() + } + stamp, valid, err := javascriptDateValue(parts[0]) + if err != nil || !valid { + return bad() + } + cursor := []M{{"createdAt": M{"$lt": stamp}}, {"createdAt": stamp, "_id": M{"$lt": parts[1]}}} + if filter["$or"] != nil { + filter["$and"] = []M{{"$or": cursor}} + } else { + filter["$or"] = cursor + } + } + return filter, period, nil +} +func (s *Server) adminEmailHistory(q *request) (any, error) { + q.W.Header().Set("Cache-Control", "no-store") + summary := strings.TrimSuffix(q.R.URL.Path, "/") == "/api/admin/emails/summary" + filter, period, err := emailHistoryFilters(q.R.URL.RawQuery, summary, time.Now()) + if err != nil { + return nil, err + } + ctx, cancel := context.WithTimeout(q.ctx(), 5*time.Second) + defer cancel() + if !summary { + projection := M{} + for _, key := range []string{"_id", "kind", "recipient", "ownerId", "resourceId", "resourceKind", "createdAt", "completedAt", "state", "httpStatus"} { + projection[key] = 1 + } + cursor, err := s.Store.DB.Collection(emailDeliveryHistory).Find(ctx, filter, options.Find().SetProjection(projection).SetSort(bson.D{{Key: "createdAt", Value: -1}, {Key: "_id", Value: -1}}).SetLimit(51)) + if err != nil { + return nil, fail("Email history is unavailable. Try again.", 503) + } + defer cursor.Close(ctx) + rows := []M{} + if err = cursor.All(ctx, &rows); err != nil { + return nil, fail("Email history is unavailable. Try again.", 503) + } + var next any + if len(rows) > 50 { + rows = rows[:50] + last := rows[49] + next = date(last["createdAt"]).UTC().Format("2006-01-02T15:04:05.000Z") + "|" + str(last["_id"]) + } + return M{"entries": rows, "nextCursor": next}, nil + } + pipeline := []M{{"$match": filter}, {"$facet": M{"counts": []M{{"$group": M{"_id": "$state", "count": M{"$sum": 1}}}}, "daily": []M{{"$match": M{"createdAt": M{"$gte": period.start}}}, {"$group": M{"_id": M{"date": M{"$dateToString": M{"format": "%Y-%m-%d", "date": "$createdAt", "timezone": "UTC"}}, "state": "$state"}, "count": M{"$sum": 1}}}}}}} + cursor, err := s.Store.DB.Collection(emailDeliveryHistory).Aggregate(ctx, pipeline) + if err != nil { + return nil, fail("Email history summary is unavailable. Try again.", 503) + } + defer cursor.Close(ctx) + rows := []M{} + if err = cursor.All(ctx, &rows); err != nil { + return nil, fail("Email history summary is unavailable. Try again.", 503) + } + data := M{} + if len(rows) > 0 { + data = rows[0] + } + counts := emptyEmailCounts() + total := int64(0) + for _, value := range arr(data["counts"]) { + row := obj(value) + key := str(row["_id"]) + if _, exists := counts[key]; exists { + counts[key] = number(row["count"]) + total += number(row["count"]) + } + } + series := []M{} + days := map[string]M{} + for i := 0; i < period.days; i++ { + day := period.start.AddDate(0, 0, i).Format("2006-01-02") + point := emptyEmailCounts() + point["date"] = day + days[day] = point + series = append(series, point) + } + for _, value := range arr(data["daily"]) { + row := obj(value) + id := obj(row["_id"]) + point := days[str(id["date"])] + key := str(id["state"]) + if point != nil { + if _, exists := counts[key]; exists { + point[key] = number(row["count"]) + } + } + } + return M{"counts": counts, "total": total, "series": series, "chartDays": period.days, "period": period.name}, nil +} +func emptyEmailCounts() M { + return M{"accepted": int64(0), "rejected": int64(0), "unknown": int64(0), "sending": int64(0)} +} diff --git a/backend/internal/server/email_history.go b/backend/internal/server/email_history.go new file mode 100644 index 0000000..a4a4275 --- /dev/null +++ b/backend/internal/server/email_history.go @@ -0,0 +1,109 @@ +package server + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/google/uuid" + "io" + "net/http" + "net/url" + "strings" + "time" +) + +const emailDeliveryHistory = "email_delivery_history" + +// Auditing runs alongside dispatch, after the caller's lifecycle commitment. +// History contains delivery metadata only. A history outage cannot prevent mail. +func (s *Server) sendTrackedEmail(request *http.Request, metadata M) (*http.Response, error) { + id := uuid.NewString() + record := selectFields(metadata, "kind", "recipient", "ownerId", "resourceId", "resourceKind") + record["_id"], record["state"], record["createdAt"] = id, "sending", time.Now() + recorded := make(chan bool, 1) + go func() { + ctx, cancel := context.WithTimeout(context.WithoutCancel(request.Context()), 5*time.Second) + defer cancel() + _, err := s.Store.DB.Collection(emailDeliveryHistory).InsertOne(ctx, record) + recorded <- err == nil + }() + client := *s.HTTP + client.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse } + response, err := client.Do(request) + completed := time.Now() + if <-recorded { + state := "unknown" + fields := M{"completedAt": completed} + if err == nil { + state = "rejected" + if response.StatusCode >= 200 && response.StatusCode < 300 { + state = "accepted" + } + fields["httpStatus"] = response.StatusCode + } + fields["state"] = state + ctx, cancel := context.WithTimeout(context.WithoutCancel(request.Context()), 5*time.Second) + _, _ = s.Store.update(ctx, emailDeliveryHistory, M{"_id": id}, M{"$set": fields}) + cancel() + } + return response, err +} + +// Keep the claim after an ambiguous response: Resend may have accepted mail. +// Delivery is once per expiration date, including after reactivation and expiry. +func (s *Server) notifyRepositoryExpired(ctx context.Context, id any) { + if s.Config.EmailAPIKey == "" || s.Config.EmailFrom == "" { + return + } + repo, err := s.Store.one(ctx, collection("repo"), M{"_id": id, "status": "expired"}) + if err != nil || repo == nil { + return + } + opt := obj(repo["options"]) + expiration, valid := storedDate(opt["expirationDate"]) + if !valid || opt["expirationMode"] == "never" || expiration.After(time.Now()) { + return + } + owner, err := s.Store.one(ctx, "users", M{"_id": repo["owner"], "status": M{"$nin": []string{"removed", "banned"}}}) + if err != nil || owner == nil { + return + } + recipient := accountNotificationEmail(owner) + if recipient == "" { + return + } + base := s.Config.Hostname + if !strings.HasPrefix(base, "http://") && !strings.HasPrefix(base, "https://") { + base = "https://" + base + } + address, err := url.Parse(base) + if err != nil || address.Host == "" { + return + } + address.Path, address.RawQuery, address.Fragment = "/dashboard", "", "" + claim := M{"_id": id, "owner": repo["owner"], "status": "expired", "statusDate": repo["statusDate"], "options.expirationMode": opt["expirationMode"], "options.expirationDate": opt["expirationDate"], "expirationEmailClaimedFor": M{"$ne": opt["expirationDate"]}} + matched, err := s.Store.update(ctx, collection("repo"), claim, M{"$set": M{"expirationEmailClaimedFor": opt["expirationDate"]}}) + if err != nil || !matched { + return + } + redirect := "" + if opt["expirationMode"] == "redirect" { + redirect = " Its link now redirects to the original repository." + } + body, _ := json.Marshal(M{"from": s.Config.EmailFrom, "to": []string{recipient}, "subject": "Your Anonymous GitHub repository has expired", "text": fmt.Sprintf("Your anonymized repository %q expired on %s (UTC).\n\nIts anonymized content is no longer available.%s\n\nOpen your dashboard to manage your repositories:\n%s\n\nYou are receiving this email because you own this repository on Anonymous GitHub. You can change your alert address on the connections page.\n", str(repo["repoId"]), expiration.UTC().Format("2006-01-02"), redirect, address.String())}) + work, cancel := context.WithTimeout(ctx, 15*time.Second) + defer cancel() + request, err := http.NewRequestWithContext(work, "POST", "https://api.resend.com/emails", bytes.NewReader(body)) + if err != nil { + return + } + request.Header.Set("Authorization", "Bearer "+s.Config.EmailAPIKey) + request.Header.Set("Content-Type", "application/json") + request.Header.Set("Idempotency-Key", fmt.Sprintf("repository-expired/%s/%d", str(id), expiration.UnixMilli())) + response, err := s.sendTrackedEmail(request, M{"kind": "repository-expiration", "recipient": recipient, "ownerId": str(repo["owner"]), "resourceId": str(id), "resourceKind": "repository"}) + if err == nil { + _, _ = io.Copy(io.Discard, io.LimitReader(response.Body, 4096)) + response.Body.Close() + } +} diff --git a/backend/internal/server/email_history_integration_test.go b/backend/internal/server/email_history_integration_test.go new file mode 100644 index 0000000..f397946 --- /dev/null +++ b/backend/internal/server/email_history_integration_test.go @@ -0,0 +1,149 @@ +package server + +import ( + "encoding/json" + "errors" + "github.com/google/uuid" + "github.com/tdurieux/anonymous_github/backend/internal/security" + "go.mongodb.org/mongo-driver/v2/bson" + "io" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "sync" + "sync/atomic" + "testing" + "time" +) + +func runEmailHistoryIntegration(t *testing.T, base *Server) { + ctx := t.Context() + db := base.Store.DB.Client().Database("email_history_test_" + bson.NewObjectID().Hex()) + defer db.Drop(ctx) + config := base.Config + config.Root = t.TempDir() + config.EmailAPIKey = "synthetic" + config.EmailFrom = "alerts@example.test" + s, err := New(config, &Store{DB: db, Redis: base.Store.Redis}) + if err != nil { + t.Fatal(err) + } + defer s.Close() + if err = s.Store.ensureIndexes(ctx); err != nil { + t.Fatal(err) + } + owner := bson.NewObjectID() + adminToken, userToken := uuid.NewString(), uuid.NewString() + _, err = db.Collection("users").InsertMany(ctx, []any{M{"_id": owner, "username": "owner", "status": "active", "notificationEmail": "owner@example.test", "apiTokens": []M{{"tokenHash": security.HashToken(userToken)}}}, M{"_id": bson.NewObjectID(), "username": "admin", "status": "active", "isAdmin": true, "apiTokens": []M{{"tokenHash": security.HashToken(adminToken)}}}}) + if err != nil { + t.Fatal(err) + } + var sends, mode atomic.Int64 + s.HTTP = &http.Client{Transport: roundTrip(func(r *http.Request) (*http.Response, error) { + sends.Add(1) + if r.URL.Host != "api.resend.com" || r.Header.Get("Idempotency-Key") == "" { + t.Error("unsafe mail request") + } + if mode.Load() == 1 { + return nil, errors.New("synthetic ambiguous delivery") + } + return &http.Response{StatusCode: 202, Header: http.Header{}, Body: io.NopCloser(strings.NewReader(`{}`))}, nil + })} + id := bson.NewObjectID() + expiration := time.Now().Add(-time.Hour).Truncate(time.Millisecond) + _, err = db.Collection(collection("repo")).InsertOne(ctx, M{"_id": id, "repoId": "expired-fixture", "owner": owner, "status": "expired", "statusDate": time.Now(), "options": M{"expirationMode": "remove", "expirationDate": expiration}}) + if err != nil { + t.Fatal(err) + } + var group sync.WaitGroup + for i := 0; i < 12; i++ { + group.Add(1) + go func() { defer group.Done(); s.notifyRepositoryExpired(ctx, id) }() + } + group.Wait() + if sends.Load() != 1 { + t.Fatal("duplicate expiration delivery", sends.Load()) + } + history, err := s.Store.list(ctx, emailDeliveryHistory, M{}, 0, nil) + if err != nil || len(history) != 1 || history[0]["state"] != "accepted" { + t.Fatal(history, err) + } + for _, forbidden := range []string{"body", "headers", "authorization", "subject", "text"} { + if history[0][forbidden] != nil { + t.Fatal("private mail content persisted") + } + } + // A later expiration gets a new attempt. Ambiguous delivery keeps its claim. + mode.Store(1) + _, err = s.Store.update(ctx, collection("repo"), M{"_id": id}, M{"$set": M{"options.expirationDate": expiration.Add(time.Minute)}}) + if err != nil { + t.Fatal(err) + } + s.notifyRepositoryExpired(ctx, id) + s.notifyRepositoryExpired(ctx, id) + if sends.Load() != 2 { + t.Fatal("ambiguous mail repeated", sends.Load()) + } + row, err := s.Store.one(ctx, emailDeliveryHistory, M{"state": "unknown"}) + if err != nil || row == nil { + t.Fatal("unknown delivery not recorded", err) + } + // Keep page and summary totals independent of the selected page/cursor. + fixtures := []any{} + stamp := time.Now().Truncate(time.Millisecond) + for i := 0; i < 60; i++ { + fixtures = append(fixtures, M{"_id": uuid.NewString(), "kind": "owner-access", "recipient": "literal+tag@example.test", "ownerId": owner.Hex(), "createdAt": stamp, "state": "accepted", "privateField": "must not be returned"}) + } + if _, err = db.Collection(emailDeliveryHistory).InsertMany(ctx, fixtures); err != nil { + t.Fatal(err) + } + call := func(path, token string) (int, M) { + r := httptest.NewRequest("GET", path, nil) + r.RemoteAddr = "198.51.100.9:1234" + if token != "" { + r.Header.Set("Authorization", "Bearer "+token) + } + w := httptest.NewRecorder() + s.ServeHTTP(w, r) + out := M{} + if err := json.Unmarshal(w.Body.Bytes(), &out); err != nil { + t.Fatal(w.Body.String()) + } + if token == adminToken && w.Header().Get("Cache-Control") != "no-store" { + t.Fatal("history can be cached") + } + return w.Code, out + } + for _, token := range []string{"", userToken} { + status, _ := call("/api/admin/emails", token) + if status != 401 && status != 403 { + t.Fatal("history authorization", status) + } + } + status, page := call("/api/admin/emails?kind=owner-access", adminToken) + if status != 200 || len(arr(page["entries"])) != 50 || str(page["nextCursor"]) == "" { + t.Fatal(status, page) + } + if obj(arr(page["entries"])[0])["privateField"] != nil { + t.Fatal("projection leaked field") + } + status, last := call("/api/admin/emails?kind=owner-access&before="+url.QueryEscape(str(page["nextCursor"])), adminToken) + if status != 200 || len(arr(last["entries"])) != 10 || last["nextCursor"] != nil { + t.Fatal(status, last) + } + status, summary := call("/api/admin/emails/summary?kind=owner-access&state=unknown&before=ignored", adminToken) + if status != 200 || number(summary["total"]) != 60 || len(arr(summary["series"])) != 30 { + t.Fatal(status, summary) + } + status, page = call("/api/admin/emails?search="+url.QueryEscape("literal+tag"), adminToken) + if status != 200 || len(arr(page["entries"])) != 50 { + t.Fatal("literal search", status, page) + } + for _, query := range []string{"period[]=7d", "kind=invalid", "search[x]=x", "before=invalid"} { + status, _ := call("/api/admin/emails?"+query, adminToken) + if status != 400 { + t.Fatal(query, status) + } + } +} diff --git a/backend/internal/server/indexes.go b/backend/internal/server/indexes.go index 7dbfad6..efe3532 100644 --- a/backend/internal/server/indexes.go +++ b/backend/internal/server/indexes.go @@ -18,10 +18,11 @@ func (s *Store) ensureIndexes(ctx context.Context) error { } } indexes := map[string][]mongo.IndexModel{ - "billinggrants": {{Keys: bson.D{{Key: "owner", Value: 1}}}, {Keys: bson.D{{Key: "scope", Value: 1}, {Key: "until", Value: 1}}}, {Keys: bson.D{{Key: "paymentIntentId", Value: 1}}}}, - "billingaccounts": {{Keys: bson.D{{Key: "reconcileAfter", Value: 1}}}}, - "billingevents": {{Keys: bson.D{{Key: "state", Value: 1}, {Key: "nextAttemptAt", Value: 1}}}}, - "billingdrafts": {{Keys: bson.D{{Key: "expiresAt", Value: 1}}, Options: options.Index().SetExpireAfterSeconds(0)}}, + emailDeliveryHistory: {{Keys: bson.D{{Key: "createdAt", Value: -1}, {Key: "_id", Value: -1}}}, {Keys: bson.D{{Key: "state", Value: 1}, {Key: "createdAt", Value: -1}, {Key: "_id", Value: -1}}}, {Keys: bson.D{{Key: "kind", Value: 1}, {Key: "createdAt", Value: -1}, {Key: "_id", Value: -1}}}}, + "billinggrants": {{Keys: bson.D{{Key: "owner", Value: 1}}}, {Keys: bson.D{{Key: "scope", Value: 1}, {Key: "until", Value: 1}}}, {Keys: bson.D{{Key: "paymentIntentId", Value: 1}}}}, + "billingaccounts": {{Keys: bson.D{{Key: "reconcileAfter", Value: 1}}}}, + "billingevents": {{Keys: bson.D{{Key: "state", Value: 1}, {Key: "nextAttemptAt", Value: 1}}}}, + "billingdrafts": {{Keys: bson.D{{Key: "expiresAt", Value: 1}}, Options: options.Index().SetExpireAfterSeconds(0)}}, "gocachemetrics": {{Keys: bson.D{{Key: "period", Value: 1}, {Key: "bucket", Value: 1}}}, {Keys: bson.D{{Key: "expires", Value: 1}}, Options: options.Index().SetExpireAfterSeconds(0)}}, "anonymizedrepositories": {{Keys: bson.D{{Key: "conferenceMembership.id", Value: 1}}, Options: options.Index().SetSparse(true)}}, diff --git a/backend/internal/server/integration_test.go b/backend/internal/server/integration_test.go index f222a38..c25d76d 100644 --- a/backend/internal/server/integration_test.go +++ b/backend/internal/server/integration_test.go @@ -130,6 +130,8 @@ func TestBackendIntegration(t *testing.T) { return w } t.Run("owner notification lifecycle", func(t *testing.T) { runOwnerAlertsIntegration(t, server) }) + t.Run("email delivery history", func(t *testing.T) { runEmailHistoryIntegration(t, server) }) + t.Run("hosting quota jobs", func(t *testing.T) { runQuotaJobIntegration(t, server) }) t.Run("billing lifecycle", func(t *testing.T) { runBillingIntegration(t, server) }) t.Run("second provider lifecycle", func(t *testing.T) { runProviderIntegration(t, server, fakeProvider, call, token, otherToken) }) t.Run("public statistics cache", func(t *testing.T) { runPublicStatsIntegration(t, server) }) diff --git a/backend/internal/server/job_result.go b/backend/internal/server/job_result.go index f118cdd..006028e 100644 --- a/backend/internal/server/job_result.go +++ b/backend/internal/server/job_result.go @@ -20,6 +20,13 @@ func jobRateLimit(job M, err error, now time.Time) (time.Time, bool) { return reset, true } +// A hosting-capacity denial needs an explicit retry after the owner changes +// their plan or releases capacity. Provider 429 limits still use timed retries. +func permanentPreparationFailure(job M, err error) bool { + var api *APIError + return str(job["action"]) == "prepare" && errors.As(providerFailure(err), &api) && api.Code == "quota_exceeded" +} + func (s *Server) finishJob(ctx context.Context, job M, jobErr error, now time.Time) error { set := M{"state": "completed", "finishedAt": now} unset := M{"lease": "", "leaseUntil": "", "error": ""} @@ -37,7 +44,7 @@ func (s *Server) finishJob(ctx context.Context, job M, jobErr error, now time.Ti if errors.As(providerFailure(jobErr), &api) { set["error"] = api.Code } - if number(job["attempts"]) < jobMaxAttempts(job) { + if !permanentPreparationFailure(job, jobErr) && number(job["attempts"]) < jobMaxAttempts(job) { set["state"] = "waiting" set["availableAt"] = now.Add(jobBackoff(job)) } diff --git a/backend/internal/server/jobs.go b/backend/internal/server/jobs.go index 2e192f5..31d4d63 100644 --- a/backend/internal/server/jobs.go +++ b/backend/internal/server/jobs.go @@ -152,13 +152,15 @@ func (s *Server) runJob(ctx context.Context, job M) (jobErr error) { } return } - if number(job["attempts"]) >= jobMaxAttempts(job) { + if permanentPreparationFailure(job, jobErr) || number(job["attempts"]) >= jobMaxAttempts(job) { code := "preparation_failed" var api *APIError if errors.As(providerFailure(jobErr), &api) { code = api.Code } - s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": code}}) + if _, err := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": M{"status": "error", "statusDate": time.Now(), "statusMessage": code}}); err != nil { + jobErr = err + } } }() } @@ -195,7 +197,10 @@ func (s *Server) runJob(ctx context.Context, job M) (jobErr error) { if kind == "pr" { set["pullRequest"] = clearedDocumentPayload(kind, r["pullRequest"]) } - _, err = s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": set}) + updated, err := s.Store.update(ctx, collection(kind), revisionFilter(r), M{"$set": set}) + if err == nil && updated && kind == "repo" && action == "expire" { + s.notifyRepositoryExpired(ctx, r["_id"]) + } return err } if str(r["status"]) != "preparing" && str(r["status"]) != "queue" && str(r["status"]) != "download" { diff --git a/backend/internal/server/owner_alerts.go b/backend/internal/server/owner_alerts.go index 1ac4e17..8939f6c 100644 --- a/backend/internal/server/owner_alerts.go +++ b/backend/internal/server/owner_alerts.go @@ -249,9 +249,7 @@ func (s *Server) notifyOwnerAccessProblem(ctx context.Context, kind string, reso return err } started = true - client := *s.HTTP - client.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse } - response, sendErr := client.Do(request) + response, sendErr := s.sendTrackedEmail(request, M{"kind": "owner-access", "recipient": email, "ownerId": str(owner["_id"]), "resourceId": str(resource["_id"]), "resourceKind": alertResourceKind(kind)}) state, status := "failed", 0 if sendErr == nil { status = response.StatusCode diff --git a/backend/internal/server/providers_test.go b/backend/internal/server/providers_test.go index 8fd047b..8155305 100644 --- a/backend/internal/server/providers_test.go +++ b/backend/internal/server/providers_test.go @@ -33,6 +33,17 @@ func TestResourceStatusErrors(t *testing.T) { }{ {"repo", "queue", "rate_limited:1790000000000", "rate_limited", 425}, {"repo", "error", "repository_access_revoked", "repository_access_revoked", 500}, + {"repo", "error", "repo_not_found", "repo_not_found", 404}, + {"repo", "error", "branch_not_found", "branch_not_found", 404}, + {"repo", "error", "commit_not_found", "commit_not_found", 404}, + {"repo", "error", "repo_not_accessible", "repo_not_accessible", 403}, + {"repo", "error", "repository_not_accessible", "repository_not_accessible", 403}, + {"repo", "error", "token_expired", "token_expired", 401}, + {"repo", "error", "not_connected", "not_connected", 401}, + {"repo", "error", "github_rate_limit_exceeded", "github_rate_limit_exceeded", 429}, + {"repo", "error", "github_unavailable", "github_unavailable", 502}, + {"repo", "error", "repo_empty", "repo_empty", 409}, + {"repo", "error", "quota_exceeded", "quota_exceeded", 402}, {"gist", "error", "", "gist_not_available", 500}, {"pr", "error", "", "pull_request_not_available", 500}, {"repo", "removed", "", "repository_expired", 410}, diff --git a/backend/internal/server/quota_job_integration_test.go b/backend/internal/server/quota_job_integration_test.go new file mode 100644 index 0000000..42f32d3 --- /dev/null +++ b/backend/internal/server/quota_job_integration_test.go @@ -0,0 +1,100 @@ +package server + +import ( + "errors" + "go.mongodb.org/mongo-driver/v2/bson" + "testing" + "time" +) + +func runQuotaJobIntegration(t *testing.T, base *Server) { + ctx := t.Context() + db := base.Store.DB.Client().Database("quota_job_test_" + bson.NewObjectID().Hex()) + defer db.Drop(ctx) + config := base.Config + config.Root = t.TempDir() + config.Billing = BillingConfig{Enabled: true, FreeRepositories: 2, FreeStorage: 1} + p := &delayedJobProvider{fixtureProvider: fixtureProvider{name: "team/subgroup/project", commit: "revision:one"}} + s, err := New(config, &Store{DB: db, Redis: base.Store.Redis}, p) + if err != nil { + t.Fatal(err) + } + defer s.Close() + owner := bson.NewObjectID() + if _, err = db.Collection("users").InsertOne(ctx, M{"_id": owner, "status": "active"}); err != nil { + t.Fatal(err) + } + r := M{"_id": bson.NewObjectID(), "owner": owner, "repoId": "quota-job", "status": "preparing", "statusDate": time.Now(), "billingManaged": true, "source": M{"provider": "fixture", "repositoryName": p.name, "providerRepositoryId": "project:123", "commit": p.commit, "branch": "main"}, "providerAccess": M{"provider": "fixture", "kind": "fixture-grant", "revision": "grant:1"}} + if _, err = db.Collection(collection("repo")).InsertOne(ctx, r); err != nil { + t.Fatal(err) + } + job := M{"_id": "repo:quota-job:prepare", "kind": "repo", "resourceId": "quota-job", "action": "prepare", "state": "active", "attempts": 1, "lease": "first"} + if _, err = db.Collection("gojobs").InsertOne(ctx, job); err != nil { + t.Fatal(err) + } + failure := s.runJob(ctx, job) + var api *APIError + if !errors.As(failure, &api) || api.Code != "quota_exceeded" { + t.Fatalf("expected real capacity denial: %v", failure) + } + if err = s.finishJob(ctx, job, failure, time.Now()); err != nil { + t.Fatal(err) + } + stored, err := s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) + if err != nil || stored["state"] != "failed" || number(stored["attempts"]) != 1 { + t.Fatal("quota retried", stored, err) + } + if _, err = s.Store.update(ctx, collection("repo"), M{"_id": r["_id"]}, M{"$set": M{"statusDate": time.Now().Add(-time.Hour)}}); err != nil { + t.Fatal(err) + } + for i := 0; i < 3; i++ { + current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) + if err != nil { + t.Fatal(err) + } + if current["status"] != "error" || current["statusMessage"] != "quota_exceeded" { + t.Fatal(current) + } + for _, check := range []func() error{func() error { return s.repositoryOptionsCheck(ctx, current) }, func() error { return s.checkResource(ctx, "repo", current) }} { + e := check() + if !errors.As(e, &api) || api.Status != 402 { + t.Fatalf("quota status: %v", e) + } + } + } + stored, err = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) + if err != nil || stored["state"] != "failed" { + t.Fatal("viewer requeued quota job", stored, err) + } + // Increasing capacity and explicit owner refresh must permit a fresh attempt. + s.Config.Billing.FreeStorage = 1 << 20 + current, err := s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) + if err != nil { + t.Fatal(err) + } + if err = s.manualRepositoryRefresh(ctx, current); err != nil { + t.Fatal(err) + } + stored, err = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) + if err != nil || stored["state"] != "waiting" { + t.Fatal("owner refresh failed", stored, err) + } + if err = s.runJob(ctx, stored); err != nil { + t.Fatal(err) + } + current, err = s.Store.one(ctx, collection("repo"), M{"_id": r["_id"]}) + if err != nil || current["status"] != "ready" { + t.Fatal("capacity recovery failed", current, err) + } + // Ordinary upstream failures keep the normal retry policy. + if _, err = s.Store.update(ctx, "gojobs", M{"_id": job["_id"]}, M{"$set": M{"state": "active", "lease": "first", "attempts": 1}}); err != nil { + t.Fatal(err) + } + if err = s.finishJob(ctx, job, fail("upstream_error", 502), time.Now()); err != nil { + t.Fatal(err) + } + stored, err = s.Store.one(ctx, "gojobs", M{"_id": job["_id"]}) + if err != nil || stored["state"] != "waiting" { + t.Fatal("transient retry lost", stored, err) + } +} diff --git a/backend/internal/server/refresh.go b/backend/internal/server/refresh.go index 9b6dbb7..b7c21be 100644 --- a/backend/internal/server/refresh.go +++ b/backend/internal/server/refresh.go @@ -236,6 +236,9 @@ func (s *Server) repositoryOptionsCheck(ctx context.Context, r M) error { case "queue", "archived", "expired", "expiring", "removed", "removing": return s.checkResource(ctx, "repo", r) } + if str(r["statusMessage"]) == "quota_exceeded" { + return fail("quota_exceeded", 402) + } if d, valid := storedDate(r["statusDate"]); valid && d.Before(time.Now().Add(-5*time.Minute)) { now := time.Now() changed, e := s.Store.update(ctx, collection("repo"), revisionFilter(r), M{"$set": M{"status": "preparing", "statusDate": now}, "$unset": M{"statusMessage": ""}}) diff --git a/backend/internal/server/resources.go b/backend/internal/server/resources.go index 28c7b87..1d3c6af 100644 --- a/backend/internal/server/resources.go +++ b/backend/internal/server/resources.go @@ -89,6 +89,9 @@ func (s *Server) checkResource(ctx context.Context, kind string, r M) error { code = prefix + "_not_available" } } + if kind == "repo" { + return fail(code, repositoryFailureStatus(code)) + } return fail(code, 500) } if kind == "repo" && strings.HasPrefix(str(r["statusMessage"]), "rate_limited:") { @@ -905,3 +908,25 @@ func (s *Server) embeddedOutput(ctx context.Context, kind string, r M) (M, error } return out, nil } + +// Preserve the status of a repository failure after it is stored by a worker. +func repositoryFailureStatus(code string) int { + switch code { + case "quota_exceeded": + return 402 + case "repo_not_found", "branch_not_found", "commit_not_found": + return 404 + case "repo_not_accessible", "repository_not_accessible": + return 403 + case "token_expired", "not_connected": + return 401 + case "github_rate_limit_exceeded": + return 429 + case "github_unavailable": + return 502 + case "repo_empty": + return 409 + default: + return 500 + } +} diff --git a/backend/internal/server/routes.go b/backend/internal/server/routes.go index f7f80eb..64ed94b 100644 --- a/backend/internal/server/routes.go +++ b/backend/internal/server/routes.go @@ -10,6 +10,8 @@ import ( func queryEscape(s string) string { return url.QueryEscape(s) } func (s *Server) register() { s.registerAdmin() + s.add("GET", "/api/admin/emails", "admin", s.adminEmailHistory) + s.add("GET", "/api/admin/emails/summary", "admin", s.adminEmailHistory) s.add("GET", "/api/admin/billing/grants", "admin", s.billingGrantReport) s.add("GET", "/api/admin/billing/summary", "admin", s.billingSummaryReport) s.add("POST", "/api/billing/webhook", "", s.billingWebhook) diff --git a/backend/reports/main-alignment.json b/backend/reports/main-alignment.json index c8cb066..d05554a 100644 --- a/backend/reports/main-alignment.json +++ b/backend/reports/main-alignment.json @@ -10,14 +10,18 @@ "No production or beta deployment was performed." ], "validation": { - "goIntegrationRace": "passed on Go 1.27.4 with disposable MongoDB/Redis; final index-name change additionally passed its focused race test and rebuilt deployment smoke test", + "goIntegrationRace": "passed with disposable MongoDB/Redis including quota-job, owner-notification and email-history lifecycle tests; server package 389.481s. Final stored-error mapping additionally passed focused resource/status race tests.", "goVet": "passed on Go 1.27.4", - "nodeContracts": "65 scripts passed on Go 1.27.4", - "routeInventory": "125 current TypeScript routes verified", + "nodeContracts": "65 scripts passed after PR #953 source integration", + "routeInventory": "127 TypeScript routes verified, including the two email-history routes from PR #953", "goDockerBuild": "passed with Go 1.27.4 and klauspost/compress v1.20.2", "deploymentSmoke": "passed: isolated startup, non-root writes, static routes, graceful shutdown, Node rollback compose model", "reachableVulnerabilities": "none reported by govulncheck v1.9.0; four advisories remain in required modules without reachable calls", - "existingNodeIndexes": "passed with race detector: pre-existing named submodule index and repeated Go startup" + "existingNodeIndexes": "passed with race detector: pre-existing named submodule index and repeated Go startup", + "openPRFocusedNodeTests": "42 email-history, expiration and admin UI tests passed; final 25-test activity/error-code/preview regression set passed", + "frontendBuild": "passed with regenerated asset manifest and bundles", + "nodeSuite": "Broad run: 1676 passed, 436 skipped, five failures. Fixed missing cache_miss translation, three stale Mongoose query mocks and one stale preview-button selector; all five failures passed in a 25-test focused rerun. Full suite not repeated after these fixes.", + "typescript": "tsc --noEmit passed" }, "changes": [ "Restore Go backend and Go deployment on top of current main", @@ -32,7 +36,12 @@ "Implement mounted review capabilities endpoint and protected review page", "Refresh current Node contract fixtures and add preservation, billing, review, provider preview, submodule and notification tests", "Patch reachable vulnerabilities GO-2026-6859 and GO-2026-6865 by updating Go and klauspost/compress", - "Reuse the existing Node submodule index name during Go startup" + "Reuse the existing Node submodule index name during Go startup", + "Integrate PR #953 expiration notifications and admin delivery-history UI/API in both backends; add Go delivery claims, metadata-only audit records and pagination tests", + "Stop automatic hosting-quota retries, preserve HTTP 402, and retain explicit owner recovery", + "Preserve Node HTTP status mappings for stored repository failures", + "Recognize named Express Router imports in route inventory generation", + "Repair current Node activity-test query mocks and preview-button selector; add the missing cache_miss translation" ], "implementedTypeScriptRoutes": [ { @@ -86,13 +95,40 @@ { "method": "POST", "path": "/github/connections/email" + }, + { + "method": "GET", + "path": "/api/admin/emails" + }, + { + "method": "GET", + "path": "/api/admin/emails/summary" } ], - "routeCount": 125, + "routeCount": 127, "contractScripts": 65, "implementationDifferences": [ "Owner notification history is conservatively rescanned at startup rather than using Node migration checkpoints.", "Submodule ZIP entries use bounded per-file source reads after the parent tar stream, rather than a second tar stream for each child.", "Stripe price display and admin summary responses are not cached; checkout/reconciliation persistence and idempotency are retained." - ] + ], + "openPRReview": { + "953": { + "head": "99bf9f173e5e748dec59fb37450142edd7fc4ec5", + "result": "Source/UI integrated in migration branch; Go implementation added. PR remains open." + }, + "954": { + "head": "c227bf0421cfed14a0fcf404b1ca93c6f1450507", + "result": "Reviewed upstream redirect and response-header isolation against existing Go protections. No PR merge performed." + }, + "955": { + "head": "b456ab8739374bf8bb3a690ad55698fb61615dd1", + "result": "Go hosting-quota retry and stored-error status fixes implemented. Broader diagnostic parity remains to review." + }, + "956": { + "head": "f084f5cbfc7b328a04b4e7e859ce9fa224c605c4", + "result": "Stacked on #955. Go text logs are incompatible with the new JSON collector schema; structured logging adaptation remains outstanding." + }, + "checks": "GitHub Actions jobs did not start because the account is locked due to a billing issue. This is not a test failure." + } } diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 33274a4..c5a61f8 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,8 +1,8 @@ { "core.min.js": "core.d23af1c652.min.js", - "vendor.min.js": "vendor.023a865c47.min.js", + "vendor.min.js": "vendor.8b4208bcea.min.js", "mermaid.min.js": "mermaid.a7356d5ed1.min.js", - "all.min.css": "all.d641dcb5c8.min.css", + "all.min.css": "all.9ae101d36f.min.css", "markdown.min.js": "markdown.6c8dfb7b1d.min.js", "pdf.min.js": "pdf.4d9cc6ff49.min.js", "notebook.min.js": "notebook.c3144c18ae.min.js", diff --git a/public/css/all.min.css b/public/css/all.min.css index 2a692cc..4925b6a 100644 --- a/public/css/all.min.css +++ b/public/css/all.min.css @@ -10,4 +10,4 @@ @container explorer-file (max-width: 700px) { .reviewer-preview .file-card-head .file-card-meta, .reviewer-preview .file-card-head .symbols { display: none !important; } } -.reviewer-preview .rp-main{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reviewer-preview .rp-document{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;position:relative}.reviewer-preview button.rp-count{background:0 0;border:0;padding:0;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}.reviewer-preview button.rp-count:hover{text-decoration-color:currentColor}@media (max-width:767px){.reviewer-preview .file-card-head .rp-preserved-tag{display:none}}.billing-page{--bl-subscription:#008C7E;--bl-repository:#D0652A;--bl-conference:#6250D6}.dark-mode .billing-page{--bl-subscription:#16A091;--bl-repository:#D95926;--bl-conference:#9085E9}.billing-page .bl-subscription{background:var(--bl-subscription)!important}.billing-page .bl-repository{background:var(--bl-repository)!important}.billing-page .bl-conference{background:var(--bl-conference)!important}.billing-page .bl-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:4px 0 0}.billing-page .bl-basis{margin:0;font-size:12px;color:var(--ink-muted)}.billing-page .bl-message{display:flex;align-items:center;gap:8px;margin:14px 0 0;padding:10px 14px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);font-size:13px;color:var(--color);background:var(--paper-card)}.billing-page .bl-message .ui-icon{width:16px;height:16px;flex:none;color:var(--ink-muted)}.billing-page .bl-message.ov-performance-warning{border-color:color-mix(in srgb,var(--status-progress) 45%,var(--border-color));background:color-mix(in srgb,var(--status-progress) 8%,var(--paper-card))}.billing-page .bl-message.ov-performance-warning .ui-icon{color:var(--status-progress)}.billing-page .bl-message .btn{margin-left:auto}.overview-page .bl-kpi-row{grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 16px}.overview-page .bl-kpi-row .ov-kpi-card{min-width:0;padding:16px 18px}.overview-page .bl-kpi-row .ov-kpi-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .ov-kpi-sub{white-space:normal;overflow-wrap:anywhere;line-height:1.4}.overview-page .bl-kpi-row .ov-kpi-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .bl-muted-value{color:var(--ink-muted);font-size:20px;line-height:28px}.overview-page .bl-kpi-row.is-loading .ov-kpi-card{opacity:.6}.billing-page .bl-skeleton-value{display:block;width:50%;height:28px;margin:4px 0;border-radius:6px}@media (max-width:1279px){.overview-page .bl-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media (max-width:767px){.overview-page .bl-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}}.billing-page .bl-health{display:flex;align-items:center;flex-wrap:wrap;gap:6px 20px;padding:10px 16px;margin:0 0 16px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);background:var(--paper-card);font-size:13px;font-variant-numeric:tabular-nums}.billing-page .bl-health-title{display:inline-flex;align-items:center;gap:8px;font-weight:600}.billing-page .bl-health-title .ov-svc-dot{width:8px;height:8px;margin:0;border-radius:50%}.billing-page .bl-dot-bad{background:var(--st-bad,#b42318)}.billing-page .bl-health-item .k{color:var(--ink-muted);margin-right:2px}.billing-page .bl-health-item.is-bad{color:var(--st-bad,#b42318);font-weight:600}.billing-page .bl-health-item.is-warn{color:#946519;font-weight:600}.dark-mode .billing-page .bl-health-item.is-warn{color:var(--status-progress)}.dark-mode .billing-page .bl-health-item.is-bad{color:#f08a82}.billing-page .bl-health-error{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.billing-page .bl-health-error code{font-size:12px;color:inherit;background:var(--paper-bg-alt);padding:1px 5px;border-radius:4px}.billing-page .bl-chart-card{margin-bottom:16px}.billing-page .bl-swatch{display:inline-block;width:8px;height:8px;border-radius:2px;flex:none}.billing-page .bl-bars{position:relative;gap:3px}.billing-page .bl-bars.is-dense{gap:1px}.billing-page .bl-col{min-width:0}.billing-page .bl-stack{display:flex;flex-direction:column-reverse;width:100%;gap:1px;border-radius:2px 2px 0 0;overflow:hidden}.billing-page .bl-stack>i{display:block;min-height:2px;flex-basis:0}.billing-page .bl-col:hover .bl-stack{filter:brightness(1.08)}.billing-page .bl-col.is-zero .bl-stack{height:1px!important;background:var(--border-color)}.billing-page .bl-empty{margin:8px 0 4px;padding:32px 0;text-align:center;color:var(--ink-muted)}.billing-page .bl-plans{margin-bottom:24px}.billing-page .ov-metrics-table thead th.bl-group{text-align:center;border-bottom:1px solid var(--border-color)}.billing-page .ov-metrics-table tfoot td,.billing-page .ov-metrics-table tfoot th{border-top:1px solid var(--border-color);border-bottom:0;font-weight:600;background:var(--paper-bg-alt)}.billing-page .ov-metrics-table tbody tr:last-child>*{border-bottom:0}.billing-page .bl-plan-name{font-weight:500;text-align:left}.billing-page .bl-plan-cell .bl-swatch,.billing-page .bl-plan-name .bl-swatch{margin-right:8px;vertical-align:1px}.billing-page .bl-link{padding:0;border:0;background:0 0;font:inherit;color:var(--link-color);cursor:pointer;text-align:left}.billing-page .bl-link:hover{text-decoration:underline}.billing-page .bl-idle .bl-link,.billing-page .bl-idle td{color:var(--ink-faint)}.billing-page .ov-muted{color:var(--ink-faint)}.billing-page .bl-note{margin:10px 0 0}.billing-page .bl-grants{margin:8px 0 24px;scroll-margin-top:16px}.billing-page .bl-section-head{margin:0 0 8px}.billing-page .bl-section-head h2{margin:0}.billing-page .bl-grant-scroll{margin-top:12px}.billing-page .bl-grant-table th[scope=row]{font-weight:500;text-align:left;max-width:200px;overflow:hidden;text-overflow:ellipsis}.billing-page .bl-grant-table td,.billing-page .bl-grant-table th{padding:9px 12px}.billing-page .bl-grant-table th[scope=row] a,.billing-page .bl-scope a{color:var(--link-color)}.billing-page .bl-grant-table .sortable{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:0 0;font:inherit;color:inherit;cursor:pointer}.billing-page .bl-grant-table .sortable.active{color:var(--color)}.billing-page .bl-state{display:inline-flex;align-items:center;gap:6px}.billing-page .bl-state .status-dot{margin:0}.billing-page .bl-plan-cell{white-space:nowrap}.billing-page .bl-flag{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;background:color-mix(in srgb,var(--status-progress) 14%,transparent);color:#7a5212}.dark-mode .billing-page .bl-flag{color:var(--status-progress)}.billing-page .bl-flag.is-bad{background:color-mix(in srgb,var(--st-bad,#b42318) 12%,transparent);color:#a1251b}.dark-mode .billing-page .bl-flag.is-bad{color:#f08a82}.billing-page .bl-scope a{display:inline-flex;align-items:center;gap:6px;max-width:200px;min-width:0}.billing-page .bl-scope a>span{overflow:hidden;text-overflow:ellipsis}.billing-page .bl-scope .ui-icon{width:14px;height:14px;flex:none;color:var(--ink-muted)}.billing-page .bl-page{font-family:var(--font-mono);font-size:12px;color:var(--ink-muted)}.billing-page .bl-alert{display:flex;align-items:center;gap:8px;margin:8px 0}.billing-page .bl-alert .btn{margin-left:auto}.billing-page .bl-pager{justify-content:space-between;border-bottom:none;margin-top:8px}.billing-page .paper-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:12px}@media (max-width:767px){.billing-page .bl-health{gap:4px 14px}.billing-page .bl-health-title{flex-basis:100%}.billing-page .bl-toolbar .seg-filter{max-width:100%;overflow-x:auto}}.breadcrumb .redact-slot,.files .tree-name .redact-slot{position:relative;top:-.15em}.dark-mode .markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip,.markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip{vertical-align:.04em!important} \ No newline at end of file +.reviewer-preview .rp-main{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reviewer-preview .rp-document{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;position:relative}.reviewer-preview button.rp-count{background:0 0;border:0;padding:0;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}.reviewer-preview button.rp-count:hover{text-decoration-color:currentColor}@media (max-width:767px){.reviewer-preview .file-card-head .rp-preserved-tag{display:none}}.billing-page{--bl-subscription:#008C7E;--bl-repository:#D0652A;--bl-conference:#6250D6}.dark-mode .billing-page{--bl-subscription:#16A091;--bl-repository:#D95926;--bl-conference:#9085E9}.billing-page .bl-subscription{background:var(--bl-subscription)!important}.billing-page .bl-repository{background:var(--bl-repository)!important}.billing-page .bl-conference{background:var(--bl-conference)!important}.billing-page .bl-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:4px 0 0}.billing-page .bl-basis{margin:0;font-size:12px;color:var(--ink-muted)}.billing-page .bl-message{display:flex;align-items:center;gap:8px;margin:14px 0 0;padding:10px 14px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);font-size:13px;color:var(--color);background:var(--paper-card)}.billing-page .bl-message .ui-icon{width:16px;height:16px;flex:none;color:var(--ink-muted)}.billing-page .bl-message.ov-performance-warning{border-color:color-mix(in srgb,var(--status-progress) 45%,var(--border-color));background:color-mix(in srgb,var(--status-progress) 8%,var(--paper-card))}.billing-page .bl-message.ov-performance-warning .ui-icon{color:var(--status-progress)}.billing-page .bl-message .btn{margin-left:auto}.overview-page .bl-kpi-row{grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 16px}.overview-page .bl-kpi-row .ov-kpi-card{min-width:0;padding:16px 18px}.overview-page .bl-kpi-row .ov-kpi-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .ov-kpi-sub{white-space:normal;overflow-wrap:anywhere;line-height:1.4}.overview-page .bl-kpi-row .ov-kpi-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .bl-muted-value{color:var(--ink-muted);font-size:20px;line-height:28px}.overview-page .bl-kpi-row.is-loading .ov-kpi-card{opacity:.6}.billing-page .bl-skeleton-value{display:block;width:50%;height:28px;margin:4px 0;border-radius:6px}@media (max-width:1279px){.overview-page .bl-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media (max-width:767px){.overview-page .bl-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}}.billing-page .bl-health{display:flex;align-items:center;flex-wrap:wrap;gap:6px 20px;padding:10px 16px;margin:0 0 16px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);background:var(--paper-card);font-size:13px;font-variant-numeric:tabular-nums}.billing-page .bl-health-title{display:inline-flex;align-items:center;gap:8px;font-weight:600}.billing-page .bl-health-title .ov-svc-dot{width:8px;height:8px;margin:0;border-radius:50%}.billing-page .bl-dot-bad{background:var(--st-bad,#b42318)}.billing-page .bl-health-item .k{color:var(--ink-muted);margin-right:2px}.billing-page .bl-health-item.is-bad{color:var(--st-bad,#b42318);font-weight:600}.billing-page .bl-health-item.is-warn{color:#946519;font-weight:600}.dark-mode .billing-page .bl-health-item.is-warn{color:var(--status-progress)}.dark-mode .billing-page .bl-health-item.is-bad{color:#f08a82}.billing-page .bl-health-error{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.billing-page .bl-health-error code{font-size:12px;color:inherit;background:var(--paper-bg-alt);padding:1px 5px;border-radius:4px}.billing-page .bl-chart-card{margin-bottom:16px}.billing-page .bl-swatch{display:inline-block;width:8px;height:8px;border-radius:2px;flex:none}.billing-page .bl-bars{position:relative;gap:3px}.billing-page .bl-bars.is-dense{gap:1px}.billing-page .bl-col{min-width:0}.billing-page .bl-stack{display:flex;flex-direction:column-reverse;width:100%;gap:1px;border-radius:2px 2px 0 0;overflow:hidden}.billing-page .bl-stack>i{display:block;min-height:2px;flex-basis:0}.billing-page .bl-col:hover .bl-stack{filter:brightness(1.08)}.billing-page .bl-col.is-zero .bl-stack{height:1px!important;background:var(--border-color)}.billing-page .bl-empty{margin:8px 0 4px;padding:32px 0;text-align:center;color:var(--ink-muted)}.billing-page .bl-plans{margin-bottom:24px}.billing-page .ov-metrics-table thead th.bl-group{text-align:center;border-bottom:1px solid var(--border-color)}.billing-page .ov-metrics-table tfoot td,.billing-page .ov-metrics-table tfoot th{border-top:1px solid var(--border-color);border-bottom:0;font-weight:600;background:var(--paper-bg-alt)}.billing-page .ov-metrics-table tbody tr:last-child>*{border-bottom:0}.billing-page .bl-plan-name{font-weight:500;text-align:left}.billing-page .bl-plan-cell .bl-swatch,.billing-page .bl-plan-name .bl-swatch{margin-right:8px;vertical-align:1px}.billing-page .bl-link{padding:0;border:0;background:0 0;font:inherit;color:var(--link-color);cursor:pointer;text-align:left}.billing-page .bl-link:hover{text-decoration:underline}.billing-page .bl-idle .bl-link,.billing-page .bl-idle td{color:var(--ink-faint)}.billing-page .ov-muted{color:var(--ink-faint)}.billing-page .bl-note{margin:10px 0 0}.billing-page .bl-grants{margin:8px 0 24px;scroll-margin-top:16px}.billing-page .bl-section-head{margin:0 0 8px}.billing-page .bl-section-head h2{margin:0}.billing-page .bl-grant-scroll{margin-top:12px}.billing-page .bl-grant-table th[scope=row]{font-weight:500;text-align:left;max-width:200px;overflow:hidden;text-overflow:ellipsis}.billing-page .bl-grant-table td,.billing-page .bl-grant-table th{padding:9px 12px}.billing-page .bl-grant-table th[scope=row] a,.billing-page .bl-scope a{color:var(--link-color)}.billing-page .bl-grant-table .sortable{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:0 0;font:inherit;color:inherit;cursor:pointer}.billing-page .bl-grant-table .sortable.active{color:var(--color)}.billing-page .bl-state{display:inline-flex;align-items:center;gap:6px}.billing-page .bl-state .status-dot{margin:0}.billing-page .bl-plan-cell{white-space:nowrap}.billing-page .bl-flag{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;background:color-mix(in srgb,var(--status-progress) 14%,transparent);color:#7a5212}.dark-mode .billing-page .bl-flag{color:var(--status-progress)}.billing-page .bl-flag.is-bad{background:color-mix(in srgb,var(--st-bad,#b42318) 12%,transparent);color:#a1251b}.dark-mode .billing-page .bl-flag.is-bad{color:#f08a82}.billing-page .bl-scope a{display:inline-flex;align-items:center;gap:6px;max-width:200px;min-width:0}.billing-page .bl-scope a>span{overflow:hidden;text-overflow:ellipsis}.billing-page .bl-scope .ui-icon{width:14px;height:14px;flex:none;color:var(--ink-muted)}.billing-page .bl-page{font-family:var(--font-mono);font-size:12px;color:var(--ink-muted)}.billing-page .bl-alert{display:flex;align-items:center;gap:8px;margin:8px 0}.billing-page .bl-alert .btn{margin-left:auto}.billing-page .bl-pager{justify-content:space-between;border-bottom:none;margin-top:8px}.billing-page .paper-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:12px}@media (max-width:767px){.billing-page .bl-health{gap:4px 14px}.billing-page .bl-health-title{flex-basis:100%}.billing-page .bl-toolbar .seg-filter{max-width:100%;overflow-x:auto}}.breadcrumb .redact-slot,.files .tree-name .redact-slot{position:relative;top:-.15em}.dark-mode .markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip,.markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip{vertical-align:.04em!important}.emails-page .email-overview-toolbar,.emails-page .email-refresh,.emails-page .email-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.email-overview-toolbar{margin:20px 0 10px}.email-basis,.email-muted,.email-refresh{color:var(--ink-muted);font-size:12px}.email-basis{margin:0 0 16px}.emails-page .email-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.email-error-text{color:var(--status-error)}.email-chart{margin-bottom:28px}.email-chart h2{margin:0}.email-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:11px}.email-chart-plot{display:flex;gap:10px;height:108px;margin-top:20px}.email-axis{display:flex;flex-direction:column;justify-content:space-between;color:var(--ink-muted);font:11px var(--font-mono);min-width:20px}.email-bars{display:flex;gap:5px;flex:1;border-bottom:1px solid var(--border-color);background:linear-gradient(var(--border-color),var(--border-color)) center/100% 1px no-repeat}.email-bar-column{flex:1;min-width:0;display:flex;align-items:flex-end;padding:0 2px}.email-bar-stack{width:100%;display:flex;flex-direction:column-reverse;gap:1px;border-radius:2px 2px 0 0;overflow:hidden;background:var(--border-color)}.email-bar-stack i{flex-basis:0;min-height:0}.email-bar-accepted{background:var(--status-ready)}.email-bar-rejected{background:var(--status-error)}.email-bar-unknown{background:var(--status-progress)}.email-chart-dates{display:flex;justify-content:space-between;gap:12px;margin:8px 0 0 30px;color:var(--ink-muted);font-size:11px}.email-section-head{margin-bottom:14px}.email-section-head h2{font-size:18px;margin:0}.email-toolbar{display:flex;align-items:end;gap:10px;margin-bottom:16px}.email-toolbar label{display:grid;gap:6px;margin:0;font-size:12px;font-weight:500}.email-toolbar .email-search{flex:1}.email-toolbar input{width:100%}.email-toolbar select{min-width:180px}.email-status-tabs{display:flex;gap:20px;border-bottom:1px solid var(--border-color);margin-bottom:14px;overflow-x:auto}.email-status-tabs button{padding:0 0 10px;background:0 0;border:0;border-bottom:2px solid transparent;color:var(--ink-muted);font:500 12px inherit;white-space:nowrap;cursor:pointer}.email-status-tabs button.active{border-color:var(--accent);color:var(--color)}.email-status-tabs button span{margin-left:5px;font-family:var(--font-mono);font-size:11px}.email-state{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px;margin:16px 0;background:var(--paper-card);border:1px solid var(--border-color);border-radius:8px;color:var(--ink-muted)}.email-state p{margin:0}.email-state-error{color:var(--status-error)}.email-table-wrap{border:1px solid var(--border-color);border-radius:8px;overflow:hidden;background:var(--paper-card)}.email-table{width:100%;table-layout:fixed;font-size:12px;line-height:1.5}.email-table td,.email-table th{padding:11px 14px;text-align:left;vertical-align:middle;overflow-wrap:anywhere}.email-table th{background:var(--paper-bg-alt);color:var(--ink-muted);font-weight:500;font-size:11px}.email-table tbody tr+tr{border-top:1px solid var(--border-color)}.email-table th:first-child{width:32%}.email-table th:nth-child(2){width:19%}.email-table th:nth-child(3){width:21%}.email-table th:nth-child(4){width:18%}.email-table th:last-child{width:10%}.email-recipient>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-attempted,.email-type{color:var(--ink-muted)}.email-outcome{display:inline-flex;align-items:center;gap:6px;font-weight:500;white-space:nowrap}.email-outcome::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}.email-outcome-accepted{color:var(--status-ready)}.email-outcome-rejected{color:var(--status-error)}.email-outcome-sending,.email-outcome-unknown{color:var(--status-progress)}.email-http{margin-left:8px;color:var(--ink-muted);font:10px var(--font-mono)}.email-copy,.email-detail-button{border:0;background:0 0;color:var(--link-color);cursor:pointer;font:inherit;padding:3px 0}.email-detail-button{white-space:nowrap}.email-detail-button span{margin-left:5px}.email-copy:hover,.email-detail-button:hover{text-decoration:underline}.email-selected{background:var(--paper-bg-alt)}.email-expanded td{padding:20px 24px;background:var(--paper-bg-alt)}.email-detail-heading{display:flex;align-items:center;gap:16px}.email-detail-heading h3{margin:0;font-size:14px}.email-explanation{max-width:85ch;margin:10px 0 20px;color:var(--ink-soft)}.email-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 30px;margin:0}.email-detail-grid dt{color:var(--ink-muted);font-size:11px;font-weight:400;margin-bottom:4px}.email-detail-grid dd{margin:0;overflow-wrap:anywhere}.email-detail-grid code{color:inherit;background:0 0;padding:0;font-size:11px}.email-copy{margin-left:10px;font-size:11px}.email-copy-feedback{margin:10px 0 0;color:var(--ink-muted);min-height:18px}.email-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:12px;color:var(--ink-muted);font-size:12px}.email-footer>div{display:flex;gap:8px}.email-about{margin:24px 0;color:var(--ink-muted);font-size:12px}.email-about summary{cursor:pointer;width:fit-content}.email-about p{max-width:90ch;margin:8px 0}@media(max-width:767px){.emails-page .email-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.emails-page .email-kpis .ov-kpi-card{padding:14px}.emails-page .email-kpis .ov-kpi-value{font-size:26px}.email-overview-toolbar .email-refresh{width:100%}.email-toolbar{flex-wrap:wrap}.email-toolbar .email-search{flex-basis:100%}.email-toolbar label:not(.email-search){flex:1}.email-toolbar select{min-width:0;width:100%}.email-legend{gap:10px}.email-chart .ov-chart-head{flex-wrap:wrap;gap:10px}.email-chart-dates{font-size:10px}.email-bars{gap:2px}.email-bar-column{padding:0}.email-status-tabs{gap:18px}.email-table,.email-table tbody{display:block}.email-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.email-table tbody tr{display:grid;grid-template-columns:1fr auto;gap:6px 12px;padding:14px}.email-table td{display:block;padding:0;min-width:0}.email-table .email-recipient{grid-column:1/-1}.email-table .email-recipient>span{white-space:normal}.email-table .email-result{grid-column:1}.email-table .email-type{grid-column:1}.email-table .email-attempted{grid-column:1;font-size:11px}.email-table .email-expand{grid-column:2;grid-row:2/5;align-self:center}.email-table tbody .email-expanded{display:block;padding:18px 14px;background:var(--paper-bg-alt)}.email-detail-grid{grid-template-columns:1fr;gap:14px}.email-detail-heading{flex-wrap:wrap}.email-section-head .email-muted{font-size:11px}.email-footer{flex-wrap:wrap}.email-table .email-http{font-size:10px}}.emails-page .ov-kpi-sub{white-space:normal;overflow:visible;text-overflow:clip}.email-pager-top{margin:0 0 10px}.email-status-tabs button{font-family:inherit;font-size:12px;font-weight:500}.email-chart-data{margin:12px 0 0 30px;color:var(--ink-muted);font-size:11px}.email-chart-data summary{cursor:pointer;width:fit-content}.email-data-scroll{overflow:auto;max-height:240px;margin-top:10px}.email-chart-data table{width:100%;font-variant-numeric:tabular-nums}.email-chart-data td,.email-chart-data th{text-align:right;padding:6px 10px;border-bottom:1px solid var(--border-color);white-space:nowrap}.email-chart-data th:first-child{text-align:left}.email-chart-data th{font-weight:500}.email-search-help{margin:-6px 0 16px;font-size:11px;color:var(--ink-muted)}@media(max-width:767px){.email-status-tabs{flex-wrap:wrap;gap:10px 18px;overflow:visible}.email-status-tabs button{padding-bottom:7px}.email-search-help{line-height:1.5}}.emails-page .email-kpis .ov-kpi-sub{white-space:normal!important}#email-history-title{scroll-margin-top:80px}.email-jump{font-size:12px;margin-right:auto} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css index 67fe091..60db110 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -14328,3 +14328,57 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191, .files .tree-name .redact-slot, .breadcrumb .redact-slot { position: relative; top: -.15em; } /* Text: the slot centers on the line's letters, level with parentheses and punctuation. */ .markdown-body :is(p, li, td, th, blockquote, dd) mark.redact-chip, .dark-mode .markdown-body :is(p, li, td, th, blockquote, dd) mark.redact-chip { vertical-align: .04em !important; } + +/* Email operations: shared admin surfaces, compact history, progressive details. */ +.emails-page .email-overview-toolbar, .emails-page .email-section-head, .emails-page .email-refresh { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; } +.email-overview-toolbar { margin:20px 0 10px; } +.email-refresh, .email-basis, .email-muted { color:var(--ink-muted); font-size:12px; } +.email-basis { margin:0 0 16px; } +.emails-page .email-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:16px; } +.email-error-text { color:var(--status-error); } +.email-chart { margin-bottom:28px; } +.email-chart h2 { margin:0; } +.email-legend { display:flex; flex-wrap:wrap; gap:16px; font-size:11px; } +.email-chart-plot { display:flex; gap:10px; height:108px; margin-top:20px; } +.email-axis { display:flex; flex-direction:column; justify-content:space-between; color:var(--ink-muted); font:11px var(--font-mono); min-width:20px; } +.email-bars { display:flex; gap:5px; flex:1; border-bottom:1px solid var(--border-color); background:linear-gradient(var(--border-color),var(--border-color)) center/100% 1px no-repeat; } +.email-bar-column { flex:1; min-width:0; display:flex; align-items:flex-end; padding:0 2px; } +.email-bar-stack { width:100%; display:flex; flex-direction:column-reverse; gap:1px; border-radius:2px 2px 0 0; overflow:hidden; background:var(--border-color); } +.email-bar-stack i { flex-basis:0; min-height:0; } +.email-bar-accepted { background:var(--status-ready); }.email-bar-rejected { background:var(--status-error); }.email-bar-unknown { background:var(--status-progress); } +.email-chart-dates { display:flex; justify-content:space-between; gap:12px; margin:8px 0 0 30px; color:var(--ink-muted); font-size:11px; } +.email-section-head { margin-bottom:14px; }.email-section-head h2 { font-size:18px; margin:0; } +.email-toolbar { display:flex; align-items:end; gap:10px; margin-bottom:16px; } +.email-toolbar label { display:grid; gap:6px; margin:0; font-size:12px; font-weight:500; } +.email-toolbar .email-search { flex:1; }.email-toolbar input { width:100%; }.email-toolbar select { min-width:180px; } +.email-status-tabs { display:flex; gap:20px; border-bottom:1px solid var(--border-color); margin-bottom:14px; overflow-x:auto; } +.email-status-tabs button { padding:0 0 10px; background:none; border:0; border-bottom:2px solid transparent; color:var(--ink-muted); font:500 12px inherit; white-space:nowrap; cursor:pointer; } +.email-status-tabs button.active { border-color:var(--accent); color:var(--color); }.email-status-tabs button span { margin-left:5px; font-family:var(--font-mono); font-size:11px; } +.email-state { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:20px; margin:16px 0; background:var(--paper-card); border:1px solid var(--border-color); border-radius:8px; color:var(--ink-muted); }.email-state p { margin:0; }.email-state-error { color:var(--status-error); } +.email-table-wrap { border:1px solid var(--border-color); border-radius:8px; overflow:hidden; background:var(--paper-card); } +.email-table { width:100%; table-layout:fixed; font-size:12px; line-height:1.5; } +.email-table th,.email-table td { padding:11px 14px; text-align:left; vertical-align:middle; overflow-wrap:anywhere; } +.email-table th { background:var(--paper-bg-alt); color:var(--ink-muted); font-weight:500; font-size:11px; } +.email-table tbody tr+tr { border-top:1px solid var(--border-color); }.email-table th:first-child { width:32%; }.email-table th:nth-child(2) { width:19%; }.email-table th:nth-child(3) { width:21%; }.email-table th:nth-child(4) { width:18%; }.email-table th:last-child { width:10%; } +.email-recipient > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.email-type,.email-attempted { color:var(--ink-muted); } +.email-outcome { display:inline-flex; align-items:center; gap:6px; font-weight:500; white-space:nowrap; }.email-outcome::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; } +.email-outcome-accepted { color:var(--status-ready); }.email-outcome-rejected { color:var(--status-error); }.email-outcome-unknown,.email-outcome-sending { color:var(--status-progress); }.email-http { margin-left:8px; color:var(--ink-muted); font:10px var(--font-mono); } +.email-detail-button,.email-copy { border:0; background:none; color:var(--link-color); cursor:pointer; font:inherit; padding:3px 0; }.email-detail-button { white-space:nowrap; }.email-detail-button span { margin-left:5px; }.email-detail-button:hover,.email-copy:hover { text-decoration:underline; } +.email-selected { background:var(--paper-bg-alt); }.email-expanded td { padding:20px 24px; background:var(--paper-bg-alt); }.email-detail-heading { display:flex; align-items:center; gap:16px; }.email-detail-heading h3 { margin:0; font-size:14px; }.email-explanation { max-width:85ch; margin:10px 0 20px; color:var(--ink-soft); }.email-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 30px; margin:0; }.email-detail-grid dt { color:var(--ink-muted); font-size:11px; font-weight:400; margin-bottom:4px; }.email-detail-grid dd { margin:0; overflow-wrap:anywhere; }.email-detail-grid code { color:inherit; background:none; padding:0; font-size:11px; }.email-copy { margin-left:10px; font-size:11px; }.email-copy-feedback { margin:10px 0 0; color:var(--ink-muted); min-height:18px; } +.email-footer { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-top:12px; color:var(--ink-muted); font-size:12px; }.email-footer>div { display:flex; gap:8px; } +.email-about { margin:24px 0; color:var(--ink-muted); font-size:12px; }.email-about summary { cursor:pointer; width:fit-content; }.email-about p { max-width:90ch; margin:8px 0; } +@media(max-width:767px) { + .emails-page .email-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.emails-page .email-kpis .ov-kpi-card { padding:14px; }.emails-page .email-kpis .ov-kpi-value { font-size:26px; }.email-overview-toolbar .email-refresh { width:100%; }.email-toolbar { flex-wrap:wrap; }.email-toolbar .email-search { flex-basis:100%; }.email-toolbar label:not(.email-search) { flex:1; }.email-toolbar select { min-width:0; width:100%; }.email-legend { gap:10px; }.email-chart .ov-chart-head { flex-wrap:wrap; gap:10px; }.email-chart-dates { font-size:10px; }.email-bars { gap:2px; }.email-bar-column { padding:0; }.email-status-tabs { gap:18px; }.email-table,.email-table tbody { display:block; }.email-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }.email-table tbody tr { display:grid; grid-template-columns:1fr auto; gap:6px 12px; padding:14px; }.email-table td { display:block; padding:0; min-width:0; }.email-table .email-recipient { grid-column:1/-1; }.email-table .email-recipient>span { white-space:normal; }.email-table .email-result { grid-column:1; }.email-table .email-type { grid-column:1; }.email-table .email-attempted { grid-column:1; font-size:11px; }.email-table .email-expand { grid-column:2; grid-row:2/5; align-self:center; }.email-table tbody .email-expanded { display:block; padding:18px 14px; background:var(--paper-bg-alt); }.email-detail-grid { grid-template-columns:1fr; gap:14px; }.email-detail-heading { flex-wrap:wrap; }.email-section-head .email-muted { font-size:11px; }.email-footer { flex-wrap:wrap; }.email-table .email-http { font-size:10px; } +} + +.emails-page .ov-kpi-sub { white-space:normal; overflow:visible; text-overflow:clip; }.email-pager-top { margin:0 0 10px; }.email-status-tabs button { font-family:inherit; font-size:12px; font-weight:500; } + +.email-chart-data { margin:12px 0 0 30px; color:var(--ink-muted); font-size:11px; }.email-chart-data summary { cursor:pointer; width:fit-content; }.email-data-scroll { overflow:auto; max-height:240px; margin-top:10px; }.email-chart-data table { width:100%; font-variant-numeric:tabular-nums; }.email-chart-data th,.email-chart-data td { text-align:right; padding:6px 10px; border-bottom:1px solid var(--border-color); white-space:nowrap; }.email-chart-data th:first-child { text-align:left; }.email-chart-data th { font-weight:500; } + +.email-search-help { margin:-6px 0 16px; font-size:11px; color:var(--ink-muted); } +@media(max-width:767px) { .email-status-tabs { flex-wrap:wrap; gap:10px 18px; overflow:visible; }.email-status-tabs button { padding-bottom:7px; }.email-search-help { line-height:1.5; } } + +.emails-page .email-kpis .ov-kpi-sub { white-space:normal !important; } +#email-history-title { scroll-margin-top:80px; } + +.email-jump { font-size:12px; margin-right:auto; } diff --git a/public/i18n/locale-en.json b/public/i18n/locale-en.json index f558732..36af8b8 100644 --- a/public/i18n/locale-en.json +++ b/public/i18n/locale-en.json @@ -8,6 +8,7 @@ "dashboard": "Open owner dashboard" }, "ERRORS": { + "cache_miss": "The file is not cached yet. Please try again shortly.", "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.", diff --git a/public/partials/admin/billing.htm b/public/partials/admin/billing.htm index 5160438..97ba49a 100644 --- a/public/partials/admin/billing.htm +++ b/public/partials/admin/billing.htm @@ -13,6 +13,7 @@ Conferences Billing Queues + Emails Errors diff --git a/public/partials/admin/conferences.htm b/public/partials/admin/conferences.htm index 5ec49b3..bcc9343 100644 --- a/public/partials/admin/conferences.htm +++ b/public/partials/admin/conferences.htm @@ -9,6 +9,7 @@ Conferences Billing Queues + Emails Errors diff --git a/public/partials/admin/emails.htm b/public/partials/admin/emails.htm new file mode 100644 index 0000000..6acef95 --- /dev/null +++ b/public/partials/admin/emails.htm @@ -0,0 +1,57 @@ +
Recorded sending attempts · Provider acceptance does not confirm inbox delivery.
+| Date | Accepted | Rejected | Unknown | Pending |
|---|---|---|---|---|
| {{ emailDayLabel(day) }} | {{ day.accepted }} | {{ day.rejected }} | {{ day.unknown }} | {{ day.sending }} |
Search part of a recipient address, or an exact attempt, owner or resource ID.
+ +{{ emailAnnouncement }} {{ emailCopyMessage }}
+Loading email history…
+{{ hasEmailFilters() ? 'No attempts match these filters. Try another recipient or a wider period.' : 'No attempts recorded in this period.' }}
| Recipient | Outcome | Email type | Attempted | Details |
|---|---|---|---|---|
| {{ row.recipient }} | {{ emailStatusLabel(row.state) }}{{ row.httpStatus }} | {{ emailKindLabel(row.kind) }} | ||
Attempt details{{ emailStatusLabel(row.state) }}{{ emailExplanation(row) }}
{{ emailCopyMessage }} | ||||
New sending attempts only; older sends are not backfilled. Accepted means the provider accepted the request, not that it reached the inbox. Check pending or unknown outcomes in Resend before considering another send. Audit storage failures can leave this history incomplete.
| '+(p.oldNo||"")+' | '+(p.newNo||"")+' | '+(p.kind==="add"?"+":p.kind==="remove"?"-":"")+' | '+t(p.text)+" |
Loading GitHub info for "+S.repoId+"..."),t.get("/api/admin/repos/"+S.repoId+"/github").then(v=>{N&&(N.document.open(),N.document.write('
'+JSON.stringify(v.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+""),N.document.close())},v=>{let E=v&&v.data?JSON.stringify(v.data,null,2):String(v);N&&(N.document.body.innerHTML='
'+E+"")})},e.statusCountFor=S=>{let N=(e.statusCounts||[]).find(v=>v._id===S);return N?N.count:0},e.statusStorageFor=S=>{let N=(e.statusCounts||[]).find(v=>v._id===S);return N?N.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=S=>{e.query.sort===S?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=S,e.query.direction="desc"),e.query.page=1},e.sortIcon=S=>e.query.sort===S?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",u={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let m=s.search();m.owner&&(e.query.owner=m.owner),m.conference&&(e.query.conference=m.conference),m.search&&(e.query.search=m.search);let b="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let N=Object.assign({},e.query);delete N.page,e.presets=(e.presets||[]).filter(v=>v.name!==S),e.presets.push({name:S,query:N}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(N=>N.name!==S.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(S=>{e.selected[S.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(S=>e.selected[S.repoId]),e.bulkRefresh=()=>{let S=e.selectedRepos();S.length&&confirm(`Force refresh ${S.length} repositories?`)&&S.forEach(N=>e.updateRepository(N))},e.bulkRemoveCache=()=>{let S=e.selectedRepos();S.length&&confirm(`Purge cache for ${S.length} repositories?`)&&S.forEach(N=>e.removeCache(N))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let S=new URLSearchParams(Object.entries(e.query).filter(([,N])=>N!==""&&N!==!1&&N!=null));S.set("format","csv"),S.set("limit","10000"),window.open("/api/admin/repos?"+S.toString(),"_blank")},e.removeCache=S=>{confirm("Remove cached files for "+S.repoId+"?")&&t.delete("/api/admin/repos/"+S.repoId).then(()=>h(),N=>console.error(N))},e.removeRepository=S=>{confirm("Remove repository "+S.repoId+"?")&&t.delete("/api/repo/"+S.repoId+"/").then(()=>h(),N=>console.error(N))},e.updateRepository=S=>{let N=st({title:`Refreshing ${S.repoId}...`,date:new Date,body:`The repository ${S.repoId} is going to be refreshed.`});e.toasts.push(N),t.post(`/api/repo/${S.repoId}/refresh`).then(v=>{v.data.status=="ready"?N.title=`${S.repoId} is refreshed.`:N.title=`Refreshing of ${S.repoId}.`},v=>{N.title=`Error during the refresh of ${S.repoId}.`,N.body=v.body})},e.filtersOpen=!1,e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(S=>{e.total=S.data.total,e.totalPage=Math.ceil(S.data.total/e.query.limit),e.repositories=S.data.results,e.allSelected=!1},S=>{e.fetchError=S&&S.data&&S.data.error||"Failed to load repositories",console.error(S)})}function w(){let S=Object.assign({},e.query,{page:1,limit:1,ready:!0,expired:!0,removed:!0,error:!0,preparing:!0});t.get("/api/admin/repos",{params:S}).then(N=>{e.statusCounts=N.data.statusCounts||[],e.totalSize=N.data.totalSize||0},()=>{})}e.showAllStatuses=()=>Object.assign(e.query,{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0,page:1}),Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:S=>S==="preparing"?e.statusCountFor("preparing")+e.statusCountFor("download"):S==="expired"?e.statusCountFor("expired")+e.statusCountFor("expiring"):S==="removed"?e.statusCountFor("removed")+e.statusCountFor("removing"):e.statusCountFor(S),onChange:()=>{e.query.page=1}}),h(),w();let R=null;e.watch("query",()=>{i.timeout.cancel(R),R=i.timeout(()=>{h(),w()},500);let{page:S,search:N,...v}=e.query;saveFilterPrefs(p,v),d()},!0),d()},Fu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let r=h=>{if(h.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){h.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=h=>{h==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[h]="",e.query.page=1},e.chips=[];let d=()=>{let h=[];e.query.role&&h.push({key:"role",label:"Role",value:e.query.role}),e.chips=h};e.statusCountFor=h=>{let w=(e.statusCounts||[]).find(R=>R._id===h);return w?w.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.query.page=1},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.users.filterPrefs",u={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(h=>{e.selected[h.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(h=>e.selected[h.username]),e.banUser=h=>{confirm(`Ban user ${h.username}?`)&&t.post(`/api/admin/users/${h.username}/ban`).then(m,w=>console.error(w))},e.activateUser=h=>{t.post(`/api/admin/users/${h.username}/activate`).then(m,w=>console.error(w))},e.bulkBan=()=>{let h=e.selectedUsers();h.length&&confirm(`Ban ${h.length} users?`)&&h.forEach(w=>e.banUser(w))},e.exportCsv=()=>{let h=new URLSearchParams(Object.entries(e.query).filter(([,w])=>w!==""&&w!==!1&&w!=null));h.set("format","csv"),h.set("limit","10000"),window.open("/api/admin/users?"+h.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(h=>{e.total=h.data.total,e.totalPage=Math.ceil(h.data.total/e.query.limit),e.users=h.data.results,e.statusCounts=h.data.statusCounts||[],e.allSelected=!1},h=>{e.fetchError=h&&h.data&&h.data.error||"Failed to load users",console.error(h)})}m();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(m,500);let{page:h,search:w,...R}=e.query;saveFilterPrefs(p,R),d()},!0),d()},Uu=function(e,t,s,i){let o=Ct();Gu(o,Ut()),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let r="admin.user.filterPrefs",d={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},p=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},d.filters.status,p.filters&&p.filters.status||{})},e.query={sort:p.sort||d.sort,direction:p.direction||d.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=h=>(e.repositories||[]).filter(w=>Xi(w.status)===h).length,Ji(e,{flags:()=>e.filters.status,keys:["ready","preparing","error","expired","removed"],count:h=>e.statusCountFor(h)}),e.repoFiler=h=>e.filters.status[Xi(h.status)]==!1?!1:!!(e.search.trim().length==0||h.source.fullName.indexOf(e.search)>-1||h.repoId.indexOf(e.search)>-1||h.statusMessage&&h.statusMessage.indexOf(e.search)>-1||h.conference&&h.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(h=>{e.selected[h.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(h=>e.selected[h.repoId]),e.bulkRefresh=()=>{let h=e.selectedRepos();h.length&&confirm(`Force refresh ${h.length} repositories?`)&&h.forEach(w=>e.updateRepository(w))},e.bulkRemoveCache=()=>{let h=e.selectedRepos();h.length&&confirm(`Purge cache for ${h.length} repositories?`)&&h.forEach(w=>e.removeCache(w))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let h=e.filteredRepositories||e.repositories,R=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),S=h.map(E=>[E.repoId,E.status,E.statusMessage||"",E.pageView||0,E.anonymizeDate||"",E.source&&E.source.fullName||"",E.conference||"",E.size&&E.size.storage||0].map(M=>{let V=String(M??"");return/[",\n\r]/.test(V)?'"'+V.replace(/"/g,'""')+'"':V}).join(",")),N=new Blob([R+` +`+JSON.stringify(t):""}`},[ct.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${$h(t)}" via a navigation guard.`},[ct.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ct.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ct.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function as(e,t){return Je(new Error,{type:e,[mu]:!0},t)}function gn(e,t){return e instanceof Error&&mu in e&&(t==null||!!(e.type&t))}var Lh=["params","query","hash"];function $h(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Lh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function hu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i
| '+(p.oldNo||"")+' | '+(p.newNo||"")+' | '+(p.kind==="add"?"+":p.kind==="remove"?"-":"")+' | '+t(p.text)+" |
Loading GitHub info for "+S.repoId+"..."),t.get("/api/admin/repos/"+S.repoId+"/github").then(v=>{R&&(R.document.open(),R.document.write('
'+JSON.stringify(v.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+""),R.document.close())},v=>{let E=v&&v.data?JSON.stringify(v.data,null,2):String(v);R&&(R.document.body.innerHTML='
'+E+"")})},e.statusCountFor=S=>{let R=(e.statusCounts||[]).find(v=>v._id===S);return R?R.count:0},e.statusStorageFor=S=>{let R=(e.statusCounts||[]).find(v=>v._id===S);return R?R.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=S=>{e.query.sort===S?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=S,e.query.direction="desc"),e.query.page=1},e.sortIcon=S=>e.query.sort===S?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",u={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let h=s.search();h.owner&&(e.query.owner=h.owner),h.conference&&(e.query.conference=h.conference),h.search&&(e.query.search=h.search);let b="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let R=Object.assign({},e.query);delete R.page,e.presets=(e.presets||[]).filter(v=>v.name!==S),e.presets.push({name:S,query:R}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(R=>R.name!==S.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(S=>{e.selected[S.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(S=>e.selected[S.repoId]),e.bulkRefresh=()=>{let S=e.selectedRepos();S.length&&confirm(`Force refresh ${S.length} repositories?`)&&S.forEach(R=>e.updateRepository(R))},e.bulkRemoveCache=()=>{let S=e.selectedRepos();S.length&&confirm(`Purge cache for ${S.length} repositories?`)&&S.forEach(R=>e.removeCache(R))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let S=new URLSearchParams(Object.entries(e.query).filter(([,R])=>R!==""&&R!==!1&&R!=null));S.set("format","csv"),S.set("limit","10000"),window.open("/api/admin/repos?"+S.toString(),"_blank")},e.removeCache=S=>{confirm("Remove cached files for "+S.repoId+"?")&&t.delete("/api/admin/repos/"+S.repoId).then(()=>m(),R=>console.error(R))},e.removeRepository=S=>{confirm("Remove repository "+S.repoId+"?")&&t.delete("/api/repo/"+S.repoId+"/").then(()=>m(),R=>console.error(R))},e.updateRepository=S=>{let R=st({title:`Refreshing ${S.repoId}...`,date:new Date,body:`The repository ${S.repoId} is going to be refreshed.`});e.toasts.push(R),t.post(`/api/repo/${S.repoId}/refresh`).then(v=>{v.data.status=="ready"?R.title=`${S.repoId} is refreshed.`:R.title=`Refreshing of ${S.repoId}.`},v=>{R.title=`Error during the refresh of ${S.repoId}.`,R.body=v.body})},e.filtersOpen=!1,e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(S=>{e.total=S.data.total,e.totalPage=Math.ceil(S.data.total/e.query.limit),e.repositories=S.data.results,e.allSelected=!1},S=>{e.fetchError=S&&S.data&&S.data.error||"Failed to load repositories",console.error(S)})}function w(){let S=Object.assign({},e.query,{page:1,limit:1,ready:!0,expired:!0,removed:!0,error:!0,preparing:!0});t.get("/api/admin/repos",{params:S}).then(R=>{e.statusCounts=R.data.statusCounts||[],e.totalSize=R.data.totalSize||0},()=>{})}e.showAllStatuses=()=>Object.assign(e.query,{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0,page:1}),Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:S=>S==="preparing"?e.statusCountFor("preparing")+e.statusCountFor("download"):S==="expired"?e.statusCountFor("expired")+e.statusCountFor("expiring"):S==="removed"?e.statusCountFor("removed")+e.statusCountFor("removing"):e.statusCountFor(S),onChange:()=>{e.query.page=1}}),m(),w();let N=null;e.watch("query",()=>{i.timeout.cancel(N),N=i.timeout(()=>{m(),w()},500);let{page:S,search:R,...v}=e.query;saveFilterPrefs(p,v),d()},!0),d()},Fu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let r=m=>{if(m.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){m.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=m=>{m==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[m]="",e.query.page=1},e.chips=[];let d=()=>{let m=[];e.query.role&&m.push({key:"role",label:"Role",value:e.query.role}),e.chips=m};e.statusCountFor=m=>{let w=(e.statusCounts||[]).find(N=>N._id===m);return w?w.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 p="admin.users.filterPrefs",u={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(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(h,w=>console.error(w))},e.activateUser=m=>{t.post(`/api/admin/users/${m.username}/activate`).then(h,w=>console.error(w))},e.bulkBan=()=>{let m=e.selectedUsers();m.length&&confirm(`Ban ${m.length} users?`)&&m.forEach(w=>e.banUser(w))},e.exportCsv=()=>{let m=new URLSearchParams(Object.entries(e.query).filter(([,w])=>w!==""&&w!==!1&&w!=null));m.set("format","csv"),m.set("limit","10000"),window.open("/api/admin/users?"+m.toString(),"_blank")},e.fetchError=null;function h(){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)})}h();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(h,500);let{page:m,search:w,...N}=e.query;saveFilterPrefs(p,N),d()},!0),d()},Uu=function(e,t,s,i){let o=Ct();Gu(o,Ut()),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let r="admin.user.filterPrefs",d={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},p=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},d.filters.status,p.filters&&p.filters.status||{})},e.query={sort:p.sort||d.sort,direction:p.direction||d.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=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(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=m=>(e.repositories||[]).filter(w=>Xi(w.status)===m).length,Ji(e,{flags:()=>e.filters.status,keys:["ready","preparing","error","expired","removed"],count:m=>e.statusCountFor(m)}),e.repoFiler=m=>e.filters.status[Xi(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(w=>e.updateRepository(w))},e.bulkRemoveCache=()=>{let m=e.selectedRepos();m.length&&confirm(`Purge cache for ${m.length} repositories?`)&&m.forEach(w=>e.removeCache(w))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let m=e.filteredRepositories||e.repositories,N=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),S=m.map(E=>[E.repoId,E.status,E.statusMessage||"",E.pageView||0,E.anonymizeDate||"",E.source&&E.source.fullName||"",E.conference||"",E.size&&E.size.storage||0].map(D=>{let V=String(D??"");return/[",\n\r]/.test(V)?'"'+V.replace(/"/g,'""')+'"':V}).join(",")),R=new Blob([N+` `+S.join(` -`)],{type:"text/csv"}),v=document.createElement("a");v.href=URL.createObjectURL(N),v.download=i.username+"-repositories.csv",v.click()},e.showStatusMessage=h=>{let w=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,w)},e.fetchGithubInfo=h=>{let w=window.open("","_blank");w&&w.document.write("
Loading GitHub info for "+h.repoId+"..."),t.get("/api/admin/repos/"+h.repoId+"/github").then(R=>{w&&(w.document.open(),w.document.write('
'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+""),w.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);w&&(w.document.body.innerHTML='
'+S+"")})};function u(h){t.get("/api/admin/users/"+h+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(h){t.get("/api/admin/users/"+h,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",m()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>m(),w=>console.error(w))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=h=>{let w=st({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${h.repoId}/refresh`).then(R=>{R.data.status=="ready"?w.title=`${h.repoId} is refreshed.`:w.title=`Refreshing of ${h.repoId}.`},R=>{w.title=`Error during the refresh of ${h.repoId}.`,w.body=R.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{o.timeout.cancel(b),b=o.timeout(()=>{u(i.username)},500)},!0)},Bu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=R=>{if(R.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){R.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=R=>{R==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[R]="",e.query.page=1},e.chips=[];let d=()=>{let R=[];(e.query.dateFrom||e.query.dateTo)&&R.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=R};e.statusCountFor=R=>{let S=(e.statusCounts||[]).find(N=>N._id===R);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=R=>{e.query.sort===R?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=R,e.query.direction="desc"),e.query.page=1},e.sortIcon=R=>e.query.sort===R?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let R=window.prompt("Preset name:");if(!R)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==R),e.presets.push({name:R,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=R=>{Object.assign(e.query,R.query,{page:1})},e.deletePreset=R=>{e.presets=(e.presets||[]).filter(S=>S.name!==R.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.removeConference=R=>{confirm("Remove conference "+R.conferenceID+"?")&&t.delete("/api/admin/conferences/"+R.conferenceID).then(()=>h(),S=>console.error(S))},e.exportCsv=()=>{let R=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));R.set("format","csv"),R.set("limit","10000"),window.open("/api/admin/conferences?"+R.toString(),"_blank")},e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(R=>{e.total=R.data.total,e.totalPage=Math.ceil(R.data.total/e.query.limit),e.conferences=R.data.results,e.statusCounts=R.data.statusCounts||[]},R=>{e.fetchError=R&&R.data&&R.data.error||"Failed to load conferences",console.error(R)})}Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:R=>e.statusCountFor(R),onChange:()=>{e.query.page=1}}),h();let w=null;e.watch("query",()=>{i.timeout.cancel(w),w=i.timeout(h,500);let{page:R,search:S,...N}=e.query;saveFilterPrefs(p,N),d()},!0),d()},zu=function(e,t,s,i,o){let r=Ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},Ji(e,{flags:()=>e.stateFilter,keys:e.allStates,count:N=>(e.jobs||[]).filter(v=>v._state===N).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(N=>e.stateFilter[N._state]),e.jobProgressPct=N=>N?._state==="completed"?100:N&&N.progress&&typeof N.progress=="object"&&typeof N.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(N.progress.percent))):typeof N.progress=="number"?Math.max(0,Math.min(100,Math.round(N.progress))):null;let d={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=N=>{if(N?._state==="failed")return Yi(N.failedReason||"")||"Failed";let v=N?.progress&&typeof N.progress=="object"?N.progress.status:null;return N?._state==="active"&&v?d[v]||Yi(v):"\u2014"},e.jobDuration=N=>{if(!N.processedOn)return"\u2014";let v=N.finishedOn||Date.now();return qn(v-N.processedOn)},e.metricsPoints=[],e.selectQueue=N=>{e.selectedQueue=N,p(),u()},e.setRange=N=>{e.range=N,u()};function p(){let N={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:N}).then(v=>{e.queueList=v.data.queues||[],e.jobs=v.data.jobs||[],e.selectedStats=e.queueList.find(E=>E.key===e.selectedQueue)||e.queueList[0]||null},v=>console.error(v))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(N=>{e.metricsPoints=N.data.points||[],o(w,0)},N=>console.error(N))}p(),u();let y=i(()=>{e.query.autoRefresh&&(p(),u())},15e3);e.on("dispose",()=>i.cancel(y)),e.refreshNow=function(){p(),u()};function m(N){let v=N&&N.data&&(N.data.message||N.data.error)||"Request failed";e.actionError=v,o(()=>{e.actionError=null},5e3),console.error(N)}e.actionError=null,e.removeJob=N=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,m)},e.retryJob=N=>{t.post(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,m)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(p,N=>console.error(N))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(p,N=>console.error(N))},e.togglePause=()=>{let N=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${N}`).then(p,v=>console.error(v))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(p,N=>console.error(N))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(p,N=>console.error(N))};let b=null;e.watch("query.search",()=>{r.timeout.cancel(b),b=r.timeout(p,350)}),e.expanded={},e.toggleJob=N=>{e.expanded[N.id]=!e.expanded[N.id]},e.humanTime=N=>{if(!N)return"";let v=new Date(N);return v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+v.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=N=>{if(!N)return"";var v=Math.max(0,Math.ceil((N-Date.now())/1e3));if(v<=0)return"resuming soon";var E=Math.floor(v/60),M=v%60;return"in "+(E>0?E+"m "+M+"s":M+"s")};function h(N){if(N<=0)return{ticks:[0],niceMax:1};let v=Math.pow(10,Math.floor(Math.log10(N))),E=v;N/E<2?E=v/2:N/E>5&&(E=v*2);let M=Math.ceil(N/E)*E,V=[];for(let _=0;_<=M;_+=E)V.push(_);return{ticks:V,niceMax:M}}function w(){var N=document.getElementById("q-throughput-chart");if(!N)return;var v=N.getContext("2d"),E=window.devicePixelRatio||1,M=N.parentElement.getBoundingClientRect(),V=44,_=44,G=22,te=Math.max(200,Math.round(M.width)),X=Math.max(180,Math.min(420,Math.round(M.height)||180)),O=te-V-_,U=X-G;N.width=te*E,N.height=X*E,N.style.width=te+"px",N.style.height=X+"px",v.setTransform(E,0,0,E,0,0);var C=document.body.classList.contains("dark-mode"),L="#8A857C",z=C?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",K=C?"#6FBF8A":"#2F7D4F",ie=C?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",se=C?"#F08A82":"#B42318",Y=C?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",he=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(C?"#E0A94A":"#946512"),Se=e.metricsPoints||[];if(Se.length===0){v.fillStyle=L,v.font="13px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No metrics data yet",te/2,X/2),R=null;return}var Ue=Se.map(function(we){return we.completed}),Be=Se.map(function(we){return we.failed}),Qe=Se.map(function(we){return we.avgMs});if(!Ue.some(Boolean)&&!Be.some(Boolean)){v.strokeStyle=C?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",v.beginPath(),v.moveTo(0,X-18.5),v.lineTo(te,X-18.5),v.stroke(),v.fillStyle=C?"#CFC8BD":"#4F4A42",v.font="500 14px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No jobs processed in this window",te/2,X/2-6),v.fillStyle=L,v.font="12.5px Inter, system-ui, sans-serif",v.fillText("Completed and failed jobs will chart here",te/2,X/2+16),R=null;return}var He=Se.length,et=O/(He-1||1),Re=Math.max(1,Math.max.apply(null,Ue),Math.max.apply(null,Be)),Fe=h(Re),W=Math.max.apply(null,Qe),fe=W>0?h(W):{ticks:[0],niceMax:1},de=function(we){return U-we/Fe.niceMax*(U-10)},ce=function(we){return U-we/fe.niceMax*(U-10)},me=function(we){return V+we*et};v.textAlign="right",v.textBaseline="middle",v.font="11px Inter, system-ui, sans-serif",Fe.ticks.forEach(function(we){var be=de(we);v.strokeStyle=z,v.lineWidth=1,v.beginPath(),v.moveTo(V,be),v.lineTo(te-_,be),v.stroke(),v.fillStyle=L,we!==0&&v.fillText(we>=1e3?(we/1e3).toFixed(1)+"k":String(we),V-6,be)}),W>0&&(v.textAlign="left",fe.ticks.forEach(function(we){var be=ce(we);v.fillStyle=he,we!==0&&v.fillText(qn(we),te-_+6,be)}));var Me=Se[He-1].ts,A=Se[0].ts,T=Math.max(0,(Me-A)/6e4),F=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],J=F.find(function(we){return T/we<=4})||F[F.length-1],H=function(we){return we<60?we+"m":we<1440?we/60+"h":we/1440+"d"},Z=function(we){for(var be=0,ot=1;ot
Loading GitHub info for "+m.repoId+"..."),t.get("/api/admin/repos/"+m.repoId+"/github").then(N=>{w&&(w.document.open(),w.document.write('
'+JSON.stringify(N.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+""),w.document.close())},N=>{let S=N&&N.data?JSON.stringify(N.data,null,2):String(N);w&&(w.document.body.innerHTML='
'+S+"")})};function u(m){t.get("/api/admin/users/"+m+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(m){t.get("/api/admin/users/"+m,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),w=>console.error(w))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=m=>{let w=st({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${m.repoId}/refresh`).then(N=>{N.data.status=="ready"?w.title=`${m.repoId} is refreshed.`:w.title=`Refreshing of ${m.repoId}.`},N=>{w.title=`Error during the refresh of ${m.repoId}.`,w.body=N.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{o.timeout.cancel(b),b=o.timeout(()=>{u(i.username)},500)},!0)},Bu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=N=>{if(N.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){N.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=N=>{N==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[N]="",e.query.page=1},e.chips=[];let d=()=>{let N=[];(e.query.dateFrom||e.query.dateTo)&&N.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=N};e.statusCountFor=N=>{let S=(e.statusCounts||[]).find(R=>R._id===N);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=N=>{e.query.sort===N?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=N,e.query.direction="desc"),e.query.page=1},e.sortIcon=N=>e.query.sort===N?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let N=window.prompt("Preset name:");if(!N)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(R=>R.name!==N),e.presets.push({name:N,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=N=>{Object.assign(e.query,N.query,{page:1})},e.deletePreset=N=>{e.presets=(e.presets||[]).filter(S=>S.name!==N.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.removeConference=N=>{confirm("Remove conference "+N.conferenceID+"?")&&t.delete("/api/admin/conferences/"+N.conferenceID).then(()=>m(),S=>console.error(S))},e.exportCsv=()=>{let N=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));N.set("format","csv"),N.set("limit","10000"),window.open("/api/admin/conferences?"+N.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(N=>{e.total=N.data.total,e.totalPage=Math.ceil(N.data.total/e.query.limit),e.conferences=N.data.results,e.statusCounts=N.data.statusCounts||[]},N=>{e.fetchError=N&&N.data&&N.data.error||"Failed to load conferences",console.error(N)})}Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:N=>e.statusCountFor(N),onChange:()=>{e.query.page=1}}),m();let w=null;e.watch("query",()=>{i.timeout.cancel(w),w=i.timeout(m,500);let{page:N,search:S,...R}=e.query;saveFilterPrefs(p,R),d()},!0),d()},zu=function(e,t,s,i,o){let r=Ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},Ji(e,{flags:()=>e.stateFilter,keys:e.allStates,count:R=>(e.jobs||[]).filter(v=>v._state===R).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(R=>e.stateFilter[R._state]),e.jobProgressPct=R=>R?._state==="completed"?100:R&&R.progress&&typeof R.progress=="object"&&typeof R.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(R.progress.percent))):typeof R.progress=="number"?Math.max(0,Math.min(100,Math.round(R.progress))):null;let d={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=R=>{if(R?._state==="failed")return Yi(R.failedReason||"")||"Failed";let v=R?.progress&&typeof R.progress=="object"?R.progress.status:null;return R?._state==="active"&&v?d[v]||Yi(v):"\u2014"},e.jobDuration=R=>{if(!R.processedOn)return"\u2014";let v=R.finishedOn||Date.now();return qn(v-R.processedOn)},e.metricsPoints=[],e.selectQueue=R=>{e.selectedQueue=R,p(),u()},e.setRange=R=>{e.range=R,u()};function p(){let R={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:R}).then(v=>{e.queueList=v.data.queues||[],e.jobs=v.data.jobs||[],e.selectedStats=e.queueList.find(E=>E.key===e.selectedQueue)||e.queueList[0]||null},v=>console.error(v))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(R=>{e.metricsPoints=R.data.points||[],o(w,0)},R=>console.error(R))}p(),u();let y=i(()=>{e.query.autoRefresh&&(p(),u())},15e3);e.on("dispose",()=>i.cancel(y)),e.refreshNow=function(){p(),u()};function h(R){let v=R&&R.data&&(R.data.message||R.data.error)||"Request failed";e.actionError=v,o(()=>{e.actionError=null},5e3),console.error(R)}e.actionError=null,e.removeJob=R=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${R.id}`).then(p,h)},e.retryJob=R=>{t.post(`/api/admin/queue/${e.selectedQueue}/${R.id}`).then(p,h)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(p,R=>console.error(R))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(p,R=>console.error(R))},e.togglePause=()=>{let R=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${R}`).then(p,v=>console.error(v))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(p,R=>console.error(R))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(p,R=>console.error(R))};let b=null;e.watch("query.search",()=>{r.timeout.cancel(b),b=r.timeout(p,350)}),e.expanded={},e.toggleJob=R=>{e.expanded[R.id]=!e.expanded[R.id]},e.humanTime=R=>{if(!R)return"";let v=new Date(R);return v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+v.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=R=>{if(!R)return"";var v=Math.max(0,Math.ceil((R-Date.now())/1e3));if(v<=0)return"resuming soon";var E=Math.floor(v/60),D=v%60;return"in "+(E>0?E+"m "+D+"s":D+"s")};function m(R){if(R<=0)return{ticks:[0],niceMax:1};let v=Math.pow(10,Math.floor(Math.log10(R))),E=v;R/E<2?E=v/2:R/E>5&&(E=v*2);let D=Math.ceil(R/E)*E,V=[];for(let _=0;_<=D;_+=E)V.push(_);return{ticks:V,niceMax:D}}function w(){var R=document.getElementById("q-throughput-chart");if(!R)return;var v=R.getContext("2d"),E=window.devicePixelRatio||1,D=R.parentElement.getBoundingClientRect(),V=44,_=44,z=22,x=Math.max(200,Math.round(D.width)),X=Math.max(180,Math.min(420,Math.round(D.height)||180)),I=x-V-_,U=X-z;R.width=x*E,R.height=X*E,R.style.width=x+"px",R.style.height=X+"px",v.setTransform(E,0,0,E,0,0);var C=document.body.classList.contains("dark-mode"),L="#8A857C",H=C?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",K=C?"#6FBF8A":"#2F7D4F",ie=C?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",se=C?"#F08A82":"#B42318",Y=C?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",me=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(C?"#E0A94A":"#946512"),Se=e.metricsPoints||[];if(Se.length===0){v.fillStyle=L,v.font="13px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No metrics data yet",x/2,X/2),N=null;return}var Ue=Se.map(function(we){return we.completed}),Be=Se.map(function(we){return we.failed}),Qe=Se.map(function(we){return we.avgMs});if(!Ue.some(Boolean)&&!Be.some(Boolean)){v.strokeStyle=C?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",v.beginPath(),v.moveTo(0,X-18.5),v.lineTo(x,X-18.5),v.stroke(),v.fillStyle=C?"#CFC8BD":"#4F4A42",v.font="500 14px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No jobs processed in this window",x/2,X/2-6),v.fillStyle=L,v.font="12.5px Inter, system-ui, sans-serif",v.fillText("Completed and failed jobs will chart here",x/2,X/2+16),N=null;return}var He=Se.length,et=I/(He-1||1),Re=Math.max(1,Math.max.apply(null,Ue),Math.max.apply(null,Be)),Fe=m(Re),W=Math.max.apply(null,Qe),fe=W>0?m(W):{ticks:[0],niceMax:1},de=function(we){return U-we/Fe.niceMax*(U-10)},ce=function(we){return U-we/fe.niceMax*(U-10)},ve=function(we){return V+we*et};v.textAlign="right",v.textBaseline="middle",v.font="11px Inter, system-ui, sans-serif",Fe.ticks.forEach(function(we){var be=de(we);v.strokeStyle=H,v.lineWidth=1,v.beginPath(),v.moveTo(V,be),v.lineTo(x-_,be),v.stroke(),v.fillStyle=L,we!==0&&v.fillText(we>=1e3?(we/1e3).toFixed(1)+"k":String(we),V-6,be)}),W>0&&(v.textAlign="left",fe.ticks.forEach(function(we){var be=ce(we);v.fillStyle=me,we!==0&&v.fillText(qn(we),x-_+6,be)}));var Me=Se[He-1].ts,A=Se[0].ts,O=Math.max(0,(Me-A)/6e4),F=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],J=F.find(function(we){return O/we<=4})||F[F.length-1],j=function(we){return we<60?we+"m":we<1440?we/60+"h":we/1440+"d"},ee=function(we){for(var be=0,ot=1;ot
Manage how GitHub shares your code. Your anonymizations and URLs stay the same.
Sign in to create and manage your anonymizations.
Connect through the GitHub App with read-only repository access.
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",Ey,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[g("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",Sy,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function Qc(e,t){let s=Xe("partial-view");return a(),l(q,null,[t[0]||(t[0]=Ee('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.
Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.
Manage how GitHub shares your code. Your anonymizations and URLs stay the same.
Sign in to create and manage your anonymizations.
Connect through the GitHub App with read-only repository access.
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",Hb,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[g("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",jb,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Ie(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function xc(e,t){let s=Xe("partial-view");return a(),l(q,null,[t[0]||(t[0]=Ce('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.
Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.
Fill in the details \u2014 it only takes a minute.
Take ownership of an existing anonymized repository so it appears on your dashboard.
',3)),n("div",U8,[t[5]||(t[5]=n("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),D((a(),l("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=ae(o=>e.submitForm(o,()=>{e.claim()}),["prevent"]))},[n("div",B8,[t[1]||(t[1]=n("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",placeholder:"https://github.com/owner/repository",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoUrl=o},value:e.repoUrl,form:"claimForm",options:{}}]]),D(n("div",z8," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Q,e.claimForm?.repoUrl?.errors?.not_found]])]),n("div",H8,[t[2]||(t[2]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",placeholder:"e.g. my-paper-7F2A","aria-describedby":"idHelp",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoId=o},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=n("small",{id:"idHelp",class:"form-text text-muted"},[g("The ID is the last part of the anonymized URL: "),n("code",null,"anonymous.4open.science/r/Fill in the details \u2014 it only takes a minute.
Take ownership of an existing anonymized repository so it appears on your dashboard.
',3)),n("div",i6,[t[5]||(t[5]=n("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),T((a(),l("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=ae(o=>e.submitForm(o,()=>{e.claim()}),["prevent"]))},[n("div",r6,[t[1]||(t[1]=n("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",placeholder:"https://github.com/owner/repository",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoUrl=o},value:e.repoUrl,form:"claimForm",options:{}}]]),T(n("div",a6," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Z,e.claimForm?.repoUrl?.errors?.not_found]])]),n("div",l6,[t[2]||(t[2]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",placeholder:"e.g. my-paper-7F2A","aria-describedby":"idHelp",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoId=o},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=n("small",{id:"idHelp",class:"form-text text-muted"},[g("The ID is the last part of the anonymized URL: "),n("code",null,"anonymous.4open.science/r/1# Training loop for DeepLearnUtils + label names the service and the tooltip says who to contact. `),n("li",{class:P(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug ")],-1)])],2),n("li",{class:P(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),g("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",ZU,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",xU,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",e7,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),g(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",t7,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ae(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",n7,[n("a",s7,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,o7)):f("v-if",!0),n("span",i7,c(e.user?.username),1)]),n("div",r7,[n("h6",a7,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ce('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource code',6)),e.headerShowSupport?(a(),l("a",l7,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,d7)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=ae(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ae(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),T(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,u7),[[rt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p",c7,c(e.emailPromptError),1)):f("v-if",!0),n("div",p7,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=s=>e.respondToEmailPrompt("later"))},"Remind me later",8,f7),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[6]||(t[6]=s=>e.respondToEmailPrompt("never"))},"Never",8,m7),n("button",{type:"submit",class:"btn btn-ink",disabled:e.emailPromptBusy},c(e.emailPromptBusy?"Saving\u2026":"Save"),9,h7)])],32)],32)):f("v-if",!0)],64)}var g7={class:"paper-landing"},v7={class:"paper-hero"},y7={class:"paper-hero-copy"},b7={class:"paper-cta-row"},w7={key:0,href:"/signin",target:"_self",class:"btn-hero"},k7={key:1,href:"/anonymize",class:"btn-hero"},C7={class:"paper-stats-meta"},E7={key:0,class:"paper-stats-meta-left"},S7={key:0,class:"paper-stats-grid"},N7={class:"paper-stat-label"},R7={key:0,class:"paper-stat-delta"},P7={class:"demo paper-wrap","aria-label":"Try redaction"},D7={class:"demo-terms"},A7={class:"demo-panes"},T7={class:"pane"},O7={class:"demo-input-wrap"},I7={class:"pane-body demo-backdrop","aria-hidden":"true"},M7={key:0,class:"demo-match"},V7={class:"pane pane-after"},q7={class:"pane-header"},_7={class:"pane-url"},L7={class:"meta-redact"},$7={class:"pane-body demo-output","aria-live":"polite"},F7=["title"],U7={class:"paper-features paper-wrap","aria-label":"Product features"},B7={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},z7=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],H7={class:"paper-eyebrow"},j7={class:"pf-num"},G7={class:"pf-name"},W7={class:"paper-feature-title"},K7={key:0,class:"serif-hy"},Y7={class:"paper-feature-more"},X7={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},J7={key:0,class:"serif-hy"},Q7=["href","target"],Z7={class:"paper-features-stage"},x7=["id","aria-labelledby"],e9={class:"paper-frame"},t9={class:"paper-frame-bar","aria-hidden":"true"},n9={class:"url"},s9=["aria-label"],o9={key:0,class:"fm-form"},i9={key:1,class:"fm-viewer"},r9={key:2,class:"fm-dash"};function vp(e,t){let s=Xe("partial-view");return a(),l("div",g7,[f(" Hero: copy on the left, the product on the right "),n("section",v7,[n("div",y7,[t[5]||(t[5]=n("div",{class:"paper-eyebrow"},"For double-anonymous peer review",-1)),t[6]||(t[6]=n("h1",{class:"hero-title"},[g(" Share the code,"),n("br"),n("span",{class:"accent"},"not the author.")],-1)),t[7]||(t[7]=n("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist. It redacts the terms you choose in text files, so reviewers can browse your artifact through an anonymous link. ",-1)),n("div",b7,[e.user?f("v-if",!0):(a(),l("a",w7,[...t[3]||(t[3]=[n("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),g("Sign in with GitHub ",-1)])])),e.user?(a(),l("a",k7," Anonymize a repository \u2192 ")):f("v-if",!0),t[4]||(t[4]=n("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[8]||(t[8]=n("ul",{class:"paper-reassure"},[n("li",null,"Free, open source"),n("li",null,"Read-only access"),n("li",null,"Set an expiry date")],-1)),t[9]||(t[9]=n("p",{class:"paper-proof-mobile"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),t[10]||(t[10]=n("div",{class:"paper-hero-shot"},[n("div",{class:"paper-frame"},[n("div",{class:"paper-frame-bar","aria-hidden":"true"},[n("span",{class:"dots"},[n("i"),n("i"),n("i")]),n("span",{class:"url"},"anonymous.4open.science/r/paper-7f2a")]),n("div",{class:"hero-mock",role:"img","aria-label":"A reviewer browsing an anonymized repository: the author, affiliation, and email in the README are replaced by anonymous terms"},[n("div",{class:"hero-mock-tree","aria-hidden":"true"},[n("div",{class:"hero-mock-tree-title"},"Files"),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("data")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("experiments")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("src")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("LICENSE")]),n("div",{class:"hero-mock-row is-active"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("README.md")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("requirements.txt")])]),n("div",{class:"hero-mock-doc","aria-hidden":"true"},[n("div",{class:"hero-mock-doc-bar"},[n("strong",null,"README.md"),n("span",{class:"hero-mock-count"},"3 redacted")]),n("div",{class:"hero-mock-doc-body"},[n("div",{class:"hero-mock-h1"},"DeepLearnUtils"),n("p",null,[g("Developed by "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 1"},[n("i",null,"1")]),g(" at "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 2"},[n("i",null,"2")]),g(".")]),n("p",{class:"hm-opt"},"Utilities for reproducing the paper\u2019s experiments."),n("div",{class:"hero-mock-h2 hm-opt"},"Quick start"),n("pre",{class:"hm-opt"},`pip install -r requirements.txt +python experiments/run.py`),n("p",null,[g("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:P(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",C7,[e.statsEmpty()?f("v-if",!0):(a(),l("div",E7,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),g(),n("span",null,[g("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",S7,[(a(!0),l(q,null,Q(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:P(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",N7,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",R7," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[g("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",P7,[n("div",D7,[t[13]||(t[13]=n("label",{for:"demo-terms"},[g("Terms to redact "),n("span",null,[g("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),T(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=kt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[rt,e.demoTerms]])]),n("div",A7,[n("div",T7,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[g("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",O7,[n("div",I7,[(a(!0),l(q,null,Q(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("mark",M7,c(i.original),1)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),T(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[rt,e.demoText]])])]),n("div",V7,[n("div",q7,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",_7,[n("span",L7,c(e.demoCount())+" redacted",1)])]),n("div",$7,[(a(!0),l(q,null,Q(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,F7)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",U7,[n("div",B7,[(a(!0),l(q,null,Q(e.features,(i,o)=>(a(),l("div",{class:P(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",H7,[n("span",j7,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",G7,c(i?.eyebrow),1)]),n("span",W7,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",K7,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,z7),n("div",Y7,[n("span",X7,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",J7,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,Q7)])],2))),128))]),n("div",Z7,[(a(!0),l(q,null,Q(e.features,(i,o)=>T((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",e9,[n("div",t9,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",n9,c(i?.url),1)]),n("div",{class:P(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",o9,[...t[19]||(t[19]=[Ce('GitHub repositorygithub.com/jane-smith/DeepLearnUtilsTerms to redactJane SmithMIT CSAILjane.smith@mit.edu+ Add termReviewers can seeImagesPDFsLinksNotebooksExpiresMar 31, 2027anonymous.4open.science/r/paper-7f2aAnonymize repository',6)])])):i?.key==="review"?(a(),l("div",i9,[...t[20]||(t[20]=[Ce(`datasrctrain.pyREADME.mdLICENSE`,2)])])):(a(),l("div",BU,[...t[21]||(t[21]=[Ee('1# Training loop for DeepLearnUtils 2# Author: XXXX-1, XXXX-2 3import torch 4from utils import load_config @@ -55,18 +55,18 @@ python experiments/run.py`),n("p",null,[g("Contact: "),n("span",{class:"redact", 7 model = build_model(config) 8 for epoch in range(config.epochs): 9 loss = step(model) -10 log("epoch %d: %.3f", epoch, loss)ProjectStatusViewsExpiresDeepLearnUtilspaper-7f2a \xB7 ICSE 2027Ready41Mar 31, 2027vision-bench#212pull request \xB7 FSE 2027Ready12Nevergraph-repairgr-91abUpdating5Jan 5, 2027JarSiftOOPSLA 2025Expired72Sep 28, 2026',5)])]))],10,LU)])],8,VU)),[[Q,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee(' Read the full FAQ \u2192Before you sign inThe questions that come up most.
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.
',2)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var zU={class:"paper-empty"},HU={class:"paper-empty-inner"},jU={key:0,class:"paper-eyebrow"},GU={key:1,class:"paper-eyebrow"},WU={key:2,class:"paper-empty-title"},KU=["textContent"];function gp(e,t){return a(),l("div",zU,[n("div",HU,[e.error?f("v-if",!0):(a(),l("div",jU,"Working")),e.error?(a(),l("div",GU,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",WU,[...t[0]||(t[0]=[g(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,KU)):f("v-if",!0)])])}var YU={class:"container paper-page paper-settings"},XU={class:"paper-crumbs"},JU={class:"here"},QU={class:"paper-page-title"},ZU={class:"paper-settings-body"},xU={class:"paper-settings-toc"},e7={href:"#conf-billing"},t7={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},n7={id:"conf-basics",class:"paper-settings-section"},s7={class:"form-group"},o7={class:"invalid-feedback"},i7={class:"invalid-feedback"},r7={class:"form-group"},a7={class:"invalid-feedback"},l7={class:"form-group"},d7={class:"invalid-feedback"},u7={class:"invalid-feedback"},c7={id:"conf-window",class:"paper-settings-section"},p7={class:"form-grid-2"},f7={class:"form-group"},h7={class:"invalid-feedback"},m7={class:"invalid-feedback"},g7={class:"form-group"},v7={class:"invalid-feedback"},y7={class:"invalid-feedback"},b7={id:"conf-rendering",class:"paper-settings-section"},w7={class:"form-check"},k7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},C7={class:"form-check"},E7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},S7={class:"form-check"},N7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},R7={class:"form-check"},P7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},A7={id:"conf-features",class:"paper-settings-section"},D7={class:"form-check"},T7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},O7={class:"form-check"},I7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},M7={id:"conf-plan",class:"paper-settings-section"},V7={key:0,class:"paper-section-copy"},q7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},_7=["value","checked","onChange"],$7={class:"conference-tier-head"},L7={key:0,class:"conference-tier-pill"},F7={class:"conference-tier-who"},U7={key:0,class:"conference-tier-price"},B7={class:"conference-tier-size"},z7={key:1,class:"conference-tier-per"},H7={key:2,class:"paper-plan-grid"},j7=["value"],G7=["textContent"],W7={class:"paper-plan-price"},K7=["innerHTML"],Y7={key:3,class:"settings-notice",role:"status"},X7={key:0,id:"conf-billing",class:"paper-settings-section"},J7={class:"form-group"},Q7={class:"form-group"},Z7={class:"form-group"},x7={class:"form-group"},e9={class:"form-grid-3"},t9={class:"form-group"},n9={class:"form-group"},s9={class:"form-group"},o9={class:"form-group"},i9={class:"paper-settings-footer"},r9=["textContent"],a9=["textContent"],l9=["disabled"];function vp(e,t){let s=Ae("paper-scrollspy"),i=Ae("field"),o=Ae("form");return a(),l("div",YU,[n("div",XU,[t[1]||(t[1]=n("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=g(" \xA0/\xA0 ",-1)),t[3]||(t[3]=n("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=g(" \xA0/\xA0 ",-1)),n("span",JU,c(e.editionMode?"Edit":"New"),1)]),n("h1",QU,[g(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=n("em",null,"conference",-1))]),t[44]||(t[44]=n("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue. One payment hosts every submission, so authors don't pay during the review window. ",-1)),n("div",ZU,[D((a(),l("aside",xU,[t[7]||(t[7]=n("div",{class:"paper-settings-toc-head"},"On this page",-1)),n("nav",null,[t[6]||(t[6]=Ee('BasicsReview windowRendering defaultsFeaturesPlan',5)),D(n("a",e7,"Billing",512),[[Q,e.plan?.pricePerRepo>0]])])])),[[s]]),D((a(),l("form",t7,[n("section",n7,[t[12]||(t[12]=n("div",{class:"paper-section-eyebrow"},"Basics",-1)),n("div",s7,[t[8]||(t[8]=n("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[i,{state:e.viewState,set:r=>{e.options.name=r},value:e.options?.name,form:"conference",options:{}}]]),D(n("div",o7," The name of the conference is invalid. ",512),[[Q,e.conference?.name?.errors?.invalid]]),D(n("div",i7," The name of the conference is required. ",512),[[Q,e.conference?.name?.errors?.required]])]),n("div",r7,[t[9]||(t[9]=n("label",{class:"paper-field-label",for:"url"},"Website",-1)),D(n("input",{type:"url",class:P(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.url=r},value:e.options?.url,form:"conference",options:{}}]]),D(n("div",a7," The url of the conference is invalid. ",512),[[Q,e.conference?.url?.errors?.url]])]),n("div",l7,[t[10]||(t[10]=n("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[i,{state:e.viewState,set:r=>{e.options.conferenceID=r},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=n("small",{class:"form-text text-muted"},[g("3\u201310 characters, letters, numbers, "),n("code",null,"-"),g(" and "),n("code",null,"_"),g(". Authors reference this when they anonymize.")],-1)),D(n("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[Q,e.conference?.conferenceID?.errors?.used]]),D(n("div",d7," The conference ID is required. ",512),[[Q,e.conference?.conferenceID?.errors?.required]]),D(n("div",u7," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[Q,e.conference?.conferenceID?.errors?.pattern]])])]),n("section",c7,[t[17]||(t[17]=n("div",{class:"paper-section-eyebrow"},"Review window",-1)),n("div",p7,[n("div",f7,[t[13]||(t[13]=n("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),D(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.startDate=r},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=n("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),D(n("div",h7," Start date is required. ",512),[[Q,e.conference?.startDate?.errors?.required]]),D(n("div",m7," Start date must be before end date. ",512),[[Q,e.conference?.startDate?.errors?.invalid]])]),n("div",g7,[t[15]||(t[15]=n("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),D(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.endDate=r},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=n("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),D(n("div",v7," End date is required. ",512),[[Q,e.conference?.endDate?.errors?.required]]),D(n("div",y7," End date is invalid. ",512),[[Q,e.conference?.endDate?.errors?.invalid]])])])]),n("section",b7,[t[26]||(t[26]=n("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),n("div",w7,[D(n("input",k7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.link=r},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=n("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),n("div",C7,[D(n("input",E7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.image=r},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=n("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=n("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),n("div",S7,[D(n("input",N7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.pdf=r},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=n("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),n("div",R7,[D(n("input",P7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.notebook=r},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[25]||(t[25]=n("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])]),n("section",A7,[t[31]||(t[31]=n("div",{class:"paper-section-eyebrow"},"Features",-1)),n("div",D7,[D(n("input",T7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.update=r},value:e.options?.options?.update,form:"conference",options:{}}]]),t[27]||(t[27]=n("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[28]||(t[28]=n("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),n("div",O7,[D(n("input",I7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.page=r},value:e.options?.options?.page,form:"conference",options:{}}]]),t[29]||(t[29]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[30]||(t[30]=n("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),n("section",M7,[t[35]||(t[35]=n("div",{class:"paper-section-eyebrow"},"Plan",-1)),e.editionMode?(a(),l("p",V7,c(e.conferencePlanName(e.options?.plan?.planID))+". The plan and review dates can't change after creation.",1)):e.conferenceTiers().length?(a(),l(q,{key:1},[t[33]||(t[33]=n("p",{class:"paper-section-copy"},"Pick the package that fits the number of submissions you expect. One payment hosts every submission, so authors don't pay.",-1)),n("div",q7,[(a(!0),l(q,null,x(e.conferenceTiers(),r=>(a(),l("label",{class:P(["conference-tier",{"is-selected":e.options?.plan?.planID===r.id}]),key:r.id},[n("input",{type:"radio",name:"planPicker",value:r.id,checked:e.options?.plan?.planID===r.id,onChange:d=>e.options.plan.planID=r.id},null,40,_7),n("span",$7,[n("strong",null,c(r.name),1),r.id==="conference"&&e.conferenceTiers().length>1?(a(),l("span",L7,"Most common")):f("v-if",!0)]),n("span",F7,c(e.conferenceAudience(r.id)),1),r.amount!=null?(a(),l("span",U7,[n("strong",null,c(e.conferenceAmount(r)),1),t[32]||(t[32]=g(" once",-1))])):f("v-if",!0),n("span",B7,"Up to "+c(r.repositories)+" papers \xB7 "+c(e.conferenceBytes(r.storage)),1),r.amount!=null&&r.repositories?(a(),l("span",z7,"About "+c(e.conferenceAmount(r,r.amount/r.repositories))+" per paper",1)):f("v-if",!0)],2))),128))]),t[34]||(t[34]=Ee(' Ready for review?
Create an anonymous mirror in a couple of minutes. Reviewers just open the link.
Every package includes
- A review window of up to 180 days
- Automatic updates for every submission
- Links stay online until the review window ends
- A dashboard of every submission for chairs
Nothing renews \xB7 Tax shown at checkout \xB7 Expecting more submissions? Email tdurieux@anonymous.4open.science
Create the conference, then pay from its page. Authors can submit once the payment is confirmed.
',2))],64)):e.plans.length?(a(),l("div",H7,[(a(!0),l(q,null,x(e.plans,r=>(a(),l("label",{class:P(["paper-plan-card",{selected:e.options?.plan?.planID==r?.id}]),key:r.id},[D(n("input",{type:"radio",name:"planPicker",value:r?.id},null,8,j7),[[i,{state:e.viewState,set:d=>{e.options.plan.planID=d},value:e.options?.plan?.planID,form:"conference",options:{}}]]),n("div",{class:"paper-plan-head",textContent:c(r?.name)},null,8,G7),n("div",W7,c(r.pricePerRepo>0?e.fmt?.number(r.pricePerRepo,2)+" \u20AC per repository":"Free"),1),n("div",{class:"paper-plan-desc",innerHTML:e.sanitize(r?.description)},null,8,K7)],2))),128))])):e.plansLoaded?(a(),l("p",Y7,"New conferences are unavailable right now. Please try again later.")):f("v-if",!0)]),e.plan?.pricePerRepo>0?(a(),l("section",X7,[t[43]||(t[43]=n("div",{class:"paper-section-eyebrow"},"Billing",-1)),n("div",J7,[t[36]||(t[36]=n("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.name=r},value:e.options?.billing?.name,form:"conference",options:{}}]])]),n("div",Q7,[t[37]||(t[37]=n("label",{class:"paper-field-label",for:"email"},"Email",-1)),D(n("input",{type:"email",class:P(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.email=r},value:e.options?.billing?.email,form:"conference",options:{}}]])]),n("div",Z7,[t[38]||(t[38]=n("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address=r},value:e.options?.billing?.address,form:"conference",options:{}}]])]),n("div",x7,[D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address2=r},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),n("div",e9,[n("div",t9,[t[39]||(t[39]=n("label",{class:"paper-field-label",for:"city"},"City",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.city=r},value:e.options?.billing?.city,form:"conference",options:{}}]])]),n("div",n9,[t[40]||(t[40]=n("label",{class:"paper-field-label",for:"country"},"Country",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.country=r},value:e.options?.billing?.country,form:"conference",options:{}}]])]),n("div",s9,[t[41]||(t[41]=n("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.zip=r},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),n("div",o9,[t[42]||(t[42]=n("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.vat=r},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):f("v-if",!0),n("div",i9,[e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,r9)):f("v-if",!0),e.message?(a(),l("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,a9)):f("v-if",!0),n("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=ae(r=>e.submitForm(r,()=>{e.submit(r)}),["prevent"]))},c(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,l9)])])),[[o,e.viewState]])])])}var d9={key:0,class:"dir-card","aria-label":"Repository files"},u9=["onClick"],c9={class:"dir-name"},p9=["href"],f9={class:"dir-name"},h9={class:"dir-meta"},m9={class:"file-card-head"},g9={class:"file-card-path"},v9={class:"breadcrumb paths","aria-label":"Path"},y9={class:"breadcrumb-item breadcrumb-root"},b9=["href","title","textContent"],w9=["aria-current"],k9=["aria-label"],C9={class:"mobile-sub ms"},E9=["title"],S9={class:"ms-item"},N9={key:1,class:"ms-item"},R9={key:2,class:"ms-item"},P9=["aria-label","title"],A9={class:"ui-icon","aria-hidden":"true"},D9=["href"],T9={key:0,class:"file-card-meta"},O9=["title"],I9={class:"meta-extra"},M9={key:1,class:"file-card-meta"},V9=["title"],q9={class:"file-card-actions"},_9={key:0,class:"csv-toggle seg-filter",role:"radiogroup","aria-label":"CSV view"},$9=["aria-checked"],L9=["aria-checked"],F9={key:1,class:"symbols"},U9=["aria-expanded"],B9={key:0,class:"symbols-menu",role:"menu"},z9={class:"symbols-head"},H9=["onClick"],j9={class:"symbols-name"},G9={class:"symbols-line"},W9=["title"],K9={key:3,class:"tb-view",role:"group","aria-label":"View tools"},Y9=["title"],X9=["aria-pressed"],J9=["title"],Q9={key:4,class:"tb-file",role:"group","aria-label":"File actions"},Z9=["target","title","href"],x9=["aria-label","title"],eB={class:"ui-icon","aria-hidden":"true"},tB=["href"],nB=["target","href","download"],sB=["aria-label"],oB={class:"ui-icon","aria-hidden":"true"},iB=["href"],rB={key:6,class:"tb-toc-m"},aB=["aria-expanded"],lB=["onClick"],dB={class:"tb-more"},uB=["aria-expanded"],cB={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},pB={key:0,class:"tb-menu-note"},fB={key:1,class:"tb-menu-note tb-menu-meta"},hB={key:2,class:"tb-menu-sep"},mB={key:4,class:"tb-menu-sep"},gB=["aria-checked"],vB={key:0,class:"tb-menu-check"},yB={class:"ui-icon","aria-hidden":"true"},bB=["href"],wB={key:9,class:"tb-menu-sep"},kB=["target","href"],CB=["target","href"],EB=["target","href","download"],SB=["target","href"],NB=["href"],RB=["target","href"],PB=["placeholder","aria-invalid"],AB=["aria-label"],DB={class:"csv-table"},TB=["aria-label"],OB={class:"csv-rownum"},IB=["aria-label"],MB={key:1,class:"file-card-body"},VB={key:2,class:"md-find-bar",role:"search"},qB=["value"],_B={class:"md-find-nav"},$B=["disabled"],LB=["disabled"],FB={class:"md-find-count","aria-live":"polite"},UB=["aria-pressed"],BB={key:3,class:"reading-layout"},zB=["innerHTML"],HB={key:0,class:"readme-toc","aria-label":"On this page"},jB={class:"toc-rail"},GB=["href","onClick"],WB={class:"file-card-head"},KB={class:"file-card-path"},YB={class:"breadcrumb paths","aria-label":"Path"},XB={class:"breadcrumb-item breadcrumb-root"},JB=["href","title","textContent"],QB=["aria-current"],ZB=["aria-label"],xB={class:"mobile-sub ms"},ez=["title"],tz={class:"ms-item"},nz={key:1,class:"ms-item"},sz={key:2,class:"ms-item"},oz=["aria-label","title"],iz={class:"ui-icon","aria-hidden":"true"},rz=["href"],az={class:"file-card-meta"},lz=["title"],dz={class:"file-card-actions"},uz={key:0,class:"file-card-state",title:"Files over the size limit can't be previewed or downloaded from this link"},cz={key:1,class:"tb-file",role:"group","aria-label":"File actions"},pz=["target","title","href"],fz=["target","href","download"],hz={class:"tb-more"},mz=["aria-expanded"],gz={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},vz={key:0,class:"tb-menu-note"},yz={key:1,class:"tb-menu-sep"},bz=["target","href"],wz=["target","href","download"],kz=["target","href"],Cz={key:0,class:"media-stage"},Ez=["src","alt"],Sz={key:1,class:"media-stage"},Nz=["src"],Rz={key:2,class:"media-stage is-audio"},Pz=["src"],Az={key:4,class:"notebook-body"},Dz={key:5,class:"file-state"},Tz={class:"file-state-msg"},Oz={key:0,class:"file-state-actions"},Iz=["target","href","download"],Mz={key:6,class:"file-state",role:"alert"},Vz={class:"file-state-title"},qz={key:0,class:"file-state-msg"},_z={key:1,class:"file-state-msg"},$z={key:2,class:"file-state-actions"},Lz=["href"],Fz={key:7,class:"file-state"},Uz={key:4,class:"file-error container d-flex h-100"},Bz={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},zz={class:"paper-error-msg"},Hz={key:5,class:"file-error container d-flex h-100"},jz={class:"viewer-error paper-error-card file-error-card m-auto",role:"alert","aria-labelledby":"viewer-error-title"},Gz={id:"viewer-error-title",class:"paper-empty-title"},Wz={class:"paper-error-actions"},Kz={key:0,href:"/",class:"btn btn-sm"},Yz={key:1,href:"/faq",class:"btn btn-sm"},Xz={key:2,class:"btn btn-outline-ink",href:"/dashboard"},Jz={key:6,class:"viewer-loading","aria-busy":"true"},Qz={class:"viewer-loading-status",role:"status","aria-live":"polite"},Zz={class:"viewer-loading-name sr-only"},xz={key:0},eH={class:"viewer-loading-lines","aria-hidden":"true"},tH={key:7,class:"file-error container d-flex h-100"},nH={key:8,class:"file-error container d-flex h-100"};function yp(e,t){let s=Xe("html-doc"),i=Xe("pdfviewer"),o=Xe("notebook"),r=Ae("code-editor");return a(),l(q,null,[e.sidebarHidden&&e.type=="html"&&e.content!=null&&e.paths?.length===1&&/^readme/i.test(e.paths[0]||"")&&e.files?.length?(a(),l("section",d9,[t[46]||(t[46]=n("header",{class:"dir-card-head"},[n("span",{class:"dir-card-title"},"Files"),n("span",{class:"dir-card-sub"},"Snapshot of the repository at review time")],-1)),n("ul",{class:P(["dir-list",{"is-expanded":e.dirExpanded}])},[(a(!0),l(q,null,x(e.rootEntries(),d=>(a(),l("li",{key:d.name},[d.size==null?(a(),l("button",{key:0,type:"button",class:"dir-row",onClick:p=>e.revealFolder(d.name)},[t[43]||(t[43]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})],-1)),n("span",c9,c(d.name),1),t[44]||(t[44]=n("span",{class:"dir-meta"},"Folder",-1))],8,u9)):(a(),l("a",{key:1,class:P(["dir-row",{"is-current":d.name===e.paths[0]}]),href:e.safeUrl("/r/"+e.repoId+"/"+encodeURIComponent(d.name))},[t[45]||(t[45]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})],-1)),n("span",f9,c(d.name),1),n("span",h9,c(e.formatSize(d.size)),1)],10,p9))]))),128))],2),!e.dirExpanded&&e.files.length>8?(a(),l("button",{key:0,type:"button",class:"dir-more",onClick:t[0]||(t[0]=d=>e.dirExpanded=!0)},"Show all "+c(e.files.length)+" items",1)):f("v-if",!0)])):f("v-if",!0),(e.type=="text"||e.type=="code"||e.type=="html"||e.type=="html-doc"&&e.showSource)&&e.content!=null?(a(),l("section",{key:1,class:P(["file-card",{"is-code":e.type!="html","no-wrap":!e.wrapLines}])},[n("header",m9,[n("div",g9,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[1]||(t[1]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",v9,[n("li",y9,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,b9)]),(a(!0),l(q,null,x(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,k9)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,w9))),256))]),n("span",C9,[e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[48]||(t[48]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,E9)):f("v-if",!0),n("span",S9,c(e.type=="html"?"Markdown":e.languageName||"Text"),1),e.fileSize(e.filePath)!=null?(a(),l("span",N9,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0),e.type!="html"&&typeof e.content=="string"?(a(),l("span",R9,c(e.fmt?.number(e.content.split(` -`).length))+" lines",1)):f("v-if",!0)]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",A9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,D9)]))],8,P9),[[Q,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",T9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,O9),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",I9,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.fmt?.number(e.content.split(` -`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",M9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,V9),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(q,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",q9,[e.isCsv()?(a(),l("div",_9,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,$9),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,L9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",F9,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,U9),e.symbolsOpen?(a(),l("div",B9,[n("div",z9,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(q,null,x(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:p=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",j9,c(d.name),1),n("span",G9,c(d.line),1)],8,H9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,W9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",K9,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,Y9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,X9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,J9)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",Q9,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,Z9),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",eB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,tB)]))],8,x9)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,nB)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",oB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,iB)]))],8,sB)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(a(),l("div",rB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[13]||(t[13]=ae(d=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,aB),e.tocOpen?(a(),l("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[15]||(t[15]=d=>e.tocOpen=!1)},[t[64]||(t[64]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button",{type:"button",role:"menuitem",class:P(["tb-menu-toc","lvl-2",{"is-active":!e.activeHeading}]),onClick:t[14]||(t[14]=d=>e.scrollToHeading(null))},"Introduction",2),(a(!0),l(q,null,x(e.readmeToc(),d=>(a(),l("button",{type:"button",role:"menuitem",key:"m-"+d.id,class:P(["tb-menu-toc","lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:p=>e.scrollToHeading(d.id)},c(d.text),11,lB))),128))])):f("v-if",!0)])):f("v-if",!0),n("div",dB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[16]||(t[16]=ae(d=>{e.tocOpen=!1,e.moreOpen=!e.moreOpen},["stop"]))},[(a(),l("svg",cB,[...t[65]||(t[65]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,uB),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[23]||(t[23]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",pB,[t[66]||(t[66]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),typeof e.content=="string"?(a(),l("div",fB,[g(c(e.type=="html"?"Markdown":e.languageName||"Text")+" \xB7 "+c(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1),e.type!="html"?(a(),l(q,{key:0},[g(" \xB7 "+c(e.fmt?.number(e.content.split(` -`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",hB)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",mB)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),g("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",vB,"\u2713")):f("v-if",!0)],8,gB)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",yB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,bB)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",wB)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,kB)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,CB)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,EB)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g("Open website",-1)])],8,SB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g("Edit anonymization",-1)])],8,NB)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,RB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=ae(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),D(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(` -`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,PB),[[pt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",DB,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(q,null,x(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:P({"is-num":e.csvNumCol(p)})},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,TB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(q,null,x(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",OB,c(p+1),1),(a(!0),l(q,null,x(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(q,null,x(e.redactParts(u),(m,b)=>(a(),l(q,{key:b},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,IB)):(a(),l(q,{key:1},[g(c(m.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,AB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?D((a(),l("div",MB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",VB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,qB),n("span",_B,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,$B),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,LB)]),n("span",FB,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,UB),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",BB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,zB),e.readmeToc().length>=3?(a(),l("aside",HB,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",jB,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(q,null,x(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,GB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",WB,[n("div",KB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",YB,[n("li",XB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,JB)]),(a(!0),l(q,null,x(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,ZB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,QB))),256))]),n("span",xB,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[88]||(t[88]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,ez)):f("v-if",!0),n("span",tz,c(e.fileKind()),1),e.imageSize?(a(),l("span",nz,c(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l("span",sz,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0)]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[36]||(t[36]=d=>e.copyPath())},[(a(),l("svg",iz,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,rz)]))],8,oz),[[Q,e.filePath]])]),n("span",az,[e.type=="IPython"&&e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[89]||(t[89]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,lz),t[90]||(t[90]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.fileKind()),1),e.imageSize?(a(),l(q,{key:1},[t[91]||(t[91]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.imageSize),1)],64)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l(q,{key:2},[t[92]||(t[92]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)]),e.preview&&e.previewPreserved()?(a(),l("button",{key:0,type:"button",class:"rp-preserved-tag",onClick:t[37]||(t[37]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",dz,[e.type=="error"&&e.content==="file_too_big"?(a(),l("span",uz,[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),g("Over the size limit",-1)])])):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("div",cz,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="IPython"?"Open the notebook JSON":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,pz),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[94]||(t[94]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,fz)])):f("v-if",!0),n("div",hz,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[38]||(t[38]=ae(d=>e.moreOpen=!e.moreOpen,["stop"]))},[(a(),l("svg",gz,[...t[95]||(t[95]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,mz),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[40]||(t[40]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",vz,[t[96]||(t[96]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",yz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:2,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[t[97]||(t[97]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1)),g(c(e.type=="IPython"?"View notebook JSON":"View raw"),1)],8,bz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:3,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[98]||(t[98]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,wz)):f("v-if",!0),e.options?.download?(a(),l("a",{key:4,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[99]||(t[99]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,kz)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[39]||(t[39]=d=>e.copyPath())},[...t[100]||(t[100]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[101]||(t[101]=n("div",{class:"tb-menu-sep"},null,-1)),t[102]||(t[102]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[103]||(t[103]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])])]),e.type=="image"?(a(),l("div",Cz,[n("img",{class:"image-content",src:e.safeUrl(e.url),alt:e.paths[e.paths.length-1],onLoad:t[41]||(t[41]=d=>e.onImageLoad(d))},null,40,Ez)])):f("v-if",!0),e.type=="media"?(a(),l("div",Sz,[n("video",{class:"video-content",controls:"",preload:"metadata",playsinline:"",src:e.safeUrl(e.url)},null,8,Nz)])):f("v-if",!0),e.type=="audio"?(a(),l("div",Rz,[n("audio",{controls:"",preload:"metadata",src:e.safeUrl(e.url)},null,8,Pz)])):f("v-if",!0),e.type=="pdf"?(a(),Gt(i,{key:3,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="IPython"?(a(),l("div",Az,[Oe(o,{class:"markdown-body",file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="binary"?(a(),l("div",Dz,[t[105]||(t[105]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1)),t[106]||(t[106]=n("h2",{class:"file-state-title"},"No preview for this file",-1)),n("p",Tz,c(e.preview?"Reviewers can open this file; it is not previewed here.":"This is a binary file. Download it to open it on your computer."),1),e.preview?f("v-if",!0):(a(),l("div",Oz,[n("a",{target:e.preview?"_blank":"_self",class:"btn btn-primary",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[104]||(t[104]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,Iz)]))])):f("v-if",!0),e.type=="error"?(a(),l("div",Mz,[t[108]||(t[108]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("h2",Vz,c(e.content==="file_too_big"?"This file is too large to preview":"This file can't be shown"),1),e.content==="file_too_big"?(a(),l("p",qz,c(e.preview?"Reviewers can open this file; it is not previewed here. Files over 1 MB are only shown on the reviewer page.":"It is over the size limit for anonymized files, so it can't be previewed or downloaded from this link."),1)):(a(),l("p",_z,c(e.fmt.translate("ERRORS."+e.content)),1)),e.preview?f("v-if",!0):(a(),l("div",$z,[n("a",{class:"btn btn-primary",href:e.safeUrl("/r/"+e.repoId+"/")},"Back to the repository",8,Lz),t[107]||(t[107]=n("a",{class:"btn btn-outline-ink",href:"/faq#formats"},"Supported files",-1))]))])):f("v-if",!0),e.content==null&&e.type!="error"?(a(),l("div",Fz,[...t[109]||(t[109]=[n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("h2",{class:"file-state-title"},"This file is empty",-1),n("p",{class:"file-state-msg"},"It has no content in this snapshot.",-1)])])):f("v-if",!0)],2)):f("v-if",!0),e.type=="rate_limited"?(a(),l("div",Uz,[n("div",Bz,[t[112]||(t[112]=Ee('',1)),n("p",zz,[t[110]||(t[110]=g("This repository will be available in ",-1)),n("strong",null,c(e.rateLimitCountdown),1),t[111]||(t[111]=g(". The page will reload automatically.",-1))])])])):f("v-if",!0),e.type=="error"&&!e.fileFrame()?(a(),l("div",Hz,[n("section",jz,[n("h1",Gz,c(e.fmt.translate(e.isSourceAccessError()?"VIEWER_ERRORS.access_title":"VIEWER_ERRORS.title")),1),n("p",null,c(e.fmt.translate("ERRORS."+e.content)),1),e.isSourceAccessError()?(a(),l(q,{key:0},[n("p",null,c(e.fmt.translate("VIEWER_ERRORS.reader_help")),1),n("p",null,c(e.fmt.translate("VIEWER_ERRORS.owner_help")),1)],64)):f("v-if",!0),n("div",Wz,[e.isSourceAccessError()?f("v-if",!0):(a(),l("a",Kz,"Back to home")),e.isSourceAccessError()?f("v-if",!0):(a(),l("a",Yz,"Read the FAQ")),n("button",{type:"button",class:"btn btn-primary",onClick:t[42]||(t[42]=d=>e.retryContent())},c(e.fmt.translate("VIEWER_ERRORS.retry")),1),e.isSourceAccessError()?(a(),l("a",Xz,c(e.fmt.translate("VIEWER_ERRORS.dashboard")),1)):f("v-if",!0)])])])):f("v-if",!0),e.type=="loading"&&!e.error?(a(),l("section",Jz,[n("div",Qz,[n("strong",null,c(e.fmt.translate(e.fileReceivedBytes?"VIEWER_LOADING.receiving":"VIEWER_LOADING.loading")),1),n("span",Zz,c(e.filePath),1),e.fileLoadingSlow?(a(),l("p",xz,c(e.fmt.translate("VIEWER_LOADING.slow")),1)):f("v-if",!0)]),n("div",eH,[(a(),l(q,null,x(10,d=>n("span",{key:d})),64))])])):f("v-if",!0),e.type=="empty"?(a(),l("div",tH,[...t[113]||(t[113]=[n("h1",{class:"paper-empty-title m-auto"},[g("Empty "),n("em",null,"repository"),g(".")],-1)])])):f("v-if",!0),e.content==null&&!["empty","loading","error","rate_limited"].includes(e.type)&&!e.fileFrame()?(a(),l("div",nH,[...t[114]||(t[114]=[n("h1",{class:"paper-empty-title m-auto"},[g("Empty "),n("em",null,"file"),g(".")],-1)])])):f("v-if",!0)],64)}var sH={class:"container page dashboard-page paper-page"},oH={class:"row"},iH={class:"w-100"},rH={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},aH={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},lH={class:"flex-grow-1"},dH={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},uH={class:"d-flex flex-wrap",style:{gap:"6px"}},cH={class:"dropdown"},pH={class:"dropdown-menu","aria-labelledby":"dropdownSort"},fH={class:"form-check dropdown-item"},hH={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},mH={class:"form-check dropdown-item"},gH={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},vH={class:"form-check dropdown-item"},yH={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},bH={class:"form-check dropdown-item"},wH={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},kH={class:"form-check dropdown-item"},CH={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},EH={class:"dropdown"},SH={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},NH={class:"form-check dropdown-item"},RH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},PH={class:"form-check dropdown-item"},AH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},DH={class:"form-check dropdown-item"},TH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},OH={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},IH={class:"filter-chip"},MH=["onClick"],VH={class:"repo-list w-100"},qH={class:"repo-list-item-content"},_H={class:"repo-list-item-main"},$H={class:"repo-list-item-header"},LH=["textContent","href"],FH=["textContent"],UH=["textContent"],BH={class:"repo-source"},zH=["href"],HH={class:"repo-date"},jH={class:"repo-meta"},GH={key:0,title:"Conference"},WH=["title"],KH=["title"],YH=["title"],XH={key:1},JH={class:"repo-list-item-actions"},QH={class:"dropdown"},ZH={class:"dropdown-menu dropdown-menu-right"},xH=["href"],ej=["onClick"],tj=["onClick"],nj=["onClick"],sj=["href"],oj={key:0,class:"repo-list-empty"};function bp(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",sH,[n("div",oH,[n("div",iH,[t[12]||(t[12]=Ee('Temporarily pausedGitHub API rate limit reachedMy work \xA0/\xA0 Pull requests',2)),f(" Search + filters row "),D((a(),l("form",rH,[n("div",aH,[n("div",lH,[D(n("input",dH,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),n("div",uH,[n("div",cH,[t[6]||(t[6]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),n("div",pH,[t[5]||(t[5]=n("h6",{class:"dropdown-header"},"Select order",-1)),n("div",fH,[D(n("input",hH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=n("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),n("div",mH,[D(n("input",gH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=n("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),n("div",vH,[D(n("input",yH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",bH,[D(n("input",wH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),n("div",kH,[D(n("input",CH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=n("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),n("div",EH,[t[11]||(t[11]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),n("div",SH,[t[10]||(t[10]=n("h6",{class:"dropdown-header"},"Select status",-1)),n("div",NH,[D(n("input",RH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.ready=o},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),n("div",PH,[D(n("input",AH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.expired=o},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),n("div",DH,[D(n("input",TH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.removed=o},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=n("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[i,e.viewState]]),f(" Active filter chips "),D(n("div",OH,[(a(!0),l(q,null,x(e.filters?.status,(o,r,d)=>D((a(),l("span",IH,[g(c(e.fmt?.title(r))+" ",1),n("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:p=>{e.filters.status[r]=!0}}," \xD7 ",8,MH)],512)),[[Q,!o]])),256))],512),[[Q,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),f(" Pull request list "),n("ul",VH,[(a(!0),l(q,null,x(e.filteredPullRequests,(o,r)=>(a(),l("li",{class:P(["repo-list-item",{"repo-inactive":o?.status=="expired"||o?.status=="removed"||o?.status=="error"}])},[n("div",qH,[n("div",_H,[n("div",$H,[n("a",{class:"repo-name",textContent:c(o?.pullRequestId),href:e.safeUrl("/pr/"+o?.pullRequestId)},null,8,LH),n("span",{class:P(["status-badge",{"status-removed":o?.status=="removed"||o?.status=="expired"||o?.status=="removing"||o?.status=="expiring","status-preparing":o?.status=="preparing"||o?.status=="download","status-ready":o?.status=="ready","status-error":o?.status=="error"}])},[n("span",{textContent:c(e.fmt?.title(o?.status))},null,8,FH),o?.status=="error"?(a(),l("span",{key:0,textContent:c(": "+o?.statusMessage)},null,8,UH)):f("v-if",!0)],2)]),n("div",BH,[n("span",null,[t[13]||(t[13]=n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),n("a",{href:e.safeUrl("https://github.com/"+o?.source?.repositoryFullName+"/pull/"+o?.source?.pullRequestId)},c(o?.source?.repositoryFullName)+"#"+c(o?.source?.pullRequestId),9,zH)]),n("span",{class:P(["status-badge",{"status-ready":o?.merged,"status-removed":o?.state=="open","status-error":o?.state=="closed"&&!o?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(o?.merged?"merged":o?.state)),3),n("span",HH,"anonymized "+c(e.fmt?.humanTime(o?.anonymizeDate)),1)])]),n("div",jH,[o?.conference?(a(),l("span",GH,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),g(" "+c(o?.conference),1)])):f("v-if",!0),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+o?.options?.terms?.join(", ")},[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),g(" "+c(e.fmt?.number(o?.options?.terms?.length)),1)],8,WH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(o?.pageView)},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),g(" "+c(e.fmt?.number(o?.pageView)),1)],8,KH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(o?.lastView)},[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-calendar"})],-1)),g(" "+c(e.fmt?.humanTime(o?.lastView)),1)],8,YH),o?.options?.expirationMode!="never"&&o?.status=="ready"?(a(),l("span",XH,[t[18]||(t[18]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g(" Expire: "+c(e.fmt?.humanTime(o?.options?.expirationDate)),1)])):f("v-if",!0)])]),n("div",JH,[n("div",QH,[t[24]||(t[24]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),n("div",ZH,[n("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+o?.pullRequestId)},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit ",-1)])],8,xH),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updatePullRequest(o),["prevent"])},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force update ",-1)])],8,ej),[[Q,o?.status=="ready"||o?.status=="error"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updatePullRequest(o),["prevent"])},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Enable ",-1)])],8,tj),[[Q,o?.status=="removed"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.removePullRequest(o),["prevent"])},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove ",-1)])],8,nj),[[Q,o?.status=="ready"]]),n("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+o?.pullRequestId+"/")},[...t[23]||(t[23]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View PR ",-1)])],8,sj)])])])],2))),256)),e.filteredPullRequests?.length==0?(a(),l("li",oj,[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No pull requests to display.",-1)])])):f("v-if",!0)])])])}var ij={class:"container paper-page user-settings"},rj={class:"settings-nav","aria-label":"Settings"},aj=["aria-current","onClick"],lj={class:"settings-row"},dj=["rows"],uj={class:"settings-syntax"},cj={class:"invalid-feedback"},pj={class:"settings-row"},fj={class:"settings-checks"},hj={class:"settings-check"},mj={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gj={class:"settings-check"},vj={class:"form-check-input",type:"checkbox",id:"image",name:"image"},yj={class:"settings-check"},bj={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},wj={class:"settings-check"},kj={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},Cj={class:"settings-check"},Ej={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},Sj={class:"settings-check"},Nj={class:"form-check-input",type:"checkbox",id:"page",name:"page"},Rj={class:"settings-row"},Pj={class:"settings-check"},Aj={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Dj={class:"settings-row"},Tj={class:"form-control",id:"expiration",name:"expiration"},Oj={class:"settings-help"},Ij={class:"settings-save"},Mj={class:"settings-save-status draft-status",role:"status"},Vj={key:0},qj={key:1},_j={key:2},$j=["disabled"],Lj={key:1,class:"settings-save-error",role:"alert"},Fj=["aria-busy"],Uj={key:0,role:"status"},Bj={key:1,class:"settings-notice",role:"alert"},zj=["disabled"],Hj={key:2,class:"settings-notice",role:"status"},jj={key:3,class:"settings-notice",role:"status"},Gj=["disabled"],Wj={class:"billing-summary"},Kj={class:"billing-summary-head"},Yj={class:"billing-plan-name"},Xj={key:0,class:"billing-plan-meta"},Jj={key:1,class:"billing-plan-meta"},Qj={key:0,class:"billing-summary-actions"},Zj=["disabled"],xj={id:"settings-quota"},eG={key:1,role:"status"},tG={key:0,class:"settings-notice"},nG={key:1,class:"settings-notice"},sG={key:2,class:"settings-notice"},oG={key:4,class:"billing-section","aria-labelledby":"settings-plan-comparison"},iG={key:0,class:"billing-offers"},rG={key:0,class:"billing-offer is-recommended"},aG={class:"billing-offer-price"},lG={class:"billing-offer-list"},dG=["disabled"],uG={key:1,class:"billing-offer"},cG={class:"billing-offer-head"},pG={class:"billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},fG=["aria-checked","onClick"],hG={key:0,class:"billing-toggle-save"},mG={class:"billing-offer-price"},gG={class:"billing-offer-list"},vG=["disabled"],yG={key:1,class:"billing-addons"},bG={class:"billing-addon-rows"},wG={class:"billing-addon-price"},kG=["onClick","disabled"],CG={key:2,class:"billing-buy",id:"settings-addons-title",tabindex:"-1"},EG={class:"billing-buy-info"},SG={class:"billing-offer-price"},NG={class:"billing-offer-list"},RG={class:"billing-buy-form"},PG=["value"],AG=["disabled"],DG={key:1,class:"billing-buy-desc"},TG={key:2,class:"billing-footnote"},OG={class:"billing-compare"},IG={class:"billing-compare-card"},MG={class:"settings-comparison"},VG={key:0,scope:"col",class:"is-recommended"},qG={key:1,scope:"col"},_G={key:0,class:"is-recommended"},$G={key:1},LG={key:0,class:"is-recommended"},FG={key:1},UG={key:0,class:"is-recommended"},BG={key:1},zG={key:0,class:"is-recommended"},HG={key:1},jG={key:0,class:"is-recommended"},GG={key:1},WG={key:0,class:"is-recommended"},KG={key:1},YG={key:3,class:"billing-footnote"},XG={key:5,class:"billing-section"},JG={class:"billing-section-head"},QG=["disabled"],ZG={key:0,class:"billing-empty"},xG={key:1,class:"billing-history-head","aria-hidden":"true"},eW={key:2,class:"billing-history"},tW={class:"billing-history-main"},nW=["href"],sW=["href"],oW={class:"billing-history-term"},iW={class:"billing-history-paid"},rW={class:"billing-history-status"},aW={class:"billing-manage"},lW={key:0},dW={key:1},uW=["disabled"],cW={class:"billing-conference"},pW={id:"settings-account",class:"settings-account-panel"},fW={class:"paper-account-card"},hW=["src"],mW={class:"paper-account-identity"},gW={class:"paper-account-name"},vW=["disabled"],yW={key:0,role:"status"},bW={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},wW=["disabled"],kW={key:3,role:"status"},CW={class:"paper-danger-zone"},EW={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},SW=["textContent"],NW=["disabled"],RW={key:1,class:"settings-delete-confirm"},PW={for:"delete-username"},AW={class:"settings-actions"},DW=["disabled"],TW=["disabled"];function wp(e,t){let s=Xe("quota-usage"),i=Ae("field"),o=Ae("form");return a(),l("div",ij,[t[107]||(t[107]=n("header",{class:"settings-title page-head page-head-main"},[n("h1",null,"Settings"),n("p",{class:"paper-page-lede"},"Defaults for new anonymizations, hosting and your account.")],-1)),n("nav",rj,[(a(),l(q,null,x([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:d=>e.settingsTab=r.id},c(r.label),9,aj)),64))]),D(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),D((a(),l("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onInput:t[1]||(t[1]=r=>e.unsavedChanges=!0),onSubmit:t[2]||(t[2]=ae(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",lj,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[D(n("textarea",{class:"form-control",id:"terms",name:"terms",rows:Math.min(14,Math.max(3,String(e.terms||"").split(` +10 log("epoch %d: %.3f", epoch, loss)Anonymized pull requests
Track PR mirrors you\u2019ve created and their reviewer traffic.
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.
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.
You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over.
Create an anonymous mirror in a couple of minutes. Reviewers just open the link.
Nothing renews \xB7 Tax shown at checkout \xB7 Expecting more submissions? Email tdurieux@anonymous.4open.science
Create the conference, then pay from its page. Authors can submit once the payment is confirmed.
',2))],64)):e.plans.length?(a(),l("div",lB,[(a(!0),l(q,null,Q(e.plans,r=>(a(),l("label",{class:P(["paper-plan-card",{selected:e.options?.plan?.planID==r?.id}]),key:r.id},[T(n("input",{type:"radio",name:"planPicker",value:r?.id},null,8,dB),[[i,{state:e.viewState,set:d=>{e.options.plan.planID=d},value:e.options?.plan?.planID,form:"conference",options:{}}]]),n("div",{class:"paper-plan-head",textContent:c(r?.name)},null,8,uB),n("div",cB,c(r.pricePerRepo>0?e.fmt?.number(r.pricePerRepo,2)+" \u20AC per repository":"Free"),1),n("div",{class:"paper-plan-desc",innerHTML:e.sanitize(r?.description)},null,8,pB)],2))),128))])):e.plansLoaded?(a(),l("p",fB,"New conferences are unavailable right now. Please try again later.")):f("v-if",!0)]),e.plan?.pricePerRepo>0?(a(),l("section",mB,[t[43]||(t[43]=n("div",{class:"paper-section-eyebrow"},"Billing",-1)),n("div",hB,[t[36]||(t[36]=n("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.name=r},value:e.options?.billing?.name,form:"conference",options:{}}]])]),n("div",gB,[t[37]||(t[37]=n("label",{class:"paper-field-label",for:"email"},"Email",-1)),T(n("input",{type:"email",class:P(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.email=r},value:e.options?.billing?.email,form:"conference",options:{}}]])]),n("div",vB,[t[38]||(t[38]=n("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address=r},value:e.options?.billing?.address,form:"conference",options:{}}]])]),n("div",yB,[T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address2=r},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),n("div",bB,[n("div",wB,[t[39]||(t[39]=n("label",{class:"paper-field-label",for:"city"},"City",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.city=r},value:e.options?.billing?.city,form:"conference",options:{}}]])]),n("div",kB,[t[40]||(t[40]=n("label",{class:"paper-field-label",for:"country"},"Country",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.country=r},value:e.options?.billing?.country,form:"conference",options:{}}]])]),n("div",CB,[t[41]||(t[41]=n("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.zip=r},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),n("div",EB,[t[42]||(t[42]=n("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.vat=r},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):f("v-if",!0),n("div",SB,[e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,NB)):f("v-if",!0),e.message?(a(),l("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,RB)):f("v-if",!0),n("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=ae(r=>e.submitForm(r,()=>{e.submit(r)}),["prevent"]))},c(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,PB)])])),[[o,e.viewState]])])])}var DB={key:0,class:"dir-card","aria-label":"Repository files"},AB=["onClick"],TB={class:"dir-name"},OB=["href"],IB={class:"dir-name"},MB={class:"dir-meta"},VB={class:"file-card-head"},qB={class:"file-card-path"},_B={class:"breadcrumb paths","aria-label":"Path"},LB={class:"breadcrumb-item breadcrumb-root"},$B=["href","title","textContent"],FB=["aria-current"],UB=["aria-label"],BB={class:"mobile-sub ms"},zB=["title"],HB={class:"ms-item"},jB={key:1,class:"ms-item"},GB={key:2,class:"ms-item"},WB=["aria-label","title"],KB={class:"ui-icon","aria-hidden":"true"},YB=["href"],XB={key:0,class:"file-card-meta"},JB=["title"],QB={class:"meta-extra"},ZB={key:1,class:"file-card-meta"},xB=["title"],ez={class:"file-card-actions"},tz={key:0,class:"csv-toggle seg-filter",role:"radiogroup","aria-label":"CSV view"},nz=["aria-checked"],sz=["aria-checked"],oz={key:1,class:"symbols"},iz=["aria-expanded"],rz={key:0,class:"symbols-menu",role:"menu"},az={class:"symbols-head"},lz=["onClick"],dz={class:"symbols-name"},uz={class:"symbols-line"},cz=["title"],pz={key:3,class:"tb-view",role:"group","aria-label":"View tools"},fz=["title"],mz=["aria-pressed"],hz=["title"],gz={key:4,class:"tb-file",role:"group","aria-label":"File actions"},vz=["target","title","href"],yz=["aria-label","title"],bz={class:"ui-icon","aria-hidden":"true"},wz=["href"],kz=["target","href","download"],Cz=["aria-label"],Ez={class:"ui-icon","aria-hidden":"true"},Sz=["href"],Nz={key:6,class:"tb-toc-m"},Rz=["aria-expanded"],Pz=["onClick"],Dz={class:"tb-more"},Az=["aria-expanded"],Tz={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},Oz={key:0,class:"tb-menu-note"},Iz={key:1,class:"tb-menu-note tb-menu-meta"},Mz={key:2,class:"tb-menu-sep"},Vz={key:4,class:"tb-menu-sep"},qz=["aria-checked"],_z={key:0,class:"tb-menu-check"},Lz={class:"ui-icon","aria-hidden":"true"},$z=["href"],Fz={key:9,class:"tb-menu-sep"},Uz=["target","href"],Bz=["target","href"],zz=["target","href","download"],Hz=["target","href"],jz=["href"],Gz=["target","href"],Wz=["placeholder","aria-invalid"],Kz=["aria-label"],Yz={class:"csv-table"},Xz=["aria-label"],Jz={class:"csv-rownum"},Qz=["aria-label"],Zz={key:1,class:"file-card-body"},xz={key:2,class:"md-find-bar",role:"search"},eH=["value"],tH={class:"md-find-nav"},nH=["disabled"],sH=["disabled"],oH={class:"md-find-count","aria-live":"polite"},iH=["aria-pressed"],rH={key:3,class:"reading-layout"},aH=["innerHTML"],lH={key:0,class:"readme-toc","aria-label":"On this page"},dH={class:"toc-rail"},uH=["href","onClick"],cH={class:"file-card-head"},pH={class:"file-card-path"},fH={class:"breadcrumb paths","aria-label":"Path"},mH={class:"breadcrumb-item breadcrumb-root"},hH=["href","title","textContent"],gH=["aria-current"],vH=["aria-label"],yH={class:"mobile-sub ms"},bH=["title"],wH={class:"ms-item"},kH={key:1,class:"ms-item"},CH={key:2,class:"ms-item"},EH=["aria-label","title"],SH={class:"ui-icon","aria-hidden":"true"},NH=["href"],RH={class:"file-card-meta"},PH=["title"],DH={class:"file-card-actions"},AH={key:0,class:"file-card-state",title:"Files over the size limit can't be previewed or downloaded from this link"},TH={key:1,class:"tb-file",role:"group","aria-label":"File actions"},OH=["target","title","href"],IH=["target","href","download"],MH={class:"tb-more"},VH=["aria-expanded"],qH={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},_H={key:0,class:"tb-menu-note"},LH={key:1,class:"tb-menu-sep"},$H=["target","href"],FH=["target","href","download"],UH=["target","href"],BH={key:0,class:"media-stage"},zH=["src","alt"],HH={key:1,class:"media-stage"},jH=["src"],GH={key:2,class:"media-stage is-audio"},WH=["src"],KH={key:4,class:"notebook-body"},YH={key:5,class:"file-state"},XH={class:"file-state-msg"},JH={key:0,class:"file-state-actions"},QH=["target","href","download"],ZH={key:6,class:"file-state",role:"alert"},xH={class:"file-state-title"},ej={key:0,class:"file-state-msg"},tj={key:1,class:"file-state-msg"},nj={key:2,class:"file-state-actions"},sj=["href"],oj={key:7,class:"file-state"},ij={key:4,class:"file-error container d-flex h-100"},rj={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},aj={class:"paper-error-msg"},lj={key:5,class:"file-error container d-flex h-100"},dj={class:"viewer-error paper-error-card file-error-card m-auto",role:"alert","aria-labelledby":"viewer-error-title"},uj={id:"viewer-error-title",class:"paper-empty-title"},cj={class:"paper-error-actions"},pj={key:0,href:"/",class:"btn btn-sm"},fj={key:1,href:"/faq",class:"btn btn-sm"},mj={key:2,class:"btn btn-outline-ink",href:"/dashboard"},hj={key:6,class:"viewer-loading","aria-busy":"true"},gj={class:"viewer-loading-status",role:"status","aria-live":"polite"},vj={class:"viewer-loading-name sr-only"},yj={key:0},bj={class:"viewer-loading-lines","aria-hidden":"true"},wj={key:7,class:"file-error container d-flex h-100"},kj={key:8,class:"file-error container d-flex h-100"};function wp(e,t){let s=Xe("html-doc"),i=Xe("pdfviewer"),o=Xe("notebook"),r=De("code-editor");return a(),l(q,null,[e.sidebarHidden&&e.type=="html"&&e.content!=null&&e.paths?.length===1&&/^readme/i.test(e.paths[0]||"")&&e.files?.length?(a(),l("section",DB,[t[46]||(t[46]=n("header",{class:"dir-card-head"},[n("span",{class:"dir-card-title"},"Files"),n("span",{class:"dir-card-sub"},"Snapshot of the repository at review time")],-1)),n("ul",{class:P(["dir-list",{"is-expanded":e.dirExpanded}])},[(a(!0),l(q,null,Q(e.rootEntries(),d=>(a(),l("li",{key:d.name},[d.size==null?(a(),l("button",{key:0,type:"button",class:"dir-row",onClick:p=>e.revealFolder(d.name)},[t[43]||(t[43]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})],-1)),n("span",TB,c(d.name),1),t[44]||(t[44]=n("span",{class:"dir-meta"},"Folder",-1))],8,AB)):(a(),l("a",{key:1,class:P(["dir-row",{"is-current":d.name===e.paths[0]}]),href:e.safeUrl("/r/"+e.repoId+"/"+encodeURIComponent(d.name))},[t[45]||(t[45]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})],-1)),n("span",IB,c(d.name),1),n("span",MB,c(e.formatSize(d.size)),1)],10,OB))]))),128))],2),!e.dirExpanded&&e.files.length>8?(a(),l("button",{key:0,type:"button",class:"dir-more",onClick:t[0]||(t[0]=d=>e.dirExpanded=!0)},"Show all "+c(e.files.length)+" items",1)):f("v-if",!0)])):f("v-if",!0),(e.type=="text"||e.type=="code"||e.type=="html"||e.type=="html-doc"&&e.showSource)&&e.content!=null?(a(),l("section",{key:1,class:P(["file-card",{"is-code":e.type!="html","no-wrap":!e.wrapLines}])},[n("header",VB,[n("div",qB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[1]||(t[1]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",_B,[n("li",LB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,$B)]),(a(!0),l(q,null,Q(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,Q(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,UB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,FB))),256))]),n("span",BB,[e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[48]||(t[48]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,zB)):f("v-if",!0),n("span",HB,c(e.type=="html"?"Markdown":e.languageName||"Text"),1),e.fileSize(e.filePath)!=null?(a(),l("span",jB,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0),e.type!="html"&&typeof e.content=="string"?(a(),l("span",GB,c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",KB,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,YB)]))],8,WB),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",XB,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,JB),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",QB,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",ZB,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,xB),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(q,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",ez,[e.isCsv()?(a(),l("div",tz,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,nz),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,sz)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",oz,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,iz),e.symbolsOpen?(a(),l("div",rz,[n("div",az,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(q,null,Q(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:p=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",dz,c(d.name),1),n("span",uz,c(d.line),1)],8,lz))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,cz)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",pz,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,fz)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,mz)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,hz)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",gz,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,vz),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",bz,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,wz)]))],8,yz)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,kz)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",Ez,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,Sz)]))],8,Cz)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(a(),l("div",Nz,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[13]||(t[13]=ae(d=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,Rz),e.tocOpen?(a(),l("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[15]||(t[15]=d=>e.tocOpen=!1)},[t[64]||(t[64]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button",{type:"button",role:"menuitem",class:P(["tb-menu-toc","lvl-2",{"is-active":!e.activeHeading}]),onClick:t[14]||(t[14]=d=>e.scrollToHeading(null))},"Introduction",2),(a(!0),l(q,null,Q(e.readmeToc(),d=>(a(),l("button",{type:"button",role:"menuitem",key:"m-"+d.id,class:P(["tb-menu-toc","lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:p=>e.scrollToHeading(d.id)},c(d.text),11,Pz))),128))])):f("v-if",!0)])):f("v-if",!0),n("div",Dz,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[16]||(t[16]=ae(d=>{e.tocOpen=!1,e.moreOpen=!e.moreOpen},["stop"]))},[(a(),l("svg",Tz,[...t[65]||(t[65]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,Az),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[23]||(t[23]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",Oz,[t[66]||(t[66]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),typeof e.content=="string"?(a(),l("div",Iz,[g(c(e.type=="html"?"Markdown":e.languageName||"Text")+" \xB7 "+c(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1),e.type!="html"?(a(),l(q,{key:0},[g(" \xB7 "+c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",Mz)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",Vz)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),g("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",_z,"\u2713")):f("v-if",!0)],8,qz)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",Lz,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,$z)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",Fz)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,Uz)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,Bz)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,zz)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g("Open website",-1)])],8,Hz)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g("Edit anonymization",-1)])],8,jz)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,Gz)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=ae(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),T(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(` +`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,Wz),[[rt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",Yz,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(q,null,Q(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:P({"is-num":e.csvNumCol(p)})},[(a(!0),l(q,null,Q(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,Xz)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(q,null,Q(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",Jz,c(p+1),1),(a(!0),l(q,null,Q(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(q,null,Q(e.redactParts(u),(h,b)=>(a(),l(q,{key:b},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,c(h.n),1)],8,Qz)):(a(),l(q,{key:1},[g(c(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,Kz)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?T((a(),l("div",Zz,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",xz,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,eH),n("span",tH,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,nH),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,sH)]),n("span",oH,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,iH),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",rH,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,aH),e.readmeToc().length>=3?(a(),l("aside",lH,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",dH,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(q,null,Q(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,uH))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",cH,[n("div",pH,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",fH,[n("li",mH,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,hH)]),(a(!0),l(q,null,Q(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,Q(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,vH)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,gH))),256))]),n("span",yH,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[88]||(t[88]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,bH)):f("v-if",!0),n("span",wH,c(e.fileKind()),1),e.imageSize?(a(),l("span",kH,c(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l("span",CH,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[36]||(t[36]=d=>e.copyPath())},[(a(),l("svg",SH,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,NH)]))],8,EH),[[Z,e.filePath]])]),n("span",RH,[e.type=="IPython"&&e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[89]||(t[89]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,PH),t[90]||(t[90]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.fileKind()),1),e.imageSize?(a(),l(q,{key:1},[t[91]||(t[91]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.imageSize),1)],64)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l(q,{key:2},[t[92]||(t[92]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)]),e.preview&&e.previewPreserved()?(a(),l("button",{key:0,type:"button",class:"rp-preserved-tag",onClick:t[37]||(t[37]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",DH,[e.type=="error"&&e.content==="file_too_big"?(a(),l("span",AH,[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),g("Over the size limit",-1)])])):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("div",TH,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="IPython"?"Open the notebook JSON":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,OH),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[94]||(t[94]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,IH)])):f("v-if",!0),n("div",MH,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[38]||(t[38]=ae(d=>e.moreOpen=!e.moreOpen,["stop"]))},[(a(),l("svg",qH,[...t[95]||(t[95]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,VH),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[40]||(t[40]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",_H,[t[96]||(t[96]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",LH)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:2,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[t[97]||(t[97]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1)),g(c(e.type=="IPython"?"View notebook JSON":"View raw"),1)],8,$H)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:3,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[98]||(t[98]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,FH)):f("v-if",!0),e.options?.download?(a(),l("a",{key:4,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[99]||(t[99]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,UH)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[39]||(t[39]=d=>e.copyPath())},[...t[100]||(t[100]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[101]||(t[101]=n("div",{class:"tb-menu-sep"},null,-1)),t[102]||(t[102]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[103]||(t[103]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])])]),e.type=="image"?(a(),l("div",BH,[n("img",{class:"image-content",src:e.safeUrl(e.url),alt:e.paths[e.paths.length-1],onLoad:t[41]||(t[41]=d=>e.onImageLoad(d))},null,40,zH)])):f("v-if",!0),e.type=="media"?(a(),l("div",HH,[n("video",{class:"video-content",controls:"",preload:"metadata",playsinline:"",src:e.safeUrl(e.url)},null,8,jH)])):f("v-if",!0),e.type=="audio"?(a(),l("div",GH,[n("audio",{controls:"",preload:"metadata",src:e.safeUrl(e.url)},null,8,WH)])):f("v-if",!0),e.type=="pdf"?(a(),Gt(i,{key:3,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="IPython"?(a(),l("div",KH,[Ie(o,{class:"markdown-body",file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="binary"?(a(),l("div",YH,[t[105]||(t[105]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1)),t[106]||(t[106]=n("h2",{class:"file-state-title"},"No preview for this file",-1)),n("p",XH,c(e.preview?"Reviewers can open this file; it is not previewed here.":"This is a binary file. Download it to open it on your computer."),1),e.preview?f("v-if",!0):(a(),l("div",JH,[n("a",{target:e.preview?"_blank":"_self",class:"btn btn-primary",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[104]||(t[104]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,QH)]))])):f("v-if",!0),e.type=="error"?(a(),l("div",ZH,[t[108]||(t[108]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("h2",xH,c(e.content==="file_too_big"?"This file is too large to preview":"This file can't be shown"),1),e.content==="file_too_big"?(a(),l("p",ej,c(e.preview?"Reviewers can open this file; it is not previewed here. Files over 1 MB are only shown on the reviewer page.":"It is over the size limit for anonymized files, so it can't be previewed or downloaded from this link."),1)):(a(),l("p",tj,c(e.fmt.translate("ERRORS."+e.content)),1)),e.preview?f("v-if",!0):(a(),l("div",nj,[n("a",{class:"btn btn-primary",href:e.safeUrl("/r/"+e.repoId+"/")},"Back to the repository",8,sj),t[107]||(t[107]=n("a",{class:"btn btn-outline-ink",href:"/faq#formats"},"Supported files",-1))]))])):f("v-if",!0),e.content==null&&e.type!="error"?(a(),l("div",oj,[...t[109]||(t[109]=[n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("h2",{class:"file-state-title"},"This file is empty",-1),n("p",{class:"file-state-msg"},"It has no content in this snapshot.",-1)])])):f("v-if",!0)],2)):f("v-if",!0),e.type=="rate_limited"?(a(),l("div",ij,[n("div",rj,[t[112]||(t[112]=Ce('Track PR mirrors you\u2019ve created and their reviewer traffic.