@loomhelix/deptrail 0.1.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.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +421 -0
  3. package/dist/actions/action-error.js +11 -0
  4. package/dist/actions/action-jobs.js +199 -0
  5. package/dist/actions/action-service.js +268 -0
  6. package/dist/actions/apply.js +120 -0
  7. package/dist/actions/availability.js +79 -0
  8. package/dist/actions/change-sets.js +117 -0
  9. package/dist/actions/dry-run.js +287 -0
  10. package/dist/actions/edge-moves.js +108 -0
  11. package/dist/actions/edit-plan.js +179 -0
  12. package/dist/actions/file-scope.js +118 -0
  13. package/dist/actions/fix-options.js +141 -0
  14. package/dist/actions/goal-check.js +80 -0
  15. package/dist/actions/install.js +27 -0
  16. package/dist/actions/job-registry.js +104 -0
  17. package/dist/actions/json-edit.js +189 -0
  18. package/dist/actions/labels.js +35 -0
  19. package/dist/actions/node-actions.js +102 -0
  20. package/dist/actions/overrides-location.js +59 -0
  21. package/dist/actions/parent-chain.js +210 -0
  22. package/dist/actions/range-style.js +38 -0
  23. package/dist/actions/recipes.js +31 -0
  24. package/dist/actions/root-files.js +30 -0
  25. package/dist/actions/sandbox.js +175 -0
  26. package/dist/actions/set-range.js +59 -0
  27. package/dist/actions/shared-packages.js +50 -0
  28. package/dist/actions/text-diff.js +203 -0
  29. package/dist/actions/types.js +1 -0
  30. package/dist/actions/update-options.js +232 -0
  31. package/dist/actions/workspace-edit.js +33 -0
  32. package/dist/adapters/command-runner.js +127 -0
  33. package/dist/adapters/manifest-only.js +20 -0
  34. package/dist/adapters/node-modules.js +148 -0
  35. package/dist/adapters/npm-lock.js +149 -0
  36. package/dist/adapters/package-manifest.js +57 -0
  37. package/dist/adapters/pnpm-lock.js +177 -0
  38. package/dist/adapters/resolve-today.js +93 -0
  39. package/dist/cli/cli.js +227 -0
  40. package/dist/cli/open-browser.js +14 -0
  41. package/dist/cli/package-version.js +6 -0
  42. package/dist/cli/usage-text.js +27 -0
  43. package/dist/config/glob.js +119 -0
  44. package/dist/config/npmrc.js +116 -0
  45. package/dist/config/root-config.js +103 -0
  46. package/dist/config/secrets.js +18 -0
  47. package/dist/discovery/find-roots.js +107 -0
  48. package/dist/enrich/credentials.js +143 -0
  49. package/dist/enrich/enrichment-cache.js +42 -0
  50. package/dist/enrich/enrichment-keys.js +71 -0
  51. package/dist/enrich/enrichment-service.js +399 -0
  52. package/dist/enrich/enrichment-status.js +86 -0
  53. package/dist/enrich/enrichment-store.js +143 -0
  54. package/dist/enrich/http.js +201 -0
  55. package/dist/enrich/on-demand.js +220 -0
  56. package/dist/enrich/osv-client.js +260 -0
  57. package/dist/enrich/registry-client.js +123 -0
  58. package/dist/enrich/types.js +1 -0
  59. package/dist/git/blob-reader.js +180 -0
  60. package/dist/git/git-commands.js +32 -0
  61. package/dist/git/git-process.js +71 -0
  62. package/dist/git/git-repository.js +136 -0
  63. package/dist/git/ref-list.js +78 -0
  64. package/dist/git/tree-index.js +87 -0
  65. package/dist/graph/global-index.js +19 -0
  66. package/dist/graph/root-graph-builder.js +114 -0
  67. package/dist/graph/serialize.js +19 -0
  68. package/dist/model.js +2 -0
  69. package/dist/query/children.js +38 -0
  70. package/dist/query/compare-shape.js +13 -0
  71. package/dist/query/compare.js +245 -0
  72. package/dist/query/decorations.js +121 -0
  73. package/dist/query/dependents.js +135 -0
  74. package/dist/query/duplicates.js +23 -0
  75. package/dist/query/enrichment-lookup.js +78 -0
  76. package/dist/query/fixes.js +60 -0
  77. package/dist/query/graph-diff.js +42 -0
  78. package/dist/query/issues.js +235 -0
  79. package/dist/query/lookup.js +49 -0
  80. package/dist/query/node-fix.js +46 -0
  81. package/dist/query/package-insight.js +112 -0
  82. package/dist/query/search.js +61 -0
  83. package/dist/query/subgraph.js +107 -0
  84. package/dist/query/versions.js +103 -0
  85. package/dist/scan/build-root.js +137 -0
  86. package/dist/scan/cache-shape.js +52 -0
  87. package/dist/scan/scan-cache.js +32 -0
  88. package/dist/scan/scan-session.js +127 -0
  89. package/dist/scan/source-registry.js +55 -0
  90. package/dist/server/auth.js +45 -0
  91. package/dist/server/branches.js +105 -0
  92. package/dist/server/error-log.js +9 -0
  93. package/dist/server/root-segment.js +13 -0
  94. package/dist/server/router.js +474 -0
  95. package/dist/server/server.js +166 -0
  96. package/dist/server/source-key.js +1 -0
  97. package/dist/server/static.js +59 -0
  98. package/dist/sources/file-reader.js +55 -0
  99. package/dist/sources/git-reader.js +45 -0
  100. package/dist/ui/assets/index-C4uyB5v3.css +1 -0
  101. package/dist/ui/assets/index-DYAG2LM-.js +51 -0
  102. package/dist/ui/index.html +15 -0
  103. package/package.json +72 -0
@@ -0,0 +1,51 @@
1
+ var If=Object.defineProperty;var Cf=(e,t,n)=>t in e?If(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ca=(e,t,n)=>Cf(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
2
+ * @vue/shared v3.5.44
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function wr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const qe={},Pn=[],Jt=()=>{},mc=()=>!1,Us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vs=e=>e.startsWith("onUpdate:"),pt=Object.assign,$r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},xf=Object.prototype.hasOwnProperty,ze=(e,t)=>xf.call(e,t),Oe=Array.isArray,wn=e=>Wo(e)==="[object Map]",hn=e=>Wo(e)==="[object Set]",ua=e=>Wo(e)==="[object Date]",Fe=e=>typeof e=="function",rt=e=>typeof e=="string",Pt=e=>typeof e=="symbol",Qe=e=>e!==null&&typeof e=="object",gc=e=>(Qe(e)||Fe(e))&&Fe(e.then)&&Fe(e.catch),yc=Object.prototype.toString,Wo=e=>yc.call(e),Tf=e=>Wo(e).slice(8,-1),bc=e=>Wo(e)==="[object Object]",js=e=>rt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,So=wr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ws=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Of=/-\w/g,kt=Ws(e=>e.replace(Of,t=>t.slice(1).toUpperCase())),Rf=/\B([A-Z])/g,vn=Ws(e=>e.replace(Rf,"-$1").toLowerCase()),Gs=Ws(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ei=Ws(e=>e?`on${Gs(e)}`:""),mt=(e,t)=>!Object.is(e,t),hs=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kc=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},qs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let da;const Xs=()=>da||(da=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Yn(e){if(Oe(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=rt(o)?Lf(o):Yn(o);if(s)for(const i in s)t[i]=s[i]}return t}else if(rt(e)||Qe(e))return e}const Af=/;(?![^(]*\))/g,Nf=/:([^]+)/,Pf=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Lf(e){const t={};return e.replace(Pf,n=>n.startsWith("/*")?"":n).split(Af).forEach(n=>{if(n){const o=n.split(Nf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Me(e){let t="";if(rt(e))t=e;else if(Oe(e))for(let n=0;n<e.length;n++){const o=Me(e[n]);o&&(t+=o+" ")}else if(Qe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Df="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",Mf=wr(Df);function wc(e){return!!e||e===""}function Ff(e,t,n){if(e.length!==t.length)return!1;let o=!0;for(let s=0;o&&s<e.length;s++)o=Vt(e[s],t[s],n);return o}function fa(e,t,n){if(e.size!==t.size)return!1;const o=Array.from(t),s=new Uint8Array(o.length);for(const i of e){let r=-1;for(let a=0;a<o.length;a++)if(!s[a]&&Vt(i,o[a],n)){r=a;break}if(r<0)return!1;s[r]=1}return!0}function Bf(e,t,n){let o=wn(e),s=wn(t);if(o||s||(o=hn(e),s=hn(t),o||s))return o&&s?fa(e,t,n):!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const a in e){const l=e.hasOwnProperty(a),d=t.hasOwnProperty(a);if(l&&!d||!l&&d||!Vt(e[a],t[a],n))return!1}return String(e)===String(t)}function ha(e,t,n,o){n||(n=[new Map,new Map]);const[s,i]=n;if(s.has(e)||i.has(t))return s.get(e)===t&&i.get(t)===e;s.set(e,t),i.set(t,e);const r=o(e,t,n);return s.delete(e),i.delete(t),r}function Vt(e,t,n){if(e===t)return!0;let o=ua(e),s=ua(t);return o||s?o&&s?e.getTime()===t.getTime():!1:(o=Pt(e),s=Pt(t),o||s?e===t:(o=Oe(e),s=Oe(t),o||s?o&&s?ha(e,t,n,Ff):!1:(o=Qe(e),s=Qe(t),o||s?!o||!s?!1:ha(e,t,n,Bf):String(e)===String(t))))}function Er(e,t){return e.findIndex(n=>Vt(n,t))}const $c=e=>!!(e&&e.__v_isRef===!0),p=e=>rt(e)?e:e==null?"":Oe(e)||Qe(e)&&(e.toString===yc||!Fe(e.toString))?$c(e)?p(e.value):JSON.stringify(e,Ec,2):String(e),Ec=(e,t)=>$c(t)?Ec(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Si(o,i)+" =>"]=s,n),{})}:hn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Si(n))}:Pt(t)?Si(t):Qe(t)&&!Oe(t)&&!bc(t)?String(t):t,Si=(e,t="")=>{var n;return Pt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.44
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let ut;class Kf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ut&&(ut.active?(this.parent=ut,this.index=(ut.scopes||(ut.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}const o=this.effects.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}}run(t){if(this._active){const n=ut;try{return ut=this,t()}finally{ut=n}}}on(){++this._on===1&&(this.prevScope=ut,ut=this)}off(){if(this._on>0&&--this._on===0){if(ut===this)ut=this.prevScope;else{let t=ut;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const s=this.scopes.slice();for(n=0,o=s.length;n<o;n++)s[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Hf(){return ut}function Sr(e,t=!1){ut&&ut.cleanups.push(e)}let ot;const Ii=new WeakSet;class Sc{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ut&&(ut.active?ut.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ii.has(this)&&(Ii.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pa(this),xc(this);const t=ot,n=Ht;ot=this,Ht=!0;try{return this.fn()}finally{Tc(this),ot=t,Ht=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)xr(t);this.deps=this.depsTail=void 0,pa(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ii.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gi(this)&&this.run()}get dirty(){return Gi(this)}}let Ic=0,Io,Co;function Cc(e,t=!1){if(e.flags|=8,t){e.next=Co,Co=e;return}e.next=Io,Io=e}function Ir(){Ic++}function Cr(){if(--Ic>0)return;if(Co){let t=Co;for(Co=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Io;){let t=Io;for(Io=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function xc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tc(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),xr(o),Uf(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function Gi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Oc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Oc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ao)||(e.globalVersion=Ao,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gi(e))))return;e.flags|=2;const t=e.dep,n=ot,o=Ht;ot=e,Ht=!0;try{xc(e);const s=e.fn(e._value);(t.version===0||mt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ot=n,Ht=o,Tc(e),e.flags&=-3}}function xr(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)xr(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Uf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ht=!0;const Rc=[];function Qt(){Rc.push(Ht),Ht=!1}function Zt(){const e=Rc.pop();Ht=e===void 0?!0:e}function pa(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ot;ot=void 0;try{t()}finally{ot=n}}}let Ao=0;class Vf{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ys{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ot||!Ht||ot===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ot)n=this.activeLink=new Vf(ot,this),ot.deps?(n.prevDep=ot.depsTail,ot.depsTail.nextDep=n,ot.depsTail=n):ot.deps=ot.depsTail=n,Ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=ot.depsTail,n.nextDep=void 0,ot.depsTail.nextDep=n,ot.depsTail=n,ot.deps===n&&(ot.deps=o)}return n}trigger(t){this.version++,Ao++,this.notify(t)}notify(t){Ir();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Cr()}}}function Ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Ac(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const bs=new WeakMap,Ln=Symbol(""),qi=Symbol(""),No=Symbol("");function yt(e,t,n){if(Ht&&ot){let o=bs.get(e);o||bs.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new Ys),s.map=o,s.key=n),s.track()}}function cn(e,t,n,o,s,i){const r=bs.get(e);if(!r){Ao++;return}const a=l=>{l&&l.trigger()};if(Ir(),t==="clear")r.forEach(a);else{const l=Oe(e),d=l&&js(n);if(l&&n==="length"){const f=Number(o);r.forEach((v,y)=>{(y==="length"||y===No||!Pt(y)&&y>=f)&&a(v)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),d&&a(r.get(No)),t){case"add":l?d&&a(r.get("length")):(a(r.get(Ln)),wn(e)&&a(r.get(qi)));break;case"delete":l||(a(r.get(Ln)),wn(e)&&a(r.get(qi)));break;case"set":wn(e)&&a(r.get(Ln));break}}Cr()}function jf(e,t){const n=bs.get(e);return n&&n.get(t)}function Un(e){const t=Ye(e);return t===e||(yt(t,"iterate",No),Nt(e))?t:en(e)?$n(e)?t.map(n=>Sn(Ft(n))):t.map(Sn):t.map(Ft)}function zs(e){return yt(e=Ye(e),"iterate",No),e}function Xt(e,t){return en(e)?Sn($n(e)?Ft(t):t):Ft(t)}const Wf={__proto__:null,[Symbol.iterator](){return Ci(this,Symbol.iterator,e=>Xt(this,e))},concat(...e){return Un(this).concat(...e.map(t=>Oe(t)?Un(t):t))},entries(){return Ci(this,"entries",e=>(e[1]=Xt(this,e[1]),e))},every(e,t){return sn(this,"every",e,t,void 0,arguments)},filter(e,t){return sn(this,"filter",e,t,n=>n.map(o=>Xt(this,o)),arguments)},find(e,t){return sn(this,"find",e,t,n=>Xt(this,n),arguments)},findIndex(e,t){return sn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return sn(this,"findLast",e,t,n=>Xt(this,n),arguments)},findLastIndex(e,t){return sn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return sn(this,"forEach",e,t,void 0,arguments)},includes(...e){return xi(this,"includes",e)},indexOf(...e){return xi(this,"indexOf",e)},join(e){return Un(this).join(e)},lastIndexOf(...e){return xi(this,"lastIndexOf",e)},map(e,t){return sn(this,"map",e,t,void 0,arguments)},pop(){return vo(this,"pop")},push(...e){return vo(this,"push",e)},reduce(e,...t){return _a(this,"reduce",e,t)},reduceRight(e,...t){return _a(this,"reduceRight",e,t)},shift(){return vo(this,"shift")},some(e,t){return sn(this,"some",e,t,void 0,arguments)},splice(...e){return vo(this,"splice",e)},toReversed(){return Un(this).toReversed()},toSorted(e){return Un(this).toSorted(e)},toSpliced(...e){return Un(this).toSpliced(...e)},unshift(...e){return vo(this,"unshift",e)},values(){return Ci(this,"values",e=>Xt(this,e))}};function Ci(e,t,n){const o=zs(e),s=o[t],i=s.call(o);if(o!==e&&!Nt(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const r=Object.create(Object.getPrototypeOf(i));return r.next=()=>va(i.next(),n),s!==Nc[t]&&Object.defineProperties(r,{return:{get(){const a=i.return;return typeof a=="function"?a.bind(i):a}},throw:{get(){const a=i.throw;return typeof a=="function"?a.bind(i):a}}}),r}i._next=i.next,i.next=()=>va(i._next(),n)}return i}function va(e,t){return e.done||(e.value=t(e.value)),e}const Nc=Array.prototype;function sn(e,t,n,o,s,i){const r=zs(e),a=r!==e&&!Nt(e),l=r[t];if(l!==Nc[t]){const v=l.apply(e,i);return a?Ft(v):v}let d=n;r!==e&&(a?d=function(v,y){return n.call(this,Xt(e,v),y,e)}:n.length>2&&(d=function(v,y){return n.call(this,v,y,e)}));const f=l.call(r,d,o);return a&&s?s(f):f}function _a(e,t,n,o){const s=zs(e),i=s!==e&&!Nt(e);let r=n,a=!1;s!==e&&(i?(a=o.length===0,r=function(d,f,v){return a&&(a=!1,d=Xt(e,d)),n.call(this,d,Xt(e,f),v,e)}):n.length>3&&(r=function(d,f,v){return n.call(this,d,f,v,e)}));const l=s[t](r,...o);return a?Xt(e,l):l}function xi(e,t,n){const o=Ye(e);yt(o,"iterate",No);const s=o[t](...n);return(s===-1||s===!1)&&Js(n[0])?(n[0]=Ye(n[0]),o[t](...n)):s}function vo(e,t,n=[]){Qt(),Ir();const o=Ye(e)[t].apply(e,n);return Cr(),Zt(),o}const Gf=wr("__proto__,__v_isRef,__isVue"),Pc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pt));function qf(e){Pt(e)||(e=String(e));const t=Ye(this);return yt(t,"has",e),t.hasOwnProperty(e)}class Lc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?oh:Bc:i?Fc:Mc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=Oe(t);if(!s){let l;if(r&&(l=Wf[n]))return l;if(n==="hasOwnProperty")return qf}const a=Reflect.get(t,n,dt(t)?t:o);if((Pt(n)?Pc.has(n):Gf(n))||(s||yt(t,"get",n),i))return a;if(dt(a)){const l=r&&js(n)?a:a.value;return s&&Qe(l)?ks(l):l}return Qe(a)?s?ks(a):zn(a):a}}class Dc extends Lc{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const r=Oe(t)&&js(n);if(!this._isShallow){const d=en(i);if(!Nt(o)&&!en(o)&&(i=Ye(i),o=Ye(o)),!r&&dt(i)&&!dt(o))return d||(i.value=o),!0}const a=r?Number(n)<t.length:ze(t,n),l=Reflect.set(t,n,o,dt(t)?t:s);return t===Ye(s)&&l&&(a?mt(o,i)&&cn(t,"set",n,o):cn(t,"add",n,o)),l}deleteProperty(t,n){const o=ze(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&o&&cn(t,"delete",n,void 0),s}has(t,n){const o=Reflect.has(t,n);return(!Pt(n)||!Pc.has(n))&&yt(t,"has",n),o}ownKeys(t){return yt(t,"iterate",Oe(t)?"length":Ln),Reflect.ownKeys(t)}}class Xf extends Lc{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Yf=new Dc,zf=new Xf,Jf=new Dc(!0);const Xi=e=>e,ns=e=>Reflect.getPrototypeOf(e);function Qf(e,t,n){return function(...o){const s=this.__v_raw,i=Ye(s),r=wn(i),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,d=s[e](...o),f=n?Xi:t?Sn:Ft;return!t&&yt(i,"iterate",l?qi:Ln),pt(Object.create(d),{next(){const{value:v,done:y}=d.next();return y?{value:v,done:y}:{value:a?[f(v[0]),f(v[1])]:f(v),done:y}}})}}function os(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zf(e,t){const n={get(s){const i=this.__v_raw,r=Ye(i),a=Ye(s);e||(mt(s,a)&&yt(r,"get",s),yt(r,"get",a));const{has:l}=ns(r),d=t?Xi:e?Sn:Ft;if(l.call(r,s))return d(i.get(s));if(l.call(r,a))return d(i.get(a));i!==r&&i.get(s)},get size(){const s=this.__v_raw;return!e&&yt(Ye(s),"iterate",Ln),s.size},has(s){const i=this.__v_raw,r=Ye(i),a=Ye(s);return e||(mt(s,a)&&yt(r,"has",s),yt(r,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const r=this,a=r.__v_raw,l=Ye(a),d=t?Xi:e?Sn:Ft;return!e&&yt(l,"iterate",Ln),a.forEach((f,v)=>s.call(i,d(f),d(v),r))}};return pt(n,e?{add:os("add"),set:os("set"),delete:os("delete"),clear:os("clear")}:{add(s){const i=Ye(this),r=ns(i),a=Ye(s),l=!t&&!Nt(s)&&!en(s)?a:s;return r.has.call(i,l)||mt(s,l)&&r.has.call(i,s)||mt(a,l)&&r.has.call(i,a)||(i.add(l),cn(i,"add",l,l)),this},set(s,i){!t&&!Nt(i)&&!en(i)&&(i=Ye(i));const r=Ye(this),{has:a,get:l}=ns(r);let d=a.call(r,s);d||(s=Ye(s),d=a.call(r,s));const f=l.call(r,s);return r.set(s,i),d?mt(i,f)&&cn(r,"set",s,i):cn(r,"add",s,i),this},delete(s){const i=Ye(this),{has:r,get:a}=ns(i);let l=r.call(i,s);l||(s=Ye(s),l=r.call(i,s)),a&&a.call(i,s);const d=i.delete(s);return l&&cn(i,"delete",s,void 0),d},clear(){const s=Ye(this),i=s.size!==0,r=s.clear();return i&&cn(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Qf(s,e,t)}),n}function Tr(e,t){const n=Zf(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_isShallow"?t:s==="__v_raw"?o:Reflect.get(ze(n,s)&&s in o?n:o,s,i)}const eh={get:Tr(!1,!1)},th={get:Tr(!1,!0)},nh={get:Tr(!0,!1)};const Mc=new WeakMap,Fc=new WeakMap,Bc=new WeakMap,oh=new WeakMap;function sh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zn(e){return en(e)?e:Or(e,!1,Yf,eh,Mc)}function ih(e){return Or(e,!1,Jf,th,Fc)}function ks(e){return Or(e,!0,zf,nh,Bc)}function Or(e,t,n,o,s){if(!Qe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const r=sh(Tf(e));if(r===0)return e;const a=new Proxy(e,r===2?o:n);return s.set(e,a),a}function $n(e){return en(e)?$n(e.__v_raw):!!(e&&e.__v_isReactive)}function en(e){return!!(e&&e.__v_isReadonly)}function Nt(e){return!!(e&&e.__v_isShallow)}function Js(e){return e?!!e.__v_raw:!1}function Ye(e){const t=e&&e.__v_raw;return t?Ye(t):e}function rh(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&kc(e,"__v_skip",!0),e}const Ft=e=>Qe(e)?zn(e):e,Sn=e=>Qe(e)?ks(e):e;function dt(e){return e?e.__v_isRef===!0:!1}function Y(e){return Kc(e,!1)}function We(e){return Kc(e,!0)}function Kc(e,t){return dt(e)?e:new ah(e,t)}class ah{constructor(t,n){this.dep=new Ys,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ye(t),this._value=n?t:Ft(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Nt(t)||en(t);t=o?t:Ye(t),mt(t,n)&&(this._rawValue=t,this._value=o?t:Ft(t),this.dep.trigger())}}function h(e){return dt(e)?e.value:e}const lh={get:(e,t,n)=>t==="__v_raw"?e:h(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return dt(s)&&!dt(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function Hc(e){return $n(e)?e:new Proxy(e,lh)}class ch{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Ys,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function uh(e){return new ch(e)}class dh{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=Pt(n)?n:String(n),this._raw=Ye(t);let s=!0,i=t;if(!Oe(t)||Pt(this._key)||!js(this._key))do s=!Js(i)||Nt(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=h(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&dt(this._raw[this._key])){const n=this._object[this._key];if(dt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return jf(this._raw,this._key)}}class fh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ma(e,t,n){return dt(e)?e:Fe(e)?new fh(e):Qe(e)&&arguments.length>1?hh(e,t,n):Y(e)}function hh(e,t,n){return new dh(e,t,n)}class ph{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ys(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ao-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return Cc(this,!0),!0}get value(){const t=this.dep.track();return Oc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vh(e,t,n=!1){let o,s;return Fe(e)?o=e:(o=e.get,s=e.set),new ph(o,s,n)}const ss={},ws=new WeakMap;let An;function _h(e,t=!1,n=An){if(n){let o=ws.get(n);o||ws.set(n,o=[]),o.push(e)}}function mh(e,t,n=qe){const{immediate:o,deep:s,once:i,scheduler:r,augmentJob:a,call:l}=n,d=O=>s?O:Nt(O)||s===!1||s===0?un(O,1):un(O);let f,v,y,m,w=!1,b=!1;if(dt(e)?(v=()=>e.value,w=Nt(e)):$n(e)?(v=()=>d(e),w=!0):Oe(e)?(b=!0,w=e.some(O=>$n(O)||Nt(O)),v=()=>e.map(O=>{if(dt(O))return O.value;if($n(O))return d(O);if(Fe(O))return l?l(O,2):O()})):Fe(e)?t?v=l?()=>l(e,2):e:v=()=>{if(y){Qt();try{y()}finally{Zt()}}const O=An;An=f;try{return l?l(e,3,[m]):e(m)}finally{An=O}}:v=Jt,t&&s){const O=v,Q=s===!0?1/0:s;v=()=>un(O(),Q)}const T=Hf(),X=()=>{f.stop(),T&&T.active&&$r(T.effects,f)};if(i&&t){const O=t;t=(...Q)=>{try{return O(...Q)}finally{X()}}}let F=b?new Array(e.length).fill(ss):ss;const J=O=>{if(!(!(f.flags&1)||!f.dirty&&!O))if(t){const Q=f.run();if(O||s||w||(b?Q.some((ie,H)=>mt(ie,F[H])):mt(Q,F))){const ie=An;Qt();try{y&&y(),An=f;const H=[Q,F===ss?void 0:b&&F[0]===ss?[]:F,m];F=Q,l?l(t,3,H):t(...H)}finally{An=ie,Zt()}}}else f.run()};return a&&a(J),f=new Sc(v),f.scheduler=r?()=>r(J,!1):J,m=O=>_h(O,!1,f),y=f.onStop=()=>{const O=ws.get(f);if(O){if(l)l(O,4);else for(const Q of O)Q();ws.delete(f)}},t?o?J(!0):F=f.run():r?r(J.bind(null,!0),!0):f.run(),X.pause=f.pause.bind(f),X.resume=f.resume.bind(f),X.stop=X,X}function un(e,t=1/0,n){if(t<=0||!Qe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,dt(e))un(e.value,t,n);else if(Oe(e))for(let o=0;o<e.length;o++)un(e[o],t,n);else if(hn(e)||wn(e))e.forEach(o=>{un(o,t,n)});else if(bc(e)){for(const o in e)un(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&un(e[o],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.44
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Go(e,t,n,o){try{return o?e(...o):e()}catch(s){Qs(s,t,n)}}function jt(e,t,n,o){if(Fe(e)){const s=Go(e,t,n,o);return s&&gc(s)&&s.catch(i=>{Qs(i,t,n)}),s}if(Oe(e)){const s=[];for(let i=0;i<e.length;i++)s.push(jt(e[i],t,n,o));return s}}function Qs(e,t,n,o=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||qe;if(t){let a=t.parent;const l=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const f=a.ec;if(f){for(let v=0;v<f.length;v++)if(f[v](e,l,d)===!1)return}a=a.parent}if(i){Qt(),Go(i,null,10,[e,l,d]),Zt();return}}gh(e,n,s,o,r)}function gh(e,t,n,o=!0,s=!1){if(s)throw e;console.error(e)}const It=[];let Kt=-1;const Yt=[];let yn=null,jn=0;const Uc=Promise.resolve();let $s=null;function st(e){const t=$s||Uc;return e?t.then(this?e.bind(this):e):t}function yh(e){let t=Kt+1,n=It.length;for(;t<n;){const o=t+n>>>1,s=It[o],i=Po(s);i<e||i===e&&s.flags&2?t=o+1:n=o}return t}function Rr(e){if(!(e.flags&1)){const t=Po(e),n=It[It.length-1];!n||!(e.flags&2)&&t>=Po(n)?It.push(e):It.splice(yh(t),0,e),e.flags|=1,Vc()}}function Vc(){$s||($s=Uc.then(Gc))}function bh(e){if(!Oe(e))yn&&e.id===-1?yn.splice(jn+1,0,e):e.flags&1||(Yt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Yt.push(e[t]);Vc()}function jc(e,t,n,o=Kt+1){for(;o<It.length;o++){const s=It[o];if(s&&s.flags&2){if(e&&s.id!==e.uid||t!==void 0&&!(s.id>=t))continue;It.splice(o,1),o=e?o-1:Kt,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Wc(e,t,n=0){if(Yt.length){let o=Yt,s=0;if(t){o=[];for(let r=0;r<Yt.length;r++){const a=Yt[r];(a.i!==void 0?!a.i||a.i.uid<n:t.has(a))?Yt[s++]=a:o.push(a)}}const i=[...new Set(o)].sort((r,a)=>Po(r)-Po(a));if(Yt.length=s,yn){for(let r=0;r<i.length;r++)yn.push(i[r]);return}for(yn=i,jn=0;jn<yn.length;jn++){const r=yn[jn];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}yn=null,jn=0}}let Ti=!1;function kh(e,t){if(Ti){e();return}const n=t===void 0?void 0:new Set(Yt);e(),Ti=!0;try{jc(void 0,t),Wc(void 0,n,t)}finally{Ti=!1}}const Po=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Gc(e){try{for(Kt=0;Kt<It.length;Kt++){const t=It[Kt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Go(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Kt<It.length;Kt++){const t=It[Kt];t&&(t.flags&=-2)}Kt=-1,It.length=0,Wc(),$s=null,(It.length||Yt.length)&&Gc()}}let gt=null,qc=null;function Es(e){const t=gt;return gt=e,qc=e&&e.type.__scopeId||null,t}function bn(e,t=gt,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&xa(-1);const i=Es(t),r=fn.length;let a;try{a=e(...s)}finally{for(let l=fn.length;l>r;l--)Mr();Es(i),o._d&&xa(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function Ut(e,t){if(gt===null)return e;const n=si(gt),o=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,r,a,l=qe]=t[s];i&&(Fe(i)&&(i={mounted:i,updated:i}),i.deep&&un(r),o.push({dir:i,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return e}function On(e,t,n,o){const s=e.dirs,i=t&&t.dirs;for(let r=0;r<s.length;r++){const a=s[r];i&&(a.oldValue=i[r].value);let l=a.dir[o];l&&(Qt(),jt(l,n,8,[e.el,a,e,t]),Zt())}}function Yi(e,t){if(bt){let n=bt.provides;const o=bt.parent&&bt.parent.provides;o===n&&(n=bt.provides=Object.create(o)),n[e]=t}}function wt(e,t,n=!1){const o=Fr();if(o||Xn){let s=Xn?Xn._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&Fe(t)?t.call(o&&o.proxy):t}}const wh=Symbol.for("v-scx"),$h=()=>wt(wh);function Eh(e,t){return Ar(e,null,{flush:"sync"})}function Ne(e,t,n){return Ar(e,t,n)}function Ar(e,t,n=qe){const{immediate:o,deep:s,flush:i,once:r}=n,a=pt({},n),l=t&&o||!t&&i!=="post";let d;if(Mo){if(i==="sync"){const m=$h();d=m.__watcherHandles||(m.__watcherHandles=[])}else if(!l){const m=()=>{};return m.stop=Jt,m.resume=Jt,m.pause=Jt,m}}const f=bt;a.call=(m,w,b)=>jt(m,f,w,b);let v=!1;i==="post"?a.scheduler=m=>{m.i=f,xt(m,f&&f.suspense)}:i!=="sync"&&(v=!0,a.scheduler=(m,w)=>{w?m():Rr(m)}),a.augmentJob=m=>{t&&(m.flags|=4),v&&(m.flags|=2,f&&(m.id=f.uid,m.i=f))};const y=mh(e,t,a);return Mo&&(d?d.push(y):l&&y()),y}function Sh(e,t,n){const o=this.proxy,s=rt(e)?e.includes(".")?Xc(o,e):()=>o[e]:e.bind(o,o);let i;Fe(t)?i=t:(i=t.handler,n=t);const r=qo(this),a=Ar(s,i.bind(o),n);return r(),a}function Xc(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;s<n.length&&o;s++)o=o[n[s]];return o}}const Ih=Symbol("_vte"),Zs=e=>e.__isTeleport,Oi=Symbol("_leaveCb");function Ch(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Bt){t=n;break}}return t}function Yc(e){if(!Nr(e))return Zs(e.type)&&e.children?Ch(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Fe(n.default))return n.default()}}function Ss(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Ss(Zs(n.type)&&Yc(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===q&&Oe(e.children)){const n=ru(e.children,!1);n&&Ss(n,t)}}function zi(e){if(e.component)return zi(e.component.subTree);if(e.type===q){const t=Oe(e.children)&&ru(e.children,!1);return t?zi(t):void 0}if(e.type!==Bt)return e}function Ae(e,t){return Fe(e)?pt({name:e.name},t,{setup:e}):e}function tt(){const e=Fr();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function zc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ga(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Is=new WeakMap;function xo(e,t,n,o,s=!1){if(Oe(e)){e.forEach((b,T)=>xo(b,t&&(Oe(t)?t[T]:t),n,o,s));return}if(qn(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&xo(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?si(o.component):o.el,r=s?null:i,{i:a,r:l}=e,d=t&&t.r,f=a.refs===qe?a.refs={}:a.refs,v=a.setupState,y=Ye(v),m=v===qe?mc:b=>ga(f,b)?!1:ze(y,b),w=(b,T)=>!(T&&ga(f,T));if(d!=null&&d!==l){if(ya(t),rt(d))f[d]=null,m(d)&&(v[d]=null);else if(dt(d)){const b=t;w(d,b.k)&&(d.value=null),b.k&&(f[b.k]=null)}}if(Fe(l))Go(l,a,12,[r,f]);else{const b=rt(l),T=dt(l);if(b||T){const X=()=>{if(e.f){const F=b?m(l)?v[l]:f[l]:w()||!e.k?l.value:f[e.k];if(s)Oe(F)&&$r(F,i);else if(Oe(F))F.includes(i)||F.push(i);else if(b)f[l]=[i],m(l)&&(v[l]=f[l]);else{const J=[i];w(l,e.k)&&(l.value=J),e.k&&(f[e.k]=J)}}else b?(f[l]=r,m(l)&&(v[l]=r)):T&&(w(l,e.k)&&(l.value=r),e.k&&(f[e.k]=r))};if(r){const F=()=>{X(),Is.delete(e)};F.id=-1,Is.set(e,F),xt(F,n)}else ya(e),X()}}}function ya(e){const t=Is.get(e);t&&(t.flags|=8,Is.delete(e))}Xs().requestIdleCallback;Xs().cancelIdleCallback;const qn=e=>!!e.type.__asyncLoader,Nr=e=>e.type.__isKeepAlive;function xh(e,t){Jc(e,"a",t)}function Th(e,t){Jc(e,"da",t)}function Jc(e,t,n=bt){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ei(t,o,n),n){let s=n.parent;for(;s&&s.parent;)Nr(s.parent.vnode)&&Oh(o,t,n,s),s=s.parent}}function Oh(e,t,n,o){const s=ei(t,e,o,!0);Pr(()=>{$r(o[t],s)},n)}function ei(e,t,n=bt,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Qt();const a=qo(n),l=jt(t,n,e,r);return a(),Zt(),l});return o?s.unshift(i):s.push(i),i}}const _n=e=>(t,n=bt)=>{(!Mo||e==="sp")&&ei(e,(...o)=>t(...o),n)},Rh=_n("bm"),Gt=_n("m"),Ah=_n("bu"),Nh=_n("u"),Ot=_n("bum"),Pr=_n("um"),Ph=_n("sp"),Lh=_n("rtg"),Dh=_n("rtc");function Mh(e,t=bt){ei("ec",e,t)}const Fh="components",Qc=Symbol.for("v-ndc");function Bh(e){return rt(e)?Kh(Fh,e,!1)||e:e||Qc}function Kh(e,t,n=!0,o=!1){const s=gt||bt;if(s){const i=s.type;{const a=wp(i,!1);if(a&&(a===t||a===kt(t)||a===Gs(kt(t))))return i}const r=ba(s[e]||i[e],t)||ba(s.appContext[e],t);return!r&&o?i:r}}function ba(e,t){return e&&(e[t]||e[kt(t)]||e[Gs(kt(t))])}function be(e,t,n,o){let s;const i=n,r=Oe(e);if(r||rt(e)){const a=r&&$n(e);let l=!1,d=!1;a&&(l=!Nt(e),d=en(e),e=zs(e)),s=new Array(e.length);for(let f=0,v=e.length;f<v;f++)s[f]=t(l?d?Sn(Ft(e[f])):Ft(e[f]):e[f],f,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)s=[];else{s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(Qe(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,d=a.length;l<d;l++){const f=a[l];s[l]=t(e[f],f,l,i)}}else s=[];return s}function Cs(e,t,n,o,s,i){if(n==null&&(n={}),gt.ce||gt.parent&&qn(gt.parent)&&gt.parent.ce){const d=n,f=Object.keys(d).length>0;return t!=="default"&&(d.name=t),c(),Ke(q,null,[ye("slot",d,o)],f?-2:64)}let r=e[t];r&&r._c&&(r._d=!1);const a=fn.length;c();let l;try{const d=r&&Zc(r(n)),f=n.key||i||d&&d.key;l=Ke(q,{key:(f&&!Pt(f)?f:`_${t}`)+(!d&&o?"_fb":"")},d||(o?o():[]),d&&e._===1?64:-2)}catch(d){for(let f=fn.length;f>a;f--)Mr();throw d}finally{r&&r._c&&(r._d=!0)}return l}function Zc(e){return e.some(t=>oi(t)?!(t.type===Bt||t.type===q&&!Zc(t.children)):!0)?e:null}const Ji=e=>e?wu(e)?si(e):Ji(e.parent):null,To=pt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ji(e.parent),$root:e=>Ji(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>nu(e),$forceUpdate:e=>e.f||(e.f=()=>{Rr(e.update)}),$nextTick:e=>e.n||(e.n=st.bind(e.proxy)),$watch:e=>Sh.bind(e)}),Ri=(e,t)=>e!==qe&&!e.__isScriptSetup&&ze(e,t),Hh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:r,type:a,appContext:l}=e;if(t[0]!=="$"){const y=r[t];if(y!==void 0)switch(y){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Ri(o,t))return r[t]=1,o[t];if(s!==qe&&ze(s,t))return r[t]=2,s[t];if(ze(i,t))return r[t]=3,i[t];if(n!==qe&&ze(n,t))return r[t]=4,n[t];Qi&&(r[t]=0)}}const d=To[t];let f,v;if(d)return t==="$attrs"&&yt(e.attrs,"get",""),d(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(n!==qe&&ze(n,t))return r[t]=4,n[t];if(v=l.config.globalProperties,ze(v,t))return v[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return Ri(s,t)?(s[t]=n,!0):o!==qe&&ze(o,t)?(o[t]=n,!0):ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:r}},a){let l;return!!(n[a]||e!==qe&&a[0]!=="$"&&ze(e,a)||Ri(t,a)||ze(i,a)||ze(o,a)||ze(To,a)||ze(s.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ze(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function xs(e){return Oe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function eu(e,t){return!e||!t?e||t:Oe(e)&&Oe(t)?e.concat(t):pt({},xs(e),xs(t))}let Qi=!0;function Uh(e){const t=nu(e),n=e.proxy,o=e.ctx;Qi=!1,t.beforeCreate&&ka(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:a,provide:l,inject:d,created:f,beforeMount:v,mounted:y,beforeUpdate:m,updated:w,activated:b,deactivated:T,beforeDestroy:X,beforeUnmount:F,destroyed:J,unmounted:O,render:Q,renderTracked:ie,renderTriggered:H,errorCaptured:j,serverPrefetch:U,expose:M,inheritAttrs:R,components:D,directives:V,filters:_e}=t;if(d&&Vh(d,o,null),r)for(const le in r){const me=r[le];Fe(me)&&(o[le]=me.bind(n))}if(s){const le=s.call(n,n);Qe(le)&&(e.data=zn(le))}if(Qi=!0,i)for(const le in i){const me=i[le],W=Fe(me)?me.bind(n,n):Fe(me.get)?me.get.bind(n,n):Jt,S=!Fe(me)&&Fe(me.set)?me.set.bind(n):Jt,ne=k({get:W,set:S});Object.defineProperty(o,le,{enumerable:!0,configurable:!0,get:()=>ne.value,set:ae=>ne.value=ae})}if(a)for(const le in a)tu(a[le],o,n,le);if(l){const le=Fe(l)?l.call(n):l;Reflect.ownKeys(le).forEach(me=>{Yi(me,le[me])})}f&&ka(f,e,"c");function Te(le,me){Oe(me)?me.forEach(W=>le(W.bind(n))):me&&le(me.bind(n))}if(Te(Rh,v),Te(Gt,y),Te(Ah,m),Te(Nh,w),Te(xh,b),Te(Th,T),Te(Mh,j),Te(Dh,ie),Te(Lh,H),Te(Ot,F),Te(Pr,O),Te(Ph,U),Oe(M))if(M.length){const le=e.exposed||(e.exposed={});M.forEach(me=>{Object.defineProperty(le,me,{get:()=>n[me],set:W=>n[me]=W,enumerable:!0})})}else e.exposed||(e.exposed={});Q&&e.render===Jt&&(e.render=Q),R!=null&&(e.inheritAttrs=R),D&&(e.components=D),V&&(e.directives=V),U&&zc(e)}function Vh(e,t,n=Jt){Oe(e)&&(e=Zi(e));for(const o in e){const s=e[o];let i;Qe(s)?"default"in s?i=wt(s.from||o,s.default,!0):i=wt(s.from||o):i=wt(s),dt(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function ka(e,t,n){jt(Oe(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function tu(e,t,n,o){let s=o.includes(".")?Xc(n,o):()=>n[o];if(rt(e)){const i=t[e];Fe(i)&&Ne(s,i)}else if(Fe(e))Ne(s,e.bind(n));else if(Qe(e))if(Oe(e))e.forEach(i=>tu(i,t,n,o));else{const i=Fe(e.handler)?e.handler.bind(n):t[e.handler];Fe(i)&&Ne(s,i,e)}}function nu(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!o?l=t:(l={},s.length&&s.forEach(d=>Ts(l,d,r,!0)),Ts(l,t,r)),Qe(t)&&i.set(t,l),l}function Ts(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Ts(e,i,n,!0),s&&s.forEach(r=>Ts(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const a=jh[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const jh={data:wa,props:$a,emits:$a,methods:$o,computed:$o,beforeCreate:St,created:St,beforeMount:St,mounted:St,beforeUpdate:St,updated:St,beforeDestroy:St,beforeUnmount:St,destroyed:St,unmounted:St,activated:St,deactivated:St,errorCaptured:St,serverPrefetch:St,components:$o,directives:$o,watch:Gh,provide:wa,inject:Wh};function wa(e,t){return t?e?function(){return pt(Fe(e)?e.call(this,this):e,Fe(t)?t.call(this,this):t)}:t:e}function Wh(e,t){return $o(Zi(e),Zi(t))}function Zi(e){if(Oe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function St(e,t){return e?[...new Set([].concat(e,t))]:t}function $o(e,t){return e?pt(Object.create(null),e,t):t}function $a(e,t){return e?Oe(e)&&Oe(t)?[...new Set([...e,...t])]:pt(Object.create(null),xs(e),xs(t??{})):t}function Gh(e,t){if(!e)return t;if(!t)return e;const n=pt(Object.create(null),e);for(const o in t)n[o]=St(e[o],t[o]);return n}function ou(){return{app:null,config:{isNativeTag:mc,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qh=0;function Xh(e,t){return function(o,s=null){Fe(o)||(o=pt({},o)),s!=null&&!Qe(s)&&(s=null);const i=ou(),r=new WeakSet,a=[];let l=!1;const d=i.app={_uid:qh++,_component:o,_props:s,_container:null,_context:i,_instance:null,version:Ep,get config(){return i.config},set config(f){},use(f,...v){return r.has(f)||(f&&Fe(f.install)?(r.add(f),f.install(d,...v)):Fe(f)&&(r.add(f),f(d,...v))),d},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),d},component(f,v){return v?(i.components[f]=v,d):i.components[f]},directive(f,v){return v?(i.directives[f]=v,d):i.directives[f]},mount(f,v,y){if(!l){const m=d._ceVNode||ye(o,s);return m.appContext=i,y===!0?y="svg":y===!1&&(y=void 0),e(m,f,y),l=!0,d._container=f,f.__vue_app__=d,si(m.component)}},onUnmount(f){a.push(f)},unmount(){l&&(jt(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(f,v){return i.provides[f]=v,d},runWithContext(f){const v=Xn;Xn=d;try{return f()}finally{Xn=v}}};return d}}let Xn=null;function ps(e,t,n=qe){const o=Fr(),s=kt(t),i=vn(t),r=su(e,s),a=uh((l,d)=>{let f,v=qe,y;return Eh(()=>{const m=e[s];mt(f,m)&&(f=m,d())}),{get(){return l(),n.get?n.get(f):f},set(m){const w=n.set?n.set(m):m;if(!mt(w,f)&&!(v!==qe&&mt(m,v)))return;const b=o.vnode.props,T=!!(b&&(t in b||s in b||i in b)&&(`onUpdate:${t}`in b||`onUpdate:${s}`in b||`onUpdate:${i}`in b));T||(f=m,d()),o.emit(`update:${t}`,w),mt(m,v)&&(mt(m,w)&&!mt(w,y)||T&&v!==qe&&!mt(w,f))&&d(),v=m,y=w}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||qe:a,done:!1}:{done:!0}}}},a}const su=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${kt(t)}Modifiers`]||e[`${vn(t)}Modifiers`];function Yh(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||qe;let s=n;const i=t.startsWith("update:"),r=i&&su(o,t.slice(7));r&&(r.trim&&(s=n.map(f=>rt(f)?f.trim():f)),r.number&&(s=s.map(qs)));let a,l=o[a=Ei(t)]||o[a=Ei(kt(t))];!l&&i&&(l=o[a=Ei(vn(t))]),l&&jt(l,e,6,s);const d=o[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,jt(d,e,6,s)}}const zh=new WeakMap;function iu(e,t,n=!1){const o=n?zh:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},a=!1;if(!Fe(e)){const l=d=>{const f=iu(d,t,!0);f&&(a=!0,pt(r,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Qe(e)&&o.set(e,null),null):(Oe(i)?i.forEach(l=>r[l]=null):pt(r,i),Qe(e)&&o.set(e,r),r)}function ti(e,t){return!e||!Us(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,vn(t))||ze(e,t))}function Ea(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:r,attrs:a,emit:l,render:d,renderCache:f,props:v,data:y,setupState:m,ctx:w,inheritAttrs:b}=e,T=Es(e);let X,F;try{if(n.shapeFlag&4){const O=s||o,Q=O;X=zt(d.call(Q,O,f,v,m,y,w)),F=a}else{const O=t;X=zt(O.length>1?O(v,{attrs:a,slots:r,emit:l}):O(v,null)),F=t.props?a:Jh(a)}}catch(O){fn.length=0,Qs(O,e,1),X=ye(Bt)}let J=X;if(F&&b!==!1){const O=Object.keys(F),{shapeFlag:Q}=J;O.length&&Q&7&&(i&&O.some(Vs)&&(F=Qh(F,i)),J=Jn(J,F,!1,!0))}if(n.dirs&&(J=Jn(J,null,!1,!0),J.dirs=J.dirs?J.dirs.concat(n.dirs):n.dirs),n.transition){const O=Zs(J.type)&&Yc(J)||J;Ss(O,n.transition)}return X=J,Es(T),X}function ru(e,t=!0){let n;for(let o=0;o<e.length;o++){const s=e[o];if(oi(s)){if(s.type!==Bt||s.children==="v-if"){if(n)return;n=s}}else return}return n}const Jh=e=>{let t;for(const n in e)(n==="class"||n==="style"||Us(n))&&((t||(t={}))[n]=e[n]);return t},Qh=(e,t)=>{const n={};for(const o in e)(!Vs(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Zh(e,t,n){const{props:o,children:s,component:i}=e,{props:r,children:a,patchFlag:l}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return o?Sa(o,r,d):!!r;if(l&8){const f=t.dynamicProps;for(let v=0;v<f.length;v++){const y=f[v];if(au(r,o,y)&&!ti(d,y))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:o===r?!1:o?r?Sa(o,r,d):!0:!!r;return!1}function Sa(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let s=0;s<o.length;s++){const i=o[s];if(!ze(e,i)||au(t,e,i)&&!ti(n,i))return!0}return!1}function au(e,t,n){const o=e[n],s=t[n];return n==="style"&&Qe(o)&&Qe(s)?!Vt(o,s):o!==s}function ep({vnode:e,parent:t,suspense:n},o){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=o,e=s),s===e)(e=t.vnode).el=o,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=o)}const lu={},cu=()=>Object.create(lu),uu=e=>Object.getPrototypeOf(e)===lu;function tp(e,t,n,o=!1){const s={},i=cu();e.propsDefaults=Object.create(null),du(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:ih(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function np(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,a=Ye(s),[l]=e.propsOptions;let d=!1;if((o||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let v=0;v<f.length;v++){let y=f[v];if(ti(e.emitsOptions,y))continue;const m=t[y];if(l)if(ze(i,y))m!==i[y]&&(i[y]=m,d=!0);else{const w=kt(y);s[w]=er(l,a,w,m,e,!1)}else m!==i[y]&&(i[y]=m,d=!0)}}}else{du(e,t,s,i)&&(d=!0);let f;for(const v in a)(!t||!ze(t,v)&&((f=vn(v))===v||!ze(t,f)))&&(l?n&&(n[v]!==void 0||n[f]!==void 0)&&(s[v]=er(l,a,v,void 0,e,!0)):delete s[v]);if(i!==a)for(const v in i)(!t||!ze(t,v))&&(delete i[v],d=!0)}d&&cn(e.attrs,"set","")}function du(e,t,n,o){const[s,i]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(So(l))continue;const d=t[l];let f;s&&ze(s,f=kt(l))?!i||!i.includes(f)?n[f]=d:(a||(a={}))[f]=d:ti(e.emitsOptions,l)||(!(l in o)||d!==o[l])&&(o[l]=d,r=!0)}if(i){const l=Ye(n),d=a||qe;for(let f=0;f<i.length;f++){const v=i[f];n[v]=er(s,l,v,d[v],e,!ze(d,v))}}return r}function er(e,t,n,o,s,i){const r=e[n];if(r!=null){const a=ze(r,"default");if(a&&o===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&Fe(l)){const{propsDefaults:d}=s;if(n in d)o=d[n];else{const f=qo(s);o=d[n]=l.call(null,t),f()}}else o=l;s.ce&&s.ce._setProp(n,o)}r[0]&&(i&&!a?o=!1:r[1]&&(o===""||o===vn(n))&&(o=!0))}return o}const op=new WeakMap;function fu(e,t,n=!1){const o=n?op:t.propsCache,s=o.get(e);if(s)return s;const i=e.props,r={},a=[];let l=!1;if(!Fe(e)){const f=v=>{l=!0;const[y,m]=fu(v,t,!0);pt(r,y),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!l)return Qe(e)&&o.set(e,Pn),Pn;if(Oe(i))for(let f=0;f<i.length;f++){const v=kt(i[f]);Ia(v)&&(r[v]=qe)}else if(i)for(const f in i){const v=kt(f);if(Ia(v)){const y=i[f],m=r[v]=Oe(y)||Fe(y)?{type:y}:pt({},y),w=m.type;let b=!1,T=!0;if(Oe(w))for(let X=0;X<w.length;++X){const F=w[X],J=Fe(F)&&F.name;if(J==="Boolean"){b=!0;break}else J==="String"&&(T=!1)}else b=Fe(w)&&w.name==="Boolean";m[0]=b,m[1]=T,(b||ze(m,"default"))&&a.push(v)}}const d=[r,a];return Qe(e)&&o.set(e,d),d}function Ia(e){return e[0]!=="$"&&!So(e)}const Lr=e=>e==="_"||e==="_ctx"||e==="$stable",Dr=e=>Oe(e)?e.map(zt):[zt(e)],sp=(e,t,n)=>{if(t._n)return t;const o=bn((...s)=>Dr(t(...s)),n);return o._c=!1,o},hu=(e,t,n)=>{const o=e._ctx;for(const s in e){if(Lr(s))continue;const i=e[s];if(Fe(i))t[s]=sp(s,i,o);else if(i!=null){const r=Dr(i);t[s]=()=>r}}},pu=(e,t)=>{const n=Dr(t);e.slots.default=()=>n},vu=(e,t,n)=>{for(const o in t)(n||!Lr(o))&&(e[o]=t[o])},ip=(e,t,n)=>{const o=e.slots=cu();if(e.vnode.shapeFlag&32){const s=t._;s?(vu(o,t,n),n&&kc(o,"_",s,!0)):hu(t,o)}else t&&pu(e,t)},rp=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=qe;if(o.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:vu(s,t,n):(i=!t.$stable,hu(t,s)),r=t}else t&&(pu(e,t),r={default:1});if(i)for(const a in s)!Lr(a)&&r[a]==null&&delete s[a]},xt=dp;function ap(e){return lp(e)}function lp(e,t){const n=Xs();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:r,createText:a,createComment:l,setText:d,setElementText:f,parentNode:v,nextSibling:y,setScopeId:m=Jt,insertStaticContent:w}=e,b=(g,E,A,oe=null,B=null,Z=null,ce=void 0,fe=null,de=!!E.dynamicChildren)=>{if(g===E)return;g&&!_o(g,E)&&(oe=$(g),ae(g,B,Z,!0),g=null),E.patchFlag===-2&&(de=!1,E.dynamicChildren=null),E.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(E.dynamicChildren===Pn&&(E.dynamicChildren=[]),E.dynamicChildren.hasOnce=!0);const{type:se,ref:Se,shapeFlag:pe}=E;switch(se){case ni:T(g,E,A,oe);break;case Bt:X(g,E,A,oe);break;case Ni:g==null&&F(E,A,oe,ce);break;case q:D(g,E,A,oe,B,Z,ce,fe,de);break;default:pe&1?Q(g,E,A,oe,B,Z,ce,fe,de):pe&6?V(g,E,A,oe,B,Z,ce,fe,de):(pe&64||pe&128)&&se.process(g,E,A,oe,B,Z,ce,fe,de,I)}Se!=null&&B?xo(Se,g&&g.ref,Z,E||g,!E):Se==null&&g&&g.ref!=null&&xo(g.ref,null,Z,g,!0)},T=(g,E,A,oe)=>{if(g==null)o(E.el=a(E.children),A,oe);else{const B=E.el=g.el;E.children!==g.children&&d(B,E.children)}},X=(g,E,A,oe)=>{g==null?o(E.el=l(E.children||""),A,oe):E.el=g.el},F=(g,E,A,oe)=>{[g.el,g.anchor]=w(g.children,E,A,oe,g.el,g.anchor)},J=({el:g,anchor:E},A,oe)=>{let B;for(;g&&g!==E;)B=y(g),o(g,A,oe),g=B;o(E,A,oe)},O=({el:g,anchor:E})=>{let A;for(;g&&g!==E;)A=y(g),s(g),g=A;s(E)},Q=(g,E,A,oe,B,Z,ce,fe,de)=>{if(E.type==="svg"?ce="svg":E.type==="math"&&(ce="mathml"),g==null)ie(E,A,oe,B,Z,ce,fe,de);else{const se=g.el&&g.el._isVueCE?g.el:null;try{se&&se._beginPatch(),U(g,E,B,Z,ce,fe,de)}finally{se&&se._endPatch()}}},ie=(g,E,A,oe,B,Z,ce,fe)=>{let de,se;const{props:Se,shapeFlag:pe,transition:Ce,dirs:xe}=g;if(de=g.el=r(g.type,Z,Se&&Se.is,Se),pe&8?f(de,g.children):pe&16&&j(g.children,de,null,oe,B,Ai(g,Z),ce,fe),xe&&On(g,null,oe,"created"),H(de,g,g.scopeId,ce,oe),Se){for(const He in Se)He!=="value"&&!So(He)&&i(de,He,null,Se[He],Z,oe);"value"in Se&&i(de,"value",null,Se.value,Z),(se=Se.onVnodeBeforeMount)&&qt(se,oe,g)}xe&&On(g,null,oe,"beforeMount");const De=cp(B,Ce);De&&Ce.beforeEnter(de),o(de,E,A),((se=Se&&Se.onVnodeMounted)||De||xe)&&xt(()=>{try{se&&qt(se,oe,g),De&&Ce.enter(de),xe&&On(g,null,oe,"mounted")}finally{}},B)},H=(g,E,A,oe,B)=>{if(A&&m(g,A),oe)for(let Z=0;Z<oe.length;Z++)m(g,oe[Z]);if(B){let Z=B.subTree;if(E===Z||gu(Z.type)&&(Z.ssContent===E||Z.ssFallback===E)){const ce=B.vnode;H(g,ce,ce.scopeId,ce.slotScopeIds,B.parent)}}},j=(g,E,A,oe,B,Z,ce,fe,de=0)=>{for(let se=de;se<g.length;se++){const Se=g[se]=fe?ln(g[se]):zt(g[se]);b(null,Se,E,A,oe,B,Z,ce,fe)}},U=(g,E,A,oe,B,Z,ce)=>{const fe=E.el=g.el;let{patchFlag:de,dynamicChildren:se,dirs:Se}=E;de|=g.patchFlag&16;const pe=g.props||qe,Ce=E.props||qe;let xe;if(A&&Rn(A,!1),(xe=Ce.onVnodeBeforeUpdate)&&qt(xe,A,E,g),Se&&On(E,g,A,"beforeUpdate"),A&&Rn(A,!0),se&&(!g.dynamicChildren||g.dynamicChildren.length!==se.length)&&(de=0,ce=!1,se=null),(pe.innerHTML&&Ce.innerHTML==null||pe.textContent&&Ce.textContent==null)&&f(fe,""),se?M(g.dynamicChildren,se,fe,A,oe,Ai(E,B),Z):ce||me(g,E,fe,null,A,oe,Ai(E,B),Z,!1),de>0){if(de&16)R(fe,pe,Ce,A,B);else if(de&2&&pe.class!==Ce.class&&i(fe,"class",null,Ce.class,B),de&4&&i(fe,"style",pe.style,Ce.style,B),de&8){const De=E.dynamicProps;for(let He=0;He<De.length;He++){const Be=De[He],te=pe[Be],ue=Ce[Be];(ue!==te||Be==="value")&&i(fe,Be,te,ue,B,A)}}de&1&&g.children!==E.children&&f(fe,E.children)}else!ce&&se==null&&R(fe,pe,Ce,A,B);((xe=Ce.onVnodeUpdated)||Se)&&xt(()=>{xe&&qt(xe,A,E,g),Se&&On(E,g,A,"updated")},oe)},M=(g,E,A,oe,B,Z,ce)=>{for(let fe=0;fe<E.length;fe++){const de=g[fe],se=E[fe],Se=de.el||tr(de),pe=Se&&(de.type===q||!_o(de,se)||de.shapeFlag&198)?v(Se):A;b(de,se,pe,null,oe,B,Z,ce,!0)}},R=(g,E,A,oe,B)=>{if(E!==A){if(E!==qe)for(const Z in E)!So(Z)&&!(Z in A)&&i(g,Z,E[Z],null,B,oe);for(const Z in A){if(So(Z))continue;const ce=A[Z],fe=E[Z];ce!==fe&&Z!=="value"&&i(g,Z,fe,ce,B,oe)}"value"in A&&i(g,"value",E.value,A.value,B)}},D=(g,E,A,oe,B,Z,ce,fe,de)=>{const se=E.el=g?g.el:a(""),Se=E.anchor=g?g.anchor:a("");let{patchFlag:pe,dynamicChildren:Ce,slotScopeIds:xe}=E;xe&&(fe=fe?fe.concat(xe):xe),g==null?(o(se,A,oe),o(Se,A,oe),j(E.children||[],A,Se,B,Z,ce,fe,de)):pe>0&&pe&64&&Ce&&g.dynamicChildren&&g.dynamicChildren.length===Ce.length?(M(g.dynamicChildren,Ce,A,B,Z,ce,fe),(E.key!=null||B&&E===B.subTree)&&_u(g,E,!0)):me(g,E,A,Se,B,Z,ce,fe,de)},V=(g,E,A,oe,B,Z,ce,fe,de)=>{E.slotScopeIds=fe,g==null?E.shapeFlag&512?B.ctx.activate(E,A,oe,ce,de):_e(E,A,oe,B,Z,ce,de):Ee(g,E,de)},_e=(g,E,A,oe,B,Z,ce)=>{const fe=g.component=mp(g,oe,B);if(Nr(g)&&(fe.ctx.renderer=I),gp(fe,!1,ce),fe.asyncDep){if(B&&B.registerDep(fe,Te,ce,Z),!g.el){const de=fe.subTree=ye(Bt);X(null,de,E,A),g.placeholder=de.el}}else Te(fe,g,E,A,B,Z,ce)},Ee=(g,E,A)=>{const oe=E.component=g.component;if(Zh(g,E,A))if(oe.asyncDep&&!oe.asyncResolved){E.el=g.el,E.placeholder=g.placeholder,le(oe,E,A);return}else oe.next=E,oe.update();else E.el=g.el,E.placeholder=g.placeholder,oe.vnode=E},Te=(g,E,A,oe,B,Z,ce)=>{const fe=()=>{if(g.isMounted){let{next:pe,bu:Ce,u:xe,parent:De,vnode:He}=g;{const Ue=mu(g);if(Ue){pe&&(pe.el=He.el,le(g,pe,ce)),Ue.asyncDep.then(()=>{xt(()=>{g.isUnmounted||se()},B)});return}}let Be=pe,te;Rn(g,!1),pe?(pe.el=He.el,le(g,pe,ce)):pe=He,Ce&&hs(Ce),(te=pe.props&&pe.props.onVnodeBeforeUpdate)&&qt(te,De,pe,He),Rn(g,!0);const ue=Ea(g),ke=g.subTree;g.subTree=ue,b(ke,ue,v(ke.el),$(ke),g,B,Z),pe.el=ue.el,Be===null&&ep(g,ue.el),xe&&xt(xe,B),(te=pe.props&&pe.props.onVnodeUpdated)&&xt(()=>qt(te,De,pe,He),B)}else{let pe;const{el:Ce,props:xe}=E,{bm:De,m:He,parent:Be,root:te,type:ue}=g,ke=qn(E);Rn(g,!1),De&&hs(De),!ke&&(pe=xe&&xe.onVnodeBeforeMount)&&qt(pe,Be,E),Rn(g,!0);{te.ce&&te.ce._hasShadowRoot()&&te.ce._injectChildStyle(ue,g.parent?g.parent.type:void 0);const Ue=g.subTree=Ea(g);b(null,Ue,A,oe,g,B,Z),E.el=Ue.el}if(He&&xt(He,B),!ke&&(pe=xe&&xe.onVnodeMounted)){const Ue=E;xt(()=>qt(pe,Be,Ue),B)}(E.shapeFlag&256||Be&&qn(Be.vnode)&&Be.vnode.shapeFlag&256)&&g.a&&xt(g.a,B),g.isMounted=!0,E=A=oe=null}};g.scope.on();const de=g.effect=new Sc(fe);g.scope.off();const se=g.update=de.run.bind(de),Se=g.job=de.runIfDirty.bind(de);Se.i=g,Se.id=g.uid,de.scheduler=()=>Rr(Se),Rn(g,!0),se()},le=(g,E,A)=>{E.component=g;const oe=g.vnode.props;g.vnode=E,g.next=null,np(g,E.props,oe,A),rp(g,E.children,A),Qt(),jc(g),Zt()},me=(g,E,A,oe,B,Z,ce,fe,de=!1)=>{const se=g&&g.children,Se=g?g.shapeFlag:0,pe=E.children,{patchFlag:Ce,shapeFlag:xe}=E;if(Ce>0){if(Ce&128){S(se,pe,A,oe,B,Z,ce,fe,de);return}else if(Ce&256){W(se,pe,A,oe,B,Z,ce,fe,de);return}}xe&8?(Se&16&&L(se,B,Z),pe!==se&&f(A,pe)):Se&16?xe&16?S(se,pe,A,oe,B,Z,ce,fe,de):L(se,B,Z,!0):(Se&8&&f(A,""),xe&16&&j(pe,A,oe,B,Z,ce,fe,de))},W=(g,E,A,oe,B,Z,ce,fe,de)=>{g=g||Pn,E=E||Pn;const se=g.length,Se=E.length,pe=Math.min(se,Se);let Ce;for(Ce=0;Ce<pe;Ce++){const xe=E[Ce]=de?ln(E[Ce]):zt(E[Ce]);b(g[Ce],xe,A,null,B,Z,ce,fe,de)}se>Se?L(g,B,Z,!0,!1,pe):j(E,A,oe,B,Z,ce,fe,de,pe)},S=(g,E,A,oe,B,Z,ce,fe,de)=>{let se=0;const Se=E.length;let pe=g.length-1,Ce=Se-1;for(;se<=pe&&se<=Ce;){const xe=g[se],De=E[se]=de?ln(E[se]):zt(E[se]);if(_o(xe,De))b(xe,De,A,null,B,Z,ce,fe,de);else break;se++}for(;se<=pe&&se<=Ce;){const xe=g[pe],De=E[Ce]=de?ln(E[Ce]):zt(E[Ce]);if(_o(xe,De))b(xe,De,A,null,B,Z,ce,fe,de);else break;pe--,Ce--}if(se>pe){if(se<=Ce){const xe=Ce+1,De=xe<Se?E[xe].el:oe;for(;se<=Ce;)b(null,E[se]=de?ln(E[se]):zt(E[se]),A,De,B,Z,ce,fe,de),se++}}else if(se>Ce)for(;se<=pe;)ae(g[se],B,Z,!0),se++;else{const xe=se,De=se,He=new Map;for(se=De;se<=Ce;se++){const nt=E[se]=de?ln(E[se]):zt(E[se]);nt.key!=null&&He.set(nt.key,se)}let Be,te=0;const ue=Ce-De+1;let ke=!1,Ue=0;const Xe=new Array(ue);for(se=0;se<ue;se++)Xe[se]=0;for(se=xe;se<=pe;se++){const nt=g[se];if(te>=ue){ae(nt,B,Z,!0);continue}let ct;if(nt.key!=null)ct=He.get(nt.key);else for(Be=De;Be<=Ce;Be++)if(Xe[Be-De]===0&&_o(nt,E[Be])){ct=Be;break}ct===void 0?ae(nt,B,Z,!0):(Xe[ct-De]=se+1,ct>=Ue?Ue=ct:ke=!0,b(nt,E[ct],A,null,B,Z,ce,fe,de),te++)}const lt=ke?up(Xe):Pn;for(Be=lt.length-1,se=ue-1;se>=0;se--){const nt=De+se,ct=E[nt],N=E[nt+1],re=nt+1<Se?N.el||tr(N):oe;Xe[se]===0?b(null,ct,A,re,B,Z,ce,fe,de):ke&&(Be<0||se!==lt[Be]?ne(ct,A,re,2):Be--)}}},ne=(g,E,A,oe,B=null)=>{const{el:Z,type:ce,transition:fe,children:de,shapeFlag:se}=g;if(se&6){ne(g.component.subTree,E,A,oe);return}if(se&128){g.suspense.move(E,A,oe);return}if(se&64){ce.move(g,E,A,I);return}if(ce===q){o(Z,E,A);for(let pe=0;pe<de.length;pe++)ne(de[pe],E,A,oe);o(g.anchor,E,A);return}if(ce===Ni){J(g,E,A);return}if(oe!==2&&se&1&&fe)if(oe===0)fe.persisted&&!Z[Oi]?o(Z,E,A):(fe.beforeEnter(Z),o(Z,E,A),xt(()=>fe.enter(Z),B));else{const{leave:pe,delayLeave:Ce,afterLeave:xe}=fe,De=()=>{g.ctx.isUnmounted?s(Z):o(Z,E,A)},He=()=>{const Be=Z._isLeaving||!!Z[Oi];Z._isLeaving&&Z[Oi](!0),fe.persisted&&!Be?De():pe(Z,()=>{De(),xe&&xe()})};Ce?Ce(Z,De,He):He()}else o(Z,E,A)},ae=(g,E,A,oe=!1,B=!1)=>{const{type:Z,props:ce,ref:fe,children:de,dynamicChildren:se,shapeFlag:Se,patchFlag:pe,dirs:Ce,cacheIndex:xe,memo:De}=g;if((pe===-2||se&&se.hasOnce)&&(B=!1),fe!=null&&(Qt(),xo(fe,null,A,g,!0),Zt()),xe!=null&&(!g.ctx||g.ctx===E)&&(E.renderCache[xe]=void 0),Se&256){E.ctx.deactivate(g);return}const He=Se&1&&Ce,Be=!qn(g);let te;if(Be&&(te=ce&&ce.onVnodeBeforeUnmount)&&qt(te,E,g),Se&6)he(g.component,A,oe);else{if(Se&128){g.suspense.unmount(A,oe);return}He&&On(g,null,E,"beforeUnmount"),Se&64?g.type.remove(g,E,A,I,oe):se&&!se.hasOnce&&(Z!==q||pe>0&&pe&64)?L(se,E,A,!1,!0):(Z===q&&pe&384||!B&&Se&16)&&L(de,E,A),oe&&$e(g)}const ue=De!=null&&xe==null;(Be&&(te=ce&&ce.onVnodeUnmounted)||He||ue)&&xt(()=>{te&&qt(te,E,g),He&&On(g,null,E,"unmounted"),ue&&(g.el=null)},A)},$e=g=>{const{type:E,el:A,anchor:oe,transition:B}=g,Z=E===q;if(Z&&!B){ee(A,oe);return}if(E===Ni){O(g),B&&!B.persisted&&B.afterLeave&&B.afterLeave();return}const ce=Z?zi(g):g,fe=()=>{Z?v(A)&&ee(A,oe):s(A),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(ce&&ce.shapeFlag&1&&B&&!B.persisted){const{leave:de,delayLeave:se}=B,Se=ce.el,pe=()=>de(Se,fe);se?se(Se,fe,pe):pe()}else fe()},ee=(g,E)=>{let A;for(;g!==E;)A=y(g),s(g),g=A;s(E)},he=(g,E,A)=>{const{bum:oe,scope:B,job:Z,subTree:ce,um:fe,m:de,a:se}=g;Ca(de),Ca(se),oe&&hs(oe),B.stop(),Z?(Z.flags|=8,ae(ce,g,E,A)):g.vnode.el&&ce&&(ce.transition=g.vnode.transition,ae(ce,g,E,A)),fe&&xt(fe,E),xt(()=>{g.isUnmounted=!0},E)},L=(g,E,A,oe=!1,B=!1,Z=0)=>{for(let ce=Z;ce<g.length;ce++)ae(g[ce],E,A,oe,B)},$=g=>{if(g.shapeFlag&6)return $(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const E=y(g.anchor||g.el),A=E&&E[Ih];return A?y(A):E},C=(g,E,A)=>{const oe=g&&E._vnode?void 0:g&&g.component?g.component.uid:_p();kh(()=>{g==null?E._vnode&&ae(E._vnode,null,null,!0):b(E._vnode||null,g,E,null,null,null,A),E._vnode=g},oe)},I={p:b,um:ae,m:ne,r:$e,mt:_e,mc:j,pc:me,pbc:M,n:$,o:e};return{render:C,hydrate:void 0,createApp:Xh(C)}}function Ai({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Rn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _u(e,t,n=!1){const o=e.children,s=t.children;if(Oe(o)&&Oe(s))for(let i=0;i<o.length;i++){const r=o[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=ln(s[i]),a.el=r.el),!n&&a.patchFlag!==-2&&_u(r,a)),a.type===ni&&(a.patchFlag===-1&&(a=s[i]=ln(a)),a.el=r.el),a.type===Bt&&!a.el&&(a.el=r.el)}}function up(e){const t=e.slice(),n=[0];let o,s,i,r,a;const l=e.length;for(o=0;o<l;o++){const d=e[o];if(d!==0){if(s=n[n.length-1],e[s]<d){t[o]=s,n.push(o);continue}for(i=0,r=n.length-1;i<r;)a=i+r>>1,e[n[a]]<d?i=a+1:r=a;d<e[n[i]]&&(i>0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function mu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:mu(t)}function Ca(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function tr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?tr(t.subTree):null}const gu=e=>e.__isSuspense;function dp(e,t){t&&t.pendingBranch?Oe(e)?t.effects.push(...e):t.effects.push(e):bh(e)}const q=Symbol.for("v-fgt"),ni=Symbol.for("v-txt"),Bt=Symbol.for("v-cmt"),Ni=Symbol.for("v-stc"),fn=[];let Rt=null;function c(e=!1){fn.push(Rt=e?null:[])}function Mr(){fn.pop(),Rt=fn[fn.length-1]||null}let Lo=1;function xa(e,t=!1){Lo+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function yu(e){return e.dynamicChildren=Lo>0?Rt||Pn:null,Mr(),Lo>0&&Rt&&Rt.push(e),e}function u(e,t,n,o,s,i){return yu(_(e,t,n,o,s,i,!0))}function Ke(e,t,n,o,s){return yu(ye(e,t,n,o,s,!0))}function oi(e){return e?e.__v_isVNode===!0:!1}function _o(e,t){return e.type===t.type&&e.key===t.key}const bu=({key:e})=>e??null,vs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?rt(e)||dt(e)||Fe(e)?{i:gt,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,s=null,i=e===q?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bu(t),ref:t&&vs(t),scopeId:qc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:gt};return a?(Os(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=rt(n)?8:16),Lo>0&&!r&&Rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rt.push(l),l}const ye=fp;function fp(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===Qc)&&(e=Bt),oi(e)){const a=Jn(e,t,!0);return n&&Os(a,n),Lo>0&&!i&&Rt&&(a.shapeFlag&6?Rt[Rt.indexOf(e)]=a:Rt.push(a)),a.patchFlag=-2,a}if($p(e)&&(e=e.__vccOpts),t){t=hp(t);let{class:a,style:l}=t;a&&!rt(a)&&(t.class=Me(a)),Qe(l)&&(Js(l)&&!Oe(l)&&(l=pt({},l)),t.style=Yn(l))}const r=rt(e)?1:gu(e)?128:Zs(e)?64:Qe(e)?4:Fe(e)?2:0;return _(e,t,n,o,s,r,i,!0)}function hp(e){return e?Js(e)||uu(e)?pt({},e):e:null}function Jn(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:a,transition:l}=e,d=t?pp(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&bu(d),ref:t&&t.ref?n&&i?Oe(i)?i.concat(vs(t)):[i,vs(t)]:vs(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Jn(e.ssContent),ssFallback:e.ssFallback&&Jn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return l&&o&&Ss(f,l.clone(f)),f}function Ve(e=" ",t=0){return ye(ni,null,e,t)}function x(e="",t=!1){return t?(c(),Ke(Bt,null,e)):ye(Bt,null,e)}function zt(e){return e==null||typeof e=="boolean"?ye(Bt):Oe(e)?ye(q,null,e.slice()):oi(e)?ln(e):ye(ni,null,String(e))}function ln(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Jn(e)}function Os(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Oe(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),Os(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!uu(t)?t._ctx=gt:s===3&&gt&&(gt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Fe(t)){if(o&65){Os(e,{default:t});return}t={default:t,_ctx:gt},n=32}else t=String(t),o&64?(n=16,t=[Ve(t)]):n=8;e.children=t,e.shapeFlag|=n}function pp(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const s in o)if(s==="class")t.class!==o.class&&(t.class=Me([t.class,o.class]));else if(s==="style")t.style=Yn([t.style,o.style]);else if(Us(s)){const i=t[s],r=o[s];r&&i!==r&&!(Oe(i)&&i.includes(r))?t[s]=i?[].concat(i,r):r:r==null&&i==null&&!Vs(s)&&(t[s]=r)}else s!==""&&(t[s]=o[s])}return t}function qt(e,t,n,o=null){jt(e,t,7,[n,o])}const vp=ou();let ku=0;function _p(){return ku}function mp(e,t,n){const o=e.type,s=(t?t.appContext:e.appContext)||vp,i={uid:ku++,vnode:e,type:o,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Kf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fu(o,s),emitsOptions:iu(o,s),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:o.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Yh.bind(null,i),e.ce&&e.ce(i),i}let bt=null;const Fr=()=>bt||gt;let Rs,Do;{const e=Xs(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(r=>r(i)):s[0](i)}};Rs=t("__VUE_INSTANCE_SETTERS__",n=>bt=n),Do=t("__VUE_SSR_SETTERS__",n=>Mo=n)}const qo=e=>{const t=bt;return Rs(e),e.scope.on(),()=>{e.scope.off(),Rs(t)}},Ta=()=>{bt&&bt.scope.off(),Rs(null)};function wu(e){return e.vnode.shapeFlag&4}let Mo=!1;function gp(e,t=!1,n=!1){t&&Do(t);const{props:o,children:s}=e.vnode,i=wu(e);tp(e,o,i,t),ip(e,s,n||t);const r=i?yp(e,t):void 0;return t&&Do(!1),r}function yp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Hh);const{setup:o}=n;if(o){Qt();const s=e.setupContext=o.length>1?kp(e):null,i=qo(e),r=Go(o,e,0,[e.props,s]),a=gc(r);if(Zt(),i(),(a||e.sp)&&!qn(e)&&zc(e),a){if(r.then(Ta,Ta),t)return r.then(l=>{Do(!0);try{Oa(e,l,t)}finally{Do(!1)}}).catch(l=>{Qs(l,e,0)});e.asyncDep=r}else Oa(e,r)}else $u(e)}function Oa(e,t,n){Fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Qe(t)&&(e.setupState=Hc(t)),$u(e)}function $u(e,t,n){const o=e.type;e.render||(e.render=o.render||Jt);{const s=qo(e);Qt();try{Uh(e)}finally{Zt(),s()}}}const bp={get(e,t){return yt(e,"get",""),e[t]}};function kp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,bp),slots:e.slots,emit:e.emit,expose:t}}function si(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hc(rh(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in To)return To[n](e)},has(t,n){return n in t||n in To}})):e.proxy}function wp(e,t=!0){return Fe(e)?e.displayName||e.name:e.name||t&&e.__name}function $p(e){return Fe(e)&&"__vccOpts"in e}const k=(e,t)=>vh(e,t,Mo),Ep="3.5.44";/**
14
+ * @vue/runtime-dom v3.5.44
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let nr;const Ra=typeof window<"u"&&window.trustedTypes;if(Ra)try{nr=Ra.createPolicy("vue",{createHTML:e=>e})}catch{}const Eu=nr?e=>nr.createHTML(e):e=>e,Sp="http://www.w3.org/2000/svg",Ip="http://www.w3.org/1998/Math/MathML",rn=typeof document<"u"?document:null,Aa=rn&&rn.createElement("template"),Cp={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?rn.createElementNS(Sp,e):t==="mathml"?rn.createElementNS(Ip,e):n?rn.createElement(e,{is:n}):rn.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>rn.createTextNode(e),createComment:e=>rn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const r=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{Aa.innerHTML=Eu(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const a=Aa.content;if(o==="svg"||o==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},xp=Symbol("_vtc");function Tp(e,t,n){const o=e[xp];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const As=Symbol("_vod"),Su=Symbol("_vsh"),_s={name:"show",beforeMount(e,{value:t},{transition:n}){e[As]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),mo(e,!0),o.enter(e)):o.leave(e,()=>{mo(e,!1)}):mo(e,t))},beforeUnmount(e,{value:t}){mo(e,t)}};function mo(e,t){e.style.display=t?e[As]:"none",e[Su]=!t}const Op=Symbol(""),Rp=/(?:^|;)\s*display\s*:/;function Ap(e,t,n){const o=e.style,s=rt(n);let i=!1;if(n&&!s){if(t)if(rt(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&Eo(o,a,"")}else for(const r in t)n[r]==null&&Eo(o,r,"");for(const r in n){r==="display"&&(i=!0);const a=n[r];a!=null?Pp(e,r,!rt(t)&&t?t[r]:void 0,a)||Eo(o,r,a):Eo(o,r,"")}}else if(s){if(t!==n){const r=o[Op];r&&(n+=";"+r),o.cssText=n,i=Rp.test(n)}}else t&&e.removeAttribute("style");As in e&&((!s||t!==n)&&(e[As]=i?o.display:""),e[Su]&&(o.display="none"))}const is=/\s*!important$/;function Eo(e,t,n){if(Oe(n))n.forEach(o=>Eo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))is.test(n)?e.setProperty(t,n.replace(is,""),"important"):e.setProperty(t,n);else{const o=Np(e,t);is.test(n)?e.setProperty(vn(o),n.replace(is,""),"important"):e[o]=n}}const Na=["Webkit","Moz","ms"],Pi={};function Np(e,t){const n=Pi[t];if(n)return n;let o=kt(t);if(o!=="filter"&&o in e)return Pi[t]=o;o=Gs(o);for(let s=0;s<Na.length;s++){const i=Na[s]+o;if(i in e)return Pi[t]=i}return t}function Pp(e,t,n,o){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&rt(o)&&n===o}const Pa="http://www.w3.org/1999/xlink";function La(e,t,n,o,s,i=Mf(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Pa,t.slice(6,t.length)):e.setAttributeNS(Pa,t,n):n==null||i&&!wc(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Pt(n)?String(n):n)}function Da(e,t,n,o,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Eu(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=wc(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(s||t)}function dn(e,t,n,o){e.addEventListener(t,n,o)}function Lp(e,t,n,o){e.removeEventListener(t,n,o)}const Ma=Symbol("_vei");function Dp(e,t,n,o,s=null){const i=e[Ma]||(e[Ma]={}),r=i[t];if(o&&r)r.value=o;else{const[a,l]=Bp(t);if(o){const d=i[t]=Up(o,s);dn(e,a,d,l)}else r&&(Lp(e,a,r,l),i[t]=void 0)}}const Mp=/(Once|Passive|Capture)$/,Fp=/^on:?(?:Once|Passive|Capture)$/;function Bp(e){let t,n;for(;(n=e.match(Mp))&&!Fp.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):vn(e.slice(2)),t]}let Li=0;const Kp=Promise.resolve(),Hp=()=>Li||(Kp.then(()=>Li=0),Li=Date.now());function Up(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(Oe(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const r=s.slice(),a=[o];for(let l=0;l<r.length&&!o._stopped;l++){const d=r[l];d&&jt(d,t,5,a)}}else jt(s,t,5,[o])};return n.value=e,n.attached=Hp(),n}const Fa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Vp=(e,t,n,o,s,i)=>{const r=s==="svg";t==="class"?Tp(e,o,r):t==="style"?Ap(e,n,o):Us(t)?Vs(t)||Dp(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jp(e,t,o,r))?(Da(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&La(e,t,o,r,i,t!=="value")):e._isVueCE&&(Wp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!rt(o)))?Da(e,kt(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),La(e,t,o,r))};function jp(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Fa(t)&&Fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Fa(t)&&rt(n)?!1:t in e}function Wp(e,t){const n=e._def.props;if(!n)return!1;const o=kt(t);return Array.isArray(n)?n.some(s=>kt(s)===o):Object.keys(n).some(s=>kt(s)===o)}const In=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Oe(t)?n=>hs(t,n):t};function Gp(e){e.target.composing=!0}function Ba(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const At=Symbol("_assign"),rs=Symbol("_initialValue");function Di(e,t,n){return t&&(e=e.trim()),n&&(e=qs(e)),e}const Iu={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e.parentNode&&(e.type==="text"?e[rs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[rs]=e.defaultValue.replace(/\r\n?/g,`
18
+ `))),e[At]=In(s);const i=o||s.props&&s.props.type==="number";dn(e,t?"change":"input",r=>{r.target.composing||e[At](Di(e.value,n,i))}),(n||i)&&dn(e,"change",()=>{e.value=Di(e.value,n,i)}),t||(dn(e,"compositionstart",Gp),dn(e,"compositionend",Ba),dn(e,"change",Ba))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const s=t??"",i=e[rs];delete e[rs],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[At](Di(e.value,n,o)):e.value=s},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},r){if(e[At]=In(r),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?qs(e.value):e.value,l=t??"";if(a===l)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===l)||(e.value=l)}},or={deep:!0,created(e,t,n){e[At]=In(n),dn(e,"change",()=>{const o=e._modelValue,s=Qn(e),i=e.checked,r=e[At];if(Oe(o)){const a=Er(o,s),l=a!==-1;if(i&&!l)r(o.concat(s));else if(!i&&l){const d=[...o];d.splice(a,1),r(d)}}else if(hn(o)){const a=new Set(o);i?a.add(s):a.delete(s),r(a)}else r(Cu(e,i))})},mounted:Ka,beforeUpdate(e,t,n){e[At]=In(n),Ka(e,t,n)}};function Ka(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(Oe(t))s=Er(t,o.props.value)>-1;else if(hn(t))s=t.has(o.props.value);else{if(t===n)return;s=Vt(t,Cu(e,!0))}e.checked!==s&&(e.checked=s)}const qp={created(e,{value:t},n){e.checked=Vt(t,n.props.value),e[At]=In(n),dn(e,"change",()=>{e[At](Qn(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[At]=In(o),t!==n&&(e.checked=Vt(t,o.props.value))}},Xp={deep:!0,created(e,{value:t,modifiers:{number:n}},o){e._modelValue=t,dn(e,"change",()=>{const s=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?qs(Qn(l)):Qn(l)),i=e.multiple,r=i?hn(e._modelValue)?new Set(s):s:s[0],a=e._pendingValue=[i,i?Oe(r)?s.slice():s:r];try{e[At](r)}finally{st(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[At]=In(o)},mounted(e,{value:t}){Ha(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[At]=In(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Yp(t,n[1],n[0]))&&Ha(e,t)}};function Yp(e,t,n){if(!n||Oe(e))return Vt(e,t);if(hn(e)){if(e.size!==t.length)return!1;for(const o of t)if(!e.has(o))return!1;return!0}return!1}function Ha(e,t){const n=e.multiple,o=Oe(t);if(!(n&&!o&&!hn(t))){for(let s=0,i=e.options.length;s<i;s++){const r=e.options[s],a=Qn(r);if(n)if(o){const l=typeof a;l==="string"||l==="number"?r.selected=t.some(d=>String(d)===String(a)):r.selected=Er(t,a)>-1}else r.selected=t.has(a);else if(Vt(Qn(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qn(e){return"_value"in e?e._value:e.value}function Cu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const zp=["ctrl","shift","alt","meta"],Jp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>zp.some(n=>e[`${n}Key`]&&!t.includes(n))},it=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let r=0;r<t.length;r++){const a=Jp[t[r]];if(a&&a(s,t))return}return e(s,...i)}))},Qp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ns=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=vn(s.key);if(t.some(r=>r===i||Qp[r]===i))return e(s)}))},Zp=pt({patchProp:Vp},Cp);let Ua;function ev(){return Ua||(Ua=ap(Zp))}const tv=((...e)=>{const t=ev().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=ov(o);if(!s)return;const i=t._component;!Fe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,nv(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t});function nv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ov(e){return rt(e)?document.querySelector(e):e}const sr=Y(""),sv=ks(sr);function En(e){sr.value="",queueMicrotask(()=>{sr.value=e})}const Va="~";function iv(e){return e==="."?Va:e===Va?"%7E":encodeURIComponent(e)}const tn=["prod","dev","optional","peer"],nn=["vulnerability","deprecated","outdated"],rv=["issues","changes","explore","compare"],av=["trail","tree","graph"],xu="issues",Tu="trail",Ou=3,Ru=1,Au="package",lv=/%(40|2F|3A|2C|28|29)/g;function to(e){const t=new Set(e);return tn.filter(n=>t.has(n))}function Nu(e){const t=new Set(e);return nn.filter(n=>t.has(n))}function cv(e){return rv.includes(e)}function Mi(e){return av.includes(e)}function uv(e){const t=e===null?[]:Nu(e.split(","));return t.length>0?t:[...nn]}function dv(e){const t=e===null?[]:to(e.split(","));return t.length>0?t:[...tn]}function ja(e,t){return e===null||!/^\d+$/.test(e)?t:Number(e)}function Vn(e){return e===null||e===""?void 0:e}function Tt(e,t){const n={...e,...t};for(const o of Object.keys(n))n[o]===void 0&&delete n[o];return n}function fv(e){const t=e.get("view"),n=e.get("mode");return Mi(t)?{view:"explore",mode:Mi(n)?n:t}:{view:cv(t)?t:xu,mode:Mi(n)?n:Tu}}function hv(e,t,n){if(n===void 0)return;const o=e??t;return o===void 0?void 0:{root:o,node:n}}function Wa(e){const t=new URLSearchParams(e),n=Vn(t.get("root")),o={...fv(t),kinds:dv(t.get("kinds")),types:uv(t.get("types")),group:t.get("group")==="direct"?"direct":Au,duplicatesOnly:t.get("dup")==="1",up:ja(t.get("up"),Ou),down:ja(t.get("down"),Ru),mergeBase:t.get("mb")==="1"},s=Tt(o,{ref:Vn(t.get("ref")),base:Vn(t.get("base")),root:n,selection:hv(n,Vn(t.get("in")),Vn(t.get("focus")))}),i=Vn(t.get("at")),r=Fo(s);return i===void 0||r===void 0?s:Tt(s,{anchor:{root:r,node:i}})}function Pu(e){return e.toString().replace(lv,decodeURIComponent)}function Fi(e){const t=new URLSearchParams;e.ref&&t.set("ref",e.ref),e.root&&t.set("root",e.root),e.selection&&!e.root&&t.set("in",e.selection.root),e.selection&&t.set("focus",e.selection.node),e.view!==xu&&t.set("view",e.view),e.mode!==Tu&&t.set("mode",e.mode),e.anchor&&t.set("at",e.anchor.node);const n=to(e.kinds);n.length>0&&n.length<tn.length&&t.set("kinds",n.join(","));const o=Nu(e.types);o.length>0&&o.length<nn.length&&t.set("types",o.join(",")),e.group!==Au&&t.set("group",e.group),e.duplicatesOnly&&t.set("dup","1"),e.up!==Ou&&t.set("up",String(e.up)),e.down!==Ru&&t.set("down",String(e.down)),e.base&&t.set("base",e.base),e.mergeBase&&t.set("mb","1");const s=Pu(t);return s===""?"":`?${s}`}function pv(e,t){return no(Tt(e,{base:t}))}function vv(e,t){return no(Tt(e,{mergeBase:t}))}function Fo(e){var t;return e.root??((t=e.selection)==null?void 0:t.root)}function _v(e){var t;return Iv(e)?(t=e.anchor)==null?void 0:t.node:void 0}function mv(e,t){return e!==void 0&&t!==void 0&&e.root===t.root&&e.node===t.node}function Wt(e){return{context:e,history:"push"}}function no(e){return{context:e,history:"replace"}}function gv(e,t){return Fo(e)===Fo(t)?t:Tt(t,{anchor:t.selection})}function Bn(e,t){return gv(e,Tt(e,t))}function Br(e){return e.view==="explore"?Tt(e,{anchor:e.selection}):e}function yv(e,t){const n=e.selection&&{root:t??e.selection.root,node:e.selection.node};return Wt(Bn(e,{root:t,selection:n}))}function Kr(e,t){const n=e.root===void 0?void 0:t.root;return Wt(Br(Bn(e,{root:n,selection:t})))}function Oo(e,t){return e.root!==void 0&&e.root!==t.root?Kr(e,t):Wt(Br(Bn(e,{selection:t})))}function bv(e,t){return Wt(Bn(e,{selection:t}))}function Ga(e,t){const n=Oo(e,t).context,o=mv(e.anchor,e.selection)?t:n.anchor;return no(Tt(n,{anchor:o}))}function kv(e,t){return Wt(Br(Bn(e,{root:t.root,selection:t})))}function wv(e,t){return e.root!==void 0&&e.root!==t.root?{...Kr(e,t),switchedTo:t.root}:Oo(e,t)}function Lu(e,t){return e&&{root:t,node:e.node}}function qa(e,t,n){const o=Lu(e.selection,t);return Wt(Bn(e,{root:t,selection:o,view:"issues",types:[n]}))}function Xa(e,t){const n=Lu(e.selection,t);return Wt(Bn(e,{root:t,selection:n,view:"changes"}))}function Du(e,t){return Wt(Tt(e,{view:"explore",mode:t,anchor:e.selection}))}function $v(e){return Du(e,"trail")}function Ev(e){return Du(e,"tree")}function Sv(e){return Wt(Tt(e,{selection:void 0}))}function Iv(e){return e.anchor!==void 0&&e.anchor.root===Fo(e)}function as(e,t){const o=t==="explore"&&e.view!=="explore"?e.selection:e.anchor;return no(Tt(e,{view:t,anchor:o}))}function Cv(e,t){return no(Tt(e,{mode:t}))}function xv(e){return e.selection===void 0?Wt(e):Wt(Tt(e,{anchor:e.selection}))}function Tv(e,t){return no(Tt(e,t))}function Ov(e,t){if(t===void 0)return[...e];const n=e.filter(s=>s.rootId===t),o=e.filter(s=>s.rootId!==t);return[...n,...o]}function Bi(e,t){return e.some(n=>n.rootId===t)}function Rv(e,t){if(t===void 0)return[...e];const n=e.map(i=>{const r=i.versions.map(a=>({...a,roots:Ov(a.roots,t)}));return{...i,versions:[...r.filter(a=>Bi(a.roots,t)),...r.filter(a=>!Bi(a.roots,t))]}}),o=n.filter(i=>i.versions.some(r=>Bi(r.roots,t))),s=n.filter(i=>!o.includes(i));return[...o,...s]}const ir="importer:",Mu=".",Av="install failed:",Nv=`${ir}${Mu}`,Pv="repository root";function Re(e){return e===Mu?Pv:e}function ii(e){return e===Nv?"the root package":e.startsWith(ir)?e.slice(ir.length):e}function Cn(e){return e.kind==="fix"?`Fix ${e.name} ${e.version}`:`Update ${e.name} to ${e.target}`}const ft="work",oo=Symbol("shown-source"),Lv="HEAD",Dv=7,Mv=["refs/heads/","refs/remotes/","refs/tags/"],Ya="deptrail-dropped-source-reload",Fv=1e4;function so(e){const t=Mv.find(n=>e.startsWith(n));return t===void 0?e:e.slice(t.length)}function Dn(e){return e.slice(0,Dv)}function Bv(e){return e.kind==="working"?ft:e.commit}function rr(e,t,n){const o=new URLSearchParams(t);for(const i of["ref","base"]){const r=n[i];r!==void 0&&(r===null?o.delete(i):o.set(i,r))}const s=Pu(o);return s===""?e:`${e}?${s}`}function Kv(e,t){return e.available?e.defaultBranch!==void 0?t.kind==="commit"&&t.ref===e.defaultBranch?ft:e.defaultBranch:t.kind==="working"?Lv:ft:ft}function Hv(e,t,n){try{const o=Number((e==null?void 0:e.getItem(Ya))??Number.NaN);if(Number.isFinite(o)&&t-o<Fv)return;e==null||e.setItem(Ya,String(t))}catch{}n()}function Uv(e){return e instanceof Error?e.message:String(e)}async function Vv(e,t){const n=new URLSearchParams(t).get("ref");if(n===null||n==="")return{source:{kind:"working"}};try{const o=await e.openSource({ref:n});return{source:{kind:"commit",ref:n,commit:o.commit,...o.committedAt===void 0?{}:{committedAt:o.committedAt},...o.skippedSubmodules===void 0?{}:{skippedSubmodules:o.skippedSubmodules}}}}catch(o){return{source:{kind:"working"},notice:`Could not open ${n}: ${Uv(o)}. Showing the working tree.`}}}const Zn="importer:",za="?:",ar="(",Ki=")",Ps="@",jv="/",Fu=1;function Bu(e){const t=e.indexOf(ar);return t===-1?e.length:t}function Ku(e){return e.slice(0,Bu(e))}function Wv(e,t){return e.startsWith(t)?e.slice(t.length):e}function Hu(e){const t=Ku(e),n=t.startsWith(za)?za:"",o=Wv(t.slice(n.length),jv),s=o.indexOf(Ps,Fu);return s===-1?{name:`${n}${o}`,version:""}:{name:`${n}${o.slice(0,s)}`,version:o.slice(s+Ps.length)}}function Hr(e){return e.slice(Bu(e))}function pn(e){return Hu(e).name}function Ur(e){return Hu(e).version}function Gv(e){const t=new Map;let n=0,o="";for(const s of Hr(e))if(s===ar&&n++,n===1&&s!==ar&&s!==Ki&&(o+=s),s===Ki&&n--,s===Ki&&n===0){const i=o.indexOf(Ps,Fu);i!==-1&&t.set(o.slice(0,i),o.slice(i+Ps.length)),o=""}return t}function qv(e){return[...new Set(e.flatMap(n=>[...n.keys()]))].filter(n=>new Set(e.map(o=>o.get(n))).size>1).sort((n,o)=>n.localeCompare(o,"en"))}function Xo(e){const t=new Map;for(const o of e){const s=Ku(o);t.set(s,(t.get(s)??new Set).add(o))}const n=new Map;for(const o of t.values()){if(o.size<2)continue;const s=[...o].sort((a,l)=>a.localeCompare(l,"en")),i=s.map(Gv),r=qv(i);s.forEach((a,l)=>{const d=r.map(f=>{var v;return{name:f,version:(v=i[l])==null?void 0:v.get(f)}});n.set(a,{position:l+1,count:s.length,peers:d,suffix:Hr(a)})})}return n}function ri(e,t,n){const o=new Map;for(const s of e)o.set(t(s),[...o.get(t(s))??[],n(s)]);return new Map([...o].map(([s,i])=>[s,Xo(i)]))}const Uu=new Set(["resolved-today","manifest-only"]),Xv=new Intl.NumberFormat("en-US"),Ls="/",Yv=new RegExp("(?<=[/.])"),zv=".",Jv="..";function Je(e,t,n){return`${Xv.format(e)} ${e===1?t:n}`}function Qv(e){return`https://www.npmjs.com/package/${e}`}function xn(e){return e.isImporter?e.name:`${e.name} ${e.version}`.trim()}function $t(e){if(e.startsWith(Zn))return Re(e.slice(Zn.length));const t=Ur(e);return t===""?pn(e):`${pn(e)} ${t}`}function Zv(e){const t=e.split(Ls);return t.map((n,o)=>o<t.length-1?`${n}${Ls}`:n)}const e_=" ";function t_(e){return e.split(e_).map(Zv)}function n_(e){return e.split(Yv)}function Ja(e){return e===zv?[]:e.split(Ls)}function o_(e,t){const n=Ja(e),o=Ja(t);let s=0;for(;s<n.length&&n[s]===o[s];)s++;return[...n.slice(s).map(()=>Jv),...o.slice(s)].join(Ls)}const ai="All roots",Ct=" · ",Qa="Show all dependency types",s_="Refresh",i_="Rescan files",r_="Recheck registry and OSV",io="Working tree",a_="Local branches",l_="Remote branches",c_="Tags",u_="checked out",d_="Filter branches and tags",f_="Branches unavailable",Za="Select source",Vu="Loading branches…";function h_(e){return`Last commit (HEAD) · ${e}`}function ms(e){return e.kind==="working"?io:so(e.ref)}function p_(e){return`${e} more. Type to filter.`}function v_(e){return`No branch or tag matches “${e}”`}function __(e){return`detached at ${e}`}function m_(e){return`Source: ${e}`}const ju="Back to working tree",g_="Changes apply to the working tree.",y_="Reload branch",b_="Read-only: changes and actions apply to the working tree.";function k_(e,t){var s;const n=e.committedAt===void 0?"":`, committed ${ro(e.committedAt,t)}`,o=(s=e.skippedSubmodules)!=null&&s.length?` ${w_(e.skippedSubmodules)}`:"";return`Viewing ${so(e.ref)} at ${Dn(e.commit)}${n}. ${b_}${o}`}function w_(e){return`Files inside git submodules are not read: ${e.join(", ")}.`}function $_(e){return`No roots in ${so(e)}`}const el="Base",E_="Swap",S_="Since merge base",I_="No merge base",C_="Checking registry and OSV…",x_="Base and target are the same commit.",T_="Vulnerabilities and deprecations",O_="Direct dependencies",R_="Package versions",tl="Package",nl="Change",A_="Workspace package",N_="Dependency",P_="Type",L_="Issue",D_="deprecated",M_="Comparing…";function Wu(e){return`merge base ${e}`}function F_(e){return`Building ${e}…`}function B_(e){return`${e} ${e===1?"version":"versions"} still being checked`}function K_(e){return`vulnerable · ${e}`}function ol(e){return`Show all ${e}`}function H_(e,t,n){const o=n===t?"":` (${n})`;return`Workspace package ${e}: ${t}${o}`}function U_(e){return`Could not compare: ${e}`}function V_(e){return`Compare is unavailable: ${e}`}const j_="Compare",sl="Select base",lr="Keyboard shortcuts",W_="Key",G_="Action",il=", ",Gu="Close",cr="Roots",q_="Details",X_="roots panel",Y_="details panel",z_="[",J_="]",Q_="(root)",Z_="Views",em="Explore mode",tm="Selected",rl="Clear selection",nm="Explore requires a single root",om="Select a root or search for a package.",sm="Roots to explore",ur="Options",qu="Duplicates only",im=" · ";function rm(e){return e?`${ur}${im}${qu}`:ur}const am="Levels up",lm="Levels down",cm="Node limit",um="Scope",dm="Click a package to select it. Drag to pan, scroll to zoom.",fm="Click to select",hm="Explore is built around this package",al="Clusters",pm="Click to expand",vm="Select a package to see its dependents.",_m="Issues",mm="Checking fix…",ll="Add fix",gm="Update…",ym="✓ In changes",bm="No fixed version yet",km="Unavailable",wm=": ",$m="Issue types",Em="View",Sm="Group by",Xu="Dependency types",Im="Add recommended fixes…",Cm="Add recommended fixes",xm="Adds the recommended fix for each vulnerable package to the changes of each selected root, one root at a time.",Tm="Roots",Om="Add fixes",Vr="Cancel",Yu="Review changes",Rm="Loading issues…",Am="Issues by direct dependency",Nm="the job failed",Pm="the job was canceled",zu="Dependents",Lm="Open in Explore",Dm="No dependents in this root with the current filters.",Mm="(none)",Ju="direct dependency",Fm="also in",Bm="More",li="malicious",Yo="deprecated",Qu="This version is deprecated",Km="no known issues",Hm="Registry and OSV checks found no issues",Zu="not checked",Um="npm",Vm="This version is not in the registry. It may have been unpublished.",jm="Not found in the registry.",Wm="Actions",Gm="Add to changes",qm="✓ In changes · Review",Xm="Replace in changes",Ym="Save change",zm="Added to changes",Jm="Replaced in changes",Qm="recommended",Zm="Version",eg="Show prereleases",jr="Workspace packages",tg="No update available.",ng="Updates are offered for direct dependencies of a workspace package.",og="latest",ed="in range",sg="current",ig="major update",rg="Select an issue to see available actions.",Bo="Loading…",td="Checking packages…",ci="Loading scan…",ag="No known issues",lg="Issues in dependencies",cg="No known issues in dependencies",ug="Explore dependencies",dg="Vulnerable dependencies",fg="Steps",cl="Changes were edited after this preview",nd="No changes yet. Add fixes from Issues or the details panel.",hg="Loading changes…",pg="Clear",vg="Undo",od="Edit",_g="Running job",mg="Last job",gg="Revert files",yg="No output yet.",bg="Run install:",kg="Apply",ul="None",wg="deptrail",$g="The session token was rejected. Open the URL that deptrail printed in the terminal.",Eg="Rescan did not finish. Check the terminal for errors.",Sg="Package details",dl="Dismiss",Ig="Search packages",Cg="Search packages or name@range",xg="Search results",Tg="Searching…",Og="Loading roots…",Rg="No package.json roots were found.",Ag="Package checks",Ng="Registry checks",Pg="Resolve versions",Lg="Check the token for this registry in .npmrc.",sd="dup",Dg="shown above",Mg="failed to load",Fg="No duplicated packages below this row.",Bg="Dependency graph",Kg="new file",Hg="Loading diff…",Ug="Showing the first 2 MB of the diff.",Vg={lockfile:"lockfile",installed:"installed","resolved-today":"resolved today","manifest-only":"manifest only"},dr={scanning:"scanning",failed:"failed"},ls=[{step:"changes",number:1,title:"Changes"},{step:"preview",number:2,title:"Preview"},{step:"apply",number:3,title:"Apply"}],jg={preview:"Preview",apply:"Apply…","preview-again":"Preview again"},go={title:"Preview",goals:"Goals",newIssues:"New issues",warnings:"Warnings",files:"Files"},Wg={package:"Package",direct:"Direct dependency"},kn={issue:"Issue",package:"Package",root:"Root",recommended:"Recommended"},id="Via",Gg="via",ui={issues:"Issues",changes:"Changes",explore:"Explore",compare:"Compare"},rd={trail:zu,tree:"Dependencies",graph:"Graph"},qg={package:"Around the package","whole-root":"Whole root"},Xg={above:"workspace package, listed above",below:"workspace package, listed below"},yo={importers:jr,direct:"Direct dependencies",via:"Via",anchor:"This package",children:"Depends on"},Yg=[{keys:"⌘K, Ctrl+K, /",action:"Focus search"},{keys:"[",action:"Collapse or expand the roots panel"},{keys:"]",action:"Collapse or expand the details panel"},{keys:"1, 2, 3, 4",action:"Go to Issues, Changes, Explore, or Compare"},{keys:"?",action:"Show keyboard shortcuts"},{keys:"Esc",action:"Close the open menu, popover, or dialog"}],Ro="Re-lock",Ko="Update",zg="default",fl=2,ad={relock:"Re-lock",chain:"Update parent packages",override:"Override"},Jg="Needs a range change",Qg="No update available",Zg="In range",ey=3,at=", ",zo="; ",di="Offline: started with --offline",ld="unknown reason",ty="an earlier check",Wr={registry:"Registry",osv:"OSV"},ny={registry:"the registry",osv:"OSV"},oy={"private-scope":"Private scope with a registry in .npmrc; not sent to OSV","non-registry":"Not from a registry (git, file, or link)","unknown-version":"The exact version is unknown (manifest only)"},sy="No known issues in the checked packages",iy="No known issues of the selected types in the checked packages",ry={checking:td,offline:di,filtered:"No issues of the selected types"},ay={vulnerability:"Vulnerabilities",deprecated:"Deprecations",outdated:"Updates"},ly={"pnpm-workspace.yaml":"pnpm-workspace.yaml","package.json#pnpm.overrides":"package.json (pnpm.overrides)","package.json#overrides":"package.json (overrides)"},cy={loading:Bo,checking:td,offline:di},uy={lockfile:"Exact versions from the lockfile.",installed:"Versions read from the installed node_modules.","resolved-today":"Versions are resolved as of today, not read from a lockfile.","manifest-only":"Only direct dependencies from package.json are known."},dy={load:"Could not load the changes",clear:"Could not clear the changes",undo:"Could not restore the cleared changes",preview:"Could not start the preview",apply:"Could not apply the changes",revert:"Could not revert the files",cancel:"Could not cancel the job",follow:"Could not get the job status",edit:"Could not open the package"},hl=3,pl="↑",fy="Working…",Gr="unknown error",hy="Unknown error",py="just now",cd=60,vy=3600,cs=86400,_y=1e3,Hi=[["year",365*cs],["month",30*cs],["week",7*cs],["day",cs],["hour",vy],["minute",cd]],my=new Intl.RelativeTimeFormat("en-US",{numeric:"auto"}),gy=2,yy=" → use an override or add a step",by="installing…",ky="⌘K",wy="Ctrl+K",$y="Changed",Ey={apply:"Applied",revert:"Reverted"},ud={up:{place:"above",level:"up"},down:{place:"below",level:"down"}},Sy={preview:"previewing…",apply:"applying…",revert:"reverting…",collect:"adding fixes…"},Iy="Install canceled. Files already written are kept.",vl="`",Cy={staging:"Copying the root to a temporary directory…",resolving:"Resolving the lockfile…",checking:"Checking the result…",writing:"Writing files…",installing:"Running install…",rescanning:"Rescanning the root…"},dd={pnpm:"pnpm install --frozen-lockfile",npm:"npm ci"},xy={pnpm:"Runs dependency build scripts that your pnpm settings allow.",npm:"npm ci deletes and recreates node_modules and runs install scripts."},_l={preview:"Preview",apply:"Apply",revert:"Revert",collect:"Adding fixes"},ht=new Intl.NumberFormat("en-US"),fd="workspace package",hd=2,Ty=" + ";function fi(e){return e===void 0?ai:Re(e)}function qr(e){return`Root: ${fi(e)}`}function Oy(e,t){return`Show ${e} (${t})`}function Ry(e,t){return`Hide ${e} (${t})`}function Ay(e,t){return`${Je(e,"package","packages")} with issues in ${t}`}function Ny(e,t){return`${e} in ${Re(t)}`}function Py(e){return`Focus on ${e}`}function Ly(e){return`${e} is selected. Focus on it to see its dependents.`}function pd(e){return`${fd} ${e}`}function vd(e){return`requires ${e}`}function Dy(e){return e.length===1?`Only in ${e[0]}`:e.length<=hd?`Shared by ${e.join(Ty)}`:`Shared by ${Je(e.length,fd,jr.toLowerCase())}`}function _d(e,t){return{name:Dy(e),suffix:` (${ht.format(t)})`}}function My(e,t){const{name:n,suffix:o}=_d(e,t);return`${n}${o}`}function Fy(e){return e.length<=1?e.join(""):e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(at)}, and ${e.at(-1)}`}function By(e){if(e.length===1)return`Packages only ${e[0]} depends on`;const t=e.length===hd?"both":"all";return`Packages that ${Fy(e)} ${t} depend on`}function Ky(e,t,n,o){return e==="graph"&&o==="whole-root"?`Graph of ${n}`:t===void 0?`Overview of ${n}`:e==="trail"?`Dependents of ${t} in ${n}`:e==="tree"?`Dependencies of ${t}`:`Graph around ${t} in ${n}`}function Ds(e){const t=[],n=e.issueCounts;n!==void 0&&(n.vulnerable>0&&t.push({kind:"vulnerability",text:Je(n.vulnerable,"vulnerable","vulnerable")}),n.deprecated>0&&t.push({kind:"deprecated",text:Je(n.deprecated,"deprecated","deprecated")}),n.outdatedDirect>0&&t.push({kind:"outdated",text:Je(n.outdatedDirect,"update","updates")}));const o=e.actions.changeCount;return o>0&&t.push({kind:"changes",text:Je(o,"change","changes")}),t}function md(e){if(e.status==="scanning"||e.status==="failed")return dr[e.status];if(Uu.has(e.source))return"approximate"}function Hy(e){const t=new Set(e),n=tn.filter(o=>!t.has(o));if(!(n.length===0||n.length===tn.length))return`without ${n.join(", ")}`}function ro(e,t){const n=Math.max(0,(t-Date.parse(e))/_y);if(n<cd)return py;const[o,s]=Hi.find(([,i])=>n>=i)??Hi[Hi.length-1];return my.format(-Math.floor(n/s),o)}function gd(e,t){return`Checking packages: ${ht.format(e)} of ${ht.format(t)}`}function yd(e,t){return e.state==="offline"?"Offline":e.state==="running"?gd(e.registry.done,e.registry.total):e.finishedAt===void 0?"Not checked yet":`Checked ${ro(e.finishedAt,t)}`}function bd(e){return ay[e]}function Uy(e,t){return`${bd(e)} ${ht.format(t)}`}function ml(e,t,n){return n?`${ht.format(e)} / ${ht.format(t)}`:ht.format(t)}function Vy(e){if(e.state==="offline")return di;const t=e.state==="running",n=`Registry ${ml(e.registry.done,e.registry.total,t)} packages`,o=`OSV ${ml(e.osv.done,e.osv.total,t)} versions, ${ht.format(e.osv.skipped)} skipped`;return`${n}${Ct}${o}`}function kd(e){return`May be incomplete: not all paths to ${Yr(e)} with issues are listed`}function jy(e){const t=[];return e.failedChecks>0&&t.push(`${Je(e.failedChecks,"check","checks")} failed`),e.failedRoots.length>0&&t.push(`${e.failedRoots.map(Re).join(at)} failed to scan`),t}function wd(e,t=!1){const n=t?iy:sy;return[e.unlistedPaths>0?kd(e.unlistedPaths):n,...jy(e)].join(zo)}function Wy(e,t,n,o){return e==="clean"?`No known issues in ${t}`:e==="incomplete"?wd(n,o):ry[e]}function fr(e){return`Could not load the issues: ${e}`}function Gy(e,t){return`${Re(e)} — ${Je(t,"vulnerable package","vulnerable packages")}`}function qy(e){return`Adding fixes to ${Re(e)}…`}function Xy(e){const t=e.filter(o=>{var s;return(((s=o.result)==null?void 0:s.added)??0)>0});return t.length===0?"No fixes added":`Added ${t.map((o,s)=>{var a;const i=((a=o.result)==null?void 0:a.added)??0;return`${s===0?Je(i,"fix","fixes"):ht.format(i)} to ${Re(o.root)}`}).join(at)}`}function Yy(e){const t=e.flatMap(i=>{var r;return((r=i.result)==null?void 0:r.skipped)??[]});if(t.length===0)return;const n=t.slice(0,ey).map(i=>`${i.name} (${i.reason})`),o=t.length-n.length,s=n.join(at);return`skipped ${o>0?`${s}, and ${ht.format(o)} more`:s}`}function zy(e){return e.flatMap(t=>t.error===void 0?[]:[`Could not add fixes to ${Re(t.root)}: ${t.error}`])}function Jy(e){return[Xy(e),Yy(e)].filter(n=>n!==void 0).join(zo)}function $d(e){return e.wanted!==void 0&&e.wanted!==e.version?`${Zg}: ${e.wanted}`:e.latest===void 0?Qg:Jg}function Qy(e){return`Could not load the fix: ${e}`}function Zy(e){return`Could not add the fix: ${e}`}function eb(e,t){return`Added fix for ${e} to ${Re(t)}`}function tb(e){return`in ${Je(e,"root","roots")}`}function Tn(e){return`+${ht.format(e)} more`}const gl=2;function nb(e){return e.version===void 0?`no ${e.name}`:`${e.name} ${e.version}`}function Ed(e){return`variant ${e.position} of ${e.count}`}function Mn(e){const t=Ed(e);if(e.peers.length===0)return t;const n=e.peers.slice(0,gl).map(nb).join(at),o=e.peers.length-gl;return`${t} (${o>0?`${n} ${Tn(o)}`:n})`}function ob(e,t){return e===void 0?t:`${Re(e)}${wm}${t}`}function sb(e,t){return`${Re(e)}${at}${Mn(t)}`}function Xr(e,t,n){const o=`${e} ${t}`;return n===void 0?o:`${o}${at}${Mn(n)}`}function ib(e){return`${Tn(e)} not listed`}function Sd(e,t){return`${e} in ${t}`}function rb(e,t,n){return`${e} under ${t} in ${n}`}function Id(e){switch(e.kind){case"relock":return`${Ro} ${e.name} ${e.from} → ${e.to}`;case"set-range":return e.place==="catalog"?`${Ko} ${e.dependency} in the ${e.catalog??zg} catalog to ${e.to}`:`${Ko} ${e.dependency} in ${ii(e.importer)} to ${e.to}`;case"override":return`Override ${e.selector} to ${e.value} in ${ly[e.file]}`}}function yl(e){const t=e.length-fl,n=e.slice(0,fl).join(", ");return t>0?`${n}, and ${t} more`:n}function ab(e){const t=e.flatMap(n=>n.kind==="set-range"?[n.dependency]:[]);return[...new Set(t)]}function lb(e,t){const n=e.flatMap(o=>o.kind==="relock"&&o.name!==t.name?[o.name]:[]);return[...new Set(n)]}function cb(e,t){const n=e.find(o=>o.kind==="relock"&&o.name===t.name);return(n==null?void 0:n.kind)==="relock"?n.to:void 0}function ub(e,t){const[n]=e;return(n==null?void 0:n.kind)==="relock"&&n.name===t.name}function db(e){const t=e.find(n=>n.kind==="override");return(t==null?void 0:t.kind)==="override"?t.value:void 0}function hr(e,t){return t===void 0?e:`${e} to ${t}`}function gs(e){return ad[e]}function fb(e,t){return`${gs(e)}: ${t}`}function hi(e,t){switch(e.choice){case"relock":{const n=cb(e.steps,t);return n===void 0?gs("relock"):hr(Ro,n)}case"chain":{const n=ab(e.steps);if(n.length>0){const s=yl(n);return ub(e.steps,t)?`${Ro} and update ${s}`:`${Ko} ${s}`}const o=lb(e.steps,t);return o.length>0?`${Ro} ${yl(o)}`:gs("chain")}case"override":{const n=db(e.steps);return n===void 0?gs("override"):hr("Override",n)}}}function hb(e,t,n){const o=vd(e);return t?`${o}${Ct}${Ju}`:n.length===0?o:`${o}${Ct}from ${n.join(at)}`}function pb(e,t){return`${Re(e)} (${t})`}function Cd(e,t){return`↑ ${e} ${t}`}function vb(e,t){return`Latest: ${e} (${t} update)`}function xd(e){return`${e} update`}function _b(e,t,n){return`${xd(e)}: ${t} → ${n}`}function Td(e,t){return`${Od(e)}${Ct}${t}`}function Od(e){return`${ht.format(e)} vulnerable below`}function Rd(e,t){return`${Je(e,"vulnerable package","vulnerable packages")} below; highest severity: ${t}`}function pi(e,t){return`${Je(e,"known vulnerability","known vulnerabilities")}; highest severity: ${t}`}function mb(e){return oy[e??"unknown-version"]}function bl(e,t){return`${Wr[e]} check failed: ${t??ld}`}function gb(e){return e.join(zo)}function kl(e,t,n){const o=t===void 0?ty:ro(t,n);return`${Wr[e]} data is from ${o}; the last check failed.`}function wl(e,t){return`Could not check ${ny[e]}: ${t??ld}.`}function $l(e,t,n){return`${Wr[e]} checked ${ro(t,n)}`}function yb(e){return`latest ${e}`}function bb(e,t){return e===0&&t?"Deprecation":e===1?"Vulnerability":"Vulnerabilities"}function kb(e){return`Fixed in ${e.join(at)}`}function wb(e){return`“${e}”`}function $b(e){return`Up to date: ${e} is the latest version.`}function Eb(e,t){return`${Ko} ${e} in ${Re(t)}`}function Sb(e){return`unchanged (${e} is ${ed})`}function Ib(e,t){return`${ii(e)}: peerDependencies ${t} unchanged`}function Cb(e,t){return hr(e==="wanted"?Ro:Ko,t)}function El(e){return Object.hasOwn(ad,e)}function xb(e){const{goal:t,choice:n}=e;return t.kind==="fix"?El(n)?hi({choice:n,steps:e.steps},t):Cn(t):El(n)?Cn(t):Cb(n,t.target)}function Tb(e){return`In changes: ${e}`}function Ob(e){return`Loading actions for ${e}…`}function Rb(e){return`Could not load actions: ${e}`}function Ab(e){return`Could not add to changes: ${e}`}function Nb(e){return`Could not replace the change: ${e}`}function pr(e){return uy[e]}function Yr(e){return Je(e,"package","packages")}function Pb(e){return Je(e,Ju,"direct dependencies")}function Ad(e){return`${ui.changes} in ${Re(e)}`}function Lb(e){return`Could not load the vulnerable dependencies: ${e}`}function Db(e){return`Could not load the package checks: ${e}`}function Nd(e,t,n){return e==="clean"?t:e==="incomplete"?wd(n):cy[e]}function Mb(e){const t=e.slice(0,hl).join(at),n=e.length-hl;return n>0?`${t} ${Tn(n)}`:t}function Fb(e){return e.kind==="fix"?e.advisoryIds:e.importers.map(ii)}function Bb(e){const t=Fb(e);return t.length===0?Cn(e):`${Cn(e)}${Ct}${Mb(t)}`}function Kb(e){return`${od} ${Cn(e)}`}function Sl(e){return`Remove ${Cn(e)}`}function Hb(e){return e.map(Id).join(zo)}function Ub(e){return e===void 0?pl:`${pl} ${e}`}function Il(e){return`Cleared ${Je(e,"change","changes")}.`}function Pd(e){return`Skipped: ${e.map(t=>`${t.name} (${t.reason})`).join(at)}.`}function Vb(e){const t=`Restored ${Je(e.restored,"change","changes")}.`;return e.skipped.length===0?t:`${t} ${Pd(e.skipped)}`}function bo(e,t){return`${dy[e]}: ${t}`}function Ld(e,t){return`${e} is not in ${Re(t)}`}function jb(e,t){return`Could not remove ${Cn(e)}: ${t}`}function Wb(e){return e===void 0?fy:Cy[e]}function Cl(e){return`Log${Ct}${Je(e,"line","lines")}`}function Gb(e){return dd[e]}function qb(e){return xy[e]}function Xb(e,t){return`Apply ${Je(e,"change","changes")} to ${t}?`}function Yb(e){return`${Je(e,"goal","goals")} not met:`}function zb(e){return e.sharedWith===void 0||e.sharedWith.length===0?e.path:`${e.path} (also in ${e.sharedWith.map(Re).join(at)})`}function Jb(e){return`Writes ${e.map(zb).join(at)} exactly as previewed.`}function Qb(e){return`Install also writes node_modules in ${Je(e,"workspace package","workspace packages")} outside the root.`}function Dd(e){const t=e.map(s=>Re(s.id)).join(at),n=[...new Set(e.map(s=>s.manager))];if(e.length===1)return`Lockfile not updated: ${t}. Run ${e[0].manager} install there.`;if(n.length===1)return`Lockfiles not updated: ${t}. Run ${n[0]} install in each.`;const o=n.map(s=>{const i=e.filter(r=>r.manager===s).map(r=>Re(r.id)).join(at);return`${s} install in ${i}`});return`Lockfiles not updated: ${t}. Run ${o.join(" and ")}.`}function Zb(e){return`Package changes (${ht.format(e)})`}function ek(e){return`${Zu}: ${e}`}function tk(e,t,n){const o=`${Je((t==null?void 0:t.goalsMet)??0,"goal","goals")} met`,s=n.length===0?o:`${o}${Ct}files written: ${n.join(at)}`,i=(t==null?void 0:t.sharedRoots)!==void 0&&t.sharedRoots.length>0?` ${Dd(t.sharedRoots)}`:"";return`Applied to ${Re(e)}. ${s}.${i}`}function vr(e){return`${vl}${dd[e]}${vl}`}function nk(e){return e==="done"||e==="failed"}function xl(e,t,n,o){const s=Re(t);return n==="after-apply"?o==="not-run"?`node_modules was not updated. Run ${vr(e)} in ${s} when ready.`:void 0:nk(o)?`node_modules still has the applied versions. Run ${vr(e)} in ${s}.`:void 0}function ok(e,t){const n=(t==null?void 0:t.restored)??0,o=(t==null?void 0:t.skipped)??[],s=[`Files restored in ${Re(e)}.`];return n>0&&s.push(`${Je(n,"change is","changes are")} back in the list.`),o.length>0&&s.push(Pd(o)),s.join(" ")}function sk(e,t){const n=`Restores ${Je(e,"file","files")}`;return t===0?`${n}.`:`${n} and puts ${Je(t,"change","changes")} back in the list.`}function ik(e,t){const n=e.kind==="apply"&&t.length>0?` ${Dd(t)}`:"";return e.state==="failed"?`${_l[e.kind]} failed: ${e.error??Gr}${n}`:e.kind==="apply"?`${Iy}${n}`:`${_l[e.kind]} canceled.`}function rk(e,t=[]){var n;if(e.state!=="running"){if(e.state!=="done")return{text:ik(e,t),failed:!0};if(e.kind==="apply")return{text:tk(e.rootId,e.result,((n=e.result)==null?void 0:n.files)??[]),failed:!1};if(e.kind==="revert")return{text:ok(e.rootId,e.result),failed:!1}}}function ak(e){var t;return e.state==="cancelled"?!0:e.state==="failed"&&(((t=e.error)==null?void 0:t.startsWith(Av))??!1)}function lk(e,t){var n,o;if(t!==void 0){if(e.kind==="apply"&&ak(e))return`node_modules may be out of date. Run ${vr(t)} in ${Re(e.rootId)}.`;if(e.state==="done"){if(e.kind==="apply")return xl(t,e.rootId,"after-apply",(n=e.result)==null?void 0:n.install);if(e.kind==="revert")return xl(t,e.rootId,"after-revert",(o=e.result)==null?void 0:o.appliedInstall)}}}function ck(e){return Je(e,"change","changes")}function uk(e){const t=e.advisoryIds.slice(0,gy);if(t.length===0)return`${e.name} ${e.version}`;const n=e.advisoryIds.length-t.length,o=t.join(at);return n>0?`${o}, and ${n} more`:o}function dk(e,t){return`Fix ${uk(e)} in ${t}`}function fk(e,t,n){return e.kind==="update"?t:n?`${e.name}: ${t}`:`${e.name}: ${t}${yy}`}function Md(e,t){return t===void 0?e.detail:fk(t,e.detail,e.met)}function Tl(e){if((e==null?void 0:e.state)==="running")return e.kind==="apply"&&e.phase==="installing"?by:Sy[e.kind]}function hk(e,t,n,o,s,i){const r=(e===void 0?void 0:Ey[e])??$y;return i!==void 0&&o===s?`${r} in ${Re(t)}: ${n} ${o} ${Mn(i.from)} → ${Mn(i.to)}. Showing the new variant.`:`${r} in ${Re(t)}: ${n} ${o} → ${s}. Showing the new version.`}function pk(e,t){return`${e} is no longer in ${Re(t)}.`}function vi(e,t){return`${Ld(e,t)}.`}function vk(e){return`${e} is not in any root.`}function _k(e){return`Open in ${e}`}function mk(e,t){return`Open ${e} in ${t}`}function gk(e){return e.versions.map(t=>`${t.version} (${t.roots.map(Re).join(at)})`).join(zo)}function yk(e){return`Versions: ${e}`}function bk(e){return e.join(". ")}function _i(e){return`Scanning ${Re(e)}…`}function Ol(e){return`${Re(e)} is still scanning.`}function Fd(e){return`${Re(e)} is not part of this scan.`}function Bd(e,t){return`${Re(e)} failed to scan: ${t??Gr}`}function kk(e){return e??hy}function wk(e){return Je(e,"warning","warnings")}function $k(e,t){return`Vulnerabilities: ${ht.format(e)} checked, ${ht.format(t)} skipped`}function Ek(e,t,n){return`${e} ${t}${Ct}${Yr(n)}`}function Sk(e){return`Switched to ${Re(e)}`}function Ik(e){return`Could not load the scan: ${e}`}function Ck(e,t){return`Could not start resolving versions for ${Re(e)}: ${t}`}function xk(e){return`Could not start a rescan: ${e}`}function Tk(e){return`Could not refresh the package checks: ${e}`}function Ok(e){return`Request failed with status ${e}`}function Rk(e){return`Could not load the vulnerability and update badges: ${e}`}function Ak(e){return`Could not load the duplicates: ${e}`}function Rl(e){return`Could not load details: ${e}`}function Nk(e){return`Could not load the diff: ${e}`}function Pk(e){return e?ky:wy}function Lk(e){return`Search failed: ${e}`}function Dk(e){return`No packages match “${e}”`}function Mk(e,t,n,o){const s=`${e} ${t} in ${Re(n)}`;return o===""?s:`${s}${at}${o}`}function Kd(e){return`Expand ${e}`}function Fk(e){return`Collapse ${e}`}function Bk(e){return`+${Je(e,"path","paths")}`}function Kk(e,t,n){return`Show ${t} ${ud[e].place} ${n}`}function Hk(e,t){return`${t}: click to show one more level ${ud[e].level}`}function Uk(e,t){return`Showing ${ht.format(t)} of ${ht.format(e)} nodes. Narrow the scope to see all nodes.`}function Vk(e){return`Showing the first ${ht.format(e)} nodes. Reduce the depth to see a complete graph.`}function jk(e,t){return`Could not load the graph of ${e}: ${t}`}function Wk(e,t){return`Could not load the dependents of ${e}: ${t}`}function Gk(e,t){return`Could not load the dependencies of ${e}: ${t??Gr}`}class Kn extends Error{constructor(n,o){super(o);ca(this,"status");this.name="ApiError",this.status=n}}const Al="application/json",qk="/api/",Xk=/^\/api\/(?:(?:scan|search|duplicates|issues)(?=[/?]|$)|roots\/)/,Yk=404,zk="Unknown source ";let Ho,ys;function Jk(e,t){Ho=e,ys=t}function Qk(e,t){Ho!==void 0&&e===Yk&&t===`${zk}${Ho}`&&(ys==null||ys())}function Zk(e){return Ho===void 0||!Xk.test(e)?e:`/api/commits/${Ho}/${e.slice(qk.length)}`}function Dt(e,t){const n=new URLSearchParams;for(const[s,i]of Object.entries(t))i!==void 0&&n.set(s,String(i));const o=n.toString();return o===""?e:`${e}?${o}`}function Hd(e){return tn.every(t=>e.includes(t))?void 0:e}function mn(e){var t;return(t=Hd(e))==null?void 0:t.join(",")}function an(e){return`/api/roots/${iv(e)}`}function ko(e,t,n){return`${an(e)}/nodes/${encodeURIComponent(t)}/${n}`}function Wn(e){return`${an(e)}/changes`}function Nl(e,t){return`${Wn(e)}/${encodeURIComponent(t)}`}function Pl(e){return`/api/jobs/${encodeURIComponent(e)}`}async function e0(e){try{const t=await e.json();if(t&&typeof t=="object"&&"error"in t&&typeof t.error=="string")return t.error}catch{}return Ok(e.status)}function Et(e=fetch){async function t(a,l="GET",d){const f={Accept:Al};d!==void 0&&(f["Content-Type"]=Al);const v={method:l,headers:f,...d===void 0?{}:{body:JSON.stringify(d)}},y=await e(Zk(a),v);if(!y.ok){const m=await e0(y);throw Qk(y.status,m),new Kn(y.status,m)}return y}async function n(a){return await(await t(a)).json()}async function o(a){await t(a,"POST")}async function s(a,l){return await(await t(a,"POST",l)).json()}async function i(a,l){return await(await t(a,"PUT",l)).json()}async function r(a){await t(a,"DELETE")}return{scan:()=>n("/api/scan"),importers:a=>n(`${an(a)}/importers`),children:(a,l,d,f)=>n(Dt(ko(a,l,"children"),{depth:d,kinds:mn(f)})),dependents:(a,l,d,f)=>n(Dt(ko(a,l,"dependents"),{depth:d,kinds:mn(f)})),subgraph:(a,l,d,f,v,y)=>n(Dt(ko(a,l,"subgraph"),{up:d,down:f,limit:v,kinds:mn(y)})),search:a=>n(Dt("/api/search",{q:a})),duplicates:a=>n(Dt("/api/duplicates",{root:a})),resolve:a=>o(`${an(a)}/resolve`),rescan:()=>o("/api/rescan"),decorations:(a,l)=>n(Dt(`${an(a)}/decorations`,{kinds:mn(l)})),issueRows:(a,l)=>n(Dt("/api/issues",{root:a,kinds:mn(l),groupBy:"package"})),issueGroups:(a,l)=>n(Dt("/api/issues",{root:a,kinds:mn(l),groupBy:"direct"})),insight:(a,l,d)=>n(Dt(ko(a,l,"insight"),{kinds:mn(d)})),refreshEnrichment:()=>o("/api/enrichment/refresh"),nodeActions:(a,l,d)=>n(Dt(ko(a,l,"actions"),{kinds:mn(d)})),changes:a=>n(Wn(a)),addChange:(a,l)=>s(Wn(a),l),replaceChange:(a,l,d)=>i(Nl(a,l),d),removeChange:(a,l)=>r(Nl(a,l)),clearChanges:a=>r(Wn(a)),restoreCleared:a=>s(`${Wn(a)}/restore-cleared`),addRecommended:(a,l)=>s(`${Wn(a)}/recommended`,{kinds:Hd(l)}),preview:a=>s(`${an(a)}/preview`),previewFileDiff:(a,l)=>n(`${an(a)}/preview/files/${l}/diff`),apply:(a,l,d)=>s(`${an(a)}/apply`,{previewId:l,install:d}),revert:a=>s(`${an(a)}/revert`),job:(a,l)=>n(Dt(Pl(a),{since:l})),cancelJob:a=>o(`${Pl(a)}/cancel`),git:()=>n("/api/git"),openSource:a=>s("/api/sources",a),compare:(a,l)=>n(Dt("/api/compare",{base:a,target:l}))}}const t0={class:"center"},n0={class:"center__bar"},o0=["aria-label"],s0=["id","aria-selected","aria-controls","tabindex","title","onClick"],i0=["data-testid"],r0={class:"center__end"},a0=["aria-labelledby"],l0=Ae({__name:"CenterTabs",props:{view:{},scope:{},issueCount:{},changeCount:{}},emits:["view-change"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=["issues","changes","explore","compare"],r=tt(),a=`${r}-panel`,l=k(()=>o.issueCount===null?void 0:Ay(o.issueCount,fi(o.scope)));function d(w){return`${r}-tab-${w}`}function f(w){if(w==="issues")return o.issueCount??void 0;if(w==="changes")return o.changeCount}function v(w){var b;(b=document.getElementById(d(w)))==null||b.focus()}function y(){v(o.view)}async function m(w){const b=(i.indexOf(o.view)+w+i.length)%i.length,T=i[b];s("view-change",T),await st(),v(T)}return t({focusSelectedTab:y}),(w,b)=>(c(),u("div",t0,[_("div",n0,[_("div",{class:"center__tabs",role:"tablist","aria-label":h(Z_)},[(c(),u(q,null,be(i,T=>_("button",{id:d(T),key:T,type:"button",role:"tab",class:Me(["center__tab",{"center__tab--selected":T===e.view}]),"aria-selected":T===e.view,"aria-controls":T===e.view?a:void 0,tabindex:T===e.view?0:-1,title:T==="issues"?l.value:void 0,onClick:X=>s("view-change",T),onKeydown:[b[0]||(b[0]=Ns(it(X=>m(1),["prevent"]),["right"])),b[1]||(b[1]=Ns(it(X=>m(-1),["prevent"]),["left"]))]},[Ve(p(h(ui)[T])+" ",1),f(T)!==void 0?(c(),u("span",{key:0,class:"center__count","data-testid":`${T}-count`},p(f(T)),9,i0)):x("",!0)],42,s0)),64))],8,o0),_("div",r0,[Cs(w.$slots,"end",{},void 0)])]),_("div",{id:a,class:"center__panel",role:"tabpanel","aria-labelledby":d(e.view)},[Cs(w.$slots,"default",{},void 0)],8,a0)]))}}),Le=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},c0=Le(l0,[["__scopeId","data-v-7e0b5950"]]),u0={"chevron-right":"m9 18 6-6-6-6","chevron-down":"m6 9 6 6 6-6","chevron-up":"m18 15-6-6-6 6","chevrons-left":"m11 17-5-5 5-5M18 17l-5-5 5-5","chevrons-right":"m6 17 5-5-5-5M13 17l5-5-5-5",x:"M18 6 6 18M6 6l12 12",check:"M20 6 9 17l-5-5","git-branch":"M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9a9 9 0 0 1-9 9"},d0=["width","height"],f0=["d"],h0=Ae({__name:"AppIcon",props:{name:{},size:{default:16}},setup(e){return(t,n)=>(c(),u("svg",{class:"app-icon",width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"},[_("path",{d:h(u0)[e.name]},null,8,f0)],8,d0))}}),et=Le(h0,[["__scopeId","data-v-5b040367"]]),p0={class:"collapsible__strip"},v0=["aria-label","title"],_0={class:"collapsible__header"},m0=["aria-label","title"],g0={class:"collapsible__body"},Ll="(max-width: 820px)",y0=Ae({__name:"CollapsiblePanel",props:{side:{},landmark:{},landmarkLabel:{},focusable:{type:Boolean},label:{},shortcut:{},collapsed:{type:Boolean}},emits:["update:collapsed"],setup(e,{expose:t,emit:n}){const o=e,s=n,i={left:{hide:"chevrons-left",show:"chevrons-right"},right:{hide:"chevrons-right",show:"chevrons-left"}},r={hide:"chevron-down",show:"chevron-up"},a=Y(typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(Ll).matches);let l;function d(){a.value=(l==null?void 0:l.matches)??!1}Gt(()=>{l=window.matchMedia(Ll),d(),l.addEventListener("change",d)}),Ot(()=>l==null?void 0:l.removeEventListener("change",d));const f=Y(null),v=Y(null),y=Y(null),m=k(()=>Oy(o.label,o.shortcut)),w=k(()=>Ry(o.label,o.shortcut)),b=k(()=>o.side==="right"&&a.value?r:i[o.side]);function T(){var J;const F=document.activeElement;return F!==null&&(((J=f.value)==null?void 0:J.contains(F))??!1)}function X(){var F;(F=f.value)==null||F.focus()}return t({focusLandmark:X}),Ne(()=>o.collapsed,F=>{const J=F||T();st(()=>{var O,Q;J&&(F?(O=v.value)==null||O.focus():(Q=y.value)==null||Q.focus())})}),(F,J)=>(c(),Ke(Bh(e.landmark),{ref_key:"container",ref:f,class:Me(["collapsible",[`collapsible--${e.side}`,{"collapsible--collapsed":e.collapsed}]]),"aria-label":e.landmarkLabel,tabindex:e.focusable?-1:void 0},{default:bn(()=>[Ut(_("div",p0,[_("button",{ref_key:"showButton",ref:v,type:"button",class:"collapsible__toggle","aria-label":m.value,title:m.value,onClick:J[0]||(J[0]=O=>s("update:collapsed",!1))},[ye(et,{name:b.value.show,size:18},null,8,["name"])],8,v0)],512),[[_s,e.collapsed]]),Ut(_("div",_0,[Cs(F.$slots,"header",{},void 0,!0),_("button",{ref_key:"hideButton",ref:y,type:"button",class:"collapsible__toggle","aria-label":w.value,title:w.value,onClick:J[1]||(J[1]=O=>s("update:collapsed",!0))},[ye(et,{name:b.value.hide,size:18},null,8,["name"])],8,m0)],512),[[_s,!e.collapsed]]),Ut(_("div",g0,[Cs(F.$slots,"default",{},void 0,!0)],512),[[_s,!e.collapsed]])]),_:3},8,["class","aria-label","tabindex"]))}}),Dl=Le(y0,[["__scopeId","data-v-2811308e"]]),ao=Symbol("changes-index");function _r(e,t,n){var o;return(o=e.get(t))==null?void 0:o.find(({goal:s})=>s.kind!==n.kind||s.name!==n.name?!1:s.kind==="fix"&&n.kind==="fix"?s.version===n.version:!0)}function Ml(e,t,n){if(e===void 0)return{kind:"absent"};const o=t!=="version"||e.goal.kind==="update"&&e.goal.target===n;return e.choice===t&&o?{kind:"same",item:e}:{kind:"different",item:e}}function b0(e,t){return e.goal.kind==="update"&&e.goal.importers.includes(t)?!0:e.steps.some(n=>n.kind==="set-range"&&n.importer===t)}function k0(e,t){return e.filter(n=>b0(n,t))}function w0(e){return JSON.stringify(e.map(t=>[t.id,t.actions.changeCount]))}function $0(e,t,n){const o=We(new Map);let s=0;async function i(d,f){try{return(await e.changes(d)).items}catch{return f}}function r(d){const f=t.value.filter(v=>v.actions.changeCount>0).map(v=>v.id);return[...new Set([...f,...d])]}async function a(...d){const f=++s,v=o.value,y=await Promise.all(r(d).map(async w=>[w,await i(w,v.get(w))]));if(f!==s)return;const m=new Map;for(const[w,b]of y)b!==void 0&&b.length>0&&m.set(w,b);o.value=m}const l=Ne([()=>w0(t.value),n],()=>void a(),{immediate:!0});return Sr(l),{index:o,reload:a}}function Fl(e){return ri(e,t=>t.root,t=>t.node)}function zr(e,t){var n;return Xr(pn(e.node),e.version,(n=t.get(e.root))==null?void 0:n.get(e.node))}function Ud(e,t){return t.filter(n=>n.name===e).flatMap(n=>n.versions.flatMap(o=>o.roots.map(s=>({root:s.rootId,node:s.nodeId,version:o.version}))))}function Vd(e,t){const n=Ur(t.node),o=e.filter(a=>a.root===t.root),s=e.filter(a=>a.root!==t.root),i=s.filter(a=>a.version===n),r=s.filter(a=>a.version!==n);return[...o,...i,...r]}function E0(e,t){return e.node.startsWith(Zn)?{kind:"elsewhere",roots:[]}:t.length===0?{kind:"gone"}:{kind:"elsewhere",roots:Vd(t,e)}}function S0(e,t,n){const o=Ud(pn(e.node),t).filter(r=>r.root!==e.root||r.node!==e.node);if(!n.wasShownInRoot)return E0(e,o);if(e.node.startsWith(Zn))return{kind:"choose",options:[]};const s=o.filter(r=>r.root===e.root),[i]=s;return s.length===1&&i!==void 0?{kind:"moved",node:i.node,version:i.version}:s.length>1?{kind:"choose",options:s.map(({node:r,version:a})=>({node:r,version:a}))}:o.length===0?{kind:"gone"}:{kind:"elsewhere",roots:Vd(o,e)}}function I0(e,t,n,o,s){const i=Ud(t,e).filter(d=>d.root===n).map(d=>d.node),r=Xo([...i,o,s]),a=r.get(o),l=r.get(s);return a===void 0||l===void 0?void 0:{from:a,to:l}}function C0(e){var t;return e!==void 0&&e.status==="ready"&&((t=e.actions.job)==null?void 0:t.state)!=="running"}function x0(e){const t=e==null?void 0:e.actions.job;return t!==void 0&&t.state!=="running"?t.id:null}function T0(e,t){const n=e.actions.job;if(!(t===void 0||n===void 0||n.state==="running")&&n.state==="done")return n.id===t?void 0:n.kind}function O0(e,t){switch(t.kind){case"choose":return pk($t(e.node),e.root);case"elsewhere":return vi($t(e.node),e.root);case"gone":return vk(pn(e.node))}}function R0(e,t,n){const o=Re(t.root);return t.node===e.node?_k(o):mk(zr(t,n),o)}function A0(e,t,n){const o={root:t.root,node:t.node};return t.root===e.root?{label:zr(t,n),selection:o,opensRoot:!1}:{label:R0(e,t,n),selection:o,opensRoot:!0}}function N0(e,t){switch(t.kind){case"choose":{const n=t.options.map(s=>({root:e.root,node:s.node,version:s.version})),o=Fl(n);return n.map(s=>({label:zr(s,o),selection:{root:e.root,node:s.node},opensRoot:!1}))}case"elsewhere":{const n=Fl(t.roots);return t.roots.map(o=>A0(e,o,n))}case"gone":return[]}}function P0(e,t){return t.opensRoot?"open-in-root":(e==null?void 0:e.kind)==="choose"?"choose":"select"}const L0=2,Jr="@",Qr="|",D0=new Set(["relock","chain","override"]);function Ms(e,t){return nn.find(n=>e.includes(n)&&t.has(n))}function M0(e){const t=ri(e,n=>n.rootId,n=>n.nodeId);return e.map(n=>{var s;const o=(s=t.get(n.rootId))==null?void 0:s.get(n.nodeId);return{key:`${n.rootId}${Qr}${n.nodeId}`,location:n,label:o===void 0?Re(n.rootId):sb(n.rootId,o),title:o==null?void 0:o.suffix}})}function F0(e,t,n){const o=new Set(t),s=[];for(const i of e){const r=Ms(i.kinds,o);if(r===void 0)continue;const a=n===void 0?i.locations:i.locations.filter(l=>l.rootId===n);a.length!==0&&s.push({key:`${i.name}${Jr}${i.version}`,kind:r,row:i,locations:M0(a)})}return nn.flatMap(i=>s.filter(r=>r.kind===i))}function jd(e,t){const n=[...e].map(([s,i])=>({name:s,workspace:i})),o=n.slice(0,L0);return{shown:o,more:n.length-o.length+t,all:n}}function mr(e,t,n){e.has(t)||e.set(t,n)}function B0(e){const t=new Map;for(const n of e.via)n.direct===e.nodeId?n.importers.forEach(o=>mr(t,$t(o),!0)):mr(t,pn(n.direct),!1);return jd(t,e.viaTruncated)}function K0(e){const t=new Map;return e.importers.forEach(n=>mr(t,$t(n),!0)),jd(t,e.importersTruncated)}function H0(e){return e.via.some(t=>t.direct===e.nodeId)}function U0(e,t,n,o,s,i){if(s!==void 0)return{kind:"in-changes",itemId:s.id};if(e==="outdated"||e==="deprecated"&&H0(t))return{kind:"update"};if(e==="deprecated")return{kind:"none"};if(i!==void 0)return{kind:"root-unavailable"};if(o!==void 0)return{kind:"reason",text:Qy(o)};if(n===void 0)return{kind:"loading"};if(n.unavailable!==void 0)return{kind:"reason",text:n.unavailable};const r=n.fix,a=r==null?void 0:r.options.find(l=>l.recommended);return r!==void 0&&a!==void 0?{kind:"add",title:hi(a,r.goal)}:{kind:"reason",text:(r==null?void 0:r.reason)??bm}}function V0(e){return D0.has(e)}function j0(e,t){const n=t==null?void 0:t.goal;return t===void 0||(n==null?void 0:n.kind)!=="fix"||!V0(t.choice)?$d(e):hi({choice:t.choice,steps:t.steps},n)}function W0(e,t,n){switch(e.kind){case"loading":return mm;case"add":return e.title;case"reason":return e.text;case"root-unavailable":return km;case"update":return $d(t);case"in-changes":return j0(t,n);case"none":return""}}function G0(e,t,n,o){const s=new Set(t),i=e.filter(a=>Ms(a.kinds,s)!==void 0),r=new Set(i.flatMap(a=>a.locations.map(l=>l.rootId)).filter(a=>o===void 0||a===o));return[...n].filter(([a])=>r.has(a)).sort(([a],[l])=>Re(a).localeCompare(Re(l),"en")).map(([a,l])=>({rootId:a,text:ob(o===void 0?a:void 0,l)}))}function Zr(e,t){return`${e}-root-note-${encodeURIComponent(t)}`}function Bl(e){const t={vulnerability:0,deprecated:0,outdated:0};for(const n of e)for(const o of n.kinds)t[o]+=1;return t}function Wd(e){const t={vulnerability:e.decoration.vuln!==void 0,deprecated:e.decoration.deprecated===!0,outdated:e.decoration.outdated!==void 0};return nn.filter(n=>t[n])}function q0(e){const t=new Set(Wd(e));for(const n of e.issues)for(const o of n.kinds)t.add(o);return[...t]}function X0(e,t){const n=new Set(t);return e.filter(o=>q0(o).some(s=>n.has(s)))}function Gd(e,t){return e.via.some(n=>n.importers.includes(t))}function Y0(e,t,n){return e.flatMap(o=>{const s=ri(o.locations,i=>i.rootId,i=>i.nodeId).get(t);return o.locations.filter(i=>i.rootId===t&&Gd(i,n)).map(i=>({key:`${i.rootId}${Qr}${i.nodeId}`,node:i.nodeId,label:Xr(o.name,o.version,s==null?void 0:s.get(i.nodeId)),row:o}))})}function z0(e,t,n){return e.rootId===t&&e.viaTruncated>0&&!Gd(e,n)}function J0(e,t,n){return e.filter(o=>o.locations.some(s=>z0(s,t,n))).length}function Q0(e,t){const n=new Map;for(const o of e){if(!o.kinds.includes("vulnerability"))continue;const s=new Set(o.locations.map(i=>i.rootId).filter(i=>t===void 0||i===t));for(const i of s)n.set(i,(n.get(i)??0)+1)}return[...n].map(([o,s])=>({root:o,count:s})).sort((o,s)=>o.root.localeCompare(s.root,"en"))}function qd(e){const t=e.problems.reduce((n,o)=>n+o.count,0);return Math.max(t,e.registry.failed+e.osv.failed)}function Jo(e,t={}){return{failedChecks:(e==null?void 0:e.state)==="done"?qd(e):0,failedRoots:t.failedRoots??[],unlistedPaths:t.unlistedPaths??0}}function Z0(e){return(e==null?void 0:e.state)==="done"&&qd(e)===0}function ew(e){return e.failedChecks>0||e.failedRoots.length>0||e.unlistedPaths>0}function Xd(e,t){return e===void 0||e.state==="running"?"checking":e.state==="offline"?"offline":ew(t)?"incomplete":"clean"}function Yd(e){return tn.some(t=>!e.includes(t))}function tw(e,t,n,o=Jo(n)){if(e)return"filtered";const s=Xd(n,o);return s==="clean"&&Yd(t)?"filtered":s}function zd(e,t,n=Jo(t)){return e==="loading"||e==="failed"?e:e>0?"problems":Xd(t,n)}function nw(e,t){return t!==void 0?"failed":e===null?"loading":e.length}function ow(e){const t=e.issueCounts;return t===void 0?"loading":t.vulnerable+t.deprecated+t.outdatedDirect}function sw(e,t,n){if(!e.includes(t))return n[t]>0?nn.filter(s=>s===t||e.includes(s)):void 0;const o=e.filter(s=>s!==t);return o.some(s=>n[s]>0)?nn.filter(s=>o.includes(s)):void 0}function Kl(e,t){const n=e.includes(t)?e.filter(o=>o!==t):[...e,t];return n.length===0?void 0:to(n)}function iw(e){return{rootId:e.rootId,nodeId:e.direct,via:[{direct:e.direct,importers:e.importers}],viaTruncated:e.importersTruncated}}function rw(e,t,n){const{vuln:o,outdated:s}=e.decoration;return{name:e.name,version:e.version,kinds:t,vulnIds:[],...o===void 0?{}:{severity:o.severity},...s===void 0?{}:{latest:s.latest,outdatedLevel:s.level},locations:[n]}}function aw(e,t){return{rootId:e,nodeId:t.nodeId,via:[],viaTruncated:0}}function lw(e,t){return{name:e.name,version:e.version,kinds:e.kinds,...e.severity===void 0?{}:{severity:e.severity},vulnIds:e.vulnIds,locations:[t]}}function Hl(e,t,n,o){const s=e.get(`${n.name}${Jr}${n.version}`),i=s==null?void 0:s.locations.find(r=>r.rootId===o.rootId&&r.nodeId===o.nodeId);return s===void 0||i===void 0?{key:o.nodeId,kind:t,row:n,location:o}:{key:o.nodeId,kind:t,row:s,location:i}}function cw(e,t,n){const o=new Set(n),s=new Map(t.map(i=>[`${i.name}${Jr}${i.version}`,i]));return X0(e,n).flatMap(i=>{const r=Wd(i),a=Ms(r,o),l=iw(i),d=a===void 0?void 0:Hl(s,a,rw(i,r,l),l),f=i.issues.flatMap(v=>{const y=Ms(v.kinds,o);if(y===void 0)return[];const m=aw(i.rootId,v);return[Hl(s,y,lw(v,m),m)]});return d===void 0&&f.length===0?[]:[{key:`${i.rootId}${Qr}${i.direct}`,group:i,...d===void 0?{}:{own:d},issues:f}]})}const uw=4,ea=Symbol("node-actions-cache");function Jd(e,t){return`${e}
19
+ ${t}`}function Ul(e){return JSON.stringify([e.root,e.node,to(e.kinds),e.revision])}function dw(e){return JSON.stringify([e.root,e.node,to(e.kinds)])}function ta(e,t=uw){const n=new Map,o=new Map,s=[];let i=0;function r(){var l;for(;i<t&&s.length>0;)(l=s.shift())==null||l()}function a(l,d,f){return new Promise((v,y)=>{s.push(()=>{i+=1,e.nodeActions(l.root,l.node,to(l.kinds)).then(m=>{f.settled=m,v(m)}).catch(m=>{n.get(d)===f&&n.delete(d),y(m)}).finally(()=>{i-=1,r()})}),r()})}return{get(l){const d=Ul(l),f=n.get(d);if(f)return f.promise;const v={promise:Promise.resolve(void 0)};v.promise=a(l,d,v),n.set(d,v);const y=dw(l),m=o.get(y);return m!==void 0&&m!==d&&n.delete(m),o.set(y,d),v.promise},peek(l){var d;return(d=n.get(Ul(l)))==null?void 0:d.settled}}}const Qd=`
20
+ `,fw=" ",hw=409,Zd=404,pw="Unknown source ",vw=new Set(["apply","revert"]);function ef(e){const t=e==null?void 0:e.actions.job;return t!==void 0&&t.state!=="running"&&vw.has(t.kind)?t.id:""}function _w(e,t){return[e??"",(t==null?void 0:t.status)??"",(t==null?void 0:t.source)??"",ef(t)].join(Qd)}function Ui(e){if(e===null)return;const t=e.roots.map(n=>[n.id,n.status,n.source,ef(n)].join(fw));return[e.scannedAt,...t].join(Qd)}function mw(e,t,n){return n?t?t.status==="scanning"?_i(t.id):t.status==="failed"?Bd(t.id,t.error):null:Fd(e):ci}function gw(e,t){return(t===void 0?e:e.filter(o=>o.id===t)).reduce((o,s)=>o+s.actions.changeCount,0)}function Qo(e){return e instanceof Kn&&e.status===hw}function yw(e){return e instanceof Kn&&e.status===Zd&&e.message.startsWith(pw)}function Uo(e){return e instanceof Kn&&e.status===Zd&&!yw(e)}const Vl=["critical","high","moderate","unknown","low"],bw={critical:"danger",high:"danger",moderate:"warn",low:"neutral",unknown:"neutral"};function lo(e){return bw[e]}function mi(e){return e.malicious?"danger":lo(e.severity)}function kw(e){return{key:"vuln",label:e.malicious?li:e.severity,tone:mi(e),outlined:!1,title:pi(e.count,e.severity)}}function ww(e,t){const{count:n,worst:o}=e,s=Td(n,o);return{key:"below",label:t?Od(n):s,tone:lo(o),outlined:!0,title:t?s:Rd(n,o)}}function $w(){return{key:"deprecated",label:Yo,tone:"warn",outlined:!1,title:Qu}}function Ew(e,t){return{key:"outdated",label:Cd(e.latest,e.level),tone:"info",outlined:!1,title:_b(e.level,t,e.latest)}}function eo(e,t){if(e===void 0)return[];const n=[];return e.vuln&&n.push(kw(e.vuln)),e.below&&n.push(ww(e.below,t.compact)),e.deprecated&&n.push($w()),e.outdated&&t.isDirect&&n.push(Ew(e.outdated,t.version)),n}function na(e,t){if(e==="vulnerability"&&t.severity!==void 0){const n={severity:t.severity,count:t.vulnIds.length,...t.malicious?{malicious:!0}:{}};return eo({vuln:n},{isDirect:!1,compact:!1,version:t.version})}return e==="deprecated"?eo({deprecated:!0},{isDirect:!1,compact:!1,version:t.version}):t.outdatedLevel===void 0?[]:[{key:"level",label:t.outdatedLevel,tone:"info",outlined:!1,title:xd(t.outdatedLevel)}]}const Sw="rejected credentials";function tf(e){return e.startsWith(Sw)?Lg:void 0}function Iw(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"")}function Cw(e){return Ek(Iw(e.origin),e.message,e.count)}function jl(e){return tf(e.message)}function xw(e){return gd(e.registry.done,e.registry.total)}const nf=5,Tw=3,Ow=" ";function Rw(e){const t=new Map([[e.focus.id,e.focus]]),n=new Map([[e.focus.id,e.focusParents.map(o=>o.id)]]);for(const o of e.nodes)t.set(o.node.id,o.node),n.set(o.node.id,o.parents.map(s=>s.id));return{views:t,parentsOf:n}}function of(e){return e.startsWith(Zn)}function sf(e,t){const n=t.views.get(e);return n===void 0?$t(e):xn(n)}function oa(e,t){return e.localeCompare(t,"en")}function Aw(e,t){const n=new Set([e]),o=[e],s=new Set;for(let i=0;i<o.length;i++)for(const r of t.parentsOf.get(o[i])??[])n.has(r)||(n.add(r),o.push(r),of(r)&&s.add(r));return[...s].map(i=>sf(i,t)).sort(oa)}function Nw(e,t,n=nf){const o=Rw(t),s=e.slice(0,n).map(i=>{const r=of(i.parent);return{parent:i.parent,parentLabel:sf(i.parent,o),range:i.range===""?Mm:i.range,direct:r,from:r?[]:Aw(i.parent,o)}});return{rows:s,more:e.length-s.length}}function Pw(e,t,n=nf){const o=(e==null?void 0:e.requested)??t.focusParents.map(r=>({parent:r.id,range:r.range})),{rows:s,more:i}=Nw(o,t,n);return{rows:s,more:i+((e==null?void 0:e.requestedTruncated)??0)}}function Lw(e,t){const n=[],o=e==null?void 0:e.vuln;o!==void 0&&n.push({key:"vuln",text:o.malicious?li:o.severity,tone:mi(o),outlined:!1,title:pi(o.count,o.severity)}),e!=null&&e.deprecated&&n.push({key:"deprecated",text:Yo,tone:"warn",outlined:!1,title:Qu});const s=e==null?void 0:e.outdated;s!==void 0&&t&&n.push({key:"update",text:Cd(s.latest,s.level),tone:"info",outlined:!1,title:vb(s.latest,s.level)});const i=e==null?void 0:e.below;return i!==void 0&&n.push({key:"below",text:Td(i.count,i.worst),tone:lo(i.worst),outlined:!0,title:Rd(i.count,i.worst)}),n}function Dw(e){const{registry:t,vulnerabilities:n}=e,o=new Set;return n.state==="skipped"&&o.add(mb(n.reason)),(n.state==="offline"||t.state==="offline")&&o.add(di),n.state==="failed"&&o.add(bl("osv",n.message)),t.state==="failed"&&o.add(bl("registry",t.message)),[...o]}function Mw(e){const{registry:t,vulnerabilities:n}=e;return n.state==="ok"&&n.items.length===0&&t.state==="ok"&&t.deprecated===void 0}function Fw(e){return(e==null?void 0:e.vuln)!==void 0||(e==null?void 0:e.deprecated)===!0||(e==null?void 0:e.below)!==void 0}function Bw(e,t,n){const o=Lw(e,n.isDirect);if(t===null)return o;const s=Dw(t);return s.length>0?o.push({key:"not-checked",text:Zu,tone:"neutral",outlined:!0,title:gb(s)}):n.checksDone&&n.decorationsLoaded&&!Fw(e)&&Mw(t)&&o.push({key:"clean",text:Km,tone:"ok",outlined:!1,title:Hm}),o}function Kw(e,t,n){return t===void 0||!n.has(t.version)&&n.has(e.version)}function rf(e,t,n,o){const s=e.filter(i=>i.name===t).flatMap(i=>i.versions.flatMap(r=>r.roots)).filter(i=>i.rootId===n).map(i=>i.nodeId);return Xo([...s,o]).get(o)}function Hw(e,t,n,o,s=Tw){const i=e.filter(v=>v.name===t).flatMap(v=>v.versions),r=i.filter(v=>v.roots.some(y=>y.rootId===n)).map(v=>v.version),a=new Set(o===void 0?r:[o]),l=new Map;for(const v of i)for(const y of v.roots){if(y.rootId===n)continue;const m={root:y.rootId,node:y.nodeId,version:v.version};Kw(m,l.get(y.rootId),a)&&l.set(y.rootId,m)}const d=v=>a.has(v.version)?0:1,f=[...l.values()].sort((v,y)=>d(v)-d(y)||oa(v.root,y.root));return{roots:f.slice(0,s),more:Math.max(0,f.length-s)}}function Uw(e,t){return t===void 0?e:`${e}${Ow}${t}`}function Vw(e,t){const{registry:n,vulnerabilities:o}=e,s=[];return n.state==="stale"&&s.push(kl("registry",n.fetchedAt,t)),n.state==="failed"&&s.push(Uw(wl("registry",n.message),tf(n.message??""))),o.state==="stale"&&s.push(kl("osv",o.fetchedAt,t)),o.state==="failed"&&s.push(wl("osv",o.message)),s}function jw(e,t,n){const o={checks:[],notes:[]};if(e===null)return o;const{registry:s,vulnerabilities:i}=e;return!t&&s.latest!==void 0&&(o.latest=yb(s.latest)),(s.state==="ok"||s.state==="not-found")&&s.fetchedAt!==void 0&&o.checks.push($l("registry",s.fetchedAt,n)),i.state==="ok"&&i.fetchedAt!==void 0&&o.checks.push($l("osv",i.fetchedAt,n)),s.versionMissing&&o.notes.push(Vm),s.state==="not-found"&&o.notes.push(jm),o}function Ww(e){const t=new Map,n=[...e.rows];for(let o=0;o<n.length;o++){const{node:s}=n[o];s.id===e.node.id||t.has(s.id)||(t.set(s.id,s),n.push(...e.nested[s.id]??[]))}return[...t.values()]}function Gw(e,t){return Vl.indexOf(e.vuln.severity)-Vl.indexOf(t.vuln.severity)||oa(e.label,t.label)}function qw(e,t){return Ww(e).flatMap(n=>{var s;const o=(s=t[n.id])==null?void 0:s.vuln;return o===void 0?[]:[{node:n.id,label:xn(n),vuln:o}]}).sort(Gw)}const Xw=["aria-labelledby"],Yw=["id"],zw={class:"advisory__head"},Jw=["href"],Qw={key:0,class:"advisory__aliases"},Zw={key:0,class:"advisory__summary"},e$={key:1,class:"advisory__fixed"},t$={key:0,class:"advisory","data-testid":"deprecation"},n$={class:"advisory__head"},o$={class:"badge badge--warn"},s$={class:"advisory__summary"},i$=Ae({__name:"AdvisoryList",props:{advisories:{},deprecated:{}},setup(e){const t=e,n=tt(),o=k(()=>t.advisories.length>0||t.deprecated!==void 0),s=k(()=>bb(t.advisories.length,t.deprecated!==void 0));function i(r){return r.malicious?"danger":lo(r.severity)}return(r,a)=>o.value?(c(),u("section",{key:0,class:"advisory-list","aria-labelledby":h(n)},[_("h3",{id:h(n),class:"panel-heading"},p(s.value),9,Yw),(c(!0),u(q,null,be(e.advisories,l=>(c(),u("article",{key:l.id,class:"advisory","data-testid":"advisory"},[_("p",zw,[_("span",{class:Me(["badge",`badge--${i(l)}`])},p(l.malicious?h(li):l.severity),3),_("a",{class:"advisory__id mono",href:l.url,target:"_blank",rel:"noopener noreferrer"},p(l.id),9,Jw),l.aliases.length>0?(c(),u("span",Qw,p(l.aliases.join(h(at))),1)):x("",!0)]),l.summary?(c(),u("p",Zw,p(l.summary),1)):x("",!0),l.fixedIn.length>0?(c(),u("p",e$,p(h(kb)(l.fixedIn)),1)):x("",!0)]))),128)),e.deprecated!==void 0?(c(),u("article",t$,[_("p",n$,[_("span",o$,p(h(Yo)),1)]),_("p",s$,p(h(wb)(e.deprecated)),1)])):x("",!0)],8,Xw)):x("",!0)}}),r$=Le(i$,[["__scopeId","data-v-2d8ea2c4"]]),a$={class:"details-more","data-testid":"details-more"},l$={class:"details-more__summary"},c$={class:"details-more__body"},u$={key:0},d$={class:"details-more__links"},f$=["href"],h$=Ae({__name:"DetailsMore",props:{name:{},insight:{},isDirect:{type:Boolean},now:{}},setup(e){const t=e,n=k(()=>jw(t.insight,t.isDirect,t.now));return(o,s)=>(c(),u("details",a$,[_("summary",l$,[ye(et,{class:"summary-chevron",name:"chevron-right",size:18}),Ve(p(h(Bm)),1)]),_("div",c$,[n.value.latest!==void 0?(c(),u("p",u$,p(n.value.latest),1)):x("",!0),(c(!0),u(q,null,be(n.value.checks,i=>(c(),u("p",{key:i,class:"details-more__check"},p(i),1))),128)),(c(!0),u(q,null,be(n.value.notes,i=>(c(),u("p",{key:i},p(i),1))),128)),_("p",d$,[_("a",{href:h(Qv)(e.name),target:"_blank",rel:"noopener noreferrer"},p(h(Um)),9,f$)])])]))}}),p$=Le(h$,[["__scopeId","data-v-2c263d37"]]),v$={class:"package-header"},_$={key:0,class:"package-header__notice","data-testid":"check-notice"},m$=["title"],g$={class:"mono"},y$={class:"package-header__version mono"},b$=["title"],k$={class:"package-header__place"},w$=["title"],$$={key:0,class:"package-header__also-in","data-testid":"also-in"},E$=["onClick"],S$={key:0,class:"package-header__separator","aria-hidden":"true"},I$={key:1,class:"package-header__labels"},C$=["title"],x$=Ae({__name:"PackageHeader",props:{node:{},root:{},labels:{},alsoIn:{},variant:{},notices:{default:()=>[]},loading:{type:Boolean,default:!1}},emits:["open-in-root"],setup(e,{emit:t}){const n=e,o=t,s=at.trimEnd();function i(a){return a<n.alsoIn.roots.length-1}function r(a){o("open-in-root",{root:a.root,node:a.node})}return(a,l)=>(c(),u("div",v$,[e.notices.length>0?(c(),u("div",_$,[(c(!0),u(q,null,be(e.notices,d=>(c(),u("p",{key:d,class:"package-header__notice-text"},p(d),1))),128))])):x("",!0),_("header",{class:Me(["package-header__main",{"package-header__main--loading":e.loading}])},[_("h2",{class:"package-header__title",title:e.node.peerSuffix||void 0},[_("span",g$,p(e.node.name),1),l[0]||(l[0]=Ve(p(" "),-1)),_("span",y$,p(e.node.version),1)],8,m$),e.variant?(c(),u("p",{key:0,class:"package-header__peer",title:e.variant.suffix},p(h(Mn)(e.variant)),9,b$)):x("",!0),_("p",k$,[_("span",{class:"badge package-header__root",title:h(qr)(e.root),"data-testid":"root-badge"},p(h(Re)(e.root)),9,w$),e.alsoIn.roots.length>0?(c(),u("span",$$,[Ve(p(" ")+p(h(Fm))+" ",1),(c(!0),u(q,null,be(e.alsoIn.roots,(d,f)=>(c(),u("button",{key:d.root,type:"button",class:"package-header__link",onClick:v=>r(d)},[Ve(p(h(pb)(d.root,d.version)),1),i(f)?(c(),u("span",S$,p(h(s)),1)):x("",!0)],8,E$))),128)),e.alsoIn.more>0?(c(),u(q,{key:0},[Ve(p(" ")+p(h(Tn)(e.alsoIn.more)),1)],64)):x("",!0)])):x("",!0)]),e.labels.length>0?(c(),u("p",I$,[(c(!0),u(q,null,be(e.labels,d=>(c(),u("span",{key:d.key,class:Me(["badge",[`badge--${d.tone}`,{"badge--outline":d.outlined}]]),title:d.title,"data-testid":"header-label"},p(d.text),11,C$))),128))])):x("",!0)],2)]))}}),T$=Le(x$,[["__scopeId","data-v-10744edb"]]),O$=["aria-labelledby"],R$=["id"],A$={class:"change-goals__items"},N$={key:0,class:"change-goals__more"},P$=["href"],L$=5,D$=Ae({__name:"ChangeGoalsList",props:{root:{},items:{},href:{}},emits:["review"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=k(()=>n.items.slice(0,L$)),r=k(()=>n.items.length-i.value.length);function a(l){l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||(l.preventDefault(),o("review"))}return(l,d)=>(c(),u("section",{class:"change-goals","aria-labelledby":h(s)},[_("h3",{id:h(s),class:"panel-heading"},p(h(Ad)(e.root)),9,R$),_("ul",A$,[(c(!0),u(q,null,be(i.value,f=>(c(),u("li",{key:f.id,class:"change-goals__item"},p(h(Cn)(f.goal)),1))),128))]),r.value>0?(c(),u("p",N$,p(h(Tn)(r.value)),1)):x("",!0),_("p",null,[_("a",{class:"change-goals__review",href:e.href,onClick:a},p(h(Yu)),9,P$)])],8,O$))}}),af=Le(D$,[["__scopeId","data-v-66ed9567"]]),M$=["aria-labelledby"],F$={class:"scope-summary__prompt"},B$=["id"],K$={key:0,class:"scope-summary__muted"},H$={key:1,class:"scope-summary__roots"},U$={key:0,class:"scope-summary__name mono"},V$={key:1,class:"scope-summary__muted"},j$={key:2,class:"scope-summary__health"},W$={key:0},G$={key:0,"aria-hidden":"true"},q$=["href","onClick"],X$={key:2,class:"scope-summary__source","data-testid":"scope-source"},Y$=Ae({__name:"ScopeSummary",props:{scope:{},roots:{},scanLoaded:{type:Boolean},changes:{},status:{},healthLinkHref:{type:Function}},emits:["open-issues","open-changes"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=k(()=>n.scope===void 0?void 0:n.roots.find(m=>m.id===n.scope)),r=k(()=>n.scope===void 0?n.roots:i.value===void 0?[]:[i.value]),a=k(()=>i.value===void 0?[]:n.changes.get(i.value.id)??[]),l=k(()=>n.scope===void 0?ai:Re(n.scope));function d(m){return m.status!=="ready"}const f=k(()=>Jo(n.status));function v(m){const w=zd(ow(m),n.status,f.value);return w==="problems"||w==="failed"?void 0:Nd(w,ag,f.value)}function y(m,w,b){m.button!==0||m.metaKey||m.ctrlKey||m.shiftKey||m.altKey||(m.preventDefault(),b==="changes"?o("open-changes",w):o("open-issues",w,b))}return(m,w)=>(c(),u(q,null,[_("section",{class:"scope-summary","aria-labelledby":h(s)},[_("p",F$,p(h(rg)),1),_("h2",{id:h(s),class:Me(["scope-summary__title",{mono:e.scope!==void 0}])},p(l.value),11,B$),e.scanLoaded?x("",!0):(c(),u("p",K$,p(h(ci)),1)),r.value.length>0?(c(),u("ul",H$,[(c(!0),u(q,null,be(r.value,b=>(c(),u("li",{key:b.id,class:"scope-summary__root","data-testid":"scope-root"},[e.scope===void 0?(c(),u("span",U$,p(h(Re)(b.id)),1)):x("",!0),d(b)?(c(),u("span",V$,p(h(md)(b)),1)):(c(),u("span",j$,[v(b)!==void 0?(c(),u("span",W$,p(v(b)),1)):x("",!0),(c(!0),u(q,null,be(h(Ds)(b),(T,X)=>(c(),u(q,{key:T.kind},[X>0||v(b)!==void 0?(c(),u("span",G$,p(h(Ct)),1)):x("",!0),_("a",{class:Me(["scope-summary__link",`scope-summary__link--${T.kind}`]),href:e.healthLinkHref(b.id,T.kind),onClick:F=>y(F,b.id,T.kind)},p(T.text),11,q$)],64))),128))]))]))),128))])):x("",!0),i.value?(c(),u("p",X$,p(i.value.manager)+p(h(Ct))+p(h(Yr)(i.value.packageCount))+p(h(Ct))+p(h(pr)(i.value.source)),1)):x("",!0)],8,M$),i.value&&a.value.length>0?(c(),Ke(af,{key:0,root:i.value.id,items:a.value,href:e.healthLinkHref(i.value.id,"changes"),onReview:w[0]||(w[0]=b=>o("open-changes",i.value.id))},null,8,["root","items","href"])):x("",!0)],64))}}),z$=Le(Y$,[["__scopeId","data-v-d178b92a"]]),J$={class:"vulnerable-below__summary"},Q$={class:"vulnerable-below__body"},Z$={key:0,class:"vulnerable-below__error",role:"alert"},e1={key:1,class:"vulnerable-below__muted"},t1={key:2,class:"vulnerable-below__rows"},n1=["onClick"],o1=["title"],s1=100,i1=Ae({__name:"VulnerableBelow",props:{root:{},node:{},kinds:{},revision:{},summary:{},decorations:{}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,s=Et(),i=Y(!1),r=We(null);let a=0;const l=k(()=>[n.root,n.node,n.kinds.join(","),n.revision,n.summary.count].join(`
21
+ `)),d=k(()=>{var b;return((b=r.value)==null?void 0:b.key)===l.value?r.value:null}),f=k(()=>{var b;return(b=d.value)!=null&&b.result?qw(d.value.result,n.decorations):null}),v=k(()=>{var b;return((b=d.value)==null?void 0:b.error)??null});function y(b){return b instanceof Error?b.message:String(b)}async function m(){const b=++a,T=l.value;try{const X=await s.children(n.root,n.node,s1,n.kinds);if(b!==a)return;r.value={key:T,result:X,error:null}}catch(X){if(b!==a)return;r.value={key:T,result:null,error:y(X)}}}function w(b){i.value=b.currentTarget.open}return Ne([i,l],([b])=>{b&&d.value===null&&m()}),(b,T)=>(c(),u("details",{class:"vulnerable-below","data-testid":"vulnerable-below",onToggle:w},[_("summary",J$,[ye(et,{class:"summary-chevron",name:"chevron-right",size:18}),Ve(p(h(dg)),1)]),_("div",Q$,[v.value?(c(),u("p",Z$,p(h(Lb)(v.value)),1)):f.value===null?(c(),u("p",e1,p(h(Bo)),1)):(c(),u("ul",t1,[(c(!0),u(q,null,be(f.value,X=>(c(),u("li",{key:X.node,class:"vulnerable-below__row"},[_("button",{type:"button",class:"vulnerable-below__link mono",onClick:F=>o("select",X.node)},p(X.label),9,n1),_("span",{class:Me(["badge",`badge--${h(mi)(X.vuln)}`]),title:h(pi)(X.vuln.count,X.vuln.severity)},p(X.vuln.malicious?h(li):X.vuln.severity),11,o1)]))),128))]))])],32))}}),r1=Le(i1,[["__scopeId","data-v-18c6c677"]]),a1="<version>",l1=" · ",c1=" → ",u1=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;function Fs(e){const t=u1.exec(e);if(t!==null)return{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3])}}function lf(e,t){const n=Fs(e),o=Fs(t);if(!(n===void 0||o===void 0))return o.major!==n.major?o.major>n.major?"major":void 0:o.minor!==n.minor?o.minor>n.minor?"minor":void 0:o.patch>n.patch?"patch":void 0}function d1(e,t){return lf(e,t)==="major"}function Vo(e){const t=e.versions.findIndex(n=>n.version===e.current);return t===-1?e.versions:e.versions.slice(0,t)}function gr(e,t){return Vo(e).filter(n=>t||!n.prerelease)}function f1(e){if(e.unavailable!==void 0||e.fix!==void 0)return;const t=e.update;return t===void 0?ng:Vo(t).length>0?void 0:t.versions.some(o=>o.version===t.current)?$b(t.current):tg}function Wl(e,t){var s,i;const n=(s=Fs(e.current))==null?void 0:s.major;return((i=t.find(r=>{var a;return n!==void 0&&((a=Fs(r.version))==null?void 0:a.major)===n})??t[0])==null?void 0:i.version)??""}function h1(e,t){return t.wanted!==void 0&&t.wanted!==t.current&&e===t.wanted}function p1(e,t){const n=lf(t.current,e);return e===t.latest||n==="major"?n:void 0}function v1(e,t){const n=[e.version===t.latest?og:void 0,p1(e.version,t),h1(e.version,t)?ed:void 0,e.version===t.current?sg:void 0,e.severity,e.deprecated?Yo:void 0];return[e.version,...n.filter(o=>o!==void 0)].join(l1)}function _1(e,t){var n;return(n=e.template)==null?void 0:n.replaceAll(a1,t)}function Gl(e,t,n){if(n)return Sb(t);const o=_1(e,t);return o===void 0?e.specifier:`${e.specifier}${c1}${o}`}function sa(e,t){return t===e.wanted?"wanted":t===e.latest?"latest":"version"}function m1(e,t,n){const o=d1(e.current,t)?[ig]:[];if(sa(e,t)==="wanted")return o;const s=new Set(n),i=e.importers.flatMap(r=>s.has(r.id)&&r.peerRange!==void 0?[Ib(r.id,r.peerRange)]:[]);return[...o,...i]}const g1={class:"fix-choices"},y1=["id"],b1=["aria-labelledby"],k1=["onClick"],w1={class:"choice__head"},$1={class:"choice__label"},E1=["name","value"],S1={key:0,class:"badge badge--ok"},I1={class:"choice__steps"},C1={class:"choice__reason"},x1={key:0,class:"choice__warnings"},T1={key:1,class:"fix-choices__note muted"},O1=Ae({__name:"FixChoices",props:eu({fix:{},root:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=ps(e,"modelValue"),o=tt(),s=Y(null);function i(){var a;const r=(a=s.value)==null?void 0:a.querySelector('input[type="radio"]:checked');return r?(r.focus(),!0):!1}return t({focusSelected:i}),(r,a)=>(c(),u("div",g1,[_("p",{id:`${h(o)}-goal`,class:"fix-choices__goal"},p(h(dk)(e.fix.goal,h(Re)(e.root))),9,y1),e.fix.options.length>0?(c(),u("div",{key:0,ref_key:"choices",ref:s,class:"fix-choices__options",role:"radiogroup","aria-labelledby":`${h(o)}-goal`},[(c(!0),u(q,null,be(e.fix.options,l=>(c(),u("div",{key:l.choice,class:Me(["choice",{"choice--selected":n.value===l.choice}]),"data-testid":"fix-option",onClick:d=>n.value=l.choice},[_("div",w1,[_("label",$1,[Ut(_("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>n.value=d),type:"radio",name:`${h(o)}-fix`,value:l.choice},null,8,E1),[[qp,n.value]]),Ve(" "+p(h(hi)(l,e.fix.goal)),1)]),l.recommended?(c(),u("span",S1,p(h(Qm)),1)):x("",!0)]),_("ul",I1,[(c(!0),u(q,null,be(l.steps,(d,f)=>(c(),u("li",{key:f,class:"choice__step"},[_("span",null,p(h(Id)(d)),1),_("span",C1,p(d.reason),1)]))),128))]),l.warnings.length>0?(c(),u("ul",x1,[(c(!0),u(q,null,be(l.warnings,d=>(c(),u("li",{key:d,class:"choice__warning"},p(d),1))),128))])):x("",!0)],10,k1))),128))],8,b1)):x("",!0),(c(!0),u(q,null,be(e.fix.unavailable,l=>(c(),u("p",{key:l.choice,class:"fix-choices__note muted"},p(h(fb)(l.choice,l.reason)),1))),128)),e.fix.options.length===0&&e.fix.reason?(c(),u("p",T1,p(e.fix.reason),1)):x("",!0)]))}}),R1=Le(O1,[["__scopeId","data-v-99f74263"]]),A1={key:0},Mt=Ae({__name:"BreakableName",props:{name:{},version:{}},setup(e){const t=e,n=k(()=>n_(t.name));return(o,s)=>(c(),u(q,null,[(c(!0),u(q,null,be(n.value,(i,r)=>(c(),u(q,{key:r},[Ve(p(i),1),r<n.value.length-1?(c(),u("wbr",A1)):x("",!0)],64))),128)),e.version?(c(),u(q,{key:0},[Ve(p(" ")+p(e.version),1)],64)):x("",!0)],64))}}),N1={class:"workspace-name mono","data-testid":"workspace-name"},P1=Ae({__name:"WorkspaceName",props:{name:{}},setup(e){return(t,n)=>(c(),u("span",N1,[ye(Mt,{name:e.name},null,8,["name"])]))}}),gi=Le(P1,[["__scopeId","data-v-bc3b4bc7"]]),L1={class:"update-choice"},D1={class:"update-choice__goal"},M1={class:"update-choice__field"},F1=["for"],B1=["id"],K1=["value","disabled"],H1={key:0,class:"update-choice__toggle"},U1={class:"update-choice__importers"},V1={class:"update-choice__label"},j1={key:0,type:"checkbox",disabled:""},W1=["value","disabled"],G1={class:"importer__name"},q1={class:"mono"},X1={class:"importer__reason"},Y1={key:3,class:"mono"},z1={class:"mono"},J1={key:0,class:"importer__reason"},Q1={key:1,class:"update-choice__warnings"},Z1=Ae({__name:"UpdateChoice",props:eu({update:{},root:{}},{version:{required:!0},versionModifiers:{},importers:{required:!0},importersModifiers:{},showPrereleases:{type:Boolean,required:!0},showPrereleasesModifiers:{}}),emits:["update:version","update:importers","update:showPrereleases"],setup(e,{expose:t}){const n=e,o=ps(e,"version"),s=ps(e,"importers"),i=ps(e,"showPrereleases"),r=tt(),a=Y(null),l=k(()=>Vo(n.update).some(m=>m.prerelease)),d=k(()=>{const m=gr(n.update,i.value),w=n.update.versions.find(b=>b.version===n.update.current);return w?[...m,w]:m}),f=k(()=>o.value!==""&&sa(n.update,o.value)==="wanted"),v=k(()=>o.value===""?[]:m1(n.update,o.value,s.value));function y(){return a.value?(a.value.focus(),!0):!1}return t({focusVersion:y}),(m,w)=>(c(),u("div",L1,[_("p",D1,p(h(Eb)(e.update.name,e.root)),1),_("div",M1,[_("label",{class:"update-choice__label",for:`${h(r)}-version`},p(h(Zm)),9,F1),Ut(_("select",{id:`${h(r)}-version`,ref_key:"versionSelect",ref:a,"onUpdate:modelValue":w[0]||(w[0]=b=>o.value=b),class:"update-choice__select"},[(c(!0),u(q,null,be(d.value,b=>(c(),u("option",{key:b.version,value:b.version,disabled:b.version===e.update.current},p(h(v1)(b,e.update)),9,K1))),128))],8,B1),[[Xp,o.value]])]),l.value?(c(),u("label",H1,[Ut(_("input",{"onUpdate:modelValue":w[1]||(w[1]=b=>i.value=b),type:"checkbox"},null,512),[[or,i.value]]),Ve(" "+p(h(eg)),1)])):x("",!0),_("fieldset",U1,[_("legend",V1,p(h(jr)),1),(c(!0),u(q,null,be(e.update.importers,b=>(c(),u("label",{key:b.id,class:Me(["importer",{"importer--disabled":f.value||!b.editable}]),"data-testid":"update-importer"},[f.value?(c(),u("input",j1)):Ut((c(),u("input",{key:1,"onUpdate:modelValue":w[2]||(w[2]=T=>s.value=T),type:"checkbox",value:b.id,disabled:!b.editable},null,8,W1)),[[or,s.value]]),_("span",G1,[ye(gi,{name:h(ii)(b.id)},null,8,["name"])]),f.value?(c(),u(q,{key:2},[_("span",q1,p(b.specifier),1),_("span",X1,p(h(Gl)(b,o.value,!0)),1)],64)):b.editable&&o.value!==""?(c(),u("span",Y1,p(h(Gl)(b,o.value,!1)),1)):(c(),u(q,{key:4},[_("span",z1,p(b.specifier),1),b.editable?x("",!0):(c(),u("span",J1,p(b.reason),1))],64))],2))),128))]),v.value.length>0?(c(),u("ul",Q1,[(c(!0),u(q,null,be(v.value,b=>(c(),u("li",{key:b,class:"update-choice__warning","data-testid":"update-warning"},p(b),1))),128))])):x("",!0)]))}}),eE=Le(Z1,[["__scopeId","data-v-02a381a4"]]),tE=["aria-labelledby"],nE=["id"],oE={key:0,class:"what-to-do__error",role:"alert"},sE={key:1,class:"muted"},iE={key:2,class:"muted"},rE={key:3,class:"muted","data-testid":"nothing-to-do"},aE={key:0,class:"what-to-do__block","data-testid":"actions-fix"},lE={key:0,class:"what-to-do__footer"},cE=["id"],uE=["disabled","aria-disabled","aria-describedby"],dE={key:1,class:"what-to-do__error",role:"alert"},fE={key:1,class:"what-to-do__block","data-testid":"actions-update"},hE={class:"what-to-do__footer"},pE=["id"],vE=["disabled","aria-disabled","aria-describedby"],_E={key:1,class:"what-to-do__error",role:"alert"},mE=Ae({__name:"WhatToDo",props:{selection:{},kinds:{},revision:{},editing:{}},emits:["changed","review"],setup(e,{expose:t,emit:n}){var re;const o=e,s=n,i={add:Gm,review:qm,replace:Xm,save:Ym},r=Et(),a=wt(ea,()=>ta(r),!0),l=wt(ao,null),d=tt(),f=Y(null),v=Y(null),y=Y(null),m=Y(null),w=Y(null),b=Y(""),T=Y([]),X=Y(!1),F=Y(null),J=Y(null),O=Y((re=o.editing)==null?void 0:re.itemId);let Q=null,ie=null,H=0;const j=k(()=>[o.selection.root,o.selection.node,o.kinds.join(",")].join(`
22
+ `)),U=k(()=>`${j.value}
23
+ ${o.revision}`),M=k(()=>{var P;return((P=m.value)==null?void 0:P.nodeKey)===j.value?m.value:null}),R=k(()=>{var P;return((P=M.value)==null?void 0:P.actions)??null}),D=k(()=>{var P;return((P=M.value)==null?void 0:P.error)??null}),V=k(()=>{var P;return(P=R.value)==null?void 0:P.fix}),_e=k(()=>{var P;return(P=R.value)==null?void 0:P.update}),Ee=k(()=>pn(o.selection.node)),Te=k(()=>_e.value===void 0?!1:Vo(_e.value).length>0),le=k(()=>_e.value===void 0?[]:gr(_e.value,X.value)),me=k(()=>_e.value!==void 0&&b.value!==""?sa(_e.value,b.value):null),W=k(()=>me.value==="wanted"),S=k(()=>R.value===null?void 0:f1(R.value)),ne=k(()=>(l==null?void 0:l.index.value.get(o.selection.root))??[]),ae=k(()=>O.value===void 0?void 0:ne.value.find(P=>P.id===O.value));function $e(P,z){return P!==void 0&&z!==void 0&&P.goal.kind==="fix"&&P.goal.name===z.goal.name&&P.goal.version===z.goal.version}function ee(P,z){return P!==void 0&&z!==void 0&&P.goal.kind==="update"&&P.goal.name===z.name}const he=k(()=>$e(ae.value,V.value)?ae.value:void 0),L=k(()=>ee(ae.value,_e.value)?ae.value:void 0),$=k(()=>{const P=V.value;if(P===void 0||l===null||w.value===null)return{kind:"absent"};const z=_r(l.index.value,o.selection.root,{kind:"fix",name:P.goal.name,version:P.goal.version});return Ml(z,w.value)}),C=k(()=>{const P=_e.value;if(P===void 0||l===null||me.value===null)return{kind:"absent"};const z=_r(l.index.value,o.selection.root,{kind:"update",name:P.name});return Ml(z,me.value,b.value)});function I(P,z){return z!==void 0?{kind:"save",itemId:z.id}:P.kind==="absent"?{kind:"add"}:P.kind==="same"?{kind:"review",itemId:P.item.id}:{kind:"replace",itemId:P.item.id}}function Ie(P,z,ge){const Pe=I(P,z),Ze=P.kind==="different"?Tb(xb(P.item)):void 0;return{action:Pe,inChanges:Ze,ready:Pe.kind==="review"||ge}}const g=k(()=>Ie($.value,he.value,w.value!==null)),E=k(()=>Ie(C.value,L.value,me.value!==null&&(W.value||T.value.length>0))),A=k(()=>B("fix")),oe=k(()=>B("update"));function B(P){const z=J.value;return z!==null&&z.block===P&&z.nodeKey===j.value?z.text:void 0}function Z(P){var z;((z=J.value)==null?void 0:z.block)===P&&(J.value=null)}function ce(P){return F.value!==null&&F.value.block===P&&F.value.nodeKey===j.value}function fe(P,z){var Pe;const ge=(P==null?void 0:P.options)??[];return z!==null&&ge.some(Ze=>Ze.choice===z)?z:((Pe=ge.find(Ze=>Ze.recommended)??ge[0])==null?void 0:Pe.choice)??null}function de(P){return((P==null?void 0:P.importers)??[]).filter(z=>z.editable).map(z=>z.id)}function se(P,z){w.value=fe(P.fix,z?w.value:null),z||(X.value=!1);const ge=de(P.update);if(T.value=z?T.value.filter(vt=>ge.includes(vt)):ge,P.update===void 0){b.value="";return}const Pe=gr(P.update,X.value);z&&Pe.some(vt=>vt.version===b.value)||(b.value=Wl(P.update,Pe))}function Se(P){var ge;const z=(ge=V.value)==null?void 0:ge.options.find(Pe=>Pe.choice===P);z!==void 0&&(w.value=z.choice)}function pe(P){const z=_e.value;if(z===void 0)return;const ge=Vo(z).find(vt=>vt.version===P.target);if(ge===void 0)return;ge.prerelease&&(X.value=!0),b.value=ge.version;const Pe=de(z),Ze=P.importers.filter(vt=>Pe.includes(vt));Ze.length>0&&(T.value=Ze)}function Ce(){const P=he.value??L.value;if(P===void 0)return;const z=`${P.id}
24
+ ${j.value}`;ie!==z&&(ie=z,P.goal.kind==="fix"?Se(P.choice):pe(P.goal))}function xe(P){return P instanceof Error?P.message:String(P)}async function De(){var Pe;const P=++H,z=j.value,ge=((Pe=m.value)==null?void 0:Pe.nodeKey)===z&&m.value.actions!==null;try{const Ze=await a.get({root:o.selection.root,node:o.selection.node,kinds:o.kinds,revision:o.revision});if(P!==H)return;m.value={nodeKey:z,actions:Ze,error:null},se(Ze,ge),Ce()}catch(Ze){if(P!==H)return;m.value={nodeKey:z,actions:null,error:xe(Ze)}}}function He(){if(w.value!==null)return{nodeId:o.selection.node,choice:w.value,kinds:[...o.kinds]}}function Be(){const P=me.value;if(P===null)return;const z={nodeId:o.selection.node,choice:P,kinds:[...o.kinds]};return P==="wanted"?z:{...z,...P==="version"?{version:b.value}:{},importers:[...T.value]}}async function te(P,z){await r.addChange(P,z),await(l==null?void 0:l.reload(P)),En(zm)}async function ue(P,z,ge){const Pe=await r.replaceChange(P,z.itemId,ge);await(l==null?void 0:l.reload(P)),O.value===z.itemId&&(O.value=Pe.id),En(Jm)}async function ke(P,z,ge){const Pe=j.value,Ze=o.selection.root;F.value={nodeKey:Pe,block:P},J.value=null;try{z.kind==="add"?await te(Ze,ge):await ue(Ze,z,ge),s("changed")}catch(vt){const Hn=z.kind==="add"?Ab(xe(vt)):Nb(xe(vt));J.value={nodeKey:Pe,block:P,text:Hn}}finally{F.value=null}}function Ue(P){const z=P==="fix"?g.value:E.value,{action:ge}=z;if(ge.kind==="review"){s("review",o.selection.root,ge.itemId);return}if(!z.ready||F.value!==null)return;const Pe=P==="fix"?He():Be();Pe!==void 0&&ke(P,ge,Pe)}function Xe(){var ge,Pe,Ze,vt;const P=_e.value!==void 0&&Te.value;(he.value!==void 0||!P)&&((ge=v.value)!=null&&ge.focusSelected())||(Pe=y.value)!=null&&Pe.focusVersion()||(Ze=v.value)!=null&&Ze.focusSelected()||(vt=f.value)==null||vt.focus()}function lt(){var z;const P=document.activeElement;return P!==null&&(((z=f.value)==null?void 0:z.contains(P))??!1)}function nt(P){const z=Q;Q=null,z==null||z.settle(P)}async function ct(){const P=Q;if(P!==null){if(P.nodeKey!==j.value){nt(!1);return}M.value!==null&&(Q=null,await st(),Xe(),P.settle(lt()))}}function N(){return nt(!1),new Promise(P=>{Q={nodeKey:j.value,settle:P},ct()})}return t({focusPrimary:N}),Ne(U,()=>void De(),{immediate:!0}),Ne(M,()=>void ct()),Ne(()=>o.editing,P=>{O.value=P==null?void 0:P.itemId,ie=null,Ce()}),Ot(()=>nt(!1)),Ne([he,L],()=>Ce()),Ne(w,()=>Z("fix")),Ne([b,T],()=>Z("update")),Ne(le,P=>{const z=_e.value;z===void 0||P.some(ge=>ge.version===b.value)||(b.value=Wl(z,P))}),(P,z)=>(c(),u("section",{ref_key:"section",ref:f,class:"what-to-do","aria-labelledby":`${h(d)}-heading`,tabindex:"-1"},[_("h3",{id:`${h(d)}-heading`,class:"panel-heading"},p(h(Wm)),9,nE),D.value?(c(),u("p",oE,p(h(Rb)(D.value)),1)):R.value?R.value.unavailable?(c(),u("p",iE,p(R.value.unavailable),1)):S.value?(c(),u("p",rE,p(S.value),1)):(c(),u(q,{key:4},[V.value?(c(),u("div",aE,[ye(R1,{ref_key:"fixChoices",ref:v,modelValue:w.value,"onUpdate:modelValue":z[0]||(z[0]=ge=>w.value=ge),fix:V.value,root:e.selection.root},null,8,["modelValue","fix","root"]),V.value.options.length>0?(c(),u("div",lE,[g.value.inChanges?(c(),u("p",{key:0,id:`${h(d)}-fix-in-changes`,class:"what-to-do__in-changes"},p(g.value.inChanges),9,cE)):x("",!0),_("button",{type:"button",class:Me(["button what-to-do__commit",`what-to-do__commit--${g.value.action.kind}`]),disabled:!g.value.ready,"aria-disabled":ce("fix")?"true":void 0,"aria-describedby":g.value.inChanges?`${h(d)}-fix-in-changes`:void 0,onClick:z[1]||(z[1]=ge=>Ue("fix"))},p(i[g.value.action.kind]),11,uE),A.value?(c(),u("p",dE,p(A.value),1)):x("",!0)])):x("",!0)])):x("",!0),_e.value&&Te.value?(c(),u("div",fE,[ye(eE,{ref_key:"updateChoice",ref:y,version:b.value,"onUpdate:version":z[2]||(z[2]=ge=>b.value=ge),importers:T.value,"onUpdate:importers":z[3]||(z[3]=ge=>T.value=ge),"show-prereleases":X.value,"onUpdate:showPrereleases":z[4]||(z[4]=ge=>X.value=ge),update:_e.value,root:e.selection.root},null,8,["version","importers","show-prereleases","update","root"]),_("div",hE,[E.value.inChanges?(c(),u("p",{key:0,id:`${h(d)}-update-in-changes`,class:"what-to-do__in-changes"},p(E.value.inChanges),9,pE)):x("",!0),_("button",{type:"button",class:Me(["button what-to-do__commit",`what-to-do__commit--${E.value.action.kind}`]),disabled:!E.value.ready,"aria-disabled":ce("update")?"true":void 0,"aria-describedby":E.value.inChanges?`${h(d)}-update-in-changes`:void 0,onClick:z[5]||(z[5]=ge=>Ue("update"))},p(i[E.value.action.kind]),11,vE),oe.value?(c(),u("p",_E,p(oe.value),1)):x("",!0)])])):x("",!0)],64)):(c(),u("p",sE,p(h(Ob)(Ee.value)),1))],8,tE))}}),gE=Le(mE,[["__scopeId","data-v-28ddbbec"]]),yE=["aria-labelledby"],bE=["id"],kE={key:0,class:"why-here__empty"},wE={key:1,class:"why-here__rows"},$E=["onClick"],EE={key:2,class:"why-here__more"},SE={class:"why-here__actions"},IE=Ae({__name:"WhyHere",props:{rows:{},more:{}},emits:["select","open-trail"],setup(e,{emit:t}){const n=t,o=tt();return(s,i)=>(c(),u("section",{class:"why-here","aria-labelledby":h(o)},[_("h3",{id:h(o),class:"panel-heading"},p(h(zu)),9,bE),e.rows.length===0?(c(),u("p",kE,p(h(Dm)),1)):(c(),u("ul",wE,[(c(!0),u(q,null,be(e.rows,(r,a)=>(c(),u("li",{key:`${a}
25
+ ${r.parent}`,class:"why-here__row","data-testid":"why-here-row"},[_("button",{type:"button",class:"why-here__parent mono",onClick:l=>n("select",r.parent)},p(r.parentLabel),9,$E),Ve(" "+p(h(hb)(r.range,r.direct,r.from)),1)]))),128))])),e.more>0?(c(),u("p",EE,p(h(Tn)(e.more)),1)):x("",!0),_("p",SE,[_("button",{type:"button",class:"button why-here__trail",onClick:i[0]||(i[0]=r=>n("open-trail"))},p(h(Lm)),1)])],8,yE))}}),CE=Le(IE,[["__scopeId","data-v-445f6dfb"]]),xE=["title"],Fn=Ae({__name:"NodeBadges",props:{badges:{}},setup(e){return(t,n)=>(c(!0),u(q,null,be(e.badges,o=>(c(),u("span",{key:o.key,class:Me(["badge",[`badge--${o.tone}`,{"badge--outline":o.outlined}]]),title:o.title,"data-testid":"node-badge"},p(o.label),11,xE))),128))}}),TE={class:"workspace-summary"},OE={class:"workspace-summary__title"},RE={class:"mono"},AE={class:"workspace-summary__place"},NE=["title"],PE={class:"mono","data-testid":"workspace-path"},LE=["aria-labelledby"],DE=["id"],ME={key:0,class:"workspace-summary__error",role:"alert"},FE={key:1,class:"workspace-summary__muted","data-testid":"workspace-problems-state"},BE={key:2,class:"workspace-summary__problems"},KE=["onClick"],HE={key:3,class:"workspace-summary__muted","data-testid":"workspace-problems-unlisted"},UE={class:"workspace-summary__section workspace-summary__dependencies","data-testid":"workspace-dependencies"},VE=Ae({__name:"WorkspaceSummary",props:{root:{},node:{},name:{},path:{},dependencyCount:{},issueRows:{},issueRowsError:{},status:{},changes:{},changesHref:{},loading:{type:Boolean,default:!1}},emits:["select","open-tree","open-changes"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=k(()=>n.issueRows===null?null:Y0(n.issueRows,n.root,n.node)),r=k(()=>n.issueRows===null?0:J0(n.issueRows,n.root,n.node)),a=k(()=>Jo(n.status,{unlistedPaths:r.value})),l=k(()=>zd(nw(i.value,n.issueRowsError),n.status,a.value)),d=k(()=>{const m=l.value;return m==="problems"||m==="failed"?void 0:Nd(m,cg,a.value)}),f=k(()=>l.value==="problems"&&r.value>0?kd(r.value):void 0),v=k(()=>k0(n.changes,n.node));function y(m){return m.kinds.flatMap(w=>na(w,m))}return(m,w)=>(c(),u("div",TE,[_("header",{class:Me(["workspace-summary__header",{"workspace-summary__header--loading":e.loading}])},[_("h2",OE,[_("span",RE,p(e.name),1)]),_("p",AE,[_("span",{class:"badge workspace-summary__root",title:h(qr)(e.root),"data-testid":"root-badge"},p(h(Re)(e.root)),9,NE),w[2]||(w[2]=Ve(" "+p(" "),-1)),_("span",PE,p(e.path),1)])],2),_("section",{class:"workspace-summary__section","aria-labelledby":h(s)},[_("h3",{id:h(s),class:"panel-heading"},p(h(lg)),9,DE),e.issueRowsError!==void 0?(c(),u("p",ME,p(h(fr)(e.issueRowsError)),1)):d.value!==void 0?(c(),u("p",FE,p(d.value),1)):i.value!==null?(c(),u("ul",BE,[(c(!0),u(q,null,be(i.value,b=>(c(),u("li",{key:b.key,class:"workspace-summary__problem","data-testid":"workspace-problem"},[_("button",{type:"button",class:"workspace-summary__link mono",onClick:T=>o("select",b.node)},p(b.label),9,KE),ye(Fn,{badges:y(b.row)},null,8,["badges"])]))),128))])):x("",!0),f.value!==void 0?(c(),u("p",HE,p(f.value),1)):x("",!0)],8,LE),_("p",UE,[Ve(p(h(Pb)(e.dependencyCount))+p(h(Ct)),1),_("button",{type:"button",class:"workspace-summary__link",onClick:w[0]||(w[0]=b=>o("open-tree"))},p(h(ug)),1)]),v.value.length>0?(c(),Ke(af,{key:0,root:e.root,items:v.value,href:e.changesHref,onReview:w[1]||(w[1]=b=>o("open-changes"))},null,8,["root","items","href"])):x("",!0)]))}}),jE=Le(VE,[["__scopeId","data-v-b7e7f175"]]),WE={class:"details","data-testid":"details-body"},GE={key:0,class:"details__notice","data-testid":"follow-notice"},qE={class:"details__notice-text"},XE=["aria-label","title"],YE={key:2,class:"details__empty muted"},zE={key:3,class:"details__empty muted"},JE={key:4,class:"details__error",role:"alert"},QE={key:5,class:"details__missing","data-testid":"details-missing"},ZE={class:"muted"},eS={key:0,class:"details__follow-links"},tS=["onClick"],nS={key:6,class:"details__empty muted"},oS={key:7,class:"details__error",role:"alert"},sS={key:8,class:"details__empty muted"},iS={key:0,class:"details__error",role:"alert"},rS=50,aS=Ae({__name:"DetailsPanel",props:{selection:{},scope:{},roots:{},scanLoaded:{type:Boolean},revision:{},kinds:{},decorations:{},decorationsRoot:{},enrichmentRevision:{},status:{},issueRows:{},issueRowsError:{},healthLinkHref:{type:Function},editing:{},notice:{},versionFocus:{}},emits:["select","changed","follow","choose","open-in-root","open-trail","open-tree","open-issues","open-changes","dismiss-notice","version-focused","review"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=new Map,r=Et(),a=wt(ao,null),l=Y(null),d=Y(null),f=Y(null),v=Y(null),y=Y(null),m=Y(null),w=Y(null),b=Y(!1),T=Y(null);let X=0,F=0;const J=k(()=>{var N;return(N=o.selection)==null?void 0:N.node}),O=k(()=>o.roots.find(N=>{var re;return N.id===((re=o.selection)==null?void 0:re.root)})),Q=k(()=>{var N;return((N=O.value)==null?void 0:N.status)==="ready"?O.value:void 0}),ie=k(()=>{if(o.selection===void 0)return null;if(!o.scanLoaded)return ci;const N=O.value;return N?N.status==="scanning"?Ol(N.id):N.status==="failed"?Bd(N.id,N.error):null:Fd(o.selection.root)});function H(N,re){var P;return N.rootId===((P=Q.value)==null?void 0:P.id)&&N.revision===o.revision&&re===J.value}const j=k(()=>{const N=d.value;return N!==null&&H(N,N.dependents.focus.id)?N.dependents:null}),U=k(()=>{const N=f.value;return N!==null&&H(N,N.focus)?N.hits:[]}),M=k(()=>{const N=v.value;return N!==null&&H(N,N.focus)?N:null}),R=k(()=>{const N=m.value;return N!==null&&H(N,N.focus)?N:null}),D=k(()=>C0(O.value)),V=k(()=>R.value!==null&&!D.value),_e=k(()=>{const N=R.value;return N!==null&&D.value?[N.rootId,N.focus,N.revision].join(`
26
+ `):""}),Ee=k(()=>{const N=w.value;return N!==null&&H(N,N.focus)?N:null}),Te=k(()=>{var N;return((N=Ee.value)==null?void 0:N.error)??null}),le=k(()=>{var P;const N=(P=Ee.value)==null?void 0:P.outcome,re=o.selection;return!N||!re?null:{text:O0(re,N),links:N0(re,N)}}),me=k(()=>{var N;return((N=M.value)==null?void 0:N.insight)??null}),W=k(()=>{var re;const N=(re=j.value)==null?void 0:re.focus;return N!==void 0&&!N.isImporter&&!N.isPlaceholder}),S=k(()=>{var N;return(N=O.value)==null?void 0:N.importers.find(re=>re.id===J.value)}),ne=k(()=>(a==null?void 0:a.index.value)??i),ae=k(()=>{var N;return ne.value.get(((N=o.selection)==null?void 0:N.root)??"")??[]}),$e=k(()=>{var re,P;const N=(re=j.value)==null?void 0:re.focus;return N!==void 0&&(((P=j.value)==null?void 0:P.summary.via.some(z=>z.direct===N.id))??!1)}),ee=k(()=>o.decorations[J.value??""]),he=k(()=>{var N;return o.decorationsRoot!==void 0&&o.decorationsRoot===((N=o.selection)==null?void 0:N.root)}),L=k(()=>Z0(o.status)),$=k(()=>Bw(ee.value,me.value,{isDirect:$e.value,decorationsLoaded:he.value,checksDone:L.value})),C=k(()=>{var N;return((N=M.value)==null?void 0:N.loadedAt)??0}),I=k(()=>me.value===null?[]:Vw(me.value,C.value)),Ie=k(()=>{var P,z;const N=(P=j.value)==null?void 0:P.focus,re=(z=o.selection)==null?void 0:z.root;return N===void 0||re===void 0?{roots:[],more:0}:Hw(U.value,N.name,re,N.version)}),g=k(()=>{var P,z;const N=(P=j.value)==null?void 0:P.focus,re=(z=o.selection)==null?void 0:z.root;return N===void 0||re===void 0?void 0:rf(U.value,N.name,re,N.id)}),E=k(()=>{var N;return((N=me.value)==null?void 0:N.vulnerabilities.items)??[]}),A=k(()=>{var N;return(N=me.value)==null?void 0:N.registry.deprecated}),oe=k(()=>j.value?Pw(me.value,j.value):{rows:[],more:0}),B=k(()=>{var N;return(N=ee.value)==null?void 0:N.below}),Z=k(()=>{var N;return((N=M.value)==null?void 0:N.error)??null}),ce=k(()=>{var N;return W.value&&Q.value!==void 0?(N=o.selection)==null?void 0:N.root:void 0}),fe=k(()=>Jd(o.revision,o.enrichmentRevision)),de=k(()=>{var P;const N=ce.value,re=(P=j.value)==null?void 0:P.focus;return N===void 0||re===void 0?void 0:{root:N,node:re.id}}),se=k(()=>o.editing!==void 0&&o.editing.root===ce.value?o.editing:void 0),Se=k(()=>{const N=y.value,re=de.value;return N!==null&&re!==void 0&&N.root===re.root&&N.node===re.node});function pe(N,re){return re!==void 0&&N.root===re.root&&N.node===re.node}function Ce(){o.selection!==void 0&&(y.value={...o.selection})}t({focusWhatToDo:Ce});function xe(N){Q.value&&s("select",{root:Q.value.id,node:N})}function De(N){return N instanceof Error?N.message:String(N)}function He(N,re,P){m.value={rootId:N,focus:re,revision:P}}function Be(N){const re=d.value;return re!==null&&re.rootId===N.root&&re.dependents.focus.id===N.node?re.finishedJob:void 0}function te(N,re,P){const z=O.value,ge=z===void 0?void 0:T0(z,Be(N)),Pe=pn(N.node),Ze=I0(P,Pe,N.root,N.node,re.node);return hk(ge,N.root,Pe,Ur(N.node),re.version,Ze)}async function ue(N,re){const P={root:re.rootId,node:re.focus};try{const z=await r.search(pn(re.focus));if(_e.value!==N)return;const ge=S0(P,z,{wasShownInRoot:Be(P)!==void 0});ge.kind==="moved"?s("follow",{root:P.root,node:ge.node},te(P,ge,z)):w.value={...re,outcome:ge,error:null}}catch(z){if(_e.value!==N)return;w.value={...re,outcome:null,error:De(z)}}}function ke(N){var P;const re=P0((P=w.value)==null?void 0:P.outcome,N);s(re==="open-in-root"?"open-in-root":re==="choose"?"choose":"select",N.selection)}async function Ue(N,re,P,z){try{const ge=await r.search(z.name);if(N!==X)return;f.value={rootId:re,focus:z.id,revision:P,hits:ge}}catch{if(N!==X)return;f.value={rootId:re,focus:z.id,revision:P,hits:[]}}}async function Xe(){const N=++X,re=Q.value,P=J.value,z=o.revision,ge=x0(re);if(T.value=null,!re||P===void 0){b.value=!1;return}b.value=!0;try{const Pe=await r.dependents(re.id,P,rS,o.kinds);if(N!==X)return;d.value={rootId:re.id,revision:z,dependents:Pe,finishedJob:ge},b.value=!1,!Pe.focus.isImporter&&!Pe.focus.isPlaceholder&&await Ue(N,re.id,z,Pe.focus)}catch(Pe){if(N!==X)return;b.value=!1,Uo(Pe)?He(re.id,P,z):T.value=De(Pe)}}async function lt(){const N=++F,re=Q.value,P=J.value,z=o.revision;if(!(!re||P===void 0))try{const ge=await r.insight(re.id,P,o.kinds);if(N!==F)return;v.value={rootId:re.id,focus:P,revision:z,insight:ge,error:null,loadedAt:Date.now()}}catch(ge){if(N!==F)return;Uo(ge)&&He(re.id,P,z),v.value={rootId:re.id,focus:P,revision:z,insight:null,error:De(ge),loadedAt:Date.now()}}}const nt=k(()=>{var N;return[(N=Q.value)==null?void 0:N.id,J.value,o.kinds.join(","),o.revision].join(`
27
+ `)}),ct=k(()=>`${nt.value}
28
+ ${o.enrichmentRevision}`);return Ne(nt,()=>void Xe(),{immediate:!0}),Ne(ct,()=>void lt(),{immediate:!0}),Ne(()=>o.versionFocus,N=>{N!==void 0&&(y.value=N)},{immediate:!0}),Ne(()=>o.selection,N=>{y.value!==null&&!pe(y.value,N)&&(y.value=null)}),Ne([y,Se,l],async([,N,re])=>{!N||re===null||!await re.focusPrimary()||re!==l.value||!Se.value||(y.value=null,s("version-focused"))},{flush:"post"}),Ne(_e,N=>{const re=R.value;N!==""&&re!==null&&ue(N,re)}),(N,re)=>{var P,z;return c(),u("div",WE,[e.notice?(c(),u("div",GE,[_("p",qE,p(e.notice),1),_("button",{type:"button",class:"details__notice-dismiss","aria-label":h(dl),title:h(dl),onClick:re[0]||(re[0]=ge=>s("dismiss-notice"))},[ye(et,{name:"x",size:18})],8,XE)])):x("",!0),e.selection===void 0?(c(),Ke(z$,{key:1,scope:e.scope,roots:e.roots,"scan-loaded":e.scanLoaded,changes:ne.value,status:e.status,"health-link-href":e.healthLinkHref,onOpenIssues:re[1]||(re[1]=(ge,Pe)=>s("open-issues",ge,Pe)),onOpenChanges:re[2]||(re[2]=ge=>s("open-changes",ge))},null,8,["scope","roots","scan-loaded","changes","status","health-link-href"])):ie.value?(c(),u("p",YE,p(ie.value),1)):V.value?(c(),u("p",zE,p(h(Ol)(e.selection.root)),1)):Te.value?(c(),u("p",JE,p(h(Rl)(Te.value)),1)):le.value?(c(),u("div",QE,[_("p",ZE,p(le.value.text),1),le.value.links.length>0?(c(),u("ul",eS,[(c(!0),u(q,null,be(le.value.links,ge=>(c(),u("li",{key:`${ge.selection.root}
29
+ ${ge.selection.node}`},[_("button",{type:"button",class:"link",onClick:Pe=>ke(ge)},p(ge.label),9,tS)]))),128))])):x("",!0)])):R.value?(c(),u("p",nS,p(h(Bo)),1)):T.value?(c(),u("p",oS,p(h(Rl)(T.value)),1)):j.value?j.value.focus.isImporter?(c(),Ke(jE,{key:9,root:e.selection.root,node:j.value.focus.id,name:j.value.focus.name,path:((P=S.value)==null?void 0:P.path)??j.value.focus.id,"dependency-count":((z=S.value)==null?void 0:z.dependencyCount)??0,"issue-rows":e.issueRows,"issue-rows-error":e.issueRowsError,status:e.status,changes:ae.value,"changes-href":e.healthLinkHref(e.selection.root,"changes"),loading:b.value,onSelect:xe,onOpenTree:re[3]||(re[3]=ge=>s("open-tree")),onOpenChanges:re[4]||(re[4]=ge=>s("open-changes",e.selection.root))},null,8,["root","node","name","path","dependency-count","issue-rows","issue-rows-error","status","changes","changes-href","loading"])):(c(),u(q,{key:10},[ye(T$,{node:j.value.focus,root:e.selection.root,labels:$.value,"also-in":Ie.value,variant:g.value,notices:I.value,loading:b.value,onOpenInRoot:re[5]||(re[5]=ge=>s("open-in-root",ge))},null,8,["node","root","labels","also-in","variant","notices","loading"]),Z.value?(c(),u("p",iS,p(h(Db)(Z.value)),1)):x("",!0),ye(r$,{advisories:E.value,deprecated:A.value},null,8,["advisories","deprecated"]),de.value?(c(),Ke(gE,{key:1,ref_key:"whatToDo",ref:l,selection:de.value,kinds:e.kinds,revision:fe.value,editing:se.value,onChanged:re[6]||(re[6]=ge=>s("changed")),onReview:re[7]||(re[7]=(ge,Pe)=>s("review",ge,Pe))},null,8,["selection","kinds","revision","editing"])):x("",!0),ye(CE,{rows:oe.value.rows,more:oe.value.more,onSelect:xe,onOpenTrail:re[8]||(re[8]=ge=>s("open-trail"))},null,8,["rows","more"]),B.value?(c(),Ke(r1,{key:2,root:e.selection.root,node:j.value.focus.id,kinds:e.kinds,revision:e.revision,summary:B.value,decorations:e.decorations,onSelect:xe},null,8,["root","node","kinds","revision","summary","decorations"])):x("",!0),ye(p$,{name:j.value.focus.name,insight:me.value,"is-direct":$e.value,now:C.value},null,8,["name","insight","is-direct","now"])],64)):(c(),u("p",sS,p(h(Bo)),1))])}}}),lS=Le(aS,[["__scopeId","data-v-32503a45"]]),cS={"aria-live":"polite",class:"sr-only"},uS=Ae({__name:"LiveRegion",setup(e){return(t,n)=>(c(),u("p",cS,p(h(sv)),1))}}),dS={key:0,class:"notice-banner",role:"alert"},fS=Ae({__name:"NoticeBanner",props:{messages:{}},setup(e){return(t,n)=>e.messages.length>0?(c(),u("div",dS,[(c(!0),u(q,null,be(e.messages,(o,s)=>(c(),u("p",{key:`${s}
30
+ ${o}`,class:"notice-banner__message"},p(o),1))),128))])):x("",!0)}}),hS=Le(fS,[["__scopeId","data-v-80d0712f"]]);function wo(e,t,n){const o=e[t];if(!(!o||t===n))return{kind:"move",id:o.id}}function pS(e,t,n){if(e.length===0)return;const o=e.findIndex(i=>i.id===t),s=e[o];if(!s)return n==="ArrowDown"||n==="ArrowUp"||n==="Home"||n==="End"||n==="ArrowRight"||n==="ArrowLeft"?wo(e,n==="End"?e.length-1:0,-1):void 0;switch(n){case"ArrowDown":return wo(e,o+1,o);case"ArrowUp":return wo(e,o-1,o);case"Home":return wo(e,0,o);case"End":return wo(e,e.length-1,o);case"ArrowRight":{if(s.expandable&&!s.expanded)return{kind:"expand",id:s.id};const i=e[o+1];return i&&i.parentId===s.id?{kind:"move",id:i.id}:void 0}case"ArrowLeft":{if(s.expandable&&s.expanded)return{kind:"collapse",id:s.id};const i=s.parentId===void 0?void 0:e.find(r=>r.id===s.parentId);return i?{kind:"move",id:i.id}:void 0}case"Enter":case" ":return{kind:"activate",id:s.id};default:return}}function vS(e,t,n){if(t.length===0)return;if(n!==void 0&&t.some(s=>s.id===n))return n;const o=e.findIndex(s=>s.id===n);for(let s=o-1;s>=0;s-=1){const i=e[s].id;if(t.some(r=>r.id===i))return i}return t[0].id}function Zo(e,t){var r;const n=Y((r=e.value[0])==null?void 0:r.id);Ne(e,(a,l)=>{n.value=vS(l,a,n.value)});function o(a){return a===n.value?0:-1}function s(){const a=n.value;if(a===void 0)return;const l=document.querySelector(`[data-roving-id="${CSS.escape(a)}"]`);l==null||l.focus()}function i(a){if(a.metaKey||a.ctrlKey||a.altKey)return;const l=pS(e.value,n.value,a.key);l&&(a.preventDefault(),l.kind==="move"?(n.value=l.id,s()):l.kind==="expand"?t.expand(l.id):l.kind==="collapse"?t.collapse(l.id):t.activate(l.id))}return{activeId:n,tabIndexOf:o,onKeydown:i,focusActive:s}}const _S={class:"breakable-path__segment"},mS=Ae({__name:"BreakablePath",props:{text:{}},setup(e){const t=e,n=k(()=>t_(t.text));return(o,s)=>(c(!0),u(q,null,be(n.value,(i,r)=>(c(),u(q,{key:r},[r>0?(c(),u(q,{key:0},[Ve(p(" "))],64)):x("",!0),(c(!0),u(q,null,be(i,(a,l)=>(c(),u(q,{key:l},[_("span",_S,p(a),1),s[0]||(s[0]=_("wbr",null,null,-1))],64))),128))],64))),128))}}),Bs=Le(mS,[["__scopeId","data-v-0f6f68ec"]]),gS={class:"roots"},yS=["aria-label"],bS={class:"progress__line"},kS=["aria-label","aria-valuemax","aria-valuenow"],wS={class:"progress__detail muted"},$S={"data-testid":"enrichment-problem"},ES={key:0,class:"muted","data-testid":"enrichment-problem-hint"},SS={key:1,class:"roots__empty muted"},IS={key:2,class:"roots__empty muted"},CS=["aria-label"],xS=["data-roving-id","tabindex","aria-level","aria-posinset","aria-setsize","aria-expanded","aria-current","aria-selected","aria-labelledby","aria-describedby","title","onFocus","onClick"],TS=["id"],OS=["onClick"],RS={class:"root__body"},AS={class:"root__heading"},NS=["id","title"],PS={class:"root__parent"},LS={class:"root__leaf"},DS=["id"],MS={class:"root__manager"},FS=["title"],BS={key:1,class:"badge badge--info"},KS={key:2,class:"badge badge--danger"},HS={key:3,class:"badge badge--info","data-testid":"root-job"},US={key:0,class:"root__error"},VS={key:1,class:"root__health"},jS={key:0,class:"root__separator","aria-hidden":"true"},WS=["href","tabindex","onClick"],GS=["title","disabled","tabindex","onClick"],qS=["tabindex"],XS=["id"],YS={key:0,class:"package__path muted"},ql="roots:all",zS=Ae({__name:"RootsPanel",props:{scan:{},scanFailed:{type:Boolean},scope:{},selection:{},healthLinkHref:{type:Function}},emits:["choose-root","open-workspace-package","open-issues","open-changes","resolve"],setup(e,{emit:t}){const n=e,o=t,s=wt(oo,{source:{kind:"working"}}),i={lockfile:"badge--ok",installed:"badge--info","resolved-today":"badge--warn","manifest-only":"badge--warn"},r=tt(),a=zn(new Set),l=Y(null),d=k(()=>{var $;return($=n.scan)==null?void 0:$.enrichment}),f=k(()=>d.value!==void 0&&(d.value.state==="running"||d.value.problems.length>0)),v=k(()=>{var I;const{done:$,total:C}=((I=d.value)==null?void 0:I.registry)??{done:0,total:0};return C===0?0:Math.min(1,$/C)}),y=k(()=>{var C;const $=(C=d.value)==null?void 0:C.osv;return $===void 0?"":$k($.done,$.skipped)});function m($){const C=Re($),I=C===$?C.lastIndexOf("/")+1:0;return{parentSegments:C.slice(0,I).split(new RegExp("(?<=\\/)")).filter(g=>g!==""),leaf:C.slice(I)}}function w($,C){return C.path===$.path}function b($,C){return w($,C)?"":o_($.path,C.path)}function T($,C){return w($,C)?Q_:C.name}function X($,C){const I=b($,C);return I===""||I===C.name?void 0:I}function F($){return $.importers.filter(C=>!w($,C)||C.dependencyCount>0)}function J($){return`roots:root:${$}`}function O($,C){return`roots:package:${$}
31
+ ${C}`}function Q($,C){return`${r}-row-${$}-${C}`}const ie=k(()=>{var Ie;const $=((Ie=n.scan)==null?void 0:Ie.roots)??[],C=$.length+1,I=[{kind:"all",id:ql,level:1,position:1,setSize:C}];return $.forEach((g,E)=>{const A=F(g),oe=A.length>0&&a.has(g.id),B=J(g.id);I.push({kind:"root",id:B,level:1,position:E+2,setSize:C,root:g,expandable:A.length>0,expanded:oe}),oe&&A.forEach((Z,ce)=>{I.push({kind:"package",id:O(g.id,Z.id),level:2,position:ce+1,setSize:A.length,root:g,parentId:B,workspacePackage:Z})})}),I}),H=k(()=>ie.value.map($=>({id:$.id,parentId:$.kind==="package"?$.parentId:void 0,expandable:$.kind==="root"&&$.expandable,expanded:$.kind==="root"&&$.expanded})));function j($){return ie.value.find(C=>C.id===$)}function U($){const C=j($);(C==null?void 0:C.kind)==="root"&&a.add(C.root.id)}function M($){const C=j($);(C==null?void 0:C.kind)==="root"&&a.delete(C.root.id)}function R($){const C=j($);C!==void 0&&(C.kind==="all"?o("choose-root",void 0):C.kind==="root"?o("choose-root",C.root.id):o("open-workspace-package",{root:C.root.id,node:C.workspacePackage.id}))}const{activeId:D,tabIndexOf:V,onKeydown:_e}=Zo(H,{expand:U,collapse:M,activate:R});function Ee($){return $===void 0?ql:J($)}function Te(){var C;const $=document.activeElement;return $!==null&&(((C=l.value)==null?void 0:C.contains($))??!1)}function le($){if(Te())return;const C=Ee($);(n.scan===null||ie.value.some(I=>I.id===C))&&(D.value=C)}Ne(()=>n.scope,$=>{a.clear(),$!==void 0&&a.add($),le($)},{immediate:!0});function me($){$.target===$.currentTarget&&_e($)}function W($){D.value=$.id,R($.id)}function S($){D.value=$.id,$.kind==="root"&&($.expanded?M($.id):U($.id))}function ne($){return V($.id)}function ae($){return $.kind==="all"?n.scope===void 0:$.kind==="root"&&n.scope===$.root.id}function $e($){var C;return $.kind==="package"&&((C=n.selection)==null?void 0:C.root)===$.root.id&&n.selection.node===$.workspacePackage.id}function ee($){D.value=$.id,$.kind==="root"&&o("resolve",$.root.id)}function he($,C,I){if(D.value=C.id,C.kind!=="root")return;const Ie=C.root.id;$.button!==0||$.metaKey||$.ctrlKey||$.shiftKey||$.altKey||($.preventDefault(),I==="changes"?o("open-changes",Ie):o("open-issues",Ie,I))}function L($){return $.source!=="lockfile"}return($,C)=>(c(),u("div",gS,[d.value&&f.value?(c(),u("section",{key:0,class:"progress","aria-label":h(Ag),"data-testid":"enrichment-progress"},[d.value.state==="running"?(c(),u(q,{key:0},[_("p",bS,p(h(xw)(d.value)),1),_("div",{class:"progress__bar",role:"progressbar","aria-label":h(Ng),"aria-valuemin":0,"aria-valuemax":d.value.registry.total,"aria-valuenow":d.value.registry.done},[_("span",{class:"progress__fill",style:Yn({width:`${v.value*100}%`})},null,4)],8,kS),_("p",wS,p(y.value),1)],64)):x("",!0),(c(!0),u(q,null,be(d.value.problems,I=>(c(),u("div",{key:`${I.source}
32
+ ${I.origin}
33
+ ${I.message}`,class:"progress__problem"},[_("p",$S,p(h(Cw)(I)),1),h(jl)(I)?(c(),u("p",ES,p(h(jl)(I)),1)):x("",!0)]))),128))],8,yS)):x("",!0),!e.scan&&!e.scanFailed?(c(),u("p",SS,p(h(Og)),1)):e.scan&&e.scan.roots.length===0?(c(),u("p",IS,p(h(s).source.kind==="commit"?h($_)(h(s).source.ref):h(Rg)),1)):x("",!0),e.scan&&e.scan.roots.length>0?(c(),u("div",{key:3,ref_key:"tree",ref:l,role:"tree",class:"tree","aria-label":h(cr)},[(c(!0),u(q,null,be(ie.value,(I,Ie)=>(c(),u("div",{key:I.id,role:"treeitem",class:Me(["tree__row",[`tree__row--${I.kind}`,{"tree__row--scope":ae(I),"tree__row--selected":$e(I)}]]),"data-roving-id":I.id,tabindex:h(V)(I.id),"aria-level":I.level,"aria-posinset":I.position,"aria-setsize":I.setSize,"aria-expanded":I.kind==="root"&&I.expandable?I.expanded:void 0,"aria-current":ae(I)?"true":void 0,"aria-selected":I.kind==="package"?$e(I):void 0,"aria-labelledby":Q(Ie,"name"),"aria-describedby":I.kind==="root"?Q(Ie,"meta"):void 0,title:I.kind==="package"?I.workspacePackage.path:void 0,onKeydown:me,onFocus:g=>D.value=I.id,onClick:g=>W(I)},[I.kind==="all"?(c(),u("span",{key:0,id:Q(Ie,"name"),class:"tree__all"},p(h(ai)),9,TS)):I.kind==="root"?(c(),u(q,{key:1},[_("span",{class:"root__disclosure","aria-hidden":"true",onClick:it(g=>S(I),["stop"])},[I.expandable?(c(),Ke(et,{key:0,class:"root__chevron",name:I.expanded?"chevron-down":"chevron-right",size:20},null,8,["name"])):x("",!0)],8,OS),_("div",RS,[_("div",AS,[_("span",{id:Q(Ie,"name"),class:"root__title mono",title:I.root.path},[_("span",PS,[(c(!0),u(q,null,be(m(I.root.id).parentSegments,(g,E)=>(c(),u(q,{key:E},[Ve(p(g),1),C[1]||(C[1]=_("wbr",null,null,-1))],64))),128))]),_("span",LS,p(m(I.root.id).leaf),1)],8,NS),_("span",{id:Q(Ie,"meta"),class:"root__meta"},[_("span",MS,p(I.root.manager),1),L(I.root)?(c(),u("span",{key:0,class:Me(["badge",i[I.root.source]]),title:h(pr)(I.root.source)},p(h(Vg)[I.root.source]),11,FS)):x("",!0),I.root.status==="scanning"?(c(),u("span",BS,[C[2]||(C[2]=_("span",{class:"root__pulse"},null,-1)),Ve(p(h(dr).scanning),1)])):I.root.status==="failed"?(c(),u("span",KS,p(h(dr).failed),1)):x("",!0),h(Tl)(I.root.actions.job)?(c(),u("span",HS,[C[3]||(C[3]=_("span",{class:"root__pulse"},null,-1)),Ve(p(h(Tl)(I.root.actions.job)),1)])):x("",!0)],8,DS)]),I.root.status==="failed"?(c(),u("p",US,p(h(kk)(I.root.error)),1)):x("",!0),h(Ds)(I.root).length>0?(c(),u("p",VS,[(c(!0),u(q,null,be(h(Ds)(I.root),(g,E)=>(c(),u(q,{key:g.kind},[E>0?(c(),u("span",jS,p(h(Ct)),1)):x("",!0),_("a",{class:Me(["root__link",`root__link--${g.kind}`]),href:e.healthLinkHref(I.root.id,g.kind),tabindex:ne(I),onClick:it(A=>he(A,I,g.kind),["stop"])},p(g.text),11,WS)],64))),128))])):x("",!0),h(Uu).has(I.root.source)&&h(s).source.kind==="working"?(c(),u("button",{key:2,type:"button",class:"button root__resolve",title:h(pr)(I.root.source),disabled:I.root.status==="scanning",tabindex:ne(I),onClick:it(g=>ee(I),["stop"])},p(h(Pg)),9,GS)):x("",!0),I.root.warnings.length>0?(c(),u("details",{key:3,class:"root__warnings",onClick:C[0]||(C[0]=it(()=>{},["stop"]))},[_("summary",{tabindex:ne(I)},[ye(et,{class:"summary-chevron",name:"chevron-right"}),Ve(p(h(wk)(I.root.warnings.length)),1)],8,qS),_("ul",null,[(c(!0),u(q,null,be(I.root.warnings,(g,E)=>(c(),u("li",{key:E},p(g),1))),128))])])):x("",!0)])],64)):(c(),u(q,{key:2},[_("span",{id:Q(Ie,"name"),class:"package__name mono"},p(T(I.root,I.workspacePackage)),9,XS),X(I.root,I.workspacePackage)?(c(),u("span",YS,[ye(Bs,{text:X(I.root,I.workspacePackage)??""},null,8,["text"])])):x("",!0)],64))],42,xS))),128))],8,CS)):x("",!0)]))}}),JS=Le(zS,[["__scopeId","data-v-8af9641f"]]),QS={class:"source-notice"},ZS={class:"source-notice__text"},eI=Ae({__name:"SourceNotice",props:{source:{}},emits:["back"],setup(e,{emit:t}){const n=t,o=Date.now();return(s,i)=>(c(),u("div",QS,[ye(et,{class:"source-notice__icon",name:"git-branch"}),_("p",ZS,p(h(k_)(e.source,h(o))),1),_("button",{type:"button",class:"button source-notice__back",onClick:i[0]||(i[0]=r=>n("back"))},p(h(ju)),1)]))}}),tI=Le(eI,[["__scopeId","data-v-7e396e95"]]),nI=["aria-label"],oI=["title"],sI=["aria-label","title"],iI=Ae({__name:"SelectionPill",props:{selection:{}},emits:["clear"],setup(e,{emit:t}){const n=e,o=t,s=k(()=>Ny($t(n.selection.node),n.selection.root));return(i,r)=>(c(),u("div",{class:"selection-pill",role:"group","aria-label":h(tm)},[_("span",{class:"selection-pill__text",title:s.value},p(s.value),9,oI),_("button",{type:"button",class:"selection-pill__clear","aria-label":h(rl),title:h(rl),onClick:r[0]||(r[0]=a=>o("clear"))},[ye(et,{name:"x",size:18})],8,sI)],8,nI))}}),rI=Le(iI,[["__scopeId","data-v-059d1f55"]]),cf=" ";function aI(e){return[...e].length===1&&e.trim()!==""}function lI(e,t,n){const o=n.toLocaleLowerCase();for(let s=1;s<e.length;s+=1){const i=(t+s)%e.length;if(e[i].toLocaleLowerCase().startsWith(o))return i}}function cI(e,t,n){if(n==="Escape")return{kind:"close"};if(n==="Tab")return{kind:"leave"};const o=e.length;if(o===0)return;switch(n){case"ArrowDown":return{kind:"move",index:(t+1)%o};case"ArrowUp":return{kind:"move",index:(t-1+o)%o};case"Home":return{kind:"move",index:0};case"End":return{kind:"move",index:o-1};case"Enter":case cf:return{kind:"choose",index:t}}if(!aI(n))return;const s=lI(e,t,n);return s===void 0?void 0:{kind:"move",index:s}}function uI(e,t){switch(e.type){case"mousedown":return{preventDefault:t.isOpen};case"click":return{preventDefault:!1,menu:t.isOpen?"close":"open"};case"keyup":return{preventDefault:e.key===cf&&t.choseWithSpace}}}const dI="[data-menu-item]";function ia(e){const t=Y(!1),n=Y(0),o=Y(null),s=Y(null),i=Y(null);let r=!1;function a(O){var Q,ie;n.value=O,(ie=(Q=i.value)==null?void 0:Q.querySelectorAll(dI)[O])==null||ie.focus()}async function l(O){t.value=!0,await st(),a(O)}function d(){t.value=!1}function f(){var O;t.value=!1,(O=s.value)==null||O.focus()}function v(O){var Q,ie;return((Q=e.isDisabled)==null?void 0:Q.call(e,O))===!0?!1:((ie=e.keepsOpen)==null?void 0:ie.call(e,O))===!0?(a(O),e.onChoose(O),!1):(f(),e.onChoose(O),!0)}function y(){return t.value?(d(),!0):!1}function m(O,Q){const ie=uI(Q,{isOpen:t.value,choseWithSpace:r});ie.preventDefault&&O.preventDefault(),ie.menu==="close"?f():ie.menu==="open"&&l(0)}function w(O){m(O,{type:"mousedown"})}function b(O){m(O,{type:"click"})}function T(O){m(O,{type:"keyup",key:O.key}),r=!1}function X(O){r=!1,!(O.key!=="ArrowDown"&&O.key!=="ArrowUp")&&(O.preventDefault(),l(O.key==="ArrowDown"?0:Math.max(0,e.labels().length-1)))}function F(O){if(O.metaKey||O.ctrlKey||O.altKey)return;const Q=cI(e.labels(),n.value,O.key);if(Q!==void 0){if(Q.kind==="leave"){d();return}O.preventDefault(),Q.kind==="move"?a(Q.index):Q.kind==="close"?f():r=v(Q.index)&&O.key===" "}}function J(O){var ie;const Q=O.relatedTarget;Q instanceof Node&&((ie=o.value)!=null&&ie.contains(Q))||d()}return{isOpen:t,container:o,button:s,menu:i,choose:v,dismiss:y,onButtonMousedown:w,onButtonClick:b,onButtonKeydown:X,onButtonKeyup:T,onMenuKeydown:F,onFocusOut:J}}const fI=["aria-expanded","aria-controls"],hI=["aria-describedby"],pI=["aria-disabled","onClick"],vI=Ae({__name:"RefreshMenu",props:{status:{},reloadsBranch:{type:Boolean}},emits:["rescan","check-again","reload"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=tt(),r=`${i}-button`,a=`${i}-menu`,l=`${i}-last-check`,d=Y(Date.now()),f=k(()=>{var U;return((U=o.status)==null?void 0:U.state)==="done"}),v=k(()=>[o.reloadsBranch?{label:y_,disabled:!1,run:()=>s("reload")}:{label:i_,disabled:!1,run:()=>s("rescan")},{label:r_,disabled:!f.value,run:()=>s("check-again")}]),y=k(()=>o.status===void 0?"":yd(o.status,d.value)),{isOpen:m,container:w,button:b,menu:T,choose:X,dismiss:F,onButtonMousedown:J,onButtonClick:O,onButtonKeydown:Q,onButtonKeyup:ie,onMenuKeydown:H,onFocusOut:j}=ia({labels:()=>v.value.map(U=>U.label),isDisabled:U=>{var M;return((M=v.value[U])==null?void 0:M.disabled)??!0},onChoose:U=>{var M;return(M=v.value[U])==null?void 0:M.run()}});return Ne(m,U=>{U&&(d.value=Date.now())}),t({dismiss:F}),(U,M)=>(c(),u("div",{ref_key:"container",ref:w,class:"refresh",onFocusout:M[6]||(M[6]=(...R)=>h(j)&&h(j)(...R))},[_("button",{id:r,ref_key:"button",ref:b,type:"button",class:"refresh__button","aria-haspopup":"menu","aria-expanded":h(m),"aria-controls":h(m)?a:void 0,onMousedown:M[0]||(M[0]=(...R)=>h(J)&&h(J)(...R)),onClick:M[1]||(M[1]=(...R)=>h(O)&&h(O)(...R)),onKeydown:M[2]||(M[2]=(...R)=>h(Q)&&h(Q)(...R)),onKeyup:M[3]||(M[3]=(...R)=>h(ie)&&h(ie)(...R))},[Ve(p(h(s_)),1),ye(et,{class:"refresh__caret",name:"chevron-down"})],40,fI),h(m)?(c(),u("div",{key:0,class:"refresh__popover",onMousedown:M[5]||(M[5]=it(()=>{},["prevent"]))},[_("div",{id:a,ref_key:"menu",ref:T,role:"menu","aria-labelledby":r,"aria-describedby":y.value?l:void 0,onKeydown:M[4]||(M[4]=(...R)=>h(H)&&h(H)(...R))},[(c(!0),u(q,null,be(v.value,(R,D)=>(c(),u("div",{key:R.label,role:"menuitem",tabindex:"-1","data-menu-item":"",class:"refresh__item","aria-disabled":R.disabled?"true":void 0,onClick:V=>h(X)(D)},p(R.label),9,pI))),128))],40,hI),y.value?(c(),u("p",{key:0,id:l,class:"refresh__last-check"},p(y.value),1)):x("",!0)],32)):x("",!0)],544))}}),_I=Le(vI,[["__scopeId","data-v-b9dde3b9"]]),mI=["aria-expanded","aria-controls","aria-label"],gI=["aria-checked","aria-labelledby","aria-describedby","onClick"],yI={class:"switcher__check","aria-hidden":"true"},bI=["id"],kI=["id"],wI=["id"],$I=Ae({__name:"RootSwitcher",props:{roots:{},scope:{}},emits:["choose"],setup(e,{expose:t,emit:n}){const o=e,s=n,i={scanning:"badge--info",failed:"badge--danger",approximate:"badge--warn"},r=tt(),a=`${r}-button`,l=`${r}-menu`;function d(R){return[R.manager,...Ds(R).map(D=>D.text)].join(Ct)}const f=k(()=>[{key:"all-roots",root:void 0,label:ai,detail:"",mark:void 0},...o.roots.map(R=>({key:`root-${R.id}`,root:R.id,label:Re(R.id),detail:d(R),mark:md(R)}))]),{isOpen:v,container:y,button:m,menu:w,choose:b,dismiss:T,onButtonMousedown:X,onButtonClick:F,onButtonKeydown:J,onButtonKeyup:O,onMenuKeydown:Q,onFocusOut:ie}=ia({labels:()=>f.value.map(R=>R.label),onChoose:R=>{const D=f.value[R];D!==void 0&&s("choose",D.root)}});function H(R){return R.root===o.scope}function j(R,D){return`${r}-item-${R}-${D}`}function U(R,D){const _e=[R.mark===void 0?void 0:j(D,"mark"),R.detail===""?void 0:j(D,"detail")].filter(Ee=>Ee!==void 0);return _e.length===0?void 0:_e.join(" ")}function M(){var R;(R=m.value)==null||R.focus()}return t({focusButton:M,dismiss:T}),(R,D)=>(c(),u("div",{ref_key:"container",ref:y,class:"switcher",onFocusout:D[6]||(D[6]=(...V)=>h(ie)&&h(ie)(...V))},[_("button",{id:a,ref_key:"button",ref:m,type:"button",class:"switcher__button","aria-haspopup":"menu","aria-expanded":h(v),"aria-controls":h(v)?l:void 0,"aria-label":h(qr)(e.scope),onMousedown:D[0]||(D[0]=(...V)=>h(X)&&h(X)(...V)),onClick:D[1]||(D[1]=(...V)=>h(F)&&h(F)(...V)),onKeydown:D[2]||(D[2]=(...V)=>h(J)&&h(J)(...V)),onKeyup:D[3]||(D[3]=(...V)=>h(O)&&h(O)(...V))},[_("span",{class:Me(["switcher__current",{mono:e.scope!==void 0}])},p(h(fi)(e.scope)),3),ye(et,{class:"switcher__caret",name:"chevron-down"})],40,mI),h(v)?(c(),u("div",{key:0,id:l,ref_key:"menu",ref:w,role:"menu",class:"switcher__menu","aria-labelledby":a,onKeydown:D[4]||(D[4]=(...V)=>h(Q)&&h(Q)(...V)),onMousedown:D[5]||(D[5]=it(()=>{},["prevent"]))},[(c(!0),u(q,null,be(f.value,(V,_e)=>(c(),u("div",{key:V.key,role:"menuitemradio",tabindex:"-1","data-menu-item":"",class:"switcher__item","aria-checked":H(V),"aria-labelledby":j(_e,"name"),"aria-describedby":U(V,_e),onClick:Ee=>h(b)(_e)},[_("span",yI,[H(V)?(c(),Ke(et,{key:0,name:"check"})):x("",!0)]),_("span",{id:j(_e,"name"),class:Me(["switcher__name",{mono:V.root!==void 0}])},p(V.label),11,bI),V.mark?(c(),u("span",{key:0,id:j(_e,"mark"),class:Me(["badge switcher__mark",i[V.mark]])},p(V.mark),11,kI)):x("",!0),V.detail?(c(),u("span",{key:1,id:j(_e,"detail"),class:"switcher__detail"},p(V.detail),9,wI)):x("",!0)],8,gI))),128))],544)):x("",!0)],544))}}),EI=Le($I,[["__scopeId","data-v-7e147b18"]]),SI=100,II="HEAD",CI=[["branch",a_],["remote",l_],["tag",c_]];function xI(e,t,n){const o=e.name===t;return{key:`ref:${e.name}`,value:e.name,label:e.short,detail:o?u_:ro(e.committedAt,n),checkedOut:o}}function TI(e,t){const n=[];return t&&n.push({key:"working",value:ft,label:io,detail:"",checkedOut:!1}),e.head!==void 0&&n.push({key:"head",value:II,label:h_(Dn(e.head.commit)),detail:"",checkedOut:!1}),n}function OI(e,t,n){const o=t.trim().toLowerCase(),s=d=>o===""||d.label.toLowerCase().includes(o),i=[{label:io,options:TI(e,n.includeWorking)},...CI.map(([d,f])=>({label:f,options:e.refs.filter(v=>v.kind===d).map(v=>{var y;return xI(v,(y=e.head)==null?void 0:y.branch,n.now)})}))],r=[];let a=0,l=0;for(const d of i){const f=[];for(const v of d.options.filter(s))a<SI?(f.push(v),a+=1):l+=1;f.length>0&&r.push({label:d.label,options:f})}return{groups:r,hiddenCount:l,optionCount:a}}const RI={class:"ref-picker"},AI=["aria-label","aria-activedescendant","placeholder"],NI=["aria-label"],PI=["aria-label"],LI={class:"ref-picker__group-label","aria-hidden":"true"},DI=["id","aria-selected","onMousemove","onClick"],MI={class:"ref-picker__check","aria-hidden":"true"},FI={class:"ref-picker__label mono"},BI={key:0,class:"ref-picker__detail"},KI={key:0,class:"ref-picker__note"},HI={key:1,class:"ref-picker__note"},UI=Ae({__name:"RefPicker",props:{info:{},includeWorking:{type:Boolean},current:{},label:{}},emits:["pick","cancel"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=tt(),r=`${i}-list`,a=Y(null),l=Y(null),d=Y(""),f=Date.now(),v=k(()=>OI(o.info,d.value,{includeWorking:o.includeWorking,now:f})),y=k(()=>v.value.groups.flatMap(H=>H.options)),m=Y(w());function w(){const H=y.value.findIndex(j=>j.value===o.current);return H===-1?0:H}function b(H){return`${i}-option-${H}`}function T(H){return y.value.indexOf(H)}const X=k(()=>y.value.length===0?void 0:b(m.value));function F(){st(()=>{var j;const H=(j=l.value)==null?void 0:j.querySelector(`#${CSS.escape(b(m.value))}`);H==null||H.scrollIntoView({block:"nearest"})})}function J(H){y.value.length!==0&&(m.value=Math.min(Math.max(H,0),y.value.length-1),F())}function O(){const H=y.value[m.value];H!==void 0&&s("pick",H.value)}function Q(H){const U={ArrowDown:()=>J(m.value+1),ArrowUp:()=>J(m.value-1),Home:()=>J(0),End:()=>J(y.value.length-1),Enter:O,Escape:()=>s("cancel")}[H.key];U!==void 0&&(H.preventDefault(),H.stopPropagation(),U())}Ne(d,()=>{m.value=0,F()});function ie(){var H;(H=a.value)==null||H.focus(),F()}return t({focus:ie}),(H,j)=>(c(),u("div",RI,[Ut(_("input",{ref_key:"input",ref:a,"onUpdate:modelValue":j[0]||(j[0]=U=>d.value=U),class:"ref-picker__filter",type:"text",role:"combobox",autocomplete:"off",spellcheck:"false","aria-autocomplete":"list","aria-expanded":"true","aria-label":e.label,"aria-controls":r,"aria-activedescendant":X.value,placeholder:h(d_),onKeydown:Q},null,40,AI),[[Iu,d.value]]),_("div",{id:r,ref_key:"list",ref:l,role:"listbox",class:"ref-picker__list","aria-label":e.label},[(c(!0),u(q,null,be(v.value.groups,U=>(c(),u("div",{key:U.label,role:"group","aria-label":U.label,class:"ref-picker__group"},[_("div",LI,p(U.label),1),(c(!0),u(q,null,be(U.options,M=>(c(),u("div",{id:b(T(M)),key:M.key,role:"option",class:Me(["ref-picker__option",{"ref-picker__option--active":T(M)===m.value}]),"aria-selected":T(M)===m.value,onMousedown:j[1]||(j[1]=it(()=>{},["prevent"])),onMousemove:R=>m.value=T(M),onClick:R=>s("pick",M.value)},[_("span",MI,[M.value===e.current?(c(),Ke(et,{key:0,name:"check"})):x("",!0)]),_("span",FI,p(M.label),1),M.detail?(c(),u("span",BI,p(M.detail),1)):x("",!0)],42,DI))),128))],8,PI))),128))],8,NI),v.value.optionCount===0?(c(),u("p",KI,p(h(v_)(d.value.trim())),1)):x("",!0),v.value.hiddenCount>0?(c(),u("p",HI,p(h(p_)(v.value.hiddenCount)),1)):x("",!0)]))}}),uf=Le(UI,[["__scopeId","data-v-c06b15aa"]]),VI=["title"],jI=["aria-expanded","aria-controls","aria-label"],WI={key:1,class:"source-switcher__detail mono"},GI=["aria-label"],qI={key:1,class:"source-switcher__message"},XI={key:2,class:"source-switcher__message"},YI=Ae({__name:"SourceSwitcher",setup(e,{expose:t}){const o=wt(oo,{source:{kind:"working"}}).source,s=Et(),i=tt(),r=`${i}-button`,a=`${i}-panel`,l=`${i}-reason`,d=Y(null),f=Y(null),v=Y(null),y=Y(null),m=Y(!1),w=k(()=>{var R;return((R=y.value)==null?void 0:R.available)===!0?y.value:null}),b=k(()=>{var R;return((R=y.value)==null?void 0:R.available)===!1&&!y.value.quiet?y.value.reason:null}),T=k(()=>o.kind==="working"&&(y.value===null||y.value.available===!1&&y.value.quiet)),X=k(()=>ms(o)),F=k(()=>o.kind==="working"?ft:o.ref),J=k(()=>{var D;if(o.kind==="commit")return Dn(o.commit);const R=(D=w.value)==null?void 0:D.head;return R===void 0?"":R.branch===void 0?__(Dn(R.commit)):so(R.branch)});async function O(){try{y.value=await s.git()}catch(R){y.value={available:!1,reason:R instanceof Error?R.message:String(R),quiet:!1}}}async function Q(){var R;m.value=!0,await O(),await st(),(R=v.value)==null||R.focus()}function ie(R){m.value=!1,R&&st(()=>{var D;return(D=f.value)==null?void 0:D.focus()})}function H(){m.value?ie(!1):Q()}function j(R){if(R===F.value){ie(!0);return}window.location.assign(rr(window.location.pathname,window.location.search,{ref:R===ft?null:R}))}function U(R){var V;const D=R.relatedTarget;D!==null&&((V=d.value)!=null&&V.contains(D))||(m.value=!1)}function M(){return m.value?(ie(!0),!0):!1}return Gt(O),t({dismiss:M}),(R,D)=>b.value!==null&&h(o).kind==="working"?(c(),u("span",{key:0,class:"source-switcher__none",tabindex:"0",title:b.value,"aria-describedby":l},[Ve(p(h(f_)),1),_("span",{id:l,class:"sr-only"},p(b.value),1)],8,VI)):T.value?x("",!0):(c(),u("div",{key:1,ref_key:"container",ref:d,class:"source-switcher",onFocusout:U},[_("button",{id:r,ref_key:"button",ref:f,type:"button",class:Me(["source-switcher__button",{"source-switcher--commit":h(o).kind==="commit"}]),"aria-haspopup":"dialog","aria-expanded":m.value,"aria-controls":m.value?a:void 0,"aria-label":h(m_)(X.value),onClick:H},[h(o).kind==="commit"?(c(),Ke(et,{key:0,name:"git-branch"})):x("",!0),_("span",{class:Me(["source-switcher__label",{mono:h(o).kind==="commit"}])},p(h(o).kind==="commit"?X.value:h(io)),3),J.value?(c(),u("span",WI,p(J.value),1)):x("",!0),ye(et,{class:"source-switcher__caret",name:"chevron-down"})],10,jI),m.value?(c(),u("div",{key:0,id:a,role:"dialog",class:"source-switcher__panel","aria-label":h(Za)},[w.value?(c(),Ke(uf,{key:0,ref_key:"picker",ref:v,info:w.value,"include-working":!0,current:F.value,label:h(Za),onPick:j,onCancel:D[0]||(D[0]=V=>ie(!0))},null,8,["info","current","label"])):y.value===null?(c(),u("p",qI,p(h(Vu)),1)):(c(),u("p",XI,p(y.value.available?"":y.value.reason),1))],8,GI)):x("",!0)],544))}}),zI=Le(YI,[["__scopeId","data-v-44e50bf4"]]),JI={class:"shortcuts__body"},QI={scope:"col"},ZI={scope:"col"},eC={class:"shortcuts__keys"},tC={key:0},nC={class:"shortcuts__key"},oC={class:"shortcuts__buttons"},sC=Ae({__name:"ShortcutsDialog",emits:["close"],setup(e,{emit:t}){const n=t,s=`${tt()}-title`,i=Y(null);function r(a){return a.split(il)}return Gt(()=>{var a;return(a=i.value)==null?void 0:a.showModal()}),Ot(()=>{var a;return(a=i.value)==null?void 0:a.close()}),(a,l)=>(c(),u("dialog",{ref_key:"dialog",ref:i,class:"shortcuts","aria-labelledby":s,onCancel:l[1]||(l[1]=it(d=>n("close"),["prevent"]))},[_("div",JI,[_("h2",{id:s,class:"shortcuts__title"},p(h(lr)),1),_("table",{class:"shortcuts__table","aria-labelledby":s},[_("thead",null,[_("tr",null,[_("th",QI,p(h(W_)),1),_("th",ZI,p(h(G_)),1)])]),_("tbody",null,[(c(!0),u(q,null,be(h(Yg),d=>(c(),u("tr",{key:d.keys},[_("td",eC,[(c(!0),u(q,null,be(r(d.keys),(f,v)=>(c(),u(q,{key:f},[v>0?(c(),u("span",tC,p(h(il)),1)):x("",!0),_("kbd",nC,p(f),1)],64))),128))]),_("td",null,p(d.action),1)]))),128))])]),_("div",oC,[_("button",{type:"button",class:"button shortcuts__close",autofocus:"",onClick:l[0]||(l[0]=d=>n("close"))},p(h(Gu)),1)])])],544))}}),iC=Le(sC,[["__scopeId","data-v-c10e93c1"]]),rC={class:"topbar"},aC={class:"topbar__brand"},lC={class:"topbar__name"},cC=["title"],uC={key:0,class:"kinds-chip"},dC={class:"kinds-chip__text"},fC={class:"sr-only"},hC=["aria-label","title"],pC={class:"search"},vC=["aria-label","aria-expanded","aria-activedescendant","placeholder"],_C={class:"search__hint"},mC={class:"search__dropdown"},gC={key:0,class:"search__status muted"},yC=["aria-label"],bC=["aria-label"],kC={class:"search__name mono"},wC={class:"search__version-label mono"},$C={class:"search__roots"},EC=["id","aria-selected","aria-label","onMousemove","onClick"],SC={key:0,class:"search__variant"},IC={class:"topbar__end"},CC=["aria-label","title"],xC=120,TC=Ae({__name:"TopBar",props:{repoPath:{},scope:{},roots:{},kinds:{},enrichment:{}},emits:["pick","choose-root","show-all-kinds","rescan","check-again"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=Pk(/Mac|iPhone|iPad/.test(navigator.userAgent)),r=Et(),a=Y(null),l=Y(null),d=Y(null),f=wt(oo,{source:{kind:"working"}});function v(){window.location.reload()}const y=Y(null),m=Y(null),w=Y(!1);let b=null;const T=Y(""),X=Y([]),F=Y(""),J=Y(null),O=Y(!1),Q=Y(-1);let ie,H=0;const j=k(()=>T.value.trim()),U=k(()=>{var C;return((C=o.repoPath)==null?void 0:C.split(/[\\/]/).filter(Boolean).pop())??""}),M=k(()=>O.value&&j.value!==""),R=k(()=>F.value===j.value),D=k(()=>Hy(o.kinds)),V=k(()=>{let C=0;return Rv(X.value,o.scope).map(I=>({name:I.name,versions:I.versions.map(({version:Ie,roots:g})=>{const E=ri(g,A=>A.rootId,A=>A.nodeId);return{version:Ie,options:g.map(({rootId:A,nodeId:oe})=>{var ce;const B=(ce=E.get(A))==null?void 0:ce.get(oe),Z={position:C,domId:`search-option-${C}`,name:I.name,version:Ie,rootId:A,nodeId:oe,variant:B===void 0?"":Mn(B)};return C++,Z})}})}))}),_e=k(()=>V.value.flatMap(C=>C.versions.flatMap(I=>I.options))),Ee=k(()=>_e.value[Q.value]),Te=k(()=>R.value?J.value!==null?Lk(J.value):X.value.length===0?Dk(j.value):"":Tg);function le(C){return Mk(C.name,C.version,C.rootId,C.variant)}async function me(C){const I=++H;try{const Ie=await r.search(C);if(I!==H)return;X.value=Ie,J.value=null}catch(Ie){if(I!==H)return;X.value=[],J.value=Ie instanceof Error?Ie.message:String(Ie)}F.value=C}Ne(j,C=>{if(window.clearTimeout(ie),Q.value=-1,C===""){H++,X.value=[],F.value="";return}ie=window.setTimeout(()=>void me(C),xC)});async function W(C){var g;const I=_e.value.length;if(I===0)return;Q.value=(Q.value+C+I)%I,await st();const Ie=Ee.value;Ie&&((g=document.getElementById(Ie.domId))==null||g.scrollIntoView({block:"nearest"}))}function S(C){var I;s("pick",{root:C.rootId,node:C.nodeId}),O.value=!1,Q.value=-1,(I=a.value)==null||I.blur()}function ne(C){var I;if(C.key==="ArrowDown"||C.key==="ArrowUp"){C.preventDefault(),O.value=!0,W(C.key==="ArrowDown"?1:-1);return}if(C.key==="Enter"){const Ie=Ee.value??(R.value?_e.value[0]:void 0);if(!Ie)return;C.preventDefault(),S(Ie);return}C.key==="Escape"&&(C.preventDefault(),M.value?O.value=!1:(I=a.value)==null||I.blur())}function ae(){var C,I;(C=a.value)==null||C.focus(),(I=a.value)==null||I.select(),O.value=!0}function $e(){var C;s("show-all-kinds"),(C=l.value)==null||C.focusButton()}function ee(){const C=document.activeElement;return C instanceof HTMLElement&&C!==document.body?C:null}function he(){w.value||(b=ee(),w.value=!0)}async function L(){w.value=!1,await st();const C=(b==null?void 0:b.isConnected)===!0?b:m.value;b=null,C==null||C.focus()}function $(){var Ie,g,E;const C=[((Ie=d.value)==null?void 0:Ie.dismiss())===!0,((g=l.value)==null?void 0:g.dismiss())===!0,((E=y.value)==null?void 0:E.dismiss())===!0],I=w.value;return I&&L(),I||C.includes(!0)}return t({focusSearch:ae,openShortcuts:he,dismissPopups:$}),Ot(()=>{window.clearTimeout(ie)}),(C,I)=>{var Ie;return c(),u("header",rC,[_("div",aC,[_("span",lC,p(h(wg)),1),U.value?(c(),u("span",{key:0,class:"topbar__repo muted mono",title:e.repoPath},p(U.value),9,cC)):x("",!0)]),ye(zI,{ref_key:"sourceSwitcher",ref:d},null,512),ye(EI,{ref_key:"switcher",ref:l,roots:e.roots,scope:e.scope,onChoose:I[0]||(I[0]=g=>s("choose-root",g))},null,8,["roots","scope"]),D.value?(c(),u("span",uC,[_("span",dC,[_("span",fC,p(h(Xu))+": ",1),Ve(p(D.value),1)]),_("button",{type:"button",class:"kinds-chip__clear","aria-label":h(Qa),title:h(Qa),onClick:$e},[ye(et,{name:"x",size:18})],8,hC)])):x("",!0),_("div",pC,[Ut(_("input",{ref_key:"input",ref:a,"onUpdate:modelValue":I[1]||(I[1]=g=>T.value=g),class:"search__input",type:"text",role:"combobox","aria-label":h(Ig),"aria-autocomplete":"list","aria-controls":"search-results","aria-expanded":M.value,"aria-activedescendant":(Ie=Ee.value)==null?void 0:Ie.domId,placeholder:h(Cg),autocomplete:"off",spellcheck:"false",onFocus:I[2]||(I[2]=g=>O.value=!0),onBlur:I[3]||(I[3]=g=>O.value=!1),onInput:I[4]||(I[4]=g=>O.value=!0),onKeydown:ne},null,40,vC),[[Iu,T.value]]),_("kbd",_C,p(h(i)),1),Ut(_("div",mC,[Te.value?(c(),u("p",gC,p(Te.value),1)):x("",!0),_("div",{id:"search-results",role:"listbox","aria-label":h(xg)},[(c(!0),u(q,null,be(V.value,g=>(c(),u("div",{key:g.name,class:"search__group",role:"group","aria-label":g.name},[_("div",kC,p(g.name),1),(c(!0),u(q,null,be(g.versions,E=>(c(),u("div",{key:E.version,class:"search__version"},[_("span",wC,p(E.version),1),_("span",$C,[(c(!0),u(q,null,be(E.options,A=>(c(),u("span",{id:A.domId,key:A.domId,role:"option",class:Me(["search__option",{"search__option--active":A===Ee.value}]),"aria-selected":A===Ee.value,"aria-label":le(A),onMousedown:I[5]||(I[5]=it(()=>{},["prevent"])),onMousemove:oe=>Q.value=A.position,onClick:oe=>S(A)},[Ve(p(h(Re)(A.rootId)),1),A.variant?(c(),u("span",SC,p(A.variant),1)):x("",!0)],42,EC))),128))])]))),128))],8,bC))),128))],8,yC)],512),[[_s,M.value]])]),_("div",IC,[ye(_I,{ref_key:"refreshMenu",ref:y,status:e.enrichment,"reloads-branch":h(f).source.kind==="commit",onRescan:I[6]||(I[6]=g=>s("rescan")),onCheckAgain:I[7]||(I[7]=g=>s("check-again")),onReload:v},null,8,["status","reloads-branch"]),_("button",{ref_key:"helpButton",ref:m,type:"button",class:"topbar__help","aria-label":h(lr),title:h(lr),onClick:he}," ? ",8,CC)]),w.value?(c(),Ke(iC,{key:1,onClose:L})):x("",!0)])}}}),OC=Le(TC,[["__scopeId","data-v-f7158c01"]]),Vi={};function RC(e,t,n,o){const s=We(Vi),i=We(void 0),r=We(null);let a=0,l="";async function d(f,v){const y=++a;try{const m=await e.decorations(f,v);if(y!==a)return;s.value=m.nodes,i.value=f,r.value=null}catch(m){if(y!==a||Qo(m))return;s.value=Vi,i.value=void 0,r.value=Rk(m instanceof Error?m.message:String(m))}}return Ne([t,()=>n.value.join(","),o],([f,v])=>{const y=`${f??""}
34
+ ${v}`;if(y!==l&&(l=y,s.value=Vi,i.value=void 0),f===void 0){a+=1,r.value=null;return}d(f,n.value)},{immediate:!0}),{nodes:s,loadedRoot:i,error:r}}function AC(e,t){const n=We(new Map),o=We(null);let s=0;async function i(){const r=++s;try{const a=await e.duplicates();if(r!==s)return;n.value=new Map(a.map(l=>[l.name,gk(l)])),o.value=null}catch(a){if(r!==s)return;o.value=Ak(a instanceof Error?a.message:String(a))}}return Ne(t,r=>{r!==void 0&&i()},{immediate:!0}),{versionsByName:n,error:o}}function NC(e,t,n,o){const s=We(null),i=We(null);let r=0,a="";async function l(d,f){const v=++r;try{const y=await e.issueRows(d,f);if(v!==r)return;s.value=y.rows,i.value=null}catch(y){if(v!==r||Qo(y))return;s.value=null,i.value=y instanceof Error?y.message:String(y)}}return Ne([t,()=>n.value.join(","),o],([d,f,v])=>{const y=`${d??""}
35
+ ${f}`;y!==a&&(a=y,s.value=null,i.value=null),v!==void 0&&l(d,n.value)},{immediate:!0}),{rows:s,count:k(()=>{var d;return((d=s.value)==null?void 0:d.length)??null}),error:i}}function df(e){return e.activeElement===null||e.activeElement===e.body}async function co(e,t){await st(),df(e)&&t()}const PC=new Set(["INPUT","TEXTAREA","SELECT"]),Xl={"/":"search","[":"toggle-roots","]":"toggle-details",1:"view-issues",2:"view-changes",3:"view-explore",4:"view-compare","?":"help"};function LC(e){return e.isContentEditable||PC.has(e.tagName.toUpperCase())}function DC(e,t){if(!(e.defaultPrevented||t.isInMenuOrDialog)){if(e.key==="Escape")return"escape";if((e.metaKey||e.ctrlKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()==="k")return"search";if(!(e.metaKey||e.ctrlKey||e.altKey)&&!LC(t))return Object.hasOwn(Xl,e.key)?Xl[e.key]:void 0}}const MC='[role="menu"], [role="dialog"], [role="alertdialog"], dialog';function FC(e){const t=e.target instanceof HTMLElement?e.target:void 0;return{tagName:(t==null?void 0:t.tagName)??"",isContentEditable:(t==null?void 0:t.isContentEditable)??!1,isInMenuOrDialog:t!==void 0&&t.closest(MC)!==null,inputType:t instanceof HTMLInputElement?t.type:void 0}}function BC(e){function t(n){const o=DC(n,FC(n)),s=o===void 0?void 0:e[o];s&&s()!==!1&&n.preventDefault()}Gt(()=>window.addEventListener("keydown",t)),Pr(()=>window.removeEventListener("keydown",t))}const ff="deptrail.panels",KC=1100,HC=820;function UC(e){return{rootsCollapsed:e<HC,detailsCollapsed:e<KC}}function VC(e){try{return(e==null?void 0:e.getItem(ff))??null}catch{return null}}function jC(e){if(e===null)return{};try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:{}}catch{return{}}}function Yl(e,t){return typeof e=="boolean"?e:t}function WC(e,t){const n=UC(t),o=jC(VC(e));return{rootsCollapsed:Yl(o.rootsCollapsed,n.rootsCollapsed),detailsCollapsed:Yl(o.detailsCollapsed,n.detailsCollapsed)}}function GC(e,t){try{e==null||e.setItem(ff,JSON.stringify({rootsCollapsed:t.rootsCollapsed,detailsCollapsed:t.detailsCollapsed}))}catch{return}}const qC=6e4;function XC(e,t){return{previousScannedAt:e,deadline:t+qC}}function YC(e,t,n){return t!==void 0&&t!==e.previousScannedAt?"started":n>=e.deadline?"timed-out":"waiting"}const zC=1e4,JC=/(\d+)\.(\d+)\.(\d+)/,QC="@";function ZC(e){const{changeCount:t,job:n,revertable:o}=e.actions;return t>0||(n==null?void 0:n.state)==="running"||o}function ex(e,t){return t!==void 0?e.filter(n=>n.id===t).map(n=>n.id):e.filter(ZC).map(n=>n.id)}function tx(e){const{items:t,preview:n,job:o}=e;return t.length===0?(o==null?void 0:o.kind)==="apply"&&o.state==="done"?"applied":"changes":n===void 0?"changes":n.stale?"preview":"apply"}function nx(e){if(e.items.length===0)return;const t=e.preview;return t===void 0?"preview":t.stale?"preview-again":"apply"}function hf(e,t){return e.find(n=>n.kind==="relock"&&n.name===t)}function ox(e){const{goal:t}=e;if(t.kind==="fix")return{kind:"version",name:t.name,version:t.version};const[n]=t.importers;if(n!==void 0)return{kind:"direct",name:t.name,importer:n};const o=hf(e.steps,t.name);return o===void 0?void 0:{kind:"version",name:t.name,version:o.from}}function zl(e,t,n,o){var a;const s=(a=e.find(l=>l.name===n))==null?void 0:a.versions.find(l=>l.version===o),i=((s==null?void 0:s.roots)??[]).filter(l=>l.rootId===t).map(l=>l.nodeId),r=`${n}${QC}${o}`;return i.includes(r)?r:i[0]}function sx(e,t){var o;const n=e.filter(s=>s.node.name===t&&!s.node.isImporter);return(o=n.find(s=>s.kind!=="peer")??n[0])==null?void 0:o.node.id}function Jl(e){const t=JC.exec(e);return t===null?void 0:[Number(t[1]),Number(t[2]),Number(t[3])]}function ix(e,t){const n=hf(e.steps,t);if(n!==void 0)return n.from;const o=e.steps.find(s=>s.kind==="set-range");return(o==null?void 0:o.kind)==="set-range"?o.from:void 0}function rx(e,t){const[n,o,s]=e,[i,r,a]=t;return i!==n?i>n?"major":void 0:r!==o?r>o?"minor":void 0:a>s?"patch":void 0}function ax(e){const{goal:t}=e;if(t.kind!=="update")return;const n=ix(e,t.name),o=n===void 0?void 0:Jl(n),s=Jl(t.target);return o===void 0||s===void 0?void 0:rx(o,s)}const lx=1e3;function cx(e,t){return new Promise(n=>{const o=()=>{clearTimeout(s),t==null||t.removeEventListener("abort",o),n()},s=setTimeout(o,e);t==null||t.addEventListener("abort",o,{once:!0})})}async function pf(e,t,n,o={}){const{intervalMs:s=lx,signal:i}=o,r=o.sleep??(d=>cx(d,i));let a=0,l=[];for(;;){i==null||i.throwIfAborted();const d=await e.job(t,a);if(i==null||i.throwIfAborted(),l=[...l,...d.log].slice(-2e3),a=d.firstLine+d.log.length,n(d,l),d.state!=="running")return d;await r(s)}}const ux=["aria-labelledby"],dx=["id"],fx={key:0,class:"apply__unmet","data-testid":"apply-unmet"},hx={class:"apply__unmet-heading"},px={class:"apply__unmet-lines"},vx={class:"apply__writes"},_x={class:"apply__install"},mx={class:"apply__install-label"},gx=["aria-describedby"],yx={class:"mono"},bx=["id"],kx=["id"],wx={class:"apply__buttons"},$x={type:"submit",class:"button button--primary apply__button"},Ex=Ae({__name:"ApplyDialog",props:{preview:{},rootName:{},installByDefault:{type:Boolean},goals:{}},emits:["cancel","apply"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=Y(null),r=Y(n.installByDefault),a=k(()=>n.preview.goals.filter(d=>!d.met).map(d=>Md(d,n.goals.get(d.itemId)))),l=k(()=>n.preview.outsidePackages?`${s}-note ${s}-outside`:`${s}-note`);return Gt(()=>{var d;return(d=i.value)==null?void 0:d.showModal()}),Ot(()=>{var d;return(d=i.value)==null?void 0:d.close()}),(d,f)=>(c(),u("dialog",{ref_key:"dialog",ref:i,class:"apply","aria-labelledby":`${h(s)}-title`,onCancel:f[3]||(f[3]=it(v=>o("cancel"),["prevent"]))},[_("form",{class:"apply__form",onSubmit:f[2]||(f[2]=it(v=>o("apply",r.value),["prevent"]))},[_("h2",{id:`${h(s)}-title`,class:"apply__title"},p(h(Xb)(e.preview.goals.length,e.rootName)),9,dx),a.value.length>0?(c(),u("div",fx,[_("p",hx,p(h(Yb)(a.value.length)),1),_("ul",px,[(c(!0),u(q,null,be(a.value,(v,y)=>(c(),u("li",{key:y},p(v),1))),128))])])):x("",!0),_("p",vx,p(h(Jb)(e.preview.files)),1),_("div",_x,[_("label",mx,[Ut(_("input",{"onUpdate:modelValue":f[0]||(f[0]=v=>r.value=v),type:"checkbox","aria-describedby":l.value},null,8,gx),[[or,r.value]]),_("span",null,[Ve(p(h(bg))+" ",1),_("span",yx,p(h(Gb)(e.preview.manager.name)),1)])]),_("p",{id:`${h(s)}-note`,class:"apply__note"},p(h(qb)(e.preview.manager.name)),9,bx),e.preview.outsidePackages?(c(),u("p",{key:0,id:`${h(s)}-outside`,class:"apply__note"},p(h(Qb)(e.preview.outsidePackages)),9,kx)):x("",!0)]),_("div",wx,[_("button",{type:"button",class:"button apply__button",autofocus:"",onClick:f[1]||(f[1]=v=>o("cancel"))},p(h(Vr)),1),_("button",$x,p(h(kg)),1)])],32)],40,ux))}}),Sx=Le(Ex,[["__scopeId","data-v-90966fcb"]]),vf="−",Ix="`",Cx=2,xx=["--- ","+++ "],Tx=["@@","\\"];function Ox(e){const t=e.removed.join(at),n=e.added.join(at);return e.removed.length===0?`+ ${e.name} ${n}`:e.added.length===0?`${vf} ${e.name} ${t}`:`${e.name} ${t} → ${n}`}function Rx(e){return`+${e.added} ${vf}${e.removed}`}function Ax(e,t){return`${e.manager.name} ${e.manager.version}${Ct}${ro(e.createdAt,t)}`}function Nx(e){return e.split(Ix).map((t,n)=>({text:t,code:n%2===1})).filter(t=>t.text!=="")}function Px(e,t){return t<Cx&&xx.some(n=>e.startsWith(n))||Tx.some(n=>e.startsWith(n))?"meta":e.startsWith("+")?"added":e.startsWith("-")?"removed":"context"}function Lx(e){if(e==="")return[];const t=e.split(`
36
+ `);return t[t.length-1]===""&&t.pop(),t.map((n,o)=>({text:n,tone:Px(n,o)}))}const Dx=["aria-label"],Mx={class:"job__head"},Fx={class:"job__phase",role:"status"},Bx=["disabled"],Kx=["open"],Hx={key:1,class:"job__empty muted"},Ux=["aria-label"],Vx=["role"],jx={key:1,class:"job__hint","data-testid":"install-hint"},Wx={key:0,class:"job__command mono"},Gx={key:2,class:"job__revert"},qx=["disabled"],Xx={key:0,class:"muted","data-testid":"revert-note"},Yx=["open"],zx=Ae({__name:"ChangesJobStatus",props:{job:{},log:{},outcome:{},hint:{},revertNote:{},revertable:{type:Boolean},busy:{type:Boolean},requesting:{type:Boolean}},emits:["cancel","revert"],setup(e,{emit:t}){const n=e,o=t,s=Y(!1),i=Y(null),r=k(()=>{var m;return((m=n.job)==null?void 0:m.state)==="running"}),a=k(()=>{var m,w;return r.value&&(((m=n.job)==null?void 0:m.kind)==="preview"||((w=n.job)==null?void 0:w.kind)==="apply"&&n.job.phase==="installing")}),l=k(()=>n.revertable&&!r.value),d=k(()=>n.outcome!==void 0&&n.log.length>0),f=k(()=>n.hint===void 0?[]:Nx(n.hint));function v(m){s.value=m.currentTarget.open}async function y(){await st();const m=i.value;m!==null&&(m.scrollTop=m.scrollHeight)}return Ne([()=>{var m;return(m=n.job)==null?void 0:m.id},()=>{var m;return(m=n.job)==null?void 0:m.state}],([,m])=>{s.value=m==="failed"},{immediate:!0}),Ne(()=>n.log.length,()=>void y()),Ne(s,m=>{m&&y()}),(m,w)=>e.job&&r.value?(c(),u("section",{key:0,class:"job","aria-label":h(_g),"data-testid":"changes-job"},[_("div",Mx,[w[2]||(w[2]=_("span",{class:"job__pulse","aria-hidden":"true"},null,-1)),_("span",Fx,p(h(Wb)(e.job.phase)),1),a.value?(c(),u("button",{key:0,type:"button",class:"button job__cancel job__button",disabled:e.requesting,onClick:w[0]||(w[0]=b=>o("cancel"))},p(h(Vr)),9,Bx)):x("",!0)]),_("details",{class:"job__log","data-testid":"job-log",open:s.value,onToggle:v},[_("summary",null,[ye(et,{class:"summary-chevron",name:"chevron-right"}),Ve(p(h(Cl)(e.log.length)),1)]),e.log.length>0?(c(),u("pre",{key:0,ref_key:"logLines",ref:i,class:"job__lines mono","data-testid":"job-lines"},p(e.log.join(`
37
+ `)),513)):(c(),u("p",Hx,p(h(yg)),1))],40,Kx)],8,Dx)):e.outcome||l.value?(c(),u("section",{key:1,class:"job","aria-label":h(mg),"data-testid":"changes-outcome"},[e.outcome?(c(),u("p",{key:0,class:Me(["job__outcome",{"job__outcome--failed":e.outcome.failed}]),role:e.outcome.failed?"alert":"status","data-testid":"job-outcome"},p(e.outcome.text),11,Vx)):x("",!0),e.hint?(c(),u("p",jx,[(c(!0),u(q,null,be(f.value,(b,T)=>(c(),u(q,{key:T},[b.code?(c(),u("code",Wx,p(b.text),1)):(c(),u(q,{key:1},[Ve(p(b.text),1)],64))],64))),128))])):x("",!0),l.value?(c(),u("div",Gx,[_("button",{type:"button",class:"button job__button",disabled:e.busy,onClick:w[1]||(w[1]=b=>o("revert"))},p(h(gg)),9,qx),e.revertNote?(c(),u("span",Xx,p(e.revertNote),1)):x("",!0)])):x("",!0),d.value?(c(),u("details",{key:3,class:"job__log","data-testid":"job-log",open:s.value,onToggle:v},[_("summary",null,[ye(et,{class:"summary-chevron",name:"chevron-right"}),Ve(p(h(Cl)(e.log.length)),1)]),_("pre",{ref_key:"logLines",ref:i,class:"job__lines mono","data-testid":"job-lines"},p(e.log.join(`
38
+ `)),513)],40,Yx)):x("",!0)],8,Ux)):x("",!0)}}),Jx=Le(zx,[["__scopeId","data-v-4ea48f0f"]]),Qx={class:"file__summary"},Zx={class:"file__path mono"},eT={key:0,class:"badge badge--info"},tT={class:"file__stats mono","data-testid":"file-stats"},nT={key:0,class:"file__message muted"},oT={key:1,class:"file__message file__message--error",role:"alert"},sT={key:0,class:"file__message muted"},iT={class:"file__diff mono","data-testid":"file-diff"},rT=Ae({__name:"PreviewFileDetails",props:{root:{},file:{},index:{}},setup(e){const t=e,n=Et(),o=We(null),s=k(()=>t.file.diff===void 0?o.value:{state:"loaded",diff:t.file.diff,truncated:t.file.diffTruncated===!0}),i=k(()=>{var f;return((f=s.value)==null?void 0:f.state)==="loaded"?Lx(s.value.diff):[]}),r=k(()=>{var f;return((f=s.value)==null?void 0:f.state)==="loaded"&&(s.value.truncated||t.file.diffTruncated===!0)});function a(f){return f instanceof Error?f.message:String(f)}async function l(){o.value={state:"loading"};try{o.value={state:"loaded",...await n.previewFileDiff(t.root,t.index)}}catch(f){o.value={state:"failed",error:a(f)}}}function d(f){f.currentTarget.open&&(s.value===null||s.value.state==="failed")&&l()}return(f,v)=>(c(),u("details",{class:"file","data-testid":"preview-file",onToggle:d},[_("summary",Qx,[ye(et,{class:"file__chevron",name:"chevron-right",size:18}),_("span",Zx,p(e.file.path),1),e.file.change==="created"?(c(),u("span",eT,p(h(Kg)),1)):x("",!0),_("span",tT,p(h(Rx)(e.file)),1)]),s.value===null||s.value.state==="loading"?(c(),u("p",nT,p(h(Hg)),1)):s.value.state==="failed"?(c(),u("p",oT,p(h(Nk)(s.value.error)),1)):(c(),u(q,{key:2},[r.value?(c(),u("p",sT,p(h(Ug)),1)):x("",!0),_("pre",iT,[(c(!0),u(q,null,be(i.value,(y,m)=>(c(),u("span",{key:m,class:Me(["diff-line",`diff-line--${y.tone}`])},p(y.text),3))),128))])],64))],32))}}),aT=Le(rT,[["__scopeId","data-v-9841fe55"]]),lT=["aria-labelledby"],cT={class:"preview__bar"},uT=["id"],dT={class:"preview__meta muted","data-testid":"preview-meta"},fT={class:"preview__label"},hT={class:"preview__list"},pT={class:"preview__label"},vT={key:0,class:"preview__list"},_T={class:"mono"},mT={key:1,class:"muted"},gT={key:2,class:"muted"},yT={key:3,class:"muted"},bT={key:1,class:"preview__none muted"},kT={class:"preview__label"},wT={class:"preview__list"},$T={class:"preview__label"},ET={class:"preview__files"},ST={class:"preview__summary"},IT={class:"preview__label preview__summary-heading"},CT={key:0,class:"preview__list preview__changes mono"},xT={key:1,class:"preview__none muted"},TT=3e4,OT=10,RT=Ae({__name:"ChangesPreview",props:{root:{},preview:{},goals:{}},setup(e){const t=e,n=tt(),o=Y(Date.now()),s=Y(!1),i=window.setInterval(()=>{o.value=Date.now()},TT);Ot(()=>window.clearInterval(i));const r=k(()=>s.value?t.preview.packageChanges:t.preview.packageChanges.slice(0,OT)),a=k(()=>t.preview.packageChanges.length-r.value.length);Ne(()=>t.preview.id,()=>{s.value=!1,o.value=Date.now()});function l(d){const f=[];return d.severity!==void 0&&f.push({key:"severity",label:d.severity,tone:lo(d.severity),outlined:!1,title:pi(d.vulnIds.length,d.severity)}),d.deprecated!==void 0&&f.push({key:"deprecated",label:Yo,tone:"warn",outlined:!1,title:d.deprecated}),f}return(d,f)=>(c(),u("section",{class:"preview","aria-labelledby":`${h(n)}-title`},[_("div",cT,[_("h3",{id:`${h(n)}-title`,class:"preview__title"},p(h(go).title),9,uT),_("span",dT,p(h(Ax)(e.preview,o.value)),1)]),_("h4",fT,p(h(go).goals),1),_("ul",hT,[(c(!0),u(q,null,be(e.preview.goals,v=>(c(),u("li",{key:v.itemId,class:"preview__goal","data-testid":"preview-goal"},[_("span",{class:Me(v.met?"preview__met":"preview__unmet")},p(v.met?"✓":"✗"),3),Ve(" "+p(h(Md)(v,e.goals.get(v.itemId))),1)]))),128))]),_("h4",pT,p(h(go).newIssues),1),e.preview.newIssues.length>0?(c(),u("ul",vT,[(c(!0),u(q,null,be(e.preview.newIssues,v=>(c(),u("li",{key:`${v.name}@${v.version}`,class:"preview__issue","data-testid":"preview-new-issue"},[v.notChecked===void 0?(c(),Ke(Fn,{key:0,badges:l(v)},null,8,["badges"])):x("",!0),_("span",_T,p(v.name)+" "+p(v.version),1),v.notChecked!==void 0?(c(),u("span",mT,p(h(ek)(v.notChecked)),1)):v.vulnIds.length>0?(c(),u("span",gT,p(v.vulnIds.join(" · ")),1)):v.deprecated!==void 0?(c(),u("span",yT,p(v.deprecated),1)):x("",!0)]))),128))])):(c(),u("p",bT,p(h(ul)),1)),e.preview.warnings.length>0?(c(),u(q,{key:2},[_("h4",kT,p(h(go).warnings),1),_("ul",wT,[(c(!0),u(q,null,be(e.preview.warnings,v=>(c(),u("li",{key:v,class:"preview__warning","data-testid":"preview-warning"},p(v),1))),128))])],64)):x("",!0),_("h4",$T,p(h(go).files),1),_("div",ET,[(c(!0),u(q,null,be(e.preview.files,(v,y)=>(c(),Ke(aT,{key:`${e.preview.id}
39
+ ${v.path}`,root:e.root,file:v,index:y},null,8,["root","file","index"]))),128))]),(c(),u("details",{key:e.preview.id,class:"preview__package-changes","data-testid":"preview-package-changes"},[_("summary",ST,[ye(et,{class:"summary-chevron",name:"chevron-right",size:18}),_("h4",IT,p(h(Zb)(e.preview.packageChanges.length)),1)]),e.preview.packageChanges.length>0?(c(),u("ul",CT,[(c(!0),u(q,null,be(r.value,v=>(c(),u("li",{key:v.name,"data-testid":"preview-package-change"},p(h(Ox)(v)),1))),128))])):(c(),u("p",xT,p(h(ul)),1)),a.value>0?(c(),u("button",{key:2,type:"button",class:"preview__more",onClick:f[0]||(f[0]=v=>s.value=!0)},p(h(Tn)(a.value)),1)):x("",!0)]))],8,lT))}}),AT=Le(RT,[["__scopeId","data-v-d5ea8ad6"]]),NT=["aria-labelledby","data-root-changes"],PT={class:"root-changes__header"},LT={class:"root-changes__title"},DT=["id"],MT={class:"root-changes__count muted","data-testid":"change-count"},FT=["aria-label"],BT=["aria-current"],KT={class:"root-changes__buttons"},HT=["aria-disabled"],UT=["aria-disabled"],VT={key:0,class:"root-changes__notice"},jT={key:1,class:"root-changes__undo"},WT=["aria-disabled"],GT={key:2,class:"root-changes__message root-changes__message--error",role:"alert"},qT={key:3,class:"root-changes__message root-changes__message--error",role:"alert"},XT={key:4,class:"root-changes__message muted"},YT={key:5,class:"root-changes__message muted","data-testid":"changes-empty"},zT=["aria-label"],JT=["data-roving-id","tabindex","onFocusin","onClick"],QT={class:"root-changes__badge-cell",role:"gridcell"},ZT={class:"root-changes__item",role:"gridcell"},eO={class:"root-changes__goal","data-testid":"change-goal"},tO={key:0,class:"root-changes__item-steps muted","data-testid":"change-steps"},nO={key:1,class:"root-changes__warnings"},oO={class:"root-changes__actions",role:"gridcell"},sO=["aria-label","tabindex","onClick"],iO=["aria-label","title","aria-disabled","tabindex","onClick"],rO="changes",aO=Ae({__name:"RootChangesSection",props:{root:{},revision:{},focusItem:{}},emits:["changed","edit","item-focused","hold"],setup(e,{emit:t}){const n=e,o=t,s=ls.length,i=Et(),r=wt(ao,null),a=tt(),l=Y(null),d=Y(null),f=Y(null),v=We(null),y=Y(null),m=We(null),w=We(null),b=We(new Map),T=Y(!1),X=Y(null),F=Y(!1),J=Y(null);let O,Q=0,ie,H;const j=k(()=>n.root.id),U=k(()=>{var K;return((K=v.value)==null?void 0:K.items)??[]}),M=k(()=>{var K;return(K=v.value)==null?void 0:K.preview}),R=k(()=>{var K;return(K=m.value)==null?void 0:K.job}),D=k(()=>{var K;return((K=m.value)==null?void 0:K.log)??[]}),V=k(()=>{var K;return((K=R.value)==null?void 0:K.state)==="running"}),_e=k(()=>T.value||V.value||w.value!==null),Ee=k(()=>{var K;return((K=v.value)==null?void 0:K.revertable)===!0}),Te=k(()=>{var K,we;return R.value===void 0?void 0:rk(R.value,((we=(K=v.value)==null?void 0:K.revert)==null?void 0:we.sharedRoots)??[])}),le=k(()=>n.root.manager==="unknown"?void 0:n.root.manager),me=k(()=>R.value===void 0?void 0:lk(R.value,le.value)),W=k(()=>{var we;const K=(we=v.value)==null?void 0:we.revert;return K===void 0?void 0:sk(K.files.length,K.itemCount)}),S=k(()=>v.value===null?null:{...v.value,job:R.value}),ne=k(()=>S.value===null?"changes":tx(S.value)),ae=k(()=>S.value===null?void 0:nx(S.value)),$e=k(()=>v.value===null?n.root.actions.changeCount:U.value.length),ee=k(()=>v.value!==null&&U.value.length===0&&!V.value&&Te.value===void 0&&!Ee.value),he=k(()=>T.value||J.value!==null||U.value.length>0||V.value),L=k(()=>{var we,je;const K=n.root.actions;return[K.changeCount,(we=K.job)==null?void 0:we.id,(je=K.job)==null?void 0:je.state,K.revertable].join(`
40
+ `)}),$=k(()=>((r==null?void 0:r.index.value.get(j.value))??[]).map(K=>`${K.id} ${K.choice}`).join(`
41
+ `));function C(K){return`${rO}:${j.value}:${K.id}`}const I=k(()=>U.value.map(K=>({id:C(K),expandable:!1,expanded:!1})));function Ie(K){return U.value.find(we=>C(we)===K)}function g(){}function E(K){const we=Ie(K);we!==void 0&&es(we)}const{activeId:A,tabIndexOf:oe,onKeydown:B,focusActive:Z}=Zo(I,{expand:g,collapse:g,activate:E});function ce(K){K.target===K.currentTarget&&B(K)}function fe(K){return K instanceof Error?K.message:String(K)}function de(){var K;U.value.length>0?Z():(K=l.value)==null||K.focus()}function se(){df(document)&&de()}async function Se(){await co(document,de)}function pe(K){const we=K==null?void 0:K.job;H===void 0||(we==null?void 0:we.id)!==H||we.state==="running"||(H=void 0,se())}function Ce(K){const{goal:we}=K;return we.kind==="fix"?{label:we.severity,tone:lo(we.severity)}:{label:Ub(ax(K)),tone:"info"}}function xe(K){const we=ne.value==="applied"?s:ls.findIndex(Ge=>Ge.step===ne.value),je=ls.indexOf(K);return je<we?"done":je===we?"current":"upcoming"}function De(K){K.every(we=>b.value.has(we.id))||(b.value=new Map([...b.value,...K.map(we=>[we.id,we.goal])]))}function He(K){w.value===null&&(m.value=K===void 0?null:{job:K,log:K.log},(K==null?void 0:K.state)==="running"&&ue(K.id))}async function Be(){const K=++Q;try{const we=await i.changes(j.value);if(K!==Q)return;v.value=we,y.value=null,De(we.items),He(we.job)}catch(we){if(K!==Q)return;y.value=fe(we)}}function te(){var K;(K=w.value)==null||K.controller.abort(),w.value=null}async function ue(K){var Ge;te();const we=new AbortController;w.value={jobId:K,controller:we};const je=(Lt,ts)=>{m.value={job:Lt,log:ts}};try{await pf(i,K,je,{signal:we.signal})}catch(Lt){we.signal.aborted||(X.value=bo("follow",fe(Lt)))}finally{((Ge=w.value)==null?void 0:Ge.controller)===we&&(w.value=null)}we.signal.aborted||(await Be(),o("changed"))}async function ke(K,we){T.value=!0,X.value=null;try{return await K(),!0}catch(je){return X.value=we(fe(je)),!1}finally{T.value=!1}}function Ue(K){return we=>bo(K,we)}async function Xe(){}function lt(K,we,je=Xe){return ke(async()=>{await K(),await Be(),await je(),await(r==null?void 0:r.reload(j.value)),o("changed")},we)}function nt(K,we){ke(async()=>{const{jobId:je}=await K();H=je,ue(je),o("changed")},Ue(we))}async function ct(K){if(T.value)return;await lt(()=>i.removeChange(j.value,K.id),je=>jb(K.goal,je))&&await Se()}function N(){window.clearTimeout(O),O=void 0}function re(){N(),J.value=null}async function P(){const K=f.value!==null&&f.value===document.activeElement;re(),K&&await Se()}async function z(K){var we;N(),J.value={count:K},O=window.setTimeout(()=>void P(),zC),En(Il(K)),await st(),(we=f.value)==null||we.focus()}async function ge(){if(T.value)return;const K=U.value.length;await lt(()=>i.clearChanges(j.value),Ue("clear"),()=>z(K))}async function Pe(){if(T.value)return;let K;await lt(async()=>{K=await i.restoreCleared(j.value)},Ue("undo"))&&(re(),K!==void 0&&En(Vb(K)),await Se())}function Ze(){nt(()=>i.preview(j.value),"preview")}function vt(){_e.value||(ae.value==="apply"?F.value=!0:ae.value!==void 0&&Ze())}async function Hn(){var K;F.value=!1,await st(),(K=d.value)==null||K.focus()}function yi(){Hn()}function bi(K){var je;const we=(je=M.value)==null?void 0:je.id;Hn(),we!==void 0&&nt(()=>i.apply(j.value,we,K),"apply")}function ki(){nt(()=>i.revert(j.value),"revert")}function uo(){var we;const K=(we=R.value)==null?void 0:we.id;K!==void 0&&ke(()=>i.cancelJob(K),Ue("cancel"))}async function wi(K){if(K.kind==="direct"){const je=await i.children(j.value,K.importer,1,[...tn]);return sx(je.rows,K.name)}return zl(await i.search(`${K.name}@${K.version}`),j.value,K.name,K.version)??zl(await i.search(K.name),j.value,K.name,K.version)}async function es(K){X.value=null;const we=ox(K);try{const je=we===void 0?void 0:await wi(we);if(je===void 0){X.value=bo("edit",Ld(K.goal.name,j.value));return}o("edit",{root:j.value,node:je},K.id)}catch(je){X.value=bo("edit",fe(je))}}async function $i(){const K=n.focusItem;if(K===void 0){ie=void 0;return}const we=U.value.find(je=>je.id===K);we===void 0||ie===K||(ie=K,A.value=C(we),await st(),Z(),o("item-focused"))}return Ne([()=>n.revision,L,$],()=>void Be(),{immediate:!0}),Ne([()=>n.focusItem,U],()=>void $i(),{flush:"post"}),Ne(he,K=>o("hold",K),{immediate:!0}),Ne(v,pe,{flush:"post"}),Ne(ae,(K,we)=>{K==="preview-again"&&we==="apply"&&En(cl)}),Ot(()=>{te(),N(),he.value&&o("hold",!1)}),(K,we)=>{var je;return c(),u("section",{ref_key:"sectionElement",ref:l,class:"root-changes","aria-labelledby":h(a),"data-root-changes":j.value,"data-testid":"root-changes",tabindex:"-1"},[_("header",PT,[_("div",LT,[_("h2",{id:h(a),class:"root-changes__root"},p(h(Re)(j.value)),9,DT),_("span",MT,p(h(ck)($e.value)),1)]),_("ol",{class:"root-changes__steps","aria-label":h(fg)},[(c(!0),u(q,null,be(h(ls),Ge=>(c(),u("li",{key:Ge.step,class:Me(["root-changes__step",`root-changes__step--${xe(Ge)}`]),"aria-current":xe(Ge)==="current"?"step":void 0},p(Ge.number)+" "+p(Ge.title),11,BT))),128))],8,FT),_("div",KT,[U.value.length>0?(c(),u("button",{key:0,type:"button",class:"button root-changes__button","aria-disabled":T.value?"true":void 0,onClick:ge},p(h(pg)),9,HT)):x("",!0),ae.value?(c(),u("button",{key:1,ref_key:"primaryButton",ref:d,type:"button",class:"button button--primary root-changes__button","aria-disabled":_e.value?"true":void 0,onClick:vt},p(h(jg)[ae.value]),9,UT)):x("",!0)])]),ye(Jx,{job:R.value,log:D.value,outcome:Te.value,hint:me.value,"revert-note":W.value,revertable:Ee.value,busy:_e.value,requesting:T.value,onCancel:uo,onRevert:ki},null,8,["job","log","outcome","hint","revert-note","revertable","busy","requesting"]),ae.value==="preview-again"?(c(),u("p",VT,p(h(cl)),1)):x("",!0),J.value?(c(),u("div",jT,[_("span",null,p(h(Il)(J.value.count)),1),_("button",{ref_key:"undoButton",ref:f,type:"button",class:"button root-changes__button","aria-disabled":T.value?"true":void 0,onClick:Pe},p(h(vg)),9,WT)])):x("",!0),X.value?(c(),u("p",GT,p(X.value),1)):x("",!0),y.value?(c(),u("p",qT,p(h(bo)("load",y.value)),1)):x("",!0),v.value===null&&y.value===null?(c(),u("p",XT,p(h(hg)),1)):ee.value?(c(),u("p",YT,p(h(nd)),1)):x("",!0),U.value.length>0?(c(),u("div",{key:6,class:"root-changes__grid",role:"grid","aria-label":h(Ad)(j.value)},[(c(!0),u(q,null,be(U.value,Ge=>(c(),u("div",{key:Ge.id,class:"root-changes__row",role:"row","data-testid":"change-item","data-roving-id":C(Ge),tabindex:h(oe)(C(Ge)),onKeydown:ce,onFocusin:Lt=>A.value=C(Ge),onClick:Lt=>A.value=C(Ge)},[_("div",QT,[_("span",{class:Me(["badge",`badge--${Ce(Ge).tone}`]),"data-testid":"change-badge"},p(Ce(Ge).label),3)]),_("div",ZT,[_("p",eO,p(h(Bb)(Ge.goal)),1),Ge.steps.length>0?(c(),u("p",tO,p(h(Hb)(Ge.steps)),1)):x("",!0),Ge.warnings.length>0?(c(),u("ul",nO,[(c(!0),u(q,null,be(Ge.warnings,Lt=>(c(),u("li",{key:Lt,class:"root-changes__warning","data-testid":"change-warning"},p(Lt),1))),128))])):x("",!0)]),_("div",oO,[_("button",{type:"button",class:"button root-changes__row-button","aria-label":h(Kb)(Ge.goal),tabindex:h(A)===C(Ge)?0:-1,onClick:it(Lt=>es(Ge),["stop"])},p(h(od)),9,sO),_("button",{type:"button",class:"root-changes__remove","aria-label":h(Sl)(Ge.goal),title:h(Sl)(Ge.goal),"aria-disabled":T.value?"true":void 0,tabindex:h(A)===C(Ge)?0:-1,onClick:it(Lt=>ct(Ge),["stop"])}," × ",8,iO)])],40,JT))),128))],8,zT)):x("",!0),M.value&&U.value.length>0?(c(),Ke(AT,{key:7,root:j.value,preview:M.value,goals:b.value},null,8,["root","preview","goals"])):x("",!0),F.value&&M.value?(c(),Ke(Sx,{key:8,preview:M.value,"root-name":h(Re)(j.value),"install-by-default":((je=v.value)==null?void 0:je.installByDefault)??!1,goals:b.value,onCancel:yi,onApply:bi},null,8,["preview","root-name","install-by-default","goals"])):x("",!0)],8,NT)}}}),lO=Le(aO,[["__scopeId","data-v-03bc530d"]]),cO=["aria-label"],uO={key:0,class:"changes__message muted"},dO={key:1,class:"changes__message muted","data-testid":"changes-empty"},fO="[data-root-changes]",hO=Ae({__name:"ChangesView",props:{scope:{},roots:{},scanLoaded:{type:Boolean},revisions:{},focus:{}},emits:["changed","edit","item-focused"],setup(e,{emit:t}){const n=e,o=t,s=Y(null),i=We(new Set),r=k(()=>new Set(ex(n.roots,n.scope))),a=k(()=>n.roots.filter(y=>n.scope!==void 0&&y.id!==n.scope?!1:r.value.has(y.id)||i.value.has(y.id))),l=k(()=>a.value.map(y=>y.id));function d(y,m){if(i.value.has(y)===m)return;const w=new Set(i.value);m?w.add(y):w.delete(y),i.value=w}function f(y){var m;return((m=n.focus)==null?void 0:m.root)===y?n.focus.itemId:void 0}function v(){const y=document.activeElement,m=y instanceof HTMLElement?y.closest(fO):null;return m==null?void 0:m.dataset.rootChanges}return Ne(l,(y,m)=>{const w=v();w===void 0||y.includes(w)||!m.includes(w)||co(document,()=>{var b;return(b=s.value)==null?void 0:b.focus()})}),(y,m)=>(c(),u("section",{ref_key:"container",ref:s,class:"changes","aria-label":h(ui).changes,tabindex:"-1"},[e.scanLoaded?a.value.length===0?(c(),u("p",dO,p(h(nd)),1)):x("",!0):(c(),u("p",uO,p(h(ci)),1)),(c(!0),u(q,null,be(a.value,w=>(c(),Ke(lO,{key:w.id,root:w,revision:e.revisions.get(w.id)??"","focus-item":f(w.id),onChanged:m[0]||(m[0]=b=>o("changed")),onEdit:m[1]||(m[1]=(b,T)=>o("edit",b,T)),onItemFocused:m[2]||(m[2]=b=>o("item-focused")),onHold:b=>d(w.id,b)},null,8,["root","revision","focus-item","onHold"]))),128))],8,cO))}}),pO=Le(hO,[["__scopeId","data-v-3c9c07c1"]]),vO=["package","whole-root"],_O={scope:"package",nodeLimit:300,wholeRootDown:6},mO=/^\d+$/;function gO(e,t){const n=e.trim();if(!mO.test(n))return;const o=Number(n);return o>=t?o:void 0}function yO(e,t){return e.scope==="whole-root"?e.wholeRootDown:t}function bO(e,t){return e.scope==="whole-root"?{graph:{wholeRootDown:t}}:{filters:{down:t}}}function kO(e,t){return t===void 0?"whole-root":e.scope}const wO=["aria-expanded","aria-controls"],$O=["aria-label"],EO={class:"explore-options__choice"},SO=["checked"],IO={key:0,class:"explore-options__graph"},CO={class:"explore-options__scope"},xO={class:"explore-options__legend"},TO=["checked","disabled","onChange"],OO={class:"explore-options__count"},RO=["value","disabled"],AO={class:"explore-options__count"},NO=["value"],PO={class:"explore-options__count"},LO=["value"],DO="input:not(:disabled)",MO=Ae({__name:"ExploreOptions",props:{mode:{},duplicatesOnly:{type:Boolean},up:{},down:{},graph:{},hasAnchor:{type:Boolean}},emits:["change","graph-change"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=`${s}-dialog`,r=`${s}-scope`,a=Y(!1),l=Y(null),d=Y(null),f=Y(null),v=k(()=>yO(n.graph,n.down)),y=k(()=>rm(n.duplicatesOnly)),m=k(()=>n.graph.scope==="whole-root");async function w(){var M,R;a.value=!0,await st(),(R=(M=f.value)==null?void 0:M.querySelector(DO))==null||R.focus()}function b(){var M;a.value=!1,(M=d.value)==null||M.focus()}function T(){a.value?b():w()}function X(M){a.value&&M.preventDefault()}function F(M){M.key!=="Escape"||!a.value||(M.preventDefault(),b())}function J(M){var D;const R=M.relatedTarget;R instanceof Node&&((D=l.value)!=null&&D.contains(R))||(a.value=!1)}function O(M,R,D){const V=M.target,_e=gO(V.value,R);return _e===void 0&&(V.value=String(D)),_e}function Q(M){o("change",{duplicatesOnly:M.target.checked})}function ie(M){M!==n.graph.scope&&o("graph-change",{scope:M})}function H(M){const R=O(M,0,n.up);R!==void 0&&R!==n.up&&o("change",{up:R})}function j(M){const R=O(M,0,v.value);if(R===void 0||R===v.value)return;const D=bO(n.graph,R);"filters"in D?o("change",D.filters):o("graph-change",D.graph)}function U(M){const R=O(M,1,n.graph.nodeLimit);R!==void 0&&R!==n.graph.nodeLimit&&o("graph-change",{nodeLimit:R})}return(M,R)=>(c(),u("div",{ref_key:"container",ref:l,class:"explore-options",onFocusout:J,onKeydown:F},[_("button",{ref_key:"button",ref:d,type:"button",class:"button explore-options__button","aria-haspopup":"dialog","aria-expanded":a.value,"aria-controls":a.value?i:void 0,onMousedown:X,onClick:T},[Ve(p(y.value),1),ye(et,{class:"explore-options__caret",name:"chevron-down"})],40,wO),a.value?(c(),u("div",{key:0,id:i,ref_key:"dialog",ref:f,role:"dialog",tabindex:"-1",class:"explore-options__popover","aria-label":h(ur)},[_("label",EO,[_("input",{type:"checkbox",checked:e.duplicatesOnly,onChange:Q},null,40,SO),_("span",null,p(h(qu)),1)]),e.mode==="graph"?(c(),u("div",IO,[_("fieldset",CO,[_("legend",xO,p(h(um)),1),(c(!0),u(q,null,be(h(vO),D=>(c(),u("label",{key:D,class:"explore-options__choice"},[_("input",{type:"radio",name:r,checked:e.graph.scope===D,disabled:D==="package"&&!e.hasAnchor,onChange:V=>ie(D)},null,40,TO),_("span",null,p(h(qg)[D]),1)]))),128))]),_("label",OO,[_("span",null,p(h(am)),1),_("input",{class:"explore-options__number",type:"number",min:"0",step:"1",value:e.up,disabled:m.value,onChange:H},null,40,RO)]),_("label",AO,[_("span",null,p(h(lm)),1),_("input",{class:"explore-options__number",type:"number",min:"0",step:"1",value:v.value,onChange:j},null,40,NO)]),_("label",PO,[_("span",null,p(h(cm)),1),_("input",{class:"explore-options__number",type:"number",min:"1",step:"1",value:e.graph.nodeLimit,onChange:U},null,40,LO)])])):x("",!0)],8,$O)):x("",!0)],544))}}),FO=Le(MO,[["__scopeId","data-v-f7089a1c"]]),Gn=24,BO=.5,Ql=1;function Zl(e,t){return t>0?e/t:1/0}function ec(e,t,n,o){const s=t*n;return s<=e-2*Gn?(e-s)/2:o===void 0?Gn:e/2-o*n}function KO(e,t,n){if(t.width<=0||t.height<=0)return{x:Gn,y:Gn,k:Ql};const o=Math.min(Zl(t.width-2*Gn,e.width),Zl(t.height-2*Gn,e.height)),s=Math.max(BO,Math.min(Ql,o));return{x:ec(t.width,e.width,s,n==null?void 0:n.x),y:ec(t.height,e.height,s,n==null?void 0:n.y),k:s}}const _f=220,HO=36,UO=4;function VO(e){const t=new Map;for(const n of e){const o=t.get(n.layer)??[];o.push(n.id),t.set(n.layer,o)}return[...t].sort(([n],[o])=>n-o).map(([,n])=>n)}function jO(e,t){const n=new Map,o=s=>{let i=n.get(s);return i||(i={previous:new Set,next:new Set},n.set(s,i)),i};for(const{from:s,to:i}of e){const r=t.get(s),a=t.get(i);r===void 0||a===void 0||(a===r+1?(o(s).next.add(i),o(i).previous.add(s)):a===r-1&&(o(s).previous.add(i),o(i).next.add(s)))}return n}function WO(e,t){if(!e||e.size===0)return;let n=0;for(const o of e)n+=t.get(o);return n/e.size}function tc(e,t,n){const o=new Array(e.length),s=[];e.forEach((a,l)=>{const d=WO(n(a),t);d===void 0?o[l]=a:s.push({id:a,barycenter:d})}),s.sort((a,l)=>a.barycenter-l.barycenter);let i=0;const r=e.map((a,l)=>o[l]??s[i++].id);return r.forEach((a,l)=>t.set(a,l)),r}function GO(e,t,n){const o=new Map;for(const s of e)s.forEach((i,r)=>o.set(i,r));for(let s=0;s<n;s++)if(s%2===0)for(let i=1;i<e.length;i++)e[i]=tc(e[i],o,r=>{var a;return(a=t.get(r))==null?void 0:a.previous});else for(let i=e.length-2;i>=0;i--)e[i]=tc(e[i],o,r=>{var a;return(a=t.get(r))==null?void 0:a.next});return o}function qO(e,t,n,o){const s=(e+n)/2;return`M${e},${t} C${s},${t} ${s},${o} ${n},${o}`}function XO(e,t={}){const n=t.layerGap??_f,o=t.rowGap??HO,s=t.sweeps??UO;if(e.nodes.length===0)return{positions:new Map,paths:[],width:0,height:0};const i=new Map;for(const b of e.nodes)i.has(b.id)||i.set(b.id,b);const r=[...i.values()],a=new Map(r.map(b=>[b.id,b.layer])),l=r.reduce((b,T)=>Math.min(b,T.layer),1/0),d=VO(r),f=GO(d,jO(e.edges,a),s),v=new Map;let y=0;for(const b of r){const T=(b.layer-l)*n;v.set(b.id,{x:T,y:f.get(b.id)*o}),y=Math.max(y,T+b.width)}const m=d.reduce((b,T)=>Math.max(b,T.length),0)*o,w=[];for(const{from:b,to:T}of e.edges){const X=v.get(b),F=v.get(T);!X||!F||w.push({from:b,to:T,d:qO(X.x+i.get(b).width,X.y,F.x,F.y)})}return{positions:v,paths:w,width:y,height:m}}const YO=" ",yr=7.85,ra=12,zO=6.8,JO=7,mf=4,QO=80,ZO=240,eR=60,nc="…",tR=new Map;function gf(e){return Math.ceil(e.length*zO+2*JO)}function br(e){return e.reduce((t,n)=>t+gf(n),0)+Math.max(0,e.length-1)*mf}function Ks(e,t=[],n=""){const o=Math.ceil(e.length*yr+2*ra),s=Math.min(ZO,Math.max(QO,o))+Math.ceil(n.length*yr);return Math.max(s,br(t))}function Hs(e,t,n=""){const o=Math.floor((t-2*ra)/yr);return e.length+n.length<=o?`${e}${n}`:`${e.slice(0,Math.max(0,o-n.length-nc.length))}${nc}${n}`}function nR(e){const t=e.reduce((n,o)=>Math.max(n,o),0);return Math.max(_f,t+eR)}function yf(e,t,n){const o={kind:e.isImporter?"importer":"package",key:e.id,id:e.id,name:e.name,version:e.version,isDirect:!1,layer:t};if(n===void 0||e.isImporter){const a=xn(e),l=Ks(a);return{...o,label:a,text:Hs(a,l),width:l}}const s=xn(e),i=`${YO}${Ed(n)}`,r=Ks(s,[],i);return{...o,label:Xr(e.name,e.version,n),text:Hs(s,r,i),width:r,variant:n}}function oR(e,t){const n=`${e.name}${e.suffix}`,o=Ks(n);return{kind:"cluster",key:e.id,clusterId:e.id,size:e.size,title:e.title,label:n,text:Hs(e.name,o,e.suffix),layer:t,width:o}}function sR(e,t){const n=Bk(e.hidden),o=Ks(n);return{kind:"stub",key:`stub:${e.side}:${e.at}`,at:e.at,side:e.side,hidden:e.hidden,label:n,text:Hs(n,o),layer:e.side==="up"?t-1:t+1,width:o}}function bf(e){const t=new Set,n=[];for(const{from:o,to:s}of e){const i=`${o}\0${s}`;o===s||t.has(i)||(t.add(i),n.push({from:o,to:s}))}return n}function kf(e,t){const n=new Set(e.filter(s=>s.kind==="importer").map(s=>s.key)),o=new Set(t.filter(s=>n.has(s.from)).map(s=>s.to));return e.map(s=>s.kind==="package"&&o.has(s.key)?{...s,isDirect:!0}:s)}function iR(e,t=tR){const n=new Map(e.nodes.map(i=>[i.node.id,i.layer])),o=e.nodes.map(i=>yf(i.node,i.layer,t.get(i.node.id))),s=bf(e.edges);for(const i of e.stubs){const r=n.get(i.at);if(r===void 0)continue;const a=sR(i,r);o.push(a),s.push(i.side==="up"?{from:a.key,to:i.at}:{from:i.at,to:a.key})}return{nodes:kf(o,s),edges:s}}const rR=.2,aR=3,lR=.002,cR=16,uR=400,dR=3;function fR(e){return Math.min(aR,Math.max(rR,e))}function hR(e){return e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*cR:e.deltaMode===WheelEvent.DOM_DELTA_PAGE?e.deltaY*uR:e.deltaY}function pR(e,t){let n={x:0,y:0,k:1},o=null;function s(f){n=f,t(f)}function i(f){f.preventDefault();const v=fR(n.k*Math.exp(-hR(f)*lR));if(v===n.k)return;const y=e.getBoundingClientRect(),m=f.clientX-y.left,w=f.clientY-y.top,b=v/n.k;s({x:m-(m-n.x)*b,y:w-(w-n.y)*b,k:v})}function r(f){f.button===0&&(o={pointerId:f.pointerId,startX:f.clientX,startY:f.clientY,lastX:f.clientX,lastY:f.clientY,panning:!1})}function a(f){if(!(!o||f.pointerId!==o.pointerId)){if(!o.panning){if(Math.hypot(f.clientX-o.startX,f.clientY-o.startY)<dR)return;o.panning=!0,e.setPointerCapture(f.pointerId)}s({x:n.x+f.clientX-o.lastX,y:n.y+f.clientY-o.lastY,k:n.k}),o.lastX=f.clientX,o.lastY=f.clientY}}function l(){o&&e.hasPointerCapture(o.pointerId)&&e.releasePointerCapture(o.pointerId),o=null}function d(f){o&&f.pointerId===o.pointerId&&l()}return e.addEventListener("wheel",i,{passive:!1}),e.addEventListener("pointerdown",r),e.addEventListener("pointermove",a),e.addEventListener("pointerup",d),e.addEventListener("pointercancel",d),()=>{e.removeEventListener("wheel",i),e.removeEventListener("pointerdown",r),e.removeEventListener("pointermove",a),e.removeEventListener("pointerup",d),e.removeEventListener("pointercancel",d),l()}}const vR=["aria-label"],_R=["transform"],mR=["transform"],gR=["d"],yR=["transform","data-testid","data-id","data-kind","aria-current","aria-label","aria-description","onClick","onKeydown"],bR=["x","y","width","height"],kR=["y","width"],wR=["width"],$R=["width","height"],ER=["x","y"],SR=["transform"],IR=["width"],CR=["x","y"],xR=["cx"],gn=26,oc=16,sc=-11,TR=6,OR=4,us=3,ds=4,ic=4,RR=Ae({__name:"GraphCanvas",props:{scene:{},anchor:{},selected:{},resetKey:{},duplicateVersions:{},duplicatesOnly:{type:Boolean},decorations:{}},emits:["select","expand-stub","expand-cluster"],setup(e,{emit:t}){const n=e,o=t,s=gn-sc+TR,i={x:0,y:0,k:1},r={package:"graph-node",importer:"graph-node",stub:"graph-stub",cluster:"graph-cluster"},a=Y(null),l=We({width:0,height:0}),d=We(i);let f,v;function y(S){return eo(n.decorations[S.id],{isDirect:S.isDirect,compact:!0,version:S.version})}function m(S){return U(S)?Math.max(S.width,br(y(S).map(ne=>ne.label))):S.width}const w=k(()=>new Map(n.scene.nodes.map(S=>[S.key,m(S)])));function b(S){return w.value.get(S.key)??S.width}const T=k(()=>XO({nodes:n.scene.nodes.map(S=>({id:S.key,layer:S.layer,width:b(S)})),edges:n.scene.edges},{layerGap:nR(n.scene.nodes.map(b)),rowGap:s})),X=k(()=>n.scene.nodes.flatMap(S=>{const ne=T.value.positions.get(S.key);return ne?[{node:S,x:ne.x,y:ne.y}]:[]}));function F(S,ne){let ae=ne-br(S.map($e=>$e.label));return S.map($e=>{const ee={badge:$e,x:ae,width:gf($e.label)};return ae+=ee.width+mf,ee})}function J(S){const{node:ne}=S;if(!U(ne))return{...S,width:ne.width,pills:[],stripeTone:void 0};const ae=n.decorations[ne.id],$e=b(ne);return{...S,width:$e,pills:F(y(ne),$e),stripeTone:ae!=null&&ae.vuln?mi(ae.vuln):void 0}}const O=k(()=>X.value.map(J)),Q=k(()=>new Set(n.scene.nodes.filter(S=>S.kind==="stub").map(S=>S.key))),ie=k(()=>{const S=X.value.find(({node:ne})=>U(ne)&&ne.id===n.anchor);return S?{x:S.x+b(S.node)/2,y:S.y+s/2}:void 0}),H=k(()=>{const S=KO({width:T.value.width,height:T.value.height},l.value,ie.value);return`translate(${S.x} ${S.y}) scale(${S.k}) translate(0 ${s/2})`}),j=k(()=>{const{x:S,y:ne,k:ae}=d.value;return`translate(${S} ${ne}) scale(${ae})`});function U(S){return S.kind==="package"||S.kind==="importer"}function M(S){return S.kind==="package"&&n.duplicateVersions.has(S.name)}function R(S){return U(S)&&S.id===n.anchor}function D(S){return{[`graph-node--${S.kind}`]:!0,"graph-node--anchor":R(S),"graph-node--selected":U(S)&&S.id===n.selected,"graph-node--dimmed":n.duplicatesOnly&&S.kind==="package"&&!M(S)}}function V(S){return S.kind==="stub"?Kk(S.side,S.label,$t(S.at)):S.kind==="cluster"?Kd(S.label):S.label}function _e(S){const ne=[];return M(S)&&ne.push(yk(n.duplicateVersions.get(S.name)??"")),R(S)&&ne.push(hm),ne.push(fm),ne}function Ee(S){return U(S)?bk(_e(S)):void 0}function Te(S){return S.kind==="stub"?Hk(S.side,S.label):S.kind==="cluster"?`${S.title}
42
+ ${pm}`:[S.kind==="importer"?pd(S.label):S.label,..._e(S)].join(`
43
+ `)}function le(S){U(S)?o("select",S.id):S.kind==="stub"?o("expand-stub",S):o("expand-cluster",S.clusterId)}function me(){f==null||f(),d.value=i,a.value&&(f=pR(a.value,S=>d.value=S))}function W(){var ne;const S=(ne=a.value)==null?void 0:ne.getBoundingClientRect();S&&(l.value={width:S.width,height:S.height})}return Ne(()=>n.resetKey,me),Gt(()=>{me(),W(),a.value&&typeof ResizeObserver<"u"&&(v=new ResizeObserver(W),v.observe(a.value))}),Ot(()=>{f==null||f(),v==null||v.disconnect()}),(S,ne)=>(c(),u("svg",{ref_key:"svg",ref:a,class:"graph-canvas","data-testid":"graph-canvas",role:"group","aria-label":h(Bg)},[_("g",{"data-testid":"graph-viewport",transform:j.value},[_("g",{transform:H.value},[(c(!0),u(q,null,be(T.value.paths,ae=>(c(),u("path",{key:`${ae.from}→${ae.to}`,class:Me(["graph-edge",{"graph-edge--stub":Q.value.has(ae.from)||Q.value.has(ae.to)}]),d:ae.d},null,10,gR))),128)),(c(!0),u(q,null,be(O.value,({node:ae,x:$e,y:ee,width:he,pills:L,stripeTone:$})=>(c(),u("g",{key:ae.key,class:Me(["graph-node",D(ae)]),transform:`translate(${$e} ${ee-gn/2})`,"data-testid":r[ae.kind],"data-id":U(ae)?ae.id:void 0,"data-kind":ae.kind,"aria-current":U(ae)&&ae.id===e.selected?"true":void 0,"aria-label":V(ae),"aria-description":Ee(ae),role:"button",tabindex:"0",onClick:C=>le(ae),onKeydown:[Ns(it(C=>le(ae),["prevent"]),["enter"]),Ns(it(C=>le(ae),["prevent"]),["space"])]},[_("title",null,p(Te(ae)),1),R(ae)?(c(),u("rect",{key:0,class:"graph-node__anchor-ring","data-testid":"graph-anchor-ring",x:-ds,y:-ds,width:he+2*ds,height:gn+2*ds,rx:"6"},null,8,bR)):x("",!0),ae.kind==="cluster"?(c(),u("rect",{key:1,class:"graph-node__stack",x:ic,y:-ic,width:ae.width,height:gn,rx:"4"},null,8,kR)):x("",!0),_("rect",{class:"graph-node__box",width:he,height:gn,rx:"4"},null,8,wR),ae.kind==="importer"?(c(),u("rect",{key:2,class:"graph-node__inner",x:us,y:us,width:he-2*us,height:gn-2*us,rx:"2"},null,8,$R)):x("",!0),_("text",{class:"graph-node__label",x:h(ra),y:gn/2,"dominant-baseline":"central"},p(ae.text),9,ER),$?(c(),u("rect",{key:3,class:Me(["graph-node__stripe",`graph-tone--${$}`]),"data-testid":"graph-stripe",width:OR,height:gn,rx:"2"},null,2)):x("",!0),(c(!0),u(q,null,be(L,C=>(c(),u("g",{key:C.badge.key,class:Me(["graph-pill",[`graph-tone--${C.badge.tone}`,{"graph-pill--outline":C.badge.outlined}]]),"data-testid":"graph-badge",transform:`translate(${C.x} ${sc})`},[_("title",null,p(C.badge.title),1),_("rect",{class:"graph-pill__box",width:C.width,height:oc,rx:"8"},null,8,IR),_("text",{class:"graph-pill__label",x:C.width/2,y:oc/2,"text-anchor":"middle","dominant-baseline":"central"},p(C.badge.label),9,CR)],10,SR))),128)),M(ae)?(c(),u("circle",{key:4,class:"graph-node__duplicate",cx:he,cy:"0",r:"4"},null,8,xR)):x("",!0)],42,yR))),128))],8,mR)],8,_R)],8,vR))}}),AR=Le(RR,[["__scopeId","data-v-de238534"]]);function rc(e){return e.map(t=>({id:t.node.id,name:t.node.name}))}function NR(e){return new Set(e.filter(t=>Hr(t.id)!=="").map(t=>t.name))}async function PR(e,t,n,o){try{const s=await o(t);return n.map(i=>[i.id,rf(s,t,e,i.id)])}catch{const s=Xo(n.map(i=>i.id));return n.map(i=>[i.id,s.get(i.id)])}}async function ac(e,t,n){const o=await Promise.all([...NR(t)].map(i=>PR(e,i,t.filter(r=>r.name===i),n))),s=new Map;for(const[i,r]of o.flat())r!==void 0&&s.set(i,r);return s}function LR(e){const t=new Map,n=new Map,o=new Map;for(const s of e){for(const i of s.nodes){const r=t.get(i.node.id);(!r||i.layer<r.layer)&&t.set(i.node.id,{node:(r==null?void 0:r.node)??i.node,layer:i.layer});const a=n.get(i.node.id)??[];a.includes(s.focus)||a.push(s.focus),n.set(i.node.id,a)}for(const i of s.edges)o.set(`${i.from}\0${i.to}\0${i.kind}`,i)}return{nodes:[...t.values()].sort((s,i)=>s.layer-i.layer),edges:[...o.values()],reachedBy:n,truncated:e.some(s=>s.truncated)}}function lc(e,t){if(e.nodes.length<=t)return e;const n=e.nodes.slice(0,t),o=new Set(n.map(s=>s.node.id));return{...e,nodes:n,edges:e.edges.filter(s=>o.has(s.from)&&o.has(s.to))}}function DR(e){const t=new Map(e.nodes.filter(o=>o.node.isImporter).map(o=>[o.node.id,xn(o.node)])),n=new Map;for(const{node:o}of e.nodes){if(o.isImporter)continue;const s=e.reachedBy.get(o.id)??[],i=`cluster:${s.join(",")}`;let r=n.get(i);r||(r={id:i,importerNames:s.map(a=>t.get(a)??a),memberIds:[]},n.set(i,r)),r.memberIds.push(o.id)}return[...n.values()].filter(o=>o.memberIds.length>1).map(o=>({...o,label:My(o.importerNames,o.memberIds.length),title:By(o.importerNames)}))}function MR(e,t,n,o=new Map){const s=new Map;for(const d of t)if(!n.has(d.id))for(const f of d.memberIds)s.set(f,d);const i=[],r=new Set;for(const{node:d,layer:f}of e.nodes){const v=s.get(d.id);if(!v)i.push(yf(d,f,o.get(d.id)));else if(!r.has(v.id)){r.add(v.id);const{name:y,suffix:m}=_d(v.importerNames,v.memberIds.length);i.push(oR({id:v.id,name:y,suffix:m,title:v.title,size:v.memberIds.length},f))}}const a=d=>{var f;return((f=s.get(d))==null?void 0:f.id)??d},l=bf(e.edges.map(d=>({from:a(d.from),to:a(d.to)})));return{nodes:kf(i,l),edges:l}}const FR={class:"graph"},BR={class:"graph__controls"},KR={key:0,class:"graph__status muted",role:"status"},HR={class:"graph__hint muted"},UR={key:0,class:"graph__notice",role:"status"},VR={key:1,class:"graph__notice graph__notice--error",role:"alert"},jR={key:2,class:"graph__notice",role:"status"},WR={key:3,class:"graph__notice graph__notice--warn",role:"status"},GR=["aria-label"],qR={class:"graph__clusters-title"},XR=["aria-pressed","title","onClick"],YR="importer:.",zR=Ae({__name:"GraphView",props:{root:{},revision:{},anchor:{},selected:{},kinds:{},duplicatesOnly:{type:Boolean},duplicateVersions:{},duplicatesError:{},decorations:{},up:{},down:{},options:{}},emits:["select","depth-change","root-busy"],setup(e,{emit:t}){const n=e,o=t,s={nodes:[],edges:[]},i=Et(),r=We(null),a=We(new Set),l=Y(null),d=Y(!1),f=Y(!1);let v=0;const y=new Map,m=k(()=>n.anchor??YR),w=k(()=>n.kinds.join(",")),b=k(()=>n.options.scope),T=k(()=>b.value==="package"?["package",n.root,n.revision,m.value,w.value,n.up,n.down,n.options.nodeLimit].join("\0"):["whole-root",n.root,n.revision,w.value,n.options.wholeRootDown,n.options.nodeLimit].join("\0")),X=k(()=>[n.root,b.value,b.value==="package"?m.value:""].join("\0")),F=k(()=>{const V=r.value;return(V==null?void 0:V.scope)==="whole-root"?lc(V.merged,V.limit):null}),J=k(()=>F.value?DR(F.value):[]),O=k(()=>{const V=r.value;return V?V.scope==="package"?iR(V.result,V.variants):F.value?MR(F.value,J.value,a.value,V.variants):s:s}),Q=k(()=>{const V=r.value;return V?V.scope==="whole-root"&&V.merged.nodes.length>V.limit?Uk(V.merged.nodes.length,V.limit):(V.scope==="package"?V.result.truncated:V.merged.truncated)?Vk(V.limit):null:null});function ie(V){return V instanceof Error?V.message:String(V)}function H(V){return _e=>{const Ee=`${V}\0${_e}`,Te=y.get(Ee);if(Te)return Te;const le=i.search(_e);return y.set(Ee,le),le.catch(()=>y.delete(Ee)),le}}async function j(V,_e,Ee,Te,le,me){const W=await i.subgraph(V,_e,Ee,Te,le,me),S=await ac(V,rc(W.nodes),H(V));return{scope:"package",result:W,limit:le,variants:S}}async function U(V,_e,Ee,Te){const le=await i.importers(V),me=await Promise.all(le.map(ae=>i.subgraph(V,ae.id,0,_e,Ee,Te))),W=LR(me),S=lc(W,Ee),ne=await ac(V,rc(S.nodes),H(V));return{scope:"whole-root",merged:W,limit:Ee,variants:ne}}async function M(){const V=++v,_e=n.root,Ee=b.value==="package"?$t(m.value):Re(_e),Te=b.value==="package"?vi($t(m.value),_e):void 0,{nodeLimit:le,wholeRootDown:me}=n.options,W=b.value==="package"?j(n.root,m.value,n.up,n.down,le,n.kinds):U(n.root,me,le,n.kinds);l.value=null,d.value=!1,f.value=!0;try{const S=await W;if(V!==v)return;r.value=S}catch(S){if(V!==v)return;if(r.value=null,Qo(S)){d.value=!0,o("root-busy");return}l.value=Te!==void 0&&Uo(S)?Te:jk(Ee,ie(S))}finally{V===v&&(f.value=!1)}}function R(V){o("depth-change",V.side==="up"?{up:n.up+1}:{down:n.down+1})}function D(V){const _e=new Set(a.value);_e.delete(V)||_e.add(V),a.value=_e}return Ne(T,()=>void M(),{immediate:!0}),Ne([()=>n.root,()=>n.revision],()=>{y.clear(),a.value=new Set,r.value=null}),(V,_e)=>(c(),u("div",FR,[_("div",BR,[f.value?(c(),u("span",KR,p(h(Bo)),1)):x("",!0),_("span",HR,p(h(dm)),1)]),d.value?(c(),u("p",UR,p(h(_i)(e.root)),1)):x("",!0),l.value?(c(),u("p",VR,p(l.value),1)):x("",!0),e.duplicatesError?(c(),u("p",jR,p(e.duplicatesError),1)):x("",!0),Q.value?(c(),u("p",WR,p(Q.value),1)):x("",!0),J.value.length>0?(c(),u("div",{key:4,class:"graph__clusters",role:"group","aria-label":h(al)},[_("span",qR,p(h(al)),1),(c(!0),u(q,null,be(J.value,Ee=>(c(),u("button",{key:Ee.id,type:"button",class:"graph__cluster","aria-pressed":a.value.has(Ee.id),title:Ee.title,onClick:Te=>D(Ee.id)},p(Ee.label),9,XR))),128))],8,GR)):x("",!0),ye(AR,{scene:O.value,anchor:e.anchor,selected:e.selected,"reset-key":X.value,"duplicate-versions":e.duplicateVersions,"duplicates-only":e.duplicatesOnly,decorations:e.decorations,onSelect:_e[0]||(_e[0]=Ee=>o("select",Ee)),onExpandStub:R,onExpandCluster:D},null,8,["scene","anchor","selected","reset-key","duplicate-versions","duplicates-only","decorations"])]))}}),JR=Le(zR,[["__scopeId","data-v-81fee149"]]),QR=".";function ZR(e){if(!e.isImporter)return;const t=e.id.slice(Zn.length);return t===QR||t===e.name?void 0:t}function ji(e,t,n,o=!1){return{id:e.id,label:xn(e),name:e.name,version:e.version,path:ZR(e),isImporter:e.isImporter,isAnchor:e.id===t,isDirect:o,variant:n.get(e.id)}}function eA(e){return e.isImporter?pd(e.label):e.variant===void 0?e.label:`${e.label} ${e.variant.suffix}`}function tA(e,t){const n=e.focus.id,o=new Map(e.nodes.map(y=>[y.node.id,y.node])),s=Xo([...o.keys(),e.focus.id,...t.rows.map(y=>y.node.id)]),i=(y,m=!1)=>y.flatMap(w=>{const b=o.get(w);return b?[ji(b,n,s,m)]:[]}),r=e.summary.importers,a=e.summary.via.map(y=>y.direct).filter(y=>y!==n),l=new Set([n,...r,...a]),d=new Map;for(const y of e.nodes){if(l.has(y.node.id)||y.node.isImporter)continue;const m=d.get(y.depth)??[];m.push(y.node.id),d.set(y.depth,m)}const f=[...d].sort(([y],[m])=>m-y).map(([y,m])=>({key:`via-${y}`,title:yo.via,chips:i(m.sort())}));return[{key:"importers",title:yo.importers,chips:i(r)},{key:"direct",title:yo.direct,chips:i(a,!0)},...f,{key:"anchor",title:yo.anchor,chips:[ji(e.focus,n,s)]},{key:"children",title:yo.children,chips:t.rows.map(y=>ji(y.node,n,s))}].filter(y=>y.chips.length>0)}function cc(e,t){const n=new Set([e]),o=[e];for(let s=0;s<o.length;s++)for(const i of t.get(o[s])??[])n.has(i)||(n.add(i),o.push(i));return n}function uc(e,t){const n=e.focus.id,o=new Map([[n,e.focusParents.map(a=>a.id)]]);for(const a of e.nodes)o.set(a.node.id,a.parents.map(l=>l.id));const s=new Map;for(const[a,l]of o)for(const d of l){if(!o.has(d))continue;const f=s.get(d);f?f.push(a):s.set(d,[a])}const i=o.has(t)?t:n,r=cc(i,o);for(const a of cc(i,s))r.add(a);return r.add(t),r}function nA(e,t,n){const o=e.chips.findIndex(s=>n.has(s.id));return o===-1?Math.min(t.chip,e.chips.length-1):o}function oA(e,t,n,o){const s=e[t.column];if(!s)return;const i=s.chips.length-1,r=l=>l===t.chip||l<0||l>i?void 0:{column:t.column,chip:l},a=l=>{const d=e[t.column+l];return d&&d.chips.length>0?{column:t.column+l,chip:nA(d,t,o)}:void 0};switch(n){case"ArrowDown":return r(t.chip+1);case"ArrowUp":return r(t.chip-1);case"Home":return r(0);case"End":return r(i);case"ArrowRight":return a(1);case"ArrowLeft":return a(-1);default:return}}const sA={class:"trail"},iA={key:0,class:"trail__notice",role:"status"},rA={key:1,class:"trail__notice trail__notice--error",role:"alert"},aA={key:2,class:"trail__notice",role:"status"},lA={key:3,class:"trail__notice",role:"status"},cA={class:"trail__columns"},uA=["id"],dA=["aria-labelledby"],fA=["id","aria-selected","tabindex","title","onClick","onKeydown","onFocus","onBlur","onMouseenter","onMouseleave"],hA={key:1,class:"mono"},pA={key:2,class:"trail__path muted"},vA={key:3,class:"trail__path muted"},_A=["title"],mA=Ae({__name:"TrailView",props:{root:{},revision:{},anchor:{},selected:{},kinds:{},duplicatesOnly:{type:Boolean},duplicateVersions:{},duplicatesError:{},decorations:{}},emits:["select","root-busy"],setup(e,{emit:t}){const n=e,o=t,s=new Set(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Home","End"]),i=new Set(["Enter"," "]),r=new Set,a=Et(),l=tt(),d=Y(null),f=Y(null),v=Y(!1),y=Y(),m=Y(),w=Y();let b=0;const T=k(()=>n.kinds.join(",")),X=k(()=>{const W=d.value;return!W||W.root!==n.root||W.revision!==n.revision||W.anchor!==n.anchor||W.kindsKey!==T.value?null:W}),F=k(()=>{var W;return(((W=X.value)==null?void 0:W.columns)??[]).map(S=>S.key==="children"&&n.duplicatesOnly?{...S,chips:S.chips.filter(ne=>!ne.isImporter&&n.duplicateVersions.has(ne.name))}:S)}),J=k(()=>n.selected===void 0?vm:Ly($t(n.selected))),O=k(()=>new Set(F.value.flatMap(W=>W.chips.map(S=>j(W,S))))),Q=k(()=>new Set(F.value.flatMap(W=>W.chips.map(S=>S.id)))),ie=k(()=>{if(y.value!==void 0&&O.value.has(y.value))return y.value;const W=F.value.flatMap(ne=>ne.chips.map(ae=>({column:ne,chip:ae}))),S=W.find(({chip:ne})=>ne.id===n.selected)??W.find(({chip:ne})=>ne.isAnchor)??W[0];return S?j(S.column,S.chip):void 0}),H=k(()=>{const W=X.value,S=m.value??w.value;return!W||S===void 0||!Q.value.has(S)?r:uc(W.upward,S)});function j(W,S){return`${W.key}\0${S.id}`}function U(W){return`${l}-column-${W}`}function M(W){return`${l}-chip-${W.column}-${W.chip}`}function R(W,S){y.value=j(W,S),o("select",S.id)}function D(W,S){y.value=j(W,S),w.value=S.id}function V(W){w.value===W.id&&(w.value=void 0)}function _e(W){m.value===W.id&&(m.value=void 0)}function Ee(W,S){var L;if(W.metaKey||W.ctrlKey||W.altKey)return;const ne=F.value[S.column],ae=ne==null?void 0:ne.chips[S.chip];if(!ne||!ae)return;if(i.has(W.key)){W.preventDefault(),R(ne,ae);return}if(!s.has(W.key))return;W.preventDefault();const $e=X.value,ee=$e?uc($e.upward,ae.id):r,he=oA(F.value,S,W.key,ee);he&&((L=document.getElementById(M(he)))==null||L.focus())}function Te(W){return eo(n.decorations[W.id],{isDirect:W.isDirect,compact:!0,version:W.version})}function le(W){return W instanceof Error?W.message:String(W)}async function me(){const W=++b,{root:S,revision:ne,anchor:ae}=n;if(f.value=null,v.value=!1,ae!==void 0)try{const[$e,ee]=await Promise.all([a.dependents(S,ae,50,n.kinds),a.children(S,ae,1,n.kinds)]);if(W!==b)return;d.value={root:S,revision:ne,anchor:ae,kindsKey:T.value,upward:$e,columns:tA($e,ee)}}catch($e){if(W!==b)return;if(Qo($e)){v.value=!0,o("root-busy");return}f.value=Uo($e)?vi($t(ae),S):Wk($t(ae),le($e))}}return Ne([()=>n.root,()=>n.revision,()=>n.anchor,T],()=>void me(),{immediate:!0}),(W,S)=>(c(),u("div",sA,[v.value?(c(),u("p",iA,p(h(_i)(e.root)),1)):x("",!0),f.value?(c(),u("p",rA,p(f.value),1)):x("",!0),e.duplicatesError?(c(),u("p",aA,p(e.duplicatesError),1)):x("",!0),e.anchor===void 0?(c(),u("p",lA,p(J.value),1)):x("",!0),_("div",cA,[(c(!0),u(q,null,be(F.value,(ne,ae)=>(c(),u("div",{key:ne.key,class:"trail__column","data-testid":"trail-column"},[_("h3",{id:U(ae),class:"panel-heading trail__title"},p(ne.title),9,uA),_("div",{class:"trail__chips",role:"listbox","aria-labelledby":U(ae)},[(c(!0),u(q,null,be(ne.chips,($e,ee)=>(c(),u("div",{id:M({column:ae,chip:ee}),key:$e.id,role:"option",class:Me(["trail__chip",{"trail__chip--anchor":$e.isAnchor,"trail__chip--selected":$e.id===e.selected,"trail__chip--on-path":H.value.has($e.id)}]),"data-testid":"trail-chip","aria-selected":$e.id===e.selected?"true":"false",tabindex:j(ne,$e)===ie.value?0:-1,title:h(eA)($e),onClick:he=>R(ne,$e),onKeydown:he=>Ee(he,{column:ae,chip:ee}),onFocus:he=>D(ne,$e),onBlur:he=>V($e),onMouseenter:he=>m.value=$e.id,onMouseleave:he=>_e($e)},[$e.isImporter?(c(),Ke(gi,{key:0,name:$e.label},null,8,["name"])):(c(),u("span",hA,p($e.label),1)),$e.path?(c(),u("span",pA,p($e.path),1)):x("",!0),$e.variant?(c(),u("span",vA,p(h(Mn)($e.variant)),1)):x("",!0),!$e.isImporter&&e.duplicateVersions.has($e.name)?(c(),u("span",{key:4,class:"badge badge--warn",title:e.duplicateVersions.get($e.name)},p(h(sd)),9,_A)):x("",!0),ye(Fn,{badges:Te($e)},null,8,["badges"])],42,fA))),128))],8,dA)]))),128))])]))}}),gA=Le(mA,[["__scopeId","data-v-3196be0b"]]),Nn=28,yA=10,bA="importer:.",kA="/",wA=new Map;function wf(e,t,n,o=wA){const s=[],i=new Set;function r(a,l,d){const f=a.node.id,v=l.depth>0?o.get(f):void 0;if(v!==void 0){s.push({...l,node:a.node,kind:a.kind,range:a.range,hasChildren:!1,expanded:!1,loading:!1,shownAbove:!1,listed:v<=d?"above":"below"});return}const y=a.repeated||i.has(f),m=!y&&t.has(f),w=e.get(f);if(s.push({...l,node:a.node,kind:a.kind,range:a.range,hasChildren:a.hasChildren&&!y,expanded:m,loading:m&&w===void 0,shownAbove:y,listed:void 0}),!m)return;i.add(f);const b=(w??[]).map((T,X)=>({child:T,index:X})).filter(({child:T})=>!SA(T,n,t,i,o));b.forEach(({child:T,index:X},F)=>r(T,{key:`${l.key}${kA}${X}:${T.node.id}`,parentKey:l.key,depth:l.depth+1,position:F+1,setSize:b.length,parentIsImporter:a.node.isImporter},d))}return{rows:s,visit:r}}function $A(e,t,n,o){const s=wf(t,n,o);return s.visit({node:e,hasChildren:!0,repeated:!1},{key:e.id,parentKey:void 0,depth:0,position:1,setSize:1,parentIsImporter:!1},0),s.rows}function EA(e){return{id:e.id,name:e.name,version:"",isImporter:!0,isPlaceholder:!1}}function dc(e,t,n,o=null){const s=e.filter(a=>a.id!==bA||a.dependencyCount>0),i=new Map(s.map((a,l)=>[a.id,l])),r=wf(t,n,o,i);return s.forEach((a,l)=>r.visit({node:EA(a),hasChildren:a.dependencyCount>0,repeated:!1},{key:a.id,parentKey:void 0,depth:0,position:l+1,setSize:s.length,parentIsImporter:!1},l)),r.rows}function fc(e,t){if(!(e===void 0||e===""||e===t))return vd(e)}function SA(e,t,n,o,s){return t===null?!1:s.has(e.node.id)?!0:t.has(e.node.name)?!1:!(n.has(e.node.id)&&!o.has(e.node.id)&&!e.repeated)}function IA(e,t,n,o=yA){const s=Math.floor(e/Nn),i=Math.ceil((e+t)/Nn);return{start:Math.max(0,s-o),end:Math.min(n,i+o)}}const CA={class:"tree"},xA={key:0,class:"tree__notice",role:"status"},TA={key:1,class:"tree__notice tree__notice--error",role:"alert"},OA={key:2,class:"tree__notice",role:"status"},RA={key:3,class:"tree__notice",role:"status"},AA=["aria-label"],NA=["data-roving-id","tabindex","aria-selected","aria-level","aria-posinset","aria-setsize","aria-expanded","aria-labelledby","onClick","onFocus"],PA=["aria-label","onClick"],LA={key:1,class:"tree__toggle tree__toggle--empty","aria-hidden":"true"},DA=["id"],MA={class:"tree__name mono"},FA={key:0,class:"badge"},BA={key:1,class:"tree__range muted mono"},KA=["title"],HA={key:3,class:"tree__shown-above muted"},UA={key:4,class:"tree__shown-above muted","data-testid":"tree-listed"},VA=["title"],jA=600,WA=16,GA=6,qA="overview\0",XA=Ae({__name:"TreeView",props:{root:{},revision:{},anchor:{},selected:{},importers:{},kinds:{},duplicatesOnly:{type:Boolean},duplicateVersions:{},duplicatesError:{},decorations:{}},emits:["select","root-busy"],setup(e,{emit:t}){const n=e,o=t,s=new Map,i=new Set,r=Et(),a=tt(),l=Y(null),d=Y(0),f=Y(jA),v=We(null),y=We(new Map),m=We(new Set),w=Y(null),b=Y(!1),T=We(new Map),X=new Map;let F=0,J,O;const Q=k(()=>n.kinds.join(",")),ie=k(()=>n.duplicatesOnly?new Set(n.duplicateVersions.keys()):null),H=k(()=>dc(n.importers??[],s,i).map(te=>te.node.id)),j=k(()=>n.anchor??`${qA}${H.value.join(`
44
+ `)}`),U=k(()=>n.anchor===void 0?dc(n.importers??[],y.value,m.value,ie.value):v.value===null?[]:$A(v.value,y.value,m.value,ie.value)),M=k(()=>new Map(U.value.map((te,ue)=>[ne(te.key),{row:te,index:ue}]))),R=k(()=>U.value.map(te=>({id:ne(te.key),parentId:te.parentKey===void 0?void 0:ne(te.parentKey),expandable:te.hasChildren,expanded:te.expanded}))),{activeId:D,tabIndexOf:V,onKeydown:_e,focusActive:Ee}=Zo(R,{expand:ee,collapse:he,activate:L}),Te=k(()=>{var te;return D.value===void 0?-1:((te=M.value.get(D.value))==null?void 0:te.index)??-1}),le=k(()=>IA(d.value,f.value,U.value.length)),me=k(()=>{const{start:te,end:ue}=le.value,ke=U.value.slice(te,ue).map((Xe,lt)=>({row:Xe,index:te+lt})),Ue=Te.value;return Ue>=0&&(Ue<te||Ue>=ue)&&ke.push({row:U.value[Ue],index:Ue}),ke}),W=k(()=>`${U.value.length*Nn}px`),S=k(()=>n.anchor!==void 0&&n.duplicatesOnly&&U.value.length===1&&v.value!==null);function ne(te){return`${a}:${te}`}function ae(te){return`${a}-label-${te}`}function $e(te){var ue;return(ue=M.value.get(te))==null?void 0:ue.row}function ee(te){const ue=$e(te);ue!=null&&ue.hasChildren&&!ue.expanded&&pe(ue.node.id)}function he(te){const ue=$e(te);ue!=null&&ue.expanded&&pe(ue.node.id)}function L(te){const ue=$e(te);ue&&o("select",ue.node.id)}function $(te){D.value=ne(te.key),o("select",te.node.id)}async function C(te){D.value=ne(te.key);const ue=pe(te.node.id);await st(),Ee(),await ue}function I(te){const ue=l.value;if(!ue)return;const ke=te*Nn;ke<ue.scrollTop?ue.scrollTop=ke:ke+Nn>ue.scrollTop+ue.clientHeight&&(ue.scrollTop=ke+Nn-ue.clientHeight),d.value=ue.scrollTop}async function Ie(){Te.value<0||(I(Te.value),await st(),Ee())}function g(te){if(te.target!==te.currentTarget)return;const ue=D.value;_e(te),D.value!==ue&&Ie()}function E(te){return te instanceof Error?te.message:String(te)}function A(te,ue){y.value=new Map(y.value).set(te,ue)}function oe(te,ue){const ke=new Map(T.value);ue===void 0?ke.delete(te):ke.set(te,ue),T.value=ke}function B(te,ue){return Uo(ue)?{reason:vi($t(te),n.root),isMissing:!0}:{reason:E(ue),isMissing:!1}}function Z(te){const ue=T.value.get(te);return(ue==null?void 0:ue.isMissing)===!0?ue.reason:Gk($t(te),ue==null?void 0:ue.reason)}function ce(){b.value||(b.value=!0,o("root-busy"))}function fe(te){const ue=X.get(te);if(ue)return ue;const ke=F;oe(te,void 0);const Ue=(async()=>{try{const Xe=await r.children(n.root,te,1,n.kinds);return ke!==F?void 0:(A(te,Xe.rows),Xe)}catch(Xe){if(ke!==F)return;Qo(Xe)?ce():oe(te,B(te,Xe));return}finally{ke===F&&X.delete(te)}})();return X.set(te,Ue),Ue}function de(){return[n.root,j.value,Q.value].join(`
45
+ `)}function se(){const te=de(),ue=te===J;return J=te,ue?m.value:void 0}async function Se(){const te=se();F+=1,w.value=null,b.value=!1,v.value=null,X.clear(),T.value=new Map,y.value=new Map,d.value=0,l.value&&(l.value.scrollTop=0);const ue=n.anchor;if(ue===void 0){const Xe=te??(H.value.length===1?H.value:[]);m.value=new Set(Xe);for(const lt of Xe)fe(lt);return}m.value=new Set([ue,...te??[]]);const ke=F,Ue=await fe(ue);if(ke===F){if(!Ue){b.value||(w.value=Z(ue));return}v.value=Ue.node;for(const Xe of m.value)Xe!==ue&&fe(Xe)}}async function pe(te){const ue=new Set(m.value);if(ue.delete(te)){m.value=ue;return}ue.add(te),m.value=ue,y.value.has(te)||await fe(te)}function Ce(){var te;d.value=((te=l.value)==null?void 0:te.scrollTop)??0}function xe(){var ue;const te=((ue=l.value)==null?void 0:ue.clientHeight)??0;te>0&&(f.value=te)}function De(te){return n.duplicateVersions.get(te)}function He(te){return eo(n.decorations[te.node.id],{isDirect:te.parentIsImporter,compact:!1,version:te.node.version})}function Be(te){return`${GA+te*WA}px`}return Ne([()=>n.root,()=>n.revision,j,Q],()=>void Se(),{immediate:!0}),Gt(()=>{xe(),l.value&&typeof ResizeObserver<"u"&&(O=new ResizeObserver(xe),O.observe(l.value))}),Ot(()=>O==null?void 0:O.disconnect()),(te,ue)=>(c(),u("div",CA,[b.value?(c(),u("p",xA,p(h(_i)(e.root)),1)):x("",!0),w.value?(c(),u("p",TA,p(w.value),1)):x("",!0),e.duplicatesError?(c(),u("p",OA,p(e.duplicatesError),1)):x("",!0),S.value?(c(),u("p",RA,p(h(Fg)),1)):x("",!0),_("div",{ref_key:"scroller",ref:l,class:"tree__scroller","data-testid":"tree-scroller",onScrollPassive:Ce},[_("div",{class:"tree__spacer",role:"tree","aria-label":h(rd).tree,style:Yn({height:W.value})},[(c(!0),u(q,null,be(me.value,({row:ke,index:Ue})=>{var Xe;return c(),u("div",{key:ke.key,class:Me(["tree__row",{"tree__row--selected":ke.node.id===e.selected}]),"data-testid":"tree-row",role:"treeitem","data-roving-id":ne(ke.key),tabindex:h(V)(ne(ke.key)),"aria-selected":ke.node.id===e.selected,"aria-level":ke.depth+1,"aria-posinset":ke.position,"aria-setsize":ke.setSize,"aria-expanded":ke.hasChildren?ke.expanded:void 0,"aria-labelledby":ae(Ue),style:Yn({top:`${Ue*h(Nn)}px`,paddingLeft:Be(ke.depth)}),onClick:lt=>$(ke),onKeydown:g,onFocus:lt=>D.value=ne(ke.key)},[ke.hasChildren?(c(),u("button",{key:0,type:"button",tabindex:"-1",class:"tree__toggle","aria-label":ke.expanded?h(Fk)(ke.node.name):h(Kd)(ke.node.name),onClick:it(lt=>C(ke),["stop"])},[ke.loading&&!T.value.has(ke.node.id)?(c(),u(q,{key:0},[Ve("…")],64)):(c(),Ke(et,{key:1,name:ke.expanded?"chevron-down":"chevron-right",size:20},null,8,["name"]))],8,PA)):(c(),u("span",LA)),_("span",{id:ae(Ue),class:"tree__label"},[_("span",MA,[ke.node.isImporter?(c(),Ke(gi,{key:0,name:h(xn)(ke.node)},null,8,["name"])):(c(),u(q,{key:1},[Ve(p(h(xn)(ke.node)),1)],64))]),ke.kind&&ke.kind!=="prod"?(c(),u("span",FA,p(ke.kind),1)):x("",!0),h(fc)(ke.range,ke.node.version)?(c(),u("span",BA,p(h(fc)(ke.range,ke.node.version)),1)):x("",!0),!ke.node.isImporter&&De(ke.node.name)?(c(),u("span",{key:2,class:"badge badge--warn",title:De(ke.node.name)},p(h(sd)),9,KA)):x("",!0),ye(Fn,{badges:He(ke)},null,8,["badges"]),ke.shownAbove?(c(),u("span",HA,p(h(Dg)),1)):x("",!0),ke.listed?(c(),u("span",UA,p(h(Xg)[ke.listed]),1)):x("",!0),T.value.has(ke.node.id)?(c(),u("span",{key:5,class:"tree__failed",title:(Xe=T.value.get(ke.node.id))==null?void 0:Xe.reason},p(h(Mg)),9,VA)):x("",!0)],8,DA)],46,NA)}),128))],12,AA)],544)]))}}),YA=Le(XA,[["__scopeId","data-v-f45e1e03"]]),zA={class:"explore"},JA={class:"explore__toolbar"},QA=["aria-label"],ZA=["id","aria-checked","tabindex","onClick"],eN={key:1,class:"explore__actions"},tN={class:"explore__body"},nN={key:0,class:"explore__placeholder"},oN={class:"explore__placeholder-title"},sN={class:"muted"},iN=["aria-label"],rN=["onClick"],aN={key:1,class:"explore__placeholder","data-testid":"view-blocker",role:"status"},lN={class:"muted"},cN=Ae({__name:"ExploreView",props:{mode:{},root:{},roots:{},rootSummary:{},scanLoaded:{type:Boolean},revision:{},anchor:{},selected:{},kinds:{},duplicatesOnly:{type:Boolean},duplicateVersions:{},duplicatesError:{},decorations:{},up:{},down:{}},emits:["mode-change","select","focus-on","filters-change","choose-root","root-busy"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=["trail","tree","graph"],r=new Set(["ArrowRight","ArrowDown"]),a=new Set(["ArrowLeft","ArrowUp"]),l=tt(),d=Y(null),f=Y({..._O}),v=k(()=>({...f.value,scope:kO(f.value,o.anchor)})),y=k(()=>o.root===void 0?null:mw(o.root,o.rootSummary,o.scanLoaded)),m=k(()=>{if(o.root===void 0)return;const ie=o.anchor===void 0?void 0:$t(o.anchor);return Ky(o.mode,ie,Re(o.root),v.value.scope)}),w=k(()=>{if(!(o.root===void 0||o.selected===void 0||o.selected===o.anchor))return Py($t(o.selected))});async function b(){s("focus-on"),await co(document,T)}function T(){var ie;(ie=d.value)==null||ie.focus()}t({focusTitle:T});function X(ie){f.value={...f.value,...ie}}function F(ie){return`${l}-mode-${ie}`}async function J(ie){var U;const H=(i.indexOf(o.mode)+ie+i.length)%i.length,j=i[H];s("mode-change",j),await st(),(U=document.getElementById(F(j)))==null||U.focus()}function O(ie){if(ie.metaKey||ie.ctrlKey||ie.altKey)return;const H=r.has(ie.key)?1:a.has(ie.key)?-1:0;H!==0&&(ie.preventDefault(),J(H))}function Q(ie){o.root!==void 0&&s("select",{root:o.root,node:ie})}return(ie,H)=>{var j;return c(),u("section",zA,[_("div",JA,[_("div",{class:"explore__modes",role:"radiogroup","aria-label":h(em)},[(c(),u(q,null,be(i,U=>_("button",{id:F(U),key:U,type:"button",role:"radio",class:Me(["explore__mode",{"explore__mode--checked":U===e.mode}]),"aria-checked":U===e.mode,tabindex:U===e.mode?0:-1,onClick:M=>s("mode-change",U),onKeydown:O},p(h(rd)[U]),43,ZA)),64))],8,QA),m.value?(c(),u("h2",{key:0,ref_key:"titleHeading",ref:d,class:"explore__title",tabindex:"-1"},p(m.value),513)):x("",!0),e.root!==void 0?(c(),u("div",eN,[w.value?(c(),u("button",{key:0,type:"button",class:"button explore__focus-on",onClick:b},p(w.value),1)):x("",!0),ye(FO,{mode:e.mode,"duplicates-only":e.duplicatesOnly,up:e.up,down:e.down,graph:v.value,"has-anchor":e.anchor!==void 0,onChange:H[0]||(H[0]=U=>s("filters-change",U)),onGraphChange:X},null,8,["mode","duplicates-only","up","down","graph","has-anchor"])])):x("",!0)]),_("div",tN,[e.root===void 0?(c(),u("div",nN,[_("p",oN,p(h(nm)),1),_("p",sN,p(h(om)),1),e.roots.length>0?(c(),u("div",{key:0,class:"explore__root-choices",role:"group","aria-label":h(sm)},[(c(!0),u(q,null,be(e.roots,U=>(c(),u("button",{key:U,type:"button",class:"button explore__root-choice",onClick:M=>s("choose-root",U)},p(h(Re)(U)),9,rN))),128))],8,iN)):x("",!0)])):y.value?(c(),u("div",aN,[_("p",lN,p(y.value),1)])):e.mode==="tree"?(c(),Ke(YA,{key:2,root:e.root,revision:e.revision,anchor:e.anchor,selected:e.selected,importers:(j=e.rootSummary)==null?void 0:j.importers,kinds:e.kinds,"duplicates-only":e.duplicatesOnly,"duplicate-versions":e.duplicateVersions,"duplicates-error":e.duplicatesError,decorations:e.decorations,onSelect:Q,onRootBusy:H[1]||(H[1]=U=>s("root-busy"))},null,8,["root","revision","anchor","selected","importers","kinds","duplicates-only","duplicate-versions","duplicates-error","decorations"])):e.mode==="trail"?(c(),Ke(gA,{key:3,root:e.root,revision:e.revision,anchor:e.anchor,selected:e.selected,kinds:e.kinds,"duplicates-only":e.duplicatesOnly,"duplicate-versions":e.duplicateVersions,"duplicates-error":e.duplicatesError,decorations:e.decorations,onSelect:Q,onRootBusy:H[2]||(H[2]=U=>s("root-busy"))},null,8,["root","revision","anchor","selected","kinds","duplicates-only","duplicate-versions","duplicates-error","decorations"])):(c(),Ke(JR,{key:4,root:e.root,revision:e.revision,anchor:e.anchor,selected:e.selected,kinds:e.kinds,"duplicates-only":e.duplicatesOnly,"duplicate-versions":e.duplicateVersions,"duplicates-error":e.duplicatesError,decorations:e.decorations,up:e.up,down:e.down,options:v.value,onSelect:Q,onDepthChange:H[3]||(H[3]=U=>s("filters-change",U)),onRootBusy:H[4]||(H[4]=U=>s("root-busy"))},null,8,["root","revision","anchor","selected","kinds","duplicates-only","duplicate-versions","duplicates-error","decorations","up","down","options"]))])])}}}),uN=Le(cN,[["__scopeId","data-v-386c48ff"]]);function dN(e){const t=e.flatMap(n=>n.kind==="inexact"?[n.source]:[]);return t.length===1||new Set(t).size>1}function fN(e){return e.presence!=="both"||e.state!=="ready"||dN(e.notes)||e.versions.length>0||e.directs.length>0||e.importers.length>0||e.risk.length>0}const fs=100,hc="HEAD",hN="the working tree",pN={"manifest-only":"package.json manifests only","resolved-today":"versions resolved today"},vN=new Set(["upgraded","downgraded","changed"]);function jo(e){return e===io?hN:e}function _N(e,t){return e==="base"?t.base:t.target}function mN(e,t){return e.roots.filter(n=>fN(n)&&(t===void 0||n.rootId===t))}function gN(e,t){if(e.length===0)return`No dependency changes between ${jo(t.base)} and ${jo(t.target)}.`;const n=e.flatMap(l=>l.versions),o=e.flatMap(l=>l.risk).filter(l=>l.issue==="vulnerability"),s=[[n.filter(l=>l.change==="added").length,"added"],[n.filter(l=>l.change==="removed").length,"removed"],[n.filter(l=>vN.has(l.change)).length,"changed"]],i=o.filter(l=>l.change==="introduced").length,r=o.filter(l=>l.change==="resolved").length;return[Je(e.length,"root changed","roots changed"),s.filter(([l])=>l>0).map(([l,d])=>Je(l,d,d)).join(", "),i>0?Je(i,"vulnerable version introduced","vulnerable versions introduced"):"",r>0?Je(r,"resolved","resolved"):""].filter(l=>l!=="").join(" · ")}function yN(e,t){const n=_N(e.side,t);return e.kind==="failed"?`${n} failed to scan this root: ${e.error}`:e.kind==="submodule"?`Not compared: this root is inside a git submodule, and ${jo(n)} does not read submodules.`:`Package versions are not compared: ${jo(n)} builds this root from ${pN[e.source]??e.source}.`}function bN(e,t){if(e!=="both")return`Only in ${jo(e==="base-only"?t.base:t.target)}`}function Wi(e,t){return t!==void 0?Wu(Dn(t.commit)):e===ft?io:e===hc?hc:so(e)}const kN=1e3,wN=404,$N=409,EN="Unknown source ";function SN(e){return e instanceof Error?e.message:String(e)}function pc(e,t){return e instanceof Kn&&e.status===t}function IN(e,t){return e instanceof Kn&&e.message===`${EN}${t}`}function CN(e){return!e.complete||e.roots.some(t=>t.riskPending>0)}function xN(e,t){const n=Bv(t.target),o=t.pollMs??kN,s=We({status:"loading",mergeBase:{state:"off"}});let i=0,r,a;function l(){a!==void 0&&clearTimeout(a),a=void 0}async function d(){const w=t.base.value,b=w===ft?ft:(await e.openSource({ref:w})).key;if(!t.mergeBase.value)return{key:b,mergeBase:{state:"off"}};try{const T=await e.openSource({mergeBase:{base:b,target:n}});return{key:T.key,mergeBase:{state:"found",commit:T.commit}}}catch(T){if(pc(T,$N))return{key:b,mergeBase:{state:"none"}};throw T}}async function f(w,b){const T=await e.compare(b.key,n);w===i&&(s.value={status:"ready",response:T,mergeBase:b.mergeBase},l(),CN(T)&&(a=setTimeout(()=>void y(w),o)))}async function v(w,b){try{if(r===void 0||b){const T=await d();if(w!==i)return;r=T}await f(w,r)}catch(T){if(w!==i)return;if(!b&&pc(T,wN)&&!IN(T,n)){await v(w,!0);return}s.value={status:"error",mergeBase:s.value.mergeBase,error:SN(T)}}}function y(w){return w!==i||!t.active.value?Promise.resolve():v(w,!1)}function m(){if(l(),!t.active.value)return;const w=++i;r=void 0,s.value={status:"loading",mergeBase:t.mergeBase.value?{state:"pending"}:{state:"off"}},v(w,!1)}return Ne([t.base,t.mergeBase,t.active],m,{immediate:!0}),Ne(t.enrichmentRevision,()=>{s.value.status==="ready"&&y(i)}),Sr(()=>{i+=1,l()}),{state:s}}const TN={class:"compare-root"},ON={class:"compare-root__title"},RN={class:"mono"},AN={key:0,class:"badge badge--info"},NN={key:0,class:"compare-root__note muted"},PN={class:"compare-root__heading"},LN={class:"compare-table"},DN={scope:"col"},MN={scope:"col"},FN={scope:"col"},BN=["onClick"],KN={key:1,class:"mono"},HN={class:"compare-root__heading"},UN={class:"compare-table"},VN={scope:"col"},jN={scope:"col"},WN={scope:"col",class:"compare-table__narrow"},GN={scope:"col"},qN={scope:"col"},XN={class:"mono"},YN=["onClick"],zN={key:1,class:"mono"},JN={class:"compare-table__narrow"},QN={class:"mono"},ZN={class:"mono"},eP={class:"compare-root__heading"},tP={class:"compare-table"},nP={scope:"col"},oP={scope:"col"},sP={scope:"col"},iP={scope:"col",class:"compare-table__narrow"},rP=["onClick"],aP={key:1,class:"mono"},lP={class:"mono"},cP={class:"mono"},uP={class:"compare-table__narrow"},dP=Ae({__name:"CompareRootSection",props:{root:{},labels:{}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,s=Y(!1),i=Y(!1),r=k(()=>bN(n.root.presence,n.labels)),a=k(()=>s.value?n.root.versions:n.root.versions.slice(0,fs)),l=k(()=>i.value?n.root.directs:n.root.directs.slice(0,fs));function d(v){return v.issue==="deprecated"?D_:K_(v.severity??"unknown")}function f(v){return v.length===0?"—":v.join(", ")}return(v,y)=>(c(),u("section",TN,[_("h3",ON,[_("span",RN,p(h(Re)(e.root.rootId)),1),r.value?(c(),u("span",AN,p(r.value),1)):x("",!0)]),(c(!0),u(q,null,be(e.root.notes,(m,w)=>(c(),u("p",{key:w,class:"compare-root__note"},p(h(yN)(m,e.labels)),1))),128)),(c(!0),u(q,null,be(e.root.importers,m=>(c(),u("p",{key:`${m.change}:${m.path}`,class:"compare-root__note"},p(h(H_)(m.change,m.name,m.path)),1))),128)),e.root.riskPending>0?(c(),u("p",NN,p(h(B_)(e.root.riskPending)),1)):x("",!0),e.root.risk.length>0?(c(),u(q,{key:1},[_("h4",PN,p(h(T_)),1),_("table",LN,[y[2]||(y[2]=_("colgroup",null,[_("col",{class:"compare-table__col-name"}),_("col"),_("col",{class:"compare-table__narrow"})],-1)),_("thead",null,[_("tr",null,[_("th",DN,p(h(tl)),1),_("th",MN,p(h(L_)),1),_("th",FN,p(h(nl)),1)])]),_("tbody",null,[(c(!0),u(q,null,be(e.root.risk,m=>(c(),u("tr",{key:`${m.issue}:${m.change}:${m.name}@${m.version}`},[_("td",null,[m.targetNode?(c(),u("button",{key:0,type:"button",class:"compare-table__link mono",onClick:w=>o("select",m.targetNode)},[ye(Mt,{name:m.name,version:m.version},null,8,["name","version"])],8,BN)):(c(),u("span",KN,[ye(Mt,{name:m.name,version:m.version},null,8,["name","version"])]))]),_("td",null,p(d(m)),1),_("td",null,[_("span",{class:Me(["badge",m.change==="introduced"?"badge--danger":"badge--ok"])},p(m.change),3)])]))),128))])])],64)):x("",!0),e.root.directs.length>0?(c(),u(q,{key:2},[_("h4",HN,p(h(O_)),1),_("table",UN,[_("thead",null,[_("tr",null,[_("th",VN,p(h(A_)),1),_("th",jN,p(h(N_)),1),_("th",WN,p(h(P_)),1),_("th",GN,p(e.labels.base),1),_("th",qN,p(e.labels.target),1)])]),_("tbody",null,[(c(!0),u(q,null,be(l.value,m=>(c(),u("tr",{key:`${m.importer}:${m.name}:${m.kind}`},[_("td",XN,[ye(Mt,{name:m.importerName},null,8,["name"])]),_("td",null,[m.targetNode?(c(),u("button",{key:0,type:"button",class:"compare-table__link mono",onClick:w=>o("select",m.targetNode)},[ye(Mt,{name:m.name},null,8,["name"])],8,YN)):(c(),u("span",zN,[ye(Mt,{name:m.name},null,8,["name"])]))]),_("td",JN,p(m.kind),1),_("td",QN,p(m.base??"—"),1),_("td",ZN,p(m.target??"—"),1)]))),128))])]),!i.value&&e.root.directs.length>h(fs)?(c(),u("button",{key:0,type:"button",class:"button compare-root__more",onClick:y[0]||(y[0]=m=>i.value=!0)},p(h(ol)(e.root.directs.length)),1)):x("",!0)],64)):x("",!0),e.root.versions.length>0?(c(),u(q,{key:3},[_("h4",eP,p(h(R_)),1),_("table",tP,[_("thead",null,[_("tr",null,[_("th",nP,p(h(tl)),1),_("th",oP,p(e.labels.base),1),_("th",sP,p(e.labels.target),1),_("th",iP,p(h(nl)),1)])]),_("tbody",null,[(c(!0),u(q,null,be(a.value,m=>(c(),u("tr",{key:m.name},[_("td",null,[m.targetNode?(c(),u("button",{key:0,type:"button",class:"compare-table__link mono",onClick:w=>o("select",m.targetNode)},[ye(Mt,{name:m.name},null,8,["name"])],8,rP)):(c(),u("span",aP,[ye(Mt,{name:m.name},null,8,["name"])]))]),_("td",lP,p(f(m.base)),1),_("td",cP,p(f(m.target)),1),_("td",uP,p(m.change),1)]))),128))])]),!s.value&&e.root.versions.length>h(fs)?(c(),u("button",{key:0,type:"button",class:"button compare-root__more",onClick:y[1]||(y[1]=m=>s.value=!0)},p(h(ol)(e.root.versions.length)),1)):x("",!0)],64)):x("",!0)]))}}),fP=Le(dP,[["__scopeId","data-v-9ad1cecf"]]),hP=["aria-label"],pP={key:0,class:"compare__status muted"},vP={key:1,class:"compare__status"},_P={class:"compare__toolbar"},mP={class:"compare__label"},gP=["aria-expanded","aria-controls","aria-label"],yP={class:"mono"},bP=["aria-label"],kP={class:"compare__target mono"},wP={class:"compare__merge-base"},$P=["checked","aria-describedby"],EP=["disabled"],SP={key:0,class:"compare__status"},IP={key:1,class:"compare__status compare__status--error",role:"alert"},CP={key:0,class:"compare__status muted"},xP={class:"compare__summary",role:"status"},TP={key:0,class:"compare__status muted"},OP={key:1,class:"compare__status muted"},RP=Ae({__name:"CompareView",props:{scope:{},base:{},mergeBase:{type:Boolean},enrichmentRevision:{}},emits:["change-base","change-merge-base","swap","select"],setup(e,{emit:t}){const n=e,o=t,i=wt(oo,{source:{kind:"working"}}).source,r=Et(),a=tt(),l=`${a}-picker`,d=`${a}-merge-base`,f=Y(null),v=Y(!1),y=Y(null),m=Y(null),w=k(()=>{var le;return((le=f.value)==null?void 0:le.available)===!0?f.value:null}),b=k(()=>f.value===null?void 0:n.base??Kv(f.value,i)),T=i.kind==="working"?ft:i.ref,X=k(()=>b.value===T),{state:F}=xN(r,{target:i,base:k(()=>b.value??ft),mergeBase:ma(n,"mergeBase"),enrichmentRevision:ma(n,"enrichmentRevision"),active:k(()=>w.value!==null&&b.value!==void 0&&!X.value)}),J=k(()=>F.value.mergeBase.state==="found"?{commit:F.value.mergeBase.commit}:void 0),O=k(()=>({base:Wi(b.value??ft,J.value),target:ms(i)})),Q=k(()=>i.kind==="commit"?`${ms(i)} · ${Dn(i.commit)}`:ms(i)),ie=k(()=>F.value.response===void 0?[]:mN(F.value.response,n.scope)),H=k(()=>F.value.response===void 0?"":gN(ie.value,O.value)),j=k(()=>{var le;return((le=F.value.response)==null?void 0:le.complete)===!1}),U=k(()=>{var le;return(((le=F.value.response)==null?void 0:le.roots)??[]).some(me=>me.riskPending>0)}),M=k(()=>{const le=F.value.mergeBase;return le.state==="found"?Wu(Dn(le.commit)):le.state==="none"?I_:""});async function R(){try{f.value=await r.git()}catch(le){f.value={available:!1,reason:le instanceof Error?le.message:String(le),quiet:!1}}}async function D(){var le;v.value=!0,await R(),await st(),(le=m.value)==null||le.focus()}function V(){v.value=!1,st(()=>{var le;return(le=y.value)==null?void 0:le.focus()})}function _e(le){V(),le!==b.value&&o("change-base",le)}function Ee(le){const me=le.relatedTarget;me!==null&&le.currentTarget.contains(me)||(v.value=!1)}function Te(le,me){o("select",le,me)}return Gt(R),(le,me)=>(c(),u("section",{class:"compare","aria-label":h(j_)},[f.value===null?(c(),u("p",pP,p(h(Vu)),1)):f.value.available?(c(),u(q,{key:2},[_("div",_P,[_("span",mP,p(h(el)),1),_("div",{class:"compare__base",onFocusout:Ee},[_("button",{ref_key:"baseButton",ref:y,type:"button",class:"button compare__base-button","aria-haspopup":"dialog","aria-expanded":v.value,"aria-controls":v.value?l:void 0,"aria-label":`${h(el)}: ${h(Wi)(b.value??h(ft),void 0)}`,onClick:me[0]||(me[0]=W=>v.value?V():D())},[_("span",yP,p(h(Wi)(b.value??h(ft),void 0)),1),ye(et,{name:"chevron-down"})],8,gP),v.value&&w.value?(c(),u("div",{key:0,id:l,role:"dialog",class:"compare__picker","aria-label":h(sl)},[ye(uf,{ref_key:"picker",ref:m,info:w.value,"include-working":!0,current:b.value,label:h(sl),onPick:_e,onCancel:V},null,8,["info","current","label"])],8,bP)):x("",!0)],32),ye(et,{class:"compare__arrow",name:"chevron-right"}),_("span",kP,p(Q.value),1),_("label",wP,[_("input",{type:"checkbox",checked:e.mergeBase,"aria-describedby":M.value?d:void 0,onChange:me[1]||(me[1]=W=>o("change-merge-base",W.target.checked))},null,40,$P),Ve(" "+p(h(S_)),1)]),e.mergeBase&&M.value?(c(),u("span",{key:0,id:d,class:"compare__merge-base-note muted mono"},p(M.value),1)):x("",!0),_("button",{type:"button",class:"button compare__swap",disabled:X.value||b.value===void 0,onClick:me[2]||(me[2]=W=>o("swap",b.value??h(ft)))},p(h(E_)),9,EP)]),X.value?(c(),u("p",SP,p(h(x_)),1)):h(F).status==="error"?(c(),u("p",IP,p(h(U_)(h(F).error??"")),1)):(c(),u(q,{key:2},[h(F).status==="loading"?(c(),u("p",CP,p(h(M_)),1)):(c(),u(q,{key:1},[_("p",xP,p(H.value),1),j.value?(c(),u("p",TP,p(h(F_)(O.value.base)),1)):x("",!0),U.value?(c(),u("p",OP,p(h(C_)),1)):x("",!0)],64)),(c(!0),u(q,null,be(ie.value,W=>(c(),Ke(fP,{key:W.rootId,root:W,labels:O.value,onSelect:S=>Te(W.rootId,S)},null,8,["root","labels","onSelect"]))),128))],64))],64)):(c(),u("p",vP,p(h(V_)(f.value.reason)),1))],8,hP))}}),AP=Le(RP,[["__scopeId","data-v-26157f41"]]);function NP(e){return e instanceof Error?e.message:String(e)}function PP(e,t){return t.state==="done"?{root:e,result:t.result}:{root:e,result:void 0,error:t.error??(t.state==="cancelled"?Pm:Nm)}}async function LP(e,t,n,o){var s;try{const{jobId:i}=await e.addRecommended(t,n);return PP(t,await pf(e,i,()=>{},{...o.poll,signal:o.signal}))}catch(i){return(s=o.signal)==null||s.throwIfAborted(),{root:t,result:void 0,error:NP(i)}}}async function DP(e,t,n,o={}){var i,r;const s=[];for(const a of t)(i=o.onRoot)==null||i.call(o,a),(r=o.signal)==null||r.throwIfAborted(),s.push(await LP(e,a,n,o));return s}const MP={class:"add-fixes__intro"},FP=["disabled"],BP={class:"add-fixes__legend"},KP=["checked","onChange"],HP={class:"add-fixes__status",role:"status"},UP={key:0,class:"add-fixes__failures",role:"alert"},VP={class:"add-fixes__buttons"},jP=["href"],WP=["disabled","aria-disabled"],GP=Ae({__name:"AddRecommendedDialog",props:{roots:{},kinds:{},changesHref:{type:Function}},emits:["close","added","review"],setup(e,{emit:t}){const n=e,o=t,i=`${tt()}-title`,r=Et(),a=wt(ao,null),l=Y(null),d=Y(null),f=We(new Set(n.roots.map(H=>H.root))),v=Y("choosing"),y=Y(null),m=We([]),w=new AbortController,b=k(()=>n.roots.map(H=>H.root).filter(H=>f.value.has(H))),T=k(()=>v.value==="done"?Jy(m.value):v.value==="adding"&&y.value!==null?qy(y.value):""),X=k(()=>v.value==="done"?zy(m.value):[]),F=k(()=>{var j;return(j=m.value.find(U=>{var M;return(((M=U.result)==null?void 0:M.added)??0)>0})??m.value.find(U=>U.error===void 0))==null?void 0:j.root});function J(H,j){const U=new Set(f.value);j?U.add(H):U.delete(H),f.value=U}async function O(){var j;const H=b.value;if(!(v.value!=="choosing"||H.length===0)){v.value="adding";try{m.value=await DP(r,H,n.kinds,{signal:w.signal,onRoot:U=>{y.value=U}})}catch{return}await(a==null?void 0:a.reload(...H)),o("added"),v.value="done",await st(),(j=d.value)==null||j.focus()}}function Q(){const H=v.value==="adding";w.abort(),H&&o("added"),o("close")}function ie(H,j){H.button!==0||H.metaKey||H.ctrlKey||H.shiftKey||H.altKey||(H.preventDefault(),o("review",j))}return Gt(()=>{var H;return(H=l.value)==null?void 0:H.showModal()}),Ot(()=>{var H;w.abort(),(H=l.value)==null||H.close()}),(H,j)=>(c(),u("dialog",{ref_key:"dialog",ref:l,class:"add-fixes","aria-labelledby":i,onCancel:it(Q,["prevent"])},[_("form",{class:"add-fixes__form",onSubmit:it(O,["prevent"])},[_("h2",{id:i,class:"add-fixes__title"},p(h(Cm)),1),_("p",MP,p(h(xm)),1),_("fieldset",{class:"add-fixes__roots",disabled:v.value!=="choosing"},[_("legend",BP,p(h(Tm)),1),(c(!0),u(q,null,be(e.roots,U=>(c(),u("label",{key:U.root,class:"add-fixes__root"},[_("input",{type:"checkbox",checked:f.value.has(U.root),onChange:M=>J(U.root,M.target.checked)},null,40,KP),_("span",null,p(h(Gy)(U.root,U.count)),1)]))),128))],8,FP),_("p",HP,p(T.value),1),X.value.length>0?(c(),u("div",UP,[(c(!0),u(q,null,be(X.value,U=>(c(),u("p",{key:U,class:"add-fixes__failure"},p(U),1))),128))])):x("",!0),_("div",VP,[v.value==="done"?(c(),u(q,{key:0},[F.value!==void 0?(c(),u("a",{key:0,class:"add-fixes__review",href:e.changesHref(F.value),onClick:j[0]||(j[0]=U=>ie(U,F.value))},p(h(Yu)),9,jP)):x("",!0),_("button",{ref_key:"closeButton",ref:d,type:"button",class:"button button--primary",onClick:Q},p(h(Gu)),513)],64)):(c(),u(q,{key:1},[_("button",{type:"button",class:"button",onClick:Q},p(h(Vr)),1),_("button",{type:"submit",class:"button button--primary",disabled:v.value==="choosing"&&b.value.length===0,"aria-disabled":v.value==="adding"?"true":void 0},p(h(Om)),9,WP)],64))])],32)],544))}}),qP=Le(GP,[["__scopeId","data-v-724562a4"]]),XP="200px";function YP(e){const t=Y(!1);let n;function o(){n==null||n.disconnect(),n=void 0}function s(){t.value=!0,o()}function i(r){if(o(),!(r===null||t.value)){if(typeof IntersectionObserver>"u"){s();return}n=new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&s()},{rootMargin:XP}),n.observe(r)}}return Ne(e,i,{immediate:!0,flush:"post"}),Sr(o),t}const zP=["disabled","aria-disabled","tabindex"],JP={key:1,class:"row-action__error",role:"alert"},QP=Ae({__name:"IssueRowAction",props:{kind:{},location:{},row:{},kinds:{},revision:{},rootReason:{},inActiveRow:{type:Boolean}},emits:["added","update","review","root-unavailable"],setup(e,{emit:t}){const n=e,o=t,s={loading:ll,add:ll,update:gm,"in-changes":ym},i=new Set(["add","in-changes"]),r=Et(),a=wt(ea,()=>ta(r),!0),l=wt(ao,null),d=Y(null),f=k(()=>{var D;return((D=d.value)==null?void 0:D.closest("tr"))??d.value}),v=YP(f),y=We(null),m=Y(!1),w=Y(null),b=k(()=>({root:n.location.rootId,node:n.location.nodeId,kinds:n.kinds,revision:n.revision})),T=k(()=>[n.location.rootId,n.location.nodeId,n.kinds.join(","),n.revision].join(`
46
+ `)),X=k(()=>n.kind==="vulnerability"?{kind:"fix",name:n.row.name,version:n.row.version}:{kind:"update",name:n.row.name}),F=k(()=>l===null?void 0:_r(l.index.value,n.location.rootId,X.value)),J=k(()=>{var D;return((D=y.value)==null?void 0:D.key)===T.value?y.value:void 0}),O=k(()=>{var D,V;return U0(n.kind,n.location,(D=J.value)==null?void 0:D.actions,(V=J.value)==null?void 0:V.failure,F.value,n.rootReason)}),Q=k(()=>W0(O.value,n.row,F.value)),ie=k(()=>s[O.value.kind]),H=k(()=>n.kind==="vulnerability"&&F.value===void 0&&n.rootReason===void 0&&v.value);function j(D){return D instanceof Error?D.message:String(D)}async function U(){const D=T.value,V=b.value,_e=a.peek(V);if(_e!==void 0){y.value={key:D,actions:_e};return}try{const Ee=await a.get(V);D===T.value&&(y.value={key:D,actions:Ee})}catch(Ee){D===T.value&&(y.value={key:D,failure:j(Ee)})}}async function M(){if(m.value)return;m.value=!0,w.value=null;const D=n.location.rootId;try{await r.addChange(D,{nodeId:n.location.nodeId,choice:"recommended",kinds:[...n.kinds]}),await(l==null?void 0:l.reload(D)),En(eb(n.row.name,D)),o("added")}catch(V){w.value=Zy(j(V))}finally{m.value=!1}}function R(){const D=O.value;D.kind==="add"?M():D.kind==="update"?o("update",{root:n.location.rootId,node:n.location.nodeId}):D.kind==="in-changes"&&o("review",n.location.rootId,D.itemId)}return Ne(()=>O.value.kind==="root-unavailable",D=>o("root-unavailable",D),{immediate:!0}),Ot(()=>o("root-unavailable",!1)),Ne([H,T],([D])=>{D&&J.value===void 0&&U()},{immediate:!0}),(D,V)=>(c(),u("div",{ref_key:"element",ref:d,class:"row-action"},[_("span",{class:Me(["row-action__text",{"row-action__text--muted":!h(i).has(O.value.kind)}]),"data-testid":"row-recommended"},p(Q.value),3),ie.value!==void 0?(c(),u("button",{key:0,type:"button",class:Me(["button row-action__button",`row-action__button--${O.value.kind}`]),disabled:O.value.kind==="loading","aria-disabled":m.value?"true":void 0,tabindex:e.inActiveRow?0:-1,onClick:it(R,["stop"])},p(ie.value),11,zP)):x("",!0),w.value?(c(),u("p",JP,p(w.value),1)):x("",!0)],512))}}),$f=Le(QP,[["__scopeId","data-v-56e965a3"]]),ZP=["id","title"],eL={key:0,class:"via-list__prefix muted"},tL={class:"via-list__item"},nL={class:"via-list__prefix muted"},oL={key:2,class:"via-list__name mono"},sL={class:"via-list__more muted"},vc=",",iL=Ae({__name:"ViaList",props:{via:{},prefix:{},id:{}},setup(e){const t=e,n=k(()=>t.via.shown.length>0||t.via.more>0),o=k(()=>t.via.shown.length-1),s=k(()=>t.via.more>0?t.via.all.map(i=>i.name).join(`${vc} `):void 0);return(i,r)=>n.value?(c(),u("span",{key:0,id:e.id,class:"via-list","data-testid":"via-list",title:s.value},[e.via.shown.length===0?(c(),u("span",eL,p(e.prefix),1)):x("",!0),(c(!0),u(q,null,be(e.via.shown,(a,l)=>(c(),u(q,{key:a.name},[_("span",tL,[l===0?(c(),u(q,{key:0},[_("span",nL,p(e.prefix),1),r[0]||(r[0]=Ve(p(" "),-1))],64)):x("",!0),a.workspace?(c(),Ke(gi,{key:1,name:a.name},null,8,["name"])):(c(),u("span",oL,[ye(Mt,{name:a.name},null,8,["name"])])),l<o.value?(c(),u(q,{key:3},[Ve(p(vc))],64)):x("",!0)]),Ve(p(l<o.value?" ":""),1)],64))),128)),e.via.more>0?(c(),u(q,{key:1},[r[1]||(r[1]=Ve(p(" "),-1)),_("span",sL,p(h(Tn)(e.via.more)),1)],64)):x("",!0)],8,ZP)):x("",!0)}}),kr=Le(iL,[["__scopeId","data-v-e784fbeb"]]),rL=["aria-label"],aL={key:0,class:"direct-rows__col-root"},lL={scope:"col"},cL={scope:"col"},uL={key:0,scope:"col"},dL={scope:"col"},fL=["data-testid","data-roving-id","tabindex","aria-level","aria-expanded","aria-selected","aria-label","aria-describedby","onFocusin","onClick"],hL=["id"],pL={class:"direct-rows__badges"},vL={key:0,class:"direct-rows__package"},_L={class:"direct-rows__title"},mL=["onClick"],gL={key:1,class:"direct-rows__disclosure","aria-hidden":"true"},yL={class:"direct-rows__name mono"},bL={key:0,class:"direct-rows__latest mono muted"},kL={key:1,class:"direct-rows__via"},wL={class:"direct-rows__name mono"},$L={key:0,class:"direct-rows__detail muted"},EL={key:0},SL={class:"direct-rows__advisory"},IL={key:1,class:"direct-rows__detail muted"},CL={key:0,class:"direct-rows__root"},xL={key:0},TL=["id"],OL={key:0,class:"direct-rows__hidden","aria-level":"2"},RL=["id","colspan"],AL="issues-direct",NL=4,PL=3,LL=" · ",DL=Ae({__name:"IssueDirectGroups",props:{entries:{},scope:{},selection:{},kinds:{},actionsRevisions:{},unavailableRoots:{},noteIdPrefix:{}},emits:["select","update","review","added"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=We(new Set),r=We(new Set),a=k(()=>n.scope===void 0),l=k(()=>a.value?NL:PL);function d(L){const $=`${AL}:${L.key}`,C=L.issues.length>0,I=C&&!i.value.has(L.key),Ie={kind:"direct",id:$,entry:L,action:L.own,via:K0(L.group),expandable:C,expanded:I},g=I?L.issues.map(E=>({kind:"issue",id:`${$}:${E.key}`,entry:L,action:E,parentId:$})):[];return{key:L.key,header:Ie,issues:g,hiddenCount:I?L.group.issuesTruncated:0}}const f=k(()=>n.entries.map(d)),v=k(()=>f.value.flatMap(L=>[L.header,...L.issues])),y=k(()=>v.value.map(L=>({id:L.id,parentId:L.kind==="issue"?L.parentId:void 0,expandable:L.kind==="direct"&&L.expandable,expanded:L.kind==="direct"&&L.expanded})));function m(L){return v.value.find($=>$.id===L)}function w(L,$){const C=new Set(i.value);$?C.add(L.key):C.delete(L.key),i.value=C}function b(L){const $=m(L);($==null?void 0:$.kind)==="direct"&&$.expandable&&w($.entry,!1)}function T(L){const $=m(L);($==null?void 0:$.kind)==="direct"&&w($.entry,!0)}function X(L){const $=L.entry.group;return{root:$.rootId,node:L.kind==="direct"?$.direct:L.action.location.nodeId}}function F(L){const $=m(L);$!==void 0&&o("select",X($))}const{activeId:J,tabIndexOf:O,onKeydown:Q,focusActive:ie}=Zo(y,{expand:b,collapse:T,activate:F});function H(L){L.target===L.currentTarget&&Q(L)}function j(L){J.value=L.id,F(L.id)}function U(L){J.value=L.id,w(L.entry,L.expanded)}async function M(L){o("added"),await co(document,()=>{J.value=L.id,ie()})}function R(L){var C;const $=X(L);return((C=n.selection)==null?void 0:C.root)===$.root&&n.selection.node===$.node}function D(L){return L.kind==="issue"?`${L.action.row.name} ${L.action.row.version}`:`${L.entry.group.name} ${L.entry.group.version}`}function V(L){return`${L.entry.group.name} ${L.entry.group.version}`}function _e(L){const $=Re(L.entry.group.rootId);return L.kind==="issue"?rb(D(L),V(L),$):Sd(D(L),$)}function Ee(L){return L.action===void 0?[]:na(L.action.kind,L.action.row)}function Te(L){const $=L.entry.group.decoration.below;return $===void 0?[]:eo({below:$},{isDirect:!0,compact:!1,version:L.entry.group.version})}function le(L){return L.action===void 0||L.action.kind==="vulnerability"?void 0:L.action.row.latest}function me(L){return L.kind==="vulnerability"?L.row.vulnIds:[]}function W(L){return L.kind==="deprecated"?L.row.deprecatedMessage:void 0}function S(L){return`${s}-${L.header.id}-hidden`}function ne(L){const $=he(L.header);return L.hiddenCount>0?`${$} ${S(L)}`:$}function ae(L,$){const C=new Set(r.value);$?C.add(L):C.delete(L),r.value=C}function $e(L,$){const C=L.kind==="direct"?ne($):he(L);return r.value.has(L.id)?`${C} ${Zr(n.noteIdPrefix,L.entry.group.rootId)}`:C}function ee(L,$){return`${s}-${L.id}-${$}`}function he(L){return(L.kind==="direct"?["problem","via","recommended"]:["problem","recommended"]).map(C=>ee(L,C)).join(" ")}return(L,$)=>(c(),u("table",{class:"direct-rows",role:"treegrid","aria-label":h(Am)},[_("colgroup",null,[$[2]||($[2]=_("col",{class:"direct-rows__col-problem"},null,-1)),$[3]||($[3]=_("col",null,null,-1)),a.value?(c(),u("col",aL)):x("",!0),$[4]||($[4]=_("col",{class:"direct-rows__col-recommended"},null,-1))]),_("thead",null,[_("tr",null,[_("th",lL,p(h(kn).issue),1),_("th",cL,p(h(kn).package),1),a.value?(c(),u("th",uL,p(h(kn).root),1)):x("",!0),_("th",dL,p(h(kn).recommended),1)])]),(c(!0),u(q,null,be(f.value,C=>(c(),u("tbody",{key:C.key,"data-testid":"issue-group"},[(c(!0),u(q,null,be([C.header,...C.issues],I=>(c(),u("tr",{key:I.id,class:Me(["direct-rows__row",{"direct-rows__row--direct":I.kind==="direct","direct-rows__row--child":I.kind==="issue","direct-rows__row--selected":R(I)}]),"data-testid":I.kind==="direct"?"issue-group-header":"issue-group-row","data-roving-id":I.id,tabindex:h(O)(I.id),"aria-level":I.kind==="direct"?1:2,"aria-expanded":I.kind==="direct"&&I.expandable?I.expanded:void 0,"aria-selected":R(I),"aria-label":_e(I),"aria-describedby":$e(I,C),onKeydown:H,onFocusin:Ie=>J.value=I.id,onClick:Ie=>j(I)},[_("td",{id:ee(I,"problem")},[_("span",pL,[ye(Fn,{badges:Ee(I)},null,8,["badges"])])],8,hL),_("td",null,[I.kind==="direct"?(c(),u("div",vL,[_("span",_L,[I.expandable?(c(),u("span",{key:0,class:"direct-rows__disclosure","aria-hidden":"true","data-testid":"group-disclosure",onClick:it(Ie=>U(I),["stop"])},[ye(et,{name:I.expanded?"chevron-down":"chevron-right",size:20},null,8,["name"])],8,mL)):(c(),u("span",gL)),_("span",yL,[ye(Mt,{name:I.entry.group.name,version:I.entry.group.version},null,8,["name","version"])])]),le(I)?(c(),u("span",bL,"→ "+p(le(I)),1)):x("",!0),ye(Fn,{badges:Te(I)},null,8,["badges"])])):x("",!0),I.kind==="direct"?(c(),u("div",kL,[ye(kr,{id:ee(I,"via"),via:I.via,prefix:h(id)},null,8,["id","via","prefix"])])):(c(),u(q,{key:2},[_("span",wL,[ye(Mt,{name:I.action.row.name,version:I.action.row.version},null,8,["name","version"])]),me(I.action).length>0?(c(),u("div",$L,[(c(!0),u(q,null,be(me(I.action),(Ie,g)=>(c(),u(q,{key:Ie},[g>0?(c(),u("span",EL,p(LL))):x("",!0),_("span",SL,p(Ie),1)],64))),128))])):W(I.action)?(c(),u("div",IL,p(W(I.action)),1)):x("",!0)],64))]),a.value?(c(),u("td",CL,[I.kind==="direct"?(c(),u("span",xL,[ye(Bs,{text:h(Re)(I.entry.group.rootId)},null,8,["text"])])):x("",!0)])):x("",!0),_("td",{id:ee(I,"recommended")},[I.action!==void 0?(c(),Ke($f,{key:0,kind:I.action.kind,location:I.action.location,row:I.action.row,kinds:e.kinds,revision:e.actionsRevisions.get(I.entry.group.rootId)??"","root-reason":e.unavailableRoots.get(I.entry.group.rootId),"in-active-row":h(J)===I.id,onAdded:Ie=>M(I),onUpdate:$[0]||($[0]=Ie=>o("update",Ie)),onReview:$[1]||($[1]=(Ie,g)=>o("review",Ie,g)),onRootUnavailable:Ie=>ae(I.id,Ie)},null,8,["kind","location","row","kinds","revision","root-reason","in-active-row","onAdded","onRootUnavailable"])):x("",!0)],8,TL)],42,fL))),128)),C.hiddenCount>0?(c(),u("tr",OL,[_("td",{id:S(C),colspan:l.value,class:"muted"},p(h(ib)(C.hiddenCount)),9,RL)])):x("",!0)]))),128))],8,rL))}}),ML=Le(DL,[["__scopeId","data-v-e0129222"]]),FL={key:0,class:"root-notes","data-testid":"root-notes"},BL=["id"],KL=Ae({__name:"IssueRootNotes",props:{notes:{},idPrefix:{}},setup(e){return(t,n)=>e.notes.length>0?(c(),u("ul",FL,[(c(!0),u(q,null,be(e.notes,o=>(c(),u("li",{id:h(Zr)(e.idPrefix,o.rootId),key:o.rootId,class:"root-notes__line"},p(o.text),9,BL))),128))])):x("",!0)}}),HL=Le(KL,[["__scopeId","data-v-eaa09cb3"]]),UL=["aria-label"],VL={key:0,class:"issue-rows__col-root"},jL={scope:"col"},WL={scope:"col"},GL={key:0,scope:"col"},qL={scope:"col"},XL={class:"issue-rows__section"},YL=["colspan"],zL={class:"issue-rows__section-title"},JL=["data-testid","data-roving-id","tabindex","aria-level","aria-expanded","aria-selected","aria-label","aria-describedby","onFocusin","onClick"],QL=["id"],ZL={class:"issue-rows__package"},eD={class:"issue-rows__title"},tD={key:0,class:"issue-rows__disclosure","aria-hidden":"true"},nD={class:"issue-rows__name mono"},oD={key:0,class:"issue-rows__latest mono muted"},sD={key:0,class:"issue-rows__detail muted"},iD={key:0},rD={class:"issue-rows__advisory"},aD={key:1,class:"issue-rows__detail muted"},lD={key:2,class:"issue-rows__via"},cD={key:0,class:"issue-rows__root"},uD={key:0,class:"issue-rows__in-roots muted"},dD=["title"],fD=["colspan"],hD={class:"issue-rows__location","data-testid":"issue-location"},pD=["title"],vD={class:"issue-rows__location-via"},_D=["id"],_c="issues-row",mD=4,gD=3,yD=" · ",bD=Ae({__name:"IssuePackageRows",props:{groups:{},scope:{},selection:{},kinds:{},actionsRevisions:{},unavailableRoots:{},noteIdPrefix:{}},emits:["select","update","review","added"],setup(e,{emit:t}){const n=e,o=t,s=tt(),i=We(new Set),r=We(new Set),a=k(()=>n.scope===void 0),l=k(()=>a.value?mD:gD);function d(ee){return`${_c}:${ee.key}`}function f(ee,he,L){return{kind:"location",id:`${_c}:${ee.key}:${he.key}`,group:ee,entry:he,via:B0(he.location),parentId:L}}function v(ee){const[he]=ee.locations;if(ee.locations.length===1&&he!==void 0)return[f(ee,he)];const L=d(ee),$=!i.value.has(ee.key),C={kind:"package",id:L,group:ee,expanded:$};return $?[C,...ee.locations.map(I=>f(ee,I,L))]:[C]}const y=k(()=>nn.flatMap(ee=>{const he=n.groups.filter(L=>L.kind===ee);return he.length===0?[]:[{kind:ee,title:bd(ee),rows:he.flatMap(v)}]})),m=k(()=>y.value.flatMap(ee=>ee.rows)),w=k(()=>m.value.map(ee=>({id:ee.id,parentId:ee.kind==="location"?ee.parentId:void 0,expandable:ee.kind==="package",expanded:ee.kind==="package"&&ee.expanded})));function b(ee){return m.value.find(he=>he.id===ee)}function T(ee,he){const L=new Set(i.value);he?L.add(ee.key):L.delete(ee.key),i.value=L}function X(ee){const he=b(ee);(he==null?void 0:he.kind)==="package"&&T(he.group,!1)}function F(ee){const he=b(ee);(he==null?void 0:he.kind)==="package"&&T(he.group,!0)}function J(ee){const he=b(ee);he!==void 0&&(he.kind==="package"?T(he.group,he.expanded):o("select",{root:he.entry.location.rootId,node:he.entry.location.nodeId}))}const{activeId:O,tabIndexOf:Q,onKeydown:ie,focusActive:H}=Zo(w,{expand:X,collapse:F,activate:J});function j(ee){ee.target===ee.currentTarget&&ie(ee)}function U(ee){O.value=ee.id,J(ee.id)}async function M(ee){o("added"),await co(document,()=>{O.value=ee.id,H()})}function R(ee){return ee.kind==="location"&&ee.parentId===void 0}function D(ee){return ee.kind==="package"||R(ee)}function V(ee){var he;return((he=n.selection)==null?void 0:he.root)===ee.location.rootId&&n.selection.node===ee.location.nodeId}function _e(ee){return`${ee.name} ${ee.version}`}function Ee(ee){return new Set(ee.locations.map(he=>he.location.rootId)).size}function Te(ee){return na(ee.kind,ee.row)}function le(ee){return ee.kind==="vulnerability"?ee.row.vulnIds:[]}function me(ee){return ee.kind==="deprecated"?ee.row.deprecatedMessage:void 0}function W(ee){return ee.row.latest!==void 0&&ee.kind!=="vulnerability"}function S(ee,he,L){return`${s}-${ee}-${he}-${L}`}function ne(ee,he){const L=new Set(r.value);he?L.add(ee):L.delete(ee),r.value=L}function ae(ee,he,L){const C=(R(L)?["problem","via","recommended"]:["via","recommended"]).map(I=>S(ee,he,I));return r.value.has(L.id)&&C.push(Zr(n.noteIdPrefix,L.entry.location.rootId)),C.join(" ")}function $e(ee){return Sd(_e(ee.group.row),ee.entry.label)}return(ee,he)=>(c(),u("table",{class:"issue-rows",role:"treegrid","aria-label":h(_m)},[_("colgroup",null,[he[2]||(he[2]=_("col",{class:"issue-rows__col-problem"},null,-1)),he[3]||(he[3]=_("col",null,null,-1)),a.value?(c(),u("col",VL)):x("",!0),he[4]||(he[4]=_("col",{class:"issue-rows__col-recommended"},null,-1))]),_("thead",null,[_("tr",null,[_("th",jL,p(h(kn).issue),1),_("th",WL,p(h(kn).package),1),a.value?(c(),u("th",GL,p(h(kn).root),1)):x("",!0),_("th",qL,p(h(kn).recommended),1)])]),(c(!0),u(q,null,be(y.value,L=>(c(),u("tbody",{key:L.kind,"data-testid":"issues-section"},[_("tr",XL,[_("th",{colspan:l.value,scope:"colgroup"},[_("h3",zL,p(L.title),1)],8,YL)]),(c(!0),u(q,null,be(L.rows,($,C)=>(c(),u("tr",{key:$.id,class:Me(["issue-rows__row",{"issue-rows__row--package":$.kind==="package","issue-rows__row--child":$.kind==="location"&&$.parentId!==void 0,"issue-rows__row--selected":$.kind==="location"&&V($.entry)}]),"data-testid":$.kind==="package"?"issue-package":"issue-row","data-roving-id":$.id,tabindex:h(Q)($.id),"aria-level":$.kind==="location"&&$.parentId!==void 0?2:1,"aria-expanded":$.kind==="package"?$.expanded:void 0,"aria-selected":$.kind==="location"?V($.entry):void 0,"aria-label":$.kind==="location"?$e($):void 0,"aria-describedby":$.kind==="location"?ae(L.kind,C,$):void 0,onKeydown:j,onFocusin:I=>O.value=$.id,onClick:I=>U($)},[_("td",{id:S(L.kind,C,"problem")},[D($)?(c(),Ke(Fn,{key:0,badges:Te($.group)},null,8,["badges"])):x("",!0)],8,QL),D($)?(c(),u(q,{key:0},[_("td",null,[_("div",ZL,[_("span",eD,[$.kind==="package"?(c(),u("span",tD,[ye(et,{name:$.expanded?"chevron-down":"chevron-right",size:20},null,8,["name"])])):x("",!0),_("span",nD,[ye(Mt,{name:$.group.row.name,version:$.group.row.version},null,8,["name","version"])])]),W($.group)?(c(),u("span",oD,"→ "+p($.group.row.latest),1)):x("",!0)]),le($.group).length>0?(c(),u("div",sD,[(c(!0),u(q,null,be(le($.group),(I,Ie)=>(c(),u(q,{key:I},[Ie>0?(c(),u("span",iD,p(yD))):x("",!0),_("span",rD,p(I),1)],64))),128))])):me($.group)?(c(),u("div",aD,p(me($.group)),1)):x("",!0),$.kind==="location"?(c(),u("div",lD,[ye(kr,{id:S(L.kind,C,"via"),via:$.via,prefix:h(id)},null,8,["id","via","prefix"])])):x("",!0)]),a.value?(c(),u("td",cD,[$.kind==="package"?(c(),u("span",uD,p(Ee($.group)>1?h(tb)(Ee($.group)):""),1)):(c(),u("span",{key:1,title:$.entry.title},[ye(Bs,{text:$.entry.label},null,8,["text"])],8,dD))])):x("",!0)],64)):$.kind==="location"?(c(),u("td",{key:1,colspan:a.value?2:1},[_("div",hD,[_("span",{class:"issue-rows__location-label","data-testid":"location-label",title:$.entry.title},[ye(Bs,{text:$.entry.label},null,8,["text"])],8,pD),_("span",vD,[ye(kr,{id:S(L.kind,C,"via"),via:$.via,prefix:h(Gg)},null,8,["id","via","prefix"])])])],8,fD)):x("",!0),_("td",{id:S(L.kind,C,"recommended")},[$.kind==="location"?(c(),Ke($f,{key:0,kind:$.group.kind,location:$.entry.location,row:$.group.row,kinds:e.kinds,revision:e.actionsRevisions.get($.entry.location.rootId)??"","root-reason":e.unavailableRoots.get($.entry.location.rootId),"in-active-row":h(O)===$.id,onAdded:I=>M($),onUpdate:he[0]||(he[0]=I=>o("update",I)),onReview:he[1]||(he[1]=(I,Ie)=>o("review",I,Ie)),onRootUnavailable:I=>ne($.id,I)},null,8,["kind","location","row","kinds","revision","root-reason","in-active-row","onAdded","onRootUnavailable"])):x("",!0)],8,_D)],42,JL))),128))]))),128))],8,UL))}}),kD=Le(bD,[["__scopeId","data-v-0197f514"]]),wD={class:"issues-toolbar"},$D=["aria-label"],ED=["aria-pressed","disabled","onClick"],SD=["title"],ID={class:"issues-toolbar__end"},CD=["aria-expanded","aria-controls"],xD=["aria-label"],TD={class:"view-menu__heading","aria-hidden":"true"},OD=["role","aria-checked","aria-disabled","onClick"],RD={class:"view-menu__check","aria-hidden":"true"},AD=["disabled"],ND=3e4,PD=Ae({__name:"IssuesToolbar",props:{types:{},counts:{},group:{},kinds:{},status:{},canAddRecommended:{type:Boolean}},emits:["change","add-recommended"],setup(e,{expose:t,emit:n}){const o=e,s=n,i=["package","direct"],r=tt(),a=`${r}-view-button`,l=`${r}-view-menu`,d=`${r}-check-text`,f=`${r}-check-details`,v=Y(null),y=Y(Date.now()),m=window.setInterval(()=>{y.value=Date.now()},ND);Ot(()=>window.clearInterval(m));const w=k(()=>o.status===void 0?"":yd(o.status,y.value)),b=k(()=>o.status===void 0?void 0:Vy(o.status));function T(W){const S=sw(o.types,W,o.counts);S!==void 0&&s("change",{types:S})}function X(W){W!==o.group&&s("change",{group:W})}function F(W){const S=Kl(o.kinds,W);S!==void 0&&s("change",{kinds:S})}const J=k(()=>i.map(W=>({key:`group-${W}`,role:"menuitemradio",label:Wg[W],checked:o.group===W,disabled:!1,keepsOpen:!1,run:()=>X(W)}))),O=k(()=>tn.map(W=>({key:`kind-${W}`,role:"menuitemcheckbox",label:W,checked:o.kinds.includes(W),disabled:Kl(o.kinds,W)===void 0,keepsOpen:!0,run:()=>F(W)}))),Q=k(()=>[...J.value,...O.value]),ie=k(()=>[{key:"group",label:Sm,entries:J.value.map((W,S)=>({item:W,index:S}))},{key:"kinds",label:Xu,entries:O.value.map((W,S)=>({item:W,index:J.value.length+S}))}]),{isOpen:H,container:j,button:U,menu:M,choose:R,onButtonMousedown:D,onButtonClick:V,onButtonKeydown:_e,onButtonKeyup:Ee,onMenuKeydown:Te,onFocusOut:le}=ia({labels:()=>Q.value.map(W=>W.label),isDisabled:W=>{var S;return((S=Q.value[W])==null?void 0:S.disabled)??!0},keepsOpen:W=>{var S;return((S=Q.value[W])==null?void 0:S.keepsOpen)??!1},onChoose:W=>{var S;return(S=Q.value[W])==null?void 0:S.run()}});function me(){var W;(W=v.value)==null||W.focus()}return t({focusAddRecommended:me}),(W,S)=>(c(),u("div",wD,[_("div",{class:"issues-toolbar__types",role:"group","aria-label":h($m)},[(c(!0),u(q,null,be(h(nn),ne=>(c(),u("button",{key:ne,type:"button",class:Me(["issues-toolbar__type",{"issues-toolbar__type--on":e.types.includes(ne)}]),"aria-pressed":e.types.includes(ne),disabled:e.counts[ne]===0,onClick:ae=>T(ne)},p(h(Uy)(ne,e.counts[ne])),11,ED))),128))],8,$D),w.value?(c(),u("span",{key:0,id:d,class:"issues-toolbar__check",tabindex:"0",role:"group","aria-labelledby":d,"aria-describedby":f,title:b.value},p(w.value),9,SD)):x("",!0),b.value?(c(),u("span",{key:1,id:f,hidden:""},p(b.value),1)):x("",!0),_("div",ID,[_("div",{ref_key:"container",ref:j,class:"view-menu",onFocusout:S[6]||(S[6]=(...ne)=>h(le)&&h(le)(...ne))},[_("button",{id:a,ref_key:"button",ref:U,type:"button",class:"button view-menu__button","aria-haspopup":"menu","aria-expanded":h(H),"aria-controls":h(H)?l:void 0,onMousedown:S[0]||(S[0]=(...ne)=>h(D)&&h(D)(...ne)),onClick:S[1]||(S[1]=(...ne)=>h(V)&&h(V)(...ne)),onKeydown:S[2]||(S[2]=(...ne)=>h(_e)&&h(_e)(...ne)),onKeyup:S[3]||(S[3]=(...ne)=>h(Ee)&&h(Ee)(...ne))},[Ve(p(h(Em)),1),ye(et,{class:"view-menu__caret",name:"chevron-down"})],40,CD),h(H)?(c(),u("div",{key:0,id:l,ref_key:"menu",ref:M,role:"menu",class:"view-menu__popover","aria-labelledby":a,onKeydown:S[4]||(S[4]=(...ne)=>h(Te)&&h(Te)(...ne)),onMousedown:S[5]||(S[5]=it(()=>{},["prevent"]))},[(c(!0),u(q,null,be(ie.value,ne=>(c(),u("div",{key:ne.key,role:"group",class:"view-menu__section","aria-label":ne.label},[_("div",TD,p(ne.label),1),(c(!0),u(q,null,be(ne.entries,({item:ae,index:$e})=>(c(),u("div",{key:ae.key,role:ae.role,tabindex:"-1","data-menu-item":"",class:"view-menu__item","aria-checked":ae.checked,"aria-disabled":ae.disabled?"true":void 0,onClick:ee=>h(R)($e)},[_("span",RD,[ae.checked?(c(),Ke(et,{key:0,name:"check"})):x("",!0)]),_("span",null,p(ae.label),1)],8,OD))),128))],8,xD))),128))],544)):x("",!0)],544),_("button",{ref_key:"addButton",ref:v,type:"button",class:"button issues-toolbar__add",disabled:!e.canAddRecommended,onClick:S[7]||(S[7]=ne=>s("add-recommended"))},p(h(Im)),9,AD)])]))}}),LD=Le(PD,[["__scopeId","data-v-b8ceb5c5"]]),DD=["aria-label"],MD={key:0,class:"issues__message issues__message--error",role:"alert"},FD={key:1,class:"issues__message muted"},BD={key:2,class:"issues__message muted","data-testid":"issues-empty"},KD={key:3,class:"issues__body"},HD={key:4,class:"issues__body"},UD=Ae({__name:"IssuesView",props:{root:{},selection:{},group:{},types:{},kinds:{},revision:{},rows:{},rowsError:{},actionsRevisions:{},unavailableRoots:{},status:{},failedRoots:{},changesHref:{type:Function}},emits:["select","update","review","review-changes","change","changes-updated"],setup(e,{emit:t}){const n=e,o=t,s=Et(),i=tt(),r=We(null),a=We(Bl([])),l=Y(null),d=Y(null),f=Y(!1);let v=0,y="";const m=k(()=>n.rowsError!==void 0?fr(n.rowsError):l.value),w=k(()=>F0(n.rows??[],n.types,n.root)),b=k(()=>cw(r.value??[],n.rows??[],n.types)),T=k(()=>G0(n.rows??[],n.types,n.unavailableRoots,n.root)),X=k(()=>Q0(n.rows??[],n.root)),F=k(()=>n.rows!==null&&(n.group==="package"||r.value!==null)),J=k(()=>n.group==="package"?w.value.length===0:b.value.length===0),O=k(()=>{var D;const M=Jo(n.status,{failedRoots:n.failedRoots}),R=tw((((D=n.rows)==null?void 0:D.length)??0)>0,n.kinds,n.status,M);return Wy(R,fi(n.root),M,Yd(n.kinds))});function Q(M){return M instanceof Error?M.message:String(M)}async function ie(){const M=++v;if(n.group==="direct")try{const R=await s.issueGroups(n.root,n.kinds);if(M!==v)return;r.value=R.groups,l.value=null}catch(R){if(M!==v)return;l.value=fr(Q(R))}}Ne(()=>n.rows,M=>{M!==null&&(a.value=Bl(M))},{immediate:!0}),Ne([()=>n.root,()=>n.kinds.join(","),()=>n.group,()=>n.revision],()=>{const M=`${n.root??""}
47
+ ${n.kinds.join(",")}`;M!==y&&(y=M,r.value=null),ie()},{immediate:!0});function H(){f.value=!0}async function j(){var M;f.value=!1,await st(),(M=d.value)==null||M.focusAddRecommended()}function U(M){f.value=!1,o("review-changes",M)}return(M,R)=>(c(),u("section",{class:"issues","aria-label":h(ui).issues},[ye(LD,{ref_key:"toolbar",ref:d,types:e.types,counts:a.value,group:e.group,kinds:e.kinds,status:e.status,"can-add-recommended":X.value.length>0,onChange:R[0]||(R[0]=D=>o("change",D)),onAddRecommended:H},null,8,["types","counts","group","kinds","status","can-add-recommended"]),ye(HL,{notes:T.value,"id-prefix":h(i)},null,8,["notes","id-prefix"]),m.value?(c(),u("p",MD,p(m.value),1)):F.value?J.value?(c(),u("p",BD,p(O.value),1)):e.group==="package"?(c(),u("div",KD,[ye(kD,{groups:w.value,scope:e.root,selection:e.selection,kinds:e.kinds,"actions-revisions":e.actionsRevisions,"unavailable-roots":e.unavailableRoots,"note-id-prefix":h(i),onSelect:R[1]||(R[1]=D=>o("select",D)),onUpdate:R[2]||(R[2]=D=>o("update",D)),onReview:R[3]||(R[3]=(D,V)=>o("review",D,V)),onAdded:R[4]||(R[4]=D=>o("changes-updated"))},null,8,["groups","scope","selection","kinds","actions-revisions","unavailable-roots","note-id-prefix"])])):(c(),u("div",HD,[ye(ML,{entries:b.value,scope:e.root,selection:e.selection,kinds:e.kinds,"actions-revisions":e.actionsRevisions,"unavailable-roots":e.unavailableRoots,"note-id-prefix":h(i),onSelect:R[5]||(R[5]=D=>o("select",D)),onUpdate:R[6]||(R[6]=D=>o("update",D)),onReview:R[7]||(R[7]=(D,V)=>o("review",D,V)),onAdded:R[8]||(R[8]=D=>o("changes-updated"))},null,8,["entries","scope","selection","kinds","actions-revisions","unavailable-roots","note-id-prefix"])])):(c(),u("p",FD,p(h(Rm)),1)),f.value?(c(),Ke(qP,{key:5,roots:X.value,kinds:e.kinds,"changes-href":e.changesHref,onClose:j,onAdded:R[9]||(R[9]=D=>o("changes-updated")),onReview:U},null,8,["roots","kinds","changes-href"])):x("",!0)],8,DD))}}),VD=Le(UD,[["__scopeId","data-v-f859bdce"]]),jD={class:"panel-heading"},WD={class:"shell__center"},GD={key:1,class:"commit-changes"},qD={class:"commit-changes__text"},XD={class:"panel-heading"},YD=1e3,zD=Ae({__name:"App",setup(e){function t(){try{return window.localStorage}catch{return}}const n=Et(),o=wt(oo,{source:{kind:"working"}}),s=o.source.kind==="commit"?o.source:void 0,i=zn(WC(t(),window.innerWidth)),r=zn(Wa(window.location.search)),a=Y(null),l=Y(null),d=Y(null),f=Y(0),v=Y(null),y=Y(null),m=Y(null),w=Y(null),b=Y(null),T=Y(null),X=Y(null),F=Y(null),J=Y(null);let O,Q=0,ie=null;const{versionsByName:H,error:j}=AC(n,k(()=>Ui(a.value))),U=k(()=>Fo(r)),M=k(()=>{var G;return(G=a.value)==null?void 0:G.roots.find(ve=>ve.id===U.value)}),R=k(()=>_v(r)),D=k(()=>{var G;return(((G=a.value)==null?void 0:G.roots)??[]).map(ve=>ve.id)}),V=k(()=>{var G;return(((G=a.value)==null?void 0:G.roots)??[]).filter(ve=>ve.status==="failed"&&(r.root===void 0||ve.id===r.root)).map(ve=>ve.id)}),_e=k(()=>a.value===null?void 0:gw(a.value.roots,r.root));function Ee(G){var ve;return`${_w((ve=a.value)==null?void 0:ve.scannedAt,G)}
48
+ ${f.value}`}const Te=k(()=>Ee(M.value)),le=k(()=>{var G;return new Map((((G=a.value)==null?void 0:G.roots)??[]).map(ve=>[ve.id,Ee(ve)]))}),me=k(()=>{var G;return(G=a.value)==null?void 0:G.roots.find(ve=>{var _t;return ve.id===((_t=r.selection)==null?void 0:_t.root)})}),W=k(()=>Ee(me.value)),S=k(()=>{var G;return((G=a.value)==null?void 0:G.enrichment.revision)??0}),ne=k(()=>{var G;return new Map((((G=a.value)==null?void 0:G.roots)??[]).map(ve=>[ve.id,Jd(Ee(ve),S.value)]))}),ae=k(()=>{var G;return new Map((((G=a.value)==null?void 0:G.roots)??[]).flatMap(ve=>!ve.actions.available&&ve.actions.reason!==void 0?[[ve.id,ve.actions.reason]]:[]))}),$e=k(()=>`${Te.value}
49
+ ${S.value}`),{nodes:ee,loadedRoot:he,error:L}=RC(n,U,k(()=>r.kinds),$e),$=k(()=>{if(a.value!==null)return r.root!==void 0?$e.value:`${Ui(a.value)??""}
50
+ ${S.value}`}),{rows:C,count:I,error:Ie}=NC(n,k(()=>r.root),k(()=>r.kinds),$),g=$0(n,k(()=>{var G;return((G=a.value)==null?void 0:G.roots)??[]}),k(()=>`${Ui(a.value)??""}
51
+ ${f.value}`));Yi(ea,ta(n)),Yi(ao,g);const E=k(()=>[o.notice??null,d.value,l.value,L.value].filter(G=>G!==null));function A(G){return G instanceof Error?G.message:String(G)}function oe(G){for(const ve of Object.keys(r))ve in G||Reflect.deleteProperty(r,ve);Object.assign(r,G)}function B(G){oe(G.context);const ve=`${window.location.pathname}${Fi(r)}`;G.history==="push"&&ve!==`${window.location.pathname}${window.location.search}`?window.history.pushState(null,"",ve):window.history.replaceState(null,"",ve)}function Z(){oe(Wa(window.location.search))}function ce(G){B(Oo(r,G))}function fe(G){B(bv(r,G))}function de(G,ve){return ve!==void 0&&G.root===ve.root&&G.node===ve.node}function se(G,ve){B(Ga(r,G)),v.value={selection:G,notice:ve},En(ve)}function Se(G){B(Ga(r,G))}function pe(){v.value=null}function Ce(){var G;(G=F.value)==null||G.focusLandmark(),pe()}function xe(G){B(Kr(r,G))}Ne(()=>r.selection,G=>{v.value!==null&&!de(v.value.selection,G)&&pe(),y.value!==null&&!de(y.value,G)&&(y.value=null),m.value!==null&&!de(m.value,G)&&(m.value=null)}),Ne(()=>r.view,G=>{G!=="changes"&&(w.value=null)});function De(G){B(Oo(r,G)),i.detailsCollapsed=!1,y.value=G}function He(){y.value=null}function Be(G){const ve=wv(r,G);B(ve),ve.switchedTo!==void 0&&En(Sk(ve.switchedTo))}function te(G){B(kv(r,G))}function ue(G,ve){B(qa(r,G,ve))}function ke(G){B(Xa(r,G))}function Ue(G,ve){return ve==="changes"?Xa(r,G):qa(r,G,ve)}function Xe(G,ve){return`${window.location.pathname}${Fi(Ue(G,ve).context)}`}function lt(G){B(yv(r,G))}function nt(G){B(as(r,G))}function ct(G){B(Cv(r,G))}async function N(){var G;await st(),(G=J.value)==null||G.focusTitle()}function re(){B($v(r)),N()}function P(){B(Ev(r)),N()}function z(){B(xv(r))}async function ge(){await co(document,()=>{var G;return(G=T.value)==null?void 0:G.focusSelectedTab()})}function Pe(G){nt(G),ge()}function Ze(G,ve){B(as(r,"changes")),w.value={root:G,itemId:ve},ge()}function vt(G){var _t;const ve=(_t=g.index.value.get(G))==null?void 0:_t[0];if(ve!==void 0){Ze(G,ve.id);return}B(as(r,"changes")),ge()}function Hn(){return`${window.location.pathname}${Fi(as(r,"changes").context)}`}function yi(){w.value=null}async function bi(G,ve){var _t;m.value={root:G.root,itemId:ve,node:G.node},B(Oo(r,G)),i.detailsCollapsed=!1,await st(),(_t=X.value)==null||_t.focusWhatToDo()}function ki(){B(Sv(r)),ge()}BC({search:()=>{var G;return(G=b.value)==null?void 0:G.focusSearch()},"toggle-roots":()=>{i.rootsCollapsed=!i.rootsCollapsed},"toggle-details":()=>{i.detailsCollapsed=!i.detailsCollapsed},"view-issues":()=>Pe("issues"),"view-changes":()=>Pe("changes"),"view-explore":()=>Pe("explore"),"view-compare":()=>Pe("compare"),help:()=>{var G;return(G=b.value)==null?void 0:G.openShortcuts()},escape:()=>{var G;return((G=b.value)==null?void 0:G.dismissPopups())??!1}});function uo(G){B(Tv(r,G))}function wi(){uo({kinds:[...tn]})}function es(){const G=a.value;return G===null||ie!==null?!0:G.roots.some(ve=>{var _t;return ve.status==="scanning"||((_t=ve.actions.job)==null?void 0:_t.state)==="running"})||G.enrichment.state==="running"}function $i(){var ve;if(ie===null)return;const G=YC(ie,(ve=a.value)==null?void 0:ve.scannedAt,Date.now());G!=="waiting"&&(ie=null,G==="timed-out"&&(d.value=Eg))}async function K(){window.clearTimeout(O);const G=++Q;try{const ve=await n.scan();if(G!==Q)return;a.value=ve,l.value=null}catch(ve){if(G!==Q)return;if(ve instanceof Kn&&ve.status===401){l.value=$g;return}l.value=Ik(A(ve))}$i(),es()&&(O=window.setTimeout(K,YD))}async function we(){await K(),f.value+=1}async function je(G){d.value=null;try{await n.resolve(G)}catch(ve){d.value=Ck(G,A(ve));return}await K()}async function Ge(){var ve;d.value=null;const G=((ve=a.value)==null?void 0:ve.scannedAt)??null;try{await n.rescan()}catch(_t){d.value=xk(A(_t));return}ie=XC(G,Date.now()),await K()}async function Lt(){d.value=null;try{await n.refreshEnrichment()}catch(G){d.value=Tk(A(G));return}await K()}Ne(i,G=>GC(t(),G));function ts(){window.location.assign(rr(window.location.pathname,window.location.search,{ref:null}))}function Ef(G){const ve=G===ft?null:G;window.location.assign(rr(window.location.pathname,window.location.search,{ref:ve,base:(s==null?void 0:s.ref)??ft}))}return Gt(()=>{window.addEventListener("popstate",Z),s&&(document.title=`${so(s.ref)} · ${document.title}`),K()}),Ot(()=>{window.removeEventListener("popstate",Z),window.clearTimeout(O)}),(G,ve)=>{var _t,aa,la;return c(),u("div",{class:Me(["shell",{"shell--roots-collapsed":i.rootsCollapsed,"shell--details-collapsed":i.detailsCollapsed}])},[ye(uS),ye(OC,{ref_key:"topBar",ref:b,class:"shell__top","repo-path":(_t=a.value)==null?void 0:_t.repoPath,scope:r.root,roots:((aa=a.value)==null?void 0:aa.roots)??[],kinds:r.kinds,enrichment:(la=a.value)==null?void 0:la.enrichment,onPick:Be,onChooseRoot:lt,onShowAllKinds:wi,onRescan:Ge,onCheckAgain:Lt},null,8,["repo-path","scope","roots","kinds","enrichment"]),ye(Dl,{collapsed:i.rootsCollapsed,"onUpdate:collapsed":ve[0]||(ve[0]=on=>i.rootsCollapsed=on),class:"shell__roots",side:"left",landmark:"nav","landmark-label":h(cr),label:h(X_),shortcut:h(z_)},{header:bn(()=>[_("h2",jD,p(h(cr)),1)]),default:bn(()=>[ye(JS,{scan:a.value,"scan-failed":l.value!==null,scope:r.root,selection:r.selection,"health-link-href":Xe,onChooseRoot:lt,onOpenWorkspacePackage:te,onOpenIssues:ue,onOpenChanges:ke,onResolve:je},null,8,["scan","scan-failed","scope","selection"])]),_:1},8,["collapsed","landmark-label","label","shortcut"]),_("main",WD,[h(s)?(c(),Ke(tI,{key:0,source:h(s),onBack:ts},null,8,["source"])):x("",!0),ye(hS,{messages:E.value},null,8,["messages"]),ye(c0,{ref_key:"centerTabs",ref:T,view:r.view,scope:r.root,"issue-count":h(I),"change-count":h(s)?void 0:_e.value,onViewChange:nt},{end:bn(()=>[r.selection?(c(),Ke(rI,{key:0,selection:r.selection,onClear:ki},null,8,["selection"])):x("",!0)]),default:bn(()=>{var on,fo,ho;return[r.view==="issues"?(c(),Ke(VD,{key:0,root:r.root,selection:r.selection,group:r.group,types:r.types,kinds:r.kinds,revision:$.value??"",rows:h(C),"rows-error":h(Ie)??void 0,"actions-revisions":ne.value,"unavailable-roots":ae.value,status:(on=a.value)==null?void 0:on.enrichment,"failed-roots":V.value,"changes-href":Hn,onSelect:ce,onUpdate:De,onReview:Ze,onReviewChanges:vt,onChange:uo,onChangesUpdated:K},null,8,["root","selection","group","types","kinds","revision","rows","rows-error","actions-revisions","unavailable-roots","status","failed-roots"])):r.view==="changes"&&h(s)?(c(),u("div",GD,[_("p",qD,p(h(g_)),1),_("button",{type:"button",class:"button",onClick:ts},p(h(ju)),1)])):r.view==="changes"?(c(),Ke(pO,{key:2,scope:r.root,roots:((fo=a.value)==null?void 0:fo.roots)??[],"scan-loaded":a.value!==null,revisions:le.value,focus:w.value??void 0,onChanged:K,onEdit:bi,onItemFocused:yi},null,8,["scope","roots","scan-loaded","revisions","focus"])):r.view==="explore"?(c(),Ke(uN,{key:3,ref_key:"exploreView",ref:J,mode:r.mode,root:U.value,roots:D.value,"root-summary":M.value,"scan-loaded":a.value!==null,revision:Te.value,anchor:R.value,selected:(ho=r.selection)==null?void 0:ho.node,kinds:r.kinds,"duplicates-only":r.duplicatesOnly,"duplicate-versions":h(H),"duplicates-error":h(j),decorations:h(ee),up:r.up,down:r.down,onModeChange:ct,onSelect:fe,onFocusOn:z,onFiltersChange:uo,onChooseRoot:lt,onRootBusy:we},null,8,["mode","root","roots","root-summary","scan-loaded","revision","anchor","selected","kinds","duplicates-only","duplicate-versions","duplicates-error","decorations","up","down"])):r.view==="compare"?(c(),Ke(AP,{key:4,scope:r.root,base:r.base,"merge-base":r.mergeBase,"enrichment-revision":S.value,onChangeBase:ve[1]||(ve[1]=po=>B(h(pv)(r,po))),onChangeMergeBase:ve[2]||(ve[2]=po=>B(h(vv)(r,po))),onSwap:Ef,onSelect:ve[3]||(ve[3]=(po,Sf)=>ce({root:po,node:Sf}))},null,8,["scope","base","merge-base","enrichment-revision"])):x("",!0)]}),_:1},8,["view","scope","issue-count","change-count"])]),ye(Dl,{ref_key:"detailsLandmark",ref:F,collapsed:i.detailsCollapsed,"onUpdate:collapsed":ve[4]||(ve[4]=on=>i.detailsCollapsed=on),class:"shell__details",side:"right",landmark:"aside","landmark-label":h(Sg),focusable:"",label:h(Y_),shortcut:h(J_)},{header:bn(()=>[_("h2",XD,p(h(q_)),1)]),default:bn(()=>{var on,fo,ho;return[ye(lS,{ref_key:"detailsPanel",ref:X,selection:r.selection,scope:r.root,roots:((on=a.value)==null?void 0:on.roots)??[],"scan-loaded":a.value!==null,revision:W.value,kinds:r.kinds,decorations:h(ee),"decorations-root":h(he),"enrichment-revision":S.value,status:(fo=a.value)==null?void 0:fo.enrichment,"issue-rows":h(C),"issue-rows-error":h(Ie)??void 0,"health-link-href":Xe,notice:(ho=v.value)==null?void 0:ho.notice,"version-focus":y.value??void 0,editing:m.value??void 0,onSelect:ce,onChanged:K,onFollow:se,onChoose:Se,onOpenInRoot:xe,onOpenTrail:re,onOpenTree:P,onOpenIssues:ue,onOpenChanges:ke,onDismissNotice:Ce,onVersionFocused:He,onReview:Ze},null,8,["selection","scope","roots","scan-loaded","revision","kinds","decorations","decorations-root","enrichment-revision","status","issue-rows","issue-rows-error","notice","version-focus","editing"])]}),_:1},8,["collapsed","landmark-label","label","shortcut"])],2)}}});function JD(){try{return window.sessionStorage}catch{return}}function QD(){Hv(JD(),Date.now(),()=>window.location.reload())}Vv(Et(),window.location.search).then(e=>{e.source.kind==="commit"&&Jk(e.source.commit,QD),tv(zD).provide(oo,e).mount("#app")});