@visulima/vis 2.0.0 → 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 (220) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE.md +862 -170
  3. package/README.md +1 -1
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +2 -2
  6. package/dist/config/index.d.ts +1817 -1811
  7. package/dist/generate/index.d.ts +39 -39
  8. package/dist/packem_chunks/CONFIG_FILES.js +5 -5
  9. package/dist/packem_chunks/bloom-status.js +1 -1
  10. package/dist/packem_chunks/bloom-sync.js +1 -1
  11. package/dist/packem_chunks/cache-attestation.js +1 -1
  12. package/dist/packem_chunks/catalog.js +69 -67
  13. package/dist/packem_chunks/cli-exec.js +1 -1
  14. package/dist/packem_chunks/cli-main.js +150 -145
  15. package/dist/packem_chunks/detect.js +3 -3
  16. package/dist/packem_chunks/detect2.js +4 -4
  17. package/dist/packem_chunks/dispatch.js +3 -3
  18. package/dist/packem_chunks/doctor-probe.js +1 -1
  19. package/dist/packem_chunks/extra-files.js +3 -3
  20. package/dist/packem_chunks/fix.js +9 -9
  21. package/dist/packem_chunks/handler.js +1 -1
  22. package/dist/packem_chunks/handler10.js +5 -5
  23. package/dist/packem_chunks/handler11.js +1 -1
  24. package/dist/packem_chunks/handler12.js +6 -6
  25. package/dist/packem_chunks/handler13.js +1 -1
  26. package/dist/packem_chunks/handler14.js +1 -1
  27. package/dist/packem_chunks/handler15.js +1 -1
  28. package/dist/packem_chunks/handler16.js +1 -1
  29. package/dist/packem_chunks/handler17.js +1 -1
  30. package/dist/packem_chunks/handler18.js +1 -1
  31. package/dist/packem_chunks/handler19.js +1 -1
  32. package/dist/packem_chunks/handler2.js +1 -1
  33. package/dist/packem_chunks/handler20.js +2 -2
  34. package/dist/packem_chunks/handler21.js +2 -2
  35. package/dist/packem_chunks/handler22.js +10 -10
  36. package/dist/packem_chunks/handler23.js +1 -1
  37. package/dist/packem_chunks/handler24.js +1 -1
  38. package/dist/packem_chunks/handler25.js +1 -1
  39. package/dist/packem_chunks/handler26.js +5 -5
  40. package/dist/packem_chunks/handler27.js +1 -1
  41. package/dist/packem_chunks/handler28.js +3 -3
  42. package/dist/packem_chunks/handler29.js +1 -1
  43. package/dist/packem_chunks/handler3.js +2 -3
  44. package/dist/packem_chunks/handler30.js +1 -1
  45. package/dist/packem_chunks/handler31.js +2 -2
  46. package/dist/packem_chunks/handler35.js +3 -3
  47. package/dist/packem_chunks/handler4.js +4 -4
  48. package/dist/packem_chunks/handler40.js +10 -10
  49. package/dist/packem_chunks/handler42.js +3 -3
  50. package/dist/packem_chunks/handler43.js +3 -3
  51. package/dist/packem_chunks/handler5.js +5 -5
  52. package/dist/packem_chunks/handler50.js +5 -5
  53. package/dist/packem_chunks/handler51.js +13 -13
  54. package/dist/packem_chunks/handler52.js +3 -3
  55. package/dist/packem_chunks/handler53.js +1 -1
  56. package/dist/packem_chunks/handler54.js +2 -2
  57. package/dist/packem_chunks/handler55.js +1 -1
  58. package/dist/packem_chunks/handler57.js +5 -5
  59. package/dist/packem_chunks/handler58.js +4 -4
  60. package/dist/packem_chunks/handler59.js +8 -8
  61. package/dist/packem_chunks/handler6.js +7 -7
  62. package/dist/packem_chunks/handler60.js +2 -2
  63. package/dist/packem_chunks/handler61.js +13 -13
  64. package/dist/packem_chunks/handler62.js +4 -4
  65. package/dist/packem_chunks/handler63.js +3 -3
  66. package/dist/packem_chunks/handler64.js +4 -4
  67. package/dist/packem_chunks/handler65.js +6 -6
  68. package/dist/packem_chunks/handler66.js +2 -2
  69. package/dist/packem_chunks/handler67.js +9 -9
  70. package/dist/packem_chunks/handler68.js +7 -7
  71. package/dist/packem_chunks/handler69.js +24 -24
  72. package/dist/packem_chunks/handler7.js +1 -1
  73. package/dist/packem_chunks/handler70.js +6 -6
  74. package/dist/packem_chunks/handler71.js +14 -14
  75. package/dist/packem_chunks/handler72.js +47 -47
  76. package/dist/packem_chunks/handler73.js +9 -9
  77. package/dist/packem_chunks/handler74.js +27 -27
  78. package/dist/packem_chunks/handler75.js +3 -3
  79. package/dist/packem_chunks/handler76.js +8 -8
  80. package/dist/packem_chunks/handler77.js +63 -64
  81. package/dist/packem_chunks/handler78.js +25 -25
  82. package/dist/packem_chunks/handler8.js +1 -1
  83. package/dist/packem_chunks/handler9.js +1 -1
  84. package/dist/packem_chunks/heal-accept.js +5 -5
  85. package/dist/packem_chunks/heal.js +8 -8
  86. package/dist/packem_chunks/help-command.js +46 -46
  87. package/dist/packem_chunks/index2.js +5 -5
  88. package/dist/packem_chunks/index3.js +3 -3
  89. package/dist/packem_chunks/index4.js +11 -11
  90. package/dist/packem_chunks/keys-refresh.js +1 -1
  91. package/dist/packem_chunks/lean.js +2 -2
  92. package/dist/packem_chunks/list.js +2 -2
  93. package/dist/packem_chunks/loader.js +4 -4
  94. package/dist/packem_chunks/orchestrator.js +14 -14
  95. package/dist/packem_chunks/pre-mode.js +2 -2
  96. package/dist/packem_chunks/prompts.js +3 -3
  97. package/dist/packem_chunks/prune.js +1 -1
  98. package/dist/packem_chunks/publish-guards.js +1 -1
  99. package/dist/packem_chunks/registry.js +17 -17
  100. package/dist/packem_chunks/resolveFormatter.js +5 -5
  101. package/dist/packem_chunks/shell-runner.js +1 -1
  102. package/dist/packem_chunks/snapshot.js +2 -2
  103. package/dist/packem_chunks/stage-publisher.js +1 -1
  104. package/dist/packem_chunks/staged-registry.js +2 -2
  105. package/dist/packem_chunks/state.js +3 -3
  106. package/dist/packem_chunks/status.js +1 -1
  107. package/dist/packem_chunks/sync.js +1 -1
  108. package/dist/packem_chunks/sync2.js +1 -1
  109. package/dist/packem_chunks/tar.js +3 -3
  110. package/dist/packem_chunks/tripwire.js +2 -2
  111. package/dist/packem_chunks/ts-loader.js +9 -9
  112. package/dist/packem_chunks/verify-lockfile.js +2 -2
  113. package/dist/packem_chunks/workspace.js +2 -2
  114. package/dist/packem_shared/advisories-CCBGdU8U.js +1 -0
  115. package/dist/packem_shared/affected-selection-Dj-ymxhw.js +1 -0
  116. package/dist/packem_shared/affected-shas-PwkVbPch.js +1 -0
  117. package/dist/packem_shared/ai-analysis-bGCAc1jR.js +68 -0
  118. package/dist/packem_shared/{ai-fix-CLfWbyqY.js → ai-fix-DV5-dHBY.js} +9 -9
  119. package/dist/packem_shared/{augment-BVuj3ee7.js → augment-24KX2nkI.js} +4 -4
  120. package/dist/packem_shared/bin-CtzhnYMp.js +1 -0
  121. package/dist/packem_shared/build-scripts-w4SNeR7D.js +1 -0
  122. package/dist/packem_shared/{command-runtime-DTbo12cP.js → command-runtime-BLFPUYAT.js} +1 -1
  123. package/dist/packem_shared/cyclonedx-C4KaVTn1.js +4 -0
  124. package/dist/packem_shared/{dependency-scan-DZcSlSFp.js → dependency-scan-D_ona0Qm.js} +1 -1
  125. package/dist/packem_shared/{docker-69ybb6g7.js → docker-DaVs-9wK.js} +40 -40
  126. package/dist/packem_shared/{en-C26W78--.js → en-D3CfXlO7.js} +13 -13
  127. package/dist/packem_shared/failure-log-CTneNcio.js +2 -0
  128. package/dist/packem_shared/giget-CAxjpwew.js +2 -0
  129. package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +1 -0
  130. package/dist/packem_shared/index-BWl4DbMp.js +1 -0
  131. package/dist/packem_shared/index-CTMU29dI.js +1 -0
  132. package/dist/packem_shared/index-uBVnF4ji.js +35 -0
  133. package/dist/packem_shared/index.server-CusjRLCh.js +2 -0
  134. package/dist/packem_shared/{interface.d-B7VK2rcH.d.ts → interface.d-CRqRz4jt.d.ts} +39 -39
  135. package/dist/packem_shared/{interface.d-Cezzifoh.d.ts → interface.d-CrHOtJc1.d.ts} +37 -37
  136. package/dist/packem_shared/lifecycle-B8A2T3gx.js +2 -0
  137. package/dist/packem_shared/lockfile-Bccery3L.js +1 -0
  138. package/dist/packem_shared/main-D_cam4hv.js +1 -0
  139. package/dist/packem_shared/manifests-BDkwiVbh.js +1 -0
  140. package/dist/packem_shared/{min-release-age-hK604veF.js → min-release-age-OaYpLwux.js} +2 -2
  141. package/dist/packem_shared/missing-package-json-BqS-OnKd.js +1 -0
  142. package/dist/packem_shared/{native-config-sync-DDKjAy0i.js → native-config-sync-Ds1FtcrM.js} +7 -7
  143. package/dist/packem_shared/osv-bloom-pKp7urSB.js +2 -0
  144. package/dist/packem_shared/package-version-C47v64aB.js +4 -0
  145. package/dist/packem_shared/packument-HBVbyf7x.js +1 -0
  146. package/dist/packem_shared/pm-runner-C6eTANt1.js +1 -0
  147. package/dist/packem_shared/project-name-filter-CJ3XX2TI.js +7 -0
  148. package/dist/packem_shared/prompt-BSAy8SMH.js +1 -0
  149. package/dist/packem_shared/{provenance-CRBV9cko.js → provenance-D4Cza8cp.js} +1 -1
  150. package/dist/packem_shared/{readJsonSync-DuMMeB3s-B9cGBVbJ.js → readJsonSync-DweZd5ZA-0eZh9sGm.js} +1 -1
  151. package/dist/packem_shared/registry-keys-C0ez2VND.js +1 -0
  152. package/dist/packem_shared/{resolve-explicit-BX6aMYl-.js → resolve-explicit-BbT764KS.js} +1 -1
  153. package/dist/packem_shared/{resolve-runtime-COyiEML3.js → resolve-runtime-D_vZovbB.js} +1 -1
  154. package/dist/packem_shared/run-file-DyPFFN9U.js +1 -0
  155. package/dist/packem_shared/{runtime-check-fzDkedMW.js → runtime-check-D4um-yQq.js} +1 -1
  156. package/dist/packem_shared/s1ngularity-St6dhKiq.js +1 -0
  157. package/dist/packem_shared/scan-progress-q-N2JtIp.js +2 -0
  158. package/dist/packem_shared/selectors-Ce_6UAoY.js +3 -0
  159. package/dist/packem_shared/signatures-Dyeyg1q9.js +2 -0
  160. package/dist/packem_shared/subtree-DSm0QEoE.js +2 -0
  161. package/dist/packem_shared/target-merge-Cfy7c__2.js +11 -0
  162. package/dist/packem_shared/target-options-7XcbqGDe.js +1 -0
  163. package/dist/packem_shared/toolchain-C_pNMBM6.js +5 -0
  164. package/dist/packem_shared/typosquats-xzcAGPiM.js +1 -0
  165. package/dist/packem_shared/{use-measured-height-DfNxp6nf.js → use-measured-height-CBjN0fle.js} +1 -1
  166. package/dist/packem_shared/verify-Dve9PQj3.js +1 -0
  167. package/dist/packem_shared/{vis-update-app-De8JjZm0.js → vis-update-app-DMAC2pPf.js} +1 -1
  168. package/dist/packem_shared/vis-user-error-xmha3L4n.js +30 -0
  169. package/dist/packem_shared/watch-BXOOX7lx.js +1 -0
  170. package/dist/packem_shared/watch-loop-Q7UpkVbr.js +11 -0
  171. package/dist/release/core/package-managers/index.d.ts +2 -2
  172. package/dist/release/core/version-actions/index.d.ts +10 -10
  173. package/dist/release/index.d.ts +60 -60
  174. package/dist/release/plugin-sdk.d.ts +80 -80
  175. package/dist/release/presets.d.ts +148 -148
  176. package/dist/release/types.d.ts +840 -840
  177. package/dist/runtime/preload.js +1 -1
  178. package/index.d.ts +204 -204
  179. package/index.js +52 -52
  180. package/package.json +16 -16
  181. package/schemas/project.schema.json +4 -1
  182. package/schemas/vis-config.schema.json +9 -3
  183. package/dist/packem_shared/advisories-B76fBVL-.js +0 -1
  184. package/dist/packem_shared/affected-shas-BOeR4vEc.js +0 -1
  185. package/dist/packem_shared/ai-analysis-D7HOdUwd.js +0 -68
  186. package/dist/packem_shared/bin-CkfFJCAM.js +0 -1
  187. package/dist/packem_shared/build-scripts-CfAqHBlq.js +0 -1
  188. package/dist/packem_shared/cyclonedx--L7NbMBH.js +0 -4
  189. package/dist/packem_shared/failure-log-BZQqxffZ.js +0 -2
  190. package/dist/packem_shared/giget-DVTFJlbR.js +0 -2
  191. package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +0 -1
  192. package/dist/packem_shared/index-2LCHaVNX.js +0 -35
  193. package/dist/packem_shared/index-B0EsgdzO.js +0 -1
  194. package/dist/packem_shared/index-Bhzio2RB.js +0 -1
  195. package/dist/packem_shared/index-Bq6YEpiq.js +0 -28
  196. package/dist/packem_shared/index.server-qvZ-cy29.js +0 -2
  197. package/dist/packem_shared/lifecycle-BcCMt9wn.js +0 -2
  198. package/dist/packem_shared/lockfile-Cwt0Nwr0.js +0 -1
  199. package/dist/packem_shared/main-B3juSU5z.js +0 -1
  200. package/dist/packem_shared/manifests-BshBdSb-.js +0 -1
  201. package/dist/packem_shared/missing-package-json-Cu0iWMT2.js +0 -1
  202. package/dist/packem_shared/osv-bloom-DMhXP184.js +0 -2
  203. package/dist/packem_shared/package-version-TsxLc6w2.js +0 -4
  204. package/dist/packem_shared/packument-CtVAoNo7.js +0 -1
  205. package/dist/packem_shared/pm-runner-CfyxALPK.js +0 -1
  206. package/dist/packem_shared/prompt-DjXHVgYU.js +0 -1
  207. package/dist/packem_shared/registry-keys-Ci2keQNi.js +0 -1
  208. package/dist/packem_shared/run-file-CTJfIZ0I.js +0 -1
  209. package/dist/packem_shared/s1ngularity-Cq1cCSpU.js +0 -1
  210. package/dist/packem_shared/scan-progress-DQ9qIGzr.js +0 -2
  211. package/dist/packem_shared/selectors-B9dOMIMq.js +0 -3
  212. package/dist/packem_shared/signatures-DvD1E8Xa.js +0 -2
  213. package/dist/packem_shared/subtree-C7bZuiSQ.js +0 -2
  214. package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
  215. package/dist/packem_shared/target-options-aPqByoww.js +0 -1
  216. package/dist/packem_shared/toolchain-CiaW3bx4.js +0 -5
  217. package/dist/packem_shared/typosquats-CRnvlYPw.js +0 -1
  218. package/dist/packem_shared/verify-23b6IfSg.js +0 -1
  219. package/dist/packem_shared/watch-B3P2dwoG.js +0 -1
  220. package/dist/packem_shared/watch-loop-B3_O8hF-.js +0 -11
@@ -1,2 +0,0 @@
1
- import{createRequire as ce}from"node:module";const le=ce(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=r=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[e,t]=y.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return y.getBuiltinModule(r)}return le(r)},{existsSync:m,openSync:ue,readSync:de,closeSync:pe,statSync:he,createWriteStream:X,readdirSync:fe,renameSync:me}=w("node:fs"),{readFile:q,mkdir:S,rm:x,writeFile:ge,mkdtemp:we}=w("node:fs/promises"),{PassThrough:V,Readable:z,pipeline:$e}=w("node:stream"),{pipeline:J}=w("node:stream/promises"),{spawn:Y}=w("node:child_process"),{basename:ve,normalize:be,delimiter:C,resolve:Z,dirname:F,join:I}=w("node:path"),{cwd:K}=y,_e=w("node:readline"),{homedir:ye,tmpdir:Q}=w("node:os"),{promisify:ke}=w("node:util");var G=Object.defineProperty,Ee=(r,e)=>{let t={};for(var n in r)G(t,n,{get:r[n],enumerable:!0});return G(t,Symbol.toStringTag,{value:"Module"}),t};const xe=/^[A-Za-z]:\//;function T(r=""){return r&&r.replace(/\\/g,"/").replace(xe,e=>e.toUpperCase())}const Ce=/^[/\\]{2}/,Te=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,ee=/^[A-Za-z]:$/,te=function(r){if(r.length===0)return".";r=T(r);let e=r.match(Ce),t=k(r),n=r[r.length-1]==="/";return r=re(r,!t),r.length===0?t?"/":n?"./":".":(n&&(r+="/"),ee.test(r)&&(r+="/"),e?t?`//${r}`:`//./${r}`:t&&!k(r)?`/${r}`:r)},M=function(...r){let e="";for(let t of r)if(t)if(e.length>0){let n=e[e.length-1]==="/",o=t[0]==="/";n&&o?e+=t.slice(1):e+=n||o?t:`/${t}`}else e+=t;return te(e)};function Oe(){return typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const f=function(...r){r=r.map(n=>T(n));let e="",t=!1;for(let n=r.length-1;n>=-1&&!t;n--){let o=n>=0?r[n]:Oe();!o||o.length===0||(e=`${o}/${e}`,t=k(o))}return e=re(e,!t),t&&!k(e)?`/${e}`:e.length>0?e:"."};function re(r,e){let t="",n=0,o=-1,s=0,i=null;for(let a=0;a<=r.length;++a){if(a<r.length)i=r[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let c=t.lastIndexOf("/");c===-1?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),o=a,s=0;continue}else if(t.length>0){t="",n=0,o=a,s=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${r.slice(o+1,a)}`:t=r.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return t}const k=function(r){return Te.test(r)},ne=function(r){let e=T(r).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&ee.test(e[0])&&(e[0]+="/"),e.join("/")||(k(r)?"/":".")},oe=function(r,e){let t=T(r).split("/"),n="";for(let o=t.length-1;o>=0;o--){let s=t[o];if(s){n=s;break}}return n},Ae=/^path$/i,D={key:"PATH",value:""};function se(r){for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||!Ae.test(e))continue;let t=r[e];return t?{key:e,value:t}:D}return D}function Se(r,e){let t=e.value.split(C),n=[],o=r,s;do n.push(Z(o,"node_modules",".bin")),s=o,o=F(o);while(o!==s);n.push(F(process.execPath));let i=n.concat(t).join(C);return{key:e.key,value:i}}function je(r,e,t=!0){let n={...process.env,...e};if(!t)return n;let o=Se(r,se(n));return n[o.key]=o.value,n}const ze=r=>{let e=r.length,t=new V,n=()=>{--e===0&&t.end()};for(let o of r)J(o,t,{end:!1}).then(n).catch(n);return t},A=/([()\][%!^"`<>&|;, *?])/g,Fe=/^#!\s*(.+)/,Ie=/\.(?:com|exe)$/i,Ge=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,Me=process.platform==="win32",De=[".EXE",".CMD",".BAT",".COM"];function Pe(r,e=[],t={}){if(t.shell===!0||!Me)return{command:r,args:e,options:t};let n=P(r,t),o=null;if(n!==null){let s=Buffer.alloc(150),i=null;try{i=ue(n,"r"),de(i,s,0,150,0)}catch{}finally{i!==null&&pe(i)}let a=s.toString().match(Fe);if(a!==null){let c=a[1].trim(),d=c.indexOf(" "),l=d===-1?c:c.slice(0,d),h=d===-1?"":c.slice(d+1),p=ve(l);o=p==="env"?h||null:p}}if(o!==null&&n!==null&&(e=[n,...e],r=o,n=P(r,t)),n===null||!Ie.test(n)){let s=n!==null&&Ge.test(n);r=be(r),r=r.replace(A,"^$1"),e=e.map(i=>(i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(A,"^$1"),s&&(i=i.replace(A,"^$1")),i)),e=["/d","/s","/c",`"${[r,...e].join(" ")}"`],r=t.env?.comspec??"cmd.exe",t={...t,windowsVerbatimArguments:!0}}return{command:r,args:e,options:t}}function P(r,e){let t=(e.cwd??K()).toString(),n=e.env??process.env,o=se(n).value,s=r.includes("/")||r.includes("\\")?[""]:[t,...o.split(C)],i=n.PATHEXT?n.PATHEXT.split(C):De;r.includes(".")&&i[0]!==""&&i.unshift("");for(let a of s){let c=Z(t,a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,r);for(let d of i){let l=c+d;try{if(he(l).isFile())return l}catch{}}}return null}var B=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const Be={timeout:void 0,persist:!1},He={windowsHide:!0};function Ne(r){let e=new AbortController;for(let t of r){if(t.aborted)return e.abort(),t;t.addEventListener("abort",()=>{e.abort(t.reason)},{signal:e.signal})}return e.signal}async function H(r){let e="";try{for await(let t of r)e+=t.toString()}catch{}return e}var Re=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...Be,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(o=>{this._resolveClose=o})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return Ue(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=ze(t),o=_e.createInterface({input:n});for await(let s of o)yield s.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error("No process was started");let[t,n]=await Promise.all([this._streamOut?H(this._streamOut):"",this._streamErr?H(this._streamErr):""]);await this._processClosed;let{stdin:o}=this._options;if(o&&typeof o!="string"&&await o,e.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this,s);return s}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=K(),t=this._options,n={...He,...t.nodeOptions},o=[];this._resetState(),t.timeout!==void 0&&o.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&o.push(t.signal),t.persist===!0&&(n.detached=!0),o.length>0&&(n.signal=Ne(o)),n.env=je(e,n.env,t.nodePath);let s=Pe(this._command,this._args,n),i=Y(s.command,s.args,s.options);if(i.stderr&&(this._streamErr=i.stderr),i.stdout&&(this._streamOut=i.stdout),this._process=i,i.once("error",this._onError),i.once("close",this._onClose),i.stdin){let{stdin:a}=t;typeof a=="string"?i.stdin.end(a):a?.process?.stdout?.pipe(i.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const j=(r,e,t)=>{let n=new Re(r,e,t);return n.spawn(),n},Ue=j;var Le=Ee({detectPackageManager:()=>ie,installDependencies:()=>Ze,packageManagers:()=>v});async function We(r,e,t={}){let n=te(r).split("/");for(;n.length>0;){let o=await e(n.join("/")||"/");if(o||!t.includeParentDirs)return o;n.pop()}}function Xe(r){let e;return()=>(e===void 0&&(e=r().then(t=>(e=t,e))),e)}const qe=Xe(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:r}=await j("corepack",["--version"]);return r===0}catch{return!1}});async function Ve(r,e,t={}){let n=r!=="npm"&&r!=="bun"&&r!=="deno"&&t.corepack!==!1&&await qe()?["corepack",[r,...e]]:[r,e],{exitCode:o,stdout:s,stderr:i}=await j(n[0],n[1],{nodeOptions:{cwd:f(t.cwd||process.cwd()),env:t.env,stdio:t.silent?"pipe":"inherit"}});if(o!==0)throw Error(`\`${n.flat().join(" ")}\` failed.${t.silent?["",s,i].join(`
2
- `):""}`)}async function Je(r={}){let e=r.cwd||process.cwd(),t={...process.env,...r.env},n=(typeof r.packageManager=="string"?v.find(o=>o.name===r.packageManager):r.packageManager)||await ie(r.cwd||process.cwd());if(!n)throw Error("No package manager auto-detected.");return{cwd:e,env:t,silent:r.silent??!1,packageManager:n,dev:r.dev??!1,workspace:r.workspace,global:r.global??!1,dry:r.dry??!1,corepack:r.corepack??!0}}function Ye(r){let[e,t]=(r||"").split("@"),[n,o]=t?.split("+")||[];if(e&&e!=="-"&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(e))return{name:e,version:n,buildMeta:o};let s=(e||"").replace(/\W+/g,"");return{name:s,version:n,buildMeta:o,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${e}\` to \`${s}\``]}}const v=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function ie(r,e={}){let t=await We(f(r||"."),async n=>{if(!e.ignorePackageJSON){let o=M(n,"package.json");if(m(o)){let s=JSON.parse(await q(o,"utf8"));if(s?.packageManager){let{name:i,version:a="0.0.0",buildMeta:c,warnings:d}=Ye(s.packageManager);if(i){let l=a.split(".")[0],h=v.find(p=>p.name===i&&p.majorVersion===l)||v.find(p=>p.name===i);return{name:i,command:i,version:a,majorVersion:l,buildMeta:c,warnings:d,files:h?.files,lockFile:h?.lockFile}}}}if(m(M(n,"deno.json")))return v.find(s=>s.name==="deno")}if(!e.ignoreLockFile){for(let o of v)if([o.lockFile,o.files].flat().filter(Boolean).some(s=>m(f(n,s))))return{...o}}},{includeParentDirs:e.includeParentDirs??!0});if(!t&&!e.ignoreArgv){let n=process.argv[1];if(n){for(let o of v)if(RegExp(`[/\\\\]\\.?${o.command}`).test(n))return o}}return t}async function Ze(r={}){let e=await Je(r),t=r.frozenLockFile?{npm:["ci"],yarn:["install","--immutable"],bun:["install","--frozen-lockfile"],pnpm:["install","--frozen-lockfile"],deno:["install","--frozen"]}[e.packageManager.name]:["install"];return r.ignoreWorkspace&&e.packageManager.name==="pnpm"&&t.push("--ignore-workspace"),e.dry||await Ve(e.packageManager.command,t,{cwd:e.cwd,silent:e.silent,corepack:e.corepack}),{exec:{command:e.packageManager.command,args:t}}}const Ke=Object.defineProperty({__proto__:null,basename:oe,dirname:ne,dist_exports:Le,resolve:f},Symbol.toStringTag,{value:"Module"});async function Qe(r,e,t={}){const n=e+".json",o=JSON.parse(await q(n,"utf8").catch(()=>"{}")),s=(await E(r,{method:"HEAD",headers:t.headers}).catch(()=>{}))?.headers.get("etag");if(o.etag===s&&m(e))return;typeof s=="string"&&(o.etag=s);const i=await E(r,{headers:t.headers});if(i.status>=400)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);const a=X(e);await ke($e)(i.body,a),await ge(n,JSON.stringify(o),"utf8")}const et=/^(?<repo>[-\w.]+\/[-\w.]+)(?<subdir>[^#]+)?(?<ref>#[-\w./@]+)?/,tt=/^(?<repo>[-\w.]+(?:\/[-\w.]+)+?)(?:::(?<subdir>[^#]*))?(?<ref>#[-\w./@]+)?$/;function O(r,e){const t=e?.expandRepo||r.includes("::"),n=r.match(t?tt:et)?.groups||{},o=t?n.subdir?"/"+n.subdir:"/":n.subdir||"/";return{repo:n.repo||"",subdir:o,ref:n.ref?n.ref.slice(1):"main"}}function $(...r){process.env.DEBUG&&console.debug("[giget]",...r)}async function E(r,e={}){e.headers?.["sec-fetch-mode"]&&(e.mode=e.headers["sec-fetch-mode"]);const t=await fetch(r,{...e,headers:ae(e.headers)}).catch(n=>{throw new Error(`Failed to download ${r}: ${n}`,{cause:n})});if(e.validateStatus&&t.status>=400)throw new Error(`Failed to fetch ${r}: ${t.status} ${t.statusText}`);return t}function rt(){const r=process.env.XDG_CACHE_HOME?f(process.env.XDG_CACHE_HOME,"giget"):f(ye(),".cache/giget");if(process.platform==="win32"){const e=f(Q(),"giget");if(!m(e)&&m(r))try{me(r,e)}catch{}return e}return r}function ae(r={}){const e={};for(const[t,n]of Object.entries(r))n&&(e[t.toLowerCase()]=n);return e}const nt=(r,e)=>{const t=ot(r);return{name:t.name,version:t.subdir?`${t.version||"default"}-${t.subdir.replaceAll("/","-")}`:t.version,tar:({auth:n}={})=>st(t,n??e.auth)}};function ot(r,e={}){const t=e.cwd??process.cwd();let n=r.replace(/#.*$/,""),o;if(/^[./]/.test(r))n=f(t,n);else if(/^https?:\/\//.test(n)){const l=/^(https?:\/\/[^/]+)\/([\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,h,p,g]=l;n=`${h}/${p}`,g&&(o=g)}}else if(n.includes("@")){const l=/^(.*?:[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,h,p]=l;n=h,p&&(o=p)}}else{const l={"github:":"https://github.com/","gh:":"https://github.com/","gitlab:":"https://gitlab.com/","bitbucket:":"https://bitbucket.org/","sourcehut:":"https://git.sr.ht/~"},h=/^(.+?:)/.exec(n)?.at(1);h&&l[h]?n=n.replace(h,l[h]):h||(n=`${(process.env.GIGET_GIT_HOST||"https://github.com/").replace(/\/$/,"")}/${n}`);const p=/^(https?:\/\/[^/]+\/~?[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(p){const[,g,u]=p;n=g,u&&(o=u)}}const s=n.replace(/^https?:\/\//,"").replace(/^.+@/,"").replace(/(\.git)?(#.*)?$/,"").replace(/^\W+/,"").replaceAll(/[:/]/g,"-"),[i,a]=/#(.+)$/.exec(r)?.at(1)?.split(":")??[],c=i||void 0,d=a||o;return{uri:n,name:s,...c&&{version:c},...d&&{subdir:d}}}async function st(r,e){const t=await we(I(Q(),"giget-git-"));if(e&&/[\r\n]/.test(e))throw new Error("Auth token must not contain newline characters");const n={...process.env,GIT_TERMINAL_PROMPT:"0"};e&&(n.GIT_CONFIG_COUNT="1",n.GIT_CONFIG_KEY_0="http.extraHeader",n.GIT_CONFIG_VALUE_0=`Authorization: Bearer ${e}`);const o={env:n,timeout:6e4},s=it(),i=c=>R(c,o,s),a=c=>R(c,{...o,cwd:t},s);try{const c=["clone","--progress","--depth","1"];r.subdir&&c.push("--filter=blob:none","--sparse","--no-checkout"),r.version&&c.push("--branch",r.version),c.push("--",r.uri,t);try{s.update("Cloning..."),await i(c),s.update("Cloned.")}catch(u){if(!r.version)throw u;$("Shallow clone failed, falling back to full clone:",u),s.update("Shallow clone failed, cloning..."),await x(t,{recursive:!0,force:!0}),await S(t,{recursive:!0}),await a(["init"]),await a(["remote","add","origin",r.uri]),await a(["fetch","origin"]),await a(["checkout",r.version]),s.update("Fetched.")}r.subdir&&(s.update(`Sparse checkout ${r.subdir}...`),await a(["sparse-checkout","set",r.subdir]),await a(["checkout"])),s.update("Packing...");const d=r.subdir?I(t,r.subdir):t,{create:l}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);s.done();const h=l({gzip:!0,cwd:d,filter:u=>!u.startsWith(".git/")&&u!==".git"&&!u.startsWith("./.git/")&&u!=="./.git"},["."]).pipe(new V);let p=!1;const g=()=>{p||(p=!0,x(t,{recursive:!0,force:!0}))};return h.on("end",g),h.on("error",g),h.on("close",g),h}catch(c){throw s.done(),await x(t,{recursive:!0,force:!0}),c}}const N=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];function R(r,e,t){return new Promise((n,o)=>{const s=Y("git",r,{...e,stdio:["ignore","pipe","pipe"]});s.stdout.resume();let i="";s.stderr?.on("data",a=>{const c=a.toString();for(const d of c.split(/[\r\n]/)){const l=d.trim();l&&(i=l)}t&&t.update(i)}),s.on("close",a=>{a===0?n(i):o(new Error(`git ${r[0]} exited with code ${a}. Is git installed?`))}),s.on("error",a=>{a.code==="ENOENT"?o(new Error("git is not installed or not found in PATH")):o(a)})})}function it(){if(!process.stderr.isTTY)return{update(o){},done(){}};let r="",e=0;const t=()=>{const o=N[e%N.length];e++,process.stderr.write(`\x1B[2K\r\x1B[2m${o} ${r}\x1B[0m`)},n=setInterval(t,80);return{update(o){r=o,t()},done(){clearInterval(n),process.stderr.write("\x1B[2K\r")}}}const U=async(r,e)=>{if(r.endsWith(".json"))return await L(r,e);const t=new URL(r);let n=oe(t.pathname);try{const o=await E(t.href,{method:"HEAD",validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if((o.headers.get("content-type")||"").includes("application/json"))return await L(r,e);const s=o.headers.get("content-disposition")?.match(/filename="?(.+)"?/)?.[1];s&&(n=s.split(".")[0])}catch(o){$(`Failed to fetch HEAD for ${t.href}:`,o)}return{name:`${n}-${t.href.slice(0,8)}`,version:"",subdir:"",tar:t.href,defaultDir:n,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0}}},L=async(r,e)=>{const t=await(await E(r,{validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}})).json();if(!t.tar||!t.name)throw new Error(`Invalid template info from ${r}. name or tar fields are missing!`);return t},W=(r,e)=>{const t=O(r),n=process.env.GIGET_GITHUB_URL||"https://api.github.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},url:`${n.replace("api.github.com","github.com")}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/repos/${t.repo}/tarball/${t.ref}`}},at=(r,e)=>{const t=O(r,{expandRepo:!0}),n=process.env.GIGET_GITLAB_URL||"https://gitlab.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0,"sec-fetch-mode":"same-origin"},url:`${n}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/${t.repo}/-/archive/${t.ref}.tar.gz`}},ct=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://bitbucket.com/${t.repo}/src/${t.ref}${t.subdir}`,tar:`https://bitbucket.org/${t.repo}/get/${t.ref}.tar.gz`}},lt=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://git.sr.ht/~${t.repo}/tree/${t.ref}/item${t.subdir}`,tar:`https://git.sr.ht/~${t.repo}/archive/${t.ref}.tar.gz`}},ut={http:U,https:U,git:nt,github:W,gh:W,gitlab:at,bitbucket:ct,sourcehut:lt},dt="https://raw.githubusercontent.com/unjs/giget/main/templates",pt=(r=dt,e={})=>(async t=>{const n=Date.now(),o=`${r}/${t}.json`,s=await E(o,{headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if(s.status>=400)throw new Error(`Failed to download ${t} template info from ${o}: ${s.status} ${s.statusText}`);const i=await s.json();if(!i.tar||!i.name)throw new Error(`Invalid template info from ${o}. name or tar fields are missing!`);return $(`Fetched ${t} template info from ${o} in ${Date.now()-n}ms`),i}),ht=/^([\w+-.]+):/;function ft(r){if(!r)return;if(typeof r=="function")return r;const e=globalThis.process.getBuiltinModule?.("node:path")?.matchesGlob;if(typeof e!="function")throw new TypeError("Ignore patterns require `path.matchesGlob` which is supported in Node.js v22.5.0, v20.17.0 or later.");return t=>r.some(n=>e(t,n))}async function $t(r,e={}){const t=ft(e.ignore);e.registry=process.env.GIGET_REGISTRY??e.registry,e.auth=process.env.GIGET_AUTH??e.auth;const n=e.registry===!1?void 0:pt(e.registry,{auth:e.auth});let o=e.provider||(n?"registry":"github"),s=r;const i=r.match(ht);i&&(o=i[1],s=r.slice(i[0].length),(o==="http"||o==="https")&&(s=r)),o.endsWith("+git")&&(s=`${o.slice(0,-4)}:${s}`,o="git");const a=e.providers?.[o]||ut[o]||n;if(!a)throw new Error(`Unsupported provider: ${o}`);const c=await Promise.resolve().then(()=>a(s,{auth:e.auth})).catch(u=>{throw new Error(`Failed to download template from ${o}: ${u.message}`)});if(!c)throw new Error(`Failed to resolve template from ${o}`);c.name=(c.name||"template").replace(/[^\da-z-]/gi,"-"),c.defaultDir=(c.defaultDir||c.name).replace(/[^\da-z-]/gi,"-");const d=f(f(rt(),o,c.name),(c.version||c.name)+".tar.gz");if(e.preferOffline&&m(d)&&(e.offline=!0),!e.offline){await S(ne(d),{recursive:!0});const u=Date.now();if(typeof c.tar=="function"){const b=c.tar;await(async()=>{const _=await b({auth:e.auth});await J(_ instanceof z?_:z.fromWeb(_),X(d))})().catch(_=>{if(!m(d))throw _;$("Download error. Using cached version:",_),e.offline=!0})}else await Qe(c.tar,d,{headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,...ae(c.headers)}}).catch(b=>{if(!m(d))throw b;$("Download error. Using cached version:",b),e.offline=!0});$(`Downloaded to ${d} in ${Date.now()-u}ms`)}if(!m(d))throw new Error(`Tarball not found: ${d} (offline: ${e.offline})`);const l=f(f(e.cwd||"."),e.dir||c.defaultDir);if(e.forceClean&&await x(l,{recursive:!0,force:!0}),!e.force&&m(l)&&fe(l).length>0)throw new Error(`Destination ${l} already exists.`);await S(l,{recursive:!0});const h=Date.now(),p=c.subdir?.replace(/^\//,"")||"",{extract:g}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);if(await g({file:d,cwd:l,onReadEntry(u){u.path=u.path.split("/").splice(1).join("/"),p&&(u.path.startsWith(p+"/")?u.path=u.path.slice(p.length):u.path=""),t&&u.path&&t(u.path.replace(/^\//,""))&&(u.path="")}}),$(`Extracted to ${l} in ${Date.now()-h}ms`),e.install){$("Installing dependencies...");const{installDependencies:u}=await Promise.resolve().then(()=>Ke).then(b=>b.dist_exports);await u({cwd:l,silent:e.silent,...typeof e.install=="object"?e.install:{}})}return{...c,source:s,dir:l}}export{$t as f,Ee as l};
@@ -1 +0,0 @@
1
- import{W as o}from"./index-2LCHaVNX.js";const r=async(s,a)=>await o(s,a);export{r as s};
@@ -1,35 +0,0 @@
1
- import{createRequire as hr}from"node:module";import{E as it}from"./public-api-WqUCiyIe.js";const Er=hr(import.meta.url),Pu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cr=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 Er(u)},{createRequire:I}=Cr("node:module"),ut=0,Fr=4,gr=Symbol("findUpStop"),Wi=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,dr=/^[A-Z]:\//i,Ou=(u="")=>u&&u.replaceAll("\\","/").replace(dr,e=>e.toUpperCase()),mr=/^[/\\]{2}/,yr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Mt=/^[A-Z]:$/i,at=/^\/([A-Z]:)?$/i,Br=/.(\.[^./]+)$/,br=/^[/\\]|^[a-z]:[/\\]/i,$r=/\/$/,vr=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",qi="/",jt=(u,e)=>{let t="",s=0,n=-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(!(n===i-1||r===1))if(r===2){if(t.length<2||s!==2||!t.endsWith(".")||t.at(-2)!=="."){if(t.length>2){const l=t.lastIndexOf("/");l===-1?(t="",s=0):(t=t.slice(0,l),s=t.length-1-t.lastIndexOf("/")),n=i,r=0;continue}else if(t.length>0){t="",s=0,n=i,r=0;continue}}e&&(t+=t.length>0?"/..":"..",s=2)}else t.length>0?t+=`/${u.slice(n+1,i)}`:t=u.slice(n+1,i),s=i-n-1;n=i,r=0}else o==="."&&r!==-1?++r:r=-1}return t},Nu=u=>yr.test(u),Se=function(u){if(u.length===0)return".";u=Ou(u);const e=mr.exec(u),t=Nu(u),s=u.at(-1)==="/";return u=jt(u,!t),u.length===0?t?"/":s?"./":".":(s&&(u+="/"),Mt.test(u)&&(u+="/"),e?t?`//${u}`:`//./${u}`:t&&!Nu(u)?`/${u}`:u)},wr=(...u)=>{let e="";for(const t of u)if(t)if(e.length>0){const s=e.at(-1)==="/",n=t[0]==="/";s&&n?e+=t.slice(1):e+=s||n?t:`/${t}`}else e+=t;return Se(e)},Lu=function(...u){u=u.map(s=>Ou(s));let e="",t=!1;for(let s=u.length-1;s>=-1&&!t;s--){const n=s>=0?u[s]:vr();!n||n.length===0||(e=`${n}/${e}`,t=Nu(n))}return e=jt(e,!t),t&&!Nu(e)?`/${e}`:e.length>0?e:"."},Xi=function(u){return Ou(u)},xr=function(u){return Br.exec(Ou(u))?.[1]??""},Ki=function(u,e){const t=Lu(u).replace(at,"$1").split("/"),s=Lu(e).replace(at,"$1").split("/");if(s[0][1]===":"&&t[0][1]===":"&&t[0]!==s[0])return s.join("/");const n=Math.min(t.length,s.length);let r=0;for(;r<n&&t[r]===s[r];)r+=1;const o=t.length-r;return[...Array.from({length:o}).fill(".."),...s.slice(r)].join("/")},et=u=>{const e=Ou(u).replace($r,""),t=e.lastIndexOf("/");if(t===-1)return Nu(u)?"/":".";const s=e.slice(0,t);return Mt.test(s)?`${s}/`:s||(Nu(u)?"/":".")},Gt=(u,e)=>{const t=Ou(u),s=t.slice(t.lastIndexOf("/")+1);if(e&&s.endsWith(e)){if(e===t)return"";const n=s.slice(0,-e.length);if(n.length>0)return n}return s},Sr=function(u){const e=br.exec(u)?.[0]?.replaceAll("\\","/")??"",t=Gt(u),s=xr(t);return{base:t,dir:et(u),ext:s,name:t.slice(0,t.length-s.length),root:e}},_r=I(import.meta.url),Hu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tr=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 _r(u)},{fileURLToPath:Rr}=Tr("node:url");function kr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var lt,ct;function Nr(){return ct||(ct=1,lt=["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"]),lt}var Or=Nr();const Lr=kr(Or);new Set(Lr);const Pr=/^(?:\.?\.[/\\]|\.\.\B)/,Vi=u=>Pr.test(u)||u==="..",yu=u=>Ou(u instanceof URL?Rr(u):u);let Hr=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.")},Ir=I(import.meta.url),Iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mr=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 Ir(u)};Mr("node:fs/promises");const jr=I(import.meta.url),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 _e=u=>{if(u.isFile())return"file";if(u.isDirectory())return"dir";if(u.isSymbolicLink())return"symlink"},Ur=I(import.meta.url),ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zr=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:Dt,mkdir:Wr}=zr("node:fs/promises"),Ji=async u=>{bu(u);try{const e=await Dt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await Wr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=await Dt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(t))}'`,{cause:e})}},qr=I(import.meta.url),Gu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=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 qr(u)},{lstatSync:pt,mkdirSync:Kr}=Xr("node:fs"),Zi=u=>{bu(u);try{const e=pt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{Kr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=pt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(t))}'`,{cause:e})}},Vr=I(import.meta.url),Uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qr=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 Vr(u)};Qr("node:fs/promises");const Jr=I(import.meta.url),zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zr=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 Jr(u)};Zr("node:fs");const Yr=I(import.meta.url),Wu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=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 Yr(u)};us("node:fs/promises");const es=I(import.meta.url),qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ts=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 es(u)};ts("node:fs");const rs=I(import.meta.url),Xu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=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 rs(u)};ss("node:fs/promises");const ns=I(import.meta.url),Ku=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,os=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 ns(u)};os("node:fs");I(import.meta.url);let ft=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 At=u=>{const e=u.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(t){throw new Error(`Invalid glob pattern: ${u}`,{cause:t})}};let is=class{name;path;#u;constructor(e,t,s){this.#u=e,this.name=t,this.path=s}isDirectory(){return this.#u.isDirectory()}isFile(){return this.#u.isFile()}isSymbolicLink(){return this.#u.isSymbolicLink()}};const Ke=(u,e,t)=>new is(u,e,t),we=(u,e,t,s)=>{if(Array.isArray(e)&&e.length>0&&!e.some(r=>u.endsWith(r)))return!1;const n=u.includes("\\")?u.replaceAll("\\","/"):u;return t&&!t.some(r=>r.test(n))?!1:!s?.some(r=>r.test(n))},as=I(import.meta.url),Vu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=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 as(u)};ls("node:fs/promises");const cs=I(import.meta.url),Qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ds=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 cs(u)},{readdirSync:ps,realpathSync:fs,statSync:Ut}=Ds("node:fs"),As=u=>{const e=Se(u),t=Ut(e);return Ke(t,Gt(e),e)};function*hs(u,e={}){const{extensions:t,followSymlinks:s=!1,includeDirs:n=!0,includeFiles:r=!0,includeSymlinks:o=!0,match:i,maxDepth:l=Number.POSITIVE_INFINITY,skip:d}=e;if(bu(u),l<0)return;const p=e.visited??new Set,m=i?i.map(C=>typeof C=="string"?At(C):C):void 0,b=d?d.map(C=>typeof C=="string"?At(C):C):void 0;if(u=Lu(yu(u)),n&&we(u,t,m,b)&&(yield As(u)),!(l<1||!we(u,void 0,void 0,b)))try{const C=ps(u,{withFileTypes:!0});for(const f of C){let $=wr(u,f.name),F=f.isDirectory(),w=f.isFile();if(f.isSymbolicLink())if(s){const _=fs($);if(p.has(_))continue;$=_;const h=Ut(_);F=h.isDirectory(),w=h.isFile()}else if(o&&we($,t,m,b)){yield Ke(f,f.name,Se($));continue}else continue;F?(s&&p.add($),yield*hs($,{extensions:t,followSymlinks:s,includeDirs:n,includeFiles:r,includeSymlinks:o,match:m,maxDepth:l-1,skip:b,visited:p})):w&&r&&we($,t,m,b)&&(yield Ke(f,f.name,Se($)))}}catch(C){throw C instanceof ft?C:new ft(C,u)}}const Es=I(import.meta.url),Ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=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 Es(u)};Cs("node:fs/promises");const Fs=I(import.meta.url),Zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gs=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 Fs(u)},{statSync:ds,lstatSync:ms}=gs("node:fs"),ea=(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 s=Lu(t);const{root:n}=Sr(s),r=yu(e.stopAt??n),o=Lu(s,r),i=e.type??"file",l=function(p){return typeof u=="function"?[u(p)]:typeof u=="string"?[u]:Array.isArray(u)?u:[u]};e.allowSymlinks??=!0;const d=e.allowSymlinks?ds:ms;for(;s&&s!==o&&s!==n;){for(let p of l(s)){if(p===gr)return;if(p===void 0)continue;Buffer.isBuffer(p)?p=p.toString():p instanceof URL&&(p=yu(p));const m=Nu(p)?p:Lu(s,p);try{const b=d(m);if(i==="file"&&b.isFile()||i==="directory"&&b.isDirectory())return m}catch{}}s=et(s)}};function tt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ht={},Oe,Et;function Re(){if(Et)return Oe;Et=1;const u="[^\\\\/]",e=Symbol("unignore"),t="\\.",s="\\+",n="\\?",r="\\/",o="(?=.)",i="[^/]",l=`(?:${r}|$)`,d=`(?:^|${r})`,p=`${t}{1,2}${l}`,m=`(?!${t})`,b=`(?!${d}${p})`,C=`(?!${t}{0,1}${l})`,f=`(?!${p})`,$=`[^.${r}]`,F=`${i}*?`,w="/",_={DOT_LITERAL:t,PLUS_LITERAL:s,QMARK_LITERAL:n,SLASH_LITERAL:r,ONE_CHAR:o,QMARK:i,END_ANCHOR:l,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:f,QMARK_NO_DOT:$,STAR:F,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:"\\"},g={__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 Oe={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:g,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(a){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${a.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(a){return a===!0?h:_}},Oe}var Ct;function ke(){return Ct||(Ct=1,(function(u){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:n}=Re();u.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),u.hasRegexChars=r=>s.test(r),u.isRegexChar=r=>r.length===1&&u.hasRegexChars(r),u.escapeRegex=r=>r.replace(n,"\\$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 l=r.lastIndexOf(o,i);return l===-1?r:r[l-1]==="\\"?u.escapeLast(r,o,l-1):`${r.slice(0,l)}\\${r.slice(l)}`},u.removePrefix=(r,o={})=>{let i=r;return i.startsWith("./")&&(i=i.slice(2),o.prefix="./"),i},u.wrapOutput=(r,o={},i={})=>{const l=i.contains?"":"^",d=i.contains?"":"$";let p=`${l}(?:${r})${d}`;return o.negated===!0&&(p=`(?:^(?!${p}).*$)`),p},u.basename=(r,{windows:o}={})=>{const i=r.split(o?/[\\/]/:"/"),l=i[i.length-1];return l===""?i[i.length-2]:l}})(ht)),ht}var Le,Ft;function ys(){if(Ft)return Le;Ft=1;const u=ke(),{CHAR_ASTERISK:e,CHAR_AT:t,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:n,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:m,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:$}=Re(),F=_=>_===i||_===s,w=_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)};return Le=(_,h)=>{const g=h||{},a=_.length-1,T=g.parts===!0||g.scanToEnd===!0,O=[],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,su,R,G={value:"",depth:0,isGlob:!1};const tu=()=>j>=a,A=()=>v.charCodeAt(j+1),X=()=>(su=R,v.charCodeAt(++j));for(;j<a;){R=X();let nu;if(R===s){Du=G.backslashes=!0,R=X(),R===l&&(Au=!0);continue}if(Au===!0||R===l){for(vu++;tu()!==!0&&(R=X());){if(R===s){Du=G.backslashes=!0,X();continue}if(R===l){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===n){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(O.push(j),x.push(G),G={value:"",depth:0,isGlob:!1},ru===!0)continue;if(su===r&&j===q+1){q+=2;continue}au=j+1;continue}if(g.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===s){Du=G.backslashes=!0,R=X();continue}if(R===f){Z=G.isGlob=!0,ru=!0;break}}continue}break}if(R===e){if(su===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===p){for(;tu()!==!0&&(nu=X());){if(nu===s){Du=G.backslashes=!0,X();continue}if(nu===$){lu=G.isBracket=!0,Z=G.isGlob=!0,ru=!0;break}}if(T===!0)continue;break}if(g.nonegate!==!0&&R===o&&j===q){Q=G.negated=!0,q++;continue}if(g.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}}g.noext===!0&&(cu=!1,Z=!1);let z=v,wu="",c="";q>0&&(wu=v.slice(0,q),v=v.slice(q),au-=q),z&&Z===!0&&au>0?(z=v.slice(0,au),c=v.slice(au)):Z===!0?(z="",c=v):z=v,z&&z!==""&&z!=="/"&&z!==v&&F(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),g.unescape===!0&&(c&&(c=u.removeBackslashes(c)),z&&Du===!0&&(z=u.removeBackslashes(z)));const D={prefix:wu,input:_,start:q,base:z,glob:c,isBrace:gu,isBracket:lu,isGlob:Z,isExtglob:cu,isGlobstar:$u,negated:Q,negatedExtglob:hu};if(g.tokens===!0&&(D.maxDepth=0,F(R)||x.push(G),D.tokens=x),g.parts===!0||g.tokens===!0){let nu;for(let M=0;M<O.length;M++){const pu=nu?nu+1:q,Eu=O[M],iu=_.slice(pu,Eu);g.tokens&&(M===0&&q!==0?(x[M].isPrefix=!0,x[M].value=wu):x[M].value=iu,w(x[M]),D.maxDepth+=x[M].depth),(M!==0||iu!=="")&&S.push(iu),nu=Eu}if(nu&&nu+1<_.length){const M=_.slice(nu+1);S.push(M),g.tokens&&(x[x.length-1].value=M,w(x[x.length-1]),D.maxDepth+=x[x.length-1].depth)}D.slashes=O,D.parts=S}return D},Le}var Pe,gt;function Bs(){if(gt)return Pe;gt=1;const u=Re(),e=ke(),{MAX_LENGTH:t,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=u,i=(h,g)=>typeof g.expandRange=="function"?g.expandRange(...h,g):(h.sort(),`[${h.join("-")}]`),l=(h,g)=>`Missing ${h}: "${g}" - use "\\\\${g}" to match literal characters`,d=h=>{const g=[];let a=0,T=0,O=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==='"'){O=O===1?0:1,x+=v;continue}if(O===0){if(v==="[")a++;else if(v==="]"&&a>0)a--;else if(a===0){if(v==="(")T++;else if(v===")"&&T>0)T--;else if(v==="|"&&T===0){g.push(x),x="";continue}}}x+=v}return g.push(x),g},p=h=>{let g=!1;for(const a of h){if(g===!0){g=!1;continue}if(a==="\\"){g=!0;continue}if(/[?*+@!()[\]{}]/.test(a))return!1}return!0},m=h=>{let g=h.trim(),a=!0;for(;a===!0;)a=!1,/^@\([^\\()[\]{}|]+\)$/.test(g)&&(g=g.slice(2,-1),a=!0);if(p(g))return g.replace(/\\(.)/g,"$1")},b=h=>{const g=h.map(m).filter(Boolean);for(let a=0;a<g.length;a++)for(let T=a+1;T<g.length;T++){const O=g[a],x=g[T],S=O[0];if(!(!S||O!==S.repeat(O.length)||x!==S.repeat(x.length))&&(O===x||O.startsWith(x)||x.startsWith(O)))return!0}return!1},C=(h,g=!0)=>{if(h[0]!=="+"&&h[0]!=="*"||h[1]!=="(")return;let a=0,T=0,O=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==='"'){O=O===1?0:1;continue}if(O!==1){if(v==="["){a++;continue}if(v==="]"&&a>0){a--;continue}if(!(a>0)){if(v==="("){T++;continue}if(v===")"&&(T--,T===0))return g===!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(g=>e.escapeRegex(g)).join("")}]`}*`,$=h=>{let g=0;const a=[];for(;g<h.length;){const T=C(h.slice(g),!1);if(!T||T.type!=="*")return;const O=d(T.body).map(S=>S.trim());if(O.length!==1)return;const x=m(O[0]);if(!x||x.length!==1)return;a.push(x),g+=T.end+1}if(!(a.length<1))return a},F=h=>{let g=0,a=h.trim(),T=C(a);for(;T;)g++,a=T.body.trim(),T=C(a);return g},w=(h,g)=>{if(g.maxExtglobRecursion===!1)return{risky:!1};const a=typeof g.maxExtglobRecursion=="number"?g.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 O=[];let x=!1,S=!0;for(const v of T){const j=$(v);if(j){x=!0,O.push(...j);continue}const q=m(v);if(q&&q.length===1){O.push(q);continue}if(S=!1,F(v)>a)return{risky:!0}}return x?S?{risky:!0,safeOutput:f([...new Set(O)])}:{risky:!0}:{risky:!1}},_=(h,g)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=o[h]||h;const a={...g},T=typeof a.maxLength=="number"?Math.min(t,a.maxLength):t;let O=h.length;if(O>T)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${T}`);const x={type:"bos",value:"",output:a.prepend||""},S=[x],v=a.capture?"":"?:",j=u.globChars(a.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,su=B=>`(${v}(?:(?!${vu}${B.dot?cu:au}).)*?)`,R=a.dot?"":$u,G=a.dot?Q:hu;let tu=a.bash===!0?su(a):ru;a.capture&&(tu=`(${tu})`),typeof a.noext=="boolean"&&(a.noextglob=a.noext);const A={input:h,index:-1,start:0,dot:a.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),O=h.length;const X=[],z=[],wu=[];let c=x,D;const nu=()=>A.index===O-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},be=B=>{A.output+=B.output!=null?B.output:B.value,iu(B.value)},fr=()=>{let B=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)pu(),A.start++,B++;return B%2===0?!1:(A.negated=!0,A.start++,!0)},$e=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)&&be(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},ve=(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=(a.capture?"(":"")+y.open;$e("parens"),L({type:B,value:K,output:A.output?"":Z}),L({type:"paren",extglob:!0,value:pu(),output:P}),X.push(y)},Ar=B=>{const K=h.slice(B.startIndex,A.index+1),y=h.slice(B.startIndex+2,A.index),P=w(y,a);if((B.type==="plus"||B.type==="star")&&P.risky){const U=P.safeOutput?(B.output?"":Z)+(a.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Cu=S[B.tokensIndex];Cu.type="text",Cu.value=K,Cu.output=U||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:D,output:""}),xu("parens");return}let J=B.close+(a.capture?")":""),uu;if(B.type==="negate"){let U=tu;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(U=su(a)),(U!==tu||nu()||/^\)+$/.test(Eu()))&&(J=B.close=`)$))${U}`),B.inner.includes("*")&&(uu=Eu())&&/^\.[^\\/.]+$/.test(uu)){const Cu=_(uu,{...g,fastpaths:!1}).output;J=B.close=`)${Cu})${U})`}B.prev.type==="bos"&&(A.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:D,output:J}),xu("parens")};if(a.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let B=!1,K=h.replace(r,(y,P,J,uu,U,Cu)=>uu==="\\"?(B=!0,y):uu==="?"?P?P+uu+(U?Q.repeat(U.length):""):Cu===0?G+(U?Q.repeat(U.length):""):Q.repeat(J.length):uu==="."?au.repeat(J.length):uu==="*"?P?P+uu+(U?tu:""):tu:P?y:`\\${y}`);return B===!0&&(a.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),K===h&&a.contains===!0?(A.output=h,A):(A.output=e.wrapOutput(K,A,g),A)}for(;!nu();){if(D=pu(),D==="\0")continue;if(D==="\\"){const y=M();if(y==="/"&&a.bash!==!0||y==="."||y===";")continue;if(!y){D+="\\",L({type:"text",value:D});continue}const P=/^\\+/.exec(Eu());let J=0;if(P&&P[0].length>2&&(J=P[0].length,A.index+=J,J%2!==0&&(D+="\\")),a.unescape===!0?D=pu():D+=pu(),A.brackets===0){L({type:"text",value:D});continue}}if(A.brackets>0&&(D!=="]"||c.value==="["||c.value==="[^")){if(a.posix!==!1&&D===":"){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),U=s[uu];if(U){c.value=J+U,A.backtrack=!0,pu(),!x.output&&S.indexOf(c)===1&&(x.output=Z);continue}}}(D==="["&&M()!==":"||D==="-"&&M()==="]")&&(D=`\\${D}`),D==="]"&&(c.value==="["||c.value==="[^")&&(D=`\\${D}`),a.posix===!0&&D==="!"&&c.value==="["&&(D="^"),c.value+=D,be({value:D});continue}if(A.quotes===1&&D!=='"'){D=e.escapeRegex(D),c.value+=D,be({value:D});continue}if(D==='"'){A.quotes=A.quotes===1?0:1,a.keepQuotes===!0&&L({type:"text",value:D});continue}if(D==="("){$e("parens"),L({type:"paren",value:D});continue}if(D===")"){if(A.parens===0&&a.strictBrackets===!0)throw new SyntaxError(l("opening","("));const y=X[X.length-1];if(y&&A.parens===y.parens+1){Ar(X.pop());continue}L({type:"paren",value:D,output:A.parens?")":"\\)"}),xu("parens");continue}if(D==="["){if(a.nobracket===!0||!Eu().includes("]")){if(a.nobracket!==!0&&a.strictBrackets===!0)throw new SyntaxError(l("closing","]"));D=`\\${D}`}else $e("brackets");L({type:"bracket",value:D});continue}if(D==="]"){if(a.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){L({type:"text",value:D,output:`\\${D}`});continue}if(A.brackets===0){if(a.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:D,output:`\\${D}`});continue}xu("brackets");const y=c.value.slice(1);if(c.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(D=`/${D}`),c.value+=D,be({value:D}),a.literalBrackets===!1||e.hasRegexChars(y))continue;const P=e.escapeRegex(c.value);if(A.output=A.output.slice(0,-c.value.length),a.literalBrackets===!0){A.output+=P,c.value=P;continue}c.value=`(${v}${P}|${c.value})`,A.output+=c.value;continue}if(D==="{"&&a.nobrace!==!0){$e("braces");const y={type:"brace",value:D,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};z.push(y),L(y);continue}if(D==="}"){const y=z[z.length-1];if(a.nobrace===!0||!y){L({type:"text",value:D,output:D});continue}let P=")";if(y.dots===!0){const J=S.slice(),uu=[];for(let U=J.length-1;U>=0&&(S.pop(),J[U].type!=="brace");U--)J[U].type!=="dots"&&uu.unshift(J[U].value);P=i(uu,a),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="\\{",D=P="\\}",A.output=J;for(const U of uu)A.output+=U.output||U.value}L({type:"brace",value:D,output:P}),xu("braces"),z.pop();continue}if(D==="|"){X.length>0&&X[X.length-1].conditions++,L({type:"text",value:D});continue}if(D===","){let y=D;const P=z[z.length-1];P&&wu[wu.length-1]==="braces"&&(P.comma=!0,y="|"),L({type:"comma",value:D,output:y});continue}if(D==="/"){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:D,output:lu});continue}if(D==="."){if(A.braces>0&&c.type==="dot"){c.value==="."&&(c.output=au);const y=z[z.length-1];c.type="dots",c.output+=D,c.value+=D,y.dots=!0;continue}if(A.braces+A.parens===0&&c.type!=="bos"&&c.type!=="slash"){L({type:"text",value:D,output:au});continue}L({type:"dot",value:D,output:au});continue}if(D==="?"){if(!(c&&c.value==="(")&&a.noextglob!==!0&&M()==="("&&M(2)!=="?"){ve("qmark",D);continue}if(c&&c.type==="paren"){const y=M();let P=D;(c.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Eu()))&&(P=`\\${D}`),L({type:"text",value:D,output:P});continue}if(a.dot!==!0&&(c.type==="slash"||c.type==="bos")){L({type:"qmark",value:D,output:hu});continue}L({type:"qmark",value:D,output:Q});continue}if(D==="!"){if(a.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ve("negate",D);continue}if(a.nonegate!==!0&&A.index===0){fr();continue}}if(D==="+"){if(a.noextglob!==!0&&M()==="("&&M(2)!=="?"){ve("plus",D);continue}if(c&&c.value==="("||a.regex===!1){L({type:"plus",value:D,output:gu});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||A.parens>0){L({type:"plus",value:D});continue}L({type:"plus",value:gu});continue}if(D==="@"){if(a.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:D,output:""});continue}L({type:"text",value:D});continue}if(D!=="*"){(D==="$"||D==="^")&&(D=`\\${D}`);const y=n.exec(Eu());y&&(D+=y[0],A.index+=y[0].length),L({type:"text",value:D});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=D,c.output=tu,A.backtrack=!0,A.globstar=!0,iu(D);continue}let B=Eu();if(a.noextglob!==!0&&/^\([^?]/.test(B)){ve("star",D);continue}if(c.type==="star"){if(a.noglobstar===!0){iu(D);continue}const y=c.prev,P=y.prev,J=y.type==="slash"||y.type==="bos",uu=P&&(P.type==="star"||P.type==="globstar");if(a.bash===!0&&(!J||B[0]&&B[0]!=="/")){L({type:"star",value:D,output:""});continue}const U=A.braces>0&&(y.type==="comma"||y.type==="brace"),Cu=X.length&&(y.type==="pipe"||y.type==="paren");if(!J&&y.type!=="paren"&&!U&&!Cu){L({type:"star",value:D,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"&&nu()){c.type="globstar",c.value+=D,c.output=su(a),A.output=c.output,A.globstar=!0,iu(D);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!uu&&nu()){A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=su(a)+(a.strictSlashes?")":"|$)"),c.value+=D,A.globstar=!0,A.output+=y.output+c.output,iu(D);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=`${su(a)}${lu}|${lu}${Fu})`,c.value+=D,A.output+=y.output+c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&B[0]==="/"){c.type="globstar",c.value+=D,c.output=`(?:^|${lu}|${su(a)}${lu})`,A.output=c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}if(U&&B[0]==="/"){c.type="globstar",c.value+=D,c.output=`(?:^|${lu}|${su(a)}${lu})`,A.output+=c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-c.output.length),c.type="globstar",c.output=su(a),c.value+=D,A.output+=c.output,A.globstar=!0,iu(D);continue}const K={type:"star",value:D,output:tu};if(a.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")&&a.regex===!0){K.output=D,L(K);continue}(A.index===A.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(A.output+=Au,c.output+=Au):a.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(a.strictBrackets===!0)throw new SyntaxError(l("closing","]"));A.output=e.escapeLast(A.output,"["),xu("brackets")}for(;A.parens>0;){if(a.strictBrackets===!0)throw new SyntaxError(l("closing",")"));A.output=e.escapeLast(A.output,"("),xu("parens")}for(;A.braces>0;){if(a.strictBrackets===!0)throw new SyntaxError(l("closing","}"));A.output=e.escapeLast(A.output,"{"),xu("braces")}if(a.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,g)=>{const a={...g},T=typeof a.maxLength=="number"?Math.min(t,a.maxLength):t,O=h.length;if(O>T)throw new SyntaxError(`Input length: ${O}, 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(a.windows),cu=a.dot?au:q,$u=a.dot?gu:q,Au=a.capture?"":"?:",Du={negated:!1,prefix:""};let Q=a.bash===!0?".*?":lu;a.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(a);case"**/*":return`(?:${cu}${hu(a)}${S})?${$u}${v}${Q}`;case"**/*.*":return`(?:${cu}${hu(a)}${S})?${$u}${Q}${x}${v}${Q}`;case"**/.*":return`(?:${cu}${hu(a)}${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 su=ru(vu);return su&&a.strictSlashes!==!0&&(su+=`${S}?`),su},Pe=_,Pe}var He,dt;function bs(){if(dt)return He;dt=1;const u=ys(),e=Bs(),t=ke(),s=Re(),n=o=>o&&typeof o=="object"&&!Array.isArray(o),r=(o,i,l=!1)=>{if(Array.isArray(o)){const F=o.map(w=>r(w,i,l));return w=>{for(const _ of F){const h=_(w);if(h)return h}return!1}}const d=n(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");const p=i||{},m=p.windows,b=d?r.compileRe(o,i):r.makeRe(o,i,!1,!0),C=b.state;delete b.state;let f=()=>!1;if(p.ignore){const F={...i,ignore:null,onMatch:null,onResult:null};f=r(p.ignore,F,l)}const $=(F,w=!1)=>{const{isMatch:_,match:h,output:g}=r.test(F,b,i,{glob:o,posix:m}),a={glob:o,state:C,regex:b,posix:m,input:F,output:g,match:h,isMatch:_};if(typeof p.onResult=="function"&&p.onResult(a),_===!1)return a.isMatch=!1,w?a:!1;u:if(f(F)){if(typeof p.onIgnore=="function"&&p.onIgnore(a)===s.UNIGNORE){a.isMatch=!0;break u}return a.isMatch=!1,w?a:!1}return typeof p.onMatch=="function"&&p.onMatch(a),w?a:!0};return l&&($.state=C),$};return r.test=(o,i,l,{glob:d,posix:p}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const m=l||{},b=m.format||(p?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,l,p):C=i.exec(f)),{isMatch:!!C,match:C,output:f}},r.matchBase=(o,i,l,d=l&&l.windows)=>(i instanceof RegExp?i:r.makeRe(i,l)).test(t.basename(o,{windows:d})),r.isMatch=(o,i,l)=>r(i,l)(o),r.parse=(o,i)=>Array.isArray(o)?o.map(l=>r.parse(l,i)):e(o,{...i,fastpaths:!1}),r.scan=(o,i)=>u(o,i),r.compileRe=(o,i,l=!1,d=!1)=>{if(l===!0)return o.output;const p=i||{},m=p.contains?"":"^",b=p.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={},l=!1,d=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let p={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(p.output=e.fastpaths(o,i)),p.output||(p=e(o,i)),r.compileRe(p,i,l,d)},r.toRegex=(o,i)=>{try{const l=i||{};return new RegExp(o,l.flags||(l.nocase?"i":""))}catch(l){if(i&&i.debug===!0)throw l;return/$^/}},r.constants=s,He=r,He}var Ie,mt;function $s(){if(mt)return Ie;mt=1;const u=bs(),e=ke();function t(s,n,r=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:e.isWindows()}),u(s,n,r)}return Object.assign(t,u),Ie=t,Ie}var vs=$s();const Ru=tt(vs),ws=I(import.meta.url),Yu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ye=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 ws(u)},yt=ye("fs"),xs={...yt,default:yt},{statSync:Ss,stat:_s,realpathSync:Ts,realpath:Rs,readdirSync:ks,readdir:Ns}=ye("fs"),{sep:zt,basename:Os,dirname:Ve,resolve:Wt,normalize:Ls,relative:Ps,posix:ku,isAbsolute:Hs}=ye("path"),{fileURLToPath:Is}=ye("url"),{createRequire:Ms}=ye("module");var Bt=Ms(import.meta.url);function js(u){let e=Ls(u);return e.length>1&&e[e.length-1]===zt&&(e=e.substring(0,e.length-1)),e}const Gs=/[\\/]/g;function qt(u,e){return u.replace(Gs,e)}const Us=/^[a-z]:[\\/]$/i;function zs(u){return u==="/"||Us.test(u)}function Me(u,e){const{resolvePaths:t,normalizePath:s,pathSeparator:n}=e,r=process.platform==="win32"&&u.includes("/")||u.startsWith(".");if(t&&(u=Wt(u)),(s||r)&&(u=js(u)),u===".")return"";const o=u[u.length-1]!==n;return qt(o?u+n:u,n)}function Xt(u,e){return e+u}function Ws(u,e){return function(t,s){return s.startsWith(u)?s.slice(u.length)+t:qt(Ps(u,s),e.pathSeparator)+e.pathSeparator+t}}function qs(u){return u}function Xs(u,e,t){return e+u+t}function Ks(u,e){const{relativePaths:t,includeBasePath:s}=e;return t&&u?Ws(u,e):s?Xt:qs}function Vs(u){return function(e,t){t.push(e.substring(u.length)||".")}}function Qs(u){return function(e,t,s){const n=e.substring(u.length)||".";s.every(r=>r(n,!0))&&t.push(n)}}const Js=(u,e)=>{e.push(u||".")},Zs=(u,e,t)=>{const s=u||".";t.every(n=>n(s,!0))&&e.push(s)},Ys=()=>{};function un(u,e){const{includeDirs:t,filters:s,relativePaths:n}=e;return t?n?s&&s.length?Qs(u):Vs(u):s&&s.length?Zs:Js:Ys}const en=(u,e,t,s)=>{s.every(n=>n(u,!1))&&t.files++},tn=(u,e,t,s)=>{s.every(n=>n(u,!1))&&e.push(u)},rn=(u,e,t,s)=>{t.files++},sn=(u,e)=>{e.push(u)},nn=()=>{};function on(u){const{excludeFiles:e,filters:t,onlyCounts:s}=u;return e?nn:t&&t.length?s?en:tn:s?rn:sn}const an=u=>u,ln=()=>[""].slice(0,0);function cn(u){return u.group?ln:an}const Dn=(u,e,t)=>{u.push({directory:e,files:t,dir:e})},pn=()=>{};function fn(u){return u.group?Dn:pn}const An=function(u,e,t){const{queue:s,fs:n,options:{suppressErrors:r}}=e;s.enqueue(),n.realpath(u,(o,i)=>{if(o)return s.dequeue(r?null:o,e);n.stat(i,(l,d)=>{if(l)return s.dequeue(r?null:l,e);if(d.isDirectory()&&Kt(u,i,e))return s.dequeue(null,e);t(d,i),s.dequeue(null,e)})})},hn=function(u,e,t){const{queue:s,fs:n,options:{suppressErrors:r}}=e;s.enqueue();try{const o=n.realpathSync(u),i=n.statSync(o);if(i.isDirectory()&&Kt(u,o,e))return;t(i,o)}catch(o){if(!r)throw o}};function En(u,e){return!u.resolveSymlinks||u.excludeSymlinks?null:e?hn:An}function Kt(u,e,t){if(t.options.useRealPaths)return Cn(e,t);let s=Ve(u),n=1;for(;s!==t.root&&n<2;){const r=t.symlinks.get(s);r&&(r===e||r.startsWith(e)||e.startsWith(r))?n++:s=Ve(s)}return t.symlinks.set(u,e),n>1}function Cn(u,e){return e.visited.includes(u+e.options.pathSeparator)}const Fn=u=>u.counts,gn=u=>u.groups,dn=u=>u.paths,mn=u=>u.paths.slice(0,u.options.maxFiles),yn=(u,e,t)=>(Ne(e,t,u.counts,u.options.suppressErrors),null),Bn=(u,e,t)=>(Ne(e,t,u.paths,u.options.suppressErrors),null),bn=(u,e,t)=>(Ne(e,t,u.paths.slice(0,u.options.maxFiles),u.options.suppressErrors),null),$n=(u,e,t)=>(Ne(e,t,u.groups,u.options.suppressErrors),null);function Ne(u,e,t,s){e(u&&!s?u:null,t)}function vn(u,e){const{onlyCounts:t,group:s,maxFiles:n}=u;return t?e?Fn:yn:s?e?gn:$n:n?e?mn:bn:e?dn:Bn}const Vt={withFileTypes:!0},wn=(u,e,t,s,n)=>{if(u.queue.enqueue(),s<0)return u.queue.dequeue(null,u);const{fs:r}=u;u.visited.push(e),u.counts.directories++,r.readdir(e||".",Vt,(o,i=[])=>{n(i,t,s),u.queue.dequeue(u.options.suppressErrors?null:o,u)})},xn=(u,e,t,s,n)=>{const{fs:r}=u;if(s<0)return;u.visited.push(e),u.counts.directories++;let o=[];try{o=r.readdirSync(e||".",Vt)}catch(i){if(!u.options.suppressErrors)throw i}n(o,t,s)};function Sn(u){return u?xn:wn}var _n=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))}},Tn=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}},Rn=class{aborted=!1;abort(){this.aborted=!0}},Qt=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,s){this.isSynchronous=!s,this.callbackInvoker=vn(t,this.isSynchronous),this.root=Me(e,t),this.state={root:zs(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Tn,options:t,queue:new _n((n,r)=>this.callbackInvoker(r,n,s)),symlinks:new Map,visited:[""].slice(0,0),controller:new Rn,fs:t.fs||xs},this.joinPath=Ks(this.root,t),this.pushDirectory=un(this.root,t),this.pushFile=on(t),this.getArray=cn(t),this.groupFiles=fn(t),this.resolveSymlink=En(t,this.isSynchronous),this.walkDirectory=Sn(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,s)=>{const{paths:n,options:{filters:r,resolveSymlinks:o,excludeSymlinks:i,exclude:l,maxFiles:d,signal:p,useRealPaths:m,pathSeparator:b},controller:C}=this.state;if(C.aborted||p&&p.aborted||d&&n.length>d)return;const f=this.getArray(this.state.paths);for(let $=0;$<e.length;++$){const F=e[$];if(F.isFile()||F.isSymbolicLink()&&!o&&!i){const w=this.joinPath(F.name,t);this.pushFile(w,f,this.state.counts,r)}else if(F.isDirectory()){let w=Xs(F.name,t,this.state.options.pathSeparator);if(l&&l(F.name,w))continue;this.pushDirectory(w,n,r),this.walkDirectory(this.state,w,w,s-1,this.walk)}else if(this.resolveSymlink&&F.isSymbolicLink()){let w=Xt(F.name,t);this.resolveSymlink(w,this.state,(_,h)=>{if(_.isDirectory()){if(h=Me(h,this.state.options),l&&l(F.name,m?h:w+b))return;this.walkDirectory(this.state,h,m?h:w+b,s-1,this.walk)}else{h=m?h:w;const g=Os(h),a=Me(Ve(h),this.state.options);h=this.joinPath(g,a),this.pushFile(h,f,this.state.counts,r)}})}}this.groupFiles(this.state.groups,t,f)}};function kn(u,e){return new Promise((t,s)=>{Jt(u,e,(n,r)=>{if(n)return s(n);t(r)})})}function Jt(u,e,t){new Qt(u,e,t).start()}function Nn(u,e){return new Qt(u,e).start()}var bt=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return kn(this.root,this.options)}withCallback(e){Jt(this.root,this.options,e)}sync(){return Nn(this.root,this.options)}};let Zt=null;try{Bt.resolve("picomatch"),Zt=Bt("picomatch")}catch{}var On=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:zt,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||Zt;if(!t)throw new Error("Please specify a glob function to use glob matching.");var s=this.globCache[u.join("\0")];return s||(s=t(u,...e),this.globCache[u.join("\0")]=s),this.options.filters.push(n=>s(n)),this}};const Ln=Array.isArray,Yt=/\\/g,Pn=/^[A-Za-z]:$/,ur=process.platform==="win32",Hn=/^(\/?\.\.)+$/;function $t(u,e={}){const t=u.length,s=Array(t),n=Array(t);let r,o;for(r=0;r<t;r++){const i=er(u[r]);s[r]=i;const l=i.length,d=Array(l);for(o=0;o<l;o++)d[o]=Ru(i[o],e);n[r]=d}return i=>{const l=i.split("/");if(l[0]===".."&&Hn.test(i))return!0;for(r=0;r<t;r++){const d=s[r],p=n[r],m=l.length,b=Math.min(m,d.length);for(o=0;o<b;){const C=d[o];if(C.includes("/"))return!0;if(!p[o](l[o]))break;if(!e.noglobstar&&C==="**")return!0;o++}if(o===m)return!0}return!1}}const In=/^[A-Z]:\/$/i,Mn=ur?u=>In.test(u):u=>u==="/";function vt(u,e,t){if(u===e||e.startsWith(`${u}/`)){if(t){const n=u.length+ +!Mn(u);return(r,o)=>r.slice(n,o?-1:void 0)||"."}const s=e.slice(u.length+1);return s?(n,r)=>{if(n===".")return s;const o=`${s}/${n}`;return r?o.slice(0,-1):o}:(n,r)=>r&&n!=="."?n.slice(0,-1):n}return t?s=>ku.relative(u,s)||".":s=>ku.relative(u,`${e}/${s}`)||"."}function jn(u,e){if(e.startsWith(`${u}/`)){const t=e.slice(u.length+1);return s=>`${t}/${s}`}return t=>{const s=ku.relative(u,`${e}/${t}`);return t[t.length-1]==="/"&&s!==""?`${s}/`:s||"."}}function wt(u){return u.replace(Pn,e=>`${e}/`)}const Gn={parts:!0};function er(u){var e;const t=Ru.scan(u,Gn);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[u]}const Un=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,zn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Wn=u=>u.replace(Un,"\\$&"),qn=u=>u.replace(zn,"\\$&"),Xn=ur?qn:Wn;function Kn(u,e){const t=Ru.scan(u);return t.isGlob||t.negated}function ge(...u){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...u)}function tr(u){return typeof u=="string"?[u]:u??[]}const Vn=/^(\/?\.\.)+/,Qn=/\\(?=[()[\]{}!*+?@|])/g;function je(u,e,t,s){var n;const r=e.cwd;let o=u;u[u.length-1]==="/"&&(o=u.slice(0,-1));const i=o.lastIndexOf("/"),l=(i===-1?o:o.slice(i+1)).startsWith("!(");o[o.length-1]!=="*"&&!l&&e.expandDirectories&&(o+="/**");const d=Xn(r);o=Hs(o.replace(Qn,""))?ku.relative(d,o):ku.normalize(o);const p=(n=Vn.exec(o))===null||n===void 0?void 0:n[0],m=er(o);if(p){const C=(p.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 F=ku.join(r,p.slice(f*3));F[0]!=="."&&t.root.length>F.length&&(t.root=wt(F),t.depthOffset=-C+f)}if(!s&&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 F=m[$];if(F==="**"&&!m[$+1]){C.pop();break}if($===m.length-1||F!==t.commonPath[$]||Kn(F))break;C.push(F)}t.depthOffset=C.length,t.commonPath=C,t.root=wt(C.length>0?ku.join(r,...C):r)}return o}function Jn(u,e,t){const s=[],n=[],r=[];for(const o of u.ignore)o&&(o[0]!=="!"||o[1]==="("?n.push(je(o,u,t,!0)):r.push(o.slice(1)));for(const o of e)o&&(o[0]!=="!"||o[1]==="("?s.push(je(o,u,t,!1)):(o[1]!=="!"||o[2]==="(")&&n.push(je(o.slice(1),u,t,!0)));return{match:s,ignore:n,unignore:r}}function Zn(u,e){const t=u.cwd,s={root:t,depthOffset:0},n=Jn(u,e,s);u.debug&&ge("internal processing patterns:",n);const{absolute:r,caseSensitiveMatch:o,debug:i,dot:l,followSymbolicLinks:d,onlyDirectories:p}=u,m=s.root.replace(Yt,""),b={dot:l,nobrace:u.braceExpansion===!1,nocase:!o,noextglob:u.extglob===!1,noglobstar:u.globstar===!1,posix:!0},C=n.unignore.length>0,f=C?Ru(n.unignore,b):void 0,$=C?$t(n.unignore,b):void 0,F=Ru(n.match,{...b,ignore:n.ignore,onIgnore:f?S=>f(S.output)&&Ru.constants.UNIGNORE:void 0}),w=Ru(n.ignore,b),_=$t(n.match,b),h=vt(t,m,r),g=r?h:vt(t,m,!0),a=n.match.length>0&&n.match.every(S=>S==="**"||S==="**/*"),T=n.ignore.length>0||C||!a?(S,v)=>{const j=g(v,!0);return j==="."||$&&$(j)?!1:!_(j)||w(j)}:void 0;let O;u.deep!==void 0&&(O=Math.round(u.deep-s.depthOffset));const x=new On({filters:[i?(S,v)=>{const j=h(S,v),q=F(j);return q&&ge(`matched ${j}`),q}:(S,v)=>{const j=h(S,v);return F(j)}],exclude:i&&T?(S,v)=>{const j=T(S,v);return ge(`${j?"skipped":"crawling"} ${v}`),j}:T,fs:u.fs,pathSeparator:"/",relativePaths:!r,resolvePaths:r,includeBasePath:r,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:p,includeDirs:p||!u.onlyFiles,maxDepth:O,signal:u.signal}).crawl(m);return u.debug&&ge("internal properties:",{...s,root:m}),[x,t!==m&&!r&&jn(t,m)]}function Yn(u,e){if(e)for(let t=u.length-1;t>=0;t--)u[t]=e(u[t]);return u}const xt={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function uo(u){const e=Object.assign({},u);for(const t in xt)e[t]===void 0&&Object.assign(e,{[t]:xt[t]});return e.cwd=(e.cwd instanceof URL?Is(e.cwd):Wt(e.cwd||process.cwd())).replace(Yt,"/"),e.ignore=tr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Ns,readdirSync:e.fs.readdirSync||ks,realpath:e.fs.realpath||Rs,realpathSync:e.fs.realpathSync||Ts,stat:e.fs.stat||_s,statSync:e.fs.statSync||Ss}),e.debug&&ge("globbing with options:",e),e}function eo(u,e={}){var t;if(u&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const s=Ln(u)||typeof u=="string",n=tr((t=s?u:u.patterns)!==null&&t!==void 0?t:"**/*"),r=uo(s?e:u);return n.length>0?Zn(r,n):[]}async function sa(u,e){const[t,s]=eo(u,e);return t?Yn(await t.withPromise(),s):[]}var Ge,St;function to(){if(St)return Ge;St=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 Ge=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},Ge}var Ue,_t;function rr(){if(_t)return Ue;_t=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=to(),e={"{":"}","(":")","[":"]"},t=function(n){if(n[0]==="!")return!0;for(var r=0,o=-2,i=-2,l=-2,d=-2,p=-2;r<n.length;){if(n[r]==="*"||n[r+1]==="?"&&/[\].+)]/.test(n[r])||i!==-1&&n[r]==="["&&n[r+1]!=="]"&&(i<r&&(i=n.indexOf("]",r)),i>r&&(p===-1||p>i||(p=n.indexOf("\\",r),p===-1||p>i)))||l!==-1&&n[r]==="{"&&n[r+1]!=="}"&&(l=n.indexOf("}",r),l>r&&(p=n.indexOf("\\",r),p===-1||p>l))||d!==-1&&n[r]==="("&&n[r+1]==="?"&&/[:!=]/.test(n[r+2])&&n[r+3]!==")"&&(d=n.indexOf(")",r),d>r&&(p=n.indexOf("\\",r),p===-1||p>d))||o!==-1&&n[r]==="("&&n[r+1]!=="|"&&(o<r&&(o=n.indexOf("|",r)),o!==-1&&n[o+1]!==")"&&(d=n.indexOf(")",o),d>o&&(p=n.indexOf("\\",o),p===-1||p>d))))return!0;if(n[r]==="\\"){var m=n[r+1];r+=2;var b=e[m];if(b){var C=n.indexOf(b,r);C!==-1&&(r=C+1)}if(n[r]==="!")return!0}else r++}return!1},s=function(n){if(n[0]==="!")return!0;for(var r=0;r<n.length;){if(/[*?{}()[\]]/.test(n[r]))return!0;if(n[r]==="\\"){var o=n[r+1];r+=2;var i=e[o];if(i){var l=n.indexOf(i,r);l!==-1&&(r=l+1)}if(n[r]==="!")return!0}else r++}return!1};return Ue=function(n,r){if(typeof n!="string"||n==="")return!1;if(u(n))return!0;var o=t;return r&&r.strict===!1&&(o=s),o(n)},Ue}const ro=I(import.meta.url),ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sr=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 ro(u)},so=sr("path"),no=sr("os");var ze,Tt;function oo(){if(Tt)return ze;Tt=1;var u=rr(),e=so.posix.dirname,t=no.platform()==="win32",s="/",n=/\\/g,r=/\\([!*?|[\](){}])/g;ze=function(l,d){var p=Object.assign({flipBackslashes:!0},d);p.flipBackslashes&&t&&l.indexOf(s)<0&&(l=l.replace(n,s)),o(l)&&(l+=s),l+="a";do l=e(l);while(i(l));return l.replace(r,"$1")};function o(l){var d=l.slice(-1),p;switch(d){case"}":p="{";break;case"]":p="[";break;default:return!1}var m=l.indexOf(p);return m<0?!1:l.slice(m+1,-1).includes(s)}function i(l){return/\([^()]+$/.test(l)||l[0]==="{"||l[0]==="["||/[^\\][{[]/.test(l)?!0:u(l)}return ze}var io=oo();tt(io);const ao=I(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=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 ao(u)},{access:co}=lo("node:fs/promises");async function na(u,e=ut){bu(u),u=yu(u);try{return await co(u,e),!0}catch{return!1}}const Do=I(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=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 Do(u)},{accessSync:fo}=po("node:fs");function Qe(u,e=ut){bu(u),u=yu(u);try{return fo(u,e),!0}catch{return!1}}var Ao=rr();tt(Ao);const ho=I(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=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 ho(u)};nr("node:fs/promises");nr("node:fs");let Eo=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")}},Co=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 or=(u,e)=>{const t=u?.code;return t==="ENOENT"?new Eo(`no such file or directory, open '${e}'`):t==="EACCES"||t==="EPERM"?new Co(`unable to read the non-readable file: ${e}`):u},Fo=I(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=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 Fo(u)},{readFile:go}=ir("node:fs/promises"),{unzip:mo,brotliDecompress:yo}=ir("node:zlib"),Bo={brotli:yo,gzip:mo,none:(u,e)=>{e(null,u)}},aa=async(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:s,encoding:n,flag:r}=e??{};let o;try{o=await go(u,r?{flag:r}:{})}catch(i){throw or(i,u)}return await new Promise((i,l)=>{Bo[s??"none"](o,(d,p)=>{d?l(d):i(t?p:p.toString(n??"utf8"))})})},bo=I(import.meta.url),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ar=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 bo(u)},{readFileSync:$o}=ar("node:fs"),{unzipSync:vo,brotliDecompressSync:wo}=ar("node:zlib"),xo={brotli:wo,gzip:vo,none:u=>u},So=(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:s,encoding:n,flag:r}=e??{};let o;try{o=$o(u,r?{flag:r}:{})}catch(d){throw or(d,u)}const i=xo[s??"none"],l=i(o);return t?l:l.toString(n??"utf8")},_o=I(import.meta.url),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,To=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 _o(u)},{createRequire:lr}=To("node:module"),Ro=globalThis.process??Object.create(null),Rt={versions:{}},kt=new Proxy(Ro,{get(u,e){if(e in u)return u[e];if(e in Rt)return Rt[e]}}),ko=u=>u.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
- `),No=(u,e,t,s)=>{const n={column:0,line:-1,...u.start},r={...n,...u.end},o=n.line,i=n.column,l=r.line,d=r.column;let p=Math.max(o-(t+1),0),m=Math.min(e.length,l+s);o===-1&&(p=0),l===-1&&(m=e.length);const b=l-o,C={};if(b)for(let f=0;f<=b;f++){const $=f+o;if(!i)C[$]=!0;else if(f===0){const F=e[$-1]?.length;C[$]=[i,(F??0)-i+1]}else if(f===b)C[$]=[0,d];else{const F=e[$-f]?.length;C[$]=[0,F]}}else i===d?C[o]=i?[i,0]:!0:C[o]=[i,(d??0)-(i??0)];return{end:m,markerLines:C,start:p}},Oo=kt.platform==="win32"&&!kt.env?.WT_SESSION?">":"❯",la=(u,e,t)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:f=>f,marker:f=>f,message:f=>f,...t?.color}},n=typeof e.start.column=="number";let r=(u.includes("\r")?ko(u):u).split(`
13
- `);typeof s.tabWidth=="number"&&u.includes(" ")&&(r=r.map(f=>f.replaceAll(" "," ".repeat(s.tabWidth))));const{end:o,markerLines:i,start:l}=No(e,r,s.linesAbove,s.linesBelow),d=String(o).length,{gutter:p,marker:m,message:b}=s.color;let C=r.slice(l,o).map((f,$)=>{const F=l+1+$,w=i[F],_=String(F).padStart(d),h=!i[F+1],g=` ${_}${s.showGutter?" |":""}`;if(w){let a="";if(Array.isArray(w)){const T=f.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),O=w[1]||1;a=[`
14
- `,s.prefix+p(g.replaceAll(/\d/g," "))," ",T,m("^").repeat(O)].join(""),h&&s.message&&(a+=` ${b(s.message)}`)}return[s.prefix+m(Oo),p(g),f.length>0?` ${f}`:"",a].join("")}return`${s.prefix} ${p(g)}${f.length>0?` ${f}`:""}`}).join(`
15
- `);return s.message&&!n&&(C=`${s.prefix+" ".repeat(d+1)+s.message}
16
- ${C}`),C},Nt=(u,e)=>{let t=0,s=e.length-2;for(;t<s;){const n=t+(s-t>>1);if(u<e[n])s=n-1;else if(u>=e[n+1])t=n+1;else{t=n;break}}return t},Lo=/\n|\r(?!\n)/,Po=u=>u.split(Lo).reduce((e,t)=>(e.push(e.at(-1)+t.length+1),e),[0]),ca=(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 n=Po(u),r=Nt(e,n);return{column:e-n[r]+1,line:r+1}}const s=Nt(e,u);return{column:e-u[s]+1,line:s+1}},Ho=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Ho.set("AggregateError",AggregateError);const Io=lr(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mo=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 Io(u)};Mo("node:util");const jo=lr(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=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 jo(u)};rt("node:fs");rt("node:path");rt("node:url");let Da=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 Go=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},Uo=I(import.meta.url),le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=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 Uo(u)};cr("node:fs");cr("node:fs/promises");const zo=I(import.meta.url),ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wo=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 zo(u)};Wo("node:fs");const qo=I(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=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 qo(u)};Xo("node:fs/promises");const Ko=I(import.meta.url),pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vo=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 Ko(u)},{rmSync:Qo}=Vo("node:fs"),fa=(u,e={})=>{bu(u),Qo(u,Go(e))};I(import.meta.url);const Jo=u=>{if(typeof u!="string"&&!(u instanceof ArrayBuffer)&&!ArrayBuffer.isView(u))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},Zo=I(import.meta.url),fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yo=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 Zo(u)},{randomBytes:ui}=Yo("node:crypto"),ei=u=>`${u}.${process.pid.toString(36)}.${ui(6).toString("hex")}.tmp`,ti=new TextEncoder,ri=u=>{if(u instanceof Uint8Array)return u;if(typeof u=="string")return ti.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.")},si=I(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ni=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 si(u)};ni("node:fs/promises");const oi=I(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=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 oi(u)},{mkdirSync:ai,writeFileSync:li,statSync:ci,renameSync:Ot,chownSync:Di,chmodSync:pi,unlinkSync:fi}=ii("node:fs"),Ai=(u,e,t)=>{t={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},bu(u),Jo(e),u=yu(u);const s=Qe(u,ut);if(s&&!t.overwrite)throw new Hr(`file already exists, open '${u}'`);const n=ei(u);try{!s&&t.recursive&&ai(et(u),{recursive:!0});let r;if(li(n,typeof e=="string"?Buffer.from(e,t.encoding??"utf8"):ri(e),{flag:"wx"}),s&&t.backup&&(r=ci(u),t.chown??={gid:r.gid,uid:r.uid},Ot(u,`${u}.bak`)),t.chown)try{Di(n,t.chown.uid,t.chown.gid)}catch{}pi(n,r&&!t.mode?r.mode:t.mode??438),Ot(n,u)}catch(r){throw new Error(`Failed to write file at: ${u} - ${r.message}`,{cause:r})}finally{Qe(n)&&fi(n)}},hi=/^(?:( )+|\t+)/,Be="space";function Lt(u,e,t){return u&&e===Be&&t===1}function Pt(u,e){const t=new Map;let s=0,n,r;for(const o of u.split(/\n/g)){if(!o)continue;const i=o.match(hi);if(i===null)s=0,n="";else{const l=i[0].length,d=i[1]?Be:"tab";if(Lt(e,d,l))continue;d!==n&&(s=0),n=d;let p=1,m=0;const b=l-s;if(s=l,b===0)p=0,m=1;else{const f=Math.abs(b);if(Lt(e,d,f))continue;r=Ei(d,f)}const C=t.get(r);t.set(r,C===void 0?[1,0]:[C[0]+p,C[1]+m])}}return t}function Ei(u,e){return(u===Be?"s":"t")+String(e)}function Ci(u){const e=u[0]==="s"?Be:"tab",t=Number(u.slice(1));return{type:e,amount:t}}function Fi(u){let e,t=0,s=0;for(const[n,[r,o]]of u)(r>t||r===t&&o>s)&&(t=r,s=o,e=n);return e}function gi(u,e){return(u===Be?" ":" ").repeat(e)}function di(u){if(typeof u!="string")throw new TypeError("Expected a string");let e=Pt(u,!0);e.size===0&&(e=Pt(u,!1));const t=Fi(e);let s,n=0,r="";return t!==void 0&&({type:s,amount:n}=Ci(t),r=gi(s,n)),{amount:n,type:s,indent:r}}const mi=I(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yi=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 mi(u)};yi("node:fs/promises");const Bi=I(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=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 Bi(u)},{readFileSync:$i}=bi("node:fs"),Aa=(u,e,t={})=>{const{detectIndent:s,indent:n,replacer:r,stringify:o=JSON.stringify,...i}={indent:" ",...t};let l=n,d=`
20
- `;if(Qe(u,Fr))try{const m=$i(u,"utf8");if(s){const{indent:b}=di(m);l=b}d=m.endsWith(`
21
- `)?`
22
- `:""}catch(m){if(m.code!=="ENOENT")throw m}const p=o(e,r,l);Ai(u,`${p}${d}`,i)},vi=I(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,st=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 vi(u)},wi=st("fs"),xi=st("os"),Si=st("path");var We={},Ht;function _i(){if(Ht)return We;Ht=1;var u=Object.defineProperty,e=(p,m)=>u(p,"name",{value:m,configurable:!0}),t=wi,s=xi,n=Si;const r=e(p=>{let m="";for(let b=0;b<p.length;b+=1){const C=p[b],f=C.toUpperCase();m+=C===f?C.toLowerCase():f}return m},"invertCase"),o=new Map,i=e((p,m)=>{const b=n.join(p,`.is-fs-case-sensitive-test-${process.pid}`);try{return m.writeFileSync(b,""),!m.existsSync(r(b))}finally{try{m.unlinkSync(b)}catch{}}},"checkDirectoryCaseWithWrite"),l=e((p,m,b)=>{try{return i(p,b)}catch(C){if(m===void 0)return i(s.tmpdir(),b);throw C}},"checkDirectoryCaseWithFallback"),d=e((p,m=t,b=!0)=>{const C=p??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=l(C,p,m),b&&o.set(C,f),f},"isFsCaseSensitive");return We.isFsCaseSensitive=d,We}var Ti=_i();const ha=Ti.isFsCaseSensitive;function Ea(u,e,t){const{buffer:s,compression:n,encoding:r="utf8",flag:o,...i}={},l=So(u,{buffer:s,compression:n,encoding:r,flag:o});return typeof e=="function"?it(l,e,i):it(l,i)}var Ri=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ki=/[\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]/,Ni=/[\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]/,qe={Space_Separator:Ri,ID_Start:ki,ID_Continue:Ni},Y={isSpaceSeparator(u){return typeof u=="string"&&qe.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||qe.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==="‍"||qe.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 Je,ou,mu,Te,Su,fu,eu,nt,me;var Oi=function(u,e){Je=String(u),ou="start",mu=[],Te=0,Su=1,fu=0,eu=void 0,nt=void 0,me=void 0;do eu=Li(),Ii[ou]();while(eu.type!=="eof");return typeof e=="function"?Ze({"":me},"",e):me};function Ze(u,e,t){const s=u[e];if(s!=null&&typeof s=="object")if(Array.isArray(s))for(let n=0;n<s.length;n++){const r=String(n),o=Ze(s,r,t);o===void 0?delete s[r]:Object.defineProperty(s,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const n in s){const r=Ze(s,n,t);r===void 0?delete s[n]:Object.defineProperty(s,n,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,e,s)}let N,k,de,du,H;function Li(){for(N="default",k="",de=!1,du=1;;){H=Bu();const u=Dr[N]();if(u)return u}}function Bu(){if(Je[Te])return String.fromCodePoint(Je.codePointAt(Te))}function E(){const u=Bu();return u===`
23
- `?(Su++,fu=0):u?fu+=u.length:fu++,u&&(Te+=u.length),u}const Dr={default(){switch(H){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
24
- `:case"\r":case"\u2028":case"\u2029":E();return;case"/":E(),N="comment";return;case void 0:return E(),W("eof")}if(Y.isSpaceSeparator(H)){E();return}return Dr[ou]()},comment(){switch(H){case"*":E(),N="multiLineComment";return;case"/":E(),N="singleLineComment";return}throw V(E())},multiLineComment(){switch(H){case"*":E(),N="multiLineCommentAsterisk";return;case void 0:throw V(E())}E()},multiLineCommentAsterisk(){switch(H){case"*":E();return;case"/":E(),N="default";return;case void 0:throw V(E())}E(),N="multiLineComment"},singleLineComment(){switch(H){case`
25
- `:case"\r":case"\u2028":case"\u2029":E(),N="default";return;case void 0:return E(),W("eof")}E()},value(){switch(H){case"{":case"[":return W("punctuator",E());case"n":return E(),_u("ull"),W("null",null);case"t":return E(),_u("rue"),W("boolean",!0);case"f":return E(),_u("alse"),W("boolean",!1);case"-":case"+":E()==="-"&&(du=-1),N="sign";return;case".":k=E(),N="decimalPointLeading";return;case"0":k=E(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),N="decimalInteger";return;case"I":return E(),_u("nfinity"),W("numeric",1/0);case"N":return E(),_u("aN"),W("numeric",NaN);case'"':case"'":de=E()==='"',k="",N="string";return}throw V(E())},identifierNameStartEscape(){if(H!=="u")throw V(E());E();const u=Ye();switch(u){case"$":case"_":break;default:if(!Y.isIdStartChar(u))throw It();break}k+=u,N="identifierName"},identifierName(){switch(H){case"$":case"_":case"‌":case"‍":k+=E();return;case"\\":E(),N="identifierNameEscape";return}if(Y.isIdContinueChar(H)){k+=E();return}return W("identifier",k)},identifierNameEscape(){if(H!=="u")throw V(E());E();const u=Ye();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!Y.isIdContinueChar(u))throw It();break}k+=u,N="identifierName"},sign(){switch(H){case".":k=E(),N="decimalPointLeading";return;case"0":k=E(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),N="decimalInteger";return;case"I":return E(),_u("nfinity"),W("numeric",du*(1/0));case"N":return E(),_u("aN"),W("numeric",NaN)}throw V(E())},zero(){switch(H){case".":k+=E(),N="decimalPoint";return;case"e":case"E":k+=E(),N="decimalExponent";return;case"x":case"X":k+=E(),N="hexadecimal";return}return W("numeric",du*0)},decimalInteger(){switch(H){case".":k+=E(),N="decimalPoint";return;case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalPointLeading(){if(Y.isDigit(H)){k+=E(),N="decimalFraction";return}throw V(E())},decimalPoint(){switch(H){case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E(),N="decimalFraction";return}return W("numeric",du*Number(k))},decimalFraction(){switch(H){case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalExponent(){switch(H){case"+":case"-":k+=E(),N="decimalExponentSign";return}if(Y.isDigit(H)){k+=E(),N="decimalExponentInteger";return}throw V(E())},decimalExponentSign(){if(Y.isDigit(H)){k+=E(),N="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(),N="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+=Pi();return;case'"':if(de)return E(),W("string",k);k+=E();return;case"'":if(!de)return E(),W("string",k);k+=E();return;case`
26
- `:case"\r":throw V(E());case"\u2028":case"\u2029":Mi(H);break;case void 0:throw V(E())}k+=E()},start(){switch(H){case"{":case"[":return W("punctuator",E())}N="value"},beforePropertyName(){switch(H){case"$":case"_":k=E(),N="identifierName";return;case"\\":E(),N="identifierNameStartEscape";return;case"}":return W("punctuator",E());case'"':case"'":de=E()==='"',N="string";return}if(Y.isIdStartChar(H)){k+=E(),N="identifierName";return}throw V(E())},afterPropertyName(){if(H===":")return W("punctuator",E());throw V(E())},beforePropertyValue(){N="value"},afterPropertyValue(){switch(H){case",":case"}":return W("punctuator",E())}throw V(E())},beforeArrayValue(){if(H==="]")return W("punctuator",E());N="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 _u(u){for(const e of u){if(Bu()!==e)throw V(E());E()}}function Pi(){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(),Hi();case"u":return E(),Ye();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 Hi(){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 Ye(){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 Ii={start(){if(eu.type==="eof")throw Tu();Xe()},beforePropertyName(){switch(eu.type){case"identifier":case"string":nt=eu.value,ou="afterPropertyName";return;case"punctuator":xe();return;case"eof":throw Tu()}},afterPropertyName(){if(eu.type==="eof")throw Tu();ou="beforePropertyValue"},beforePropertyValue(){if(eu.type==="eof")throw Tu();Xe()},beforeArrayValue(){if(eu.type==="eof")throw Tu();if(eu.type==="punctuator"&&eu.value==="]"){xe();return}Xe()},afterPropertyValue(){if(eu.type==="eof")throw Tu();switch(eu.value){case",":ou="beforePropertyName";return;case"}":xe()}},afterArrayValue(){if(eu.type==="eof")throw Tu();switch(eu.value){case",":ou="beforeArrayValue";return;case"]":xe()}},end(){}};function Xe(){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(me===void 0)me=u;else{const e=mu[mu.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,nt,{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 xe(){mu.pop();const u=mu[mu.length-1];u==null?ou="end":Array.isArray(u)?ou="afterArrayValue":ou="afterPropertyValue"}function V(u){return ot(u===void 0?`JSON5: invalid end of input at ${Su}:${fu}`:`JSON5: invalid character '${pr(u)}' at ${Su}:${fu}`)}function Tu(){return ot(`JSON5: invalid end of input at ${Su}:${fu}`)}function It(){return fu-=5,ot(`JSON5: invalid identifier character at ${Su}:${fu}`)}function Mi(u){console.warn(`JSON5: '${pr(u)}' in strings is not valid ECMAScript; consider escaping`)}function pr(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 ot(u){const e=new SyntaxError(u);return e.lineNumber=Su,e.columnNumber=fu,e}var ji=function(u,e,t){const s=[];let n="",r,o,i="",l;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(t=e.space,l=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 F=$[f];switch(F!=null&&(typeof F.toJSON5=="function"?F=F.toJSON5(f):typeof F.toJSON=="function"&&(F=F.toJSON(f))),o&&(F=o.call($,f,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof F=="string")return p(F);if(typeof F=="number")return String(F);if(typeof F=="object")return Array.isArray(F)?C(F):m(F)}function p(f){const $={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\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 g=f[h];switch(g){case"'":case'"':$[g]++,w+=g;continue;case"\0":if(Y.isDigit(f[h+1])){w+="\\x00";continue}}if(F[g]){w+=F[g];continue}if(g<" "){let a=g.charCodeAt(0).toString(16);w+="\\x"+("00"+a).substring(a.length);continue}w+=g}const _=l||Object.keys($).reduce((h,g)=>$[h]<$[g]?h:g);return w=w.replace(new RegExp(_,"g"),F[_]),_+w+_}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let $=n;n=n+i;let F=r||Object.keys(f),w=[];for(const h of F){const g=d(h,f);if(g!==void 0){let a=b(h)+":";i!==""&&(a+=" "),a+=g,w.push(a)}}let _;if(w.length===0)_="{}";else{let h;if(i==="")h=w.join(","),_="{"+h+"}";else{let g=`,
30
- `+n;h=w.join(g),_=`{
31
- `+n+h+`,
32
- `+$+"}"}}return s.pop(),n=$,_}function b(f){if(f.length===0)return p(f);const $=String.fromCodePoint(f.codePointAt(0));if(!Y.isIdStartChar($))return p(f);for(let F=$.length;F<f.length;F++)if(!Y.isIdContinueChar(String.fromCodePoint(f.codePointAt(F))))return p(f);return f}function C(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let $=n;n=n+i;let F=[];for(let _=0;_<f.length;_++){const h=d(String(_),f);F.push(h!==void 0?h:"null")}let w;if(F.length===0)w="[]";else if(i==="")w="["+F.join(",")+"]";else{let _=`,
33
- `+n,h=F.join(_);w=`[
34
- `+n+h+`,
35
- `+$+"]"}return s.pop(),n=$,w}};const Gi={parse:Oi,stringify:ji};var Ca=Gi;export{Nu as A,Lu as B,ea as F,et as H,hs as I,Gt as J,yu as L,Aa as O,Ai as T,la as U,sa as W,Zi as a,na as b,aa as c,Ji as d,Eo as e,Qe as f,Se as g,Vi as h,Ca as i,Sr as j,Wi as k,ha as l,wr as m,fa as n,qi as o,Da as s,Ea as u,So as v,Xi as w,Ki as y,ca as z};
@@ -1 +0,0 @@
1
- import{createRequire as r}from"node:module";const i=r(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{env:s}=t,o=e=>e in s&&s[e]!=="0"&&s[e]!=="false",_=o("CI")||o("CONTINUOUS_INTEGRATION");export{_ as I};
@@ -1 +0,0 @@
1
- import{m as h,D as k,f as S}from"./provenance-CRBV9cko.js";import{g as $}from"./packument-CtVAoNo7.js";import{H as d}from"./en-C26W78--.js";import{W as N}from"./build-scripts-CfAqHBlq.js";import{n as v}from"./license-t5KnNX6v.js";import{A as R,B as L,v as D}from"./index-2LCHaVNX.js";import{D as A}from"./package-version-TsxLc6w2.js";import"./public-api-WqUCiyIe.js";import{L as w}from"./dependency-scan-DZcSlSFp.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)},P=(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,W=(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(W(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},K=(t,e,n)=>{const s=R(e)?e:L(t,e);let a;try{a=D(s)}catch{return}const r=T(s)??w[n]?.type;if(!r)return;const c=A(a,r);if(c.length===0)return;const i=new Set;for(const o of c)i.add(`${o.name}@${o.version}`);return i},z=(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?K(t.workspaceRoot,a,t.packageManager):void 0,c=e.security?.acceptedRisks,i=[];for(const o of t.packages){const l=s.length===0||z(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?P(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"]}],B=(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=B(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},G=(()=>{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=G.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,P as s};