prreviewbuddy 0.55.10 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.56.0
4
+
5
+ **Work in one focused tab, with Back and Forward that know where you were.** The workspace now has
6
+ Back and Forward buttons at the start of the top bar, before Reviews. They move through this tab's
7
+ workspace history: from the Reviews list into a review, between Overview, themes, Issues,
8
+ Questions, Files, PR context, Diagrams and KISS, and back out again. The browser's own Back and
9
+ Forward buttons, mouse buttons and shortcuts use the same history, and so do **⌘[** and **⌘]** on a
10
+ Mac (**Ctrl+[** and **Ctrl+]** elsewhere). The shortcuts do nothing while you are typing in a field
11
+ or a dialog is open. The workspace's Back is disabled on the first workspace page in a tab, so it
12
+ never takes you to a site you came from; the browser's Back still does.
13
+
14
+ **Coming back puts every page as you left it.** Back to the Reviews list restores the search,
15
+ filters, rows you loaded with Load more, opened history rows, scroll position and the review you
16
+ had selected. Back to a review restores its section or theme, exactly the files that were open, each
17
+ where you were reading it (the change you stepped to, how far Show more had gone, Expand, and the
18
+ line at the top), the document and sidebar scroll, whether Buddy AI was open and where in its conversation,
19
+ the folded parts of the sidebar, and keyboard focus. If something changed while you were away, for
20
+ example a finding is gone after an update or a file is shorter, you land on the closest thing that
21
+ is still there. Open files and scrolling are part of a page, not steps of their own, so one Back
22
+ always goes to the previous page. A reload keeps all of this too, and so does going back an instant
23
+ after scrolling. Pressing Back and Forward faster than a file can load ends on the page you stopped
24
+ at, with that page's files, never with an earlier page's.
25
+
26
+ **An unsent Buddy AI question survives.** A question you have started typing is kept per tab while
27
+ you move around, through a refresh, and through the reloads a review does to itself when an
28
+ analysis or update lands. While an earlier question is still being answered you can write the next
29
+ one, and it is kept even if you leave and come back: it waits in the box, never sent by itself, and
30
+ Ask is there once the answer arrives. Enter does nothing until then, so typing can never stop the
31
+ running answer. A question that did not go, because you stopped it, the server could not be
32
+ reached, or another page of the review was already asking, goes back into the box. Text you wrote
33
+ is cleared only when it is sent or when you delete it.
34
+
35
+ **New tabs still work as links do.** The sidebar's views and themes are now real links, so
36
+ Cmd-click, Ctrl-click, middle-click and the browser's "Open link in new tab" open them in a tab of
37
+ their own, for comparing side by side. Each new tab starts its own history.
38
+
39
+ **Search and filters no longer add history steps.** Changing the search, the status, author or PR
40
+ filter on the Reviews list updates its address in place, so Back from a review returns to the list
41
+ as you filtered it rather than stepping back through each filter. Bookmarked list addresses open
42
+ exactly as before.
43
+
44
+ At phone width the version number in the top bar gives way to Back and Forward; it is now also at
45
+ the foot of Help.
46
+
47
+ Tested in current Chromium, Firefox and WebKit (Safari's engine), each with and without the
48
+ browser's Navigation API. Safari itself and earlier major versions have not been run, so support
49
+ there is provisional.
50
+
3
51
  ## 0.55.10
4
52
 
5
53
  **Complexity worth keeping loses its side rules.** In a KISS review, each item in the list had a
package/dist/server.js CHANGED
@@ -427,7 +427,9 @@ var PATHS = {
427
427
  help: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3\"/><path d=\"M12 17h.01\"/>",
428
428
  feedback: "<path d=\"m22 2-7 20-4-9-9-4z\"/><path d=\"M22 2 11 13\"/>",
429
429
  stop: "<path d=\"M12 2v10\"/><path d=\"M18.4 6.6a9 9 0 1 1-12.8 0\"/>",
430
- restart: "<path d=\"M21 12a9 9 0 1 1-2.64-6.36\"/><path d=\"M21 3v6h-6\"/>"
430
+ restart: "<path d=\"M21 12a9 9 0 1 1-2.64-6.36\"/><path d=\"M21 3v6h-6\"/>",
431
+ back: "<path d=\"M19 12H5\"/><path d=\"m12 19-7-7 7-7\"/>",
432
+ forward: "<path d=\"M5 12h14\"/><path d=\"m12 5 7 7-7 7\"/>"
431
433
  };
432
434
  /** The icon slot for one rail row. Hidden from assistive technology: the label beside it says it. */
433
435
  function railIcon(icon) {
@@ -442,6 +444,16 @@ function railIcon(icon) {
442
444
  function iconSvg(icon) {
443
445
  return `<svg viewBox="0 0 24 24" focusable="false" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">${PATHS[icon]}</svg>`;
444
446
  }
447
+ //#endregion
448
+ //#region ../../packages/review-harness/src/client/location_hash.ts
449
+ var SECTION_PREFIX = "#theme-";
450
+ function hashForView(view) {
451
+ return `#${view}`;
452
+ }
453
+ /** Section ids are written by the model, so they are arbitrary strings and must be escaped. */
454
+ function hashForSection(sectionId) {
455
+ return `${SECTION_PREFIX}${encodeURIComponent(sectionId)}`;
456
+ }
445
457
  /**
446
458
  * Which new notifications become toasts, and how many are left over.
447
459
  *
@@ -537,6 +549,7 @@ function renderGlobalBar(options) {
537
549
  return `<header class="prb-strip">
538
550
  <span class="prb-wordmark"><b>pr</b>review<b>buddy</b></span>
539
551
  ${live ? renderHeaderNav(options) : ""}
552
+ ${live ? renderHistoryControls() : ""}
540
553
  ${live ? renderStripReviews(options) : ""}
541
554
  ${live ? renderNotificationsBell(options) : ""}
542
555
  ${live ? renderStripSettings(options) : ""}
@@ -580,6 +593,22 @@ function renderNotificationsBell(options) {
580
593
  </a>`;
581
594
  }
582
595
  /**
596
+ * Back and Forward through this tab's workspace history, ahead of the places.
597
+ *
598
+ * Workspace-wide, so here in the strip rather than in a review's own bar: they move between views,
599
+ * themes and pages alike, and they are not "previous review" and "next review". Drawn disabled, and
600
+ * enabled by the page once it has checked that the neighbouring entry is one of ours, so the
601
+ * product's own Back never takes anyone to a site they came from. The browser's Back still does.
602
+ *
603
+ * Named in words for assistive technology, with the shortcut in `aria-keyshortcuts`. The tooltip is
604
+ * the strip's own (`data-tip`, painted by the client because only the browser knows the platform),
605
+ * never a `title`, which this product does not use. The divider closes the group off from the places.
606
+ */
607
+ function renderHistoryControls() {
608
+ const control = (direction, label, key) => `<button type="button" class="prb-strip-action" data-history="${direction}" aria-label="${label}" aria-keyshortcuts="Meta+${key} Control+${key}" disabled>${iconSvg(direction)}</button>`;
609
+ return `${control("back", "Back", "BracketLeft")}${control("forward", "Forward", "BracketRight")}<span class="prb-strip-divider" aria-hidden="true"></span><span class="prb-visually-hidden" data-nav-announce aria-live="polite"></span>`;
610
+ }
611
+ /**
583
612
  * The reviews list, first of the places, as the rail orders them.
584
613
  *
585
614
  * Every workspace place now has an icon here, which is the point: the rail is the only other way to
@@ -2693,7 +2722,7 @@ function renderGuideProgress(sections, completed) {
2693
2722
  * absent. The workspace places in the narrow header follow exactly this pattern.
2694
2723
  */
2695
2724
  function renderThemePicker(sections, selectedId) {
2696
- return `<div class="prb-guide-picker">${sections.map((section, index) => `<button type="button" class="prb-guide-pick" data-goto-section="${escapeHtml$1(section.id)}" data-theme-index="${index}" data-recommended-start="${section.recommendedStartingPoint}" aria-current="${section.id === selectedId}"><span class="prb-guide-pick-order">${index + 1}</span>${escapeHtml$1(section.title)}</button>`).join("")}</div>`;
2725
+ return `<div class="prb-guide-picker">${sections.map((section, index) => `<a class="prb-guide-pick" href="${escapeHtml$1(hashForSection(section.id))}" data-goto-section="${escapeHtml$1(section.id)}" data-theme-index="${index}" data-recommended-start="${section.recommendedStartingPoint}" aria-current="${section.id === selectedId}"><span class="prb-guide-pick-order">${index + 1}</span>${escapeHtml$1(section.title)}</a>`).join("")}</div>`;
2697
2726
  }
2698
2727
  //#endregion
2699
2728
  //#region ../../packages/review-harness/src/workspace/diagram_view.ts
@@ -5693,14 +5722,14 @@ function renderRail(view, sections, stale = false) {
5693
5722
  const sectionIssues = issuesOutstanding(issues.filter((issue) => issue.sectionId === section.id), dispositions);
5694
5723
  const detail = [`~${themeMinutes(section)} min`, themeFindingsNote(sectionIssues)].filter(Boolean).join(" &middot; ");
5695
5724
  const note = `<span class="prb-rail-meta">${section.recommendedStartingPoint ? "<span class=\"prb-rail-start\">Start here</span>" : ""}<span class="prb-rail-note">${detail}</span></span>`;
5696
- return `<button type="button" class="prb-rail-item" data-goto-section="${escapeHtml$1(section.id)}" data-theme-index="${index}" data-recommended-start="${section.recommendedStartingPoint}">
5725
+ return `<a class="prb-rail-item" href="${escapeHtml$1(hashForSection(section.id))}" data-goto-section="${escapeHtml$1(section.id)}" data-theme-index="${index}" data-recommended-start="${section.recommendedStartingPoint}">
5697
5726
  <span class="prb-rail-order">${index + 1}</span>
5698
5727
  <span class="prb-rail-label">
5699
5728
  <span class="prb-rail-title">${escapeHtml$1(section.title)}</span>
5700
5729
  ${note}
5701
5730
  </span>
5702
5731
  <span class="prb-attention" data-attention="${escapeHtml$1(section.reviewAttention)}" title="Needs ${escapeHtml$1(section.reviewAttention)} attention"></span>
5703
- </button>`;
5732
+ </a>`;
5704
5733
  }).join("");
5705
5734
  const standard = view.session.result ? railGroup({
5706
5735
  id: "prb-rail-review",
@@ -5801,11 +5830,11 @@ var TWISTY = "<svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\
5801
5830
  function railGroup(group) {
5802
5831
  return `<div class="prb-rail-group">
5803
5832
  <div class="prb-rail-row">
5804
- <button type="button" class="prb-rail-item prb-rail-group-title" data-view-nav="${escapeHtml$1(group.view)}"${group.current ? " aria-current=\"true\"" : ""}>
5833
+ <a class="prb-rail-item prb-rail-group-title" href="${escapeHtml$1(hashForView(group.view))}" data-view-nav="${escapeHtml$1(group.view)}"${group.current ? " aria-current=\"true\"" : ""}>
5805
5834
  ${railIcon(group.icon)}
5806
5835
  <span class="prb-rail-label"><span class="prb-rail-title">${escapeHtml$1(group.title)}</span></span>
5807
5836
  ${renderBadge(group.badge)}
5808
- </button>
5837
+ </a>
5809
5838
  ${group.body.trim() === "" ? "" : `<button type="button" class="prb-rail-twisty" data-rail-toggle="${escapeHtml$1(group.collapses)}" aria-expanded="true" aria-controls="${escapeHtml$1(group.id)}" aria-label="Collapse ${escapeHtml$1(group.collapses)}">${TWISTY}</button>`}
5810
5839
  </div>
5811
5840
  <div class="prb-rail-body" id="${escapeHtml$1(group.id)}">${group.body}</div>
@@ -5922,11 +5951,11 @@ function renderBadge(badge) {
5922
5951
  }
5923
5952
  /** A null badge renders nothing, for the case where zero would be a claim rather than a total. */
5924
5953
  function railLink(view, icon, label, badge, note, alsoCurrentOn) {
5925
- return `<button type="button" class="prb-rail-item prb-rail-link" data-view-nav="${view}"${alsoCurrentOn ? ` data-view-also="${alsoCurrentOn}"` : ""}${note ? ` title="${escapeHtml$1(note)}"` : ""}>
5954
+ return `<a class="prb-rail-item prb-rail-link" href="${escapeHtml$1(hashForView(view))}" data-view-nav="${view}"${alsoCurrentOn ? ` data-view-also="${alsoCurrentOn}"` : ""}${note ? ` title="${escapeHtml$1(note)}"` : ""}>
5926
5955
  ${railIcon(icon)}
5927
5956
  <span class="prb-rail-label"><span class="prb-rail-title">${escapeHtml$1(label)}</span></span>
5928
5957
  ${renderBadge(badge)}
5929
- </button>`;
5958
+ </a>`;
5930
5959
  }
5931
5960
  /**
5932
5961
  * What the harness corrected, as notes for Analysis details on the Overview.
@@ -8533,6 +8562,7 @@ ${renderWorkspaceRail({
8533
8562
  <h2>${escapeHtml$1(topic.title)}</h2>
8534
8563
  ${topic.body}
8535
8564
  </section>`).join("")}
8565
+ <p class="prb-help-version">PR Review Buddy v${escapeHtml$1(BUILD_VERSION)}</p>
8536
8566
  </main>
8537
8567
  </div>
8538
8568
  <script src="/assets/help.js" type="module"><\/script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prreviewbuddy",
3
- "version": "0.55.10",
3
+ "version": "0.56.0",
4
4
  "description": "Review a branch or pull request in an isolated checkout, from your terminal, with the coding agent you already have installed.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://prreviewbuddy.com",
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunk-DdkvfxwB.js","chunk-DsF7k-Jl.js","chunk-BWjKdrB5.js","chunk-hePW80VL.js","chunk-CN9Gw02i.js","workspace.js","chunk-B5CvMZtt.js","chunk-RriGSD6H.js","chunk-BpiqRF0Y.js","chunk-DJ4Pz6CG.js","chunk-B2kMZj3m.js","chunk-DN473Oml.js","chunk-DwZ_OKDV.js","chunk-CFLfawWY.js","chunk-Wc3Sd0cy.js","chunk-Dy-Kn_BL.js","chunk-CUxm3YXF.js","chunk-tz4nb_gp.js","chunk-BsaS8BTP.js","chunk-fybaL0A-.js","chunk-BifhSqXX.js","chunk-DS17s2tU.js","chunk-BvO9qrHb.js","chunk-nU5620mN.js","chunk-Bh1X0--a.js","chunk-Br7K6EJO.js","chunk-CGd-uY3x.js","chunk-CmOPaNov.js","chunk-C3zyi6X6.js","chunk-DOebnhRz.js","chunk-yqeNYXbH.js","chunk-CG_wK_-W.js","chunk-i2ycf8WY.js","chunk-Dx2-dNbd.js","chunk-DDhk861e.js","chunk-Wi1hfKnY.js","chunk-BYPUwVJd.js","chunk-B0sWk9pb.js","chunk-xyBkudn9.js","chunk-CU_yc7c0.js","chunk-DHwB1DNv.js","chunk-C6X32c5Y.js","chunk-DxSMoRAg.js","chunk-COmCkMOw.js","chunk-D1rSZHoG.js","chunk-BFoDCU3G.js","chunk-C-OQMol4.js","chunk-BwpXVz85.js","chunk-BKQNYMf0.js","chunk-CQhDWCuO.js","chunk-CLNPO3K2.js","chunk-gyMXflOg.js","chunk-B6QMLbPb.js","chunk-CNECTSY3.js","chunk-BveIbUwm.js","chunk-Bz6J7zHc.js","chunk-DmCmlw77.js","chunk-BNE4vRAl.js","chunk-Dgyv2z85.js","chunk-BgAz67x8.js","chunk-DYSi9-67.js","chunk-PhC9V0kv.js","chunk-CNG5uajc.js","chunk-CWJTY3LS.js","chunk-BLYKMRgX.js","chunk-B-z83rju.js","chunk-DYi0PdOM.js","chunk-I02WWcy5.js","chunk-CVHEykQZ.js","chunk-Tk2BGjOK.js","chunk-745C7DWL.js","chunk-BhOdd-9U.js","chunk-2cPIwDyu.js","chunk-CVKo9lqM.js","chunk-IT8Wx1rP.js","chunk-BOGxj-MG.js","chunk-DecH1K7C.js","chunk-BFC1myXj.js","chunk-CqXMuRFL.js","chunk-Cuz7gAE5.js","chunk-DFxPlKZ4.js","chunk-Dlx_va8c.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunk-DdkvfxwB.js","chunk-DsF7k-Jl.js","chunk-BWjKdrB5.js","chunk-hePW80VL.js","chunk-CN9Gw02i.js","workspace.js","chunk-DxnpLefu.js","chunk-CndkgJPh.js","chunk-Cj8lEKkl.js","chunk-DJ4Pz6CG.js","chunk-B2kMZj3m.js","chunk-DN473Oml.js","chunk-DwZ_OKDV.js","chunk-CFLfawWY.js","chunk-Wc3Sd0cy.js","chunk-Dy-Kn_BL.js","chunk-CUxm3YXF.js","chunk-tz4nb_gp.js","chunk-BsaS8BTP.js","chunk-fybaL0A-.js","chunk-BifhSqXX.js","chunk-DS17s2tU.js","chunk-BvO9qrHb.js","chunk-nU5620mN.js","chunk-Bh1X0--a.js","chunk-Br7K6EJO.js","chunk-CGd-uY3x.js","chunk-CmOPaNov.js","chunk-C3zyi6X6.js","chunk-DOebnhRz.js","chunk-yqeNYXbH.js","chunk-CG_wK_-W.js","chunk-i2ycf8WY.js","chunk-Dx2-dNbd.js","chunk-DDhk861e.js","chunk-Wi1hfKnY.js","chunk-BYPUwVJd.js","chunk-B0sWk9pb.js","chunk-xyBkudn9.js","chunk-CU_yc7c0.js","chunk-DHwB1DNv.js","chunk-C6X32c5Y.js","chunk-DxSMoRAg.js","chunk-COmCkMOw.js","chunk-D1rSZHoG.js","chunk-BFoDCU3G.js","chunk-C-OQMol4.js","chunk-BwpXVz85.js","chunk-BKQNYMf0.js","chunk-CQhDWCuO.js","chunk-CLNPO3K2.js","chunk-gyMXflOg.js","chunk-B6QMLbPb.js","chunk-CNECTSY3.js","chunk-BveIbUwm.js","chunk-Bz6J7zHc.js","chunk-DmCmlw77.js","chunk-BNE4vRAl.js","chunk-Dgyv2z85.js","chunk-BgAz67x8.js","chunk-DYSi9-67.js","chunk-PhC9V0kv.js","chunk-CNG5uajc.js","chunk-CWJTY3LS.js","chunk-BLYKMRgX.js","chunk-B-z83rju.js","chunk-DYi0PdOM.js","chunk-I02WWcy5.js","chunk-CVHEykQZ.js","chunk-Tk2BGjOK.js","chunk-745C7DWL.js","chunk-BhOdd-9U.js","chunk-2cPIwDyu.js","chunk-CVKo9lqM.js","chunk-IT8Wx1rP.js","chunk-BOGxj-MG.js","chunk-DecH1K7C.js","chunk-BFC1myXj.js","chunk-CqXMuRFL.js","chunk-Cuz7gAE5.js","chunk-DFxPlKZ4.js","chunk-Dlx_va8c.js"])))=>i.map(i=>d[i]);
2
2
  import{t as e}from"./workspace.js";import{n as t}from"./chunk-DsF7k-Jl.js";import{h as n,m as r,p as i}from"./chunk-BWjKdrB5.js";import{$ as a,C as o,E as s,I as c,L as l,N as u,P as d,Q as f,S as p,T as m,V as h,W as g,X as _,Z as v,_ as y,b,c as x,g as S,l as C,m as w,n as T,p as E,q as D,r as O,s as k,t as A,u as j,x as M}from"./chunk-CN9Gw02i.js";import{S as N,a as ee,d as P,f as F,g as I,h as L,i as R,o as te,v as ne,x as re,y as ie}from"./chunk-DJ4Pz6CG.js";import{r as ae}from"./chunk-DN473Oml.js";import{i as oe}from"./chunk-DwZ_OKDV.js";import"./chunk-CFLfawWY.js";import{a as se}from"./chunk-Wc3Sd0cy.js";import{i as ce,n as le,r as ue,t as de}from"./chunk-CUxm3YXF.js";import{a as fe,c as pe,i as z,l as B,n as me,r as he,s as ge,t as _e}from"./chunk-tz4nb_gp.js";import{t as ve}from"./chunk-DS17s2tU.js";import{n as ye,t as be}from"./chunk-nU5620mN.js";var xe=t(e=>{let{securityLevel:t}=M(),n=i(`body`);if(t===`sandbox`){let t=i(`#i${e}`).node()?.contentDocument??document;n=i(t.body)}return n.select(`#${e}`)},`selectSvgElement`);function Se(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Ce(e){if(e==null)return!0;if(re(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!N(e)&&!ne(e)&&!ie(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Se(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var we={common:k,getConfig:b,insertCluster:ye,insertEdge:z,insertEdgeLabel:fe,insertMarkers:ge,insertNode:ue,interpolateToCurve:P,labelHelper:se,log:r,positionEdgeLabel:pe},Te={},Ee=t(e=>{for(let t of e)Te[t.name]=t},`registerLayoutLoaders`);t(()=>{Ee([{name:`dagre`,loader:t(async()=>await e(()=>import(`./chunk-DdkvfxwB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./chunk-Bh1X0--a.js`),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,23])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./chunk-Br7K6EJO.js`),__vite__mapDeps([25,3,1,2,26])),`loader`)}])},`registerDefaultLayoutLoaders`)();var De=t(async(e,t)=>{if(!(e.layoutAlgorithm in Te))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=Te[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,we,{algorithm:n.algorithm})},`render`),Oe=t((e=``,{fallback:t=`dagre`}={})=>{if(e in Te)return e;if(t in Te)return r.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);function ke(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(ke,`createLayoutElementGroups`);async function Ae(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await se(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(Ae,`measureGroupLabel`);async function je(e,t,n){let r=await ue(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(je,`insertMeasuredNode`);async function Me(t,n){let r=new ve({multigraph:!0,compound:!0}),i=[...n.edges],a=M(),o=ke(t),{edgeLabels:s,nodes:c}=o,l=new Map,u=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)u&&await Ae(c,e),r.setNode(e.id,{...e});else{if(u){let t=await je(c,e,{config:a,dir:e.dir});l.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of i)u&&he(e)&&await fe(s,e),r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./chunk-CmOPaNov.js`);return{captureNodeSizes:e}},__vite__mapDeps([27,1]));r(t,n)}return{graph:r,groups:o,nodeElements:l}}t(Me,`createGraphWithElements`);var V=new Map,H=new Map,Ne=new Map,Pe=t(()=>{H.clear(),Ne.clear(),V.clear()},`clear`),Fe=t((e,t)=>{let n=H.get(t)||[];return r.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),Ie=t((e,t)=>{let n=H.get(t)||[];return r.info(`Descendants of `,t,` is `,n),r.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||Fe(e.v,t)||Fe(e.w,t)||n.includes(e.w):(r.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),Le=t((e,t,n,i)=>{r.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),r.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)Le(a,t,n,i);else{let o=t.node(a);r.info(`cp `,a,` to `,i,` with parent `,e),n.setNode(a,o),i!==t.parent(a)&&(r.debug(`Setting parent`,a,t.parent(a)),n.setParent(a,t.parent(a))),e!==i&&a!==e?(r.debug(`Setting parent`,a,e),n.setParent(a,e)):(r.info(`In copy `,e,`root`,i,`data`,t.node(e),i),r.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);r.debug(`Copying Edges`,s),s.forEach(a=>{r.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);r.info(`Edge data`,o,i);try{Ie(a,i)?(r.info(`Copying as `,a.v,a.w,o,a.name),n.setEdge(a.v,a.w,o,a.name),r.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):r.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){r.error(e)}})}r.debug(`Removing node`,a),t.removeNode(a)})},`copy`),Re=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)Ne.set(i,e),r=[...r,...Re(i,t)];return r},`extractDescendants`),ze=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),Be=t((e,t,n)=>{let i=t.children(e);if(r.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let r=Be(e,t,n),i=ze(t,n,r);if(r){if(i.length>0)a=r;else return r}}return a},`findNonClusterChild`),Ve=t(e=>!V.has(e)||!V.get(e).externalConnections?e:V.has(e)?V.get(e).id:e,`getAnchorId`),He=t((e,t)=>{if(!e||t>10){r.debug(`Opting out, no graph `);return}r.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(r.debug(`Cluster identified`,t,` Replacement id in edges: `,Be(t,e,t)),H.set(t,Re(t,e)),V.set(t,{id:Be(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),i=e.edges();n.length>0?(r.debug(`Cluster identified`,t,H),i.forEach(e=>{Fe(e.v,t)^Fe(e.w,t)&&(r.debug(`Edge: `,e,` leaves cluster `,t),r.debug(`Descendants of XXX `,t,`: `,H.get(t)),V.get(t).externalConnections=!0)})):r.debug(`Not a cluster `,t,H)});for(let t of V.keys()){let n=V.get(t).id,r=e.parent(n);r!==t&&V.has(r)&&!V.get(r).externalConnections&&(V.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&V.get(t)?.externalConnections&&i&&Ke(e,n,t)){let r=qe(e,t,e.parent(n));r&&(V.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);r.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),r.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(r.debug(`Fix XXX`,V,`ids:`,t.v,t.w,`Translating: `,V.get(t.v),` --- `,V.get(t.w)),V.get(t.v)||V.get(t.w)){if(r.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=Ve(t.v),a=Ve(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let r=e.parent(i);V.get(r).externalConnections=!0,n.fromCluster=t.v}if(a!==t.w){let r=e.parent(a);V.get(r).externalConnections=!0,n.toCluster=t.w}r.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,n,t.name)}}),Ue(e,0),r.trace(V)},`adjustClustersAndEdges`),Ue=t((e,t)=>{if(t>10){r.error(`Bailing out`);return}let n=e.nodes(),i=!1;for(let t of n){let n=e.children(t);i||=n.length>0}if(!i){r.debug(`Done, no node has children`,e.nodes());return}r.debug(`Nodes = `,n,t);for(let i of n)if(r.debug(`Extracting node`,i,V,V.has(i)&&!V.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!V.has(i))r.debug(`Not a cluster`,i,t);else if(!V.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.debug(`Cluster without external connections, without a parent and with children`,i,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;V.get(i)?.clusterData?.dir&&(n=V.get(i).clusterData.dir,r.debug(`Fixing dir`,V.get(i).clusterData.dir,n));let a=new ve({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Le(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:V.get(i).clusterData,label:V.get(i).label,graph:a})}else r.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!V.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),r.debug(V);n=e.nodes(),r.debug(`New list of nodes`,n);for(let i of n){let n=e.node(i);r.debug(` Now next level`,i,n),n?.clusterNode&&Ue(n.graph,t+1)}},`extractor`),We=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=We(e,e.children(t));n=[...n,...r]}),n},`sorter`),Ge=t(e=>We(e,e.children()),`sortNodesByHierarchy`),Ke=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=V.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),qe=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||Fe(i,n))continue;let r=Be(i,e,t);if(r&&!Ke(e,r,t))return r}return null},`findSafeAnchorNode`);function Je({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??Xe;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??ge)(u,t.markers,t.type,t.diagramId),Ye();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await Ze(t,m,o),await a?.(t,m,p)},`render`)}t(Je,`createCommonLayoutRenderer`);function Ye(){de(),_e(),be(),Pe()}t(Ye,`clearLayoutRenderState`);async function Xe(e,{element:t}){return await Me(t,e)}t(Xe,`defaultMeasureLayout`);async function Ze(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await Qe(i,r,t,n);let a=et(e.nodes);for(let r of e.edges)tt(r,n)||await nt(i,r,a,e,n,t)}t(Ze,`paintLayoutData`);async function Qe(e,t,n,r){t.clusterNode?ce(t):$e(t,n,r)?await ye(e.clusters,t):ce(t)}t(Qe,`paintLayoutNode`);function $e(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t($e,`shouldPaintAsCluster`);function et(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(et,`buildNodeLookup`);function tt(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(tt,`shouldSkipPaintEdge`);async function nt(e,t,n,r,i,a){let o=z(e.edgePaths,{...t},i.clusterDb??new Map,r.type,rt(t.start,t,n,a,i),rt(t.end,t,n,a,i),r.diagramId,it(t,i));he(t)&&(me.has(t.id)||await fe(e.edgeLabels,t),at(t,o))}t(nt,`paintLayoutEdge`);function rt(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(rt,`getRenderedNode`);function it(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(it,`shouldSkipIntersect`);function at(e,t){let n=t?.updatedPath??t?.originalPath,i=b(),{subGraphTitleTotalMargin:a}=le({flowchart:i.flowchart??{}});if(e.label){let i=me.get(e.id),o=e.x,s=e.y;if(n){let i=I.calcLabelPosition(n);r.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),t?.updatedPath&&(o=i.x,s=i.y)}i.attr(`transform`,`translate(${o}, ${s+a/2})`)}if(e?.startLabelLeft){let t=B.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=B.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=B.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=B.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}t(at,`positionRenderedEdgeLabel`);function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}t(ot,`getDefaultExportFromCjs`);var U={},st={},W={},ct;function G(){if(ct)return W;ct=1;function e(e){return e==null}t(e,`isNothing`);function n(e){return typeof e==`object`&&!!e}t(n,`isObject`);function r(t){return Array.isArray(t)?t:e(t)?[]:[t]}t(r,`toArray`);function i(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}t(i,`extend`);function a(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}t(a,`repeat`);function o(e){return e===0&&1/e==-1/0}return t(o,`isNegativeZero`),W.isNothing=e,W.isObject=n,W.toArray=r,W.repeat=a,W.isNegativeZero=o,W.extend=i,W}t(G,`requireCommon`);var lt,ut;function dt(){if(ut)return lt;ut=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
3
3
 
4
4
  `+e.mark.snippet),r+` `+n):r}t(e,`formatError`);function n(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return t(n,`YAMLException2`),n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=t(function(t){return this.name+`: `+e(this,t)},`toString`),lt=n,lt}t(dt,`requireException`);var ft,pt;function mt(){if(pt)return ft;pt=1;let e=G();function n(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}t(n,`getLine`);function r(t,n){return e.repeat(` `,n-t.length)+t}t(r,`padStart`);function i(t,i){if(i=Object.create(i||null),!t.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(t.buffer);)s.push(c.index),o.push(c.index+c[0].length),t.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(t.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=n(t.buffer,o[l-a],s[l-a],t.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+r((t.line-a+1).toString(),d)+` | `+c.str+`
@@ -0,0 +1 @@
1
+ var e=[{id:`active`,name:`Active`,action:`Move to active`},{id:`waiting`,name:`Waiting`,action:`Mark waiting`},{id:`done`,name:`Done`,action:`Mark done`}];function t(e){if(typeof e!=`object`||!e)return;let{state:t,at:n}=e;if(!(t!==`waiting`&&t!==`done`||typeof n!=`number`||!Number.isFinite(n)))return{state:t,at:n}}function n(t,n){if(!t)return;let r=i(t,n);return r===void 0?{text:e.find(e=>e.id===t.state).name,changed:!1}:{text:r,changed:!0}}function r(e,t){return!e||e.state===`waiting`&&a(e,t)?`active`:e.state}function i(e,t){if(!(!e||!a(e,t)))return e.state===`waiting`?`Changed while waiting`:`Changed since done`}function a(e,t){return t!==void 0&&t.kind!==`created`&&t.at>e.at}function o(e,t,n){return i(t,n)!==void 0||e!==(t?.state??`active`)}var s=[`pinned`,`active`,`waiting`,`done`];function c(e,t,n,i){return e&&!u(i)?`pinned`:r(t,n)}function l(e,t){let n=e=>s.indexOf(t(e));return[...e].sort((e,t)=>n(e)-n(t))}function u(e){return e===`queue`}function d(e,t,r){return e?n(t,r)?.text:i(t,r)}var f=[`all`,`queue`,`in-progress`,`complete`],p=[`any`,`open`,`merged`,`closed`],m=[`q`,`f`,`by`,`pr`,`page`];function h(e,t){let n=`${e} review${e===1?``:`s`}`;return e===t?n:`${n} · ${t} branch${t===1?``:`es`}`}function g(e,t,n){let r={pinned:{shown:[],total:0},active:{shown:[],total:0},waiting:{shown:[],total:0},done:{shown:[],total:0}};for(let i of e){let e=t(i),a=r[e];a.total<n[e]&&a.shown.push(i),a.total+=1}return r}function _(){return{pinned:15,active:15,waiting:15,done:15}}function v(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`f`)??``,r=t.get(`pr`)??``,i=new URLSearchParams;for(let[e,n]of t)!m.includes(e)&&/^[a-z][a-z0-9_-]*$/i.test(e)&&n!==``&&i.append(e,n);let a=i.toString();return{query:t.get(`q`)??``,filter:f.includes(n)?n:`all`,author:t.get(`by`)??``,pr:p.includes(r)?r:`any`,...a===``?{}:{extra:a}}}function y(e){let t=new URLSearchParams;e.query!==``&&t.set(`q`,e.query),e.filter!==`all`&&t.set(`f`,e.filter),e.author!==``&&t.set(`by`,e.author),e.pr!==`any`&&t.set(`pr`,e.pr);for(let[n,r]of new URLSearchParams(e.extra??``))m.includes(n)||t.append(n,r);let n=t.toString();return n===``?``:`#${n}`}function b(e,t){return t===`all`||t===`queue`||e.status===t}function x(e,t){return t===`any`||e.prState===t}function S(e,t){return t===``||e===t}function C(e){return e===`complete`?`Mark reviewed`:`Mark in progress`}function w(e){return e?`Unpin review`:`Pin review`}function T(e){return e?`Remove from review queue`:`Add to review queue`}function E(e,t){let n=t.query.trim().toLowerCase();return D(e.filter(e=>(!n||e.searchText.includes(n))&&b(e,t.filter)&&S(e.author,t.author)&&x(e,t.pr)),t.filter)}function D(e,t){return u(t)?e.filter(e=>e.queue!==void 0).sort((e,t)=>(e.queue??0)-(t.queue??0)):e}function O(e){return e===0?`Queue`:`Queue (${e})`}function k(e){return e===`complete`?`Reviewed`:e===`in-progress`?`In progress`:`New`}function A(e,t){if(e===0)return`Nothing selected`;let n=`${e} selected`;return t>0?`${n} · ${t} not shown`:n}function j(e){return e===0?`Select all`:`Select all ${e}`}function M(e){return e===0?`Delete`:`Delete ${e} review${e===1?``:`s`}`}function N(e){return`${M(e)}?`}function P(e,t,n){return e===``||t===``||t===e?`wait`:n?`hold`:`reload`}export{t as C,o as S,g as _,N as a,k as b,l as c,C as d,v as f,P as g,O as h,M as i,c as l,T as m,d as n,E as o,w as p,h as r,y as s,s as t,_ as u,j as v,n as x,A as y};
@@ -0,0 +1 @@
1
+ async function e(e,t){try{await navigator.clipboard.writeText(t);let n=e.textContent;e.textContent=`Copied`,window.setTimeout(()=>{e.textContent=n},1200)}catch{let n=document.createElement(`input`);n.type=`text`,n.readOnly=!0,n.value=t,n.className=`prb-menu-id`,n.setAttribute(`data-id-field`,``),e.after(n),n.select()}}function t(e){return e<3e4?1e3:e<12e4?3e3:e<6e5?8e3:15e3}var n=`Fetch selected`;function r(e){return`${e} ${e===1?`repository`:`repositories`}`}function i(e){return`Fetching ${r(e)}…`}function a(e){return e.fetched===0?`Could not fetch ${r(e.repositories)}`:e.fetched===e.repositories?`Fetched ${r(e.repositories)}`:`Fetched ${e.fetched} of ${r(e.repositories)}`}function o(e,t){let n=new Set,r=new Set;for(let i of e)for(let e of i.lineage){let i=t[e];i!==void 0&&(n.add(e),r.add(i))}return{ids:[...n],repositories:r.size}}function s(e,t){return o(t,e).repositories>0}export{i as a,a as i,s as n,t as o,o as r,e as s,n as t};
@@ -0,0 +1 @@
1
+ function e(e,t){e.addEventListener(`pageshow`,e=>{e.persisted&&t()})}var t=`prbNav`,n=`prb-workspace`,r=`prb-nav-session`,i=`prb-nav-head`,a=`prb-nav-handoff`,o=`prb-nav-places`,s=`unstored`;function c(e){if(!e||typeof e!=`object`)return null;let n=e[t];if(!n||typeof n!=`object`)return null;let{v:r,owner:i,session:a,idx:o,id:s,ui:c}=n;if(r!==1||i!==`prb-workspace`||typeof a!=`string`||a===``||typeof o!=`number`||!Number.isInteger(o)||o<0)return null;let l=c&&typeof c==`object`&&!Array.isArray(c)?c:null;return{v:r,owner:i,session:a,idx:o,...typeof s==`string`&&s!==``?{id:s}:{},ui:l}}function l(e){if(!e||typeof e!=`object`)return{};let{[t]:n,...r}=e;return r}function u(e,t){if(!e||typeof e!=`object`)return!1;let n=e;return n.owner===`prb-workspace`&&n.session===t}function d(e,t){try{return e?.getItem(t)??null}catch{return null}}function f(e,t,n){try{n===null?e?.removeItem(t):e?.setItem(t,n)}catch{}}function p(e){let{history:p,storage:m,location:h}=e,g=e.navigation??null,_=[],v=null,y=null,b=null,x=null,S=(()=>{if(!m)return s;let t=d(m,r);if(t)return t;let n=e.uuid();return f(m,r,n),d(m,r)===n?n:s})(),C=()=>`${h.pathname}${h.search}`,w=e=>`${C()}${e}`,T=()=>{try{g?.updateCurrentEntry({state:{owner:n,session:S}})}catch{}},E=()=>{for(let e of _)e()},D=(e,t)=>{t===void 0?p.replaceState(e,``):p.replaceState(e,``,t),T()},O=()=>Number(d(m,i)??0)||0,k=()=>{try{let e=JSON.parse(d(m,o)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}},A=(e,t)=>{if(!e||!m)return;let n=k();delete n[e],n[e]=t;let r=Object.keys(n);for(let e of r.slice(0,Math.max(0,r.length-200)))delete n[e];f(m,o,JSON.stringify(n))},j=e=>{if(!e)return null;let t=e.id?k()[e.id]:void 0;return t&&typeof t==`object`&&!Array.isArray(t)?t:e.ui},M=()=>{if(!v)return null;try{return v()}catch{return null}},N=()=>{let r=c(p.state);if(r&&r.session===S&&r.id){x=r.id,T();return}let o=r?.idx??0;if(!r){let t=d(m,a);f(m,a,null),o=0;try{let n=t?JSON.parse(t):null,r=e.referrer!==``&&new URL(e.referrer).origin===h.origin;n&&r&&n.session===S&&typeof n.idx==`number`&&typeof n.at==`number`&&e.now()-n.at<15e3&&(o=n.idx+1)}catch{o=0}f(m,i,String(o))}let s=r?.id??e.uuid();x=s;let u={v:1,owner:n,session:S,idx:o,id:s,ui:r?.ui??null};D({...l(p.state),[t]:u})},P=()=>c(p.state)??{v:1,owner:`prb-workspace`,session:S,idx:0,ui:null},F=()=>{b!==null&&(e.clearTimeout(b),b=null);let n=M();if(!n||!x)return;let r=JSON.stringify(n),i=c(p.state);if(!i||i.id!==x){A(x,n);return}(r!==y||JSON.stringify(i.ui)!==r)&&(y=r,A(x,n),D({...l(p.state),[t]:{...i,ui:n}}))},I=e=>{if(g){let t=g.currentEntry?.index;if(typeof t!=`number`||t<0)return!1;let n=g.entries()[t+e];if(!n)return!1;try{return u(n.getState(),S)}catch{return!1}}let t=c(p.state);return!t||t.session!==S||p.length<2?!1:e===-1?t.idx>0:t.idx<O()};N();try{p.scrollRestoration=`manual`}catch{}return{session:S,current(){return{route:l(p.state),ui:j(c(p.state))}},push(r,a){if(r!==``&&!r.startsWith(`#`))throw Error(`Workspace history pushes within this document only; "${r}" is not a fragment.`);if(w(r)===`${C()}${h.hash}`)return!1;F();let o=P().idx+1;f(m,i,String(o));let s=e.uuid(),c={v:1,owner:n,session:S,idx:o,id:s,ui:null};return x=s,p.pushState({...l(a),[t]:c},``,w(r)),y=null,T(),E(),!0},replace(e,n){if(e!==``&&!e.startsWith(`#`))throw Error(`Workspace history replaces within this document only; "${e}" is not a fragment.`);D({...l(n),[t]:P()},w(e))},setCapturer(e){v=e},captureNow:F,scheduleCapture(){b!==null&&e.clearTimeout(b),b=e.setTimeout(()=>{b=null,F()},250)},leaving(){F(),f(m,a,JSON.stringify({session:S,idx:P().idx,at:e.now()}))},canGoBack:()=>I(-1),canGoForward:()=>I(1),back(){return I(-1)?(F(),p.back(),!0):!1},forward(){return I(1)?(F(),p.forward(),!0):!1},moved(){b!==null&&(e.clearTimeout(b),b=null);let t=M();t&&A(x,t),y=null,x=c(p.state)?.id??null;let n=c(p.state);!n||!n.id||n.session!==S?N():T(),E()},onAvailability(e){_.push(e)}}}function m(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function h(e){let t=e?.userAgentData?.platform??e?.platform??``;return/mac|iphone|ipad/i.test(t)}function g(e){if(!e||typeof e.closest!=`function`)return!1;let t=e;return t.isContentEditable?!0:t.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"]`)!==null}function _(e,t,n){if(e.defaultPrevented||e.isComposing)return null;let r=t?e.metaKey:e.ctrlKey,i=t?e.ctrlKey:e.metaKey;if(!r||i||e.altKey||e.shiftKey)return null;let a=e.key===`[`||e.key!==`]`&&e.code===`BracketLeft`?`back`:e.key===`]`||e.code===`BracketRight`?`forward`:null;return!a||g(e.target)||n.querySelector(`dialog[open], [data-menu-panel]:not([hidden])`)?null:a}var v=[`data-id`,`data-finding-card`,`data-goto-section`,`data-view-nav`,`data-file`,`data-line`,`data-history`,`data-history-toggle`,`data-load-more`,`data-select`,`data-pin`,`data-focus-toggle`,`data-ask-toggle`,`data-rail-toggle`,`data-search`,`data-status-filter`,`data-author-filter`,`data-pr-filter`,`data-card`,`data-guide-section`,`data-guide-detail`,`data-view`];function y(e){if(e.id)return{attrs:[[`id`,e.id]]};let t=v.filter(t=>e.hasAttribute(t)).map(t=>[t,e.getAttribute(t)??``]);return t.length>0?{attrs:t}:null}function b(e,t){if(!e||e===t||!t.contains(e))return null;let n=[],r=e;for(;r&&r!==t&&n.length<3;){let t=y(r);t?n.unshift(t):r===e&&n.unshift({tag:r.tagName.toLowerCase(),...r.classList[0]?{cls:r.classList[0]}:{}}),r=r.parentElement}return n.length>0?n:null}function x(e){if(!e||typeof e!=`object`)return!1;let{attrs:t,tag:n,cls:r}=e;return t===void 0?typeof n==`string`&&/^[a-z][a-z0-9-]*$/.test(n)&&(r===void 0||typeof r==`string`):Array.isArray(t)&&t.length>0&&t.every(e=>Array.isArray(e)&&e.length===2&&v.concat(`id`).includes(e[0])&&typeof e[1]==`string`)}function S(e,t){return t.attrs?t.attrs.every(([t,n])=>e.getAttribute(t)===n):e.tagName.toLowerCase()===t.tag&&(t.cls===void 0||e.classList.contains(t.cls))}function C(e,t){let n=t.attrs?`[${t.attrs[0][0]}]`:t.tag;for(let r of e.querySelectorAll(n))if(S(r,t))return r;return null}function w(e,t){if(!Array.isArray(t)||t.length===0||!t.every(x))return null;let n=null,r=e;for(let e of t){let t=C(r,e);if(!t)return n;n=t,r=t}return n}function T(e,t){let n=w(e,t);if(n){if(n.tabIndex<0&&!n.matches(`a[href], button, input, select, textarea, summary`)){n.querySelector(`a[href], button:not([disabled]), input, select, textarea, [tabindex="0"]`)?.focus({preventScroll:!0});return}n.focus({preventScroll:!0})}}function E(e,t){let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null}function D(e,t){let n=e?.[t];return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}function O(e){try{return e.sessionStorage}catch{return null}}function k(e,t){let n=e===`back`?`[`:`]`;return`${e===`back`?`Back`:`Forward`} (${t?`⌘${n}`:`Ctrl+${n}`})`}function A(e,t){if(e.target&&e.target!==`_self`||e.hasAttribute(`download`))return!1;let n;try{n=new URL(e.getAttribute(`href`)??``,t.href)}catch{return!1}return n.origin===t.origin?n.pathname!==t.pathname||n.search!==t.search:!1}function j(e,t){let n=e.querySelector(`[data-nav-announce]`);!n||!t||(n.textContent=``,e.defaultView?.setTimeout(()=>{n.textContent=t},50))}function M(e={},t=window,n=document){let r=t.navigation??null,i=p({history:t.history,navigation:r,storage:O(t),location:t.location,referrer:n.referrer,now:()=>Date.now(),uuid:()=>t.crypto?.randomUUID?.()??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,setTimeout:(e,n)=>t.setTimeout(e,n),clearTimeout:e=>t.clearTimeout(e)}),a=h(t.navigator),o=[...n.querySelectorAll(`[data-history]`)],s=()=>{for(let e of o)e.disabled=!((e.dataset.history===`forward`?`forward`:`back`)==`back`?i.canGoBack():i.canGoForward())};for(let e of o){let t=e.dataset.history===`forward`?`forward`:`back`;e.dataset.tip=k(t,a),e.addEventListener(`click`,()=>{t===`back`?i.back():i.forward()})}s(),i.onAvailability(s),r?.addEventListener?.(`currententrychange`,s),t.addEventListener(`keydown`,e=>{let t=_(e,a,n);t&&(e.preventDefault(),t===`back`?i.back():i.forward())}),t.addEventListener(`popstate`,()=>i.moved()),t.addEventListener(`pagehide`,()=>i.captureNow()),n.addEventListener(`visibilitychange`,()=>{n.visibilityState===`hidden`&&i.captureNow()}),n.addEventListener(`click`,e=>{let n=e.target?.closest?.(`a[href]`);!n||!m(e)||e.defaultPrevented||A(n,t.location)&&i.leaving()},!0),n.addEventListener(`pointerdown`,e=>{(e.button===3||e.button===4)&&i.captureNow()},!0);let c=()=>i.scheduleCapture();for(let e of[`scroll`,`click`,`input`,`toggle`,`focusin`])n.addEventListener(e,c,{capture:!0,passive:!0});if(!e.ownsRestore){let e=n.querySelector(`.prb-shell > main`);i.setCapturer(()=>({main:e?.scrollTop??0,focus:b(n.activeElement,n.body)}));let{ui:t}=i.current(),r=E(t,`main`);e&&r!==null&&(e.scrollTop=r),t&&T(n,t.focus)}return i}function N(e){return`${e} more`}function P(e){return e===0?`Nothing unread`:`${e} unread`}function F(e){return e===`restarting`?`Workspace server restarting`:e===`unreachable`?`Workspace server not running`:`Workspace server running`}function I(e,t){let n=e.querySelector(`[data-server-status]`);if(!n)return;n.dataset.serverStatus=t;let r=n.querySelector(`[data-server-status-label]`);r&&(r.textContent=F(t))}function L(e,t){let n=e.querySelector(`[data-server-status]`);!n||n.dataset.serverStatus===`restarting`||I(e,t?`running`:`unreachable`)}var R=6e3,z=5e3;function B(e=document){let t=e.querySelector(`.prb-toasts`);if(t)return t;let n=e.createElement(`div`);return n.className=`prb-toasts`,n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),e.body.append(n),n}function V(e,t,n=window){return H(e,{kind:t.kind,text:t.text},n)}function H(e,t,n){let r=e.ownerDocument,i=r.createElement(`div`);i.className=`prb-toast`,i.dataset.kind=t.kind;let a=r.createElement(`span`);a.className=`prb-toast-text`,a.textContent=t.text;let o=r.createElement(`a`);o.className=`prb-toast-open`,t.href!==void 0&&t.link!==void 0&&(o.href=t.href,o.textContent=t.link);let s=r.createElement(`button`);for(s.type=`button`,s.className=`prb-toast-close`,s.setAttribute(`aria-label`,`Dismiss: ${t.text}`),s.textContent=`×`,i.append(a,...t.href===void 0?[]:[o],s),e.append(i);e.children.length>3;)e.firstElementChild?.remove();let c=n.setTimeout(()=>i.remove(),R),l=()=>n.clearTimeout(c),u=()=>{n.clearTimeout(c),c=n.setTimeout(()=>i.remove(),R)};return i.addEventListener(`mouseenter`,l),i.addEventListener(`mouseleave`,u),i.addEventListener(`focusin`,l),i.addEventListener(`focusout`,u),s.addEventListener(`click`,()=>{n.clearTimeout(c),i.remove()}),i}function U(e,t,n=window){return H(e,{kind:t.tone,text:t.headline,href:`/notifications/open?id=${encodeURIComponent(t.id)}`,link:`Open`},n)}function W(e,t,n=window){return H(e,{kind:`more`,text:N(t),href:`/notifications`,link:`View all`},n)}function G(e=document,t=window){let n=Number(e.body.dataset.notificationsSince);if(!Number.isFinite(n)||n<=0)return;let r=B(e),i=async()=>{try{let i=await t.fetch(`/notifications/recent?after=${n}`);if(L(e,!0),i.status===403)return;if(i.ok){let e=await i.json();typeof e.now==`number`&&(n=e.now);for(let n of[...e.notifications??[]].reverse())U(r,n,t);typeof e.more==`number`&&e.more>0&&W(r,e.more,t)}}catch{L(e,!1)}t.setTimeout(()=>void i(),z)};t.setTimeout(()=>void i(),z)}function K(e,t){if(typeof t==`number`)for(let n of e.querySelectorAll(`[data-unread-count]`))n.dataset.unreadStyle===`rail`&&(n.textContent=t===0?``:P(t)),n.hidden=t===0}function q(e,t){K(e,t.unread),typeof t.driving==`boolean`&&J(e,t.driving)}function J(e,t){let n=e.querySelector(`[data-restart]`),r=e.querySelector(`[data-restart-note]`);n&&(n.disabled=t),r&&(r.hidden=!t)}var Y=`prb-server-restarted`;function X(e=document,t=window){let n=null;try{n=t.sessionStorage.getItem(Y),t.sessionStorage.removeItem(Y)}catch{}n!==null&&V(B(e),{kind:`ready`,text:`Server restarted. Workspace is back online.`},t)}var Z=2e4,Q=300;function ee(e){X();let t=document.querySelector(`[data-restart]`),n=document.querySelector(`[data-restart-note]`);t&&t.addEventListener(`click`,()=>{t.disabled=!0,te(e,t,n)})}async function te(e,t,n){let r;try{let i=await fetch(e,{method:`POST`});if(i.status===409){J(document,!0);return}if(!i.ok)return void $(t,n,await ie(i));let a=await i.json();r=typeof a.startedAt==`number`?a.startedAt:null}catch{$(t,n,`The workspace server could not be reached.`);return}if(document.body.dataset.restarting=`true`,I(document,`restarting`),await ne(r)){try{window.sessionStorage.setItem(Y,`1`)}catch{}window.location.reload();return}if(delete document.body.dataset.restarting,await re()){I(document,`running`),$(t,n,`The server did not restart, and is still the one that was running.`);return}I(document,`unreachable`),$(t,n,`Server restart failed. Run prreviewbuddy open to start the workspace again.`)}async function ne(e){let t=Date.now()+Z;for(;Date.now()<t;){await new Promise(e=>setTimeout(e,Q));try{let t=await fetch(`/health`,{cache:`no-store`});if(!t.ok)continue;let n=await t.json();if(typeof n.startedAt==`number`&&n.startedAt!==e)return!0}catch{}}return!1}async function re(){try{return(await fetch(`/health`,{cache:`no-store`})).ok}catch{return!1}}async function ie(e){try{return(await e.json()).error??`The server could not be restarted.`}catch{return`The server could not be restarted.`}}function $(e,t,n){e.disabled=!1,t&&(t.textContent=n,t.hidden=!1)}export{D as _,G as a,I as c,M as d,b as f,l as g,T as h,V as i,P as l,E as m,q as n,B as o,m as p,K as r,L as s,ee as t,j as u,e as v};
package/static/help.js CHANGED
@@ -1 +1 @@
1
- import{t as e,u as t}from"./chunk-B5CvMZtt.js";e(`/restart`),t(window,()=>window.location.reload());
1
+ import{d as e,t,v as n}from"./chunk-DxnpLefu.js";e(),t(`/restart`),n(window,()=>window.location.reload());
@@ -1 +1 @@
1
- import{l as e,r as t,t as n,u as r}from"./chunk-B5CvMZtt.js";function i(e,t,n){let r=[...e.querySelectorAll(`[data-notification-id]`)];r.forEach((e,t)=>{e.hidden=t>=n}),t&&(t.hidden=r.length<=n)}function a(e){let t=e.querySelector(`[data-notifications-more]`),n=15;i(e,t,n),t?.addEventListener(`click`,()=>{n+=15,i(e,t,n)})}n(`/restart`),a(document);var o=document.querySelector(`[data-notifications-count]`),s=document.querySelector(`[data-notifications-read-all]`);async function c(){try{let e=await fetch(`/notifications`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`read-all`})});if(!e.ok)return null;let t=await e.json();return typeof t.unread==`number`?t.unread:null}catch{return null}}function l(e){e.setAttribute(`data-read`,`true`);let t=e.querySelector(`.prb-notification-open`),n=t?.getAttribute(`aria-label`);t&&n?.startsWith(`Unread. `)&&t.setAttribute(`aria-label`,n.slice(8))}s?.addEventListener(`click`,()=>{s.disabled=!0,c().then(n=>{if(n===null){s.disabled=!1;return}document.querySelectorAll(`[data-notification-id]`).forEach(l),o&&(o.textContent=e(n)),t(document,n),s.disabled=n===0})}),r(window,()=>window.location.reload());
1
+ import{d as e,l as t,r as n,t as r,v as i}from"./chunk-DxnpLefu.js";function a(e,t,n){let r=[...e.querySelectorAll(`[data-notification-id]`)];r.forEach((e,t)=>{e.hidden=t>=n}),t&&(t.hidden=r.length<=n)}function o(e){let t=e.querySelector(`[data-notifications-more]`),n=15;a(e,t,n),t?.addEventListener(`click`,()=>{n+=15,a(e,t,n)})}e(),r(`/restart`),o(document);var s=document.querySelector(`[data-notifications-count]`),c=document.querySelector(`[data-notifications-read-all]`);async function l(){try{let e=await fetch(`/notifications`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`read-all`})});if(!e.ok)return null;let t=await e.json();return typeof t.unread==`number`?t.unread:null}catch{return null}}function u(e){e.setAttribute(`data-read`,`true`);let t=e.querySelector(`.prb-notification-open`),n=t?.getAttribute(`aria-label`);t&&n?.startsWith(`Unread. `)&&t.setAttribute(`aria-label`,n.slice(8))}c?.addEventListener(`click`,()=>{c.disabled=!0,l().then(e=>{if(e===null){c.disabled=!1;return}document.querySelectorAll(`[data-notification-id]`).forEach(u),s&&(s.textContent=t(e)),n(document,e),c.disabled=e===0})}),i(window,()=>window.location.reload());
package/static/reviews.js CHANGED
@@ -1 +1 @@
1
- import{a as e,i as t,n,o as r,s as i,t as a,u as o}from"./chunk-B5CvMZtt.js";import{a as s,c,i as ee,n as l,o as te,r as ne,s as re,t as ie}from"./chunk-RriGSD6H.js";import{C as ae,S as oe,_ as se,a as ce,b as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,l as ge,m as _e,n as ve,o as ye,r as be,s as xe,t as u,u as d,v as Se,y as Ce}from"./chunk-BpiqRF0Y.js";function we(e,t){t.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)})}async function Te(e,t,n){if(e.disabled)return;let r=e.getAttribute(`aria-pressed`)!==`true`;Ee(e,r),e.disabled=!0;let i=await t(r).catch(()=>!1);if(e.disabled=!1,!i)return Ee(e,!r);n(r)}function Ee(e,t){e.setAttribute(`aria-pressed`,String(t)),e.innerHTML=t?`&#9733;`:`&#9734;`,e.setAttribute(`aria-label`,`${t?`Unpin`:`Pin`} this review`)}a(`/restart`);var f=[...document.querySelectorAll(`[data-card]`)].sort((e,t)=>Number(e.dataset.rank)-Number(t.dataset.rank)),De=Object.fromEntries(u.map(e=>[e,document.querySelector(`[data-cards="${e}"]`)])),p=document.querySelector(`.prb-index`);function Oe(e){return{id:e.dataset.id??``,queue:e.dataset.queue===void 0?void 0:Number(e.dataset.queue),status:e.dataset.status??`new`,prState:e.dataset.prState}}var m=document.querySelector(`[data-search]`),h=document.querySelector(`[data-status-filter]`),g=document.querySelector(`[data-author-filter]`),_=document.querySelector(`[data-pr-filter]`),v=document.querySelector(`[data-no-matches]`),y=document.querySelector(`[data-count]`),b=d();function x(e){return{stored:ae({state:e.dataset.lifecycle,at:Number(e.dataset.lifecycleAt)}),activity:{at:Number(e.dataset.activityAt??0),kind:e.dataset.activityKind??`created`}}}function S(e){return e.dataset.pinned===`true`}function C(e){let{stored:t,activity:n}=x(e);return ge(S(e),t,n,k.filter)}var w=document.querySelector(`[data-bulk]`),ke=document.querySelector(`[data-bulk-count]`),Ae=document.querySelector(`[data-bulk-delete]`),je=document.querySelector(`[data-bulk-question]`),T=document.querySelector(`[data-bulk-confirm]`),E=document.querySelector(`[data-bulk-actions]`),D=document.querySelector(`[data-bulk-error]`),O=document.querySelector(`[data-bulk-select-all]`),k=fe(window.location.hash),A=new Set,j=!1,M=document.querySelector(`[data-bulk-fetch]`),N={},P=[],F=!1;function I(){let e=k.query.trim().toLowerCase();k.author!==``&&![...g?.options??[]].some(e=>e.value===k.author)&&(k.author=``);let t=ue(ye(f.map(e=>({...Oe(e),searchText:e.dataset.searchText??``,author:e.dataset.author,card:e})),{...k,query:e}).map(e=>e.card),C);P=t;let n=se(t,C,b),r=new Set(u.flatMap(e=>n[e].shown));for(let e of f)e.hidden=!r.has(e);for(let e of u){let t=De[e];t&&we(t,n[e].shown);let r=document.querySelector(`[data-load-more="${e}"]`);r&&(r.hidden=n[e].total<=n[e].shown.length);let i=document.querySelector(`[data-section="${e}"]`);i&&(i.hidden=n[e].total===0);let a=i?.querySelector(`[data-section-count]`);a&&(a.textContent=String(n[e].total))}if(m&&m.value!==k.query&&(m.value=k.query),g&&(g.value=k.author,k.author===``?delete g.dataset.active:g.dataset.active=``),_||(k.pr=`any`),_&&(_.value=k.pr,k.pr===`any`?delete _.dataset.active:_.dataset.active=``),h&&(h.value=k.filter,k.filter===`all`?delete h.dataset.active:h.dataset.active=``),y){let e=t.reduce((e,t)=>e+Number(t.dataset.reviews??1),0);y.textContent=be(e,t.length)}v&&(v.hidden=t.length>0||f.length===0),Fe(t)}function L(e,t){k={...k,...e},b=d(),I();let n=`${window.location.pathname}${window.location.search}${xe(k)}`;t===`push`?window.history.pushState(null,``,n):window.history.replaceState(null,``,n)}m?.addEventListener(`input`,()=>L({query:m.value},`replace`)),m?.addEventListener(`keydown`,e=>{e.key===`Escape`&&m.value!==``&&(e.preventDefault(),L({query:``},`replace`))}),h?.addEventListener(`change`,()=>{L({filter:h.value},`push`)}),g?.addEventListener(`change`,()=>{L({author:g.value},`push`)}),_?.addEventListener(`change`,()=>{L({pr:_.value},`push`)}),document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-load-more]`)?.dataset.loadMore;!t||!u.includes(t)||(b={...b,[t]:b[t]+15},I())});for(let e of[`popstate`,`hashchange`])window.addEventListener(e,()=>{k=fe(window.location.hash),b=d(),I()});document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-pin]`);if(!t?.dataset.pin)return;e.preventDefault(),e.stopPropagation();let n=t.dataset.pin;Te(t,e=>fetch(`/pin`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,pinned:e})}).then(e=>e.ok),e=>{let n=t.closest(`[data-card]`);n&&(n.dataset.pinned=String(e),q(n),I())})});async function Me(e,t){let n;try{let r=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:e,action:t})});if(!r.ok)return;n=(await r.json()).queue}catch{return}R(n),I()}function R(e){let t=new Map(e.map((e,t)=>[e,t]));for(let e of f){let n=t.get(e.dataset.id??``);n===void 0?delete e.dataset.queue:e.dataset.queue=String(n),n!==void 0&&e.dataset.lifecycle!==`active`&&(e.dataset.lifecycle=`active`,delete e.dataset.lifecycleAt,q(e))}for(let e of document.querySelectorAll(`[data-queue-action][data-queue-id]`)){let n=t.has(e.dataset.queueId??``);e.dataset.queueAction=n?`remove`:`add`,e.textContent=_e(n)}let n=document.querySelector(`[data-queue-option]`);n&&(n.textContent=me(e.length))}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-history-toggle]`);if(!t)return;e.preventDefault(),e.stopPropagation();let n=t.parentElement?.querySelector(`[data-history-list]`);if(!n)return;let r=n.hidden;n.hidden=!r,t.setAttribute(`aria-expanded`,String(r))}),I();function z(e){for(let t of document.querySelectorAll(`[data-menu]`)){if(t===e)continue;let n=t.querySelector(`[data-menu-panel]`),r=t.querySelector(`[data-menu-trigger]`);n&&(n.hidden=!0),r?.setAttribute(`aria-expanded`,`false`),B(t)}}function B(e){let t=e.querySelector(`[data-menu-items]`),n=e.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!1),n&&(n.hidden=!0),e.querySelector(`[data-menu-error]`)?.remove(),e.querySelector(`[data-id-field]`)?.remove()}document.addEventListener(`keydown`,e=>{e.key===`Escape`&&z()}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`[data-menu]`);if(!n)return void z();let r=t.closest(`[data-menu-trigger]`);if(r){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-panel]`);if(!t)return;let i=t.hidden;z(n),B(n),t.hidden=!i,r.setAttribute(`aria-expanded`,String(i));return}let i=t.closest(`[data-copy-id]`);if(i?.dataset.copyId){e.preventDefault(),e.stopPropagation(),re(i,i.dataset.copyId);return}let a=t.closest(`[data-fetch-review]`);if(a?.dataset.fetchReview){e.preventDefault(),e.stopPropagation(),z();let t=a.closest(`[data-card]`);t&&Je([t]);return}let o=t.closest(`[data-mark-status]`);if(o?.dataset.markId){e.preventDefault(),e.stopPropagation(),z(),Be(o.dataset.markId,o.dataset.markStatus===`complete`);return}let s=t.closest(`[data-lifecycle-set]`);if(s?.dataset.lifecycleId){e.preventDefault(),e.stopPropagation(),z(),Ve([s.dataset.lifecycleId],s.dataset.lifecycleSet);return}let c=t.closest(`[data-queue-action]`);if(c?.dataset.queueId){e.preventDefault(),e.stopPropagation(),z(),Me(c.dataset.queueId,c.dataset.queueAction===`remove`?`remove`:`add`);return}if(t.closest(`[data-delete]`)){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-items]`),r=n.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!0),r&&(r.hidden=!1);return}if(t.closest(`[data-cancel-delete]`)){e.preventDefault(),e.stopPropagation(),B(n);return}if(t.closest(`[data-confirm-delete]`)){e.preventDefault(),e.stopPropagation(),Ne(n);return}e.preventDefault(),e.stopPropagation()});async function Ne(e){let t=e.querySelector(`[data-delete]`),n=t?.dataset.delete;if(!n)return;let r=e.querySelector(`[data-menu-confirm]`),i=e.querySelector(`[data-confirm-delete]`);i&&(i.disabled=!0,i.textContent=`Deleting`);try{let r=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,scope:t?.dataset.scope??`review`})});if(r.ok)return void window.location.reload();Pe(e,(await r.json().catch(()=>null))?.error??`That could not be deleted.`)}catch{Pe(e,`The workspace server did not answer. It may have stopped.`)}i&&(i.disabled=!1,i.textContent=`Delete`),r&&(r.hidden=!0);let a=e.querySelector(`[data-menu-items]`);a&&(a.hidden=!1)}function Pe(e,t){e.querySelector(`[data-menu-error]`)?.remove();let n=document.createElement(`p`);n.className=`prb-menu-error`,n.setAttribute(`data-menu-error`,``),n.textContent=t,e.querySelector(`[data-menu-panel]`)?.append(n)}function V(e){j=e,e||A.clear(),p&&(e?p.dataset.selecting=``:delete p.dataset.selecting),document.querySelector(`[data-select-mode]`)?.setAttribute(`aria-pressed`,String(e));for(let t of document.querySelectorAll(`.prb-card-link`))e?t.setAttribute(`aria-disabled`,`true`):t.removeAttribute(`aria-disabled`);H(),I()}function H(){T&&(T.hidden=!0),E&&(E.hidden=!1),D&&(D.hidden=!0,D.textContent=``)}function Fe(e){for(let e of f){let t=A.has(e.dataset.id??``),n=e.querySelector(`[data-select]`);n&&(n.checked=t),t?e.dataset.selected=``:delete e.dataset.selected}if(!w||(w.hidden=!j,!j))return;let t=new Set(e.filter(Ie).map(e=>e.dataset.id)),n=[...A].filter(e=>!t.has(e)).length;ke&&(ke.textContent=Ce(A.size,n)),O&&(O.textContent=Se(e.length),O.disabled=e.every(e=>A.has(e.dataset.id??``))),Ae&&(Ae.textContent=he(Le()));for(let e of w.querySelectorAll(`[data-bulk-mark], [data-bulk-lifecycle], [data-bulk-queue], [data-bulk-delete]`))e.disabled=A.size===0;M&&(M.hidden=!l(N,Y(W())))}function Ie(e){return!e.hidden&&e.closest(`details`)?.open!==!1}for(let e of document.querySelectorAll(`details[data-section]`))e.addEventListener(`toggle`,()=>Fe(P));document.querySelector(`[data-select-mode]`)?.addEventListener(`click`,()=>{V(!j)}),O?.addEventListener(`click`,()=>{for(let e of P)e.dataset.id&&A.add(e.dataset.id);H(),I()});function U(e){A.has(e)?A.delete(e):A.add(e),H(),I()}document.addEventListener(`change`,e=>{let t=e.target.closest(`[data-select]`);t?.dataset.select&&U(t.dataset.select)}),document.addEventListener(`click`,e=>{if(!j)return;let t=e.target,n=t.closest(`[data-card]`);n?.dataset.id&&(t.closest(`[data-select], [data-pin], [data-menu], [data-history-toggle]`)||(e.preventDefault(),U(n.dataset.id)))}),document.addEventListener(`keydown`,e=>{if(!j||e.key!==`Enter`)return;let t=e.target.closest(`.prb-card-link`)?.closest(`[data-card]`);t?.dataset.id&&(e.preventDefault(),U(t.dataset.id))});function W(){return ue(f.filter(e=>A.has(e.dataset.id??``)),C)}function Le(){return W().reduce((e,t)=>e+Number(t.dataset.reviews??1),0)}function G(e){D&&(D.textContent=e,D.hidden=!1)}function K(e){for(let t of w?.querySelectorAll(`button`)??[])t.disabled=e}async function Re(e){let t=[...A];if(t.length!==0){K(!0);try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:t,complete:e})})).ok)return K(!1),G(`That could not be saved. The workspace server refused it.`)}catch{return K(!1),G(`The workspace server did not answer. It may have stopped.`)}ze(W(),e),K(!1),V(!1)}}function ze(e,t){let n=t?`complete`:`in-progress`,r=t?`in-progress`:`complete`;for(let t of e){t.dataset.status=n;let e=t.querySelector(`.prb-card-status`);e&&(e.dataset.status=n,e.textContent=le(n));let i=t.querySelector(`[data-mark-status]`);i&&(i.dataset.markStatus=r,i.textContent=de(r))}}async function Be(e,t){try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:[e],complete:t})})).ok)return}catch{return}ze(f.filter(t=>t.dataset.id===e),t),I()}async function Ve(e,t){let n;try{let r=await fetch(`/lifecycle`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,state:t})});n=r.ok?await r.json().catch(()=>null):null}catch{n=null}if(!n)return!1;let r=new Set(e);for(let e of f)r.has(e.dataset.id??``)&&(e.dataset.lifecycle=t,t===`active`?delete e.dataset.lifecycleAt:e.dataset.lifecycleAt=String(n.at),q(e));return R(n.queue),I(),!0}function q(e){let{stored:t,activity:n}=x(e),r=e.querySelector(`[data-lifecycle-chip]`);if(r){let i=ve(S(e),t,n);r.textContent=i??``,r.hidden=i===void 0}for(let r of e.querySelectorAll(`[data-lifecycle-set]`))r.hidden=!oe(r.dataset.lifecycleSet,t,n)}async function He(e){let t=[...A];if(t.length===0)return;K(!0);let n=await Ve(t,e);if(K(!1),!n)return G(`That could not be saved. The workspace server refused it or did not answer.`);V(!1)}async function Ue(){let e=[...A];if(e.length===0)return;K(!0);let t=null;try{let n=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e})});if(t=n.ok?await n.json().catch(()=>null):null,!t)return K(!1),H(),G(`Nothing was deleted. The workspace server refused it.`)}catch{return K(!1),H(),G(`The workspace server did not answer. It may have stopped.`)}let n=t.blocked??[],r=new Set(n.map(e=>e.id));for(let e of W())r.has(e.dataset.id??``)||e.remove();f=f.filter(e=>e.isConnected),A.clear();for(let e of r)A.add(e);if(K(!1),H(),n.length===0)return V(!1);I(),G([...new Set(n.map(e=>e.error))].join(` `))}async function We(){let e=W().map(e=>e.dataset.id??``).filter(Boolean);if(e.length===0)return;K(!0);let t=null;try{let n=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,action:`add`})});t=n.ok?await n.json().catch(()=>null):null}catch{return K(!1),H(),G(`The workspace server did not answer. It may have stopped.`)}if(!t?.queue)return K(!1),H(),G(`Nothing was added. The workspace server refused it.`);R(t.queue);let n=t.refused??[];A.clear();for(let e of n)A.add(e.id);if(K(!1),H(),n.length===0)return V(!1);I(),G([...new Set(n.map(e=>e.error))].join(` `))}w?.addEventListener(`click`,e=>{let t=e.target;if(t.closest(`[data-bulk-queue]`))return void We();let n=t.closest(`[data-bulk-mark]`);if(n)return void Re(n.dataset.bulkMark===`complete`);let r=t.closest(`[data-bulk-lifecycle]`);if(r)return void He(r.dataset.bulkLifecycle);if(t.closest(`[data-bulk-delete]`)){je&&(je.textContent=ce(Le())),E&&(E.hidden=!0),T&&(T.hidden=!1);return}if(t.closest(`[data-bulk-confirm-delete]`))return void Ue();if(t.closest(`[data-bulk-cancel-delete]`))return H();if(t.closest(`[data-bulk-cancel]`))return V(!1)}),o(window,()=>window.location.reload()),c(window,document.querySelector(`.prb-shell > main`));var J=`prb-fetch-summary`;function Y(e){return e.map(e=>({lineage:(e.dataset.lineage??e.dataset.id??``).split(` `).filter(Boolean)}))}function Ge(e){return ne(Y(e),N)}function Ke(){for(let e of f){let t=e.querySelector(`[data-fetch-review]`);t&&(t.hidden=!l(N,Y([e])))}}async function qe(){try{let e=await fetch(`/fetch-updates`);if(!e.ok)return;N=(await e.json()).targets??{}}catch{return}Ke(),I()}async function Je(e,n){let i=Ge(e);if(F||i.repositories===0)return;F=!0;let a=[M,...document.querySelectorAll(`[data-fetch-review]`)];for(let e of a)e&&(e.disabled=!0);n&&(n.textContent=s(i.repositories));let o=null;try{let e=await fetch(`/fetch-updates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:i.ids})});e.ok&&(o=await e.json())}catch{}F=!1;for(let e of a)e&&(e.disabled=!1);n&&(n.textContent=ie),I();let c=o??{repositories:i.repositories,fetched:0,failed:[],moved:0},l={kind:c.fetched<c.repositories?`failed`:`ready`,text:ee(c)};if(c.moved>0||Z){try{window.sessionStorage.setItem(J,JSON.stringify(l))}catch{}if(!Q())return void window.location.reload();Z=!0}t(r(),l)}try{let e=window.sessionStorage.getItem(J);if(e){window.sessionStorage.removeItem(J);let n=JSON.parse(e);typeof n.kind==`string`&&typeof n.text==`string`&&t(r(),{kind:n.kind,text:n.text})}}catch{}M?.addEventListener(`click`,()=>void Je(W(),M)),qe();var Ye=document.body.dataset.indexRevision??``,X=document.body.dataset.live===`true`?Date.now():0,Z=!1;function Q(){return A.size>0||document.activeElement===m||F}function Xe(){Z&&!Q()&&window.location.reload()}async function $(){try{let e=await fetch(`/revision`);if(e.ok){i(document,!0);let t=await e.json();n(document,t),t.live&&X===0&&(X=Date.now()),t.live||(X=0);let r=pe(Ye,t.revision??``,Q());if(r===`reload`)return void window.location.reload();r===`hold`&&(Z=!0)}}catch{i(document,!1)}window.setTimeout(()=>void $(),te(X===0?2**53-1:Date.now()-X))}$(),m?.addEventListener(`blur`,Xe),document.addEventListener(`click`,()=>window.setTimeout(Xe,0)),e();
1
+ import{_ as e,a as t,d as n,f as r,h as i,i as a,m as o,n as s,o as c,s as ee,t as te,v as ne}from"./chunk-DxnpLefu.js";import{a as re,i as ie,n as ae,o as oe,r as se,s as ce,t as le}from"./chunk-CndkgJPh.js";import{C as ue,S as de,_ as fe,a as pe,b as me,c as he,d as ge,f as _e,g as ve,h as ye,i as be,l as xe,m as Se,n as Ce,o as we,r as Te,s as Ee,t as l,u,v as De,y as Oe}from"./chunk-Cj8lEKkl.js";function ke(e,t){t.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)})}async function Ae(e,t,n){if(e.disabled)return;let r=e.getAttribute(`aria-pressed`)!==`true`;je(e,r),e.disabled=!0;let i=await t(r).catch(()=>!1);if(e.disabled=!1,!i)return je(e,!r);n(r)}function je(e,t){e.setAttribute(`aria-pressed`,String(t)),e.innerHTML=t?`&#9733;`:`&#9734;`,e.setAttribute(`aria-label`,`${t?`Unpin`:`Pin`} this review`)}function Me(e,t){let n=e.parentElement?.querySelector(`[data-history-list]`);n&&(n.hidden=!t,e.setAttribute(`aria-expanded`,String(t)))}function Ne(e,t,n,i){return{limits:n,expanded:t.filter(e=>e.querySelector(`[data-history-list]:not([hidden])`)).map(e=>e.dataset.id??``).filter(e=>e!==``),main:i?.scrollTop??0,focus:r(e.activeElement,e.body)}}function Pe(e,t){let n=e?.limits;if(!n||typeof n!=`object`)return t;let r={...t};for(let e of l){let t=n[e];typeof t==`number`&&Number.isInteger(t)&&t>r[e]&&(r[e]=t)}return r}function Fe(t,n,r){if(!n)return;r.reveal(Pe(n,r.limits));let a=new Set(e(n,`expanded`));for(let e of r.cards){let t=e.querySelector(`[data-history-toggle]`);t&&a.has(e.dataset.id??``)&&Me(t,!0)}let s=o(n,`main`);r.pane&&s!==null&&(r.pane.scrollTop=s),i(t,n.focus)}var d=n({ownsRestore:!0});te(`/restart`);var f=[...document.querySelectorAll(`[data-card]`)].sort((e,t)=>Number(e.dataset.rank)-Number(t.dataset.rank)),Ie=Object.fromEntries(l.map(e=>[e,document.querySelector(`[data-cards="${e}"]`)])),p=document.querySelector(`.prb-index`);function Le(e){return{id:e.dataset.id??``,queue:e.dataset.queue===void 0?void 0:Number(e.dataset.queue),status:e.dataset.status??`new`,prState:e.dataset.prState}}var m=document.querySelector(`[data-search]`),h=document.querySelector(`[data-status-filter]`),g=document.querySelector(`[data-author-filter]`),_=document.querySelector(`[data-pr-filter]`),v=document.querySelector(`[data-no-matches]`),Re=document.querySelector(`[data-count]`),y=u();function ze(e){return{stored:ue({state:e.dataset.lifecycle,at:Number(e.dataset.lifecycleAt)}),activity:{at:Number(e.dataset.activityAt??0),kind:e.dataset.activityKind??`created`}}}function Be(e){return e.dataset.pinned===`true`}function b(e){let{stored:t,activity:n}=ze(e);return xe(Be(e),t,n,E.filter)}var x=document.querySelector(`[data-bulk]`),Ve=document.querySelector(`[data-bulk-count]`),He=document.querySelector(`[data-bulk-delete]`),Ue=document.querySelector(`[data-bulk-question]`),S=document.querySelector(`[data-bulk-confirm]`),C=document.querySelector(`[data-bulk-actions]`),w=document.querySelector(`[data-bulk-error]`),T=document.querySelector(`[data-bulk-select-all]`),E=_e(window.location.hash),D=new Set,O=!1,k=document.querySelector(`[data-bulk-fetch]`),A={},j=[],M=!1;function N(){let e=E.query.trim().toLowerCase();E.author!==``&&![...g?.options??[]].some(e=>e.value===E.author)&&(E.author=``);let t=he(we(f.map(e=>({...Le(e),searchText:e.dataset.searchText??``,author:e.dataset.author,card:e})),{...E,query:e}).map(e=>e.card),b);j=t;let n=fe(t,b,y),r=new Set(l.flatMap(e=>n[e].shown));for(let e of f)e.hidden=!r.has(e);for(let e of l){let t=Ie[e];t&&ke(t,n[e].shown);let r=document.querySelector(`[data-load-more="${e}"]`);r&&(r.hidden=n[e].total<=n[e].shown.length);let i=document.querySelector(`[data-section="${e}"]`);i&&(i.hidden=n[e].total===0);let a=i?.querySelector(`[data-section-count]`);a&&(a.textContent=String(n[e].total))}if(m&&m.value!==E.query&&(m.value=E.query),g&&(g.value=E.author,E.author===``?delete g.dataset.active:g.dataset.active=``),_||(E.pr=`any`),_&&(_.value=E.pr,E.pr===`any`?delete _.dataset.active:_.dataset.active=``),h&&(h.value=E.filter,E.filter===`all`?delete h.dataset.active:h.dataset.active=``),Re){let e=t.reduce((e,t)=>e+Number(t.dataset.reviews??1),0);Re.textContent=Te(e,t.length)}v&&(v.hidden=t.length>0||f.length===0),Xe(t)}var We=300,P=null;function F(){P!==null&&window.clearTimeout(P),P=null,d.replace(Ee(E),{})}function I(e,t){if(E={...E,...e},y=u(),N(),t===`now`)return F();P!==null&&window.clearTimeout(P),P=window.setTimeout(F,We)}window.addEventListener(`pagehide`,()=>{P!==null&&F()}),document.addEventListener(`click`,e=>{P!==null&&e.target?.closest?.(`a[href]`)&&F()},!0),m?.addEventListener(`input`,()=>I({query:m.value},`settled`)),m?.addEventListener(`keydown`,e=>{e.key===`Escape`&&m.value!==``&&(e.preventDefault(),I({query:``},`now`))}),h?.addEventListener(`change`,()=>{I({filter:h.value},`now`)}),g?.addEventListener(`change`,()=>{I({author:g.value},`now`)}),_?.addEventListener(`change`,()=>{I({pr:_.value},`now`)}),document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-load-more]`)?.dataset.loadMore;!t||!l.includes(t)||(y={...y,[t]:y[t]+15},N())});for(let e of[`popstate`,`hashchange`])window.addEventListener(e,()=>{E=_e(window.location.hash),y=u(),N(),qe()});document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-pin]`);if(!t?.dataset.pin)return;e.preventDefault(),e.stopPropagation();let n=t.dataset.pin;Ae(t,e=>fetch(`/pin`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,pinned:e})}).then(e=>e.ok),e=>{let n=t.closest(`[data-card]`);n&&(n.dataset.pinned=String(e),q(n),N())})});async function Ge(e,t){let n;try{let r=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:e,action:t})});if(!r.ok)return;n=(await r.json()).queue}catch{return}L(n),N()}function L(e){let t=new Map(e.map((e,t)=>[e,t]));for(let e of f){let n=t.get(e.dataset.id??``);n===void 0?delete e.dataset.queue:e.dataset.queue=String(n),n!==void 0&&e.dataset.lifecycle!==`active`&&(e.dataset.lifecycle=`active`,delete e.dataset.lifecycleAt,q(e))}for(let e of document.querySelectorAll(`[data-queue-action][data-queue-id]`)){let n=t.has(e.dataset.queueId??``);e.dataset.queueAction=n?`remove`:`add`,e.textContent=Se(n)}let n=document.querySelector(`[data-queue-option]`);n&&(n.textContent=ye(e.length))}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-history-toggle]`);if(!t)return;e.preventDefault(),e.stopPropagation();let n=t.parentElement?.querySelector(`[data-history-list]`);n&&Me(t,n.hidden!==!1)});var Ke=document.querySelector(`.prb-shell > main`);function qe(){Fe(document,d.current().ui,{cards:f,pane:Ke,limits:y,reveal:e=>{y=e,N()}})}d.setCapturer(()=>Ne(document,f,y,Ke)),N(),qe();function R(e){for(let t of document.querySelectorAll(`[data-menu]`)){if(t===e)continue;let n=t.querySelector(`[data-menu-panel]`),r=t.querySelector(`[data-menu-trigger]`);n&&(n.hidden=!0),r?.setAttribute(`aria-expanded`,`false`),z(t)}}function z(e){let t=e.querySelector(`[data-menu-items]`),n=e.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!1),n&&(n.hidden=!0),e.querySelector(`[data-menu-error]`)?.remove(),e.querySelector(`[data-id-field]`)?.remove()}document.addEventListener(`keydown`,e=>{e.key===`Escape`&&R()}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`[data-menu]`);if(!n)return void R();let r=t.closest(`[data-menu-trigger]`);if(r){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-panel]`);if(!t)return;let i=t.hidden;R(n),z(n),t.hidden=!i,r.setAttribute(`aria-expanded`,String(i));return}let i=t.closest(`[data-copy-id]`);if(i?.dataset.copyId){e.preventDefault(),e.stopPropagation(),ce(i,i.dataset.copyId);return}let a=t.closest(`[data-fetch-review]`);if(a?.dataset.fetchReview){e.preventDefault(),e.stopPropagation(),R();let t=a.closest(`[data-card]`);t&&ct([t]);return}let o=t.closest(`[data-mark-status]`);if(o?.dataset.markId){e.preventDefault(),e.stopPropagation(),R(),tt(o.dataset.markId,o.dataset.markStatus===`complete`);return}let s=t.closest(`[data-lifecycle-set]`);if(s?.dataset.lifecycleId){e.preventDefault(),e.stopPropagation(),R(),K([s.dataset.lifecycleId],s.dataset.lifecycleSet);return}let c=t.closest(`[data-queue-action]`);if(c?.dataset.queueId){e.preventDefault(),e.stopPropagation(),R(),Ge(c.dataset.queueId,c.dataset.queueAction===`remove`?`remove`:`add`);return}if(t.closest(`[data-delete]`)){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-items]`),r=n.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!0),r&&(r.hidden=!1);return}if(t.closest(`[data-cancel-delete]`)){e.preventDefault(),e.stopPropagation(),z(n);return}if(t.closest(`[data-confirm-delete]`)){e.preventDefault(),e.stopPropagation(),Je(n);return}e.preventDefault(),e.stopPropagation()});async function Je(e){let t=e.querySelector(`[data-delete]`),n=t?.dataset.delete;if(!n)return;let r=e.querySelector(`[data-menu-confirm]`),i=e.querySelector(`[data-confirm-delete]`);i&&(i.disabled=!0,i.textContent=`Deleting`);try{let r=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,scope:t?.dataset.scope??`review`})});if(r.ok)return void window.location.reload();Ye(e,(await r.json().catch(()=>null))?.error??`That could not be deleted.`)}catch{Ye(e,`The workspace server did not answer. It may have stopped.`)}i&&(i.disabled=!1,i.textContent=`Delete`),r&&(r.hidden=!0);let a=e.querySelector(`[data-menu-items]`);a&&(a.hidden=!1)}function Ye(e,t){e.querySelector(`[data-menu-error]`)?.remove();let n=document.createElement(`p`);n.className=`prb-menu-error`,n.setAttribute(`data-menu-error`,``),n.textContent=t,e.querySelector(`[data-menu-panel]`)?.append(n)}function B(e){O=e,e||D.clear(),p&&(e?p.dataset.selecting=``:delete p.dataset.selecting),document.querySelector(`[data-select-mode]`)?.setAttribute(`aria-pressed`,String(e));for(let t of document.querySelectorAll(`.prb-card-link`))e?t.setAttribute(`aria-disabled`,`true`):t.removeAttribute(`aria-disabled`);V(),N()}function V(){S&&(S.hidden=!0),C&&(C.hidden=!1),w&&(w.hidden=!0,w.textContent=``)}function Xe(e){for(let e of f){let t=D.has(e.dataset.id??``),n=e.querySelector(`[data-select]`);n&&(n.checked=t),t?e.dataset.selected=``:delete e.dataset.selected}if(!x||(x.hidden=!O,!O))return;let t=new Set(e.filter(Ze).map(e=>e.dataset.id)),n=[...D].filter(e=>!t.has(e)).length;Ve&&(Ve.textContent=Oe(D.size,n)),T&&(T.textContent=De(e.length),T.disabled=e.every(e=>D.has(e.dataset.id??``))),He&&(He.textContent=be(Qe()));for(let e of x.querySelectorAll(`[data-bulk-mark], [data-bulk-lifecycle], [data-bulk-queue], [data-bulk-delete]`))e.disabled=D.size===0;k&&(k.hidden=!ae(A,Y(U())))}function Ze(e){return!e.hidden&&e.closest(`details`)?.open!==!1}for(let e of document.querySelectorAll(`details[data-section]`))e.addEventListener(`toggle`,()=>Xe(j));document.querySelector(`[data-select-mode]`)?.addEventListener(`click`,()=>{B(!O)}),T?.addEventListener(`click`,()=>{for(let e of j)e.dataset.id&&D.add(e.dataset.id);V(),N()});function H(e){D.has(e)?D.delete(e):D.add(e),V(),N()}document.addEventListener(`change`,e=>{let t=e.target.closest(`[data-select]`);t?.dataset.select&&H(t.dataset.select)}),document.addEventListener(`click`,e=>{if(!O)return;let t=e.target,n=t.closest(`[data-card]`);n?.dataset.id&&(t.closest(`[data-select], [data-pin], [data-menu], [data-history-toggle]`)||(e.preventDefault(),H(n.dataset.id)))}),document.addEventListener(`keydown`,e=>{if(!O||e.key!==`Enter`)return;let t=e.target.closest(`.prb-card-link`)?.closest(`[data-card]`);t?.dataset.id&&(e.preventDefault(),H(t.dataset.id))});function U(){return he(f.filter(e=>D.has(e.dataset.id??``)),b)}function Qe(){return U().reduce((e,t)=>e+Number(t.dataset.reviews??1),0)}function W(e){w&&(w.textContent=e,w.hidden=!1)}function G(e){for(let t of x?.querySelectorAll(`button`)??[])t.disabled=e}async function $e(e){let t=[...D];if(t.length!==0){G(!0);try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:t,complete:e})})).ok)return G(!1),W(`That could not be saved. The workspace server refused it.`)}catch{return G(!1),W(`The workspace server did not answer. It may have stopped.`)}et(U(),e),G(!1),B(!1)}}function et(e,t){let n=t?`complete`:`in-progress`,r=t?`in-progress`:`complete`;for(let t of e){t.dataset.status=n;let e=t.querySelector(`.prb-card-status`);e&&(e.dataset.status=n,e.textContent=me(n));let i=t.querySelector(`[data-mark-status]`);i&&(i.dataset.markStatus=r,i.textContent=ge(r))}}async function tt(e,t){try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:[e],complete:t})})).ok)return}catch{return}et(f.filter(t=>t.dataset.id===e),t),N()}async function K(e,t){let n;try{let r=await fetch(`/lifecycle`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,state:t})});n=r.ok?await r.json().catch(()=>null):null}catch{n=null}if(!n)return!1;let r=new Set(e);for(let e of f)r.has(e.dataset.id??``)&&(e.dataset.lifecycle=t,t===`active`?delete e.dataset.lifecycleAt:e.dataset.lifecycleAt=String(n.at),q(e));return L(n.queue),N(),!0}function q(e){let{stored:t,activity:n}=ze(e),r=e.querySelector(`[data-lifecycle-chip]`);if(r){let i=Ce(Be(e),t,n);r.textContent=i??``,r.hidden=i===void 0}for(let r of e.querySelectorAll(`[data-lifecycle-set]`))r.hidden=!de(r.dataset.lifecycleSet,t,n)}async function nt(e){let t=[...D];if(t.length===0)return;G(!0);let n=await K(t,e);if(G(!1),!n)return W(`That could not be saved. The workspace server refused it or did not answer.`);B(!1)}async function rt(){let e=[...D];if(e.length===0)return;G(!0);let t=null;try{let n=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e})});if(t=n.ok?await n.json().catch(()=>null):null,!t)return G(!1),V(),W(`Nothing was deleted. The workspace server refused it.`)}catch{return G(!1),V(),W(`The workspace server did not answer. It may have stopped.`)}let n=t.blocked??[],r=new Set(n.map(e=>e.id));for(let e of U())r.has(e.dataset.id??``)||e.remove();f=f.filter(e=>e.isConnected),D.clear();for(let e of r)D.add(e);if(G(!1),V(),n.length===0)return B(!1);N(),W([...new Set(n.map(e=>e.error))].join(` `))}async function it(){let e=U().map(e=>e.dataset.id??``).filter(Boolean);if(e.length===0)return;G(!0);let t=null;try{let n=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,action:`add`})});t=n.ok?await n.json().catch(()=>null):null}catch{return G(!1),V(),W(`The workspace server did not answer. It may have stopped.`)}if(!t?.queue)return G(!1),V(),W(`Nothing was added. The workspace server refused it.`);L(t.queue);let n=t.refused??[];D.clear();for(let e of n)D.add(e.id);if(G(!1),V(),n.length===0)return B(!1);N(),W([...new Set(n.map(e=>e.error))].join(` `))}x?.addEventListener(`click`,e=>{let t=e.target;if(t.closest(`[data-bulk-queue]`))return void it();let n=t.closest(`[data-bulk-mark]`);if(n)return void $e(n.dataset.bulkMark===`complete`);let r=t.closest(`[data-bulk-lifecycle]`);if(r)return void nt(r.dataset.bulkLifecycle);if(t.closest(`[data-bulk-delete]`)){Ue&&(Ue.textContent=pe(Qe())),C&&(C.hidden=!0),S&&(S.hidden=!1);return}if(t.closest(`[data-bulk-confirm-delete]`))return void rt();if(t.closest(`[data-bulk-cancel-delete]`))return V();if(t.closest(`[data-bulk-cancel]`))return B(!1)}),ne(window,()=>window.location.reload());var J=`prb-fetch-summary`;function Y(e){return e.map(e=>({lineage:(e.dataset.lineage??e.dataset.id??``).split(` `).filter(Boolean)}))}function at(e){return se(Y(e),A)}function ot(){for(let e of f){let t=e.querySelector(`[data-fetch-review]`);t&&(t.hidden=!ae(A,Y([e])))}}async function st(){try{let e=await fetch(`/fetch-updates`);if(!e.ok)return;A=(await e.json()).targets??{}}catch{return}ot(),N()}async function ct(e,t){let n=at(e);if(M||n.repositories===0)return;M=!0;let r=[k,...document.querySelectorAll(`[data-fetch-review]`)];for(let e of r)e&&(e.disabled=!0);t&&(t.textContent=re(n.repositories));let i=null;try{let e=await fetch(`/fetch-updates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:n.ids})});e.ok&&(i=await e.json())}catch{}M=!1;for(let e of r)e&&(e.disabled=!1);t&&(t.textContent=le),N();let o=i??{repositories:n.repositories,fetched:0,failed:[],moved:0},s={kind:o.fetched<o.repositories?`failed`:`ready`,text:ie(o)};if(o.moved>0||Z){try{window.sessionStorage.setItem(J,JSON.stringify(s))}catch{}if(!Q())return void window.location.reload();Z=!0}a(c(),s)}try{let e=window.sessionStorage.getItem(J);if(e){window.sessionStorage.removeItem(J);let t=JSON.parse(e);typeof t.kind==`string`&&typeof t.text==`string`&&a(c(),{kind:t.kind,text:t.text})}}catch{}k?.addEventListener(`click`,()=>void ct(U(),k)),st();var lt=document.body.dataset.indexRevision??``,X=document.body.dataset.live===`true`?Date.now():0,Z=!1;function Q(){return D.size>0||document.activeElement===m||M}function ut(){Z&&!Q()&&window.location.reload()}async function $(){try{let e=await fetch(`/revision`);if(e.ok){ee(document,!0);let t=await e.json();s(document,t),t.live&&X===0&&(X=Date.now()),t.live||(X=0);let n=ve(lt,t.revision??``,Q());if(n===`reload`)return void window.location.reload();n===`hold`&&(Z=!0)}}catch{ee(document,!1)}window.setTimeout(()=>void $(),oe(X===0?2**53-1:Date.now()-X))}$(),m?.addEventListener(`blur`,ut),document.addEventListener(`click`,()=>window.setTimeout(ut,0)),t();
@@ -1 +1 @@
1
- import{a as e,c as t,t as n,u as r}from"./chunk-B5CvMZtt.js";function i(e,t){if(e===``)return null;try{let n=new URL(e);return n.origin===t&&/^\/r\/[^/]+$/.test(n.pathname)?n.href:null}catch{return null}}function a(e){let t=[...document.querySelectorAll(`[data-shutdown]`)],n=document.querySelector(`[data-shutdown-dialog]`),r=document.querySelector(`[data-shutdown-confirm]`);for(let e of t)e.addEventListener(`click`,()=>n?.showModal());document.querySelector(`[data-shutdown-cancel]`)?.addEventListener(`click`,()=>n?.close()),r?.addEventListener(`click`,()=>{r.disabled=!0,r.textContent=`Stopping…`,fetch(e,{method:`POST`}).then(e=>{if(!e.ok)throw Error(`Shutdown refused: ${e.status}`);n?.close(),o(t)}).catch(()=>{r.disabled=!1,r.textContent=`Stop server`})})}function o(e){document.body.dataset.serverStopped=`true`,t(document,`unreachable`);let n=document.createElement(`div`);n.className=`prb-stopped-notice`,n.setAttribute(`role`,`status`);let r=document.body.dataset.wayBack;n.textContent=r?`Workspace server stopped. This page is no longer being served. Run ${r} to bring it back.`:`Workspace server stopped. This page is no longer being served.`,document.body.prepend(n);for(let t of e)t.disabled=!0,t.classList.contains(`prb-strip-action`)||(t.textContent=`Server stopped`)}var s=[{id:`system`,label:`System`,help:`Follow your device setting`},{id:`light`,label:`Light`,help:`Always use light mode`},{id:`dark`,label:`Dark`,help:`Always use dark mode`}];function c(e){return s.some(t=>t.id===e)}function l(e){let t=e.querySelector(`[data-settings-theme]:checked`)?.value;return c(t)?t:void 0}function u(e,t){e.documentElement.dataset.theme=t}function d(e){for(let t of e.querySelectorAll(`[data-settings-theme]`))t.addEventListener(`change`,()=>{let t=l(e);t&&u(e,t)})}a(`/shutdown`),n(`/restart`);function f(){let e=document.querySelector(`[data-settings-back]`),t=i(document.referrer,window.location.origin);if(!e||t===null)return;e.href=t,e.textContent=``;let n=document.createElement(`span`);n.setAttribute(`aria-hidden`,`true`),n.textContent=`‹`,e.append(n,` Back to the review`)}f(),d(document);var p=document.querySelector(`[data-settings-save]`),m=document.querySelector(`[data-settings-status]`),h=document.querySelector(`[data-settings-port]`),g=document.querySelector(`[data-settings-port-error]`),_=document.querySelector(`[data-settings-agent]`);function v(){let e=document.querySelector(`[data-settings-usage]:checked`);return e?e.value===`on`:void 0}function y(e,t){m&&(m.textContent=e,m.dataset.kind=t)}function b(e){g&&(g.textContent=e??``),h&&(e?(h.setAttribute(`aria-invalid`,`true`),h.focus(),h.select()):h.removeAttribute(`aria-invalid`))}async function x(){if(!p)return;let e=v(),t=l(document),n={...h?{port:h.value.trim()}:{},..._?{agent:_.value}:{},...e===void 0?{}:{usageCounts:e},...t===void 0?{}:{theme:t}};p.disabled=!0,p.textContent=`Saving`;try{let e=await(await fetch(`/settings`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)})).json().catch(()=>null);if(!e){y(`Nothing was saved. The workspace server did not answer.`,`error`);return}if(e.error){b(e.error),y(`Nothing was saved.`,`error`);return}b(null),h&&(h.value=String(e.port.configured)),u(document,e.theme),y(e.restartRequired?`Saved. This page is served on port ${e.port.current}; the workspace moves to ${e.port.configured} the next time it starts.`:`Saved.`,`saved`)}catch{y(`Nothing was saved. The workspace server could not be reached.`,`error`)}finally{p.disabled=!1,p.textContent=`Save changes`}}p?.addEventListener(`click`,()=>void x()),e(),r(window,()=>window.location.reload());
1
+ import{a as e,c as t,d as n,t as r,v as i}from"./chunk-DxnpLefu.js";function a(e,t){if(e===``)return null;try{let n=new URL(e);return n.origin===t&&/^\/r\/[^/]+$/.test(n.pathname)?n.href:null}catch{return null}}function o(e){let t=[...document.querySelectorAll(`[data-shutdown]`)],n=document.querySelector(`[data-shutdown-dialog]`),r=document.querySelector(`[data-shutdown-confirm]`);for(let e of t)e.addEventListener(`click`,()=>n?.showModal());document.querySelector(`[data-shutdown-cancel]`)?.addEventListener(`click`,()=>n?.close()),r?.addEventListener(`click`,()=>{r.disabled=!0,r.textContent=`Stopping…`,fetch(e,{method:`POST`}).then(e=>{if(!e.ok)throw Error(`Shutdown refused: ${e.status}`);n?.close(),s(t)}).catch(()=>{r.disabled=!1,r.textContent=`Stop server`})})}function s(e){document.body.dataset.serverStopped=`true`,t(document,`unreachable`);let n=document.createElement(`div`);n.className=`prb-stopped-notice`,n.setAttribute(`role`,`status`);let r=document.body.dataset.wayBack;n.textContent=r?`Workspace server stopped. This page is no longer being served. Run ${r} to bring it back.`:`Workspace server stopped. This page is no longer being served.`,document.body.prepend(n);for(let t of e)t.disabled=!0,t.classList.contains(`prb-strip-action`)||(t.textContent=`Server stopped`)}var c=[{id:`system`,label:`System`,help:`Follow your device setting`},{id:`light`,label:`Light`,help:`Always use light mode`},{id:`dark`,label:`Dark`,help:`Always use dark mode`}];function l(e){return c.some(t=>t.id===e)}function u(e){let t=e.querySelector(`[data-settings-theme]:checked`)?.value;return l(t)?t:void 0}function d(e,t){e.documentElement.dataset.theme=t}function f(e){for(let t of e.querySelectorAll(`[data-settings-theme]`))t.addEventListener(`change`,()=>{let t=u(e);t&&d(e,t)})}o(`/shutdown`),n(),r(`/restart`);function p(){let e=document.querySelector(`[data-settings-back]`),t=a(document.referrer,window.location.origin);if(!e||t===null)return;e.href=t,e.textContent=``;let n=document.createElement(`span`);n.setAttribute(`aria-hidden`,`true`),n.textContent=`‹`,e.append(n,` Back to the review`)}p(),f(document);var m=document.querySelector(`[data-settings-save]`),h=document.querySelector(`[data-settings-status]`),g=document.querySelector(`[data-settings-port]`),_=document.querySelector(`[data-settings-port-error]`),v=document.querySelector(`[data-settings-agent]`);function y(){let e=document.querySelector(`[data-settings-usage]:checked`);return e?e.value===`on`:void 0}function b(e,t){h&&(h.textContent=e,h.dataset.kind=t)}function x(e){_&&(_.textContent=e??``),g&&(e?(g.setAttribute(`aria-invalid`,`true`),g.focus(),g.select()):g.removeAttribute(`aria-invalid`))}async function S(){if(!m)return;let e=y(),t=u(document),n={...g?{port:g.value.trim()}:{},...v?{agent:v.value}:{},...e===void 0?{}:{usageCounts:e},...t===void 0?{}:{theme:t}};m.disabled=!0,m.textContent=`Saving`;try{let e=await(await fetch(`/settings`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)})).json().catch(()=>null);if(!e){b(`Nothing was saved. The workspace server did not answer.`,`error`);return}if(e.error){x(e.error),b(`Nothing was saved.`,`error`);return}x(null),g&&(g.value=String(e.port.configured)),d(document,e.theme),b(e.restartRequired?`Saved. This page is served on port ${e.port.current}; the workspace moves to ${e.port.configured} the next time it starts.`:`Saved.`,`saved`)}catch{b(`Nothing was saved. The workspace server could not be reached.`,`error`)}finally{m.disabled=!1,m.textContent=`Save changes`}}m?.addEventListener(`click`,()=>void S()),e(),i(window,()=>window.location.reload());
package/static/shell.css CHANGED
@@ -512,6 +512,42 @@ body > * { flex: 0 0 auto; }
512
512
  .prb-strip-action[disabled] { opacity: 0.4; cursor: default; }
513
513
  .prb-strip-action[disabled]:hover { color: var(--text-muted); background: transparent; }
514
514
 
515
+ /* ── Back and Forward ──
516
+ The strip's own controls in every respect but one: a tooltip, since an arrow names a direction and
517
+ not the shortcut. The same non-native tooltip Copy and Ask Buddy use (`data-tip`), inverted from
518
+ the theme's own ink and ground so it reads in light and dark alike. Hidden while disabled: the
519
+ control explains what it does, and there is nothing to do. The strip is lifted one layer so the
520
+ tooltip draws over the bar beneath it rather than under. */
521
+ .prb-strip { position: relative; z-index: 6; }
522
+ .prb-strip-action[data-tip]::after {
523
+ content: attr(data-tip);
524
+ position: absolute;
525
+ top: calc(100% + 6px);
526
+ left: 0;
527
+ padding: 5px 8px;
528
+ border-radius: 6px;
529
+ background: var(--text-primary);
530
+ color: var(--bg);
531
+ font-size: var(--t-micro);
532
+ line-height: 1.4;
533
+ white-space: nowrap;
534
+ opacity: 0;
535
+ pointer-events: none;
536
+ transition: opacity 0.1s;
537
+ }
538
+ .prb-strip-action[data-tip]:hover::after,
539
+ .prb-strip-action[data-tip]:focus-visible::after { opacity: 1; transition-delay: 0.35s; }
540
+ .prb-strip-action[data-tip][disabled]::after { display: none; }
541
+ /* The build, said once at the foot of Help. The strip drops its own copy at phone width, and this is
542
+ where somebody asked "which version is this?" is sent. */
543
+ .prb-help-version { margin: 32px 0 0; font-size: var(--t-micro); color: var(--text-muted); }
544
+ .prb-strip-divider {
545
+ flex: none;
546
+ width: 1px;
547
+ height: 16px;
548
+ background: var(--border-strong);
549
+ }
550
+
515
551
  /* Why a control cannot be pressed, beside the control rather than inside a `title` nobody hovers
516
552
  and no keyboard reaches. Quiet as the strip is quiet: it is an explanation, not a warning. */
517
553
  .prb-strip-note {
@@ -2669,6 +2705,7 @@ a.prb-rail-item { text-decoration: none; }
2669
2705
  font-size: var(--t-micro);
2670
2706
  cursor: pointer;
2671
2707
  }
2708
+ a.prb-guide-pick { text-decoration: none; }
2672
2709
  .prb-guide-pick[aria-current='true'] {
2673
2710
  border-color: var(--pane-accent);
2674
2711
  color: var(--pane-accent-ink);
@@ -2749,6 +2786,13 @@ a.prb-rail-item { text-decoration: none; }
2749
2786
  .prb-review-bar .prb-header-stats > .prb-menu { margin-left: auto; }
2750
2787
  }
2751
2788
 
2789
+ /* Narrower still, the build gives way first: Back and Forward are how the reader gets anywhere, and
2790
+ the version is on Help. Its own block after the 600px one, so it can only ever add to it. */
2791
+ @media (max-width: 450px) {
2792
+ .prb-strip .prb-build { display: none; }
2793
+ }
2794
+
2795
+
2752
2796
  @media (prefers-reduced-motion: reduce) {
2753
2797
  *, *::before, *::after {
2754
2798
  animation-duration: 0.01ms !important;