@preventive/triage 1.0.0-alpha.76 → 1.0.0-alpha.78

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 (64) hide show
  1. package/common/code-language.js +3 -2
  2. package/common/line-diff.d.ts +2 -0
  3. package/common/line-diff.js +54 -0
  4. package/common/managed/dependency-routes.js +25 -0
  5. package/common/managed/routes.js +9 -12
  6. package/common/pretty-json.js +95 -0
  7. package/common/pretty-print.d.ts +1 -0
  8. package/common/pretty-print.js +6 -0
  9. package/common/whitespace-insensitive.js +19 -0
  10. package/out/activity.js +2 -2
  11. package/out/{chunk-OCE6KQGJ.js → chunk-26W3E5JE.js} +1 -1
  12. package/out/chunk-3S4YWYOM.js +1 -0
  13. package/out/{chunk-OQS2USZM.js → chunk-55YIWY3H.js} +1 -1
  14. package/out/{chunk-IVDE66N5.js → chunk-6VXEPL32.js} +1 -1
  15. package/out/{chunk-XVKDPU4D.js → chunk-6Y6PZ2BU.js} +1 -1
  16. package/out/{chunk-HLMQ7QYS.js → chunk-ATT2QA77.js} +1 -1
  17. package/out/{chunk-2V6Q4ZOZ.js → chunk-B64CTMVU.js} +1 -1
  18. package/out/{chunk-EXQQ5VQJ.js → chunk-BEKYZCPX.js} +1 -1
  19. package/out/{chunk-EYTPAODY.js → chunk-BGLN56X6.js} +1 -1
  20. package/out/{chunk-S2ZIKK45.js → chunk-EEJA7JBI.js} +1 -1
  21. package/out/{chunk-O6FA2R5G.js → chunk-EMNIV37E.js} +1 -1
  22. package/out/{chunk-4IW3VD3H.js → chunk-FSU2PLJL.js} +1 -1
  23. package/out/{chunk-MFAB7P3T.js → chunk-I4YPK32I.js} +1 -1
  24. package/out/{chunk-I6UQQKAH.js → chunk-LVSLM7HB.js} +1 -1
  25. package/out/{chunk-T6EXDRB7.js → chunk-MKX6JODK.js} +1 -1
  26. package/out/{chunk-24LZZYAP.js → chunk-NCJQDKPK.js} +1 -1
  27. package/out/chunk-O2NYWLX3.js +259 -0
  28. package/out/{chunk-62QT2RXR.js → chunk-OWIBDEJJ.js} +1 -1
  29. package/out/{chunk-NEFCZAIY.js → chunk-PKLVXUEI.js} +1 -1
  30. package/out/chunk-QBIUW5EF.js +2 -0
  31. package/out/{chunk-ADMVRLNP.js → chunk-QD3IBSF4.js} +1 -1
  32. package/out/{chunk-GSNSP3EF.js → chunk-RPNO56H2.js} +1 -1
  33. package/out/{chunk-QBFT2DDR.js → chunk-UR4WYMIP.js} +1 -1
  34. package/out/{chunk-UH6NZBSU.js → chunk-VHEXSGGP.js} +1 -1
  35. package/out/{chunk-RHOQDAU4.js → chunk-WB3NRZL7.js} +1 -1
  36. package/out/chunk-XLX6XXJF.js +1 -0
  37. package/out/{chunk-BXQCCW7F.js → chunk-XM4RLC4A.js} +1 -1
  38. package/out/client-managed-import.js +1 -1
  39. package/out/client-managed.js +2 -2
  40. package/out/compare.js +14 -14
  41. package/out/dialogs.js +22 -22
  42. package/out/graph.js +1 -1
  43. package/out/index.html +11 -9
  44. package/out/prism.js +1 -1
  45. package/out/scan.js +2 -2
  46. package/out/terminal.js +7 -7
  47. package/out/view.css +1 -1
  48. package/out/view.js +8 -8
  49. package/package.json +8 -2
  50. package/server-managed/dependency-review-comments.ts +35 -27
  51. package/server-managed/http.ts +13 -11
  52. package/server-managed/npm-delta-worker.js +58 -12
  53. package/server-managed/npm-delta.ts +52 -28
  54. package/server-managed/pretty-copies.ts +22 -0
  55. package/server-managed/pretty-format.d.ts +3 -0
  56. package/server-managed/pretty-format.js +13 -0
  57. package/server-managed/pretty-print.ts +34 -24
  58. package/server-managed/public-workspace.ts +1 -1
  59. package/server-managed/pull-dependency-reviews.ts +23 -12
  60. package/out/chunk-JCIIBLKR.js +0 -1
  61. package/out/chunk-UZC7POI4.js +0 -255
  62. package/out/chunk-W5PRH5D7.js +0 -2
  63. package/out/chunk-WGQ7D5DB.js +0 -1
  64. /package/out/{chunk-Z667U2UJ.js → chunk-SZWPYLPC.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e,d as t,n}from"./chunk-62QT2RXR.js";import{a as r}from"./chunk-IYPY47MC.js";import{d as i,e as a,f as o,i as s,s as c,t as l,v as u,x as d}from"./chunk-ITUKKCCK.js";import{a as f,b as p,c as m}from"./chunk-PWFUOLZK.js";import{a as h,b as ee,c as g}from"./chunk-C4Z6ZBXV.js";import{D as _,E as v,F as te,J as ne}from"./chunk-QRKFPLA4.js";import{b as re,c as y,d as b,f as x,g as S,j as ie}from"./chunk-2XUEZHIP.js";function ae(e){let t=null,n=0,r={module:null,load(){return t??=(n?import(`${e}?retry=${n}`):import(e)).then(e=>r.module=e,e=>{throw t=null,n++,e}),t}};return r}var oe=ae(`./dialogs.js`),C=e=>async(...t)=>(await oe.load())[e](...t),se=C(`openAdvisoryDetailsDialog`),ce=C(`openCommentDialog`),le=C(`openDeleteBundleDialog`),ue=C(`openDeleteReportDialog`),de=C(`openDetachBundleDialog`),fe=C(`openDetachReportDialog`),pe=C(`openDiscardReviewDialog`),me=C(`openDownloadBundleDialog`),he=C(`openExportConfirmDialog`),ge=C(`openExportViewDialog`),_e=C(`openFindingHistoryDialog`),ve=C(`openFindingSourceDialog`),ye=C(`openFixLinkDialog`),be=C(`openImportConflictDialog`),xe=C(`openLeaveWorkspaceDialog`),Se=C(`openLocalContentImportDialog`),Ce=C(`openLocalTriageImportDialog`),we=C(`openManagedCommentsDialog`),Te=C(`openManagedIssueDialog`),Ee=C(`openManagedShareDialog`),De=C(`openNewWorkspaceDialog`),Oe=C(`openNpmCompareAdvisoriesDialog`),ke=C(`openObjstoreRecoveryDialog`),Ae=C(`openPasskeySetupDialog`),je=C(`openPersistenceDegradedDialog`),Me=C(`openReportCompareDialog`),Ne=C(`openRepositoryItemDialog`),Pe=C(`openRevalidationConflictsDialog`),Fe=C(`openStoragePersistDialog`),Ie=C(`openSyncDownloadDialog`),Le=C(`openSyncSuggestDialog`),Re=C(`openSyncUploadDialog`),ze=C(`openTriageComparisonDialog`),Be=C(`openTriageExportDialog`),Ve=C(`openWhyDialog`),He=C(`openWorkspaceExportDialog`),Ue=C(`openWorkspaceShareLinkDialog`),We=C(`openWorkspaceUnlockBundleDialog`),Ge=C(`openWorkspaceUnlockLinkDialog`),Ke=new WeakMap,qe=Symbol(`iteration key`);function Je(e){Ke.set(e,new Map)}function Ye(e,{target:t,key:n,type:r}){r===`iterate`&&(n=qe);let i=Ke.get(t),a=i.get(n);a||(a=new Set,i.set(n,a)),a.has(e)||(a.add(e),e.cleaners.push(a))}function Xe({target:e,key:t,type:n}){let r=Ke.get(e),i=new Set;return n===`clear`?r.forEach((e,t)=>{Ze(i,r,t)}):Ze(i,r,t),(n===`add`||n===`delete`||n===`clear`)&&Ze(i,r,Array.isArray(e)?`length`:qe),i}function Ze(e,t,n){let r=t.get(n);r&&r.forEach(e.add,e)}function Qe(e){e.cleaners&&e.cleaners.forEach($e,e),e.cleaners=[]}function $e(e){e.delete(this)}var w=[],et=!1;function tt(e,t,n,r){if(e.unobserved)return Reflect.apply(t,n,r);if(w.indexOf(e)===-1){Qe(e);try{return w.push(e),Reflect.apply(t,n,r)}finally{w.pop()}}}function T(e){let t=w[w.length-1];t&&(rt(t,e),Ye(t,e))}function E(e){Xe(e).forEach(nt,e)}function nt(e){rt(e,this),typeof e.scheduler==`function`?e.scheduler(e):typeof e.scheduler==`object`?e.scheduler.add(e):e()}function rt(e,t){if(e.debugger&&!et)try{et=!0,e.debugger(t)}finally{et=!1}}function it(){return w.length>0}var at=Symbol(`is reaction`);function ot(e,t={}){let n=e[at]?e:function t(){return tt(t,e,this,arguments)};return n.scheduler=t.scheduler,n.debugger=t.debugger,n[at]=!0,t.lazy||n(),n}function st(e){e.unobserved||(e.unobserved=!0,Qe(e)),typeof e.scheduler==`object`&&e.scheduler.delete(e)}var D=new WeakMap,ct=new WeakMap,lt=Object.prototype.hasOwnProperty;function ut(e){let t=ct.get(e);return it()&&typeof e==`object`&&e?t||Et(e):t||e}function dt(e,t){let n=e.next;return e.next=()=>{let{done:r,value:i}=n.call(e);return r||(t?i[1]=ut(i[1]):i=ut(i)),{done:r,value:i}},e}var ft={has(e){let t=D.get(this),n=Reflect.getPrototypeOf(this);return T({target:t,key:e,type:`has`}),n.has.apply(t,arguments)},get(e){let t=D.get(this),n=Reflect.getPrototypeOf(this);return T({target:t,key:e,type:`get`}),ut(n.get.apply(t,arguments))},add(e){let t=D.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),i=n.add.apply(t,arguments);return r||E({target:t,key:e,value:e,type:`add`}),i},set(e,t){let n=D.get(this),r=Reflect.getPrototypeOf(this),i=r.has.call(n,e),a=r.get.call(n,e),o=r.set.apply(n,arguments);return i?t!==a&&E({target:n,key:e,value:t,oldValue:a,type:`set`}):E({target:n,key:e,value:t,type:`add`}),o},delete(e){let t=D.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),i=n.get?n.get.call(t,e):void 0,a=n.delete.apply(t,arguments);return r&&E({target:t,key:e,oldValue:i,type:`delete`}),a},clear(){let e=D.get(this),t=Reflect.getPrototypeOf(this),n=e.size!==0,r=e instanceof Map?new Map(e):new Set(e),i=t.clear.apply(e,arguments);return n&&E({target:e,oldTarget:r,type:`clear`}),i},forEach(e,...t){let n=D.get(this),r=Reflect.getPrototypeOf(this);return T({target:n,type:`iterate`}),r.forEach.call(n,(t,...n)=>e(ut(t),...n),...t)},keys(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),t.keys.apply(e,arguments)},values(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t.values.apply(e,arguments),!1)},entries(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t.entries.apply(e,arguments),!0)},[Symbol.iterator](){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t[Symbol.iterator].apply(e,arguments),e instanceof Map)},get size(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),Reflect.get(t,`size`,e)}},pt={get(e,t,n){return e=lt.call(ft,t)?ft:e,Reflect.get(e,t,n)}},mt=typeof window==`object`?window:Function(`return this`)(),ht=new Map([[Map,pt],[Set,pt],[WeakMap,pt],[WeakSet,pt],[Object,!1],[Array,!1],[Int8Array,!1],[Uint8Array,!1],[Uint8ClampedArray,!1],[Int16Array,!1],[Uint16Array,!1],[Int32Array,!1],[Uint32Array,!1],[Float32Array,!1],[Float64Array,!1]]);function gt({constructor:e}){return!(typeof e==`function`&&e.name in mt&&mt[e.name]===e)||ht.has(e)}function _t(e){return ht.get(e.constructor)}var vt=Object.prototype.hasOwnProperty,yt=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e==`symbol`));function bt(e,t,n){let r=Reflect.get(e,t,n);if(typeof t==`symbol`&&yt.has(t))return r;T({target:e,key:t,receiver:n,type:`get`});let i=ct.get(r);if(it()&&typeof r==`object`&&r){if(i)return i;let n=Reflect.getOwnPropertyDescriptor(e,t);if(!n||n.writable!==!1||n.configurable!==!1)return Et(r)}return i||r}function xt(e,t){let n=Reflect.has(e,t);return T({target:e,key:t,type:`has`}),n}function St(e){return T({target:e,type:`iterate`}),Reflect.ownKeys(e)}function Ct(e,t,n,r){typeof n==`object`&&n&&(n=D.get(n)||n);let i=vt.call(e,t),a=e[t],o=Reflect.set(e,t,n,r);return e!==D.get(r)||(i?n!==a&&E({target:e,key:t,value:n,oldValue:a,receiver:r,type:`set`}):E({target:e,key:t,value:n,receiver:r,type:`add`})),o}function wt(e,t){let n=vt.call(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return n&&E({target:e,key:t,oldValue:r,type:`delete`}),i}var Tt={get:bt,has:xt,ownKeys:St,set:Ct,deleteProperty:wt};function Et(e={}){return D.has(e)||!gt(e)?e:ct.get(e)||Dt(e)}function Dt(e){let t=_t(e)||Tt,n=new Proxy(e,t);return ct.set(e,n),D.set(n,e),Je(e),n}var Ot=Et;function kt(e){let t=!0,n=ot(()=>{try{e(t)}finally{t=!1}},{lazy:!0});try{n()}catch(e){throw st(n),e}return()=>st(n)}function At(e){if(!e?.startsWith(`#public=`))return null;let t=/^#public=([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/u.exec(e);return t?{id:t[1],token:t[2]}:{id:``,token:``}}var jt=globalThis.location?.hash,Mt=At(jt);globalThis.addEventListener?.(`hashchange`,()=>{let e=globalThis.location?.hash;e?.startsWith(`#public=`)&&e!==jt&&globalThis.location.reload()});function Nt(){return Mt}function Pt(e=Mt){return`/api/shares/${encodeURIComponent(e.id)}/workspace`}function Ft(e,t=Mt){return t?`${e.replace(/#.*$/su,``)}#public=${t.id}.${t.token}`:e}var It=[`admin`,`manage`,`triage`,`view`,`none`];function Lt(e){return typeof e==`string`&&It.includes(e)}function Rt(e,t){let n=It.indexOf(e);return n!==-1&&n<=It.indexOf(t)}function zt(e){return e!=null&&!e.publicShare&&Rt(e.role,`view`)}function Bt(e){return e!=null&&!e.publicShare&&Rt(e.role,`manage`)}var Vt={default:{className:`brand-deepview`,mark:`<path class="fg" d="M7.843 6.719c-1.605 0-2.926 1.292-3.477 1.947.466.58 1.872 2.024 3.496 2.024s2.907-1.292 3.486-2.005c-.627-.703-1.88-1.966-3.505-1.966m.019 3.857c-1.51 0-2.802-1.263-3.353-1.9.55-.617 1.814-1.852 3.334-1.852 1.51 0 2.698 1.12 3.335 1.852-.533.618-1.787 1.9-3.316 1.9m-.019-3.42c-.826 0-1.577.694-1.577 1.596 0 .789.599 1.577 1.577 1.577.893 0 1.587-.684 1.587-1.577-.01-.779-.627-1.596-1.587-1.596m0 3.069a1.476 1.476 0 0 1-1.482-1.473c0-.722.599-1.491 1.482-1.491.846 0 1.482.693 1.492 1.491 0 .808-.618 1.473-1.492 1.473m.01-2.727c-.637 0-1.264.532-1.264 1.244 0 .627.475 1.235 1.245 1.245.684 0 1.254-.522 1.254-1.244 0-.58-.475-1.236-1.235-1.245m-.02 2.403a1.167 1.167 0 0 1-1.149-1.159c0-.532.456-1.14 1.169-1.149.56 0 1.149.427 1.159 1.15 0 .636-.485 1.158-1.179 1.158m-.769-1.833c-.19.238-.275.494-.237.864l.74.057zm1.026-.294c-.295-.057-.665 0-.912.228l.323.607zm.133.047-.38.56.988.114c-.057-.275-.323-.579-.608-.674m-.124.741.456.912c.21-.209.352-.484.314-.836zm-1.225.504a.97.97 0 0 0 .57.617l.399-.551zm.713.664c.313.076.636.01.845-.161l-.295-.618zm-.637 1.55c0 .028-.028.066-.066.066h-.59c-.028 0-.066-.028-.066-.066s.029-.066.067-.066h.579c.048 0 .076.028.076.066m.712 0c0 .028-.028.066-.066.066h-.437c-.028 0-.066-.028-.066-.066s.028-.066.066-.066h.437c.038 0 .066.028.066.066m.666 0c0 .028-.029.066-.067.066h-.37c-.029 0-.067-.028-.067-.066s.029-.066.067-.066h.37c.038 0 .067.028.067.066m-1.672.351c0 .029-.029.067-.067.067h-.295c-.028 0-.066-.028-.066-.066 0-.029.029-.067.067-.067h.294c.038 0 .066.028.066.066m.694 0c0 .029-.028.067-.066.067h-.409c-.028 0-.066-.028-.066-.066 0-.029.028-.067.066-.067h.399c.038 0 .076.028.076.066m.732 0c0 .029-.029.067-.067.067h-.465c-.029 0-.067-.028-.067-.066 0-.029.029-.067.067-.067h.465c.038 0 .067.028.067.066m-1.093.371a.065.065 0 0 1-.067.066h-.627c-.028 0-.075-.028-.066-.066 0-.028.029-.066.067-.066h.627c.038 0 .066.028.066.066m.684 0a.065.065 0 0 1-.066.066h-.39c-.028 0-.076-.028-.066-.066 0-.028.028-.066.066-.066h.39c.038 0 .066.028.066.066M5.088 6.263c-.019-.105-.114-.19-.237-.19s-.257.104-.257.237.105.238.247.238c.105 0 .218-.076.238-.18h.864v.826l.095-.048V6.31c0-.028-.019-.057-.048-.057h-.902zm-.237.19c-.076 0-.143-.066-.143-.143s.066-.142.143-.142.142.066.142.143c.01.076-.066.142-.143.142m2.89-.323H6.38l.418-.475v-.332a.255.255 0 0 0 .218-.248c0-.123-.114-.256-.256-.256s-.266.114-.266.257c0 .123.095.228.209.247v.284l-.456.523v.893l.095-.047v-.742h1.396c.029 0 .067-.009.067-.057 0-.028-.019-.047-.067-.047m-1.13-1.054c0-.076.066-.152.152-.152s.152.066.152.151c0 .076-.066.152-.152.152s-.152-.066-.152-.152m-.836 5.264h-.874c-.019-.105-.114-.219-.247-.219s-.256.105-.256.257c0 .132.114.275.266.275.104 0 .218-.076.237-.19h.827v.608l-.257.285a.3.3 0 0 0-.095-.019c-.133 0-.256.105-.256.228 0 .133.104.238.237.238.124 0 .247-.105.247-.238a.23.23 0 0 0-.057-.152l.285-.304v-.712c0-.029-.019-.058-.057-.058m-1.121.219a.16.16 0 0 1-.152-.161c0-.077.066-.162.152-.162s.152.066.152.152-.066.171-.152.171m.713 1.14c-.076 0-.143-.066-.143-.143s.066-.133.143-.133.142.067.142.143c0 .066-.066.133-.143.133m5.472-1.377a.24.24 0 0 0-.237.208h-1.13c-.029 0-.038.02-.038.048v.712l-.323.39h-.029a.245.245 0 0 0-.247.247c0 .133.114.256.247.256s.247-.113.247-.256a.26.26 0 0 0-.123-.219l.313-.38v-.674h1.083c.019.105.114.2.238.2.133 0 .266-.105.266-.257 0-.133-.105-.276-.266-.276m-1.758 1.767a.15.15 0 0 1-.143-.152c0-.075.067-.142.143-.142s.152.066.152.143a.15.15 0 0 1-.152.151m1.758-1.33a.15.15 0 0 1-.143-.152.147.147 0 0 1 .294.001.15.15 0 0 1-.152.151M8.917 5.55h-.399a.075.075 0 0 1-.076-.076c0-.028.029-.066.067-.066h.418c.028 0 .066.028.066.066s-.038.076-.076.076m.742 0H9.22c-.038 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.437c.038 0 .066.028.066.066s-.028.076-.066.076m.883 0h-.598c-.029 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.598c.028 0 .066.028.066.066s-.028.076-.066.076m-1.282.4h-.741c-.038 0-.076-.029-.076-.067s.028-.076.066-.076h.75c.039 0 .067.038.067.076 0 .029-.028.067-.066.067m.797 0h-.503c-.038 0-.076-.029-.076-.067s.028-.066.066-.066h.513c.038 0 .067.028.067.066 0 .029-.029.067-.067.067m.476 0h-.19c-.039 0-.067-.029-.067-.067s.028-.066.066-.066h.2c.028 0 .066.028.066.066 0 .029-.028.067-.075.067m-1.682.398h-.332c-.039 0-.077-.028-.077-.066s.029-.066.067-.066h.342c.038 0 .076.028.076.066s-.028.066-.076.066m.789 0h-.494c-.038 0-.067-.028-.067-.066s.029-.066.067-.066h.494c.038 0 .066.028.066.066s-.028.066-.066.066m.893 0h-.599c-.038 0-.076-.028-.076-.066s.028-.066.066-.066h.618c.028 0 .066.028.066.066s-.028.066-.076.066m.418.305a.69.69 0 0 0-.674.712c0 .086.019.18.048.257l.085.066c-.028-.085-.057-.171-.057-.304 0-.285.228-.646.598-.646.295 0 .599.228.599.636a.58.58 0 0 1-.599.59.8.8 0 0 1-.237-.048l.123.114a.4.4 0 0 0 .114.01c.39 0 .684-.276.684-.666 0-.313-.266-.712-.684-.722m.353.552-.019-.01-.161.19-.143-.01-.057-.047-.019-.133.19-.2a.28.28 0 0 0-.361.077c-.076.095-.076.209-.038.351l-.247.304.171.152.266-.266c.142.038.285.019.38-.095a.31.31 0 0 0 .038-.313"/>`},"claude-security":{className:`brand-claude`,mark:`<path class="fg" d="${a}"/>`},"codex-security":{className:`brand-codex`,mark:`<path class="fg" d="${o}"/>`},deepsec:{className:`brand-vercel`,mark:`<path class="fg" d="m8 5.97 3.5 6.062h-7Z"/>`},"markdown-generic":{className:`brand-markdown`,mark:`<path class="fg" d="M4 7h1.2l1.2 1.5L7.6 7h1.2v4H7.6V8.8L6.4 10 5.2 8.8V11H4zm5.6 0h1.2v2.3H12l-1.8 1.8-1.8-1.8h1.2Z"/>`},piolium:{className:`brand-piolium`,mark:`<path class="fg" d="M8 6.4 5.6 7.2v2.3c0 1.6 1 2.7 2.4 3.3 1.4-.6 2.4-1.7 2.4-3.3V7.2Z"/>`}},Ht={default:[`#2563eb`,`#fff`],"claude-security":[`#d97757`,`#fff`],"codex-security":[`#fff`,`#000`],deepsec:[`#000`,`#fff`],piolium:[`#fbb829`,`#1c1b19`],"markdown-generic":[`#374151`,`#fff`]},Ut=Object.fromEntries(Object.entries(Vt).map(([e,{className:t,mark:n}])=>{let[r,i]=Ht[e];return[e,`<svg class="file-icon ${t}" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path class="bg" fill="${r}"${e===`codex-security`||e===`deepsec`?` stroke="${i}" stroke-width=".5"`:``} d="M3 2h6l4 4v8H3z"/><path fill="rgba(0,0,0,.18)" d="M9 2v4h4Z"/><g fill="${i}">${n}</g></svg>`]})),Wt=Object.fromEntries(Object.entries(Vt).map(([e,{className:t,mark:n}])=>[e,`<span class="report-logo ${t}" aria-hidden="true"><svg viewBox="${e==="default"?`3.5 4 9 9`:`4 5 8 8`}" width="14" height="14">${n}</svg></span>`]));function Gt(e){let t=e.toLowerCase();if(t.endsWith(`.generic-md`)){let t=e.slice(0,-11);try{return decodeURIComponent(t)}catch{return t}}return t.endsWith(`.codex`)?e.slice(0,-6).replaceAll(`__`,`/`):e}var Kt=ee(class extends g{constructor(e){if(super(e),e.type!==h.PROPERTY&&e.type!==h.ATTRIBUTE&&e.type!==h.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!p(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===x||t===S)return t;let n=e.element,r=e.name;if(e.type===h.PROPERTY){if(t===n[r])return x}else if(e.type===h.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return x}else if(e.type===h.ATTRIBUTE&&n.getAttribute(r)===t+``)return x;return m(e),t}}),qt=b`<path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#3776ab"/><path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#ffd43b" transform="rotate(180 8 8)"/><circle cx="6" cy="2.8" r=".65" fill="#fff"/><circle cx="10" cy="13.2" r=".65" fill="#fff"/>`,Jt=b`<path d="M6.42 2.11 6.81 .49 9.19 .49 9.58 2.11 11.05 2.72 12.47 1.85 14.15 3.53 13.28 4.95 13.89 6.42 15.51 6.81 15.51 9.19 13.89 9.58 13.28 11.05 14.15 12.47 12.47 14.15 11.05 13.28 9.58 13.89 9.19 15.51 6.81 15.51 6.42 13.89 4.95 13.28 3.53 14.15 1.85 12.47 2.72 11.05 2.11 9.58 .49 9.19 .49 6.81 2.11 6.42 2.72 4.95 1.85 3.53 3.53 1.85 4.95 2.72ZM8 3.7a4.3 4.3 0 1 0 0 8.6 4.3 4.3 0 1 0 0 -8.6Z" fill="#c97d5d" fill-rule="evenodd"/><text x="8" y="10.8" text-anchor="middle" fill="currentColor" font-family="serif" font-size="8" font-weight="700">R</text>`,Yt=b`<g fill="#8892bf" transform="translate(0 .5) scale(.5)"><path d="M28 10a4 4 0 0 0-4-4h-6v6a6 6 0 0 1-6 6h-2v2h2v6h4v-6h8v6h4V16h2v-4a2 2 0 0 0-2-2"/><path d="M12 4H8v2a6 6 0 0 0-6 6v6a2 2 0 0 0 2 2v2H2.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5H6a2 2 0 0 0 2-2v-8h4a4 4 0 0 0 4-4V8a4 4 0 0 0-4-4M6 14H4v-2h2Z"/></g>`,Xt=/^(?:(?:un)?licen[cs]e|copying)(?:-[^/.]*)?(?:\.(?:mit|bsd|isc|apache|[al]?gpl|mpl|epl|eupl|cddl|cc0|zlib|psf|boost|bsl|artistic|unicode|ofl|wtfpl|lesser|lib)(?:v?\d[^/.]*|-[^/.]*)?)?(?:\.\d[^/.]*)*(?:\.(?:md|markdown|txt|text|rst|adoc|asciidoc|org))?$/iu,Zt=new Set([`resource:base64`,`directory`,`binary`,`symlink`]),Qt=e=>Zt.has(e);function $t(e,t,n){return n!==null&&n!==`markdown`||Qt(t)?!1:Xt.test(e.slice(e.lastIndexOf(`/`)+1))}function en(e,t){let n=e?.npmBinaries?.get(t);return(e?.kind===`stasis`?e.bundle?.formats?.get(t):void 0)??(n?typeof n.link==`string`?`symlink`:`binary`:void 0)}var tn=e=>e.slice(e.lastIndexOf(`/`)+1),nn=e=>{let t=tn(e),n=t.lastIndexOf(`.`);return n>0?t.slice(n+1).toLowerCase():``},rn=new Set([`gemfile`,`gemfile.lock`,`.ruby-version`]),an=new Set([`node`,`so`,`dylib`,`dll`]);function on(t,n){if(n===`symlink`)return`symlink`;let r=e(t,n);if(r===null&&/\.map$/iu.test(t))return`map`;if($t(t,n,r))return`license`;if([`javascript`,`jsx`].includes(r))return`js`;if([`typescript`,`tsx`].includes(r))return`ts`;let i=nn(t);return[`c`,`cpp`,`objectivec`].includes(r)&&i===`h`?`header`:[`solidity`,`rust`,`php`,`python`,`json`,`markdown`,`css`,`yaml`,`markup`,`java`,`ruby`,`c`,`cpp`].includes(r)?r:r===`bash`?`shell`:r===`objectivec`?`objc`:r===null&&rn.has(tn(t).toLowerCase())?`ruby`:r===null&&tn(t).toLowerCase()===`codeowners`?`owners`:i===`wasm`?`wasm`:an.has(i)?`native`:`generic`}var sn=b`<path d="M1.5 3.4 5.3 2l5.4 1.6 3.8-1.4v10.4l-3.8 1.4-5.4-1.6-3.8 1.4Z" fill="#3fa59a" fill-opacity=".22" stroke="#3fa59a" stroke-width="1.1" stroke-linejoin="round"/><path d="M5.3 2v10.4m5.4-8.8V14" stroke="#3fa59a" stroke-width="1.1"/>`,cn=b`<circle cx="8" cy="2.6" r="1" fill="currentColor"/><path d="M8 3.6v9.9m-3.5 0h7M3 4.6h10M3 4.6 1.2 9.2M3 4.6l1.8 4.6M13 4.6l-1.8 4.6M13 4.6l1.8 4.6" fill="none" stroke="currentColor" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 9.2h4a2 2 0 0 1-4 0Zm10 0h4a2 2 0 0 1-4 0Z" fill="currentColor"/>`,ln=b`<rect x="1" y="1" width="14" height="14" rx="2" fill="#663399"/><text x="14" y="13.2" text-anchor="end" fill="#fff" font-family="sans-serif" font-size="6.4" font-weight="700" letter-spacing="-.2">CSS</text>`,un=b`<path d="M1 11.5v-7h2l1.7 2.3 1.7-2.3h2v7h-2V7.8L4.7 10 3 7.8v3.7Zm10.2-7h2V8H15l-2.8 3.5L9.4 8h1.8Z" fill="var(--green, #3fb950)"/>`,O=(e,t,n=`#fff`)=>t.length>2?b`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="10.6" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="6.2" font-weight="700" letter-spacing="-.2">${t}</text>`:b`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="11.5" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="8" font-weight="700">${t}</text>`,dn={__proto__:null,js:O(`#e6c84f`,`JS`,`#202020`),ts:O(`#3178c6`,`TS`),solidity:b`<path d="m8 1 4 6-4 2-4-2Z" fill="currentColor"/><path d="m4 8 4 2 4-2-4 7Z" fill="currentColor" opacity=".65"/>`,rust:Jt,php:Yt,python:qt,map:sn,markdown:un,license:cn,css:ln,json:b`<path d="M6 2.5C4.6 2.5 4.4 3.3 4.4 4.6v1.6C4.4 7.4 3.8 8 2.6 8c1.2 0 1.8.6 1.8 1.8v1.6c0 1.3.2 2.1 1.6 2.1M10 2.5c1.4 0 1.6.8 1.6 2.1v1.6c0 1.2.6 1.8 1.8 1.8-1.2 0-1.8.6-1.8 1.8v1.6c0 1.3-.2 2.1-1.6 2.1" fill="none" stroke="light-dark(#a26e12, #f2b440)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,yaml:O(`#cb171e`,`YML`),shell:b`<rect x="1.5" y="2.5" width="13" height="11" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><path d="m4.2 6 2 2-2 2m3.3 0h4.2" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>`,markup:b`<path d="M4.8 4.5 1.5 8l3.3 3.5m6.4-7L14.5 8l-3.3 3.5M9.3 3 6.7 13" fill="none" stroke="#e34c26" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,wasm:O(`#654ff0`,`WA`),symlink:b`<path d="M3.5 13.5V9.8a3.3 3.3 0 0 1 3.3-3.3h5.7" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><path d="m10 4 2.6 2.5L10 9" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>`,native:b`<rect x="4" y="4" width="8" height="8" rx="1" fill="none" stroke="currentColor" stroke-width="1.1"/><rect x="6.4" y="6.4" width="3.2" height="3.2" fill="currentColor"/><path d="M6 1.5V4m4-2.5V4M6 12v2.5m4-2.5v2.5M1.5 6H4m-2.5 4H4M12 6h2.5M12 10h2.5" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/>`,java:b`<path d="M5.4 5.8c-.9-1 .9-1.7 0-3M8.4 5.8c-.9-1 .9-1.7 0-3" fill="none" stroke="#e76f00" stroke-width="1.1" stroke-linecap="round"/><path d="M2.5 7h9v3.3A3.7 3.7 0 0 1 7.8 14H6.2a3.7 3.7 0 0 1-3.7-3.7Z" fill="#5382a1"/><path d="M11.5 8.2h.9a1.6 1.6 0 0 1 0 3.2h-1.1" fill="none" stroke="#5382a1" stroke-width="1.1"/>`,objc:O(`#438eff`,`OC`),c:O(`#3949ab`,`C`),cpp:O(`#00599c`,`C++`),header:O(`#607d8b`,`H`),owners:b`<circle cx="11" cy="4.7" r="2" fill="currentColor" opacity=".55"/><path d="M11.3 8.3c2.1.2 3.5 1.9 3.5 4.2h-3.4c-.2-1.7-1-3-2.2-3.8.6-.3 1.3-.4 2.1-.4Z" fill="currentColor" opacity=".55"/><circle cx="6" cy="5.3" r="2.4" fill="currentColor"/><path d="M1.6 13.5c0-2.6 2-4.5 4.4-4.5s4.4 1.9 4.4 4.5Z" fill="currentColor"/>`,ruby:b`<path d="M4.5 2.5h7L14.5 6 8 14 1.5 6Z" fill="#cc342d"/><path d="M1.5 6h13M4.5 2.5 6 6l2 8 2-8 1.5-3.5M6 6l2-3.5L10 6" fill="none" stroke="#fff" stroke-opacity=".55" stroke-width=".7" stroke-linejoin="round"/>`},fn=b`<path d="M4 1.5h5l3 3v10H4Zm5 0v3h3M6 8h4M6 10.5h4" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/>`;function pn(e,t){let n=on(e,t);return y`<svg class="source-file-icon" data-file-type="${n}" width="16" height="16" viewBox="0 0 16 16" style="${f({flex:`none`})}" aria-hidden="true">${dn[n]??fn}</svg>`}var mn=y`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" style="${f({flex:`none`})}" aria-hidden="true"><path d="M1.5 4V2.5h5L8 4h6.5v9h-13Z" stroke-linejoin="round"/></svg>`,hn=y`<svg class="bundle-code-tree-npm" width="12" height="12" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,gn=y`<svg class="bundle-code-tree-soldeer" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7Z" fill="none" stroke="currentColor" stroke-width="1"/><path d="m8 3 2.5 4L8 8.5 5.5 7Zm-2.5 5L8 9.5 10.5 8 8 13Z" fill="currentColor"/></svg>`,_n=y`<svg class="bundle-code-tree-composer" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1 15 4.5v7L8 15l-7-3.5v-7Z" fill="#8892bf"/><path d="m1 4.5 7 3.5 7-3.5M8 8v7M4.5 2.75l7 3.5" fill="none" stroke="var(--surface, #fff)" stroke-width=".9"/></svg>`,vn=y`<svg class="bundle-code-tree-cargo" width="12" height="12" viewBox="9.25 6.14 14 14" aria-hidden="true"><path d="m16.264 11.547 6.2-2.446v8.16l-6.2 2.485Zm0-.019-6.2-2.481v8.123l6.2 2.522Z" fill="#e5ac3d" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m16.277 11.508 6.169-2.435-6.2-2.531-6.2 2.467Z" fill="#e3b04e" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m12.82 10.149 6.196-2.467" fill="none" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m18.301 7.395-6.24 2.484 1.482.593 6.196-2.466z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".04741218643894885px" opacity=".3"/><path d="m13.562 10.47-1.453-.565v1.645l.201-.136.18.285.104.04.138-.121.137.228.129.05.189-.166.238.332.137.053zm-1.423 7.576 1.461.545-.023-1.645-.2.139-.184-.282-.104-.039-.136.123-.14-.226-.131-.049-.186.169-.243-.329-.137-.051z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".06661495224335688px" opacity=".3"/><path d="m21.426 13.49-.172-.039V13.4l.148-.208a.1.1 0 0 0 .018-.065.035.035 0 0 0-.037-.03l-.189.006-.015-.045.118-.222a.07.07 0 0 0 .007-.063.04.04 0 0 0-.045-.018l-.2.051-.024-.037.084-.229a.06.06 0 0 0 0-.058.04.04 0 0 0-.051-.006l-.2.094-.032-.027.047-.227a.05.05 0 0 0-.016-.052.05.05 0 0 0-.056.007l-.2.133-.039-.017.007-.215a.04.04 0 0 0-.026-.043.07.07 0 0 0-.058.02l-.184.166-.045-.006-.033-.2a.036.036 0 0 0-.036-.032.08.08 0 0 0-.057.031l-.164.194-.049.005-.071-.168a.036.036 0 0 0-.044-.021.1.1 0 0 0-.055.042l-.138.214-.05.016-.107-.135a.04.04 0 0 0-.05-.008.1.1 0 0 0-.05.051l-.107.226-.05.026-.138-.1a.05.05 0 0 0-.055 0 .1.1 0 0 0-.044.058l-.071.228-.049.036-.164-.054a.06.06 0 0 0-.057.017.1.1 0 0 0-.036.063l-.033.223-.045.044-.184-.01a.08.08 0 0 0-.058.029.1.1 0 0 0-.026.065l.007.209-.039.05-.2.035a.1.1 0 0 0-.056.04.1.1 0 0 0-.016.065l.046.187-.032.054-.2.079a.1.1 0 0 0-.051.049.07.07 0 0 0 0 .062l.084.157-.024.057-.2.119a.1.1 0 0 0-.045.057.06.06 0 0 0 .007.057l.118.122-.015.058-.189.155a.1.1 0 0 0-.037.062.045.045 0 0 0 .018.05l.148.082v.055l-.172.185a.1.1 0 0 0-.028.065.04.04 0 0 0 .028.041l.172.039v.051l-.148.208a.1.1 0 0 0-.018.065.035.035 0 0 0 .037.03l.189-.006.015.045-.118.222a.07.07 0 0 0-.007.063.04.04 0 0 0 .045.018l.2-.051.024.037-.084.229a.06.06 0 0 0 0 .058.04.04 0 0 0 .051.006l.2-.094.032.027-.046.227a.05.05 0 0 0 .016.051.05.05 0 0 0 .056-.007l.2-.133.039.017-.007.215a.04.04 0 0 0 .026.043.07.07 0 0 0 .058-.02l.184-.166.045.006.033.2a.035.035 0 0 0 .036.032.08.08 0 0 0 .057-.031l.164-.194.049-.005.071.168a.036.036 0 0 0 .044.02.1.1 0 0 0 .055-.042l.138-.214.05-.016.107.135a.04.04 0 0 0 .05.008.1.1 0 0 0 .05-.051l.107-.226.05-.027.138.1a.05.05 0 0 0 .055 0 .1.1 0 0 0 .044-.058l.071-.228.049-.036.164.054a.06.06 0 0 0 .057-.017.1.1 0 0 0 .036-.063l.033-.223.045-.044.184.01a.08.08 0 0 0 .058-.029.1.1 0 0 0 .026-.065l-.007-.209.039-.05.2-.035a.1.1 0 0 0 .056-.04.1.1 0 0 0 .016-.065l-.046-.187.017-.053.2-.079a.1.1 0 0 0 .051-.049.07.07 0 0 0 0-.062l-.084-.157.024-.057.2-.119a.1.1 0 0 0 .045-.057.06.06 0 0 0-.007-.057l-.118-.122.015-.058.189-.155a.1.1 0 0 0 .037-.062.045.045 0 0 0-.018-.05l-.148-.082v-.055l.172-.185a.1.1 0 0 0 .028-.065.04.04 0 0 0-.014-.039m-1.153 1.988c-.066.013-.108-.037-.094-.112a.21.21 0 0 1 .145-.16c.066-.013.108.037.094.112a.21.21 0 0 1-.145.16m-.059-.39a.19.19 0 0 0-.132.146l-.061.325a2.3 2.3 0 0 1-.619.4 1.4 1.4 0 0 1-.632.123l-.061-.273c-.013-.057-.072-.072-.132-.033l-.252.164a1 1 0 0 1-.13-.106l1.226-.521q.022-.007.023-.026v-.455c0-.013-.009-.012-.023-.006l-.359.152v-.288l.388-.165a.16.16 0 0 1 .239.115c.015.057.049.249.072.3s.117.172.217.13l.611-.26.022-.012a3 3 0 0 1-.139.23Zm-1.7 1.13c-.066.043-.131.026-.145-.037a.2.2 0 0 1 .094-.192c.066-.043.131-.026.145.037a.2.2 0 0 1-.09.192Zm-.465-1.779a.18.18 0 0 1-.062.2c-.062.055-.134.056-.161 0a.18.18 0 0 1 .062-.2c.066-.051.138-.053.165 0Zm-.143.416.263-.234a.16.16 0 0 0 .057-.178l-.054-.105.213-.09v1l-.429.182a1.4 1.4 0 0 1-.057-.407c.001-.052.001-.11.011-.168Zm1.152-.587v-.3l.506-.215c.026-.011.185-.047.185.077 0 .1-.122.192-.222.234l-.47.2Zm1.84-.516v.118l-.154.065a.04.04 0 0 0-.022.036v.074a.31.31 0 0 1-.176.3c-.078.043-.165.036-.176-.01-.046-.253-.123-.278-.245-.327a1 1 0 0 0 .308-.578.3.3 0 0 0-.235-.315.57.57 0 0 0-.322.026l-1.592.677a2.7 2.7 0 0 1 .84-.853l.188.127c.042.029.113 0 .157-.063l.21-.3a.94.94 0 0 1 1.027.33l-.144.4c-.025.069 0 .128.057.13l.277.011q.004.073.004.152Zm-1.591-1.044c.049-.069.126-.1.172-.069s.045.113 0 .183-.126.1-.172.069-.044-.114.005-.184Zm1.427.6a.19.19 0 0 1 .161-.133c.062 0 .089.066.062.142a.19.19 0 0 1-.161.133c-.057-.006-.085-.07-.058-.15Z" opacity=".55"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 10.451 11.138)"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 15.013 12.984)"/></svg>`;function yn(e){return e===`composer`?_n:e===`cargo`?vn:e===`soldeer`?gn:hn}var bn=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/iu,xn=200;function Sn(e){let t=[...e];return t.length>xn?`${t.slice(0,xn-1).join(``).trimEnd()}\u2026`:e}var Cn=e=>e.split(`/`).map(encodeURIComponent).join(`/`),wn=(e,t)=>`https://github.com/${Cn(e)}/releases/tag/${Cn(t)}`;function Tn(e,t){return t&&e?.sha===t&&Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`&&e):[]}function En(e,t,n=null){let r=typeof e?.github==`string`&&typeof n==`string`&&n.toLowerCase()===e.github.toLowerCase()?Tn(e,t):[],i=t&&e?.sha===t&&typeof e.details?.subject==`string`?e.details:null;if(i||r.length!==0)return JSON.stringify({tags:r,...i?{title:Sn(i.subject),authorName:i.authorName,authorLogin:i.authorLogin,date:i.committedAt??i.authoredAt}:{}})}function Dn(e,t=``,n=null){let i=[],a=_(e);if(a){let o=[v(e.repo),v({directory:t})].filter(Boolean).join(`/`),s=r(e.repo?.commit),c=Cn(o),l=`https://github.com/${a}`,u=_({repo:{github:n?.github}}),d=u?Tn(n,s):[];i.push({label:`GitHub`,text:a+(o?`/${o}`:``),href:s||o?`${l}/tree/${s??`HEAD`}${c?`/${c}`:``}`:l,...s?{commit:{hash:s,text:s.slice(0,7),href:`${l}/commit/${s}`,...d.length>0?{tags:d.map(e=>({name:e,href:wn(u,e)}))}:{}}}:{}})}let o=e?.package?.npm;if(typeof o?.name==`string`&&bn.test(o.name)){let e=typeof o.version==`string`?o.version.trim():``;i.push({label:`npm`,text:o.name+(e?`@${e}`:``),href:`https://www.npmjs.com/package/${o.name}${e?`/v/${encodeURIComponent(e)}`:``}`})}return i}function On(e){if(e?.kind===`sourcemap`)return t(e);let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;for(let t of e.bundle.imports.values())for(let[e,r]of t){n.has(e)||n.set(e,new Set);for(let t of r.values()){let r=typeof t==`string`?[t]:t instanceof Map?t.values():[];for(let t of r)typeof t==`string`&&n.get(e).add(t)}}return n}var kn=e=>[...n(e)].filter(([,e])=>e!=null).map(([e])=>e);function An(e,t){let n=new Map,r=e?.kind===`stasis`?e.bundle?.reason:null;if(!r||typeof r!=`object`||Array.isArray(r))return n;let i=new Set(t??kn(e));for(let[e,t]of Object.entries(r).toSorted(([e],[t])=>e.localeCompare(t))){if(!e||!Array.isArray(t))continue;let r=new Set(t.filter(e=>typeof e==`string`&&i.has(e)));r.size>0&&n.set(e,r)}return[...n.values()].some(e=>e.size<i.size)||n.clear(),n}function jn(e,t){let n=t&&[...t],r=An(e,n),i=e?.kind===`stasis`?[...e.bundle?.entries??[]]:[],a=new Set(i.length>1?n??kn(e):[]),o=new Set(i.filter(e=>a.has(e))),s=Object.values(e?.bundle?.reason??{}).filter(Array.isArray);(o.size<2||s.length>0&&!s.some(e=>new Set(e.filter(e=>o.has(e))).size>1))&&o.clear();let c=[...[...r.keys()].map(e=>`reason:${e}`),...[...o].toSorted().map(e=>`entry:${e}`)];return{ids:c,has:e=>c.includes(e),files(t){if(!c.includes(t))return null;if(t.startsWith(`reason:`))return r.get(k(t));let n=On(e),i=new Set([k(t)]);for(let e of i)for(let t of n.get(e)??[])i.add(t);return new Set([...i].filter(e=>a.has(e)))}}}var k=e=>e.slice(e.indexOf(`:`)+1),Mn=e=>e.ids.map(e=>({id:e,label:k(e)})),Nn=y`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" aria-hidden="true" viewBox="0 75 405 400"><path fill="currentColor" d="m62 447.6 65.8-68.2c2.2-.9 22.7 12 28.2 14.1C295.4 446.8 399.2 263.6 285.1 172 184.3 91.1 41.1 191.5 82 315.6c3.9 12 10.8 21.7 15.4 33.2l-47.1 47C-32 294.9 7.4 142.3 126.3 91.3 241.3 42 374.4 112 398 234.5c29.4 152.7-116.5 274.9-262.7 223.6-15.9-5.6-17-10.6-34.9-10.6H62Z"/><path fill="#e02129" d="M190.1 181.8c128.8-15 141.2 170.8 26 182.6-126.4 12.9-137.9-169.5-26-182.6M209 236c-7.4 5.6-10.8-5.4-13-7.7-9.6-10.3-19.4-.8-14 1.7s9.5-.3 10.1 5.6-9 9.9-7.9 16.4c13.2-5.9 25.9-6.4 39.1 0 3.2-7.1-7.9-12.1-7.8-14.8.1-9.4 11.6-6.2 12.6-7.2 4.3-4.3-8.9-11.7-17.1-.6-1.3 1.8-1.4 6.3-1.9 6.6zm-7.6 14.3c-10.1-1.5-19.3 10-25 11.8s-23.2 1.5-14.9 16.3c3.9.8 5.1-13.1 13.3-9.4 1.9 13.1-2.8 8.7-9 12.2-10 5.7-8.1 20.2-1.3 12.8 2.7-3 1.5-9.6 10.3-7.7 1.3 15.9-.8 8.4-7.9 11.7-11.5 5.3-9 20.2-1.7 14.8s0-10.8 8.6-9.3c1 .2 5.8 10.8 12.4 14.5 13.7 7.9 35 5.5 44.8-7.6s1.6-6.5 1.8-6.7c4-3.1 11.3 4.6 11 9.2l5.5-1.5c2.2-3.1-1.6-8.2-3.9-10.3-7.6-6.8-13.5.9-11-14.8 9-2.6 8.4 8.7 9.4 9.4 6 4.2 8.4-7.8 1.5-13.2-7.4-5.8-13.2 3.6-10.9-13.4 7.4-1.3 8.3 3.2 9.4 9.4 8.3 1.4 6.9-7.2 3.1-11.8-4.5-5.5-10.5-2.6-15.7-4.7-1.3-.5-25.1-18.8-25.1-9.4v52.5c-1.5.6-4.7-1.4-4.7-2.3z"/><ellipse cx="206.6" cy="270" fill="#e02129" rx="74.6" ry="66.5"/><path fill="#fff" d="M200.6 250v55.5s.4 1 .5 1.1c1.1 1.8 3.7 1.8 4.9 0 .1-.2.5-1.1.5-1.3v-55.4a34 34 0 0 1 17.2 5.8c3.1 2.2 5.6 5.1 7.7 8.3 3.8.1 7.6-.5 11.3.8 5.2 1.8 9.6 7.5 9.6 13.1 0 4.2-5.8 5.3-7.3 1.5-.7-1.8-.3-3.2-1.7-5-.8-1-3-2.7-4.3-2.7h-4.5c1.1 4.1.8 8.4.8 12.6.1.1 1.7-.1 2-.1 7.3 0 13.9 6 14.4 13.5.3 5.3-6.3 6-7.5 1.8-.6-2.1-.3-3.5-2-5.3-.8-.9-2.9-2.2-4.2-2.2h-3c.2 1 .2 2.2.1 3.2 0 2.1-.4 4.3-.9 6.4-.2.9-.5 1.8-.7 2.6 5.5-.7 10.5.7 14.1 5 1.7 2 3.4 5.6 3.6 8.3.5 5.4-6.6 6.7-7.8 1.2-.5-2.3-.7-3.8-2.7-5.4-3.1-2.5-7-1.2-10.7-1.4-1.9 3.2-4.5 6.1-7.5 8.4-14.4 10.8-36.9 7.2-46.2-8.4-.4-.2-2.4 0-2.9 0-3.2 0-6-.6-8.4 2.1-1.6 1.8-1.5 3.2-2.1 5.3-1.2 4.5-7.9 3.6-7.7-1.4.3-5.5 4.9-11.3 10.1-13 1.7-.5 5.7-1 7.4-.6.1 0 .1.1.1-.1 0-1.1-.7-2.8-.9-4.1-.4-2.7-.6-5.4-.4-8.1-2.8-.1-5.3.2-7.2 2.5-1.4 1.7-1.3 2.9-1.8 4.9-1.1 4.4-7.9 3.8-7.6-1.5.2-4.1 2.9-8.7 6.3-11 3-2.1 6.5-2.7 10.1-2.6v-5.8c.2-2.2.3-4.5.9-6.6h-4.5c-1.8 0-4.2 2.2-4.9 3.7-1.1 2.3-.4 6-4.1 6.3-3.4.3-4.5-2.3-4.1-5.2.9-6.1 5.1-11 11.3-12.2 3.1-.6 6.2 0 9.3-.4 2.2-3.1 4.8-6 7.9-8.3 4.9-3.5 10.9-5.1 16.8-5.8Z"/><path fill="#fff" d="M197.3 235.1c4.1-.7 8.3-.9 12.4 0 1.1-7.6 7-14.6 15.2-14 3.3.2 5.7 3.1 3.6 6.1-1.5 2-4.1 1-6.2 1.7s-3.7 2.5-4.5 4.4c-.3.7-1.2 3.8-.9 4.3 0 .1 1.3 1 1.6 1.2 3.4 3.1 6.2 7.4 6.6 12 0 .6-.1 1.2.1 1.8-.1.1-2.6-1.5-2.9-1.8-10.5-6-27.5-5.7-37.9.4-.2.1-2.3 1.6-2.4 1.5-.2-5.5 2.8-10.5 6.8-14 .3-.3 1.3-.9 1.5-1.1.1-.1.1-.2.1-.3 0-.5-.3-1.8-.5-2.3-.9-3.3-3-6-6.6-6.3h-2.2c-4.2-.4-4.5-6.5-.2-7.4 2.3-.5 5.2 0 7.3 1 5.2 2.2 8.5 7.4 9.1 12.9Z"/></svg>`,Pn=new Map([[`registry`,{label:`Source: npm registry`,icon:hn}],[`repository`,{label:`Source: GitHub repository`,icon:i(d)}],[`osv`,{label:`Source: OSV`,icon:Nn}]]),Fn=e=>Pn.get(e)?.icon??null;function In(e){return e===`unknown`?`Unrated`:e.charAt(0).toUpperCase()+e.slice(1)}function Ln(e){if(typeof e!=`string`)return null;let t=/\/(GHSA-[a-z0-9-]+)(?:[/?#]|$)/iu.exec(e);return t?t[1]:null}var Rn=y`<svg class="external-link-icon" viewBox="0 0 16 16" width="11" height="11" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 13L13 3"/><path d="M5 3h8v8"/></svg>`;function zn(e){let t=/^CWE-(\d+)$/u.exec(e);if(!t)return y`<span>${e}</span>`;let n=`https://cwe.mitre.org/data/definitions/${t[1]}.html`;return y`<a class="bundle-advisory-cwe" href="${n}" target="_blank" rel="noopener noreferrer">${e}</a>`}function Bn(e,t){return y`<div class="bundle-advisory-rail"><span class="${`bundle-advisory-severity sev-${e}`}">${In(e)}</span> ${typeof t==`number`?y`<span class="bundle-advisory-cvss-score">CVSS <span class="mono">${t.toFixed(1)}</span></span>`:S}</div>`}function Vn(e){let t=typeof e.url==`string`&&/^https?:\/\//iu.test(e.url)?e.url:null,n=e.ghsa??Ln(t)??(typeof e.id==`string`?e.id:null),r=Pn.get(e.source);return!r&&!(n&&t)?S:y`<span class="bundle-advisory-reference">${r?y`<span class="bundle-advisory-source" role="img" aria-label="${r.label}">${r.icon}</span>`:S} ${n&&t?y`<a class="bundle-advisory-ghsa" href="${t}" target="_blank" rel="noopener noreferrer">${n}${Rn}</a>`:S}</span>`}function Hn(e){let t=Array.isArray(e)?e.filter(e=>typeof e==`string`):[];return t.length>0?y`<span class="bundle-advisory-cwes">${t.map((e,t)=>y`${t===0?``:`, `}${zn(e)}`)}</span>`:S}function Un(e,t=null){let n=typeof e.cvss?.vectorString==`string`?e.cvss.vectorString:``,r=typeof e.vulnerable_versions==`string`?e.vulnerable_versions:null,i=Array.isArray(e.versions)?e.versions.filter(e=>typeof e==`string`):[];return y`<li class="bundle-advisory-row">${Bn(e.severity,e.cvss?.score)}<div class="bundle-advisory-body"><div class="bundle-advisory-header">${t&&typeof e.details==`string`&&e.details.trim()?y`<button type="button" class="bundle-advisory-title" aria-haspopup="dialog" @click="${()=>t(e)}">${e.title}</button>`:y`<span class="bundle-advisory-title">${e.title}</span>`} ${Vn(e)}</div><div class="bundle-advisory-subrow"><div class="bundle-advisory-meta">${e.informational?y`<span>${e.informational}</span>`:S} ${r?y`<span>Affected <span class="mono">${r}</span></span>`:S} ${i.length>0?y`<span>Matches <span class="mono">${i.join(`, `)}</span></span>`:S} ${Hn(e.cwe)}</div>${n?y`<div class="bundle-advisory-cvss-vector mono">${n}</div>`:S}</div></div></li>`}function Wn(e,t){let n=te(e);if(n===null)return null;let r=t.replace(/\.(?:md|markdown)$/iu,``),i=new Set;return n.map(({displayName:e,data:t})=>{let n=`${r}: ${e}`.replaceAll(`%`,`%25`).replaceAll(/[\\/\p{Cc}]/gu,`_`)+`.generic-md`;if(i.has(n))throw Error(`Markdown (generic): products produce the same report name: ${n}`);return i.add(n),{name:n,content:JSON.stringify(t)}})}var Gn=`...`,Kn=120;function qn(e){for(let t of(ne(e)??[]).flat()){let e=t?.description;typeof e==`string`&&e.length===Kn&&e.endsWith(Gn)&&(t.description=`${e.slice(0,-Gn.length)}\u2026`)}return e}var Jn=ae(`./scan.js`),Yn=()=>Jn.load(),Xn=[[`manage`,`Overview`],[`manage-bundles`,`Bundles`],[`manage-scans`,`Scans`],[`manage-reports`,`Reports`],[`manage-deduplication`,`Deduplication`,`admin`],[`manage-repos`,`Repositories`,`admin`],[`manage-repo-risk`,`Risk`,`admin`],[`admin-users`,`Users`,`admin`],[`manage-teams`,`Teams`,`admin`],[`manage-import`,`Import`,`admin`],[`manage-links`,`Links`],[`manage-history`,`History`]];function Zn(e,t={}){document.dispatchEvent(new CustomEvent(`managed-admin-navigate`,{detail:{view:e,...t},bubbles:!0,composed:!0}))}function Qn(e,t,n=!1){return y`<header class="manage-header"><nav class="manage-nav" aria-label="Management pages">${Xn.filter(([e,,r])=>(r==null||r===t)&&(e!==`manage-links`||n)).map(([t,n])=>y`<button type="button" aria-current="${e===t?`page`:S}" @click="${()=>Zn(t)}">${n}</button>`)}</nav></header>`}var $n={bundle:s,report:l,preview:l,scan:c,code:u},er={users:`M10.75 4.75a2.75 2.75 0 1 1-5.5 0 2.75 2.75 0 0 1 5.5 0ZM3 14v-1.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5V14`,team:`M8.5 5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM1.5 14v-1.5A3.5 3.5 0 0 1 5 9h2a3.5 3.5 0 0 1 3.5 3.5V14M11 2.75a2.5 2.5 0 0 1 0 4.5m1 2a3 3 0 0 1 2.5 3V14`,repo:`M3 12.5V3a1.5 1.5 0 0 1 1.5-1.5H13v13H4.5a1.5 1.5 0 0 1 0-3H13M7 1.5v6l2-1.5 2 1.5v-6`,history:`M2 5a6.25 6.25 0 1 1-.25 5M1.5 1.5V5H5M8 4.5V8l3 1.5`,arrow:`M3 8h10M9 4l4 4-4 4`,show:`M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Zm9 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0`,hide:`m2 2 12 12M6 3.75A8 8 0 0 1 8 3.5c4.5 0 7 4.5 7 4.5a12 12 0 0 1-2 2.5M3.5 5A13 13 0 0 0 1 8s2.5 4.5 7 4.5a8 8 0 0 0 3-.6`,download:`M8 2v8M5 7l3 3 3-3M2 11v3h12v-3`,upload:`M8 11V2m-3 3 3-3 3 3M2 10v4h12v-4`,confirmed:`M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM5.25 8.25l1.9 1.9 3.6-3.9`};function tr(e){return $n[e]?i($n[e]):y`<svg class="${e===`repo`?`repo-icon`:S}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${er[e]??er.repo}"></path></svg>`}function nr(e,t,n){let r=e[0].getBoundingClientRect().top,i=1;for(;i<e.length&&Math.abs(e[i].getBoundingClientRect().top-r)<1;)i++;if(i===1&&(n===`ArrowLeft`||n===`ArrowRight`))return t;let a=t+{ArrowLeft:-1,ArrowRight:1,ArrowUp:-i,ArrowDown:i}[n];if(a<0)return n===`ArrowUp`?-1:t;let o=Math.floor((e.length-1)/i);return a<e.length?a:Math.floor(t/i)<o?e.length-1:t}function rr(e,t,{text:n=e=>e.label,sorted:r=!0,pinned:i=[]}={}){let a=t.normalize(`NFKC`).toLocaleLowerCase().trim().split(/\s+/u).filter(Boolean),o=e.filter(e=>a.every(t=>n(e).normalize(`NFKC`).toLocaleLowerCase().includes(t))),s=r?o.toSorted((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0,sensitivity:`base`})):o;return{pinned:i,sections:[{label:null,options:s}],facets:[],showFacets:!1,count:s.length,total:e.length}}var ir=class extends ie{static properties={options:{attribute:!1},value:{attribute:!1},label:{type:String},placeholder:{type:String},disabled:{type:Boolean},_query:{state:!0},_facet:{state:!0},_open:{state:!0}};static styles=re`:host{display:block;min-width:0}:host,.menu{-webkit-app-region:no-drag;app-region:no-drag}*{box-sizing:border-box}button,input{font:inherit;color:var(--text)}button{cursor:default;user-select:none}.trigger{display:flex;align-items:center;gap:.6rem;width:100%;height:2rem;padding:.28rem .5rem;border:1px solid var(--border);border-radius:var(--ui-radius, 5px);background:var(--bg);text-align:left;font-size:.76rem}.trigger:hover:not(:disabled){border-color:var(--muted)}.trigger:disabled{opacity:.5}:host([variant=filter]){display:inline-block;max-width:min(20rem,100%)}:host([variant=filter]) .trigger{height:30px;min-width:8.5rem;background:transparent;font-size:.8rem;font-weight:500;border-radius:var(--ui-radius, 4px)}.name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option-copy{flex:1;min-width:0;display:grid;gap:.08rem}.secondary{color:var(--muted);font-size:.64rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.secondary.is-warning{color:var(--warning);font-weight:600}.detail.is-noted{padding:0 .35rem;border-radius:3px;color:var(--accent);background:rgb(from var(--accent) r g b / .13);font-weight:600}.avatar{display:grid;place-items:center;flex:0 0 1.5rem;width:1.5rem;height:1.5rem;border-radius:50%;color:var(--accent);background:rgb(from var(--accent) r g b / .13);font-family:sans-serif;font-size:.62rem;font-weight:600}.detail,.count{flex:0 0 auto;color:var(--muted);font-size:.66rem;font-variant-numeric:tabular-nums;white-space:nowrap}svg{flex:0 0 auto;width:.9rem;height:.9rem;color:var(--muted)}.menu{visibility:hidden;position:fixed;inset:auto;margin:0;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);background:var(--bg);color:var(--text);box-shadow:0 .6rem 1.6rem #0006;user-select:none}.menu:popover-open{display:flex;flex-direction:column}.menu[data-positioned]{visibility:visible}.search{display:flex;align-items:center;gap:.5rem;flex:0 0 auto;padding:.55rem .65rem;border-bottom:1px solid var(--border)}input{flex:1;min-width:0;width:0;padding:.15rem 0;border:0;background:transparent;font-size:.78rem;outline:none}input::placeholder{color:var(--muted)}.search:focus-within{box-shadow:inset 0 -2px var(--accent)}.body{display:flex;min-height:0;flex:1}.facets{width:10.5rem;flex:0 0 auto;padding:.35rem;overflow:auto;overscroll-behavior:none;border-right:1px solid var(--border);background:rgb(from var(--bg) r g b / .25)}.org{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .45rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.7rem}.org[aria-pressed=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.results{flex:1;min-width:0;overflow:auto;overscroll-behavior:none;padding:.3rem}.group+.group{margin-top:.35rem;padding-top:.35rem;border-top:1px solid var(--border)}.heading{position:sticky;top:-.3rem;z-index:1;display:flex;align-items:center;gap:.4rem;margin:0;padding:.4rem .5rem;color:var(--muted);background:var(--bg);font-size:.68rem;font-weight:600}.heading svg{width:.8rem;height:.8rem}.option{display:flex;align-items:center;gap:.65rem;width:100%;padding:.35rem .5rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.76rem}.option svg{width:.8rem;height:.8rem;opacity:0;color:var(--accent)}.option[aria-selected=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.option[aria-selected=true] svg{opacity:1}.option:disabled{opacity:.45}.option:hover:not(:disabled),.org:hover{background:rgb(from var(--text) r g b / .05)}.pinned{padding-bottom:.25rem;margin-bottom:.25rem;border-bottom:1px solid var(--border)}.empty{margin:0;padding:1.3rem .7rem;color:var(--muted);font-size:.76rem}button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}@media(max-width:40rem){.facets{width:8.5rem}}@media(max-width:28rem){.facets{width:7rem}.option{gap:.35rem}}:host-context(body.theme-w95){.trigger,.trigger:hover:not(:disabled){height:23px;padding:0 1px 0 4px;gap:4px;border:0;border-radius:0;background:#fff;box-shadow:var(--w95-sunken);font-size:11px;font-weight:400}.trigger>svg:last-child{width:16px;height:19px;padding:3px 2px;background:var(--w95-face);box-shadow:var(--w95-raised);color:#000}.menu{border:1px solid #000;border-radius:0;box-shadow:none;font-size:11px}.search{border-bottom:0;box-shadow:inset 0 -1px var(--w95-shadow)}.search:focus-within{box-shadow:inset 0 -1px var(--w95-shadow)}:is(.option,.org){border-radius:0;font-size:11px}:is(.option,.org):is(:hover:not(:disabled),[aria-selected=true],[aria-pressed=true]){background:var(--w95-title);color:#fff;.secondary,svg,.detail,.count{color:#fff}}.avatar{border-radius:0}& button:focus-visible{outline:1px dotted #000;outline-offset:-2px}}:host-context(body.theme-w95) *{overscroll-behavior:none}`;constructor(){super(),this.options=[],this.value=null,this.label=`Choose`,this.placeholder=`Choose`,this.disabled=!1,this._query=``,this._facet=null,this._open=!1,this._menuHeight=null,this._onViewport=()=>this._position()}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent(`tooltip-root-connected`,{bubbles:!0,composed:!0})),window.addEventListener(`resize`,this._onViewport),window.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots=[];for(let e=this.getRootNode();e.host;e=e.host.getRootNode())e.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots.push(e)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`resize`,this._onViewport),window.removeEventListener(`scroll`,this._onViewport,!0);for(let e of this._scrollRoots??[])e.removeEventListener(`scroll`,this._onViewport,!0);this._scrollRoots=[]}render(){let e=this.options.find(e=>e.value===this.value),t=this.choices(),n=[...t.pinned,...t.sections.flatMap(e=>e.options)].filter(e=>!e.disabled),r=n.find(e=>e.value===this.value)?.value??n[0]?.value;return y`<button type="button" class="trigger" popovertarget="selector-menu" aria-label="${this.label}" aria-haspopup="dialog" aria-expanded="${this._open}" ?disabled="${this.disabled}">${e?this.optionIcon(e):S}<span class="name" data-tooltip-truncated data-tooltip="${e?.label??S}">${e?.label??this.placeholder}</span>${e?.detail?y`<span class="${e.detailNote?`detail is-noted`:`detail`}" ?data-tooltip-truncated="${!e.detailNote}" data-tooltip="${e.detailNote??e.detail}">${e.detail}</span>`:S} <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg></button><div class="menu" id="selector-menu" popover="auto" role="dialog" aria-label="${this.label}" @beforetoggle="${this._beforeToggle}" @toggle="${this._toggle}" @keydown="${this._keyDown}"><div class="search"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><circle cx="7" cy="7" r="4.5"/><path d="m10.5 10.5 3.5 3.5"/></svg> <input type="search" placeholder="${`${this.searchLabel}\u2026`}" aria-label="${this.searchLabel}" aria-controls="selector-options" .value="${Kt(this._query)}" @input="${e=>{this._query=e.target.value}}"> <span class="count" role="status">${t.count}${t.count===t.total?``:` / ${t.total}`}</span></div><div class="body">${t.showFacets?y`<div class="facets" role="group" aria-label="${this.facetLabel}"><button type="button" class="org" aria-pressed="${t.activeFacet==null}" @click="${()=>this._filterFacet(null)}"><span class="name">${this.allFacetsLabel}</span><span class="count">${t.total}</span></button> ${t.facets.map(e=>y`<button type="button" class="org" aria-pressed="${t.activeFacet===e.value}" @click="${()=>this._filterFacet(e.value)}"><span class="name" data-tooltip-truncated data-tooltip="${e.name}">${e.name}</span><span class="count">${e.count}</span></button>`)}</div>`:S}<div class="results" id="selector-options" role="listbox" aria-label="${this.optionsLabel}">${t.pinned.length>0?y`<div class="pinned">${t.pinned.map(e=>this._option(e,!1,r))}</div>`:S} ${t.sections.map((e,t)=>y`<div class="group" role="group" aria-labelledby="${e.label?`selector-group-${t}`:S}">${e.label?y`<h3 class="heading" id="${`selector-group-${t}`}">${e.organization?y`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M3 14V3h6v11M9 7h4v7M1 14h14M5 6h2M5 9h2M5 12h2"/></svg>`:S}${e.label}</h3>`:S} ${e.options.map(t=>this._option(t,e.organization,r))}</div>`)} ${t.count?S:y`<p class="empty">${this.options.length>0?this.noMatchesLabel:this.emptyLabel}</p>`}</div></div></div>`}choices(){return rr(this.options,this._query)}get menuWidth(){return 360}optionIcon(e){return e.initials?y`<span class="avatar" aria-hidden="true">${e.initials}</span>`:S}optionTooltip(e){return e.label}_option(e,t,n){let r=e.displayLabel??(t?e.name:e.label),i=this.optionTooltip(e);return y`<button type="button" class="option" role="option" ?data-reset="${e.reset}" ?disabled="${e.disabled}" aria-label="${e.label}" aria-selected="${e.value===this.value}" tabindex="${e.value===n?0:-1}" @click="${()=>this._pick(e.value)}"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m3 8 3 3 7-7"/></svg>${this.optionIcon(e)}<span class="option-copy"><span class="name" ?data-tooltip-truncated="${r===i}" data-tooltip="${i}">${r}</span>${e.secondary?y`<span class="${e.secondaryWarning?`secondary is-warning`:`secondary`}" ?data-tooltip-truncated="${!e.secondaryWarning}" data-tooltip="${e.secondaryWarning??e.secondary}">${e.secondary}</span>`:S}</span>${e.detail?y`<span class="${e.detailNote?`detail is-noted`:`detail`}" data-tooltip="${e.detailNote??S}">${e.detail}</span>`:S}</button>`}updated(e){this.disabled&&this._open&&this._close(!1),e.has(`options`)&&(this._menuHeight=null),this._position(),(e.has(`_query`)||e.has(`_facet`))&&(this.renderRoot.querySelector(`.results`).scrollTop=0)}_beforeToggle(e){this._open=e.newState===`open`,delete e.target.dataset.positioned,this._open&&(this._query=``,this._facet=null,this._menuHeight=null)}async _toggle(e){e.newState===`open`&&(await this.updateComplete,this._open&&this.isConnected&&(this._position(),this.renderRoot.querySelector(`input`).focus({preventScroll:!0})))}_position(){let e=this.renderRoot.querySelector(`.menu`);if(!e?.matches(`:popover-open`))return;let t=this.renderRoot.querySelector(`.trigger`).getBoundingClientRect(),n=e.querySelector(`.facets`)!=null,r=Math.min(Math.max(t.width,n?560:this.menuWidth),window.innerWidth-16),i=window.innerHeight-t.bottom-8-4,a=t.top-8-4;e.style.width=`${r}px`,this._menuHeight??=Math.min(480,e.querySelector(`.search`).offsetHeight+Math.max(e.querySelector(`.results`).scrollHeight,e.querySelector(`.facets`)?.scrollHeight??0)+2);let o=this._menuHeight,s=i<o&&a>i;e.style.maxHeight=`${Math.max(0,Math.min(o,s?a:i))}px`,e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-r-8))}px`,e.style.top=`${Math.max(8,s?t.top-e.offsetHeight-4:t.bottom+4)}px`,e.dataset.positioned=``}_filterFacet(e){this._facet=e,this.renderRoot.querySelector(`input`).focus({preventScroll:!0})}_keyDown(e){if(e.stopPropagation(),e.key===`Escape`){e.preventDefault(),this._close();return}let t=this.renderRoot.querySelector(`input`),n=this.renderRoot.activeElement,r=[...this.renderRoot.querySelectorAll(`.option:not(:disabled)`)],i=r.indexOf(n);if(n!==t&&i<0)return;if(e.key===`Enter`&&n===t){e.preventDefault(),(this.renderRoot.querySelector(`.option:not([data-reset]):not(:disabled)`)??r[0])?.click();return}let a;if(n===t){if(e.key===`ArrowDown`)a=0;else if(e.key===`ArrowUp`)a=-1;else return}else if(e.key.startsWith(`Arrow`))a=nr(r,i,e.key);else if(e.key===`Home`)a=0;else if(e.key===`End`)a=r.length-1;else if(e.key.length===1&&e.key!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault(),this._query+=e.key,t.focus();return}else return;e.preventDefault();for(let[e,t]of r.entries())t.tabIndex=e===a?0:-1;a<0?t.focus():r[a]?.focus()}_pick(e){this.disabled||!this.options.some(t=>t.value===e&&!t.disabled)||(this._close(),this.dispatchEvent(new CustomEvent(this.changeEvent,{detail:{value:e},bubbles:!0,composed:!0})))}_close(e=!0){this.renderRoot.querySelector(`.menu`).hidePopover(),this._open=!1,e&&this.renderRoot.querySelector(`.trigger`).focus({preventScroll:!0})}};function ar(e){if(/^https?:\/\//iu.test(e)){try{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);if(n.length>=2)return{owner:`${t.host}/${n[0]}`,name:n.slice(1).join(`/`)}}catch{}return{owner:null,name:e}}let t=/^([^\s/:]+)\/(.+)$/u.exec(e);return t?{owner:t[1],name:t[2]}:{owner:null,name:e}}var or=(e,t)=>e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`}),sr=Symbol(`other repositories`);function cr(e,t=``,n=null,{includeSingletonOrganizations:r=!1}={}){let i=e.map(e=>({...e,...e.special?{owner:null,name:e.label}:ar(e.label)})),a=new Map;for(let e of i)e.owner!=null&&a.set(e.owner,(a.get(e.owner)??0)+1);let o=r?1:2,s=[...a].filter(([,e])=>e>=o).toSorted(([e],[t])=>or(e,t)).map(([e,t])=>({value:e,name:e,count:t})),c=e=>(a.get(e.owner)??0)<o,l=i.filter(e=>!e.special&&!e.reset&&c(e)).length;l>0&&s.push({value:sr,name:`Other`,count:l});let u=s.some(e=>e.value===n)?n:null,d=new Set(rr(i,t,{sorted:!1}).sections[0].options),f=e=>d.has(e),p=i.filter(e=>e.reset||e.special&&f(e)),m=i.filter(e=>!e.reset&&!e.special&&f(e)&&(u==null||(u===sr?c(e):e.owner===u))),h=new Map;for(let e of m){let t=(a.get(e.owner)??0)>=o?e.owner:null;h.has(t)||h.set(t,[]),h.get(t).push(e)}return{facets:s,activeFacet:u,pinned:p,sections:[...h].toSorted(([e],[t])=>e==null?1:t==null?-1:or(e,t)).map(([e,t])=>({label:e??(s.some(e=>e.value!==sr)?`Other`:null),organization:e!=null,options:t.toSorted((e,t)=>or(e.label,t.label))})),count:m.length+p.filter(e=>!e.reset).length,total:i.filter(e=>!e.reset).length,showFacets:s.length>1}}var lr=class extends ir{constructor(){super(),this.label=`Choose repository`,this.placeholder=`Choose repository`}get searchLabel(){return`Search repositories`}get optionsLabel(){return`Repositories`}get facetLabel(){return`Filter by organization`}get allFacetsLabel(){return`All organizations`}get noMatchesLabel(){return`No matching repositories`}get emptyLabel(){return`No repositories available`}get changeEvent(){return`repository-change`}choices(){return cr(this.options,this._query,this._facet)}};customElements.get(`repository-selector`)||customElements.define(`repository-selector`,lr);var ur=/(?![\t\n\r])\p{Cc}|[\u202A-\u202E\u2066-\u2069]/gu,dr=/\P{ASCII}/u,fr=/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u2800\u3000\p{Cf}\p{Cs}\p{Co}\p{Cn}\p{Default_Ignorable_Code_Point}]/u;function pr(e){if(typeof e!=`string`)return{kind:`binary`,controls:null};let t=new Map;for(let[n]of e.matchAll(ur))t.set(n.codePointAt(0),(t.get(n.codePointAt(0))??0)+1);let n=e.search(dr);if(n!==-1){for(let[r,i]of kr(e,n)??[])t.set(r,i);$r(e,(e,n)=>t.set(n,(t.get(n)??0)+1),n)}return{kind:n===-1?`ascii`:`utf8`,controls:t.size>0?t:null}}var mr=/(?=\p{Emoji})\p{Extended_Pictographic}(?:\u{FE0F}|[\u{1F3FB}-\u{1F3FF}])?$/u,hr=/^(?=\p{Emoji})\p{Extended_Pictographic}/u,gr=/(?=\p{Emoji})\p{Extended_Pictographic}$/u,_r=/^[\d#*]$/u,vr=e=>e>=917536&&e<=917631,yr=new Set([`gbeng`,`gbsct`,`gbwls`]),br=(e,t,n)=>n-t===10?String.fromCodePoint(...Array.from({length:5},(n,r)=>e.codePointAt(t+2*r)-917504)):``;function xr(e,t,n,r){if(n===13&&(e[t+1]===`
1
+ import{a as e,d as t,n}from"./chunk-OWIBDEJJ.js";import{a as r}from"./chunk-IYPY47MC.js";import{d as i,e as a,f as o,i as s,s as c,t as l,v as u,x as d}from"./chunk-ITUKKCCK.js";import{a as f,b as p,c as m}from"./chunk-PWFUOLZK.js";import{a as h,b as ee,c as g}from"./chunk-C4Z6ZBXV.js";import{D as _,E as v,F as te,J as ne}from"./chunk-QRKFPLA4.js";import{b as re,c as y,d as b,f as x,g as S,j as ie}from"./chunk-2XUEZHIP.js";function ae(e){let t=null,n=0,r={module:null,load(){return t??=(n?import(`${e}?retry=${n}`):import(e)).then(e=>r.module=e,e=>{throw t=null,n++,e}),t}};return r}var oe=ae(`./dialogs.js`),C=e=>async(...t)=>(await oe.load())[e](...t),se=C(`openAdvisoryDetailsDialog`),ce=C(`openCommentDialog`),le=C(`openDeleteBundleDialog`),ue=C(`openDeleteReportDialog`),de=C(`openDetachBundleDialog`),fe=C(`openDetachReportDialog`),pe=C(`openDiscardReviewDialog`),me=C(`openDownloadBundleDialog`),he=C(`openExportConfirmDialog`),ge=C(`openExportViewDialog`),_e=C(`openFindingHistoryDialog`),ve=C(`openFindingSourceDialog`),ye=C(`openFixLinkDialog`),be=C(`openImportConflictDialog`),xe=C(`openLeaveWorkspaceDialog`),Se=C(`openLocalContentImportDialog`),Ce=C(`openLocalTriageImportDialog`),we=C(`openManagedCommentsDialog`),Te=C(`openManagedIssueDialog`),Ee=C(`openManagedShareDialog`),De=C(`openNewWorkspaceDialog`),Oe=C(`openNpmCompareAdvisoriesDialog`),ke=C(`openObjstoreRecoveryDialog`),Ae=C(`openPasskeySetupDialog`),je=C(`openPersistenceDegradedDialog`),Me=C(`openReportCompareDialog`),Ne=C(`openRepositoryItemDialog`),Pe=C(`openRevalidationConflictsDialog`),Fe=C(`openStoragePersistDialog`),Ie=C(`openSyncDownloadDialog`),Le=C(`openSyncSuggestDialog`),Re=C(`openSyncUploadDialog`),ze=C(`openTriageComparisonDialog`),Be=C(`openTriageExportDialog`),Ve=C(`openWhyDialog`),He=C(`openWorkspaceExportDialog`),Ue=C(`openWorkspaceShareLinkDialog`),We=C(`openWorkspaceUnlockBundleDialog`),Ge=C(`openWorkspaceUnlockLinkDialog`),Ke=new WeakMap,qe=Symbol(`iteration key`);function Je(e){Ke.set(e,new Map)}function Ye(e,{target:t,key:n,type:r}){r===`iterate`&&(n=qe);let i=Ke.get(t),a=i.get(n);a||(a=new Set,i.set(n,a)),a.has(e)||(a.add(e),e.cleaners.push(a))}function Xe({target:e,key:t,type:n}){let r=Ke.get(e),i=new Set;return n===`clear`?r.forEach((e,t)=>{Ze(i,r,t)}):Ze(i,r,t),(n===`add`||n===`delete`||n===`clear`)&&Ze(i,r,Array.isArray(e)?`length`:qe),i}function Ze(e,t,n){let r=t.get(n);r&&r.forEach(e.add,e)}function Qe(e){e.cleaners&&e.cleaners.forEach($e,e),e.cleaners=[]}function $e(e){e.delete(this)}var w=[],et=!1;function tt(e,t,n,r){if(e.unobserved)return Reflect.apply(t,n,r);if(w.indexOf(e)===-1){Qe(e);try{return w.push(e),Reflect.apply(t,n,r)}finally{w.pop()}}}function T(e){let t=w[w.length-1];t&&(rt(t,e),Ye(t,e))}function E(e){Xe(e).forEach(nt,e)}function nt(e){rt(e,this),typeof e.scheduler==`function`?e.scheduler(e):typeof e.scheduler==`object`?e.scheduler.add(e):e()}function rt(e,t){if(e.debugger&&!et)try{et=!0,e.debugger(t)}finally{et=!1}}function it(){return w.length>0}var at=Symbol(`is reaction`);function ot(e,t={}){let n=e[at]?e:function t(){return tt(t,e,this,arguments)};return n.scheduler=t.scheduler,n.debugger=t.debugger,n[at]=!0,t.lazy||n(),n}function st(e){e.unobserved||(e.unobserved=!0,Qe(e)),typeof e.scheduler==`object`&&e.scheduler.delete(e)}var D=new WeakMap,ct=new WeakMap,lt=Object.prototype.hasOwnProperty;function ut(e){let t=ct.get(e);return it()&&typeof e==`object`&&e?t||Et(e):t||e}function dt(e,t){let n=e.next;return e.next=()=>{let{done:r,value:i}=n.call(e);return r||(t?i[1]=ut(i[1]):i=ut(i)),{done:r,value:i}},e}var ft={has(e){let t=D.get(this),n=Reflect.getPrototypeOf(this);return T({target:t,key:e,type:`has`}),n.has.apply(t,arguments)},get(e){let t=D.get(this),n=Reflect.getPrototypeOf(this);return T({target:t,key:e,type:`get`}),ut(n.get.apply(t,arguments))},add(e){let t=D.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),i=n.add.apply(t,arguments);return r||E({target:t,key:e,value:e,type:`add`}),i},set(e,t){let n=D.get(this),r=Reflect.getPrototypeOf(this),i=r.has.call(n,e),a=r.get.call(n,e),o=r.set.apply(n,arguments);return i?t!==a&&E({target:n,key:e,value:t,oldValue:a,type:`set`}):E({target:n,key:e,value:t,type:`add`}),o},delete(e){let t=D.get(this),n=Reflect.getPrototypeOf(this),r=n.has.call(t,e),i=n.get?n.get.call(t,e):void 0,a=n.delete.apply(t,arguments);return r&&E({target:t,key:e,oldValue:i,type:`delete`}),a},clear(){let e=D.get(this),t=Reflect.getPrototypeOf(this),n=e.size!==0,r=e instanceof Map?new Map(e):new Set(e),i=t.clear.apply(e,arguments);return n&&E({target:e,oldTarget:r,type:`clear`}),i},forEach(e,...t){let n=D.get(this),r=Reflect.getPrototypeOf(this);return T({target:n,type:`iterate`}),r.forEach.call(n,(t,...n)=>e(ut(t),...n),...t)},keys(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),t.keys.apply(e,arguments)},values(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t.values.apply(e,arguments),!1)},entries(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t.entries.apply(e,arguments),!0)},[Symbol.iterator](){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),dt(t[Symbol.iterator].apply(e,arguments),e instanceof Map)},get size(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),Reflect.get(t,`size`,e)}},pt={get(e,t,n){return e=lt.call(ft,t)?ft:e,Reflect.get(e,t,n)}},mt=typeof window==`object`?window:Function(`return this`)(),ht=new Map([[Map,pt],[Set,pt],[WeakMap,pt],[WeakSet,pt],[Object,!1],[Array,!1],[Int8Array,!1],[Uint8Array,!1],[Uint8ClampedArray,!1],[Int16Array,!1],[Uint16Array,!1],[Int32Array,!1],[Uint32Array,!1],[Float32Array,!1],[Float64Array,!1]]);function gt({constructor:e}){return!(typeof e==`function`&&e.name in mt&&mt[e.name]===e)||ht.has(e)}function _t(e){return ht.get(e.constructor)}var vt=Object.prototype.hasOwnProperty,yt=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e==`symbol`));function bt(e,t,n){let r=Reflect.get(e,t,n);if(typeof t==`symbol`&&yt.has(t))return r;T({target:e,key:t,receiver:n,type:`get`});let i=ct.get(r);if(it()&&typeof r==`object`&&r){if(i)return i;let n=Reflect.getOwnPropertyDescriptor(e,t);if(!n||n.writable!==!1||n.configurable!==!1)return Et(r)}return i||r}function xt(e,t){let n=Reflect.has(e,t);return T({target:e,key:t,type:`has`}),n}function St(e){return T({target:e,type:`iterate`}),Reflect.ownKeys(e)}function Ct(e,t,n,r){typeof n==`object`&&n&&(n=D.get(n)||n);let i=vt.call(e,t),a=e[t],o=Reflect.set(e,t,n,r);return e!==D.get(r)||(i?n!==a&&E({target:e,key:t,value:n,oldValue:a,receiver:r,type:`set`}):E({target:e,key:t,value:n,receiver:r,type:`add`})),o}function wt(e,t){let n=vt.call(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return n&&E({target:e,key:t,oldValue:r,type:`delete`}),i}var Tt={get:bt,has:xt,ownKeys:St,set:Ct,deleteProperty:wt};function Et(e={}){return D.has(e)||!gt(e)?e:ct.get(e)||Dt(e)}function Dt(e){let t=_t(e)||Tt,n=new Proxy(e,t);return ct.set(e,n),D.set(n,e),Je(e),n}var Ot=Et;function kt(e){let t=!0,n=ot(()=>{try{e(t)}finally{t=!1}},{lazy:!0});try{n()}catch(e){throw st(n),e}return()=>st(n)}function At(e){if(!e?.startsWith(`#public=`))return null;let t=/^#public=([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/u.exec(e);return t?{id:t[1],token:t[2]}:{id:``,token:``}}var jt=globalThis.location?.hash,Mt=At(jt);globalThis.addEventListener?.(`hashchange`,()=>{let e=globalThis.location?.hash;e?.startsWith(`#public=`)&&e!==jt&&globalThis.location.reload()});function Nt(){return Mt}function Pt(e=Mt){return`/api/shares/${encodeURIComponent(e.id)}/workspace`}function Ft(e,t=Mt){return t?`${e.replace(/#.*$/su,``)}#public=${t.id}.${t.token}`:e}var It=[`admin`,`manage`,`triage`,`view`,`none`];function Lt(e){return typeof e==`string`&&It.includes(e)}function Rt(e,t){let n=It.indexOf(e);return n!==-1&&n<=It.indexOf(t)}function zt(e){return e!=null&&!e.publicShare&&Rt(e.role,`view`)}function Bt(e){return e!=null&&!e.publicShare&&Rt(e.role,`manage`)}var Vt={default:{className:`brand-deepview`,mark:`<path class="fg" d="M7.843 6.719c-1.605 0-2.926 1.292-3.477 1.947.466.58 1.872 2.024 3.496 2.024s2.907-1.292 3.486-2.005c-.627-.703-1.88-1.966-3.505-1.966m.019 3.857c-1.51 0-2.802-1.263-3.353-1.9.55-.617 1.814-1.852 3.334-1.852 1.51 0 2.698 1.12 3.335 1.852-.533.618-1.787 1.9-3.316 1.9m-.019-3.42c-.826 0-1.577.694-1.577 1.596 0 .789.599 1.577 1.577 1.577.893 0 1.587-.684 1.587-1.577-.01-.779-.627-1.596-1.587-1.596m0 3.069a1.476 1.476 0 0 1-1.482-1.473c0-.722.599-1.491 1.482-1.491.846 0 1.482.693 1.492 1.491 0 .808-.618 1.473-1.492 1.473m.01-2.727c-.637 0-1.264.532-1.264 1.244 0 .627.475 1.235 1.245 1.245.684 0 1.254-.522 1.254-1.244 0-.58-.475-1.236-1.235-1.245m-.02 2.403a1.167 1.167 0 0 1-1.149-1.159c0-.532.456-1.14 1.169-1.149.56 0 1.149.427 1.159 1.15 0 .636-.485 1.158-1.179 1.158m-.769-1.833c-.19.238-.275.494-.237.864l.74.057zm1.026-.294c-.295-.057-.665 0-.912.228l.323.607zm.133.047-.38.56.988.114c-.057-.275-.323-.579-.608-.674m-.124.741.456.912c.21-.209.352-.484.314-.836zm-1.225.504a.97.97 0 0 0 .57.617l.399-.551zm.713.664c.313.076.636.01.845-.161l-.295-.618zm-.637 1.55c0 .028-.028.066-.066.066h-.59c-.028 0-.066-.028-.066-.066s.029-.066.067-.066h.579c.048 0 .076.028.076.066m.712 0c0 .028-.028.066-.066.066h-.437c-.028 0-.066-.028-.066-.066s.028-.066.066-.066h.437c.038 0 .066.028.066.066m.666 0c0 .028-.029.066-.067.066h-.37c-.029 0-.067-.028-.067-.066s.029-.066.067-.066h.37c.038 0 .067.028.067.066m-1.672.351c0 .029-.029.067-.067.067h-.295c-.028 0-.066-.028-.066-.066 0-.029.029-.067.067-.067h.294c.038 0 .066.028.066.066m.694 0c0 .029-.028.067-.066.067h-.409c-.028 0-.066-.028-.066-.066 0-.029.028-.067.066-.067h.399c.038 0 .076.028.076.066m.732 0c0 .029-.029.067-.067.067h-.465c-.029 0-.067-.028-.067-.066 0-.029.029-.067.067-.067h.465c.038 0 .067.028.067.066m-1.093.371a.065.065 0 0 1-.067.066h-.627c-.028 0-.075-.028-.066-.066 0-.028.029-.066.067-.066h.627c.038 0 .066.028.066.066m.684 0a.065.065 0 0 1-.066.066h-.39c-.028 0-.076-.028-.066-.066 0-.028.028-.066.066-.066h.39c.038 0 .066.028.066.066M5.088 6.263c-.019-.105-.114-.19-.237-.19s-.257.104-.257.237.105.238.247.238c.105 0 .218-.076.238-.18h.864v.826l.095-.048V6.31c0-.028-.019-.057-.048-.057h-.902zm-.237.19c-.076 0-.143-.066-.143-.143s.066-.142.143-.142.142.066.142.143c.01.076-.066.142-.143.142m2.89-.323H6.38l.418-.475v-.332a.255.255 0 0 0 .218-.248c0-.123-.114-.256-.256-.256s-.266.114-.266.257c0 .123.095.228.209.247v.284l-.456.523v.893l.095-.047v-.742h1.396c.029 0 .067-.009.067-.057 0-.028-.019-.047-.067-.047m-1.13-1.054c0-.076.066-.152.152-.152s.152.066.152.151c0 .076-.066.152-.152.152s-.152-.066-.152-.152m-.836 5.264h-.874c-.019-.105-.114-.219-.247-.219s-.256.105-.256.257c0 .132.114.275.266.275.104 0 .218-.076.237-.19h.827v.608l-.257.285a.3.3 0 0 0-.095-.019c-.133 0-.256.105-.256.228 0 .133.104.238.237.238.124 0 .247-.105.247-.238a.23.23 0 0 0-.057-.152l.285-.304v-.712c0-.029-.019-.058-.057-.058m-1.121.219a.16.16 0 0 1-.152-.161c0-.077.066-.162.152-.162s.152.066.152.152-.066.171-.152.171m.713 1.14c-.076 0-.143-.066-.143-.143s.066-.133.143-.133.142.067.142.143c0 .066-.066.133-.143.133m5.472-1.377a.24.24 0 0 0-.237.208h-1.13c-.029 0-.038.02-.038.048v.712l-.323.39h-.029a.245.245 0 0 0-.247.247c0 .133.114.256.247.256s.247-.113.247-.256a.26.26 0 0 0-.123-.219l.313-.38v-.674h1.083c.019.105.114.2.238.2.133 0 .266-.105.266-.257 0-.133-.105-.276-.266-.276m-1.758 1.767a.15.15 0 0 1-.143-.152c0-.075.067-.142.143-.142s.152.066.152.143a.15.15 0 0 1-.152.151m1.758-1.33a.15.15 0 0 1-.143-.152.147.147 0 0 1 .294.001.15.15 0 0 1-.152.151M8.917 5.55h-.399a.075.075 0 0 1-.076-.076c0-.028.029-.066.067-.066h.418c.028 0 .066.028.066.066s-.038.076-.076.076m.742 0H9.22c-.038 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.437c.038 0 .066.028.066.066s-.028.076-.066.076m.883 0h-.598c-.029 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.598c.028 0 .066.028.066.066s-.028.076-.066.076m-1.282.4h-.741c-.038 0-.076-.029-.076-.067s.028-.076.066-.076h.75c.039 0 .067.038.067.076 0 .029-.028.067-.066.067m.797 0h-.503c-.038 0-.076-.029-.076-.067s.028-.066.066-.066h.513c.038 0 .067.028.067.066 0 .029-.029.067-.067.067m.476 0h-.19c-.039 0-.067-.029-.067-.067s.028-.066.066-.066h.2c.028 0 .066.028.066.066 0 .029-.028.067-.075.067m-1.682.398h-.332c-.039 0-.077-.028-.077-.066s.029-.066.067-.066h.342c.038 0 .076.028.076.066s-.028.066-.076.066m.789 0h-.494c-.038 0-.067-.028-.067-.066s.029-.066.067-.066h.494c.038 0 .066.028.066.066s-.028.066-.066.066m.893 0h-.599c-.038 0-.076-.028-.076-.066s.028-.066.066-.066h.618c.028 0 .066.028.066.066s-.028.066-.076.066m.418.305a.69.69 0 0 0-.674.712c0 .086.019.18.048.257l.085.066c-.028-.085-.057-.171-.057-.304 0-.285.228-.646.598-.646.295 0 .599.228.599.636a.58.58 0 0 1-.599.59.8.8 0 0 1-.237-.048l.123.114a.4.4 0 0 0 .114.01c.39 0 .684-.276.684-.666 0-.313-.266-.712-.684-.722m.353.552-.019-.01-.161.19-.143-.01-.057-.047-.019-.133.19-.2a.28.28 0 0 0-.361.077c-.076.095-.076.209-.038.351l-.247.304.171.152.266-.266c.142.038.285.019.38-.095a.31.31 0 0 0 .038-.313"/>`},"claude-security":{className:`brand-claude`,mark:`<path class="fg" d="${a}"/>`},"codex-security":{className:`brand-codex`,mark:`<path class="fg" d="${o}"/>`},deepsec:{className:`brand-vercel`,mark:`<path class="fg" d="m8 5.97 3.5 6.062h-7Z"/>`},"markdown-generic":{className:`brand-markdown`,mark:`<path class="fg" d="M4 7h1.2l1.2 1.5L7.6 7h1.2v4H7.6V8.8L6.4 10 5.2 8.8V11H4zm5.6 0h1.2v2.3H12l-1.8 1.8-1.8-1.8h1.2Z"/>`},piolium:{className:`brand-piolium`,mark:`<path class="fg" d="M8 6.4 5.6 7.2v2.3c0 1.6 1 2.7 2.4 3.3 1.4-.6 2.4-1.7 2.4-3.3V7.2Z"/>`}},Ht={default:[`#2563eb`,`#fff`],"claude-security":[`#d97757`,`#fff`],"codex-security":[`#fff`,`#000`],deepsec:[`#000`,`#fff`],piolium:[`#fbb829`,`#1c1b19`],"markdown-generic":[`#374151`,`#fff`]},Ut=Object.fromEntries(Object.entries(Vt).map(([e,{className:t,mark:n}])=>{let[r,i]=Ht[e];return[e,`<svg class="file-icon ${t}" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path class="bg" fill="${r}"${e===`codex-security`||e===`deepsec`?` stroke="${i}" stroke-width=".5"`:``} d="M3 2h6l4 4v8H3z"/><path fill="rgba(0,0,0,.18)" d="M9 2v4h4Z"/><g fill="${i}">${n}</g></svg>`]})),Wt=Object.fromEntries(Object.entries(Vt).map(([e,{className:t,mark:n}])=>[e,`<span class="report-logo ${t}" aria-hidden="true"><svg viewBox="${e==="default"?`3.5 4 9 9`:`4 5 8 8`}" width="14" height="14">${n}</svg></span>`]));function Gt(e){let t=e.toLowerCase();if(t.endsWith(`.generic-md`)){let t=e.slice(0,-11);try{return decodeURIComponent(t)}catch{return t}}return t.endsWith(`.codex`)?e.slice(0,-6).replaceAll(`__`,`/`):e}var Kt=ee(class extends g{constructor(e){if(super(e),e.type!==h.PROPERTY&&e.type!==h.ATTRIBUTE&&e.type!==h.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!p(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===x||t===S)return t;let n=e.element,r=e.name;if(e.type===h.PROPERTY){if(t===n[r])return x}else if(e.type===h.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return x}else if(e.type===h.ATTRIBUTE&&n.getAttribute(r)===t+``)return x;return m(e),t}}),qt=b`<path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#3776ab"/><path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#ffd43b" transform="rotate(180 8 8)"/><circle cx="6" cy="2.8" r=".65" fill="#fff"/><circle cx="10" cy="13.2" r=".65" fill="#fff"/>`,Jt=b`<path d="M6.42 2.11 6.81 .49 9.19 .49 9.58 2.11 11.05 2.72 12.47 1.85 14.15 3.53 13.28 4.95 13.89 6.42 15.51 6.81 15.51 9.19 13.89 9.58 13.28 11.05 14.15 12.47 12.47 14.15 11.05 13.28 9.58 13.89 9.19 15.51 6.81 15.51 6.42 13.89 4.95 13.28 3.53 14.15 1.85 12.47 2.72 11.05 2.11 9.58 .49 9.19 .49 6.81 2.11 6.42 2.72 4.95 1.85 3.53 3.53 1.85 4.95 2.72ZM8 3.7a4.3 4.3 0 1 0 0 8.6 4.3 4.3 0 1 0 0 -8.6Z" fill="#c97d5d" fill-rule="evenodd"/><text x="8" y="10.8" text-anchor="middle" fill="currentColor" font-family="serif" font-size="8" font-weight="700">R</text>`,Yt=b`<g fill="#8892bf" transform="translate(0 .5) scale(.5)"><path d="M28 10a4 4 0 0 0-4-4h-6v6a6 6 0 0 1-6 6h-2v2h2v6h4v-6h8v6h4V16h2v-4a2 2 0 0 0-2-2"/><path d="M12 4H8v2a6 6 0 0 0-6 6v6a2 2 0 0 0 2 2v2H2.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5H6a2 2 0 0 0 2-2v-8h4a4 4 0 0 0 4-4V8a4 4 0 0 0-4-4M6 14H4v-2h2Z"/></g>`,Xt=/^(?:(?:un)?licen[cs]e|copying)(?:-[^/.]*)?(?:\.(?:mit|bsd|isc|apache|[al]?gpl|mpl|epl|eupl|cddl|cc0|zlib|psf|boost|bsl|artistic|unicode|ofl|wtfpl|lesser|lib)(?:v?\d[^/.]*|-[^/.]*)?)?(?:\.\d[^/.]*)*(?:\.(?:md|markdown|txt|text|rst|adoc|asciidoc|org))?$/iu,Zt=new Set([`resource:base64`,`directory`,`binary`,`symlink`]),Qt=e=>Zt.has(e);function $t(e,t,n){return n!==null&&n!==`markdown`||Qt(t)?!1:Xt.test(e.slice(e.lastIndexOf(`/`)+1))}function en(e,t){let n=e?.npmBinaries?.get(t);return(e?.kind===`stasis`?e.bundle?.formats?.get(t):void 0)??(n?typeof n.link==`string`?`symlink`:`binary`:void 0)}var tn=e=>e.slice(e.lastIndexOf(`/`)+1),nn=e=>{let t=tn(e),n=t.lastIndexOf(`.`);return n>0?t.slice(n+1).toLowerCase():``},rn=new Set([`gemfile`,`gemfile.lock`,`.ruby-version`]),an=new Set([`node`,`so`,`dylib`,`dll`]);function on(t,n){if(n===`symlink`)return`symlink`;let r=e(t,n);if(r===null&&/\.map$/iu.test(t))return`map`;if($t(t,n,r))return`license`;if([`javascript`,`jsx`].includes(r))return`js`;if([`typescript`,`tsx`].includes(r))return`ts`;let i=nn(t);return[`c`,`cpp`,`objectivec`].includes(r)&&i===`h`?`header`:[`solidity`,`rust`,`php`,`python`,`json`,`markdown`,`css`,`yaml`,`markup`,`java`,`swift`,`ruby`,`c`,`cpp`].includes(r)?r:r===`bash`?`shell`:r===`objectivec`?`objc`:r===null&&rn.has(tn(t).toLowerCase())?`ruby`:r===null&&tn(t).toLowerCase()===`codeowners`?`owners`:i===`wasm`?`wasm`:an.has(i)?`native`:`generic`}var sn=b`<path d="M1.5 3.4 5.3 2l5.4 1.6 3.8-1.4v10.4l-3.8 1.4-5.4-1.6-3.8 1.4Z" fill="#3fa59a" fill-opacity=".22" stroke="#3fa59a" stroke-width="1.1" stroke-linejoin="round"/><path d="M5.3 2v10.4m5.4-8.8V14" stroke="#3fa59a" stroke-width="1.1"/>`,cn=b`<circle cx="8" cy="2.6" r="1" fill="currentColor"/><path d="M8 3.6v9.9m-3.5 0h7M3 4.6h10M3 4.6 1.2 9.2M3 4.6l1.8 4.6M13 4.6l-1.8 4.6M13 4.6l1.8 4.6" fill="none" stroke="currentColor" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 9.2h4a2 2 0 0 1-4 0Zm10 0h4a2 2 0 0 1-4 0Z" fill="currentColor"/>`,ln=b`<rect x="1" y="1" width="14" height="14" rx="2" fill="#663399"/><text x="14" y="13.2" text-anchor="end" fill="#fff" font-family="sans-serif" font-size="6.4" font-weight="700" letter-spacing="-.2">CSS</text>`,un=b`<path d="M1 11.5v-7h2l1.7 2.3 1.7-2.3h2v7h-2V7.8L4.7 10 3 7.8v3.7Zm10.2-7h2V8H15l-2.8 3.5L9.4 8h1.8Z" fill="var(--green, #3fb950)"/>`,O=(e,t,n=`#fff`)=>t.length>2?b`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="10.6" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="6.2" font-weight="700" letter-spacing="-.2">${t}</text>`:b`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="11.5" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="8" font-weight="700">${t}</text>`,dn={__proto__:null,js:O(`#e6c84f`,`JS`,`#202020`),ts:O(`#3178c6`,`TS`),solidity:b`<path d="m8 1 4 6-4 2-4-2Z" fill="currentColor"/><path d="m4 8 4 2 4-2-4 7Z" fill="currentColor" opacity=".65"/>`,rust:Jt,php:Yt,python:qt,map:sn,markdown:un,license:cn,css:ln,json:b`<path d="M6 2.5C4.6 2.5 4.4 3.3 4.4 4.6v1.6C4.4 7.4 3.8 8 2.6 8c1.2 0 1.8.6 1.8 1.8v1.6c0 1.3.2 2.1 1.6 2.1M10 2.5c1.4 0 1.6.8 1.6 2.1v1.6c0 1.2.6 1.8 1.8 1.8-1.2 0-1.8.6-1.8 1.8v1.6c0 1.3-.2 2.1-1.6 2.1" fill="none" stroke="light-dark(#a26e12, #f2b440)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,yaml:O(`#cb171e`,`YML`),shell:b`<rect x="1.5" y="2.5" width="13" height="11" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><path d="m4.2 6 2 2-2 2m3.3 0h4.2" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>`,markup:b`<path d="M4.8 4.5 1.5 8l3.3 3.5m6.4-7L14.5 8l-3.3 3.5M9.3 3 6.7 13" fill="none" stroke="#e34c26" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,wasm:O(`#654ff0`,`WA`),symlink:b`<path d="M3.5 13.5V9.8a3.3 3.3 0 0 1 3.3-3.3h5.7" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><path d="m10 4 2.6 2.5L10 9" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>`,native:b`<rect x="4" y="4" width="8" height="8" rx="1" fill="none" stroke="currentColor" stroke-width="1.1"/><rect x="6.4" y="6.4" width="3.2" height="3.2" fill="currentColor"/><path d="M6 1.5V4m4-2.5V4M6 12v2.5m4-2.5v2.5M1.5 6H4m-2.5 4H4M12 6h2.5M12 10h2.5" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/>`,java:b`<path d="M5.4 5.8c-.9-1 .9-1.7 0-3M8.4 5.8c-.9-1 .9-1.7 0-3" fill="none" stroke="#e76f00" stroke-width="1.1" stroke-linecap="round"/><path d="M2.5 7h9v3.3A3.7 3.7 0 0 1 7.8 14H6.2a3.7 3.7 0 0 1-3.7-3.7Z" fill="#5382a1"/><path d="M11.5 8.2h.9a1.6 1.6 0 0 1 0 3.2h-1.1" fill="none" stroke="#5382a1" stroke-width="1.1"/>`,objc:O(`#438eff`,`OC`),c:O(`#3949ab`,`C`),cpp:O(`#00599c`,`C++`),header:O(`#607d8b`,`H`),swift:b`<rect x="1" y="1" width="14" height="14" rx="2" fill="#f05138"/><path d="M12.6 12.6C10.8 11.6 9 12.4 6.9 12.3 4.9 12.2 3.2 11.2 2.2 9.8 4 11 6.6 11.1 8.4 10.1 6.6 8.8 4.6 6.6 3.3 4.6 5 6.1 7 7.6 8.6 8.6 7.3 7.3 6 5.6 5.1 4.1 7.2 6 9.6 7.8 11 8.6 11.6 6.6 11.2 4.6 10 3.2 12.4 4.6 13.6 7.4 13 9.8 13.6 10.6 13.9 11.8 12.6 12.6Z" fill="#fff"/>`,owners:b`<circle cx="11" cy="4.7" r="2" fill="currentColor" opacity=".55"/><path d="M11.3 8.3c2.1.2 3.5 1.9 3.5 4.2h-3.4c-.2-1.7-1-3-2.2-3.8.6-.3 1.3-.4 2.1-.4Z" fill="currentColor" opacity=".55"/><circle cx="6" cy="5.3" r="2.4" fill="currentColor"/><path d="M1.6 13.5c0-2.6 2-4.5 4.4-4.5s4.4 1.9 4.4 4.5Z" fill="currentColor"/>`,ruby:b`<path d="M4.5 2.5h7L14.5 6 8 14 1.5 6Z" fill="#cc342d"/><path d="M1.5 6h13M4.5 2.5 6 6l2 8 2-8 1.5-3.5M6 6l2-3.5L10 6" fill="none" stroke="#fff" stroke-opacity=".55" stroke-width=".7" stroke-linejoin="round"/>`},fn=b`<path d="M4 1.5h5l3 3v10H4Zm5 0v3h3M6 8h4M6 10.5h4" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/>`;function pn(e,t){let n=on(e,t);return y`<svg class="source-file-icon" data-file-type="${n}" width="16" height="16" viewBox="0 0 16 16" style="${f({flex:`none`})}" aria-hidden="true">${dn[n]??fn}</svg>`}var mn=y`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" style="${f({flex:`none`})}" aria-hidden="true"><path d="M1.5 4V2.5h5L8 4h6.5v9h-13Z" stroke-linejoin="round"/></svg>`,hn=y`<svg class="bundle-code-tree-npm" width="12" height="12" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,gn=y`<svg class="bundle-code-tree-soldeer" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7Z" fill="none" stroke="currentColor" stroke-width="1"/><path d="m8 3 2.5 4L8 8.5 5.5 7Zm-2.5 5L8 9.5 10.5 8 8 13Z" fill="currentColor"/></svg>`,_n=y`<svg class="bundle-code-tree-composer" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1 15 4.5v7L8 15l-7-3.5v-7Z" fill="#8892bf"/><path d="m1 4.5 7 3.5 7-3.5M8 8v7M4.5 2.75l7 3.5" fill="none" stroke="var(--surface, #fff)" stroke-width=".9"/></svg>`,vn=y`<svg class="bundle-code-tree-cargo" width="12" height="12" viewBox="9.25 6.14 14 14" aria-hidden="true"><path d="m16.264 11.547 6.2-2.446v8.16l-6.2 2.485Zm0-.019-6.2-2.481v8.123l6.2 2.522Z" fill="#e5ac3d" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m16.277 11.508 6.169-2.435-6.2-2.531-6.2 2.467Z" fill="#e3b04e" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m12.82 10.149 6.196-2.467" fill="none" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m18.301 7.395-6.24 2.484 1.482.593 6.196-2.466z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".04741218643894885px" opacity=".3"/><path d="m13.562 10.47-1.453-.565v1.645l.201-.136.18.285.104.04.138-.121.137.228.129.05.189-.166.238.332.137.053zm-1.423 7.576 1.461.545-.023-1.645-.2.139-.184-.282-.104-.039-.136.123-.14-.226-.131-.049-.186.169-.243-.329-.137-.051z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".06661495224335688px" opacity=".3"/><path d="m21.426 13.49-.172-.039V13.4l.148-.208a.1.1 0 0 0 .018-.065.035.035 0 0 0-.037-.03l-.189.006-.015-.045.118-.222a.07.07 0 0 0 .007-.063.04.04 0 0 0-.045-.018l-.2.051-.024-.037.084-.229a.06.06 0 0 0 0-.058.04.04 0 0 0-.051-.006l-.2.094-.032-.027.047-.227a.05.05 0 0 0-.016-.052.05.05 0 0 0-.056.007l-.2.133-.039-.017.007-.215a.04.04 0 0 0-.026-.043.07.07 0 0 0-.058.02l-.184.166-.045-.006-.033-.2a.036.036 0 0 0-.036-.032.08.08 0 0 0-.057.031l-.164.194-.049.005-.071-.168a.036.036 0 0 0-.044-.021.1.1 0 0 0-.055.042l-.138.214-.05.016-.107-.135a.04.04 0 0 0-.05-.008.1.1 0 0 0-.05.051l-.107.226-.05.026-.138-.1a.05.05 0 0 0-.055 0 .1.1 0 0 0-.044.058l-.071.228-.049.036-.164-.054a.06.06 0 0 0-.057.017.1.1 0 0 0-.036.063l-.033.223-.045.044-.184-.01a.08.08 0 0 0-.058.029.1.1 0 0 0-.026.065l.007.209-.039.05-.2.035a.1.1 0 0 0-.056.04.1.1 0 0 0-.016.065l.046.187-.032.054-.2.079a.1.1 0 0 0-.051.049.07.07 0 0 0 0 .062l.084.157-.024.057-.2.119a.1.1 0 0 0-.045.057.06.06 0 0 0 .007.057l.118.122-.015.058-.189.155a.1.1 0 0 0-.037.062.045.045 0 0 0 .018.05l.148.082v.055l-.172.185a.1.1 0 0 0-.028.065.04.04 0 0 0 .028.041l.172.039v.051l-.148.208a.1.1 0 0 0-.018.065.035.035 0 0 0 .037.03l.189-.006.015.045-.118.222a.07.07 0 0 0-.007.063.04.04 0 0 0 .045.018l.2-.051.024.037-.084.229a.06.06 0 0 0 0 .058.04.04 0 0 0 .051.006l.2-.094.032.027-.046.227a.05.05 0 0 0 .016.051.05.05 0 0 0 .056-.007l.2-.133.039.017-.007.215a.04.04 0 0 0 .026.043.07.07 0 0 0 .058-.02l.184-.166.045.006.033.2a.035.035 0 0 0 .036.032.08.08 0 0 0 .057-.031l.164-.194.049-.005.071.168a.036.036 0 0 0 .044.02.1.1 0 0 0 .055-.042l.138-.214.05-.016.107.135a.04.04 0 0 0 .05.008.1.1 0 0 0 .05-.051l.107-.226.05-.027.138.1a.05.05 0 0 0 .055 0 .1.1 0 0 0 .044-.058l.071-.228.049-.036.164.054a.06.06 0 0 0 .057-.017.1.1 0 0 0 .036-.063l.033-.223.045-.044.184.01a.08.08 0 0 0 .058-.029.1.1 0 0 0 .026-.065l-.007-.209.039-.05.2-.035a.1.1 0 0 0 .056-.04.1.1 0 0 0 .016-.065l-.046-.187.017-.053.2-.079a.1.1 0 0 0 .051-.049.07.07 0 0 0 0-.062l-.084-.157.024-.057.2-.119a.1.1 0 0 0 .045-.057.06.06 0 0 0-.007-.057l-.118-.122.015-.058.189-.155a.1.1 0 0 0 .037-.062.045.045 0 0 0-.018-.05l-.148-.082v-.055l.172-.185a.1.1 0 0 0 .028-.065.04.04 0 0 0-.014-.039m-1.153 1.988c-.066.013-.108-.037-.094-.112a.21.21 0 0 1 .145-.16c.066-.013.108.037.094.112a.21.21 0 0 1-.145.16m-.059-.39a.19.19 0 0 0-.132.146l-.061.325a2.3 2.3 0 0 1-.619.4 1.4 1.4 0 0 1-.632.123l-.061-.273c-.013-.057-.072-.072-.132-.033l-.252.164a1 1 0 0 1-.13-.106l1.226-.521q.022-.007.023-.026v-.455c0-.013-.009-.012-.023-.006l-.359.152v-.288l.388-.165a.16.16 0 0 1 .239.115c.015.057.049.249.072.3s.117.172.217.13l.611-.26.022-.012a3 3 0 0 1-.139.23Zm-1.7 1.13c-.066.043-.131.026-.145-.037a.2.2 0 0 1 .094-.192c.066-.043.131-.026.145.037a.2.2 0 0 1-.09.192Zm-.465-1.779a.18.18 0 0 1-.062.2c-.062.055-.134.056-.161 0a.18.18 0 0 1 .062-.2c.066-.051.138-.053.165 0Zm-.143.416.263-.234a.16.16 0 0 0 .057-.178l-.054-.105.213-.09v1l-.429.182a1.4 1.4 0 0 1-.057-.407c.001-.052.001-.11.011-.168Zm1.152-.587v-.3l.506-.215c.026-.011.185-.047.185.077 0 .1-.122.192-.222.234l-.47.2Zm1.84-.516v.118l-.154.065a.04.04 0 0 0-.022.036v.074a.31.31 0 0 1-.176.3c-.078.043-.165.036-.176-.01-.046-.253-.123-.278-.245-.327a1 1 0 0 0 .308-.578.3.3 0 0 0-.235-.315.57.57 0 0 0-.322.026l-1.592.677a2.7 2.7 0 0 1 .84-.853l.188.127c.042.029.113 0 .157-.063l.21-.3a.94.94 0 0 1 1.027.33l-.144.4c-.025.069 0 .128.057.13l.277.011q.004.073.004.152Zm-1.591-1.044c.049-.069.126-.1.172-.069s.045.113 0 .183-.126.1-.172.069-.044-.114.005-.184Zm1.427.6a.19.19 0 0 1 .161-.133c.062 0 .089.066.062.142a.19.19 0 0 1-.161.133c-.057-.006-.085-.07-.058-.15Z" opacity=".55"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 10.451 11.138)"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 15.013 12.984)"/></svg>`;function yn(e){return e===`composer`?_n:e===`cargo`?vn:e===`soldeer`?gn:hn}var bn=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/iu,xn=200;function Sn(e){let t=[...e];return t.length>xn?`${t.slice(0,xn-1).join(``).trimEnd()}\u2026`:e}var Cn=e=>e.split(`/`).map(encodeURIComponent).join(`/`),wn=(e,t)=>`https://github.com/${Cn(e)}/releases/tag/${Cn(t)}`;function Tn(e,t){return t&&e?.sha===t&&Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`&&e):[]}function En(e,t,n=null){let r=typeof e?.github==`string`&&typeof n==`string`&&n.toLowerCase()===e.github.toLowerCase()?Tn(e,t):[],i=t&&e?.sha===t&&typeof e.details?.subject==`string`?e.details:null;if(i||r.length!==0)return JSON.stringify({tags:r,...i?{title:Sn(i.subject),authorName:i.authorName,authorLogin:i.authorLogin,date:i.committedAt??i.authoredAt}:{}})}function Dn(e,t=``,n=null){let i=[],a=_(e);if(a){let o=[v(e.repo),v({directory:t})].filter(Boolean).join(`/`),s=r(e.repo?.commit),c=Cn(o),l=`https://github.com/${a}`,u=_({repo:{github:n?.github}}),d=u?Tn(n,s):[];i.push({label:`GitHub`,text:a+(o?`/${o}`:``),href:s||o?`${l}/tree/${s??`HEAD`}${c?`/${c}`:``}`:l,...s?{commit:{hash:s,text:s.slice(0,7),href:`${l}/commit/${s}`,...d.length>0?{tags:d.map(e=>({name:e,href:wn(u,e)}))}:{}}}:{}})}let o=e?.package?.npm;if(typeof o?.name==`string`&&bn.test(o.name)){let e=typeof o.version==`string`?o.version.trim():``;i.push({label:`npm`,text:o.name+(e?`@${e}`:``),href:`https://www.npmjs.com/package/${o.name}${e?`/v/${encodeURIComponent(e)}`:``}`})}return i}function On(e){if(e?.kind===`sourcemap`)return t(e);let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;for(let t of e.bundle.imports.values())for(let[e,r]of t){n.has(e)||n.set(e,new Set);for(let t of r.values()){let r=typeof t==`string`?[t]:t instanceof Map?t.values():[];for(let t of r)typeof t==`string`&&n.get(e).add(t)}}return n}var kn=e=>[...n(e)].filter(([,e])=>e!=null).map(([e])=>e);function An(e,t){let n=new Map,r=e?.kind===`stasis`?e.bundle?.reason:null;if(!r||typeof r!=`object`||Array.isArray(r))return n;let i=new Set(t??kn(e));for(let[e,t]of Object.entries(r).toSorted(([e],[t])=>e.localeCompare(t))){if(!e||!Array.isArray(t))continue;let r=new Set(t.filter(e=>typeof e==`string`&&i.has(e)));r.size>0&&n.set(e,r)}return[...n.values()].some(e=>e.size<i.size)||n.clear(),n}function jn(e,t){let n=t&&[...t],r=An(e,n),i=e?.kind===`stasis`?[...e.bundle?.entries??[]]:[],a=new Set(i.length>1?n??kn(e):[]),o=new Set(i.filter(e=>a.has(e))),s=Object.values(e?.bundle?.reason??{}).filter(Array.isArray);(o.size<2||s.length>0&&!s.some(e=>new Set(e.filter(e=>o.has(e))).size>1))&&o.clear();let c=[...[...r.keys()].map(e=>`reason:${e}`),...[...o].toSorted().map(e=>`entry:${e}`)];return{ids:c,has:e=>c.includes(e),files(t){if(!c.includes(t))return null;if(t.startsWith(`reason:`))return r.get(k(t));let n=On(e),i=new Set([k(t)]);for(let e of i)for(let t of n.get(e)??[])i.add(t);return new Set([...i].filter(e=>a.has(e)))}}}var k=e=>e.slice(e.indexOf(`:`)+1),Mn=e=>e.ids.map(e=>({id:e,label:k(e)})),Nn=y`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" aria-hidden="true" viewBox="0 75 405 400"><path fill="currentColor" d="m62 447.6 65.8-68.2c2.2-.9 22.7 12 28.2 14.1C295.4 446.8 399.2 263.6 285.1 172 184.3 91.1 41.1 191.5 82 315.6c3.9 12 10.8 21.7 15.4 33.2l-47.1 47C-32 294.9 7.4 142.3 126.3 91.3 241.3 42 374.4 112 398 234.5c29.4 152.7-116.5 274.9-262.7 223.6-15.9-5.6-17-10.6-34.9-10.6H62Z"/><path fill="#e02129" d="M190.1 181.8c128.8-15 141.2 170.8 26 182.6-126.4 12.9-137.9-169.5-26-182.6M209 236c-7.4 5.6-10.8-5.4-13-7.7-9.6-10.3-19.4-.8-14 1.7s9.5-.3 10.1 5.6-9 9.9-7.9 16.4c13.2-5.9 25.9-6.4 39.1 0 3.2-7.1-7.9-12.1-7.8-14.8.1-9.4 11.6-6.2 12.6-7.2 4.3-4.3-8.9-11.7-17.1-.6-1.3 1.8-1.4 6.3-1.9 6.6zm-7.6 14.3c-10.1-1.5-19.3 10-25 11.8s-23.2 1.5-14.9 16.3c3.9.8 5.1-13.1 13.3-9.4 1.9 13.1-2.8 8.7-9 12.2-10 5.7-8.1 20.2-1.3 12.8 2.7-3 1.5-9.6 10.3-7.7 1.3 15.9-.8 8.4-7.9 11.7-11.5 5.3-9 20.2-1.7 14.8s0-10.8 8.6-9.3c1 .2 5.8 10.8 12.4 14.5 13.7 7.9 35 5.5 44.8-7.6s1.6-6.5 1.8-6.7c4-3.1 11.3 4.6 11 9.2l5.5-1.5c2.2-3.1-1.6-8.2-3.9-10.3-7.6-6.8-13.5.9-11-14.8 9-2.6 8.4 8.7 9.4 9.4 6 4.2 8.4-7.8 1.5-13.2-7.4-5.8-13.2 3.6-10.9-13.4 7.4-1.3 8.3 3.2 9.4 9.4 8.3 1.4 6.9-7.2 3.1-11.8-4.5-5.5-10.5-2.6-15.7-4.7-1.3-.5-25.1-18.8-25.1-9.4v52.5c-1.5.6-4.7-1.4-4.7-2.3z"/><ellipse cx="206.6" cy="270" fill="#e02129" rx="74.6" ry="66.5"/><path fill="#fff" d="M200.6 250v55.5s.4 1 .5 1.1c1.1 1.8 3.7 1.8 4.9 0 .1-.2.5-1.1.5-1.3v-55.4a34 34 0 0 1 17.2 5.8c3.1 2.2 5.6 5.1 7.7 8.3 3.8.1 7.6-.5 11.3.8 5.2 1.8 9.6 7.5 9.6 13.1 0 4.2-5.8 5.3-7.3 1.5-.7-1.8-.3-3.2-1.7-5-.8-1-3-2.7-4.3-2.7h-4.5c1.1 4.1.8 8.4.8 12.6.1.1 1.7-.1 2-.1 7.3 0 13.9 6 14.4 13.5.3 5.3-6.3 6-7.5 1.8-.6-2.1-.3-3.5-2-5.3-.8-.9-2.9-2.2-4.2-2.2h-3c.2 1 .2 2.2.1 3.2 0 2.1-.4 4.3-.9 6.4-.2.9-.5 1.8-.7 2.6 5.5-.7 10.5.7 14.1 5 1.7 2 3.4 5.6 3.6 8.3.5 5.4-6.6 6.7-7.8 1.2-.5-2.3-.7-3.8-2.7-5.4-3.1-2.5-7-1.2-10.7-1.4-1.9 3.2-4.5 6.1-7.5 8.4-14.4 10.8-36.9 7.2-46.2-8.4-.4-.2-2.4 0-2.9 0-3.2 0-6-.6-8.4 2.1-1.6 1.8-1.5 3.2-2.1 5.3-1.2 4.5-7.9 3.6-7.7-1.4.3-5.5 4.9-11.3 10.1-13 1.7-.5 5.7-1 7.4-.6.1 0 .1.1.1-.1 0-1.1-.7-2.8-.9-4.1-.4-2.7-.6-5.4-.4-8.1-2.8-.1-5.3.2-7.2 2.5-1.4 1.7-1.3 2.9-1.8 4.9-1.1 4.4-7.9 3.8-7.6-1.5.2-4.1 2.9-8.7 6.3-11 3-2.1 6.5-2.7 10.1-2.6v-5.8c.2-2.2.3-4.5.9-6.6h-4.5c-1.8 0-4.2 2.2-4.9 3.7-1.1 2.3-.4 6-4.1 6.3-3.4.3-4.5-2.3-4.1-5.2.9-6.1 5.1-11 11.3-12.2 3.1-.6 6.2 0 9.3-.4 2.2-3.1 4.8-6 7.9-8.3 4.9-3.5 10.9-5.1 16.8-5.8Z"/><path fill="#fff" d="M197.3 235.1c4.1-.7 8.3-.9 12.4 0 1.1-7.6 7-14.6 15.2-14 3.3.2 5.7 3.1 3.6 6.1-1.5 2-4.1 1-6.2 1.7s-3.7 2.5-4.5 4.4c-.3.7-1.2 3.8-.9 4.3 0 .1 1.3 1 1.6 1.2 3.4 3.1 6.2 7.4 6.6 12 0 .6-.1 1.2.1 1.8-.1.1-2.6-1.5-2.9-1.8-10.5-6-27.5-5.7-37.9.4-.2.1-2.3 1.6-2.4 1.5-.2-5.5 2.8-10.5 6.8-14 .3-.3 1.3-.9 1.5-1.1.1-.1.1-.2.1-.3 0-.5-.3-1.8-.5-2.3-.9-3.3-3-6-6.6-6.3h-2.2c-4.2-.4-4.5-6.5-.2-7.4 2.3-.5 5.2 0 7.3 1 5.2 2.2 8.5 7.4 9.1 12.9Z"/></svg>`,Pn=new Map([[`registry`,{label:`Source: npm registry`,icon:hn}],[`repository`,{label:`Source: GitHub repository`,icon:i(d)}],[`osv`,{label:`Source: OSV`,icon:Nn}]]),Fn=e=>Pn.get(e)?.icon??null;function In(e){return e===`unknown`?`Unrated`:e.charAt(0).toUpperCase()+e.slice(1)}function Ln(e){if(typeof e!=`string`)return null;let t=/\/(GHSA-[a-z0-9-]+)(?:[/?#]|$)/iu.exec(e);return t?t[1]:null}var Rn=y`<svg class="external-link-icon" viewBox="0 0 16 16" width="11" height="11" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 13L13 3"/><path d="M5 3h8v8"/></svg>`;function zn(e){let t=/^CWE-(\d+)$/u.exec(e);if(!t)return y`<span>${e}</span>`;let n=`https://cwe.mitre.org/data/definitions/${t[1]}.html`;return y`<a class="bundle-advisory-cwe" href="${n}" target="_blank" rel="noopener noreferrer">${e}</a>`}function Bn(e,t){return y`<div class="bundle-advisory-rail"><span class="${`bundle-advisory-severity sev-${e}`}">${In(e)}</span> ${typeof t==`number`?y`<span class="bundle-advisory-cvss-score">CVSS <span class="mono">${t.toFixed(1)}</span></span>`:S}</div>`}function Vn(e){let t=typeof e.url==`string`&&/^https?:\/\//iu.test(e.url)?e.url:null,n=e.ghsa??Ln(t)??(typeof e.id==`string`?e.id:null),r=Pn.get(e.source);return!r&&!(n&&t)?S:y`<span class="bundle-advisory-reference">${r?y`<span class="bundle-advisory-source" role="img" aria-label="${r.label}">${r.icon}</span>`:S} ${n&&t?y`<a class="bundle-advisory-ghsa" href="${t}" target="_blank" rel="noopener noreferrer">${n}${Rn}</a>`:S}</span>`}function Hn(e){let t=Array.isArray(e)?e.filter(e=>typeof e==`string`):[];return t.length>0?y`<span class="bundle-advisory-cwes">${t.map((e,t)=>y`${t===0?``:`, `}${zn(e)}`)}</span>`:S}function Un(e,t=null){let n=typeof e.cvss?.vectorString==`string`?e.cvss.vectorString:``,r=typeof e.vulnerable_versions==`string`?e.vulnerable_versions:null,i=Array.isArray(e.versions)?e.versions.filter(e=>typeof e==`string`):[];return y`<li class="bundle-advisory-row">${Bn(e.severity,e.cvss?.score)}<div class="bundle-advisory-body"><div class="bundle-advisory-header">${t&&typeof e.details==`string`&&e.details.trim()?y`<button type="button" class="bundle-advisory-title" aria-haspopup="dialog" @click="${()=>t(e)}">${e.title}</button>`:y`<span class="bundle-advisory-title">${e.title}</span>`} ${Vn(e)}</div><div class="bundle-advisory-subrow"><div class="bundle-advisory-meta">${e.informational?y`<span>${e.informational}</span>`:S} ${r?y`<span>Affected <span class="mono">${r}</span></span>`:S} ${i.length>0?y`<span>Matches <span class="mono">${i.join(`, `)}</span></span>`:S} ${Hn(e.cwe)}</div>${n?y`<div class="bundle-advisory-cvss-vector mono">${n}</div>`:S}</div></div></li>`}function Wn(e,t){let n=te(e);if(n===null)return null;let r=t.replace(/\.(?:md|markdown)$/iu,``),i=new Set;return n.map(({displayName:e,data:t})=>{let n=`${r}: ${e}`.replaceAll(`%`,`%25`).replaceAll(/[\\/\p{Cc}]/gu,`_`)+`.generic-md`;if(i.has(n))throw Error(`Markdown (generic): products produce the same report name: ${n}`);return i.add(n),{name:n,content:JSON.stringify(t)}})}var Gn=`...`,Kn=120;function qn(e){for(let t of(ne(e)??[]).flat()){let e=t?.description;typeof e==`string`&&e.length===Kn&&e.endsWith(Gn)&&(t.description=`${e.slice(0,-Gn.length)}\u2026`)}return e}var Jn=ae(`./scan.js`),Yn=()=>Jn.load(),Xn=[[`manage`,`Overview`],[`manage-bundles`,`Bundles`],[`manage-scans`,`Scans`],[`manage-reports`,`Reports`],[`manage-deduplication`,`Deduplication`,`admin`],[`manage-repos`,`Repositories`,`admin`],[`manage-repo-risk`,`Risk`,`admin`],[`admin-users`,`Users`,`admin`],[`manage-teams`,`Teams`,`admin`],[`manage-import`,`Import`,`admin`],[`manage-links`,`Links`],[`manage-history`,`History`]];function Zn(e,t={}){document.dispatchEvent(new CustomEvent(`managed-admin-navigate`,{detail:{view:e,...t},bubbles:!0,composed:!0}))}function Qn(e,t,n=!1){return y`<header class="manage-header"><nav class="manage-nav" aria-label="Management pages">${Xn.filter(([e,,r])=>(r==null||r===t)&&(e!==`manage-links`||n)).map(([t,n])=>y`<button type="button" aria-current="${e===t?`page`:S}" @click="${()=>Zn(t)}">${n}</button>`)}</nav></header>`}var $n={bundle:s,report:l,preview:l,scan:c,code:u},er={users:`M10.75 4.75a2.75 2.75 0 1 1-5.5 0 2.75 2.75 0 0 1 5.5 0ZM3 14v-1.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5V14`,team:`M8.5 5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM1.5 14v-1.5A3.5 3.5 0 0 1 5 9h2a3.5 3.5 0 0 1 3.5 3.5V14M11 2.75a2.5 2.5 0 0 1 0 4.5m1 2a3 3 0 0 1 2.5 3V14`,repo:`M3 12.5V3a1.5 1.5 0 0 1 1.5-1.5H13v13H4.5a1.5 1.5 0 0 1 0-3H13M7 1.5v6l2-1.5 2 1.5v-6`,history:`M2 5a6.25 6.25 0 1 1-.25 5M1.5 1.5V5H5M8 4.5V8l3 1.5`,arrow:`M3 8h10M9 4l4 4-4 4`,show:`M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Zm9 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0`,hide:`m2 2 12 12M6 3.75A8 8 0 0 1 8 3.5c4.5 0 7 4.5 7 4.5a12 12 0 0 1-2 2.5M3.5 5A13 13 0 0 0 1 8s2.5 4.5 7 4.5a8 8 0 0 0 3-.6`,download:`M8 2v8M5 7l3 3 3-3M2 11v3h12v-3`,upload:`M8 11V2m-3 3 3-3 3 3M2 10v4h12v-4`,confirmed:`M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM5.25 8.25l1.9 1.9 3.6-3.9`};function tr(e){return $n[e]?i($n[e]):y`<svg class="${e===`repo`?`repo-icon`:S}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${er[e]??er.repo}"></path></svg>`}function nr(e,t,n){let r=e[0].getBoundingClientRect().top,i=1;for(;i<e.length&&Math.abs(e[i].getBoundingClientRect().top-r)<1;)i++;if(i===1&&(n===`ArrowLeft`||n===`ArrowRight`))return t;let a=t+{ArrowLeft:-1,ArrowRight:1,ArrowUp:-i,ArrowDown:i}[n];if(a<0)return n===`ArrowUp`?-1:t;let o=Math.floor((e.length-1)/i);return a<e.length?a:Math.floor(t/i)<o?e.length-1:t}function rr(e,t,{text:n=e=>e.label,sorted:r=!0,pinned:i=[]}={}){let a=t.normalize(`NFKC`).toLocaleLowerCase().trim().split(/\s+/u).filter(Boolean),o=e.filter(e=>a.every(t=>n(e).normalize(`NFKC`).toLocaleLowerCase().includes(t))),s=r?o.toSorted((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0,sensitivity:`base`})):o;return{pinned:i,sections:[{label:null,options:s}],facets:[],showFacets:!1,count:s.length,total:e.length}}var ir=class extends ie{static properties={options:{attribute:!1},value:{attribute:!1},label:{type:String},placeholder:{type:String},disabled:{type:Boolean},_query:{state:!0},_facet:{state:!0},_open:{state:!0}};static styles=re`:host{display:block;min-width:0}:host,.menu{-webkit-app-region:no-drag;app-region:no-drag}*{box-sizing:border-box}button,input{font:inherit;color:var(--text)}button{cursor:default;user-select:none}.trigger{display:flex;align-items:center;gap:.6rem;width:100%;height:2rem;padding:.28rem .5rem;border:1px solid var(--border);border-radius:var(--ui-radius, 5px);background:var(--bg);text-align:left;font-size:.76rem}.trigger:hover:not(:disabled){border-color:var(--muted)}.trigger:disabled{opacity:.5}:host([variant=filter]){display:inline-block;max-width:min(20rem,100%)}:host([variant=filter]) .trigger{height:30px;min-width:8.5rem;background:transparent;font-size:.8rem;font-weight:500;border-radius:var(--ui-radius, 4px)}.name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option-copy{flex:1;min-width:0;display:grid;gap:.08rem}.secondary{color:var(--muted);font-size:.64rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.secondary.is-warning{color:var(--warning);font-weight:600}.detail.is-noted{padding:0 .35rem;border-radius:3px;color:var(--accent);background:rgb(from var(--accent) r g b / .13);font-weight:600}.avatar{display:grid;place-items:center;flex:0 0 1.5rem;width:1.5rem;height:1.5rem;border-radius:50%;color:var(--accent);background:rgb(from var(--accent) r g b / .13);font-family:sans-serif;font-size:.62rem;font-weight:600}.detail,.count{flex:0 0 auto;color:var(--muted);font-size:.66rem;font-variant-numeric:tabular-nums;white-space:nowrap}svg{flex:0 0 auto;width:.9rem;height:.9rem;color:var(--muted)}.menu{visibility:hidden;position:fixed;inset:auto;margin:0;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);background:var(--bg);color:var(--text);box-shadow:0 .6rem 1.6rem #0006;user-select:none}.menu:popover-open{display:flex;flex-direction:column}.menu[data-positioned]{visibility:visible}.search{display:flex;align-items:center;gap:.5rem;flex:0 0 auto;padding:.55rem .65rem;border-bottom:1px solid var(--border)}input{flex:1;min-width:0;width:0;padding:.15rem 0;border:0;background:transparent;font-size:.78rem;outline:none}input::placeholder{color:var(--muted)}.search:focus-within{box-shadow:inset 0 -2px var(--accent)}.body{display:flex;min-height:0;flex:1}.facets{width:10.5rem;flex:0 0 auto;padding:.35rem;overflow:auto;overscroll-behavior:none;border-right:1px solid var(--border);background:rgb(from var(--bg) r g b / .25)}.org{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .45rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.7rem}.org[aria-pressed=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.results{flex:1;min-width:0;overflow:auto;overscroll-behavior:none;padding:.3rem}.group+.group{margin-top:.35rem;padding-top:.35rem;border-top:1px solid var(--border)}.heading{position:sticky;top:-.3rem;z-index:1;display:flex;align-items:center;gap:.4rem;margin:0;padding:.4rem .5rem;color:var(--muted);background:var(--bg);font-size:.68rem;font-weight:600}.heading svg{width:.8rem;height:.8rem}.option{display:flex;align-items:center;gap:.65rem;width:100%;padding:.35rem .5rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.76rem}.option svg{width:.8rem;height:.8rem;opacity:0;color:var(--accent)}.option[aria-selected=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.option[aria-selected=true] svg{opacity:1}.option:disabled{opacity:.45}.option:hover:not(:disabled),.org:hover{background:rgb(from var(--text) r g b / .05)}.pinned{padding-bottom:.25rem;margin-bottom:.25rem;border-bottom:1px solid var(--border)}.empty{margin:0;padding:1.3rem .7rem;color:var(--muted);font-size:.76rem}button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}@media(max-width:40rem){.facets{width:8.5rem}}@media(max-width:28rem){.facets{width:7rem}.option{gap:.35rem}}:host-context(body.theme-w95){.trigger,.trigger:hover:not(:disabled){height:23px;padding:0 1px 0 4px;gap:4px;border:0;border-radius:0;background:#fff;box-shadow:var(--w95-sunken);font-size:11px;font-weight:400}.trigger>svg:last-child{width:16px;height:19px;padding:3px 2px;background:var(--w95-face);box-shadow:var(--w95-raised);color:#000}.menu{border:1px solid #000;border-radius:0;box-shadow:none;font-size:11px}.search{border-bottom:0;box-shadow:inset 0 -1px var(--w95-shadow)}.search:focus-within{box-shadow:inset 0 -1px var(--w95-shadow)}:is(.option,.org){border-radius:0;font-size:11px}:is(.option,.org):is(:hover:not(:disabled),[aria-selected=true],[aria-pressed=true]){background:var(--w95-title);color:#fff;.secondary,svg,.detail,.count{color:#fff}}.avatar{border-radius:0}& button:focus-visible{outline:1px dotted #000;outline-offset:-2px}}:host-context(body.theme-w95) *{overscroll-behavior:none}`;constructor(){super(),this.options=[],this.value=null,this.label=`Choose`,this.placeholder=`Choose`,this.disabled=!1,this._query=``,this._facet=null,this._open=!1,this._menuHeight=null,this._onViewport=()=>this._position()}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent(`tooltip-root-connected`,{bubbles:!0,composed:!0})),window.addEventListener(`resize`,this._onViewport),window.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots=[];for(let e=this.getRootNode();e.host;e=e.host.getRootNode())e.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots.push(e)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`resize`,this._onViewport),window.removeEventListener(`scroll`,this._onViewport,!0);for(let e of this._scrollRoots??[])e.removeEventListener(`scroll`,this._onViewport,!0);this._scrollRoots=[]}render(){let e=this.options.find(e=>e.value===this.value),t=this.choices(),n=[...t.pinned,...t.sections.flatMap(e=>e.options)].filter(e=>!e.disabled),r=n.find(e=>e.value===this.value)?.value??n[0]?.value;return y`<button type="button" class="trigger" popovertarget="selector-menu" aria-label="${this.label}" aria-haspopup="dialog" aria-expanded="${this._open}" ?disabled="${this.disabled}">${e?this.optionIcon(e):S}<span class="name" data-tooltip-truncated data-tooltip="${e?.label??S}">${e?.label??this.placeholder}</span>${e?.detail?y`<span class="${e.detailNote?`detail is-noted`:`detail`}" ?data-tooltip-truncated="${!e.detailNote}" data-tooltip="${e.detailNote??e.detail}">${e.detail}</span>`:S} <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg></button><div class="menu" id="selector-menu" popover="auto" role="dialog" aria-label="${this.label}" @beforetoggle="${this._beforeToggle}" @toggle="${this._toggle}" @keydown="${this._keyDown}"><div class="search"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><circle cx="7" cy="7" r="4.5"/><path d="m10.5 10.5 3.5 3.5"/></svg> <input type="search" placeholder="${`${this.searchLabel}\u2026`}" aria-label="${this.searchLabel}" aria-controls="selector-options" .value="${Kt(this._query)}" @input="${e=>{this._query=e.target.value}}"> <span class="count" role="status">${t.count}${t.count===t.total?``:` / ${t.total}`}</span></div><div class="body">${t.showFacets?y`<div class="facets" role="group" aria-label="${this.facetLabel}"><button type="button" class="org" aria-pressed="${t.activeFacet==null}" @click="${()=>this._filterFacet(null)}"><span class="name">${this.allFacetsLabel}</span><span class="count">${t.total}</span></button> ${t.facets.map(e=>y`<button type="button" class="org" aria-pressed="${t.activeFacet===e.value}" @click="${()=>this._filterFacet(e.value)}"><span class="name" data-tooltip-truncated data-tooltip="${e.name}">${e.name}</span><span class="count">${e.count}</span></button>`)}</div>`:S}<div class="results" id="selector-options" role="listbox" aria-label="${this.optionsLabel}">${t.pinned.length>0?y`<div class="pinned">${t.pinned.map(e=>this._option(e,!1,r))}</div>`:S} ${t.sections.map((e,t)=>y`<div class="group" role="group" aria-labelledby="${e.label?`selector-group-${t}`:S}">${e.label?y`<h3 class="heading" id="${`selector-group-${t}`}">${e.organization?y`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M3 14V3h6v11M9 7h4v7M1 14h14M5 6h2M5 9h2M5 12h2"/></svg>`:S}${e.label}</h3>`:S} ${e.options.map(t=>this._option(t,e.organization,r))}</div>`)} ${t.count?S:y`<p class="empty">${this.options.length>0?this.noMatchesLabel:this.emptyLabel}</p>`}</div></div></div>`}choices(){return rr(this.options,this._query)}get menuWidth(){return 360}optionIcon(e){return e.initials?y`<span class="avatar" aria-hidden="true">${e.initials}</span>`:S}optionTooltip(e){return e.label}_option(e,t,n){let r=e.displayLabel??(t?e.name:e.label),i=this.optionTooltip(e);return y`<button type="button" class="option" role="option" ?data-reset="${e.reset}" ?disabled="${e.disabled}" aria-label="${e.label}" aria-selected="${e.value===this.value}" tabindex="${e.value===n?0:-1}" @click="${()=>this._pick(e.value)}"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m3 8 3 3 7-7"/></svg>${this.optionIcon(e)}<span class="option-copy"><span class="name" ?data-tooltip-truncated="${r===i}" data-tooltip="${i}">${r}</span>${e.secondary?y`<span class="${e.secondaryWarning?`secondary is-warning`:`secondary`}" ?data-tooltip-truncated="${!e.secondaryWarning}" data-tooltip="${e.secondaryWarning??e.secondary}">${e.secondary}</span>`:S}</span>${e.detail?y`<span class="${e.detailNote?`detail is-noted`:`detail`}" data-tooltip="${e.detailNote??S}">${e.detail}</span>`:S}</button>`}updated(e){this.disabled&&this._open&&this._close(!1),e.has(`options`)&&(this._menuHeight=null),this._position(),(e.has(`_query`)||e.has(`_facet`))&&(this.renderRoot.querySelector(`.results`).scrollTop=0)}_beforeToggle(e){this._open=e.newState===`open`,delete e.target.dataset.positioned,this._open&&(this._query=``,this._facet=null,this._menuHeight=null)}async _toggle(e){e.newState===`open`&&(await this.updateComplete,this._open&&this.isConnected&&(this._position(),this.renderRoot.querySelector(`input`).focus({preventScroll:!0})))}_position(){let e=this.renderRoot.querySelector(`.menu`);if(!e?.matches(`:popover-open`))return;let t=this.renderRoot.querySelector(`.trigger`).getBoundingClientRect(),n=e.querySelector(`.facets`)!=null,r=Math.min(Math.max(t.width,n?560:this.menuWidth),window.innerWidth-16),i=window.innerHeight-t.bottom-8-4,a=t.top-8-4;e.style.width=`${r}px`,this._menuHeight??=Math.min(480,e.querySelector(`.search`).offsetHeight+Math.max(e.querySelector(`.results`).scrollHeight,e.querySelector(`.facets`)?.scrollHeight??0)+2);let o=this._menuHeight,s=i<o&&a>i;e.style.maxHeight=`${Math.max(0,Math.min(o,s?a:i))}px`,e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-r-8))}px`,e.style.top=`${Math.max(8,s?t.top-e.offsetHeight-4:t.bottom+4)}px`,e.dataset.positioned=``}_filterFacet(e){this._facet=e,this.renderRoot.querySelector(`input`).focus({preventScroll:!0})}_keyDown(e){if(e.stopPropagation(),e.key===`Escape`){e.preventDefault(),this._close();return}let t=this.renderRoot.querySelector(`input`),n=this.renderRoot.activeElement,r=[...this.renderRoot.querySelectorAll(`.option:not(:disabled)`)],i=r.indexOf(n);if(n!==t&&i<0)return;if(e.key===`Enter`&&n===t){e.preventDefault(),(this.renderRoot.querySelector(`.option:not([data-reset]):not(:disabled)`)??r[0])?.click();return}let a;if(n===t){if(e.key===`ArrowDown`)a=0;else if(e.key===`ArrowUp`)a=-1;else return}else if(e.key.startsWith(`Arrow`))a=nr(r,i,e.key);else if(e.key===`Home`)a=0;else if(e.key===`End`)a=r.length-1;else if(e.key.length===1&&e.key!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault(),this._query+=e.key,t.focus();return}else return;e.preventDefault();for(let[e,t]of r.entries())t.tabIndex=e===a?0:-1;a<0?t.focus():r[a]?.focus()}_pick(e){this.disabled||!this.options.some(t=>t.value===e&&!t.disabled)||(this._close(),this.dispatchEvent(new CustomEvent(this.changeEvent,{detail:{value:e},bubbles:!0,composed:!0})))}_close(e=!0){this.renderRoot.querySelector(`.menu`).hidePopover(),this._open=!1,e&&this.renderRoot.querySelector(`.trigger`).focus({preventScroll:!0})}};function ar(e){if(/^https?:\/\//iu.test(e)){try{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);if(n.length>=2)return{owner:`${t.host}/${n[0]}`,name:n.slice(1).join(`/`)}}catch{}return{owner:null,name:e}}let t=/^([^\s/:]+)\/(.+)$/u.exec(e);return t?{owner:t[1],name:t[2]}:{owner:null,name:e}}var or=(e,t)=>e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`}),sr=Symbol(`other repositories`);function cr(e,t=``,n=null,{includeSingletonOrganizations:r=!1}={}){let i=e.map(e=>({...e,...e.special?{owner:null,name:e.label}:ar(e.label)})),a=new Map;for(let e of i)e.owner!=null&&a.set(e.owner,(a.get(e.owner)??0)+1);let o=r?1:2,s=[...a].filter(([,e])=>e>=o).toSorted(([e],[t])=>or(e,t)).map(([e,t])=>({value:e,name:e,count:t})),c=e=>(a.get(e.owner)??0)<o,l=i.filter(e=>!e.special&&!e.reset&&c(e)).length;l>0&&s.push({value:sr,name:`Other`,count:l});let u=s.some(e=>e.value===n)?n:null,d=new Set(rr(i,t,{sorted:!1}).sections[0].options),f=e=>d.has(e),p=i.filter(e=>e.reset||e.special&&f(e)),m=i.filter(e=>!e.reset&&!e.special&&f(e)&&(u==null||(u===sr?c(e):e.owner===u))),h=new Map;for(let e of m){let t=(a.get(e.owner)??0)>=o?e.owner:null;h.has(t)||h.set(t,[]),h.get(t).push(e)}return{facets:s,activeFacet:u,pinned:p,sections:[...h].toSorted(([e],[t])=>e==null?1:t==null?-1:or(e,t)).map(([e,t])=>({label:e??(s.some(e=>e.value!==sr)?`Other`:null),organization:e!=null,options:t.toSorted((e,t)=>or(e.label,t.label))})),count:m.length+p.filter(e=>!e.reset).length,total:i.filter(e=>!e.reset).length,showFacets:s.length>1}}var lr=class extends ir{constructor(){super(),this.label=`Choose repository`,this.placeholder=`Choose repository`}get searchLabel(){return`Search repositories`}get optionsLabel(){return`Repositories`}get facetLabel(){return`Filter by organization`}get allFacetsLabel(){return`All organizations`}get noMatchesLabel(){return`No matching repositories`}get emptyLabel(){return`No repositories available`}get changeEvent(){return`repository-change`}choices(){return cr(this.options,this._query,this._facet)}};customElements.get(`repository-selector`)||customElements.define(`repository-selector`,lr);var ur=/(?![\t\n\r])\p{Cc}|[\u202A-\u202E\u2066-\u2069]/gu,dr=/\P{ASCII}/u,fr=/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u2800\u3000\p{Cf}\p{Cs}\p{Co}\p{Cn}\p{Default_Ignorable_Code_Point}]/u;function pr(e){if(typeof e!=`string`)return{kind:`binary`,controls:null};let t=new Map;for(let[n]of e.matchAll(ur))t.set(n.codePointAt(0),(t.get(n.codePointAt(0))??0)+1);let n=e.search(dr);if(n!==-1){for(let[r,i]of kr(e,n)??[])t.set(r,i);$r(e,(e,n)=>t.set(n,(t.get(n)??0)+1),n)}return{kind:n===-1?`ascii`:`utf8`,controls:t.size>0?t:null}}var mr=/(?=\p{Emoji})\p{Extended_Pictographic}(?:\u{FE0F}|[\u{1F3FB}-\u{1F3FF}])?$/u,hr=/^(?=\p{Emoji})\p{Extended_Pictographic}/u,gr=/(?=\p{Emoji})\p{Extended_Pictographic}$/u,_r=/^[\d#*]$/u,vr=e=>e>=917536&&e<=917631,yr=new Set([`gbeng`,`gbsct`,`gbwls`]),br=(e,t,n)=>n-t===10?String.fromCodePoint(...Array.from({length:5},(n,r)=>e.codePointAt(t+2*r)-917504)):``;function xr(e,t,n,r){if(n===13&&(e[t+1]===`
2
2
  `||r&&t+1===e.length)||n===8205&&mr.test(e.slice(Math.max(0,t-4),t))&&hr.test(e.slice(t+1,t+3))||(n===65038||n===65039)&&gr.test(e.slice(Math.max(0,t-2),t))||n===65039&&_r.test(e[t-1]??``)&&e[t+1]===`⃣`)return t+1;if(vr(n)&&!vr(e.codePointAt(t-2))){let n=t;for(;vr(e.codePointAt(n));)n+=2;if(e.codePointAt(t-2)===127988&&e.codePointAt(n-2)===917631&&yr.has(br(e,t,n-2)))return n}return-1}var Sr=/[\u115F\u1160\u3164\uFFA0\u{E0001}\u{E0020}-\u{E007F}]|[\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,A=/[\uFE00-\uFE0F\u115F\u1160\u3164\uFFA0\uDB40]/g,Cr=e=>new Set(e.split(` `).flatMap(e=>{let[t,n=t]=e.split(`-`).map(e=>Number.parseInt(e,16));return Array.from({length:n-t+1},(e,n)=>t+n)})),wr=new Map([[65024,`30 1000 1002 1004 1010-1011 1015 1019-101a 101c-101d 1022 1031 1075 1078 107a 1080 2018-2019 201c-201d 210b 2110 2112 211b 212c 2130-2131 2133 2205 2229-222a 223d 2242-2243 2248 2268-2269 2272-2273 228a-228b 2293-2295 2297 229c 22cd 22da-22dd 29b7 2a3c-2a3d 2a6c 2a9d-2a9e 2aac-2aad 2acb-2acc 3001-3002 31c0 31c6 31c9 31cf-31d2 31d4-31d5 31d7 31db-31dd 31e5 a856 a85c a85e-a860 a868 aa60-aa66 aa6b-aa6c aa6f aa7a ff01 ff0c ff0e ff10 ff1a-ff1b ff1f 10ac5-10ac6 10ad6-10ad7 10ae1 13091 1310f 1311c 13121 13127 13139 131a0 131b1 131b8-131b9 131cb 131e0 131f9-131fa 1327b 1327f 13285 1328c 132aa 132cb 132dc 132e7 13307 1331b 13322 1333c 13377-13378 13399-1339a 133d3 133e4-133e5 133e7 133ee 133f2 133f5-133f6 13416 13419-1341a 13423 13443-13446 13be8-13bea 13f72 1d49c 1d49e-1d49f 1d4a2 1d4a5-1d4a6 1d4a9-1d4ac 1d4ae-1d4b5 1db10`],[65025,`2018-2019 201c-201d 210b 2110 2112 211b 212c 2130-2131 2133 3001-3002 31c6 31cf 31dd ff01 ff0c ff0e ff1a-ff1b ff1f 13093 13132 13139 13187 131b1 131ee 131f8-131fa 13257 1327f 1328b 132a4 13308 13312-13314 1331b 13321-13322 13331 133e8 13419 13f1f 14274 1d49c 1d49e-1d49f 1d4a2 1d4a5-1d4a6 1d4a9-1d4ac 1d4ae-1d4b5`],[65026,`2018-2019 201c-201d 13117 13139 13183 131a0 131ba 131ee 13216 1327b 132a4 132e7 132e9 132f8 132fd 13302-13303 13310-13314 1331c 13321 13331 1334a 13361 13373 1337d 13385 133af-133b0 133bf 133db 133dd 13419 1342c 1342e 14274 1d4cf`],[65027,`13012 130b8 130ba 1310f 1312f 13139 13184 1319c-1319d 1319f 131b1 131db 13205 13296 13338 13419`],[65028,`13139 1340d`],[65029,`13139 14274`],[65030,`1312f 13139 13184 131db 131ee 13205 132a4 132e9 1332b 13338 13370-13371 13419 14274`]].map(([e,t])=>[e,Cr(t)])),Tr=Cr(`23 2a 30-39 a9 ae 203c 2049 2122 2139 2194-2199 21a9-21aa 231a-231b 2328 23cf 23e9-23f3 23f8-23fa 24c2 25aa-25ab 25b6 25c0 25fb-25fe 2600-2604 260e 2611 2614-2615 2618 261d 2620 2622-2623 2626 262a 262e-262f 2638-263a 2640 2642 2648-2653 265f-2660 2663 2665-2666 2668 267b 267e-267f 2692-2697 2699 269b-269c 26a0-26a1 26a7 26aa-26ab 26b0-26b1 26bd-26be 26c4-26c5 26c8 26ce-26cf 26d1 26d3-26d4 26e9-26ea 26f0-26f5 26f7-26fa 26fd 2702 2705 2708-270d 270f 2712 2714 2716 271d 2721 2728 2733-2734 2744 2747 274c 274e 2753-2755 2757 2763-2764 2795-2797 27a1 27b0 27bf 2934-2935 2b05-2b07 2b1b-2b1c 2b50 2b55 3030 303d 3297 3299 1f004 1f170-1f171 1f17e-1f17f 1f202 1f21a 1f22f 1f237 1f30d-1f30f 1f315 1f31c 1f321 1f324-1f32c 1f336 1f378 1f37d 1f393 1f396-1f397 1f399-1f39b 1f39e-1f39f 1f3a7 1f3ac-1f3ae 1f3c2 1f3c4 1f3c6 1f3ca-1f3ce 1f3d4-1f3e0 1f3ed 1f3f3 1f3f5 1f3f7 1f408 1f415 1f41f 1f426 1f43f 1f441-1f442 1f446-1f449 1f44d-1f44e 1f453 1f46a 1f47d 1f4a3 1f4b0 1f4b3 1f4bb 1f4bf 1f4cb 1f4da 1f4df 1f4e4-1f4e6 1f4ea-1f4ed 1f4f7 1f4f9-1f4fb 1f4fd 1f508 1f50d 1f512-1f513 1f549-1f54a 1f550-1f567 1f56f-1f570 1f573-1f579 1f587 1f58a-1f58d 1f590 1f5a5 1f5a8 1f5b1-1f5b2 1f5bc 1f5c2-1f5c4 1f5d1-1f5d3 1f5dc-1f5de 1f5e1 1f5e3 1f5e8 1f5ef 1f5f3 1f5fa 1f610 1f687 1f68d 1f691 1f694 1f698 1f6ad 1f6b2 1f6b9-1f6ba 1f6bc 1f6cb 1f6cd-1f6cf 1f6e0-1f6e5 1f6e9 1f6f0 1f6f3`),Er=[[65024,65039],[917760,917999]],Dr=[[12593,12643],[12645,12686]];function j(e,t){if(t===0)return;let n=t>=2?e.codePointAt(t-2):0;return n>65535?n:e.codePointAt(t-1)}var M=(e,...t)=>e!==void 0&&t.some(([t,n])=>e>=t&&e<=n);function Or(e,t,n){let r=t+(n>65535?2:1),i=e.codePointAt(r),a=j(e,t);switch(n){case 4447:return M(i,[4449,4519],[55216,55238]);case 4448:return M(a,[4352,4446],[43360,43388]);case 12644:return M(a,...Dr)||M(i,...Dr);case 65440:return M(a,[65441,65500])||M(i,[65441,65500]);default:return(n===65038||n===65039?Tr.has(a):wr.get(n)?.has(a))||Er.some(([i,a])=>n===i&&e[r]===`-`&&e.codePointAt(r+1)===a||n===a&&e[t-1]===`-`&&j(e,t-1)===i)||(n===65038||n===65039)&&a===n&&gr.test(e.slice(Math.max(0,t-3),t-1))}}function kr(e,t=0){let n=null;A.lastIndex=t;for(let t=A.exec(e);t;t=A.exec(e)){let r=t.index,i=e.codePointAt(r);if(!Sr.test(String.fromCodePoint(i)))continue;let a=xr(e,r,i,!1);a===-1?Or(e,r,i)||(n??=new Map,n.set(i,(n.get(i)??0)+1)):A.lastIndex=a}return n}var N=String.raw`\p{L}\p{M}\p{Nd}_$`,Ar=String.raw`\p{sc=Zyyy}\p{sc=Zinh}\p{Default_Ignorable_Code_Point}`,P=new RegExp(String.raw`(?=[^\0-\xFF])[[${N}]--[\p{sc=Latn}${Ar}]]`,`gv`),jr=new RegExp(P.source,`v`),Mr=RegExp(`[${Ar}]`,`uy`),Nr=RegExp(`[${N}]`,`uy`),Pr=`Latn Cyrl Grek Hani Hira Kana Hang Bopo Arab Hebr Armn Geor Thai Deva Adlm Aghb Ahom Armi Avst Bali Bamu Bass Batk Beng Berf Bhks Brah Brai Bugi Buhd Cakm Cans Cari Cham Cher Chrs Copt Cpmn Cprt Diak Dogr Dsrt Dupl Egyp Elba Elym Ethi Gara Glag Gong Gonm Goth Gran Gujr Gukh Guru Hano Hatr Hluw Hmng Hmnp Hung Ital Java Kali Kawi Khar Khmr Khoj Kits Knda Krai Kthi Lana Laoo Lepc Limb Lina Linb Lisu Lyci Lydi Mahj Maka Mand Mani Marc Medf Mend Merc Mero Mlym Modi Mong Mroo Mtei Mult Mymr Nagm Nand Narb Nbat Newa Nkoo Nshu Ogam Olck Onao Orkh Orya Osge Osma Ougr Palm Pauc Perm Phag Phli Phlp Phnx Plrd Prti Rjng Rohg Runr Samr Sarb Saur Sgnw Shaw Shrd Sidd Sidt Sind Sinh Sogd Sogo Sora Soyo Sund Sunu Sylo Syrc Tagb Takr Tale Talu Taml Tang Tavt Tayo Telu Tfng Tglg Thaa Tibt Tirh Tnsa Todr Tols Toto Tutg Ugar Vaii Vith Wara Wcho Xpeo Xsux Yezi Yiii Zanb`.split(` `).flatMap(e=>{try{return[{code:e,char:new RegExp(String.raw`\p{sc=${e}}`,`uy`)}]}catch{return[]}}),Fr={code:`Zzzz`,char:/\p{sc=Zzzz}/uy},Ir=({char:e},t,n)=>(e.lastIndex=n,e.test(t)),Lr=Fr;function F(e,t){return Ir(Lr,e,t)||(Lr=Pr.find(n=>Ir(n,e,t))??Fr),Lr.code}var Rr=new Intl.DisplayNames(`en`,{type:`script`}),zr=e=>Rr.of(e),Br=e=>F(String.fromCodePoint(e),0),I=4096;function Vr(e,t,n){for(let r=n;;r=e.lastIndex)if(e.lastIndex=r,e.test(t),e.lastIndex-r<I)return e.lastIndex}var Hr=RegExp(`[${N}]{0,${I}}`,`uy`),Ur=e=>`[${e.map(e=>String.raw`\p{sc=${e}}`).join(``)}${Ar}]`,Wr=e=>new RegExp(String.raw`[[${N}]&&${Ur(e)}]{0,${I}}`,`vy`),Gr=e=>new RegExp(String.raw`[^[${N}]--${Ur(e)}]{0,${I}}`,`vy`),Kr=[[`Latn`,`Hani`,`Hira`,`Kana`],[`Latn`,`Hani`,`Bopo`],[`Latn`,`Hani`,`Hang`]],qr=Kr.map(Wr),Jr=new Map;function Yr(e){return Jr.has(e)||Jr.set(e,{word:Wr([e]),passage:Gr(Kr.find(t=>t.includes(e))??[e])}),Jr.get(e)}var Xr=(e,t,n,r)=>Vr(e,t,n)===r;function Zr(e,t,n){let r=t;for(;r>n;){let t=r-(j(e,r)>65535?2:1);if(Nr.lastIndex=t,!Nr.test(e))break;r=t}return r}function Qr(e,t,n,r){let i=r=>{for(let i=t;i<n;i+=e.codePointAt(i)>65535?2:1)Mr.lastIndex=i,Mr.test(e)||r(i,F(e,i))},a=new Map;i((e,t)=>a.set(t,(a.get(t)??0)+1));let o=`Latn`;for(let[e,t]of a)t>(a.get(o)??0)&&(o=e);i((t,n)=>{n!==o&&r(t,e.codePointAt(t),n,o)})}function $r(e,t,n=0){P.lastIndex=n;for(let n=0;P.test(e);P.lastIndex=n){let r=P.lastIndex-(j(e,P.lastIndex)>65535?2:1),i=Vr(Yr(F(e,r)).passage,e,Zr(e,r,n));if(i===e.length)return;let a=Zr(e,i,n),o=Vr(Hr,e,a);!Xr(Yr(F(e,i)).word,e,a,o)&&!qr.some(t=>Xr(t,e,a,o))&&Qr(e,a,o,t),n=o}}var ei=String.raw`(?:[^\x60\\$]|\\(?:\r\n|[\s\S])|\$(?!\{))*(?:\x60|\$\{|(?![\s\S]))`,ti=e=>String.raw`((?=\/)${e}\/(?![/*])(?:[^/\\[\n]|\\.|\[(?:[^\]\\\n]|\\.)*(?:\]|(?=\\?$)))+(?:\/[a-z]*|(?=\\?$))|"(?:[^"\\\n]|\\(?:\r\n|[\s\S]))*(?:"|$)|'(?:[^'\\\n]|\\(?:\r\n|[\s\S]))*(?:'|$)|\x60${ei})|(?<![ \t])[ \t]*(?:\/\*[\s\S]*?(?:\*\/|(?![\s\S]))|\/\/.*|(?<![\s\S])\uFEFF?#!.*)[ \t]*`,ni=String.raw`(?<=(?:^|\.\.\.|[(,=:[!&|?{;>*/%^<~]|(?<!\+)(?:\+\+)*\+|(?<!-)(?:--)*-|(?<![\p{ID_Continue}$.#])(?:await|case|default|delete|do|else|extends|in|instanceof|new|of|return|throw|typeof|void|yield))[ \t]*)`,ri=new RegExp(ti(ni),`gmu`),ii={*matchAll(e){let t=0;for(let n of Oi(e))n.index<t||(t=n.index+n[0].length,yield n)},droppable:/(?<![\p{ID_Continue}$\\\u200C\u200D])[ \t]+|[ \t]+(?![\p{ID_Continue}$\\\u200C\u200D])/gu,needed:(e,t,n)=>`+-/`.includes(e[t-1])&&e[t+n.length]===e[t-1]||e[t-2]===``&&/[\p{ID_Continue}$\\\u200C\u200D]/u.test(e[t+n.length])},ai=/("(?:[^"\\\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\n]|\\(?:\r\n|[\s\S]))*')|[ \t]*\/\*[\s\S]*?\*\/[ \t]*/gu,oi={matchAll:e=>e.matchAll(ai),droppable:/(?<=[{};,:>(])[ \t]+|[ \t]+(?=[{};,>)!])|(?<=[+~])[ \t]+|[ \t]+(?=[+~])/gu,needed:(e,t,n,r)=>/[+~]/u.test(e[t-1]+e[t+n.length])&&(r>0||/^\s*--[^:]*:/u.test(e.slice(Math.max(...[`{`,`;`,`}`].map(n=>e.lastIndexOf(n,t)))+1,t)))},si=String.raw`(?=\/)(?<=[)}][ \t]*)(\/)(?![/*])`,ci=new RegExp(String.raw`(\}${ei})`,`uy`),L=`block`,R=`either`,z=`value`,li=/(?:[;}]|=>|(?<![\p{ID_Continue}$#])(?:else|do|try|finally))$/u,ui=/(?:[=([,?!~%^&|*/<]|\.\.\.|(?<!\+)(?:\+\+)*\+|(?<!-)(?:--)*-)$/u,di=/(?<![\p{ID_Continue}$#.])(?:typeof|delete|in|instanceof|new|case|return|throw)$/u;function fi(e,t,n,r,i){let a=t;for(;a>n&&/\s/u.test(e[a-1]);)a--;if(a===n)return n===0?L:n===i?.code?z:R;let o=e.slice(Math.max(n,a-11),a);return li.test(o)||r&&o.endsWith(`)`)||i===L&&o.endsWith(`{`)?L:ui.test(o)||di.test(o)&&!e.slice(a,t).includes(`
3
3
  `)?z:R}var pi=/(?<=^[ \t]*)/muy;function mi(e,t){return pi.lastIndex=t,pi.test(e)}var hi=/(?<!\\)("(?:[^"\\\n]|\\(?:\r\n|[\s\S]))*(?:"|$)|'(?:[^'\\\n]|\\(?:\r\n|[\s\S]))*(?:'|$)|\u0060(?:[^\u0060\\]|\\[\s\S])*(?:\u0060|(?![\s\S])))/gmu,gi=/([\s\S]*)/uy;function*_i(e,t,n){let r=(t,n)=>t===null?null:(t.lastIndex=n,t.exec(e));for(let e=r(hi,n),i=r(t,n);e!==null||i!==null;)i===null||e!==null&&e.index<=i.index?(yield e,e=r(hi,e.index+1)):(yield i,i=r(t,i.index+Math.max(i[0].length,1)));gi.lastIndex=n,yield gi.exec(e)}var vi=/(?<=(?<![\p{ID_Continue}$#])(?<!\.\s*)(if|while|with|for(?:\s+await)?)(\s*))\(/uy,yi=/^[ \t]*(?:\/[/*]|\uFEFF?#!)/u,bi=/(?<=\.\s*)/uy,xi=/\S/gu,Si=(e,{index:t,pieces:n,text:r},i)=>Object.assign([e.slice(t,i),r],{index:t,pieces:n});function*Ci(e,t,n,{open:r,held:i},a){let o=t.index+t[0].length;n===null&&(n={index:t.index,text:``,pieces:[],slot:i.length},r.push(n),i.push(null)),n.pieces.push([n.text.length,t.index]),n.text+=t[1],t[1].endsWith("${")?a.push({code:o,template:n}):(i[n.slot]=Si(e,r.pop(),o),r.length===0&&(yield*i.splice(0)))}function*wi(e,{open:t,held:n}){for(let r of t)n[r.slot]=Si(e,r,e.length);yield*n}function Ti({index:e,pieces:t},n){if(t===void 0)return e+n;let r=t.length,i=0;for(;i<r;){let e=i+r>>1;t[e][0]<=n?i=e+1:r=e}return t[i-1][1]+n-t[i-1][0]}var Ei=new Map;function Di(e){let t=Ei.get(e);if(!t){let n=e===``?``:`|${e}`,r=RegExp(`${ri.source}${n}|${si}|([{}])`,`gmu`),i=RegExp(`${r.source}|`,`u`).exec(``).length;t={scan:r,slash:i-2,brace:i-1,regex:RegExp(`${ti(``)}${n}`,`muy`),own:e===``?null:RegExp(`(?!)()${n}`,`gmu`)},Ei.set(e,t)}return t}function*Oi(e,t=``){let{scan:n,slash:r,brace:i,regex:a,own:o}=Di(t),s=[],c=[],l=null,u=!1,d=0,f={held:[],open:[]},p={dot:!1,next:-1};for(let t=0;;){n.lastIndex=t;let m=n.exec(e);if(m===null){yield*wi(e,f);return}let h=e.slice(d,m.index);for(let t=h.indexOf(`)`),n=h.indexOf(`(`);n!==-1||t!==-1;)if(t===-1||n!==-1&&n<t){let t=d+n;vi.lastIndex=t;let r=vi.exec(e);c.push(r!==null&&!(p.dot&&p.next===t-r[2].length-r[1].length)),n=h.indexOf(`(`,n+1)}else u=c.pop()===!0,t=h.indexOf(`)`,t+1);l!==null&&/\S/u.test(h.slice(+(d<l.end)))&&(l=null);let ee=m[i]===`{`?fi(e,m.index,d,u,s.at(-1)):null;d=m.index;let g=m,_=null;if(ee!==null){s.push(ee),t=m.index+1;continue}if(m[i]!==void 0){let n=s.pop()??R;if(t=m.index+1,typeof n==`string`){l={kind:n,end:t};continue}ci.lastIndex=m.index,g=ci.exec(e),_=n.template}else if(m[r]!==void 0||l!==null&&m[1]?.[0]===`/`&&mi(e,m.index)){let t=m[r]===void 0&&l.kind!==L?R:l?.kind??(u?L:z);if(t===R){yield*wi(e,f),yield*_i(e,o,m.index+1);return}a.lastIndex=m.index,g=t===z?null:m[r]===void 0?m:a.exec(e)}if(g===null){t=m.index+1;continue}let v=g.index+g[0].length;if(g[1]!==void 0){if(d=t=v,l=null,_!==null||g[1][0]==="`"&&g[1].endsWith("${")){yield*Ci(e,g,_,f,s);continue}}else if(yi.test(g[0])){bi.lastIndex=g.index;let t=p.next===g.index+g[0].search(/\S/u)?p.dot:bi.test(e);xi.lastIndex=v,p={dot:t,next:xi.exec(e)?.index??e.length},d=v}else l=null;f.open.length>0?f.held.push(g):yield g,t=Math.max(v,g.index+1)}}var ki=(e,t=!1)=>/\.css$/iu.test(e)?oi:t||/\.[cm]?js$/iu.test(e)?ii:null,Ai=4194304;function ji(e,{matchAll:t,droppable:n,needed:r}){let i=e.length>Ai?e.slice(0,e.lastIndexOf(`
4
4
  `,Ai)+1||Ai):e,a=[],o=0;for(let{0:e,1:n,index:r}of t(i))a.push(i.slice(o,r),n===void 0?``:n[0]===`/`?`//`:`""`,e.replaceAll(/[^\n]/gu,``)),o=r+e.length;a.push(i.slice(o));let s=a.join(``).replaceAll(/^[ \t]+/gmu,``).split(`
@@ -1 +1 @@
1
- import{a as e,b as t,d as n,e as r,h as i,i as a,j as o,k as s,m as c,o as l,q as u,r as d,s as ee}from"./chunk-CU3FPB3P.js";import{a as f,c as p,e as m,f as h,h as te,j as g,k as _,l as v,m as ne,n as re,o as ie,p as ae}from"./chunk-GX5UXWT4.js";import{D as oe,H as y,M as se,l as ce,m as b,p as le,t as x}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as ue,c as de,e as fe,g as pe}from"./chunk-VYYUMYVW.js";import{d as S,e as me,h as C,i as w}from"./chunk-7HP2VYIC.js";import"./chunk-OOJM4CTU.js";function T(e,t,n=[`https:`,`http:`,`file:`]){let r=URL.parse(h(e,t));if(r===null||r.href!==e||!n.includes(r.protocol))throw new S(`${C(e)} is not a URL in normal form, of ${n.map(e=>e.slice(0,-1)).join(`, `)}`,t);if(r.username!==``||r.password!==``)throw new S(`${C(e)} has credentials in it, which uv does not write`,t);return r}var E=g(e=>/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,9})?Z$/u.test(e)&&de(e),`a UTC timestamp`),D=v(i),O=(e,t,n)=>re(e,t,i,n),he={__proto__:null,md5:32,sha256:64,sha384:96,sha512:128,blake2b:64};function k(e){return e.type===`url`?new URL(e.url).pathname:e.type===`path`||e.type===`git`?e.path:void 0}var A=e=>e===void 0?void 0:e.endsWith(`.whl`)?`wheel`:`sdist`;function ge(e,t){return e.type===`registry`?e.url===void 0?[`url`,`path`]:[`url`]:t?e.type===`url`?[`url`]:[`filename`]:[]}function j(e,t,n,r){let i=ge(n,r),a=n.type===`registry`;p(e,t,[...i,`hash`,...a?[`size`,`upload-time`,`upload_time`]:[]]);let o=i.filter(t=>e[t]!==void 0);if(i.length>0&&o.length!==1)throw new S(o.length===0?`expected ${i.join(` or `)}`:`a url and a path, of which uv reads the url alone`,t);if(e[`upload-time`]!==void 0&&e.upload_time!==void 0)throw new S(`upload-time and upload_time, which are one field to uv`,t);let s=b(e,`url`,t,T),c={url:s?.href,path:b(e,`path`,t,u),filename:b(e,`filename`,t,h),hash:b(e,`hash`,t,(e,t)=>l(e,t,he)),size:b(e,`size`,t,te),uploadTime:b(e,e.upload_time===void 0?`upload-time`:`upload_time`,t,E)};if(!a&&c.hash===void 0)throw new S(`expected a hash, which uv writes for a file of a ${n.type} source`,t);return{file:c,pathname:s?.pathname}}function _e(e,t,n){if(e===void 0)return;let r=A(k(n));if(n.type!==`registry`&&r!==`sdist`)throw new S(`an sdist, which a ${n.type} source${r===`wheel`?` of a wheel`:``} has none of`,t);let{url:i,path:a,hash:o,size:s,uploadTime:c}=j(e,t,n,!1).file;return{url:i,path:a,hash:o,size:s,uploadTime:c}}function ve(t,n,r){if(t===void 0)return[];let{source:i}=r,a=A(k(i)),o=m(t,n);if(i.type!==`registry`&&(a!==`wheel`||o.length!==1))throw new S(a===`wheel`?`expected the one wheel the source is`:`wheels, which a ${i.type} source${a===`sdist`?` of an sdist`:``} has none of`,n);let c=new Set;return o.map((t,a)=>{let o=`${n}[${a}]`,{file:l,pathname:u}=j(t,o,i,!0),d=ee({name:l.filename,path:l.path,pathname:u}),f=d===void 0?void 0:s(d);if(f===void 0)throw new S(`${C(String(d))} is not the name of a wheel`,o);if(c.has(d))throw new S(`${C(d)} is listed twice`,o);if(c.add(d),f.name!==r.name)throw new S(`${C(d)} is a wheel of ${C(f.name)}, not of ${C(r.name)}`,o);if(r.versionKey!==void 0&&r.versionKey!==e(f.version)&&r.versionKey!==e({...f.version,local:void 0}))throw new S(`${C(d)} is a wheel of another version than ${C(r.version)}`,o);if(i.type===`url`&&l.url!==i.url)throw new S(`${C(l.url)} is not the URL the source names`,w(o,`url`));return{...l,filename:d}})}var M=[`registry`,`git`,`url`,`path`,`directory`,`editable`,`virtual`],ye=new Set([`directory`,`editable`,`virtual`]),N=new Set([`branch`,`tag`,`rev`]),be=new Set([...N,`subdirectory`,`path`,`lfs`]),P=(e,t,n)=>new S(`${C(e)} is not a git source: ${t}`,n),F=`expected "#" and the full commit it resolved to`;function I(e,t){let n=T(se(e,t),t,[`https:`,`http:`,`ssh:`,`file:`]),r=[...n.searchParams],i=r.find(([e])=>!be.has(e));if(i!==void 0)throw P(e,`uv does not read ${C(i[0])}`,t);if(new Set(r.map(([e])=>e)).size!==r.length)throw P(e,`a key twice in the query`,t);let a=r.filter(([e])=>N.has(e));if(a.length>1)throw P(e,`more than one of branch=, tag= and rev=`,t);let o=Object.fromEntries(r);if(o.lfs!==void 0&&o.lfs!==`true`)throw P(e,`lfs= other than true, which uv does not write`,t);for(let e of[`subdirectory`,`path`])o[e]!==void 0&&oe(o[e],t);let s=n.hash===``?void 0:n.hash.slice(1);if(s!==void 0&&!y(s))throw P(e,F,t);let c=o.rev?.toLowerCase();if(c!==void 0&&s!==void 0&&y(c)&&c!==s)throw P(e,`rev= names another commit than the one it resolved to`,t);return n.search=``,n.hash=``,{type:`git`,url:e,repository:n.href,reference:a.length===0?void 0:{kind:a[0][0],name:a[0][1]},commit:s,subdirectory:o.subdirectory,path:o.path,lfs:o.lfs===`true`}}function xe(e,t){return/^[A-Za-z][\dA-Za-z+.-]+:/u.test(h(e,t))?{type:`registry`,url:T(e,t).href,path:void 0}:{type:`registry`,url:void 0,path:u(e,t)}}function Se(e,t,n,r){let i=w(r,e);if(e===`registry`)return xe(t,i);if(e===`git`){let e=I(t,i);if(e.commit===void 0)throw P(t,F,i);return e}if(e===`url`){if(T(t,i,[`https:`,`http:`]).hash!==``)throw new S(`${C(t)} has a fragment, which uv drops`,i);return{type:e,url:t,subdirectory:ce(d)(n,w(r,`subdirectory`))}}return{type:e,path:u(t,i)}}function L(e,t){p(e,t,[...M,`subdirectory`]);let n=ie(e,M,t);if(e.subdirectory!==void 0&&n!==`url`)throw new S(`a subdirectory, which uv reads of a URL alone`,w(t,`subdirectory`));let r=Se(n,e[n],e.subdirectory,t);return{...r,id:Ce(r)}}function Ce(e){return e.type===`registry`?`registry+${e.url??e.path}`:e.type===`git`?`git+${e.url}`:e.type===`url`?`direct+${e.url}${e.subdirectory===void 0?``:`#subdirectory=${e.subdirectory}`}`:`${e.type}+${e.path}`}var R=e=>ye.has(e.type);function z(e,t){if(p(e,t,[`package`,`extra`,`group`]),e.extra!==void 0&&e.group!==void 0)throw new S(`an extra and a group, of which uv takes one`,t);return{package:i(e.package,w(t,`package`)),extra:b(e,`extra`,t,i),group:b(e,`group`,t,i)}}var B=[`git`,`url`,`path`,`directory`,`editable`,`virtual`],V=[`specifier`,`index`,`conflict`],H=[`name`,`extras`,`groups`,`marker`,`subdirectory`,...B,...V];function we(e,t){let n=B.filter(t=>e[t]!==void 0),i=V.filter(t=>e[t]!==void 0);if(n.length+ +(i.length>0)>1)throw new S(`more than one source: ${[...n,...i].join(`, `)}`,t);if(e.subdirectory!==void 0&&n[0]!==`url`)throw new S(`a subdirectory, which uv reads of a URL alone`,w(t,`subdirectory`));let[a=`registry`]=n,o=w(t,a);return a===`registry`?{type:a,specifier:b(e,`specifier`,t,r),index:b(e,`index`,t,T)?.href,conflict:b(e,`conflict`,t,z)}:a===`git`?I(e.git,o):a===`url`?{type:a,url:T(e.url,o,[`https:`,`http:`]).href,subdirectory:b(e,`subdirectory`,t,d)}:{type:a,path:u(e[a],o)}}function U(e,t,n=H){p(e,t,n);let r=b(e,`extras`,t,D)??[],o=b(e,`groups`,t,D)??[];if(r.length>0&&o.length>0)throw new S(`extras and groups, of which uv takes one`,t);return{name:i(e.name,w(t,`name`)),extras:r,groups:o,marker:b(e,`marker`,t,a),source:we(e,t)}}function Te(e,t){return{...U(e,t,[...H,`hashes`]),hashes:b(e,`hashes`,t,v((e,t)=>l(e,t,c)))??[]}}var W=_(U),G=(e,t)=>O(e,t,W);function Ee(e,t){return p(e,t,[`name`,`version`,`requires-dist`,`requires-python`,`provides-extras`]),{name:i(e.name,w(t,`name`)),version:b(e,`version`,t,n),requiresDist:b(e,`requires-dist`,t,v(o))??[],requiresPython:b(e,`requires-python`,t,r),providesExtras:b(e,`provides-extras`,t,D)??[]}}var De=_((e,t)=>{if(fe(e)&&Object.hasOwn(e,`package`))throw new S(`an override of one package's dependencies, which is not read here`,t);return U(e,t)}),Oe=[`members`,`requirements`,`constraints`,`overrides`,`excludes`,`build-constraints`,`dependency-groups`,`dependency-metadata`];function ke(e=Object.create(null)){let t=`manifest`;p(e,t,Oe);let n=(n,r)=>b(e,n,t,r)??[];return{members:n(`members`,D),requirements:n(`requirements`,W),constraints:n(`constraints`,W),overrides:n(`overrides`,De),excludes:n(`excludes`,D),buildConstraints:n(`build-constraints`,_(Te)),dependencyGroups:G(e[`dependency-groups`],w(t,`dependency-groups`)),dependencyMetadata:n(`dependency-metadata`,_(Ee))}}function Ae(e=Object.create(null),t){return p(e,t,[`requires-dist`,`provides-extras`,`requires-dev`]),{requiresDist:b(e,`requires-dist`,t,W)??[],providesExtras:b(e,`provides-extras`,t,D)??[],requiresDev:G(e[`requires-dev`],w(t,`requires-dev`))}}var K=(...e)=>(t,n)=>{if(!e.includes(h(t,n)))throw new S(`expected one of ${e.join(`, `)}`,n);return t},q=K(`disallow`,`allow`,`if-necessary`,`explicit`,`if-necessary-or-explicit`),J=g(e=>/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d{1,9})?S)?)?$/u.test(e),`an ISO 8601 duration`);function je(e,t){return e===!1?!1:typeof e==`string`?{timestamp:E(e,t),span:void 0}:(p(e,t,[`timestamp`,`span`]),{timestamp:E(e.timestamp,w(t,`timestamp`)),span:J(e.span,w(t,`span`))})}function Me(e,t){p(e,t,[`glibc`,`musl`]);let n=g(e=>/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u.test(e),`a libc version`);return{glibc:b(e,`glibc`,t,n),musl:b(e,`musl`,t,n)}}var Ne=[`resolution-mode`,`prerelease-mode`,`fork-strategy`,`exclude-newer`,`exclude-newer-span`,`exclude-newer-package`,`prerelease-package`,`minimum-libc-version`];function Pe(e=Object.create(null)){let t=`options`;p(e,t,Ne);let n=b(e,`exclude-newer`,t,E);return{resolutionMode:b(e,`resolution-mode`,t,K(`highest`,`lowest`,`lowest-direct`))??`highest`,prereleaseMode:b(e,`prerelease-mode`,t,q)??`if-necessary-or-explicit`,forkStrategy:b(e,`fork-strategy`,t,K(`fewest`,`requires-python`))??`requires-python`,excludeNewer:e[`exclude-newer-span`]===void 0?n:void 0,excludeNewerSpan:b(e,`exclude-newer-span`,t,J),excludeNewerPackage:O(e[`exclude-newer-package`],w(t,`exclude-newer-package`),je),prereleasePackage:O(e[`prerelease-package`],w(t,`prerelease-package`),q),minimumLibcVersion:b(e,`minimum-libc-version`,t,Me)}}var Fe=_((e,t)=>{let n=_(z)(e,t);if(n.length<2)throw new S(`a set of conflicts of fewer than two, which uv refuses`,t);return n}),Ie=[`version`,`revision`,`requires-python`,`resolution-markers`,`supported-markers`,`required-markers`,`conflicts`,`options`,`manifest`,`package`],Le={distribution:"`distribution` is what uv 0.2 and older wrote for `package`, which is not read here"},Re=[`name`,`version`,`source`,`resolution-markers`,`dependencies`,`sdist`,`wheels`,`optional-dependencies`,`dev-dependencies`,`metadata`],ze={"dependency-groups":"`dependency-groups` is an older spelling of `dev-dependencies`, which uv no longer writes"},Be=[`name`,`version`,`source`,`extra`,`marker`];function Ve(e,t){if(e===void 0)return 0;if(e===1||e===2||e===3)return e;throw new S(`unsupported revision: expected 1, 2 or 3, found ${f(e)}`,t)}function He(e,t){if(e===1)return e;throw e===void 0?new S("no `version`: a lockfile of uv 0.2 or older, which is not read here",t):new S(`unsupported version: expected 1, found ${f(e)}`,t)}var Y=(e,t)=>e===void 0?[]:ne(e,t,a),X=(e,t,n)=>`${e}${t===void 0?``:`==${t}`} @ ${n}`;function Ue(e,t){p(e,t,Be);let r=b(e,`extra`,t,D)??[],o=x(r);if(o!==void 0)throw new S(`${C(o)} is listed twice`,w(t,`extra`));return{name:i(e.name,w(t,`name`)),version:b(e,`version`,t,n),source:b(e,`source`,t,L),extras:r,marker:b(e,`marker`,t,a),where:t}}var Z=(e,t)=>e===void 0?[]:m(e,t).map((e,n)=>Ue(e,`${t}[${n}]`));function We(e,r){p(e,r,Re,ze);let a=i(e.name,w(r,`name`)),o=L(e.source,w(r,`source`)),s=b(e,`version`,r,n);if(s===void 0&&!R(o))throw new S(`expected a version, which uv writes of any but a source tree's package`,r);let c={key:X(a,s,o.id),name:a,version:s,versionKey:s===void 0?void 0:t(s),source:o};return{...c,resolutionMarkers:Y(e[`resolution-markers`],w(r,`resolution-markers`)),sdist:_e(e.sdist,w(r,`sdist`),o),wheels:ve(e.wheels,w(r,`wheels`),c),edges:Z(e.dependencies,w(r,`dependencies`)),extraEdges:O(e[`optional-dependencies`],w(r,`optional-dependencies`),Z),groupEdges:O(e[`dev-dependencies`],w(r,`dev-dependencies`),Z),metadata:Ae(e.metadata,w(r,`metadata`))}}var Q=(e,t,n)=>`${e} ${t} ${n}`;function Ge(e,n){let r=t=>me(t,e.where),i=n.byName.get(e.name)??r(`${C(e.name)} names no package in the lockfile`),a=i.length===1?i[0]:void 0,o=e.source?.id??a?.source.id??r(`${C(e.name)} could be any of ${i.length} packages, and names no source`);e.version===void 0&&a===void 0&&!R(e.source)&&r(`${C(e.name)} could be any of ${i.length} versions, and names none`);let s=e.version===void 0?a?.versionKey:t(e.version),c=n.byId.get(Q(e.name,s,o))??r(`names a package the lockfile does not hold: ${C(X(e.name,e.version,o))}`);e.version!==void 0&&e.version!==c.version&&r(`${C(e.version)}, where the package is ${C(c.version)}`);for(let t of e.extras)t in c.extraEdges||r(`${C(t)}, an extra ${C(c.key)} has no dependencies for, which uv drops`);return{package:c.key,extras:e.extras,marker:e.marker}}function Ke(e,t,n){let r=e.map(e=>Ge(e,t)),i=x(r,e=>JSON.stringify([e.package,[...e.extras].sort(),e.marker]));if(i!==void 0)throw new S(`${C(i.package)} is listed twice alike`,n);return r}var $=(e,t,n)=>le(e,n,(e,n)=>Ke(e,t,n));function qe(e,t,n){return e.members.length===0?t.filter(e=>R(e.source)&&e.source.path===`.`).map(e=>e.key):e.members.map((e,t)=>{let r=(n.byName.get(e)??[]).filter(e=>R(e.source));if(r.length!==1)throw new S(`${C(e)} is ${r.length===0?`no package`:`more than one package`} of a directory in the lockfile`,`manifest.members[${t}]`);return r[0].key})}function Je(e){let t=p(pe(e),void 0,Ie,Le),n=He(t.version,`version`),i=Ve(t.revision,`revision`),a=r(t[`requires-python`],`requires-python`),o=m(t.package??[],`package`).map((e,t)=>We(e,`package[${t}]`)),s=ae(o,e=>Q(e.name,e.versionKey,e.source.id),e=>e.key),c={byName:Map.groupBy(o,e=>e.name),byId:new Map([...s].map(([e,t])=>[e,o[t]]))},l=Object.create(null);for(let[e,t]of o.entries()){let n=`package[${e}]`;l[t.key]={name:t.name,version:t.version,source:t.source,resolutionMarkers:t.resolutionMarkers,dependencies:Ke(t.edges,c,w(n,`dependencies`)),optionalDependencies:$(t.extraEdges,c,w(n,`optional-dependencies`)),devDependencies:$(t.groupEdges,c,w(n,`dev-dependencies`)),sdist:t.sdist,wheels:t.wheels,metadata:t.metadata}}let u=ke(t.manifest);return{version:n,revision:i,requiresPython:a,resolutionMarkers:Y(t[`resolution-markers`],`resolution-markers`),supportedMarkers:Y(t[`supported-markers`],`supported-markers`),requiredMarkers:Y(t[`required-markers`],`required-markers`),conflicts:b(t,`conflicts`,``,Fe)??[],options:Pe(t.options),manifest:u,members:qe(u,o,c),packages:l}}export{S as LockfileError,ue as TomlError,Je as parseUvLock};
1
+ import{a as e,b as t,d as n,e as r,h as i,i as a,j as o,k as s,m as c,o as l,q as u,r as d,s as ee}from"./chunk-CU3FPB3P.js";import{a as f,c as p,e as m,f as h,h as te,j as g,k as _,l as v,m as ne,n as re,o as ie,p as ae}from"./chunk-GX5UXWT4.js";import{D as oe,H as y,M as se,l as ce,m as b,p as le,t as x}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import{a as ue,c as de,e as fe,g as pe}from"./chunk-VYYUMYVW.js";import{d as S,e as me,h as C,i as w}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";function T(e,t,n=[`https:`,`http:`,`file:`]){let r=URL.parse(h(e,t));if(r===null||r.href!==e||!n.includes(r.protocol))throw new S(`${C(e)} is not a URL in normal form, of ${n.map(e=>e.slice(0,-1)).join(`, `)}`,t);if(r.username!==``||r.password!==``)throw new S(`${C(e)} has credentials in it, which uv does not write`,t);return r}var E=g(e=>/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,9})?Z$/u.test(e)&&de(e),`a UTC timestamp`),D=v(i),O=(e,t,n)=>re(e,t,i,n),he={__proto__:null,md5:32,sha256:64,sha384:96,sha512:128,blake2b:64};function k(e){return e.type===`url`?new URL(e.url).pathname:e.type===`path`||e.type===`git`?e.path:void 0}var A=e=>e===void 0?void 0:e.endsWith(`.whl`)?`wheel`:`sdist`;function ge(e,t){return e.type===`registry`?e.url===void 0?[`url`,`path`]:[`url`]:t?e.type===`url`?[`url`]:[`filename`]:[]}function j(e,t,n,r){let i=ge(n,r),a=n.type===`registry`;p(e,t,[...i,`hash`,...a?[`size`,`upload-time`,`upload_time`]:[]]);let o=i.filter(t=>e[t]!==void 0);if(i.length>0&&o.length!==1)throw new S(o.length===0?`expected ${i.join(` or `)}`:`a url and a path, of which uv reads the url alone`,t);if(e[`upload-time`]!==void 0&&e.upload_time!==void 0)throw new S(`upload-time and upload_time, which are one field to uv`,t);let s=b(e,`url`,t,T),c={url:s?.href,path:b(e,`path`,t,u),filename:b(e,`filename`,t,h),hash:b(e,`hash`,t,(e,t)=>l(e,t,he)),size:b(e,`size`,t,te),uploadTime:b(e,e.upload_time===void 0?`upload-time`:`upload_time`,t,E)};if(!a&&c.hash===void 0)throw new S(`expected a hash, which uv writes for a file of a ${n.type} source`,t);return{file:c,pathname:s?.pathname}}function _e(e,t,n){if(e===void 0)return;let r=A(k(n));if(n.type!==`registry`&&r!==`sdist`)throw new S(`an sdist, which a ${n.type} source${r===`wheel`?` of a wheel`:``} has none of`,t);let{url:i,path:a,hash:o,size:s,uploadTime:c}=j(e,t,n,!1).file;return{url:i,path:a,hash:o,size:s,uploadTime:c}}function ve(t,n,r){if(t===void 0)return[];let{source:i}=r,a=A(k(i)),o=m(t,n);if(i.type!==`registry`&&(a!==`wheel`||o.length!==1))throw new S(a===`wheel`?`expected the one wheel the source is`:`wheels, which a ${i.type} source${a===`sdist`?` of an sdist`:``} has none of`,n);let c=new Set;return o.map((t,a)=>{let o=`${n}[${a}]`,{file:l,pathname:u}=j(t,o,i,!0),d=ee({name:l.filename,path:l.path,pathname:u}),f=d===void 0?void 0:s(d);if(f===void 0)throw new S(`${C(String(d))} is not the name of a wheel`,o);if(c.has(d))throw new S(`${C(d)} is listed twice`,o);if(c.add(d),f.name!==r.name)throw new S(`${C(d)} is a wheel of ${C(f.name)}, not of ${C(r.name)}`,o);if(r.versionKey!==void 0&&r.versionKey!==e(f.version)&&r.versionKey!==e({...f.version,local:void 0}))throw new S(`${C(d)} is a wheel of another version than ${C(r.version)}`,o);if(i.type===`url`&&l.url!==i.url)throw new S(`${C(l.url)} is not the URL the source names`,w(o,`url`));return{...l,filename:d}})}var M=[`registry`,`git`,`url`,`path`,`directory`,`editable`,`virtual`],ye=new Set([`directory`,`editable`,`virtual`]),N=new Set([`branch`,`tag`,`rev`]),be=new Set([...N,`subdirectory`,`path`,`lfs`]),P=(e,t,n)=>new S(`${C(e)} is not a git source: ${t}`,n),F=`expected "#" and the full commit it resolved to`;function I(e,t){let n=T(se(e,t),t,[`https:`,`http:`,`ssh:`,`file:`]),r=[...n.searchParams],i=r.find(([e])=>!be.has(e));if(i!==void 0)throw P(e,`uv does not read ${C(i[0])}`,t);if(new Set(r.map(([e])=>e)).size!==r.length)throw P(e,`a key twice in the query`,t);let a=r.filter(([e])=>N.has(e));if(a.length>1)throw P(e,`more than one of branch=, tag= and rev=`,t);let o=Object.fromEntries(r);if(o.lfs!==void 0&&o.lfs!==`true`)throw P(e,`lfs= other than true, which uv does not write`,t);for(let e of[`subdirectory`,`path`])o[e]!==void 0&&oe(o[e],t);let s=n.hash===``?void 0:n.hash.slice(1);if(s!==void 0&&!y(s))throw P(e,F,t);let c=o.rev?.toLowerCase();if(c!==void 0&&s!==void 0&&y(c)&&c!==s)throw P(e,`rev= names another commit than the one it resolved to`,t);return n.search=``,n.hash=``,{type:`git`,url:e,repository:n.href,reference:a.length===0?void 0:{kind:a[0][0],name:a[0][1]},commit:s,subdirectory:o.subdirectory,path:o.path,lfs:o.lfs===`true`}}function xe(e,t){return/^[A-Za-z][\dA-Za-z+.-]+:/u.test(h(e,t))?{type:`registry`,url:T(e,t).href,path:void 0}:{type:`registry`,url:void 0,path:u(e,t)}}function Se(e,t,n,r){let i=w(r,e);if(e===`registry`)return xe(t,i);if(e===`git`){let e=I(t,i);if(e.commit===void 0)throw P(t,F,i);return e}if(e===`url`){if(T(t,i,[`https:`,`http:`]).hash!==``)throw new S(`${C(t)} has a fragment, which uv drops`,i);return{type:e,url:t,subdirectory:ce(d)(n,w(r,`subdirectory`))}}return{type:e,path:u(t,i)}}function L(e,t){p(e,t,[...M,`subdirectory`]);let n=ie(e,M,t);if(e.subdirectory!==void 0&&n!==`url`)throw new S(`a subdirectory, which uv reads of a URL alone`,w(t,`subdirectory`));let r=Se(n,e[n],e.subdirectory,t);return{...r,id:Ce(r)}}function Ce(e){return e.type===`registry`?`registry+${e.url??e.path}`:e.type===`git`?`git+${e.url}`:e.type===`url`?`direct+${e.url}${e.subdirectory===void 0?``:`#subdirectory=${e.subdirectory}`}`:`${e.type}+${e.path}`}var R=e=>ye.has(e.type);function z(e,t){if(p(e,t,[`package`,`extra`,`group`]),e.extra!==void 0&&e.group!==void 0)throw new S(`an extra and a group, of which uv takes one`,t);return{package:i(e.package,w(t,`package`)),extra:b(e,`extra`,t,i),group:b(e,`group`,t,i)}}var B=[`git`,`url`,`path`,`directory`,`editable`,`virtual`],V=[`specifier`,`index`,`conflict`],H=[`name`,`extras`,`groups`,`marker`,`subdirectory`,...B,...V];function we(e,t){let n=B.filter(t=>e[t]!==void 0),i=V.filter(t=>e[t]!==void 0);if(n.length+ +(i.length>0)>1)throw new S(`more than one source: ${[...n,...i].join(`, `)}`,t);if(e.subdirectory!==void 0&&n[0]!==`url`)throw new S(`a subdirectory, which uv reads of a URL alone`,w(t,`subdirectory`));let[a=`registry`]=n,o=w(t,a);return a===`registry`?{type:a,specifier:b(e,`specifier`,t,r),index:b(e,`index`,t,T)?.href,conflict:b(e,`conflict`,t,z)}:a===`git`?I(e.git,o):a===`url`?{type:a,url:T(e.url,o,[`https:`,`http:`]).href,subdirectory:b(e,`subdirectory`,t,d)}:{type:a,path:u(e[a],o)}}function U(e,t,n=H){p(e,t,n);let r=b(e,`extras`,t,D)??[],o=b(e,`groups`,t,D)??[];if(r.length>0&&o.length>0)throw new S(`extras and groups, of which uv takes one`,t);return{name:i(e.name,w(t,`name`)),extras:r,groups:o,marker:b(e,`marker`,t,a),source:we(e,t)}}function Te(e,t){return{...U(e,t,[...H,`hashes`]),hashes:b(e,`hashes`,t,v((e,t)=>l(e,t,c)))??[]}}var W=_(U),G=(e,t)=>O(e,t,W);function Ee(e,t){return p(e,t,[`name`,`version`,`requires-dist`,`requires-python`,`provides-extras`]),{name:i(e.name,w(t,`name`)),version:b(e,`version`,t,n),requiresDist:b(e,`requires-dist`,t,v(o))??[],requiresPython:b(e,`requires-python`,t,r),providesExtras:b(e,`provides-extras`,t,D)??[]}}var De=_((e,t)=>{if(fe(e)&&Object.hasOwn(e,`package`))throw new S(`an override of one package's dependencies, which is not read here`,t);return U(e,t)}),Oe=[`members`,`requirements`,`constraints`,`overrides`,`excludes`,`build-constraints`,`dependency-groups`,`dependency-metadata`];function ke(e=Object.create(null)){let t=`manifest`;p(e,t,Oe);let n=(n,r)=>b(e,n,t,r)??[];return{members:n(`members`,D),requirements:n(`requirements`,W),constraints:n(`constraints`,W),overrides:n(`overrides`,De),excludes:n(`excludes`,D),buildConstraints:n(`build-constraints`,_(Te)),dependencyGroups:G(e[`dependency-groups`],w(t,`dependency-groups`)),dependencyMetadata:n(`dependency-metadata`,_(Ee))}}function Ae(e=Object.create(null),t){return p(e,t,[`requires-dist`,`provides-extras`,`requires-dev`]),{requiresDist:b(e,`requires-dist`,t,W)??[],providesExtras:b(e,`provides-extras`,t,D)??[],requiresDev:G(e[`requires-dev`],w(t,`requires-dev`))}}var K=(...e)=>(t,n)=>{if(!e.includes(h(t,n)))throw new S(`expected one of ${e.join(`, `)}`,n);return t},q=K(`disallow`,`allow`,`if-necessary`,`explicit`,`if-necessary-or-explicit`),J=g(e=>/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+W)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d{1,9})?S)?)?$/u.test(e),`an ISO 8601 duration`);function je(e,t){return e===!1?!1:typeof e==`string`?{timestamp:E(e,t),span:void 0}:(p(e,t,[`timestamp`,`span`]),{timestamp:E(e.timestamp,w(t,`timestamp`)),span:J(e.span,w(t,`span`))})}function Me(e,t){p(e,t,[`glibc`,`musl`]);let n=g(e=>/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u.test(e),`a libc version`);return{glibc:b(e,`glibc`,t,n),musl:b(e,`musl`,t,n)}}var Ne=[`resolution-mode`,`prerelease-mode`,`fork-strategy`,`exclude-newer`,`exclude-newer-span`,`exclude-newer-package`,`prerelease-package`,`minimum-libc-version`];function Pe(e=Object.create(null)){let t=`options`;p(e,t,Ne);let n=b(e,`exclude-newer`,t,E);return{resolutionMode:b(e,`resolution-mode`,t,K(`highest`,`lowest`,`lowest-direct`))??`highest`,prereleaseMode:b(e,`prerelease-mode`,t,q)??`if-necessary-or-explicit`,forkStrategy:b(e,`fork-strategy`,t,K(`fewest`,`requires-python`))??`requires-python`,excludeNewer:e[`exclude-newer-span`]===void 0?n:void 0,excludeNewerSpan:b(e,`exclude-newer-span`,t,J),excludeNewerPackage:O(e[`exclude-newer-package`],w(t,`exclude-newer-package`),je),prereleasePackage:O(e[`prerelease-package`],w(t,`prerelease-package`),q),minimumLibcVersion:b(e,`minimum-libc-version`,t,Me)}}var Fe=_((e,t)=>{let n=_(z)(e,t);if(n.length<2)throw new S(`a set of conflicts of fewer than two, which uv refuses`,t);return n}),Ie=[`version`,`revision`,`requires-python`,`resolution-markers`,`supported-markers`,`required-markers`,`conflicts`,`options`,`manifest`,`package`],Le={distribution:"`distribution` is what uv 0.2 and older wrote for `package`, which is not read here"},Re=[`name`,`version`,`source`,`resolution-markers`,`dependencies`,`sdist`,`wheels`,`optional-dependencies`,`dev-dependencies`,`metadata`],ze={"dependency-groups":"`dependency-groups` is an older spelling of `dev-dependencies`, which uv no longer writes"},Be=[`name`,`version`,`source`,`extra`,`marker`];function Ve(e,t){if(e===void 0)return 0;if(e===1||e===2||e===3)return e;throw new S(`unsupported revision: expected 1, 2 or 3, found ${f(e)}`,t)}function He(e,t){if(e===1)return e;throw e===void 0?new S("no `version`: a lockfile of uv 0.2 or older, which is not read here",t):new S(`unsupported version: expected 1, found ${f(e)}`,t)}var Y=(e,t)=>e===void 0?[]:ne(e,t,a),X=(e,t,n)=>`${e}${t===void 0?``:`==${t}`} @ ${n}`;function Ue(e,t){p(e,t,Be);let r=b(e,`extra`,t,D)??[],o=x(r);if(o!==void 0)throw new S(`${C(o)} is listed twice`,w(t,`extra`));return{name:i(e.name,w(t,`name`)),version:b(e,`version`,t,n),source:b(e,`source`,t,L),extras:r,marker:b(e,`marker`,t,a),where:t}}var Z=(e,t)=>e===void 0?[]:m(e,t).map((e,n)=>Ue(e,`${t}[${n}]`));function We(e,r){p(e,r,Re,ze);let a=i(e.name,w(r,`name`)),o=L(e.source,w(r,`source`)),s=b(e,`version`,r,n);if(s===void 0&&!R(o))throw new S(`expected a version, which uv writes of any but a source tree's package`,r);let c={key:X(a,s,o.id),name:a,version:s,versionKey:s===void 0?void 0:t(s),source:o};return{...c,resolutionMarkers:Y(e[`resolution-markers`],w(r,`resolution-markers`)),sdist:_e(e.sdist,w(r,`sdist`),o),wheels:ve(e.wheels,w(r,`wheels`),c),edges:Z(e.dependencies,w(r,`dependencies`)),extraEdges:O(e[`optional-dependencies`],w(r,`optional-dependencies`),Z),groupEdges:O(e[`dev-dependencies`],w(r,`dev-dependencies`),Z),metadata:Ae(e.metadata,w(r,`metadata`))}}var Q=(e,t,n)=>`${e} ${t} ${n}`;function Ge(e,n){let r=t=>me(t,e.where),i=n.byName.get(e.name)??r(`${C(e.name)} names no package in the lockfile`),a=i.length===1?i[0]:void 0,o=e.source?.id??a?.source.id??r(`${C(e.name)} could be any of ${i.length} packages, and names no source`);e.version===void 0&&a===void 0&&!R(e.source)&&r(`${C(e.name)} could be any of ${i.length} versions, and names none`);let s=e.version===void 0?a?.versionKey:t(e.version),c=n.byId.get(Q(e.name,s,o))??r(`names a package the lockfile does not hold: ${C(X(e.name,e.version,o))}`);e.version!==void 0&&e.version!==c.version&&r(`${C(e.version)}, where the package is ${C(c.version)}`);for(let t of e.extras)t in c.extraEdges||r(`${C(t)}, an extra ${C(c.key)} has no dependencies for, which uv drops`);return{package:c.key,extras:e.extras,marker:e.marker}}function Ke(e,t,n){let r=e.map(e=>Ge(e,t)),i=x(r,e=>JSON.stringify([e.package,[...e.extras].sort(),e.marker]));if(i!==void 0)throw new S(`${C(i.package)} is listed twice alike`,n);return r}var $=(e,t,n)=>le(e,n,(e,n)=>Ke(e,t,n));function qe(e,t,n){return e.members.length===0?t.filter(e=>R(e.source)&&e.source.path===`.`).map(e=>e.key):e.members.map((e,t)=>{let r=(n.byName.get(e)??[]).filter(e=>R(e.source));if(r.length!==1)throw new S(`${C(e)} is ${r.length===0?`no package`:`more than one package`} of a directory in the lockfile`,`manifest.members[${t}]`);return r[0].key})}function Je(e){let t=p(pe(e),void 0,Ie,Le),n=He(t.version,`version`),i=Ve(t.revision,`revision`),a=r(t[`requires-python`],`requires-python`),o=m(t.package??[],`package`).map((e,t)=>We(e,`package[${t}]`)),s=ae(o,e=>Q(e.name,e.versionKey,e.source.id),e=>e.key),c={byName:Map.groupBy(o,e=>e.name),byId:new Map([...s].map(([e,t])=>[e,o[t]]))},l=Object.create(null);for(let[e,t]of o.entries()){let n=`package[${e}]`;l[t.key]={name:t.name,version:t.version,source:t.source,resolutionMarkers:t.resolutionMarkers,dependencies:Ke(t.edges,c,w(n,`dependencies`)),optionalDependencies:$(t.extraEdges,c,w(n,`optional-dependencies`)),devDependencies:$(t.groupEdges,c,w(n,`dev-dependencies`)),sdist:t.sdist,wheels:t.wheels,metadata:t.metadata}}let u=ke(t.manifest);return{version:n,revision:i,requiresPython:a,resolutionMarkers:Y(t[`resolution-markers`],`resolution-markers`),supportedMarkers:Y(t[`supported-markers`],`supported-markers`),requiredMarkers:Y(t[`required-markers`],`required-markers`),conflicts:b(t,`conflicts`,``,Fe)??[],options:Pe(t.options),manifest:u,members:qe(u,o,c),packages:l}}export{S as LockfileError,ue as TomlError,Je as parseUvLock};
@@ -1,4 +1,4 @@
1
- import{Bb as e,Cb as t,Db as n,Hb as r,Ib as i,Jb as a,Ob as o,dc as s,jc as c,u as l}from"./chunk-UZC7POI4.js";import{l as u,m as d}from"./chunk-OCE6KQGJ.js";import{e as f,f as p,g as m,j as h}from"./chunk-QRKFPLA4.js";import{c as g}from"./chunk-2XUEZHIP.js";var _=`.md-quote,.md-alert{margin:0;&:not(:first-child),+*{margin-top:.5lh}>:first-child{margin-top:0}>:last-child{margin-bottom:0}}.md-quote{padding-inline-start:.85em;border-inline-start:.25em solid rgb(from currentcolor r g b / .3);color:rgb(from currentcolor r g b / calc(alpha*.78));.md-quote{color:inherit}}.md-alert{--md-alert: var(--info);padding:.35lh .85em;border-inline-start:.25em solid var(--md-alert);background:rgb(from var(--md-alert) r g b / .06);border-radius:0 var(--ui-radius, 4px) var(--ui-radius, 4px) 0}.md-alert-tip{--md-alert: var(--green)}.md-alert-important{--md-alert: var(--purple)}.md-alert-warning{--md-alert: var(--warning)}.md-alert-caution{--md-alert: var(--critical)}.md-alert-title{display:flex;align-items:center;gap:.45em;margin-bottom:.2lh;color:var(--md-alert);font-weight:600}.md-alert-icon{flex:none;width:1.05em;height:1.05em}
1
+ import{Bb as e,Cb as t,Db as n,Hb as r,Ib as i,Jb as a,Ob as o,dc as s,jc as c,u as l}from"./chunk-O2NYWLX3.js";import{l as u,m as d}from"./chunk-26W3E5JE.js";import{e as f,f as p,g as m,j as h}from"./chunk-QRKFPLA4.js";import{c as g}from"./chunk-2XUEZHIP.js";var _=`.md-quote,.md-alert{margin:0;&:not(:first-child),+*{margin-top:.5lh}>:first-child{margin-top:0}>:last-child{margin-bottom:0}}.md-quote{padding-inline-start:.85em;border-inline-start:.25em solid rgb(from currentcolor r g b / .3);color:rgb(from currentcolor r g b / calc(alpha*.78));.md-quote{color:inherit}}.md-alert{--md-alert: var(--info);padding:.35lh .85em;border-inline-start:.25em solid var(--md-alert);background:rgb(from var(--md-alert) r g b / .06);border-radius:0 var(--ui-radius, 4px) var(--ui-radius, 4px) 0}.md-alert-tip{--md-alert: var(--green)}.md-alert-important{--md-alert: var(--purple)}.md-alert-warning{--md-alert: var(--warning)}.md-alert-caution{--md-alert: var(--critical)}.md-alert-title{display:flex;align-items:center;gap:.45em;margin-bottom:.2lh;color:var(--md-alert);font-weight:600}.md-alert-icon{flex:none;width:1.05em;height:1.05em}
2
2
  `,v=`.token.comment,.token.prolog,.token.cdata{color:var(--code-comment);font-style:italic}.token.punctuation{color:var(--muted)}.token.string,.token.attr-value,.token.char,.token.regex{color:var(--code-string)}.token.number,.token.boolean,.token.constant,.token.symbol{color:var(--code-number)}.token.keyword,.token.builtin,.token.important,.token.atrule{color:var(--code-keyword)}.token.function,.token.class-name,.token.tag{color:var(--code-function)}.token.operator,.token.entity,.token.url,.token.attr-name,.token.selector{color:var(--code-operator)}.token.variable,.token.property,.token.parameter{color:var(--code-variable)}.token.annotation{color:var(--code-function)}.token.deleted{color:var(--code-deleted)}.token.inserted{color:var(--code-inserted)}.token.italic{font-style:italic}.token.bold{font-weight:700}.code-control{padding:0 .3em;margin:0 .1em;border-radius:3px;font-size:.8em;line-height:0;font-style:normal;font-weight:400;color:var(--warning);background:rgb(from var(--warning) r g b / .14);box-shadow:inset 0 0 0 1px rgb(from var(--warning) r g b / .45);white-space:nowrap;user-select:none}.code-look-alike{background:rgb(from var(--warning) r g b / .14);text-decoration:underline wavy var(--warning);text-decoration-skip-ink:none}
3
3
  `,y=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,b=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="1.8" y="5" width="20.4" height="14" rx="2"/><path d="M5.6 15.6V8.4l3.1 3.6 3.1-3.6v7.2"/><path d="M16.9 8.4v7.2m-2.6-2.9 2.6 2.9 2.6-2.9"/></svg>`,x=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M6 9V2h12v7"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><rect x="6" y="14" width="12" height="8"/></svg>`,S=[[`analyzer`,`Analyzer`,`filterAnalyzer`,e,`(none)`],[`model`,`Model`,`filterModel`,n,`(none)`],[`validationModel`,`Validation model`,`filterValidationModel`,n,`(none)`],[`repo`,`Repository`,`filterRepo`,t,`(no repo)`]],C=[[`duplicates`,`Duplicates`,`filterDuplicates`,`rows linked to other reports`],[`cross-context`,`Context`,`filterCrossContext`,`rows across multiple repos or packages`],[`app-stacked`,`App stack`,`filterAppStacked`,`rows with multiple App findings`],[`security`,`Security`,`filterSecurity`,`security-related rows`]];function w(e,t){let n=u(e)?.label??e;return d(e)?.includes(`partial`)?t===`exclude`?`${n} (full only)`:t===`only`?`${n} (partial only)`:n:n}function T(e=l){let t=[];e.filterSeverities.size>0&&t.push({key:`severity`,label:`Severity`,value:h.filter(t=>e.filterSeverities.has(t)).map(e=>f[e]??e).join(`, `),clear:{filterSeverities:new Set}}),e.filterColors.size>0&&t.push({key:`marks`,label:`Marks`,value:[...e.filterColors].map(e=>m[e]??e).join(`, `),clear:{filterColors:new Set}}),e.filterSources.size===1&&t.push({key:`source`,label:`Source`,value:e.filterSources.has(`own`)?`Sources only`:`Dependencies only`,clear:{filterSources:new Set}});for(let[n,r,i,a,o]of S)e[i]&&t.push({key:n,label:r,value:e[i]===a?o:e[i],clear:{[i]:``}});if(d(e.filterRevalidate)&&t.push({key:`revalidate`,label:`Revalidation`,value:w(e.filterRevalidate,e.filterPartial),clear:{filterRevalidate:``,filterPartial:``}}),!e.filterRevalidate&&(e.filterConfMin>0||e.filterConfMax<10)){let n;n=e.filterConfMin>0&&e.filterConfMax<10?`${e.filterConfMin}\u2013${e.filterConfMax}`:e.filterConfMin>0?`\u2265 ${e.filterConfMin}`:`\u2264 ${e.filterConfMax}`,t.push({key:`confidence`,label:`Confidence`,value:n,clear:{filterConfMin:0,filterConfMax:10}})}e.filterInclude&&t.push({key:`search`,label:e.filterIncludeNegate?`Excluding`:`Search`,value:`"${e.filterInclude}"`,clear:{filterInclude:``,filterIncludeNegate:!1}});for(let[n,r]of[[`filterComment`,`comment`],[`filterIssue`,`issue`],[`filterFix`,`fix`],[`filterFlagged`,`flag`]]){let i=e[n];i&&t.push({key:`annotation:${r}`,label:`Annotation`,value:`${i===`with`?`With`:`Without`} ${r}`,clear:{[n]:``}})}for(let[n,r,i,a]of C)!e[i]||n===`duplicates`&&l.currentWorkspace||t.push({key:n,label:r,value:`${e[i]===`with`?`Only`:`Exclude`} ${a}`,clear:{[i]:``}});return t}function E(){return c().filter(e=>s(e).commonTriage===l.shownTriage)}function D(){return l.shownTriage?p[l.shownTriage]??l.shownTriage:null}function O(e,t=r()){let n=E(),s=n.length;i(t);let c;try{c=o(n).length}finally{a()}return{included:c,total:s,excluded:s-c,fields:t,filters:T(t),bucketLabel:D(),focusedOnly:e===`print`&&l.viewMode===`focus`}}var k=`.managed-comment{container:managed-comment / inline-size;white-space:normal}.managed-comment-row{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr) auto;align-items:start;gap:.35rem .65rem;line-height:1.5}.managed-comment-author{grid-column:1;grid-row:1;display:flex;align-items:center;gap:.45rem;min-width:0;max-width:14rem;& strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}}.managed-comment-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.3rem;height:1.3rem;overflow:hidden;border-radius:50%;background:rgb(from var(--muted) r g b / .15);color:var(--muted);font-size:.65rem;font-weight:600;& img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}& img[hidden]{display:none}}.managed-comment-body{grid-column:2;grid-row:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;& a{color:var(--accent);text-decoration:none}& a:hover{text-decoration:underline}& a.comment-self-ref{text-decoration:underline dotted;text-underline-offset:2px}& a.comment-self-ref:hover{text-decoration:underline solid}}.managed-comment-time{color:var(--muted);font-size:.7rem;font-weight:400;white-space:nowrap;text-align:right}.managed-comment-meta{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:.5rem;min-height:1.3rem}.managed-comment-actions{display:flex;align-items:center;gap:.15rem}.managed-comment-row:not(:has(.managed-comment-author)){grid-template-columns:minmax(0,1fr) auto;.managed-comment-body{grid-column:1}.managed-comment-meta{grid-column:2}}@container managed-comment (max-width: 28rem){.managed-comment-row:has(.managed-comment-meta){grid-template-columns:minmax(0,max-content) minmax(0,1fr);.managed-comment-meta{grid-column:1 / -1;grid-row:1}.managed-comment-author,.managed-comment-body{grid-row:2}}.managed-comment-row:not(:has(.managed-comment-author)){grid-template-columns:minmax(0,1fr)}.managed-comment-author{max-width:9rem}}
4
4
  `;export{_ as a,v as b,y as c,b as d,x as e,T as f,E as g,D as h,O as i,k as j};
@@ -1 +1 @@
1
- import{a as e,b as t,c as n,e as r,g as i,h as a,i as o,k as s,l as c,m as l,n as u,p as d,q as f,r as p,s as m}from"./chunk-CU3FPB3P.js";import{b as h,c as g,d as _,e as v,f as y,g as b,h as x,i as S,k as C,l as w}from"./chunk-GX5UXWT4.js";import{H as T,M as E,m as D}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as O,b as k,d as ee,e as A,g as j}from"./chunk-VYYUMYVW.js";import{d as M,h as N,i as P}from"./chunk-7HP2VYIC.js";import"./chunk-OOJM4CTU.js";var F=[`https:`,`http:`,`file:`];function I(e,t,n=F){let r=URL.parse(S(e,t));if(r===null||n!==null&&!n.includes(r.protocol))throw new M(`${N(e)} is not a URL${n===null?``:` of ${n.map(e=>e.slice(0,-1)).join(`, `)}`}`,t);return r}function L(e,t){let n=Object.create(null);for(let[r,i,a]of _(e,t)){if(!(r in l))throw new M(`${N(r)} is not a hash algorithm of hashlib's this reader knows`,a);n[r]=u(r,y(i,a),l[r],a)}if(Object.keys(n).length===0)throw new M(`expected a hash at least`,t);return n}function R(e,t){if(!(e instanceof k))throw h(`a date-time`,e,t);if(!/(?:Z|[+-]00:00)$/u.test(e.text))throw new M(`${e.text} is not in UTC`,t);return e.text}function z(e,t,n){if(g(e,t,[`url`,`path`,`size`,`upload-time`,`hashes`,...n]),e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=D(e,`url`,t,I);return{file:{url:e.url,path:D(e,`path`,t,f),size:D(e,`size`,t,x),uploadTime:D(e,`upload-time`,t,R),hashes:L(e.hashes,P(t,`hashes`))},pathname:r?.pathname}}function B(t,n,r,i){let a=D(t,`name`,n,S),{file:o,pathname:l}=z(t,n,[`name`]),u=m({name:a,path:o.path,pathname:l});if(u===void 0)throw new M(`${N(o.url)} names no file`,n);let d=i?s(u):c(u);if(d===void 0)throw new M(`${N(u)} is not the name of ${i?`a wheel`:`an sdist, .tar.gz or .zip`}`,n);if(d.name!==r.name)throw new M(`${N(u)} is not a file of ${N(r.name)}`,n);if(r.versionKey!==void 0&&e(d.version)!==r.versionKey)throw new M(`${N(u)} is not of version ${N(r.version)}`,n);return{name:u,...o}}var V=(e,t,n)=>e===void 0?void 0:B(e,t,n,!1);function H(e,t,n){if(e===void 0)return[];let r=new Set;return C((e,t)=>{let i=B(e,t,n,!0);if(r.has(i.name))throw new M(`${N(i.name)} is listed twice`,t);return r.add(i.name),i})(e,t)}var U=(e,t)=>({...z(e,t,[`subdirectory`]).file,subdirectory:D(e,`subdirectory`,t,p)});function W(e,t){return g(e,t,[`path`,`editable`,`subdirectory`]),{path:f(e.path,P(t,`path`)),editable:D(e,`editable`,t,b)??!1,subdirectory:D(e,`subdirectory`,t,p)}}var G=new Set([`git`,`hg`,`bzr`,`svn`]);function K(e,t){g(e,t,[`type`,`url`,`path`,`requested-revision`,`commit-id`,`subdirectory`]);let n=S(e.type,P(t,`type`));if(!G.has(n))throw new M(`expected one of ${[...G].join(`, `)}`,P(t,`type`));if(e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=S(e[`commit-id`],P(t,`commit-id`));if((n===`git`||n===`hg`)&&!T(r))throw new M(`${N(r)} is not a full commit hash, which the spec requires`,P(t,`commit-id`));return{type:n,url:D(e,`url`,t,(e,t)=>I(e,t,null)&&E(e,t)),path:D(e,`path`,t,f),requestedRevision:D(e,`requested-revision`,t,S),commitId:r,subdirectory:D(e,`subdirectory`,t,p)}}var q=C((e,t)=>(S(g(e,t).kind,P(t,`kind`)),e)),J=[`lock-version`,`environments`,`requires-python`,`extras`,`dependency-groups`,`default-groups`,`created-by`,`packages`,`tool`],Y=[`name`,`version`,`marker`,`requires-python`,`dependencies`,`vcs`,`directory`,`archive`,`index`,`sdist`,`wheels`,`attestation-identities`,`tool`];function X(e,t){if(!/^1\.\d+$/u.test(y(e,t)))throw new M(`unsupported lock-version: expected "1.0", found ${N(e)}`,t);return e}function Z(e,t,n){let r=[`vcs`,`directory`,`archive`].filter(t=>e[t]!==void 0),i=V(e.sdist,P(t,`sdist`),n),a=H(e.wheels,P(t,`wheels`),n),o=i!==void 0||a.length>0;if(o&&r.length>0)throw new M(`${r.join(` and `)} beside an sdist or wheels, which the spec forbids`,t);if(!o&&r.length!==1)throw new M(`expected one of vcs, directory and archive, or an sdist or wheels, found ${r.length===0?`none`:r.join(` and `)}`,t);return{vcs:D(e,`vcs`,t,K),directory:D(e,`directory`,t,W),archive:D(e,`archive`,t,U),index:D(e,`index`,t,d),sdist:i,wheels:a}}function Q(e,i){g(e,i,Y);let s=a(e.name,P(i,`name`)),c=D(e,`version`,i,n);return{name:s,version:c,marker:D(e,`marker`,i,o),requiresPython:D(e,`requires-python`,i,r),dependencies:[],...Z(e,i,{name:s,version:c,versionKey:c===void 0?void 0:t(c)}),attestationIdentities:D(e,`attestation-identities`,i,q)??[],tool:D(e,`tool`,i,g)}}function $(e,t){return e instanceof k||e instanceof ee?t instanceof e.constructor&&e.text===t.text:Array.isArray(e)?Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>$(e,t[n])):A(e)?A(t)&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(([e,n])=>$(n,t[e])):e===t}function te(e,t,n,r){return e===void 0?[]:C((e,t)=>{if(g(e,t).name===void 0)throw new M(`expected a name`,t);let i=Object.entries(e),a=(r.get(e.name)??[]).filter(e=>i.every(([t,r])=>$(r,n[e][t])));if(a.length!==1)throw new M(a.length===0?`names no entry of packages`:`could be any of ${a.length} entries of packages`,t);return a[0]})(e,t)}function ne(e){let t=new Map;for(let[n,r]of e.entries())if(r.marker===void 0){if(t.has(r.name))throw new M(`${N(r.name)} is listed with no marker, as packages[${t.get(r.name)}] is, and both would be installed`,`packages[${n}]`);t.set(r.name,n)}}function re(e){let t=g(j(e),void 0,J),n=X(t[`lock-version`],`lock-version`),s=v(t.packages,`packages`),c=s.map((e,t)=>Q(e,`packages[${t}]`));ne(c);let l=Map.groupBy(c.keys(),e=>c[e].name);for(let[e,t]of c.entries())t.dependencies=te(s[e].dependencies,`packages[${e}].dependencies`,s,l);return{lockVersion:n,environments:D(t,`environments`,``,w(o)),requiresPython:D(t,`requires-python`,``,r),extras:D(t,`extras`,``,w(a))??[],dependencyGroups:D(t,`dependency-groups`,``,w(i))??[],defaultGroups:D(t,`default-groups`,``,w(i))??[],createdBy:S(t[`created-by`],`created-by`),packages:c,tool:D(t,`tool`,``,g)}}export{M as LockfileError,O as TomlError,re as parsePylock};
1
+ import{a as e,b as t,c as n,e as r,g as i,h as a,i as o,k as s,l as c,m as l,n as u,p as d,q as f,r as p,s as m}from"./chunk-CU3FPB3P.js";import{b as h,c as g,d as _,e as v,f as y,g as b,h as x,i as S,k as C,l as w}from"./chunk-GX5UXWT4.js";import{H as T,M as E,m as D}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import{a as O,b as k,d as ee,e as A,g as j}from"./chunk-VYYUMYVW.js";import{d as M,h as N,i as P}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";var F=[`https:`,`http:`,`file:`];function I(e,t,n=F){let r=URL.parse(S(e,t));if(r===null||n!==null&&!n.includes(r.protocol))throw new M(`${N(e)} is not a URL${n===null?``:` of ${n.map(e=>e.slice(0,-1)).join(`, `)}`}`,t);return r}function L(e,t){let n=Object.create(null);for(let[r,i,a]of _(e,t)){if(!(r in l))throw new M(`${N(r)} is not a hash algorithm of hashlib's this reader knows`,a);n[r]=u(r,y(i,a),l[r],a)}if(Object.keys(n).length===0)throw new M(`expected a hash at least`,t);return n}function R(e,t){if(!(e instanceof k))throw h(`a date-time`,e,t);if(!/(?:Z|[+-]00:00)$/u.test(e.text))throw new M(`${e.text} is not in UTC`,t);return e.text}function z(e,t,n){if(g(e,t,[`url`,`path`,`size`,`upload-time`,`hashes`,...n]),e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=D(e,`url`,t,I);return{file:{url:e.url,path:D(e,`path`,t,f),size:D(e,`size`,t,x),uploadTime:D(e,`upload-time`,t,R),hashes:L(e.hashes,P(t,`hashes`))},pathname:r?.pathname}}function B(t,n,r,i){let a=D(t,`name`,n,S),{file:o,pathname:l}=z(t,n,[`name`]),u=m({name:a,path:o.path,pathname:l});if(u===void 0)throw new M(`${N(o.url)} names no file`,n);let d=i?s(u):c(u);if(d===void 0)throw new M(`${N(u)} is not the name of ${i?`a wheel`:`an sdist, .tar.gz or .zip`}`,n);if(d.name!==r.name)throw new M(`${N(u)} is not a file of ${N(r.name)}`,n);if(r.versionKey!==void 0&&e(d.version)!==r.versionKey)throw new M(`${N(u)} is not of version ${N(r.version)}`,n);return{name:u,...o}}var V=(e,t,n)=>e===void 0?void 0:B(e,t,n,!1);function H(e,t,n){if(e===void 0)return[];let r=new Set;return C((e,t)=>{let i=B(e,t,n,!0);if(r.has(i.name))throw new M(`${N(i.name)} is listed twice`,t);return r.add(i.name),i})(e,t)}var U=(e,t)=>({...z(e,t,[`subdirectory`]).file,subdirectory:D(e,`subdirectory`,t,p)});function W(e,t){return g(e,t,[`path`,`editable`,`subdirectory`]),{path:f(e.path,P(t,`path`)),editable:D(e,`editable`,t,b)??!1,subdirectory:D(e,`subdirectory`,t,p)}}var G=new Set([`git`,`hg`,`bzr`,`svn`]);function K(e,t){g(e,t,[`type`,`url`,`path`,`requested-revision`,`commit-id`,`subdirectory`]);let n=S(e.type,P(t,`type`));if(!G.has(n))throw new M(`expected one of ${[...G].join(`, `)}`,P(t,`type`));if(e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=S(e[`commit-id`],P(t,`commit-id`));if((n===`git`||n===`hg`)&&!T(r))throw new M(`${N(r)} is not a full commit hash, which the spec requires`,P(t,`commit-id`));return{type:n,url:D(e,`url`,t,(e,t)=>I(e,t,null)&&E(e,t)),path:D(e,`path`,t,f),requestedRevision:D(e,`requested-revision`,t,S),commitId:r,subdirectory:D(e,`subdirectory`,t,p)}}var q=C((e,t)=>(S(g(e,t).kind,P(t,`kind`)),e)),J=[`lock-version`,`environments`,`requires-python`,`extras`,`dependency-groups`,`default-groups`,`created-by`,`packages`,`tool`],Y=[`name`,`version`,`marker`,`requires-python`,`dependencies`,`vcs`,`directory`,`archive`,`index`,`sdist`,`wheels`,`attestation-identities`,`tool`];function X(e,t){if(!/^1\.\d+$/u.test(y(e,t)))throw new M(`unsupported lock-version: expected "1.0", found ${N(e)}`,t);return e}function Z(e,t,n){let r=[`vcs`,`directory`,`archive`].filter(t=>e[t]!==void 0),i=V(e.sdist,P(t,`sdist`),n),a=H(e.wheels,P(t,`wheels`),n),o=i!==void 0||a.length>0;if(o&&r.length>0)throw new M(`${r.join(` and `)} beside an sdist or wheels, which the spec forbids`,t);if(!o&&r.length!==1)throw new M(`expected one of vcs, directory and archive, or an sdist or wheels, found ${r.length===0?`none`:r.join(` and `)}`,t);return{vcs:D(e,`vcs`,t,K),directory:D(e,`directory`,t,W),archive:D(e,`archive`,t,U),index:D(e,`index`,t,d),sdist:i,wheels:a}}function Q(e,i){g(e,i,Y);let s=a(e.name,P(i,`name`)),c=D(e,`version`,i,n);return{name:s,version:c,marker:D(e,`marker`,i,o),requiresPython:D(e,`requires-python`,i,r),dependencies:[],...Z(e,i,{name:s,version:c,versionKey:c===void 0?void 0:t(c)}),attestationIdentities:D(e,`attestation-identities`,i,q)??[],tool:D(e,`tool`,i,g)}}function $(e,t){return e instanceof k||e instanceof ee?t instanceof e.constructor&&e.text===t.text:Array.isArray(e)?Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>$(e,t[n])):A(e)?A(t)&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(([e,n])=>$(n,t[e])):e===t}function te(e,t,n,r){return e===void 0?[]:C((e,t)=>{if(g(e,t).name===void 0)throw new M(`expected a name`,t);let i=Object.entries(e),a=(r.get(e.name)??[]).filter(e=>i.every(([t,r])=>$(r,n[e][t])));if(a.length!==1)throw new M(a.length===0?`names no entry of packages`:`could be any of ${a.length} entries of packages`,t);return a[0]})(e,t)}function ne(e){let t=new Map;for(let[n,r]of e.entries())if(r.marker===void 0){if(t.has(r.name))throw new M(`${N(r.name)} is listed with no marker, as packages[${t.get(r.name)}] is, and both would be installed`,`packages[${n}]`);t.set(r.name,n)}}function re(e){let t=g(j(e),void 0,J),n=X(t[`lock-version`],`lock-version`),s=v(t.packages,`packages`),c=s.map((e,t)=>Q(e,`packages[${t}]`));ne(c);let l=Map.groupBy(c.keys(),e=>c[e].name);for(let[e,t]of c.entries())t.dependencies=te(s[e].dependencies,`packages[${e}].dependencies`,s,l);return{lockVersion:n,environments:D(t,`environments`,``,w(o)),requiresPython:D(t,`requires-python`,``,r),extras:D(t,`extras`,``,w(a))??[],dependencyGroups:D(t,`dependency-groups`,``,w(i))??[],defaultGroups:D(t,`default-groups`,``,w(i))??[],createdBy:S(t[`created-by`],`created-by`),packages:c,tool:D(t,`tool`,``,g)}}export{M as LockfileError,O as TomlError,re as parsePylock};
@@ -1 +1 @@
1
- import{b as e}from"./chunk-NRPC74AM.js";import{a as t,d as n,f as r,h as i}from"./chunk-7C7DWL7I.js";import{d as a}from"./chunk-PNHBZGDD.js";import{a as o,b as s}from"./chunk-IVDE66N5.js";import{c}from"./chunk-WGQ7D5DB.js";import{C as l,D as u,G as d,J as f,K as p,L as m,O as h,q as g}from"./chunk-QRKFPLA4.js";import{a as _}from"./chunk-TUII34K2.js";function v(e,t){let n=s([{groups:[e],tree:t.tree,treeDependencies:t.treeDependencies}]);for(let r of e)l(r,t),r.isApp??=g(r,r.source??t.source),r._depsDirectory=n}function y(e,t){return!(e.isApp??g(e,e._source??e.source))&&o(e.file,e._depsDirectory??t??s([{groups:[[e]]}]))}function ee(e,n,r){let i=t(n);return i===`ignored`&&y(e,r)?void 0:i}function b(e,n,a,o){let s=n.id??String(n._id),c=n._reportName??``;y(n,o)&&(a===`ignored`||a===`untriaged`)?(t(e.get(s))!==`ignored`&&r(e,s,{triage:void 0}),i(e,s,c,a===`ignored`,!0)):(r(e,s,{triage:a===`untriaged`?void 0:a}),a!==`ignored`&&a!==`untriaged`&&i(e,s,c,!1))}function x(e,a){let o=new Set;for(let t of e.values()){let e=t?.ignoredReports;if(!e?.length)continue;let r=new Set(e).size!==e.length;for(let i of e)(r||!n(t,i))&&o.add(i)}if(o.size===0)return!1;let c=!1;for(let l of a){let a=(l.groups??[]).flat();if(!a.some(e=>o.has(e._reportName??l.name??l.fileName??``)))continue;let u=s([l]),d=e=>({...e,_source:e._source??e.source??l.source}),f=new Set(a.filter(e=>y(d(e),u)).map(e=>e.id??String(e._id)));for(let o of a){let a=o.id??String(o._id),s=o._reportName??l.name??l.fileName??``,p=e.get(a);p?.ignoredReports?.includes(s)&&(n(p,s)||y(d(o),u)||(t(p)||(c=r(e,a,{triage:`ignored`})||c),f.has(a)||(c=i(e,a,s,!1)||c)))}for(let t of a){if(!y(d(t),u))continue;let n=t.id??String(t._id),r=t._reportName??l.name??l.fileName??``;e.get(n)?.ignoredReports?.includes(r)&&(c=i(e,n,r,!0,!0)||c)}}return c}async function S(e,t){let r=new Set(Object.values(e??{}).flatMap(e=>Array.isArray(e?.ignoredReports)?e.ignoredReports.filter(t=>typeof t==`string`&&!n(e,t)):[])),i=[];for(let e of r){let n;try{let r=await t(e);if(typeof r!=`string`)continue;n=await h(r)}catch{continue}n&&i.push({...n.data,name:e,groups:[n.findings]})}return i}async function C(e,t){if(e!=null&&(typeof e!=`object`||Array.isArray(e)))return{entries:e,changed:!1};let n=new Map(Object.entries(e??{})),r=x(n,await S(e,t));return{entries:Object.fromEntries(n),changed:r}}var w=`links`;function T(e){if(typeof e==`string`)return e.length>0?e:null;if(!e||typeof e!=`object`||Array.isArray(e))return null;let{id:t}=e;return typeof t==`string`&&t.length>0?t:null}function E(e){if(typeof e==`string`&&!/^\s*\[/u.test(e))return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Array.isArray(t)||t.length===0)return null;let n=[],r=0;for(let e of t){if(!Array.isArray(e))return null;let t=new Set;for(let n of e){let e=T(n);if(e===null)return null;c(e)?t.add(e):r++}t.size>1&&n.push([...t])}return{groups:n,skipped:r}}function D(e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t.size}function te(e,t){for(let n of e)for(let e of n){let r=t.get(e);r||t.set(e,r=new Set);for(let t of n)t!==e&&r.add(t)}return t}var O=1,k=16,A=12,j=1+k+A+16,M=1+k+A;async function N(e,t){let n=await crypto.subtle.importKey(`raw`,_(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:3e6},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}function P(e){return!(e instanceof Uint8Array)||e.length<j?!1:e[0]===O}async function F(e,t){if(!(e instanceof Uint8Array))throw TypeError(`encryptWithPassword: plaintext Uint8Array required`);if(typeof t!=`string`||!t)throw TypeError(`encryptWithPassword: password required`);let n=new Uint8Array(M+e.length+16);n[0]=O,crypto.getRandomValues(n.subarray(1,1+k)),crypto.getRandomValues(n.subarray(1+k,M));let r=n.subarray(1,1+k),i=n.subarray(1+k,M),a=await N(t,r),o=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:i,additionalData:n.subarray(0,M)},a,e));return n.set(o,M),n}async function ne(e,t){if(typeof t!=`string`||!t)throw TypeError(`tryDecryptWithPassword: password required`);if(!(e instanceof Uint8Array)||e.length<j||e[0]!==O)return{ok:!1,reason:`malformed`};let n=e.subarray(1,1+k),r=e.subarray(1+k,M),i=e.subarray(M),a=await N(t,n),o;try{o=new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:e.subarray(0,M)},a,i))}catch{return{ok:!1,reason:`wrong-password`}}return{ok:!0,plaintext:o}}async function I(e,t,n){if(!n||typeof n.malformedMsg!=`string`||typeof n.wrongPasswordMsg!=`string`)throw TypeError(`decryptWithPasswordOrThrow: { malformedMsg, wrongPasswordMsg } strings required`);let r=await ne(e,t);if(r.ok)return r.plaintext;throw r.reason===`wrong-password`?Error(n.wrongPasswordMsg):Error(n.malformedMsg)}var L=P,R=F;function z(e,t){return I(e,t,{malformedMsg:`malformed encrypted bundle`,wrongPasswordMsg:`wrong password or corrupt bundle`})}var B=1,V=1024,H=1024,U=200,W=104857600,G=Math.ceil(W*4/3)+16,K=512,q=64;function J(e){if(!e||typeof e!=`object`)return`payload is not an object`;if(e.version!==B)return`unsupported export version: ${e.version}`;if(!e.workspace||typeof e.workspace!=`object`)return`workspace metadata missing`;if(typeof e.workspace.id!=`string`)return`workspace.id must be a string`;if(typeof e.workspace.name!=`string`)return`workspace.name must be a string`;if(typeof e.workspace.privateKey!=`string`)return`workspace.privateKey must be a string`;if(e.workspace.createdAt!==void 0&&!Number.isFinite(e.workspace.createdAt))return`workspace.createdAt must be a finite number or omitted`;if(!Array.isArray(e.reports))return`reports field must be an array`;if(e.reports.length>H)return`reports count (${e.reports.length}) exceeds cap (${H})`;if(e.bundles!==void 0){if(!Array.isArray(e.bundles))return`bundles field must be an array when present`;if(e.bundles.length>V)return`bundles count (${e.bundles.length}) exceeds cap (${V})`;for(let t of e.bundles){if(typeof t!=`string`)return`bundles entries must be strings`;if(t.length>U)return`bundle integrity exceeds per-entry length cap (${U})`}}if(e.bundleBlobs!==void 0){if(!Array.isArray(e.bundleBlobs))return`bundleBlobs field must be an array when present`;if(e.bundleBlobs.length>q)return`bundleBlobs count (${e.bundleBlobs.length}) exceeds cap (${q})`;for(let t of e.bundleBlobs){if(!t||typeof t!=`object`||Array.isArray(t))return`bundleBlobs entries must be objects`;if(typeof t.integrity!=`string`||t.integrity.length===0)return`bundleBlobs.integrity must be a non-empty string`;if(t.integrity.length>U)return`bundleBlobs.integrity exceeds per-entry length cap (${U})`;if(typeof t.name!=`string`||t.name.length===0)return`bundleBlobs.name must be a non-empty string`;if(t.name.length>K)return`bundleBlobs.name exceeds per-entry length cap (${K})`;if(t.name.includes(`\0`))return`bundleBlobs.name cannot contain NUL`;if(typeof t.data!=`string`)return`bundleBlobs.data must be a base64 string`;if(t.data.length>G)return`bundleBlobs.data exceeds per-blob size cap (${W} bytes raw)`}}return null}async function Y(e){return new Uint8Array(await e.arrayBuffer())}async function X(e,t){if(L(e)){if(typeof t!=`string`||!t)throw TypeError(`parseWorkspaceBundleBytes: password required for encrypted bundle`);let n=await z(e,t);try{return Z(await a(n))}catch(e){throw Error(`wrong password or corrupt bundle`,{cause:e})}}let n;try{n=await a(e)}catch(e){throw Error(`gzip decompression failed: ${e.message}`,{cause:e})}return Z(n)}function Z(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`payload is not JSON: ${e.message}`,{cause:e})}let n=J(t);if(n===null)return t;let r=n.includes(`exceeds cap`);throw Error(r?n:`not a deepview workspace export: ${n}`)}function Q(e,t){let n=e.trimStart().startsWith(`[`)?E(e):null;if(n)return{data:{source:`links`,findings:[],links:n.groups},format:`links`,reason:null};let r=m(e);if(r.data!=null||p(e,t)!==`codex`)return r;try{return{data:{type:`security`,source:`codex-security`,findings:d(e).flatMap(e=>e.data.findings)},format:`codex`,reason:null}}catch(e){return{data:null,format:null,reason:e instanceof Error?e.message:`Invalid Codex CSV`}}}function re(e,t){let n=Q(e,t);return n.data==null?Promise.resolve(null):h(JSON.stringify(n.data))}function ie(e){let t=new Set;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;typeof e.file==`string`&&e.file&&t.add(e.file);for(let n of Array.isArray(e.evidence)?e.evidence:[])typeof n?.file==`string`&&n.file&&t.add(n.file)}return t}function $(e){let t=(f(e)??[]).flat().filter(e=>typeof e==`object`&&!!e),n=s([{groups:[t],tree:e?.tree}]);return{directory:n,own:t.filter(e=>!o(e.file,n))}}function ae(e){let t=new Map;for(let n of $(e).own){let e=u(n);e&&t.set(e.toLowerCase(),e)}return t.size===1?[...t.values()][0]:null}function oe(t){let{directory:n,own:r}=$(t);return e([...ie(r)].filter(e=>!o(e,n)))}var se=[`inprogress`,`fixed`,`invalid`,`deleted`,`ignored`];function ce(e){return typeof e==`string`&&se.includes(e)}function le(e){if(e===null)return null;if(typeof e!=`object`||Array.isArray(e))return`invalid`;let t=e,n={},r=t.color;if(r!=null){if(typeof r!=`string`||r.length>50)return`invalid`;r!==``&&(n.color=r)}let i=t.triage;if(i!=null){if(!ce(i))return`invalid`;n.triage=i}for(let e of[`comment`,`fix`]){let r=t[e];if(r!=null){if(typeof r!=`string`||r.length>1e4)return`invalid`;r!==``&&(n[e]=r)}}let a=t.flagged;if(a!=null){if(typeof a!=`boolean`)return`invalid`;n.flagged=a}return n}export{v as a,y as b,ee as c,b as d,x as e,S as f,C as g,w as h,E as i,D as j,te as k,F as l,I as m,L as n,R as o,H as p,Y as q,X as r,Z as s,Q as t,re as u,ae as v,oe as w,le as x};
1
+ import{b as e}from"./chunk-NRPC74AM.js";import{a as t,d as n,f as r,h as i}from"./chunk-7C7DWL7I.js";import{d as a}from"./chunk-PNHBZGDD.js";import{a as o,b as s}from"./chunk-6VXEPL32.js";import{c}from"./chunk-XLX6XXJF.js";import{C as l,D as u,G as d,J as f,K as p,L as m,O as h,q as g}from"./chunk-QRKFPLA4.js";import{a as _}from"./chunk-TUII34K2.js";function v(e,t){let n=s([{groups:[e],tree:t.tree,treeDependencies:t.treeDependencies}]);for(let r of e)l(r,t),r.isApp??=g(r,r.source??t.source),r._depsDirectory=n}function y(e,t){return!(e.isApp??g(e,e._source??e.source))&&o(e.file,e._depsDirectory??t??s([{groups:[[e]]}]))}function ee(e,n,r){let i=t(n);return i===`ignored`&&y(e,r)?void 0:i}function b(e,n,a,o){let s=n.id??String(n._id),c=n._reportName??``;y(n,o)&&(a===`ignored`||a===`untriaged`)?(t(e.get(s))!==`ignored`&&r(e,s,{triage:void 0}),i(e,s,c,a===`ignored`,!0)):(r(e,s,{triage:a===`untriaged`?void 0:a}),a!==`ignored`&&a!==`untriaged`&&i(e,s,c,!1))}function x(e,a){let o=new Set;for(let t of e.values()){let e=t?.ignoredReports;if(!e?.length)continue;let r=new Set(e).size!==e.length;for(let i of e)(r||!n(t,i))&&o.add(i)}if(o.size===0)return!1;let c=!1;for(let l of a){let a=(l.groups??[]).flat();if(!a.some(e=>o.has(e._reportName??l.name??l.fileName??``)))continue;let u=s([l]),d=e=>({...e,_source:e._source??e.source??l.source}),f=new Set(a.filter(e=>y(d(e),u)).map(e=>e.id??String(e._id)));for(let o of a){let a=o.id??String(o._id),s=o._reportName??l.name??l.fileName??``,p=e.get(a);p?.ignoredReports?.includes(s)&&(n(p,s)||y(d(o),u)||(t(p)||(c=r(e,a,{triage:`ignored`})||c),f.has(a)||(c=i(e,a,s,!1)||c)))}for(let t of a){if(!y(d(t),u))continue;let n=t.id??String(t._id),r=t._reportName??l.name??l.fileName??``;e.get(n)?.ignoredReports?.includes(r)&&(c=i(e,n,r,!0,!0)||c)}}return c}async function S(e,t){let r=new Set(Object.values(e??{}).flatMap(e=>Array.isArray(e?.ignoredReports)?e.ignoredReports.filter(t=>typeof t==`string`&&!n(e,t)):[])),i=[];for(let e of r){let n;try{let r=await t(e);if(typeof r!=`string`)continue;n=await h(r)}catch{continue}n&&i.push({...n.data,name:e,groups:[n.findings]})}return i}async function C(e,t){if(e!=null&&(typeof e!=`object`||Array.isArray(e)))return{entries:e,changed:!1};let n=new Map(Object.entries(e??{})),r=x(n,await S(e,t));return{entries:Object.fromEntries(n),changed:r}}var w=`links`;function T(e){if(typeof e==`string`)return e.length>0?e:null;if(!e||typeof e!=`object`||Array.isArray(e))return null;let{id:t}=e;return typeof t==`string`&&t.length>0?t:null}function E(e){if(typeof e==`string`&&!/^\s*\[/u.test(e))return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Array.isArray(t)||t.length===0)return null;let n=[],r=0;for(let e of t){if(!Array.isArray(e))return null;let t=new Set;for(let n of e){let e=T(n);if(e===null)return null;c(e)?t.add(e):r++}t.size>1&&n.push([...t])}return{groups:n,skipped:r}}function D(e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t.size}function te(e,t){for(let n of e)for(let e of n){let r=t.get(e);r||t.set(e,r=new Set);for(let t of n)t!==e&&r.add(t)}return t}var O=1,k=16,A=12,j=1+k+A+16,M=1+k+A;async function N(e,t){let n=await crypto.subtle.importKey(`raw`,_(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:3e6},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}function P(e){return!(e instanceof Uint8Array)||e.length<j?!1:e[0]===O}async function F(e,t){if(!(e instanceof Uint8Array))throw TypeError(`encryptWithPassword: plaintext Uint8Array required`);if(typeof t!=`string`||!t)throw TypeError(`encryptWithPassword: password required`);let n=new Uint8Array(M+e.length+16);n[0]=O,crypto.getRandomValues(n.subarray(1,1+k)),crypto.getRandomValues(n.subarray(1+k,M));let r=n.subarray(1,1+k),i=n.subarray(1+k,M),a=await N(t,r),o=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:i,additionalData:n.subarray(0,M)},a,e));return n.set(o,M),n}async function ne(e,t){if(typeof t!=`string`||!t)throw TypeError(`tryDecryptWithPassword: password required`);if(!(e instanceof Uint8Array)||e.length<j||e[0]!==O)return{ok:!1,reason:`malformed`};let n=e.subarray(1,1+k),r=e.subarray(1+k,M),i=e.subarray(M),a=await N(t,n),o;try{o=new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:e.subarray(0,M)},a,i))}catch{return{ok:!1,reason:`wrong-password`}}return{ok:!0,plaintext:o}}async function I(e,t,n){if(!n||typeof n.malformedMsg!=`string`||typeof n.wrongPasswordMsg!=`string`)throw TypeError(`decryptWithPasswordOrThrow: { malformedMsg, wrongPasswordMsg } strings required`);let r=await ne(e,t);if(r.ok)return r.plaintext;throw r.reason===`wrong-password`?Error(n.wrongPasswordMsg):Error(n.malformedMsg)}var L=P,R=F;function z(e,t){return I(e,t,{malformedMsg:`malformed encrypted bundle`,wrongPasswordMsg:`wrong password or corrupt bundle`})}var B=1,V=1024,H=1024,U=200,W=104857600,G=Math.ceil(W*4/3)+16,K=512,q=64;function J(e){if(!e||typeof e!=`object`)return`payload is not an object`;if(e.version!==B)return`unsupported export version: ${e.version}`;if(!e.workspace||typeof e.workspace!=`object`)return`workspace metadata missing`;if(typeof e.workspace.id!=`string`)return`workspace.id must be a string`;if(typeof e.workspace.name!=`string`)return`workspace.name must be a string`;if(typeof e.workspace.privateKey!=`string`)return`workspace.privateKey must be a string`;if(e.workspace.createdAt!==void 0&&!Number.isFinite(e.workspace.createdAt))return`workspace.createdAt must be a finite number or omitted`;if(!Array.isArray(e.reports))return`reports field must be an array`;if(e.reports.length>H)return`reports count (${e.reports.length}) exceeds cap (${H})`;if(e.bundles!==void 0){if(!Array.isArray(e.bundles))return`bundles field must be an array when present`;if(e.bundles.length>V)return`bundles count (${e.bundles.length}) exceeds cap (${V})`;for(let t of e.bundles){if(typeof t!=`string`)return`bundles entries must be strings`;if(t.length>U)return`bundle integrity exceeds per-entry length cap (${U})`}}if(e.bundleBlobs!==void 0){if(!Array.isArray(e.bundleBlobs))return`bundleBlobs field must be an array when present`;if(e.bundleBlobs.length>q)return`bundleBlobs count (${e.bundleBlobs.length}) exceeds cap (${q})`;for(let t of e.bundleBlobs){if(!t||typeof t!=`object`||Array.isArray(t))return`bundleBlobs entries must be objects`;if(typeof t.integrity!=`string`||t.integrity.length===0)return`bundleBlobs.integrity must be a non-empty string`;if(t.integrity.length>U)return`bundleBlobs.integrity exceeds per-entry length cap (${U})`;if(typeof t.name!=`string`||t.name.length===0)return`bundleBlobs.name must be a non-empty string`;if(t.name.length>K)return`bundleBlobs.name exceeds per-entry length cap (${K})`;if(t.name.includes(`\0`))return`bundleBlobs.name cannot contain NUL`;if(typeof t.data!=`string`)return`bundleBlobs.data must be a base64 string`;if(t.data.length>G)return`bundleBlobs.data exceeds per-blob size cap (${W} bytes raw)`}}return null}async function Y(e){return new Uint8Array(await e.arrayBuffer())}async function X(e,t){if(L(e)){if(typeof t!=`string`||!t)throw TypeError(`parseWorkspaceBundleBytes: password required for encrypted bundle`);let n=await z(e,t);try{return Z(await a(n))}catch(e){throw Error(`wrong password or corrupt bundle`,{cause:e})}}let n;try{n=await a(e)}catch(e){throw Error(`gzip decompression failed: ${e.message}`,{cause:e})}return Z(n)}function Z(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`payload is not JSON: ${e.message}`,{cause:e})}let n=J(t);if(n===null)return t;let r=n.includes(`exceeds cap`);throw Error(r?n:`not a deepview workspace export: ${n}`)}function Q(e,t){let n=e.trimStart().startsWith(`[`)?E(e):null;if(n)return{data:{source:`links`,findings:[],links:n.groups},format:`links`,reason:null};let r=m(e);if(r.data!=null||p(e,t)!==`codex`)return r;try{return{data:{type:`security`,source:`codex-security`,findings:d(e).flatMap(e=>e.data.findings)},format:`codex`,reason:null}}catch(e){return{data:null,format:null,reason:e instanceof Error?e.message:`Invalid Codex CSV`}}}function re(e,t){let n=Q(e,t);return n.data==null?Promise.resolve(null):h(JSON.stringify(n.data))}function ie(e){let t=new Set;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;typeof e.file==`string`&&e.file&&t.add(e.file);for(let n of Array.isArray(e.evidence)?e.evidence:[])typeof n?.file==`string`&&n.file&&t.add(n.file)}return t}function $(e){let t=(f(e)??[]).flat().filter(e=>typeof e==`object`&&!!e),n=s([{groups:[t],tree:e?.tree}]);return{directory:n,own:t.filter(e=>!o(e.file,n))}}function ae(e){let t=new Map;for(let n of $(e).own){let e=u(n);e&&t.set(e.toLowerCase(),e)}return t.size===1?[...t.values()][0]:null}function oe(t){let{directory:n,own:r}=$(t);return e([...ie(r)].filter(e=>!o(e,n)))}var se=[`inprogress`,`fixed`,`invalid`,`deleted`,`ignored`];function ce(e){return typeof e==`string`&&se.includes(e)}function le(e){if(e===null)return null;if(typeof e!=`object`||Array.isArray(e))return`invalid`;let t=e,n={},r=t.color;if(r!=null){if(typeof r!=`string`||r.length>50)return`invalid`;r!==``&&(n.color=r)}let i=t.triage;if(i!=null){if(!ce(i))return`invalid`;n.triage=i}for(let e of[`comment`,`fix`]){let r=t[e];if(r!=null){if(typeof r!=`string`||r.length>1e4)return`invalid`;r!==``&&(n[e]=r)}}let a=t.flagged;if(a!=null){if(typeof a!=`boolean`)return`invalid`;n.flagged=a}return n}export{v as a,y as b,ee as c,b as d,x as e,S as f,C as g,w as h,E as i,D as j,te as k,F as l,I as m,L as n,R as o,H as p,Y as q,X as r,Z as s,Q as t,re as u,ae as v,oe as w,le as x};
@@ -1 +1 @@
1
- import{Mf as e,Of as t,Qf as n,oe as r,pe as i,qa as a}from"./chunk-UZC7POI4.js";import{a as o}from"./chunk-O6FA2R5G.js";import{c as s,d as c,g as l}from"./chunk-2XUEZHIP.js";var u=e(c`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),d=e(c`<circle class="fill" cx="8" cy="8" r="3"/>`),f=e(c`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),p=e(c`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),m=e(c`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),h={approved:[`approved`,n.approved[1],`Approved`],changes:[`changes`,n.changes[1],`Changes requested`],commented:[`commented`,t,`Commented`],dismissed:[`dismissed`,t,`Review dismissed`]},g={done:[`reviewed`,u,`Reviewed`],running:[`running`,d,`Reviewing`],failed:[`failed`,f,`Review failed`],requested:[`requested`,p,`Asked to review again`]},_=[`requested`,p,`Review requested`],v=e=>e.slice(0,7),y=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),b=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function x(e){return e?e.failed?g.failed:e.requested?g.requested:g[e.code?.status]??null:null}function S(e){let t=x(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:a(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:a(t.login,t.login??`someone`),standing:h[t.state]??_,requested:t.requested&&!!h[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var C=e=>(e.moreReviews??0)+(e.moreRequests??0),w=e=>[e.moreReviews>0?b(e.moreReviews,`more review`):null,e.moreRequests>0?b(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function T(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>h[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var E=e=>e?s`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:l;function D(e){if(!e)return l;let t=S(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${b(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,o=T(e);return s`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:o})=>{let c=`${r}${o?`, and requested again`:``}${a?`, on an earlier commit (${v(i)})`:i?`, on the latest commit`:``}`;return s`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${C(e)>0?s`<span class="review-more" data-tooltip="${`${w(e)}, on GitHub`}">+${C(e)}</span>`:l} ${a?s`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${m}<span>${n}${r?`+`:``}</span>${E(i)}</span>`:l} ${o===!1?s`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:o===null?s`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:l}</span>`}function O(e,t,n){if(!e)return l;let r=s`<code>${v(e)}</code>`;return s`<span class="review-on">on ${n?s`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function k(e,t){if(!e)return l;let{head:n,codex:r}=e,i=(e,[i,o,c],l)=>s`<li class="review-row">${a(r.login,`Codex`)} <span class="${`review-state is-${i}`}">${o}${l}: ${c.toLowerCase()}</span>${O(e.commit,n,t)}</li>`,o=[...r?.code?[i(r.code,x(r)??g.done,`Code review`)]:[],...r?.security?[i(r.security,g[r.security.status]??g.done,`Security review`)]:[],...S({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:o,at:c,requested:u,workflow:d})=>s`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?s`<span class="review-on">by the workflow <code>${d}</code></span>`:l}${O(o,n,t)}${c?s`<time datetime="${new Date(c).toISOString()}">${y(c)}</time>`:l}</li>`)],{open:c,resolved:u,more:d,list:f=[]}=e.threads;return s`<section class="repo-item-section"><h4>Reviews</h4>${o.length>0?s`<ul>${o}</ul>`:s`<p class="repo-item-quiet">No reviews yet.</p>`} ${C(e)>0?s`<p class="repo-item-quiet">And ${w(e)}, on GitHub.</p>`:l} ${T(e)===null?s`<p class="repo-item-quiet">No review read is on the latest commit, <code>${v(n)}</code>; one of those on GitHub may be.</p>`:o.length>0&&!T(e)?s`<p class="repo-item-quiet">No review is on the latest commit, <code>${v(n)}</code>.</p>`:l}</section>${c>0||u>0?s`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?s`<ul>${f.map(e=>s`<li><a class="repo-item-row review-thread" href="${e.url??l}" target="_blank" rel="noopener noreferrer">${E(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?s`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:l} ${e.outdated?s`<span class="repo-item-quiet">outdated</span>`:l}</a></li>`)}</ul>`:s`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?s`<p class="repo-item-quiet">${u>0?`${b(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:l}</section>`:l}`}var A=o({items:new Map,changes:0}),j=i(A.items),M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,i=null){j();let a=r(),o=!1;for(let r of t){let t=M(a,e,r.number),s=A.items.get(t);if(s&&s.readAt>n)continue;let c=s&&R(s.item),l=!c||c===R(r)?s?.moved??null:{from:c,before:s.readAt};A.items.set(t,{item:{...r,kind:r.kind??i??s?.item.kind??null},readAt:n,moved:l}),o=!0}o&&A.changes++}var F=(e,t)=>A.items.get(M(r(),e,t))??null;function I(e,t){let n=M(r(),e,``);return A.changes,[...A.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>A.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{D as a,k as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};
1
+ import{Rf as e,Tf as t,Vf as n,qa as r,qe as i,re as a}from"./chunk-O2NYWLX3.js";import{a as o}from"./chunk-EMNIV37E.js";import{c as s,d as c,g as l}from"./chunk-2XUEZHIP.js";var u=e(c`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),d=e(c`<circle class="fill" cx="8" cy="8" r="3"/>`),f=e(c`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),p=e(c`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),m=e(c`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),h={approved:[`approved`,n.approved[1],`Approved`],changes:[`changes`,n.changes[1],`Changes requested`],commented:[`commented`,t,`Commented`],dismissed:[`dismissed`,t,`Review dismissed`]},g={done:[`reviewed`,u,`Reviewed`],running:[`running`,d,`Reviewing`],failed:[`failed`,f,`Review failed`],requested:[`requested`,p,`Asked to review again`]},_=[`requested`,p,`Review requested`],v=e=>e.slice(0,7),y=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),b=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function x(e){return e?e.failed?g.failed:e.requested?g.requested:g[e.code?.status]??null:null}function S(e){let t=x(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:r(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:r(t.login,t.login??`someone`),standing:h[t.state]??_,requested:t.requested&&!!h[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var C=e=>(e.moreReviews??0)+(e.moreRequests??0),w=e=>[e.moreReviews>0?b(e.moreReviews,`more review`):null,e.moreRequests>0?b(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function T(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>h[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var E=e=>e?s`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:l;function D(e){if(!e)return l;let t=S(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${b(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,o=T(e);return s`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:o})=>{let c=`${r}${o?`, and requested again`:``}${a?`, on an earlier commit (${v(i)})`:i?`, on the latest commit`:``}`;return s`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${C(e)>0?s`<span class="review-more" data-tooltip="${`${w(e)}, on GitHub`}">+${C(e)}</span>`:l} ${a?s`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${m}<span>${n}${r?`+`:``}</span>${E(i)}</span>`:l} ${o===!1?s`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:o===null?s`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:l}</span>`}function O(e,t,n){if(!e)return l;let r=s`<code>${v(e)}</code>`;return s`<span class="review-on">on ${n?s`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function k(e,t){if(!e)return l;let{head:n,codex:i}=e,a=(e,[a,o,c],l)=>s`<li class="review-row">${r(i.login,`Codex`)} <span class="${`review-state is-${a}`}">${o}${l}: ${c.toLowerCase()}</span>${O(e.commit,n,t)}</li>`,o=[...i?.code?[a(i.code,x(i)??g.done,`Code review`)]:[],...i?.security?[a(i.security,g[i.security.status]??g.done,`Security review`)]:[],...S({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:o,at:c,requested:u,workflow:d})=>s`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?s`<span class="review-on">by the workflow <code>${d}</code></span>`:l}${O(o,n,t)}${c?s`<time datetime="${new Date(c).toISOString()}">${y(c)}</time>`:l}</li>`)],{open:c,resolved:u,more:d,list:f=[]}=e.threads;return s`<section class="repo-item-section"><h4>Reviews</h4>${o.length>0?s`<ul>${o}</ul>`:s`<p class="repo-item-quiet">No reviews yet.</p>`} ${C(e)>0?s`<p class="repo-item-quiet">And ${w(e)}, on GitHub.</p>`:l} ${T(e)===null?s`<p class="repo-item-quiet">No review read is on the latest commit, <code>${v(n)}</code>; one of those on GitHub may be.</p>`:o.length>0&&!T(e)?s`<p class="repo-item-quiet">No review is on the latest commit, <code>${v(n)}</code>.</p>`:l}</section>${c>0||u>0?s`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?s`<ul>${f.map(e=>s`<li><a class="repo-item-row review-thread" href="${e.url??l}" target="_blank" rel="noopener noreferrer">${E(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?s`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:l} ${e.outdated?s`<span class="repo-item-quiet">outdated</span>`:l}</a></li>`)}</ul>`:s`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?s`<p class="repo-item-quiet">${u>0?`${b(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:l}</section>`:l}`}var A=o({items:new Map,changes:0}),j=a(A.items),M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,r=null){j();let a=i(),o=!1;for(let i of t){let t=M(a,e,i.number),s=A.items.get(t);if(s&&s.readAt>n)continue;let c=s&&R(s.item),l=!c||c===R(i)?s?.moved??null:{from:c,before:s.readAt};A.items.set(t,{item:{...i,kind:i.kind??r??s?.item.kind??null},readAt:n,moved:l}),o=!0}o&&A.changes++}var F=(e,t)=>A.items.get(M(i(),e,t))??null;function I(e,t){let n=M(i(),e,``);return A.changes,[...A.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>A.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{D as a,k as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};