@preventive/triage 1.0.0-alpha.80 → 1.0.0-alpha.82

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 (50) hide show
  1. package/common/code-language.js +14 -0
  2. package/common/managed/routes.js +1 -1
  3. package/out/activity.js +2 -2
  4. package/out/chunk-6WMQVUT2.js +3 -0
  5. package/out/{chunk-5EAVJAD2.js → chunk-CE2FMDK3.js} +1 -1
  6. package/out/{chunk-5QWPKTCE.js → chunk-EIEUTJM4.js} +2 -2
  7. package/out/chunk-FNFWBAJO.js +3 -0
  8. package/out/chunk-KP2XM324.js +6 -0
  9. package/out/{chunk-OWSEQOL5.js → chunk-NH2HDQ5E.js} +1 -1
  10. package/out/{chunk-PTFYDJUP.js → chunk-RAM3GDAD.js} +1 -1
  11. package/out/{chunk-5CJKUV53.js → chunk-SUFRZ5U7.js} +1 -1
  12. package/out/chunk-UP3ADVQN.js +54 -0
  13. package/out/{chunk-JXBRWLMA.js → chunk-W2H4DBZW.js} +1 -1
  14. package/out/chunk-WOCJFOXN.js +1 -0
  15. package/out/{chunk-ITUKKCCK.js → chunk-WOLGZ2PE.js} +1 -1
  16. package/out/{chunk-7YO4QV5P.js → chunk-XHYX3Q34.js} +1 -1
  17. package/out/chunk-Z7KOFS2V.js +266 -0
  18. package/out/{chunk-LBD3M3J6.js → chunk-ZQQALNFP.js} +1 -1
  19. package/out/client-managed-import.js +1 -1
  20. package/out/client-managed.js +30 -30
  21. package/out/compare.js +10 -10
  22. package/out/dialogs.js +5 -5
  23. package/out/graph.js +1 -1
  24. package/out/index.html +10 -10
  25. package/out/prism.js +1 -1
  26. package/out/scan.js +1 -1
  27. package/out/view.css +1 -1
  28. package/out/view.js +8 -8
  29. package/package.json +3 -2
  30. package/risk/files/characters.js +13 -0
  31. package/risk/files/runs-code.js +13 -8
  32. package/risk/files/script.js +15 -7
  33. package/risk/npm/assess.js +1 -1
  34. package/server-managed/activity.ts +24 -2
  35. package/server-managed/avatar-store.ts +8 -0
  36. package/server-managed/db-methods.ts +42 -11
  37. package/server-managed/db-neon.ts +5 -2
  38. package/server-managed/db-schema.ts +10 -2
  39. package/server-managed/db.ts +2 -1
  40. package/server-managed/dependency-review-comments.ts +19 -4
  41. package/server-managed/http.ts +105 -19
  42. package/server-managed/pretty-format.js +1 -1
  43. package/server-managed/repository-browser.ts +2 -2
  44. package/server-managed/team-icons.ts +50 -0
  45. package/out/chunk-5M2X3QPK.js +0 -6
  46. package/out/chunk-DUS5ARE2.js +0 -53
  47. package/out/chunk-GBMAXAYK.js +0 -3
  48. package/out/chunk-MV66NL3G.js +0 -3
  49. package/out/chunk-VZPPX6MV.js +0 -1
  50. package/out/chunk-YKCRCNYZ.js +0 -266
@@ -0,0 +1,54 @@
1
+ import{a as e,d as t,n}from"./chunk-KP2XM324.js";import{e as r}from"./chunk-74JZTGTO.js";import{a as i}from"./chunk-IYPY47MC.js";import{d as a,e as o,f as s,i as c,t as l,u,w as d,y as f}from"./chunk-WOLGZ2PE.js";import{a as p,b as m,c as h}from"./chunk-PWFUOLZK.js";import{a as g,b as _,c as ee}from"./chunk-C4Z6ZBXV.js";import{D as v,E as te,F as ne,J as re}from"./chunk-QRKFPLA4.js";import{b as ie,c as y,d as b,f as x,g as S,j as ae}from"./chunk-2XUEZHIP.js";function oe(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 se=oe(`./dialogs.js`),C=e=>async(...t)=>(await se.load())[e](...t),ce=C(`openAdvisoryDetailsDialog`),le=C(`openCommentDialog`),ue=C(`openDeleteBundleDialog`),de=C(`openDeleteReportDialog`),fe=C(`openDetachBundleDialog`),pe=C(`openDetachReportDialog`),me=C(`openDiscardReviewDialog`),he=C(`openDownloadBundleDialog`),ge=C(`openExportConfirmDialog`),_e=C(`openExportViewDialog`),ve=C(`openFindingHistoryDialog`),ye=C(`openFindingSourceDialog`),be=C(`openFixLinkDialog`),xe=C(`openImportConflictDialog`),Se=C(`openLeaveWorkspaceDialog`),Ce=C(`openLocalContentImportDialog`),we=C(`openLocalTriageImportDialog`),Te=C(`openManagedCommentsDialog`),Ee=C(`openManagedIssueDialog`),De=C(`openManagedShareDialog`),Oe=C(`openNewWorkspaceDialog`),ke=C(`openNpmCompareAdvisoriesDialog`),Ae=C(`openObjstoreRecoveryDialog`),je=C(`openPasskeySetupDialog`),Me=C(`openPersistenceDegradedDialog`),Ne=C(`openReportCompareDialog`),Pe=C(`openRepositoryItemDialog`),Fe=C(`openRevalidationConflictsDialog`),Ie=C(`openStoragePersistDialog`),Le=C(`openSyncDownloadDialog`),Re=C(`openSyncSuggestDialog`),ze=C(`openSyncUploadDialog`),Be=C(`openTriageComparisonDialog`),Ve=C(`openTriageExportDialog`),He=C(`openWhyDialog`),Ue=C(`openWorkspaceExportDialog`),We=C(`openWorkspaceShareLinkDialog`),Ge=C(`openWorkspaceUnlockBundleDialog`),Ke=C(`openWorkspaceUnlockLinkDialog`),qe=new WeakMap,Je=Symbol(`iteration key`);function Ye(e){qe.set(e,new Map)}function Xe(e,{target:t,key:n,type:r}){r===`iterate`&&(n=Je);let i=qe.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 Ze({target:e,key:t,type:n}){let r=qe.get(e),i=new Set;return n===`clear`?r.forEach((e,t)=>{Qe(i,r,t)}):Qe(i,r,t),(n===`add`||n===`delete`||n===`clear`)&&Qe(i,r,Array.isArray(e)?`length`:Je),i}function Qe(e,t,n){let r=t.get(n);r&&r.forEach(e.add,e)}function $e(e){e.cleaners&&e.cleaners.forEach(et,e),e.cleaners=[]}function et(e){e.delete(this)}var w=[],tt=!1;function nt(e,t,n,r){if(e.unobserved)return Reflect.apply(t,n,r);if(w.indexOf(e)===-1){$e(e);try{return w.push(e),Reflect.apply(t,n,r)}finally{w.pop()}}}function T(e){let t=w[w.length-1];t&&(it(t,e),Xe(t,e))}function E(e){Ze(e).forEach(rt,e)}function rt(e){it(e,this),typeof e.scheduler==`function`?e.scheduler(e):typeof e.scheduler==`object`?e.scheduler.add(e):e()}function it(e,t){if(e.debugger&&!tt)try{tt=!0,e.debugger(t)}finally{tt=!1}}function at(){return w.length>0}var ot=Symbol(`is reaction`);function st(e,t={}){let n=e[ot]?e:function t(){return nt(t,e,this,arguments)};return n.scheduler=t.scheduler,n.debugger=t.debugger,n[ot]=!0,t.lazy||n(),n}function ct(e){e.unobserved||(e.unobserved=!0,$e(e)),typeof e.scheduler==`object`&&e.scheduler.delete(e)}var D=new WeakMap,O=new WeakMap,lt=Object.prototype.hasOwnProperty;function k(e){let t=O.get(e);return at()&&typeof e==`object`&&e?t||Tt(e):t||e}function ut(e,t){let n=e.next;return e.next=()=>{let{done:r,value:i}=n.call(e);return r||(t?i[1]=k(i[1]):i=k(i)),{done:r,value:i}},e}var dt={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`}),k(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(k(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`}),ut(t.values.apply(e,arguments),!1)},entries(){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),ut(t.entries.apply(e,arguments),!0)},[Symbol.iterator](){let e=D.get(this),t=Reflect.getPrototypeOf(this);return T({target:e,type:`iterate`}),ut(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)}},ft={get(e,t,n){return e=lt.call(dt,t)?dt:e,Reflect.get(e,t,n)}},pt=typeof window==`object`?window:Function(`return this`)(),mt=new Map([[Map,ft],[Set,ft],[WeakMap,ft],[WeakSet,ft],[Object,!1],[Array,!1],[Int8Array,!1],[Uint8Array,!1],[Uint8ClampedArray,!1],[Int16Array,!1],[Uint16Array,!1],[Int32Array,!1],[Uint32Array,!1],[Float32Array,!1],[Float64Array,!1]]);function ht({constructor:e}){return!(typeof e==`function`&&e.name in pt&&pt[e.name]===e)||mt.has(e)}function gt(e){return mt.get(e.constructor)}var _t=Object.prototype.hasOwnProperty,vt=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e==`symbol`));function yt(e,t,n){let r=Reflect.get(e,t,n);if(typeof t==`symbol`&&vt.has(t))return r;T({target:e,key:t,receiver:n,type:`get`});let i=O.get(r);if(at()&&typeof r==`object`&&r){if(i)return i;let n=Reflect.getOwnPropertyDescriptor(e,t);if(!n||n.writable!==!1||n.configurable!==!1)return Tt(r)}return i||r}function bt(e,t){let n=Reflect.has(e,t);return T({target:e,key:t,type:`has`}),n}function xt(e){return T({target:e,type:`iterate`}),Reflect.ownKeys(e)}function St(e,t,n,r){typeof n==`object`&&n&&(n=D.get(n)||n);let i=_t.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 Ct(e,t){let n=_t.call(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return n&&E({target:e,key:t,oldValue:r,type:`delete`}),i}var wt={get:yt,has:bt,ownKeys:xt,set:St,deleteProperty:Ct};function Tt(e={}){return D.has(e)||!ht(e)?e:O.get(e)||Et(e)}function Et(e){let t=gt(e)||wt,n=new Proxy(e,t);return O.set(e,n),D.set(n,e),Ye(e),n}var Dt=Tt;function Ot(e){let t=!0,n=st(()=>{try{e(t)}finally{t=!1}},{lazy:!0});try{n()}catch(e){throw ct(n),e}return()=>ct(n)}function kt(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 At=globalThis.location?.hash,jt=kt(At);globalThis.addEventListener?.(`hashchange`,()=>{let e=globalThis.location?.hash;e?.startsWith(`#public=`)&&e!==At&&globalThis.location.reload()});function Mt(){return jt}function Nt(e=jt){return`/api/shares/${encodeURIComponent(e.id)}/workspace`}function Pt(e,t=jt){return t?`${e.replace(/#.*$/su,``)}#public=${t.id}.${t.token}`:e}var Ft=[`admin`,`manage`,`triage`,`view`,`none`];function It(e){return typeof e==`string`&&Ft.includes(e)}function Lt(e,t){let n=Ft.indexOf(e);return n!==-1&&n<=Ft.indexOf(t)}function Rt(e){return e!=null&&!e.publicShare&&Lt(e.role,`view`)}function zt(e){return e!=null&&!e.publicShare&&Lt(e.role,`manage`)}var Bt={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="${o}"/>`},"codex-security":{className:`brand-codex`,mark:`<path class="fg" d="${s}"/>`},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"/>`}},Vt={default:[`#2563eb`,`#fff`],"claude-security":[`#d97757`,`#fff`],"codex-security":[`#fff`,`#000`],deepsec:[`#000`,`#fff`],piolium:[`#fbb829`,`#1c1b19`],"markdown-generic":[`#374151`,`#fff`]},Ht=Object.fromEntries(Object.entries(Bt).map(([e,{className:t,mark:n}])=>{let[r,i]=Vt[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>`]})),Ut=Object.fromEntries(Object.entries(Bt).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 Wt(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 Gt=_(class extends ee{constructor(e){if(super(e),e.type!==g.PROPERTY&&e.type!==g.ATTRIBUTE&&e.type!==g.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!m(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===g.PROPERTY){if(t===n[r])return x}else if(e.type===g.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return x}else if(e.type===g.ATTRIBUTE&&n.getAttribute(r)===t+``)return x;return h(e),t}}),Kt=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"/>`,qt=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>`,Jt=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>`,Yt=/^(?:(?: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,Xt=new Set([`resource:base64`,`directory`,`binary`,`symlink`]),Zt=e=>Xt.has(e);function Qt(e,t,n){return n!==null&&n!==`markdown`||Zt(t)?!1:Yt.test(e.slice(e.lastIndexOf(`/`)+1))}function $t(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 en=e=>e.slice(e.lastIndexOf(`/`)+1),tn=e=>{let t=en(e),n=t.lastIndexOf(`.`);return n>0?t.slice(n+1).toLowerCase():``},nn=new Set([`gemfile`,`gemfile.lock`,`.ruby-version`]),rn=new Set([`node`,`so`,`dylib`,`dll`]);function an(t,n){if(n===`symlink`)return`symlink`;let r=e(t,n);if(r===null&&/\.map$/iu.test(t))return`map`;if(Qt(t,n,r))return`license`;if([`javascript`,`jsx`].includes(r))return`js`;if([`typescript`,`tsx`].includes(r))return`ts`;let i=tn(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&&nn.has(en(t).toLowerCase())?`ruby`:r===null&&en(t).toLowerCase()===`codeowners`?`owners`:i===`wasm`?`wasm`:rn.has(i)?`native`:`generic`}var on=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"/>`,sn=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"/>`,cn=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>`,ln=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)"/>`,A=(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>`,un={__proto__:null,js:A(`#e6c84f`,`JS`,`#202020`),ts:A(`#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:qt,php:Jt,python:Kt,map:on,markdown:ln,license:sn,css:cn,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:A(`#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:A(`#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:A(`#438eff`,`OC`),c:A(`#3949ab`,`C`),cpp:A(`#00599c`,`C++`),header:A(`#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"/>`},dn=b`<path d="M4 1.5h5l3 3v10H4Zm5 0v3h3M6 8h4M6 10.5h4" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/>`;function fn(e,t){let n=an(e,t);return y`<svg class="source-file-icon" data-file-type="${n}" width="16" height="16" viewBox="0 0 16 16" style="${p({flex:`none`})}" aria-hidden="true">${un[n]??dn}</svg>`}var pn=y`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" style="${p({flex:`none`})}" aria-hidden="true"><path d="M1.5 4V2.5h5L8 4h6.5v9h-13Z" stroke-linejoin="round"/></svg>`,mn=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>`,hn=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>`,gn=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>`,_n=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 vn(e){return e===`composer`?gn:e===`cargo`?_n:e===`soldeer`?hn:mn}var yn=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/iu,bn=200;function xn(e){let t=[...e];return t.length>bn?`${t.slice(0,bn-1).join(``).trimEnd()}\u2026`:e}var Sn=e=>e.split(`/`).map(encodeURIComponent).join(`/`),Cn=(e,t)=>`https://github.com/${Sn(e)}/releases/tag/${Sn(t)}`;function wn(e,t){return t&&e?.sha===t&&Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`&&e):[]}function Tn(e,t,n=null){let r=typeof e?.github==`string`&&typeof n==`string`&&n.toLowerCase()===e.github.toLowerCase()?wn(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:xn(i.subject),authorName:i.authorName,authorLogin:i.authorLogin,date:i.committedAt??i.authoredAt}:{}})}function En(e,t=``,n=null){let r=[],a=v(e);if(a){let o=[te(e.repo),te({directory:t})].filter(Boolean).join(`/`),s=i(e.repo?.commit),c=Sn(o),l=`https://github.com/${a}`,u=v({repo:{github:n?.github}}),d=u?wn(n,s):[];r.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:Cn(u,e)}))}:{}}}:{}})}let o=e?.package?.npm;if(typeof o?.name==`string`&&yn.test(o.name)){let e=typeof o.version==`string`?o.version.trim():``;r.push({label:`npm`,text:o.name+(e?`@${e}`:``),href:`https://www.npmjs.com/package/${o.name}${e?`/v/${encodeURIComponent(e)}`:``}`})}return r}function Dn(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 On=e=>[...n(e)].filter(([,e])=>e!=null).map(([e])=>e);function kn(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??On(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 An(e,t){let n=t&&[...t],r=kn(e,n),i=e?.kind===`stasis`?[...e.bundle?.entries??[]]:[],a=new Set(i.length>1?n??On(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(jn(t));let n=Dn(e),i=new Set([jn(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 jn=e=>e.slice(e.indexOf(`:`)+1),Mn=e=>e.ids.map(e=>({id:e,label:jn(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:mn}],[`repository`,{label:`Source: GitHub repository`,icon:a(f)}],[`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=ne(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)}})}function Gn(e,t){let n=e?.icon?.id;if(!n)return t;let i=`/api/avatar/org-${n}`;return r(i,y`<span class="team-avatar-frame">${t}<img class="team-avatar" src="${i}" alt="" loading="lazy" decoding="async" @error="${e=>{e.currentTarget.hidden=!0}}"></span>`)}var Kn=`.team-avatar-frame{--bleed: var(--team-avatar-bleed, 0%);position:relative;flex-shrink:0;display:inline-grid;place-items:center;>.team-avatar{position:absolute;inset:calc(-1 * var(--bleed));width:calc(100% + 2 * var(--bleed));height:calc(100% + 2 * var(--bleed));object-fit:cover;border-radius:var(--team-avatar-radius, var(--ui-radius, 3px))}&:has(>.team-avatar:not([hidden]))>:not(.team-avatar){visibility:hidden}}
2
+ `,qn=`...`,Jn=120;function Yn(e){for(let t of(re(e)??[]).flat()){let e=t?.description;typeof e==`string`&&e.length===Jn&&e.endsWith(qn)&&(t.description=`${e.slice(0,-qn.length)}\u2026`)}return e}var Xn=oe(`./scan.js`),Zn=()=>Xn.load(),Qn=[[`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 $n(e,t={}){document.dispatchEvent(new CustomEvent(`managed-admin-navigate`,{detail:{view:e,...t},bubbles:!0,composed:!0}))}function er(e,t,n=!1){return y`<header class="manage-header"><nav class="manage-nav" aria-label="Management pages">${Qn.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="${()=>$n(t)}">${n}</button>`)}</nav></header>`}var tr={bundle:c,report:u,preview:u,scan:l,code:d},nr={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 rr(e){return tr[e]?a(tr[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="${nr[e]??nr.repo}"></path></svg>`}function ir(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 ar(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 or=class extends ae{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=ie`: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="${Gt(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 ar(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=ir(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 sr(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 cr=(e,t)=>e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`}),lr=Symbol(`other repositories`);function ur(e,t=``,n=null,{includeSingletonOrganizations:r=!1}={}){let i=e.map(e=>({...e,...e.special?{owner:null,name:e.label}:sr(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])=>cr(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:lr,name:`Other`,count:l});let u=s.some(e=>e.value===n)?n:null,d=new Set(ar(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===lr?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:cr(e,t)).map(([e,t])=>({label:e??(s.some(e=>e.value!==lr)?`Other`:null),organization:e!=null,options:t.toSorted((e,t)=>cr(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 dr=class extends or{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 ur(this.options,this._query,this._facet)}};customElements.get(`repository-selector`)||customElements.define(`repository-selector`,dr);var fr=/(?![\t\n\r])\p{Cc}|[\u202A-\u202E\u2066-\u2069]/gu,pr=/\P{ASCII}/u,mr=/[\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 hr(e){if(typeof e!=`string`)return{kind:`binary`,controls:null};let t=new Map;for(let[n]of e.matchAll(fr))t.set(n.codePointAt(0),(t.get(n.codePointAt(0))??0)+1);let n=e.search(pr);if(n!==-1){for(let[r,i]of Mr(e,n)??[])t.set(r,i);ri(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 gr=/(?=\p{Emoji})\p{Extended_Pictographic}(?:\u{FE0F}|[\u{1F3FB}-\u{1F3FF}])?$/u,_r=/^(?=\p{Emoji})\p{Extended_Pictographic}/u,vr=/(?=\p{Emoji})\p{Extended_Pictographic}$/u,yr=/^[\d#*]$/u,br=e=>e>=917536&&e<=917631,xr=new Set([`gbeng`,`gbsct`,`gbwls`]),Sr=(e,t,n)=>n-t===10?String.fromCodePoint(...Array.from({length:5},(n,r)=>e.codePointAt(t+2*r)-917504)):``;function Cr(e,t,n,r){if(n===13&&(e[t+1]===`
3
+ `||r&&t+1===e.length)||n===8205&&gr.test(e.slice(Math.max(0,t-4),t))&&_r.test(e.slice(t+1,t+3))||(n===65038||n===65039)&&vr.test(e.slice(Math.max(0,t-2),t))||n===65039&&yr.test(e[t-1]??``)&&e[t+1]===`⃣`)return t+1;if(br(n)&&!br(e.codePointAt(t-2))){let n=t;for(;br(e.codePointAt(n));)n+=2;if(e.codePointAt(t-2)===127988&&e.codePointAt(n-2)===917631&&xr.has(Sr(e,t,n-2)))return n}return-1}var wr=/[\u115F\u1160\u3164\uFFA0\u{E0001}\u{E0020}-\u{E007F}]|[\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,Tr=/[\uFE00-\uFE0F\u115F\u1160\u3164\uFFA0\uDB40]/g,Er=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)})),Dr=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,Er(t)])),Or=Er(`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`),kr=[[65024,65039],[917760,917999]],Ar=[[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 jr(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,...Ar)||M(i,...Ar);case 65440:return M(a,[65441,65500])||M(i,[65441,65500]);default:return(n===65038||n===65039?Or.has(a):Dr.get(n)?.has(a))||kr.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&&vr.test(e.slice(Math.max(0,t-3),t-1))}}function Mr(e,t=0){let n=null;Tr.lastIndex=t;for(let t=Tr.exec(e);t;t=Tr.exec(e)){let r=t.index,i=e.codePointAt(r);if(!wr.test(String.fromCodePoint(i)))continue;let a=Cr(e,r,i,!1);a===-1?jr(e,r,i)||(n??=new Map,n.set(i,(n.get(i)??0)+1)):Tr.lastIndex=a}return n}var N=String.raw`\p{L}\p{M}\p{Nd}_$`,Nr=String.raw`\p{sc=Zyyy}\p{sc=Zinh}\p{Default_Ignorable_Code_Point}`,P=new RegExp(String.raw`(?=[^\0-\xFF])[[${N}]--[\p{sc=Latn}${Nr}]]`,`gv`),Pr=new RegExp(P.source,`v`),Fr=RegExp(`[${Nr}]`,`uy`),Ir=RegExp(`[${N}]`,`uy`),Lr=`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[]}}),Rr={code:`Zzzz`,char:/\p{sc=Zzzz}/uy},zr=({char:e},t,n)=>(e.lastIndex=n,e.test(t)),Br=Rr;function F(e,t){return zr(Br,e,t)||(Br=Lr.find(n=>zr(n,e,t))??Rr),Br.code}var Vr=new Intl.DisplayNames(`en`,{type:`script`}),Hr=e=>Vr.of(e),Ur=e=>F(String.fromCodePoint(e),0),I=4096;function Wr(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 Gr=0;function L(e){let t=`stretch${Gr++}`,n=typeof e==`function`?e:()=>e;return String.raw`(?:(?:(?=(?<${t}>(?:${n()}){${I}}))\k<${t}>)+(?:${n()}){1,${I}}|(?:${n()}){0,${I}})`}var Kr=RegExp(`[${N}]{0,${I}}`,`uy`),qr=e=>`[${e.map(e=>String.raw`\p{sc=${e}}`).join(``)}${Nr}]`,Jr=e=>new RegExp(String.raw`[[${N}]&&${qr(e)}]{0,${I}}`,`vy`),Yr=e=>new RegExp(String.raw`[^[${N}]--${qr(e)}]{0,${I}}`,`vy`),Xr=[[`Latn`,`Hani`,`Hira`,`Kana`],[`Latn`,`Hani`,`Bopo`],[`Latn`,`Hani`,`Hang`]],Zr=Xr.map(Jr),Qr=new Map;function $r(e){return Qr.has(e)||Qr.set(e,{word:Jr([e]),passage:Yr(Xr.find(t=>t.includes(e))??[e])}),Qr.get(e)}var ei=(e,t,n,r)=>Wr(e,t,n)===r;function ti(e,t,n){let r=t;for(;r>n;){let t=r-(j(e,r)>65535?2:1);if(Ir.lastIndex=t,!Ir.test(e))break;r=t}return r}function ni(e,t,n,r){let i=r=>{for(let i=t;i<n;i+=e.codePointAt(i)>65535?2:1)Fr.lastIndex=i,Fr.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 ri(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=Wr($r(F(e,r)).passage,e,ti(e,r,n));if(i===e.length)return;let a=ti(e,i,n),o=Wr(Kr,e,a);!ei($r(F(e,i)).word,e,a,o)&&!Zr.some(t=>ei(t,e,a,o))&&ni(e,a,o,t),n=o}}var ii=110,ai=.01,oi=``,si=String.raw`${L(String.raw`[^\x60\\$]|\\[\s\S]|\$(?!\{)`)}(?:\x60|\$\{|(?![\s\S]))`,ci=e=>String.raw`${e}${L(String.raw`[^${e}\\\n]|\\(?:\r\n|[\s\S])`)}(?:${e}|$)`,li=()=>String.raw`[^/\\[\n]|\\.|\[${L(String.raw`[^\]\\\n]|\\.`)}(?:\]|(?![^\\\n]|\\.))`,ui=e=>String.raw`((?=\/)${e}\/(?![/*])(?:${li()})${L(li)}(?:\/[a-z]*|(?=\\?$))|${ci(`"`)}|${ci(`'`)}|\x60${si})`+String.raw`|(?<![ \t])[ \t]*(?:\/\*${L(String.raw`[^*]|\*(?!\/)`)}(?:\*\/|(?![\s\S]))|\/\/${L(`.`)}|(?<![\s\S])\uFEFF?#!${L(`.`)})[ \t]*`,di=String.raw`(?<=(?:^|\.\.\.|[(,=:[!&|?{;>*/%^<~]|(?<!\+)(?:\+\+)*\+|(?<!-)(?:--)*-|(?<![\p{ID_Continue}$.#])(?:await|case|default|delete|do|else|extends|in|instanceof|new|of|return|throw|typeof|void|yield))[ \t]*)`,fi=new RegExp(ui(di),`gmu`),pi={*matchAll(e){let t=0;for(let n of Ri(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]===oi&&/[\p{ID_Continue}$\\\u200C\u200D]/u.test(e[t+n.length])},mi=/("(?:[^"\\\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\n]|\\(?:\r\n|[\s\S]))*')|[ \t]*\/\*[\s\S]*?\*\/[ \t]*/gu,hi={matchAll:e=>e.matchAll(mi),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)))},gi=String.raw`(?=\/)(?<=[)}][ \t]*)(\/)(?![/*])`,_i=new RegExp(String.raw`(\}${si})`,`uy`),R=`block`,z=`either`,vi=`value`,yi=/(?:[;}]|=>|(?<![\p{ID_Continue}$#])(?:else|do|try|finally))$/u,bi=/(?:[=([,?!~%^&|*/<]|\.\.\.|(?<!\+)(?:\+\+)*\+|(?<!-)(?:--)*-)$/u,xi=/(?<![\p{ID_Continue}$#.])(?:typeof|delete|in|instanceof|new|case|return|throw)$/u;function Si(e,t,n,r,i){let a=t;for(;a>n&&/\s/u.test(e[a-1]);)a--;if(a===n)return n===0?R:n===i?.code?vi:z;let o=e.slice(Math.max(n,a-11),a);return yi.test(o)||r&&o.endsWith(`)`)||i===R&&o.endsWith(`{`)?R:bi.test(o)||xi.test(o)&&!e.slice(a,t).includes(`
4
+ `)?vi:z}var Ci=/(?<=^[ \t]*)/muy;function wi(e,t){return Ci.lastIndex=t,Ci.test(e)}var Ti=new RegExp(String.raw`(?<!\\)(${ci(`"`)}|${ci(`'`)}|\u0060${L(String.raw`[^\u0060\\]|\\[\s\S]`)}(?:\u0060|(?![\s\S])))`,`gmu`),Ei=RegExp(`(${L(String.raw`[\s\S]`)})`,`uy`);function*Di(e,t,n){let r=(t,n)=>t===null?null:(t.lastIndex=n,t.exec(e));for(let e=r(Ti,n),i=r(t,n);e!==null||i!==null;)i===null||e!==null&&e.index<=i.index?(yield e,e=r(Ti,e.index+1)):(yield i,i=r(t,i.index+Math.max(i[0].length,1)));Ei.lastIndex=n,yield Ei.exec(e)}var Oi=/(?<=(?<![\p{ID_Continue}$#])(?<!\.\s*)(if|while|with|for(?:\s+await)?)(\s*))\(/uy,ki=/^[ \t]*(?:\/[/*]|\uFEFF?#!)/u,Ai=/(?<=\.\s*)/uy,ji=/\S/gu,Mi=(e,{index:t,pieces:n,text:r},i)=>Object.assign([e.slice(t,i),r],{index:t,pieces:n});function*Ni(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]=Mi(e,r.pop(),o),r.length===0&&(yield*i.splice(0)))}function*Pi(e,{open:t,held:n}){for(let r of t)n[r.slot]=Mi(e,r,e.length);yield*n}function Fi({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 Ii=new Map;function Li(e){let t=Ii.get(e);if(!t){let n=e===``?``:`|${e}`,r=RegExp(`${fi.source}${n}|${gi}|([{}])`,`gmu`),i=RegExp(`${r.source}|`,`u`).exec(``).length;t={scan:r,slash:i-2,brace:i-1,regex:RegExp(`${ui(``)}${n}`,`muy`),own:e===``?null:RegExp(`(?!)()${n}`,`gmu`)},Ii.set(e,t)}return t}function*Ri(e,t=``){let{scan:n,slash:r,brace:i,regex:a,own:o}=Li(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*Pi(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;Oi.lastIndex=t;let r=Oi.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 g=m[i]===`{`?Si(e,m.index,d,u,s.at(-1)):null;d=m.index;let _=m,ee=null;if(g!==null){s.push(g),t=m.index+1;continue}if(m[i]!==void 0){let n=s.pop()??z;if(t=m.index+1,typeof n==`string`){l={kind:n,end:t};continue}_i.lastIndex=m.index,_=_i.exec(e),ee=n.template}else if(m[r]!==void 0||l!==null&&m[1]?.[0]===`/`&&wi(e,m.index)){let t=m[r]===void 0&&l.kind!==R?z:l?.kind??(u?R:vi);if(t===z){yield*Pi(e,f),yield*Di(e,o,m.index+1);return}a.lastIndex=m.index,_=t===vi?null:m[r]===void 0?m:a.exec(e)}if(_===null){t=m.index+1;continue}let v=_.index+_[0].length;if(_[1]!==void 0){if(d=t=v,l=null,ee!==null||_[1][0]==="`"&&_[1].endsWith("${")){yield*Ni(e,_,ee,f,s);continue}}else if(ki.test(_[0])){Ai.lastIndex=_.index;let t=p.next===_.index+_[0].search(/\S/u)?p.dot:Ai.test(e);ji.lastIndex=v,p={dot:t,next:ji.exec(e)?.index??e.length},d=v}else l=null;f.open.length>0?f.held.push(_):yield _,t=Math.max(v,_.index+1)}}var zi=(e,t=!1)=>/\.css$/iu.test(e)?hi:t||/\.[cm]?js$/iu.test(e)?pi:null,Bi=4194304;function Vi(e,{matchAll:t,droppable:n,needed:r}){let i=e.length>Bi?e.slice(0,e.lastIndexOf(`
5
+ `,Bi)+1||Bi):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]===`/`?`/${oi}/`:`""`,e.replaceAll(/[^\n]/gu,``)),o=r+e.length;a.push(i.slice(o));let s=a.join(``).replaceAll(/^[ \t]+/gmu,``).split(`
6
+ `).filter(e=>e.trim()!==``),c=s.join(`
7
+ `),l=c.length-(s.length-1),u=0,d=0,f=0;for(let{0:e,index:t}of c.matchAll(n)){for(;f<t;f++)u=Math.max(0,u+(c[f]===`(`?1:c[f]===`)`?-1:0));r(c,t,e,u)||(d+=e.length)}return s.length>0&&l>ii*s.length&&d<ai*l?Math.round(l/s.length):0}var Hi=/\.[cm]?[jt]sx?$/iu,Ui=new RegExp(String.raw`^\uFEFF?#!${L(`.`)}\bnode\b`,`u`),Wi=(e,t,n=!1)=>typeof t==`string`&&(n||Hi.test(e)||Ui.test(t)),Gi=100,Ki=1024;function qi(e){let t=null;return n=>{if(!t){t=[];for(let n=e.indexOf(`
8
+ `),r=0;n!==-1;n=e.indexOf(`
9
+ `,n+1),r++)r%Ki===0&&t.push(n)}let r=t.length,i=0;for(;i<r;){let e=i+r>>1;t[e]<n?i=e+1:r=e}if(i===0)return 1;let a=(i-1)*Ki+1;for(let r=e.indexOf(`
10
+ `,t[i-1]+1);r!==-1&&r<n;r=e.indexOf(`
11
+ `,r+1))a++;return a+1}}var Ji=1e3,Yi=/(?:\.(?:md|markdown|mdown|mkdn|mdx|txt|rst|adoc|asciidoc|asc|textile|rdoc|org|creole|mediawiki|wiki|pod)|(?:^|\/)(?:licen[cs]e|copying|notice|authors|contributors|readme|changelog|changes|history)(?:-[^/.]*)?(?:\.\d[^/.]*)*)$/iu,Xi=/^\s*(?:\/\/|\/\*)[#@] sourceMappingURL=/u,Zi=/^\s*(?:\/\/|\/\*)[#@] sourceMappingURL=data:[^\s,]*,[\w+/=%.~-]*\s*(?:\*\/)?\s*$/u,Qi=/\.map$/iu,$i=/\.min\.[^/.]+$/iu,ea=/(?<![\p{ID_Continue}$])_0x[0-9a-f]{4,6}(?![\p{ID_Continue}$])/gu,ta=20,na=/while\s*\(\s*!!\[\]\s*\)/u,ra=1e3;function ia(e){let t=new Set;for(let[n]of e.matchAll(ea))if(t.add(n),t.size===ra)break;let n=na.test(e);return t.size>=ta||n?{names:t.size,loop:n}:null}var aa=262144,oa=/\.(?:[cm]?[jt]s|[jt]sx)$/iu,sa=/\.d\.[cm]?ts$/iu,ca=(e,t,n=!1)=>typeof t==`number`&&t>=aa&&(n||oa.test(e)&&!sa.test(e)),la=e=>oa.test(e);function ua(e,t,n=!1){let r=hr(t);if(r.kind===`binary`)return{...r,category:`binary`,longest:0,longLines:0,average:0,inlineMap:0,obfuscation:null};let i=0,a=0,o=0,s=0;for(let e=0;e<=t.length;){let n=t.indexOf(`
12
+ `,e),r=n===-1?t.length:n,c=r-e-+(t[r-1]===`\r`);Xi.test(t.slice(e,e+64))&&Zi.test(t.slice(e,r))?i+=c:(c>Ji&&(o++,a+=c),s=Math.max(s,c)),e=r+1}let c=!n&&Qi.test(e),l=!n&&Yi.test(e),u=l||c?null:ia(t),d={...r,longest:s,longLines:o,average:0,inlineMap:i,obfuscation:u};if(c)return{...d,category:`map`};if(l)return{...d,category:i>0?`inline-map`:r.kind};if(o===0){let a=zi(e,n),o=a!==null&&s>ii?Vi(t,a):0;return{...d,average:o,category:i>0?`inline-map`:o>0?`minified`:r.kind}}return a/(t.length-i)<.5&&!$i.test(e)?{...d,category:`long`}:{...d,category:i>0?`inline-map`:`minified`}}var da=e=>e.category===`long`?e.kind:e.category;function fa(e){let t=[..._a(e.controls),...e.longLines>0&&[`long`,`minified`,`inline-map`].includes(e.category)?[`long`]:[]],n=da(e);return B.get(n).mark||t.length===0?[...t,n]:t}var pa=(e,t)=>t===`long`&&e.category!==`long`?`notice`:B.get(t).mark,B=new Map([[`binary`,{name:`Binary`,tag:`Binary`,mark:`warn`}],[`controls`,{name:`Control chars`,tag:`Controls`,mark:`warn`}],[`invisible`,{name:`Invisible chars`,tag:`Invisible`,mark:`warn`}],[`mixed-script`,{name:`Mixed scripts`,tag:`Look-alikes`,mark:`warn`}],[`long`,{name:`Long lines`,tag:`Long lines`,mark:`warn`}],[`minified`,{name:`Minified`,tag:`Minified`,short:`Min`,mark:`notice`}],[`map`,{name:`Source maps`,tag:`Map`,mark:`notice`}],[`inline-map`,{name:`Inline source maps`,tag:`Inline map`,mark:`notice`}],[`utf8`,{name:`UTF-8`,tag:`UTF-8`,mark:null}],[`ascii`,{name:`ASCII`,tag:`ASCII`,mark:null}]]),ma=new RegExp(fr.source,`u`),ha=e=>ma.test(e)?`controls`:wr.test(e)?`invisible`:`mixed-script`,ga=(e,t)=>[...e??[]].filter(([e])=>ha(String.fromCodePoint(e))===t).toSorted((e,t)=>t[1]-e[1]||e[0]-t[0]),_a=e=>e?[`controls`,`invisible`,`mixed-script`].filter(t=>ga(e,t).length>0):[],va=1e3,ya=String.raw`[\p{L}\p{N}](?:[\p{L}\p{N}-]*[\p{L}\p{N}])?`,ba=new RegExp(String.raw`\b(?:https?|wss?|ftp)\??:\/\/(?:[^\s/@'"\x60]*@)?(${ya}(?:\.${ya})+)(?![\p{L}\p{N}-]|\.[\p{L}\p{N}_$-])`,`giu`),xa=/\.(?:\p{L}{2,}|xn--[a-z0-9-]+)$/u,Sa=/^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)$/u,Ca=/^(?:localhost|.+\.(?:localhost|local|test|invalid|example|internal)|(?:.+\.)?example\.(?:com|net|org)|127(?:\.\d+){3}|0\.0\.0\.0|(?:.+\.)?w3\.org)$/u,wa=/\\([/.])/gu,Ta=new Set([`issues`,`pull`,`pulls`,`blob`,`tree`,`wiki`,`discussions`,`commit`,`commits`,`compare`,`blame`,`security`,`projects`,`labels`,`milestone`,`milestones`,`releases`,`tags`,`graphs`,`network`,`stargazers`]),Ea=new Set([`sponsors`,`orgs`,`apps`,`marketplace`,`features`,`topics`,`collections`,`settings`,`login`,`search`,`explore`,`about`]),Da=new Set([`blob`,`tree`,`blame`,`wiki`]),Oa=/\.(?:patch|diff|atom)$/iu,ka=/\.git$/iu,Aa=e=>{try{return decodeURIComponent(e)}catch{return e}};function ja(e){let t=null;try{t=new URL(e.replace(/^(\w+)\?:/u,`$1:`).replace(/[)\]}>.,;:!]+$/u,``))}catch{}if(!t)return`github.com/`;let n=t.pathname.split(`/`).slice(1).map(Aa);n.length>1&&n.at(-1)===``&&n.pop();let[r,i=``,a,...o]=n,s=r!==``&&i!==``&&!ka.test(i)&&Ta.has(a)&&!(a===`releases`&&o.includes(`download`))&&!(a===`blob`&&t.searchParams.has(`raw`))&&!(!Da.has(a)&&Oa.test(n.at(-1)));return t.hostname.replace(/\.$/u,``)===`github.com`&&(n.length===1||Ea.has(r)||s)?`github.com`:`github.com/${r}/${i.replace(ka,``)}`.toLowerCase()}function Ma(e,t,n=!1){if(!Wi(e,t,n)||!(t.includes(`://`)||t.includes(`:\\/\\/`)))return null;let r=new Map,i=qi(t);for(let e of Ri(t)){let{1:t}=e;if(r.size>=va)break;let n=t?.startsWith(`/`)?t.replace(/\/[a-z]*$/u,``):t,a=n?.includes(`\\`)?n.replaceAll(wa,`$1`):n;if(a?.includes(`://`))for(let{1:t,index:n}of a.matchAll(ba)){let o=t.toLowerCase(),s=o===`github.com`?ja(/^[^\s'"\u0060]*/u.exec(a.slice(n))[0]):o;if(!r.has(s)&&(xa.test(o)||Sa.test(o))&&!Ca.test(o)&&r.set(s,i(Fi(e,n))),r.size>=va)break}}return r.size>0?r:null}var Na=String.raw`[\p{L}\p{N}_-]`,V=(e,t=``)=>new RegExp(String.raw`(?<!${Na})${e}${t}(?!\.?${Na})`,`giu`),Pa=e=>new RegExp(String.raw`(?<=(?:(?:^|[\s'"\x60(=,<>])(?:https?|wss?|ftp)\??:|['"\x60(=,])\\?\/\\?\/(?:[^\s/@'"\x60]*@)?(?:${Na}+\.)*)${e}(?!\.?${Na}|(?::[^\s/@'"\x60]*)?@)`,`giu`),H=new Map([[`Exfiltration`,`critical`],[`Remote`,`high`],[`IP lookup`,`moderate`]]),[U,W,G]=[...H.keys()].map(e=>({tag:e})),Fa=new Map([[`webhook-site`,{...U,name:`webhook.site`,pattern:V(String.raw`webhook\.site`)}],[`pipedream`,{...U,name:`Pipedream`,pattern:V(String.raw`pipedream\.net`)}],[`requestbin`,{...U,name:`RequestBin`,pattern:V(String.raw`(?:requestbin\.(?:net|com)|requestb\.in)`)}],[`requestcatcher`,{...U,name:`Request Catcher`,pattern:V(String.raw`requestcatcher\.com`)}],[`requestrepo`,{...U,name:`requestrepo`,pattern:V(String.raw`requestrepo\.com`)}],[`beeceptor`,{...U,name:`Beeceptor`,pattern:V(String.raw`beeceptor\.com`)}],[`oast`,{...U,name:`OAST`,pattern:V(String.raw`(?:interact\.sh|interactsh\.com|oast\.(?:pro|live|site|online|fun|me)|oastify\.com|burpcollaborator\.net)`)}],[`canarytokens`,{...U,name:`Canarytokens`,pattern:V(String.raw`canarytokens\.(?:com|org)`)}],[`dnslog`,{...U,name:`DNSLog`,pattern:V(String.raw`dnslog\.cn`)}],[`ceye`,{...U,name:`CEYE`,pattern:V(String.raw`ceye\.io`)}],[`telegram`,{...W,name:`Telegram`,pattern:V(String.raw`api\.telegram\.org`)}],[`discord`,{...W,name:`Discord webhook`,pattern:V(String.raw`discord(?:app)?\.com`,String.raw`/api(?:/v\d+)?/webhooks`)}],[`slack`,{...W,name:`Slack webhook`,pattern:V(String.raw`hooks\.slack\.com`,`/(?:services|workflows|triggers)`)}],[`pastebin`,{...W,name:`Pastebin`,pattern:V(String.raw`pastebin\.com`)}],[`paste-ee`,{...W,name:`paste.ee`,pattern:V(String.raw`paste\.ee`)}],[`transfer-sh`,{...W,name:`transfer.sh`,pattern:Pa(String.raw`transfer\.sh`)}],[`file-io`,{...W,name:`file.io`,pattern:Pa(String.raw`file\.io`)}],[`0x0`,{...W,name:`0x0.st`,pattern:V(String.raw`0x0\.st`)}],[`ngrok`,{...W,name:`ngrok`,pattern:V(String.raw`ngrok(?:-free)?\.(?:io|app|dev)`)}],[`localtunnel`,{...W,name:`localtunnel`,pattern:V(String.raw`loca\.lt`)}],[`cloudflare-tunnel`,{...W,name:`Cloudflare Tunnel`,pattern:V(String.raw`trycloudflare\.com`)}],[`serveo`,{...W,name:`Serveo`,pattern:V(String.raw`serveo\.net`)}],[`pipedream-api`,{...W,name:`Pipedream API`,pattern:V(String.raw`pipedream\.com`)}],[`bun`,{...W,name:`Bun install`,pattern:V(String.raw`bun\.(?:sh|com)`,`/install`)}],[`ipinfo`,{...G,name:`ipinfo`,pattern:V(String.raw`ipinfo\.io`)}],[`ipify`,{...G,name:`ipify`,pattern:V(String.raw`ipify\.org`)}],[`ifconfig-me`,{...G,name:`ifconfig.me`,pattern:V(String.raw`ifconfig\.me`)}],[`icanhazip`,{...G,name:`icanhazip`,pattern:V(String.raw`icanhazip\.com`)}],[`ip-api`,{...G,name:`ip-api`,pattern:V(String.raw`ip-api\.com`)}],[`ipapi`,{...G,name:`ipapi`,pattern:V(String.raw`ipapi\.com?`)}],[`checkip`,{...G,name:`checkip`,pattern:V(String.raw`checkip\.amazonaws\.com`)}]]),Ia=new RegExp([...Fa.values()].map(({pattern:e})=>e.source).join(`|`),`iu`);function La(e,t,n=!1){if(typeof t!=`string`||!n&&(Yi.test(e)||Qi.test(e))||!Ia.test(t))return null;let r=new Map,i=qi(t);for(let[e,{pattern:n}]of Fa){let a=new Set;for(let{index:e}of t.matchAll(n))if(a.add(i(e)).size>=Gi)break;a.size>0&&r.set(e,[...a])}return r.size>0?r:null}function Ra(e,t){let n=e&&new Map([...e].filter(([e])=>Fa.get(e).tag===t));return n?.size>0?n:null}var za=e=>[...H.keys()].map(t=>[t,Ra(e,t)]).filter(([,e])=>e);function Ba(e,t,n){let r=[...H.values()],i=r.indexOf(H.get(e));return r[n!==void 0&&[...t.keys()].some(e=>!n?.has(e))?Math.max(0,i-1):i]}var Va=String.raw`/\*(?:[^*]|\*(?!/)){0,100}\*/|//[^\n]{0,100}\n`,K=String.raw`(?:\s|${Va})*`,Ha=String.raw`(?:${K}\??\.${K}(?:call|apply))?${K}(?:\?\.${K})?\(`,Ua=String.raw`(?!${K}(?<quote>["'\u0060])\s*return\s+this\s*;?\s*\k<quote>${K}\))`,Wa=String.raw`process${K}\.${K}env(?![\p{ID_Continue}$])(?!${K}(?:\??\.|\[))`,Ga=String.raw`${K}\)${K}\??\.${K}(?:filter|find|findLast|some|every|reduce)(?![\p{ID_Continue}$])`,Ka=String.raw`(?:\{${K}\.\.\.${K})?`,qa=String.raw`(?=JSON|Object|URLSearchParams)(?<![\p{ID_Continue}$.])(?:JSON${K}\.${K}stringify|URLSearchParams)${K}\((?=${K}${Ka}${Wa})`+String.raw`|(?=Object)(?<![\p{ID_Continue}$.])Object${K}\.${K}(?:values|entries)${K}\((?=${K}${Ka}${Wa}(?!${Ga}))`,Ja=String.raw`(?:(?:ba|z|da|k|mk|c|tc|fi|a)?sh|pwsh|powershell)`,Ya=String.raw`(?:(?:\/[\w.-]{1,40}){0,8}\/)?(?:env(?:[^\S\n]+(?:-[\w-]{1,20}(?:=\S{0,100}|[^\S\n]+(?!-)[^\s=]{1,100})?|\w{1,40}=\S{0,100})){0,6}[^\S\n]+)?`,Xa=String.raw`curl|wget|\|\s*(?:sudo|${Ya}${Ja})|powershell|pwsh|rundll32|osascript|mshta|certutil|bitsadmin|\/dev\/(?:tcp|udp)|iex|invoke-expression`+String.raw`|\$profile|profile\.ps1|config\.fish|conf\.d|bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile|\.profile|Launch(?:Agents|Daemons)|systemd|systemctl|\.claude|\.vscode|trufflehog|metadata\.google\.internal|["'\x60\/\\]gh(?:\.exe)?["'\x60]`,Za=String.raw`auth(?:[^\S\n]|[\\^\x60]\r?\n)+token|169\.254\.169\.254|Runner\.Worker|\/proc\/`,Qa=new RegExp(Xa,`iu`),$a=new RegExp(String.raw`eval|Function${Ha}|vm["'\x60]|_compile|child_process|\.(?:npmrc|ssh|aws)|_TOKEN|${Za}|(?:stringify|values|entries|URLSearchParams)${K}\(${K}(?:\{${K}\.\.\.${K})?process${K}\.${K}env|publish|whoami|registry\.(?:npmjs\.org|yarnpkg\.com)`,`u`),eo={test:e=>$a.test(e)||Qa.test(e)},to=`globalThis|window|global|self`,no=e=>String.raw`(?=${to}|${e})(?<![\p{ID_Continue}$#])(?<!(?<!\.)\.${K})(?<!\bfunction${K})(?:(?:${to})${K}\??\.${K})?${e}`,q=`(?:NPM|GITHUB)_TOKEN`,ro=String.raw`\s{0,4}=(?![=>])`,io=String.raw`\s{0,4}(?:\?:|:\s{0,4}(?:string|number|boolean|unknown|any)(?![\p{ID_Continue}$]))`,ao=String.raw`\s{0,4}(?:(?:\)\s{0,4}){1,4}(?![\s)]{0,8}(?:[.[(]|\?\.))|&&|\|\||\?\?|\?(?!\.)|[;,:}\]]|$)`,oo=String.raw`(?=NPM|GITHUB)(?<![\p{ID_Continue}$])(?<!\b(?:const|let|var)\s{1,4})`+String.raw`(?:(?<!(?:!|\bdelete\s)[\s(]{0,4}(?:[\p{ID_Continue}$]{1,64}\s{0,4}\??\.\s{0,4}){0,4})|(?!${q}${ao}))`+String.raw`${q}(?![\p{ID_Continue}$])(?!${io})(?:(?!${ro})|(?<=[{,]\s{0,64}${q}))`,so=String.raw`(?<=[{,;]${K}eval)\s*:(?!${K}(?:true|!0)(?![\p{ID_Continue}$]))`+String.raw`(?![^{};]{0,200}\}${K}=${K}(?:${to})(?![\p{ID_Continue}$]))`,co=String.raw`(?<eval>${no(`eval`)}(?![\p{ID_Continue}$])(?!\s*\?:)(?!${so}))|(?<function>${no(`Function`)}${Ha}${Ua})`+String.raw`|(?<compile>\.${K}_compile(?:${Ha}|${K}=(?![=>])))|(?<tokens>${oo})|(?<env>${qa})|(?<put>\.${K}put${K}\()`,lo=new RegExp(String.raw`\.(?:npmrc|ssh|aws)|_TOKEN|${Za}|publish|whoami|registry\.`,`u`),uo={test:e=>lo.test(e)||Qa.test(e)},fo=new RegExp(String.raw`^\s{0,4}\]${ro}`,`u`),po=new RegExp(String.raw`^\s{0,4}\]${ao}`,`mu`),mo=/(?:!|\bdelete\s)[\s(]{0,4}(?:[\p{ID_Continue}$]{1,64}\s{0,4}\??\.\s{0,4}){0,4}[\p{ID_Continue}$]{1,64}\s{0,4}(?:\?\.\s{0,4})?\[\s{0,4}$/u,ho=/\\(?:x([\da-f]{2})|u([\da-f]{4})|u\{([\da-f]{1,6})\}|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[^]))/giu,go=new Map([[`n`,`
13
+ `],[`r`,`\r`],[`t`,` `],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`]]),_o=new Set([`
14
+ `,`\r`,`\r
15
+ `,`\u2028`,`\u2029`]),vo=e=>e.replaceAll(ho,(e,t,n,r,i,a)=>{if(a!==void 0)return _o.has(a)?``:go.get(a)??a;let o=i===void 0?Number.parseInt(t??n??r,16):Number.parseInt(i,8);return o<=1114111?String.fromCodePoint(o):e}),yo=String.raw`registry\.(?:npmjs\.org|yarnpkg\.com)`,bo=new RegExp(String.raw`(?:[/\\]{2}|\bhttps?:[/\\]?)(?:[^/\\?#]{0,256}@)?${yo}|^(["'\u0060])${yo}(?=\1$|[/:?#])`,`iu`),xo=/[\t\n\r]/gu,So=String.raw`[\\^\u0060]\r?\n`,Co=String.raw`(?:[^\n;|&]|${So})`,wo=String.raw`\u0060\r?\n`,To=String.raw`(?:[^\n;|&"']|${So}|"[^"\n]*"|'[^'\n]*'|"(?![^"\n]*")|'(?![^'\n]*'))`,J=String.raw`(?:[^\S\n]|${So})`,Y=String.raw`(?:${J}+--?\w[\w-]*(?:=\S*|${J}+(?!-)\S+)?){0,6}?`,Eo=String.raw`(?<![\w.-])(?:curl|wget)(?:\.exe)?${J}(?:(?!(?:curl|wget)(?![\w-]))${To}){0,2000}?["']?(?:https?|s?ftps?|scp):\\?\/\\?\/|(?<![|\\]|(?<![\w.\/-])${Ja}\s*)\|\s*(?:sudo${Y}(?:${J}+--)?${J}+)?${Ya}${Ja}(?![\w)|$-])`+String.raw`|(?<![\w.-])(?:powershell|pwsh)(?:\.exe)?[^\S\n]+-\w|(?<![\w.-])(?:rundll32|osascript|mshta)(?:\.exe)?(?![\w-])`+String.raw`|(?<![\w.-])certutil(?:\.exe)?${J}${Co}{0,100}?-urlcache|(?<![\w.-])bitsadmin(?:\.exe)?${J}${Co}{0,100}?\/transfer|\/dev\/(?:tcp|udp)\/`+String.raw`|(?<![\w$.-])(?:iex|invoke-expression)(?![\w-])(?:[^\n;|&]|${wo}){0,200}?(?:(?<![\w$.-])(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-])|\.downloadstring\s*\()`+String.raw`|(?<![\w$.-])(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-])(?:(?!(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-]))(?:[^\n;|&]|${wo})){0,2000}\|\s*(?:iex|invoke-expression)(?![\w-])`,X=String.raw`(?:\\?\/|\\{1,2})`,Do=String.raw`(?<![\w.-])\.(?:bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile)(?![\w-])|(?<=[\/\\])(?<!\.[\w-]*[\/\\])\.profile(?![\w-])|(?<![\w-])Launch(?:Agents|Daemons)(?![\w-])|systemd${X}user(?![\w-])|fish${X}(?:config\.fish|conf\.d)(?![\w-])`+String.raw`|(?<![\w$])\$profile(?![\w-])|(?<![\w.-])Microsoft\.\w+_profile\.ps1(?![\w-])|(?:PowerShell|\$pshome)${X}profile\.ps1(?![\w-])|systemctl${Y}${J}+--user${Y}${J}+enable(?![\w-])|systemctl${Y}${J}+enable(?:${J}+[^\s;|&]+){0,6}?${J}+--user(?![\w-])|(?<![\w.-])\.claude${X}settings(?:\.local)?\.json|(?<![\w.-])\.vscode${X}tasks\.json`,Oo=String.raw`(?<![\w.-])[gG][hH](?:\.[eE][xX][eE])?${J}+auth${J}+token(?![\w-])`,ko=String.raw`[\d*?[\]-]{1,20}|\$\{[^}\n]{0,100}\}|\$\([^)\n]{0,200}\)|\u0060[^\u0060\n]{0,200}\u0060|\$\w{1,64}|\{\w{0,64}\}|%d`,Ao=String.raw`(?<![\w.-]|(?<![\/\\])\/|[\w.~%-](?:\\?\/){2})`,jo=String.raw`(?![\w-]|\.[\w-]|(?::[^\s\/@'"\x60]{0,64})?@)`,Mo=String.raw`(?<![\p{ID_Continue}$-])trufflehog(?![\p{ID_Continue}$-])`,No=[[`credential-files`,/(?<![\w$.-])\.(?:npmrc|ssh|aws)(?![\w-])/gu],[`tokens`,new RegExp(String.raw`^["'\u0060]${q}["'\u0060]$|(?:\$\{?|%)${q}(?![\p{ID_Continue}$])`,`gu`)],[`gh-token`,new RegExp(Oo,`gu`)],[`cloud-metadata`,new RegExp(String.raw`${Ao}169\.254\.169\.254${jo}(?!(?::\d{1,5})?\\?\/metadata\\?\/instance(?![\w-]))|${Ao}metadata\.google\.internal${jo}`,`giu`)],[`runner-worker`,/(?<![\w$-])Runner\.Worker(?![\w$-])/gu],[`process-memory`,new RegExp(String.raw`\/proc\/(?:${ko})\/mem(?![\w-])`,`gu`)],[`trufflehog`,new RegExp(Mo,`giu`)],[`publish`,/(?<![\w-])(?:npm|pnpm|yarn)(?:\s+-{1,2}\w[\w-]*(?:=\S*|\s+(?!-)\S+)?){0,8}?\s+publish(?![\w-])|\/-\/whoami(?![\w-])/gu],[`shell`,new RegExp(Eo,`giu`)],[`persistence`,new RegExp(Do,`giu`)]],Po=new Set([`gh-token`,`runner-worker`,`process-memory`,`trufflehog`,`shell`,`persistence`]),Fo=No.filter(([e])=>Po.has(e)),Io=/(?:\.(?:sh|bash|zsh|ksh|mksh|dash|ash|csh|tcsh|fish|command|bat|cmd|ps1|psm1)|(?:^|[\\/])\.(?:bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile|profile))$/iu,Lo=new RegExp(String.raw`^(?:[ \t]*|(${L(()=>String.raw`[^'"\n#\\]|\\.|'${L(String.raw`[^'\n]`)}'|"${L(String.raw`[^"\n\\]|\\.`)}"`)}[ \t;&|]))#${L(`.`)}$`,`gmu`),Ro=/\.psm?1$/iu,zo=String.raw`^\uFEFF?#!\s*${L(String.raw`\S`)}\/(?:env\s+(?:(?:-\S${L(String.raw`\S`)}|\w+=${L(String.raw`\S`)})\s+)*)?`,Bo=new RegExp(String.raw`${zo}pwsh(?![\w-])`,`u`),Vo=new RegExp(String.raw`^(${L(()=>String.raw`[^'"\n#\u0060]|\u0060.|'${L(String.raw`[^'\n]`)}'|"${L(String.raw`[^"\n\u0060]|\u0060.`)}"`)})`+String.raw`(?:(?<=^|[\s;({=,])<#${L(String.raw`[^#]|#(?!>)`)}(?:#>|(?![\s\S]))|(?<=^|[ \t;&|])#${L(`.`)}$)`,`gmu`),Ho=/\.(?:bat|cmd)$/iu,Uo=new RegExp(String.raw`()(?:^[ \t]*@?(?:::|rem(?![\w-]))|(?<=&|\|\|)[ \t]*@?rem(?![\w-]))${L(`.`)}$`,`gimu`),Wo=new RegExp(String.raw`${zo}${Ja}(?![\w-])`,`u`),Go=[[`claude`,/^(["'\u0060])\.claude\1$/iu,/^(["'\u0060])settings(?:\.local)?\.json\1$/iu],[`vscode`,/^(["'\u0060])\.vscode\1$/iu,/^(["'\u0060])tasks\.json\1$/iu]],Ko=/^(["'\u0060])\.profile\1$/iu,qo=/(?:homedir\s*\(\s*\)|\b(?:HOME|USERPROFILE)|(["'\u0060])~\1)\s*,\s*$/u,Jo=[[`vm`,/^(["'\u0060])(?:node:)?vm\1$/u],[`child-process`,/^(["'\u0060])(?:node:)?child_process\1$/u],[`publish`,/^(["'\u0060])libnpmpublish\1$/u]],Yo=/^(["'\u0060])(?:npm|pnpm|yarn)\1$/u,Xo=/^(["'\u0060])publish\1$/u,Zo=/^(["'\u0060])-/u,Qo=new RegExp(String.raw`^(?:[\s,[]|${Va})*$`,`u`),$o=/^(["'\u0060])put\1$/iu,es=new RegExp(String.raw`\bmethod["']?${K}[:=]${K}$`,`u`),ts=new RegExp(String.raw`^(["'\u0060])(?:${L(String.raw`\S`)}[\\/]|[a-z]:[\\/]${L(String.raw`[^\n]`)}[\\/])?(?:curl|wget|certutil|bitsadmin|powershell|pwsh|systemctl|gh)(?:\.exe)?\1$`,`iu`),ns=/[;|&]/u,rs=new RegExp(String.raw`^(?:[\s,[\]\w$.?]|${Va})*$`,`u`),is=new RegExp(Do,`iu`),as=new RegExp(String.raw`(?:(?:require[\w$]*${K}(?:\?\.${K})?|\bimport${K})\(|\b(?:from|import))${K}$`,`u`),os=new RegExp(String.raw`\b(?:import|export)${K}type\b(?!${K}(?:from\b|=))[^;'"\x60]*(?:\bfrom|=${K}require${K}\()${K}$`,`u`),ss={tag:`eval`,note:`Runs a string as code`},Z={tag:`credentials`,note:`Reaches for credentials`},Q=new Map([[`eval`,{...ss,name:`eval`}],[`function`,{...ss,name:`Function`}],[`vm`,{...ss,name:`vm`}],[`compile`,{...ss,name:`Module._compile`}],[`child-process`,{tag:`child_process`,note:`Runs other programs`,name:`child_process`}],[`credential-files`,{...Z,name:`.npmrc, .ssh or .aws`}],[`tokens`,{...Z,name:`NPM_TOKEN or GITHUB_TOKEN`}],[`gh-token`,{...Z,name:`gh auth token`}],[`cloud-metadata`,{...Z,name:`169.254.169.254 or metadata.google.internal`}],[`runner-worker`,{...Z,name:`Runner.Worker`}],[`process-memory`,{...Z,name:`/proc/<pid>/mem`}],[`trufflehog`,{...Z,name:`trufflehog`}],[`env`,{tag:`whole env`,note:`Reads out the whole environment`,name:`process.env, by JSON.stringify, Object.entries or values, URLSearchParams`,mark:`critical`}],[`publish`,{tag:`publish`,note:`Publishes to npm`,name:`npm publish, /-/whoami or a registry PUT`,mark:`critical`}],[`shell`,{tag:`shell`,note:`Runs shell commands fetching or handing off code`,name:`curl or wget a URL, | sh, powershell -…, iex, rundll32, osascript, /dev/tcp`}],[`persistence`,{tag:`persistence`,note:`Names a place code runs from again later`,name:`.bashrc, .zshrc, $PROFILE, LaunchAgents, systemd user units, .claude/settings.json, .vscode/tasks.json`,mark:`critical`}]]);function cs(e,t,n=!1){let r=Wi(e,t,n),i=typeof t==`string`&&(Io.test(e)||Wo.test(t));if(!r&&!i)return null;let a=new Map,o=(e,t)=>{let n=a.get(e);n?n.length<Gi&&n.push(t):a.set(e,[t])};if(r&&ls(t,o),i&&eo.test(t)){let n=Ho.test(e)?Uo:Ro.test(e)||Bo.test(t)?Vo:Lo,r=t.replace(n,(e,t=``)=>t+e.slice(t.length).replaceAll(/[^\n]/gu,e=>` `.repeat(e.length)));for(let[e,t]of Fo)for(let{index:n}of r.matchAll(t))o(e,n)}if(a.has(`registry`))for(let e of a.get(`put`)??[])o(`publish`,e);for(let[e]of Go)if(a.has(`${e}-file`))for(let t of a.get(`${e}-dir`)??[])o(`persistence`,t);if(![...Q.keys()].some(e=>a.has(e)))return null;let s=qi(t);return new Map([...Q.keys()].filter(e=>a.has(e)).map(e=>[e,[...new Set(a.get(e).map(s))].toSorted((e,t)=>e-t)]))}function ls(e,t){if(!eo.test(e))return;let n=null,r=null,i=0,a=!1,o=!1,s=[];for(let c of Ri(e,co)){let{0:l,1:u,groups:d,index:f}=c;for(;s.length>0&&f>=s.at(-1).end;)({before:n,command:r,end:i,option:a,program:o}=s.pop());if(f<i&&(s.push({before:n,command:r,end:i,option:a,program:o}),n=r=null,a=o=!1,i=f),u===void 0){for(let e of us)d[e]&&t(e,f);continue}if(u[0]===`/`)continue;let p=()=>{let t=e.slice(f+l.length,f+l.length+20);return!fo.test(t)&&(!po.test(t)||!mo.test(e.slice(Math.max(0,f-300),f)))},m=uo.test(u)?No.flatMap(([e,t])=>u.search(t)===-1?[]:[...u.matchAll(t)].map(({index:t})=>[e,t])):[];for(let[e,n]of m)(e!==`tokens`||n>0||p())&&t(e,Fi(c,n));u.includes(`registry.`)&&bo.test(vo(u).replaceAll(xo,``))&&t(`registry`,f);for(let[n,r]of Jo)r.test(u)&&ds(e,f)&&t(n,f);Ko.test(u)&&qo.test(e.slice(Math.max(0,f-100),f))&&t(`persistence`,f);for(let[e,n,r]of Go)n.test(u)&&t(`${e}-dir`,f),r.test(u)&&t(`${e}-file`,f);if(o&&Qo.test(e.slice(i,f))?(Xo.test(u)&&t(`publish`,f),o=Zo.test(u)||a,a=Zo.test(u)):o=!1,Yo.test(u)&&([o,a]=[!0,!1]),r&&r.arguments<20&&rs.test(e.slice(i,f))){let e=u.slice(1,-1);r.line+=` ${ns.test(e)?`"${e.replaceAll(`"`,`'`)}"`:e}`,r.arguments++;let{line:n}=r,i=Fo.find(([,e])=>n.search(e)!==-1);i&&(t(i[0],r.at),r=null)}else r=null;if(ts.test(u)&&(r={arguments:0,at:f,line:u.slice(1,-1)}),n&&n.text.length+u.length<200&&Qo.test(e.slice(i,f))){let[e,r]=[n.text.slice(1,-1),u.slice(1,-1)];!is.test(e)&&!is.test(r)&&is.test(`${e}/${r}`)&&t(`persistence`,n.at)}n={text:u,at:f},$o.test(u)&&es.test(e.slice(Math.max(0,f-300),f))&&t(`put`,f),i=Math.max(i,f+l.length)}}var us=[`eval`,`function`,`compile`,`tokens`,`env`,`put`];function ds(e,t){let n=e.slice(Math.max(0,t-300),t);return as.test(n)&&!os.test(n)}var fs=e=>[...new Set([...Q].filter(([t])=>e.some(e=>e.has(t))).map(([,{tag:e}])=>e))].join(`, `);Z.tag;var ps=e=>[...new Map([...e?.keys()??[]].map(e=>Q.get(e)).map(({tag:e,mark:t})=>[e,{name:e,severity:t??`high`}])).values()],ms=[`critical`,`high`,`moderate`,`low`,`notice`],hs=e=>e===`warn`?`high`:`notice`;function gs({path:e,bytes:t,readability:n,runsCode:r,exfiltration:i,script:a}){let o=da(n),s=o!==`ascii`&&o!==`map`&&B.get(o).mark;return[...ps(r),...za(i).map(([e,t])=>({name:e,severity:Ba(e,t)})),...ca(e,t,a)?[{name:`Large`,severity:`notice`}]:[],...n.obfuscation?[{name:`Obfuscated`,severity:`high`}]:[],...fa(n).filter(e=>e===`controls`||e===`long`).map(e=>({name:B.get(e).tag,severity:hs(pa(n,e))})),...s?[{name:B.get(o).tag,severity:hs(s)}]:[]]}function _s(e,t,n,r=!1){let i=ua(e,t,r),a=La(e,t,r),o=cs(e,t,r);return{readability:i,runsCode:o,exfiltration:a,hosts:Ma(e,t,r),stamps:gs({path:e,bytes:n,readability:i,runsCode:o,exfiltration:a,script:r})}}var vs=(e,t)=>new Date(Date.parse(e)+t*864e5);function ys(e){let t=[];if(!e?.days)return t;for(let n=e.days.length-1;n>=6;n-=7){let r=0;for(let t=n-6;t<=n;t++)r+=e.days[t];t.push({from:vs(e.start,n-6),to:vs(e.start,n),total:r})}return t.toReversed()}function bs(e){let t=[];if(!e?.days)return t;let n=Date.parse(e.start),r=null;e.days.forEach((e,i)=>{let a=new Date(n+i*864e5);a.getUTCDate()===1&&(r={from:a,to:a,total:0},t.push(r)),r&&(r.total+=e,r.to=a)});let i=t.at(-1);return i&&new Date(i.to.getTime()+864e5).getUTCDate()!==1&&t.pop(),t}var xs=[[10,55e7],[20,405e6],[50,285e6],[100,225e6],[200,165e6],[500,95e6],[1e3,5e7],[2e3,2e7],[5e3,4e6],[1e4,85e4],[2e4,155e3],[5e4,18e3],[1e5,2e3],[1/0,0]];function Ss(e){let t=ys(e).slice(-6);if(t.length===0)return null;let n=Math.max(...t.map(e=>e.total));return xs.find(([,e])=>n>=e)[0]}var Cs=e=>e<=200?`is-solid`:e<=5e3?`is-top`:e<=2e4?`is-mid`:e<=1e5?`is-low`:`is-unpopular`,ws=e=>e>2e4,$=e=>e??S,Ts=y`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="8" cy="8" r="3"/><path d="M1 8h4m6 0h4"/></svg>`,Es=y`<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>`,Ds=[{kind:`branch`,label:`Branch`,icon:y`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="4" cy="3" r="1.5"/><circle cx="4" cy="13" r="1.5"/><circle cx="12" cy="3" r="1.5"/><path d="M4 4.5v7m0-3h3a5 5 0 0 0 5-4"/></svg>`},{kind:`tag`,label:`Tag`,icon:y`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`},{kind:`commit`,label:`Commit SHA`,icon:Ts}],Os=/^v?(\d+(?:\.(?:\d+|x))*)(?:[-+](.+))?$/iu;function ks(e){let t=Os.exec(e);return t?t[2]===void 0?`line`:`version`:`other`}function As(e){let t=e.map(e=>{let t=Os.exec(e);return{name:e,parts:t?.[1].split(`.`).map(e=>e.toLowerCase()===`x`?1/0:Number(e)),suffix:t?.[2]??``}});return[...t.filter(e=>e.parts).toSorted((e,t)=>{if(!!e.suffix!=!!t.suffix)return e.suffix?1:-1;for(let n=0;n<Math.max(e.parts.length,t.parts.length);n++){let r=(t.parts[n]??1/0)-(e.parts[n]??1/0);if(r)return r}return e.suffix.localeCompare(t.suffix)}),...t.filter(e=>!e.parts)].map(e=>e.name)}function js(e,t,n){let r=e=>e===n||!e.includes(`/`)?null:e.slice(0,e.indexOf(`/`)),i=Map.groupBy(e.filter(r),r),a=e.filter(e=>!(i.get(r(e))?.length>2)).map(e=>({name:e}));for(let[e,n]of i)n.length<=2||(a.push({prefix:e,count:n.length,expanded:t.has(e)}),t.has(e)&&a.push(...As(n.map(t=>t.slice(e.length+1))).map(t=>({name:`${e}/${t}`,label:t,group:e}))));return a}var Ms=class extends ae{static properties={refs:{attribute:!1},kind:{type:String},name:{type:String},disabled:{type:Boolean},installTooltips:{attribute:!1},_open:{state:!0},_query:{state:!0},_active:{state:!0},_expanded:{state:!0},_keyboard:{state:!0}};static styles=ie`:host{display:block;min-width:0}:host,.revision-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}.revision{display:flex;align-items:center;min-width:0;height:2rem;margin:0;border:1px solid var(--border);border-radius:var(--ui-radius, 5px);background:var(--bg)}.revision.keyboard:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.revision-size{display:grid;grid-template-columns:minmax(0,1fr);flex:1 1 auto;align-self:stretch;min-width:0}.revision-size>input,.revision-size:after{grid-area:1 / 1}.revision-size>input{width:100%}.revision-size:after{content:attr(data-value);visibility:hidden;height:0;overflow:hidden;white-space:pre;min-width:8rem;padding:0 calc(.6rem + 2px) 0 .6rem;font-size:.76rem}.revision input{height:100%;min-height:0;padding:.3rem .6rem;min-width:0;border:0;border-radius:0;background:transparent;color:var(--text);font-size:.76rem}.revision input:focus-visible{outline:none}.revision-switch{display:flex;flex:none;align-self:stretch;padding:2px;gap:2px}.revision-switch button{position:relative;display:grid;place-items:center;width:1.8rem;padding:0;border:0;border-radius:var(--ui-radius, 3px);background:transparent;color:var(--muted)}.revision-switch button:hover:not(:disabled){color:var(--text);background:var(--surface-active)}.revision-switch button:focus-visible{outline-offset:-2px}.revision-switch button[aria-pressed=true]{color:var(--accent);background:var(--selected-icon-background, color-mix(in srgb, var(--accent) 15%, var(--bg)))}.revision-switch button[aria-pressed=true]:before{content:var(--selected-icon-ring-content, none);position:absolute;left:50%;top:50%;width:22px;height:22px;box-sizing:border-box;border:1px solid currentcolor;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.revision-switch svg{width:1rem;height:1rem}.revision-expand{display:grid;place-items:center;align-self:stretch;flex:none;width:2rem;padding:0;border:0;border-radius:var(--ui-radius, 4px);color:var(--muted);background:transparent}.revision-expand svg{width:.9rem;height:.9rem}.revision-expand:hover:not(:disabled){color:var(--text)}.revision-expand:focus-visible{outline-offset:-2px}.revision-menu{visibility:hidden;position:fixed;inset:auto;margin:0;padding:.45rem;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);background:var(--surface-active);color:var(--text);box-shadow:0 .65rem 1.8rem #00000073}.revision-menu[data-positioned]{visibility:visible}.revision-options{display:flex;flex-direction:column;gap:.15rem}.revision-section{display:grid;grid-template-columns:repeat(var(--revision-columns, 1),minmax(0,1fr));gap:.15rem .5rem}.revision-section+.revision-section{padding-top:.15rem;border-top:1px solid var(--border)}.revision-options button{min-width:0;padding:.375rem .6rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--text);text-align:left;font-size:.76rem}.revision-options button span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.revision-options button[aria-selected=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.revision-options button:hover,.revision-options button[data-active]{background:color-mix(in srgb,var(--text) 8%,transparent)}.revision-options button[data-active]{outline:1px solid var(--accent);outline-offset:-1px}.revision-options .revision-group{display:flex;align-items:center;gap:.4rem}.revision-group svg{flex:none;width:.75rem;height:.75rem;color:var(--muted)}.revision-group[aria-expanded=false] svg{rotate:-90deg}.revision-options .revision-group .count{display:inline-flex;flex:none;min-width:1.1rem;padding:0 .35rem;background:transparent;font-size:.7rem}.revision-empty{margin:0;padding:.65rem;color:var(--muted);font-size:.75rem;cursor:default;user-select:none}button:disabled,input:disabled{opacity:.5}:host-context(body.theme-w95) *{overscroll-behavior:none}`;constructor(){super(),this.refs=null,this.kind=`branch`,this.name=``,this.disabled=!1,this._open=!1,this._query=``,this._active=-1,this._expanded=new Set,this._keyboard=!1,this._pointer=!1,this._onViewport=()=>this.position(),this._onKey=()=>{this._pointer=!1}}connectedCallback(){super.connectedCallback(),globalThis.addEventListener(`resize`,this._onViewport),globalThis.addEventListener(`scroll`,this._onViewport,!0),globalThis.addEventListener(`keydown`,this._onKey,!0)}disconnectedCallback(){globalThis.removeEventListener(`resize`,this._onViewport),globalThis.removeEventListener(`scroll`,this._onViewport,!0),globalThis.removeEventListener(`keydown`,this._onKey,!0),super.disconnectedCallback()}updated(e){e.has(`installTooltips`)&&this.installTooltips?.(this.renderRoot),e.has(`kind`)&&this.kind===`commit`&&this._open&&this.close(),this.position()}change(e,t,n){this.dispatchEvent(new CustomEvent(`revision-change`,{detail:{how:e,kind:t,name:n},bubbles:!0,composed:!0}))}suggestions(e=this.kind){let t=this.refs??{branches:[],tags:[]},n=e===`branch`?t.branches:e===`tag`?t.tags:[],r=e===`branch`?[...t.defaultBranch?[t.defaultBranch]:[],...As(n.filter(e=>e!==t.defaultBranch))]:n,i=this._query.trim().toLowerCase();return r.filter(e=>e.toLowerCase().includes(i))}entries(e=this._expanded){let t=this.suggestions();return this.kind===`branch`&&!this._query.trim()?js(t,e,this.refs?.defaultBranch):t.map(e=>({name:e}))}toggleGroup(e){let t=new Set(this._expanded);t.delete(e)||t.add(e),this._expanded=t}sections(e){let t=e=>e.group??(this.kind===`branch`?ks(e.name):`all`),n=e[1]?.prefix==null?e[1]:void 0,r=[];for(let[i,a]of e.entries()){if(a.prefix!=null){r.push({header:a,index:i});continue}let e=t(i===0&&a.name===this.refs?.defaultBranch&&n?n:a);r.at(-1)?.key===e?r.at(-1).items.push({entry:a,index:i}):r.push({key:e,items:[{entry:a,index:i}]})}return r}show({query:e=``,kind:t=this.kind}={}){t===`commit`||this.disabled||(this._open||(this._expanded=new Set(this.name.includes(`/`)?[this.name.slice(0,this.name.indexOf(`/`))]:[])),this._query=e,this._active=-1,this.renderRoot?.querySelector(`.revision-menu`)?.showPopover())}close(){this.renderRoot?.querySelector(`.revision-menu`)?.hidePopover(),this._open=!1,this._active=-1}focusName(){this.renderRoot?.querySelector(`.revision-name`)?.focus({preventScroll:!0})}pick(e){this.change(`pick`,this.kind,e),this.focusName(),this.close()}pickKind(e){e!==this.kind&&(this.close(),this.change(`kind`,e,e===`branch`&&this.refs?.defaultBranch||``)),this.focusName(),this.show({kind:e})}position(){if(!this._open)return;let e=this.renderRoot.querySelector(`.revision-menu`),t=e.querySelector(`.revision-options`),n=this.renderRoot.querySelector(`.revision-name`).getBoundingClientRect(),r=parseFloat(getComputedStyle(this).fontSize),i=document.createRange(),a=t.querySelector(`.revision-section > button`),o=a?parseFloat(getComputedStyle(a).paddingLeft)+parseFloat(getComputedStyle(a).paddingRight):0,s=[...t.querySelectorAll(`.revision-section`)].map(e=>{let t=0;for(let n of e.querySelectorAll(`button > span`))i.selectNodeContents(n),t=Math.max(t,i.getBoundingClientRect().width);return{section:e,count:e.children.length,columnWidth:Math.max(5*r,Math.min(15*r,Math.ceil(t+o)+1))}}),c=s.length>0&&parseFloat(getComputedStyle(s[0].section).columnGap)||0,l=e.offsetWidth-t.clientWidth,u=Math.min(window.innerWidth-16,Math.max(n.width,...s.map(({count:e,columnWidth:t})=>Math.min(3,Math.ceil(e/8))*(t+c)-c+l))),d=this.entries({has:()=>!0}).length<=8;for(let{section:e,count:t,columnWidth:n}of s){let r=Math.max(1,Math.floor((u-l+c)/(n+c)));e.style.setProperty(`--revision-columns`,d?1:Math.ceil(t/Math.ceil(t/r)))}e.style.width=`${u}px`,e.style.left=`${Math.max(8,Math.min(n.left,window.innerWidth-u-8))}px`;let f=window.innerHeight-n.bottom-6-8,p=n.top-6-8,m=f<Math.min(e.scrollHeight,320)&&p>f;e.style.maxHeight=`${Math.max(0,Math.min(420,m?p:f))}px`,e.style.top=`${Math.max(8,m?n.top-e.offsetHeight-6:n.bottom+6)}px`,e.dataset.positioned=``}async keyDown(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&this._open&&(e.preventDefault(),e.stopPropagation()),this.close();return}if(e.key===`Enter`){let t=this.entries()[this._active];this._open&&t?.prefix!=null?(e.preventDefault(),this.toggleGroup(t.prefix)):this._open&&t!=null?(e.preventDefault(),this.pick(t.name)):this.close();return}if(this.kind===`commit`||![`ArrowDown`,`ArrowUp`].includes(e.key))return;e.preventDefault(),this._open||this.show();let t=this.entries().length;this._active=t===0?-1:e.key===`ArrowDown`?Math.min(this._active+1,t-1):this._active<=0?t-1:this._active-1,await this.updateComplete,this.renderRoot.querySelector(`[data-active]`)?.scrollIntoView({block:`nearest`})}render(){let e=this.entries(),t=Ds.find(e=>e.kind===this.kind)?.label??`Branch`,n=this.kind!==`commit`;return y`<form class="${this._keyboard?`revision keyboard`:`revision`}" @pointerdown="${()=>{this._pointer=!0,this._keyboard=!1}}" @focusin="${()=>{this._keyboard=!this._pointer}}" @focusout="${e=>{e.currentTarget.contains(e.relatedTarget)||(this._keyboard=!1,this.close())}}" @submit="${e=>{e.preventDefault(),this.change(`submit`,this.kind,this.name)}}"><div class="revision-switch" role="group" aria-label="Revision type">${Ds.map(({kind:e,label:t,icon:n})=>y`<button type="button" aria-label="${t}" data-tooltip="${t}" aria-pressed="${this.kind===e}" ?disabled="${this.disabled}" @click="${()=>this.pickKind(e)}">${n}</button>`)}</div><span class="revision-size" data-value="${this.name}"><input class="revision-name" type="text" size="1" aria-label="${t}" role="${$(n?`combobox`:void 0)}" aria-autocomplete="${$(n?`list`:void 0)}" aria-expanded="${$(n?String(this._open):void 0)}" aria-controls="${$(n?`revisions`:void 0)}" aria-activedescendant="${$(this._open&&this._active>=0?`revision-${this._active}`:void 0)}" autocomplete="off" spellcheck="false" placeholder="${n?`Choose or enter a ${this.kind}\u2026`:`Commit SHA…`}" .value="${Gt(this.name)}" ?disabled="${this.disabled}" @focus="${()=>this.show()}" @click="${()=>this.show()}" @keydown="${this.keyDown}" @input="${e=>{this.change(`input`,this.kind,e.target.value),this.show({query:e.target.value})}}"></span>${n?y`<button type="button" class="revision-expand" aria-label="${`Show ${this.kind} suggestions`}" aria-expanded="${this._open}" ?disabled="${this.disabled}" @mousedown="${e=>e.preventDefault()}" @click="${()=>{this._open?this.close():(this.focusName(),this.show())}}">${Es}</button>`:S}<div class="revision-menu" id="revisions" popover="auto" role="listbox" aria-label="${`${t} suggestions`}" @beforetoggle="${e=>{this._open=e.newState===`open`,delete e.target.dataset.positioned,this._open||(this._active=-1)}}"><div class="revision-options">${this.sections(e).map(({header:e,index:t,items:n})=>e?y`<button type="button" role="option" class="revision-group" id="${`revision-${t}`}" aria-selected="false" aria-expanded="${e.expanded}" ?data-active="${t===this._active}" tabindex="-1" @mousedown="${e=>e.preventDefault()}" @click="${()=>{this._active=-1,this.toggleGroup(e.prefix)}}">${Es}<span>${e.prefix}/</span><span class="count" aria-label="${`${e.count} branches`}">${e.count}</span></button>`:y`<div class="revision-section" role="none">${n.map(({entry:e,index:t})=>y`<button type="button" role="option" id="${`revision-${t}`}" aria-label="${$(e.label===void 0?void 0:e.name)}" aria-selected="${e.name===this.name}" ?data-active="${t===this._active}" tabindex="-1" @mousedown="${e=>e.preventDefault()}" @click="${()=>this.pick(e.name)}"><span data-tooltip-truncated data-tooltip="${e.name}">${e.label??e.name}</span></button>`)}</div>`)}</div>${e.length>0?S:y`<p class="revision-empty">${this._query?`No matching suggestions. Enter a revision name to browse.`:`No ${this.kind} suggestions available.`}</p>`}</div></form>`}};customElements.get(`revision-select`)||customElements.define(`revision-select`,Ms);export{Dt as a,Ot as b,kt as c,Mt as d,Nt as e,Pt as f,Ft as g,It as h,Lt as i,Rt as j,zt as k,Ht as l,Ut as m,Wt as n,oe as o,ce as p,le as q,ue as r,de as s,fe as t,pe as u,me as v,he as w,ge as x,_e as y,ve as z,ye as A,be as B,xe as C,Se as D,Ce as E,we as F,Te as G,Ee as H,De as I,Oe as J,ke as K,Ae as L,je as M,Me as N,Ne as O,Pe as P,Fe as Q,Ie as R,Le as S,Re as T,ze as U,Be as V,Ve as W,He as X,Ue as Y,We as Z,Ge as _,Ke as $,mr as aa,Cr as ba,Pr as ca,Hr as da,Ur as ea,ri as fa,Gt as ga,Zt as ha,$t as ia,fn as ja,pn as ka,vn as la,Sn as ma,Cn as na,Tn as oa,En as pa,Wi as qa,Gi as ra,Ji as sa,Yi as ta,Qi as ua,ta as va,ra as wa,la as xa,ua as ya,da as za,fa as Aa,pa as Ba,B as Ca,ga as Da,H as Ea,Fa,za as Ga,Ba as Ha,Q as Ia,fs as Ja,ms as Ka,_s as La,vs as Ma,ys as Na,bs as Oa,Ss as Pa,Cs as Qa,ws as Ra,ar as Sa,or as Ta,Dn as Ua,An as Va,jn as Wa,Mn as Xa,Fn as Ya,Rn as Za,Un as _a,$ as $a,Ts as ab,Wn as bb,Gn as cb,Kn as db,Yn as eb,Zn as fb,$n as gb,er as hb,rr as ib,ur as jb};
16
+ /*!
17
+ * PHP elephant adapted from Material Icon Theme:
18
+ * https://github.com/material-extensions/vscode-material-icon-theme/blob/main/icons/php_elephant.svg
19
+ * Copyright (c) 2025 Material Extensions
20
+ *
21
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
22
+ * of this software and associated documentation files (the "Software"), to deal
23
+ * in the Software without restriction, including without limitation the rights
24
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
25
+ * of the Software, and to permit persons to whom the Software is furnished to do
26
+ * so, subject to the following conditions:
27
+ *
28
+ * The above copyright notice and this permission notice shall be included in all
29
+ * copies or substantial portions of the Software.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ * SOFTWARE.
38
+ */
39
+ /*! Bundled license information:
40
+
41
+ lit-html/directives/live.js:
42
+ (**
43
+ * @license
44
+ * Copyright 2020 Google LLC
45
+ * SPDX-License-Identifier: BSD-3-Clause
46
+ *)
47
+
48
+ lit-html/directives/if-defined.js:
49
+ (**
50
+ * @license
51
+ * Copyright 2018 Google LLC
52
+ * SPDX-License-Identifier: BSD-3-Clause
53
+ *)
54
+ */
@@ -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-YKCRCNYZ.js";import{l as u,m as d}from"./chunk-5QWPKTCE.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-Z7KOFS2V.js";import{l as u,m as d}from"./chunk-EIEUTJM4.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};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-GO7FT4OD.js";import{b as t,c as n,d as r,e as i}from"./chunk-RAM3GDAD.js";import{c as a,d as o,e as s,f as c,h as l,k as u,l as d,m as f,o as p,q as m}from"./chunk-6WMQVUT2.js";import"./chunk-N57OWFKY.js";import{a as h}from"./chunk-7YFJUT2P.js";import"./chunk-PXK7EU4V.js";import{m as g,q as _,s as v,w as y}from"./chunk-KP2XM324.js";import"./chunk-DUASGS2O.js";import{b}from"./chunk-IYPY47MC.js";import"./chunk-QRKFPLA4.js";import"./chunk-TUII34K2.js";import"./chunk-OOJM4CTU.js";function x(e){if(e instanceof Uint8Array)return{proven:!1,reason:`unsupported`,at:null};if(typeof e!=`string`)throw TypeError(`a text must be a string or its UTF-8 bytes, not ${typeof e}`);if(!e.isWellFormed())throw TypeError(`a text must be a well-formed string`);return{proven:!1,reason:`unsupported`,at:null}}var S=e=>e.subarray(0,8e3).includes(0),C=(e,t)=>(e+Math.imul(t,97)>>>0)%107927,w=e=>Uint8Array.from({length:256},(t,n)=>Number(n===10||e.includes(String.fromCodePoint(n)))),T=w(``),E=w(`,;={}`);function D(e,t=T){let n=!S(e),r=new Map,i=(e,t)=>r.set(e,(r.get(e)??0)+t),a=0,o=0,s=0;for(let r=0;r<e.length;r++){let c=e[r];if(n&&c===13&&e[r+1]===10)continue;let l=a;a=(a<<7^o>>>25)+c>>>0,o=(o<<7^l>>>25)>>>0,!(++s<64&&t[c]===0)&&(i(C(a,o),s),s=0,a=0,o=0)}s>0&&i(C(a,o),s);let c=Uint32Array.from(r.keys()).sort();return{hashes:c,bytes:Float64Array.from(c,e=>r.get(e)),total:r.values().reduce((e,t)=>e+t,0)}}function ee(e,t){let n=0;for(let r=0,i=0;r<e.hashes.length&&i<t.hashes.length;)e.hashes[r]<t.hashes[i]?r++:e.hashes[r]>t.hashes[i]?i++:n+=Math.min(e.bytes[r++],t.bytes[i++]);return n}function te(e,t,n){let r=0,i=e.total,a=t.total;for(let o=0,s=0;o<e.hashes.length&&s<t.hashes.length;)if(e.hashes[o]<t.hashes[s]?i-=e.bytes[o++]:(e.hashes[o]>t.hashes[s]||(r+=Math.min(e.bytes[o],t.bytes[s]),i-=e.bytes[o++]),a-=t.bytes[s++]),(r+Math.min(i,a))*6e4<n)return 0;return r}function O(e,t,n,r,i=!1){if(e===null||t===null||t.length===0)return 0;let a=Math.abs(e.length-t.length),o=Math.max(e.length,t.length);if(o*(6e4-n)<a*6e4)return 0;let s=r(e),c=r(t),l=i?te(s,c,n*o):ee(s,c);return Math.trunc(l*6e4/o)}var k=/^[\w-]{6,}$/u,A=/[\dA-Z]/u,ne=/^(?:\.[\w-]+)+$/u,re=/^[\w-]{8,32}$/u;function j(e){let t=[];for(let n=e.length-1;n>0;n--){if(e[n]!==`-`&&e[n]!==`.`)continue;let r=e.indexOf(`.`,n+1),i=e.slice(r),a=e.slice(n+1,r);r!==-1&&re.test(a)&&ne.test(i)&&/[A-Za-z]/u.test(a)&&A.test(a)&&t.push([e.slice(0,n),a,i])}return t}var ie=e=>e.replaceAll(/\d/gu,`0`).replaceAll(/[a-z]/gu,`a`).replaceAll(/[A-Z]/gu,`A`);function ae(e,t){let n=j(t);for(let[t,r,i]of j(e)){let e=n.find(e=>e[2]===i);if(e&&e[1]!==r)return e[0]===t&&ie(e[1])!==ie(r)}return!1}function oe(e){let t=e.lastIndexOf(`/`),n=e.slice(t+1),r=n.lastIndexOf(`.`),i=r>0?n.slice(r):``;return{name:n,key:`${e.slice(0,t+1)}\0${i}\0${n.length}`}}function se(e,t){let n=e.length,r=0;for(;r<e.length&&e[r]===t[r];)r++;for(;n>r&&e[n-1]===t[n-1];)n--;for(;r>0&&!`-._`.includes(e[r-1]);)r--;for(;n<e.length&&e[n]!==`.`;)n++;let i=e.slice(r,n),a=t.slice(r,n);return r>0&&k.test(i)&&k.test(a)&&(A.test(i)||A.test(a))}function ce({sources:e,dests:t,pairs:n,used:r,record:i,punctuatedScoreOf:a},{remaining:o,open:s},c,l){let u=(e,t)=>new Map(t.filter(t=>e[t].type===`file`).map(t=>[t,oe(e[t].path)])),d=u(t,s),f=u(e,o),p=Map.groupBy(f.keys(),e=>f.get(e).key),m=Map.groupBy(d.keys(),e=>d.get(e).key),h=[];for(let[e,t]of m){let n=p.get(e)??[];for(let e of t)for(let t of n)se(f.get(t).name,d.get(e).name)&&h.push({s:t,d:e})}let g=Map.groupBy(h,({d:e})=>e),_=Map.groupBy(h,({s:e})=>e),v=[];for(let{s:e,d:t}of h){let n=_.get(e).length===1&&g.get(t).length===1&&ae(f.get(e).name,d.get(t).name),r=a(e,t,n?0:c);(n||r>=c)&&v.push({s:e,d:t,score:r})}let y=[],b=new Set,x=new Set;for(let e of v.sort((e,t)=>t.score-e.score))n.has(e.d)||r.has(e.s)||(x.has(e.s)||b.has(e.d)||l(e)?(y.push(e),x.add(e.s),b.add(e.d)):i(e.d,e.s,e.score));return y}function le(e,t){let n=e.length;if(n!==t.length)return!1;let r=0;if(n>=32&&(e.byteOffset&3)==(t.byteOffset&3)){for(let n=4-(e.byteOffset&3)&3;r<n;r++)if(e[r]!==t[r])return!1;let i=n-r>>>2,a=new Int32Array(e.buffer,e.byteOffset+r,i),o=new Int32Array(t.buffer,t.byteOffset+r,i);for(let e=0;e<i;e++)if(a[e]!==o[e])return!1;r+=i*4}for(;r<n;r++)if(e[r]!==t[r])return!1;return!0}var M=class extends Error{constructor(e,t,n){let r=n===void 0?``:` in the ${n} tree`;super(t===void 0?e:`${e}: ${JSON.stringify(t)}${r}`),this.name=`CompareError`,this.path=t,this.tree=n}},ue=new Set([`file`,`contiguous-file`]),de=new Set([`fifo`,`character-device`,`block-device`]),fe=/(?:^|\/)\.{0,2}(?:\/|$)/u;function pe(e){if(!Number.isInteger(e)||e<0||e>4095)throw RangeError(`a mode must be an integer from 0 to 0o7777, not ${e}`)}function me(e,t,n,r){if(typeof e!=`string`)throw TypeError(`an entry's name must be a string, not ${typeof e}`);if(e!==`.`||t!==`directory`){if(r?e===``:fe.test(e))throw new M(r?`a name must not be empty`:"a name must be a relative path with no empty, `.` or `..` segment",e,n);if(!e.isWellFormed())throw new M(`a name must be well-formed Unicode`,e,n)}}function he(e,t,n){if(typeof e!=`string`||e===``)throw new M(`a link must name its target`,t,n);if(!e.isWellFormed())throw new M(`a link target must be well-formed Unicode`,t,n);return e}function ge(e){if(e===void 0)return new Uint8Array;if(e instanceof Uint8Array)return e;if(typeof e!=`string`)throw TypeError(`a file's data must be a string or a Uint8Array, not ${typeof e}`);if(!e.isWellFormed())throw TypeError(`a file's text must be well-formed Unicode`);return e}var N=e=>typeof e==`string`?h(e):e;function _e(e,t,n){if(typeof e!=`object`||!e)throw TypeError(`an entry must be an object, not ${e===null?`null`:typeof e}`);let{name:r,type:i=`file`,mode:a,linkname:o,data:s}=e;if(me(r,i,t,n),a!==void 0&&pe(a),ue.has(i))return{path:r,type:`file`,mode:a??420,data:ge(s)};if(i===`symlink`||i===`hardlink`)return{path:r,type:i,target:he(o,r,t)};if(i===`directory`)return{path:r,type:i};throw de.has(i)?new M(`a ${i} is neither a file nor a link`,r,t):TypeError(`${JSON.stringify(i)} is not an entry type`)}function P(e,t){return e.type===t.type?e.type===`symlink`?e.target===t.target:e.data===t.data?!0:typeof e.data==`string`&&typeof t.data==`string`?!1:le(N(e.data),N(t.data)):!1}function ve(e,t,n){let r=new Set([e.path]),i=t.get(e.target);for(;i?.type===`hardlink`;){if(r.has(i.path))throw new M(`a hard link leads back to itself`,e.path,n);r.add(i.path),i=t.get(i.target)}if(i===void 0||i.type===`directory`)throw new M(`a hard link must name a file or a link in the tree`,e.path,n);return{...i,path:e.path}}function F(e,t,n){let r=new Map;for(let i of e){let e=_e(i,t,n);if(e.type!==`directory`||e.path!==`.`){if(r.has(e.path))throw new M(`a name is given twice`,e.path,t);r.set(e.path,e)}}let i=new Map;for(let[e,a]of r){for(let i=n?-1:e.lastIndexOf(`/`);i>0;i=e.lastIndexOf(`/`,i-1)){let n=r.get(e.slice(0,i));if(n!==void 0&&n.type!==`directory`)throw new M(`a path lies under a ${n.type===`symlink`?`link`:`file`}`,e,t)}a.type===`hardlink`?i.set(e,ve(a,r,t)):a.type!==`directory`&&i.set(e,a)}return i}var ye=100,be=4,I=e=>e.slice(e.lastIndexOf(`/`)+1);function L(t,n){if(t.type===`symlink`)return`l${t.target}`;let r=n(t);return`f${r.length}:${e(r)}`}function xe({sources:e,dests:t,sourceNames:n,destNames:r,used:i,record:a,bytes:o}){let s=Map.groupBy(e.keys(),t=>L(e[t],o));for(let c=0;c<t.length;c++){let l=-1,u=ye;for(let a of s.get(L(t[c],o))??[])if(!i.has(a)&&P(e[a],t[c])&&((l===-1||n[a]===r[c])&&(l=a),n[a]===r[c]||--u===0))break;l!==-1&&a(c,l,6e4)}}var Se=new Map([[`.ts`,`.js`],[`.mts`,`.mjs`],[`.cts`,`.cjs`],[`.tsx`,`.jsx`]]),Ce=new Map([...[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.mts`,`.cts`,`.tsx`].map(e=>[e,`script`]),...[`.css`,`.scss`,`.sass`,`.less`].map(e=>[e,`style`])]);function R(e){let t=e.split(`/`),n=t.pop(),r=n.lastIndexOf(`.`);return r>0?{dirs:t,stem:n.slice(0,r),extension:n.slice(r)}:{dirs:t,stem:n,extension:``}}function z(e){let{dirs:t,stem:n,extension:r}=R(e);return JSON.stringify([t.map(e=>e===`lib`||e===`src`?null:e),n,Se.get(r)??r])}function we(e){let{dirs:t,stem:n,extension:r}=R(e),i=[n,Ce.get(r)??r],a=t.lastIndexOf(`node_modules`),o=a===-1?0:a+(t[a+1]?.startsWith(`@`)?3:2),s=[JSON.stringify([...i,t])];for(let e=o;e<t.length;e++)s.push(JSON.stringify([...i,t.toSpliced(e,1,null)]));return s}var B=(e,t)=>Math.max(t,e+Math.trunc((6e4-e)/2));function V({pairs:e,used:t,scoreOf:n},{remaining:r,open:i},{s:a,d:o,score:s},c){let l=B(s,c);return i.some(t=>t!==o&&!e.has(t)&&n(a,t,l)>=l)||r.some(e=>e!==a&&!t.has(e)&&n(e,o,l)>=l)}function Te(e,t,n,r){let{sources:i,dests:a,pairs:o,used:s,record:c,scoreOf:l}=e,u=Map.groupBy(t.remaining.filter(e=>i[e].type===`file`),e=>z(i[e].path)),d=t.open.filter(e=>a[e].type===`file`).flatMap(e=>(u.get(z(a[e].path))??[]).map(t=>({s:t,d:e,score:l(t,e,0)})));for(let i of d.sort((e,t)=>t.score-e.score))o.has(i.d)||s.has(i.s)||n&&V(e,t,i,r)||c(i.d,i.s,i.score)}function Ee(e,t,n,r){let{sources:i,dests:a,pairs:o,used:s,record:c,scoreOf:l}=e,u=new Map,d=(e,t,n)=>new Map(t.filter(t=>e[t].type===`file`).map(t=>{let r=we(e[t].path);for(let e of r)(u.get(e)??u.set(e,{sources:[],dests:[]}).get(e))[n].push(t);return[t,r]})),f=d(a,t.open.filter(e=>!o.has(e)),`dests`),p=d(i,t.remaining.filter(e=>!s.has(e)),`sources`),m=(e,t)=>{let n=new Set(e.flatMap(e=>u.get(e)[t]));return n.size===1?[...n][0]:-1};for(let[i,a]of p){let o=m(a,`dests`);if(o===-1||m(f.get(o),`sources`)!==i)continue;let s={s:i,d:o,score:l(i,o,0)};n&&V(e,t,s,r)||c(o,i,s.score)}}function De(e,t,n){let r=W(e),i=t<6e4&&r.remaining.length*r.open.length<=n*n;Te(e,r,i,t),Ee(e,r,i,t)}function H(e,t){let n=new Map;for(let r of t)n.set(e[r],n.has(e[r])?-1:r);return n}function Oe({sourceNames:e,destNames:t,record:n,scoreOf:r},{remaining:i,open:a},o){let s=H(t,a),c=H(e,i);for(let t of i){let i=s.get(e[t]);if(i===void 0||i===-1||c.get(e[t])===-1)continue;let a=r(t,i,o);a>=o&&n(i,t,a)}}var U=(e,t)=>t.score-e.score||t.nameScore-e.nameScore;function ke(e,t){if(e.length<be){e.push(t);return}let n=0;for(let t=1;t<e.length;t++)U(e[t],e[n])>0&&(n=t);U(e[n],t)>0&&(e[n]=t)}function Ae({sourceNames:e,destNames:t,pairs:n,used:r,record:i,scoreOf:a},{remaining:o,open:s},c,l){let u=[];for(let n of s){let r=[];for(let i of o)ke(r,{score:a(i,n,c),nameScore:+(e[i]===t[n]),dst:n,src:i});u.push(...r)}let d=0,f=e=>{for(;d<l.length&&B(l[d].score,c)>e;d++){let{s:e,d:t,score:a}=l[d];!n.has(t)&&!r.has(e)&&i(t,e,a)}};for(let{dst:e,src:t,score:a}of u.sort(U)){if(a<c)break;f(a),!n.has(e)&&!r.has(t)&&i(e,t,a)}f(-1/0)}var W=({sources:e,dests:t,pairs:n,used:r})=>({remaining:e.keys().filter(e=>!r.has(e)).toArray(),open:t.keys().filter(e=>!n.has(e)).toArray()}),G=e=>B(e,e);function K(e,t,{minimum:n,limit:r,byPath:i}){let a=new Map,o=new Set;if(e.length===0||t.length===0)return a;let s=new Map,c=new Map,l=new Map,u=e=>e.type===`file`?c.get(e)??c.set(e,N(e.data)).get(e):null,d=e=>s.get(e)??s.set(e,D(e)).get(e),f=e=>l.get(e)??l.set(e,D(e,E)).get(e),p={sources:e,dests:t,pairs:a,used:o,sourceNames:e.map(e=>I(e.path)),destNames:t.map(e=>I(e.path)),record(e,t,n){a.set(e,{source:t,score:n}),o.add(t)},bytes:u,scoreOf:(n,r,i)=>O(u(e[n]),u(t[r]),i,d),punctuatedScoreOf:(n,r,i)=>O(u(e[n]),u(t[r]),i,f,!0)};if(xe(p),i&&De(p,n,r),n>=6e4)return a;Oe(p,W(p),G(n));let m=W(p);if(m.remaining.length*m.open.length>r*r)return a;let h=i?ce(p,m,G(n),e=>V(p,m,e,n)):[];return Ae(p,W(p),n,h),a}var je=50,Me=1e3;function q(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return e.codePointAt(r)-t.codePointAt(r);return e.length-t.length}function Ne(e){if(e===!1)return null;let t=e===!0?je:e;if(typeof t!=`number`)throw TypeError(`renames must be a boolean or a percentage, not ${typeof e}`);if(!(t>0&&t<=100))throw RangeError(`renames must be a percentage above 0 and at most 100, not ${e}`);return Math.max(1,Math.trunc(6e4*t/100))}function Pe({renamesByPath:e,renameLimit:t,renameGroup:n,paths:r,lines:i}){if(o(`renamesByPath`,e),s(`renameLimit`,t),n!==null&&typeof n!=`function`)throw TypeError(`renameGroup must be a function, not ${typeof n}`);if(r!==`tree`&&r!==`keys`)throw RangeError(`paths must be 'tree' or 'keys', not ${r}`);o(`lines`,i)}var Fe=(e,t)=>P(e,t)&&(e.type!==`file`||e.mode===t.mode),J=(e,t,n,r=null)=>({status:e,old:t,new:n,similarity:r}),Ie=/\.d\.(?:[^./]+\.)?[cm]?ts$/u,Le=e=>e.endsWith(`.mts`)?`module`:e.endsWith(`.cts`)?`commonjs`:null,Re=/^export\s*\{\s*\}\s*;?$/u;function ze(e){if(e===null)return{proven:!0,runtime:``,loads:!1};try{return a(e)===void 0?{proven:!1}:x(e.data)}catch{return{proven:!1}}}function Be(e){if(![e.old,e.new].filter(e=>e!==null).every(e=>e.type===`file`&&Ie.test(e.path))||e.old&&e.new&&e.old.mode!==e.new.mode)return e;let t=ze(e.new),n=ze(e.old);return!n.proven||!t.proven||n.runtime!==t.runtime&&!(e.old===null&&Re.test(t.runtime))||n.loads&&e.old&&e.new&&e.old.path!==e.new.path&&Le(e.old.path)!==Le(e.new.path)?e:{...e,typeOnly:!0}}function Ve(e,t){let n=[],r=[],i=[];for(let[n,a]of e){let e=t.get(n);e===void 0?i.push(a):e.type===a.type?Fe(a,e)||r.push(J(`modified`,a,e)):r.push(J(`type-changed`,a,e))}for(let[r,i]of t)e.has(r)||n.push(i);return i.sort((e,t)=>q(e.path,t.path)),n.sort((e,t)=>q(e.path,t.path)),{changes:r,deleted:i,added:n}}function He(e,t,{group:n,...r}){if(n===null)return K(e,t,r);let i=new Map,a=e=>Map.groupBy(e.keys(),t=>n(e[t].path)),o=a(e);for(let[n,s]of a(t)){let a=o.get(n);if(a!==void 0)for(let[n,{source:o,score:c}]of K(a.map(t=>e[t]),s.map(e=>t[e]),r))i.set(s[n],{source:a[o],score:c})}return i}function Ue(e,t,{renames:n=!0,renamesByPath:r=!0,renameLimit:i=Me,renameGroup:a=null,paths:o=`tree`,lines:s=!0,horizon:u,whitespace:d,ignoreCase:f,shortest:p}={}){let m=Ne(n);Pe({renamesByPath:r,renameLimit:i,renameGroup:a,paths:o,lines:s});let h=c({horizon:u,whitespace:d,ignoreCase:f,shortest:p}),g=o===`keys`,{changes:_,deleted:v,added:y}=Ve(F(e,`old`,g),F(t,`new`,g)),b=m===null?new Map:He(v,y,{minimum:m,limit:i,byPath:r,group:a});for(let[e,t]of y.entries()){let n=b.get(e);_.push(n===void 0?J(`added`,null,t):J(`renamed`,v[n.source],t,Math.trunc(n.score*100/6e4)))}let x=new Set(b.values().map(({source:e})=>e));for(let[e,t]of v.entries())x.has(e)||_.push(J(`deleted`,t,null));return _.sort((e,t)=>q((e.new??e.old).path,(t.new??t.old).path)),(s?_.map(e=>({...e,...l(e.old,e.new,h)})):_).map(Be)}function Y(e,t,n){let r=new Map,i=new Set,a=0;for(let o of e){let e=u(n,o);e===null||!t.has(e)||(r.set(o,e),i.add(e),e!==o&&a++)}for(let n of e)r.has(n)||!t.has(n)||i.has(n)||(r.set(n,n),i.add(n));let o=r.size;for(let a of e){if(r.has(a))continue;let e=u(n,a)??d(n,a);for(;t.has(e)||i.has(e);)e=`../${e}`;r.set(a,e),i.add(e)}return{paths:r,paired:o,moved:a}}function We(e,t){let n=new Set(e),r=new Set(t),i=(e,t)=>{let n=new Map;for(let r of e)for(let e=r.indexOf(`/`);e!==-1;e=r.indexOf(`/`,e+1)){let i=r.slice(0,e+1);t.has(r.slice(e+1))&&n.set(i,(n.get(i)??0)+1)}let r=null,i=!1;for(let[e,t]of n)t>(n.get(r)??0)?[r,i]=[e,!1]:t===n.get(r)&&(i=!0);return i?null:r},a=Y(n,r,null).paired,o=[[{base:``,other:i(r,n)},n],[{base:i(n,r),other:``},r]].filter(([e])=>e.base!==null&&e.other!==null).map(([e,t])=>({root:e,side:t,...Y(n,r,e)})).filter(({side:e,paired:t,moved:n})=>t>a&&n*2>=e.size);return o.length===2&&o[0].paired===o[1].paired?null:o.toSorted((e,t)=>t.paired-e.paired)[0]?.root??null}function X(e,t){let n=[...e],r=new Set(t),i=We(n,r);return{root:i,paths:Y(n,r,i).paths}}function Ge(e,t,n){if(!e&&!t)return null;let r=[...e??[]],i=Map.groupBy(r,([,e])=>e),a=new Map(i.entries().map(([e,t])=>[e,f(n,e,t.map(([t])=>t.slice(e.length+1)))]));return new Map([...r.map(([e,t])=>[n.paths.get(e)??e,a.get(t)]),...t??[]])}function Ke(e,t,n=new Map,i=new Map,a=null,o=()=>!1){let s=e=>{let t=n.get(e)??i.get(e);return t===void 0?[...new Set([e,$e(a,e)??e])]:[t]},c=[],l=[],u=[],d=new Set;for(let n of e.values()){let e=s(n.parent).map(e=>t.get(r(e,n.specifier,n.conditions,n.platform))).find(Boolean),a=i.get(n.target)??n.target;if(e){if(d.add(e.key),!s(n.target).includes(e.target)){let{target:t,...n}=e;c.push({...n,baseTarget:a,otherTarget:t})}continue}let u=s(n.parent).find(o);if(u===void 0)continue;let{specifier:f,conditions:p,platform:m}=n;l.push({key:r(u,f,p,m),parent:u,specifier:f,conditions:p,platform:m,baseTarget:a,otherTarget:null})}for(let e of t.values()){if(d.has(e.key)||!o(e.parent))continue;let{target:t,...n}=e;u.push({...n,baseTarget:null,otherTarget:t})}for(let e of[c,l,u])e.sort((e,t)=>e.key.localeCompare(t.key));return{changed:c,onlyBase:l,onlyOther:u,totalChanges:c.length+l.length+u.length}}function Z(e){return g(e)??0}function qe(e,t){return e===t||e?.format===`base64`&&t?.format===`base64`&&e.data===t.data||e?.format===`digest`&&t?.format===`digest`&&e.digest===t.digest}function Je(e){if(e?.npmExecutable instanceof Set)return t=>({executable:e.npmExecutable.has(t)});if(e?.kind!==`stasis`||!e.bundle)return null;let{formats:t,executable:n,entries:r}=e.bundle;return e=>({format:t?.get(e),executable:n?.has(e)??!1,entry:r?.has(e)??!1})}function Ye(e,t){return!e||!t?[]:[`format`,`executable`,`entry`].filter(n=>e[n]!==t[n]).map(n=>({field:n,from:e[n],to:t[n]}))}function Q(e){return(t,n)=>Math.abs(n.delta)-Math.abs(t.delta)||t[e].localeCompare(n[e])}function $(e){return(t,n)=>n.bytes-t.bytes||t[e].localeCompare(n[e])}function Xe(e,t){return typeof e==`string`?`\0text\0${e.toWellFormed()}`:e?.format===`base64`?`\0base64\0${e.data}`:e?.format===`digest`?`\0digest\0${e.digest}`:`\0none\0${t}`}var Ze=250;function Qe(e,t,n,r,i){let a=(e,t,n)=>e.filter(({path:e})=>e!==``&&e.isWellFormed()).map(({path:e},r)=>({name:e,data:Xe(t.get(e),`${n}${r}`)})),o={paths:`keys`,renameGroup:i,renameLimit:Ze,lines:!1},s=Ue(a(e,n,`a`),a(t,r,`b`),o);return new Map(s.filter(({status:e})=>e===`renamed`).map(e=>[e.old.path,e.new.path]))}function $e(e,t){return e?e.base===``?`${e.other}${t}`:t.startsWith(e.base)?t.slice(e.base.length):null:t}function et(){return{baseBytes:0,otherBytes:0,onlyBaseFiles:0,onlyOtherFiles:0,changedFiles:0}}function tt(e,t,n,r=X(e.keys(),t.keys()),i=[]){let{root:a,paths:o}=r,s=new Map([...o].map(([e,t])=>[t,e]));e=new Map([...e].map(([e,t])=>[o.get(e),t]));let c=e=>s.get(e)===e?{}:{basePath:s.get(e)},l=(e,t)=>{let n=Ye(i[0]?.(e),i[1]?.(t));return n.length>0?{meta:n}:{}},u=[],d=[],f=[],p=0,m=0,h=0,g=0,_=0,v=0,y=new Map,b=e=>{let t=n(e),r=y.get(t);return r||(r=et(),y.set(t,r)),r},x=new Set([...e.keys(),...t.keys()]);for(let n of x){let r=e.has(n),i=t.has(n),a=b(n);if(r&&i){let r=e.get(n),i=t.get(n),o=qe(r,i),u=l(s.get(n),n),d=Z(r),h=o?d:Z(i);if(p+=d,m+=h,a.baseBytes+=d,a.otherBytes+=h,o&&!u.meta)v++;else{let e=h-d;f.push({path:n,...c(n),baseBytes:d,otherBytes:h,delta:e,...u,...o?{modified:!1}:{}}),_+=e,a.changedFiles++}}else if(r){let t=Z(e.get(n));p+=t,h+=t,a.baseBytes+=t,a.onlyBaseFiles++,u.push({path:n,...c(n),bytes:t})}else{let e=Z(t.get(n));m+=e,g+=e,a.otherBytes+=e,a.onlyOtherFiles++,d.push({path:n,bytes:e})}}let S=Qe(u,d,e,t,n);if(S.size>0){let n=new Set(S.values());for(let[n,r]of S){let i=e.get(n),a=t.get(r),o=qe(i,a),c=Z(i),u=o?c:Z(a);h-=c,g-=u,f.push({path:r,renamedFrom:n,basePath:s.get(n),baseBytes:c,otherBytes:u,delta:u-c,modified:!o,...l(s.get(n),r)}),_+=u-c;let d=b(n);d.onlyBaseFiles--,d.onlyOtherFiles--,d.changedFiles++}u.splice(0,u.length,...u.filter(e=>!S.has(e.path))),d.splice(0,d.length,...d.filter(e=>!n.has(e.path)))}let C=[],w=[],T=[],E=[];for(let[e,t]of y){let n=t.baseBytes>0||t.onlyBaseFiles>0||t.changedFiles>0,r=t.otherBytes>0||t.onlyOtherFiles>0||t.changedFiles>0,i=t.onlyBaseFiles+t.onlyOtherFiles+t.changedFiles;n&&!r?C.push({pkg:e,bytes:t.baseBytes}):r&&!n?w.push({pkg:e,bytes:t.otherBytes}):i>0||t.baseBytes!==t.otherBytes?T.push({pkg:e,baseBytes:t.baseBytes,otherBytes:t.otherBytes,delta:t.otherBytes-t.baseBytes}):E.push({pkg:e,bytes:t.baseBytes})}return u.sort($(`path`)),d.sort($(`path`)),f.sort(Q(`path`)),C.sort($(`pkg`)),w.sort($(`pkg`)),T.sort(Q(`pkg`)),{totals:{baseFiles:e.size,baseBytes:p,otherFiles:t.size,otherBytes:m,onlyBaseFiles:u.length,onlyBaseBytes:h,onlyOtherFiles:d.length,onlyOtherBytes:g,changedFiles:f.length,renamedFiles:S.size,changedDelta:_,unchangedFiles:v,fileDelta:t.size-e.size,byteDelta:m-p,identical:u.length===0&&d.length===0&&f.length===0},files:{onlyBase:u,onlyOther:d,changed:f,root:a,basePaths:o},packages:{onlyBase:C,onlyOther:w,changed:T,unchanged:E}}}function nt(e,r,a=null){let[o,s]=[e,r],[c,l]=t(o,s,a),u=n(o,c),d=n(s,l),f=X(u.keys(),d.keys()),h=Ge(_(o),_(s),f),g=tt(u,d,e=>b(e,{packageDir:h?.get(e)}),f,[Je(o),Je(s)]),x=y(o),S=y(s),C=(e,t)=>{let n=0;for(let r of t)n+=e.get(r)??0;return n};Object.assign(g.totals,{baseLines:C(x,u.keys()),otherLines:C(S,d.keys())});for(let e of g.files.onlyBase)e.lines=x.get(e.basePath??e.path)??0;for(let e of g.files.onlyOther)e.lines=S.get(e.path)??0;for(let e of g.files.changed)Object.assign(e,{baseLines:x.get(e.basePath??e.path)??0,otherLines:S.get(e.path)??0});let w=new Set([...g.files.onlyOther,...g.files.changed.filter(e=>e.modified!==!1)].map(e=>e.path));g.resolutions=Ke(i(o,c),i(s,l),new Map(g.files.changed.filter(e=>e.renamedFrom!=null).map(e=>[e.basePath,e.path])),g.files.basePaths,g.files.root,e=>d.has(e)&&!w.has(e));let T=e=>b(``,{packageDir:e}),E=v(o,c?u.keys():null,T),D=v(s,l?d.keys():null,T);return g.versionUpdates=m(E,D),g.packageRows=p(g.packages,E,D),g.scope=a??``,g}export{nt as prepareComparison};
@@ -1,4 +1,4 @@
1
- import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,g as i}from"./chunk-2XUEZHIP.js";var a=class extends n{constructor(t){if(super(t),this.it=i,t.type!==e.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===i||e==null)return this._t=void 0,this.it=e;if(e===r)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};a.directiveName=`unsafeHTML`,a.resultType=1;var o=t(a),s=/^/u,c=/^true$/u,l=/^[\w .,#%()-]*$/u,u=Object.fromEntries([`fill`,`fill-opacity`,`fill-rule`,`clip-rule`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`stroke-dasharray`,`opacity`,`transform`].map(e=>[e,l])),d=(...e)=>({...u,...Object.fromEntries(e.map(e=>[e,l]))}),f=new Set;function p(e){for(let t of e)f.add(t)}var m=e=>{let[t,...n]=e.split(` `);return t===`token`&&n.every(e=>f.has(e)||/^language-[\w-]+$/u.test(e))},h={__proto__:null,span:{class:{test:e=>m(e)||/^(?:code-control|code-look-alike|evd-lineno|report-logo brand-[\w-]+)$/u.test(e)},title:s,"data-tooltip":s,"aria-hidden":c},mark:{class:/^diff-word$/u},code:{class:/^evd-line$/u},button:{type:/^button$/u,class:/^bundle-source-link$/u,"data-bundle-source-link":s},a:{class:/^source-node-doc$/u,href:/^https:\/\/nodejs\.org\/api\/[\w/-]+\.html(?:#[\w-]*)?$/u,target:/^_blank$/u,rel:/^noopener noreferrer$/u,"aria-label":s},svg:{...d(`viewBox`,`width`,`height`),class:/^file-icon(?: brand-[\w-]+)?$/u,"aria-hidden":c},g:u,path:{...d(`d`),class:/^(?:bg|fg)$/u},rect:d(`x`,`y`,`width`,`height`,`rx`,`ry`),circle:d(`cx`,`cy`,`r`),ellipse:d(`cx`,`cy`,`rx`,`ry`),line:d(`x1`,`y1`,`x2`,`y2`),polyline:d(`points`),polygon:d(`points`)},g=/<(?:([a-z]+)((?:[\t\n\f\r ]+[a-zA-Z][\w-]*="[^"]*")*)[\t\n\f\r ]*\/?|\/([a-z]+)[\t\n\f\r ]*)>/uy,_=/([a-zA-Z][\w-]*)="([^"]*)"/gu;function v(e){if(typeof e!=`string`)return!1;for(let t=e.indexOf(`<`);t!==-1;t=e.indexOf(`<`,g.lastIndex)){g.lastIndex=t;let[,n,r,i]=g.exec(e)??[],a=h[n??i];if(!a)return!1;for(let[,e,t]of r?.matchAll(_)??[])if(!Object.hasOwn(a,e)||!a[e].test(t))return!1}return!0}function y(e){return console.error(`Not markup this app writes, shown as text instead:`,e.length>300?`${e.slice(0,300)}\u2026`:e),e}var b=new Set;function x(e){return e==null||e===i?e:b.has(e)?o(e):v(e)?(b.size>=256&&b.clear(),b.add(e),o(e)):y(String(e))}var S=`m5.875 10.154 1.376-.772.023-.067-.023-.037h-.067l-.23-.015-.787-.02-.681-.03-.661-.035-.166-.035-.156-.205.016-.103.14-.094.2.018.442.03.665.046.481.028.714.075h.113l.016-.047-.039-.028-.03-.028-.687-.466-.744-.492-.39-.284-.21-.143-.106-.135-.046-.294.19-.21.258.017.065.018.26.2.557.43.726.535.106.089.042-.03.006-.022-.048-.08-.395-.713-.422-.726-.187-.301-.05-.18a1 1 0 0 1-.03-.213l.218-.296.12-.039.29.039.123.106.18.413.293.65.453.884.133.262.07.242.027.075h.046v-.043l.038-.497.069-.611.067-.787.023-.221.11-.266.218-.143.17.081.14.2-.02.13-.083.54-.163.846-.106.567h.062l.07-.07.287-.382.482-.602.213-.239.248-.264.159-.125h.301l.221.329-.099.34-.31.393-.256.333-.369.496-.23.397.021.032.055-.006.832-.177.45-.081.537-.092.243.113.026.115-.096.236-.573.141-.673.135-1.003.237-.012.01.014.017.452.042.193.01h.473l.88.066.23.153.138.186-.023.141-.354.181-.478-.113-1.116-.266-.383-.096h-.053v.032l.32.312.584.528.731.68.037.168-.094.133-.099-.014-.643-.484-.248-.218-.561-.472H9.08v.05l.129.189.684 1.027.035.315-.05.103-.177.062-.194-.036-.4-.561-.413-.632-.333-.567-.041.023-.197 2.116-.092.108-.212.082-.177-.135-.094-.218.094-.43.113-.561.092-.447.083-.554.05-.184-.004-.013-.04.006-.418.574-.636.858-.503.539-.12.048-.21-.108.02-.193.117-.172.696-.886.42-.549.27-.317-.001-.046h-.016l-1.85 1.201-.328.042-.142-.132.018-.218.067-.071.556-.383Z`,C=`M11.04 8.364a1.72 1.72 0 0 0-.152-1.432 1.8 1.8 0 0 0-1.925-.846 1.8 1.8 0 0 0-.778-.498 1.8 1.8 0 0 0-.927-.05 1.8 1.8 0 0 0-.827.414 1.77 1.77 0 0 0-.507.767 1.8 1.8 0 0 0-.683.297 1.75 1.75 0 0 0-.499.549 1.75 1.75 0 0 0 .22 2.07 1.72 1.72 0 0 0 .151 1.432 1.8 1.8 0 0 0 1.926.846 1.77 1.77 0 0 0 1.333.587c.78 0 1.47-.496 1.707-1.227a1.8 1.8 0 0 0 .684-.298 1.75 1.75 0 0 0 .499-.548 1.75 1.75 0 0 0-.222-2.063m-2.667 3.678a1.33 1.33 0 0 1-.851-.304l.042-.024 1.413-.804a.23.23 0 0 0 .116-.199V8.747l.597.34q.01.005.011.015v1.629a1.323 1.323 0 0 1-1.328 1.31m-2.857-1.203a1.3 1.3 0 0 1-.158-.879l.042.025 1.414.805a.23.23 0 0 0 .23 0l1.729-.982v.68a.02.02 0 0 1-.01.018l-1.431.814a1.34 1.34 0 0 1-1.816-.48m-.372-3.037a1.32 1.32 0 0 1 .7-.574v1.656a.22.22 0 0 0 .114.197l1.72.979-.598.34a.02.02 0 0 1-.021 0L5.63 9.587a1.304 1.304 0 0 1-.487-1.791zm4.907 1.125L8.327 7.94l.596-.34a.02.02 0 0 1 .02 0l1.43.814a1.3 1.3 0 0 1 .512.528 1.3 1.3 0 0 1-.118 1.4 1.33 1.33 0 0 1-.595.436V9.122a.23.23 0 0 0-.12-.195m.594-.881-.042-.025-1.411-.812a.23.23 0 0 0-.232 0l-1.727.983v-.68a.02.02 0 0 1 .008-.018l1.429-.813a1.34 1.34 0 0 1 1.425.061 1.3 1.3 0 0 1 .55 1.298zM6.908 9.252l-.597-.34a.02.02 0 0 1-.012-.016V7.271c0-.249.073-.493.209-.703s.329-.378.557-.483a1.35 1.35 0 0 1 1.415.18l-.042.023-1.413.804a.23.23 0 0 0-.116.2zm.324-.69.77-.438.77.438v.875l-.768.437-.77-.437z`,w=`M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z`,T=`M11.998 24c-.321 0-.641-.084-.922-.247l-2.936-1.737c-.438-.245-.224-.332-.08-.383c.585-.203.703-.25 1.328-.604c.065-.037.151-.023.218.017l2.256 1.339c.082.045.197.045.272 0l8.795-5.076c.082-.047.134-.141.134-.238V6.921c0-.099-.053-.192-.137-.242l-8.791-5.072c-.081-.047-.189-.047-.271 0L3.075 6.68C2.99 6.729 2.936 6.825 2.936 6.921v10.15c0 .097.054.189.139.235l2.409 1.392c1.307.654 2.108-.116 2.108-.89V7.787c0-.142.114-.253.256-.253h1.115c.139 0 .255.112.255.253v10.021c0 1.745-.95 2.745-2.604 2.745c-.508 0-.909 0-2.026-.551L2.28 18.675c-.57-.329-.922-.945-.922-1.604V6.921c0-.659.353-1.275.922-1.603l8.795-5.082c.557-.315 1.296-.315 1.848 0l8.794 5.082c.57.329.924.944.924 1.603v10.15c0 .659-.354 1.273-.924 1.604l-8.794 5.078C12.643 23.916 12.324 24 11.998 24zM19.099 13.993c0-1.9-1.284-2.406-3.987-2.763c-2.731-.361-3.009-.548-3.009-1.187c0-.528.235-1.233 2.258-1.233c1.807 0 2.473.389 2.747 1.607c.024.115.129.199.247.199h1.141c.071 0 .138-.031.186-.081c.048-.054.074-.123.067-.196c-.177-2.098-1.571-3.076-4.388-3.076c-2.508 0-4.004 1.058-4.004 2.833c0 1.925 1.488 2.457 3.895 2.695c2.88.282 3.103.703 3.103 1.269c0 .983-.789 1.402-2.642 1.402c-2.327 0-2.839-.584-3.011-1.742c-.02-.124-.126-.215-.253-.215h-1.137c-.141 0-.254.112-.254.253c0 1.482.806 3.248 4.655 3.248C17.501 17.007 19.099 15.91 19.099 13.993z`,E=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2 2 5v6l6 3 6-3V5L8 2Z"/><path d="M2 5l6 3 6-3"/><path d="M8 8v6"/></svg>`,D=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,O=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="4" width="11" height="9" rx="1.2"/><path d="M6 4V3h4v1"/></svg>`,k=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="m4.5 4.5 7 2-5 5z"/><circle cx="4.5" cy="4.5" r="2" fill="currentColor"/><circle cx="11.5" cy="6.5" r="2" fill="currentColor"/><circle cx="6.5" cy="11.5" r="2" fill="currentColor"/></svg>`,A=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><rect x="1" y="1.5" width="14" height="3" rx=".5"/><rect x="1" y="6.5" width="8" height="3" rx=".5"/><rect x="11" y="6.5" width="4" height="3" rx=".5"/><rect x="1" y="11.5" width="4" height="3" rx=".5"/><rect x="7" y="11.5" width="8" height="3" rx=".5"/></svg>`,j=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M1 1h4v4H1zm5 5h4v4H6zm5 5h4v4h-4z"/><path d="M6 1h4v4H6zm5 0h4v4h-4zM1 6h4v4H1zm10 0h4v4h-4zM1 11h4v4H1zm5 0h4v4H6z" opacity=".35"/></svg>`,M=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" aria-hidden="true"><rect x="1" y="1" width="14" height="2.5" rx=".5" fill="currentColor" stroke="none"/><rect x="1" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="6.25" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="11.5" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><path d="M4 3.5c0 4.5-1.25 4-1.25 8.5M8 3.5v8.5M12 3.5c0 4.5 1.25 4 1.25 8.5"/></svg>`,N=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="2.5" r="1.5" fill="currentColor"/><circle cx="3" cy="13" r="1.5" fill="currentColor"/><circle cx="8" cy="13" r="1.5" fill="currentColor"/><circle cx="13" cy="13" r="1.5" fill="currentColor"/><path d="M8 4v3M8 7H3m5 0h5M3 7v4M8 7v4M13 7v4"/></svg>`,P=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,F=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.67 8.67a3.33 3.33 0 0 0 5.03.36l2-2a3.33 3.33 0 0 0-4.71-4.71l-1.15 1.14"/><path d="M9.33 7.33a3.33 3.33 0 0 0-5.03-.36l-2 2a3.33 3.33 0 0 0 4.71 4.71l1.14-1.14"/></svg>`,I=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 1.5H2.5a1 1 0 0 0-1 1V5m9.5-3.5h2.5a1 1 0 0 1 1 1V5M1.5 11v2.5a1 1 0 0 0 1 1H5m6 0h2.5a1 1 0 0 0 1-1V11"/><circle cx="7.25" cy="7.25" r="2.75"/><path d="m9.25 9.25 2.25 2.25"/></svg>`,L=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 1.5H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5.5L9 1.5ZM9 1.5v4h4M5.5 8h5m-5 3h3.5"/></svg>`,R=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5"/></svg>`,z=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4.5 4.5-3 3.5 3 3.5m7-7 3 3.5-3 3.5M9.5 2l-3 12"/></svg>`,B=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6.5 3.5 1.6 3.9L12 9l-3.9 1.6-1.6 3.9-1.6-3.9L1 9l3.9-1.6 1.6-3.9ZM12 1.5v4m-2-2h4"/></svg>`,V=`<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>`,H=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5v2"/><rect x="2" y="3.5" width="12" height="10" rx="2.5"/><path d="M6 7.5v2m4-2v2"/></svg>`,U=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" aria-hidden="true"><path d="M1 8h3.5m7 0H15"/><circle cx="8" cy="8" r="3.5"/></svg>`,W=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="4" cy="3.5" r="1.5"/><circle cx="4" cy="12.5" r="1.5"/><circle cx="12" cy="12.5" r="1.5"/><path d="M4 5v6M12 11V6a2 2 0 0 0-2-2H7m1.5-1.5L7 4l1.5 1.5"/></svg>`,G=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`,K=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 2 4 4-8 8H2v-4l8-8Zm-1 1 4 4"/></svg>`,q=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h12M6 4V2h4v2M4 4l.6 10h6.8L12 4M6.5 7v4m3-4v4"/></svg>`;export{p as a,v as b,y as c,x as d,S as e,C as f,w as g,T as h,E as i,D as j,O as k,k as l,A as m,j as n,M as o,N as p,P as q,F as r,I as s,L as t,R as u,z as v,B as w,V as x,H as y,U as z,W as A,G as B,K as C,q as D};
1
+ import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,g as i}from"./chunk-2XUEZHIP.js";var a=class extends n{constructor(t){if(super(t),this.it=i,t.type!==e.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===i||e==null)return this._t=void 0,this.it=e;if(e===r)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};a.directiveName=`unsafeHTML`,a.resultType=1;var o=t(a),s=/^/u,c=/^true$/u,l=/^[\w .,#%()-]*$/u,u=Object.fromEntries([`fill`,`fill-opacity`,`fill-rule`,`clip-rule`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`stroke-dasharray`,`opacity`,`transform`].map(e=>[e,l])),d=(...e)=>({...u,...Object.fromEntries(e.map(e=>[e,l]))}),f=new Set;function p(e){for(let t of e)f.add(t)}var m=e=>{let[t,...n]=e.split(` `);return t===`token`&&n.every(e=>f.has(e)||/^language-[\w-]+$/u.test(e))},h={__proto__:null,span:{class:{test:e=>m(e)||/^(?:code-control|code-look-alike|evd-lineno|report-logo brand-[\w-]+)$/u.test(e)},title:s,"data-tooltip":s,"aria-hidden":c},mark:{class:/^diff-word$/u},code:{class:/^evd-line$/u},button:{type:/^button$/u,class:/^bundle-source-link$/u,"data-bundle-source-link":s},a:{class:/^source-node-doc$/u,href:/^https:\/\/nodejs\.org\/api\/[\w/-]+\.html(?:#[\w-]*)?$/u,target:/^_blank$/u,rel:/^noopener noreferrer$/u,"aria-label":s},svg:{...d(`viewBox`,`width`,`height`),class:/^file-icon(?: brand-[\w-]+)?$/u,"aria-hidden":c},g:u,path:{...d(`d`),class:/^(?:bg|fg)$/u},rect:d(`x`,`y`,`width`,`height`,`rx`,`ry`),circle:d(`cx`,`cy`,`r`),ellipse:d(`cx`,`cy`,`rx`,`ry`),line:d(`x1`,`y1`,`x2`,`y2`),polyline:d(`points`),polygon:d(`points`)},g=/<(?:([a-z]+)((?:[\t\n\f\r ]+[a-zA-Z][\w-]*="[^"]*")*)[\t\n\f\r ]*\/?|\/([a-z]+)[\t\n\f\r ]*)>/uy,_=/([a-zA-Z][\w-]*)="([^"]*)"/gu;function v(e){if(typeof e!=`string`)return!1;for(let t=e.indexOf(`<`);t!==-1;t=e.indexOf(`<`,g.lastIndex)){g.lastIndex=t;let[,n,r,i]=g.exec(e)??[],a=h[n??i];if(!a)return!1;for(let[,e,t]of r?.matchAll(_)??[])if(!Object.hasOwn(a,e)||!a[e].test(t))return!1}return!0}function y(e){return console.error(`Not markup this app writes, shown as text instead:`,e.length>300?`${e.slice(0,300)}\u2026`:e),e}var b=new Set;function x(e){return e==null||e===i?e:b.has(e)?o(e):v(e)?(b.size>=256&&b.clear(),b.add(e),o(e)):y(String(e))}var S=`m5.875 10.154 1.376-.772.023-.067-.023-.037h-.067l-.23-.015-.787-.02-.681-.03-.661-.035-.166-.035-.156-.205.016-.103.14-.094.2.018.442.03.665.046.481.028.714.075h.113l.016-.047-.039-.028-.03-.028-.687-.466-.744-.492-.39-.284-.21-.143-.106-.135-.046-.294.19-.21.258.017.065.018.26.2.557.43.726.535.106.089.042-.03.006-.022-.048-.08-.395-.713-.422-.726-.187-.301-.05-.18a1 1 0 0 1-.03-.213l.218-.296.12-.039.29.039.123.106.18.413.293.65.453.884.133.262.07.242.027.075h.046v-.043l.038-.497.069-.611.067-.787.023-.221.11-.266.218-.143.17.081.14.2-.02.13-.083.54-.163.846-.106.567h.062l.07-.07.287-.382.482-.602.213-.239.248-.264.159-.125h.301l.221.329-.099.34-.31.393-.256.333-.369.496-.23.397.021.032.055-.006.832-.177.45-.081.537-.092.243.113.026.115-.096.236-.573.141-.673.135-1.003.237-.012.01.014.017.452.042.193.01h.473l.88.066.23.153.138.186-.023.141-.354.181-.478-.113-1.116-.266-.383-.096h-.053v.032l.32.312.584.528.731.68.037.168-.094.133-.099-.014-.643-.484-.248-.218-.561-.472H9.08v.05l.129.189.684 1.027.035.315-.05.103-.177.062-.194-.036-.4-.561-.413-.632-.333-.567-.041.023-.197 2.116-.092.108-.212.082-.177-.135-.094-.218.094-.43.113-.561.092-.447.083-.554.05-.184-.004-.013-.04.006-.418.574-.636.858-.503.539-.12.048-.21-.108.02-.193.117-.172.696-.886.42-.549.27-.317-.001-.046h-.016l-1.85 1.201-.328.042-.142-.132.018-.218.067-.071.556-.383Z`,C=`M11.04 8.364a1.72 1.72 0 0 0-.152-1.432 1.8 1.8 0 0 0-1.925-.846 1.8 1.8 0 0 0-.778-.498 1.8 1.8 0 0 0-.927-.05 1.8 1.8 0 0 0-.827.414 1.77 1.77 0 0 0-.507.767 1.8 1.8 0 0 0-.683.297 1.75 1.75 0 0 0-.499.549 1.75 1.75 0 0 0 .22 2.07 1.72 1.72 0 0 0 .151 1.432 1.8 1.8 0 0 0 1.926.846 1.77 1.77 0 0 0 1.333.587c.78 0 1.47-.496 1.707-1.227a1.8 1.8 0 0 0 .684-.298 1.75 1.75 0 0 0 .499-.548 1.75 1.75 0 0 0-.222-2.063m-2.667 3.678a1.33 1.33 0 0 1-.851-.304l.042-.024 1.413-.804a.23.23 0 0 0 .116-.199V8.747l.597.34q.01.005.011.015v1.629a1.323 1.323 0 0 1-1.328 1.31m-2.857-1.203a1.3 1.3 0 0 1-.158-.879l.042.025 1.414.805a.23.23 0 0 0 .23 0l1.729-.982v.68a.02.02 0 0 1-.01.018l-1.431.814a1.34 1.34 0 0 1-1.816-.48m-.372-3.037a1.32 1.32 0 0 1 .7-.574v1.656a.22.22 0 0 0 .114.197l1.72.979-.598.34a.02.02 0 0 1-.021 0L5.63 9.587a1.304 1.304 0 0 1-.487-1.791zm4.907 1.125L8.327 7.94l.596-.34a.02.02 0 0 1 .02 0l1.43.814a1.3 1.3 0 0 1 .512.528 1.3 1.3 0 0 1-.118 1.4 1.33 1.33 0 0 1-.595.436V9.122a.23.23 0 0 0-.12-.195m.594-.881-.042-.025-1.411-.812a.23.23 0 0 0-.232 0l-1.727.983v-.68a.02.02 0 0 1 .008-.018l1.429-.813a1.34 1.34 0 0 1 1.425.061 1.3 1.3 0 0 1 .55 1.298zM6.908 9.252l-.597-.34a.02.02 0 0 1-.012-.016V7.271c0-.249.073-.493.209-.703s.329-.378.557-.483a1.35 1.35 0 0 1 1.415.18l-.042.023-1.413.804a.23.23 0 0 0-.116.2zm.324-.69.77-.438.77.438v.875l-.768.437-.77-.437z`,w=`M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z`,T=`M11.998 24c-.321 0-.641-.084-.922-.247l-2.936-1.737c-.438-.245-.224-.332-.08-.383c.585-.203.703-.25 1.328-.604c.065-.037.151-.023.218.017l2.256 1.339c.082.045.197.045.272 0l8.795-5.076c.082-.047.134-.141.134-.238V6.921c0-.099-.053-.192-.137-.242l-8.791-5.072c-.081-.047-.189-.047-.271 0L3.075 6.68C2.99 6.729 2.936 6.825 2.936 6.921v10.15c0 .097.054.189.139.235l2.409 1.392c1.307.654 2.108-.116 2.108-.89V7.787c0-.142.114-.253.256-.253h1.115c.139 0 .255.112.255.253v10.021c0 1.745-.95 2.745-2.604 2.745c-.508 0-.909 0-2.026-.551L2.28 18.675c-.57-.329-.922-.945-.922-1.604V6.921c0-.659.353-1.275.922-1.603l8.795-5.082c.557-.315 1.296-.315 1.848 0l8.794 5.082c.57.329.924.944.924 1.603v10.15c0 .659-.354 1.273-.924 1.604l-8.794 5.078C12.643 23.916 12.324 24 11.998 24zM19.099 13.993c0-1.9-1.284-2.406-3.987-2.763c-2.731-.361-3.009-.548-3.009-1.187c0-.528.235-1.233 2.258-1.233c1.807 0 2.473.389 2.747 1.607c.024.115.129.199.247.199h1.141c.071 0 .138-.031.186-.081c.048-.054.074-.123.067-.196c-.177-2.098-1.571-3.076-4.388-3.076c-2.508 0-4.004 1.058-4.004 2.833c0 1.925 1.488 2.457 3.895 2.695c2.88.282 3.103.703 3.103 1.269c0 .983-.789 1.402-2.642 1.402c-2.327 0-2.839-.584-3.011-1.742c-.02-.124-.126-.215-.253-.215h-1.137c-.141 0-.254.112-.254.253c0 1.482.806 3.248 4.655 3.248C17.501 17.007 19.099 15.91 19.099 13.993z`,E=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2 2 5v6l6 3 6-3V5L8 2Z"/><path d="M2 5l6 3 6-3"/><path d="M8 8v6"/></svg>`,D=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,O=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="4" width="11" height="9" rx="1.2"/><path d="M6 4V3h4v1"/></svg>`,k=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="m4.5 4.5 7 2-5 5z"/><circle cx="4.5" cy="4.5" r="2" fill="currentColor"/><circle cx="11.5" cy="6.5" r="2" fill="currentColor"/><circle cx="6.5" cy="11.5" r="2" fill="currentColor"/></svg>`,A=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><rect x="1" y="1.5" width="14" height="3" rx=".5"/><rect x="1" y="6.5" width="8" height="3" rx=".5"/><rect x="11" y="6.5" width="4" height="3" rx=".5"/><rect x="1" y="11.5" width="4" height="3" rx=".5"/><rect x="7" y="11.5" width="8" height="3" rx=".5"/></svg>`,j=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M1 1h4v4H1zm5 5h4v4H6zm5 5h4v4h-4z"/><path d="M6 1h4v4H6zm5 0h4v4h-4zM1 6h4v4H1zm10 0h4v4h-4zM1 11h4v4H1zm5 0h4v4H6z" opacity=".35"/></svg>`,M=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" aria-hidden="true"><rect x="1" y="1" width="14" height="2.5" rx=".5" fill="currentColor" stroke="none"/><rect x="1" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="6.25" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="11.5" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><path d="M4 3.5c0 4.5-1.25 4-1.25 8.5M8 3.5v8.5M12 3.5c0 4.5 1.25 4 1.25 8.5"/></svg>`,N=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="2.5" r="1.5" fill="currentColor"/><circle cx="3" cy="13" r="1.5" fill="currentColor"/><circle cx="8" cy="13" r="1.5" fill="currentColor"/><circle cx="13" cy="13" r="1.5" fill="currentColor"/><path d="M8 4v3M8 7H3m5 0h5M3 7v4M8 7v4M13 7v4"/></svg>`,P=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5 2.75 3.5v3.75c0 3.2 2.2 5.7 5.25 7.25 3.05-1.55 5.25-4.05 5.25-7.25V3.5Z"/><path d="M8 5v3.5"/><circle cx="8" cy="10.9" r=".2" fill="currentColor"/></svg>`,F=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,I=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.67 8.67a3.33 3.33 0 0 0 5.03.36l2-2a3.33 3.33 0 0 0-4.71-4.71l-1.15 1.14"/><path d="M9.33 7.33a3.33 3.33 0 0 0-5.03-.36l-2 2a3.33 3.33 0 0 0 4.71 4.71l1.14-1.14"/></svg>`,L=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 1.5H2.5a1 1 0 0 0-1 1V5m9.5-3.5h2.5a1 1 0 0 1 1 1V5M1.5 11v2.5a1 1 0 0 0 1 1H5m6 0h2.5a1 1 0 0 0 1-1V11"/><circle cx="7.25" cy="7.25" r="2.75"/><path d="m9.25 9.25 2.25 2.25"/></svg>`,R=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 1.5H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5.5L9 1.5ZM9 1.5v4h4M5.5 8h5m-5 3h3.5"/></svg>`,z=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5"/></svg>`,B=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4.5 4.5-3 3.5 3 3.5m7-7 3 3.5-3 3.5M9.5 2l-3 12"/></svg>`,V=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6.5 3.5 1.6 3.9L12 9l-3.9 1.6-1.6 3.9-1.6-3.9L1 9l3.9-1.6 1.6-3.9ZM12 1.5v4m-2-2h4"/></svg>`,H=`<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>`,U=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5v2"/><rect x="2" y="3.5" width="12" height="10" rx="2.5"/><path d="M6 7.5v2m4-2v2"/></svg>`,W=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" aria-hidden="true"><path d="M1 8h3.5m7 0H15"/><circle cx="8" cy="8" r="3.5"/></svg>`,G=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="4" cy="3.5" r="1.5"/><circle cx="4" cy="12.5" r="1.5"/><circle cx="12" cy="12.5" r="1.5"/><path d="M4 5v6M12 11V6a2 2 0 0 0-2-2H7m1.5-1.5L7 4l1.5 1.5"/></svg>`,K=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`,q=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 2 4 4-8 8H2v-4l8-8Zm-1 1 4 4"/></svg>`,J=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h12M6 4V2h4v2M4 4l.6 10h6.8L12 4M6.5 7v4m3-4v4"/></svg>`;export{p as a,v as b,y as c,x as d,S as e,C as f,w as g,T as h,E as i,D as j,O as k,k as l,A as m,j as n,M as o,N as p,P as q,F as r,I as s,L as t,R as u,z as v,B as w,V as x,H as y,U as z,W as A,G as B,K as C,q as D,J as E};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/unsafe-html.js:
@@ -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-5EAVJAD2.js";import{c}from"./chunk-LBD3M3J6.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=0x6400000,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-CE2FMDK3.js";import{c}from"./chunk-ZQQALNFP.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=0x6400000,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};