@preventive/triage 1.0.0-alpha.52 → 1.0.0-alpha.54

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 (112) hide show
  1. package/common/bundle-compare-diff.js +28 -9
  2. package/common/bundle-compare-inputs.d.ts +1 -0
  3. package/common/bundle-compare-inputs.js +91 -15
  4. package/common/bundle-comparison.js +14 -7
  5. package/common/default-scan-models.ts +3 -0
  6. package/common/dependency-reviews.d.ts +1 -1
  7. package/common/dependency-reviews.js +1 -1
  8. package/common/managed/finding-detail.d.ts +4 -2
  9. package/common/managed/finding-detail.js +27 -15
  10. package/common/managed/team-app.d.ts +9 -0
  11. package/common/managed/team-app.js +59 -6
  12. package/common/workspace-app.js +38 -6
  13. package/out/activity.js +4 -4
  14. package/out/chunk-4EMM6UCD.js +1 -0
  15. package/out/chunk-4ISO5F7Y.js +7 -0
  16. package/out/chunk-4XIH7YTX.js +1 -0
  17. package/out/chunk-6W5BMATD.js +1 -0
  18. package/out/{chunk-WFYLMF6Z.js → chunk-74AEKRES.js} +1 -1
  19. package/out/chunk-DEVAORP2.js +1 -0
  20. package/out/{chunk-KOGNQDSJ.js → chunk-DTM47KGS.js} +1 -1
  21. package/out/chunk-E3LFSUDJ.js +9 -0
  22. package/out/chunk-FHIVVVUA.js +6 -0
  23. package/out/chunk-G3LY2FV4.js +1 -0
  24. package/out/chunk-HAZKDK4M.js +4 -0
  25. package/out/chunk-HOB3YPS5.js +1 -0
  26. package/out/chunk-I47TYPXO.js +52 -0
  27. package/out/chunk-J7A5OSZE.js +244 -0
  28. package/out/chunk-JFL7WLRV.js +1 -0
  29. package/out/chunk-JMG5DXII.js +2 -0
  30. package/out/chunk-JOXLZXMI.js +1 -0
  31. package/out/chunk-L4CTEMRG.js +2 -0
  32. package/out/chunk-M37X4LCF.js +14 -0
  33. package/out/chunk-M3Y6SLC4.js +1 -0
  34. package/out/chunk-NXATZJQ2.js +1 -0
  35. package/out/{chunk-MYGJBYYJ.js → chunk-ORIP5INC.js} +1 -1
  36. package/out/chunk-PAD2JHZT.js +1 -0
  37. package/out/chunk-QMVOEBWC.js +13 -0
  38. package/out/{chunk-SXV2T5C4.js → chunk-QRKFPLA4.js} +1 -1
  39. package/out/chunk-RRBIJL2B.js +1 -0
  40. package/out/{chunk-GDPCLSOS.js → chunk-SYXT3SFP.js} +1 -1
  41. package/out/chunk-TOXMUOIW.js +5 -0
  42. package/out/chunk-UBOCLLF2.js +1 -0
  43. package/out/chunk-UCP3JRE2.js +1 -0
  44. package/out/{chunk-NCN3M5EP.js → chunk-VC72ZO3P.js} +2 -2
  45. package/out/chunk-VRX2APNA.js +9 -0
  46. package/out/{chunk-IMM274IW.js → chunk-VZMELPVL.js} +4 -3
  47. package/out/{chunk-CHRBUGVN.js → chunk-WHVXTJHK.js} +1 -1
  48. package/out/chunk-WMFDQS2L.js +11 -0
  49. package/out/chunk-WNSVBOSO.js +41 -0
  50. package/out/chunk-WREU7JAG.js +1 -0
  51. package/out/chunk-Y5ZHFNBD.js +2 -0
  52. package/out/chunk-YF4M5OCI.js +1 -0
  53. package/out/chunk-Z667U2UJ.js +1 -0
  54. package/out/chunk-ZQHLECTI.js +1 -0
  55. package/out/client-managed-import.js +1 -1
  56. package/out/client-managed.js +27 -26
  57. package/out/compare.js +14 -14
  58. package/out/dialogs.js +36 -51
  59. package/out/graph.js +17 -15
  60. package/out/index.html +26 -10
  61. package/out/prism.js +1 -1
  62. package/out/scan.js +2 -2
  63. package/out/terminal.js +232 -232
  64. package/out/view.css +1 -1
  65. package/out/view.js +15 -15
  66. package/package.json +12 -7
  67. package/risk/actions/resolve.js +36 -5
  68. package/risk/index.d.ts +20 -2
  69. package/risk/npm/malware.js +6 -4
  70. package/risk/npm/registry.js +8 -6
  71. package/server-managed/bundle-advisories.ts +56 -74
  72. package/server-managed/bundle-build-worker.js +61 -4
  73. package/server-managed/bundle-build.ts +13 -4
  74. package/server-managed/bundle-dependency-reviews.ts +74 -0
  75. package/server-managed/bundle-validation.ts +32 -0
  76. package/server-managed/db-methods.ts +51 -16
  77. package/server-managed/db-neon.ts +18 -2
  78. package/server-managed/db.ts +11 -2
  79. package/server-managed/github-issue-links.ts +151 -47
  80. package/server-managed/github-pulls.ts +34 -15
  81. package/server-managed/history-windows.ts +172 -0
  82. package/server-managed/http.ts +227 -12
  83. package/server-managed/index.ts +13 -1
  84. package/server-managed/managed-issues.ts +29 -15
  85. package/server-managed/npm-insights.ts +4 -3
  86. package/server-managed/npm-kept.ts +4 -0
  87. package/server-managed/package-entry-points.ts +37 -9
  88. package/server-managed/pretty-print.ts +7 -5
  89. package/server-managed/public-workspace.ts +2 -2
  90. package/server-managed/repository-actions.ts +7 -4
  91. package/server-managed/repository-browser.ts +11 -4
  92. package/server-managed/repository-history.ts +2 -2
  93. package/server-managed/repository-pulse.ts +11 -2
  94. package/server-managed/repository-risk-audit.ts +4 -5
  95. package/server-managed/repository-risk.ts +4 -4
  96. package/server-managed/sql.ts +2 -1
  97. package/server-managed/stasis-config.ts +46 -0
  98. package/server-managed/team-app-summaries.ts +54 -0
  99. package/server-managed/team-app.ts +52 -31
  100. package/server-managed/team-reports.ts +34 -13
  101. package/server-managed/upstream-cache.ts +41 -32
  102. package/server-managed/workspace-shares.ts +3 -1
  103. package/out/chunk-2ZDZWLFY.js +0 -1
  104. package/out/chunk-7VAWINQF.js +0 -6
  105. package/out/chunk-FMXWXDR4.js +0 -36
  106. package/out/chunk-IZ7POWI3.js +0 -18
  107. package/out/chunk-LJ7XRXFU.js +0 -52
  108. package/out/chunk-OGAYMEER.js +0 -232
  109. package/out/chunk-QB4CBOX2.js +0 -1
  110. package/out/chunk-TQJDYHVE.js +0 -2
  111. package/out/chunk-VH4XMZIW.js +0 -2
  112. package/out/chunk-WYLQWYLA.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{a as e}from"./chunk-4EMM6UCD.js";import{C as t,H as n,J as r,K as i,L as a,R as o,a as s,c,d as l,e as u,g as d,h as f,i as p,m,p as h,u as ee}from"./chunk-UCP3JRE2.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{d as g,f as te,h as _,i as v,j as ne,m as re,n as ie}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var y=e=>e.replace(/^[ \t\n\r\0\v]+|[ \t\n\r\0\v]+$/gu,``),b=e=>e.replace(/[A-Z]+/gu,e=>e.toLowerCase()),x=e=>e===void 0||e===``||e===`0`,S=e=>e!==void 0&&e>=`0`&&e<=`9`,ae=e=>S(e)||/^[A-Za-z]$/u.test(e??``);function oe(e){let t=e[0];for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1],a=t.at(-1)===`.`?``:`.`;r===`-`||r===`_`||r===`+`?t+=a:!S(i)&&i!==`.`&&S(r)||S(i)&&!S(r)&&r!==`.`?t+=`${a}${r}`:ae(r)?t+=r:t+=a}return t.endsWith(`.`)?t.slice(0,-1):t}var se=[[`dev`,0],[`alpha`,1],[`a`,1],[`beta`,2],[`b`,2],[`RC`,3],[`rc`,3],[`#`,4],[`pl`,5],[`p`,5]],C=e=>se.find(([t])=>e.startsWith(t))?.[1]??-1,w=e=>e>0?1:e<0?-1:0,T=2n**63n-1n,ce=e=>e<=T&&e>=-T-1n,le=e=>{let t=BigInt(/^\d+/u.exec(e)[0]);return t>T?T:t};function ue(e,t){return S(e[0])&&S(t[0])?w(Number(le(e)-le(t))):!S(e[0])&&!S(t[0])?w(C(e)-C(t)):S(e[0])?w(C(`#N#`)-C(t)):w(C(e)-C(`#N#`))}var de=new TextEncoder,fe=e=>/^[\0-\u007F]*$/u.test(e)?e:String.fromCodePoint(...de.encode(e));function pe(e,t){if(e===``||t===``)return e===t?0:e===``?-1:1;let n=e[0]===`#`?e:oe(e),r=t[0]===`#`?t:oe(t),[i,a,o,s,c]=[0,0,0,0,0];for(;i<n.length&&a<r.length&&o!==-1&&s!==-1&&(o=n.indexOf(`.`,i),s=r.indexOf(`.`,a),c=ue(n.slice(i,o===-1?void 0:o),r.slice(a,s===-1?void 0:s)),c===0);)o!==-1&&(i=o+1),s!==-1&&(a=s+1);return c===0?o===-1?s===-1?0:S(r[a])?-1:pe(`#N#`,r.slice(a)):S(n[i])?1:pe(n.slice(i),`#N#`):c}var me=(e,t)=>pe(fe(e),fe(t)),he={"==":e=>e===0,"!=":e=>e!==0,"<":e=>e<0,"<=":e=>e<=0,">":e=>e>0,">=":e=>e>=0},ge=(e,t,n)=>he[n](me(e,t)),E=(t,n)=>w(e(t,n)),_e=/^[ \t\n\r\v\f]*[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[ \t\n\r\v\f]*$/u;function ve(e){if(!_e.test(e))return;let t=e.trim();if(!/[.eE]/u.test(t)){let e=BigInt(t);return ce(e)?{long:e}:{double:Number(t),overflow:e>0n?1:-1}}return{double:Number(t),overflow:0}}function ye(e,t){let n=ve(e),r=ve(t);return n===void 0||r===void 0||n.overflow!==void 0&&n.overflow!==0&&n.overflow===r.overflow&&n.double-r.double===0?E(e,t):n.double!==void 0||r.double!==void 0?n.double===void 0?r.overflow===0?w(Number(n.long)-r.double):-r.overflow:r.double===void 0?n.overflow===0?w(n.double-Number(r.long)):n.overflow:n.double===r.double&&!Number.isFinite(n.double)?E(e,t):w(n.double-r.double):w(Number(n.long-r.long))}var be=/^(?:0|-?[1-9]\d*)$/u;function xe(e){if(!be.test(e))return e;let t=BigInt(e);return ce(t)?t:e}function Se(e,t){let n=xe(e),r=xe(t);if(typeof n==`bigint`&&typeof r==`bigint`)return n>r?1:-1;if(typeof n==`string`&&typeof r==`string`)return ye(n,r);let[i,a,o]=typeof n==`bigint`?[n,r,1]:[r,n,-1],s=ve(a);return s?.long===void 0?s?.double===void 0?o*E(String(i),a):o*w(Number(i)-s.double):o*w(Number(i-s.long))}var D=511,Ce=new WeakMap,O=e=>Ce.get(e)??Object.keys(e),we=e=>c(e)&&O(e).length===0,Te=e=>e.every((e,t)=>e===String(t)),k=(e,t)=>{let n=1;for(let r=e.indexOf(`
2
+ `);r!==-1&&r<t;r=e.indexOf(`
3
+ `,r+1))n++;return n},A=(e,t,n=e.pos)=>ne(t,k(e.text,n)-1);function j(e){let{text:t,pos:n}=e;if(n>=t.length)return`the end of the file`;if(t[n]===`
4
+ `)return`an LF line end`;if(t.startsWith(`\r
5
+ `,n))return`a CRLF line end`;let r=t.indexOf(`
6
+ `,n);return _(t.slice(n,r===-1?t.length:t[r-1]===`\r`?r-1:r))}function Ee(e,t,n){if(!e.text.startsWith(t,e.pos))throw A(e,`expected ${n()}, as Composer writes it, found ${j(e)}`);e.pos+=t.length}function M(e,t){e.lines[t]??=`${e.eol}${e.indent.repeat(t)}`,Ee(e,e.lines[t],()=>t===0?`a line end`:`a line end and ${t===1?``:`${t} times `}${_(e.indent)} of indentation`)}var De=e=>JSON.stringify(e).replaceAll(`\u2028`,`\\u2028`).replaceAll(`\u2029`,`\\u2029`);function Oe(e){let{text:t,pos:n}=e;if(t[n]!==`"`)throw A(e,`expected a string, found ${j(e)}`);let r=n+1;for(;r<t.length&&t[r]!==`"`&&t[r]!==`
7
+ `;)r+=t[r]===`\\`?2:1;if(t[r]!==`"`)throw A(e,`a string with no closing quote`);let i=t.slice(n,r+1);if(e.pos=r+1,!ke.test(i))return i.slice(1,-1);let a=te(()=>JSON.parse(i),()=>{throw A(e,`${_(i)} is not a string as JSON writes it`,n)});if(!a.isWellFormed())throw A(e,`${_(i)} escapes a lone surrogate, which PHP does not read`,n);if(De(a)!==i)throw A(e,`${_(i)} is not written as Composer writes it, ${_(De(a))}`,n);return a}var ke=/[\\\p{Cc}\u2028\u2029\p{Cs}]/u;function Ae(e){if(e===0)return Object.is(e,-0)?`-0`:`0`;let t=e<0?`-`:``,[n,r]=Math.abs(e).toExponential().split(`e`),i=n.replace(`.`,``),a=Number(r)+1;return a<-3||a>17?`${t}${i[0]}.${i.slice(1)||`0`}e${a>0?`+`:`-`}${Math.abs(a-1)}`:a<=0?`${t}0.${`0`.repeat(-a)}${i}`:i.length<=a?`${t}${i}${`0`.repeat(a-i.length)}`:`${t}${i.slice(0,a)}.${i.slice(a)}`}var je=/-?(?:0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/uy,Me=([e,t,n])=>t===void 0&&n===void 0&&ce(BigInt(e));function Ne(e){let t=ie(e,je);if(t===null)throw A(e,`expected a value, found ${j(e)}`);let[n]=t,r=Me(t),i=Number(n);if(!Number.isFinite(i))throw A(e,`${n} is past what PHP reads as a number`);let a=r?BigInt(n).toString():Ae(i);if(a!==n)throw A(e,`${n} is not written as Composer writes it, ${a}`);return r&&!Number.isSafeInteger(i)?BigInt(n):i}var Pe=[[`true`,!0],[`false`,!1],[`null`,null]];function Fe(e){let t=Pe.find(([t])=>e.text.startsWith(t,e.pos));return t!==void 0&&(e.pos+=t[0].length),t}function Ie(e,t){let n=e.text[e.pos];if(n===`{`)return Re(e,t);if(n===`[`)return ze(e,t);if(n===`"`)return Oe(e);let r=Fe(e);return r===void 0?Ne(e):r[1]}function Le(e,t){if(t===D)throw A(e,`nested more than ${D} deep, which PHP does not read`);e.pos++}function Re(e,t){let n=e.pos;Le(e,t);let r=Object.create(null);if(e.text[e.pos]===`}`){if(t!==1)throw A(e,`an empty object, which Composer writes as "[]"`,n);return e.pos++,r}let i=new Map;for(let n=!0;n;){M(e,t+1);let a=e.pos,o=Oe(e);if(i.has(o))throw A(e,`${_(o)} is a key at line ${k(e.text,i.get(o))} too`,a);i.set(o,a),Ee(e,`: `,()=>`": " after ${_(o)}`),r[o]=Ie(e,t+1),n=e.text[e.pos]===`,`,n&&e.pos++}M(e,t),Ee(e,`}`,()=>`"}"`);let a=[...i.keys()];if(Te(a))throw A(e,`an object of the keys 0 to ${a.length-1}, which Composer writes as a list`,n);return Ce.set(r,a),r}function ze(e,t){Le(e,t);let n=[];if(e.text[e.pos]===`]`)return e.pos++,n;for(let r=!0;r;)M(e,t+1),n.push(Ie(e,t+1)),r=e.text[e.pos]===`,`,r&&e.pos++;return M(e,t),Ee(e,`]`,()=>`"]"`),n}var Be=/^<<<<<<< /mu;function Ve(e){let t=Be.exec(e);if(t!==null)throw new g(`a merge conflict at line ${k(e,t.index)}, which Composer reads as a lockfile of no content-hash where its sides differ in that alone`);let[n,r]=re(e,`Composer`),i={text:e,pos:0,eol:n,indent:r,lines:[]},a=Re(i,0);if(M(i,0),i.pos!==e.length)throw A(i,`expected the end of the file after the last "}", found ${j(i)}`);return a}var He=/[ \t\n\r]*/uy,N=e=>ie(e,He),P=(e,t)=>new g(`not JSON as PHP reads it: ${t} at line ${k(e.text,e.pos)}`,e.where);function Ue(e){let{text:t,pos:n}=e,r=n+1;for(;r<t.length&&t[r]!==`"`;)r+=t[r]===`\\`?2:1;if(r>=t.length)throw P(e,`a string with no closing quote`);let i=te(()=>JSON.parse(t.slice(n,r+1)),()=>{throw P(e,`${_(t.slice(n,r+1))} is not a string`)});if(!i.isWellFormed())throw P(e,`a lone surrogate, which is not UTF-8`);return e.pos=r+1,i}function We(e,t){N(e);let n=e.text[e.pos];if(n===`{`||n===`[`){if(t===D)throw P(e,`nested more than ${D} deep`);let r=n===`{`,i=r?`}`:`]`,a=r?new Map:[];if(e.pos++,N(e),e.text[e.pos]===i)return e.pos++,a;for(;;){if(r){if(N(e),e.text[e.pos]!==`"`)throw P(e,`expected a key, found ${j(e)}`);let n=Ue(e);if(N(e),e.text[e.pos]!==`:`)throw P(e,`expected ":", found ${j(e)}`);e.pos++,a.set(n,We(e,t+1))}else a.push(We(e,t+1));N(e);let n=e.text[e.pos];if(n!==i&&n!==`,`)throw P(e,`expected "," or ${_(i)}, found ${j(e)}`);if(e.pos++,n===i)return a}}if(n===`"`)return Ue(e);let r=Fe(e);if(r!==void 0)return r[1];let i=ie(e,je);if(i===null)throw P(e,`expected a value, found ${j(e)}`);return Me(i)?BigInt(i[0]):Number(i[0])}function Ge(e,t){if(typeof e==`number`)return Number.isFinite(e)?void 0:t;if(e instanceof Map||Array.isArray(e))for(let[n,r]of e.entries()){let i=Ge(r,Array.isArray(e)?`${t}[${n}]`:v(t,n));if(i!==void 0)return i}}function Ke(e,t){let n={text:e,pos:0,where:t},r=We(n,0);if(N(n),n.pos!==e.length)throw P(n,`expected the end of the file, found ${j(n)}`);let i=Ge(r,t);if(i!==void 0)throw new g(`a number past what a double holds, which Composer refuses of the file`,i);return r}var qe=e=>`\\u${e.toString(16).padStart(4,`0`)}`;function Je(e){let t=``;for(let n of e){let e=n.codePointAt(0);t+=e<128?n:e<65536?qe(e):qe(55296+(e-65536>>10))+qe(56320+(e-65536&1023))}return t}function F(e){if(e===null||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(typeof e==`number`)return Ae(e);if(typeof e==`string`)return Je(JSON.stringify(e).replaceAll(`/`,`\\/`));if(Array.isArray(e))return`[${e.map(F).join(`,`)}]`;let t=[...e.keys()];return Te(t)?`[${[...e.values()].map(F).join(`,`)}]`:`{${t.map(t=>`${F(t)}:${F(e.get(t))}`).join(`,`)}}`}var I=`[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*)?)?([.-]?dev)?`,Ye=`stable|RC|beta|alpha|dev`,Xe=`[\\t\\n\\v\\f\\r ]`,Ze=`[^\\t\\n\\v\\f\\r ]`,Qe=`[^,\\t\\n\\v\\f\\r ]`,$e=`9999999-dev`,L=(e,t=``)=>new RegExp(e,t||`u`),et=L(`^(${Qe}+) +as +(${Qe}+)$`),tt=L(`@(?:${Ye})$`,`i`),nt=L(`^([^,\\t\\n\\v\\f\\r +]+)\\+${Ze}+$`),rt=L(`^v?(\\d{1,5})(\\.\\d+)?(\\.\\d+)?(\\.\\d+)?${I}$`,`i`),it=L(`^v?(\\d{4}(?:[.:-]?\\d{2}){1,6}(?:[.:-]?\\d{1,3}){0,2})${I}$`,`i`),at=/^([^\n]*?)[.-]?dev$/iu,ot=/^v?(\d+)(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?$/iu,st=/^((?:\d+\.)*\d+)(?:\.x)?-dev$/iu,ct=L(`${I}(?:\\+[^\\n]*)?$`,`i`);function lt(e){let t=b(e);return{a:`alpha`,b:`beta`,p:`patch`,pl:`patch`,rc:`RC`}[t]??t}function ut(e){let t=e.replace(/#[^\n]+$/u,``);if(t.startsWith(`dev-`)||t.endsWith(`-dev`))return`dev`;let n=ct.exec(b(t));return x(n[3])?{beta:`beta`,b:`beta`,alpha:`alpha`,a:`alpha`,rc:`RC`}[n[1]]??`stable`:`dev`}function dt(e){let t=y(e),n=ot.exec(t);if(n===null)return`dev-${t}`;let r=``;for(let e=1;e<5;e++)r+=n[e]===void 0?`.x`:n[e].replaceAll(`*`,`x`).replaceAll(`X`,`x`);return`${r.replaceAll(`x`,`9999999`)}-dev`}function ft(e){let t=st.exec(e);return t===null?void 0:`${t[1]}.`}function R(e){let t=y(e),n=et.exec(t);if(n!==null&&(t=n[1]),n=tt.exec(t),n!==null&&(t=t.slice(0,t.length-n[0].length)),(t===`master`||t===`trunk`||t==="default")&&(t=`dev-${t}`),/^dev-/iu.test(t))return`dev-${t.slice(4)}`;n=nt.exec(t),n!==null&&(t=n[1]);let r;if((n=rt.exec(t))===null?(n=it.exec(t))!==null&&(t=n[1].replaceAll(/\D/gu,`.`),r=2):(t=`${n[1]}${x(n[2])?`.0`:n[2]}${x(n[3])?`.0`:n[3]}${x(n[4])?`.0`:n[4]}`,r=5),r!==void 0){if(!x(n[r])){if(n[r]===`stable`)return t;let e=n[r+1];t+=`-${lt(n[r])}${(e??``).replace(/^[.-]+/u,``)}`}return x(n[r+2])||(t+=`-dev`),t}if(n=at.exec(t),n!==null){let e=dt(n[1]);if(!e.includes(`dev-`))return e}}var pt={"=":`==`,"==":`==`,"<":`<`,"<=":`<=`,">":`>`,">=":`>=`,"<>":`!=`,"!=":`!=`},z=(e,t)=>({operator:pt[e],version:t}),mt=Object.freeze({all:!0}),ht=e=>e.all?`*`:e.multi===void 0?`${e.operator} ${e.version}`:`[${e.multi.map(ht).join(e.conjunctive?` `:` || `)}]`;function gt(e,t,n=0){let r=[...e];for(let e=4;e>0;e--)if(e>t)r[e]=`0`;else if(e===t&&n!==0){let t=BigInt(r[e])+BigInt(n);if(t>T)return;r[e]=String(t)}return`${r[1]??``}.${r[2]??``}.${r[3]??``}.${r[4]??``}`}var _t=`v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:\\.(\\d+))?(?:${I}|\\.([xX*][.-]?dev))(?:\\+${Ze}+)?`,vt=L(`^(${Qe}*?)@(${Ye})$`,`i`),yt=/^(dev-[^,\t\n\v\f\r @]+?|[^,\t\n\v\f\r @]+?\.x-dev)#[^\n]+$/iu,bt=/^(v)?[xX*](\.[xX*])*$/iu,xt=L(`^~>?${_t}$`,`i`),St=L(`^\\^${_t}($)`,`i`),Ct=/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.[xX*])+$/u,wt=L(`^(${_t}) +- +(${_t})($)`,`i`),Tt=L(`^(<>|!=|>=?|<=?|==?)?${Xe}*([^\\n]*)`),Et=L(`-${I}$`,`i`),B=e=>e!==void 0&&e!==``;function Dt(e,t,n){let r=R(`${e}${x(t[5])&&x(t[7])&&x(t[8])?`-dev`:``}`.slice(1)),i=gt(t,n,1);return r===void 0||i===void 0?void 0:[z(`>=`,r),z(`<`,`${i}-dev`)]}function Ot(e){let t=e,n=et.exec(t);n!==null&&(t=n[1]);let r;if(n=vt.exec(t),n!==null&&(t=n[1]===``?`*`:n[1],n[2]!==`stable`&&(r=n[2])),n=yt.exec(t),n!==null&&(t=n[1]),n=bt.exec(t),n!==null)return!x(n[1])||!x(n[2])?[z(`>=`,`0.0.0.0-dev`)]:[mt];if((n=xt.exec(t))!==null){if(t.startsWith(`~>`))return;let e=B(n[4])?4:B(n[3])?3:B(n[2])?2:1;return x(n[8])||e++,Dt(t,n,Math.max(1,e-1))}if((n=St.exec(t))!==null)return Dt(t,n,n[1]!==`0`||!B(n[2])?1:n[2]!==`0`||!B(n[3])?2:3);if((n=Ct.exec(t))!==null){let e=B(n[3])?3:B(n[2])?2:1,t=`${gt(n,e)}-dev`,r=gt(n,e,1);return r===void 0?void 0:t===`0.0.0.0-dev`?[z(`<`,`${r}-dev`)]:[z(`>=`,t),z(`<`,`${r}-dev`)]}if((n=wt.exec(t))!==null){let e=x(n[6])&&x(n[8])&&x(n[9])?`-dev`:``,t=R(n[1]),r=R(n[10]);if(t===void 0||r===void 0)return;let i=z(`>=`,`${t}${e}`);if(B(n[12])&&B(n[13])||!x(n[15])||!x(n[17])||!x(n[18]))return[i,z(`<=`,r)];let a=gt([``,n[11],n[12],n[13],n[14]],B(n[12])?2:1,1);return a===void 0?void 0:[i,z(`<`,`${a}-dev`)]}n=Tt.exec(t);let i=R(n[2]);if(i===void 0&&n[2].endsWith(`-dev`)&&/^[0-9a-zA-Z\-./]+$/u.test(n[2])&&(i=R(`dev-${n[2].slice(0,-4)}`)),i===void 0)return;let a=n[1]||`=`;return a!==`==`&&a!==`=`&&!x(r)&&ut(i)===`stable`?i+=`-${r}`:(a===`<`||a===`>=`)&&!Et.test(n[2])&&!n[2].startsWith(`dev-`)&&(i+=`-dev`),[z(a,i)]}var kt=L(`${Xe}*\\|\\|?${Xe}*`),At=/(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)/u;function jt(e){let t=e[0],n=[],r=!1,i=e=>e.multi!==void 0&&e.conjunctive&&e.multi.length===2;for(let a of e.slice(1)){let[e,o,s,c]=i(t)&&i(a)?[...t.multi,...a.multi].map(ht):[];e?.startsWith(`>=`)&&o.startsWith(`<`)&&s.startsWith(`>=`)&&c.startsWith(`<`)&&o.slice(2)===s.slice(3)?(r=!0,t={multi:[t.multi[0],a.multi[1]],conjunctive:!0}):(n.push(t),t=a)}if(r)return n.push(t),n}function Mt(e){if(e.length===1)return e[0];let t=jt(e);return t?.length===1?t[0]:{multi:t??e,conjunctive:!1}}function Nt(e){let t=y(e).split(kt).map(e=>e.split(At).map(Ot));if(!t.some(e=>e.includes(void 0)))return Mt(t.map(e=>e.flat()).map(e=>e.length===1?e[0]:{multi:e,conjunctive:!0}))}function Pt(e,t,n){let r=e.startsWith(`dev-`),i=t.startsWith(`dev-`);return n===`!=`&&(r||i)?e!==t:r&&i?n===`==`&&e===t:r||i?!1:ge(e,t,n)}var Ft=e=>e.replaceAll(`=`,``);function It(e,t){let n=e.operator===`==`,r=e.operator===`!=`,i=t.operator===`==`,a=t.operator===`!=`;if(r||a)return r&&!a&&!i&&t.version.startsWith(`dev-`)||a&&!r&&!n&&e.version.startsWith(`dev-`)?!1:!n&&!i||Pt(t.version,e.version,`!=`);if(e.operator!==`==`&&Ft(e.operator)===Ft(t.operator))return!(e.version.startsWith(`dev-`)||t.version.startsWith(`dev-`));let[o,s,c]=n?[e.version,t.version,t.operator]:[t.version,e.version,e.operator];return Pt(o,s,c)?t.operator!==Ft(t.operator)||e.operator===Ft(e.operator)||me(t.version,e.version)!==0:!1}function V(e,t){return e.all||t.all?!0:e.multi===void 0?t.multi===void 0?It(e,t):V(t,e):e.conjunctive?t.multi!==void 0&&!t.conjunctive?V(t,e):e.multi.every(e=>V(t,e)):e.multi.some(e=>V(t,e))}var Lt=e=>z(`==`,e),H=(e,t)=>O(e).map(n=>[n,e[n],v(t,n)]);function U(e,t,n,r={}){u(e,t);let i=e=>t===void 0?e:v(t,e),a=-1;for(let o of O(e)){if(Object.hasOwn(r,o))throw new g(r[o],i(o));let e=n.indexOf(o);if(e===-1)throw new g(`unsupported field ${_(o)}`,t);if(e<a)throw new g(`out of the order Composer writes, before ${_(n[a])}`,i(o));a=e}return e}function W(e,t){if(x(f(e,t)))throw new g(`${_(e)}, which Composer reads as no value and does not write`,t);return e}var Rt=/[\p{Cc}]/u;function G(e,t){if(Rt.test(f(e,t)))throw new g(`${_(e)} has a control character in it`,t);return e}var zt=(e,t)=>{if(Array.isArray(e)?e.length===0:!c(e))throw l(`a non-empty mapping or sequence`,e,t);return e},Bt=(e,t)=>{if(d(e,t).length===0)throw new g(`an empty sequence, which Composer does not write`,t);return e},K=(e,t,n=f)=>Bt(e,t).map((e,r)=>n(e,`${t}[${r}]`));function Vt(e,t,n=`Composer sorts the keys in`){let r=O(e);for(let e=1;e<r.length;e++)if(Se(r[e-1],r[e])>0)throw new g(`out of the order ${n}, after ${_(r[e-1])}`,v(t,r[e]));return r}function Ht(e,t){let n=G(e,t),r=/\s|@(?:stable|rc|beta|alpha|dev)$/u.test(b(n))||n===`0`?void 0:R(n);if(r===void 0)throw new g(`${_(n)} is not a version Composer locks a package at`,t);return r}function Ut(e,t){let n=R(G(e,t));if(n===void 0)throw new g(`${_(e)} is not a version Composer reads`,t);return n}function Wt(e,t,n){let r=G(e,t)===`self.version`,i=Nt(r?n:e);if(i!==void 0)return i;throw new g(r?`"self.version", which is ${_(n)}, and not a version constraint Composer reads`:`${_(e)} is not a version constraint Composer reads`,t)}var Gt=/^[a-z0-9](?:[_.-]?[a-z0-9]+)*\/[a-z0-9](?:(?:[_.]|-{1,2})?[a-z0-9]+)*$/u,Kt=new Set([`nul`,`con`,`prn`,`aux`,...[`com`,`lpt`].flatMap(e=>Array.from({length:9},(t,n)=>`${e}${n+1}`))]);function qt(e,t){let n=f(e,t);if(!Gt.test(b(n)))throw new g(`${_(n)} is not a package name, a vendor and a package as Composer takes them`,t);if(b(n).split(`/`).some(e=>Kt.has(e)))throw new g(`${_(n)} has a name Windows reserves in it, which Composer refuses`,t);if(n.endsWith(`.json`))throw new g(`${_(n)} ends in .json, which Composer refuses`,t);return n}var Jt=/^[a-z0-9_./-]+$/u,Yt=/^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[a-z0-9](?:[_.-]?[a-z0-9]+)*|composer(?:-(?:plugin|runtime)-api)?)$/u,q=e=>Yt.test(b(e));function Xt(e,t,n){let r=Object.create(null);return Vt(u(e,t),t),{written:r,links:H(e,t).map(([e,t,i])=>{if(!Jt.test(e))throw new g(`${_(e)} is not a package name in lowercase, as Composer writes a link's`,i);let a=Wt(t,i,n);return r[e]=t,{target:e,pretty:t,constraint:a}})}}function Zt(e,n){let r=G(e,n);if(r.startsWith(`/`)||/^[A-Za-z]:/u.test(r))throw new g(`${_(r)} is an absolute path, of the machine the lockfile was written on`,n);let i=/^[A-Za-z][\d+.A-Za-z-]*:/u.exec(r);if(i!==null)throw new g(`${_(r)} is a URL, of ${i[0]}, and not a path`,n);return t(r.startsWith(`./`)?r.slice(2):r,n),r}function Qt(e,t){if(/^\s*-/u.test(G(e,t)))throw new g(`${_(e)} starts with "-", which a tool would read as an option and Composer refuses`,t);if(e===``)throw new g(`an empty string, of which Composer fetches nothing`,t);return e}var $t={git:[`https:`,`http:`,`ssh:`,`git:`,`git+ssh:`],hg:[`https:`,`http:`,`ssh:`],svn:[`https:`,`http:`,`svn:`,`svn+ssh:`],fossil:[`https:`,`http:`,`ssh:`]},en=/^(?:(?:tcp|ssl)(?:4|6|46|64)?:)?(?:\[[0-9a-f:.]+\]|[a-z0-9._][a-z0-9._-]*)(?::[a-z0-9._][a-z0-9._-]*)?$/u,tn=/^([\w.-]+@)?([\w.-]+):[^\s]/u;function nn(e,t,n){let r=Qt(e,t);if(n===`perforce`){let e=b(r);if(!en.test(e)||/^\s*(?:rsh|jsh)\s*:/u.test(e))throw new g(`${_(r)} is not a Perforce port, [tcp|ssl:][host:]port, as Composer takes one`,t);return r}a(r,t);let i=n===`git`&&!r.includes(`://`)&&!/^[A-Za-z]:/u.test(r)?tn.exec(r):null;if(i!==null){if(i[1]===void 0&&/^(?:file|https?|ssh|git|ftps?)$/u.test(b(i[2])))throw new g(`${_(r)} is of the host ${i[2]} to git, and a URL of ${b(i[2])}: to a URL parser`,t);return r}if(/^[A-Za-z][\d+.A-Za-z-]*:/u.test(r)){let e=URL.parse(r);if(e===null||!$t[n].includes(e.protocol)||/\s/u.test(r))throw new g(`${_(r)} is not a URL ${n} fetches from, ${$t[n].join(` `)}`,t);return r}return Zt(r,t)}function rn(e,t,r){let a=Qt(e,t);return r===`git`&&!n(a)&&i(a,t),a}function an(e,t,n){return Bt(e,t).map((e,r)=>{let i=`${t}[${r}]`;U(e,i,[`url`,`preferred`]);let a=p(e.preferred,v(i,`preferred`));return{url:n(e.url,v(i,`url`)),preferred:a}})}var on=[`git`,`hg`,`svn`,`fossil`,`perforce`];function sn(e,t){U(e,t,[`type`,`url`,`reference`,`mirrors`]);let n=f(e.type,v(t,`type`));if(!on.includes(n))throw new g(`expected one of ${on.join(`, `)}, which Composer clones from`,v(t,`type`));if(e.reference===void 0)throw new g(`expected a reference, without which Composer does not read a source`,t);let r=(e,t)=>nn(e,t,n);return{type:n,url:r(e.url,v(t,`url`)),reference:rn(e.reference,v(t,`reference`),n),mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,r))??[]}}var cn=[`zip`,`tar`,`gzip`,`xz`,`rar`,`phar`,`file`];function ln(e,t,n){let r=Qt(e,t);return(n===`path`||!o(r))&&Zt(r,t),r}function un(e,t){U(e,t,[`type`,`url`,`reference`,`shasum`,`mirrors`]);let n=f(e.type,v(t,`type`));if(n!==`path`&&!cn.includes(n))throw new g(`expected path or one of ${cn.join(`, `)}, which Composer installs from`,v(t,`type`));let i=(e,t)=>ln(e,t,n),a=m(e,`shasum`,t,f);if(a!==void 0&&a!==``&&!r(a))throw new g(`${_(a)} is not a sha1 in lowercase hex, which Composer compares the download's with`,v(t,`shasum`));return{type:n,url:i(e.url,v(t,`url`)),reference:m(e,`reference`,t,Qt),shasum:a||void 0,mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,i))??[]}}function dn(e,t){let n=G(e,t);if(n===``||/^(?:[\\/]|[A-Za-z]:)/u.test(n)||/(?:^|[\\/])\.\.(?:[\\/]|$)/u.test(n))throw new g(`${_(n)} is not a path in the package, as Composer installs a bin from`,t);return n}var fn=e=>e.replace(/(?:^|[\\/]+)\.\.?(?:[\\/]+|$)(?:\.\.?(?:[\\/]+|$))*/gu,`/`).replace(/^\/+/u,``);function pn(e,t){let n=G(e,t);if(fn(n)!==n)throw new g(`${_(n)} is not written as Composer writes a target-dir, ${_(fn(n))}`,t);if(n.startsWith(`\\`))throw new g(`${_(n)} is of the drive's root on Windows, and not under the package's directory`,t);return n!==``&&Zt(n.replaceAll(`\\`,`/`),t),n}function mn(e,t){return Vt(u(e,t),t),h(e,t,(e,t)=>{if(y(f(e,t))===`self.version`)throw new g(`"self.version", which Composer writes as the package's version`,t);return e},H)}var hn=(e,t)=>h(u(e,t),t,(e,t)=>{if(!Array.isArray(e))throw l(`a sequence, as Composer writes even one listener`,e,t);return e.map((e,n)=>f(e,`${t}[${n}]`))},H);function gn(e,t){let n=K(e,t);for(let e=1;e<n.length;e++)if(ye(n[e-1],n[e])>0)throw new g(`out of the order Composer sorts keywords in, after ${_(n[e-1])}`,`${t}[${e}]`);return n}function _n(e,t){return U(e,t,[`name`,`exclude`]),{name:m(e,`name`,t,W),exclude:m(e,`exclude`,t,K)??[]}}function vn(e,t){if(e===!0)return!0;if(typeof e!=`string`)throw l(`true or the name of a replacement`,e,t);return W(e,t)}var yn=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})[+-](\d{2}):(\d{2})$/u;function bn(e,t){let n=yn.exec(f(e,t)),[r,i,a,o,s,c,l,u]=n===null?[]:n.slice(1).map(Number),d=new Date(Date.UTC(2e3,i,0)).getUTCDate()-+(i===2&&(r%4!=0||r%100==0&&r%400!=0));if(n===null||i<1||i>12||a<1||a>d||o>23||s>59||c>59||u>59||l>24)throw new g(`${_(e)} is not a time as Composer writes one, as 2026-10-02T00:00:00+00:00`,t);return e}var xn={require:`require`,conflict:`conflict`,provide:`provide`,replace:`replace`,requireDev:`require-dev`},Sn=`name.version.target-dir.source.dist.require.conflict.provide.replace.require-dev.suggest.default-branch.bin.type.extra.autoload.autoload-dev.notification-url.include-path.php-ext.archive.scripts.license.authors.description.homepage.keywords.support.funding.abandoned.transport-options.time`.split(`.`),Cn={version_normalized:"`version_normalized`, which Composer leaves out of a lockfile","installation-source":"`installation-source`, which Composer leaves out of a lockfile",repositories:"`repositories`, which Composer reads of the project's composer.json alone","minimum-stability":"`minimum-stability`, which Composer reads of the project's composer.json alone"};function wn(e,t,n){if(U(e,t,Sn,Cn),e.name===void 0)throw new g(`expected a name`,t);if(e.version===void 0)throw new g(`expected a version`,t);let r=qt(e.name,v(t,`name`)),i=Ht(e.version,v(t,`version`));if(e.type===void 0)throw new g(`expected a type, which Composer always writes`,t);let a=W(G(e.type,v(t,`type`)),v(t,`type`));if(b(a)!==a)throw new g(`${_(a)}, which Composer writes in lowercase`,v(t,`type`));if(e[`default-branch`]!==void 0&&e[`default-branch`]!==!0)throw l(`true, as Composer writes it of the default branch alone`,e[`default-branch`],v(t,`default-branch`));let s=Object.create(null),c={};for(let[n,r]of Object.entries(xn)){let i=m(e,r,t,(t,n)=>Xt(t,n,e.version));s[n]=i?.written??Object.create(null),c[n]=i?.links??[]}let u=n=>m(e,n,t,zt);return{pkg:{name:r,version:e.version,normalized:i,stability:ut(i),dev:n,source:m(e,`source`,t,sn),dist:m(e,`dist`,t,un),...s,suggest:m(e,`suggest`,t,mn)??Object.create(null),defaultBranch:e[`default-branch`]===!0,bin:m(e,`bin`,t,(e,t)=>K(e,t,dn))??[],type:a,targetDir:m(e,`target-dir`,t,pn),extra:u(`extra`),autoload:u(`autoload`),autoloadDev:u(`autoload-dev`),notificationUrl:m(e,`notification-url`,t,(e,t)=>{if(!o(f(e,t)))throw new g(`${_(e)} is not an http(s) URL, which Composer posts installs to`,t);return e}),includePath:m(e,`include-path`,t,K)??[],phpExt:u(`php-ext`),archive:m(e,`archive`,t,_n)??{name:void 0,exclude:[]},scripts:m(e,`scripts`,t,hn)??Object.create(null),license:m(e,`license`,t,K)??[],authors:u(`authors`),description:m(e,`description`,t,W),homepage:m(e,`homepage`,t,W),keywords:m(e,`keywords`,t,gn)??[],support:u(`support`),funding:u(`funding`),abandoned:m(e,`abandoned`,t,vn),transportOptions:u(`transport-options`),time:m(e,`time`,t,bn)},links:c}}var Tn=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21],En=Array.from({length:64},(e,t)=>Math.floor(Math.abs(Math.sin(t+1))*2**32)>>>0);function Dn(e){let t=e.length,n=Math.ceil((t+9)/64),r=new Uint8Array(n*64);for(let n=0;n<t;n++)r[n]=e.codePointAt(n);r[t]=128;let i=new DataView(r.buffer);return i.setUint32(r.length-8,t*8>>>0,!0),i.setUint32(r.length-4,Math.floor(t*8/2**32),!0),Array.from({length:r.length/4},(e,t)=>i.getUint32(t*4,!0))}var On=(e,t)=>(e<<t|e>>>32-t)>>>0;function kn(e){if(/[^\0-\u007F]/u.test(e))throw TypeError(`expected ASCII`);let t=[1732584193,4023233417,2562383102,271733878],n=Dn(e);for(let e=0;e<n.length;e+=16){let[r,i,a,o]=t;for(let t=0;t<64;t++){let s=t>>4,c=[i&a|~i&o,o&i|~o&a,i^a^o,a^(i|~o)][s],l=[t,5*t+1,3*t+5,7*t][s]%16,u=i+On(r+c+En[t]+n[e+l]>>>0,Tn[s*4+t%4])>>>0;[r,i,a,o]=[o,u,i,a]}for(let[e,n]of[r,i,a,o].entries())t[e]=t[e]+n>>>0}return t.map(e=>[0,8,16,24].map(t=>(e>>>t&255).toString(16).padStart(2,`0`)).join(``)).join(``)}var An={string:[e=>typeof e==`string`,`a string`],boolean:[e=>typeof e==`boolean`,`true or false`],object:[e=>e instanceof Map,`a mapping`],array:[Array.isArray,`a sequence`],null:[e=>e===null,`null`]};function J(e,t,n){let r=[t.type].flat();if(!r.some(t=>An[t][0](e)))throw l(r.map(e=>An[e][1]).join(` or `),e,n);if(t.enum!==void 0&&!t.enum.includes(e))throw l(`one of ${t.enum.map(_).join(`, `)}`,e,n);if(t.pattern!==void 0&&!t.pattern.test(e))throw new g(`${_(e)} is not as Composer's schema has it`,n);if(e instanceof Map){for(let r of t.required??[])if(!e.has(r))throw new g(`no ${_(r)}, which Composer's schema requires`,n);for(let[r,i]of e){let e=Object.hasOwn(t.properties??{},r)?t.properties[r]:t.additionalProperties;e!==void 0&&J(i,e,v(n,r))}}Array.isArray(e)&&t.items!==void 0&&e.forEach((e,r)=>J(e,t.items,`${n}[${r}]`))}var Y={type:`string`},X={type:`boolean`},jn={type:`array`,items:Y},Mn={type:[`string`,`boolean`]},Nn={type:`object`,required:[`name`,`version`],properties:{name:Y,version:Y}},Pn={name:Y,canonical:X,only:jn,exclude:jn},Fn={url:Y,"no-api":X,"secure-http":X,"svn-cache-credentials":X,"trunk-path":Mn,"branches-path":Mn,"tags-path":Mn,"package-path":Y,depot:Y,branch:Y,unique_perforce_client_name:Y,p4user:Y,p4password:Y},In={composer:{url:Y,options:{type:`object`},allow_ssl_downgrade:X,"force-lazy-providers":X,filter:{type:[`boolean`,`object`],additionalProperties:X}},...Object.fromEntries([`vcs`,`github`,`git`,`gitlab`,`bitbucket`,`git-bitbucket`,`hg`,`fossil`,`perforce`,`svn`,`forgejo`].map(e=>[e,Fn])),path:{url:Y,options:{type:`object`,properties:{reference:{type:`string`,enum:[`none`,`config`,`auto`]},symlink:{type:[`boolean`,`null`]},relative:X,versions:{type:`object`,additionalProperties:Y}}}},artifact:{url:Y},pear:{url:Y,"vendor-alias":Y},package:{package:{...Nn,type:[`object`,`array`],items:Nn}}};function Ln(e,t,n){J(e,{type:`object`},t);let r=e.get(`type`);if(typeof r!=`string`||!Object.hasOwn(In,r))throw l(`a type of repository Composer knows`,r,v(t,`type`));if(J(e,{type:`object`,required:[r===`package`?`package`:`url`],properties:{...Pn,...In[r]}},t),n&&e.has(`name`))throw new g(`a name, where the key names a repository, which Composer's schema refuses`,v(t,`name`))}function Rn(e,t){if(J(e,{type:[`object`,`array`]},t),Array.isArray(e))e.forEach((e,n)=>{e instanceof Map&&e.size===1&&[...e.values()][0]===!1||Ln(e,`${t}[${n}]`,!1)});else for(let[n,r]of e)r!==!1&&Ln(r,v(t,n),!0)}var zn={version:{type:`string`,pattern:/^[vV]?\d+(?:[.-]\d+){0,3}[._-]?(?:(?:[sS][tT][aA][bB][lL][eE]|[bB][eE][tT][aA]|[bB]|[rR][cC]|[aA][lL][pP][hH][aA]|[aA]|[pP][aA][tT][cC][hH]|[pP][lL]|[pP])(?:[.-]?\d+)*)?(?:[.-]?[dD][eE][vV]|\.x-dev)?(?:\+.*)?$|^dev-.*$/su},"minimum-stability":{type:`string`,enum:[`dev`,`alpha`,`beta`,`rc`,`RC`,`stable`]},"prefer-stable":X,extra:{type:[`object`,`array`]},config:{type:`object`,properties:{platform:{type:`object`,additionalProperties:Mn}}}};function Bn(e,t){for(let[n,r]of Object.entries(zn))e.has(n)&&J(e.get(n),r,v(t,n));e.has(`repositories`)&&Rn(e.get(`repositories`),v(t,`repositories`))}var Z=`composerJson`,Vn=[`name`,`version`,`require`,`require-dev`,`conflict`,`replace`,`provide`,`minimum-stability`,`prefer-stable`,`repositories`,`extra`];function Hn(e){let t=new Map(Vn.filter(t=>e.has(t)).map(t=>[t,e.get(t)])),n=e.get(`config`),r=n instanceof Map?n.get(`platform`):void 0;return r!=null&&t.set(`config`,new Map([[`platform`,r]])),kn(F(new Map([...t].sort(([e],[t])=>Se(e,t)))))}function Un(e,t){let n=qt(e,t);if(/[A-Z]/u.test(n))throw new g(`${_(n)} has capitals, which Composer refuses in composer.json`,t);return n}var Wn=/(?:^|\| *|, *)([^,\t\n\v\f\r #|]+)(?:#[^ ]+)? +as +([^,\t\n\v\f\r |]+)(?:$| *\|| *,)/u;function Gn(e,t,n,r){let i=e.get(t);if(i===void 0)return[];if(!(i instanceof Map))throw l(`a mapping`,i,v(Z,t));let a=new Map;for(let[e,o]of i){let i=b(e),s=v(v(Z,t),e);q(e)||Un(e,s),G(f(o,s),s);let c=o===`self.version`?r===void 0?{all:!0}:Nt(r.pretty):Nt(o);if(c===void 0)throw new g(`${_(o)} is not a version constraint Composer reads`,s);if(t===`require`||t===`require-dev`){let e=Wn.exec(o);if(e===null?o.includes(` as `):R(e[1])===void 0||R(e[2])===void 0)throw new g(`${_(o)} is not an alias of one version as another, which Composer refuses`,s);if(i===n)throw new g(`the root itself, which Composer refuses`,s)}a.set(i,{target:i,pretty:o,constraint:c})}return[...a.values()]}function Kn(e){if(typeof e!=`string`)throw TypeError(`composerJson: expected the text of composer.json`);let t=Ke(e,Z);if(!(t instanceof Map))throw new g(`expected an object`,Z);return t}function qn(e){let t=Kn(e);Bn(t,Z);let n=t.has(`name`)?Un(t.get(`name`),v(Z,`name`)):`__root__`,r=t.get(`version`),i=r===void 0?void 0:{pretty:r,normalized:Ut(r,v(Z,`version`))},a=Object.create(null);for(let[e,r]of Object.entries(xn))a[e]=Gn(t,r,n,i);return{contentHash:Hn(t),name:n,version:i?.normalized,links:a}}var Q={stable:0,RC:5,beta:10,alpha:15,dev:20};function Jn(e,t,n,r){let i=Object.create(null),a=e=>e.pretty===`self.version`,o=e=>({...e,constraint:Lt(t)});for(let t of Object.keys(xn))i[t]=t===`conflict`||t===`provide`||t===`replace`?[...e.links[t],...e.links[t].filter(a).map(o)]:e.links[t].map(e=>a(e)?o(e):e);let s=e.links.require.some(a);return{name:e.name,version:t,exact:Lt(t),pretty:n,stability:ut(t),links:i,alias:r?`root`:`branch`,base:e,selfVersionRequires:s,where:e.where}}function Yn(e,t){let{version:n}=e;if(!n.startsWith(`dev-`)&&!n.endsWith(`-dev`))return;let r=e.extra?.[`branch-alias`];if(typeof r==`object`&&r)for(let e of O(r)){let i=r[e];if(typeof i!=`string`)throw new g(`expected a string, as Composer reads a branch alias of a dev version`,v(v(v(t,`extra`),`branch-alias`),e));if(!i.endsWith(`-dev`))continue;let a=i===$e?i:dt(i.slice(0,-4));if(!a.endsWith(`-dev`)||b(n)!==b(e))continue;let o=ft(e),s=ft(i);if(o===void 0||s===void 0||b(s).startsWith(b(o)))return a}if(e.defaultBranch&&ft(n.replace(/^v/u,``))===void 0)return $e}function Xn(e,t){let n=new Set([e.name]);if(t)for(let t of e.links.provide)n.add(t.target);for(let t of e.links.replace)n.add(t.target);return n}function Zn(e,t,n){if(e.name===t)return e.exact===void 0||V(n,e.exact);let r=e=>e.target===t&&V(n,e.constraint);return e.links.provide.some(r)||e.links.replace.some(r)}function Qn(e){let t=new Map;for(let n of e)for(let e of Xn(n,!0))(t.get(e)??t.set(e,[]).get(e)).push(n);return{entries:e,byName:t,provided:new Map}}var $n=(e,t)=>e.byName.get(t)??[];function $(e,t){return e.provided.has(t)||e.provided.set(t,$n(e,t.target).filter(e=>Zn(e,t.target,t.constraint))),e.provided.get(t)}function er(e){return e.root?`the root`:`${e.base?.pkg.name??e.pkg.name} ${e.alias===void 0?e.pkg.version:`${e.pretty}, an alias of ${e.base.pkg.version}`}`}function tr(e,t,n){let r=Q[e.stability];return[...Xn(e,!0)].some(e=>r<=Q[Object.hasOwn(n,e)?n[e]:t])}function nr(e){let t=new Map;for(let n of e)for(let e of Xn(n,!1)){let r=t.get(e);if(r!==void 0){let t=r.root?`the root`:r.where,i=e===n.name&&e===r.name?`listed twice, first as ${t}`:`${_(e)} is ${e===r.name?`the name`:`replaced by`} of ${t}, and ${e===n.name?`its name`:`replaced by it`} too, which Composer installs neither of`;throw new g(i,n.where)}t.set(e,n)}}function rr(e,t,n,r){for(let i of e)if(i.alias===void 0||i.selfVersionRequires)for(let e of i.links.require){if(q(e.target)||$(t,e).length>0)continue;let a=$n(r,e.target).filter(e=>!e.root),o=i.alias===void 0?``:`, as its alias ${i.pretty} asks for ${e.target} at it`,s=a.length===0?``:`, of ${a.map(er).join(`, `)}, which the lockfile has`;throw new g(`nothing ${n} meets it${o}${s}`,v(v(i.where,`require`),e.target))}}function ir(e){let t=new Set(e.entries.filter(e=>e.alias===void 0).flatMap(e=>[...Xn(e,!1)]));for(let n of e.entries)for(let r of n.links.conflict){if(q(r.target)||!t.has(r.target))continue;let i=$(e,r).find(e=>e!==n&&(e.alias===void 0||e.name===r.target));if(i!==void 0)throw new g(`conflicts with ${er(i)}, which ${i.root?`composer.json is`:`the lockfile has`}`,v(v(n.where,`conflict`),r.target))}}function ar(e,t,n){for(let r of e.links[n])if(!(q(r.target)||r.pretty===`self.version`||$(t,r).length>0))throw new g(`nothing in the lockfile${n===`requireDev`?``:` that composer install --no-dev installs`} meets it, which composer install refuses`,v(v(e.where,xn[n]),r.target))}function or(e,t){let n=Object.create(null);for(let r of e.links.require){let e=[...new Set($(t,r).filter(e=>!e.root).map(e=>(e.base??e).name))];n[r.target]={constraint:r.pretty,platform:q(r.target),targets:e}}return n}function sr(e,t,n,r,i){let a=e.map(({pkg:e,links:t,where:n})=>({name:b(e.name),version:e.normalized,exact:Lt(e.normalized),stability:e.stability,links:t,pkg:e,where:n})),o=i===void 0?[]:[{...i,exact:i.version===void 0?void 0:Lt(i.version),where:Z,root:!0}];nr([...o,...a]);let s=new Map(a.map(e=>[e.name,e])),c=[],l=new Map(a.map(e=>[e,[]])),u=e=>{c.push(e),l.get(e.base).push(e)};for(let e of a){c.push(e);let t=Yn(e.pkg,e.where);t!==void 0&&u(Jn(e,t,t.replaceAll(/(?:\.9{7})+/gu,`.x`),!1))}for(let e of t)u(Jn(s.get(e.package),e.aliasNormalized,e.alias,!0));for(let e of c)if(!tr(e,n,r)){let t=e.alias===void 0?``:`its alias ${e.pretty}, `;throw new g(`${t}of stability ${e.stability}, which minimum-stability, ${n}, and stability-flags do not take, and Composer installs nothing against`,e.where)}let d=e=>(e.base??e).pkg.dev,f=c.filter(e=>!d(e)),p=Qn([...o,...f]),m=Qn([...o,...c]);return ir(m),i!==void 0&&(rr(f,p,`that composer install --no-dev installs`,m),rr(c.filter(d),m,`in the lockfile`,m),ar(o[0],p,`require`),ar(o[0],m,`requireDev`)),new Map(a.map(e=>[e,{require:or(e,d(e)?m:p),aliases:l.get(e).map(e=>({version:e.pretty,normalized:e.version,root:e.alias===`root`}))}]))}var cr=[`_readme`,`content-hash`,`packages`,`packages-dev`,`aliases`,`minimum-stability`,`stability-flags`,`prefer-stable`,`prefer-lowest`,`platform`,`platform-dev`,`platform-overrides`,`plugin-api-version`],lr={hash:"`hash`, the md5 of composer.json that Composer 1.2 and older wrote, which is not read here"},ur=cr.filter(e=>e!==`platform-overrides`),dr=[`This file locks the dependencies of your project to a known state`,`Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies`,`This file is @generated automatically`],fr=[`2.0.0`,`2.1.0`,`2.2.0`,`2.3.0`,`2.6.0`,`2.9.0`],pr=[`stability-flags`,`platform`,`platform-dev`];function mr(e){let t=`plugin-api-version`;if(e===void 0)throw new g(`no plugin-api-version: a lockfile of Composer 1.9 or older, which is not read here`);if(typeof e==`string`&&e.startsWith(`1.`))throw new g(`${_(e)} is Composer 1's, which is not read here`,t);if(!fr.includes(e))throw new g(`unsupported plugin-api-version: expected one of ${fr.join(`, `)}, found ${s(e)}`,t);return e}function hr(e){U(e,void 0,cr,lr);let t=mr(e[`plugin-api-version`]),n=ur.find(t=>e[t]===void 0);if(n!==void 0)throw new g(`expected ${_(n)}, which Composer always writes`,n);let r=e._readme;if(!Array.isArray(r)||r.length!==dr.length||r.some((e,t)=>e!==dr[t]))throw new g(`expected the three lines Composer writes`,`_readme`);let i=f(e[`content-hash`],`content-hash`);if(!/^[\da-f]{32}$/u.test(i))throw new g(`${_(i)} is not an md5 in lowercase hex`,`content-hash`);for(let t of[`prefer-stable`,`prefer-lowest`])p(e[t],t);let a=e[`minimum-stability`];if(typeof a!=`string`||!Object.hasOwn(Q,a))throw l(`one of ${Object.keys(Q).join(`, `)}`,a,`minimum-stability`);return{contentHash:i,pluginApiVersion:t,minimumStability:a}}function gr(e,t){let n=pr.find(t=>we(e[t])),r=pr.find(t=>Array.isArray(e[t])&&e[t].length===0),i=t===`2.9.0`?`{}`:t===`2.6.0`?void 0:`[]`,a=i===`{}`?r:i===`[]`?n:void 0;if(a!==void 0)throw new g(`"${i===`{}`?`[]`:`{}`}", which Composer of plugin-api-version ${t} writes as "${i}"`,a);if(n!==void 0&&r!==void 0)throw new g(`"[]", where ${_(n)} is "{}", as no Composer writes them both`,r);return n!==void 0||t===`2.9.0`}var _r=(e,t)=>Array.isArray(e)&&e.length===0?Object.create(null):u(e,t);function vr(e,t){let n=`stability-flags`,r=_r(e,n);t&&Vt(r,n,`Composer 2.8 and later sort it in`);let i=Object.entries(Q);return h(r,n,(e,t,n)=>{if(b(n)!==n)throw new g(`${_(n)}, which Composer writes in lowercase`,t);let r=i.find(([,t])=>t===e);if(r===void 0)throw l(`one of ${Object.values(Q).join(`, `)}`,e,t);return r[0]},H)}var yr=(e,t)=>h(_r(e,t),t,(e,t,n)=>{if(!q(n)||b(n)!==n)throw new g(`${_(n)} is not a platform package's name in lowercase, as Composer writes one`,t);return Wt(e,t,`1.0.0`),e},H);function br(e){let t=`platform-overrides`;if(e===void 0)return Object.create(null);if(!c(e)||we(e))throw l(`a non-empty mapping, as Composer writes it where there are any`,e,t);let n=new Map;return h(e,t,(e,t,r)=>{if(!q(r))throw new g(`${_(r)} is not a platform package's name`,t);let i=b(r),a=n.get(i);if(a!==void 0)throw new g(`${_(a)} too, of which Composer takes the last, as it takes a name in any case`,t);if(n.set(i,r),e!==!1&&(typeof e!=`string`||R(G(e,t))===void 0))throw l(`a version, or false`,e,t);if(i===`php`&&e===!1)throw new g(`false, which Composer refuses of php, as it cannot be missing`,t);return e},H)}function xr(e,t){let n=e[t];if(t===`packages-dev`&&n===null)throw new g(`null, as Composer 1 writes it after update --no-dev, which Composer 2 does not install from`,t);return d(n,t)}function Sr(e){for(let t=1;t<e.length;t++){let n=e[t-1].pkg,r=e[t].pkg;if(n.dev===r.dev&&(E(n.name,r.name)||E(n.version,r.version))>0)throw new g(`out of the order Composer sorts packages in, by name then version, after ${_(n.name)}`,e[t].where)}}var Cr=[`package`,`version`,`alias`,`alias_normalized`];function wr(e,t){let n=`aliases`;return d(e,n).map((r,i)=>{let a=`${n}[${i}]`;U(r,a,Cr);for(let e of Cr)if(r[e]===void 0)throw new g(`expected ${e}`,a);let o=f(r.package,v(a,`package`));if(!t.has(o))throw new g(`${_(o)} is not a package in the lockfile, by its name in lowercase`,v(a,`package`));if(i>0&&E(e[i-1].package,o)>0)throw new g(`out of the order Composer sorts aliases in, by package, after ${_(e[i-1].package)}`,a);let s=f(r.version,v(a,`version`));if(Ut(s,v(a,`version`))!==s)throw new g(`${_(s)} is not a version normalized, as Composer writes it`,v(a,`version`));if([`dev-master`,`dev-trunk`,`dev-default`].includes(s))throw new g(`${_(s)}, which Composer writes as ${$e}`,v(a,`version`));let c=f(r.alias,v(a,`alias`));if(/\s/u.test(c))throw new g(`${_(c)} has a space, which Composer's alias of a requirement cannot`,v(a,`alias`));let l=Ut(c,v(a,`alias`));if(r.alias_normalized!==l)throw new g(`expected ${_(l)}, the alias normalized`,v(a,`alias_normalized`));return{package:o,version:s,alias:c,aliasNormalized:l}})}function Tr(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{composerJson:n}=ee(t,[`composerJson`]),r=n===void 0?void 0:qn(n),i=Ve(e),{contentHash:a,pluginApiVersion:o,minimumStability:s}=hr(i),c=gr(i,o),l=vr(i[`stability-flags`],c),u=[];for(let[e,t]of[[`packages`,!1],[`packages-dev`,!0]])for(let[n,r]of xr(i,e).entries()){let i=`${e}[${n}]`;u.push({...wn(r,i,t),where:i})}Sr(u);let d=new Map(u.map(({pkg:e})=>[b(e.name),e])),f=wr(i.aliases,d),p=sr(u,f,s,l,r),m=Object.create(null);for(let[{pkg:e},{require:t,aliases:n}]of p)m[b(e.name)]={...e,require:t,aliases:n};return{contentHash:a,fresh:r===void 0?void 0:r.contentHash===a,pluginApiVersion:o,minimumStability:s,stabilityFlags:l,preferStable:i[`prefer-stable`],preferLowest:i[`prefer-lowest`],platform:yr(i.platform,`platform`),platformDev:yr(i[`platform-dev`],`platform-dev`),platformOverrides:br(i[`platform-overrides`]),aliases:f,packages:m}}export{g as LockfileError,Tr as parseComposerLock};
@@ -0,0 +1 @@
1
+ import{b as e,c as t,f as n,g as r,h as i,i as a,j as o,m as s,o as c,p as l,q as u,r as d}from"./chunk-JFL7WLRV.js";import{a as f,c as p,d as m,e as h,f as g,g as _,i as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T}from"./chunk-JOXLZXMI.js";import{B as E,H as D,I as O,M as k,m as A,t as j}from"./chunk-UCP3JRE2.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as M,e as ee,g as N}from"./chunk-E3LFSUDJ.js";import{d as P,h as F,i as I}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var L=Object.fromEntries([`md5`,`sha1`,`sha224`,`sha256`,`sha384`,`sha512`].map(e=>[e,s[e]]));function R(e,t){let n=URL.parse(k(v(e,t),t));if(!/^[\w.-]+@[\w.-]+:./u.test(e)&&(n===null||![`https:`,`http:`,`ssh:`,`git:`,`file:`].includes(n.protocol)))throw new P(`${F(e)} is not a repository URL`,t);return e}var z={version:[`version`],path:[`path`,`develop`],url:[`url`],git:[`git`,`branch`,`tag`,`rev`,`subdirectory`]},B=Object.keys(z),V=new Set([`extras`,`optional`,`markers`]),H=[...new Set(Object.values(z).flat()),...V];function U(e,t,n){let r=I(n,e);if(e===`version`)return{version:v(t.version,r)};if(e===`path`)return{path:u(t.path,r),develop:A(t,`develop`,n,_)??!1};if(e===`url`)return{url:l(t.url,r)};let i=[`branch`,`tag`,`rev`].filter(e=>t[e]!==void 0);if(i.length>1)throw new P(`${i.join(` and `)}, of which Poetry writes one`,n);return{git:R(t.git,r),reference:i.length===0?void 0:{kind:i[0],name:v(t[i[0]],I(n,i[0]))},subdirectory:A(t,`subdirectory`,n,d)}}function W(e,t){if(typeof e==`string`)return{type:`version`,version:v(e,t),extras:[],optional:!1,markers:void 0};p(e,t,H);let n=w(e,B,t),r=H.find(t=>e[t]!==void 0&&!z[n].includes(t)&&!V.has(t));if(r!==void 0)throw new P(`a field Poetry does not write for a ${n} dependency`,I(t,r));return{type:n,...U(n,e,t),extras:A(e,`extras`,t,x(i))??[],optional:A(e,`optional`,t,_)??!1,markers:A(e,`markers`,t,a)}}function G(e,t){let i=Object.create(null);if(e===void 0)return i;let a=new Map;for(let[o,s,c]of m(e,t)){let e=n(r(o,c));if(a.has(e))throw new P(`${F(o)} and ${F(a.get(e))} are one name`,c);if(a.set(e,o),Array.isArray(s)&&s.length===0)throw new P(`an empty array, where Poetry writes a constraint`,c);i[o]=Array.isArray(s)?b(W)(s,c):[W(s,c)]}return i}function K(e,t){let n=new Set;return b((e,t)=>{p(e,t,[`file`,`hash`]);let r=v(e.file,I(t,`file`));if(!E(r)||r.includes(`/`))throw new P(`${F(r)} is not a file's name`,I(t,`file`));if(n.has(r))throw new P(`${F(r)} is listed twice`,t);return n.add(r),{file:r,hash:c(e.hash,I(t,`hash`),L)}})(e,t)}var q=(e,t)=>C(e,t,i,x(o)),J={legacy:[`url`,`reference`],git:[`url`,`reference`,`resolved_reference`,`subdirectory`],url:[`url`,`subdirectory`],file:[`url`],directory:[`url`]},Y=y(D,`a full commit hash, as Poetry writes`);function X(e,t){let n=g(p(e,t).type,I(t,`type`));if(!Object.hasOwn(J,n))throw new P(`expected one of ${Object.keys(J).join(`, `)}`,I(t,`type`));p(e,t,[`type`,...J[n]]);let r=I(t,`url`),i=A(e,`subdirectory`,t,d);return n===`legacy`?{type:n,url:l(e.url,r),name:v(e.reference,I(t,`reference`))}:n===`url`?{type:n,url:l(e.url,r),subdirectory:i}:n===`file`||n===`directory`?{type:n,path:u(e.url,r)}:{type:n,url:R(e.url,r),reference:A(e,`reference`,t,v),commit:Y(e.resolved_reference,I(t,`resolved_reference`)),subdirectory:i}}var Z=[`package`,`extras`,`metadata`],Q=[`name`,`version`,`description`,`optional`,`python-versions`,`files`,`dependencies`,`extras`,`source`,`develop`],te=[...Q,`groups`,`markers`],ne={category:"`category` is lock-version 1, which Poetry 1.4 and older write and is not read here"};function $(e,t){if(e===`2.0`||e===`2.1`)return e;throw typeof e==`string`&&/^1\.\d+$/u.test(e)?new P(`lock-version ${e} is Poetry 1.4's or older, which is not read here`,t):new P(`unsupported lock-version: expected "2.0" or "2.1", found ${f(e)}`,t)}function re(e){p(e,`metadata`,[`lock-version`,`python-versions`,`content-hash`],{files:`metadata.files is lock-version 1, which is not read here`,hashes:`metadata.hashes is lock-version 1, which is not read here`});let t=e=>I(`metadata`,e),n=y(O,`a hex sha256`)(e[`content-hash`],t(`content-hash`));return{lockVersion:$(e[`lock-version`],t(`lock-version`)),pythonVersions:v(e[`python-versions`],t(`python-versions`)),contentHash:n}}function ie(e,t,n){let r=typeof e==`string`?a(e,n):void 0,i=Object.create(null);for(let e of t)i[e]=r;if(e===void 0||r!==void 0)return i;for(let[t,r,o]of m(e,n)){if(!Object.hasOwn(i,t))throw new P(`${F(t)} is not one of the package's groups`,o);i[t]=a(r,o)}return i}function ae(e,t){let n=S(e,t,i);if(n.length===0)throw new P(`expected a group at least`,t);let r=j(n);if(r!==void 0)throw new P(`${F(r)} is listed twice`,t);return n}function oe(e,n,i){p(e,n,i===`2.1`?te:Q,ne);let a=A(e,`source`,n,X),o=a?.type===`directory`||a?.type===`git`;if(o&&e.develop===void 0)throw new P(`expected develop, which Poetry writes of a directory or a git source`,n);if(!o&&e.develop!==void 0)throw new P(`develop, which Poetry writes of a directory or a git source alone`,I(n,`develop`));let s=i===`2.1`?ae(e.groups,I(n,`groups`)):void 0;return{name:r(e.name,I(n,`name`)),version:t(e.version,I(n,`version`)),description:A(e,`description`,n,g)??``,optional:_(e.optional,I(n,`optional`)),pythonVersions:v(e[`python-versions`],I(n,`python-versions`)),groups:s,markers:s===void 0?void 0:ie(e.markers,s,I(n,`markers`)),files:K(e.files,I(n,`files`)),dependencies:G(e.dependencies,I(n,`dependencies`)),extras:q(e.extras,I(n,`extras`)),source:a,develop:A(e,`develop`,n,_)}}function se(e,t){return C(e,`extras`,i,x((e,i)=>{if(!t.has(n(r(e,i))))throw new P(`${F(e)} names no package in the lockfile`,i);return e}))}var ce=t=>JSON.stringify([n(t.name),e(t.version),t.source??null]);function le(e){let t=p(N(e),void 0,Z);if(!ee(t.metadata))throw new P(`expected a [metadata] table, which Poetry requires`,`metadata`);let{lockVersion:r,pythonVersions:i,contentHash:a}=re(t.metadata),o=h(t.package??[],`package`).map((e,t)=>oe(e,`package[${t}]`,r));return T(o,ce,e=>`${e.name} ${e.version}`),{lockVersion:r,pythonVersions:i,contentHash:a,extras:se(t.extras,new Set(o.map(e=>n(e.name)))),packages:o}}export{P as LockfileError,M as TomlError,le as parsePoetryLock};
@@ -0,0 +1 @@
1
+ function e(e=null){let t=[`anthropic/claude-opus-5.5`,`anthropic/claude-fable-5.1`,`anthropic/claude-sonnet-5.5`,`anthropic/claude-haiku-5.5`,`openai/gpt-6-astra`,`openai/gpt-6-astra-pro`,`openai/gpt-6.1-sol`,`openai/gpt-6.1-sol-pro`,`openai/gpt-6.1-terra`,`openai/gpt-6.1-terra-pro`,`openai/gpt-6-luna`,`openai/gpt-6-luna-pro`,`moonshotai/kimi-k3`,`moonshotai/kimi-k3.1-pro`,`google/gemini-4-argon`,`google/gemma-4-31b-it`,`x-ai/grok-4.7`,`z-ai/glm-5.3`,`qwen/qwen3.8-max`,`deepseek/deepseek-v4.1-flash`,`deepseek/deepseek-v4-pro`,`mistralai/mistral-large-4-0`],n=e===`moonshot`?`moonshotai`:e,r=t.filter(t=>![`anthropic`,`openai`,`moonshot`].includes(e??``)||t.startsWith(`${n}/`)).map(e=>({id:e,efforts:[`low`,`medium`,`high`,`xhigh`,`max`]}));return{models:r,defaultModel:r[0].id}}export{e as a};
@@ -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|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" 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>`,N=`<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>`,P=`<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>`,F=`<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>`,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="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>`,L=`<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>`,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="m4.5 4.5-3 3.5 3 3.5m7-7 3 3.5-3 3.5M9.5 2l-3 12"/></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="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>`,B=`<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>`,V=`<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>`,H=`<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>`,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"><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>`,W=`<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>`,G=`<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>`,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="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};
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|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};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/unsafe-html.js:
@@ -0,0 +1 @@
1
+ import{b as e,c as t}from"./chunk-ZQHLECTI.js";import{f as n,g as r,i,j as a,k as o,m as s}from"./chunk-PXK7EU4V.js";var c,l,u,d=12336,f=26214,p=`0123456789ABCDEFabcdef`,m=`Input is not a hex string`;function h(t){c||=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));let n=t.length;if(r){if(!l){l=new Uint16Array(256);let e=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);for(let t=0;t<256;t++){let n=c[t];e[2*t]=n.charCodeAt(0),e[2*t+1]=n.charCodeAt(1)}}let r=new Uint16Array(n),i=0;for(let e=t.length-3;!(i>=e);i+=4){let e=t[i],n=t[i+1],a=t[i+2],o=t[i+3];r[i]=l[e],r[i+1]=l[n],r[i+2]=l[a],r[i+3]=l[o]}for(;i<n;i++)r[i]=l[t[i]];return e(r)}return i(t,0,n,c)}function g(e){if(typeof e!=`string`)throw TypeError(o);if(e.length%2!=0)throw SyntaxError(m);let r=e.length/2,i=new Uint8Array(r);if(n){if(!u){u=new Uint8Array(f+1);let e=new Uint8Array(2),t=new Uint16Array(e.buffer,e.byteOffset,1),n=[...p].map(e=>[e.charCodeAt(0),parseInt(e,16)]);for(let[r,i]of n){e[0]=r;for(let[r,a]of n)e[1]=r,u[t[0]]=i<<4|a}}let n=t(e,m),a=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2),o=0;for(let e=r-3;o<e;o+=4){let e=a[o],t=a[o+1],n=a[o+2],r=a[o+3],s=u[e],c=u[t],l=u[n],f=u[r];if(!s&&e!==d||!c&&t!==d||!l&&n!==d||!f&&r!==d)throw SyntaxError(m);i[o]=s,i[o+1]=c,i[o+2]=l,i[o+3]=f}for(;o<r;){let e=a[o],t=u[e];if(!t&&e!==d)throw SyntaxError(m);i[o++]=t}}else{if(!u){u=new Int8Array(128).fill(-1);for(let e=0;e<16;e++){let t=e.toString(16);u[t.charCodeAt(0)]=u[t.toUpperCase().charCodeAt(0)]=e}}let t=0;for(let n=0;n<r;n++){let r=e.charCodeAt(t++),a=e.charCodeAt(t++),o=u[r]<<4|u[a];if(o<0||(127|r|a)!=127)throw SyntaxError(m);i[n]=o}}return i}var{toHex:_}=Uint8Array.prototype;function v(e){return a(e),e.length===0?``:_&&e.toHex===_?e.toHex():h(e)}var y=Uint8Array.fromHex?(e,t=`uint8`)=>s(Uint8Array.fromHex(e),t):(e,t=`uint8`)=>s(g(e),t);export{v as a,y as b};
@@ -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-2K6UN3PC.js";import{c}from"./chunk-HT2SSA3V.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-SXV2T5C4.js";import{a as _}from"./chunk-TUII34K2.js";function v(e,t){let n=s([{groups:[e],tree:t.tree,treeDependencies:t.treeDependencies}]);for(let r of e)l(r,t),r.isApp??=g(r,r.source??t.source),r._depsDirectory=n}function y(e,t){return!(e.isApp??g(e,e._source??e.source))&&o(e.file,e._depsDirectory??t??s([{groups:[[e]]}]))}function ee(e,n,r){let i=t(n);return i===`ignored`&&y(e,r)?void 0:i}function b(e,n,a,o){let s=n.id??String(n._id),c=n._reportName??``;y(n,o)&&(a===`ignored`||a===`untriaged`)?(t(e.get(s))!==`ignored`&&r(e,s,{triage:void 0}),i(e,s,c,a===`ignored`,!0)):(r(e,s,{triage:a===`untriaged`?void 0:a}),a!==`ignored`&&a!==`untriaged`&&i(e,s,c,!1))}function x(e,a){let o=new Set;for(let t of e.values()){let e=t?.ignoredReports;if(!e?.length)continue;let r=new Set(e).size!==e.length;for(let i of e)(r||!n(t,i))&&o.add(i)}if(o.size===0)return!1;let c=!1;for(let l of a){let a=(l.groups??[]).flat();if(!a.some(e=>o.has(e._reportName??l.name??l.fileName??``)))continue;let u=s([l]),d=e=>({...e,_source:e._source??e.source??l.source}),f=new Set(a.filter(e=>y(d(e),u)).map(e=>e.id??String(e._id)));for(let o of a){let a=o.id??String(o._id),s=o._reportName??l.name??l.fileName??``,p=e.get(a);p?.ignoredReports?.includes(s)&&(n(p,s)||y(d(o),u)||(t(p)||(c=r(e,a,{triage:`ignored`})||c),f.has(a)||(c=i(e,a,s,!1)||c)))}for(let t of a){if(!y(d(t),u))continue;let n=t.id??String(t._id),r=t._reportName??l.name??l.fileName??``;e.get(n)?.ignoredReports?.includes(r)&&(c=i(e,n,r,!0,!0)||c)}}return c}async function S(e,t){let r=new Set(Object.values(e??{}).flatMap(e=>Array.isArray(e?.ignoredReports)?e.ignoredReports.filter(t=>typeof t==`string`&&!n(e,t)):[])),i=[];for(let e of r){let n;try{let r=await t(e);if(typeof r!=`string`)continue;n=await h(r)}catch{continue}n&&i.push({...n.data,name:e,groups:[n.findings]})}return i}async function C(e,t){if(e!=null&&(typeof e!=`object`||Array.isArray(e)))return{entries:e,changed:!1};let n=new Map(Object.entries(e??{})),r=x(n,await S(e,t));return{entries:Object.fromEntries(n),changed:r}}var w=`links`;function T(e){if(typeof e==`string`)return e.length>0?e:null;if(!e||typeof e!=`object`||Array.isArray(e))return null;let{id:t}=e;return typeof t==`string`&&t.length>0?t:null}function E(e){if(typeof e==`string`&&!/^\s*\[/u.test(e))return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Array.isArray(t)||t.length===0)return null;let n=[],r=0;for(let e of t){if(!Array.isArray(e))return null;let t=new Set;for(let n of e){let e=T(n);if(e===null)return null;c(e)?t.add(e):r++}t.size>1&&n.push([...t])}return{groups:n,skipped:r}}function D(e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t.size}function te(e,t){for(let n of e)for(let e of n){let r=t.get(e);r||t.set(e,r=new Set);for(let t of n)t!==e&&r.add(t)}return t}var O=1,k=16,A=12,j=1+k+A+16,M=1+k+A;async function N(e,t){let n=await crypto.subtle.importKey(`raw`,_(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:3e6},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}function P(e){return!(e instanceof Uint8Array)||e.length<j?!1:e[0]===O}async function F(e,t){if(!(e instanceof Uint8Array))throw TypeError(`encryptWithPassword: plaintext Uint8Array required`);if(typeof t!=`string`||!t)throw TypeError(`encryptWithPassword: password required`);let n=new Uint8Array(M+e.length+16);n[0]=O,crypto.getRandomValues(n.subarray(1,1+k)),crypto.getRandomValues(n.subarray(1+k,M));let r=n.subarray(1,1+k),i=n.subarray(1+k,M),a=await N(t,r),o=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:i,additionalData:n.subarray(0,M)},a,e));return n.set(o,M),n}async function ne(e,t){if(typeof t!=`string`||!t)throw TypeError(`tryDecryptWithPassword: password required`);if(!(e instanceof Uint8Array)||e.length<j||e[0]!==O)return{ok:!1,reason:`malformed`};let n=e.subarray(1,1+k),r=e.subarray(1+k,M),i=e.subarray(M),a=await N(t,n),o;try{o=new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:e.subarray(0,M)},a,i))}catch{return{ok:!1,reason:`wrong-password`}}return{ok:!0,plaintext:o}}async function I(e,t,n){if(!n||typeof n.malformedMsg!=`string`||typeof n.wrongPasswordMsg!=`string`)throw TypeError(`decryptWithPasswordOrThrow: { malformedMsg, wrongPasswordMsg } strings required`);let r=await ne(e,t);if(r.ok)return r.plaintext;throw r.reason===`wrong-password`?Error(n.wrongPasswordMsg):Error(n.malformedMsg)}var L=P,R=F;function z(e,t){return I(e,t,{malformedMsg:`malformed encrypted bundle`,wrongPasswordMsg:`wrong password or corrupt bundle`})}var B=1,V=1024,H=1024,U=200,W=104857600,G=Math.ceil(W*4/3)+16,K=512,q=64;function J(e){if(!e||typeof e!=`object`)return`payload is not an object`;if(e.version!==B)return`unsupported export version: ${e.version}`;if(!e.workspace||typeof e.workspace!=`object`)return`workspace metadata missing`;if(typeof e.workspace.id!=`string`)return`workspace.id must be a string`;if(typeof e.workspace.name!=`string`)return`workspace.name must be a string`;if(typeof e.workspace.privateKey!=`string`)return`workspace.privateKey must be a string`;if(e.workspace.createdAt!==void 0&&!Number.isFinite(e.workspace.createdAt))return`workspace.createdAt must be a finite number or omitted`;if(!Array.isArray(e.reports))return`reports field must be an array`;if(e.reports.length>H)return`reports count (${e.reports.length}) exceeds cap (${H})`;if(e.bundles!==void 0){if(!Array.isArray(e.bundles))return`bundles field must be an array when present`;if(e.bundles.length>V)return`bundles count (${e.bundles.length}) exceeds cap (${V})`;for(let t of e.bundles){if(typeof t!=`string`)return`bundles entries must be strings`;if(t.length>U)return`bundle integrity exceeds per-entry length cap (${U})`}}if(e.bundleBlobs!==void 0){if(!Array.isArray(e.bundleBlobs))return`bundleBlobs field must be an array when present`;if(e.bundleBlobs.length>q)return`bundleBlobs count (${e.bundleBlobs.length}) exceeds cap (${q})`;for(let t of e.bundleBlobs){if(!t||typeof t!=`object`||Array.isArray(t))return`bundleBlobs entries must be objects`;if(typeof t.integrity!=`string`||t.integrity.length===0)return`bundleBlobs.integrity must be a non-empty string`;if(t.integrity.length>U)return`bundleBlobs.integrity exceeds per-entry length cap (${U})`;if(typeof t.name!=`string`||t.name.length===0)return`bundleBlobs.name must be a non-empty string`;if(t.name.length>K)return`bundleBlobs.name exceeds per-entry length cap (${K})`;if(t.name.includes(`\0`))return`bundleBlobs.name cannot contain NUL`;if(typeof t.data!=`string`)return`bundleBlobs.data must be a base64 string`;if(t.data.length>G)return`bundleBlobs.data exceeds per-blob size cap (${W} bytes raw)`}}return null}async function Y(e){return new Uint8Array(await e.arrayBuffer())}async function X(e,t){if(L(e)){if(typeof t!=`string`||!t)throw TypeError(`parseWorkspaceBundleBytes: password required for encrypted bundle`);let n=await z(e,t);try{return Z(await a(n))}catch(e){throw Error(`wrong password or corrupt bundle`,{cause:e})}}let n;try{n=await a(e)}catch(e){throw Error(`gzip decompression failed: ${e.message}`,{cause:e})}return Z(n)}function Z(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`payload is not JSON: ${e.message}`,{cause:e})}let n=J(t);if(n===null)return t;let r=n.includes(`exceeds cap`);throw Error(r?n:`not a deepview workspace export: ${n}`)}function Q(e,t){let n=e.trimStart().startsWith(`[`)?E(e):null;if(n)return{data:{source:`links`,findings:[],links:n.groups},format:`links`,reason:null};let r=m(e);if(r.data!=null||p(e,t)!==`codex`)return r;try{return{data:{type:`security`,source:`codex-security`,findings:d(e).flatMap(e=>e.data.findings)},format:`codex`,reason:null}}catch(e){return{data:null,format:null,reason:e instanceof Error?e.message:`Invalid Codex CSV`}}}function re(e,t){let n=Q(e,t);return n.data==null?Promise.resolve(null):h(JSON.stringify(n.data))}function ie(e){let t=new Set;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;typeof e.file==`string`&&e.file&&t.add(e.file);for(let n of Array.isArray(e.evidence)?e.evidence:[])typeof n?.file==`string`&&n.file&&t.add(n.file)}return t}function $(e){let t=(f(e)??[]).flat().filter(e=>typeof e==`object`&&!!e),n=s([{groups:[t],tree:e?.tree}]);return{directory:n,own:t.filter(e=>!o(e.file,n))}}function ae(e){let t=new Map;for(let n of $(e).own){let e=u(n);e&&t.set(e.toLowerCase(),e)}return t.size===1?[...t.values()][0]:null}function oe(t){let{directory:n,own:r}=$(t);return e([...ie(r)].filter(e=>!o(e,n)))}var se=[`inprogress`,`fixed`,`invalid`,`deleted`,`ignored`];function ce(e){return typeof e==`string`&&se.includes(e)}function le(e){if(e===null)return null;if(typeof e!=`object`||Array.isArray(e))return`invalid`;let t=e,n={},r=t.color;if(r!=null){if(typeof r!=`string`||r.length>50)return`invalid`;r!==``&&(n.color=r)}let i=t.triage;if(i!=null){if(!ce(i))return`invalid`;n.triage=i}for(let e of[`comment`,`fix`]){let r=t[e];if(r!=null){if(typeof r!=`string`||r.length>1e4)return`invalid`;r!==``&&(n[e]=r)}}let a=t.flagged;if(a!=null){if(typeof a!=`boolean`)return`invalid`;n.flagged=a}return n}export{v as a,y as b,ee as c,b as d,x as e,S as f,C as g,w as h,E as i,D as j,te as k,F as l,I as m,L as n,R as o,H as p,Y as q,X as r,Z as s,Q as t,re as u,ae as v,oe as w,le as x};
1
+ import{b as e}from"./chunk-NRPC74AM.js";import{a as t,d as n,f as r,h as i}from"./chunk-7C7DWL7I.js";import{d as a}from"./chunk-PNHBZGDD.js";import{a as o,b as s}from"./chunk-2K6UN3PC.js";import{c}from"./chunk-HT2SSA3V.js";import{C as l,D as u,G as d,J as f,K as p,L as m,O as h,q as g}from"./chunk-QRKFPLA4.js";import{a as _}from"./chunk-TUII34K2.js";function v(e,t){let n=s([{groups:[e],tree:t.tree,treeDependencies:t.treeDependencies}]);for(let r of e)l(r,t),r.isApp??=g(r,r.source??t.source),r._depsDirectory=n}function y(e,t){return!(e.isApp??g(e,e._source??e.source))&&o(e.file,e._depsDirectory??t??s([{groups:[[e]]}]))}function ee(e,n,r){let i=t(n);return i===`ignored`&&y(e,r)?void 0:i}function b(e,n,a,o){let s=n.id??String(n._id),c=n._reportName??``;y(n,o)&&(a===`ignored`||a===`untriaged`)?(t(e.get(s))!==`ignored`&&r(e,s,{triage:void 0}),i(e,s,c,a===`ignored`,!0)):(r(e,s,{triage:a===`untriaged`?void 0:a}),a!==`ignored`&&a!==`untriaged`&&i(e,s,c,!1))}function x(e,a){let o=new Set;for(let t of e.values()){let e=t?.ignoredReports;if(!e?.length)continue;let r=new Set(e).size!==e.length;for(let i of e)(r||!n(t,i))&&o.add(i)}if(o.size===0)return!1;let c=!1;for(let l of a){let a=(l.groups??[]).flat();if(!a.some(e=>o.has(e._reportName??l.name??l.fileName??``)))continue;let u=s([l]),d=e=>({...e,_source:e._source??e.source??l.source}),f=new Set(a.filter(e=>y(d(e),u)).map(e=>e.id??String(e._id)));for(let o of a){let a=o.id??String(o._id),s=o._reportName??l.name??l.fileName??``,p=e.get(a);p?.ignoredReports?.includes(s)&&(n(p,s)||y(d(o),u)||(t(p)||(c=r(e,a,{triage:`ignored`})||c),f.has(a)||(c=i(e,a,s,!1)||c)))}for(let t of a){if(!y(d(t),u))continue;let n=t.id??String(t._id),r=t._reportName??l.name??l.fileName??``;e.get(n)?.ignoredReports?.includes(r)&&(c=i(e,n,r,!0,!0)||c)}}return c}async function S(e,t){let r=new Set(Object.values(e??{}).flatMap(e=>Array.isArray(e?.ignoredReports)?e.ignoredReports.filter(t=>typeof t==`string`&&!n(e,t)):[])),i=[];for(let e of r){let n;try{let r=await t(e);if(typeof r!=`string`)continue;n=await h(r)}catch{continue}n&&i.push({...n.data,name:e,groups:[n.findings]})}return i}async function C(e,t){if(e!=null&&(typeof e!=`object`||Array.isArray(e)))return{entries:e,changed:!1};let n=new Map(Object.entries(e??{})),r=x(n,await S(e,t));return{entries:Object.fromEntries(n),changed:r}}var w=`links`;function T(e){if(typeof e==`string`)return e.length>0?e:null;if(!e||typeof e!=`object`||Array.isArray(e))return null;let{id:t}=e;return typeof t==`string`&&t.length>0?t:null}function E(e){if(typeof e==`string`&&!/^\s*\[/u.test(e))return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Array.isArray(t)||t.length===0)return null;let n=[],r=0;for(let e of t){if(!Array.isArray(e))return null;let t=new Set;for(let n of e){let e=T(n);if(e===null)return null;c(e)?t.add(e):r++}t.size>1&&n.push([...t])}return{groups:n,skipped:r}}function D(e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t.size}function te(e,t){for(let n of e)for(let e of n){let r=t.get(e);r||t.set(e,r=new Set);for(let t of n)t!==e&&r.add(t)}return t}var O=1,k=16,A=12,j=1+k+A+16,M=1+k+A;async function N(e,t){let n=await crypto.subtle.importKey(`raw`,_(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:3e6},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}function P(e){return!(e instanceof Uint8Array)||e.length<j?!1:e[0]===O}async function F(e,t){if(!(e instanceof Uint8Array))throw TypeError(`encryptWithPassword: plaintext Uint8Array required`);if(typeof t!=`string`||!t)throw TypeError(`encryptWithPassword: password required`);let n=new Uint8Array(M+e.length+16);n[0]=O,crypto.getRandomValues(n.subarray(1,1+k)),crypto.getRandomValues(n.subarray(1+k,M));let r=n.subarray(1,1+k),i=n.subarray(1+k,M),a=await N(t,r),o=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:i,additionalData:n.subarray(0,M)},a,e));return n.set(o,M),n}async function ne(e,t){if(typeof t!=`string`||!t)throw TypeError(`tryDecryptWithPassword: password required`);if(!(e instanceof Uint8Array)||e.length<j||e[0]!==O)return{ok:!1,reason:`malformed`};let n=e.subarray(1,1+k),r=e.subarray(1+k,M),i=e.subarray(M),a=await N(t,n),o;try{o=new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:e.subarray(0,M)},a,i))}catch{return{ok:!1,reason:`wrong-password`}}return{ok:!0,plaintext:o}}async function I(e,t,n){if(!n||typeof n.malformedMsg!=`string`||typeof n.wrongPasswordMsg!=`string`)throw TypeError(`decryptWithPasswordOrThrow: { malformedMsg, wrongPasswordMsg } strings required`);let r=await ne(e,t);if(r.ok)return r.plaintext;throw r.reason===`wrong-password`?Error(n.wrongPasswordMsg):Error(n.malformedMsg)}var L=P,R=F;function z(e,t){return I(e,t,{malformedMsg:`malformed encrypted bundle`,wrongPasswordMsg:`wrong password or corrupt bundle`})}var B=1,V=1024,H=1024,U=200,W=104857600,G=Math.ceil(W*4/3)+16,K=512,q=64;function J(e){if(!e||typeof e!=`object`)return`payload is not an object`;if(e.version!==B)return`unsupported export version: ${e.version}`;if(!e.workspace||typeof e.workspace!=`object`)return`workspace metadata missing`;if(typeof e.workspace.id!=`string`)return`workspace.id must be a string`;if(typeof e.workspace.name!=`string`)return`workspace.name must be a string`;if(typeof e.workspace.privateKey!=`string`)return`workspace.privateKey must be a string`;if(e.workspace.createdAt!==void 0&&!Number.isFinite(e.workspace.createdAt))return`workspace.createdAt must be a finite number or omitted`;if(!Array.isArray(e.reports))return`reports field must be an array`;if(e.reports.length>H)return`reports count (${e.reports.length}) exceeds cap (${H})`;if(e.bundles!==void 0){if(!Array.isArray(e.bundles))return`bundles field must be an array when present`;if(e.bundles.length>V)return`bundles count (${e.bundles.length}) exceeds cap (${V})`;for(let t of e.bundles){if(typeof t!=`string`)return`bundles entries must be strings`;if(t.length>U)return`bundle integrity exceeds per-entry length cap (${U})`}}if(e.bundleBlobs!==void 0){if(!Array.isArray(e.bundleBlobs))return`bundleBlobs field must be an array when present`;if(e.bundleBlobs.length>q)return`bundleBlobs count (${e.bundleBlobs.length}) exceeds cap (${q})`;for(let t of e.bundleBlobs){if(!t||typeof t!=`object`||Array.isArray(t))return`bundleBlobs entries must be objects`;if(typeof t.integrity!=`string`||t.integrity.length===0)return`bundleBlobs.integrity must be a non-empty string`;if(t.integrity.length>U)return`bundleBlobs.integrity exceeds per-entry length cap (${U})`;if(typeof t.name!=`string`||t.name.length===0)return`bundleBlobs.name must be a non-empty string`;if(t.name.length>K)return`bundleBlobs.name exceeds per-entry length cap (${K})`;if(t.name.includes(`\0`))return`bundleBlobs.name cannot contain NUL`;if(typeof t.data!=`string`)return`bundleBlobs.data must be a base64 string`;if(t.data.length>G)return`bundleBlobs.data exceeds per-blob size cap (${W} bytes raw)`}}return null}async function Y(e){return new Uint8Array(await e.arrayBuffer())}async function X(e,t){if(L(e)){if(typeof t!=`string`||!t)throw TypeError(`parseWorkspaceBundleBytes: password required for encrypted bundle`);let n=await z(e,t);try{return Z(await a(n))}catch(e){throw Error(`wrong password or corrupt bundle`,{cause:e})}}let n;try{n=await a(e)}catch(e){throw Error(`gzip decompression failed: ${e.message}`,{cause:e})}return Z(n)}function Z(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`payload is not JSON: ${e.message}`,{cause:e})}let n=J(t);if(n===null)return t;let r=n.includes(`exceeds cap`);throw Error(r?n:`not a deepview workspace export: ${n}`)}function Q(e,t){let n=e.trimStart().startsWith(`[`)?E(e):null;if(n)return{data:{source:`links`,findings:[],links:n.groups},format:`links`,reason:null};let r=m(e);if(r.data!=null||p(e,t)!==`codex`)return r;try{return{data:{type:`security`,source:`codex-security`,findings:d(e).flatMap(e=>e.data.findings)},format:`codex`,reason:null}}catch(e){return{data:null,format:null,reason:e instanceof Error?e.message:`Invalid Codex CSV`}}}function re(e,t){let n=Q(e,t);return n.data==null?Promise.resolve(null):h(JSON.stringify(n.data))}function ie(e){let t=new Set;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;typeof e.file==`string`&&e.file&&t.add(e.file);for(let n of Array.isArray(e.evidence)?e.evidence:[])typeof n?.file==`string`&&n.file&&t.add(n.file)}return t}function $(e){let t=(f(e)??[]).flat().filter(e=>typeof e==`object`&&!!e),n=s([{groups:[t],tree:e?.tree}]);return{directory:n,own:t.filter(e=>!o(e.file,n))}}function ae(e){let t=new Map;for(let n of $(e).own){let e=u(n);e&&t.set(e.toLowerCase(),e)}return t.size===1?[...t.values()][0]:null}function oe(t){let{directory:n,own:r}=$(t);return e([...ie(r)].filter(e=>!o(e,n)))}var se=[`inprogress`,`fixed`,`invalid`,`deleted`,`ignored`];function ce(e){return typeof e==`string`&&se.includes(e)}function le(e){if(e===null)return null;if(typeof e!=`object`||Array.isArray(e))return`invalid`;let t=e,n={},r=t.color;if(r!=null){if(typeof r!=`string`||r.length>50)return`invalid`;r!==``&&(n.color=r)}let i=t.triage;if(i!=null){if(!ce(i))return`invalid`;n.triage=i}for(let e of[`comment`,`fix`]){let r=t[e];if(r!=null){if(typeof r!=`string`||r.length>1e4)return`invalid`;r!==``&&(n[e]=r)}}let a=t.flagged;if(a!=null){if(typeof a!=`boolean`)return`invalid`;n.flagged=a}return n}export{v as a,y as b,ee as c,b as d,x as e,S as f,C as g,w as h,E as i,D as j,te as k,F as l,I as m,L as n,R as o,H as p,Y as q,X as r,Z as s,Q as t,re as u,ae as v,oe as w,le as x};
@@ -0,0 +1,9 @@
1
+ import{a as e,b as t,c as n,n as r}from"./chunk-JMG5DXII.js";var i=class extends n{};function a(e,t,n){if(!e)throw new i(typeof n==`function`?n():n,t.line)}var o=/^(\d{4})-(\d\d)-(\d\d)([Tt])(\d\d):(\d\d):(\d\d)(\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))$/u,s=/^(?:\d{4}-\d\d-\d\d(?:[Tt]\d\d:\d\d:\d\d(?:\.\d+)?)?|\d\d:\d\d:\d\d(?:\.\d+)?)$/u,c=/^(?:\d{4}-\d\d-\d\d[Tt])?\d\d:\d\d(?:[Zz]|[+-]\d\d:\d\d)?$/u,l=[31,28,31,30,31,30,31,31,30,31,30,31];function u(e){let t=o.exec(e);if(t===null)return;let[n,r,i,a,s,c]=[t[1],t[2],t[3],t[5],t[6],t[7]].map(Number),u=n%4==0&&n%100!=0||n%400==0;if(r<1||r>12||i<1||i>(r===2&&u?29:l[r-1])||a>23||s>59||c>60||t[10]!==void 0&&(Number(t[11])>23||Number(t[12])>59))return;let d=[];(t[4]===`t`||t[9]===`z`)&&d.push(`a date-time with a lower-case "t" or "z" is not supported`),n===0&&d.push(`the year 0000 is not supported`),c===60&&d.push(`a leap second is not supported`);let f=t[10]===void 0?0:(t[10]===`-`?-1:1)*(Number(t[11])*60+Number(t[12]));return{year:n,month:r,day:i,hour:a,minute:s,second:c,fraction:t[8]?.slice(1)??``,offset:f,unsupported:d}}var d=class{constructor(e){if(typeof e!=`string`||u(e)?.unsupported.length!==0)throw TypeError(`expected an RFC 3339 offset date-time`);this.text=e,Object.freeze(this)}toString(){return this.text}toJSON(){return this.text}toDate(){let{year:e,month:t,day:n,hour:r,minute:i,second:a,fraction:o,offset:s}=u(this.text),c=new Date(0);return c.setUTCFullYear(e,t-1,n),c.setUTCHours(r,i-s,a,Number(o.padEnd(3,`0`).slice(0,3))),c}},f=e=>u(e)?.unsupported.length===0;function ee(e,n){if(!/^(?:\d{4}-\d\d-\d\d|\d\d:\d\d)/u.test(e))return;let r=u(e);if(r?.unsupported.length===0)return new d(e);throw a(!(/^\d{4}-\d\d-\d\d$/u.test(e)&&/^ \d\d:/u.test(n.text.slice(n.pos,n.pos+4))),n,`a date-time with a space in place of "T" is not supported`),a(!s.test(e),n,()=>`local dates and times are not supported: ${t(e)}`),a(!c.test(e),n,()=>`a date-time or a time without seconds is not supported: ${t(e)}`),a(r?.unsupported.length!==1,n,()=>`${r.unsupported[0]}: ${t(e)}`),new i(`${t(e)} is not a date-time of the form YYYY-MM-DDTHH:MM:SS[.fraction](Z|\xB1HH:MM)`,n.line)}var p=/^[+-]?(?:0|[1-9](?:_?\d)*)$/u,m=/^0(?:x[\dA-Fa-f](?:_?[\dA-Fa-f])*|o[0-7](?:_?[0-7])*|b[01](?:_?[01])*)$/u,h=/^[+-]?(?:inf|nan|(?:0|[1-9](?:_?\d)*)(?:\.\d(?:_?\d)*(?:[Ee][+-]?\d(?:_?\d)*)?|[Ee][+-]?\d(?:_?\d)*))$/u,g=2n**63n,_=BigInt(2**53-1),te={__proto__:null,x:16,o:21,b:63};function v(e,n){let r=p.test(e);if(!r&&!m.test(e))return;let i=e.replaceAll(`_`,``),o=r?i.replace(/^[+-]/u,``):i.slice(2).replace(/^0+/u,``),s=o.length<=(r?19:te[i[1]])?BigInt(r?i:`${i.slice(0,2)}${o||`0`}`):void 0;return a(s!==void 0&&s>=-g&&s<g,n,()=>`integer out of range ${t(e)}`),s>=-_&&s<=_?Number(s):s}var y={__proto__:null,inf:1/0,"+inf":1/0,"-inf":-1/0,nan:NaN,"+nan":NaN,"-nan":NaN};function b(e){if(typeof e!=`string`||!h.test(e))return;if(e in y)return y[e];let t=Number(e.replaceAll(`_`,``)),n=!/[1-9]/u.test(e.split(/[Ee]/u)[0]);return Number.isFinite(t)&&(t!==0||n)?t:null}var x=class{constructor(e){let t=b(e);if(t==null)throw TypeError(`expected a TOML float that a double can hold`);this.text=e,this.value=t,Object.freeze(this)}valueOf(){return this.value}toString(){return this.text}toJSON(){return this.value}};function S(e,n){let r=b(e);if(r!==void 0)return a(r!==null,n,()=>`float out of range ${t(e)}`),new x(e)}var C=64;function w(e){for(;e.text[e.pos]===` `||e.text[e.pos]===` `;)e.pos++}function T(e){if(e.pos>=e.text.length)return`the end of the text`;let n=/^[^\n]*/u.exec(e.text.slice(e.pos,e.pos+64+1))[0].replace(/\r$/u,``);return n===``?`the end of the line`:t(n)}var E=`a carriage return must be followed by a line feed`;function D(t,n,r){throw new i(n===`\r`?E:`${e(n)} is not allowed in ${r}`,t.line)}var O=e=>e.pos>=e.text.length||e.text[e.pos]===`
2
+ `||e.text.startsWith(`\r
3
+ `,e.pos),k=/#[^[\p{Cc}--[\t\u0080-\u009F]]]*/vy;function A(e){e.text[e.pos]===`#`&&(r(e,k),O(e)||D(e,e.text[e.pos],`a comment`))}function j(e){if(e.text[e.pos]===`
4
+ `)e.pos+=1;else if(e.text.startsWith(`\r
5
+ `,e.pos))e.pos+=2;else return!1;return e.line++,!0}function M(e){do w(e),A(e);while(j(e))}var N={__proto__:null,b:`\b`,t:` `,n:`
6
+ `,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`},ne={__proto__:null,'"':/[^"\\[\p{Cc}--[\t\u0080-\u009F]]]*/vy,"'":/[^'[\p{Cc}--[\t\u0080-\u009F]]]*/vy},re=/u([\dA-Fa-f]{4})|U([\dA-Fa-f]{8})/uy;function P(e){let n=e.text[e.pos];if(n in N)return N[e.text[e.pos++]];let i=r(e,re);a(i!==null,e,()=>`unsupported escape ${t(`\\${n??``}`)}`);let o=Number.parseInt(i[1]??i[2],16);return a(o<=1114111&&(o<55296||o>57343),e,()=>`\\${i[0]} is not a Unicode scalar value`),String.fromCodePoint(o)}var ie=/[\t ]*\r?\n(?:[\t ]|\r?\n)*/uy;function ae(e){let t=r(e,ie);return t===null?P(e):(e.line+=t[0].split(`
7
+ `).length-1,``)}var F=(e,t)=>e.text[e.pos+1]===t&&e.text[e.pos+2]===t,I={__proto__:null,'"':/"/uy,"'":/'/uy,'"""':/"{3,5}/uy,"'''":/'{3,5}/uy};function L(e,t){let n=F(e,t),i=I[n?t.repeat(3):t];e.pos+=n?3:1,n&&j(e);let o=``;for(;;){if(o+=r(e,ne[t])[0],n&&j(e)){o+=`
8
+ `;continue}a(!O(e),e,`unterminated string`);let s=r(e,i);if(s!==null)return o+s[0].slice(3);let c=e.text[e.pos++];c===t?o+=c:c===`\\`?o+=n?ae(e):P(e):D(e,c,`a string`)}}var R=/[\w-]+/uy;function z(e){let t=e.text[e.pos];if(t===`"`||t===`'`)return a(!F(e,t),e,`a multi-line string cannot be a key`),L(e,t);let n=r(e,R);return a(n!==null,e,()=>`expected a key, found ${T(e)}`),n[0]}function B(e){let t=[z(e)];for(;;){if(w(e),e.text[e.pos]!==`.`)return t;e.pos++,w(e),t.push(z(e)),a(t.length<=C,e,`a key with too many parts`)}}var V=/[\w+.:-]+/uy;function H(e){let n=r(e,V);a(n!==null,e,()=>`expected a value, found ${T(e)}`);let i=n[0];if(i===`true`)return!0;if(i===`false`)return!1;let o=v(i,e)??S(i,e)??ee(i,e);return a(o!==void 0,e,()=>`expected a value, found ${t(i)}`),o}function U(e,n,r,i){a(n[r]===void 0,e,()=>`duplicate key ${t(r)}`),n[r]=i}function W(e,t){let n=B(e);return a(e.text[e.pos]===`=`,e,()=>`expected "=" after the key, found ${T(e)}`),e.pos++,w(e),{header:!1,keys:n,value:X(e,t)}}function G(e,t){e.pos++;let n=[];for(M(e);e.text[e.pos]!==`]`&&(n.push(X(e,t+1)),M(e),e.text[e.pos]!==`]`);M(e))a(e.text[e.pos]===`,`,e,()=>`expected "," or "]", found ${T(e)}`),e.pos++;return e.pos++,n}var K=e=>typeof e==`object`&&!!e&&Object.getPrototypeOf(e)===null,q=new WeakSet,oe=e=>q.has(e);function J(e,t,n,r,i,o){let s=t;for(let t of r.slice(0,-1)){t in s||n.add(s[t]=Object.create(null));let r=s[t];a(n.has(r),e,()=>o(t,r)),s=r}U(e,s,r.at(-1),i)}var se=e=>Array.isArray(e)?`an array`:K(e)?`an inline table`:`a value`,ce=(e,n)=>`${t(e)} is ${se(n)}, which a dotted key cannot add to`;function Y(e){w(e),a(!O(e)&&e.text[e.pos]!==`#`,e,`an inline table across lines is not supported`)}function le(e,t){e.pos++;let n=Object.create(null);q.add(n);let r=new Set;if(Y(e),e.text[e.pos]===`}`)e.pos++;else do{Y(e),a(e.text[e.pos]!==`}`,e,`a trailing comma in an inline table is not supported`);let{keys:i,value:o}=W(e,t+1);J(e,n,r,i,o,ce),Y(e);let s=e.text[e.pos];a(s===`,`||s===`}`,e,()=>`expected "," or "}" on the inline table's line, found ${T(e)}`)}while(e.text[e.pos++]===`,`);return n}function X(e,t){a(t<=C,e,`nested too deep`);let n=e.text[e.pos];return n===`"`||n===`'`?L(e,n):n===`[`?G(e,t):n===`{`?le(e,t):H(e)}function ue(e){let t=e.text.startsWith(`[[`,e.pos);e.pos+=t?2:1,w(e);let n=B(e),r=t?`]]`:`]`;return a(e.text.startsWith(r,e.pos),e,()=>`expected "${r}", found ${T(e)}`),e.pos+=r.length,{header:!0,keys:n,array:t}}function de(e){w(e);let t=e.text[e.pos];if(t===`[`)return ue(e);if(!(t===`#`||t===`\r`||O(e)))return W(e,0)}function fe(e){if(w(e),A(e),!(j(e)||e.pos===e.text.length))throw a(e.text[e.pos]!==`\r`,e,E),new i(`expected the end of the line, found ${T(e)}`,e.line)}function Z(e,t){return e.arrays.has(t)?`an array of tables`:Array.isArray(t)?`an array`:K(t)?e.fixed.has(t)?`an inline table`:`a table`:`a value`}var Q=e=>t(e.join(`.`));function pe(e,n,r){let i=e.root;for(let o of r){o in i||e.implicit.add(i[o]=Object.create(null));let r=e.arrays.has(i[o])?i[o].at(-1):i[o];a(K(r)&&!e.fixed.has(r),n,()=>`${t(o)} is ${Z(e,r)}, which a header cannot add to`),i=r}return i}function $(e,t,n,r){e.pending.clear();let i=pe(e,t,n.slice(0,-1)),o=n.at(-1);if(r){o in i||e.arrays.add(i[o]=[]),a(e.arrays.has(i[o]),t,()=>`${Q(n)} is ${Z(e,i[o])}, not an array of tables`),i[o].push(e.current=Object.create(null));return}o in i?a(e.implicit.delete(i[o]),t,()=>`${Q(n)} is ${Z(e,i[o])} already`):i[o]=Object.create(null),e.current=i[o]}function me(e,n,r){return!K(r)||e.fixed.has(r)?`${t(n)} is ${Z(e,r)}, which a dotted key cannot add to`:e.implicit.has(r)?`a dotted key through ${t(n)}, a table a header made on its way, is not supported`:`${t(n)} is a table declared elsewhere, which a dotted key cannot add to`}function he(e,t,n,r){J(t,e.current,e.pending,n,r,(t,n)=>me(e,t,n)),K(r)&&e.fixed.add(r)}var ge={__proto__:null,"":`a byte order mark is not read`,"�":`U+FFFD is not supported: a decoder puts it where bytes are not UTF-8`};function _e(e){if(typeof e!=`string`)throw TypeError(`expected a string`);let t=/\p{Cs}|^\uFEFF|\uFFFD/u.exec(e);if(t===null)return;let n=e.slice(0,t.index).split(`
9
+ `).length-1;throw new i(ge[t[0]]??`a lone surrogate is not well-formed Unicode`,n)}function ve(e){_e(e);let t=Object.create(null),n={text:e,pos:0,line:0},r={root:t,current:t,implicit:new Set,pending:new Set,arrays:new Set,fixed:new Set};for(;n.pos<e.length;){let e=de(n);e?.header===!0?$(r,n,e.keys,e.array):e!==void 0&&he(r,n,e.keys,e.value),fe(n)}return t}export{i as a,d as b,f as c,x as d,K as e,oe as f,ve as g};
@@ -0,0 +1,6 @@
1
+ import{a as e}from"./chunk-QRKFPLA4.js";import{b as t}from"./chunk-TUII34K2.js";var n=new Set([`module`,`commonjs`,`json`,`module-typescript`,`commonjs-typescript`]),r=new Set([`solidity`,`php`,`shell`,`rust`]),i=new Set([`java`,`kotlin`,`gradle`,`objc`,`objcpp`,`swift`,`c`,`cpp`,`c-header`,`cpp-header`,`ruby`,`python`,`cmake`,`podspec`,`podfile`,`podfile-lock`,`template`,`xml`,`env`,`fastlane`,`pbxproj`]),a=new Set([`resource`,`resource:base64`]),o=new Set([`stat:file`,`stat:directory`]),s=new Set([...n,...r,...i,...a,`patch`,`directory`,...o]),c=e=>o.has(e),l=e=>e===`directory`||e===`stat:directory`?`directory`:`file`;function u(e,t,n){if(e===t)return e;let r=c(e);if(r!==c(t)&&l(e)===l(t))return r?t:e;throw Error(`format conflict for '${n}' ('${t}' vs '${e}')`)}function d(e,t){return t===``?e:e===`.`?t:`${e}/${t}`}var f=/^(?=[A-Za-z0-9-]{1,39}\/)[A-Za-z0-9](?:-?[A-Za-z0-9])*\/(?!\.\.?$)[\w.-]{1,100}$/u,p=/^(?!\.\.?(?:\/|$))[\w.~@+-]+(?:\/(?!\.\.?(?:\/|$))[\w.~@+-]+)*$/u,m=/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u,h={github:e=>typeof e==`string`&&f.test(e),directory:e=>typeof e==`string`&&e.length<=1024&&(e===``||p.test(e)),commit:e=>typeof e==`string`&&m.test(e)},ee=(e,t)=>e?.toLowerCase()===t?.toLowerCase(),g=(e,t,n)=>{if(e===void 0)return;C(e)||b(!1,`${n} must be an object`);for(let r of Object.keys(e))Object.hasOwn(t,r)||b(!1,`unknown ${n} key '${r}'`);let r=Object.entries(t).map(([t,r])=>typeof r==`object`?[t,g(e[t],r,`${n}.${t}`)]:(e[t]!==void 0&&!r(e[t])&&b(!1,`invalid ${n}.${t}: ${JSON.stringify(e[t])}`),[t,e[t]])).filter(([,e])=>e!==void 0);return r.length===0?void 0:Object.freeze(w(r))},te=(e,t=`bundle repo`)=>g(e,h,t),ne=(e,t)=>t??(O(e)?`npm`:void 0),re=(e,{ecosystem:t,repo:n},r)=>{if(n===void 0)return;ne(e,t)===void 0&&b(!1,`${r}: '${e}' is no dependency's bucket, and carries no repo`);let i=te(n,`${r} module '${e}' repo`);return i?.github===void 0&&b(!1,`${r} module '${e}' repo has no github`),i},ie=e=>typeof e==`string`&&/^[\w.+@/~'!()*-]+$/u.test(e),_={name:ie,version:ie},ae=e=>typeof e==`string`&&e!==``&&!e.includes(`\\`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`),oe=(e,t,n)=>typeof e==`string`&&ae(n)&&e===`${t}/${n}`,v={vendored:()=>!0,subpackages:(e,t,n)=>oe(e.name,t,n)},se=(e,t)=>{for(let n=t.lastIndexOf(`/`);n>0;n=t.lastIndexOf(`/`,n-1))if(Object.hasOwn(e,t.slice(0,n)))return t.slice(0,n)};function ce(e,t){if(e===void 0)return;let n=new Set;for(let r of Object.keys(t)){let t=se(e,r);t!==void 0&&n.add(t)}return n.size===0?void 0:Object.freeze(w(x(n).map(t=>[t,e[t]])))}var le=(e,t,{name:n,ecosystem:r,files:i,[e]:a},o)=>{if(a===void 0)return;ne(t,r)===void 0&&b(!1,`${o}: '${t}' is no dependency's bucket, and carries no ${e}`),C(a)||b(!1,`${o} module '${t}' ${e} must be an object`);let s=w(Object.entries(a).map(([r,i])=>{ae(r)||b(!1,`${o} module '${t}' ${e}: invalid directory ${JSON.stringify(r)}`);let a=g(i,_,`${o} module '${t}' ${e} '${r}'`);return a?.name===void 0&&b(!1,`${o} module '${t}' ${e} '${r}' has no name`),v[e](a,n,r)||b(!1,`${o} module '${t}' ${e} '${r}' is named '${a.name}', not '${n}/${r}'`),[r,a]})),c=ce(s,i);for(let n of Object.keys(s))Object.hasOwn(c??{},n)||b(!1,`${o} module '${t}' ${e} '${n}' holds none of its files`);return c},y=({name:e,version:t,ecosystem:n,repo:r,vendored:i,subpackages:a,files:o})=>({name:e,version:t,...n===void 0?{}:{ecosystem:n},...r===void 0?{}:{repo:r},...i===void 0?{}:{vendored:i},...a===void 0?{}:{subpackages:a},files:o});function ue(e,t){let n=e.repo??t.repo,r=Object.keys(v).filter(n=>t[n]!==void 0&&Object.keys(t[n]).some(t=>!Object.hasOwn(e[n]??{},t)));if(n===e.repo&&r.length===0)return e;let i=w(r.map(n=>[n,Object.freeze(w([...Object.entries(t[n]),...Object.entries(e[n]??{})]))]));return y({...e,repo:n,...i})}var de=(e,t,n,r,i)=>w(Object.keys(v).map(a=>[a,i.includes(a)?le(a,e,{...t,files:n,[a]:ce(t[a],n)},r):void 0]));function fe({name:e,version:t,ecosystem:n,repo:r,vendored:i,subpackages:a,files:o},s,c){return b(n===void 0||typeof n==`string`),o=w(Object.entries(o)),y({name:e,version:t??void 0,ecosystem:n,repo:re(s,{ecosystem:n,repo:r},c),vendored:le(`vendored`,s,{name:e,ecosystem:n,files:o,vendored:i},c),subpackages:le(`subpackages`,s,{name:e,ecosystem:n,files:o,subpackages:a},c),files:o})}function pe(e,{scope:t=`full`}={}){let n=new Set;for(let[r,{files:i}]of e)if(t===`full`||O(r))for(let e of Object.keys(i))n.add(d(r,e));return n}function me(e,{what:t,files:n,formats:r,scope:i}){if(e.includes(`\\`))return`holds a '\\'`;if(E(e))return`escapes the root`;if(i!==`full`&&!O(e))return`is outside node_modules, which a '${i}'-scope ${t} does not record`;if(!n.has(e))return`names no file the ${t} records`;let a=r.get(e);return a===`directory`?`is a directory capture, not a file`:c(a)?`is a payload-free '${a}' record, not a file`:null}function he(e,{what:t,files:n,formats:r,scope:i}){for(let a of e){let e=me(a,{what:t,files:n,formats:r,scope:i});b(e===null,`${t}: executable entry '${a}' ${e}`)}}function ge(e,{what:t,files:n,formats:r,scope:i=`full`}){if(e===void 0)return new Set;let a=`${t}: executable`;b(Array.isArray(e),`${a} must be an array of file paths`);let o=new Set;for(let t of e)b(typeof t==`string`&&t!==``,`${a} entry must be a non-empty string`),b(!o.has(t),`${a} entry '${t}' is listed twice`),o.add(t);return he(o,{what:t,files:n,formats:r,scope:i}),o}function _e(e,{what:t,modules:n,formats:r,scope:i}){if(e.size!==0)return he(e,{what:t,files:pe(n,{scope:i}),formats:r,scope:i}),T(e)}function b(e,t){if(!e)throw Error(t)}var ve=e=>e.slice(e.lastIndexOf(`/`)+1).toLowerCase()===`stasis.lock.json`;function ye(e,t){let n=0;for(;n<e.length&&e[n]===t[n];)n++;let r=e.length-n,i=t.length-n;if(r===0&&i===0)return 0;if(r<2)return i<2&&(e[n]??``)>(t[n]??``)?1:-1;if(i<2)return 1;if(e[n]===`*`)return-1;if(t[n]===`*`||e[n]===`node_modules`)return 1;if(t[n]===`node_modules`)return-1;let a=e.slice(n).join(`\0`),o=t.slice(n).join(`\0`);if(a<o)return-1;if(a>o)return 1;throw Error(`Unreachable`)}var x=(e,t=e=>e)=>Array.from(e,e=>({item:e,segments:t(e).split(`/`)})).toSorted((e,t)=>ye(e.segments,t.segments)).map(({item:e})=>e),S=([e])=>e,C=e=>e&&[null,Object.prototype].includes(Object.getPrototypeOf(e)),w=e=>Object.setPrototypeOf(Object.fromEntries(e),null),T=e=>x(e),be=(e,{sorted:t=!0}={})=>w((t?x(e,S):[...e]).map(([e,n])=>[e,n instanceof Map?be(n,{sorted:t}):n])),xe=(e,t)=>e.get(t)??e.set(t,new Map).get(t),Se=e=>new Map(Object.entries(e).map(([e,t])=>[e,C(t)?Se(t):t]));function E(e){if(e.startsWith(`/`))return!0;if(!e.includes(`..`))return!1;let t=0;for(let n of e.split(`/`))if(n!==`.`&&n!==``){if(n!==`..`)t++;else if(--t<0)return!0}return!1}var Ce=e=>e.includes(`\\`)||E(e),D=(e,t)=>b(!Ce(e),`${t}: path '${e}' escapes the root or holds a '\\'`),we=(e,t)=>b(typeof e==`string`&&e!==``&&!Ce(e),`${t}: invalid entry ${JSON.stringify(e)}`);function Te(e,t){b(Array.isArray(e),`${t}: entries must be an array of file paths`);let n=new Set;for(let r of e)we(r,t),b(!n.has(r),`${t}: entry '${r}' is listed twice`),n.add(r);return n}function Ee(e,t){for(let n of e)we(n,t);return T(e)}function De(e,t){D(e,`formats`),b(s.has(t),`unknown format '${t}' for ${e}`)}function Oe(e){b(C(e));let t=new Map;for(let[n,r]of Object.entries(e)){De(n,r);let e=n===``?`.`:n;b(!t.has(e),`duplicate format key '${e}'`),t.set(e,r)}return t}function ke(e,t,n){for(let[r,i]of e)c(i)&&t.has(r)&&b(!1,`${n}: '${r}' is a payload-free '${i}' record, yet carries content`)}function Ae(e){for(let[t,n]of e)De(t,n);return be(e)}function je(e){for(let[,t]of e){b(t instanceof Map);for(let[e,n]of t){D(e,`imports`),b(n instanceof Map);for(let[,e]of n){if(typeof e==`string`){D(e,`imports`);continue}b(e instanceof Map&&e.size>0,`import target must be a file or a non-empty {platform: file} map`);for(let[t,n]of e)b(typeof t==`string`&&t.length>0&&!t.includes(`/`),`invalid platform key '${t}'`),b(typeof n==`string`),D(n,`imports`)}}}}function Me(e){b(C(e));let t=Se(e);return je(t),t}function Ne(e){return je(e),be(e)}function Pe(e,{skipEmpty:t=!1,metadata:n=!0,what:r}={}){let i=n===!0?[`repo`,...Object.keys(v)]:n===!1?[]:n,a={modules:[],sources:[]};for(let[n,o]of e){if(t&&Object.keys(o.files).length===0)continue;let e=O(n);e&&b(o.name&&o.version&&o.files);let s=w(x(Object.entries(o.files),S));a[e?`modules`:`sources`].push([n,y({...o,repo:i.includes(`repo`)?re(n,o,r):void 0,...de(n,o,s,r,i),files:s})])}return{modules:w(x(a.modules,S)),sources:w(x(a.sources,S))}}function Fe(e,t){let n=e instanceof Map;if(n!==t instanceof Map)return!1;if(!n)return e===t;if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}var Ie=e=>e instanceof Map?`{${[...e].map(([e,t])=>`${e}: ${t}`).join(`, `)}}`:e;function Le(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=xe(r,t);for(let[t,r]of i){let i=xe(e,t);for(let[e,a]of r)i.has(e)?b(Fe(i.get(e),a),`${n}: import '${e}' from '${t}' resolves differently ('${Ie(i.get(e))}' vs '${Ie(a)}')`):i.set(e,a instanceof Map?new Map(a):a)}}};return i(e),i(t),r}function Re(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=r.get(t);if(e===void 0){r.set(t,i);continue}try{r.set(t,u(i,e,t))}catch(e){throw Error(`${n}: ${e.message}`,{cause:e})}}};return i(e),i(t),r}function ze(e,t,n,r){if(e.size===0)return new Set(t);let i=pe(n,{scope:r}),a=new Set(t);for(let t of e)i.has(t)||a.add(t);return a}var Be=/(?:^|\/)\.{0,2}(?:\/|$)/u;function Ve(e,t,n){let r=d(e,t);return(r!==`.`||t!==``)&&Be.test(r)&&b(!1,`${n}: non-canonical file key ${JSON.stringify(r)}`),r.includes(`\\`)&&b(!1,`${n}: file key '${r}' holds a '\\', which no path may`),r}function He(e,t,n){let r=new Map;for(let[i,{files:a}]of e){typeof i!=`string`&&b(!1,`${t}: bucket dir ${String(i)} is not a string`),D(i,t);for(let e of Object.keys(a)){let a=Ve(i,e,t),o=r.get(a);o!==void 0&&n(a,o,i),r.set(a,i)}}return r}var Ue=(e,t)=>n=>b(!1,`duplicate file key '${n}' across ${e} buckets -- module bucketing changed between writes (a workspace package without a version now owns its own bucket); regenerate the ${t}`);function We(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=r.get(t);if(e===void 0){r.set(t,y({...i,files:Object.assign(Object.create(null),i.files)}));continue}b(e.name===i.name,`${n}: module '${t}' name mismatch ('${e.name}' vs '${i.name}')`),b(e.version===i.version,`${n}: module '${t}' version mismatch ('${e.version}' vs '${i.version}')`+(e.version==null==(i.version==null)?``:` -- an artifact from an older stasis may record a placeholder version for a workspace package without one; regenerate it (bundle=replace / lock=replace)`)),b(e.ecosystem===i.ecosystem,`${n}: module '${t}' ecosystem mismatch ('${e.ecosystem??`(none)`}' vs '${i.ecosystem??`(none)`}')`);let a=ue(e,i);a!==e&&r.set(t,a);for(let[r,a]of Object.entries(i.files))Object.hasOwn(e.files,r)?b(e.files[r]===a,`${n}: content mismatch for '${d(t,r)}'`):e.files[r]=a}};return i(e),i(t),He(r,n,(e,t,r)=>b(!1,`${n}: file '${e}' is bucketed under both '${t}' and '${r}' -- module bucketing changed between the artifacts (a workspace package without a version now owns its own bucket); regenerate the artifact (bundle=replace / lock=replace)`)),r}function O(e){return e.split(`/`).includes(`node_modules`)}function Ge(e){let t=e.length;for(;(t=e.lastIndexOf(`node_modules/`,t-1))!==-1;)if(t===0||e[t-1]===`/`)return t;return-1}function Ke(e){let t=Ge(e);if(t===-1)return null;let n=t+13,r=e.slice(n).split(`/`),i=r[0].startsWith(`@`)?2:1;if(r.length<=i||r.slice(0,i).some(e=>!e))return null;let a=r.slice(0,i).join(`/`);return{dir:e.slice(0,n)+a,rel:r.slice(i).join(`/`),name:a}}var k=1,qe=0,Je=Ue(`bundle`,`artifact (bundle=replace)`),Ye=e=>{for(let t of e)b(!ve(t),`bundle: ${t} is a stasis lockfile, which no bundle may carry`)},Xe=e=>Ke(e)??{dir:`.`,rel:e===`.`?``:e,name:null};function Ze(){throw Error(`bundle: file contents are not retained by this contents-free Bundle`)}var Qe=(e,{files:t,...n})=>{let r=Object.create(null);for(let[n,i]of Object.entries(t))typeof i!=`symbol`&&b(!1,`bundle: file '${d(e,n)}' is not a placeholder`),Object.defineProperty(r,n,{get:Ze,enumerable:!0});return{...n,files:Object.freeze(r)}},A=(e,t)=>{if(e===void 0&&t===void 0)return;let n=new Map;for(let r of[e,t])for(let[e,t]of Object.entries(r??{})){if(!Array.isArray(t))continue;let r=n.get(e);r===void 0&&n.set(e,r=new Set);for(let e of t)r.add(e)}return w([...n.keys()].toSorted().map(e=>[e,T(n.get(e))]))},$e=(e,t)=>Object.hasOwn(h,e)&&h[e](t),et=(e,t)=>e?.github===void 0||!ee(e.github,t?.github)?void 0:w(Object.keys(h).filter(n=>e[n]!==void 0&&(n===`github`||e[n]===t[n])).map(t=>[t,e[t]])),tt=e=>{if(!C(e)||e.root!==!0||Object.hasOwn(e,`directory`))return e;let{root:t,...n}=e;return n},nt={npm:_,composer:_,cargo:_},rt=(e,t)=>w(Object.keys(nt).map(n=>{let[r,i]=[e?.[n],t?.[n]];return[n,r?.name!==void 0&&r.name===i?.name?w(Object.entries(r).filter(([e,t])=>t===i[e])):void 0]})),j=class e{static VERSION=k;version=k;config;entries;modules;formats;imports;executable;reason;#e;get repo(){return this.#e}set repo(e){this.#e=te(e)}#t;get package(){return this.#t}set package(e){this.#t=g(e,nt,`bundle package`)}constructor({config:e={scope:`full`},entries:t,modules:n,formats:r,imports:i,executable:a,reason:o,repo:s,package:c,version:l=k}={}){b([qe,k].includes(l)),b([`node_modules`,`full`].includes(e.scope)),this.version=l,this.config=e,this.entries=t??new Set,this.modules=n??new Map,this.formats=r??new Map,this.imports=i??new Map,this.executable=a??new Set,this.reason=o,this.repo=s,this.package=c}get sources(){let e=new Map;for(let[t,{files:n}]of this.modules)for(let[r,i]of Object.entries(n))e.set(d(t,r),i);return e}static isResourceFormat(e){return e===`resource`||e===`resource:base64`||e===`directory`}get hasCode(){for(let[t,{files:n}]of this.modules)for(let r of Object.keys(n))if(!e.isResourceFormat(this.formats.get(d(t,r))))return!0;return!1}static parse(t){return e.fromJSON(JSON.parse(t))}static fileKeyAt(e){let[t,n,r,i]=e;if(typeof n==`string`){if(e.length===2&&t===`sources`){let e=Xe(n);return Ve(e.dir,e.rel,`bundle`)}if(e.length===4&&(t===`sources`||t===`modules`)&&r===`files`&&typeof i==`string`)return Ve(n,i,`bundle`)}}static fromJSON(t,{contents:n=!0}={}){b(t.version===k||t.version===qe),b([`node_modules`,`full`].includes(t.config?.scope));let r=Oe(t.formats),i=new Map,a=new Set;if(t.version===k){let e=t.config.scope===`full`;if(t.modules!==void 0){b(typeof t.modules==`object`&&t.modules!==null);for(let[e,n]of Object.entries(t.modules))b(O(e)),D(e,`bundle`),b(n?.name&&n.version&&n.files),i.set(e,fe(n,e,`bundle`))}if(e){b(t.sources&&typeof t.sources==`object`);for(let[e,n]of Object.entries(t.sources))b(!O(e)),D(e,`bundle`),b(n?.name&&n.files),i.set(e,fe(n,e,`bundle`));t.entries!==void 0&&(a=Te(t.entries,`bundle`))}else b(t.entries===void 0),b(t.sources===void 0)}else{b(t.sources);for(let[e,n]of Object.entries(t.sources)){D(e,`bundle`);let{dir:t,rel:r,name:a}=Xe(e);b(!E(t)&&!E(r)),i.has(t)||i.set(t,{name:a,version:null,files:Object.create(null)});let{files:o}=i.get(t);b(!Object.hasOwn(o,r),`bundle: duplicate file key '.' (v0 '' and '.')`),o[r]=n}}let o=He(i,`bundle`,Je);Ye(o.keys()),ke(r,o,`bundle`);let s=Me(t.imports);if(!n)for(let[e,t]of i)i.set(e,Qe(e,t));return new e({version:t.version,config:t.config,entries:a,modules:i,formats:r,imports:s,executable:t.version===k?ge(t.executable,{what:`bundle`,files:o,formats:r,scope:t.config.scope}):new Set,reason:C(t.reason)?t.reason:void 0,repo:tt(t.repo),package:t.package})}serialize(){let e=He(this.modules,`bundle`,Je);Ye(e.keys()),ke(this.formats,e,`bundle`);let{modules:t,sources:n}=Pe(this.modules,{skipEmpty:!0,what:`bundle`}),r=this.config.scope===`full`,i={version:k,config:this.config};this.repo!==void 0&&(i.repo=this.repo),this.package!==void 0&&(i.package=this.package),r&&(i.entries=Ee(this.entries,`bundle`)),i.formats=Ae(this.formats),i.imports=Ne(this.imports);let a=_e(this.executable,{what:`bundle`,modules:this.modules,formats:this.formats,scope:this.config.scope});return a!==void 0&&(i.executable=a),this.reason!==void 0&&(i.reason=A(this.reason,void 0)),r&&(i.sources=n),i.modules=t,JSON.stringify(i,void 0,2)}withReason(t,n=[...this.sources.keys()]){let{version:r,config:i,entries:a,modules:o,formats:s,imports:c,executable:l,repo:u,package:d}=this,f=A(this.reason,{[t]:n});return new e({version:r,config:i,entries:a,modules:o,formats:s,imports:c,executable:l,reason:f,repo:u,package:d})}merge(t){return b(this.config.scope===t.config.scope,`bundle merge: scope mismatch ('${this.config.scope}' vs '${t.config.scope}')`),new e({config:{scope:this.config.scope},entries:new Set([...this.entries,...t.entries]),modules:We(this.modules,t.modules,`bundle merge`),formats:Re(this.formats,t.formats,`bundle merge`),imports:Le(this.imports,t.imports,`bundle merge`),executable:ze(this.executable,t.executable,t.modules,this.config.scope),reason:A(this.reason,t.reason),repo:et(this.repo,t.repo),package:rt(this.package,t.package)})}},it={__proto__:null,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,json:`json`,css:`css`,html:`markup`,htm:`markup`,xml:`markup`,svg:`markup`,yml:`yaml`,yaml:`yaml`,sh:`bash`,bash:`bash`,md:`markdown`,markdown:`markdown`,sol:`solidity`,php:`php`,phtml:`php`,rs:`rust`,rb:`ruby`,py:`python`,pyw:`python`,pyi:`python`,java:`java`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,"c++":`cpp`,hpp:`cpp`,hh:`cpp`,hxx:`cpp`,"h++":`cpp`,h:`cpp`,c:`c`,m:`objectivec`,mm:`objectivec`},at={__proto__:null,module:`javascript`,commonjs:`javascript`,"module-typescript":`typescript`,"commonjs-typescript":`typescript`,json:`json`,solidity:`solidity`,php:`php`,shell:`bash`,rust:`rust`,java:`java`,objc:`objectivec`,objcpp:`objectivec`,c:`c`,"c-header":`c`,cpp:`cpp`,"cpp-header":`cpp`,ruby:`ruby`,podspec:`ruby`,podfile:`ruby`,fastlane:`ruby`,"podfile-lock":`yaml`,xml:`markup`};function ot(e){if(typeof e!=`string`)return!1;let t=e.length-1,n=0;for(;n<t&&/\s/u.test(e[n]);)n++;for(;t>n&&/\s/u.test(e[t]);)t--;return n<t&&e[n]===`{`&&e[t]===`}`}function st(e,t,n){if(typeof t==`string`&&at[t])return at[t];if(typeof e!=`string`)return null;let r=e.slice(e.lastIndexOf(`/`)+1),i=r.lastIndexOf(`.`);if(i<=0)return null;let a=r.slice(i+1).toLowerCase();return a===`map`?ot(n)?`json`:null:it[a]??null}var ct=/^webpack(?:-internal)?:\/\/[^/]*\//u,lt=/^[a-z][\d+.a-z-]*:/iu,ut=/^file:/iu,dt=/^(?:file|ftp|https?|wss?):/iu,ft=/^(?:[a-z][\d+.a-z-]*:\/\/[^/]*\/?|\/\/[^/]+\/|[a-z]:\/|\/)?/iu,M=e=>ft.exec(e)[0],N=e=>M(e).includes(`://`),P=e=>e.replace(N(e)?/[#?].*$/su:/\?.*$/su,``),pt=e=>e.slice(e.lastIndexOf(`/`)+1),F=(e,t)=>URL.parse(e,t)?.href??null;function I(e){let t=M(e),n=t.includes(`://`)&&F(e);if(n)return n;let r=[];for(let n of e.slice(t.length).split(`/`))n===``||n===`.`||(n===`..`?r.length>0&&r.at(-1)!==`..`?r.pop():t||r.push(`..`):r.push(n));let i=/^[a-z]:\/$/iu.test(t)?t.toUpperCase():t.startsWith(`//`)?t.toLowerCase():t;return i?i.replace(/\/?$/u,`/`)+r.join(`/`):r.join(`/`)||`.`}function mt(e,t){let n=M(t);return N(e)&&!n.includes(`:`)?F(t,e)??I(`${e}/../${t}`):I(n===`/`?M(e).replace(/\/?$/u,``)+t:n?t:`${e}/../${t}`)}function ht(e){try{return decodeURIComponent(e)}catch{return e}}function L(e,t){let n=e.replaceAll(`\\`,`/`);if(ct.test(n))return I(n.replace(ct,``));let r=dt.test(n)?F(n)??n:n,i=/^file:\/\/([^/#]*)([^#]*)/isu.exec(r);if(i){let[,e,t]=i;return I(ht(e&&e.toLowerCase()!==`localhost`?`//${e}${t}`:t).replace(/^\/(?=[a-z]:\/)/iu,``))}if(lt.test(r)&&!M(r).includes(`:`))return r;if(t===void 0)return I(r);if(ut.test(t)&&!M(r))return L(F(r,t)??r);let a=L(t);return M(r)&&!N(a)?I(r):mt(a,r)}var gt=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u;function R(e){let t=e.split(`/`).slice(0,e.startsWith(`@`)?2:1).join(`/`);return gt.test(t)?t:null}var _t=new Set([`.pnpm`,`.bun`,`.deno`]),vt=/^\d+\.\d+\.\d+(?:-[\d.a-z-]+)?(?:\+[\d.a-z-]+)?$/iu;function yt(e,t){let n=`${t.replace(`/`,`+`)}@`,r=e.startsWith(n)?e.slice(n.length).split(/[(_]/u)[0]:null;return vt.test(r)?r:null}function bt(e){let t=P(e).split(`/`),n=t.lastIndexOf(`node_modules`),r=n<0?null:R(t.slice(n+1).join(`/`));if(r===null)return null;let i=n+1+r.split(`/`).length;if(i>=t.length||t.slice(i).includes(``))return null;let a=t.slice(0,i).join(`/`);return{name:r,version:_t.has(t[n-2])?yt(t[n-1],r):null,root:a,path:e.slice(a.length+1)}}var xt=new Map([[`js`,`jsx`],[`mjs`,`jsx`],[`cjs`,`jsx`],[`jsx`,`jsx`],[`es`,`jsx`],[`es6`,`jsx`],[`ts`,`ts`],[`mts`,`ts`],[`cts`,`ts`],[`tsx`,`tsx`],[`json`,`json`]]);function St(e){let t=pt(P(e));return/^[\w-]+$/u.test(t)?`jsx`:xt.get(/\.([\da-z]+)$/iu.exec(t)?.[1].toLowerCase())??null}var Ct=[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.tsx`,`.mts`,`.cts`,`.json`],wt=[`.ios`,`.android`,`.web`];function Tt(e){let t=e.map(e=>/\.[a-z]+(?=\.\w+$)/u.exec(pt(P(e.path??``)))?.[0]),[[n,r],[,i]]=wt.map(e=>[e,t.filter(t=>t===e).length]).toSorted((e,t)=>t[1]-e[1]);return[...r===i?[]:[n],`.native`,``,`.browser`,`.node`]}var Et=new Map([[`.js`,[`.ts`,`.tsx`]],[`.jsx`,[`.tsx`]],[`.mjs`,[`.mts`]],[`.cjs`,[`.cts`]]]),Dt=[`index`,`main`,`browser`,`node`],Ot=[``,`src/`,`lib/`,`dist/`,`build/`],kt=new Set([`lib`,`dist`,`build`,`out`,`esm`,`cjs`]);function*At(e,t){yield e;let n=/\.[^./]+$/u.exec(e)?.[0];for(let t of Et.get(n)??[])yield e.slice(0,-n.length)+t;for(let n of e.endsWith(`/`)?[`${e}index`]:[e,`${e}/index`])for(let e of Ct)for(let r of t)yield n+r+e;if(n)for(let r of t.filter(Boolean))yield e.slice(0,-n.length)+r+n}function*jt(e){let t=e;for(;;){t.startsWith(`src/`)||(yield`src/${t}`),t!==e&&(yield t);let n=t.indexOf(`/`);if(n<0||!kt.has(t.slice(0,n)))return;t=t.slice(n+1)}}function Mt(e){let t=new Map,n=new Map,r=new Map;for(let i of e)i.path!==null&&t.set(i.path,i),i.package&&(n.set(i.package.name,(n.get(i.package.name)??new Set).add(i.package.root)),(r.get(i.package.root)??r.set(i.package.root,[]).get(i.package.root)).push(i));return{byPath:t,roots:n,byRoot:r,platforms:Tt(e),found:new Map}}function z(e,t){if(!e.found.has(t)){let n=P(t),r=At(n,e.platforms).map(e=>e+t.slice(n.length));e.found.set(t,e.byPath.get(r.find(t=>e.byPath.has(t)))??null)}return e.found.get(t)}function Nt(e,t,n){let r=e.roots.get(n);if(!r)return null;let i=t.path.split(`/`);for(let e=i.length-1;e>=0;e--){let t=[...i.slice(0,e),`node_modules`,n].join(`/`);if(r.has(t))return t}return r.size===1?[...r][0]:null}var Pt=new Set(`assert.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.domain.events.fs.http.http2.https.inspector.module.net.os.path.perf_hooks.process.punycode.querystring.readline.repl.stream.string_decoder.sys.timers.tls.trace_events.tty.url.util.v8.vm.wasi.worker_threads.zlib._http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert/strict.dns/promises.fs/promises.inspector/promises.path/posix.path/win32.readline/promises.stream/consumers.stream/promises.stream/web.timers/promises.util/types`.split(`.`));function Ft(e){if(e.startsWith(`node:`)||Pt.has(e))return{builtin:!0};let t=R(P(e));return t===null?{}:{package:t}}function It(){let e=[],t=new Map,n=(n,r,i)=>{let a=t.get(n)??t.set(n,new Set).get(n);a.has(r)||(a.add(r),e.push(i))};return{edges:e,add:n,link:(e,t,r)=>{e&&t&&t!==e&&n(e,t,{from:e,to:t,kind:r})}}}function Lt(e,t){for(let n of Dt)for(let r of Ot){let i=z(e,`${t}/${r}${n}`);if(i)return i}let n=e.byRoot.get(t);return n?.length===1?n[0]:null}function Rt(e,t,n,r){return/^\/[^?]/u.test(n)?z(e,t+n)??jt(n.slice(1)).map(n=>z(e,`${t}/${n}`)).find(Boolean):z(e,t+n)??r(e,t)}function zt(e,t,n,r=Lt){let i=/^(?:\.{1,2}|[a-z]:)?\\/iu.test(n)?n.replaceAll(`\\`,`/`):n,a=dt.test(i);if(a||/^(?:\.{1,2}(?:\/|$)|\/|[a-z]:\/)/iu.test(i)||N(i)){let n=a?L(i):mt(t.path,i),r=z(e,n);return r?{to:r}:{to:null,path:n}}if(lt.test(i)&&e.byPath.has(i))return{to:e.byPath.get(i)};let o=R(P(n)),s=o===null?null:Nt(e,t,o);if(s===null)return{to:null,...Ft(n)};let c=Rt(e,s,n.slice(o.length),r);return c?{to:c}:{to:null,package:o}}var B=class extends Error{name=`SourceMapError`},Bt=new Uint8Array(128).fill(255);for(let[e,t]of[...`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/,;`].entries())Bt[t.codePointAt(0)]=e;function Vt(e){let t=new Int32Array(e.length*2);return t.set(e),t}function Ht(e){let{starts:t,columns:n,sources:r,names:i}=e;for(let e=0;e+1<t.length;e++){let[a,o]=[t[e],t[e+1]],s=a+1;for(;s<o&&n[s-1]<=n[s];)s++;if(s>=o)continue;let c=Array.from(n.subarray(a,o),(e,t)=>[e,r[a+t],i[a+t]]).sort((e,t)=>e[0]-t[0]);for(let[e,[t,o,s]]of c.entries())[n[a+e],r[a+e],i[a+e]]=[t,o,s]}return e}function Ut(e){let t=[0],n=new Int32Array(1024),r=new Int32Array(1024),i=new Int32Array(1024),a=0;for(let{mappings:o,files:s,line:c,column:l,names:u,nameCount:d}of e){if(typeof o!=`string`)throw new B(`mappings is not a string`);for(;t.length<=c;)t.push(a);let e=[0,0,0,0,0],f=0,p=0,m=1,h=l;for(let c=0;c<=o.length;c++){let l=c<o.length?Bt[o.codePointAt(c)]??255:64;if(l<32){if(p+=l*m,f===5)throw new B(`mappings: a segment of more than 5 fields at ${c}`);e[f++]+=p%2?(1-p)/2:p/2,p=0,m=1;continue}if(l<64){if(p+=(l-32)*m,m*=32,m>2**30)throw new B(`mappings: a value at ${c} runs past 32 bits`);continue}if(l===255)throw new B(`mappings: ${JSON.stringify(o[c])} at ${c} is not a base64 digit`);if(m!==1)throw new B(`mappings: the value before ${c} is cut off`);if(f>0){if(f===2||f===3)throw new B(`mappings: a segment of ${f} fields before ${c}`);let t=f===1?-1:s[e[1]];if(t===void 0)throw new B(`mappings: source ${e[1]} before ${c} is not in sources`);if(e[0]<0)throw new B(`mappings: a negative generated column before ${c}`);a===n.length&&([n,r,i]=[Vt(n),Vt(r),Vt(i)]),n[a]=e[0]+h,r[a]=t,i[a++]=f===5&&e[4]>=0&&e[4]<d?u+e[4]:-1,f=0}l===65&&(t.push(a),e[0]=0,h=0)}}return t.push(a),Ht({starts:Int32Array.from(t),columns:n.slice(0,a),sources:r.slice(0,a),names:i.slice(0,a)})}var Wt=new WeakMap,Gt=e=>Wt.get(e),V=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function H(e,t){if(!e)throw new B(t)}function Kt(e,t){if(e===void 0)return[];H(Array.isArray(e),`${t} is not an array`);for(let n of e)H(typeof n==`string`||n===null,`${t} holds ${JSON.stringify(n)}`);return e}function qt(e,t,n,r){let i=e.bySource.get(t);if(i!==void 0)return e.files[i].content??=n,e.files[i].ignored||=r,i;let a=t===null?null:L(t,e.mapPath);return e.files.push({source:t,path:a,package:a===null?null:bt(a),content:n,ignored:r}),t!==null&&e.bySource.set(t,e.files.length-1),e.files.length-1}function Jt(e,t,n,r){H(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),H(e.sourceRoot===void 0||typeof e.sourceRoot==`string`,`sourceRoot is not a string`);let i=Kt(e.sources,`sources`),a=Kt(e.sourcesContent,`sourcesContent`),o=e.ignoreList??e.x_google_ignoreList??[];H(Array.isArray(o)&&o.every(e=>Number.isInteger(e)&&e>=0&&e<i.length),`ignoreList is not a list of indices into sources`);let s=new Set(o),c=e.sourceRoot?e.sourceRoot.replace(/\/?$/u,`/`):``,l=i.map((e,n)=>qt(t,e===null?null:c+e,a[n]??null,s.has(n))),u=Array.isArray(e.names)?e.names:[];t.parts.push({mappings:e.mappings,files:l,line:n,column:r,names:t.names.length,nameCount:u.length}),t.names.push(...u)}function Yt(e,t){H(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),H(Array.isArray(e.sections),`sections is not an array`);for(let[n,r]of e.sections.entries()){let{offset:i,map:a}=V(r)?r:{};H(V(i)&&[i.line,i.column].every(e=>Number.isInteger(e)&&e>=0),`sections[${n}].offset is not a line and a column`),H(V(a)&&a.sections===void 0,`sections[${n}].map is not a plain source map`);let o=e.sections[n-1]?.offset;H(!o||o.line<i.line||o.line===i.line&&o.column<=i.column,`sections[${n}] starts before sections[${n-1}]`),Jt(a,t,i.line,i.column)}}function Xt(e,t={}){if(!V(t))throw TypeError(`readSourceMap: options is not an object`);if(t.path!==void 0&&typeof t.path!=`string`)throw TypeError(`readSourceMap: options.path is not a string`);let n=e;if(typeof e==`string`||e instanceof Uint8Array)try{let t=typeof e==`string`?e:new TextDecoder(`utf-8`,{fatal:!0}).decode(e);n=JSON.parse(t.replace(/^\)\]\}'[^\n]*\n/u,``))}catch(e){throw new B(`not JSON: ${e.message}`,{cause:e})}H(V(n),`not a JSON object`);let r={files:[],bySource:new Map,mapPath:t.path,parts:[],names:[]};n.sections===void 0?Jt(n,r,0,0):Yt(n,r);let i={files:r.files};return Wt.set(i,{...Ut(r.parts),nameList:r.names}),i}var Zt=/\r\n?|[\n\u2028\u2029]/gu;function Qt(e){let t=[0];for(let n of e.matchAll(Zt))t.push(n.index+n[0].length);return t}function $t(e,t,n,r){let[i,a]=[t,n];for(;i<a;){let t=i+a>>1;e[t]<=r?i=t+1:a=t}return i-1}function U(e,t){let n=$t(e,0,e.length,t);return[n,t-e[n]]}function en(e,[t,n]){if(t>=e.starts.length-1)return-1;let r=e.starts[t],i=$t(e.columns,r,e.starts[t+1],n);return i<r?-1:i}function tn(e,t,n,r){let i=Gt(e),a=U(t,n),[o,s]=U(t,r),c=new Map,l=en(i,a);for(let e=a[0];e<=o&&e<i.starts.length-1;e++){let t=e===a[0]&&l>=0?l:i.starts[e];for(let n=t;n<i.starts[e+1];n++){let t=i.sources[n];if(e===o&&i.columns[n]>=s)break;t>=0&&c.set(t,(c.get(t)??0)+1)}}let[u]=[...c].reduce((e,t)=>t[1]>e[1]?t:e,[-1,0]);return u<0?null:e.files[u]}var W=/\s+/uy,nn=`
2
+ \r\u2028\u2029`,G=/[\n\r\u2028\u2029]/gu,rn=/[\n\r\u2028\u2029]/u,K=/[\w$\u0080-￿]+/uy,an=new Set([`return`,`typeof`,`instanceof`,`in`,`of`,`new`,`delete`,`void`,`throw`,`case`,`default`,`extends`,`do`,`else`,`yield`,`await`]),on=new Set([`if`,`while`,`for`,`with`]),sn=new Set([`break`,`continue`,`debugger`]),cn=new Set([`(`,`[`,"${",`,`,`=`,`:`,`?`,`!`,`~`,`+`,`-`,`*`,`/`,`%`,`&`,`|`,`^`,`<`,`>`]);function ln(e,t){return e?.type===`word`?t&&[`return`,`yield`].includes(e.value)?!1:an.has(e.value)&&![`do`,`else`].includes(e.value):cn.has(e?.value)}function un(e){let t=e.at(-1);return t?.type===`word`&&(on.has(t.value)||t.value===`await`&&e.at(-2)?.value===`for`)}function dn(e){return e?e.type===`word`?an.has(e.value)||sn.has(e.value)||e.label===!0:e.value===`)`?e.control:e.value===`}`?!e.object:e.type===`punctuator`&&![`++`,`--`,`]`].includes(e.value):!0}var fn=(e,t)=>e.startsWith(`\r
3
+ `,t+1)?3:2,pn=/\\(?:u\{([\da-f]+)\}|u([\da-f]{4})|x([\da-f]{2})|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[\n\r\u2028\u2029])|(.))/giu,mn={b:`\b`,f:`\f`,n:`
4
+ `,r:`\r`,t:` `,v:`\v`};function hn(e){return e.includes(`\\`)?e.replace(pn,(e,t,n,r,i,a,o)=>{if(a!==void 0)return``;if(i!==void 0)return String.fromCodePoint(Number.parseInt(i,8));let s=Number.parseInt(t??n??r,16);return Number.isNaN(s)?mn[o]??o:String.fromCodePoint(Math.min(s,1114111))}):e}function gn(e,t){let n=e[t],r=t+1;for(;r<e.length&&e[r]!==n&&!nn.includes(e[r]);)r+=e[r]===`\\`?fn(e,r):1;return[e[r]===n?hn(e.slice(t+1,r)):null,r+1]}function _n(e,t){let n=t+1,r=!1;for(;n<e.length&&!nn.includes(e[n])&&(r||e[n]!==`/`);)e[n]===`\\`?n++:e[n]===`[`?r=!0:e[n]===`]`&&(r=!1),n++;return K.lastIndex=n+1,K.test(e)?K.lastIndex:n+1}function vn(e,t,n){for(let r=t;r<e.length;r++)if(e[r]===`\\`)r++;else{if(e[r]==="`")return r+1;if(e[r]===`$`&&e[r+1]===`{`)return n.push(`template`),r+2}return e.length}function yn(e){let t=[],n=[],r=[],i=0,a=0;for(;i<e.length;){let o=t.length;if(W.lastIndex=i,W.test(e)&&(i=W.lastIndex),i>=e.length)break;let s=e[i],c=e[i+1];if(K.lastIndex=i,s===`/`&&c===`/`)G.lastIndex=i+2,i=G.test(e)?G.lastIndex-1:e.length;else if(s===`/`&&c===`*`){let t=e.indexOf(`*/`,i+2);i=t<0?e.length:t+2}else if(s===`"`||s===`'`){let[n,r]=gn(e,i);t.push({type:`string`,value:n}),i=r}else if(s==="`"||s===`}`&&n.at(-1)===`template`){s===`}`&&n.pop();let r=n.length,a=vn(e,i+1,n),o=s==="`"&&n.length===r&&e[a-1]==="`";t.push({type:`string`,value:o?hn(e.slice(i+1,a-1)):null}),n.length>r&&t.push({type:`punctuator`,value:"${"}),i=a}else if(s===`/`&&dn(t.at(-1)))i=_n(e,i),t.push({type:`regex`});else if(K.test(e)){let n=sn.has(t.at(-1)?.value)&&!rn.test(e.slice(a,i));t.push({type:`word`,value:e.slice(i,K.lastIndex),...n&&{label:n}}),i=K.lastIndex}else{s===`{`&&n.push(ln(t.at(-1),rn.test(e.slice(a,i)))?`object`:`block`);let o=s===`}`?n.pop():void 0;s===`(`&&r.push(un(t));let l=(s===`+`||s===`-`)&&c===s||s===`=`&&c===`>`?s+c:s;t.push({type:`punctuator`,value:l,...s===`)`&&{control:r.pop()===!0},...s===`}`&&{object:o===`object`}}),i+=l.length}t.length>o&&(a=i)}return t}var q=e=>e?.type===`string`&&e.value!==null,bn=new Set([`type`,`typeof`]),xn=(e,t)=>e[t+1]?.type===`word`&&(e[t+1].value!==`as`||e[t+2]?.type!==`word`||e[t+2].value===`as`);function Sn(e,t){let n=!1;for(let r=t+1;r<e.length&&e[r].value!==`}`;r++)if(!(r>t+1&&e[r-1].value!==`,`)){if(!bn.has(e[r].value)||!xn(e,r))return!1;n=!0}return n}function Cn(e,t){for(let n=t;n<e.length;n++){let{value:r}=e[n];if(r===`;`||n>t&&(r===`import`||r===`export`))return null;if(r===`from`&&q(e[n+1]))return e[n+1].value}return null}function wn(e,t){let[n,r,i]=[e[t].value,e[t+1],e[t+2]],a=n===`import`?`import`:`export-from`;if(n===`import`&&q(r))return{kind:a,specifier:r.value};if(bn.has(r?.value)&&![`,`,`from`].includes(i?.value)||r?.value===`{`&&Sn(e,t+1)||n===`export`&&![`{`,`*`].includes(r?.value)||n===`import`&&r?.type!==`word`&&![`{`,`*`].includes(r?.value))return null;let o=Cn(e,t+1);return o===null?null:{kind:a,specifier:o}}function Tn(e,t){let[n,r]=[e[t+2],e[t+3]];if(n?.value!==`)`)return q(n)&&[`)`,`,`].includes(r?.value)?n.value:null}function En(e,t=new Set){let n=yn(e),r=[];for(let[e,i]of n.entries()){if(i.type!==`word`||[`.`,`#`,`function`].includes(n[e-1]?.value)||n[e-1]?.value===`=`&&n[e-3]?.value===`type`&&n[e-4]?.value===`import`)continue;let a=n[e+1]?.value===`(`,o=a?Tn(n,e):void 0;if((i.value===`require`||t.has(i.value))&&o!==void 0)r.push({kind:`require`,specifier:o,...i.value!==`require`&&{callee:i.value}});else if(i.value===`import`&&a)o!==void 0&&r.push({kind:`dynamic-import`,specifier:o});else if(i.value===`import`||i.value===`export`){let t=wn(n,e);t&&r.push(t)}}return r}var Dn=/^[\w$]*__d\(/gmu,On=([e,t,n,...r])=>(typeof e==`number`||typeof e==`string`)&&(t===void 0||typeof t==`object`)&&(n===void 0||typeof n==`string`)&&r.length===0;function kn(e){let t=/\);?\s*$/u.exec(e)?.index,n=null,r=t===void 0?-1:e.lastIndexOf(`},`,t);for(;r>=0&&/[\d"]/u.test(e[r+2]);){let i;try{i=JSON.parse(`[${e.slice(r+2,t)}]`)}catch{break}if(!On(i))break;n=i,r=r>0?e.lastIndexOf(`},`,r-1):-1}return n}function An(e){let t=/^[^(]*\(\s*(?:function\s*[\w$]*\s*)?\(([^)]*)\)/u.exec(e)?.[1].split(`,`).slice(1,4).map(e=>e.trim().replaceAll(`$`,`\\$`));if(!t?.length)return[];let n=e.matchAll(RegExp(`(?<=[^\\w$.#]|\\.\\.\\.)(?:${t.join(`|`)})\\((\\d+|"(?:[^"\\\\]|\\\\.)*")[,)]`,`gu`));return[...new Set([...n].map(e=>JSON.parse(e[1])))]}function jn(e,t){if(Array.isArray(e))return e;let n=Object.entries(e??{}).filter(([e])=>/^\d+$/u.test(e)).map(([,e])=>e);return n.length>0?n:An(t)}function Mn(e,t){let n=new Map(t.files.map((e,t)=>[e,t])),r=e.flatMap((e,t)=>e.file?[{k:t,at:n.get(e.file)}]:[]);for(let n=0;n<(r[0]?.k??0);n++)e[n].file=t.files[r[0].at-r[0].k+n]??null;for(let[n,{k:i,at:a}]of r.entries()){let o=r[n+1];if(!(o&&o.at-a!==o.k-i))for(let n=i+1;n<(o?.k??e.length);n++)e[n].file=t.files[a+n-i]??null}}function Nn(e,t){let n=[...e.matchAll(Dn)].map(e=>e.index);if(n.length===0)return null;let r=Qt(e),i=t=>e.slice(r[t],r[t+1]),a=[];for(let[o,s]of n.entries()){let[c]=U(r,s),[l]=U(r,(n[o+1]??e.length)-1),u=kn(i(l));for(;!u&&l>c;)u=kn(i(--l));if(!u)throw Error(`bundleEdges: the Metro module at line ${c+1} ends in no define params`);let d=r[l+1]??e.length;a.push({id:u[0],file:tn(t,r,s,d),dependencies:jn(u[1],e.slice(s,d))})}Mn(a,t);let o=new Map(a.map(e=>[e.id,e])),{edges:s,link:c}=It();for(let{file:e,dependencies:t}of a)for(let n of t)c(e,o.get(n)?.file,`dependency`);return s}var Pn=e=>e.path!==null&&![`json`,null].includes(St(e.path)),Fn=e=>e.path!==null&&St(e.path)===null;function In(e){let t=/^_([A-Za-z]+)\d+$/u.exec(e)?.[1];if(t)return[t,`interopRequireDefault`];let n=/^_(interopRequire(?:Default|Wildcard)|jsx(?:Dev)?Runtime|callSuper)$/u.exec(e)?.[1];return n===`callSuper`?[`getPrototypeOf`,`possibleConstructorReturn`,`interopRequireDefault`]:n?[n]:[]}var Ln={jsxRuntime:`react/jsx-runtime`,jsxDevRuntime:`react/jsx-dev-runtime`};function Rn(e){let{sources:t,names:n,nameList:r}=Gt(e),i=new Map,a=new Map,o=e.files.map(()=>new Set);for(let e=0;e<n.length;e++)n[e]<0||t[e]<0||(a.has(n[e])||a.set(n[e],In(r[n[e]]).length>0),a.get(n[e])&&o[t[e]].add(r[n[e]]));for(let[t,n]of o.entries()){if(n.size===0)continue;let r=e.files[t],a=new Set(Array.from((r.content??``).matchAll(/(?:function|var|let|const)\s+(_[A-Za-z]+\d*)\b/gu),e=>e[1])),o=[...n].filter(e=>!a.has(e)&&!a.has(e.replace(/\d+$/u,``))).flatMap(In);o.length>0&&i.set(r,o.map(e=>Ln[e]??`@babel/runtime/helpers/${e}`))}return i}function zn(e,t){let n=new Map;for(let[r,i]of e){let e=n.get(r)??n.set(r,new Map).get(r);for(let n of i)e.set(n,zt(t,r,n,()=>null))}let r=new Set([...n.values()].flatMap(e=>[...e.values()].map(e=>e.to))),i=(e,n)=>t.byRoot.get(n).find(e=>!r.has(e))??t.byRoot.get(n)[0];return(e,r)=>{let a=n.get(e)?.get(r);return a?.to?a:zt(t,e,r,i)}}var Bn=e=>/(?:^|\/)__prelude__$/u.test(e.source??``),Vn=e=>e?.package?.name===`metro-runtime`&&e.package.path===`src/polyfills/require.js`;function Hn(e){if(!e.files.some(Bn)&&!Vn(e.files[0]))return null;if(!e.files.some(e=>e.content!==null&&!Bn(e)&&!Vn(e)))throw Error("bundleEdges: the Metro map carries no sourcesContent, which its edges are read from; pass the bundle as `code`");let t=Mt(e.files),n=e.files[e.files.findIndex(Fn)+1],r=e.files.find(e=>e.package?.name===`metro-runtime`&&e.package.path===`src/modules/asyncRequire.js`),i=new Map(e.files.filter(e=>e.content!==null&&Pn(e)).map(e=>[e,En(e.content)])),a=Rn(e),o=zn([...[...i].map(([e,t])=>[e,t.flatMap(({specifier:e})=>e===null?[]:[e])]),...a],t),{edges:s,add:c,link:l}=It();for(let t of e.files){Fn(t)&&l(t,n,`dependency`);for(let{kind:e,specifier:n}of i.get(t)??[]){let i=n===null?{to:null}:o(t,n);i.to!==t&&c(t,`${e}\0${JSON.stringify(n)}`,{from:t,kind:e,specifier:n,...i}),e===`dynamic-import`&&l(t,r,`dependency`)}for(let e of a.get(t)??[])l(t,o(t,e).to,`dependency`)}return s}var Un=(e,t)=>t==null?Hn(e):Nn(t,e);function Wn(e,t){let n=Un(e,t);if(!n)throw Error(`bundleEdges: not a Metro ${t==null?`map`:`bundle`}; edges-lite.js reads only those, edges.js reads others`);return{edges:n}}function Gn(e){let t=JSON.parse(e.replace(/^\)\]\}'[^\n]*\n/u,``)),n=Xt(t),r=t.sections?t.sections.reduce((e,t)=>e+(t.map.names?.length??0),0):t.names?.length??null;return{json:{version:t.version,file:t.file,sourceRoot:t.sourceRoot},map:n,namesCount:r}}function J(e){if(e.map)return e.map.files.flatMap(e=>e.source===null?[]:[[e.source,e.content]]);let t=e.json?.sourcesContent??[];return(e.json?.sources??[]).map((e,n)=>[e,t[n]??null])}function Kn(e,t){let n=new Map;for(let{from:r,to:i,specifier:a}of t(e).edges){if(r.source===null||i?.source==null||i.source===r.source)continue;let e=typeof a==`string`?[r.source,i.source,a]:[r.source,i.source];n.set(e.join(`\0`),e)}return[...n.values()]}function qn(e){try{return Wn(e)}catch{return{edges:[]}}}var Jn=Object.freeze([]);function Y(e){return e?.edges?e.edges:e?.map?(e.edges=Kn(e.map,qn),e.edges):Jn}var Yn=new WeakMap,Xn=new WeakMap;function Zn(e){let t=Y(e);if(!Yn.has(t)){let e=new Map;for(let[n,r]of t)e.has(n)||e.set(n,new Set),e.get(n).add(r);Yn.set(t,e)}return Yn.get(t)}function Qn(e){let t=Y(e);if(!Xn.has(t)){let e=new Map;for(let[n,r,i]of t)i!==void 0&&(e.has(n)||e.set(n,new Map),e.get(n).set(i,r));Xn.set(t,e)}return Xn.get(t)}var $n=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,X=new WeakMap,rr=new WeakMap;function Z(e){if(e?.metadataOnly)return new Map;let t=e?.bundle??e?.json;if(t&&$n.has(t))return $n.get(t);let n=new Map;if(!e)return n;if(e.kind===`stasis`){if(!e.bundle)return n;let t=e.bundle.formats;for(let[r,i]of e.bundle.sources)typeof i==`string`&&(j.isResourceFormat(t?.get(r))||n.set(r,i))}else if(e.kind===`sourcemap`)for(let[t,r]of J(e))typeof r==`string`&&n.set(t,r);return t&&$n.set(t,n),n}function ir(e){let t=1;for(let n=e.indexOf(`
5
+ `);n!==-1;n=e.indexOf(`
6
+ `,n+1))t++;return t}var ar=new WeakMap;function or(e){let t=ar.get(e);if(!t){let n=[...e.keys()].toSorted();t={paths:n,numbers:new Map(n.map((e,t)=>[e,t+1]))},ar.set(e,t)}return t}function sr(e,t){let n=Array.isArray(t)?t:[];return{integrity:e.integrity,kind:`sourcemap`,size:e.size,json:{version:3,sources:n.map(([e])=>e),sourcesContent:n.map(([,,e])=>typeof e==`string`?e:null)},fileSizes:new Map(n.map(([e,t])=>[e,t])),npmBinaries:new Map(n.filter(([,,e,t])=>typeof e!=`string`&&typeof t==`string`).map(([e,t,,n])=>[e,{size:t,digest:n}]))}}function cr(e){let t=e?.bundle??e?.json;if(t&&er.has(t))return er.get(t);let n=new Map(Z(e));for(let[t,r]of e?.npmBinaries??[])n.set(t,{format:`digest`,...r});if(e?.kind===`stasis`&&e.bundle){let t=e.bundle.formats;for(let[r,i]of e.bundle.sources){if(typeof i!=`string`)continue;let e=t?.get(r);e===`resource`?n.set(r,i):e===`resource:base64`&&n.set(r,{format:`base64`,data:i})}}return t&&er.set(t,n),n}var lr=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function ur(e){let t=e.endsWith(`=`);if(t?e.length%4!=0||e.at(-3)===`=`:e.length%4==1)return null;let n=t?e.slice(0,e.endsWith(`==`)?-2:-1):e;if(/[^A-Za-z0-9+/]/u.test(n))return null;let r=n.length%4;return r>1&&lr.indexOf(n.at(-1))&(r===2?15:3)?null:Math.floor(n.length*3/4)}function dr(e){return typeof e==`string`?t(e):e?.format===`digest`?e.size:e?.format===`base64`?ur(e.data):null}function Q(e){if(e?.fileSizes)return e.fileSizes;let t=e?.bundle??e?.json;if(t&&tr.has(t))return tr.get(t);let n=new Map,r=cr(e),i=e?.kind===`stasis`?e.bundle?.sources.keys():e&&J(e).map(([e])=>e);for(let e of i??[])n.set(e,dr(r.get(e)));return t&&tr.set(t,n),n}function fr(e){if(e?.metadataOnly)return e.unsizedFiles??new Set;let t=Q(e);if(rr.has(t))return rr.get(t);let n=new Set;for(let r of cr(e).keys())t.get(r)===null&&n.add(r);return rr.set(t,n),n}function pr(e){let t=Q(e);if(X.has(t))return X.get(t);let n=fr(e),r=e?.kind===`stasis`?e.bundle?.formats:null,i=new Map;for(let[a,o]of t)o===null&&!n.has(a)||i.set(a,j.isResourceFormat(r?.get(a))||e?.npmBinaries?.has(a)?`resource`:`source`);return X.set(t,i),i}function mr(e){let t=Q(e),n=e?.kind===`stasis`?e.bundle?.formats:null;if(!n||n.size===0)return t;if(nr.has(t))return nr.get(t);let r=new Map;for(let[e,i]of t)j.isResourceFormat(n.get(e))||r.set(e,i);return nr.set(t,r),r}var hr=new WeakMap;function gr(e){if(e?.kind!==`stasis`||!e.bundle?.modules)return null;if(hr.has(e.bundle))return hr.get(e.bundle);let t=new Map;for(let[n,r]of e.bundle.modules)for(let e of Object.keys(r.files))t.set(n===`.`?e:`${n}/${e}`,n);return hr.set(e.bundle,t),t}function _r(e,t=null,n=(e,t)=>t.name){let r=new Map;if(e?.kind!==`stasis`||!e.bundle?.modules)return r;let i=t===null?null:gr(e),a=t===null?null:new Set([...t].map(e=>i?.get(e)));for(let[t,i]of e.bundle.modules){if(a&&!a.has(t)||!t.includes(`node_modules`)||!i?.name||typeof i.version!=`string`||!i.version)continue;let e=n(t,i),o=r.get(e);o||(o=new Set,r.set(e,o)),o.add(i.version)}return r}var vr=Object.freeze({javascript:`JavaScript`,jsx:`JSX`,typescript:`TypeScript`,tsx:`TSX`,json:`JSON`,css:`CSS`,markup:`HTML`,yaml:`YAML`,bash:`Shell`,markdown:`Markdown`,solidity:`Solidity`,php:`PHP`,rust:`Rust`,ruby:`Ruby`,java:`Java`,cpp:`C++`,c:`C`,objectivec:`Objective-C`,python:`Python`,go:`Go`,kotlin:`Kotlin`,swift:`Swift`,dart:`Dart`,sql:`SQL`,lua:`Lua`,csharp:`C#`,scala:`Scala`,vue:`Vue`,svelte:`Svelte`}),yr=Object.freeze({py:`python`,pyw:`python`,go:`go`,kt:`kotlin`,kts:`kotlin`,swift:`swift`,dart:`dart`,sql:`sql`,lua:`lua`,cs:`csharp`,scala:`scala`,sc:`scala`,vue:`vue`,svelte:`svelte`});function br(e){let t=typeof e==`string`?e.slice(e.lastIndexOf(`/`)+1):``,n=t.lastIndexOf(`.`),r=n>0?t.slice(n+1).trim().toLowerCase():``,i=st(e)??yr[r];return i?{key:i,label:vr[i]??i}:r?{key:`extension:${r}`,label:`.${r}`}:{key:`other`,label:`Other`}}function xr(e,t){let n=new Map,r=0,i=0;for(let[a,o]of e){let e=br(a),s=n.get(e.key)??{...e,files:0,lines:0,bytes:0};s.files++,s.lines+=o,s.bytes+=t.get(a)??0,n.set(e.key,s),i+=o,r+=t.get(a)??0}return{files:e.size,lines:i,bytes:r,languages:[...n.values()].toSorted((e,t)=>t.lines-e.lines||e.label.localeCompare(t.label))}}var Sr=6,$=new WeakMap,Cr=new Set([`terminal`,`code`,`search`,`compare`]);function wr(e,t=null){return!!t||Cr.has(e)}var Tr=/^sha512-[A-Za-z0-9+/]{86}==$/u;function Er(t){if(t.fileHashes)return Promise.resolve(t.fileHashes);if($.has(t))return $.get(t);let n=(async()=>{let n=[...Z(t)],r=new Map;for(let t=0;t<n.length;t+=32){let i=await Promise.all(n.slice(t,t+32).map(async([t,n])=>[t,await e(n)]));for(let[e,t]of i)r.set(e,t)}return t.fileHashes=r,r})();return $.set(t,n),n.catch(()=>$.delete(t)),n}function Dr(e){if(typeof e!=`string`)return 0;let t=/\S/gu,n=/[\r\n]/gu,r=0;for(;t.test(e)&&(r++,n.lastIndex=t.lastIndex,n.test(e));)t.lastIndex=n.lastIndex;return r}function Or(e){return e.lineCounts??=new Map([...Z(e)].map(([e,t])=>[e,Dr(t)]))}function kr(e){return e instanceof Map?Object.fromEntries([...e].map(([e,t])=>[e,kr(t)])):e}async function Ar(e){let n=await Er(e),r=Q(e),i=Or(e),a={version:Sr,integrity:e.integrity,kind:e.kind,size:e.size,codeStats:xr(i,r),files:[...r].map(([e,t])=>[e,t,n.get(e)??null,i.get(e)??null])},o=fr(e);if(o.size>0&&(a.unsized=[...o]),e.kind===`sourcemap`){let{version:n,file:r,sourceRoot:i,names:o}=e.json,s=J(e);a.json={version:n,file:r,sourceRoot:i,sources:s.map(([e])=>e)},a.sourceSizes=s.map(([,e])=>typeof e==`string`?t(e):null),a.namesCount=e.namesCount??o?.length??null;let c=new Map(a.files.map(([e],t)=>[e,t]));a.edges=Y(e).map(([e,t,...n])=>[c.get(e),c.get(t),...n])}else{let t=e.bundle,n={version:t.version,config:t.config,repo:t.repo,package:t.package,formats:kr(t.formats),imports:kr(t.imports),reason:t.reason,executable:[...t.executable]};if(t.version===0)n.sources=Object.fromEntries([...r.keys()].map(e=>[e,null]));else{let e={},r={};for(let[n,i]of t.modules){let t=n.split(`/`).includes(`node_modules`)?e:r;Object.defineProperty(t,n,{enumerable:!0,value:{name:i.name,version:i.version,ecosystem:i.ecosystem,repo:i.repo,files:Object.fromEntries(Object.keys(i.files).map(e=>[e,null]))}})}n.modules=e,t.config.scope===`full`&&(n.sources=r,n.entries=[...t.entries])}a.bundle=n}return a}function jr(e,t){if(![1,2,3,4,5,Sr].includes(e?.version)||e.integrity!==t||![`stasis`,`sourcemap`].includes(e.kind)||!Number.isSafeInteger(e.size)||e.size<0||!Array.isArray(e.files))throw Error(`Invalid bundle metadata`);let n=e.version!==Sr,r=e.version===1,i=new Map,a=new Map,o=new Map;for(let t of e.files){if(!Array.isArray(t)||t.length!==4&&!(r&&t.length===3))throw Error(`Invalid bundle metadata file`);let[e,n,s,c]=t;if(typeof e!=`string`||a.has(e)||n!==null&&(!Number.isSafeInteger(n)||n<0)||s!==null&&(typeof s!=`string`||!Tr.test(s))||n===null&&s!==null||r&&n!==null&&s===null||c!=null&&(!Number.isSafeInteger(c)||c<0))throw Error(`Invalid bundle metadata file`);a.set(e,n),s!==null&&i.set(e,s),c!=null&&o.set(e,c)}let s=new Set(e.unsized??[]);if(e.unsized!==void 0&&(r||!Array.isArray(e.unsized)||s.size!==e.unsized.length)||[...s].some(e=>typeof e!=`string`||!a.has(e)||a.get(e)!==null))throw Error(`Invalid bundle metadata`);let c={integrity:t,kind:e.kind,size:e.size,metadataOnly:!0,fileSizes:a,fileHashes:i,lineCounts:o,unsizedFiles:s,stale:n};if(e.kind===`stasis`){c.bundle=j.fromJSON(e.bundle);let t=c.bundle.sources;if(t.size!==a.size||[...t.keys()].some(e=>!a.has(e)))throw Error(`Invalid bundle metadata inventory`);let n=c.bundle.formats;if(!r&&[...a].some(([e,t])=>i.has(e)!==(t!==null&&!j.isResourceFormat(n.get(e))))||[...s].some(e=>n.get(e)!==`resource:base64`))throw Error(`Invalid bundle metadata inventory`)}else{if(!e.json||typeof e.json!=`object`||![null,void 0].includes(e.namesCount)&&(!Number.isSafeInteger(e.namesCount)||e.namesCount<0))throw Error(`Invalid sourcemap metadata`);if(!Array.isArray(e.json.sources)||e.json.sources.some(e=>!a.has(e))||!Array.isArray(e.sourceSizes)||e.sourceSizes.length!==e.json.sources.length||e.sourceSizes.some(e=>e!==null&&(!Number.isSafeInteger(e)||e<0))||[...a].some(([e,t])=>i.has(e)!==(t!==null))||s.size>0)throw Error(`Invalid sourcemap inventory`);c.json=e.json,c.sourceSizes=e.sourceSizes,c.namesCount=e.namesCount,e.edges!==void 0&&(c.edges=Mr(e.edges,e.files))}if(e.codeStats===void 0)c.codeStats=xr(o,a);else{let t=e.codeStats,n=e=>Number.isSafeInteger(e)&&e>=0;if(!t||![t.files,t.lines,t.bytes].every(n)||!Array.isArray(t.languages)||t.languages.some(e=>!e||typeof e.key!=`string`||typeof e.label!=`string`||![e.files,e.lines,e.bytes].every(n)))throw Error(`Invalid bundle code stats`);c.codeStats=t}return c}function Mr(e,t){if(!Array.isArray(e))throw Error(`Invalid sourcemap edges`);return e.map(e=>{if(!Array.isArray(e)||![2,3].includes(e.length)||e[0]===e[1]||e.length===3&&typeof e[2]!=`string`||e.slice(0,2).some(e=>!Number.isSafeInteger(e)||e<0||e>=t.length))throw Error(`Invalid sourcemap edges`);return[t[e[0]][0],t[e[1]][0],...e.slice(2)]})}function Nr(e,{integrity:t,kind:n,size:r}){if(n===`stasis`)return{integrity:t,kind:n,size:r,bundle:j.parse(e)};if(n!==`sourcemap`)throw Error(`Unsupported bundle format`);return{integrity:t,kind:n,size:r,...Gn(e)}}export{$e as a,j as b,st as c,Y as d,Zn as e,Qn as f,Z as g,ir as h,or as i,sr as j,cr as k,dr as l,Q as m,pr as n,mr as o,gr as p,_r as q,xr as r,wr as s,Er as t,Dr as u,Or as v,Ar as w,jr as x,Nr as y};
@@ -0,0 +1 @@
1
+ var e=/^\d+(?:\.[\dA-Za-z]+)*$/u,t=t=>e.test(t),n=e=>/[A-Za-z]/u.test(e),r=e=>(e.match(/\d+|[A-Za-z]+/gu)??[]).map(e=>/^\d/u.test(e)?BigInt(e):e),i=e=>Array.from(e.matchAll(/[.0]+/gu),e=>[e.index,e.index+e[0].length]);function a(e,[t,n],r){for(let i=t;i<n;i++)if(r(e[i-1]))return i}function o(e){let t=e.length;for(;e[t-1]===`.`||e[t-1]===`0`;)t--;let o=t<e.length?a(e,[t,e.length],e=>e!==void 0&&/[A-Za-z.]/u.test(e)):void 0,s=e.slice(0,o);if(!n(e))return r(s);for(let e of i(s)){let t=/[A-Za-z]/u.test(s[e[1]]??``)?a(s,e,e=>e===void 0||e===`.`):void 0;if(t!==void 0)return r(`${s.slice(0,t)}${s.slice(e[1])}`)}return r(s)}var s=(e,t)=>e<t?-1:+(e>t);function c(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let[r,i]=[e[n]??0n,t[n]??0n];if(r!==i)return typeof r==typeof i?s(r,i):typeof r==`string`?-1:1}return 0}var l=(e,t)=>e===t?0:c(o(e),o(t));function u(e){let t=r(e),n=t.findIndex(e=>typeof e==`string`);return n===-1?t:t.slice(0,n)}var d=e=>n(e)?u(e).join(`.`):e;function f(e){let t=u(e);return t.length>1&&t.pop(),t[t.length-1]+=1n,t.join(`.`)}var p={__proto__:null,"=":e=>e===0,"!=":e=>e!==0,">":e=>e>0,"<":e=>e<0,">=":e=>e>=0,"<=":e=>e<=0},m=/^(=|!=|>|<|>=|<=|~>) (\S+)$/u;function h(e,n=t){let r=m.exec(e);return r===null||!n(r[2])?void 0:[r[1],r[2]]}function g(e,[t,n]){return t===`~>`?l(e,n)>=0&&l(d(e),f(n))<0:p[t](l(e,n))}function _(e){let t=e.map(o),r=e.map((e,r)=>n(e)?o(d(e)):t[r]);return{sorted:t.sort(c),release:r.sort(c).at(-1),keys:void 0}}function v(e,[t,n]){let r=o(n);if(t===`!=`)return!(e.keys??=new Set(e.sorted.map(e=>e.join(`.`)))).has(r.join(`.`));let i=c(e.sorted[0],r);return t===`~>`?i>=0&&c(e.release,o(f(n)))<0:p[t](i)&&p[t](c(e.sorted.at(-1),r))}export{t as a,l as b,h as c,g as d,_ as e,v as f};
@@ -0,0 +1,4 @@
1
+ import{a as e,b as t,c as n,d as r}from"./chunk-M3Y6SLC4.js";import{a as i,b as a,c as o,d as s,e as c}from"./chunk-PAD2JHZT.js";import{C as l,F as u,H as d,J as f,M as p,O as m,Q as h,S as g,e as _,f as v,h as y,k as b,m as x,n as S,o as C,p as w,u as T,v as E,w as D,x as O,z as k}from"./chunk-UCP3JRE2.js";import{b as ee}from"./chunk-DEVAORP2.js";import{d as te}from"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as ne,d as A,h as j,i as M,j as N,k as P,l as re,o as ie,p as F,r as ae,s as I,t as oe}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var se=[`name`,`version`,`uid`,`resolved`,`integrity`,`dependencies`,`optionalDependencies`];function ce(e,t){let n=e.indexOf(`@`,1);if(n===-1)throw new A(`${j(e)} is not a pattern of the form name@range`,t);return{name:O(e.slice(0,n),t),range:e.slice(n+1)}}function le(e){if(!e.startsWith(`npm:`))return;let t=e.slice(4),n=t.indexOf(`@`,1);return n===-1?{name:t,range:``}:{name:t.slice(0,n),range:t.slice(n+1)}}var ue=new Set([`github.com`,`gitlab.com`,`bitbucket.com`,`bitbucket.org`]);function L(e){if(/^(?:git:|git\+.+:|ssh:|https?:.+\.git(?:$|#.))/u.test(e))return!0;let t=URL.parse(e);return t!==null&&ue.has(t.hostname)&&`${t.pathname}${t.search}`.split(`/`).filter(Boolean).length===2}var de=/^[^:@%/\s.-][^:@%/\s]*\/[^:@\s/%][^:@\s/%#]*(?:#.*)?$/u;function R(e){return L(e)?`git`:/^https?:\/\//u.test(e)||!e.includes(`@`)&&/\.(?:tgz|tar\.gz)$/u.test(e)?`tarball`:e.startsWith(`github:`)||de.test(e)?`github`:/^(?:file:|\.{1,2}\/|\/)/u.test(e)?`file`:/^(link|gitlab|gist|bitbucket):/u.exec(e)?.[1]??`registry`}var fe={github:{host:`github.com`,archive:e=>[`https://codeload.github.com/${e}/tar.gz/`,``]},gitlab:{host:`gitlab.com`,archive:e=>[`https://gitlab.com/${e}/repository/archive.tar.gz?ref=`,``]},bitbucket:{host:`bitbucket.org`,archive:e=>[`https://bitbucket.org/${e}/get/`,`.tar.gz`]}};function pe(e){let t=e.split(`@`),n=(t.length>2?`${t[1]}@${t[2]}`:e).replace(/#.*/u,``).replace(/^.*:/u,``).replace(/.git$/u,``).split(`/`);return n.length<2?void 0:n.slice(-2).join(`/`)}function z(e){let t=e.replace(/^(?:file|link):/u,``);return t.startsWith(`/`)?`/${t.split(`/`).filter(e=>e!==``&&e!==`.`).join(`/`)}`:u(`.`,t)}function me(e,t,n){let r=k(e,t);if(n!==void 0&&n.valid(r)===null)throw new A(`${j(r)} is not a version semver reads`,t);return r}function he(e,t,n,r,i){if(e.startsWith(`file:`))l(e.slice(e.startsWith(`file:./`)?7:5),r);else if(!h(e))throw new A(`${j(e)} is not an http(s) URL, a file: path or a git URL`,r);if(t!==void 0&&!f(t))throw new A(`${j(t)} is not the hex sha1 of a tarball`,r);let a=n===void 0?void 0:m(n,i).get(`sha1`);if(t!==void 0&&a!==void 0&&a.slice(5)!==te(ee(t)))throw new A(`${j(a)} is not the sha1 after the "#" of resolved`,i);return{type:`tarball`,tarball:e,sha1:t,integrity:n}}function ge(e,t){let n=M(t,`resolved`),r=M(t,`integrity`);if(e.resolved===void 0){if(e.integrity!==void 0)throw new A(`an integrity, with nothing resolved`,r);return}let[i,a,...o]=S(e.resolved,n).split(`#`);if(o.length>0)throw new A(`more than one "#", of which yarn reads the first alone`,n);if(!L(i))return he(i,a,e.integrity,n,r);if(e.integrity!==void 0)throw new A(`an integrity, which yarn does not check for a git repository`,r);if(a===void 0||!d(a))throw new A(`expected a full commit hash after the "#" of ${j(i)}`,n);return{type:`git`,repo:p(i,n),commit:a}}function B(e){if(e!==void 0)return e.type===`git`?`${e.repo}#${e.commit}`:e.tarball.replace(/^file:\.\//u,`file:`)}var _e=e=>e===void 0?`nothing, as for a directory`:e.type===`git`?`a git repository`:`a file: tarball`;function ve(e,t,n){let[r]=e,i=e.find(e=>e.name!==r.name);if(i!==void 0)throw new A(`${j(r.key)} and ${j(i.key)} give it two names, of which yarn installs it under one alone`,n);if(t.name!==void 0){let e=y(t.name,M(n,`name`)),i=e===r.name?`the name its patterns give, which yarn does not write`:`yarn installs this as ${j(e)}, and leaves ${j(r.name)} out, which its patterns ask for`;throw new A(i,M(n,`name`))}let a=e.filter(e=>e.source===`registry`).map(({key:e,name:t,alias:r})=>[e,r===void 0?t:O(r.name,n)]),o=a.find(([,e])=>e!==a[0][1]);if(o!==void 0)throw new A(`${j(a[0][0])} and ${j(o[0])} ask for two packages, ${j(a[0][1])} and ${j(o[1])}`,n);return a[0]?.[1]}function ye({range:e,source:t},n){let r=e.split(`#`)[0];if(t===`file`||t===`link`)return n===void 0;if(t===`tarball`)return n?.tarball===r;if(t===`git`)return n?.repo===r;if(t===`gist`)return n?.repo===`https://gist.github.com/${r.slice(5)}.git`;let{host:i,archive:a}=fe[t],o=pe(e);if(o===void 0||n===void 0)return!1;if(n.type===`git`)return n.repo===`git+ssh://git@${i}/${o}.git`;let[s,c]=a(o),{tarball:l}=n;return l.startsWith(s)&&l.endsWith(c)&&d(l.slice(s.length,l.length-c.length))}function be(e,t){let[n,...r]=e.filter(e=>e.source===`file`||e.source===`link`),i=r.find(e=>n.source===`link`||e.source===`link`||z(e.range)!==z(n.range));if(i!==void 0)throw new A(`${j(n.key)} and ${j(i.key)} share an entry, where yarn writes one for each`,t)}function xe(e,t,{asks:n,version:r},i){let a=e.filter(e=>e.source!==`registry`),o=a.find(e=>!ye(e,t));if(o!==void 0)throw new A(`${j(o.key)} resolves to another source than it names`,M(i,`resolved`));be(e,i);let s=e.find(e=>e.source===`registry`);if((a.length===0||a.some(e=>e.source===`tarball`))&&t?.type===`tarball`&&t.sha1===void 0&&t.integrity===void 0)throw new A(`a tarball with no hash, neither a sha1 after "#" nor an integrity, where yarn writes the sha1`,M(i,`resolved`));if(s!==void 0){if(a.length>0)return{registry:s.key,sources:a.map(e=>e.key)};if(t===void 0&&e.length===1)return{registry:s.key,sources:[]};if(t?.type!==`tarball`||t.tarball.startsWith(`file:`))throw new A(`${j(s.key)} asks for the registry, and resolves to ${_e(t)}`,i);g(t.tarball,n,r,M(i,`resolved`))}}function Se(e,t,n){let r=Object.create(null);for(let[i,a,o]of v(b(e),t)){let e=`${O(i,o)}@${y(a,o)}`;r[i]=e,n.push({targets:r,name:i,range:a,pattern:e,where:o})}return r}function Ce({keys:e,fields:n},r,i){_(n,r,se);let a=e.map(e=>{let{name:t,range:n}=ce(e,M(``,e));return{key:e,name:t,range:n,source:R(n),alias:le(n)}}),o=ve(a,n,r),s=me(n.version,M(r,`version`),i),c=ge(n,r),l=xe(a,c,{asks:o,version:s},r),u=[],{dependencies:d,optionalDependencies:f}=t(n,r,(e,t)=>Se(e,t,u)),p=x(n,`uid`,r,y);if(p===s)throw new A(`the version, which yarn does not write as a uid`,M(r,`uid`));return{pkg:{patterns:e,name:a[0].name,version:s,uid:p,resolution:c,dependencies:d,optionalDependencies:f},patterns:a,handed:l,requests:u}}var we=/^(?![vV=]?\d|[xX*](?:\.|$))[A-Za-z][\w.-]*$/u;function V(e,t){return t===void 0?!/[:/@#]/u.test(e)&&!we.test(e):t.validRange(e)!==null}function Te(e,t,n,r,i){let a=e=>e.source===`registry`&&V(e.range,r),o=t.find(a)??n.patterns.find(a);if(o!==void 0)throw new A(`is ${e.name} ${e.version}, as ${j(n.key)} is, and yarn gives ${j(o.key)} whichever it resolves first`,i)}var H=({integrity:e})=>e===void 0?new Map:m(e),U=e=>JSON.stringify(Object.entries(e).sort(([e],[t])=>e<t?-1:1));function W(e,t,n,r){for(let i of[`dependencies`,`optionalDependencies`])if(U(e[i])!==U(t[i]))throw new A(`other ${i} ${n}`,M(r,i))}function Ee(e,t,n){let r=`than ${j(t.patterns[0])}, of the same ${e.resolution.type===`git`?`commit`:`tarball`}`;if(e.version!==t.version)throw new A(`another version ${r}`,M(n,`version`));W(e,t,r,n);let[i,a]=[e.resolution,t.resolution];if(i.sha1!==void 0&&a.sha1!==void 0&&i.sha1!==a.sha1)throw new A(`another sha1 ${r}`,M(n,`resolved`));let o=H(a);for(let[e,t]of H(i))if(o.has(e)&&o.get(e)!==t)throw new A(`another ${e} integrity ${r}`,M(n,`integrity`))}function De(e,t){let n=Object.create(null),r=[],i=[],a=[],o=new Map,s=new Map,c=new Map;for(let l of e){let[e]=l.keys,u=M(``,e),d=Ce(l,u,t),{pkg:f}=d;for(let e of l.keys)n[e]=f;r.push(...d.patterns),i.push(...d.requests),d.handed!==void 0&&a.push({pkg:f,...d.handed});let p=d.patterns.find(e=>e.source===`file`),m=l.fields.resolved??(p===void 0?void 0:`
2
+ ${z(p.range)}`),h=m===void 0?void 0:`${f.name}
3
+ ${m}`;if(o.has(h))throw new A(`resolves as ${j(o.get(h))} does, which yarn writes as one entry`,u);h!==void 0&&o.set(h,e);let g=B(f.resolution);if(g!==void 0){let e=s.get(g)??s.set(g,[]).get(g);e.length>0&&Ee(f,e[0],u),e.push(f)}if(d.handed?.sources.length===0)continue;let _=`${f.name}
4
+ ${f.version}`,v=c.get(_);v===void 0?c.set(_,{key:e,patterns:d.patterns}):Te(f,d.patterns,v,t,u)}for(let e of a)e.other=s.get(B(e.pkg.resolution))?.find(t=>t!==e.pkg);return{packages:n,patterns:r,requests:i,mixed:a}}var G=`manifests`;function Oe(e,t,n){let r=/^(?:file|link):/u.exec(e)?.[0];if(r===void 0&&!e.startsWith(`/`))return e;let i=e.slice(r?.length??0);if(i.startsWith(`/`)||/^[A-Za-z]:/u.test(i))throw new A(`${j(e)} is an absolute path`,n);let a=l(u(t,i),n);return`${r}${a!==`.`&&/^\.(?:\/|$)/u.test(i)&&!/^\.{0,2}\//u.test(a)?`./`:``}${a}`}var K=(e,t,n)=>n===void 0?e.version===t||void 0:n.satisfies(e.version,t,{loose:!0});function q({name:e,range:t,pattern:n,where:r},i,a){let o=i.get(e);if(o!==void 0&&K(o,t,a)===!0)throw new A(`${j(n)} is satisfied by the workspace ${j(o.dir)}, which yarn links instead`,r)}function J({name:e,range:t,pattern:n,where:r},i,a){let o=i?.get(e);if(o===void 0)throw new A(`${j(n)} is not a pattern of the lockfile${i===void 0?`, nor a workspace's, as only the manifests may say`:``}`,r);if(K(o,t,a)===!1)throw new A(`${j(n)} is not a pattern of the lockfile, nor satisfied by the workspace ${j(o.dir)}, ${o.version}`,r);return`link:${o.dir}`}function Y(e,t,n,r){for(let i of e)i.pattern in t||(i.targets[i.name]=J(i,n,r))}function X(e,{packages:t,workspaces:n,semver:r}){return e.pattern in t?(q(e,n,r),e.pattern):J(e,n,r)}var ke=[`optionalDependencies`,`dependencies`,`devDependencies`];function Ae(t,n,r,i){let a=new Map;for(let e of ke)for(let[n,i,o]of v(b(t[e]),M(r,e))){if(n===`//`)continue;let t=y(i,o),r=a.get(n)??a.set(n,{kind:e,value:t,here:o,range:void 0}).get(n);r.range===void 0&&t!==``&&t!==`*`&&(r.range=t)}let o=Object.create(null);for(let t of e)o[t]=Object.create(null);for(let[e,{kind:t,value:r,here:s,range:c}]of a){let a=Oe(c??r,n,s);o[t][e]=X({name:e,range:a,pattern:`${O(e,s)}@${a}`,where:s},i)}return o}function je(e,t,n){let r=[];for(let[a,o,s]of v(b(e),t)){if(a===`//`)continue;if(/\/$|\/\/|\*$/u.test(a))throw new A(`${j(a)} is a path yarn ignores`,s);let e=a.match(/(?:@[^/]+\/)?[^/]+/gu)??[a],t=i(e.length===1?`**/${a}`:a,s),c=O(e.at(-1),s),l=e.slice(0,-1).find(e=>e!==`**`&&!D(e.replaceAll(/[*?]/gu,`x`)));if(l!==void 0)throw new A(`${j(l)} is not a package name, or a glob of one`,s);let u=y(o,s);if(R(u)===`registry`&&!V(u,n))throw new A(`${j(u)} is a range yarn ignores in a resolution: neither a semver range nor a source`,s);r.push({path:a,tests:t,name:c,range:u,pattern:`${c}@${u}`,where:s})}return r}function Me(t,r,i){let a=Object.values(t).flatMap(t=>e.map(e=>t[e])),o=n([i.map(e=>e.pattern).filter(e=>e in r),...a],r);if(o!==void 0)throw new A(`nothing asks for it: no manifest, no package and no resolution`,M(``,o))}function Ne(e,t){let n=e.workspaces;if(n===void 0)return[];let r=M(t,`workspaces`),a=n;Array.isArray(n)||(_(n,r,[`packages`,`nohoist`]),x(n,`nohoist`,r,C),a=n.packages===void 0?[]:n.packages,r=M(r,`packages`));let o=C(a,r);if(o.length>0&&e.private!==!0)throw new A(`expected true, as yarn has workspaces in a private project alone`,M(t,`private`));return o.map((e,t)=>i(e.replace(/^(?:\.\/)+/u,``).replace(/(?<!\/)\/+$/u,``),`${r}[${t}]`))}var Pe={__proto__:null,depdenencies:`dependencies`,dependancies:`dependencies`,dependecies:`dependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devEependencies:`devDependencies`,devdependencies:`devDependencies`},Fe=/^[\s\dA-Za-z.+=-]{1,256}$/u;function Ie(e,t,n){let r=S(e,t);if(!Fe.test(r))throw new A(`${j(r)} is not a version`,t);if(n===void 0)return r;let i=n.clean(r,{loose:!0});if(i===null)throw new A(`${j(r)} is not a version semver reads`,t);return i}function Le(e,t,n,r,i){for(let e of Object.keys(Pe))if(Object.hasOwn(t,e))throw new A(`a field yarn does not read, for ${j(Pe[e])}`,M(n,e));if(l(e,n)===`.`)return;if(r.length===0)throw new A(`expected workspaces, as there are manifests of workspaces`,M(M(G,`.`),`workspaces`));if(e.split(`/`).includes(`node_modules`)||!r.some(t=>c(t,e)))throw new A("not a workspace the root's `workspaces` finds",n);if(t.resolutions!==void 0)throw new A(`a workspace's, which yarn does not read`,M(n,`resolutions`));let a=M(n,`name`),o=O(y(t.name,a),a);if(t.version===void 0)throw new A(`expected a version, without which yarn ignores the workspace`,M(n,`version`));return{name:o,dir:e,version:Ie(t.version,M(n,`version`),i)}}function Re(e,t,n,r){_(e,G);let i=M(G,`.`),a=e[`.`];if(a===void 0)throw new A(`expected the manifest beside the lockfile, "."`,G);let o=Ne(_(a,i),i),s=new Map;for(let[t,n,i]of v(e,G)){let e=Le(t,_(n,i),i,o,r);if(e!==void 0){if(s.has(e.name))throw new A(`the name of the workspace ${j(s.get(e.name).dir)} too`,M(i,`name`));s.set(e.name,e)}}for(let e of n)e.pattern in t&&q(e,s,r);Y(n,t,s,r);let c={packages:t,workspaces:s,semver:r},l=w(e,G,(e,t,n)=>Ae(e,n,t,c)),u=je(a.resolutions,M(i,`resolutions`),r);for(let e of u){if(!(e.pattern in t)&&!s.has(e.name))throw new A(`${j(e.pattern)} is not a pattern of the lockfile, where yarn records every resolution's`,e.where);e.target=X(e,c)}return Me(l,t,u),{importers:l,workspaces:s,rules:u,aggregated:Array.isArray(a.workspaces?.packages??a.workspaces)}}var ze=`workspace-aggregator-00000000-0000-0000-0000-000000000000`;function Be(t,{importers:n,workspaces:r,rules:i,aggregated:c},l){let u=i.map(e=>e.tests),d=(e,t)=>t.split(`/`).reduce((e,t)=>e.map((e,n)=>o(u[n],e,t)),e),f=e=>e.startsWith(`link:`)?n[e.slice(5)]:t[e],p=(e,t,r,i)=>{let a=e.patterns===void 0?M(G,Object.keys(n).find(t=>n[t]===e)):M(``,e.patterns[0]);return new A(`${j(e[t][r])} ${i}`,M(M(a,t),r))},m=new Map,h=[],g=new Set,_=new Map,v=(e,t,n,r)=>{let i=e[t][n],a=r===void 0||r.pattern===i,o=a?_.get(i):g.has(i)?r:void 0;if(o!==void 0)throw p(e,t,n,`is asked for both where the resolution ${j(o.path)} applies and where none does, and yarn writes one entry for both`);a?g.add(i):_.set(i,r)},y=new Set,x=(e,t)=>{if(y.has(e))return;let n=m.get(e)??new Set,r=t.join();n.has(r)||(m.set(e,n.add(r)),h.push([e,t]))},S=n[`.`],C=u.map(e=>a(e,1)),w=d(C,ze),T=new Map,E=[],D=(e,n)=>t[e.target]===n||l.get(n)?.sources[0]===e.target,O=(e,n,a,o)=>{let m=e[n][a],h=d(o,a),g=t[m],_=l.get(g),y=_===void 0?``:`the resolution ${j(_.rule.path)} resolves to`,b=e===S&&(!c||r.has(a)),C=e===S&&!b?d(w,a):h,O=i.find((e,t)=>e.name===a&&s(u[t],C[t]));if(b){if(_!==void 0)throw p(e,n,a,`is given what ${y}, which yarn applies to no dependency of the root's own`);if(O!==void 0&&!D(O,g))throw p(e,n,a,`is not given ${j(O.pattern)} as the resolution ${j(O.path)} says, which yarn ignores for the root's own dependencies`);return v(e,n,a,void 0),x(f(m),h)}if(O!==void 0&&!D(O,g))throw p(e,n,a,`is not given ${j(O.pattern)}, which the resolution ${j(O.path)} resolves it to`);if(_?.sources.includes(m))throw p(e,n,a,`asks for what ${y}, as a dependency of its own`);if(_!==void 0&&!_.sources.includes(O?.target))throw p(e,n,a,`is given what ${y}, which yarn does not apply to it here`);v(e,n,a,O),e===S&&O!==void 0&&T.set(m,O),O===void 0?x(f(m),h):O.target.startsWith(`link:`)&&E.push([e[n],a,O.target])},k=()=>{for(;h.length>0;){let[t,n]=h.pop();for(let r of e)for(let e of Object.keys(b(t[r])))O(t,r,e,n)}};for(let e of i)e.pattern in t&&(g.add(e.pattern),x(t[e.pattern],d(C,e.name)));k(),y=new Set(m.keys());for(let t of e)for(let e of Object.keys(S[t]))O(S,t,e,C);for(let[e,{dir:t}]of r)x(n[t],d(w,e));k();for(let[e,t,n]of E)e[t]=n;return{plain:g,own:T}}function Ve(e,t,n,r,i){for(let{key:a,range:o,source:s,alias:c}of t){let t=n?.own.get(a);if(s!==`registry`||t===void 0&&n?.plain.has(a)===!1)continue;let l=c?.range??o,{version:u}=e[a];if(l===``||r.satisfies(u,l)||r.validRange(l)===null)continue;let d=i?`and no resolution gives it`:`which only a resolution may excuse, as the manifests would say`;throw t!==void 0&&(d=`which the root asks for before the resolution ${j(t.path)} applies, so yarn takes it as outdated`),new A(`${u} does not satisfy ${j(l)}, ${d}`,M(``,a))}}function He(e,t,n){let r=t?.workspaces.get(e.name);if(r===void 0)return;let i=t.rules.find(e=>e.target===`link:${r.dir}`);if(i===void 0)return;let a=`than the workspace ${j(r.dir)}, which the resolution ${j(i.path)} gives it`;if(e.version!==r.version)throw new A(`another version ${a}, ${r.version}`,M(n,`version`));return W(e,t.importers[r.dir],a,n),i}function Ue({packages:e,patterns:t,mixed:n},r,i){let a=new Map;for(let{pkg:e,registry:t,sources:i,other:o}of n){let n=M(``,e.patterns[0]);if(i.length===0){let i=He(e,r,n);if(i===void 0)throw new A(`${j(t)} asks for the registry, and resolves to nothing, ${r===void 0?`which only a resolution to a workspace may, as the manifests would say`:`as for a directory`}`,n);a.set(e,{sources:[i.target],rule:i});continue}if(r===void 0)throw new A(`${j(t)} asks for the registry, and is given what ${j(i[0])} names, which only a resolution may, as the manifests would say`,n);let s=i.find(e=>!r.rules.some(t=>t.pattern===e));if(s!==void 0)throw new A(`${j(t)} asks for the registry, and is given what ${j(s)} names, which no resolution does`,n);let c=r.rules.find(e=>i.includes(e.pattern));if(o!==void 0)throw new A(`asks for what the resolution ${j(c.path)} resolves to, as a dependency of its own`,M(``,o.patterns[0]));a.set(e,{sources:i,rule:c})}let o=r!==void 0&&r.rules.length>0?Be(e,r,a):void 0;i!==void 0&&Ve(e,t,o,i,r!==void 0);for(let[t,{sources:n}]of a)n[0].startsWith(`link:`)&&delete e[t.patterns[0]]}var We=[`# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.`,`# yarn lockfile v1`],Ge=/^# yarn lockfile v(\d+)$/u,Ke=/[:\s\\",[\]]/u,qe=e=>e.startsWith(`true`)||e.startsWith(`false`)||Ke.test(e)||!/^[A-Za-z]/u.test(e),Je=/[A-Za-z][^\s:\\",[\]]*/uy;function Ye(e,t,n){let[r,i]=oe(e,t,n);if(r.includes(`\\"`))throw N(`${j(r)} is a string yarn reads to another quote`,n);let a=P.exec(r)?.[0];if(a!==void 0)throw N(`an escape for ${ne(a)}, which is not allowed`,n);if(!qe(r))throw N(`${j(r)} is quoted, where yarn writes it bare`,n);return[r,i]}function Xe(e,t,n){if(e[t]===`"`)return Ye(e,t,n);Je.lastIndex=t;let r=Je.exec(e)?.[0];if(r===void 0)throw N(`expected a string, found ${ie(e,t)}`,n);if(qe(r))throw N(`${j(r)} is bare, where yarn quotes it`,n);return[r,t+r.length]}function Z(e,t,n){let[r,i]=Xe(e,t,n);if(r===``)throw N(`an empty key, which yarn does not read`,n);return[r,i]}function Ze(e,t,n){let[r,i]=Xe(e,t,n);if(r.startsWith(`null`)&&e[t]!==`"`)throw N(`${j(r)} is bare, and read as null by some readers`,n);return Q(e,i,n),r}function Q(e,t,n){if(t!==e.length)throw N(`expected the end of the line, found ${j(e.slice(t))}`,n)}function Qe(e,t){if(e.line!==t)throw N(`expected yarn's header, ${j(t)}`,e.number);I(e)}function $e(e){Qe(e,We[0]);let t=Ge.exec(e.line??``)?.[1];if(t!==void 0&&t!==`1`)throw N(`unsupported version: expected "1", found ${j(t)}`,e.number);for(Qe(e,We[1]);e.line?.startsWith(`#`);I(e)){if(/^yarn lockfile v\d+$/u.test(e.line.slice(1).trim()))throw N(`a second lockfile version`,e.number);if(e.line===`#`)throw N(`a comment of "#" alone, which @yarnpkg/parsers does not read`,e.number)}}function $(e,t,n,r,i){let a=Object.create(null);for(let n=e.line;n?.startsWith(` `)&&F(n)>t-2;n=e.line){if(F(n)!==t)throw N(`expected ${t} spaces of indentation, found ${F(n)}`,e.number);let[r,o]=Z(n,t,e.number);i(a,r,o,n,e.number)}if(Object.keys(a).length===0)throw N(n,r);return a}var et=(e,t,n)=>$(e,4,`expected what ${j(t)} holds below it`,n,(n,r,i,a,o)=>{if(a[i]!==` `)throw N(`expected a space and a range after ${j(r)}`,o);let s=Ze(a,i+1,o);if(r in n)throw N(`${j(r)} is in ${j(t)} twice`,o);n[r]=s,I(e)}),tt=(e,t)=>$(e,2,`expected the fields of the entry below it`,t,(t,n,r,i,a)=>{if(n in t)throw N(`the field ${j(n)} twice`,a);if(i[r]===`:`){Q(i,r+1,a),I(e),t[n]=et(e,n,a);return}if(i[r]!==` `)throw N(`expected a space and a value, or ":", after ${j(n)}`,a);t[n]=Ze(i,r+1,a),I(e)});function nt(e,t){let{line:n,number:r}=e,i=[];for(let e=0;;){let[a,o]=Z(n,e,r);if(t.has(a))throw N(`${j(a)} is a key ${t.get(a)===r?`twice`:`at line ${t.get(a)+1} too`}`,r);if(t.set(a,r),i.push(a),n[o]===`:`){Q(n,o+1,r);break}if(!n.startsWith(`, `,o))throw N(`expected ", " and a pattern, or ":", after ${j(a)}`,r);e=o+2}return I(e),{keys:i,fields:tt(e,r)}}function rt(e){re(e,`yarn`);let t=ae(e,P);I(t),$e(t);let n=[],r=new Map,i;for(let e=t.line;e!==void 0;e=t.line){if(e===``){n.length>0&&(i??=t.number),I(t);continue}if(e.startsWith(` `))throw i===void 0?N(`expected an entry, at column 0`,t.number):N(`a blank line within an entry`,i);if(e.startsWith(`#`))throw N(`a comment, which yarn writes in the header alone`,t.number);i=void 0,n.push(nt(t,r))}return n}var it=[`manifests`,`checkVersions`,`semver`],at=[`clean`,`satisfies`,`valid`,`validRange`];function ot(e,t){let n=t===void 0?()=>({dev:void 0,optional:void 0,devOptional:void 0}):r(e,t);for(let t of new Set(Object.values(e)))Object.assign(t,n(t))}function st(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{manifests:n,semver:r}=T(t,it);E(t,at);let i=De(rt(e),r),{packages:a,requests:o}=i;n===void 0&&Y(o,a);let s=n===void 0?void 0:Re(n,a,o,r);return Ue(i,s,r),ot(a,s?.importers),{packages:a,importers:s?.importers}}export{A as LockfileError,st as parseYarn1Lockfile};
@@ -0,0 +1 @@
1
+ var e=2n**64n-1n,t=`0|[1-9]\\d*`,n=`\\d*[A-Za-z-][\\dA-Za-z-]*|${t}`,r=`(?:${n})(?:\\.(?:${n}))*`,i=`[\\dA-Za-z-]+(?:\\.[\\dA-Za-z-]+)*`,a=`[*Xx]`,o=RegExp(`^(${t})\\.(${t})\\.(${t})(?:-(${r}))?(?:\\+(${i}))?$`,`u`),s=RegExp(`^(?:${r})?$`,`u`),c=RegExp(`^(?:${i})?$`,`u`),l=RegExp(`^ *${a} *$`,`u`),u=RegExp(`^ *(?:(>=|<=|=|>|<|~|\\^) *)?(${t})(?:\\.(?:(${a})(?:\\.${a})?|(${t})(?:\\.(?:(${a})|(${t})(?:-(${r}))?(?:\\+${i})?))?))? *$`,`u`);function d(t){if(t===void 0)return;if(t.length>20)return null;let n=BigInt(t);return n>e?null:n}var f=t=>typeof t==`bigint`&&t>=0n&&t<=e;function p(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e}function m(e){let t=o.exec(p(e));if(t===null)return;let[n,r,i]=t.slice(1,4).map(d);if(![n,r,i].includes(null))return{major:n,minor:r,patch:i,pre:t[4]??``,build:t[5]??``}}function h(e){let t=u.exec(e);if(t===null)return;let[,n,r,i,a,o,s,c=``]=t,[l,f,p]=[r,a,s].map(d);if(![l,f,p].includes(null))return{op:n??(i||o?`*`:`^`),major:l,minor:f,patch:p,pre:c}}var g=32;function _(e){if(l.test(p(e)))return[];let t=e.split(`,`,g+1);if(t.length>g)return;let n=t.map(h);return n.includes(void 0)?void 0:n}var v=(e,t)=>e===t?0:e<t?-1:1;function y(e,t){if(e===t)return 0;if(e===``)return 1;if(t===``)return-1;let[n,r]=[e.split(`.`),t.split(`.`)];for(let[e,t]of n.entries()){let n=r[e];if(n===void 0)return 1;let[i,a]=[/^\d+$/u.test(t),/^\d+$/u.test(n)];if(i!==a)return i?-1:1;let o=i&&v(t.length,n.length)||v(t,n);if(o!==0)return o}return n.length===r.length?0:-1}function b(e,t){for(let n of[`major`,`minor`,`patch`]){if(e[n]===void 0)return t.pre===e.pre?0:NaN;if(t[n]!==e[n])return v(t[n],e[n])}return y(t.pre,e.pre)}var x=(e,t)=>t.major===e.major&&(e.minor===void 0||t.minor===e.minor)&&b(e,t)>=0;function S(e,t){return t.major===e.major?e.minor===void 0?!0:e.patch===void 0?e.major>0n?t.minor>=e.minor:t.minor===e.minor:(e.major>0n||t.minor===e.minor&&(e.minor>0n||t.patch===e.patch))&&b(e,t)>=0:!1}var C=new Map([[`=`,(e,t)=>b(e,t)===0],[`*`,(e,t)=>b(e,t)===0],[`>`,(e,t)=>b(e,t)>0],[`>=`,(e,t)=>b(e,t)>=0],[`<`,(e,t)=>b(e,t)<0],[`<=`,(e,t)=>b(e,t)<=0],[`~`,x],[`^`,S]]);function w(e){let{major:t,minor:n,patch:r,pre:i,build:a}=e??{};return f(t)&&f(n)&&f(r)&&typeof i==`string`&&s.test(i)&&typeof a==`string`&&c.test(a)?{major:t,minor:n,patch:r,pre:i,build:a}:void 0}function T(e){let{op:t,major:n,minor:r,patch:i,pre:a}=e??{};return C.has(t)&&f(n)&&(r===void 0||f(r))&&(i===void 0||r!==void 0&&t!==`*`&&f(i))&&typeof a==`string`&&s.test(a)&&(a===``||i!==void 0)?{op:t,major:n,minor:r,patch:i,pre:a}:void 0}function E(e){if(!Array.isArray(e))return;let{length:t}=e;if(t>g)return;let n=Array.from({length:t},(t,n)=>T(e[n]));return n.includes(void 0)?void 0:n}function D(e,t){let n=E(e);if(n===void 0)throw TypeError(`expected comparators, as parseVersionReq makes`);let r=w(t);if(r===void 0)throw TypeError(`expected a version, as parseVersion makes`);return n.every(e=>C.get(e.op)(e,r))?r.pre===``||n.some(e=>e.major===r.major&&e.minor===r.minor&&e.patch===r.patch&&e.pre!==``):!1}export{p as a,m as b,_ as c,D as d};