@visulima/vis 2.0.1 → 2.0.2

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 (149) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE.md +862 -170
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/packem_chunks/CONFIG_FILES.js +3 -3
  6. package/dist/packem_chunks/bloom-status.js +1 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +68 -68
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +145 -143
  11. package/dist/packem_chunks/dispatch.js +1 -1
  12. package/dist/packem_chunks/doctor-probe.js +1 -1
  13. package/dist/packem_chunks/fix.js +3 -3
  14. package/dist/packem_chunks/handler.js +1 -1
  15. package/dist/packem_chunks/handler10.js +3 -3
  16. package/dist/packem_chunks/handler11.js +1 -1
  17. package/dist/packem_chunks/handler12.js +3 -3
  18. package/dist/packem_chunks/handler13.js +1 -1
  19. package/dist/packem_chunks/handler14.js +1 -1
  20. package/dist/packem_chunks/handler15.js +1 -1
  21. package/dist/packem_chunks/handler16.js +1 -1
  22. package/dist/packem_chunks/handler17.js +1 -1
  23. package/dist/packem_chunks/handler18.js +1 -1
  24. package/dist/packem_chunks/handler19.js +1 -1
  25. package/dist/packem_chunks/handler2.js +1 -1
  26. package/dist/packem_chunks/handler20.js +2 -2
  27. package/dist/packem_chunks/handler21.js +1 -1
  28. package/dist/packem_chunks/handler22.js +1 -1
  29. package/dist/packem_chunks/handler23.js +1 -1
  30. package/dist/packem_chunks/handler24.js +1 -1
  31. package/dist/packem_chunks/handler26.js +1 -1
  32. package/dist/packem_chunks/handler27.js +1 -1
  33. package/dist/packem_chunks/handler28.js +1 -1
  34. package/dist/packem_chunks/handler29.js +1 -1
  35. package/dist/packem_chunks/handler3.js +1 -1
  36. package/dist/packem_chunks/handler30.js +1 -1
  37. package/dist/packem_chunks/handler4.js +4 -4
  38. package/dist/packem_chunks/handler5.js +1 -1
  39. package/dist/packem_chunks/handler50.js +5 -5
  40. package/dist/packem_chunks/handler51.js +2 -2
  41. package/dist/packem_chunks/handler53.js +1 -1
  42. package/dist/packem_chunks/handler54.js +2 -2
  43. package/dist/packem_chunks/handler55.js +1 -1
  44. package/dist/packem_chunks/handler58.js +4 -4
  45. package/dist/packem_chunks/handler59.js +1 -1
  46. package/dist/packem_chunks/handler6.js +7 -7
  47. package/dist/packem_chunks/handler60.js +2 -2
  48. package/dist/packem_chunks/handler61.js +13 -13
  49. package/dist/packem_chunks/handler62.js +3 -3
  50. package/dist/packem_chunks/handler63.js +2 -2
  51. package/dist/packem_chunks/handler64.js +4 -4
  52. package/dist/packem_chunks/handler66.js +1 -1
  53. package/dist/packem_chunks/handler67.js +16 -16
  54. package/dist/packem_chunks/handler68.js +1 -1
  55. package/dist/packem_chunks/handler69.js +15 -15
  56. package/dist/packem_chunks/handler7.js +1 -1
  57. package/dist/packem_chunks/handler70.js +5 -5
  58. package/dist/packem_chunks/handler71.js +1 -1
  59. package/dist/packem_chunks/handler72.js +23 -23
  60. package/dist/packem_chunks/handler73.js +5 -5
  61. package/dist/packem_chunks/handler74.js +22 -22
  62. package/dist/packem_chunks/handler75.js +2 -2
  63. package/dist/packem_chunks/handler76.js +5 -5
  64. package/dist/packem_chunks/handler77.js +18 -18
  65. package/dist/packem_chunks/handler78.js +25 -25
  66. package/dist/packem_chunks/handler8.js +1 -1
  67. package/dist/packem_chunks/handler9.js +1 -1
  68. package/dist/packem_chunks/heal-accept.js +2 -2
  69. package/dist/packem_chunks/heal.js +4 -4
  70. package/dist/packem_chunks/help-command.js +46 -46
  71. package/dist/packem_chunks/index3.js +3 -3
  72. package/dist/packem_chunks/keys-refresh.js +1 -1
  73. package/dist/packem_chunks/lean.js +2 -2
  74. package/dist/packem_chunks/list.js +1 -1
  75. package/dist/packem_chunks/loader.js +1 -1
  76. package/dist/packem_chunks/prompts.js +1 -1
  77. package/dist/packem_chunks/prune.js +1 -1
  78. package/dist/packem_chunks/status.js +1 -1
  79. package/dist/packem_chunks/sync.js +1 -1
  80. package/dist/packem_chunks/sync2.js +1 -1
  81. package/dist/packem_chunks/tripwire.js +1 -1
  82. package/dist/packem_chunks/ts-loader.js +6 -6
  83. package/dist/packem_chunks/verify-lockfile.js +1 -1
  84. package/dist/packem_shared/{advisories-BGeuHJQg.js → advisories-CCBGdU8U.js} +1 -1
  85. package/dist/packem_shared/{affected-selection-B85ND6JV.js → affected-selection-Dj-ymxhw.js} +1 -1
  86. package/dist/packem_shared/{affected-shas-BWRRAB47.js → affected-shas-PwkVbPch.js} +1 -1
  87. package/dist/packem_shared/ai-analysis-bGCAc1jR.js +68 -0
  88. package/dist/packem_shared/{ai-fix-BgBU0TOz.js → ai-fix-DV5-dHBY.js} +4 -4
  89. package/dist/packem_shared/{augment-HVeX6LpU.js → augment-24KX2nkI.js} +1 -1
  90. package/dist/packem_shared/{bin-DKod8Iqo.js → bin-CtzhnYMp.js} +1 -1
  91. package/dist/packem_shared/{build-scripts-CM8M1xcG.js → build-scripts-w4SNeR7D.js} +1 -1
  92. package/dist/packem_shared/{command-runtime-BVi4lL8k.js → command-runtime-BLFPUYAT.js} +1 -1
  93. package/dist/packem_shared/{cyclonedx-y7VLI-1d.js → cyclonedx-C4KaVTn1.js} +3 -3
  94. package/dist/packem_shared/{dependency-scan-BAzKpXdW.js → dependency-scan-D_ona0Qm.js} +1 -1
  95. package/dist/packem_shared/{docker-D1LStSlH.js → docker-DaVs-9wK.js} +27 -27
  96. package/dist/packem_shared/{en-BxrK-n-J.js → en-D3CfXlO7.js} +13 -13
  97. package/dist/packem_shared/{failure-log-ChuFC-8f.js → failure-log-CTneNcio.js} +2 -2
  98. package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +1 -0
  99. package/dist/packem_shared/index-CTMU29dI.js +1 -0
  100. package/dist/packem_shared/index-uBVnF4ji.js +35 -0
  101. package/dist/packem_shared/index.server-CusjRLCh.js +2 -0
  102. package/dist/packem_shared/{lifecycle-Db0qh6vR.js → lifecycle-B8A2T3gx.js} +1 -1
  103. package/dist/packem_shared/{lockfile-CDQ0n4P5.js → lockfile-Bccery3L.js} +1 -1
  104. package/dist/packem_shared/{manifests-Da_no4ZH.js → manifests-BDkwiVbh.js} +1 -1
  105. package/dist/packem_shared/{min-release-age-V6L6dpiP.js → min-release-age-OaYpLwux.js} +1 -1
  106. package/dist/packem_shared/missing-package-json-BqS-OnKd.js +1 -0
  107. package/dist/packem_shared/{native-config-sync-C0pUePad.js → native-config-sync-Ds1FtcrM.js} +3 -3
  108. package/dist/packem_shared/{osv-bloom-DNFpvSSO.js → osv-bloom-pKp7urSB.js} +2 -2
  109. package/dist/packem_shared/package-version-C47v64aB.js +4 -0
  110. package/dist/packem_shared/packument-HBVbyf7x.js +1 -0
  111. package/dist/packem_shared/pm-runner-C6eTANt1.js +1 -0
  112. package/dist/packem_shared/{project-name-filter-u2Q7YpQH.js → project-name-filter-CJ3XX2TI.js} +1 -1
  113. package/dist/packem_shared/{provenance-9OT8sTqn.js → provenance-D4Cza8cp.js} +1 -1
  114. package/dist/packem_shared/{readJsonSync-BnWiH5-R-BpnwAB0Z.js → readJsonSync-DweZd5ZA-0eZh9sGm.js} +1 -1
  115. package/dist/packem_shared/{registry-keys-CYHd7qU2.js → registry-keys-C0ez2VND.js} +1 -1
  116. package/dist/packem_shared/{resolve-explicit-DC3XssJa.js → resolve-explicit-BbT764KS.js} +1 -1
  117. package/dist/packem_shared/{resolve-runtime-f5l4ODsH.js → resolve-runtime-D_vZovbB.js} +1 -1
  118. package/dist/packem_shared/{run-file-zB4ACnUy.js → run-file-DyPFFN9U.js} +1 -1
  119. package/dist/packem_shared/{runtime-check-CWvAfu5u.js → runtime-check-D4um-yQq.js} +1 -1
  120. package/dist/packem_shared/{s1ngularity-DsmC71xt.js → s1ngularity-St6dhKiq.js} +1 -1
  121. package/dist/packem_shared/scan-progress-q-N2JtIp.js +2 -0
  122. package/dist/packem_shared/{selectors-CtxnIT4X.js → selectors-Ce_6UAoY.js} +1 -1
  123. package/dist/packem_shared/{signatures-Dwx5fD4g.js → signatures-Dyeyg1q9.js} +1 -1
  124. package/dist/packem_shared/target-merge-Cfy7c__2.js +11 -0
  125. package/dist/packem_shared/{target-options-BO4Uxt0k.js → target-options-7XcbqGDe.js} +1 -1
  126. package/dist/packem_shared/{toolchain-BY8lJaSN.js → toolchain-C_pNMBM6.js} +1 -1
  127. package/dist/packem_shared/{typosquats-BUGgotNu.js → typosquats-xzcAGPiM.js} +1 -1
  128. package/dist/packem_shared/{use-measured-height-BLZt9dW2.js → use-measured-height-CBjN0fle.js} +1 -1
  129. package/dist/packem_shared/{verify-B0ztxKMa.js → verify-Dve9PQj3.js} +1 -1
  130. package/dist/packem_shared/vis-update-app-DMAC2pPf.js +1 -0
  131. package/dist/packem_shared/vis-user-error-xmha3L4n.js +30 -0
  132. package/dist/packem_shared/{watch-CGrUW_JD.js → watch-BXOOX7lx.js} +1 -1
  133. package/dist/packem_shared/{watch-loop-DIwSMjlA.js → watch-loop-Q7UpkVbr.js} +4 -4
  134. package/dist/runtime/preload.js +1 -1
  135. package/index.js +52 -52
  136. package/package.json +16 -16
  137. package/dist/packem_shared/ai-analysis-oNMAj1wd.js +0 -68
  138. package/dist/packem_shared/glob-BUjyjdE8-BSrdzgma.js +0 -1
  139. package/dist/packem_shared/index-BJw7gKD1.js +0 -1
  140. package/dist/packem_shared/index-DND6ptxQ.js +0 -35
  141. package/dist/packem_shared/index.server-qvZ-cy29.js +0 -2
  142. package/dist/packem_shared/missing-package-json-Jw8IEHct.js +0 -1
  143. package/dist/packem_shared/package-version-DjHDww_5.js +0 -4
  144. package/dist/packem_shared/packument-N3EWbZpL.js +0 -1
  145. package/dist/packem_shared/pm-runner-Bssje5qH.js +0 -1
  146. package/dist/packem_shared/scan-progress-Ch8s3Uwl.js +0 -2
  147. package/dist/packem_shared/target-merge-b7bE1AEx.js +0 -11
  148. package/dist/packem_shared/vis-update-app-D1gLJB1O.js +0 -1
  149. package/dist/packem_shared/vis-user-error-DjFv8uxy.js +0 -28
@@ -1,2 +1,2 @@
1
- import{createRequire as m}from"node:module";import{m as j}from"./index-DND6ptxQ.js";import{a as F}from"./en-BxrK-n-J.js";let p;const f=t=>(p??=m(import.meta.url))(t),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,r]=o.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return o.getBuiltinModule(t)}return f(t)},{mkdirSync:h,writeFileSync:g,readdirSync:y}=c("node:fs"),{readFile:_}=c("node:fs/promises"),n=t=>F(t),a=(t,e)=>j(n(t),`${encodeURIComponent(e)}.json`);class R{#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,s){if(r!=="failure")return;const i=n(this.#e);try{h(i,{recursive:!0})}catch{return}const u=e.overrides.command,d=e.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:s,timestamp:new Date().toISOString()};try{g(a(this.#e,e.id),`${JSON.stringify(l,void 0,2)}
2
- `,"utf8")}catch{}}}const I=async(t,e)=>{const r=a(t,e);try{const s=await _(r,"utf8");return JSON.parse(s)}catch{return}},O=t=>{const e=n(t);let r;try{r=y(e)}catch{return[]}const s=[];for(const i of r)if(i.endsWith(".json"))try{s.push(decodeURIComponent(i.slice(0,-5)))}catch{}return s};export{R as F,I as a,O as l};
1
+ import{createRequire as m}from"node:module";import{w as j}from"./index-uBVnF4ji.js";import{a as F}from"./en-D3CfXlO7.js";let p;const f=t=>(p??=m(import.meta.url))(t),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,r]=o.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return o.getBuiltinModule(t)}return f(t)},{mkdirSync:h,writeFileSync:g,readdirSync:y}=c("node:fs"),{readFile:_}=c("node:fs/promises"),n=t=>F(t),a=(t,e)=>j(n(t),`${encodeURIComponent(e)}.json`);class w{#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,s){if(r!=="failure")return;const i=n(this.#e);try{h(i,{recursive:!0})}catch{return}const u=e.overrides.command,d=e.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:s,timestamp:new Date().toISOString()};try{g(a(this.#e,e.id),`${JSON.stringify(l,void 0,2)}
2
+ `,"utf8")}catch{}}}const R=async(t,e)=>{const r=a(t,e);try{const s=await _(r,"utf8");return JSON.parse(s)}catch{return}},I=t=>{const e=n(t);let r;try{r=y(e)}catch{return[]}const s=[];for(const i of r)if(i.endsWith(".json"))try{s.push(decodeURIComponent(i.slice(0,-5)))}catch{}return s};export{w as F,R as a,I as l};
@@ -0,0 +1 @@
1
+ import{C as o}from"./index-uBVnF4ji.js";const r=async(s,a)=>await o(s,a);export{r as s};
@@ -0,0 +1 @@
1
+ import{m as h,D as k,f as S}from"./provenance-D4Cza8cp.js";import{g as $}from"./packument-HBVbyf7x.js";import{H as d}from"./en-D3CfXlO7.js";import{W as N}from"./build-scripts-w4SNeR7D.js";import{n as v}from"./license-t5KnNX6v.js";import{v as R,P as L,z as P}from"./index-uBVnF4ji.js";import{D}from"./package-version-C47v64aB.js";import"./public-api-WqUCiyIe.js";import{L as w}from"./dependency-scan-D_ona0Qm.js";const m={CRITICAL:0,HIGH:1,LOW:3,MODERATE:2,UNKNOWN:4},oe=(t,e)=>{const n=m[(t.vulnerability.severity??"UNKNOWN").toUpperCase()]??4,s=m[(e.vulnerability.severity??"UNKNOWN").toUpperCase()]??4;return n-s||t.packageName.localeCompare(e.packageName)||t.packageVersion.localeCompare(e.packageVersion)},W=(t,e)=>{const n=m[e.toUpperCase()]??2;return(m[t.toUpperCase()]??4)<=n},b=["firstSeen","installScripts","license","malware","publisherChange","score","unexpectedDeps","vulnerability"],g=6e4,A=(t,e,n)=>{for(const s of n)if(s===t||s===`${t}@${e}`||s.endsWith("*")&&t.startsWith(s.slice(0,-1)))return!0;return!1},x=async(t,e)=>{const n=e.security?.policies?.firstSeen;if(n?.minutes===void 0||n.minutes<=0)return[];const{minutes:s}=n,a=n.exclude??[],r=e.security?.acceptedRisks,c=s*g,i=Date.now();return(await h(t.packages,k,async o=>{if(A(o.name,o.version,a))return;const l=await $(o.name,{workspaceRoot:t.workspaceRoot});if(l===void 0)return;const p=l.time?.[o.version];if(p===void 0)return;const u=Date.parse(p);if(Number.isNaN(u))return;const f=i-u;if(f>=c)return;const y=Math.max(0,Math.floor(f/g));return{acceptedRisk:d(o.name,o.version,r,"firstSeen"),data:{ageMinutes:y,minimumMinutes:s,publishedAt:p},packageName:o.name,policy:"firstSeen",reason:`${o.name}@${o.version} was published ${String(y)} min ago — below the ${String(s)} min firstSeen cooldown.`,severity:"block",version:o.version}})).filter(o=>o!==void 0)},O=(t,e)=>{const n=e.security?.policies?.installScripts;if(!n)return[];const s=n.allow??{},a=n.strict===!0;if(!a&&Object.keys(s).length===0)return[];const r=N(t.workspaceRoot,s,{pinVersions:e.security?.pinVersions===!0});if(r.unapproved.length===0)return[];const c=e.security?.acceptedRisks,i=a?"block":"warn";return r.unapproved.map(o=>({acceptedRisk:d(o.name,o.version??"*",c,"installScripts"),data:{hooks:o.hooks},packageName:o.name,policy:"installScripts",reason:`${o.name}${o.version?`@${o.version}`:""} declares unapproved build script(s): ${o.hooks.join(", ")}`,severity:i,version:o.version??"*"}))},U=new Set(["AND","OR"]),E=t=>{const e=t.replaceAll("("," ").replaceAll(")"," ").split(/\s+/).map(a=>a.trim()).filter(a=>a.length>0),n=[];let s=!1;for(const a of e){const r=a.toUpperCase();if(s){s=!1;continue}if(r==="WITH"){s=!0;continue}if(U.has(r))continue;const c=a.endsWith("+"),i=c?a.slice(0,-1):a,o=v(i)??i;n.push(o),c&&n.push(`${o}-or-later`)}return n},F=t=>{if(typeof t.license=="string"){const e=t.license.trim();return e.length>0?e:void 0}if(t.license&&typeof t.license=="object"&&typeof t.license.type=="string"){const e=t.license.type.trim();if(e.length>0)return e}if(Array.isArray(t.licenses)&&t.licenses.length>0){const e=t.licenses.map(n=>n&&typeof n.type=="string"?n.type.trim():"").filter(n=>n.length>0);if(e.length>0)return e.length===1?e[0]:`(${e.join(" OR ")})`}},I=(t,e)=>{if(e.length===0)return;const n=new Set(e.map(s=>v(s)??s).map(s=>s.toLowerCase()));for(const s of t)if(n.has(s.toLowerCase()))return s},M=(t,e)=>{if(e.length===0)return;const n=new Set(e.map(s=>v(s)??s).map(s=>s.toLowerCase()));for(const s of t)if(!n.has(s.toLowerCase()))return s},V=(t,e)=>{const n=e.security?.policies?.license;if(!n)return[];const s=n.allow??[],a=n.deny??[];if(s.length===0&&a.length===0)return[];const r=e.security?.acceptedRisks,c=[];for(const i of t.packages){const o=t.manifestData?.get(`${i.name}@${i.version}`),l=o?F(o):void 0;if(!l){s.length>0&&c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{declaredLicense:null},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} declares no license; allow-list mode requires one of: ${s.join(", ")}`,severity:"block",version:i.version});continue}const p=E(l),u=I(p,a);if(u){c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{declaredLicense:l,deniedLicense:u},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} uses denied license '${u}' (declared: ${l})`,severity:"block",version:i.version});continue}const f=M(p,s);f&&c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{allowList:s,declaredLicense:l,unallowedLicense:f},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} uses license '${f}' which is not on the allow-list (declared: ${l})`,severity:"block",version:i.version})}return c},j=6e4,_=(t,e,n)=>{for(const s of n)if(s===t||s===`${t}@${e}`||s.endsWith("*")&&t.startsWith(s.slice(0,-1)))return!0;return!1},H=async(t,e)=>{const n=e.security?.policies?.publisherChange;if(n?.mode!=="no-downgrade")return[];const s=n.exclude??[],a=typeof n.ignoreAfter=="number"?n.ignoreAfter*j:void 0,r=e.security?.acceptedRisks,c=Date.now();return(await h(t.packages,k,async i=>{if(_(i.name,i.version,s))return;const o=await $(i.name,{workspaceRoot:t.workspaceRoot});if(o===void 0)return;if(a!==void 0){const p=o.time?.[i.version],u=p===void 0?Number.NaN:Date.parse(p);if(!Number.isNaN(u)&&c-u>a)return}if(o.versions[i.version]?.dist?.attestations?.provenance!==void 0)return;const l=S(o,i.version);if(l!==void 0)return{acceptedRisk:d(i.name,i.version,r,"publisherChange"),data:{priorVersionWithProvenance:l},packageName:i.name,policy:"publisherChange",reason:`${i.name}@${i.version} dropped the provenance attestation that ${i.name}@${l} carried — publisher trust downgrade.`,severity:"block",version:i.version}})).filter(i=>i!==void 0)},T=t=>{for(const e of Object.values(w))for(const n of[e.file,...e.aliases??[]])if(t===n||t.endsWith(`/${n}`)||t.endsWith(`.${n}`))return e.type},z=(t,e,n)=>{const s=R(e)?e:L(t,e);let a;try{a=P(s)}catch{return}const r=T(s)??w[n]?.type;if(!r)return;const c=D(a,r);if(c.length===0)return;const i=new Set;for(const o of c)i.add(`${o.name}@${o.version}`);return i},K=(t,e)=>{for(const n of e)if(n===t||n.endsWith("*")&&t.startsWith(n.slice(0,-1)))return!0;return!1},Y=(t,e)=>{const n=e.security?.policies?.unexpectedDeps;if(!n)return[];const s=n.allow??[],a=n.baselineLockfile;if(s.length===0&&!a)return[];const r=a?z(t.workspaceRoot,a,t.packageManager):void 0,c=e.security?.acceptedRisks,i=[];for(const o of t.packages){const l=s.length===0||K(o.name,s),p=r?r.has(`${o.name}@${o.version}`):!0;if(l&&p)continue;const u=[],f={};l||(u.push(`not on allow-list (${s.length} entr${s.length===1?"y":"ies"})`),f.allowList=s),!p&&r&&(u.push(`not present in baseline lockfile (${a})`),f.baselineLockfile=a),i.push({acceptedRisk:d(o.name,o.version,c,"unexpectedDeps"),data:f,packageName:o.name,policy:"unexpectedDeps",reason:`${o.name}@${o.version} is unexpected: ${u.join("; ")}`,severity:"block",version:o.version})}return i},q=(t,e)=>{if(!t.osvFindings||t.osvFindings.size===0)return[];const n=e.security?.policies?.vulnerability?.failOn,s=e.security?.acceptedRisks,a=[];for(const r of t.packages){const c=t.osvFindings.get(r.name);if(!(!c||c.length===0))for(const i of c){const o=n?W(i.severity,n)?"block":"warn":"info";a.push({acceptedRisk:d(r.name,r.version,s,"vulnerability"),data:{advisoryId:i.id,aliases:i.aliases??[],cvssScore:i.cvssScore,fixedVersions:i.fixedVersions,severity:i.severity,summary:i.summary},packageName:r.name,policy:"vulnerability",reason:`${i.severity} ${i.id} affects ${r.name}@${r.version}: ${i.summary}`,severity:o,version:r.version})}}return a},C=[{evaluate:q,isConfigured:t=>t.security?.policies?.vulnerability!==void 0,name:"vulnerability",offlineSupported:!0,surfaces:["audit","doctor"]},{evaluate:V,isConfigured:t=>{const e=t.security?.policies?.license;return!!(e&&(e.allow&&e.allow.length>0||e.deny&&e.deny.length>0))},name:"license",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:O,isConfigured:t=>{const e=t.security?.policies?.installScripts;return!!(e&&(e.allow&&Object.keys(e.allow).length>0||e.strict===!0))},name:"installScripts",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:Y,isConfigured:t=>{const e=t.security?.policies?.unexpectedDeps;return!!(e&&(e.allow&&e.allow.length>0||typeof e.baselineLockfile=="string"))},name:"unexpectedDeps",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:x,isConfigured:t=>{const e=t.security?.policies?.firstSeen?.minutes;return typeof e=="number"&&e>0},name:"firstSeen",offlineSupported:!1,surfaces:["audit","doctor","install"]},{evaluate:H,isConfigured:t=>t.security?.policies?.publisherChange?.mode==="no-downgrade",name:"publisherChange",offlineSupported:!1,surfaces:["audit","doctor","install"]}],G=(t,e,n)=>C.filter(s=>s.surfaces.includes(t)?n!==void 0?n.has(s.name):s.isConfigured(e):!1),re=async(t,e,n)=>{const s=G(e,n.visConfig,n.enabledPolicies),a=[];for(const r of s){if(t.offline&&!r.offlineSupported){a.push({packageName:"*",policy:r.name,reason:`policy.${r.name} skipped: requires network (--offline)`,severity:"info",version:"*"});continue}try{const c=await r.evaluate(t,n.visConfig);a.push(...c)}catch(c){const i=c instanceof Error?c.message:String(c);a.push({packageName:"*",policy:r.name,reason:`policy.${r.name} failed: ${i}`,severity:"info",version:"*"})}}return a},B=(()=>{const t=new Map;for(const e of b)t.set(e.toLowerCase(),e);return t})(),ae=()=>C.map(t=>t.name),ce=(t,e)=>{if(t===void 0)return;const n=t.trim().toLowerCase();if(n===""||n==="none")return new Set;if(n==="all")return new Set(b);const s=new Set;for(const a of t.split(",").map(r=>r.trim()).filter(r=>r.length>0)){const r=a.replace(/^_+/,"").replaceAll(/_+([a-z])/g,(i,o)=>o.toUpperCase()),c=B.get(r.toLowerCase());c===void 0?e?.(a):s.add(c)}return s};export{oe as c,re as e,ae as g,ce as p,W as s};
@@ -0,0 +1,35 @@
1
+ import{createRequire as Dr}from"node:module";import{E as st}from"./public-api-WqUCiyIe.js";let pr;const fr=u=>(pr??=Dr(import.meta.url))(u),Pu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ar=u=>{if(typeof Pu<"u"&&Pu.versions&&Pu.versions.node){const[e,t]=Pu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Pu.getBuiltinModule(u)}return fr(u)},{createRequire:I}=Ar("node:module"),Je=0,hr=4,Er=Symbol("findUpStop"),Ea=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,Cr=/^[A-Z]:\//i,_u=(u="")=>u&&u.replaceAll("\\","/").replace(Cr,e=>e.toUpperCase()),Fr=/^[/\\]{2}/,gr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Ze=/^[A-Z]:$/i,ot=/^\/([A-Z]:)?$/i,it=/^([A-Z]:)\/$/i,dr=/[^/](\.[^./]+)$/,mr=/^[/\\]|^[a-z]:[/\\]/i,yr=/\/$/,Br=()=>{if(typeof process.cwd=="function")try{const u=process.cwd();if(typeof u=="string")return _u(u)}catch{}return"/"},Ca="/",It=(u,e)=>{let t="",n=0,s=-1,r=0,o;for(let i=0;i<=u.length;++i){if(i<u.length)o=u[i];else{if(o==="/")break;o="/"}if(o==="/"){if(!(s===i-1||r===1))if(r===2){if(t.length<2||n!==2||!t.endsWith(".")||t.at(-2)!=="."){if(t.length>2){const a=t.lastIndexOf("/");a===-1?(t="",n=0):(t=t.slice(0,a),n=t.length-1-t.lastIndexOf("/")),s=i,r=0;continue}else if(t.length>0){t="",n=0,s=i,r=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${u.slice(s+1,i)}`:t=u.slice(s+1,i),n=i-s-1;s=i,r=0}else o==="."&&r!==-1?++r:r=-1}return t},Nu=u=>gr.test(u),Fe=function(u){if(u.length===0)return".";u=_u(u);const e=Fr.exec(u),t=Nu(u),n=u.at(-1)==="/";return u=It(u,!t),u.length===0?t?"/":n?"./":".":(n&&(u+="/"),Ze.test(u)&&(u+="/"),e?t?`//${u}`:`//./${u}`:t&&!Nu(u)?`/${u}`:u)},br=(...u)=>{let e="";for(const t of u)if(t)if(e.length>0){const n=e.at(-1)==="/",s=t[0]==="/";n&&s?e+=t.slice(1):e+=n||s?t:`/${t}`}else e+=t;return Fe(e)},Lu=function(...u){u=u.map(n=>_u(n));let e="",t=!1;for(let n=u.length-1;n>=-1&&!t;n--){const s=n>=0?u[n]:Br();!s||s.length===0||(e=`${s}/${e}`,t=Nu(s))}return e=It(e,!t),Ze.test(e)?`${e}/`:t&&!Nu(e)?`/${e}`:e.length>0?e:"."},Fa=function(u){return _u(u)},$r=function(u){return dr.exec(_u(u))?.[1]??""},ga=function(u,e){const t=Lu(u).replace(ot,"$1").replace(it,"$1").split("/"),n=Lu(e).replace(ot,"$1").replace(it,"$1").split("/");if(n[0][1]===":"&&t[0][1]===":"&&t[0]!==n[0])return n.join("/");const s=Math.min(t.length,n.length);let r=0;for(;r<s&&t[r]===n[r];)r+=1;const o=t.length-r;return[...Array.from({length:o}).fill(".."),...n.slice(r)].join("/")},Ye=u=>{const e=_u(u).replace(yr,""),t=e.lastIndexOf("/");if(t===-1)return Nu(u)?"/":".";const n=e.slice(0,t);return Ze.test(n)?`${n}/`:n||(Nu(u)?"/":".")},ut=(u,e)=>{const t=_u(u),n=t.slice(t.lastIndexOf("/")+1);if(e&&n.endsWith(e)){if(e===t)return"";const s=n.slice(0,-e.length);if(s.length>0)return s}return n},vr=function(u){const e=mr.exec(u)?.[0]?.replaceAll("\\","/")??"",t=ut(u),n=$r(t);return{base:t,dir:Ye(u),ext:n,name:t.slice(0,t.length-n.length),root:e}};let wr;const xr=u=>(wr??=I(import.meta.url))(u),Hu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Sr=u=>{if(typeof Hu<"u"&&Hu.versions&&Hu.versions.node){const[e,t]=Hu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Hu.getBuiltinModule(u)}return xr(u)},{fileURLToPath:_r}=Sr("node:url");function Tr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var at,lt;function Rr(){return lt||(lt=1,at=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),at}var kr=Rr();const Or=Tr(kr);new Set(Or);const Nr=/^(?:\.?\.[/\\]|\.\.\B)/,da=u=>Nr.test(u)||u==="..",yu=u=>_u(u instanceof URL?_r(u):u);let Lr=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const bu=u=>{if(!u||!(u instanceof URL)&&typeof u!="string")throw new TypeError("Path must be a non-empty string or URL.")};let Pr;const Hr=u=>(Pr??=I(import.meta.url))(u),Iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ir=u=>{if(typeof Iu<"u"&&Iu.versions&&Iu.versions.node){const[e,t]=Iu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Iu.getBuiltinModule(u)}return Hr(u)};Ir("node:fs/promises");let Mr;const jr=u=>(Mr??=I(import.meta.url))(u),Mu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gr=u=>{if(typeof Mu<"u"&&Mu.versions&&Mu.versions.node){const[e,t]=Mu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Mu.getBuiltinModule(u)}return jr(u)};Gr("node:fs");const we=u=>{if(u.isFile())return"file";if(u.isDirectory())return"dir";if(u.isSymbolicLink())return"symlink"};let zr;const Ur=u=>(zr??=I(import.meta.url))(u),ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wr=u=>{if(typeof ju<"u"&&ju.versions&&ju.versions.node){const[e,t]=ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ju.getBuiltinModule(u)}return Ur(u)},{lstat:ct,mkdir:qr}=Wr("node:fs/promises"),ya=async u=>{bu(u);try{const e=await ct(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await qr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=await ct(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(t))}'`,{cause:e})}};let Xr;const Kr=u=>(Xr??=I(import.meta.url))(u),Gu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=u=>{if(typeof Gu<"u"&&Gu.versions&&Gu.versions.node){const[e,t]=Gu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Gu.getBuiltinModule(u)}return Kr(u)},{lstatSync:Dt,mkdirSync:Qr}=Vr("node:fs"),Ba=u=>{bu(u);try{const e=Dt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{Qr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=Dt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(t))}'`,{cause:e})}};let Jr;const Zr=u=>(Jr??=I(import.meta.url))(u),zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yr=u=>{if(typeof zu<"u"&&zu.versions&&zu.versions.node){const[e,t]=zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return zu.getBuiltinModule(u)}return Zr(u)};Yr("node:fs/promises");let un;const en=u=>(un??=I(import.meta.url))(u),Uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tn=u=>{if(typeof Uu<"u"&&Uu.versions&&Uu.versions.node){const[e,t]=Uu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Uu.getBuiltinModule(u)}return en(u)};tn("node:fs");let rn;const nn=u=>(rn??=I(import.meta.url))(u),Wu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sn=u=>{if(typeof Wu<"u"&&Wu.versions&&Wu.versions.node){const[e,t]=Wu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Wu.getBuiltinModule(u)}return nn(u)};sn("node:fs/promises");let on;const an=u=>(on??=I(import.meta.url))(u),qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ln=u=>{if(typeof qu<"u"&&qu.versions&&qu.versions.node){const[e,t]=qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return qu.getBuiltinModule(u)}return an(u)};ln("node:fs");let cn;const Dn=u=>(cn??=I(import.meta.url))(u),Xu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pn=u=>{if(typeof Xu<"u"&&Xu.versions&&Xu.versions.node){const[e,t]=Xu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Xu.getBuiltinModule(u)}return Dn(u)};pn("node:fs/promises");let fn;const An=u=>(fn??=I(import.meta.url))(u),Ku=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hn=u=>{if(typeof Ku<"u"&&Ku.versions&&Ku.versions.node){const[e,t]=Ku.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ku.getBuiltinModule(u)}return An(u)};hn("node:fs");let pt=class extends Error{root;constructor(e,t){super(`${e instanceof Error?e.message:String(e)} for path "${t}"`),this.cause=e,this.root=t}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const En=u=>{const e=[],t=new Set;let n=0;for(const i of u){if(i==="{")e.push(n);else if(i==="}"){const a=e.pop();a!==void 0&&(t.add(a),t.add(n))}n+=1}let s=0,r=0,o="";for(const i of u)i==="{"?t.has(r)?(o+="(",s+=1):o+=String.raw`\{`:i==="}"?t.has(r)?(o+=")",s-=1):o+=String.raw`\}`:i===","&&s>0?o+="|":o+=i,r+=1;return o},ft=u=>{const e=u.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`),t=En(e).replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(n){throw new Error(`Invalid glob pattern: ${u}`,{cause:n})}};let Cn=class{name;path;#u;constructor(e,t,n){this.#u=e,this.name=t,this.path=n}isDirectory(){return this.#u.isDirectory()}isFile(){return this.#u.isFile()}isSymbolicLink(){return this.#u.isSymbolicLink()}};const We=(u,e,t)=>new Cn(u,e,t),$e=(u,e,t,n)=>{if(Array.isArray(e)&&e.length>0&&!e.some(r=>u.endsWith(r)))return!1;const s=u.includes("\\")?u.replaceAll("\\","/"):u;return t&&!t.some(r=>r.test(s))?!1:!n?.some(r=>r.test(s))};let Fn;const gn=u=>(Fn??=I(import.meta.url))(u),Vu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,dn=u=>{if(typeof Vu<"u"&&Vu.versions&&Vu.versions.node){const[e,t]=Vu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Vu.getBuiltinModule(u)}return gn(u)};dn("node:fs/promises");let mn;const yn=u=>(mn??=I(import.meta.url))(u),Qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bn=u=>{if(typeof Qu<"u"&&Qu.versions&&Qu.versions.node){const[e,t]=Qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Qu.getBuiltinModule(u)}return yn(u)},{readdirSync:bn,realpathSync:$n,statSync:Mt}=Bn("node:fs"),vn=u=>{const e=Fe(u),t=Mt(e);return We(t,ut(e),e)};function*wn(u,e={}){const{extensions:t,followSymlinks:n=!1,includeDirs:s=!0,includeFiles:r=!0,includeSymlinks:o=!0,match:i,maxDepth:a=Number.POSITIVE_INFINITY,skip:d}=e;if(bu(u),a<0)return;const D=e.visited??new Set,m=i?i.map(C=>typeof C=="string"?ft(C):C):void 0,b=d?d.map(C=>typeof C=="string"?ft(C):C):void 0;if(u=Lu(yu(u)),s&&$e(u,t,m,b)&&(yield vn(u)),!(a<1||!$e(u,void 0,void 0,b)))try{const C=bn(u,{withFileTypes:!0});for(const f of C){let $=br(u,f.name),g=f,{name:w}=f,_=f.isDirectory(),h=f.isFile();if(f.isSymbolicLink())if(n){const F=Fe($n($));if(D.has(F))continue;$=F;const l=Mt(F);_=l.isDirectory(),h=l.isFile(),g=l,w=ut(F)}else if(o&&$e($,t,m,b)){yield We(f,f.name,Fe($));continue}else continue;_?(n&&D.add($),yield*wn($,{extensions:t,followSymlinks:n,includeDirs:s,includeFiles:r,includeSymlinks:o,match:m,maxDepth:a-1,skip:b,visited:D})):h&&r&&$e($,t,m,b)&&(yield We(g,w,Fe($)))}}catch(C){throw C instanceof pt?C:new pt(C,u)}}let xn;const Sn=u=>(xn??=I(import.meta.url))(u),Ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_n=u=>{if(typeof Ju<"u"&&Ju.versions&&Ju.versions.node){const[e,t]=Ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ju.getBuiltinModule(u)}return Sn(u)};_n("node:fs/promises");let Tn;const Rn=u=>(Tn??=I(import.meta.url))(u),Zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kn=u=>{if(typeof Zu<"u"&&Zu.versions&&Zu.versions.node){const[e,t]=Zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Zu.getBuiltinModule(u)}return Rn(u)},{statSync:On,lstatSync:Nn}=kn("node:fs"),va=(u,e={})=>{if(typeof u!="string"&&!Array.isArray(u)&&typeof u!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const t=e.cwd?yu(e.cwd):process.cwd();let n=Lu(t);const{root:s}=vr(n),r=yu(e.stopAt??s),o=Lu(n,r),i=e.type??"file",a=function(D){return typeof u=="function"?[u(D)]:typeof u=="string"?[u]:Array.isArray(u)?u:[u]};e.allowSymlinks??=!0;const d=e.allowSymlinks?On:Nn;for(;n;){for(let D of a(n)){if(D===Er)return;if(D===void 0)continue;Buffer.isBuffer(D)?D=D.toString():D instanceof URL&&(D=yu(D));const m=Nu(D)?D:Lu(n,D);try{const b=d(m);if(i==="file"&&b.isFile()||i==="directory"&&b.isDirectory())return m}catch{}}if(n===o||n===s)break;n=Ye(n)}};function et(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var At={},Re,ht;function Se(){if(ht)return Re;ht=1;const u="[^\\\\/]",e=Symbol("unignore"),t="\\.",n="\\+",s="\\?",r="\\/",o="(?=.)",i="[^/]",a=`(?:${r}|$)`,d=`(?:^|${r})`,D=`${t}{1,2}${a}`,m=`(?!${t})`,b=`(?!${d}${D})`,C=`(?!${t}{0,1}${a})`,f=`(?!${D})`,$=`[^.${r}]`,g=`${i}*?`,w="/",_={DOT_LITERAL:t,PLUS_LITERAL:n,QMARK_LITERAL:s,SLASH_LITERAL:r,ONE_CHAR:o,QMARK:i,END_ANCHOR:a,DOTS_SLASH:D,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:f,QMARK_NO_DOT:$,STAR:g,START_ANCHOR:d,SEP:w},h={..._,SLASH_LITERAL:"[\\\\/]",QMARK:u,STAR:`${u}*?`,DOTS_SLASH:`${t}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${t})`,NO_DOTS:`(?!(?:^|[\\\\/])${t}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${t}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${t}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},F={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Re={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:F,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(l){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${l.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(l){return l===!0?h:_}},Re}var Et;function _e(){return Et||(Et=1,(function(u){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:s}=Se();u.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),u.hasRegexChars=r=>n.test(r),u.isRegexChar=r=>r.length===1&&u.hasRegexChars(r),u.escapeRegex=r=>r.replace(s,"\\$1"),u.toPosixSlashes=r=>r.replace(e,"/"),u.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},u.removeBackslashes=r=>r.replace(t,o=>o==="\\"?"":o),u.escapeLast=(r,o,i)=>{const a=r.lastIndexOf(o,i);return a===-1?r:r[a-1]==="\\"?u.escapeLast(r,o,a-1):`${r.slice(0,a)}\\${r.slice(a)}`},u.removePrefix=(r,o={})=>{let i=r;return i.startsWith("./")&&(i=i.slice(2),o.prefix="./"),i},u.wrapOutput=(r,o={},i={})=>{const a=i.contains?"":"^",d=i.contains?"":"$";let D=`${a}(?:${r})${d}`;return o.negated===!0&&(D=`(?:^(?!${D}).*$)`),D},u.basename=(r,{windows:o}={})=>{const i=r.split(o?/[\\/]/:"/"),a=i[i.length-1];return a===""?i[i.length-2]:a}})(At)),At}var ke,Ct;function Ln(){if(Ct)return ke;Ct=1;const u=_e(),{CHAR_ASTERISK:e,CHAR_AT:t,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:m,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:$}=Se(),g=_=>_===i||_===n,w=_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)};return ke=(_,h)=>{const F=h||{},l=_.length-1,T=F.parts===!0||F.scanToEnd===!0,N=[],x=[],S=[];let v=_,j=-1,q=0,au=0,gu=!1,lu=!1,Z=!1,cu=!1,$u=!1,Au=!1,Du=!1,Q=!1,hu=!1,ru=!1,vu=0,nu,R,G={value:"",depth:0,isGlob:!1};const tu=()=>j>=l,A=()=>v.charCodeAt(j+1),X=()=>(nu=R,v.charCodeAt(++j));for(;j<l;){R=X();let su;if(R===n){Du=G.backslashes=!0,R=X(),R===a&&(Au=!0);continue}if(Au===!0||R===a){for(vu++;tu()!==!0&&(R=X());){if(R===n){Du=G.backslashes=!0,X();continue}if(R===a){vu++;continue}if(Au!==!0&&R===r&&(R=X())===r){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(Au!==!0&&R===s){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===C&&(vu--,vu===0)){Au=!1,gu=G.isBrace=!0,ru=!0;break}}if(T===!0)continue;break}if(R===i){if(N.push(j),x.push(G),G={value:"",depth:0,isGlob:!1},ru===!0)continue;if(nu===r&&j===q+1){q+=2;continue}au=j+1;continue}if(F.noext!==!0&&(R===m||R===t||R===e||R===b||R===o)&&A()===d){if(Z=G.isGlob=!0,cu=G.isExtglob=!0,ru=!0,R===o&&j===q&&(hu=!0),T===!0){for(;tu()!==!0&&(R=X());){if(R===n){Du=G.backslashes=!0,R=X();continue}if(R===f){Z=G.isGlob=!0,ru=!0;break}}continue}break}if(R===e){if(nu===e&&($u=G.isGlobstar=!0),Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===b){if(Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===D){for(;tu()!==!0&&(su=X());){if(su===n){Du=G.backslashes=!0,X();continue}if(su===$){lu=G.isBracket=!0,Z=G.isGlob=!0,ru=!0;break}}if(T===!0)continue;break}if(F.nonegate!==!0&&R===o&&j===q){Q=G.negated=!0,q++;continue}if(F.noparen!==!0&&R===d){if(Z=G.isGlob=!0,T===!0){for(;tu()!==!0&&(R=X());){if(R===d){Du=G.backslashes=!0,R=X();continue}if(R===f){ru=!0;break}}continue}break}if(Z===!0){if(ru=!0,T===!0)continue;break}}F.noext===!0&&(cu=!1,Z=!1);let U=v,wu="",c="";q>0&&(wu=v.slice(0,q),v=v.slice(q),au-=q),U&&Z===!0&&au>0?(U=v.slice(0,au),c=v.slice(au)):Z===!0?(U="",c=v):U=v,U&&U!==""&&U!=="/"&&U!==v&&g(U.charCodeAt(U.length-1))&&(U=U.slice(0,-1)),F.unescape===!0&&(c&&(c=u.removeBackslashes(c)),U&&Du===!0&&(U=u.removeBackslashes(U)));const p={prefix:wu,input:_,start:q,base:U,glob:c,isBrace:gu,isBracket:lu,isGlob:Z,isExtglob:cu,isGlobstar:$u,negated:Q,negatedExtglob:hu};if(F.tokens===!0&&(p.maxDepth=0,g(R)||x.push(G),p.tokens=x),F.parts===!0||F.tokens===!0){let su;for(let M=0;M<N.length;M++){const pu=su?su+1:q,Eu=N[M],iu=_.slice(pu,Eu);F.tokens&&(M===0&&q!==0?(x[M].isPrefix=!0,x[M].value=wu):x[M].value=iu,w(x[M]),p.maxDepth+=x[M].depth),(M!==0||iu!=="")&&S.push(iu),su=Eu}if(su&&su+1<_.length){const M=_.slice(su+1);S.push(M),F.tokens&&(x[x.length-1].value=M,w(x[x.length-1]),p.maxDepth+=x[x.length-1].depth)}p.slashes=N,p.parts=S}return p},ke}var Oe,Ft;function Pn(){if(Ft)return Oe;Ft=1;const u=Se(),e=_e(),{MAX_LENGTH:t,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=u,i=(h,F)=>typeof F.expandRange=="function"?F.expandRange(...h,F):(h.sort(),`[${h.join("-")}]`),a=(h,F)=>`Missing ${h}: "${F}" - use "\\\\${F}" to match literal characters`,d=h=>{const F=[];let l=0,T=0,N=0,x="",S=!1;for(const v of h){if(S===!0){x+=v,S=!1;continue}if(v==="\\"){x+=v,S=!0;continue}if(v==='"'){N=N===1?0:1,x+=v;continue}if(N===0){if(v==="[")l++;else if(v==="]"&&l>0)l--;else if(l===0){if(v==="(")T++;else if(v===")"&&T>0)T--;else if(v==="|"&&T===0){F.push(x),x="";continue}}}x+=v}return F.push(x),F},D=h=>{let F=!1;for(const l of h){if(F===!0){F=!1;continue}if(l==="\\"){F=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},m=h=>{let F=h.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(F)&&(F=F.slice(2,-1),l=!0);if(D(F))return F.replace(/\\(.)/g,"$1")},b=h=>{const F=h.map(m).filter(Boolean);for(let l=0;l<F.length;l++)for(let T=l+1;T<F.length;T++){const N=F[l],x=F[T],S=N[0];if(!(!S||N!==S.repeat(N.length)||x!==S.repeat(x.length))&&(N===x||N.startsWith(x)||x.startsWith(N)))return!0}return!1},C=(h,F=!0)=>{if(h[0]!=="+"&&h[0]!=="*"||h[1]!=="(")return;let l=0,T=0,N=0,x=!1;for(let S=1;S<h.length;S++){const v=h[S];if(x===!0){x=!1;continue}if(v==="\\"){x=!0;continue}if(v==='"'){N=N===1?0:1;continue}if(N!==1){if(v==="["){l++;continue}if(v==="]"&&l>0){l--;continue}if(!(l>0)){if(v==="("){T++;continue}if(v===")"&&(T--,T===0))return F===!0&&S!==h.length-1?void 0:{type:h[0],body:h.slice(2,S),end:S}}}}},f=h=>`${h.length===1?e.escapeRegex(h[0]):`[${h.map(F=>e.escapeRegex(F)).join("")}]`}*`,$=h=>{let F=0;const l=[];for(;F<h.length;){const T=C(h.slice(F),!1);if(!T||T.type!=="*")return;const N=d(T.body).map(S=>S.trim());if(N.length!==1)return;const x=m(N[0]);if(!x||x.length!==1)return;l.push(x),F+=T.end+1}if(!(l.length<1))return l},g=h=>{let F=0,l=h.trim(),T=C(l);for(;T;)F++,l=T.body.trim(),T=C(l);return F},w=(h,F)=>{if(F.maxExtglobRecursion===!1)return{risky:!1};const l=typeof F.maxExtglobRecursion=="number"?F.maxExtglobRecursion:u.DEFAULT_MAX_EXTGLOB_RECURSION,T=d(h).map(v=>v.trim());if(T.length>1&&(T.some(v=>v==="")||T.some(v=>/^[*?]+$/.test(v))||b(T)))return{risky:!0};const N=[];let x=!1,S=!0;for(const v of T){const j=$(v);if(j){x=!0,N.push(...j);continue}const q=m(v);if(q&&q.length===1){N.push(q);continue}if(S=!1,g(v)>l)return{risky:!0}}return x?S?{risky:!0,safeOutput:f([...new Set(N)])}:{risky:!0}:{risky:!1}},_=(h,F)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=o[h]||h;const l={...F},T=typeof l.maxLength=="number"?Math.min(t,l.maxLength):t;let N=h.length;if(N>T)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${T}`);const x={type:"bos",value:"",output:l.prepend||""},S=[x],v=l.capture?"":"?:",j=u.globChars(l.windows),q=u.extglobChars(j),{DOT_LITERAL:au,PLUS_LITERAL:gu,SLASH_LITERAL:lu,ONE_CHAR:Z,DOTS_SLASH:cu,NO_DOT:$u,NO_DOT_SLASH:Au,NO_DOTS_SLASH:Du,QMARK:Q,QMARK_NO_DOT:hu,STAR:ru,START_ANCHOR:vu}=j,nu=B=>`(${v}(?:(?!${vu}${B.dot?cu:au}).)*?)`,R=l.dot?"":$u,G=l.dot?Q:hu;let tu=l.bash===!0?nu(l):ru;l.capture&&(tu=`(${tu})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const A={input:h,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};h=e.removePrefix(h,A),N=h.length;const X=[],U=[],wu=[];let c=x,p;const su=()=>A.index===N-1,M=A.peek=(B=1)=>h[A.index+B],pu=A.advance=()=>h[++A.index]||"",Eu=()=>h.slice(A.index+1),iu=(B="",K=0)=>{A.consumed+=B,A.index+=K},ye=B=>{A.output+=B.output!=null?B.output:B.value,iu(B.value)},lr=()=>{let B=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)pu(),A.start++,B++;return B%2===0?!1:(A.negated=!0,A.start++,!0)},Be=B=>{A[B]++,wu.push(B)},xu=B=>{A[B]--,wu.pop()},L=B=>{if(c.type==="globstar"){const K=A.braces>0&&(B.type==="comma"||B.type==="brace"),y=B.extglob===!0||X.length&&(B.type==="pipe"||B.type==="paren");B.type!=="slash"&&B.type!=="paren"&&!K&&!y&&(A.output=A.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=tu,A.output+=c.output)}if(X.length&&B.type!=="paren"&&(X[X.length-1].inner+=B.value),(B.value||B.output)&&ye(B),c&&c.type==="text"&&B.type==="text"){c.output=(c.output||c.value)+B.value,c.value+=B.value;return}B.prev=c,S.push(B),c=B},be=(B,K)=>{const y={...q[K],conditions:1,inner:""};y.prev=c,y.parens=A.parens,y.output=A.output,y.startIndex=A.index,y.tokensIndex=S.length;const P=(l.capture?"(":"")+y.open;Be("parens"),L({type:B,value:K,output:A.output?"":Z}),L({type:"paren",extglob:!0,value:pu(),output:P}),X.push(y)},cr=B=>{const K=h.slice(B.startIndex,A.index+1),y=h.slice(B.startIndex+2,A.index),P=w(y,l);if((B.type==="plus"||B.type==="star")&&P.risky){const z=P.safeOutput?(B.output?"":Z)+(l.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Cu=S[B.tokensIndex];Cu.type="text",Cu.value=K,Cu.output=z||e.escapeRegex(K);for(let Fu=B.tokensIndex+1;Fu<S.length;Fu++)S[Fu].value="",S[Fu].output="",delete S[Fu].suffix;A.output=B.output+Cu.output,A.backtrack=!0,L({type:"paren",extglob:!0,value:p,output:""}),xu("parens");return}let J=B.close+(l.capture?")":""),uu;if(B.type==="negate"){let z=tu;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(z=nu(l)),(z!==tu||su()||/^\)+$/.test(Eu()))&&(J=B.close=`)$))${z}`),B.inner.includes("*")&&(uu=Eu())&&/^\.[^\\/.]+$/.test(uu)){const Cu=_(uu,{...F,fastpaths:!1}).output;J=B.close=`)${Cu})${z})`}B.prev.type==="bos"&&(A.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:p,output:J}),xu("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let B=!1,K=h.replace(r,(y,P,J,uu,z,Cu)=>uu==="\\"?(B=!0,y):uu==="?"?P?P+uu+(z?Q.repeat(z.length):""):Cu===0?G+(z?Q.repeat(z.length):""):Q.repeat(J.length):uu==="."?au.repeat(J.length):uu==="*"?P?P+uu+(z?tu:""):tu:P?y:`\\${y}`);return B===!0&&(l.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),K===h&&l.contains===!0?(A.output=h,A):(A.output=e.wrapOutput(K,A,F),A)}for(;!su();){if(p=pu(),p==="\0")continue;if(p==="\\"){const y=M();if(y==="/"&&l.bash!==!0||y==="."||y===";")continue;if(!y){p+="\\",L({type:"text",value:p});continue}const P=/^\\+/.exec(Eu());let J=0;if(P&&P[0].length>2&&(J=P[0].length,A.index+=J,J%2!==0&&(p+="\\")),l.unescape===!0?p=pu():p+=pu(),A.brackets===0){L({type:"text",value:p});continue}}if(A.brackets>0&&(p!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&p===":"){const y=c.value.slice(1);if(y.includes("[")&&(c.posix=!0,y.includes(":"))){const P=c.value.lastIndexOf("["),J=c.value.slice(0,P),uu=c.value.slice(P+2),z=n[uu];if(z){c.value=J+z,A.backtrack=!0,pu(),!x.output&&S.indexOf(c)===1&&(x.output=Z);continue}}}(p==="["&&M()!==":"||p==="-"&&M()==="]")&&(p=`\\${p}`),p==="]"&&(c.value==="["||c.value==="[^")&&(p=`\\${p}`),l.posix===!0&&p==="!"&&c.value==="["&&(p="^"),c.value+=p,ye({value:p});continue}if(A.quotes===1&&p!=='"'){p=e.escapeRegex(p),c.value+=p,ye({value:p});continue}if(p==='"'){A.quotes=A.quotes===1?0:1,l.keepQuotes===!0&&L({type:"text",value:p});continue}if(p==="("){Be("parens"),L({type:"paren",value:p});continue}if(p===")"){if(A.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const y=X[X.length-1];if(y&&A.parens===y.parens+1){cr(X.pop());continue}L({type:"paren",value:p,output:A.parens?")":"\\)"}),xu("parens");continue}if(p==="["){if(l.nobracket===!0||!Eu().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));p=`\\${p}`}else Be("brackets");L({type:"bracket",value:p});continue}if(p==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){L({type:"text",value:p,output:`\\${p}`});continue}if(A.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));L({type:"text",value:p,output:`\\${p}`});continue}xu("brackets");const y=c.value.slice(1);if(c.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(p=`/${p}`),c.value+=p,ye({value:p}),l.literalBrackets===!1||e.hasRegexChars(y))continue;const P=e.escapeRegex(c.value);if(A.output=A.output.slice(0,-c.value.length),l.literalBrackets===!0){A.output+=P,c.value=P;continue}c.value=`(${v}${P}|${c.value})`,A.output+=c.value;continue}if(p==="{"&&l.nobrace!==!0){Be("braces");const y={type:"brace",value:p,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};U.push(y),L(y);continue}if(p==="}"){const y=U[U.length-1];if(l.nobrace===!0||!y){L({type:"text",value:p,output:p});continue}let P=")";if(y.dots===!0){const J=S.slice(),uu=[];for(let z=J.length-1;z>=0&&(S.pop(),J[z].type!=="brace");z--)J[z].type!=="dots"&&uu.unshift(J[z].value);P=i(uu,l),A.backtrack=!0}if(y.comma!==!0&&y.dots!==!0){const J=A.output.slice(0,y.outputIndex),uu=A.tokens.slice(y.tokensIndex);y.value=y.output="\\{",p=P="\\}",A.output=J;for(const z of uu)A.output+=z.output||z.value}L({type:"brace",value:p,output:P}),xu("braces"),U.pop();continue}if(p==="|"){X.length>0&&X[X.length-1].conditions++,L({type:"text",value:p});continue}if(p===","){let y=p;const P=U[U.length-1];P&&wu[wu.length-1]==="braces"&&(P.comma=!0,y="|"),L({type:"comma",value:p,output:y});continue}if(p==="/"){if(c.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",S.pop(),c=x;continue}L({type:"slash",value:p,output:lu});continue}if(p==="."){if(A.braces>0&&c.type==="dot"){c.value==="."&&(c.output=au);const y=U[U.length-1];c.type="dots",c.output+=p,c.value+=p,y.dots=!0;continue}if(A.braces+A.parens===0&&c.type!=="bos"&&c.type!=="slash"){L({type:"text",value:p,output:au});continue}L({type:"dot",value:p,output:au});continue}if(p==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){be("qmark",p);continue}if(c&&c.type==="paren"){const y=M();let P=p;(c.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Eu()))&&(P=`\\${p}`),L({type:"text",value:p,output:P});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){L({type:"qmark",value:p,output:hu});continue}L({type:"qmark",value:p,output:Q});continue}if(p==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){be("negate",p);continue}if(l.nonegate!==!0&&A.index===0){lr();continue}}if(p==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){be("plus",p);continue}if(c&&c.value==="("||l.regex===!1){L({type:"plus",value:p,output:gu});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||A.parens>0){L({type:"plus",value:p});continue}L({type:"plus",value:gu});continue}if(p==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:p,output:""});continue}L({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const y=s.exec(Eu());y&&(p+=y[0],A.index+=y[0].length),L({type:"text",value:p});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=p,c.output=tu,A.backtrack=!0,A.globstar=!0,iu(p);continue}let B=Eu();if(l.noextglob!==!0&&/^\([^?]/.test(B)){be("star",p);continue}if(c.type==="star"){if(l.noglobstar===!0){iu(p);continue}const y=c.prev,P=y.prev,J=y.type==="slash"||y.type==="bos",uu=P&&(P.type==="star"||P.type==="globstar");if(l.bash===!0&&(!J||B[0]&&B[0]!=="/")){L({type:"star",value:p,output:""});continue}const z=A.braces>0&&(y.type==="comma"||y.type==="brace"),Cu=X.length&&(y.type==="pipe"||y.type==="paren");if(!J&&y.type!=="paren"&&!z&&!Cu){L({type:"star",value:p,output:""});continue}for(;B.slice(0,3)==="/**";){const Fu=h[A.index+4];if(Fu&&Fu!=="/")break;B=B.slice(3),iu("/**",3)}if(y.type==="bos"&&su()){c.type="globstar",c.value+=p,c.output=nu(l),A.output=c.output,A.globstar=!0,iu(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!uu&&su()){A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=nu(l)+(l.strictSlashes?")":"|$)"),c.value+=p,A.globstar=!0,A.output+=y.output+c.output,iu(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&B[0]==="/"){const Fu=B[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=`${nu(l)}${lu}|${lu}${Fu})`,c.value+=p,A.output+=y.output+c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&B[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${lu}|${nu(l)}${lu})`,A.output=c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}if(z&&B[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${lu}|${nu(l)}${lu})`,A.output+=c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-c.output.length),c.type="globstar",c.output=nu(l),c.value+=p,A.output+=c.output,A.globstar=!0,iu(p);continue}const K={type:"star",value:p,output:tu};if(l.bash===!0){K.output=".*?",(c.type==="bos"||c.type==="slash")&&(K.output=R+K.output),L(K);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){K.output=p,L(K);continue}(A.index===A.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(A.output+=Au,c.output+=Au):l.dot===!0?(A.output+=Du,c.output+=Du):(A.output+=R,c.output+=R),M()!=="*"&&(A.output+=Z,c.output+=Z)),L(K)}for(;A.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));A.output=e.escapeLast(A.output,"["),xu("brackets")}for(;A.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));A.output=e.escapeLast(A.output,"("),xu("parens")}for(;A.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));A.output=e.escapeLast(A.output,"{"),xu("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${lu}?`}),A.backtrack===!0){A.output="";for(const B of A.tokens)A.output+=B.output!=null?B.output:B.value,B.suffix&&(A.output+=B.suffix)}return A};return _.fastpaths=(h,F)=>{const l={...F},T=typeof l.maxLength=="number"?Math.min(t,l.maxLength):t,N=h.length;if(N>T)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${T}`);h=o[h]||h;const{DOT_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:v,DOTS_SLASH:j,NO_DOT:q,NO_DOTS:au,NO_DOTS_SLASH:gu,STAR:lu,START_ANCHOR:Z}=u.globChars(l.windows),cu=l.dot?au:q,$u=l.dot?gu:q,Au=l.capture?"":"?:",Du={negated:!1,prefix:""};let Q=l.bash===!0?".*?":lu;l.capture&&(Q=`(${Q})`);const hu=R=>R.noglobstar===!0?Q:`(${Au}(?:(?!${Z}${R.dot?j:x}).)*?)`,ru=R=>{switch(R){case"*":return`${cu}${v}${Q}`;case".*":return`${x}${v}${Q}`;case"*.*":return`${cu}${Q}${x}${v}${Q}`;case"*/*":return`${cu}${Q}${S}${v}${$u}${Q}`;case"**":return cu+hu(l);case"**/*":return`(?:${cu}${hu(l)}${S})?${$u}${v}${Q}`;case"**/*.*":return`(?:${cu}${hu(l)}${S})?${$u}${Q}${x}${v}${Q}`;case"**/.*":return`(?:${cu}${hu(l)}${S})?${x}${v}${Q}`;default:{const G=/^(.*?)\.(\w+)$/.exec(R);if(!G)return;const tu=ru(G[1]);return tu?tu+x+G[2]:void 0}}},vu=e.removePrefix(h,Du);let nu=ru(vu);return nu&&l.strictSlashes!==!0&&(nu+=`${S}?`),nu},Oe=_,Oe}var Ne,gt;function Hn(){if(gt)return Ne;gt=1;const u=Ln(),e=Pn(),t=_e(),n=Se(),s=o=>o&&typeof o=="object"&&!Array.isArray(o),r=(o,i,a=!1)=>{if(Array.isArray(o)){const g=o.map(w=>r(w,i,a));return w=>{for(const _ of g){const h=_(w);if(h)return h}return!1}}const d=s(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");const D=i||{},m=D.windows,b=d?r.compileRe(o,i):r.makeRe(o,i,!1,!0),C=b.state;delete b.state;let f=()=>!1;if(D.ignore){const g={...i,ignore:null,onMatch:null,onResult:null};f=r(D.ignore,g,a)}const $=(g,w=!1)=>{const{isMatch:_,match:h,output:F}=r.test(g,b,i,{glob:o,posix:m}),l={glob:o,state:C,regex:b,posix:m,input:g,output:F,match:h,isMatch:_};if(typeof D.onResult=="function"&&D.onResult(l),_===!1)return l.isMatch=!1,w?l:!1;u:if(f(g)){if(typeof D.onIgnore=="function"&&D.onIgnore(l)===n.UNIGNORE){l.isMatch=!0;break u}return l.isMatch=!1,w?l:!1}return typeof D.onMatch=="function"&&D.onMatch(l),w?l:!0};return a&&($.state=C),$};return r.test=(o,i,a,{glob:d,posix:D}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const m=a||{},b=m.format||(D?t.toPosixSlashes:null);let C=o===d,f=C&&b?b(o):o;return C===!1&&(f=b?b(o):o,C=f===d),(C===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?C=r.matchBase(o,i,a,D):C=i.exec(f)),{isMatch:!!C,match:C,output:f}},r.matchBase=(o,i,a,d=a&&a.windows)=>(i instanceof RegExp?i:r.makeRe(i,a)).test(t.basename(o,{windows:d})),r.isMatch=(o,i,a)=>r(i,a)(o),r.parse=(o,i)=>Array.isArray(o)?o.map(a=>r.parse(a,i)):e(o,{...i,fastpaths:!1}),r.scan=(o,i)=>u(o,i),r.compileRe=(o,i,a=!1,d=!1)=>{if(a===!0)return o.output;const D=i||{},m=D.contains?"":"^",b=D.contains?"":"$";let C=`${m}(?:${o.output})${b}`;o&&o.negated===!0&&(C=`^(?!${C}).*$`);const f=r.toRegex(C,i);return d===!0&&(f.state=o),f},r.makeRe=(o,i={},a=!1,d=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let D={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(D.output=e.fastpaths(o,i)),D.output||(D=e(o,i)),r.compileRe(D,i,a,d)},r.toRegex=(o,i)=>{try{const a=i||{};return new RegExp(o,a.flags||(a.nocase?"i":""))}catch(a){if(i&&i.debug===!0)throw a;return/$^/}},r.constants=n,Ne=r,Ne}var Le,dt;function In(){if(dt)return Le;dt=1;const u=Hn(),e=_e();function t(n,s,r=!1){return s&&(s.windows===null||s.windows===void 0)&&(s={...s,windows:e.isWindows()}),u(n,s,r)}return Object.assign(t,u),Le=t,Le}var Mn=In();const ku=et(Mn);let jn;const Gn=u=>(jn??=I(import.meta.url))(u),Yu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,de=u=>{if(typeof Yu<"u"&&Yu.versions&&Yu.versions.node){const[e,t]=Yu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Yu.getBuiltinModule(u)}return Gn(u)},mt=de("fs"),zn={...mt,default:mt},{statSync:Un,stat:Wn,realpathSync:qn,realpath:Xn,readdirSync:Kn,readdir:Vn}=de("fs"),{sep:jt,basename:Qn,dirname:qe,resolve:Gt,normalize:Jn,relative:Zn,posix:Ou,isAbsolute:Yn}=de("path"),{fileURLToPath:us}=de("url"),{createRequire:es}=de("module");var yt=es(import.meta.url);function ts(u){let e=Jn(u);return e.length>1&&e[e.length-1]===jt&&(e=e.substring(0,e.length-1)),e}const rs=/[\\/]/g;function zt(u,e){return u.replace(rs,e)}const ns=/^[a-z]:[\\/]$/i;function ss(u){return u==="/"||ns.test(u)}function Pe(u,e){const{resolvePaths:t,normalizePath:n,pathSeparator:s}=e,r=process.platform==="win32"&&u.includes("/")||u.startsWith(".");if(t&&(u=Gt(u)),(n||r)&&(u=ts(u)),u===".")return"";const o=u[u.length-1]!==s;return zt(o?u+s:u,s)}function Ut(u,e){return e+u}function os(u,e){return function(t,n){return n.startsWith(u)?n.slice(u.length)+t:zt(Zn(u,n),e.pathSeparator)+e.pathSeparator+t}}function is(u){return u}function as(u,e,t){return e+u+t}function ls(u,e){const{relativePaths:t,includeBasePath:n}=e;return t&&u?os(u,e):n?Ut:is}function cs(u){return function(e,t){t.push(e.substring(u.length)||".")}}function Ds(u){return function(e,t,n){const s=e.substring(u.length)||".";n.every(r=>r(s,!0))&&t.push(s)}}const ps=(u,e)=>{e.push(u||".")},fs=(u,e,t)=>{const n=u||".";t.every(s=>s(n,!0))&&e.push(n)},As=()=>{};function hs(u,e){const{includeDirs:t,filters:n,relativePaths:s}=e;return t?s?n&&n.length?Ds(u):cs(u):n&&n.length?fs:ps:As}const Es=(u,e,t,n)=>{n.every(s=>s(u,!1))&&t.files++},Cs=(u,e,t,n)=>{n.every(s=>s(u,!1))&&e.push(u)},Fs=(u,e,t,n)=>{t.files++},gs=(u,e)=>{e.push(u)},ds=()=>{};function ms(u){const{excludeFiles:e,filters:t,onlyCounts:n}=u;return e?ds:t&&t.length?n?Es:Cs:n?Fs:gs}const ys=u=>u,Bs=()=>[""].slice(0,0);function bs(u){return u.group?Bs:ys}const $s=(u,e,t)=>{u.push({directory:e,files:t,dir:e})},vs=()=>{};function ws(u){return u.group?$s:vs}const xs=function(u,e,t){const{queue:n,fs:s,options:{suppressErrors:r}}=e;n.enqueue(),s.realpath(u,(o,i)=>{if(o)return n.dequeue(r?null:o,e);s.stat(i,(a,d)=>{if(a)return n.dequeue(r?null:a,e);if(d.isDirectory()&&Wt(u,i,e))return n.dequeue(null,e);t(d,i),n.dequeue(null,e)})})},Ss=function(u,e,t){const{queue:n,fs:s,options:{suppressErrors:r}}=e;n.enqueue();try{const o=s.realpathSync(u),i=s.statSync(o);if(i.isDirectory()&&Wt(u,o,e))return;t(i,o)}catch(o){if(!r)throw o}};function _s(u,e){return!u.resolveSymlinks||u.excludeSymlinks?null:e?Ss:xs}function Wt(u,e,t){if(t.options.useRealPaths)return Ts(e,t);let n=qe(u),s=1;for(;n!==t.root&&s<2;){const r=t.symlinks.get(n);r&&(r===e||r.startsWith(e)||e.startsWith(r))?s++:n=qe(n)}return t.symlinks.set(u,e),s>1}function Ts(u,e){return e.visited.includes(u+e.options.pathSeparator)}const Rs=u=>u.counts,ks=u=>u.groups,Os=u=>u.paths,Ns=u=>u.paths.slice(0,u.options.maxFiles),Ls=(u,e,t)=>(Te(e,t,u.counts,u.options.suppressErrors),null),Ps=(u,e,t)=>(Te(e,t,u.paths,u.options.suppressErrors),null),Hs=(u,e,t)=>(Te(e,t,u.paths.slice(0,u.options.maxFiles),u.options.suppressErrors),null),Is=(u,e,t)=>(Te(e,t,u.groups,u.options.suppressErrors),null);function Te(u,e,t,n){e(u&&!n?u:null,t)}function Ms(u,e){const{onlyCounts:t,group:n,maxFiles:s}=u;return t?e?Rs:Ls:n?e?ks:Is:s?e?Ns:Hs:e?Os:Ps}const qt={withFileTypes:!0},js=(u,e,t,n,s)=>{if(u.queue.enqueue(),n<0)return u.queue.dequeue(null,u);const{fs:r}=u;u.visited.push(e),u.counts.directories++,r.readdir(e||".",qt,(o,i=[])=>{s(i,t,n),u.queue.dequeue(u.options.suppressErrors?null:o,u)})},Gs=(u,e,t,n,s)=>{const{fs:r}=u;if(n<0)return;u.visited.push(e),u.counts.directories++;let o=[];try{o=r.readdirSync(e||".",qt)}catch(i){if(!u.options.suppressErrors)throw i}s(o,t,n)};function zs(u){return u?Gs:js}var Us=class{count=0;constructor(u){this.onQueueEmpty=u}enqueue(){return this.count++,this.count}dequeue(u,e){this.onQueueEmpty&&(--this.count<=0||u)&&(this.onQueueEmpty(u,e),u&&(e.controller.abort(),this.onQueueEmpty=void 0))}},Ws=class{_files=0;_directories=0;set files(u){this._files=u}get files(){return this._files}set directories(u){this._directories=u}get directories(){return this._directories}get dirs(){return this._directories}},qs=class{aborted=!1;abort(){this.aborted=!0}},Xt=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Ms(t,this.isSynchronous),this.root=Pe(e,t),this.state={root:ss(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Ws,options:t,queue:new Us((s,r)=>this.callbackInvoker(r,s,n)),symlinks:new Map,visited:[""].slice(0,0),controller:new qs,fs:t.fs||zn},this.joinPath=ls(this.root,t),this.pushDirectory=hs(this.root,t),this.pushFile=ms(t),this.getArray=bs(t),this.groupFiles=ws(t),this.resolveSymlink=_s(t,this.isSynchronous),this.walkDirectory=zs(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{const{paths:s,options:{filters:r,resolveSymlinks:o,excludeSymlinks:i,exclude:a,maxFiles:d,signal:D,useRealPaths:m,pathSeparator:b},controller:C}=this.state;if(C.aborted||D&&D.aborted||d&&s.length>d)return;const f=this.getArray(this.state.paths);for(let $=0;$<e.length;++$){const g=e[$];if(g.isFile()||g.isSymbolicLink()&&!o&&!i){const w=this.joinPath(g.name,t);this.pushFile(w,f,this.state.counts,r)}else if(g.isDirectory()){let w=as(g.name,t,this.state.options.pathSeparator);if(a&&a(g.name,w))continue;this.pushDirectory(w,s,r),this.walkDirectory(this.state,w,w,n-1,this.walk)}else if(this.resolveSymlink&&g.isSymbolicLink()){let w=Ut(g.name,t);this.resolveSymlink(w,this.state,(_,h)=>{if(_.isDirectory()){if(h=Pe(h,this.state.options),a&&a(g.name,m?h:w+b))return;this.walkDirectory(this.state,h,m?h:w+b,n-1,this.walk)}else{h=m?h:w;const F=Qn(h),l=Pe(qe(h),this.state.options);h=this.joinPath(F,l),this.pushFile(h,f,this.state.counts,r)}})}}this.groupFiles(this.state.groups,t,f)}};function Xs(u,e){return new Promise((t,n)=>{Kt(u,e,(s,r)=>{if(s)return n(s);t(r)})})}function Kt(u,e,t){new Xt(u,e,t).start()}function Ks(u,e){return new Xt(u,e).start()}var Bt=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Xs(this.root,this.options)}withCallback(e){Kt(this.root,this.options,e)}sync(){return Ks(this.root,this.options)}};let Vt=null;try{yt.resolve("picomatch"),Vt=yt("picomatch")}catch{}var Vs=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:jt,filters:[]};globFunction;constructor(u){this.options={...this.options,...u},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(u){return this.options.pathSeparator=u,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(u){return this.options.maxDepth=u,this}withMaxFiles(u){return this.options.maxFiles=u,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:u=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=u,this.withFullPaths()}withAbortSignal(u){return this.options.signal=u,this}normalize(){return this.options.normalizePath=!0,this}filter(u){return this.options.filters.push(u),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(u){return this.options.exclude=u,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(u){return new Bt(u||".",this.options)}withGlobFunction(u){return this.globFunction=u,this}crawlWithOptions(u,e){return this.options={...this.options,...e},new Bt(u||".",this.options)}glob(...u){return this.globFunction?this.globWithOptions(u):this.globWithOptions(u,{dot:!0})}globWithOptions(u,...e){const t=this.globFunction||Vt;if(!t)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[u.join("\0")];return n||(n=t(u,...e),this.globCache[u.join("\0")]=n),this.options.filters.push(s=>n(s)),this}};const Qs=Array.isArray,Qt=/\\/g,Js=/^[A-Za-z]:$/,Jt=process.platform==="win32",Zs=/^(\/?\.\.)+$/;function bt(u,e={}){const t=u.length,n=Array(t),s=Array(t);let r,o;for(r=0;r<t;r++){const i=Zt(u[r]);n[r]=i;const a=i.length,d=Array(a);for(o=0;o<a;o++)d[o]=ku(i[o],e);s[r]=d}return i=>{const a=i.split("/");if(a[0]===".."&&Zs.test(i))return!0;for(r=0;r<t;r++){const d=n[r],D=s[r],m=a.length,b=Math.min(m,d.length);for(o=0;o<b;){const C=d[o];if(C.includes("/"))return!0;if(!D[o](a[o]))break;if(!e.noglobstar&&C==="**")return!0;o++}if(o===m)return!0}return!1}}const Ys=/^[A-Z]:\/$/i,uo=Jt?u=>Ys.test(u):u=>u==="/";function $t(u,e,t){if(u===e||e.startsWith(`${u}/`)){if(t){const s=u.length+ +!uo(u);return(r,o)=>r.slice(s,o?-1:void 0)||"."}const n=e.slice(u.length+1);return n?(s,r)=>{if(s===".")return n;const o=`${n}/${s}`;return r?o.slice(0,-1):o}:(s,r)=>r&&s!=="."?s.slice(0,-1):s}return t?n=>Ou.relative(u,n)||".":n=>Ou.relative(u,`${e}/${n}`)||"."}function eo(u,e){if(e.startsWith(`${u}/`)){const t=e.slice(u.length+1);return n=>`${t}/${n}`}return t=>{const n=Ou.relative(u,`${e}/${t}`);return t[t.length-1]==="/"&&n!==""?`${n}/`:n||"."}}function vt(u){return u.replace(Js,e=>`${e}/`)}const to={parts:!0};function Zt(u){var e;const t=ku.scan(u,to);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[u]}const ro=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,no=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,so=u=>u.replace(ro,"\\$&"),oo=u=>u.replace(no,"\\$&"),io=Jt?oo:so;function ao(u,e){const t=ku.scan(u);return t.isGlob||t.negated}function Ee(...u){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...u)}function Yt(u){return typeof u=="string"?[u]:u??[]}const lo=/^(\/?\.\.)+/,co=/\\(?=[()[\]{}!*+?@|])/g;function He(u,e,t,n){var s;const r=e.cwd;let o=u;u[u.length-1]==="/"&&(o=u.slice(0,-1));const i=o.lastIndexOf("/"),a=(i===-1?o:o.slice(i+1)).startsWith("!(");o[o.length-1]!=="*"&&!a&&e.expandDirectories&&(o+="/**");const d=io(r);o=Yn(o.replace(co,""))?Ou.relative(d,o):Ou.normalize(o);const D=(s=lo.exec(o))===null||s===void 0?void 0:s[0],m=Zt(o);if(D){const C=(D.length+1)/3;let f=0;const $=d.split("/");for(;f<C&&m[f+C]===$[$.length+f-C];)o=o.slice(0,(C-f-1)*3)+o.slice((C-f)*3+m[f+C].length+1)||".",f++;const g=Ou.join(r,D.slice(f*3));g[0]!=="."&&t.root.length>g.length&&(t.root=vt(g),t.depthOffset=-C+f)}if(!n&&t.depthOffset>=0){var b;(b=t.commonPath)!==null&&b!==void 0||(t.commonPath=m);const C=[],f=Math.min(t.commonPath.length,m.length);for(let $=0;$<f;$++){const g=m[$];if(g==="**"&&!m[$+1]){C.pop();break}if($===m.length-1||g!==t.commonPath[$]||ao(g))break;C.push(g)}t.depthOffset=C.length,t.commonPath=C,t.root=vt(C.length>0?Ou.join(r,...C):r)}return o}function Do(u,e,t){const n=[],s=[],r=[];for(const o of u.ignore)o&&(o[0]!=="!"||o[1]==="("?s.push(He(o,u,t,!0)):r.push(o.slice(1)));for(const o of e)o&&(o[0]!=="!"||o[1]==="("?n.push(He(o,u,t,!1)):(o[1]!=="!"||o[2]==="(")&&s.push(He(o.slice(1),u,t,!0)));return{match:n,ignore:s,unignore:r}}function po(u,e){const t=u.cwd,n={root:t,depthOffset:0},s=Do(u,e,n);u.debug&&Ee("internal processing patterns:",s);const{absolute:r,caseSensitiveMatch:o,debug:i,dot:a,followSymbolicLinks:d,onlyDirectories:D}=u,m=n.root.replace(Qt,""),b={dot:a,nobrace:u.braceExpansion===!1,nocase:!o,noextglob:u.extglob===!1,noglobstar:u.globstar===!1,posix:!0},C=s.unignore.length>0,f=C?ku(s.unignore,b):void 0,$=C?bt(s.unignore,b):void 0,g=ku(s.match,{...b,ignore:s.ignore,onIgnore:f?S=>f(S.output)&&ku.constants.UNIGNORE:void 0}),w=ku(s.ignore,b),_=bt(s.match,b),h=$t(t,m,r),F=r?h:$t(t,m,!0),l=s.match.length>0&&s.match.every(S=>S==="**"||S==="**/*"),T=s.ignore.length>0||C||!l?(S,v)=>{const j=F(v,!0);return j==="."||$&&$(j)?!1:!_(j)||w(j)}:void 0;let N;u.deep!==void 0&&(N=Math.round(u.deep-n.depthOffset));const x=new Vs({filters:[i?(S,v)=>{const j=h(S,v),q=g(j);return q&&Ee(`matched ${j}`),q}:(S,v)=>{const j=h(S,v);return g(j)}],exclude:i&&T?(S,v)=>{const j=T(S,v);return Ee(`${j?"skipped":"crawling"} ${v}`),j}:T,fs:u.fs,pathSeparator:"/",relativePaths:!r,resolvePaths:r,includeBasePath:r,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:D,includeDirs:D||!u.onlyFiles,maxDepth:N,signal:u.signal}).crawl(m);return u.debug&&Ee("internal properties:",{...n,root:m}),[x,t!==m&&!r&&eo(t,m)]}function fo(u,e){if(e)for(let t=u.length-1;t>=0;t--)u[t]=e(u[t]);return u}const wt={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Ao(u){const e=Object.assign({},u);for(const t in wt)e[t]===void 0&&Object.assign(e,{[t]:wt[t]});return e.cwd=(e.cwd instanceof URL?us(e.cwd):Gt(e.cwd||process.cwd())).replace(Qt,"/"),e.ignore=Yt(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Vn,readdirSync:e.fs.readdirSync||Kn,realpath:e.fs.realpath||Xn,realpathSync:e.fs.realpathSync||qn,stat:e.fs.stat||Wn,statSync:e.fs.statSync||Un}),e.debug&&Ee("globbing with options:",e),e}function ho(u,e={}){var t;if(u&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=Qs(u)||typeof u=="string",s=Yt((t=n?u:u.patterns)!==null&&t!==void 0?t:"**/*"),r=Ao(n?e:u);return s.length>0?po(r,s):[]}async function Sa(u,e){const[t,n]=ho(u,e);return t?fo(await t.withPromise(),n):[]}var Ie,xt;function Eo(){if(xt)return Ie;xt=1;/*!
2
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
+ *
4
+ * Copyright (c) 2014-2016, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */return Ie=function(u){if(typeof u!="string"||u==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(u);){if(e[2])return!0;u=u.slice(e.index+e[0].length)}return!1},Ie}var Me,St;function ur(){if(St)return Me;St=1;/*!
7
+ * is-glob <https://github.com/jonschlinkert/is-glob>
8
+ *
9
+ * Copyright (c) 2014-2017, Jon Schlinkert.
10
+ * Released under the MIT License.
11
+ */var u=Eo(),e={"{":"}","(":")","[":"]"},t=function(s){if(s[0]==="!")return!0;for(var r=0,o=-2,i=-2,a=-2,d=-2,D=-2;r<s.length;){if(s[r]==="*"||s[r+1]==="?"&&/[\].+)]/.test(s[r])||i!==-1&&s[r]==="["&&s[r+1]!=="]"&&(i<r&&(i=s.indexOf("]",r)),i>r&&(D===-1||D>i||(D=s.indexOf("\\",r),D===-1||D>i)))||a!==-1&&s[r]==="{"&&s[r+1]!=="}"&&(a=s.indexOf("}",r),a>r&&(D=s.indexOf("\\",r),D===-1||D>a))||d!==-1&&s[r]==="("&&s[r+1]==="?"&&/[:!=]/.test(s[r+2])&&s[r+3]!==")"&&(d=s.indexOf(")",r),d>r&&(D=s.indexOf("\\",r),D===-1||D>d))||o!==-1&&s[r]==="("&&s[r+1]!=="|"&&(o<r&&(o=s.indexOf("|",r)),o!==-1&&s[o+1]!==")"&&(d=s.indexOf(")",o),d>o&&(D=s.indexOf("\\",o),D===-1||D>d))))return!0;if(s[r]==="\\"){var m=s[r+1];r+=2;var b=e[m];if(b){var C=s.indexOf(b,r);C!==-1&&(r=C+1)}if(s[r]==="!")return!0}else r++}return!1},n=function(s){if(s[0]==="!")return!0;for(var r=0;r<s.length;){if(/[*?{}()[\]]/.test(s[r]))return!0;if(s[r]==="\\"){var o=s[r+1];r+=2;var i=e[o];if(i){var a=s.indexOf(i,r);a!==-1&&(r=a+1)}if(s[r]==="!")return!0}else r++}return!1};return Me=function(s,r){if(typeof s!="string"||s==="")return!1;if(u(s))return!0;var o=t;return r&&r.strict===!1&&(o=n),o(s)},Me}let Co;const Fo=u=>(Co??=I(import.meta.url))(u),ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,er=u=>{if(typeof ue<"u"&&ue.versions&&ue.versions.node){const[e,t]=ue.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ue.getBuiltinModule(u)}return Fo(u)},go=er("path"),mo=er("os");var je,_t;function yo(){if(_t)return je;_t=1;var u=ur(),e=go.posix.dirname,t=mo.platform()==="win32",n="/",s=/\\/g,r=/\\([!*?|[\](){}])/g;je=function(a,d){var D=Object.assign({flipBackslashes:!0},d);D.flipBackslashes&&t&&a.indexOf(n)<0&&(a=a.replace(s,n)),o(a)&&(a+=n),a+="a";do a=e(a);while(i(a));return a.replace(r,"$1")};function o(a){var d=a.slice(-1),D;switch(d){case"}":D="{";break;case"]":D="[";break;default:return!1}var m=a.indexOf(D);return m<0?!1:a.slice(m+1,-1).includes(n)}function i(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:u(a)}return je}var Bo=yo();et(Bo);let bo;const $o=u=>(bo??=I(import.meta.url))(u),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vo=u=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,t]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ee.getBuiltinModule(u)}return $o(u)},{access:wo}=vo("node:fs/promises");async function _a(u,e=Je){bu(u),u=yu(u);try{return await wo(u,e),!0}catch{return!1}}let xo;const So=u=>(xo??=I(import.meta.url))(u),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_o=u=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,t]=te.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return te.getBuiltinModule(u)}return So(u)},{accessSync:To}=_o("node:fs");function Xe(u,e=Je){bu(u),u=yu(u);try{return To(u,e),!0}catch{return!1}}var Ro=ur();et(Ro);let ko;const Oo=u=>(ko??=I(import.meta.url))(u),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tr=u=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,t]=re.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return re.getBuiltinModule(u)}return Oo(u)};tr("node:fs/promises");tr("node:fs");let No=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},Lo=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const rr=(u,e)=>{const t=u?.code;return t==="ENOENT"?new No(`no such file or directory, open '${e}'`):t==="EACCES"||t==="EPERM"?new Lo(`unable to read the non-readable file: ${e}`):u};let Po;const Ho=u=>(Po??=I(import.meta.url))(u),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=u=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,t]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ne.getBuiltinModule(u)}return Ho(u)},{readFile:Io}=nr("node:fs/promises"),{unzip:Mo,brotliDecompress:jo}=nr("node:zlib"),Go={brotli:jo,gzip:Mo,none:(u,e)=>{e(null,u)}},ka=async(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:n,encoding:s,flag:r}=e??{};let o;try{o=await Io(u,r?{flag:r}:{})}catch(i){throw rr(i,u)}return await new Promise((i,a)=>{Go[n??"none"](o,(d,D)=>{d?a(d):i(t?D:D.toString(s??"utf8"))})})};let zo;const Uo=u=>(zo??=I(import.meta.url))(u),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sr=u=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,t]=se.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return se.getBuiltinModule(u)}return Uo(u)},{readFileSync:Wo}=sr("node:fs"),{unzipSync:qo,brotliDecompressSync:Xo}=sr("node:zlib"),Ko={brotli:Xo,gzip:qo,none:u=>u},Vo=(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:n,encoding:s,flag:r}=e??{};let o;try{o=Wo(u,r?{flag:r}:{})}catch(d){throw rr(d,u)}const i=Ko[n??"none"],a=i(o);return t?a:a.toString(s??"utf8")},Qo=globalThis.process??Object.create(null),Tt={versions:{}},Rt=new Proxy(Qo,{get(u,e){if(e in u)return u[e];if(e in Tt)return Tt[e]}}),Jo=u=>u.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
+ `),Zo=(u,e,t,n)=>{const s={column:0,line:-1,...u.start},r={...s,...u.end},o=s.line,i=s.column,a=r.line,d=r.column;let D=Math.max(o-(t+1),0),m=Math.min(e.length,a+n);o===-1&&(D=0),a===-1&&(m=e.length);const b=a-o,C={};if(b)for(let f=0;f<=b;f++){const $=f+o;if(!i)C[$]=!0;else if(f===0){const g=e[$-1]?.length;C[$]=[i,(g??0)-i+1]}else if(f===b)C[$]=[0,d];else{const g=e[$-f]?.length;C[$]=[0,g]}}else i===d?C[o]=i?[i,0]:!0:C[o]=[i,(d??0)-(i??0)];return{end:m,markerLines:C,start:D}},Yo=Rt.platform==="win32"&&!Rt.env?.WT_SESSION?">":"❯",Oa=(u,e,t)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:f=>f,marker:f=>f,message:f=>f,...t?.color}},s=typeof e.start.column=="number";let r=(u.includes("\r")?Jo(u):u).split(`
13
+ `);typeof n.tabWidth=="number"&&u.includes(" ")&&(r=r.map(f=>f.replaceAll(" "," ".repeat(n.tabWidth))));const{end:o,markerLines:i,start:a}=Zo(e,r,n.linesAbove,n.linesBelow),d=String(o).length,{gutter:D,marker:m,message:b}=n.color;let C=r.slice(a,o).map((f,$)=>{const g=a+1+$,w=i[g],_=String(g).padStart(d),h=!i[g+1],F=` ${_}${n.showGutter?" |":""}`;if(w){let l="";if(Array.isArray(w)){const T=f.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),N=w[1]||1;l=[`
14
+ `,n.prefix+D(F.replaceAll(/\d/g," "))," ",T,m("^").repeat(N)].join(""),h&&n.message&&(l+=` ${b(n.message)}`)}return[n.prefix+m(Yo),D(F),f.length>0?` ${f}`:"",l].join("")}return`${n.prefix} ${D(F)}${f.length>0?` ${f}`:""}`}).join(`
15
+ `);return n.message&&!s&&(C=`${n.prefix+" ".repeat(d+1)+n.message}
16
+ ${C}`),C},kt=(u,e)=>{let t=0,n=e.length-2;for(;t<n;){const s=t+(n-t>>1);if(u<e[s])n=s-1;else if(u>=e[s+1])t=s+1;else{t=s;break}}return t},ui=/\n|\r(?!\n)/,ei=u=>u.split(ui).reduce((e,t)=>(e.push(e.at(-1)+t.length+1),e),[0]),Na=(u,e,t)=>{if(!Array.isArray(u)&&typeof u!="string"||(typeof u=="string"||Array.isArray(u))&&u.length===0)return{column:0,line:0};if(typeof e!="number"||typeof u=="string"&&e>=u.length||Array.isArray(u)&&e+1>=u.at(-1))return{column:0,line:0};if(typeof u=="string"){const s=ei(u),r=kt(e,s);return{column:e-s[r]+1,line:r+1}}const n=kt(e,u);return{column:e-u[n]+1,line:n+1}};let La=class extends Error{fileName;codeFrame;name="JSONError";#u;constructor(e){super(),this.#u=e}get message(){return`${this.#u}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
17
+
18
+ ${this.codeFrame}
19
+ `:""}`}set message(e){this.#u=e}};const ti=u=>{const e={force:!0,recursive:!0};return u?.maxRetries!==void 0&&(e.maxRetries=u.maxRetries),u?.retryDelay!==void 0&&(e.retryDelay=u.retryDelay),e};let ri;const ni=u=>(ri??=I(import.meta.url))(u),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,or=u=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,t]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return oe.getBuiltinModule(u)}return ni(u)};or("node:fs");or("node:fs/promises");let si;const oi=u=>(si??=I(import.meta.url))(u),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=u=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,t]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ie.getBuiltinModule(u)}return oi(u)};ii("node:fs");let ai;const li=u=>(ai??=I(import.meta.url))(u),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ci=u=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,t]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ae.getBuiltinModule(u)}return li(u)};ci("node:fs/promises");let Di;const pi=u=>(Di??=I(import.meta.url))(u),le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fi=u=>{if(typeof le<"u"&&le.versions&&le.versions.node){const[e,t]=le.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return le.getBuiltinModule(u)}return pi(u)},{rmSync:Ai}=fi("node:fs"),Ha=(u,e={})=>{bu(u),Ai(u,ti(e))},hi=u=>{if(typeof u!="string"&&!(u instanceof ArrayBuffer)&&!ArrayBuffer.isView(u))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")};let Ei;const Ci=u=>(Ei??=I(import.meta.url))(u),ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fi=u=>{if(typeof ce<"u"&&ce.versions&&ce.versions.node){const[e,t]=ce.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ce.getBuiltinModule(u)}return Ci(u)},{randomBytes:gi}=Fi("node:crypto"),di=u=>`${u}.${process.pid.toString(36)}.${gi(6).toString("hex")}.tmp`,mi=new TextEncoder,yi=u=>{if(u instanceof Uint8Array)return u;if(typeof u=="string")return mi.encode(u);if(u instanceof ArrayBuffer)return new Uint8Array(u);if(ArrayBuffer.isView(u)){const e=u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")};let Bi;const bi=u=>(Bi??=I(import.meta.url))(u),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$i=u=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,t]=De.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return De.getBuiltinModule(u)}return bi(u)};$i("node:fs/promises");let vi;const wi=u=>(vi??=I(import.meta.url))(u),pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xi=u=>{if(typeof pe<"u"&&pe.versions&&pe.versions.node){const[e,t]=pe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return pe.getBuiltinModule(u)}return wi(u)},{mkdirSync:Si,readFileSync:_i,writeFileSync:Ti,statSync:Ri,renameSync:Ot,chownSync:ki,chmodSync:Oi,unlinkSync:Ni}=xi("node:fs"),Li=(u,e,t)=>{t={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},bu(u),hi(e),u=yu(u);const n=Xe(u,Je),s=t.flag??"w",r=s.includes("a"),o=s.includes("x");if(n&&(!t.overwrite||o))throw new Lr(`file already exists, open '${u}'`);const i=di(u);try{!n&&t.recursive&&Si(Ye(u),{recursive:!0});let a,d=typeof e=="string"?Buffer.from(e,t.encoding??"utf8"):yi(e);if(r&&n&&(d=Buffer.concat([_i(u),d])),Ti(i,d,{flag:"wx"}),n&&t.backup&&(a=Ri(u),t.chown??={gid:a.gid,uid:a.uid},Ot(u,`${u}.bak`)),t.chown)try{ki(i,t.chown.uid,t.chown.gid)}catch{}const D=a&&t.mode===void 0?a.mode:t.mode;D!==void 0&&Oi(i,D),Ot(i,u)}catch(a){throw new Error(`Failed to write file at: ${u} - ${a.message}`,{cause:a})}finally{Xe(i)&&Ni(i)}},Pi=/^(?:( )+|\t+)/,me="space";function Nt(u,e,t){return u&&e===me&&t===1}function Lt(u,e){const t=new Map;let n=0,s,r;for(const o of u.split(/\n/g)){if(!o)continue;const i=o.match(Pi);if(i===null)n=0,s="";else{const a=i[0].length,d=i[1]?me:"tab";if(Nt(e,d,a))continue;d!==s&&(n=0),s=d;let D=1,m=0;const b=a-n;if(n=a,b===0)D=0,m=1;else{const f=Math.abs(b);if(Nt(e,d,f))continue;r=Hi(d,f)}const C=t.get(r);t.set(r,C===void 0?[1,0]:[C[0]+D,C[1]+m])}}return t}function Hi(u,e){return(u===me?"s":"t")+String(e)}function Ii(u){const e=u[0]==="s"?me:"tab",t=Number(u.slice(1));return{type:e,amount:t}}function Mi(u){let e,t=0,n=0;for(const[s,[r,o]]of u)(r>t||r===t&&o>n)&&(t=r,n=o,e=s);return e}function ji(u,e){return(u===me?" ":" ").repeat(e)}function Gi(u){if(typeof u!="string")throw new TypeError("Expected a string");let e=Lt(u,!0);e.size===0&&(e=Lt(u,!1));const t=Mi(e);let n,s=0,r="";return t!==void 0&&({type:n,amount:s}=Ii(t),r=ji(n,s)),{amount:s,type:n,indent:r}}let zi;const Ui=u=>(zi??=I(import.meta.url))(u),fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wi=u=>{if(typeof fe<"u"&&fe.versions&&fe.versions.node){const[e,t]=fe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return fe.getBuiltinModule(u)}return Ui(u)};Wi("node:fs/promises");let qi;const Xi=u=>(qi??=I(import.meta.url))(u),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ki=u=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,t]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ae.getBuiltinModule(u)}return Xi(u)},{readFileSync:Vi}=Ki("node:fs"),Ia=(u,e,t={})=>{const{detectIndent:n,indent:s,replacer:r,stringify:o=JSON.stringify,...i}={indent:" ",...t};let a=s,d=`
20
+ `;if(Xe(u,hr))try{const m=Vi(u,"utf8");if(n){const{indent:b}=Gi(m);a=b}d=m.endsWith(`
21
+ `)?`
22
+ `:""}catch(m){if(m.code!=="ENOENT")throw m}const D=o(e,r,a);Li(u,`${D}${d}`,i)};let Qi;const Ji=u=>(Qi??=I(import.meta.url))(u),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tt=u=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,t]=he.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return he.getBuiltinModule(u)}return Ji(u)},Zi=tt("fs"),Yi=tt("os"),ua=tt("path");var Ge={},Pt;function ea(){if(Pt)return Ge;Pt=1;var u=Object.defineProperty,e=(D,m)=>u(D,"name",{value:m,configurable:!0}),t=Zi,n=Yi,s=ua;const r=e(D=>{let m="";for(let b=0;b<D.length;b+=1){const C=D[b],f=C.toUpperCase();m+=C===f?C.toLowerCase():f}return m},"invertCase"),o=new Map,i=e((D,m)=>{const b=s.join(D,`.is-fs-case-sensitive-test-${process.pid}`);try{return m.writeFileSync(b,""),!m.existsSync(r(b))}finally{try{m.unlinkSync(b)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((D,m,b)=>{try{return i(D,b)}catch(C){if(m===void 0)return i(n.tmpdir(),b);throw C}},"checkDirectoryCaseWithFallback"),d=e((D,m=t,b=!0)=>{const C=D??process.cwd();if(b&&o.has(C))return o.get(C);let f;const $=r(C);return $!==C&&m.existsSync(C)?f=!m.existsSync($):f=a(C,D,m),b&&o.set(C,f),f},"isFsCaseSensitive");return Ge.isFsCaseSensitive=d,Ge}var ta=ea();const Ma=ta.isFsCaseSensitive;function ja(u,e,t){const{buffer:n,compression:s,encoding:r="utf8",flag:o,...i}={},a=Vo(u,{buffer:n,compression:s,encoding:r,flag:o});return typeof e=="function"?st(a,e,i):st(a,i)}var ra=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,na=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,sa=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ze={Space_Separator:ra,ID_Start:na,ID_Continue:sa},Y={isSpaceSeparator(u){return typeof u=="string"&&ze.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||ze.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||ze.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let Ke,ou,mu,xe,Su,fu,eu,rt,ge;var oa=function(u,e){Ke=String(u),ou="start",mu=[],xe=0,Su=1,fu=0,eu=void 0,rt=void 0,ge=void 0;do eu=ia(),ca[ou]();while(eu.type!=="eof");return typeof e=="function"?Ve({"":ge},"",e):ge};function Ve(u,e,t){const n=u[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let s=0;s<n.length;s++){const r=String(s),o=Ve(n,r,t);o===void 0?delete n[r]:Object.defineProperty(n,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const s in n){const r=Ve(n,s,t);r===void 0?delete n[s]:Object.defineProperty(n,s,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,e,n)}let O,k,Ce,du,H;function ia(){for(O="default",k="",Ce=!1,du=1;;){H=Bu();const u=ir[O]();if(u)return u}}function Bu(){if(Ke[xe])return String.fromCodePoint(Ke.codePointAt(xe))}function E(){const u=Bu();return u===`
23
+ `?(Su++,fu=0):u?fu+=u.length:fu++,u&&(xe+=u.length),u}const ir={default(){switch(H){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
24
+ `:case"\r":case"\u2028":case"\u2029":E();return;case"/":E(),O="comment";return;case void 0:return E(),W("eof")}if(Y.isSpaceSeparator(H)){E();return}return ir[ou]()},comment(){switch(H){case"*":E(),O="multiLineComment";return;case"/":E(),O="singleLineComment";return}throw V(E())},multiLineComment(){switch(H){case"*":E(),O="multiLineCommentAsterisk";return;case void 0:throw V(E())}E()},multiLineCommentAsterisk(){switch(H){case"*":E();return;case"/":E(),O="default";return;case void 0:throw V(E())}E(),O="multiLineComment"},singleLineComment(){switch(H){case`
25
+ `:case"\r":case"\u2028":case"\u2029":E(),O="default";return;case void 0:return E(),W("eof")}E()},value(){switch(H){case"{":case"[":return W("punctuator",E());case"n":return E(),Tu("ull"),W("null",null);case"t":return E(),Tu("rue"),W("boolean",!0);case"f":return E(),Tu("alse"),W("boolean",!1);case"-":case"+":E()==="-"&&(du=-1),O="sign";return;case".":k=E(),O="decimalPointLeading";return;case"0":k=E(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),O="decimalInteger";return;case"I":return E(),Tu("nfinity"),W("numeric",1/0);case"N":return E(),Tu("aN"),W("numeric",NaN);case'"':case"'":Ce=E()==='"',k="",O="string";return}throw V(E())},identifierNameStartEscape(){if(H!=="u")throw V(E());E();const u=Qe();switch(u){case"$":case"_":break;default:if(!Y.isIdStartChar(u))throw Ht();break}k+=u,O="identifierName"},identifierName(){switch(H){case"$":case"_":case"‌":case"‍":k+=E();return;case"\\":E(),O="identifierNameEscape";return}if(Y.isIdContinueChar(H)){k+=E();return}return W("identifier",k)},identifierNameEscape(){if(H!=="u")throw V(E());E();const u=Qe();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!Y.isIdContinueChar(u))throw Ht();break}k+=u,O="identifierName"},sign(){switch(H){case".":k=E(),O="decimalPointLeading";return;case"0":k=E(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),O="decimalInteger";return;case"I":return E(),Tu("nfinity"),W("numeric",du*(1/0));case"N":return E(),Tu("aN"),W("numeric",NaN)}throw V(E())},zero(){switch(H){case".":k+=E(),O="decimalPoint";return;case"e":case"E":k+=E(),O="decimalExponent";return;case"x":case"X":k+=E(),O="hexadecimal";return}return W("numeric",du*0)},decimalInteger(){switch(H){case".":k+=E(),O="decimalPoint";return;case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalPointLeading(){if(Y.isDigit(H)){k+=E(),O="decimalFraction";return}throw V(E())},decimalPoint(){switch(H){case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E(),O="decimalFraction";return}return W("numeric",du*Number(k))},decimalFraction(){switch(H){case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalExponent(){switch(H){case"+":case"-":k+=E(),O="decimalExponentSign";return}if(Y.isDigit(H)){k+=E(),O="decimalExponentInteger";return}throw V(E())},decimalExponentSign(){if(Y.isDigit(H)){k+=E(),O="decimalExponentInteger";return}throw V(E())},decimalExponentInteger(){if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},hexadecimal(){if(Y.isHexDigit(H)){k+=E(),O="hexadecimalInteger";return}throw V(E())},hexadecimalInteger(){if(Y.isHexDigit(H)){k+=E();return}return W("numeric",du*Number(k))},string(){switch(H){case"\\":E(),k+=aa();return;case'"':if(Ce)return E(),W("string",k);k+=E();return;case"'":if(!Ce)return E(),W("string",k);k+=E();return;case`
26
+ `:case"\r":throw V(E());case"\u2028":case"\u2029":Da(H);break;case void 0:throw V(E())}k+=E()},start(){switch(H){case"{":case"[":return W("punctuator",E())}O="value"},beforePropertyName(){switch(H){case"$":case"_":k=E(),O="identifierName";return;case"\\":E(),O="identifierNameStartEscape";return;case"}":return W("punctuator",E());case'"':case"'":Ce=E()==='"',O="string";return}if(Y.isIdStartChar(H)){k+=E(),O="identifierName";return}throw V(E())},afterPropertyName(){if(H===":")return W("punctuator",E());throw V(E())},beforePropertyValue(){O="value"},afterPropertyValue(){switch(H){case",":case"}":return W("punctuator",E())}throw V(E())},beforeArrayValue(){if(H==="]")return W("punctuator",E());O="value"},afterArrayValue(){switch(H){case",":case"]":return W("punctuator",E())}throw V(E())},end(){throw V(E())}};function W(u,e){return{type:u,value:e,line:Su,column:fu}}function Tu(u){for(const e of u){if(Bu()!==e)throw V(E());E()}}function aa(){switch(Bu()){case"b":return E(),"\b";case"f":return E(),"\f";case"n":return E(),`
27
+ `;case"r":return E(),"\r";case"t":return E()," ";case"v":return E(),"\v";case"0":if(E(),Y.isDigit(Bu()))throw V(E());return"\0";case"x":return E(),la();case"u":return E(),Qe();case`
28
+ `:case"\u2028":case"\u2029":return E(),"";case"\r":return E(),Bu()===`
29
+ `&&E(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw V(E());case void 0:throw V(E())}return E()}function la(){let u="",e=Bu();if(!Y.isHexDigit(e)||(u+=E(),e=Bu(),!Y.isHexDigit(e)))throw V(E());return u+=E(),String.fromCodePoint(parseInt(u,16))}function Qe(){let u="",e=4;for(;e-- >0;){const t=Bu();if(!Y.isHexDigit(t))throw V(E());u+=E()}return String.fromCodePoint(parseInt(u,16))}const ca={start(){if(eu.type==="eof")throw Ru();Ue()},beforePropertyName(){switch(eu.type){case"identifier":case"string":rt=eu.value,ou="afterPropertyName";return;case"punctuator":ve();return;case"eof":throw Ru()}},afterPropertyName(){if(eu.type==="eof")throw Ru();ou="beforePropertyValue"},beforePropertyValue(){if(eu.type==="eof")throw Ru();Ue()},beforeArrayValue(){if(eu.type==="eof")throw Ru();if(eu.type==="punctuator"&&eu.value==="]"){ve();return}Ue()},afterPropertyValue(){if(eu.type==="eof")throw Ru();switch(eu.value){case",":ou="beforePropertyName";return;case"}":ve()}},afterArrayValue(){if(eu.type==="eof")throw Ru();switch(eu.value){case",":ou="beforeArrayValue";return;case"]":ve()}},end(){}};function Ue(){let u;switch(eu.type){case"punctuator":switch(eu.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=eu.value;break}if(ge===void 0)ge=u;else{const e=mu[mu.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,rt,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")mu.push(u),Array.isArray(u)?ou="beforeArrayValue":ou="beforePropertyName";else{const e=mu[mu.length-1];e==null?ou="end":Array.isArray(e)?ou="afterArrayValue":ou="afterPropertyValue"}}function ve(){mu.pop();const u=mu[mu.length-1];u==null?ou="end":Array.isArray(u)?ou="afterArrayValue":ou="afterPropertyValue"}function V(u){return nt(u===void 0?`JSON5: invalid end of input at ${Su}:${fu}`:`JSON5: invalid character '${ar(u)}' at ${Su}:${fu}`)}function Ru(){return nt(`JSON5: invalid end of input at ${Su}:${fu}`)}function Ht(){return fu-=5,nt(`JSON5: invalid identifier character at ${Su}:${fu}`)}function Da(u){console.warn(`JSON5: '${ar(u)}' in strings is not valid ECMAScript; consider escaping`)}function ar(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const t=u.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return u}function nt(u){const e=new SyntaxError(u);return e.lineNumber=Su,e.columnNumber=fu,e}var pa=function(u,e,t){const n=[];let s="",r,o,i="",a;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(t=e.space,a=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){r=[];for(const f of e){let $;typeof f=="string"?$=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&($=String(f)),$!==void 0&&r.indexOf($)<0&&r.push($)}}return t instanceof Number?t=Number(t):t instanceof String&&(t=String(t)),typeof t=="number"?t>0&&(t=Math.min(10,Math.floor(t)),i=" ".substr(0,t)):typeof t=="string"&&(i=t.substr(0,10)),d("",{"":u});function d(f,$){let g=$[f];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(f):typeof g.toJSON=="function"&&(g=g.toJSON(f))),o&&(g=o.call($,f,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return D(g);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?C(g):m(g)}function D(f){const $={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let h=0;h<f.length;h++){const F=f[h];switch(F){case"'":case'"':$[F]++,w+=F;continue;case"\0":if(Y.isDigit(f[h+1])){w+="\\x00";continue}}if(g[F]){w+=g[F];continue}if(F<" "){let l=F.charCodeAt(0).toString(16);w+="\\x"+("00"+l).substring(l.length);continue}w+=F}const _=a||Object.keys($).reduce((h,F)=>$[h]<$[F]?h:F);return w=w.replace(new RegExp(_,"g"),g[_]),_+w+_}function m(f){if(n.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");n.push(f);let $=s;s=s+i;let g=r||Object.keys(f),w=[];for(const h of g){const F=d(h,f);if(F!==void 0){let l=b(h)+":";i!==""&&(l+=" "),l+=F,w.push(l)}}let _;if(w.length===0)_="{}";else{let h;if(i==="")h=w.join(","),_="{"+h+"}";else{let F=`,
30
+ `+s;h=w.join(F),_=`{
31
+ `+s+h+`,
32
+ `+$+"}"}}return n.pop(),s=$,_}function b(f){if(f.length===0)return D(f);const $=String.fromCodePoint(f.codePointAt(0));if(!Y.isIdStartChar($))return D(f);for(let g=$.length;g<f.length;g++)if(!Y.isIdContinueChar(String.fromCodePoint(f.codePointAt(g))))return D(f);return f}function C(f){if(n.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");n.push(f);let $=s;s=s+i;let g=[];for(let _=0;_<f.length;_++){const h=d(String(_),f);g.push(h!==void 0?h:"null")}let w;if(g.length===0)w="[]";else if(i==="")w="["+g.join(",")+"]";else{let _=`,
33
+ `+s,h=g.join(_);w=`[
34
+ `+s+h+`,
35
+ `+$+"]"}return n.pop(),s=$,w}};const fa={parse:oa,stringify:pa};var Ga=fa;export{Sa as C,Na as E,Ye as J,ut as K,Oa as L,vr as M,Lu as P,Fe as W,da as _,Ca as a,ga as b,wn as c,Ba as d,yu as e,ka as f,ya as g,va as h,Ga as i,Li as j,No as k,Xe as l,_a as m,Ma as n,Ea as o,Ha as p,Ia as q,La as s,ja as u,Nu as v,br as w,Fa as y,Vo as z};
@@ -0,0 +1,2 @@
1
+ const G=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,P=/^-{1,2}(color=256)$/,D=/^-{1,2}(color=16m|color=full|color=truecolor)$/,L=/^-{1,2}(color|colors|color=true|color=always)$/,j=/-mono|dumb/i,F=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,V=/-256(color)?$/i,Y=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,U=()=>{const t=globalThis.process?.getBuiltinModule;return typeof t!="function"?"":t("node:os").release()},_=(t,e={})=>{const{isTTY:i,sniffFlags:o=!0}=e,l=globalThis,u=l.Deno!=null,c=l.process??l.Deno??{},p=c.argv??c.args??[],O=o?p.indexOf("--"):-1,a=d=>{if(!o)return!1;const R=p.findIndex(k=>d.test(k));return R!==-1&&(O===-1||R<O)};let r={};try{r=u?l.Deno.env.toObject():c.env??{}}catch{}const n="FORCE_COLOR",g=n in r,s=r[n]??void 0,m=typeof s=="string",S=typeof s=="number";let h;if(s==="true")h=1;else if(s==="false")h=0;else if(m&&s.length===0)h=1;else if(m&&s.length>0){const d=Number.parseInt(s,10);h=Number.isNaN(d)?void 0:Math.max(0,Math.min(d,3))}else S&&(h=Number.isNaN(s)?void 0:Math.max(0,Math.min(s,3)));if(s!=="true"&&s!=="false"&&h!==void 0&&h<4)return h;const w=g&&h!==void 0&&h>0;if(g&&h===0||a(G)||!w&&"NO_COLOR"in r)return 0;if(a(P))return 2;if(a(D))return 3;if(a(L))return 1;const N=h??0;if("TF_BUILD"in r&&"AGENT_NAME"in r)return 1;if(r.TERM&&j.test(r.TERM))return N;if(u?l.Deno.build.os==="windows":c.platform==="win32"){if("WT_SESSION"in r)return 3;if("ANSICON"in r)return 1;try{let d;u?d=l.Deno.osRelease():typeof c.os?.release=="function"?d=c.os.release():d=U();const R=d.split(".");return Number(R[0])>=10&&Number(R[2])>=10586?Number(R[2])>=14931?3:2:1}catch{}}if("CI"in r)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(d=>d in r)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(d=>d in r)||r.CI_NAME==="codeship"?1:N;if(r.TERMINAL_EMULATOR?.includes("JediTerm"))return 3;if("TEAMCITY_VERSION"in r)return F.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor"||r.TERM==="xterm-kitty"||r.TERM==="xterm-ghostty"||r.TERM==="wezterm")return 3;if("TERM_PROGRAM"in r){const d=Number.parseInt((r.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(r.TERM_PROGRAM==="iTerm.app")return d>=3?3:2;if(r.TERM_PROGRAM==="Apple_Terminal")return 2}if(V.test(r.TERM))return 2;let T;return i!==void 0?T=i:u?T=t==="out"?l.Deno.stdout.isTerminal():l.Deno.stderr.isTerminal():"PM2_HOME"in r&&"pm_id"in r?T=!0:T=!!c[`std${t}`]?.isTTY,T&&Y.test(r.TERM)||"COLORTERM"in r?1:N},W=()=>_("out"),H=()=>_("err");function q({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const M=(t,e,i)=>e>t?e:Math.min(t,i),z=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,K=t=>{let[,e]=z.exec(t)??[];const i=e?e.length:0;if(i===3){const l=e.charAt(0),u=e.charAt(1),c=e.charAt(2);e=l+l+u+u+c+c}else if(i!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const o=Number.parseInt(e,16);return[o>>16&255,o>>8&255,o&255]},I=(t,e,i)=>t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(i/51),E=t=>{let e,i,o;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=i=o=((t-232)*10+8)/255;else{t-=16;const c=t%36;e=Math.floor(t/36)/5,i=Math.floor(c/6)/5,o=c%6/5}const l=Math.max(e,i,o)*2;if(l===0)return 30;const u=30+(Math.round(o)<<2|Math.round(i)<<1|Math.round(e));return l===2?u+60:u},y=(t,e,i)=>E(I(t,e,i)),f=39,b=49,C=10,B={close:"",open:""},v=t=>{const e=t>0?(n,g)=>({close:`\x1B[${String(g)}m`,open:`\x1B[${String(n)}m`}):()=>B,i=n=>(g,s,m)=>n(I(Number(g),Number(s),Number(m))),o=n=>g=>{const[s,m,S]=K(g);return n(s,m,S)};let l=n=>e(`38;5;${String(n)}`,f),u=n=>e(`48;5;${String(n)}`,b),c=(n,g,s)=>e(`38;2;${String(n)};${String(g)};${String(s)}`,f),p=(n,g,s)=>e(`48;2;${String(n)};${String(g)};${String(s)}`,b);t===1?(l=n=>e(E(Number(n)),f),u=n=>e(E(Number(n))+C,b),c=(n,g,s)=>e(y(Number(n),Number(g),Number(s)),f),p=(n,g,s)=>e(y(Number(n),Number(g),Number(s))+C,b)):t===2&&(c=i(l),p=i(u));const O={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),visible:B},a={bgBlack:e(40,b),bgBlackBright:e(100,b),bgBlue:e(44,b),bgBlueBright:e(104,b),bgCyan:e(46,b),bgCyanBright:e(106,b),bgGray:e(100,b),bgGreen:e(42,b),bgGreenBright:e(102,b),bgGrey:e(100,b),bgMagenta:e(45,b),bgMagentaBright:e(105,b),bgRed:e(41,b),bgRedBright:e(101,b),bgWhite:e(47,b),bgWhiteBright:e(107,b),bgYellow:e(43,b),bgYellowBright:e(103,b),black:e(30,f),blackBright:e(90,f),blue:e(34,f),blueBright:e(94,f),cyan:e(36,f),cyanBright:e(96,f),gray:e(90,f),green:e(32,f),greenBright:e(92,f),grey:e(90,f),magenta:e(35,f),magentaBright:e(95,f),red:e(31,f),redBright:e(91,f),white:e(37,f),whiteBright:e(97,f),yellow:e(33,f),yellowBright:e(93,f)},r={bg:n=>u(M(n,0,255)),bgHex:o(p),bgRgb:(n,g,s)=>p(M(n,0,255),M(g,0,255),M(s,0,255)),fg:n=>l(M(n,0,255)),hex:o(c),rgb:(n,g,s)=>c(M(n,0,255),M(g,0,255),M(s,0,255))};return{baseColors:a,baseStyles:O,styleMethods:r}},A=W(),J=H();v(A);const Q=(t,e,i)=>{if(e==="")return t;let o=t.indexOf(e);if(o<0)return t;const l=e.length;let u=0,c="";for(;~o;)c+=t.slice(u,o)+i,u=o+l,o=t.indexOf(e,u);return c+t.slice(u)},Z=(t,e,i)=>{if(t==null||t==="")return"";let o;if(t.raw===void 0?o=String(t):o=String.raw(t,...e),o.includes("\x1B"))for(let l=i;l;l=l.props)o=Q(o,l.close,l.open);return o.includes(`
2
+ `)&&(o=o.replace(/(\r*\n)/g,`${i.closeStack}$1${i.openStack}`)),i.openStack+o+i.closeStack},x=function(t){const e=t?.level??A,{baseColors:i,baseStyles:o,styleMethods:l}=v(e),u={};let c=null;const p=({props:a},{close:r,open:n})=>{const g=(a?.openStack??"")+n,s=r+(a?.closeStack??""),m=(S,...h)=>Z(S,h,m.props);return Object.setPrototypeOf(m,c),m.props={close:r,closeStack:s,open:n,openStack:g,props:a},m.open=g,m.close=s,m},O=a=>String(a);O.strip=a=>a.replaceAll(q(),"");for(const a in i)u[a]={get(){const r=p(this,i[a]);return Object.defineProperty(this,a,{value:r}),r}};for(const a in o)u[a]={get(){const r=p(this,o[a]);return Object.defineProperty(this,a,{value:r}),r}};for(const a in l)u[a]={get(){return(...r)=>p(this,l[a](...r))}};return u.ansi256=u.fg,u.bgAnsi256=u.bg,c=Object.defineProperties({},u),Object.setPrototypeOf(O,c),O},$=new x;new x({level:J});const X=$.bold,ee=$.cyan,te=$.dim,re=$.green,ne=$.inverse,oe=$.magenta,ie=$.red,se=$.underline,le=$.yellow;export{H as $,te as E,re as I,ne as O,oe as Q,ie as V,$ as a,se as e,X as j,ee as q,le as s,W as w};
@@ -1,2 +1,2 @@
1
- import{createRequire as A}from"node:module";import{e as W,_ as C,m as c,f as L,a as q}from"./index-DND6ptxQ.js";import{e as z}from"./en-BxrK-n-J.js";import{N as Q}from"./readJsonSync-BnWiH5-R-BpnwAB0Z.js";import{withEnhancedPath as et}from"@visulima/task-runner";let F;const N=t=>(F??=A(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[o,e]=d.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return d.getBuiltinModule(t)}return N(t)},{Socket:G}=l("node:net"),{randomBytes:V}=l("node:crypto"),{readdir:B,rm:k,unlink:v,open:Y,readFile:J,stat:K,writeFile:U,rename:X}=l("node:fs/promises"),{spawn:Z}=l("node:child_process"),{openSync:tt,closeSync:ot}=l("node:fs");async function $(t,o,e){const s=await W(t,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(s);const{beforeParse:r,color:n}={};return typeof r=="function"&&(i=r(i)),Q(i,o,C(t),{color:n})}const st=3e4,E=100;class it extends Error{constructor(o,e){super(o),this.elapsedMs=e,this.name="ServiceReadinessError"}elapsedMs}const rt=async t=>{const o=t.host??"127.0.0.1",{port:e}=t,s=t.timeoutMs??st,i=Date.now();for(;Date.now()-i<s;){if(await nt(o,e))return;await at(E)}throw new it(`Timed out waiting for ${o}:${String(e)} to accept TCP connections (${String(s)}ms)`,Date.now()-i)},nt=(t,o)=>new Promise(e=>{const s=new G,i=r=>{s.removeAllListeners(),s.destroy(),e(r)};s.once("connect",()=>{i(!0)}),s.once("error",()=>{i(!1)}),s.setTimeout(E,()=>{i(!1)});try{s.connect(o,t)}catch{i(!1)}}),at=t=>new Promise(o=>{setTimeout(o,t)}),ct=async(t,o)=>{const e=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});e&&await rt({host:e.tcp.host,port:e.tcp.port,timeoutMs:o?.timeoutMs??e.tcp.timeoutMs})},_=384,b=5e3,ht=50,dt=3e4,h=async t=>{const o=c(z(t),"services");try{await L(o)}catch(e){throw e.code==="ENOTDIR"?new Error(`Service registry path ${o} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:e}):e}return o},y=t=>t.replaceAll("/","_").replaceAll(":","__"),g=(t,o)=>c(t,`${y(o)}.json`),ft=(t,o)=>c(t,`${y(o)}.lock`),u=async(t,o)=>{const e=await h(t),s=g(e,o);if(await q(s))try{return await $(s)}catch{return}},lt=async t=>{const o=await h(t);let e;try{e=await B(o)}catch{return[]}const s=[];for(const i of e)if(i.endsWith(".json"))try{const r=await $(c(o,i));s.push(r)}catch{}return s},ut=async(t,o)=>{const e=await h(t),s=g(e,o.id),i=c(e,`.${V(8).toString("hex")}.tmp`);await U(i,`${JSON.stringify(o,void 0,2)}
1
+ import{createRequire as A}from"node:module";import{f as W,e as C,w as c,g as L,m as q}from"./index-uBVnF4ji.js";import{e as z}from"./en-D3CfXlO7.js";import{N as Q}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";import{withEnhancedPath as et}from"@visulima/task-runner";let F;const N=t=>(F??=A(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[o,e]=d.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return d.getBuiltinModule(t)}return N(t)},{Socket:G}=l("node:net"),{randomBytes:V}=l("node:crypto"),{readdir:B,rm:k,unlink:v,open:Y,readFile:J,stat:K,writeFile:U,rename:X}=l("node:fs/promises"),{spawn:Z}=l("node:child_process"),{openSync:tt,closeSync:ot}=l("node:fs");async function $(t,o,e){const s=await W(t,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(s);const{beforeParse:r,color:n}={};return typeof r=="function"&&(i=r(i)),Q(i,o,C(t),{color:n})}const st=3e4,E=100;class it extends Error{constructor(o,e){super(o),this.elapsedMs=e,this.name="ServiceReadinessError"}elapsedMs}const rt=async t=>{const o=t.host??"127.0.0.1",{port:e}=t,s=t.timeoutMs??st,i=Date.now();for(;Date.now()-i<s;){if(await nt(o,e))return;await at(E)}throw new it(`Timed out waiting for ${o}:${String(e)} to accept TCP connections (${String(s)}ms)`,Date.now()-i)},nt=(t,o)=>new Promise(e=>{const s=new G,i=r=>{s.removeAllListeners(),s.destroy(),e(r)};s.once("connect",()=>{i(!0)}),s.once("error",()=>{i(!1)}),s.setTimeout(E,()=>{i(!1)});try{s.connect(o,t)}catch{i(!1)}}),at=t=>new Promise(o=>{setTimeout(o,t)}),ct=async(t,o)=>{const e=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});e&&await rt({host:e.tcp.host,port:e.tcp.port,timeoutMs:o?.timeoutMs??e.tcp.timeoutMs})},_=384,b=5e3,ht=50,dt=3e4,h=async t=>{const o=c(z(t),"services");try{await L(o)}catch(e){throw e.code==="ENOTDIR"?new Error(`Service registry path ${o} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:e}):e}return o},y=t=>t.replaceAll("/","_").replaceAll(":","__"),g=(t,o)=>c(t,`${y(o)}.json`),ft=(t,o)=>c(t,`${y(o)}.lock`),u=async(t,o)=>{const e=await h(t),s=g(e,o);if(await q(s))try{return await $(s)}catch{return}},lt=async t=>{const o=await h(t);let e;try{e=await B(o)}catch{return[]}const s=[];for(const i of e)if(i.endsWith(".json"))try{const r=await $(c(o,i));s.push(r)}catch{}return s},ut=async(t,o)=>{const e=await h(t),s=g(e,o.id),i=c(e,`.${V(8).toString("hex")}.tmp`);await U(i,`${JSON.stringify(o,void 0,2)}
2
2
  `,{mode:_});try{await mt(i,s)}catch(r){throw await k(i,{force:!0}).catch(()=>{}),r}},pt=new Set(["EACCES","EBUSY","EPERM"]),wt=8,kt=20,mt=async(t,o)=>{let e=0;for(;;)try{await X(t,o);return}catch(s){const{code:i}=s;if(!(i!==void 0&&pt.has(i))||e>=wt)throw s;const r=kt*2**e;await new Promise(n=>{setTimeout(n,r)}),e+=1}},f=async(t,o,e)=>{const s=await h(t),i=e??await u(t,o);await k(g(s,o),{force:!0}),i&&await k(i.logFile,{force:!0}).catch(()=>{})},a=t=>{try{return process.kill(t,0),!0}catch{return!1}},jt=async t=>{const o=await lt(t),e=[],s=[];for(const i of o){if(a(i.pid)){s.push(i);continue}const r=await u(t,i.id);if(r&&r.pid!==i.pid){s.push(r);continue}await f(t,i.id,i).catch(()=>{}),e.push(i.id)}return{pruned:e,surviving:s}},_t=t=>new Promise(o=>{setTimeout(o,t)}),yt=async t=>{try{const o=await Y(t,"wx",_);try{await o.writeFile(String(process.pid))}finally{await o.close().catch(()=>{})}return!0}catch(o){if(o.code==="EEXIST")return!1;throw o}},gt=async t=>{let o;try{const e=await J(t,"utf8"),s=Number.parseInt(e.trim(),10);o=Number.isFinite(s)?s:void 0}catch{return!0}if(o!==void 0&&!a(o))return!0;try{const e=await K(t);return Date.now()-e.mtimeMs>dt}catch{return!0}},M=async(t,o,e)=>{const s=await h(t),i=ft(s,o),r=Date.now();for(;!await yt(i);){if(await gt(i)){await v(i).catch(()=>{});continue}if(Date.now()-r>=b)throw new Error(`Could not acquire service lock for ${o} within ${String(b)}ms — another \`vis service\` invocation appears to be holding it.`);await _t(ht)}try{return await e()}finally{await v(i).catch(()=>{})}};function m(t,o={},e){for(const s in t){const i=t[s],r=e?`${e}:${s}`:s;typeof i=="object"&&i!==null?m(i,o,r):typeof i=="function"&&(o[r]=i)}return o}const R=(()=>{if(console.createTask)return console.createTask;const t={run:o=>o()};return()=>t})();function T(t,o,e,s){for(let i=e;i<t.length;i+=1)try{const r=s?s.run(()=>t[i](...o)):t[i](...o);if(r&&typeof r.then=="function")return Promise.resolve(r).then(()=>T(t,o,i+1,s))}catch(r){return Promise.reject(r)}}function vt(t,o,e){if(t.length>0)return T(t,o,0,R(e))}function bt(t,o,e){if(t.length>0){const s=R(e);return Promise.all(t.map(i=>s.run(()=>i(...o))))}}function w(t,o){for(const e of[...t])e(o)}var St=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,o,e={}){if(!t||typeof o!="function")return()=>{};const s=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!e.allowDeprecated){let r=i.message;r||(r=`${s} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!o.name)try{Object.defineProperty(o,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(o),()=>{o&&(this.removeHook(t,o),o=void 0)}}hookOnce(t,o){let e,s=(...i)=>(typeof e=="function"&&e(),e=void 0,s=void 0,o(...i));return e=this.hook(t,s),e}removeHook(t,o){const e=this._hooks[t];if(e){const s=e.indexOf(o);s!==-1&&e.splice(s,1),e.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,o){this._deprecatedHooks[t]=typeof o=="string"?{to:o}:o;const e=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of e)this.hook(t,s)}deprecateHooks(t){for(const o in t)this.deprecateHook(o,t[o])}addHooks(t){const o=m(t),e=Object.keys(o).map(s=>this.hook(s,o[s]));return()=>{for(const s of e)s();e.length=0}}removeHooks(t){const o=m(t);for(const e in o)this.removeHook(e,o[e])}removeAllHooks(){this._hooks={}}callHook(t,...o){return this.callHookWith(vt,t,o)}callHookParallel(t,...o){return this.callHookWith(bt,t,o)}callHookWith(t,o,e){const s=this._before||this._after?{name:o,args:e,context:{}}:void 0;this._before&&w(this._before,s);const i=t(this._hooks[o]?[...this._hooks[o]]:[],e,o);return i instanceof Promise?i.finally(()=>{this._after&&s&&w(this._after,s)}):(this._after&&s&&w(this._after,s),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const o=this._before.indexOf(t);o!==-1&&this._before.splice(o,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const o=this._after.indexOf(t);o!==-1&&this._after.splice(o,1)}}}};function Ht(){return new St}const xt=()=>Ht(),Ot=async(t,o)=>{if(!(!o||o.length===0))for(const e of o){if(e.hooks)for(const[s,i]of Object.entries(e.hooks)){const r=Array.isArray(i)?i:[i];for(const n of r)t.hook(s,n)}e.setup&&await e.setup(t)}};class It{#e;#o;#s=new Map;constructor(o,e){this.#e=o,this.#o=e}startTasks(o){for(const e of o)this.#s.set(e.id,e),this.#t("task:before",e)}endTasks(o){for(const e of o)this.#s.delete(e.task.id),this.#t("task:after",e.task,e),e.status==="failure"?this.#t("task:failure",e.task,e):$t(e.status)&&this.#t("task:cacheHit",e.task,e)}printCacheMiss(o,e){this.#t("task:cacheMiss",o,e)}onTaskStdout(o,e){this.#t("task:stdout",o,e)}onTaskStderr(o,e){this.#t("task:stderr",o,e)}#t(o,...e){Promise.resolve(this.#e.callHook(o,...e)).catch(s=>{if(this.#o)try{this.#o(o,s)}catch{}})}}const $t=t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache",S=process.platform==="win32",Et=async t=>{const{command:o,cwd:e,env:s,logFile:i}=t,r=tt(i,"a",_);let n;const p=S?"cmd":"/bin/sh",j=S?["/d","/s","/c",o]:["-c",o];try{n=Z(p,j,{cwd:e,detached:!0,env:et({...process.env,...s},e),stdio:["ignore",r,r],windowsHide:!0})}finally{ot(r)}if(n.pid===void 0&&await new Promise((x,O)=>{n.once("spawn",()=>{x()}),n.once("error",I=>{O(I)})}),n.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${o}`);return n.unref(),{pid:n.pid}},P=5e3,At=async t=>M(t.workspaceRoot,t.id,async()=>{const o=await u(t.workspaceRoot,t.id);if(o&&a(o.pid))throw new Error(`Service ${t.id} is already running (pid ${String(o.pid)})`);o&&await f(t.workspaceRoot,t.id,o);const e=await h(t.workspaceRoot),s=y(t.id),i=c(e,`${s}.log`),{pid:r}=await Et({command:t.command,cwd:t.cwd,env:t.env,logFile:i}),n={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:i,pid:r,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await ut(t.workspaceRoot,n),t.skipReadiness!==!0)try{await ct(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(p){throw await D(r,t.config.killGracePeriodMs??P).catch(()=>{}),await f(t.workspaceRoot,t.id,n).catch(()=>{}),p}return{entry:n}}),Ft=async t=>M(t.workspaceRoot,t.id,async()=>{const o=await u(t.workspaceRoot,t.id);if(!o)return{stopped:!1};if(!a(o.pid))return await f(t.workspaceRoot,t.id,o),{stopped:!1};const e=t.graceMs??o.config.killGracePeriodMs??P;return await D(o.pid,e),await f(t.workspaceRoot,t.id,o),{stopped:!0}}),D=async(t,o)=>{H(t,"SIGTERM");const e=Date.now();for(;Date.now()-e<o;){if(!a(t))return;await new Promise(s=>{setTimeout(s,100)})}a(t)&&H(t,"SIGKILL")},H=(t,o)=>{try{process.platform==="win32"?process.kill(t,o):process.kill(-t,o)}catch(e){if(e.code==="ESRCH")return;throw e}};export{It as H,it as S,At as a,ct as b,lt as c,xt as d,Ot as e,f,a as i,jt as p,u as r,Ft as s};
@@ -1 +1 @@
1
- import{createRequire as f}from"node:module";import{m as c}from"./index-DND6ptxQ.js";let p;const k=e=>(p??=f(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[t,n]=a.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return a.getBuiltinModule(e)}return k(e)},{statSync:m,existsSync:d}=g("node:fs"),b={aube:["aube-lock.yaml"],bun:["bun.lock","bun.lockb"],npm:["npm-shrinkwrap.json","package-lock.json"],pnpm:["pnpm-lock.yaml"],yarn:["yarn.lock"]},y={aube:["node_modules/.aube-state","node_modules/.modules.yaml"],bun:["node_modules/.bun-tag"],npm:["node_modules/.package-lock.json"],pnpm:["node_modules/.modules.yaml","node_modules/.pnpm/lock.yaml"],yarn:["node_modules/.yarn-integrity","node_modules/.yarn-state.yml",".yarn/install-state.gz"]},_={ci:{aube:"aube ci",bun:"bun install --frozen-lockfile",npm:"npm ci",pnpm:"pnpm install --frozen-lockfile",yarn:"yarn install --immutable"},tty:{aube:"aube install",bun:"bun install",npm:"npm install",pnpm:"pnpm install",yarn:"yarn install"}},h=1e3,M=e=>{for(const[t,n]of Object.entries(b))for(const s of n)if(d(c(e,s)))return{lockfileFile:s,manager:t}},j=(e,t)=>{let n;for(const s of y[t]){const o=c(e,s);if(!d(o))continue;const{mtimeMs:i}=m(o);(!n||i>n.mtimeMs)&&(n={mtimeMs:i,path:s})}return n},C=(e,t={})=>{const n=M(e);if(!n)return{checked:!1};const{lockfileFile:s,manager:o}=n,i=m(c(e,s)).mtimeMs,l=j(e,o),u=_[t.inCi?"ci":"tty"][o],r={installMarkerMtimeMs:l?.mtimeMs,lockfileMtimeMs:i,lockfilePath:s,marker:l?.path,packageManager:o};return l?i>l.mtimeMs+h?{checked:!0,detail:r,failure:"stale-install",message:`${s} is newer than node_modules (${l.path}) — run \`${u}\` to sync.`}:{checked:!0,detail:r}:{checked:!0,detail:r,failure:"missing-install",message:`lockfile detected but node_modules looks uninitialised — run \`${u}\` before \`vis run\`.`}},v=(e,t,n,s={})=>{if(s.skip)return{checked:!1,shouldContinue:!0};const o=C(e,{inCi:t});if(!o.failure)return{...o,shouldContinue:!0};const i=`preflight: ${o.message??"lockfile drift detected"}`;return t&&!s.ciAsWarning?{...o,formattedMessage:i,shouldContinue:!1}:(n.warn(i),{...o,formattedMessage:i,shouldContinue:!0})};export{M as d,v as r};
1
+ import{createRequire as f}from"node:module";import{w as c}from"./index-uBVnF4ji.js";let p;const k=e=>(p??=f(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[t,n]=a.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return a.getBuiltinModule(e)}return k(e)},{statSync:m,existsSync:d}=g("node:fs"),b={aube:["aube-lock.yaml"],bun:["bun.lock","bun.lockb"],npm:["npm-shrinkwrap.json","package-lock.json"],pnpm:["pnpm-lock.yaml"],yarn:["yarn.lock"]},y={aube:["node_modules/.aube-state","node_modules/.modules.yaml"],bun:["node_modules/.bun-tag"],npm:["node_modules/.package-lock.json"],pnpm:["node_modules/.modules.yaml","node_modules/.pnpm/lock.yaml"],yarn:["node_modules/.yarn-integrity","node_modules/.yarn-state.yml",".yarn/install-state.gz"]},_={ci:{aube:"aube ci",bun:"bun install --frozen-lockfile",npm:"npm ci",pnpm:"pnpm install --frozen-lockfile",yarn:"yarn install --immutable"},tty:{aube:"aube install",bun:"bun install",npm:"npm install",pnpm:"pnpm install",yarn:"yarn install"}},h=1e3,M=e=>{for(const[t,n]of Object.entries(b))for(const s of n)if(d(c(e,s)))return{lockfileFile:s,manager:t}},j=(e,t)=>{let n;for(const s of y[t]){const o=c(e,s);if(!d(o))continue;const{mtimeMs:i}=m(o);(!n||i>n.mtimeMs)&&(n={mtimeMs:i,path:s})}return n},C=(e,t={})=>{const n=M(e);if(!n)return{checked:!1};const{lockfileFile:s,manager:o}=n,i=m(c(e,s)).mtimeMs,l=j(e,o),u=_[t.inCi?"ci":"tty"][o],r={installMarkerMtimeMs:l?.mtimeMs,lockfileMtimeMs:i,lockfilePath:s,marker:l?.path,packageManager:o};return l?i>l.mtimeMs+h?{checked:!0,detail:r,failure:"stale-install",message:`${s} is newer than node_modules (${l.path}) — run \`${u}\` to sync.`}:{checked:!0,detail:r}:{checked:!0,detail:r,failure:"missing-install",message:`lockfile detected but node_modules looks uninitialised — run \`${u}\` before \`vis run\`.`}},q=(e,t,n,s={})=>{if(s.skip)return{checked:!1,shouldContinue:!0};const o=C(e,{inCi:t});if(!o.failure)return{...o,shouldContinue:!0};const i=`preflight: ${o.message??"lockfile drift detected"}`;return t&&!s.ciAsWarning?{...o,formattedMessage:i,shouldContinue:!1}:(n.warn(i),{...o,formattedMessage:i,shouldContinue:!0})};export{M as d,q as r};
@@ -1 +1 @@
1
- import{createRequire as j}from"node:module";import{m as d,l as y}from"./index-DND6ptxQ.js";import{a as q}from"./readJsonSync-BnWiH5-R-BpnwAB0Z.js";let M;const b=i=>(M??=j(import.meta.url))(i),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=i=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[e,t]=f.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return f.getBuiltinModule(i)}return b(i)},{readdirSync:g,lstatSync:S}=$("node:fs"),A=/^([^<(]+?)?(?:<([^>]+)>)?\s*(?:\(([^)]+)\))?\s*$/u,w=i=>{const e=i.match(A);if(!e)return;const t=e[1]?.trim(),n=e[2]?.trim(),r=e[3]?.trim();if(!(!t&&!n&&!r))return{email:n||void 0,name:t||void 0,url:r||void 0}},R=i=>{if(!Array.isArray(i)||i.length===0)return;const e=[];for(const t of i)if(typeof t=="string"){const n=w(t);n&&e.push(n)}else if(t&&typeof t=="object"){const n=t,r=typeof n.name=="string"?n.name:void 0,o=typeof n.email=="string"?n.email:void 0,u=typeof n.url=="string"?n.url:void 0;(r||o||u)&&e.push({email:o,name:r,url:u})}return e.length>0?e:void 0},D=i=>{const e=d(i,"node_modules");if(!y(e))return new Map;const t=new Map,n=new Set,r=(o,u="")=>{if(n.has(o))return;n.add(o);let _;try{_=g(o)}catch{return}for(const a of _){const c=d(o,a);let m;try{m=S(c)}catch{continue}if(m.isSymbolicLink())continue;if(a.startsWith("@")){m.isDirectory()&&r(c,`${a}/`);continue}if(a===".pnpm"&&u===""){let s;try{s=g(c)}catch{continue}for(const p of s){const l=d(c,p,"node_modules");y(l)&&r(l)}continue}if(a.startsWith(".")||!m.isDirectory())continue;const h=u+a,v=d(c,"package.json");try{if(!y(v))continue;const s=q(v);if(typeof s.version!="string")continue;const p=`${h}@${s.version}`;t.has(p)||t.set(p,{directory:c,license:s.license,licenses:Array.isArray(s.licenses)?s.licenses:void 0,maintainers:R(s.maintainers),name:h,scripts:s.scripts&&typeof s.scripts=="object"?s.scripts:void 0,version:s.version});const l=d(c,"node_modules");y(l)&&r(l)}catch{}}};return r(e),t};export{R as n,D as r};
1
+ import{createRequire as j}from"node:module";import{w as d,l as y}from"./index-uBVnF4ji.js";import{a as S}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let M;const b=i=>(M??=j(import.meta.url))(i),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=i=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[e,t]=f.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return f.getBuiltinModule(i)}return b(i)},{readdirSync:g,lstatSync:w}=$("node:fs"),q=/^([^<(]+?)?(?:<([^>]+)>)?\s*(?:\(([^)]+)\))?\s*$/u,A=i=>{const e=i.match(q);if(!e)return;const t=e[1]?.trim(),n=e[2]?.trim(),r=e[3]?.trim();if(!(!t&&!n&&!r))return{email:n||void 0,name:t||void 0,url:r||void 0}},R=i=>{if(!Array.isArray(i)||i.length===0)return;const e=[];for(const t of i)if(typeof t=="string"){const n=A(t);n&&e.push(n)}else if(t&&typeof t=="object"){const n=t,r=typeof n.name=="string"?n.name:void 0,o=typeof n.email=="string"?n.email:void 0,u=typeof n.url=="string"?n.url:void 0;(r||o||u)&&e.push({email:o,name:r,url:u})}return e.length>0?e:void 0},D=i=>{const e=d(i,"node_modules");if(!y(e))return new Map;const t=new Map,n=new Set,r=(o,u="")=>{if(n.has(o))return;n.add(o);let _;try{_=g(o)}catch{return}for(const a of _){const c=d(o,a);let p;try{p=w(c)}catch{continue}if(p.isSymbolicLink())continue;if(a.startsWith("@")){p.isDirectory()&&r(c,`${a}/`);continue}if(a===".pnpm"&&u===""){let s;try{s=g(c)}catch{continue}for(const m of s){const l=d(c,m,"node_modules");y(l)&&r(l)}continue}if(a.startsWith(".")||!p.isDirectory())continue;const h=u+a,v=d(c,"package.json");try{if(!y(v))continue;const s=S(v);if(typeof s.version!="string")continue;const m=`${h}@${s.version}`;t.has(m)||t.set(m,{directory:c,license:s.license,licenses:Array.isArray(s.licenses)?s.licenses:void 0,maintainers:R(s.maintainers),name:h,scripts:s.scripts&&typeof s.scripts=="object"?s.scripts:void 0,version:s.version});const l=d(c,"node_modules");y(l)&&r(l)}catch{}}};return r(e),t};export{R as n,D as r};
@@ -1,4 +1,4 @@
1
- import{m as d,l as u,z as o,q as $}from"./index-DND6ptxQ.js";import{a as k}from"../packem_chunks/cli-main.js";const E=(x,g,h,m=[])=>{const t=[];if(h===void 0)return t.push("minimumReleaseAge not set in vis.config; skipping native sync."),t;const l=Number.isFinite(h)?Math.max(0,Math.round(h)):0;switch(x){case"bun":{const n=d(g,"bunfig.toml");let e=u(n)?o(n):"";const a=l*60,i=`minimumReleaseAge = ${String(a)}`,s=m.length>0?`minimumReleaseAgeExcludes = [${m.map(p=>`"${p.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,c=/^\[install\][ \t]*\n/m.exec(e);if(c?.index===void 0){const p=s?`${i}
1
+ import{w as d,l as u,z as o,j as $}from"./index-uBVnF4ji.js";import{a as k}from"../packem_chunks/cli-main.js";const E=(x,g,h,m=[])=>{const t=[];if(h===void 0)return t.push("minimumReleaseAge not set in vis.config; skipping native sync."),t;const l=Number.isFinite(h)?Math.max(0,Math.round(h)):0;switch(x){case"bun":{const n=d(g,"bunfig.toml");let e=u(n)?o(n):"";const a=l*60,i=`minimumReleaseAge = ${String(a)}`,s=m.length>0?`minimumReleaseAgeExcludes = [${m.map(p=>`"${p.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,c=/^\[install\][ \t]*\n/m.exec(e);if(c?.index===void 0){const p=s?`${i}
2
2
  ${s}`:i;e=`${e.trimEnd()?`${e.trimEnd()}
3
3
 
4
4
  `:""}[install]
@@ -0,0 +1 @@
1
+ import{l as a,w as h,P as o,c as f}from"./index-uBVnF4ji.js";import{x as m,P as $}from"../packem_chunks/catalog.js";const g=/\/+$/,p=/node_modules/,u=/\.git/,k=/[$()+.?[\\\]^{|}]/g,P=/\/\*\*$|\/\*\/\*$/,S=(i,c)=>{const e=c.replace(g,"");if(e.startsWith("!"))return[];const n=[];if(e.endsWith("/*")){const s=e.slice(0,-2),t=o(i,s);if(!a(t))return[];for(const r of f(t,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[p,u]}))r.path===t||r.name.startsWith(".")||n.push(h(s,r.name));return n}if(e.endsWith("/**")||e.endsWith("/*/*")){const s=e.replace(P,""),t=o(i,s);if(!a(t))return[];for(const r of f(t,{includeFiles:!1,includeSymlinks:!1,skip:[p,u]})){if(r.path===t)continue;const d=r.path.slice(t.length+1);n.push(`${s}/${d}`)}return n}if(!e.includes("/")&&e.includes("*")){const s=e.replaceAll(k,String.raw`\$&`).replaceAll("*",".*"),t=new RegExp(`^${s}$`);for(const r of f(i,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[p,u]}))r.path!==i&&t.test(r.name)&&n.push(r.name);return n}const l=o(i,e);return a(l)&&n.push(e),n},W=i=>{const c=m(i)??$(i)??[],e=new Set,n=[];for(const l of c)for(const s of S(i,l))s==="."||e.has(s)||(e.add(s),a(h(i,s,"package.json"))||n.push({packageDir:s}));return n};export{W as l};
@@ -1,7 +1,7 @@
1
- import{m as c,z as $,q as i,l as y,u as O}from"./index-DND6ptxQ.js";import"./public-api-WqUCiyIe.js";import{n as C}from"../packem_chunks/cli-main.js";import{a as D}from"./readJsonSync-BnWiH5-R-BpnwAB0Z.js";const W=(E,a,o)=>{const s=[],f=Object.entries(o).filter(([,n])=>n).map(([n])=>n);switch(E){case"bun":{const n=c(a,"package.json");if(y(n))try{const e=D(n);e.trustedDependencies=f,i(n,`${JSON.stringify(e,null,2)}
1
+ import{w as c,z as $,j as i,l as y,u as O}from"./index-uBVnF4ji.js";import"./public-api-WqUCiyIe.js";import{n as C}from"../packem_chunks/cli-main.js";import{a as D}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";const W=(E,a,o)=>{const s=[],f=Object.entries(o).filter(([,n])=>n).map(([n])=>n);switch(E){case"bun":{const n=c(a,"package.json");if(y(n))try{const e=D(n);e.trustedDependencies=f,i(n,`${JSON.stringify(e,null,2)}
2
2
  `),s.push(`Updated package.json trustedDependencies with ${f.length} packages`)}catch(e){s.push(`Failed to update package.json: ${e instanceof Error?e.message:String(e)}`)}break}case"npm":{const n=c(a,".npmrc");let e=y(n)?$(n):"";/^\s*ignore-scripts\s*=\s*true\s*$/m.test(e)?s.push(".npmrc already has ignore-scripts=true"):(e=`${e.trimEnd()}
3
3
  ignore-scripts=true
4
- `,i(n,e),s.push("Added ignore-scripts=true to .npmrc"));break}case"pnpm":{const n=c(a,"pnpm-workspace.yaml");if(!y(n)){s.push("pnpm-workspace.yaml not found. Cannot sync allowBuilds.");break}let e={},m=[];try{const t=O(n);e=t?.allowBuilds??{},m=Array.isArray(t?.onlyBuiltDependencies)?t.onlyBuiltDependencies:[]}catch{}const g={...e,...o},j=Object.keys(o).filter(t=>e[t]!==o[t]).length,d=f.toSorted((t,p)=>t.localeCompare(p)),k=[...new Set([...m,...d])].toSorted((t,p)=>t.localeCompare(p)),b=d.filter(t=>!m.includes(t)).length;if(j===0&&b===0)s.push(`All ${String(Object.keys(o).length)} allowBuilds entries already present in pnpm-workspace.yaml.`);else{const t=Object.keys(g).sort(),p=l=>l.startsWith("@")||l.includes("/")||/[:#\s]/.test(l),h=l=>p(l)?`'${l.replaceAll("'","''")}'`:l,u=`allowBuilds:
4
+ `,i(n,e),s.push("Added ignore-scripts=true to .npmrc"));break}case"pnpm":{const n=c(a,"pnpm-workspace.yaml");if(!y(n)){s.push("pnpm-workspace.yaml not found. Cannot sync allowBuilds.");break}let e={},m=[];try{const t=O(n);e=t?.allowBuilds??{},m=Array.isArray(t?.onlyBuiltDependencies)?t.onlyBuiltDependencies:[]}catch{}const g={...e,...o},j=Object.keys(o).filter(t=>e[t]!==o[t]).length,d=f.toSorted((t,p)=>t.localeCompare(p)),k=[...new Set([...m,...d])].toSorted((t,p)=>t.localeCompare(p)),w=d.filter(t=>!m.includes(t)).length;if(j===0&&w===0)s.push(`All ${String(Object.keys(o).length)} allowBuilds entries already present in pnpm-workspace.yaml.`);else{const t=Object.keys(g).sort(),p=l=>l.startsWith("@")||l.includes("/")||/[:#\s]/.test(l),h=l=>p(l)?`'${l.replaceAll("'","''")}'`:l,u=`allowBuilds:
5
5
  ${t.map(l=>` ${h(l)}: ${String(g[l])}`).join(`
6
6
  `)}
7
7
  `;let r=$(n);r.endsWith(`
@@ -13,7 +13,7 @@ ${k.map(B=>` - ${p(B)?`'${B.replaceAll("'","''")}'`:B}`).join(`
13
13
  `)}
14
14
  `,A=/^onlyBuiltDependencies:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;r=A.test(r)?r.replace(A,l):`${r.trimEnd()}
15
15
 
16
- ${l}`}i(n,r),s.push(`Updated pnpm-workspace.yaml allowBuilds (${String(j)} new, ${String(t.length)} total)`),b>0&&s.push(`Updated pnpm-workspace.yaml onlyBuiltDependencies (${String(b)} new, ${String(k.length)} total)`)}const w=c(a,"package.json");if(y(w)&&d.length>0)try{const t=D(w),p=Array.isArray(t.pnpm?.onlyBuiltDependencies)?t.pnpm.onlyBuiltDependencies:[],h=[...new Set([...p,...d])].toSorted((r,S)=>r.localeCompare(S)),u=d.filter(r=>!p.includes(r)).length;u>0&&(t.pnpm={...t.pnpm,onlyBuiltDependencies:h},i(w,`${JSON.stringify(t,null,2)}
16
+ ${l}`}i(n,r),s.push(`Updated pnpm-workspace.yaml allowBuilds (${String(j)} new, ${String(t.length)} total)`),w>0&&s.push(`Updated pnpm-workspace.yaml onlyBuiltDependencies (${String(w)} new, ${String(k.length)} total)`)}const b=c(a,"package.json");if(y(b)&&d.length>0)try{const t=D(b),p=Array.isArray(t.pnpm?.onlyBuiltDependencies)?t.pnpm.onlyBuiltDependencies:[],h=[...new Set([...p,...d])].toSorted((r,S)=>r.localeCompare(S)),u=d.filter(r=>!p.includes(r)).length;u>0&&(t.pnpm={...t.pnpm,onlyBuiltDependencies:h},i(b,`${JSON.stringify(t,null,2)}
17
17
  `),s.push(`Updated package.json pnpm.onlyBuiltDependencies (${String(u)} new, ${String(h.length)} total)`))}catch(t){s.push(`Failed to update package.json pnpm.onlyBuiltDependencies: ${t instanceof Error?t.message:String(t)}`)}break}case"yarn":{if(C(a)){const n=c(a,".yarnrc.yml");let e=$(n);const m=/^\s*enableScripts\s*:/m.test(e),g=/^\s*enableScripts\s*:\s*false\s*$/m.test(e);m?g?s.push(".yarnrc.yml already has enableScripts: false"):(e=e.replace(/^\s*enableScripts\s*:.+$/m,"enableScripts: false"),i(n,e),s.push("Changed enableScripts to false in .yarnrc.yml")):(e=`${e.trimEnd()}
18
18
  enableScripts: false
19
19
  `,i(n,e),s.push("Added enableScripts: false to .yarnrc.yml"))}else{const n=c(a,".npmrc");let e=y(n)?$(n):"";/^\s*ignore-scripts\s*=\s*true\s*$/m.test(e)?s.push(".npmrc already has ignore-scripts=true"):(e=`${e.trimEnd()}
@@ -1,2 +1,2 @@
1
- import{createRequire as j}from"node:module";import{k as W}from"./target-merge-b7bE1AEx.js";import{osvBloomDecode as J,osvBloomProbeBatch as z,NATIVE_BINDING_VERSION as D}from"#native";let C;const U=e=>(C??=j(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[o,t]=h.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return h.getBuiltinModule(e)}return U(e)},{createHash:V,randomUUID:F}=p("node:crypto"),{existsSync:g}=p("node:fs"),{readFile:O,mkdir:M,stat:B,writeFile:H,rename:G,unlink:q}=p("node:fs/promises"),{join:d,dirname:P}=p("node:path"),I=6;if(D!==I)throw new Error(`vis native binding ABI mismatch in osv-bloom: expected ${I}, got ${D}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const rt="https://endevco.github.io/osv-bloom",K=new Set(["endevco.github.io"]);class w extends Error{cause="OSV_BLOOM_SOURCE_NOT_ALLOWED";constructor(o){super(`osv-bloom source host '${o}' is not in the built-in allowlist. Add it to \`security.audit.advisories.bloom.allowedHosts\` if intentional.`),this.name="OsvBloomSourceNotAllowedError"}}class _ extends Error{cause="OSV_BLOOM_NETWORK";constructor(o,t){super(`osv-bloom fetch failed for ${o}: ${t}. Check connectivity, proxy env vars, or --source.`),this.name="OsvBloomNetworkError"}}class Y extends Error{cause="OSV_BLOOM_INTEGRITY";constructor(o,t){super(`osv-bloom filter.bin sha256 mismatch (expected ${o}, got ${t}). Refusing to install a corrupted filter.`),this.name="OsvBloomIntegrityError"}}class m extends Error{cause="OSV_BLOOM_MANIFEST";constructor(o){super(`osv-bloom manifest invalid: ${o}`),this.name="OsvBloomManifestError"}}class Q extends Error{cause="OSV_BLOOM_CACHE_MISS";constructor(o){super(`No osv-bloom cache at ${o}. Run 'vis advisories bloom sync' first.`),this.name="OsvBloomCacheMissError"}}const y=e=>{const o=W("vis",{create:!0,cwd:e})??d(e,"node_modules",".cache","vis");return d(o,"osv-bloom")},l=e=>d(e,"filter.bin"),R=e=>d(e,"manifest.json"),x=e=>d(e,"state.json"),X=(e,o)=>{let t;try{t=new URL(e)}catch{throw new w(e)}if(!t.host)throw new w(e);if(t.protocol!=="https:")throw new w(`${t.protocol}//${t.host}`);if(!new Set([...K,...o??[]]).has(t.host))throw new w(t.host);return t},it=async e=>{const o=Date.now(),t=e.cacheDir??y(e.workspaceRoot);await M(t,{recursive:!0});const s=X(e.source,e.allowedHosts),i=new URL("manifest.json",N(s.toString())),r=new URL("filter.bin",N(s.toString())),n=await A(i,{method:"GET"});if(!n.ok)throw new _(i.toString(),n.status);const v=await n.text(),a=k(v),f=await L(t);if(!e.force&&f?.setDigestSha256===a.setDigestSha256&&g(l(t)))return{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!0};const S={};!e.force&&f?.filterEtag&&(S.headers={"if-none-match":f.filterEtag});const u=await A(r,{...S,method:"GET"});if(u.status===304&&f&&g(l(t)))return await $(t,v,{fetchedAtIso:new Date().toISOString(),filterEtag:f.filterEtag,setDigestSha256:a.setDigestSha256}),{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!0};if(!u.ok||!u.body)throw new _(r.toString(),u.status);const c=Buffer.from(await u.arrayBuffer());e.onProgress&&e.onProgress(c.length,c.length);const E=Z(c);if(E!==a.filterSha256)throw new Y(a.filterSha256,E);if(c.length!==a.bloomByteLen)throw new m(`filter.bin length ${c.length} does not match manifest.bloom_byte_len ${a.bloomByteLen}`);const T=u.headers.get("etag")??void 0;return await b(l(t),c),await $(t,v,{fetchedAtIso:new Date().toISOString(),filterEtag:T,setDigestSha256:a.setDigestSha256}),{bytesOnDisk:c.length,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!1}},nt=async(e,o)=>{const t=o?.cacheDir??y(e),s=l(t);if(!g(s)){if(o?.softFail)return null;throw new Q(t)}const i=await O(s);return J(i)},at=(e,o)=>z(e,o),ct=async(e,o)=>{const t=o??y(e);if(!g(l(t)))return{cacheDir:t,present:!1};let s,i;try{s=k(await O(R(t),"utf8"))}catch{}try{i=await L(t)}catch{}return{cacheDir:t,fetchedAtIso:i?.fetchedAtIso,manifest:s,present:!0}},k=e=>{let o;try{o=JSON.parse(e)}catch(r){throw new m(r instanceof Error?r.message:String(r))}const t=r=>{const n=o[r];if(typeof n!="number"||Number.isNaN(n))throw new m(`field '${r}' missing or non-numeric`);return n},s=r=>{const n=o[r];if(typeof n!="string"||n.length===0)throw new m(`field '${r}' missing or empty`);return n},i=t("format_version");if(i!==1)throw new m(`unsupported format_version ${i} (this build expects v1)`);return{advisoryCount:t("advisory_count"),bloomByteLen:t("bloom_byte_len"),bloomKHashes:t("bloom_k_hashes"),bloomMBits:t("bloom_m_bits"),builtAtRfc3339:s("built_at_rfc3339"),builtAtUnix:t("built_at_unix"),entryCount:t("entry_count"),filterSha256:s("filter_sha256"),formatVersion:i,setDigestSha256:s("set_digest_sha256"),sourceUrl:s("source_url"),targetFpr:t("target_fpr")}},L=async e=>{try{const o=await O(x(e),"utf8"),t=JSON.parse(o);return typeof t.setDigestSha256!="string"||typeof t.fetchedAtIso!="string"?void 0:{fetchedAtIso:t.fetchedAtIso,filterEtag:typeof t.filterEtag=="string"?t.filterEtag:void 0,setDigestSha256:t.setDigestSha256}}catch{return}},$=async(e,o,t)=>{await b(R(e),Buffer.from(o,"utf8")),await b(x(e),Buffer.from(`${JSON.stringify(t,void 0,2)}
2
- `,"utf8"))},b=async(e,o)=>{await M(P(e),{recursive:!0});const t=`${e}.${process.pid}.${F()}.tmp`;try{await H(t,o),await G(t,e)}catch(s){throw await q(t).catch(()=>{}),s}},Z=e=>V("sha256").update(e).digest("hex"),N=e=>e.endsWith("/")?e:`${e}/`,tt=3e4,A=async(e,o)=>{try{return await fetch(e,{...o,signal:AbortSignal.timeout(tt)})}catch(t){throw new _(e.toString(),t instanceof Error?t.message:String(t))}};export{rt as D,Q as O,ct as g,nt as l,at as p,it as s};
1
+ import{createRequire as j}from"node:module";import{F as W}from"./target-merge-Cfy7c__2.js";import{osvBloomDecode as J,osvBloomProbeBatch as z,NATIVE_BINDING_VERSION as D}from"#native";let C;const U=e=>(C??=j(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[o,t]=h.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return h.getBuiltinModule(e)}return U(e)},{createHash:F,randomUUID:V}=p("node:crypto"),{existsSync:g}=p("node:fs"),{readFile:O,mkdir:M,stat:B,writeFile:H,rename:G,unlink:q}=p("node:fs/promises"),{join:d,dirname:P}=p("node:path"),I=6;if(D!==I)throw new Error(`vis native binding ABI mismatch in osv-bloom: expected ${I}, got ${D}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const rt="https://endevco.github.io/osv-bloom",K=new Set(["endevco.github.io"]);class w extends Error{cause="OSV_BLOOM_SOURCE_NOT_ALLOWED";constructor(o){super(`osv-bloom source host '${o}' is not in the built-in allowlist. Add it to \`security.audit.advisories.bloom.allowedHosts\` if intentional.`),this.name="OsvBloomSourceNotAllowedError"}}class _ extends Error{cause="OSV_BLOOM_NETWORK";constructor(o,t){super(`osv-bloom fetch failed for ${o}: ${t}. Check connectivity, proxy env vars, or --source.`),this.name="OsvBloomNetworkError"}}class Y extends Error{cause="OSV_BLOOM_INTEGRITY";constructor(o,t){super(`osv-bloom filter.bin sha256 mismatch (expected ${o}, got ${t}). Refusing to install a corrupted filter.`),this.name="OsvBloomIntegrityError"}}class m extends Error{cause="OSV_BLOOM_MANIFEST";constructor(o){super(`osv-bloom manifest invalid: ${o}`),this.name="OsvBloomManifestError"}}class Q extends Error{cause="OSV_BLOOM_CACHE_MISS";constructor(o){super(`No osv-bloom cache at ${o}. Run 'vis advisories bloom sync' first.`),this.name="OsvBloomCacheMissError"}}const y=e=>{const o=W("vis",{create:!0,cwd:e})??d(e,"node_modules",".cache","vis");return d(o,"osv-bloom")},l=e=>d(e,"filter.bin"),R=e=>d(e,"manifest.json"),x=e=>d(e,"state.json"),X=(e,o)=>{let t;try{t=new URL(e)}catch{throw new w(e)}if(!t.host)throw new w(e);if(t.protocol!=="https:")throw new w(`${t.protocol}//${t.host}`);if(!new Set([...K,...o??[]]).has(t.host))throw new w(t.host);return t},it=async e=>{const o=Date.now(),t=e.cacheDir??y(e.workspaceRoot);await M(t,{recursive:!0});const s=X(e.source,e.allowedHosts),i=new URL("manifest.json",N(s.toString())),r=new URL("filter.bin",N(s.toString())),n=await A(i,{method:"GET"});if(!n.ok)throw new _(i.toString(),n.status);const v=await n.text(),a=L(v),f=await T(t);if(!e.force&&f?.setDigestSha256===a.setDigestSha256&&g(l(t)))return{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!0};const S={};!e.force&&f?.filterEtag&&(S.headers={"if-none-match":f.filterEtag});const u=await A(r,{...S,method:"GET"});if(u.status===304&&f&&g(l(t)))return await $(t,v,{fetchedAtIso:new Date().toISOString(),filterEtag:f.filterEtag,setDigestSha256:a.setDigestSha256}),{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!0};if(!u.ok||!u.body)throw new _(r.toString(),u.status);const c=Buffer.from(await u.arrayBuffer());e.onProgress&&e.onProgress(c.length,c.length);const E=Z(c);if(E!==a.filterSha256)throw new Y(a.filterSha256,E);if(c.length!==a.bloomByteLen)throw new m(`filter.bin length ${c.length} does not match manifest.bloom_byte_len ${a.bloomByteLen}`);const k=u.headers.get("etag")??void 0;return await b(l(t),c),await $(t,v,{fetchedAtIso:new Date().toISOString(),filterEtag:k,setDigestSha256:a.setDigestSha256}),{bytesOnDisk:c.length,cacheDir:t,durationMs:Date.now()-o,manifest:a,upToDate:!1}},nt=async(e,o)=>{const t=o?.cacheDir??y(e),s=l(t);if(!g(s)){if(o?.softFail)return null;throw new Q(t)}const i=await O(s);return J(i)},at=(e,o)=>z(e,o),ct=async(e,o)=>{const t=o??y(e);if(!g(l(t)))return{cacheDir:t,present:!1};let s,i;try{s=L(await O(R(t),"utf8"))}catch{}try{i=await T(t)}catch{}return{cacheDir:t,fetchedAtIso:i?.fetchedAtIso,manifest:s,present:!0}},L=e=>{let o;try{o=JSON.parse(e)}catch(r){throw new m(r instanceof Error?r.message:String(r))}const t=r=>{const n=o[r];if(typeof n!="number"||Number.isNaN(n))throw new m(`field '${r}' missing or non-numeric`);return n},s=r=>{const n=o[r];if(typeof n!="string"||n.length===0)throw new m(`field '${r}' missing or empty`);return n},i=t("format_version");if(i!==1)throw new m(`unsupported format_version ${i} (this build expects v1)`);return{advisoryCount:t("advisory_count"),bloomByteLen:t("bloom_byte_len"),bloomKHashes:t("bloom_k_hashes"),bloomMBits:t("bloom_m_bits"),builtAtRfc3339:s("built_at_rfc3339"),builtAtUnix:t("built_at_unix"),entryCount:t("entry_count"),filterSha256:s("filter_sha256"),formatVersion:i,setDigestSha256:s("set_digest_sha256"),sourceUrl:s("source_url"),targetFpr:t("target_fpr")}},T=async e=>{try{const o=await O(x(e),"utf8"),t=JSON.parse(o);return typeof t.setDigestSha256!="string"||typeof t.fetchedAtIso!="string"?void 0:{fetchedAtIso:t.fetchedAtIso,filterEtag:typeof t.filterEtag=="string"?t.filterEtag:void 0,setDigestSha256:t.setDigestSha256}}catch{return}},$=async(e,o,t)=>{await b(R(e),Buffer.from(o,"utf8")),await b(x(e),Buffer.from(`${JSON.stringify(t,void 0,2)}
2
+ `,"utf8"))},b=async(e,o)=>{await M(P(e),{recursive:!0});const t=`${e}.${process.pid}.${V()}.tmp`;try{await H(t,o),await G(t,e)}catch(s){throw await q(t).catch(()=>{}),s}},Z=e=>F("sha256").update(e).digest("hex"),N=e=>e.endsWith("/")?e:`${e}/`,tt=3e4,A=async(e,o)=>{try{return await fetch(e,{...o,signal:AbortSignal.timeout(tt)})}catch(t){throw new _(e.toString(),t instanceof Error?t.message:String(t))}};export{rt as D,Q as O,ct as g,nt as l,at as p,it as s};