@visulima/vis 1.0.0-alpha.21 → 1.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE.md +206 -141
  3. package/README.md +21 -4
  4. package/dist/config/index.d.ts +199 -6
  5. package/dist/packem_chunks/bin.js +318 -318
  6. package/dist/packem_chunks/bloom-status.js +2 -0
  7. package/dist/packem_chunks/bloom-sync.js +2 -0
  8. package/dist/packem_chunks/cache-attestation.js +1 -0
  9. package/dist/packem_chunks/config.js +15 -15
  10. package/dist/packem_chunks/fix.js +1 -1
  11. package/dist/packem_chunks/handler.js +1 -1
  12. package/dist/packem_chunks/handler10.js +2 -1
  13. package/dist/packem_chunks/handler11.js +1 -5
  14. package/dist/packem_chunks/handler12.js +5 -1
  15. package/dist/packem_chunks/handler13.js +1 -27
  16. package/dist/packem_chunks/handler14.js +28 -5
  17. package/dist/packem_chunks/handler15.js +5 -1
  18. package/dist/packem_chunks/handler16.js +1 -1
  19. package/dist/packem_chunks/handler17.js +1 -1
  20. package/dist/packem_chunks/handler18.js +1 -1
  21. package/dist/packem_chunks/handler19.js +1 -1
  22. package/dist/packem_chunks/handler2.js +4 -2
  23. package/dist/packem_chunks/handler20.js +1 -5
  24. package/dist/packem_chunks/handler21.js +5 -2
  25. package/dist/packem_chunks/handler22.js +2 -2
  26. package/dist/packem_chunks/handler23.js +2 -18
  27. package/dist/packem_chunks/handler24.js +18 -1
  28. package/dist/packem_chunks/handler25.js +1 -1
  29. package/dist/packem_chunks/handler26.js +1 -5
  30. package/dist/packem_chunks/handler27.js +5 -1
  31. package/dist/packem_chunks/handler28.js +1 -3
  32. package/dist/packem_chunks/handler29.js +3 -1
  33. package/dist/packem_chunks/handler3.js +4 -4
  34. package/dist/packem_chunks/handler30.js +1 -7
  35. package/dist/packem_chunks/handler31.js +6 -32
  36. package/dist/packem_chunks/handler32.js +33 -3
  37. package/dist/packem_chunks/handler33.js +3 -1
  38. package/dist/packem_chunks/handler34.js +1 -26
  39. package/dist/packem_chunks/handler35.js +26 -3
  40. package/dist/packem_chunks/handler36.js +5 -7
  41. package/dist/packem_chunks/handler37.js +6 -6
  42. package/dist/packem_chunks/handler38.js +1 -1
  43. package/dist/packem_chunks/handler39.js +61 -6
  44. package/dist/packem_chunks/handler4.js +6 -8
  45. package/dist/packem_chunks/handler40.js +6 -24
  46. package/dist/packem_chunks/handler41.js +215 -10
  47. package/dist/packem_chunks/handler42.js +24 -153
  48. package/dist/packem_chunks/handler43.js +153 -25
  49. package/dist/packem_chunks/handler44.js +10 -24
  50. package/dist/packem_chunks/handler45.js +25 -213
  51. package/dist/packem_chunks/handler46.js +24 -3
  52. package/dist/packem_chunks/handler47.js +3 -27
  53. package/dist/packem_chunks/handler48.js +21 -161
  54. package/dist/packem_chunks/handler49.js +173 -33
  55. package/dist/packem_chunks/handler5.js +8 -1
  56. package/dist/packem_chunks/handler50.js +34 -0
  57. package/dist/packem_chunks/handler6.js +1 -1
  58. package/dist/packem_chunks/handler7.js +1 -1
  59. package/dist/packem_chunks/handler8.js +1 -1
  60. package/dist/packem_chunks/handler9.js +1 -2
  61. package/dist/packem_chunks/heal-accept.js +1 -1
  62. package/dist/packem_chunks/heal.js +1 -1
  63. package/dist/packem_chunks/help-command.js +16 -16
  64. package/dist/packem_chunks/index.js +2 -2
  65. package/dist/packem_chunks/keys-refresh.js +1 -1
  66. package/dist/packem_chunks/list.js +1 -1
  67. package/dist/packem_chunks/loader.js +4 -1
  68. package/dist/packem_chunks/loader2.js +1 -0
  69. package/dist/packem_chunks/prune.js +1 -1
  70. package/dist/packem_chunks/run.js +1 -1
  71. package/dist/packem_chunks/status.js +1 -1
  72. package/dist/packem_chunks/sync.js +1 -1
  73. package/dist/packem_chunks/sync2.js +1 -1
  74. package/dist/packem_chunks/verify-lockfile.js +2 -0
  75. package/dist/packem_shared/{advisories-DsynpacV.js → advisories-DS8JEB_g.js} +1 -1
  76. package/dist/packem_shared/{ai-analysis-uYuTIIXi.js → ai-analysis-DGBZYlxF.js} +1 -1
  77. package/dist/packem_shared/{ai-cache-DuwHYx2O.js → ai-cache-BjlXWJtl.js} +1 -1
  78. package/dist/packem_shared/{ai-fix-DzrA-dVz.js → ai-fix-BhcTrkuW.js} +6 -6
  79. package/dist/packem_shared/cyclonedx-CO7-Y1B1.js +4 -0
  80. package/dist/packem_shared/dependency-scan-DPHTzA5r.js +1 -0
  81. package/dist/packem_shared/docker-lk0-5Z-i.js +60 -0
  82. package/dist/packem_shared/{failure-log-C3LEMmkq.js → failure-log-DF7nrFIs.js} +1 -1
  83. package/dist/packem_shared/{flakiness-Dq6K4ymq.js → flakiness-DKCOYwN7.js} +1 -1
  84. package/dist/packem_shared/index-B4gpNmrG.js +1 -0
  85. package/dist/packem_shared/license-zZU7aavK.js +1 -0
  86. package/dist/packem_shared/{lifecycle-Dv3nAtoD.js → lifecycle-boYwVQSE.js} +2 -2
  87. package/dist/packem_shared/{min-release-age-BFozFonQ.js → min-release-age-D462DvYM.js} +1 -1
  88. package/dist/packem_shared/{native-config-sync-Dvi1g2nQ.js → native-config-sync-B0_ef78M.js} +9 -9
  89. package/dist/packem_shared/osv-bloom-QSAn2Dcw.js +2 -0
  90. package/dist/packem_shared/provenance-smHa8efI.js +1 -0
  91. package/dist/packem_shared/{registry-keys-CewRFW0e.js → registry-keys-3qaVog76.js} +1 -1
  92. package/dist/packem_shared/resolve-explicit-BgFQHUEP.js +5 -0
  93. package/dist/packem_shared/{run-summary-utils-BaBGP3bo.js → run-summary-utils-DIJV_dUD.js} +1 -1
  94. package/dist/packem_shared/runtime-check-DrMx4Q9L.js +1 -0
  95. package/dist/packem_shared/s1ngularity-CwSBPB3I.js +1 -0
  96. package/dist/packem_shared/signatures-b-jJYoZd.js +2 -0
  97. package/dist/packem_shared/toolchain-OH1PXwbZ.js +5 -0
  98. package/dist/packem_shared/{typosquats-BCeR-sLf.js → typosquats-CJ4o1l7U.js} +1 -1
  99. package/dist/packem_shared/{verify-07kUNTuP.js → verify-CQbzknur.js} +1 -1
  100. package/dist/packem_shared/{vis-update-app-CFrlJ3mW.js → vis-update-app-Bnu1EIgE.js} +1 -1
  101. package/index.d.ts +78 -0
  102. package/index.js +57 -53
  103. package/package.json +22 -12
  104. package/schemas/project.schema.json +37 -7
  105. package/schemas/vis-config.schema.json +2376 -2026
  106. package/dist/packem_shared/cyclonedx-CiHXuG8M.js +0 -4
  107. package/dist/packem_shared/dependency-scan-DC3nAFHS.js +0 -1
  108. package/dist/packem_shared/docker-B-CIN_nj.js +0 -60
  109. package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +0 -5
  110. package/dist/packem_shared/runtime-check-BusAwPb2.js +0 -1
  111. package/dist/packem_shared/signatures-5ZdjJ2Pu.js +0 -2
  112. package/dist/packem_shared/toolchain-Cc3cwyLP.js +0 -5
@@ -0,0 +1,60 @@
1
+ var pa=Object.defineProperty;var c=(h,n)=>pa(h,"name",{value:n,configurable:!0});import{createRequire as da}from"node:module";import{b as va,K as ci,M as Be,n as Do,B as Ji,i as Aa,z as ba}from"../packem_chunks/config.js";import{bF as Ca,bG as $a}from"../packem_chunks/bin.js";const ha=da(import.meta.url),vr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ga=c(h=>{if(typeof vr<"u"&&vr.versions&&vr.versions.node){const[n,m]=vr.versions.node.split(".").map(Number);if(n>22||n===22&&m>=3||n===20&&m>=16)return vr.getBuiltinModule(h)}return ha(h)},"__cjs_getBuiltinModule"),{cpSync:No,lstatSync:ma,readdirSync:ya,existsSync:Mo,rmSync:si,readFileSync:Vi}=ga("node:fs");var Sa=Object.defineProperty,Ea=c((h,n)=>Sa(h,"name",{value:n,configurable:!0}),"t");class ft extends Error{static{c(this,"LockfilePruneError")}static{Ea(this,"LockfilePruneError")}constructor(n){super(n),this.name="LockfilePruneError"}}var wa=Object.defineProperty,Bt=c((h,n)=>wa(h,"name",{value:n,configurable:!0}),"p$2");const qo=Bt(h=>{let n=h.startsWith("/")?h.slice(1):h;const m=n.indexOf("(");return m!==-1&&(n=n.slice(0,m)),n},"canonicalKey"),ka=Bt((h,n)=>{if(!(n.startsWith("link:")||n.startsWith("file:")||n.startsWith("workspace:")))return`${h}@${n}`},"resolveDepKey"),xa=Bt(h=>{const n=[];for(const m of[h.dependencies,h.devDependencies,h.optionalDependencies])if(m)for(const[y,$]of Object.entries(m))$?.version&&n.push({name:y,version:$.version});return n},"collectImporterDeps"),Gi=Bt(h=>{const n=[];for(const m of[h.dependencies,h.optionalDependencies])if(m)for(const[y,$]of Object.entries(m))typeof $=="string"&&n.push({name:y,version:$});return n},"collectPackageDeps"),Ki=Bt(h=>{const n=new Map;if(!h)return n;for(const m of Object.keys(h)){const y=qo(m),$=n.get(y);$?$.push(m):n.set(y,[m])}return n},"buildKeyIndex"),Yo=Bt(h=>{const n=h.displayName??"pnpm-lock.yaml",m=typeof h.lockfileContent=="string"?h.lockfileContent:h.lockfileContent.toString("utf8");let y;try{y=Ca(m)}catch(oe){throw new ft(`${n}: parse failed — ${oe.message}`)}const $=Bt(oe=>oe.packages?Object.keys(oe.packages).length:0,"packageCount");let a;for(const oe of y){const[T]=oe.errors;if(T)throw new ft(`${n}: parse failed — ${T.message}`);const ne=oe.toJS();if(!ne||typeof ne!="object")continue;const me=ne;(a===void 0||$(me)>$(a))&&(a=me)}if(a===void 0)throw new ft(`${n}: top-level value is not an object`);const g=a.importers??{},e=Ki(a.packages),b=Ki(a.snapshots),x=new Set(["."]);for(const oe of h.closure)x.add(oe.relativeRoot===""?".":oe.relativeRoot);const A={};for(const[oe,T]of Object.entries(g))x.has(oe)&&(A[oe]=T);const S=new Set,O=new Set,F=[];for(const oe of Object.values(A))for(const T of xa(oe))F.push(T);for(;F.length>0;){const{name:oe,version:T}=F.shift(),ne=ka(oe,T);if(!ne)continue;const me=qo(ne),U=b.get(me)??b.get(ne)??[];for(const be of U){if(O.has(be))continue;O.add(be);const ye=a.snapshots?.[be];if(ye)for(const je of Gi(ye))F.push(je)}const ue=e.get(me)??e.get(ne)??[];for(const be of ue){if(S.has(be))continue;S.add(be);const ye=a.packages?.[be];if(ye&&!a.snapshots)for(const je of Gi(ye))F.push(je)}}const C={lockfileVersion:a.lockfileVersion};for(const oe of["settings","overrides","patchedDependencies","catalogs"])a[oe]!==void 0&&(C[oe]=a[oe]);if(C.importers=A,a.packages){const oe={};for(const T of Object.keys(a.packages))S.has(T)&&(oe[T]=a.packages[T]);C.packages=oe}if(a.snapshots){const oe={};for(const T of Object.keys(a.snapshots))O.has(T)&&(oe[T]=a.snapshots[T]);C.snapshots=oe}const v=Object.keys(a.packages??{}).length,E=Object.keys(C.packages??{}).length,X=v-E,ge=Object.keys(g).length-Object.keys(A).length;return{content:$a(C,{lineWidth:0}),message:`${n}: kept ${E}/${v} packages and ${Object.keys(A).length} importers (dropped ${X} packages, ${ge} importers)`,status:"pruned"}},"prunePnpmLockfile");var Oa=Object.defineProperty,ja=c((h,n)=>Oa(h,"name",{value:n,configurable:!0}),"p$1");const _a=ja(h=>Yo({...h,displayName:h.displayName??"aube-lock.yaml"}),"pruneAubeLockfile");var Ta=Object.defineProperty,Sr=c((h,n)=>Ta(h,"name",{value:n,configurable:!0}),"p");const Ra=Sr(h=>{let n="",m=!1,y=!1,$=!1;for(let a=0;a<h.length;a+=1){const g=h[a],e=h[a+1];if(y){g===`
2
+ `&&(y=!1,n+=g);continue}if($){g==="*"&&e==="/"&&($=!1,a+=1);continue}if(m){if(g==="\\"){n+=g,e!==void 0&&(n+=e,a+=1);continue}g==='"'&&(m=!1),n+=g;continue}if(g==='"'){m=!0,n+=g;continue}if(g==="/"&&e==="/"){y=!0,a+=1;continue}if(g==="/"&&e==="*"){$=!0,a+=1;continue}n+=g}return n},"stripJsonComments"),La=Sr(h=>{const n=[];for(const m of[h.dependencies,h.devDependencies,h.optionalDependencies,h.peerDependencies])if(m)for(const[y,$]of Object.entries(m))typeof $=="string"&&n.push({name:y,spec:$});return n},"collectWorkspaceDeps"),Fa=Sr(h=>{for(const n of h)if(typeof n=="object"&&!Array.isArray(n))return n},"extractMetadata"),Pa=Sr(h=>{if(!h)return[];const n=[];for(const m of["dependencies","optionalDependencies","peerDependencies"]){const y=h[m];y!==null&&typeof y=="object"&&!Array.isArray(y)&&n.push(...Object.keys(y))}return n},"collectMetadataDeps"),Ia=Sr(h=>{if(Buffer.isBuffer(h.lockfileContent))return{message:"bun.lockb is binary; run `bun install --save-text-lockfile` to regenerate as bun.lock, then rerun `vis docker scaffold`.",status:"skipped"};const n=Ra(h.lockfileContent);let m;try{m=JSON.parse(n)}catch(v){throw new ft(`bun.lock: parse failed — ${v.message}`)}if(!m||typeof m!="object")throw new ft("bun.lock: top-level value is not an object");const y=m.workspaces??{},$=m.packages??{},a=new Set([""]);for(const v of h.closure)a.add(v.relativeRoot===""?"":v.relativeRoot);const g={},e=[];for(const[v,E]of Object.entries(y))a.has(v)&&(g[v]=E,e.push(...La(E)));const b=new Set;for(const{name:v}of e)b.add(v);const x=[...b];for(;x.length>0;){const v=x.shift();for(const E of Object.keys($)){if(E.split("/")[0]!==v&&E!==v)continue;const X=Fa($[E]);for(const ge of Pa(X))b.has(ge)||(b.add(ge),x.push(ge))}}const A={};for(const[v,E]of Object.entries($)){const X=v.split("/")[0];(b.has(X)||b.has(v))&&(A[v]=E)}const S={...m,packages:A,workspaces:g},O=Object.keys($).length,F=Object.keys(A).length,C=O-F;return{content:`${JSON.stringify(S,null,2)}
3
+ `,message:`bun.lock: kept ${F}/${O} packages (dropped ${C})`,status:"pruned"}},"pruneBunLockfile");var Na=Object.defineProperty,li=c((h,n)=>Na(h,"name",{value:n,configurable:!0}),"g");const _n="node_modules/",Ma=li((h,n,m)=>{let y=n;for(;;){const $=y===""?`${_n}${m}`:`${y}/${_n}${m}`;if(h[$]!==void 0)return $;if(y==="")return;const a=y.lastIndexOf(`/${_n.slice(0,-1)}/`);y=a===-1?"":y.slice(0,a)}},"resolveDep"),Da=li(h=>{const n=[];for(const m of[h.dependencies,h.devDependencies,h.optionalDependencies,h.peerDependencies])if(m)for(const y of Object.keys(m))n.push(y);return n},"collectDepNames"),qa=li(h=>{const n=typeof h.lockfileContent=="string"?h.lockfileContent:h.lockfileContent.toString("utf8");let m;try{m=JSON.parse(n)}catch(F){throw new ft(`package-lock.json: parse failed — ${F.message}`)}if(!m||typeof m!="object")throw new ft("package-lock.json: top-level value is not an object");const y=m.packages??{},$=new Set([""]);for(const F of h.closure)F.relativeRoot!==""&&$.add(F.relativeRoot);const a=new Set,g=[];for(const F of Object.keys(y))$.has(F)&&(a.add(F),g.push(F));for(const[F,C]of Object.entries(y))C.link===!0&&typeof C.resolved=="string"&&$.has(C.resolved)&&a.add(F);for(;g.length>0;){const F=g.shift(),C=y[F];if(C)for(const v of Da(C)){const E=Ma(y,F,v);if(!E||a.has(E))continue;a.add(E);const X=y[E];X.link===!0&&typeof X.resolved=="string"&&y[X.resolved]!==void 0&&!a.has(X.resolved)?(a.add(X.resolved),g.push(X.resolved)):g.push(E)}}const e={};for(const F of Object.keys(y))a.has(F)&&(e[F]=y[F]);const b=e[""];b&&Array.isArray(b.workspaces)&&(b.workspaces=b.workspaces.filter(F=>{if(typeof F!="string")return!1;const C=F.replace(/\/?\*+$/,"").replace(/\/$/,"");if(C===""||C==="*")return!0;for(const v of $)if(v===F||v===C||v.startsWith(`${C}/`))return!0;return!1}));const x={...m,packages:e};delete x.dependencies;const A=Object.keys(y).length,S=Object.keys(e).length,O=A-S;return{content:`${JSON.stringify(x,null,2)}
4
+ `,message:`package-lock.json: kept ${S}/${A} entries (dropped ${O})`,status:"pruned"}},"pruneNpmLockfile");var Tn={},Fe={},Rn,Qi;function Ya(){if(Qi)return Rn;Qi=1;var h=Object.defineProperty,n=c((a,g)=>h(a,"name",{value:g,configurable:!0}),"a");function m(a,g){function e(){this.constructor=a}c(e,"s"),n(e,"ctor"),e.prototype=g.prototype,a.prototype=new e}c(m,"peg$subclass"),n(m,"peg$subclass");function y(a,g,e,b){this.message=a,this.expected=g,this.found=e,this.location=b,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),m(y,Error),y.buildMessage=function(a,g){var e={literal:n(function(C){return'"'+x(C.text)+'"'},"literal"),class:n(function(C){var v="",E;for(E=0;E<C.parts.length;E++)v+=C.parts[E]instanceof Array?A(C.parts[E][0])+"-"+A(C.parts[E][1]):A(C.parts[E]);return"["+(C.inverted?"^":"")+v+"]"},"class"),any:n(function(C){return"any character"},"any"),end:n(function(C){return"end of input"},"end"),other:n(function(C){return C.description},"other")};function b(C){return C.charCodeAt(0).toString(16).toUpperCase()}c(b,"T"),n(b,"hex");function x(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(x,"q"),n(x,"literalEscape");function A(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(A,"_"),n(A,"classEscape");function S(C){return e[C.type](C)}c(S,"re"),n(S,"describeExpectation");function O(C){var v=new Array(C.length),E,X;for(E=0;E<C.length;E++)v[E]=S(C[E]);if(v.sort(),v.length>0){for(E=1,X=1;E<v.length;E++)v[E-1]!==v[E]&&(v[X]=v[E],X++);v.length=X}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"le"),n(O,"describeExpected");function F(C){return C?'"'+x(C)+'"':"end of input"}return c(F,"te"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(g)+" found."};function $(a,g){g=g!==void 0?g:{};var e={},b={Start:pn},x=pn,A=n(function(t){return t||[]},"peg$c0"),S=n(function(t,o,u){return[{command:t,type:o}].concat(u||[])},"peg$c1"),O=n(function(t,o){return[{command:t,type:o||";"}]},"peg$c2"),F=n(function(t){return t},"peg$c3"),C=";",v=ce(";",!1),E="&",X=ce("&",!1),ge=n(function(t,o){return o?{chain:t,then:o}:{chain:t}},"peg$c8"),oe=n(function(t,o){return{type:t,line:o}},"peg$c9"),T="&&",ne=ce("&&",!1),me="||",U=ce("||",!1),ue=n(function(t,o){return o?{...t,then:o}:t},"peg$c14"),be=n(function(t,o){return{type:t,chain:o}},"peg$c15"),ye="|&",je=ce("|&",!1),Me="|",De=ce("|",!1),qe="=",rt=ce("=",!1),Ee=n(function(t,o){return{name:t,args:[o]}},"peg$c22"),He=n(function(t){return{name:t,args:[]}},"peg$c23"),Ke="(",Qe=ce("(",!1),re=")",Pe=ce(")",!1),We=n(function(t,o){return{type:"subshell",subshell:t,args:o}},"peg$c28"),ke="{",xe=ce("{",!1),$e="}",Le=ce("}",!1),Ae=n(function(t,o){return{type:"group",group:t,args:o}},"peg$c33"),Ye=n(function(t,o){return{type:"command",args:o,envs:t}},"peg$c34"),Ue=n(function(t){return{type:"envs",envs:t}},"peg$c35"),Ve=n(function(t){return t},"peg$c36"),Je=n(function(t){return t},"peg$c37"),Y=/^[0-9]/,W=Ze([["0","9"]],!1,!1),se=n(function(t,o,u){return{type:"redirection",subtype:o,fd:t!==null?parseInt(t):null,args:[u]}},"peg$c40"),Ce=">>",nt=ce(">>",!1),at=">&",st=ce(">&",!1),At=">",Ge=ce(">",!1),pt="<<<",et=ce("<<<",!1),ze="<&",dt=ce("<&",!1),bt="<",ht=ce("<",!1),r=n(function(t){return{type:"argument",segments:[].concat(...t)}},"peg$c53"),_=n(function(t){return t},"peg$c54"),R="$'",z=ce("$'",!1),B="'",l=ce("'",!1),w=n(function(t){return[{type:"text",text:t}]},"peg$c59"),L='""',P=ce('""',!1),q=n(function(){return{type:"text",text:""}},"peg$c62"),V='"',I=ce('"',!1),Z=n(function(t){return t},"peg$c65"),J=n(function(t){return{type:"arithmetic",arithmetic:t,quoted:!0}},"peg$c66"),ie=n(function(t){return{type:"shell",shell:t,quoted:!0}},"peg$c67"),ve=n(function(t){return{type:"variable",...t,quoted:!0}},"peg$c68"),fe=n(function(t){return{type:"text",text:t}},"peg$c69"),_e=n(function(t){return{type:"arithmetic",arithmetic:t,quoted:!1}},"peg$c70"),Qr=n(function(t){return{type:"shell",shell:t,quoted:!1}},"peg$c71"),zr=n(function(t){return{type:"variable",...t,quoted:!1}},"peg$c72"),wr=n(function(t){return{type:"glob",pattern:t}},"peg$c73"),Ut=/^[^']/,Wt=Ze(["'"],!0,!1),wt=n(function(t){return t.join("")},"peg$c76"),kr=/^[^$"]/,xr=Ze(["$",'"'],!0,!1),tr=`\\
5
+ `,Zr=ce(`\\
6
+ `,!1),Xr=n(function(){return""},"peg$c81"),kt="\\",xt=ce("\\",!1),en=/^[\\$"`]/,Or=Ze(["\\","$",'"',"`"],!1,!1),ut=n(function(t){return t},"peg$c86"),jr="\\a",_r=ce("\\a",!1),Tr=n(function(){return"a"},"peg$c89"),rr="\\b",tn=ce("\\b",!1),rn=n(function(){return"\b"},"peg$c92"),nn=/^[Ee]/,on=Ze(["E","e"],!1,!1),an=n(function(){return"\x1B"},"peg$c95"),p="\\f",he=ce("\\f",!1),Vt=n(function(){return"\f"},"peg$c98"),tt="\\n",nr=ce("\\n",!1),te=n(function(){return`
7
+ `},"peg$c101"),Ft="\\r",ir=ce("\\r",!1),sn=n(function(){return"\r"},"peg$c104"),Rr="\\t",un=ce("\\t",!1),we=n(function(){return" "},"peg$c107"),it="\\v",Lr=ce("\\v",!1),Fr=n(function(){return"\v"},"peg$c110"),Ct=/^[\\'"?]/,or=Ze(["\\","'",'"',"?"],!1,!1),gt=n(function(t){return String.fromCharCode(parseInt(t,16))},"peg$c113"),ae="\\x",Pr=ce("\\x",!1),Jt="\\u",ar=ce("\\u",!1),sr="\\U",ur=ce("\\U",!1),cr=n(function(t){return String.fromCodePoint(parseInt(t,16))},"peg$c120"),lr=/^[0-7]/,Pt=Ze([["0","7"]],!1,!1),Ot=/^[0-9a-fA-f]/,Ir=Ze([["0","9"],["a","f"],["A","f"]],!1,!1),mt=Ei(),jt="{}",fr=ce("{}",!1),$t=n(function(){return"{}"},"peg$c128"),It="-",Nt=ce("-",!1),_t="+",St=ce("+",!1),pr=".",Nr=ce(".",!1),Mt=n(function(t,o,u){return{type:"number",value:(t==="-"?-1:1)*parseFloat(o.join("")+"."+u.join(""))}},"peg$c135"),Mr=n(function(t,o){return{type:"number",value:(t==="-"?-1:1)*parseInt(o.join(""))}},"peg$c136"),dr=n(function(t){return{type:"variable",...t}},"peg$c137"),Dt=n(function(t){return{type:"variable",name:t}},"peg$c138"),Te=n(function(t){return t},"peg$c139"),Dr="*",ct=ce("*",!1),lt="/",hr=ce("/",!1),qt=n(function(t,o,u){return{type:o==="*"?"multiplication":"division",right:u}},"peg$c144"),s=n(function(t,o){return o.reduce((u,f)=>({left:u,...f}),t)},"peg$c145"),d=n(function(t,o,u){return{type:o==="+"?"addition":"subtraction",right:u}},"peg$c146"),j="$((",G=ce("$((",!1),H="))",ee=ce("))",!1),pe=n(function(t){return t},"peg$c151"),Se="$(",Tt=ce("$(",!1),Vo=n(function(t){return t},"peg$c154"),yt="${",gr=ce("${",!1),fi=":-",Jo=ce(":-",!1),Go=n(function(t,o){return{name:t,defaultValue:o}},"peg$c159"),pi=":-}",Ko=ce(":-}",!1),Qo=n(function(t){return{name:t,defaultValue:[]}},"peg$c162"),di=":+",zo=ce(":+",!1),Zo=n(function(t,o){return{name:t,alternativeValue:o}},"peg$c165"),hi=":+}",Xo=ce(":+}",!1),ea=n(function(t){return{name:t,alternativeValue:[]}},"peg$c168"),gi=n(function(t){return{name:t}},"peg$c169"),ta="$",ra=ce("$",!1),na=n(function(t){return g.isGlobPattern(t)},"peg$c172"),ia=n(function(t){return t},"peg$c173"),mi=/^[a-zA-Z0-9_]/,yi=Ze([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),vi=n(function(){return Si()},"peg$c176"),Ai=/^[$@*?#a-zA-Z0-9_\-]/,bi=Ze(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),oa=/^[()}<>$|&; \t"']/,aa=Ze(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),sa=/^[<>&; \t"']/,ua=Ze(["<",">","&",";"," "," ",'"',"'"],!1,!1),Ci=/^[ \t]/,$i=Ze([" "," "],!1,!1),i=0,K=0,qr=[{line:1,column:1}],vt=0,cn=[],N=0,Yr;if("startRule"in g){if(!(g.startRule in b))throw new Error(`Can't start parsing from rule "`+g.startRule+'".');x=b[g.startRule]}function Si(){return a.substring(K,i)}c(Si,"Di"),n(Si,"text");function ca(){return Gt(K,i)}c(ca,"er"),n(ca,"location");function la(t,o){throw o=o!==void 0?o:Gt(K,i),fn([ki(t)],a.substring(K,i),o)}c(la,"sr"),n(la,"expected");function fa(t,o){throw o=o!==void 0?o:Gt(K,i),xi(t,o)}c(fa,"fr"),n(fa,"error");function ce(t,o){return{type:"literal",text:t,ignoreCase:o}}c(ce,"$"),n(ce,"peg$literalExpectation");function Ze(t,o,u){return{type:"class",parts:t,inverted:o,ignoreCase:u}}c(Ze,"y"),n(Ze,"peg$classExpectation");function Ei(){return{type:"any"}}c(Ei,"Qi"),n(Ei,"peg$anyExpectation");function wi(){return{type:"end"}}c(wi,"Ri"),n(wi,"peg$endExpectation");function ki(t){return{type:"other",description:t}}c(ki,"Vi"),n(ki,"peg$otherExpectation");function ln(t){var o=qr[t],u;if(o)return o;for(u=t-1;!qr[u];)u--;for(o=qr[u],o={line:o.line,column:o.column};u<t;)a.charCodeAt(u)===10?(o.line++,o.column=1):o.column++,u++;return qr[t]=o,o}c(ln,"bs"),n(ln,"peg$computePosDetails");function Gt(t,o){var u=ln(t),f=ln(o);return{start:{offset:t,line:u.line,column:u.column},end:{offset:o,line:f.line,column:f.column}}}c(Gt,"Z"),n(Gt,"peg$computeLocation");function D(t){i<vt||(i>vt&&(vt=i,cn=[]),cn.push(t))}c(D,"g"),n(D,"peg$fail");function xi(t,o){return new y(t,null,null,o)}c(xi,"Ii"),n(xi,"peg$buildSimpleError");function fn(t,o,u){return new y(y.buildMessage(t,o),t,o,u)}c(fn,"ms"),n(fn,"peg$buildStructuredError");function pn(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(u=Kt(),u===e&&(u=null),u!==e?(K=t,o=A(u),t=o):(i=t,t=e)):(i=t,t=e),t}c(pn,"ys"),n(pn,"peg$parseStart");function Kt(){var t,o,u,f,k;if(t=i,o=Br(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=dn(),f!==e?(k=Oi(),k===e&&(k=null),k!==e?(K=t,o=S(o,f,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;if(t===e)if(t=i,o=Br(),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();u!==e?(f=dn(),f===e&&(f=null),f!==e?(K=t,o=O(o,f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;return t}c(Kt,"H"),n(Kt,"peg$parseShellLine");function Oi(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=Kt(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=F(u),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;return t}c(Oi,"Li"),n(Oi,"peg$parseShellLineThen");function dn(){var t;return a.charCodeAt(i)===59?(t=C,i++):(t=e,N===0&&D(v)),t===e&&(a.charCodeAt(i)===38?(t=E,i++):(t=e,N===0&&D(X))),t}c(dn,"xs"),n(dn,"peg$parseShellLineType");function Br(){var t,o,u;return t=i,o=hn(),o!==e?(u=ji(),u===e&&(u=null),u!==e?(K=t,o=ge(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(Br,"oe"),n(Br,"peg$parseCommandLine");function ji(){var t,o,u,f,k,M,le;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=_i(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Br(),k!==e){for(M=[],le=Q();le!==e;)M.push(le),le=Q();M!==e?(K=t,o=oe(u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;return t}c(ji,"ji"),n(ji,"peg$parseCommandLineThen");function _i(){var t;return a.substr(i,2)===T?(t=T,i+=2):(t=e,N===0&&D(ne)),t===e&&(a.substr(i,2)===me?(t=me,i+=2):(t=e,N===0&&D(U))),t}c(_i,"qi"),n(_i,"peg$parseCommandLineType");function hn(){var t,o,u;return t=i,o=Li(),o!==e?(u=Ti(),u===e&&(u=null),u!==e?(K=t,o=ue(o,u),t=o):(i=t,t=e)):(i=t,t=e),t}c(hn,"Ss"),n(hn,"peg$parseCommandChain");function Ti(){var t,o,u,f,k,M,le;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(u=Ri(),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=hn(),k!==e){for(M=[],le=Q();le!==e;)M.push(le),le=Q();M!==e?(K=t,o=be(u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;return t}c(Ti,"_i"),n(Ti,"peg$parseCommandChainThen");function Ri(){var t;return a.substr(i,2)===ye?(t=ye,i+=2):(t=e,N===0&&D(je)),t===e&&(a.charCodeAt(i)===124?(t=Me,i++):(t=e,N===0&&D(De))),t}c(Ri,"zi"),n(Ri,"peg$parseCommandChainType");function mr(){var t,o,u,f,k,M;if(t=i,o=kn(),o!==e)if(a.charCodeAt(i)===61?(u=qe,i++):(u=e,N===0&&D(rt)),u!==e)if(f=yn(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(K=t,o=Ee(o,f),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;else i=t,t=e;if(t===e)if(t=i,o=kn(),o!==e)if(a.charCodeAt(i)===61?(u=qe,i++):(u=e,N===0&&D(rt)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=He(o),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e;return t}c(mr,"fe"),n(mr,"peg$parseVariableAssignment");function Li(){var t,o,u,f,k,M,le,de,Re,Ie,ot;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(a.charCodeAt(i)===40?(u=Ke,i++):(u=e,N===0&&D(Qe)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Kt(),k!==e){for(M=[],le=Q();le!==e;)M.push(le),le=Q();if(M!==e)if(a.charCodeAt(i)===41?(le=re,i++):(le=e,N===0&&D(Pe)),le!==e){for(de=[],Re=Q();Re!==e;)de.push(Re),Re=Q();if(de!==e){for(Re=[],Ie=Qt();Ie!==e;)Re.push(Ie),Ie=Qt();if(Re!==e){for(Ie=[],ot=Q();ot!==e;)Ie.push(ot),ot=Q();Ie!==e?(K=t,o=We(k,Re),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e)if(a.charCodeAt(i)===123?(u=ke,i++):(u=e,N===0&&D(xe)),u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e)if(k=Kt(),k!==e){for(M=[],le=Q();le!==e;)M.push(le),le=Q();if(M!==e)if(a.charCodeAt(i)===125?(le=$e,i++):(le=e,N===0&&D(Le)),le!==e){for(de=[],Re=Q();Re!==e;)de.push(Re),Re=Q();if(de!==e){for(Re=[],Ie=Qt();Ie!==e;)Re.push(Ie),Ie=Qt();if(Re!==e){for(Ie=[],ot=Q();ot!==e;)Ie.push(ot),ot=Q();Ie!==e?(K=t,o=Ae(k,Re),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e}else i=t,t=e;else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){for(u=[],f=mr();f!==e;)u.push(f),f=mr();if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();if(f!==e){if(k=[],M=mn(),M!==e)for(;M!==e;)k.push(M),M=mn();else k=e;if(k!==e){for(M=[],le=Q();le!==e;)M.push(le),le=Q();M!==e?(K=t,o=Ye(u,k),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}else i=t,t=e}else i=t,t=e;if(t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){if(u=[],f=mr(),f!==e)for(;f!==e;)u.push(f),f=mr();else u=e;if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=Ue(u),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e}}}return t}c(Li,"Gi"),n(Li,"peg$parseCommand");function gn(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e){if(u=[],f=yr(),f!==e)for(;f!==e;)u.push(f),f=yr();else u=e;if(u!==e){for(f=[],k=Q();k!==e;)f.push(k),k=Q();f!==e?(K=t,o=Ve(u),t=o):(i=t,t=e)}else i=t,t=e}else i=t,t=e;return t}c(gn,"Es"),n(gn,"peg$parseCommandString");function mn(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();if(o!==e?(u=Qt(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e),t===e){for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();o!==e?(u=yr(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e)}return t}c(mn,"Fs"),n(mn,"peg$parseArgument");function Qt(){var t,o,u,f,k;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(Y.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(W)),u===e&&(u=null),u!==e?(f=Fi(),f!==e?(k=yr(),k!==e?(K=t,o=se(u,f,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Qt,"U"),n(Qt,"peg$parseRedirectArgument");function Fi(){var t;return a.substr(i,2)===Ce?(t=Ce,i+=2):(t=e,N===0&&D(nt)),t===e&&(a.substr(i,2)===at?(t=at,i+=2):(t=e,N===0&&D(st)),t===e&&(a.charCodeAt(i)===62?(t=At,i++):(t=e,N===0&&D(Ge)),t===e&&(a.substr(i,3)===pt?(t=pt,i+=3):(t=e,N===0&&D(et)),t===e&&(a.substr(i,2)===ze?(t=ze,i+=2):(t=e,N===0&&D(dt)),t===e&&(a.charCodeAt(i)===60?(t=bt,i++):(t=e,N===0&&D(ht))))))),t}c(Fi,"Zi"),n(Fi,"peg$parseRedirectType");function yr(){var t,o,u;for(t=i,o=[],u=Q();u!==e;)o.push(u),u=Q();return o!==e?(u=yn(),u!==e?(K=t,o=Je(u),t=o):(i=t,t=e)):(i=t,t=e),t}c(yr,"ie"),n(yr,"peg$parseValueArgument");function yn(){var t,o,u;if(t=i,o=[],u=vn(),u!==e)for(;u!==e;)o.push(u),u=vn();else o=e;return o!==e&&(K=t,o=r(o)),t=o,t}c(yn,"Ts"),n(yn,"peg$parseStrictValueArgument");function vn(){var t,o;return t=i,o=Pi(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Ii(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Ni(),o!==e&&(K=t,o=_(o)),t=o,t===e&&(t=i,o=Mi(),o!==e&&(K=t,o=_(o)),t=o))),t}c(vn,"Ps"),n(vn,"peg$parseArgumentSegment");function Pi(){var t,o,u,f;return t=i,a.substr(i,2)===R?(o=R,i+=2):(o=e,N===0&&D(z)),o!==e?(u=Yi(),u!==e?(a.charCodeAt(i)===39?(f=B,i++):(f=e,N===0&&D(l)),f!==e?(K=t,o=w(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Pi,"Hi"),n(Pi,"peg$parseCQuoteString");function Ii(){var t,o,u,f;return t=i,a.charCodeAt(i)===39?(o=B,i++):(o=e,N===0&&D(l)),o!==e?(u=Di(),u!==e?(a.charCodeAt(i)===39?(f=B,i++):(f=e,N===0&&D(l)),f!==e?(K=t,o=w(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(Ii,"Ui"),n(Ii,"peg$parseSglQuoteString");function Ni(){var t,o,u,f;if(t=i,a.substr(i,2)===L?(o=L,i+=2):(o=e,N===0&&D(P)),o!==e&&(K=t,o=q()),t=o,t===e)if(t=i,a.charCodeAt(i)===34?(o=V,i++):(o=e,N===0&&D(I)),o!==e){for(u=[],f=An();f!==e;)u.push(f),f=An();u!==e?(a.charCodeAt(i)===34?(f=V,i++):(f=e,N===0&&D(I)),f!==e?(K=t,o=Z(u),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;return t}c(Ni,"ki"),n(Ni,"peg$parseDblQuoteString");function Mi(){var t,o,u;if(t=i,o=[],u=bn(),u!==e)for(;u!==e;)o.push(u),u=bn();else o=e;return o!==e&&(K=t,o=Z(o)),t=o,t}c(Mi,"Mi"),n(Mi,"peg$parsePlainString");function An(){var t,o;return t=i,o=En(),o!==e&&(K=t,o=J(o)),t=o,t===e&&(t=i,o=wn(),o!==e&&(K=t,o=ie(o)),t=o,t===e&&(t=i,o=Vr(),o!==e&&(K=t,o=ve(o)),t=o,t===e&&(t=i,o=qi(),o!==e&&(K=t,o=fe(o)),t=o))),t}c(An,"Ds"),n(An,"peg$parseDblQuoteStringSegment");function bn(){var t,o;return t=i,o=En(),o!==e&&(K=t,o=_e(o)),t=o,t===e&&(t=i,o=wn(),o!==e&&(K=t,o=Qr(o)),t=o,t===e&&(t=i,o=Vr(),o!==e&&(K=t,o=zr(o)),t=o,t===e&&(t=i,o=Ui(),o!==e&&(K=t,o=wr(o)),t=o,t===e&&(t=i,o=Hi(),o!==e&&(K=t,o=fe(o)),t=o)))),t}c(bn,"Qs"),n(bn,"peg$parsePlainStringSegment");function Di(){var t,o,u;for(t=i,o=[],Ut.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Wt));u!==e;)o.push(u),Ut.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Wt));return o!==e&&(K=t,o=wt(o)),t=o,t}c(Di,"Ni"),n(Di,"peg$parseSglQuoteStringText");function qi(){var t,o,u;if(t=i,o=[],u=Cn(),u===e&&(kr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(xr))),u!==e)for(;u!==e;)o.push(u),u=Cn(),u===e&&(kr.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(xr)));else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(qi,"Bi"),n(qi,"peg$parseDblQuoteStringText");function Cn(){var t,o,u;return t=i,a.substr(i,2)===tr?(o=tr,i+=2):(o=e,N===0&&D(Zr)),o!==e&&(K=t,o=Xr()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(en.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Or)),u!==e?(K=t,o=ut(u),t=o):(i=t,t=e)):(i=t,t=e)),t}c(Cn,"Rs"),n(Cn,"peg$parseDblQuoteEscapedChar");function Yi(){var t,o,u;for(t=i,o=[],u=$n(),u===e&&(Ut.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Wt)));u!==e;)o.push(u),u=$n(),u===e&&(Ut.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(Wt)));return o!==e&&(K=t,o=wt(o)),t=o,t}c(Yi,"Oi"),n(Yi,"peg$parseCQuoteStringText");function $n(){var t,o,u;return t=i,a.substr(i,2)===jr?(o=jr,i+=2):(o=e,N===0&&D(_r)),o!==e&&(K=t,o=Tr()),t=o,t===e&&(t=i,a.substr(i,2)===rr?(o=rr,i+=2):(o=e,N===0&&D(tn)),o!==e&&(K=t,o=rn()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(nn.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(on)),u!==e?(K=t,o=an(),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===p?(o=p,i+=2):(o=e,N===0&&D(he)),o!==e&&(K=t,o=Vt()),t=o,t===e&&(t=i,a.substr(i,2)===tt?(o=tt,i+=2):(o=e,N===0&&D(nr)),o!==e&&(K=t,o=te()),t=o,t===e&&(t=i,a.substr(i,2)===Ft?(o=Ft,i+=2):(o=e,N===0&&D(ir)),o!==e&&(K=t,o=sn()),t=o,t===e&&(t=i,a.substr(i,2)===Rr?(o=Rr,i+=2):(o=e,N===0&&D(un)),o!==e&&(K=t,o=we()),t=o,t===e&&(t=i,a.substr(i,2)===it?(o=it,i+=2):(o=e,N===0&&D(Lr)),o!==e&&(K=t,o=Fr()),t=o,t===e&&(t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(Ct.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(or)),u!==e?(K=t,o=ut(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=Bi()))))))))),t}c($n,"Vs"),n($n,"peg$parseCQuoteEscapedChar");function Bi(){var t,o,u,f,k,M,le,de,Re,Ie,ot,jn;return t=i,a.charCodeAt(i)===92?(o=kt,i++):(o=e,N===0&&D(xt)),o!==e?(u=Hr(),u!==e?(K=t,o=gt(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===ae?(o=ae,i+=2):(o=e,N===0&&D(Pr)),o!==e?(u=i,f=i,k=Hr(),k!==e?(M=Xe(),M!==e?(k=[k,M],f=k):(i=f,f=e)):(i=f,f=e),f===e&&(f=Hr()),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=gt(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===Jt?(o=Jt,i+=2):(o=e,N===0&&D(ar)),o!==e?(u=i,f=i,k=Xe(),k!==e?(M=Xe(),M!==e?(le=Xe(),le!==e?(de=Xe(),de!==e?(k=[k,M,le,de],f=k):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=gt(u),t=o):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===sr?(o=sr,i+=2):(o=e,N===0&&D(ur)),o!==e?(u=i,f=i,k=Xe(),k!==e?(M=Xe(),M!==e?(le=Xe(),le!==e?(de=Xe(),de!==e?(Re=Xe(),Re!==e?(Ie=Xe(),Ie!==e?(ot=Xe(),ot!==e?(jn=Xe(),jn!==e?(k=[k,M,le,de,Re,Ie,ot,jn],f=k):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e)):(i=f,f=e),f!==e?u=a.substring(u,i):u=f,u!==e?(K=t,o=cr(u),t=o):(i=t,t=e)):(i=t,t=e)))),t}c(Bi,"Xi"),n(Bi,"peg$parseHexCodeString");function Hr(){var t;return lr.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Pt)),t}c(Hr,"$e"),n(Hr,"peg$parseHexCodeChar0");function Xe(){var t;return Ot.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(Ir)),t}c(Xe,"x"),n(Xe,"peg$parseHexCodeChar");function Hi(){var t,o,u,f,k;if(t=i,o=[],u=i,a.charCodeAt(i)===92?(f=kt,i++):(f=e,N===0&&D(xt)),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u===e&&(u=i,a.substr(i,2)===jt?(f=jt,i+=2):(f=e,N===0&&D(fr)),f!==e&&(K=u,f=$t()),u=f,u===e&&(u=i,f=i,N++,k=xn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e))),u!==e)for(;u!==e;)o.push(u),u=i,a.charCodeAt(i)===92?(f=kt,i++):(f=e,N===0&&D(xt)),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u===e&&(u=i,a.substr(i,2)===jt?(f=jt,i+=2):(f=e,N===0&&D(fr)),f!==e&&(K=u,f=$t()),u=f,u===e&&(u=i,f=i,N++,k=xn(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e)));else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(Hi,"Ji"),n(Hi,"peg$parsePlainStringText");function Ur(){var t,o,u,f,k,M;if(t=i,a.charCodeAt(i)===45?(o=It,i++):(o=e,N===0&&D(Nt)),o===e&&(a.charCodeAt(i)===43?(o=_t,i++):(o=e,N===0&&D(St))),o===e&&(o=null),o!==e){if(u=[],Y.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W)),f!==e)for(;f!==e;)u.push(f),Y.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W));else u=e;if(u!==e)if(a.charCodeAt(i)===46?(f=pr,i++):(f=e,N===0&&D(Nr)),f!==e){if(k=[],Y.test(a.charAt(i))?(M=a.charAt(i),i++):(M=e,N===0&&D(W)),M!==e)for(;M!==e;)k.push(M),Y.test(a.charAt(i))?(M=a.charAt(i),i++):(M=e,N===0&&D(W));else k=e;k!==e?(K=t,o=Mt(o,u,k),t=o):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;if(t===e){if(t=i,a.charCodeAt(i)===45?(o=It,i++):(o=e,N===0&&D(Nt)),o===e&&(a.charCodeAt(i)===43?(o=_t,i++):(o=e,N===0&&D(St))),o===e&&(o=null),o!==e){if(u=[],Y.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W)),f!==e)for(;f!==e;)u.push(f),Y.test(a.charAt(i))?(f=a.charAt(i),i++):(f=e,N===0&&D(W));else u=e;u!==e?(K=t,o=Mr(o,u),t=o):(i=t,t=e)}else i=t,t=e;if(t===e&&(t=i,o=Vr(),o!==e&&(K=t,o=dr(o)),t=o,t===e&&(t=i,o=Rt(),o!==e&&(K=t,o=Dt(o)),t=o,t===e)))if(t=i,a.charCodeAt(i)===40?(o=Ke,i++):(o=e,N===0&&D(Qe)),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();if(u!==e)if(f=Sn(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(a.charCodeAt(i)===41?(M=re,i++):(M=e,N===0&&D(Pe)),M!==e?(K=t,o=Te(f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e}return t}c(Ur,"Ae"),n(Ur,"peg$parseArithmeticPrimary");function Wr(){var t,o,u,f,k,M,le,de;if(t=i,o=Ur(),o!==e){for(u=[],f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===42?(M=Dr,i++):(M=e,N===0&&D(ct)),M===e&&(a.charCodeAt(i)===47?(M=lt,i++):(M=e,N===0&&D(hr))),M!==e){for(le=[],de=Q();de!==e;)le.push(de),de=Q();le!==e?(de=Ur(),de!==e?(K=f,k=qt(o,M,de),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e;for(;f!==e;){for(u.push(f),f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===42?(M=Dr,i++):(M=e,N===0&&D(ct)),M===e&&(a.charCodeAt(i)===47?(M=lt,i++):(M=e,N===0&&D(hr))),M!==e){for(le=[],de=Q();de!==e;)le.push(de),de=Q();le!==e?(de=Ur(),de!==e?(K=f,k=qt(o,M,de),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e}u!==e?(K=t,o=s(o,u),t=o):(i=t,t=e)}else i=t,t=e;return t}c(Wr,"de"),n(Wr,"peg$parseArithmeticTimesExpression");function Sn(){var t,o,u,f,k,M,le,de;if(t=i,o=Wr(),o!==e){for(u=[],f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===43?(M=_t,i++):(M=e,N===0&&D(St)),M===e&&(a.charCodeAt(i)===45?(M=It,i++):(M=e,N===0&&D(Nt))),M!==e){for(le=[],de=Q();de!==e;)le.push(de),de=Q();le!==e?(de=Wr(),de!==e?(K=f,k=d(o,M,de),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e;for(;f!==e;){for(u.push(f),f=i,k=[],M=Q();M!==e;)k.push(M),M=Q();if(k!==e)if(a.charCodeAt(i)===43?(M=_t,i++):(M=e,N===0&&D(St)),M===e&&(a.charCodeAt(i)===45?(M=It,i++):(M=e,N===0&&D(Nt))),M!==e){for(le=[],de=Q();de!==e;)le.push(de),de=Q();le!==e?(de=Wr(),de!==e?(K=f,k=d(o,M,de),f=k):(i=f,f=e)):(i=f,f=e)}else i=f,f=e;else i=f,f=e}u!==e?(K=t,o=s(o,u),t=o):(i=t,t=e)}else i=t,t=e;return t}c(Sn,"Is"),n(Sn,"peg$parseArithmeticExpression");function En(){var t,o,u,f,k,M;if(t=i,a.substr(i,3)===j?(o=j,i+=3):(o=e,N===0&&D(G)),o!==e){for(u=[],f=Q();f!==e;)u.push(f),f=Q();if(u!==e)if(f=Sn(),f!==e){for(k=[],M=Q();M!==e;)k.push(M),M=Q();k!==e?(a.substr(i,2)===H?(M=H,i+=2):(M=e,N===0&&D(ee)),M!==e?(K=t,o=pe(f),t=o):(i=t,t=e)):(i=t,t=e)}else i=t,t=e;else i=t,t=e}else i=t,t=e;return t}c(En,"Ls"),n(En,"peg$parseArithmetic");function wn(){var t,o,u,f;return t=i,a.substr(i,2)===Se?(o=Se,i+=2):(o=e,N===0&&D(Tt)),o!==e?(u=Kt(),u!==e?(a.charCodeAt(i)===41?(f=re,i++):(f=e,N===0&&D(Pe)),f!==e?(K=t,o=Vo(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t}c(wn,"js"),n(wn,"peg$parseSubshell");function Vr(){var t,o,u,f,k,M;return t=i,a.substr(i,2)===yt?(o=yt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,2)===fi?(f=fi,i+=2):(f=e,N===0&&D(Jo)),f!==e?(k=gn(),k!==e?(a.charCodeAt(i)===125?(M=$e,i++):(M=e,N===0&&D(Le)),M!==e?(K=t,o=Go(u,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===yt?(o=yt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,3)===pi?(f=pi,i+=3):(f=e,N===0&&D(Ko)),f!==e?(K=t,o=Qo(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===yt?(o=yt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,2)===di?(f=di,i+=2):(f=e,N===0&&D(zo)),f!==e?(k=gn(),k!==e?(a.charCodeAt(i)===125?(M=$e,i++):(M=e,N===0&&D(Le)),M!==e?(K=t,o=Zo(u,k),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===yt?(o=yt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.substr(i,3)===hi?(f=hi,i+=3):(f=e,N===0&&D(Xo)),f!==e?(K=t,o=ea(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.substr(i,2)===yt?(o=yt,i+=2):(o=e,N===0&&D(gr)),o!==e?(u=Rt(),u!==e?(a.charCodeAt(i)===125?(f=$e,i++):(f=e,N===0&&D(Le)),f!==e?(K=t,o=gi(u),t=o):(i=t,t=e)):(i=t,t=e)):(i=t,t=e),t===e&&(t=i,a.charCodeAt(i)===36?(o=ta,i++):(o=e,N===0&&D(ra)),o!==e?(u=Rt(),u!==e?(K=t,o=gi(u),t=o):(i=t,t=e)):(i=t,t=e)))))),t}c(Vr,"we"),n(Vr,"peg$parseVariable");function Ui(){var t,o,u;return t=i,o=Wi(),o!==e?(K=i,u=na(o),u?u=void 0:u=e,u!==e?(K=t,o=ia(o),t=o):(i=t,t=e)):(i=t,t=e),t}c(Ui,"Ki"),n(Ui,"peg$parseGlob");function Wi(){var t,o,u,f,k;if(t=i,o=[],u=i,f=i,N++,k=On(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e),u!==e)for(;u!==e;)o.push(u),u=i,f=i,N++,k=On(),N--,k===e?f=void 0:(i=f,f=e),f!==e?(a.length>i?(k=a.charAt(i),i++):(k=e,N===0&&D(mt)),k!==e?(K=u,f=ut(k),u=f):(i=u,u=e)):(i=u,u=e);else o=e;return o!==e&&(K=t,o=wt(o)),t=o,t}c(Wi,"Wi"),n(Wi,"peg$parseGlobText");function kn(){var t,o,u;if(t=i,o=[],mi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(yi)),u!==e)for(;u!==e;)o.push(u),mi.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(yi));else o=e;return o!==e&&(K=t,o=vi()),t=o,t}c(kn,"qs"),n(kn,"peg$parseEnvVariable");function Rt(){var t,o,u;if(t=i,o=[],Ai.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(bi)),u!==e)for(;u!==e;)o.push(u),Ai.test(a.charAt(i))?(u=a.charAt(i),i++):(u=e,N===0&&D(bi));else o=e;return o!==e&&(K=t,o=vi()),t=o,t}c(Rt,"R"),n(Rt,"peg$parseIdentifier");function xn(){var t;return oa.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(aa)),t}c(xn,"_s"),n(xn,"peg$parseSpecialShellChars");function On(){var t;return sa.test(a.charAt(i))?(t=a.charAt(i),i++):(t=e,N===0&&D(ua)),t}c(On,"zs"),n(On,"peg$parseGlobSpecialShellChars");function Q(){var t,o;if(t=[],Ci.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D($i)),o!==e)for(;o!==e;)t.push(o),Ci.test(a.charAt(i))?(o=a.charAt(i),i++):(o=e,N===0&&D($i));else t=e;return t}if(c(Q,"h"),n(Q,"peg$parseS"),Yr=x(),Yr!==e&&i===a.length)return Yr;throw Yr!==e&&i<a.length&&D(wi()),fn(cn,vt<a.length?a.charAt(vt):null,vt<a.length?Gt(vt,vt+1):Gt(vt,vt))}return c($,"peg$parse"),n($,"peg$parse"),Rn={SyntaxError:y,parse:$},Rn}c(Ya,"requireShell$1");var zi;function Ba(){if(zi)return Fe;zi=1;var h=Object.defineProperty,n=c((T,ne)=>h(T,"name",{value:ne,configurable:!0}),"t");Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.parseShell=y,Fe.stringifyShellLine=$,Fe.stringifyShell=$,Fe.stringifyCommandLine=a,Fe.stringifyCommandLineThen=g,Fe.stringifyCommandChain=e,Fe.stringifyCommandChainThen=b,Fe.stringifyCommand=x,Fe.stringifyEnvSegment=A,Fe.stringifyArgument=S,Fe.stringifyRedirectArgument=O,Fe.stringifyValueArgument=F,Fe.stringifyArgumentSegment=ge,Fe.stringifyArithmeticExpression=oe,Fe.stringifyShellLine=$,Fe.stringifyShell=$;const m=Ya();function y(T,ne={isGlobPattern:n(()=>!1,"isGlobPattern")}){try{return(0,m.parse)(T,ne)}catch(me){throw me.location&&(me.message=me.message.replace(/(\.)?$/,` (line ${me.location.start.line}, column ${me.location.start.column})$1`)),me}}c(y,"parseShell"),n(y,"parseShell");function $(T,{endSemicolon:ne=!1}={}){return T.map(({command:me,type:U},ue)=>`${a(me)}${U===";"?ue!==T.length-1||ne?";":"":" &"}`).join(" ")}c($,"stringifyShellLine"),n($,"stringifyShellLine");function a(T){return`${e(T.chain)}${T.then?` ${g(T.then)}`:""}`}c(a,"stringifyCommandLine"),n(a,"stringifyCommandLine");function g(T){return`${T.type} ${a(T.line)}`}c(g,"stringifyCommandLineThen"),n(g,"stringifyCommandLineThen");function e(T){return`${x(T)}${T.then?` ${b(T.then)}`:""}`}c(e,"stringifyCommandChain"),n(e,"stringifyCommandChain");function b(T){return`${T.type} ${e(T.chain)}`}c(b,"stringifyCommandChainThen"),n(b,"stringifyCommandChainThen");function x(T){switch(T.type){case"command":return`${T.envs.length>0?`${T.envs.map(ne=>A(ne)).join(" ")} `:""}${T.args.map(ne=>S(ne)).join(" ")}`;case"subshell":return`(${$(T.subshell)})${T.args.length>0?` ${T.args.map(ne=>O(ne)).join(" ")}`:""}`;case"group":return`{ ${$(T.group,{endSemicolon:!0})} }${T.args.length>0?` ${T.args.map(ne=>O(ne)).join(" ")}`:""}`;case"envs":return T.envs.map(ne=>A(ne)).join(" ");default:throw new Error(`Unsupported command type: "${T.type}"`)}}c(x,"stringifyCommand"),n(x,"stringifyCommand");function A(T){return`${T.name}=${T.args[0]?F(T.args[0]):""}`}c(A,"stringifyEnvSegment"),n(A,"stringifyEnvSegment");function S(T){switch(T.type){case"redirection":return O(T);case"argument":return F(T);default:throw new Error(`Unsupported argument type: "${T.type}"`)}}c(S,"stringifyArgument"),n(S,"stringifyArgument");function O(T){return`${T.subtype} ${T.args.map(ne=>F(ne)).join(" ")}`}c(O,"stringifyRedirectArgument"),n(O,"stringifyRedirectArgument");function F(T){return T.segments.map(ne=>ge(ne)).join("")}c(F,"stringifyValueArgument"),n(F,"stringifyValueArgument");const C=new Map([["\f","\\f"],[`
8
+ `,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),v=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(C,([T,ne])=>[T,`"$'${ne}'"`])]),E=n(T=>C.get(T)??`\\x${T.charCodeAt(0).toString(16).padStart(2,"0")}`,"getEscapedControlChar"),X=n(T=>v.get(T)??`"$'${E(T)}'"`,"getEscapedDblChar");function ge(T){const ne=n((U,ue)=>ue?`"${U}"`:U,"doubleQuoteIfRequested"),me=n(U=>U===""?"''":U.match(/[()}<>$|&;"'\n\t ]/)?U.match(/['\t\p{C}]/u)?U.match(/'/)?`"${U.replace(/["$\t\p{C}]/u,X)}"`:`$'${U.replace(/[\t\p{C}]/u,E)}'`:`'${U}'`:U,"quoteIfNeeded");switch(T.type){case"text":return me(T.text);case"glob":return T.pattern;case"shell":return ne(`$(${$(T.shell)})`,T.quoted);case"variable":return ne(typeof T.defaultValue>"u"?typeof T.alternativeValue>"u"?`\${${T.name}}`:T.alternativeValue.length===0?`\${${T.name}:+}`:`\${${T.name}:+${T.alternativeValue.map(U=>F(U)).join(" ")}}`:T.defaultValue.length===0?`\${${T.name}:-}`:`\${${T.name}:-${T.defaultValue.map(U=>F(U)).join(" ")}}`,T.quoted);case"arithmetic":return`$(( ${oe(T.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${T.type}"`)}}c(ge,"stringifyArgumentSegment"),n(ge,"stringifyArgumentSegment");function oe(T){const ne=n(ue=>{switch(ue){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${ue}"`)}},"getOperator"),me=n((ue,be)=>be?`( ${ue} )`:ue,"parenthesizeIfRequested"),U=n(ue=>me(oe(ue),!["number","variable"].includes(ue.type)),"stringifyAndParenthesizeIfNeeded");switch(T.type){case"number":return String(T.value);case"variable":return T.name;default:return`${U(T.left)} ${ne(T.type)} ${U(T.right)}`}}return c(oe,"stringifyArithmeticExpression"),n(oe,"stringifyArithmeticExpression"),Fe}c(Ba,"requireShell");var Ar={},Ln,Zi;function Ha(){if(Zi)return Ln;Zi=1;var h=Object.defineProperty,n=c((a,g)=>h(a,"name",{value:g,configurable:!0}),"c");function m(a,g){function e(){this.constructor=a}c(e,"t"),n(e,"ctor"),e.prototype=g.prototype,a.prototype=new e}c(m,"peg$subclass"),n(m,"peg$subclass");function y(a,g,e,b){this.message=a,this.expected=g,this.found=e,this.location=b,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),m(y,Error),y.buildMessage=function(a,g){var e={literal:n(function(C){return'"'+x(C.text)+'"'},"literal"),class:n(function(C){var v="",E;for(E=0;E<C.parts.length;E++)v+=C.parts[E]instanceof Array?A(C.parts[E][0])+"-"+A(C.parts[E][1]):A(C.parts[E]);return"["+(C.inverted?"^":"")+v+"]"},"class"),any:n(function(C){return"any character"},"any"),end:n(function(C){return"end of input"},"end"),other:n(function(C){return C.description},"other")};function b(C){return C.charCodeAt(0).toString(16).toUpperCase()}c(b,"h"),n(b,"hex");function x(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(x,"m"),n(x,"literalEscape");function A(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(A,"x"),n(A,"classEscape");function S(C){return e[C.type](C)}c(S,"A"),n(S,"describeExpectation");function O(C){var v=new Array(C.length),E,X;for(E=0;E<C.length;E++)v[E]=S(C[E]);if(v.sort(),v.length>0){for(E=1,X=1;E<v.length;E++)v[E-1]!==v[E]&&(v[X]=v[E],X++);v.length=X}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"C"),n(O,"describeExpected");function F(C){return C?'"'+x(C)+'"':"end of input"}return c(F,"b"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(g)+" found."};function $(a,g){g=g!==void 0?g:{};var e={},b={resolution:Ae},x=Ae,A="/",S=He("/",!1),O=n(function(Y,W){return{from:Y,descriptor:W}},"peg$c2"),F=n(function(Y){return{descriptor:Y}},"peg$c3"),C="@",v=He("@",!1),E=n(function(Y,W){return{fullName:Y,description:W}},"peg$c6"),X=n(function(Y){return{fullName:Y}},"peg$c7"),ge=n(function(){return De()},"peg$c8"),oe=/^[^\/@]/,T=Ke(["/","@"],!0,!1),ne=/^[^\/]/,me=Ke(["/"],!0,!1),U=0,ue=0,be=[{line:1,column:1}],ye=0,je=[],Me;if("startRule"in g){if(!(g.startRule in b))throw new Error(`Can't start parsing from rule "`+g.startRule+'".');x=b[g.startRule]}function De(){return a.substring(ue,U)}c(De,"U"),n(De,"text");function qe(){return ke(ue,U)}c(qe,"J"),n(qe,"location");function rt(Y,W){throw W=W!==void 0?W:ke(ue,U),Le([Pe(Y)],a.substring(ue,U),W)}c(rt,"K"),n(rt,"expected");function Ee(Y,W){throw W=W!==void 0?W:ke(ue,U),$e(Y,W)}c(Ee,"Q"),n(Ee,"error");function He(Y,W){return{type:"literal",text:Y,ignoreCase:W}}c(He,"j"),n(He,"peg$literalExpectation");function Ke(Y,W,se){return{type:"class",parts:Y,inverted:W,ignoreCase:se}}c(Ke,"k"),n(Ke,"peg$classExpectation");function Qe(){return{type:"any"}}c(Qe,"V"),n(Qe,"peg$anyExpectation");function re(){return{type:"end"}}c(re,"X"),n(re,"peg$endExpectation");function Pe(Y){return{type:"other",description:Y}}c(Pe,"q"),n(Pe,"peg$otherExpectation");function We(Y){var W=be[Y],se;if(W)return W;for(se=Y-1;!be[se];)se--;for(W=be[se],W={line:W.line,column:W.column};se<Y;)a.charCodeAt(se)===10?(W.line++,W.column=1):W.column++,se++;return be[Y]=W,W}c(We,"L"),n(We,"peg$computePosDetails");function ke(Y,W){var se=We(Y),Ce=We(W);return{start:{offset:Y,line:se.line,column:se.column},end:{offset:W,line:Ce.line,column:Ce.column}}}c(ke,"y"),n(ke,"peg$computeLocation");function xe(Y){U<ye||(U>ye&&(ye=U,je=[]),je.push(Y))}c(xe,"$"),n(xe,"peg$fail");function $e(Y,W){return new y(Y,null,null,W)}c($e,"z"),n($e,"peg$buildSimpleError");function Le(Y,W,se){return new y(y.buildMessage(Y,W),Y,W,se)}c(Le,"M"),n(Le,"peg$buildStructuredError");function Ae(){var Y,W,se,Ce;return Y=U,W=Ye(),W!==e?(a.charCodeAt(U)===47?(se=A,U++):(se=e,xe(S)),se!==e?(Ce=Ye(),Ce!==e?(ue=Y,W=O(W,Ce),Y=W):(U=Y,Y=e)):(U=Y,Y=e)):(U=Y,Y=e),Y===e&&(Y=U,W=Ye(),W!==e&&(ue=Y,W=F(W)),Y=W),Y}c(Ae,"_"),n(Ae,"peg$parseresolution");function Ye(){var Y,W,se,Ce;return Y=U,W=Ue(),W!==e?(a.charCodeAt(U)===64?(se=C,U++):(se=e,xe(v)),se!==e?(Ce=Je(),Ce!==e?(ue=Y,W=E(W,Ce),Y=W):(U=Y,Y=e)):(U=Y,Y=e)):(U=Y,Y=e),Y===e&&(Y=U,W=Ue(),W!==e&&(ue=Y,W=X(W)),Y=W),Y}c(Ye,"R"),n(Ye,"peg$parsespecifier");function Ue(){var Y,W,se,Ce,nt;return Y=U,a.charCodeAt(U)===64?(W=C,U++):(W=e,xe(v)),W!==e?(se=Ve(),se!==e?(a.charCodeAt(U)===47?(Ce=A,U++):(Ce=e,xe(S)),Ce!==e?(nt=Ve(),nt!==e?(ue=Y,W=ge(),Y=W):(U=Y,Y=e)):(U=Y,Y=e)):(U=Y,Y=e)):(U=Y,Y=e),Y===e&&(Y=U,W=Ve(),W!==e&&(ue=Y,W=ge()),Y=W),Y}c(Ue,"B"),n(Ue,"peg$parsefullName");function Ve(){var Y,W,se;if(Y=U,W=[],oe.test(a.charAt(U))?(se=a.charAt(U),U++):(se=e,xe(T)),se!==e)for(;se!==e;)W.push(se),oe.test(a.charAt(U))?(se=a.charAt(U),U++):(se=e,xe(T));else W=e;return W!==e&&(ue=Y,W=ge()),Y=W,Y}c(Ve,"D"),n(Ve,"peg$parseident");function Je(){var Y,W,se;if(Y=U,W=[],ne.test(a.charAt(U))?(se=a.charAt(U),U++):(se=e,xe(me)),se!==e)for(;se!==e;)W.push(se),ne.test(a.charAt(U))?(se=a.charAt(U),U++):(se=e,xe(me));else W=e;return W!==e&&(ue=Y,W=ge()),Y=W,Y}if(c(Je,"G"),n(Je,"peg$parsedescription"),Me=x(),Me!==e&&U===a.length)return Me;throw Me!==e&&U<a.length&&xe(re()),Le(je,ye<a.length?a.charAt(ye):null,ye<a.length?ke(ye,ye+1):ke(ye,ye))}return c($,"peg$parse"),n($,"peg$parse"),Ln={SyntaxError:y,parse:$},Ln}c(Ha,"requireResolution$1");var Xi;function Ua(){if(Xi)return Ar;Xi=1;var h=Object.defineProperty,n=c((a,g)=>h(a,"name",{value:g,configurable:!0}),"o");Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.parseResolution=y,Ar.stringifyResolution=$;const m=Ha();function y(a){const g=a.match(/^\*{1,2}\/(.*)/);if(g)throw new Error(`The override for '${a}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${g[1]}' instead.`);try{return(0,m.parse)(a)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}c(y,"parseResolution"),n(y,"parseResolution");function $(a){let g="";return a.from&&(g+=a.from.fullName,a.from.description&&(g+=`@${a.from.description}`),g+="/"),g+=a.descriptor.fullName,a.descriptor.description&&(g+=`@${a.descriptor.description}`),g}return c($,"stringifyResolution"),n($,"stringifyResolution"),Ar}c(Ua,"requireResolution");var Yt={},Oe={},zt={},Lt={},eo;function Xt(){if(eo)return Lt;eo=1;var h=Object.defineProperty,n=c((b,x)=>h(b,"name",{value:x,configurable:!0}),"o");function m(b){return typeof b>"u"||b===null}c(m,"isNothing"),n(m,"isNothing");function y(b){return typeof b=="object"&&b!==null}c(y,"isObject"),n(y,"isObject");function $(b){return Array.isArray(b)?b:m(b)?[]:[b]}c($,"toArray"),n($,"toArray");function a(b,x){var A,S,O,F;if(x)for(F=Object.keys(x),A=0,S=F.length;A<S;A+=1)O=F[A],b[O]=x[O];return b}c(a,"extend"),n(a,"extend");function g(b,x){var A="",S;for(S=0;S<x;S+=1)A+=b;return A}c(g,"repeat"),n(g,"repeat");function e(b){return b===0&&Number.NEGATIVE_INFINITY===1/b}return c(e,"isNegativeZero"),n(e,"isNegativeZero"),Lt.isNothing=m,Lt.isObject=y,Lt.toArray=$,Lt.repeat=g,Lt.isNegativeZero=e,Lt.extend=a,Lt}c(Xt,"requireCommon");var Fn,to;function Er(){if(to)return Fn;to=1;var h=Object.defineProperty,n=c((y,$)=>h(y,"name",{value:$,configurable:!0}),"s");function m(y,$){Error.call(this),this.name="YAMLException",this.reason=y,this.mark=$,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return c(m,"YAMLException"),n(m,"YAMLException"),m.prototype=Object.create(Error.prototype),m.prototype.constructor=m,m.prototype.toString=n(function(y){var $=this.name+": ";return $+=this.reason||"(unknown reason)",!y&&this.mark&&($+=" "+this.mark.toString()),$},"toString"),Fn=m,Fn}c(Er,"requireException");var Pn,ro;function Wa(){if(ro)return Pn;ro=1;var h=Object.defineProperty,n=c(($,a)=>h($,"name",{value:a,configurable:!0}),"o"),m=Xt();function y($,a,g,e,b){this.name=$,this.buffer=a,this.position=g,this.line=e,this.column=b}return c(y,"Mark"),n(y,"Mark"),y.prototype.getSnippet=n(function($,a){var g,e,b,x,A;if(!this.buffer)return null;for($=$||4,a=a||75,g="",e=this.position;e>0&&`\0\r
9
+ …\u2028\u2029`.indexOf(this.buffer.charAt(e-1))===-1;)if(e-=1,this.position-e>a/2-1){g=" ... ",e+=5;break}for(b="",x=this.position;x<this.buffer.length&&`\0\r
10
+ …\u2028\u2029`.indexOf(this.buffer.charAt(x))===-1;)if(x+=1,x-this.position>a/2-1){b=" ... ",x-=5;break}return A=this.buffer.slice(e,x),m.repeat(" ",$)+g+A+b+`
11
+ `+m.repeat(" ",$+this.position-e+g.length)+"^"},"getSnippet"),y.prototype.toString=n(function($){var a,g="";return this.name&&(g+='in "'+this.name+'" '),g+="at line "+(this.line+1)+", column "+(this.column+1),$||(a=this.getSnippet(),a&&(g+=`:
12
+ `+a)),g},"toString"),Pn=y,Pn}c(Wa,"requireMark");var In,no;function Ne(){if(no)return In;no=1;var h=Object.defineProperty,n=c((e,b)=>h(e,"name",{value:b,configurable:!0}),"i"),m=Er(),y=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],$=["scalar","sequence","mapping"];function a(e){var b={};return e!==null&&Object.keys(e).forEach(function(x){e[x].forEach(function(A){b[String(A)]=x})}),b}c(a,"compileStyleAliases"),n(a,"compileStyleAliases");function g(e,b){if(b=b||{},Object.keys(b).forEach(function(x){if(y.indexOf(x)===-1)throw new m('Unknown option "'+x+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=b.kind||null,this.resolve=b.resolve||function(){return!0},this.construct=b.construct||function(x){return x},this.instanceOf=b.instanceOf||null,this.predicate=b.predicate||null,this.represent=b.represent||null,this.defaultStyle=b.defaultStyle||null,this.styleAliases=a(b.styleAliases||null),$.indexOf(this.kind)===-1)throw new m('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}return c(g,"Type"),n(g,"Type"),In=g,In}c(Ne,"requireType");var Nn,io;function er(){if(io)return Nn;io=1;var h=Object.defineProperty,n=c((b,x)=>h(b,"name",{value:x,configurable:!0}),"a"),m=Xt(),y=Er(),$=Ne();function a(b,x,A){var S=[];return b.include.forEach(function(O){A=a(O,x,A)}),b[x].forEach(function(O){A.forEach(function(F,C){F.tag===O.tag&&F.kind===O.kind&&S.push(C)}),A.push(O)}),A.filter(function(O,F){return S.indexOf(F)===-1})}c(a,"compileList"),n(a,"compileList");function g(){var b={scalar:{},sequence:{},mapping:{},fallback:{}},x,A;function S(O){b[O.kind][O.tag]=b.fallback[O.tag]=O}for(c(S,"n"),n(S,"collectType"),x=0,A=arguments.length;x<A;x+=1)arguments[x].forEach(S);return b}c(g,"compileMap"),n(g,"compileMap");function e(b){this.include=b.include||[],this.implicit=b.implicit||[],this.explicit=b.explicit||[],this.implicit.forEach(function(x){if(x.loadKind&&x.loadKind!=="scalar")throw new y("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=g(this.compiledImplicit,this.compiledExplicit)}return c(e,"Schema"),n(e,"Schema"),e.DEFAULT=null,e.create=n(function(){var b,x;switch(arguments.length){case 1:b=e.DEFAULT,x=arguments[0];break;case 2:b=arguments[0],x=arguments[1];break;default:throw new y("Wrong number of arguments for Schema.create function")}if(b=m.toArray(b),x=m.toArray(x),!b.every(function(A){return A instanceof e}))throw new y("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!x.every(function(A){return A instanceof $}))throw new y("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new e({include:b,explicit:x})},"createSchema"),Nn=e,Nn}c(er,"requireSchema");var Mn,oo;function Va(){if(oo)return Mn;oo=1;var h=Object.defineProperty,n=c((y,$)=>h(y,"name",{value:$,configurable:!0}),"e"),m=Ne();return Mn=new m("tag:yaml.org,2002:str",{kind:"scalar",construct:n(function(y){return y!==null?y:""},"construct")}),Mn}c(Va,"requireStr");var Dn,ao;function Ja(){if(ao)return Dn;ao=1;var h=Object.defineProperty,n=c((y,$)=>h(y,"name",{value:$,configurable:!0}),"r"),m=Ne();return Dn=new m("tag:yaml.org,2002:seq",{kind:"sequence",construct:n(function(y){return y!==null?y:[]},"construct")}),Dn}c(Ja,"requireSeq");var qn,so;function Ga(){if(so)return qn;so=1;var h=Object.defineProperty,n=c((y,$)=>h(y,"name",{value:$,configurable:!0}),"r"),m=Ne();return qn=new m("tag:yaml.org,2002:map",{kind:"mapping",construct:n(function(y){return y!==null?y:{}},"construct")}),qn}c(Ga,"requireMap");var Yn,uo;function ui(){if(uo)return Yn;uo=1;var h=er();return Yn=new h({explicit:[Va(),Ja(),Ga()]}),Yn}c(ui,"requireFailsafe");var Bn,co;function Ka(){if(co)return Bn;co=1;var h=Object.defineProperty,n=c((g,e)=>h(g,"name",{value:e,configurable:!0}),"l"),m=Ne();function y(g){if(g===null)return!0;var e=g.length;return e===1&&g==="~"||e===4&&(g==="null"||g==="Null"||g==="NULL")}c(y,"resolveYamlNull"),n(y,"resolveYamlNull");function $(){return null}c($,"constructYamlNull"),n($,"constructYamlNull");function a(g){return g===null}return c(a,"isNull"),n(a,"isNull"),Bn=new m("tag:yaml.org,2002:null",{kind:"scalar",resolve:y,construct:$,predicate:a,represent:{canonical:n(function(){return"~"},"canonical"),lowercase:n(function(){return"null"},"lowercase"),uppercase:n(function(){return"NULL"},"uppercase"),camelcase:n(function(){return"Null"},"camelcase")},defaultStyle:"lowercase"}),Bn}c(Ka,"require_null");var Hn,lo;function Qa(){if(lo)return Hn;lo=1;var h=Object.defineProperty,n=c((g,e)=>h(g,"name",{value:e,configurable:!0}),"r"),m=Ne();function y(g){if(g===null)return!1;var e=g.length;return e===4&&(g==="true"||g==="True"||g==="TRUE")||e===5&&(g==="false"||g==="False"||g==="FALSE")}c(y,"resolveYamlBoolean"),n(y,"resolveYamlBoolean");function $(g){return g==="true"||g==="True"||g==="TRUE"}c($,"constructYamlBoolean"),n($,"constructYamlBoolean");function a(g){return Object.prototype.toString.call(g)==="[object Boolean]"}return c(a,"isBoolean"),n(a,"isBoolean"),Hn=new m("tag:yaml.org,2002:bool",{kind:"scalar",resolve:y,construct:$,predicate:a,represent:{lowercase:n(function(g){return g?"true":"false"},"lowercase"),uppercase:n(function(g){return g?"TRUE":"FALSE"},"uppercase"),camelcase:n(function(g){return g?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Hn}c(Qa,"requireBool");var Un,fo;function za(){if(fo)return Un;fo=1;var h=Object.defineProperty,n=c((A,S)=>h(A,"name",{value:S,configurable:!0}),"u"),m=Xt(),y=Ne();function $(A){return 48<=A&&A<=57||65<=A&&A<=70||97<=A&&A<=102}c($,"isHexCode"),n($,"isHexCode");function a(A){return 48<=A&&A<=55}c(a,"isOctCode"),n(a,"isOctCode");function g(A){return 48<=A&&A<=57}c(g,"isDecCode"),n(g,"isDecCode");function e(A){if(A===null)return!1;var S=A.length,O=0,F=!1,C;if(!S)return!1;if(C=A[O],(C==="-"||C==="+")&&(C=A[++O]),C==="0"){if(O+1===S)return!0;if(C=A[++O],C==="b"){for(O++;O<S;O++)if(C=A[O],C!=="_"){if(C!=="0"&&C!=="1")return!1;F=!0}return F&&C!=="_"}if(C==="x"){for(O++;O<S;O++)if(C=A[O],C!=="_"){if(!$(A.charCodeAt(O)))return!1;F=!0}return F&&C!=="_"}for(;O<S;O++)if(C=A[O],C!=="_"){if(!a(A.charCodeAt(O)))return!1;F=!0}return F&&C!=="_"}if(C==="_")return!1;for(;O<S;O++)if(C=A[O],C!=="_"){if(C===":")break;if(!g(A.charCodeAt(O)))return!1;F=!0}return!F||C==="_"?!1:C!==":"?!0:/^(:[0-5]?[0-9])+$/.test(A.slice(O))}c(e,"resolveYamlInteger"),n(e,"resolveYamlInteger");function b(A){var S=A,O=1,F,C,v=[];return S.indexOf("_")!==-1&&(S=S.replace(/_/g,"")),F=S[0],(F==="-"||F==="+")&&(F==="-"&&(O=-1),S=S.slice(1),F=S[0]),S==="0"?0:F==="0"?S[1]==="b"?O*parseInt(S.slice(2),2):S[1]==="x"?O*parseInt(S,16):O*parseInt(S,8):S.indexOf(":")!==-1?(S.split(":").forEach(function(E){v.unshift(parseInt(E,10))}),S=0,C=1,v.forEach(function(E){S+=E*C,C*=60}),O*S):O*parseInt(S,10)}c(b,"constructYamlInteger"),n(b,"constructYamlInteger");function x(A){return Object.prototype.toString.call(A)==="[object Number]"&&A%1===0&&!m.isNegativeZero(A)}return c(x,"isInteger"),n(x,"isInteger"),Un=new y("tag:yaml.org,2002:int",{kind:"scalar",resolve:e,construct:b,predicate:x,represent:{binary:n(function(A){return A>=0?"0b"+A.toString(2):"-0b"+A.toString(2).slice(1)},"binary"),octal:n(function(A){return A>=0?"0"+A.toString(8):"-0"+A.toString(8).slice(1)},"octal"),decimal:n(function(A){return A.toString(10)},"decimal"),hexadecimal:n(function(A){return A>=0?"0x"+A.toString(16).toUpperCase():"-0x"+A.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Un}c(za,"requireInt");var Wn,po;function Za(){if(po)return Wn;po=1;var h=Object.defineProperty,n=c((A,S)=>h(A,"name",{value:S,configurable:!0}),"a"),m=Xt(),y=Ne(),$=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(A){return!(A===null||!$.test(A)||A[A.length-1]==="_")}c(a,"resolveYamlFloat"),n(a,"resolveYamlFloat");function g(A){var S,O,F,C;return S=A.replace(/_/g,"").toLowerCase(),O=S[0]==="-"?-1:1,C=[],"+-".indexOf(S[0])>=0&&(S=S.slice(1)),S===".inf"?O===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:S===".nan"?NaN:S.indexOf(":")>=0?(S.split(":").forEach(function(v){C.unshift(parseFloat(v,10))}),S=0,F=1,C.forEach(function(v){S+=v*F,F*=60}),O*S):O*parseFloat(S,10)}c(g,"constructYamlFloat"),n(g,"constructYamlFloat");var e=/^[-+]?[0-9]+e/;function b(A,S){var O;if(isNaN(A))switch(S){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===A)switch(S){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===A)switch(S){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m.isNegativeZero(A))return"-0.0";return O=A.toString(10),e.test(O)?O.replace("e",".e"):O}c(b,"representYamlFloat"),n(b,"representYamlFloat");function x(A){return Object.prototype.toString.call(A)==="[object Number]"&&(A%1!==0||m.isNegativeZero(A))}return c(x,"isFloat"),n(x,"isFloat"),Wn=new y("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:g,predicate:x,represent:b,defaultStyle:"lowercase"}),Wn}c(Za,"requireFloat");var Vn,ho;function Bo(){if(ho)return Vn;ho=1;var h=er();return Vn=new h({include:[ui()],implicit:[Ka(),Qa(),za(),Za()]}),Vn}c(Bo,"requireJson");var Jn,go;function Ho(){if(go)return Jn;go=1;var h=er();return Jn=new h({include:[Bo()]}),Jn}c(Ho,"requireCore");var Gn,mo;function Xa(){if(mo)return Gn;mo=1;var h=Object.defineProperty,n=c((b,x)=>h(b,"name",{value:x,configurable:!0}),"l"),m=Ne(),y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function a(b){return b===null?!1:y.exec(b)!==null||$.exec(b)!==null}c(a,"resolveYamlTimestamp"),n(a,"resolveYamlTimestamp");function g(b){var x,A,S,O,F,C,v,E=0,X=null,ge,oe,T;if(x=y.exec(b),x===null&&(x=$.exec(b)),x===null)throw new Error("Date resolve error");if(A=+x[1],S=+x[2]-1,O=+x[3],!x[4])return new Date(Date.UTC(A,S,O));if(F=+x[4],C=+x[5],v=+x[6],x[7]){for(E=x[7].slice(0,3);E.length<3;)E+="0";E=+E}return x[9]&&(ge=+x[10],oe=+(x[11]||0),X=(ge*60+oe)*6e4,x[9]==="-"&&(X=-X)),T=new Date(Date.UTC(A,S,O,F,C,v,E)),X&&T.setTime(T.getTime()-X),T}c(g,"constructYamlTimestamp"),n(g,"constructYamlTimestamp");function e(b){return b.toISOString()}return c(e,"representYamlTimestamp"),n(e,"representYamlTimestamp"),Gn=new m("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:a,construct:g,instanceOf:Date,represent:e}),Gn}c(Xa,"requireTimestamp");var Kn,yo;function es(){if(yo)return Kn;yo=1;var h=Object.defineProperty,n=c(($,a)=>h($,"name",{value:a,configurable:!0}),"r"),m=Ne();function y($){return $==="<<"||$===null}return c(y,"resolveYamlMerge"),n(y,"resolveYamlMerge"),Kn=new m("tag:yaml.org,2002:merge",{kind:"scalar",resolve:y}),Kn}c(es,"requireMerge");function Uo(h){throw new Error('Could not dynamically require "'+h+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}c(Uo,"commonjsRequire");var Qn,vo;function ts(){if(vo)return Qn;vo=1;var h=Object.defineProperty,n=c((A,S)=>h(A,"name",{value:S,configurable:!0}),"x"),m;try{var y=Uo;m=y("buffer").Buffer}catch{}var $=Ne(),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
13
+ \r`;function g(A){if(A===null)return!1;var S,O,F=0,C=A.length,v=a;for(O=0;O<C;O++)if(S=v.indexOf(A.charAt(O)),!(S>64)){if(S<0)return!1;F+=6}return F%8===0}c(g,"resolveYamlBinary"),n(g,"resolveYamlBinary");function e(A){var S,O,F=A.replace(/[\r\n=]/g,""),C=F.length,v=a,E=0,X=[];for(S=0;S<C;S++)S%4===0&&S&&(X.push(E>>16&255),X.push(E>>8&255),X.push(E&255)),E=E<<6|v.indexOf(F.charAt(S));return O=C%4*6,O===0?(X.push(E>>16&255),X.push(E>>8&255),X.push(E&255)):O===18?(X.push(E>>10&255),X.push(E>>2&255)):O===12&&X.push(E>>4&255),m?m.from?m.from(X):new m(X):X}c(e,"constructYamlBinary"),n(e,"constructYamlBinary");function b(A){var S="",O=0,F,C,v=A.length,E=a;for(F=0;F<v;F++)F%3===0&&F&&(S+=E[O>>18&63],S+=E[O>>12&63],S+=E[O>>6&63],S+=E[O&63]),O=(O<<8)+A[F];return C=v%3,C===0?(S+=E[O>>18&63],S+=E[O>>12&63],S+=E[O>>6&63],S+=E[O&63]):C===2?(S+=E[O>>10&63],S+=E[O>>4&63],S+=E[O<<2&63],S+=E[64]):C===1&&(S+=E[O>>2&63],S+=E[O<<4&63],S+=E[64],S+=E[64]),S}c(b,"representYamlBinary"),n(b,"representYamlBinary");function x(A){return m&&m.isBuffer(A)}return c(x,"isBinary"),n(x,"isBinary"),Qn=new $("tag:yaml.org,2002:binary",{kind:"scalar",resolve:g,construct:e,predicate:x,represent:b}),Qn}c(ts,"requireBinary");var zn,Ao;function rs(){if(Ao)return zn;Ao=1;var h=Object.defineProperty,n=c((e,b)=>h(e,"name",{value:b,configurable:!0}),"u"),m=Ne(),y=Object.prototype.hasOwnProperty,$=Object.prototype.toString;function a(e){if(e===null)return!0;var b=[],x,A,S,O,F,C=e;for(x=0,A=C.length;x<A;x+=1){if(S=C[x],F=!1,$.call(S)!=="[object Object]")return!1;for(O in S)if(y.call(S,O))if(!F)F=!0;else return!1;if(!F)return!1;if(b.indexOf(O)===-1)b.push(O);else return!1}return!0}c(a,"resolveYamlOmap"),n(a,"resolveYamlOmap");function g(e){return e!==null?e:[]}return c(g,"constructYamlOmap"),n(g,"constructYamlOmap"),zn=new m("tag:yaml.org,2002:omap",{kind:"sequence",resolve:a,construct:g}),zn}c(rs,"requireOmap");var Zn,bo;function ns(){if(bo)return Zn;bo=1;var h=Object.defineProperty,n=c((g,e)=>h(g,"name",{value:e,configurable:!0}),"i"),m=Ne(),y=Object.prototype.toString;function $(g){if(g===null)return!0;var e,b,x,A,S,O=g;for(S=new Array(O.length),e=0,b=O.length;e<b;e+=1){if(x=O[e],y.call(x)!=="[object Object]"||(A=Object.keys(x),A.length!==1))return!1;S[e]=[A[0],x[A[0]]]}return!0}c($,"resolveYamlPairs"),n($,"resolveYamlPairs");function a(g){if(g===null)return[];var e,b,x,A,S,O=g;for(S=new Array(O.length),e=0,b=O.length;e<b;e+=1)x=O[e],A=Object.keys(x),S[e]=[A[0],x[A[0]]];return S}return c(a,"constructYamlPairs"),n(a,"constructYamlPairs"),Zn=new m("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:$,construct:a}),Zn}c(ns,"requirePairs");var Xn,Co;function is(){if(Co)return Xn;Co=1;var h=Object.defineProperty,n=c((g,e)=>h(g,"name",{value:e,configurable:!0}),"n"),m=Ne(),y=Object.prototype.hasOwnProperty;function $(g){if(g===null)return!0;var e,b=g;for(e in b)if(y.call(b,e)&&b[e]!==null)return!1;return!0}c($,"resolveYamlSet"),n($,"resolveYamlSet");function a(g){return g!==null?g:{}}return c(a,"constructYamlSet"),n(a,"constructYamlSet"),Xn=new m("tag:yaml.org,2002:set",{kind:"mapping",resolve:$,construct:a}),Xn}c(is,"requireSet");var ei,$o;function $r(){if($o)return ei;$o=1;var h=er();return ei=new h({include:[Ho()],implicit:[Xa(),es()],explicit:[ts(),rs(),ns(),is()]}),ei}c($r,"requireDefault_safe");var ti,So;function os(){if(So)return ti;So=1;var h=Object.defineProperty,n=c((e,b)=>h(e,"name",{value:b,configurable:!0}),"e"),m=Ne();function y(){return!0}c(y,"resolveJavascriptUndefined"),n(y,"resolveJavascriptUndefined");function $(){}c($,"constructJavascriptUndefined"),n($,"constructJavascriptUndefined");function a(){return""}c(a,"representJavascriptUndefined"),n(a,"representJavascriptUndefined");function g(e){return typeof e>"u"}return c(g,"isUndefined"),n(g,"isUndefined"),ti=new m("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:y,construct:$,predicate:g,represent:a}),ti}c(os,"require_undefined");var ri,Eo;function as(){if(Eo)return ri;Eo=1;var h=Object.defineProperty,n=c((e,b)=>h(e,"name",{value:b,configurable:!0}),"n"),m=Ne();function y(e){if(e===null||e.length===0)return!1;var b=e,x=/\/([gim]*)$/.exec(e),A="";return!(b[0]==="/"&&(x&&(A=x[1]),A.length>3||b[b.length-A.length-1]!=="/"))}c(y,"resolveJavascriptRegExp"),n(y,"resolveJavascriptRegExp");function $(e){var b=e,x=/\/([gim]*)$/.exec(e),A="";return b[0]==="/"&&(x&&(A=x[1]),b=b.slice(1,b.length-A.length-1)),new RegExp(b,A)}c($,"constructJavascriptRegExp"),n($,"constructJavascriptRegExp");function a(e){var b="/"+e.source+"/";return e.global&&(b+="g"),e.multiline&&(b+="m"),e.ignoreCase&&(b+="i"),b}c(a,"representJavascriptRegExp"),n(a,"representJavascriptRegExp");function g(e){return Object.prototype.toString.call(e)==="[object RegExp]"}return c(g,"isRegExp"),n(g,"isRegExp"),ri=new m("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:y,construct:$,predicate:g,represent:a}),ri}c(as,"requireRegexp");var ni,wo;function ss(){if(wo)return ni;wo=1;var h=Object.defineProperty,n=c((x,A)=>h(x,"name",{value:A,configurable:!0}),"o"),m;try{var y=Uo;m=y("esprima")}catch{typeof window<"u"&&(m=window.esprima)}var $=Ne();function a(x){if(x===null)return!1;try{var A="("+x+")",S=m.parse(A,{range:!0});return!(S.type!=="Program"||S.body.length!==1||S.body[0].type!=="ExpressionStatement"||S.body[0].expression.type!=="ArrowFunctionExpression"&&S.body[0].expression.type!=="FunctionExpression")}catch{return!1}}c(a,"resolveJavascriptFunction"),n(a,"resolveJavascriptFunction");function g(x){var A="("+x+")",S=m.parse(A,{range:!0}),O=[],F;if(S.type!=="Program"||S.body.length!==1||S.body[0].type!=="ExpressionStatement"||S.body[0].expression.type!=="ArrowFunctionExpression"&&S.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return S.body[0].expression.params.forEach(function(C){O.push(C.name)}),F=S.body[0].expression.body.range,S.body[0].expression.body.type==="BlockStatement"?new Function(O,A.slice(F[0]+1,F[1]-1)):new Function(O,"return "+A.slice(F[0],F[1]))}c(g,"constructJavascriptFunction"),n(g,"constructJavascriptFunction");function e(x){return x.toString()}c(e,"representJavascriptFunction"),n(e,"representJavascriptFunction");function b(x){return Object.prototype.toString.call(x)==="[object Function]"}return c(b,"isFunction"),n(b,"isFunction"),ni=new $("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:a,construct:g,predicate:b,represent:e}),ni}c(ss,"require_function");var ii,ko;function Kr(){if(ko)return ii;ko=1;var h=er();return ii=h.DEFAULT=new h({include:[$r()],explicit:[os(),as(),ss()]}),ii}c(Kr,"requireDefault_full");var xo;function us(){if(xo)return zt;xo=1;var h=Object.defineProperty,n=c((r,_)=>h(r,"name",{value:_,configurable:!0}),"x"),m=Xt(),y=Er(),$=Wa(),a=$r(),g=Kr(),e=Object.prototype.hasOwnProperty,b=1,x=2,A=3,S=4,O=1,F=2,C=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E=/[\x85\u2028\u2029]/,X=/[,\[\]\{\}]/,ge=/^(?:!|!!|![a-z\-]+!)$/i,oe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function T(r){return Object.prototype.toString.call(r)}c(T,"_class"),n(T,"_class");function ne(r){return r===10||r===13}c(ne,"is_EOL"),n(ne,"is_EOL");function me(r){return r===9||r===32}c(me,"is_WHITE_SPACE"),n(me,"is_WHITE_SPACE");function U(r){return r===9||r===32||r===10||r===13}c(U,"is_WS_OR_EOL"),n(U,"is_WS_OR_EOL");function ue(r){return r===44||r===91||r===93||r===123||r===125}c(ue,"is_FLOW_INDICATOR"),n(ue,"is_FLOW_INDICATOR");function be(r){var _;return 48<=r&&r<=57?r-48:(_=r|32,97<=_&&_<=102?_-97+10:-1)}c(be,"fromHexCode"),n(be,"fromHexCode");function ye(r){return r===120?2:r===117?4:r===85?8:0}c(ye,"escapedHexLen"),n(ye,"escapedHexLen");function je(r){return 48<=r&&r<=57?r-48:-1}c(je,"fromDecimalCode"),n(je,"fromDecimalCode");function Me(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
14
+ `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}c(Me,"simpleEscapeSequence"),n(Me,"simpleEscapeSequence");function De(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}c(De,"charFromCodepoint"),n(De,"charFromCodepoint");function qe(r,_,R){_==="__proto__"?Object.defineProperty(r,_,{configurable:!0,enumerable:!0,writable:!0,value:R}):r[_]=R}c(qe,"setProperty"),n(qe,"setProperty");for(var rt=new Array(256),Ee=new Array(256),He=0;He<256;He++)rt[He]=Me(He)?1:0,Ee[He]=Me(He);function Ke(r,_){this.input=r,this.filename=_.filename||null,this.schema=_.schema||g,this.onWarning=_.onWarning||null,this.legacy=_.legacy||!1,this.json=_.json||!1,this.listener=_.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}c(Ke,"State"),n(Ke,"State");function Qe(r,_){return new y(_,new $(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}c(Qe,"generateError"),n(Qe,"generateError");function re(r,_){throw Qe(r,_)}c(re,"throwError"),n(re,"throwError");function Pe(r,_){r.onWarning&&r.onWarning.call(null,Qe(r,_))}c(Pe,"throwWarning"),n(Pe,"throwWarning");var We={YAML:n(function(r,_,R){var z,B,l;r.version!==null&&re(r,"duplication of %YAML directive"),R.length!==1&&re(r,"YAML directive accepts exactly one argument"),z=/^([0-9]+)\.([0-9]+)$/.exec(R[0]),z===null&&re(r,"ill-formed argument of the YAML directive"),B=parseInt(z[1],10),l=parseInt(z[2],10),B!==1&&re(r,"unacceptable YAML version of the document"),r.version=R[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&Pe(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:n(function(r,_,R){var z,B;R.length!==2&&re(r,"TAG directive accepts exactly two arguments"),z=R[0],B=R[1],ge.test(z)||re(r,"ill-formed tag handle (first argument) of the TAG directive"),e.call(r.tagMap,z)&&re(r,'there is a previously declared suffix for "'+z+'" tag handle'),oe.test(B)||re(r,"ill-formed tag prefix (second argument) of the TAG directive"),r.tagMap[z]=B},"handleTagDirective")};function ke(r,_,R,z){var B,l,w,L;if(_<R){if(L=r.input.slice(_,R),z)for(B=0,l=L.length;B<l;B+=1)w=L.charCodeAt(B),w===9||32<=w&&w<=1114111||re(r,"expected valid JSON character");else v.test(L)&&re(r,"the stream contains non-printable characters");r.result+=L}}c(ke,"captureSegment"),n(ke,"captureSegment");function xe(r,_,R,z){var B,l,w,L;for(m.isObject(R)||re(r,"cannot merge mappings; the provided source object is unacceptable"),B=Object.keys(R),w=0,L=B.length;w<L;w+=1)l=B[w],e.call(_,l)||(qe(_,l,R[l]),z[l]=!0)}c(xe,"mergeMappings"),n(xe,"mergeMappings");function $e(r,_,R,z,B,l,w,L){var P,q;if(Array.isArray(B))for(B=Array.prototype.slice.call(B),P=0,q=B.length;P<q;P+=1)Array.isArray(B[P])&&re(r,"nested arrays are not supported inside keys"),typeof B=="object"&&T(B[P])==="[object Object]"&&(B[P]="[object Object]");if(typeof B=="object"&&T(B)==="[object Object]"&&(B="[object Object]"),B=String(B),_===null&&(_={}),z==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(P=0,q=l.length;P<q;P+=1)xe(r,_,l[P],R);else xe(r,_,l,R);else!r.json&&!e.call(R,B)&&e.call(_,B)&&(r.line=w||r.line,r.position=L||r.position,re(r,"duplicated mapping key")),qe(_,B,l),delete R[B];return _}c($e,"storeMappingPair"),n($e,"storeMappingPair");function Le(r){var _;_=r.input.charCodeAt(r.position),_===10?r.position++:_===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):re(r,"a line break is expected"),r.line+=1,r.lineStart=r.position}c(Le,"readLineBreak"),n(Le,"readLineBreak");function Ae(r,_,R){for(var z=0,B=r.input.charCodeAt(r.position);B!==0;){for(;me(B);)B=r.input.charCodeAt(++r.position);if(_&&B===35)do B=r.input.charCodeAt(++r.position);while(B!==10&&B!==13&&B!==0);if(ne(B))for(Le(r),B=r.input.charCodeAt(r.position),z++,r.lineIndent=0;B===32;)r.lineIndent++,B=r.input.charCodeAt(++r.position);else break}return R!==-1&&z!==0&&r.lineIndent<R&&Pe(r,"deficient indentation"),z}c(Ae,"skipSeparationSpace"),n(Ae,"skipSeparationSpace");function Ye(r){var _=r.position,R;return R=r.input.charCodeAt(_),!!((R===45||R===46)&&R===r.input.charCodeAt(_+1)&&R===r.input.charCodeAt(_+2)&&(_+=3,R=r.input.charCodeAt(_),R===0||U(R)))}c(Ye,"testDocumentSeparator"),n(Ye,"testDocumentSeparator");function Ue(r,_){_===1?r.result+=" ":_>1&&(r.result+=m.repeat(`
15
+ `,_-1))}c(Ue,"writeFoldedLines"),n(Ue,"writeFoldedLines");function Ve(r,_,R){var z,B,l,w,L,P,q,V,I=r.kind,Z=r.result,J;if(J=r.input.charCodeAt(r.position),U(J)||ue(J)||J===35||J===38||J===42||J===33||J===124||J===62||J===39||J===34||J===37||J===64||J===96||(J===63||J===45)&&(B=r.input.charCodeAt(r.position+1),U(B)||R&&ue(B)))return!1;for(r.kind="scalar",r.result="",l=w=r.position,L=!1;J!==0;){if(J===58){if(B=r.input.charCodeAt(r.position+1),U(B)||R&&ue(B))break}else if(J===35){if(z=r.input.charCodeAt(r.position-1),U(z))break}else{if(r.position===r.lineStart&&Ye(r)||R&&ue(J))break;if(ne(J))if(P=r.line,q=r.lineStart,V=r.lineIndent,Ae(r,!1,-1),r.lineIndent>=_){L=!0,J=r.input.charCodeAt(r.position);continue}else{r.position=w,r.line=P,r.lineStart=q,r.lineIndent=V;break}}L&&(ke(r,l,w,!1),Ue(r,r.line-P),l=w=r.position,L=!1),me(J)||(w=r.position+1),J=r.input.charCodeAt(++r.position)}return ke(r,l,w,!1),r.result?!0:(r.kind=I,r.result=Z,!1)}c(Ve,"readPlainScalar"),n(Ve,"readPlainScalar");function Je(r,_){var R,z,B;if(R=r.input.charCodeAt(r.position),R!==39)return!1;for(r.kind="scalar",r.result="",r.position++,z=B=r.position;(R=r.input.charCodeAt(r.position))!==0;)if(R===39)if(ke(r,z,r.position,!0),R=r.input.charCodeAt(++r.position),R===39)z=r.position,r.position++,B=r.position;else return!0;else ne(R)?(ke(r,z,B,!0),Ue(r,Ae(r,!1,_)),z=B=r.position):r.position===r.lineStart&&Ye(r)?re(r,"unexpected end of the document within a single quoted scalar"):(r.position++,B=r.position);re(r,"unexpected end of the stream within a single quoted scalar")}c(Je,"readSingleQuotedScalar"),n(Je,"readSingleQuotedScalar");function Y(r,_){var R,z,B,l,w,L;if(L=r.input.charCodeAt(r.position),L!==34)return!1;for(r.kind="scalar",r.result="",r.position++,R=z=r.position;(L=r.input.charCodeAt(r.position))!==0;){if(L===34)return ke(r,R,r.position,!0),r.position++,!0;if(L===92){if(ke(r,R,r.position,!0),L=r.input.charCodeAt(++r.position),ne(L))Ae(r,!1,_);else if(L<256&&rt[L])r.result+=Ee[L],r.position++;else if((w=ye(L))>0){for(B=w,l=0;B>0;B--)L=r.input.charCodeAt(++r.position),(w=be(L))>=0?l=(l<<4)+w:re(r,"expected hexadecimal character");r.result+=De(l),r.position++}else re(r,"unknown escape sequence");R=z=r.position}else ne(L)?(ke(r,R,z,!0),Ue(r,Ae(r,!1,_)),R=z=r.position):r.position===r.lineStart&&Ye(r)?re(r,"unexpected end of the document within a double quoted scalar"):(r.position++,z=r.position)}re(r,"unexpected end of the stream within a double quoted scalar")}c(Y,"readDoubleQuotedScalar"),n(Y,"readDoubleQuotedScalar");function W(r,_){var R=!0,z,B=r.tag,l,w=r.anchor,L,P,q,V,I,Z={},J,ie,ve,fe;if(fe=r.input.charCodeAt(r.position),fe===91)P=93,I=!1,l=[];else if(fe===123)P=125,I=!0,l={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=l),fe=r.input.charCodeAt(++r.position);fe!==0;){if(Ae(r,!0,_),fe=r.input.charCodeAt(r.position),fe===P)return r.position++,r.tag=B,r.anchor=w,r.kind=I?"mapping":"sequence",r.result=l,!0;R||re(r,"missed comma between flow collection entries"),ie=J=ve=null,q=V=!1,fe===63&&(L=r.input.charCodeAt(r.position+1),U(L)&&(q=V=!0,r.position++,Ae(r,!0,_))),z=r.line,Ge(r,_,b,!1,!0),ie=r.tag,J=r.result,Ae(r,!0,_),fe=r.input.charCodeAt(r.position),(V||r.line===z)&&fe===58&&(q=!0,fe=r.input.charCodeAt(++r.position),Ae(r,!0,_),Ge(r,_,b,!1,!0),ve=r.result),I?$e(r,l,Z,ie,J,ve):q?l.push($e(r,null,Z,ie,J,ve)):l.push(J),Ae(r,!0,_),fe=r.input.charCodeAt(r.position),fe===44?(R=!0,fe=r.input.charCodeAt(++r.position)):R=!1}re(r,"unexpected end of the stream within a flow collection")}c(W,"readFlowCollection"),n(W,"readFlowCollection");function se(r,_){var R,z,B=O,l=!1,w=!1,L=_,P=0,q=!1,V,I;if(I=r.input.charCodeAt(r.position),I===124)z=!1;else if(I===62)z=!0;else return!1;for(r.kind="scalar",r.result="";I!==0;)if(I=r.input.charCodeAt(++r.position),I===43||I===45)O===B?B=I===43?C:F:re(r,"repeat of a chomping mode identifier");else if((V=je(I))>=0)V===0?re(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):w?re(r,"repeat of an indentation width identifier"):(L=_+V-1,w=!0);else break;if(me(I)){do I=r.input.charCodeAt(++r.position);while(me(I));if(I===35)do I=r.input.charCodeAt(++r.position);while(!ne(I)&&I!==0)}for(;I!==0;){for(Le(r),r.lineIndent=0,I=r.input.charCodeAt(r.position);(!w||r.lineIndent<L)&&I===32;)r.lineIndent++,I=r.input.charCodeAt(++r.position);if(!w&&r.lineIndent>L&&(L=r.lineIndent),ne(I)){P++;continue}if(r.lineIndent<L){B===C?r.result+=m.repeat(`
16
+ `,l?1+P:P):B===O&&l&&(r.result+=`
17
+ `);break}for(z?me(I)?(q=!0,r.result+=m.repeat(`
18
+ `,l?1+P:P)):q?(q=!1,r.result+=m.repeat(`
19
+ `,P+1)):P===0?l&&(r.result+=" "):r.result+=m.repeat(`
20
+ `,P):r.result+=m.repeat(`
21
+ `,l?1+P:P),l=!0,w=!0,P=0,R=r.position;!ne(I)&&I!==0;)I=r.input.charCodeAt(++r.position);ke(r,R,r.position,!1)}return!0}c(se,"readBlockScalar"),n(se,"readBlockScalar");function Ce(r,_){var R,z=r.tag,B=r.anchor,l=[],w,L=!1,P;for(r.anchor!==null&&(r.anchorMap[r.anchor]=l),P=r.input.charCodeAt(r.position);P!==0&&!(P!==45||(w=r.input.charCodeAt(r.position+1),!U(w)));){if(L=!0,r.position++,Ae(r,!0,-1)&&r.lineIndent<=_){l.push(null),P=r.input.charCodeAt(r.position);continue}if(R=r.line,Ge(r,_,A,!1,!0),l.push(r.result),Ae(r,!0,-1),P=r.input.charCodeAt(r.position),(r.line===R||r.lineIndent>_)&&P!==0)re(r,"bad indentation of a sequence entry");else if(r.lineIndent<_)break}return L?(r.tag=z,r.anchor=B,r.kind="sequence",r.result=l,!0):!1}c(Ce,"readBlockSequence"),n(Ce,"readBlockSequence");function nt(r,_,R){var z,B,l,w,L=r.tag,P=r.anchor,q={},V={},I=null,Z=null,J=null,ie=!1,ve=!1,fe;for(r.anchor!==null&&(r.anchorMap[r.anchor]=q),fe=r.input.charCodeAt(r.position);fe!==0;){if(z=r.input.charCodeAt(r.position+1),l=r.line,w=r.position,(fe===63||fe===58)&&U(z))fe===63?(ie&&($e(r,q,V,I,Z,null),I=Z=J=null),ve=!0,ie=!0,B=!0):ie?(ie=!1,B=!0):re(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,fe=z;else if(Ge(r,R,x,!1,!0))if(r.line===l){for(fe=r.input.charCodeAt(r.position);me(fe);)fe=r.input.charCodeAt(++r.position);if(fe===58)fe=r.input.charCodeAt(++r.position),U(fe)||re(r,"a whitespace character is expected after the key-value separator within a block mapping"),ie&&($e(r,q,V,I,Z,null),I=Z=J=null),ve=!0,ie=!1,B=!1,I=r.tag,Z=r.result;else if(ve)re(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=L,r.anchor=P,!0}else if(ve)re(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=L,r.anchor=P,!0;else break;if((r.line===l||r.lineIndent>_)&&(Ge(r,_,S,!0,B)&&(ie?Z=r.result:J=r.result),ie||($e(r,q,V,I,Z,J,l,w),I=Z=J=null),Ae(r,!0,-1),fe=r.input.charCodeAt(r.position)),r.lineIndent>_&&fe!==0)re(r,"bad indentation of a mapping entry");else if(r.lineIndent<_)break}return ie&&$e(r,q,V,I,Z,null),ve&&(r.tag=L,r.anchor=P,r.kind="mapping",r.result=q),ve}c(nt,"readBlockMapping"),n(nt,"readBlockMapping");function at(r){var _,R=!1,z=!1,B,l,w;if(w=r.input.charCodeAt(r.position),w!==33)return!1;if(r.tag!==null&&re(r,"duplication of a tag property"),w=r.input.charCodeAt(++r.position),w===60?(R=!0,w=r.input.charCodeAt(++r.position)):w===33?(z=!0,B="!!",w=r.input.charCodeAt(++r.position)):B="!",_=r.position,R){do w=r.input.charCodeAt(++r.position);while(w!==0&&w!==62);r.position<r.length?(l=r.input.slice(_,r.position),w=r.input.charCodeAt(++r.position)):re(r,"unexpected end of the stream within a verbatim tag")}else{for(;w!==0&&!U(w);)w===33&&(z?re(r,"tag suffix cannot contain exclamation marks"):(B=r.input.slice(_-1,r.position+1),ge.test(B)||re(r,"named tag handle cannot contain such characters"),z=!0,_=r.position+1)),w=r.input.charCodeAt(++r.position);l=r.input.slice(_,r.position),X.test(l)&&re(r,"tag suffix cannot contain flow indicator characters")}return l&&!oe.test(l)&&re(r,"tag name cannot contain such characters: "+l),R?r.tag=l:e.call(r.tagMap,B)?r.tag=r.tagMap[B]+l:B==="!"?r.tag="!"+l:B==="!!"?r.tag="tag:yaml.org,2002:"+l:re(r,'undeclared tag handle "'+B+'"'),!0}c(at,"readTagProperty"),n(at,"readTagProperty");function st(r){var _,R;if(R=r.input.charCodeAt(r.position),R!==38)return!1;for(r.anchor!==null&&re(r,"duplication of an anchor property"),R=r.input.charCodeAt(++r.position),_=r.position;R!==0&&!U(R)&&!ue(R);)R=r.input.charCodeAt(++r.position);return r.position===_&&re(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(_,r.position),!0}c(st,"readAnchorProperty"),n(st,"readAnchorProperty");function At(r){var _,R,z;if(z=r.input.charCodeAt(r.position),z!==42)return!1;for(z=r.input.charCodeAt(++r.position),_=r.position;z!==0&&!U(z)&&!ue(z);)z=r.input.charCodeAt(++r.position);return r.position===_&&re(r,"name of an alias node must contain at least one character"),R=r.input.slice(_,r.position),e.call(r.anchorMap,R)||re(r,'unidentified alias "'+R+'"'),r.result=r.anchorMap[R],Ae(r,!0,-1),!0}c(At,"readAlias"),n(At,"readAlias");function Ge(r,_,R,z,B){var l,w,L,P=1,q=!1,V=!1,I,Z,J,ie,ve;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,l=w=L=S===R||A===R,z&&Ae(r,!0,-1)&&(q=!0,r.lineIndent>_?P=1:r.lineIndent===_?P=0:r.lineIndent<_&&(P=-1)),P===1)for(;at(r)||st(r);)Ae(r,!0,-1)?(q=!0,L=l,r.lineIndent>_?P=1:r.lineIndent===_?P=0:r.lineIndent<_&&(P=-1)):L=!1;if(L&&(L=q||B),(P===1||S===R)&&(b===R||x===R?ie=_:ie=_+1,ve=r.position-r.lineStart,P===1?L&&(Ce(r,ve)||nt(r,ve,ie))||W(r,ie)?V=!0:(w&&se(r,ie)||Je(r,ie)||Y(r,ie)?V=!0:At(r)?(V=!0,(r.tag!==null||r.anchor!==null)&&re(r,"alias node should not have any properties")):Ve(r,ie,b===R)&&(V=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):P===0&&(V=L&&Ce(r,ve))),r.tag!==null&&r.tag!=="!")if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&re(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),I=0,Z=r.implicitTypes.length;I<Z;I+=1)if(J=r.implicitTypes[I],J.resolve(r.result)){r.result=J.construct(r.result),r.tag=J.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else e.call(r.typeMap[r.kind||"fallback"],r.tag)?(J=r.typeMap[r.kind||"fallback"][r.tag],r.result!==null&&J.kind!==r.kind&&re(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+J.kind+'", not "'+r.kind+'"'),J.resolve(r.result)?(r.result=J.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):re(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):re(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||V}c(Ge,"composeNode"),n(Ge,"composeNode");function pt(r){var _=r.position,R,z,B,l=!1,w;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(w=r.input.charCodeAt(r.position))!==0&&(Ae(r,!0,-1),w=r.input.charCodeAt(r.position),!(r.lineIndent>0||w!==37));){for(l=!0,w=r.input.charCodeAt(++r.position),R=r.position;w!==0&&!U(w);)w=r.input.charCodeAt(++r.position);for(z=r.input.slice(R,r.position),B=[],z.length<1&&re(r,"directive name must not be less than one character in length");w!==0;){for(;me(w);)w=r.input.charCodeAt(++r.position);if(w===35){do w=r.input.charCodeAt(++r.position);while(w!==0&&!ne(w));break}if(ne(w))break;for(R=r.position;w!==0&&!U(w);)w=r.input.charCodeAt(++r.position);B.push(r.input.slice(R,r.position))}w!==0&&Le(r),e.call(We,z)?We[z](r,z,B):Pe(r,'unknown document directive "'+z+'"')}if(Ae(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,Ae(r,!0,-1)):l&&re(r,"directives end mark is expected"),Ge(r,r.lineIndent-1,S,!1,!0),Ae(r,!0,-1),r.checkLineBreaks&&E.test(r.input.slice(_,r.position))&&Pe(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Ye(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,Ae(r,!0,-1));return}if(r.position<r.length-1)re(r,"end of the stream or a document separator is expected");else return}c(pt,"readDocument"),n(pt,"readDocument");function et(r,_){r=String(r),_=_||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
22
+ `),r.charCodeAt(0)===65279&&(r=r.slice(1)));var R=new Ke(r,_),z=r.indexOf("\0");for(z!==-1&&(R.position=z,re(R,"null byte is not allowed in input")),R.input+="\0";R.input.charCodeAt(R.position)===32;)R.lineIndent+=1,R.position+=1;for(;R.position<R.length-1;)pt(R);return R.documents}c(et,"loadDocuments"),n(et,"loadDocuments");function ze(r,_,R){_!==null&&typeof _=="object"&&typeof R>"u"&&(R=_,_=null);var z=et(r,R);if(typeof _!="function")return z;for(var B=0,l=z.length;B<l;B+=1)_(z[B])}c(ze,"loadAll"),n(ze,"loadAll");function dt(r,_){var R=et(r,_);if(R.length!==0){if(R.length===1)return R[0];throw new y("expected a single document in the stream, but found more")}}c(dt,"load"),n(dt,"load");function bt(r,_,R){return typeof _=="object"&&_!==null&&typeof R>"u"&&(R=_,_=null),ze(r,_,m.extend({schema:a},R))}c(bt,"safeLoadAll"),n(bt,"safeLoadAll");function ht(r,_){return dt(r,m.extend({schema:a},_))}return c(ht,"safeLoad"),n(ht,"safeLoad"),zt.loadAll=ze,zt.load=dt,zt.safeLoadAll=bt,zt.safeLoad=ht,zt}c(us,"requireLoader");var Jr={},Oo;function cs(){if(Oo)return Jr;Oo=1;var h=Object.defineProperty,n=c((l,w)=>h(l,"name",{value:w,configurable:!0}),"o"),m=Xt(),y=Er(),$=Kr(),a=$r(),g=Object.prototype.toString,e=Object.prototype.hasOwnProperty,b=9,x=10,A=13,S=32,O=33,F=34,C=35,v=37,E=38,X=39,ge=42,oe=44,T=45,ne=58,me=61,U=62,ue=63,be=64,ye=91,je=93,Me=96,De=123,qe=124,rt=125,Ee={};Ee[0]="\\0",Ee[7]="\\a",Ee[8]="\\b",Ee[9]="\\t",Ee[10]="\\n",Ee[11]="\\v",Ee[12]="\\f",Ee[13]="\\r",Ee[27]="\\e",Ee[34]='\\"',Ee[92]="\\\\",Ee[133]="\\N",Ee[160]="\\_",Ee[8232]="\\L",Ee[8233]="\\P";var He=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Ke(l,w){var L,P,q,V,I,Z,J;if(w===null)return{};for(L={},P=Object.keys(w),q=0,V=P.length;q<V;q+=1)I=P[q],Z=String(w[I]),I.slice(0,2)==="!!"&&(I="tag:yaml.org,2002:"+I.slice(2)),J=l.compiledTypeMap.fallback[I],J&&e.call(J.styleAliases,Z)&&(Z=J.styleAliases[Z]),L[I]=Z;return L}c(Ke,"compileStyleMap"),n(Ke,"compileStyleMap");function Qe(l){var w,L,P;if(w=l.toString(16).toUpperCase(),l<=255)L="x",P=2;else if(l<=65535)L="u",P=4;else if(l<=4294967295)L="U",P=8;else throw new y("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+L+m.repeat("0",P-w.length)+w}c(Qe,"encodeHex"),n(Qe,"encodeHex");function re(l){this.schema=l.schema||$,this.indent=Math.max(1,l.indent||2),this.noArrayIndent=l.noArrayIndent||!1,this.skipInvalid=l.skipInvalid||!1,this.flowLevel=m.isNothing(l.flowLevel)?-1:l.flowLevel,this.styleMap=Ke(this.schema,l.styles||null),this.sortKeys=l.sortKeys||!1,this.lineWidth=l.lineWidth||80,this.noRefs=l.noRefs||!1,this.noCompatMode=l.noCompatMode||!1,this.condenseFlow=l.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}c(re,"State"),n(re,"State");function Pe(l,w){for(var L=m.repeat(" ",w),P=0,q=-1,V="",I,Z=l.length;P<Z;)q=l.indexOf(`
23
+ `,P),q===-1?(I=l.slice(P),P=Z):(I=l.slice(P,q+1),P=q+1),I.length&&I!==`
24
+ `&&(V+=L),V+=I;return V}c(Pe,"indentString"),n(Pe,"indentString");function We(l,w){return`
25
+ `+m.repeat(" ",l.indent*w)}c(We,"generateNextLine"),n(We,"generateNextLine");function ke(l,w){var L,P,q;for(L=0,P=l.implicitTypes.length;L<P;L+=1)if(q=l.implicitTypes[L],q.resolve(w))return!0;return!1}c(ke,"testImplicitResolving"),n(ke,"testImplicitResolving");function xe(l){return l===S||l===b}c(xe,"isWhitespace"),n(xe,"isWhitespace");function $e(l){return 32<=l&&l<=126||161<=l&&l<=55295&&l!==8232&&l!==8233||57344<=l&&l<=65533&&l!==65279||65536<=l&&l<=1114111}c($e,"isPrintable"),n($e,"isPrintable");function Le(l){return $e(l)&&!xe(l)&&l!==65279&&l!==A&&l!==x}c(Le,"isNsChar"),n(Le,"isNsChar");function Ae(l,w){return $e(l)&&l!==65279&&l!==oe&&l!==ye&&l!==je&&l!==De&&l!==rt&&l!==ne&&(l!==C||w&&Le(w))}c(Ae,"isPlainSafe"),n(Ae,"isPlainSafe");function Ye(l){return $e(l)&&l!==65279&&!xe(l)&&l!==T&&l!==ue&&l!==ne&&l!==oe&&l!==ye&&l!==je&&l!==De&&l!==rt&&l!==C&&l!==E&&l!==ge&&l!==O&&l!==qe&&l!==me&&l!==U&&l!==X&&l!==F&&l!==v&&l!==be&&l!==Me}c(Ye,"isPlainSafeFirst"),n(Ye,"isPlainSafeFirst");function Ue(l){var w=/^\n* /;return w.test(l)}c(Ue,"needIndentIndicator"),n(Ue,"needIndentIndicator");var Ve=1,Je=2,Y=3,W=4,se=5;function Ce(l,w,L,P,q){var V,I,Z,J=!1,ie=!1,ve=P!==-1,fe=-1,_e=Ye(l.charCodeAt(0))&&!xe(l.charCodeAt(l.length-1));if(w)for(V=0;V<l.length;V++){if(I=l.charCodeAt(V),!$e(I))return se;Z=V>0?l.charCodeAt(V-1):null,_e=_e&&Ae(I,Z)}else{for(V=0;V<l.length;V++){if(I=l.charCodeAt(V),I===x)J=!0,ve&&(ie=ie||V-fe-1>P&&l[fe+1]!==" ",fe=V);else if(!$e(I))return se;Z=V>0?l.charCodeAt(V-1):null,_e=_e&&Ae(I,Z)}ie=ie||ve&&V-fe-1>P&&l[fe+1]!==" "}return!J&&!ie?_e&&!q(l)?Ve:Je:L>9&&Ue(l)?se:ie?W:Y}c(Ce,"chooseScalarStyle"),n(Ce,"chooseScalarStyle");function nt(l,w,L,P){l.dump=(function(){if(w.length===0)return"''";if(!l.noCompatMode&&He.indexOf(w)!==-1)return"'"+w+"'";var q=l.indent*Math.max(1,L),V=l.lineWidth===-1?-1:Math.max(Math.min(l.lineWidth,40),l.lineWidth-q),I=P||l.flowLevel>-1&&L>=l.flowLevel;function Z(J){return ke(l,J)}switch(c(Z,"a"),n(Z,"testAmbiguity"),Ce(w,I,l.indent,V,Z)){case Ve:return w;case Je:return"'"+w.replace(/'/g,"''")+"'";case Y:return"|"+at(w,l.indent)+st(Pe(w,q));case W:return">"+at(w,l.indent)+st(Pe(At(w,V),q));case se:return'"'+pt(w)+'"';default:throw new y("impossible error: invalid scalar style")}})()}c(nt,"writeScalar"),n(nt,"writeScalar");function at(l,w){var L=Ue(l)?String(w):"",P=l[l.length-1]===`
26
+ `,q=P&&(l[l.length-2]===`
27
+ `||l===`
28
+ `),V=q?"+":P?"":"-";return L+V+`
29
+ `}c(at,"blockHeader"),n(at,"blockHeader");function st(l){return l[l.length-1]===`
30
+ `?l.slice(0,-1):l}c(st,"dropEndingNewline"),n(st,"dropEndingNewline");function At(l,w){for(var L=/(\n+)([^\n]*)/g,P=(function(){var ie=l.indexOf(`
31
+ `);return ie=ie!==-1?ie:l.length,L.lastIndex=ie,Ge(l.slice(0,ie),w)})(),q=l[0]===`
32
+ `||l[0]===" ",V,I;I=L.exec(l);){var Z=I[1],J=I[2];V=J[0]===" ",P+=Z+(!q&&!V&&J!==""?`
33
+ `:"")+Ge(J,w),q=V}return P}c(At,"foldString"),n(At,"foldString");function Ge(l,w){if(l===""||l[0]===" ")return l;for(var L=/ [^ ]/g,P,q=0,V,I=0,Z=0,J="";P=L.exec(l);)Z=P.index,Z-q>w&&(V=I>q?I:Z,J+=`
34
+ `+l.slice(q,V),q=V+1),I=Z;return J+=`
35
+ `,l.length-q>w&&I>q?J+=l.slice(q,I)+`
36
+ `+l.slice(I+1):J+=l.slice(q),J.slice(1)}c(Ge,"foldLine"),n(Ge,"foldLine");function pt(l){for(var w="",L,P,q,V=0;V<l.length;V++){if(L=l.charCodeAt(V),L>=55296&&L<=56319&&(P=l.charCodeAt(V+1),P>=56320&&P<=57343)){w+=Qe((L-55296)*1024+P-56320+65536),V++;continue}q=Ee[L],w+=!q&&$e(L)?l[V]:q||Qe(L)}return w}c(pt,"escapeString"),n(pt,"escapeString");function et(l,w,L){var P="",q=l.tag,V,I;for(V=0,I=L.length;V<I;V+=1)r(l,w,L[V],!1,!1)&&(V!==0&&(P+=","+(l.condenseFlow?"":" ")),P+=l.dump);l.tag=q,l.dump="["+P+"]"}c(et,"writeFlowSequence"),n(et,"writeFlowSequence");function ze(l,w,L,P){var q="",V=l.tag,I,Z;for(I=0,Z=L.length;I<Z;I+=1)r(l,w+1,L[I],!0,!0)&&((!P||I!==0)&&(q+=We(l,w)),l.dump&&x===l.dump.charCodeAt(0)?q+="-":q+="- ",q+=l.dump);l.tag=V,l.dump=q||"[]"}c(ze,"writeBlockSequence"),n(ze,"writeBlockSequence");function dt(l,w,L){var P="",q=l.tag,V=Object.keys(L),I,Z,J,ie,ve;for(I=0,Z=V.length;I<Z;I+=1)ve="",I!==0&&(ve+=", "),l.condenseFlow&&(ve+='"'),J=V[I],ie=L[J],r(l,w,J,!1,!1)&&(l.dump.length>1024&&(ve+="? "),ve+=l.dump+(l.condenseFlow?'"':"")+":"+(l.condenseFlow?"":" "),r(l,w,ie,!1,!1)&&(ve+=l.dump,P+=ve));l.tag=q,l.dump="{"+P+"}"}c(dt,"writeFlowMapping"),n(dt,"writeFlowMapping");function bt(l,w,L,P){var q="",V=l.tag,I=Object.keys(L),Z,J,ie,ve,fe,_e;if(l.sortKeys===!0)I.sort();else if(typeof l.sortKeys=="function")I.sort(l.sortKeys);else if(l.sortKeys)throw new y("sortKeys must be a boolean or a function");for(Z=0,J=I.length;Z<J;Z+=1)_e="",(!P||Z!==0)&&(_e+=We(l,w)),ie=I[Z],ve=L[ie],r(l,w+1,ie,!0,!0,!0)&&(fe=l.tag!==null&&l.tag!=="?"||l.dump&&l.dump.length>1024,fe&&(l.dump&&x===l.dump.charCodeAt(0)?_e+="?":_e+="? "),_e+=l.dump,fe&&(_e+=We(l,w)),r(l,w+1,ve,!0,fe)&&(l.dump&&x===l.dump.charCodeAt(0)?_e+=":":_e+=": ",_e+=l.dump,q+=_e));l.tag=V,l.dump=q||"{}"}c(bt,"writeBlockMapping"),n(bt,"writeBlockMapping");function ht(l,w,L){var P,q,V,I,Z,J;for(q=L?l.explicitTypes:l.implicitTypes,V=0,I=q.length;V<I;V+=1)if(Z=q[V],(Z.instanceOf||Z.predicate)&&(!Z.instanceOf||typeof w=="object"&&w instanceof Z.instanceOf)&&(!Z.predicate||Z.predicate(w))){if(l.tag=L?Z.tag:"?",Z.represent){if(J=l.styleMap[Z.tag]||Z.defaultStyle,g.call(Z.represent)==="[object Function]")P=Z.represent(w,J);else if(e.call(Z.represent,J))P=Z.represent[J](w,J);else throw new y("!<"+Z.tag+'> tag resolver accepts not "'+J+'" style');l.dump=P}return!0}return!1}c(ht,"detectType"),n(ht,"detectType");function r(l,w,L,P,q,V){l.tag=null,l.dump=L,ht(l,L,!1)||ht(l,L,!0);var I=g.call(l.dump);P&&(P=l.flowLevel<0||l.flowLevel>w);var Z=I==="[object Object]"||I==="[object Array]",J,ie;if(Z&&(J=l.duplicates.indexOf(L),ie=J!==-1),(l.tag!==null&&l.tag!=="?"||ie||l.indent!==2&&w>0)&&(q=!1),ie&&l.usedDuplicates[J])l.dump="*ref_"+J;else{if(Z&&ie&&!l.usedDuplicates[J]&&(l.usedDuplicates[J]=!0),I==="[object Object]")P&&Object.keys(l.dump).length!==0?(bt(l,w,l.dump,q),ie&&(l.dump="&ref_"+J+l.dump)):(dt(l,w,l.dump),ie&&(l.dump="&ref_"+J+" "+l.dump));else if(I==="[object Array]"){var ve=l.noArrayIndent&&w>0?w-1:w;P&&l.dump.length!==0?(ze(l,ve,l.dump,q),ie&&(l.dump="&ref_"+J+l.dump)):(et(l,ve,l.dump),ie&&(l.dump="&ref_"+J+" "+l.dump))}else if(I==="[object String]")l.tag!=="?"&&nt(l,l.dump,w,V);else{if(l.skipInvalid)return!1;throw new y("unacceptable kind of an object to dump "+I)}l.tag!==null&&l.tag!=="?"&&(l.dump="!<"+l.tag+"> "+l.dump)}return!0}c(r,"writeNode"),n(r,"writeNode");function _(l,w){var L=[],P=[],q,V;for(R(l,L,P),q=0,V=P.length;q<V;q+=1)w.duplicates.push(L[P[q]]);w.usedDuplicates=new Array(V)}c(_,"getDuplicateReferences"),n(_,"getDuplicateReferences");function R(l,w,L){var P,q,V;if(l!==null&&typeof l=="object")if(q=w.indexOf(l),q!==-1)L.indexOf(q)===-1&&L.push(q);else if(w.push(l),Array.isArray(l))for(q=0,V=l.length;q<V;q+=1)R(l[q],w,L);else for(P=Object.keys(l),q=0,V=P.length;q<V;q+=1)R(l[P[q]],w,L)}c(R,"inspectNode"),n(R,"inspectNode");function z(l,w){w=w||{};var L=new re(w);return L.noRefs||_(l,L),r(L,0,l,!0,!0)?L.dump+`
37
+ `:""}c(z,"dump"),n(z,"dump");function B(l,w){return z(l,m.extend({schema:a},w))}return c(B,"safeDump"),n(B,"safeDump"),Jr.dump=z,Jr.safeDump=B,Jr}c(cs,"requireDumper");var jo;function ls(){if(jo)return Oe;jo=1;var h=Object.defineProperty,n=c((a,g)=>h(a,"name",{value:g,configurable:!0}),"o"),m=us(),y=cs();function $(a){return function(){throw new Error("Function "+a+" is deprecated and cannot be used.")}}return c($,"deprecated"),n($,"deprecated"),Oe.Type=Ne(),Oe.Schema=er(),Oe.FAILSAFE_SCHEMA=ui(),Oe.JSON_SCHEMA=Bo(),Oe.CORE_SCHEMA=Ho(),Oe.DEFAULT_SAFE_SCHEMA=$r(),Oe.DEFAULT_FULL_SCHEMA=Kr(),Oe.load=m.load,Oe.loadAll=m.loadAll,Oe.safeLoad=m.safeLoad,Oe.safeLoadAll=m.safeLoadAll,Oe.dump=y.dump,Oe.safeDump=y.safeDump,Oe.YAMLException=Er(),Oe.MINIMAL_SCHEMA=ui(),Oe.SAFE_SCHEMA=$r(),Oe.DEFAULT_SCHEMA=Kr(),Oe.scan=$("scan"),Oe.parse=$("parse"),Oe.compose=$("compose"),Oe.addConstructor=$("addConstructor"),Oe}c(ls,"requireJsYaml$1");var oi,_o;function fs(){if(_o)return oi;_o=1;var h=ls();return oi=h,oi}c(fs,"requireJsYaml");var ai,To;function ps(){if(To)return ai;To=1;var h=Object.defineProperty,n=c((a,g)=>h(a,"name",{value:g,configurable:!0}),"n");function m(a,g){function e(){this.constructor=a}c(e,"r"),n(e,"ctor"),e.prototype=g.prototype,a.prototype=new e}c(m,"peg$subclass"),n(m,"peg$subclass");function y(a,g,e,b){this.message=a,this.expected=g,this.found=e,this.location=b,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y)}c(y,"peg$SyntaxError"),n(y,"peg$SyntaxError"),m(y,Error),y.buildMessage=function(a,g){var e={literal:n(function(C){return'"'+x(C.text)+'"'},"literal"),class:n(function(C){var v="",E;for(E=0;E<C.parts.length;E++)v+=C.parts[E]instanceof Array?A(C.parts[E][0])+"-"+A(C.parts[E][1]):A(C.parts[E]);return"["+(C.inverted?"^":"")+v+"]"},"class"),any:n(function(C){return"any character"},"any"),end:n(function(C){return"end of input"},"end"),other:n(function(C){return C.description},"other")};function b(C){return C.charCodeAt(0).toString(16).toUpperCase()}c(b,"m"),n(b,"hex");function x(C){return C.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(x,"D"),n(x,"literalEscape");function A(C){return C.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+b(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+b(v)})}c(A,"P"),n(A,"classEscape");function S(C){return e[C.type](C)}c(S,"T"),n(S,"describeExpectation");function O(C){var v=new Array(C.length),E,X;for(E=0;E<C.length;E++)v[E]=S(C[E]);if(v.sort(),v.length>0){for(E=1,X=1;E<v.length;E++)v[E-1]!==v[E]&&(v[X]=v[E],X++);v.length=X}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}c(O,"j"),n(O,"describeExpected");function F(C){return C?'"'+x(C)+'"':"end of input"}return c(F,"q"),n(F,"describeFound"),"Expected "+O(a)+" but "+F(g)+" found."};function $(a,g){g=g!==void 0?g:{};var e={},b={Start:ar},x=ar,A=n(function(s){return[].concat(...s)},"peg$c0"),S="-",O=we("-",!1),F=n(function(s){return s},"peg$c3"),C=n(function(s){return Object.assign({},...s)},"peg$c4"),v="#",E=we("#",!1),X=Lr(),ge=n(function(){return{}},"peg$c8"),oe=":",T=we(":",!1),ne=n(function(s,d){return{[s]:d}},"peg$c11"),me=",",U=we(",",!1),ue=n(function(s,d){return d},"peg$c14"),be=n(function(s,d,j){return Object.assign({},...[s].concat(d).map(G=>({[G]:j})))},"peg$c15"),ye=n(function(s){return s},"peg$c16"),je=n(function(s){return s},"peg$c17"),Me=Ct("correct indentation"),De=" ",qe=we(" ",!1),rt=n(function(s){return s.length===qt*hr},"peg$c21"),Ee=n(function(s){return s.length===(qt+1)*hr},"peg$c22"),He=n(function(){return qt++,!0},"peg$c23"),Ke=n(function(){return qt--,!0},"peg$c24"),Qe=n(function(){return ir()},"peg$c25"),re=Ct("pseudostring"),Pe=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,We=it(["\r",`
38
+ `," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),ke=/^[^\r\n\t ,\][{}:#"']/,xe=it(["\r",`
39
+ `," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),$e=n(function(){return ir().replace(/^ *| *$/g,"")},"peg$c31"),Le="--",Ae=we("--",!1),Ye=/^[a-zA-Z\/0-9]/,Ue=it([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ve=/^[^\r\n\t :,]/,Je=it(["\r",`
40
+ `," "," ",":",","],!0,!1),Y="null",W=we("null",!1),se=n(function(){return null},"peg$c40"),Ce="true",nt=we("true",!1),at=n(function(){return!0},"peg$c43"),st="false",At=we("false",!1),Ge=n(function(){return!1},"peg$c46"),pt=Ct("string"),et='"',ze=we('"',!1),dt=n(function(){return""},"peg$c50"),bt=n(function(s){return s},"peg$c51"),ht=n(function(s){return s.join("")},"peg$c52"),r=/^[^"\\\0-\x1F\x7F]/,_=it(['"',"\\",["\0",""],""],!0,!1),R='\\"',z=we('\\"',!1),B=n(function(){return'"'},"peg$c57"),l="\\\\",w=we("\\\\",!1),L=n(function(){return"\\"},"peg$c60"),P="\\/",q=we("\\/",!1),V=n(function(){return"/"},"peg$c63"),I="\\b",Z=we("\\b",!1),J=n(function(){return"\b"},"peg$c66"),ie="\\f",ve=we("\\f",!1),fe=n(function(){return"\f"},"peg$c69"),_e="\\n",Qr=we("\\n",!1),zr=n(function(){return`
41
+ `},"peg$c72"),wr="\\r",Ut=we("\\r",!1),Wt=n(function(){return"\r"},"peg$c75"),wt="\\t",kr=we("\\t",!1),xr=n(function(){return" "},"peg$c78"),tr="\\u",Zr=we("\\u",!1),Xr=n(function(s,d,j,G){return String.fromCharCode(parseInt(`0x${s}${d}${j}${G}`))},"peg$c81"),kt=/^[0-9a-fA-F]/,xt=it([["0","9"],["a","f"],["A","F"]],!1,!1),en=Ct("blank space"),Or=/^[ \t]/,ut=it([" "," "],!1,!1),jr=Ct("white space"),_r=/^[ \t\n\r]/,Tr=it([" "," ",`
42
+ `,"\r"],!1,!1),rr=`\r
43
+ `,tn=we(`\r
44
+ `,!1),rn=`
45
+ `,nn=we(`
46
+ `,!1),on="\r",an=we("\r",!1),p=0,he=0,Vt=[{line:1,column:1}],tt=0,nr=[],te=0,Ft;if("startRule"in g){if(!(g.startRule in b))throw new Error(`Can't start parsing from rule "`+g.startRule+'".');x=b[g.startRule]}function ir(){return a.substring(he,p)}c(ir,"ye"),n(ir,"text");function sn(){return gt(he,p)}c(sn,"Jr"),n(sn,"location");function Rr(s,d){throw d=d!==void 0?d:gt(he,p),Jt([Ct(s)],a.substring(he,p),d)}c(Rr,"Kr"),n(Rr,"expected");function un(s,d){throw d=d!==void 0?d:gt(he,p),Pr(s,d)}c(un,"Qr"),n(un,"error");function we(s,d){return{type:"literal",text:s,ignoreCase:d}}c(we,"A"),n(we,"peg$literalExpectation");function it(s,d,j){return{type:"class",parts:s,inverted:d,ignoreCase:j}}c(it,"w"),n(it,"peg$classExpectation");function Lr(){return{type:"any"}}c(Lr,"kr"),n(Lr,"peg$anyExpectation");function Fr(){return{type:"end"}}c(Fr,"zr"),n(Fr,"peg$endExpectation");function Ct(s){return{type:"other",description:s}}c(Ct,"S"),n(Ct,"peg$otherExpectation");function or(s){var d=Vt[s],j;if(d)return d;for(j=s-1;!Vt[j];)j--;for(d=Vt[j],d={line:d.line,column:d.column};j<s;)a.charCodeAt(j)===10?(d.line++,d.column=1):d.column++,j++;return Vt[s]=d,d}c(or,"Fe"),n(or,"peg$computePosDetails");function gt(s,d){var j=or(s),G=or(d);return{start:{offset:s,line:j.line,column:j.column},end:{offset:d,line:G.line,column:G.column}}}c(gt,"I"),n(gt,"peg$computeLocation");function ae(s){p<tt||(p>tt&&(tt=p,nr=[]),nr.push(s))}c(ae,"g"),n(ae,"peg$fail");function Pr(s,d){return new y(s,null,null,d)}c(Pr,"Br"),n(Pr,"peg$buildSimpleError");function Jt(s,d,j){return new y(y.buildMessage(s,d),s,d,j)}c(Jt,"Se"),n(Jt,"peg$buildStructuredError");function ar(){var s;return s=cr(),s}c(ar,"Le"),n(ar,"peg$parseStart");function sr(){var s,d,j;for(s=p,d=[],j=ur();j!==e;)d.push(j),j=ur();return d!==e&&(he=s,d=A(d)),s=d,s}c(sr,"Mr"),n(sr,"peg$parseItemStatements");function ur(){var s,d,j,G,H;return s=p,d=Ot(),d!==e?(a.charCodeAt(p)===45?(j=S,p++):(j=e,te===0&&ae(O)),j!==e?(G=Te(),G!==e?(H=Pt(),H!==e?(he=s,d=F(H),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s}c(ur,"De"),n(ur,"peg$parseItemStatement");function cr(){var s,d,j;for(s=p,d=[],j=lr();j!==e;)d.push(j),j=lr();return d!==e&&(he=s,d=C(d)),s=d,s}c(cr,"Pe"),n(cr,"peg$parsePropertyStatements");function lr(){var s,d,j,G,H,ee,pe,Se,Tt;if(s=p,d=Te(),d===e&&(d=null),d!==e){if(j=p,a.charCodeAt(p)===35?(G=v,p++):(G=e,te===0&&ae(E)),G!==e){if(H=[],ee=p,pe=p,te++,Se=lt(),te--,Se===e?pe=void 0:(p=pe,pe=e),pe!==e?(a.length>p?(Se=a.charAt(p),p++):(Se=e,te===0&&ae(X)),Se!==e?(pe=[pe,Se],ee=pe):(p=ee,ee=e)):(p=ee,ee=e),ee!==e)for(;ee!==e;)H.push(ee),ee=p,pe=p,te++,Se=lt(),te--,Se===e?pe=void 0:(p=pe,pe=e),pe!==e?(a.length>p?(Se=a.charAt(p),p++):(Se=e,te===0&&ae(X)),Se!==e?(pe=[pe,Se],ee=pe):(p=ee,ee=e)):(p=ee,ee=e);else H=e;H!==e?(G=[G,H],j=G):(p=j,j=e)}else p=j,j=e;if(j===e&&(j=null),j!==e){if(G=[],H=ct(),H!==e)for(;H!==e;)G.push(H),H=ct();else G=e;G!==e?(he=s,d=ge(),s=d):(p=s,s=e)}else p=s,s=e}else p=s,s=e;if(s===e&&(s=p,d=Ot(),d!==e?(j=fr(),j!==e?(G=Te(),G===e&&(G=null),G!==e?(a.charCodeAt(p)===58?(H=oe,p++):(H=e,te===0&&ae(T)),H!==e?(ee=Te(),ee===e&&(ee=null),ee!==e?(pe=Pt(),pe!==e?(he=s,d=ne(j,pe),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,d=Ot(),d!==e?(j=$t(),j!==e?(G=Te(),G===e&&(G=null),G!==e?(a.charCodeAt(p)===58?(H=oe,p++):(H=e,te===0&&ae(T)),H!==e?(ee=Te(),ee===e&&(ee=null),ee!==e?(pe=Pt(),pe!==e?(he=s,d=ne(j,pe),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e))){if(s=p,d=Ot(),d!==e)if(j=$t(),j!==e)if(G=Te(),G!==e)if(H=Nt(),H!==e){if(ee=[],pe=ct(),pe!==e)for(;pe!==e;)ee.push(pe),pe=ct();else ee=e;ee!==e?(he=s,d=ne(j,H),s=d):(p=s,s=e)}else p=s,s=e;else p=s,s=e;else p=s,s=e;else p=s,s=e;if(s===e)if(s=p,d=Ot(),d!==e)if(j=$t(),j!==e){if(G=[],H=p,ee=Te(),ee===e&&(ee=null),ee!==e?(a.charCodeAt(p)===44?(pe=me,p++):(pe=e,te===0&&ae(U)),pe!==e?(Se=Te(),Se===e&&(Se=null),Se!==e?(Tt=$t(),Tt!==e?(he=H,ee=ue(j,Tt),H=ee):(p=H,H=e)):(p=H,H=e)):(p=H,H=e)):(p=H,H=e),H!==e)for(;H!==e;)G.push(H),H=p,ee=Te(),ee===e&&(ee=null),ee!==e?(a.charCodeAt(p)===44?(pe=me,p++):(pe=e,te===0&&ae(U)),pe!==e?(Se=Te(),Se===e&&(Se=null),Se!==e?(Tt=$t(),Tt!==e?(he=H,ee=ue(j,Tt),H=ee):(p=H,H=e)):(p=H,H=e)):(p=H,H=e)):(p=H,H=e);else G=e;G!==e?(H=Te(),H===e&&(H=null),H!==e?(a.charCodeAt(p)===58?(ee=oe,p++):(ee=e,te===0&&ae(T)),ee!==e?(pe=Te(),pe===e&&(pe=null),pe!==e?(Se=Pt(),Se!==e?(he=s,d=be(j,G,Se),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)}else p=s,s=e;else p=s,s=e}return s}c(lr,"Ie"),n(lr,"peg$parsePropertyStatement");function Pt(){var s,d,j,G,H,ee,pe;if(s=p,d=p,te++,j=p,G=lt(),G!==e?(H=Ir(),H!==e?(a.charCodeAt(p)===45?(ee=S,p++):(ee=e,te===0&&ae(O)),ee!==e?(pe=Te(),pe!==e?(G=[G,H,ee,pe],j=G):(p=j,j=e)):(p=j,j=e)):(p=j,j=e)):(p=j,j=e),te--,j!==e?(p=d,d=void 0):d=e,d!==e?(j=ct(),j!==e?(G=mt(),G!==e?(H=sr(),H!==e?(ee=jt(),ee!==e?(he=s,d=ye(H),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,d=lt(),d!==e?(j=mt(),j!==e?(G=cr(),G!==e?(H=jt(),H!==e?(he=s,d=ye(G),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e),s===e))if(s=p,d=It(),d!==e){if(j=[],G=ct(),G!==e)for(;G!==e;)j.push(G),G=ct();else j=e;j!==e?(he=s,d=je(d),s=d):(p=s,s=e)}else p=s,s=e;return s}c(Pt,"Z"),n(Pt,"peg$parseExpression");function Ot(){var s,d,j;for(te++,s=p,d=[],a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ae(qe));j!==e;)d.push(j),a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ae(qe));return d!==e?(he=p,j=rt(d),j?j=void 0:j=e,j!==e?(d=[d,j],s=d):(p=s,s=e)):(p=s,s=e),te--,s===e&&(d=e,te===0&&ae(Me)),s}c(Ot,"N"),n(Ot,"peg$parseSamedent");function Ir(){var s,d,j;for(s=p,d=[],a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ae(qe));j!==e;)d.push(j),a.charCodeAt(p)===32?(j=De,p++):(j=e,te===0&&ae(qe));return d!==e?(he=p,j=Ee(d),j?j=void 0:j=e,j!==e?(d=[d,j],s=d):(p=s,s=e)):(p=s,s=e),s}c(Ir,"Zr"),n(Ir,"peg$parseExtradent");function mt(){var s;return he=p,s=He(),s?s=void 0:s=e,s}c(mt,"Ne"),n(mt,"peg$parseIndent");function jt(){var s;return he=p,s=Ke(),s?s=void 0:s=e,s}c(jt,"Re"),n(jt,"peg$parseDedent");function fr(){var s;return s=Mt(),s===e&&(s=_t()),s}c(fr,"Ur"),n(fr,"peg$parseName");function $t(){var s,d,j;if(s=Mt(),s===e){if(s=p,d=[],j=St(),j!==e)for(;j!==e;)d.push(j),j=St();else d=e;d!==e&&(he=s,d=Qe()),s=d}return s}c($t,"R"),n($t,"peg$parseLegacyName");function It(){var s;return s=pr(),s===e&&(s=Nr(),s===e&&(s=Mt(),s===e&&(s=_t()))),s}c(It,"Xr"),n(It,"peg$parseLiteral");function Nt(){var s;return s=pr(),s===e&&(s=Mt(),s===e&&(s=St())),s}c(Nt,"Yr"),n(Nt,"peg$parseLegacyLiteral");function _t(){var s,d,j,G,H,ee;if(te++,s=p,Pe.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ae(We)),d!==e){for(j=[],G=p,H=Te(),H===e&&(H=null),H!==e?(ke.test(a.charAt(p))?(ee=a.charAt(p),p++):(ee=e,te===0&&ae(xe)),ee!==e?(H=[H,ee],G=H):(p=G,G=e)):(p=G,G=e);G!==e;)j.push(G),G=p,H=Te(),H===e&&(H=null),H!==e?(ke.test(a.charAt(p))?(ee=a.charAt(p),p++):(ee=e,te===0&&ae(xe)),ee!==e?(H=[H,ee],G=H):(p=G,G=e)):(p=G,G=e);j!==e?(he=s,d=$e(),s=d):(p=s,s=e)}else p=s,s=e;return te--,s===e&&(d=e,te===0&&ae(re)),s}c(_t,"Te"),n(_t,"peg$parsepseudostring");function St(){var s,d,j,G,H;if(s=p,a.substr(p,2)===Le?(d=Le,p+=2):(d=e,te===0&&ae(Ae)),d===e&&(d=null),d!==e)if(Ye.test(a.charAt(p))?(j=a.charAt(p),p++):(j=e,te===0&&ae(Ue)),j!==e){for(G=[],Ve.test(a.charAt(p))?(H=a.charAt(p),p++):(H=e,te===0&&ae(Je));H!==e;)G.push(H),Ve.test(a.charAt(p))?(H=a.charAt(p),p++):(H=e,te===0&&ae(Je));G!==e?(he=s,d=$e(),s=d):(p=s,s=e)}else p=s,s=e;else p=s,s=e;return s}c(St,"Q"),n(St,"peg$parsepseudostringLegacy");function pr(){var s,d;return s=p,a.substr(p,4)===Y?(d=Y,p+=4):(d=e,te===0&&ae(W)),d!==e&&(he=s,d=se()),s=d,s}c(pr,"je"),n(pr,"peg$parsenull");function Nr(){var s,d;return s=p,a.substr(p,4)===Ce?(d=Ce,p+=4):(d=e,te===0&&ae(nt)),d!==e&&(he=s,d=at()),s=d,s===e&&(s=p,a.substr(p,5)===st?(d=st,p+=5):(d=e,te===0&&ae(At)),d!==e&&(he=s,d=Ge()),s=d),s}c(Nr,"qr"),n(Nr,"peg$parseboolean");function Mt(){var s,d,j,G;return te++,s=p,a.charCodeAt(p)===34?(d=et,p++):(d=e,te===0&&ae(ze)),d!==e?(a.charCodeAt(p)===34?(j=et,p++):(j=e,te===0&&ae(ze)),j!==e?(he=s,d=dt(),s=d):(p=s,s=e)):(p=s,s=e),s===e&&(s=p,a.charCodeAt(p)===34?(d=et,p++):(d=e,te===0&&ae(ze)),d!==e?(j=Mr(),j!==e?(a.charCodeAt(p)===34?(G=et,p++):(G=e,te===0&&ae(ze)),G!==e?(he=s,d=bt(j),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)),te--,s===e&&(d=e,te===0&&ae(pt)),s}c(Mt,"U"),n(Mt,"peg$parsestring");function Mr(){var s,d,j;if(s=p,d=[],j=dr(),j!==e)for(;j!==e;)d.push(j),j=dr();else d=e;return d!==e&&(he=s,d=ht(d)),s=d,s}c(Mr,"Gr"),n(Mr,"peg$parsechars");function dr(){var s,d,j,G,H,ee;return r.test(a.charAt(p))?(s=a.charAt(p),p++):(s=e,te===0&&ae(_)),s===e&&(s=p,a.substr(p,2)===R?(d=R,p+=2):(d=e,te===0&&ae(z)),d!==e&&(he=s,d=B()),s=d,s===e&&(s=p,a.substr(p,2)===l?(d=l,p+=2):(d=e,te===0&&ae(w)),d!==e&&(he=s,d=L()),s=d,s===e&&(s=p,a.substr(p,2)===P?(d=P,p+=2):(d=e,te===0&&ae(q)),d!==e&&(he=s,d=V()),s=d,s===e&&(s=p,a.substr(p,2)===I?(d=I,p+=2):(d=e,te===0&&ae(Z)),d!==e&&(he=s,d=J()),s=d,s===e&&(s=p,a.substr(p,2)===ie?(d=ie,p+=2):(d=e,te===0&&ae(ve)),d!==e&&(he=s,d=fe()),s=d,s===e&&(s=p,a.substr(p,2)===_e?(d=_e,p+=2):(d=e,te===0&&ae(Qr)),d!==e&&(he=s,d=zr()),s=d,s===e&&(s=p,a.substr(p,2)===wr?(d=wr,p+=2):(d=e,te===0&&ae(Ut)),d!==e&&(he=s,d=Wt()),s=d,s===e&&(s=p,a.substr(p,2)===wt?(d=wt,p+=2):(d=e,te===0&&ae(kr)),d!==e&&(he=s,d=xr()),s=d,s===e&&(s=p,a.substr(p,2)===tr?(d=tr,p+=2):(d=e,te===0&&ae(Zr)),d!==e?(j=Dt(),j!==e?(G=Dt(),G!==e?(H=Dt(),H!==e?(ee=Dt(),ee!==e?(he=s,d=Xr(j,G,H,ee),s=d):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)):(p=s,s=e)))))))))),s}c(dr,"Oe"),n(dr,"peg$parsechar");function Dt(){var s;return kt.test(a.charAt(p))?(s=a.charAt(p),p++):(s=e,te===0&&ae(xt)),s}c(Dt,"X"),n(Dt,"peg$parsehexDigit");function Te(){var s,d;if(te++,s=[],Or.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ae(ut)),d!==e)for(;d!==e;)s.push(d),Or.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ae(ut));else s=e;return te--,s===e&&(d=e,te===0&&ae(en)),s}c(Te,"x"),n(Te,"peg$parseB");function Dr(){var s,d;if(te++,s=[],_r.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ae(Tr)),d!==e)for(;d!==e;)s.push(d),_r.test(a.charAt(p))?(d=a.charAt(p),p++):(d=e,te===0&&ae(Tr));else s=e;return te--,s===e&&(d=e,te===0&&ae(jr)),s}c(Dr,"Vr"),n(Dr,"peg$parseS");function ct(){var s,d,j,G,H,ee;if(s=p,d=lt(),d!==e){for(j=[],G=p,H=Te(),H===e&&(H=null),H!==e?(ee=lt(),ee!==e?(H=[H,ee],G=H):(p=G,G=e)):(p=G,G=e);G!==e;)j.push(G),G=p,H=Te(),H===e&&(H=null),H!==e?(ee=lt(),ee!==e?(H=[H,ee],G=H):(p=G,G=e)):(p=G,G=e);j!==e?(d=[d,j],s=d):(p=s,s=e)}else p=s,s=e;return s}c(ct,"y"),n(ct,"peg$parseEOL_ANY");function lt(){var s;return a.substr(p,2)===rr?(s=rr,p+=2):(s=e,te===0&&ae(tn)),s===e&&(a.charCodeAt(p)===10?(s=rn,p++):(s=e,te===0&&ae(nn)),s===e&&(a.charCodeAt(p)===13?(s=on,p++):(s=e,te===0&&ae(an)))),s}c(lt,"F"),n(lt,"peg$parseEOL");const hr=2;let qt=0;if(Ft=x(),Ft!==e&&p===a.length)return Ft;throw Ft!==e&&p<a.length&&ae(Fr()),Jt(nr,tt<a.length?a.charAt(tt):null,tt<a.length?gt(tt,tt+1):gt(tt,tt))}return c($,"peg$parse"),n($,"peg$parse"),ai={SyntaxError:y,parse:$},ai}c(ps,"requireSyml$1");var Ro;function ds(){if(Ro)return Yt;Ro=1;var h=Object.defineProperty,n=c((v,E)=>h(v,"name",{value:E,configurable:!0}),"t");Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.PreserveOrdering=void 0,Yt.stringifySyml=A,Yt.parseSyml=C;const m=fs(),y=ps(),$=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,a=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class g{static{c(this,"PreserveOrdering")}static{n(this,"PreserveOrdering")}constructor(E){this.data=E}}Yt.PreserveOrdering=g;function e(v){return v.match($)?v:JSON.stringify(v)}c(e,"stringifyString"),n(e,"stringifyString");function b(v){return typeof v>"u"?!0:typeof v=="object"&&v!==null&&!Array.isArray(v)?Object.keys(v).every(E=>b(v[E])):!1}c(b,"isRemovableField"),n(b,"isRemovableField");function x(v,E,X){if(v===null)return`null
47
+ `;if(typeof v=="number"||typeof v=="boolean")return`${v.toString()}
48
+ `;if(typeof v=="string")return`${e(v)}
49
+ `;if(Array.isArray(v)){if(v.length===0)return`[]
50
+ `;const ge=" ".repeat(E);return`
51
+ ${v.map(oe=>`${ge}- ${x(oe,E+1,!1)}`).join("")}`}if(typeof v=="object"&&v){const[ge,oe]=v instanceof g?[v.data,!1]:[v,!0],T=" ".repeat(E),ne=Object.keys(ge);oe&&ne.sort((U,ue)=>{const be=a.indexOf(U),ye=a.indexOf(ue);return be===-1&&ye===-1?U<ue?-1:U>ue?1:0:be!==-1&&ye===-1?-1:be===-1&&ye!==-1?1:be-ye});const me=ne.filter(U=>!b(ge[U])).map((U,ue)=>{const be=ge[U],ye=e(U),je=x(be,E+1,!0),Me=ue>0||X?T:"",De=ye.length>1024?`? ${ye}
52
+ ${Me}:`:`${ye}:`,qe=je.startsWith(`
53
+ `)?je:` ${je}`;return`${Me}${De}${qe}`}).join(E===0?`
54
+ `:"")||`
55
+ `;return X?`
56
+ ${me}`:`${me}`}throw new Error(`Unsupported value type (${v})`)}c(x,"stringifyValue"),n(x,"stringifyValue");function A(v){try{const E=x(v,0,!1);return E!==`
57
+ `?E:""}catch(E){throw E.location&&(E.message=E.message.replace(/(\.)?$/,` (line ${E.location.start.line}, column ${E.location.start.column})$1`)),E}}c(A,"stringifySyml"),n(A,"stringifySyml"),A.PreserveOrdering=g;function S(v){return v.endsWith(`
58
+ `)||(v+=`
59
+ `),(0,y.parse)(v)}c(S,"parseViaPeg"),n(S,"parseViaPeg");const O=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function F(v){if(O.test(v))return S(v);const E=(0,m.safeLoad)(v,{schema:m.FAILSAFE_SCHEMA,json:!0});if(E==null)return{};if(typeof E!="object")throw new Error(`Expected an indexed object, got a ${typeof E} instead. Does your file follow Yaml's rules?`);if(Array.isArray(E))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return E}c(F,"parseViaJsYaml"),n(F,"parseViaJsYaml");function C(v){return F(v)}return c(C,"parseSyml"),n(C,"parseSyml"),Yt}c(ds,"requireSyml");var Lo;function hs(){return Lo||(Lo=1,(function(h){var n=Object.defineProperty,m=c((g,e)=>n(g,"name",{value:e,configurable:!0}),"e");Object.defineProperty(h,"__esModule",{value:!0}),h.stringifySyml=h.parseSyml=h.stringifyResolution=h.parseResolution=h.stringifyValueArgument=h.stringifyShellLine=h.stringifyRedirectArgument=h.stringifyEnvSegment=h.stringifyCommandLineThen=h.stringifyCommandLine=h.stringifyCommandChainThen=h.stringifyCommandChain=h.stringifyCommand=h.stringifyArithmeticExpression=h.stringifyArgumentSegment=h.stringifyArgument=h.stringifyShell=h.parseShell=void 0;var y=Ba();Object.defineProperty(h,"parseShell",{enumerable:!0,get:m(function(){return y.parseShell},"get")}),Object.defineProperty(h,"stringifyShell",{enumerable:!0,get:m(function(){return y.stringifyShell},"get")}),Object.defineProperty(h,"stringifyArgument",{enumerable:!0,get:m(function(){return y.stringifyArgument},"get")}),Object.defineProperty(h,"stringifyArgumentSegment",{enumerable:!0,get:m(function(){return y.stringifyArgumentSegment},"get")}),Object.defineProperty(h,"stringifyArithmeticExpression",{enumerable:!0,get:m(function(){return y.stringifyArithmeticExpression},"get")}),Object.defineProperty(h,"stringifyCommand",{enumerable:!0,get:m(function(){return y.stringifyCommand},"get")}),Object.defineProperty(h,"stringifyCommandChain",{enumerable:!0,get:m(function(){return y.stringifyCommandChain},"get")}),Object.defineProperty(h,"stringifyCommandChainThen",{enumerable:!0,get:m(function(){return y.stringifyCommandChainThen},"get")}),Object.defineProperty(h,"stringifyCommandLine",{enumerable:!0,get:m(function(){return y.stringifyCommandLine},"get")}),Object.defineProperty(h,"stringifyCommandLineThen",{enumerable:!0,get:m(function(){return y.stringifyCommandLineThen},"get")}),Object.defineProperty(h,"stringifyEnvSegment",{enumerable:!0,get:m(function(){return y.stringifyEnvSegment},"get")}),Object.defineProperty(h,"stringifyRedirectArgument",{enumerable:!0,get:m(function(){return y.stringifyRedirectArgument},"get")}),Object.defineProperty(h,"stringifyShellLine",{enumerable:!0,get:m(function(){return y.stringifyShellLine},"get")}),Object.defineProperty(h,"stringifyValueArgument",{enumerable:!0,get:m(function(){return y.stringifyValueArgument},"get")});var $=Ua();Object.defineProperty(h,"parseResolution",{enumerable:!0,get:m(function(){return $.parseResolution},"get")}),Object.defineProperty(h,"stringifyResolution",{enumerable:!0,get:m(function(){return $.stringifyResolution},"get")});var a=ds();Object.defineProperty(h,"parseSyml",{enumerable:!0,get:m(function(){return a.parseSyml},"get")}),Object.defineProperty(h,"stringifySyml",{enumerable:!0,get:m(function(){return a.stringifySyml},"get")})})(Tn)),Tn}c(hs,"requireLib");var Fo=hs(),gs=Object.defineProperty,Ht=c((h,n)=>gs(h,"name",{value:n,configurable:!0}),"f");const br="__metadata",ms=Ht(h=>{const n=h.trim();if(n==="")return;const m=n.startsWith("@")?1:0,y=n.indexOf("@",m);if(y!==-1)return{name:n.slice(0,y),spec:n.slice(y+1)}},"splitSpecifier"),ys=Ht(h=>h.split(",").map(n=>ms(n)).filter(n=>n!==void 0),"parseKeySpecifiers"),vs=Ht(h=>{const n=new Map;for(const m of Object.keys(h)){if(m==="__metadata")continue;const y=ys(m),$=new Map;for(const{name:a,spec:g}of y){const e=$.get(a);e?e.push(g):$.set(a,[g])}for(const[a,g]of $){const e=n.get(a);e?e.push({key:m,specs:g}):n.set(a,[{key:m,specs:g}])}}return n},"buildNameIndex"),Po=Ht((h,n,m)=>{const y=h.get(n);if(!y)return[];const $=new Set([m]);return m.includes(":")?m.startsWith("npm:")&&$.add(m.slice(4)):$.add(`npm:${m}`),y.filter(a=>a.specs.some(g=>$.has(g))).map(a=>a.key)},"findKeysFor"),As=Ht((h,n)=>{const m=new Set,y=new Set(n.map($=>$.relativeRoot).filter($=>$!==""));for(const[$,a]of Object.entries(h)){if($==="__metadata")continue;const{resolution:g}=a;if(typeof g!="string"||!g.includes("@workspace:"))continue;const e=g.split("@workspace:")[1];e!==void 0&&(e==="."||y.has(e))&&m.add($)}return m},"collectWorkspaceKeys"),bs=Ht(h=>{const n=[];for(const m of[h.dependencies,h.optionalDependencies])if(m)for(const[y,$]of Object.entries(m))typeof $=="string"&&n.push({name:y,spec:$});return n},"collectDeps"),Cs=Ht(h=>{const n=typeof h.lockfileContent=="string"?h.lockfileContent:h.lockfileContent.toString("utf8");let m;try{m=Fo.parseSyml(n)}catch(O){throw new ft(`yarn.lock: parse failed — ${O.message}`)}if(!m||typeof m!="object")throw new ft("yarn.lock: top-level value is not an object");const y=vs(m),$=new Set;m[br]!==void 0&&$.add(br);const a=As(m,h.closure);for(const O of a)$.add(O);for(const O of h.closure)if(O.deps)for(const[F,C]of Object.entries(O.deps)){if(typeof C!="string"||C.startsWith("workspace:")||C.startsWith("link:")||C.startsWith("portal:"))continue;const v=Po(y,F,C);for(const E of v)$.add(E)}const g=[...$];for(;g.length>0;){const O=g.shift();if(O==="__metadata")continue;const F=m[O];if(F)for(const{name:C,spec:v}of bs(F)){if(v.startsWith("workspace:")||v.startsWith("link:")||v.startsWith("portal:"))continue;const E=Po(y,C,v);for(const X of E)$.has(X)||($.add(X),g.push(X))}}const e={};for(const O of Object.keys(m))$.has(O)&&(e[O]=m[O]);const b=Object.keys(m).length-(m[br]===void 0?0:1),x=$.size-($.has(br)?1:0),A=b-x,S=m[br]!==void 0;return{content:Fo.stringifySyml(e),message:`yarn.lock (${S?"berry":"classic"}): kept ${x}/${b} entries (dropped ${A})`,status:"pruned"}},"pruneYarnLockfile");var $s=Object.defineProperty,Ss=c((h,n)=>$s(h,"name",{value:n,configurable:!0}),"o");const Es=Ss(h=>{switch(h.packageManager){case"aube":return _a(h);case"bun":return Ia(h);case"npm":return qa(h);case"pnpm":return Yo(h);case"yarn":return Cs(h);default:{const n=h.packageManager;throw new ft(`Unsupported package manager: ${n}`)}}},"pruneLockfile");var ws=Object.defineProperty,Et=c((h,n)=>ws(h,"name",{value:n,configurable:!0}),"u");const ks=Et((h,n)=>{const m=new Set,y=[h],$=new Set([h]);for(;y.length>0;){const a=y.shift(),g=n.dependencies[a]??[];for(const e of g)$.has(e.target)||($.add(e.target),m.add(e.target),y.push(e.target))}return m},"collectTransitiveProjectDeps"),Gr="vis-docker-manifest.json",xs=["package.json","project.json"],Os=[{file:"bun.lock",manager:"bun"},{file:"bun.lockb",manager:"bun"},{file:"package-lock.json",manager:"npm"},{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"}],js=["package.json","pnpm-workspace.yaml",".npmrc","vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],_s=Et((h,n)=>{const m=new Set(h);for(const y of h){const $=ks(y,n);for(const a of $)m.add(a)}return m},"resolveFocusProjects"),Zt=Et(h=>{va(h)},"ensureDir"),Cr=Et((h,n)=>{try{return Zt(ci(n)),No(h,n),!0}catch(m){if(m.code==="ENOENT")return!1;throw m}},"copyFileIfExists"),Wo=Et((h,n)=>{let m;try{m=ma(h)}catch{return}if(!m.isSymbolicLink()){if(m.isFile()){Zt(ci(n)),No(h,n);return}Zt(n);for(const y of ya(h,{withFileTypes:!0}))y.name==="node_modules"||y.name===".git"||y.isSymbolicLink()||Wo(Be(h,y.name),Be(n,y.name))}},"copyTreeExcludingNodeModules"),Io=Et(h=>{if(!Mo(h))return;let n;try{n=Do(h)}catch{return}const m={};for(const y of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const $=n[y];if(!($===null||typeof $!="object"||Array.isArray($)))for(const[a,g]of Object.entries($))typeof g=="string"&&(m[a]=g)}return{deps:m,name:typeof n.name=="string"?n.name:void 0}},"readProjectInfo"),Ps=Et(h=>{const{focus:n,includeSources:m=!1,log:y=Et(v=>{console.log(v)},"log"),outDir:$,projectGraph:a,pruneLockfile:g=!0,workspace:e,workspaceRoot:b}=h,x=n.filter(v=>e.projects[v]===void 0);if(x.length>0)throw new Error(`Unknown focus project(s): ${x.join(", ")}. Check project names in your workspace.`);const A=_s(n,a),S=Be($,"workspace"),O=Be($,"sources");si(S,{force:!0,recursive:!0}),si(O,{force:!0,recursive:!0}),Zt(S);for(const v of js)Cr(Be(b,v),Be(S,v));const F=Io(Be(b,"package.json")),C=[{deps:F?.deps,name:F?.name,relativeRoot:""}];for(const v of A){const E=e.projects[v];if(!E?.root)continue;for(const ge of xs)Cr(Be(b,E.root,ge),Be(S,E.root,ge));const X=Io(Be(b,E.root,"package.json"));C.push({deps:X?.deps,name:X?.name,relativeRoot:E.root})}for(const{file:v,manager:E}of Os){const X=Be(b,v);if(!Mo(X))continue;const ge=Be(S,v);if(!g){Cr(X,ge);continue}const oe=v.endsWith(".lockb")?Vi(X):Vi(X,"utf8");try{const T=Es({closure:C,lockfileContent:oe,packageManager:E});T.status==="pruned"&&T.content!==void 0?(Zt(ci(ge)),Ji(ge,T.content)):Cr(X,ge),y(T.message)}catch(T){if(T instanceof ft)y(`${v}: pruning failed (${T.message}); copying verbatim`),Cr(X,ge);else throw T}}if(m){Zt(O);for(const v of n){const E=e.projects[v];E?.root&&Wo(Be(b,E.root),Be(O,E.root))}}return Ji(Be($,Gr),`${JSON.stringify({focus:n,projects:[...A].sort()},null,2)}
60
+ `),{projects:[...A]}},"scaffoldDockerContext"),Is=Et(h=>{const{contextRoot:n,workspace:m,workspaceRoot:y}=h,$=Be(n,Gr);if(!Aa($))throw new Error(`No ${Gr} at ${n}. Run \`vis docker scaffold\` first.`);const a=Do($);if(!Array.isArray(a.projects))throw new TypeError(`Invalid ${Gr}: "projects" must be an array.`);const g=new Set(a.projects),e=[];for(const[b,x]of Object.entries(m.projects)){if(g.has(b)||!x.root)continue;const A=Be(y,x.root),S=ba(y,A);S===""||S==="."||S.startsWith("..")||(si(A,{force:!0,recursive:!0}),e.push(S))}return{removed:e}},"pruneDockerContext");export{Is as p,_s as r,Ps as s};
@@ -1,2 +1,2 @@
1
- var m=Object.defineProperty;var a=(t,e)=>m(t,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";import{M as v}from"../packem_chunks/config.js";import{r as j}from"../packem_chunks/bin.js";const h=p(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=a(t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{mkdirSync:y,writeFileSync:F,readdirSync:L}=u("node:fs"),{readFile:_}=u("node:fs/promises");var S=Object.defineProperty,i=a((t,e)=>S(t,"name",{value:e,configurable:!0}),"i");const c=i(t=>j(t),"getFailureLogDirectory"),l=i((t,e)=>v(c(t),`${encodeURIComponent(e)}.json`),"getFailureLogPath");class R{static{a(this,"FailureLogLifeCycle")}static{i(this,"FailureLogLifeCycle")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,o){if(r!=="failure")return;const n=c(this.#e);try{y(n,{recursive:!0})}catch{return}const d=e.overrides.command,f=e.projectRoot,g={command:d,cwd:f,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:o,timestamp:new Date().toISOString()};try{F(l(this.#e,e.id),`${JSON.stringify(g,void 0,2)}
1
+ var g=Object.defineProperty;var a=(t,e)=>g(t,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";import{M as v}from"../packem_chunks/config.js";import{m as j}from"../packem_chunks/bin.js";const h=p(import.meta.url),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=a(t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{mkdirSync:y,writeFileSync:F,readdirSync:L}=u("node:fs"),{readFile:_}=u("node:fs/promises");var S=Object.defineProperty,i=a((t,e)=>S(t,"name",{value:e,configurable:!0}),"i");const c=i(t=>j(t),"getFailureLogDirectory"),l=i((t,e)=>v(c(t),`${encodeURIComponent(e)}.json`),"getFailureLogPath");class R{static{a(this,"FailureLogLifeCycle")}static{i(this,"FailureLogLifeCycle")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,o){if(r!=="failure")return;const n=c(this.#e);try{y(n,{recursive:!0})}catch{return}const d=e.overrides.command,f=e.projectRoot,m={command:d,cwd:f,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:o,timestamp:new Date().toISOString()};try{F(l(this.#e,e.id),`${JSON.stringify(m,void 0,2)}
2
2
  `,"utf8")}catch{}}}const T=i(async(t,e)=>{const r=l(t,e);try{const o=await _(r,"utf8");return JSON.parse(o)}catch{return}},"loadFailureLog"),w=i(t=>{const e=c(t);let r;try{r=L(e)}catch{return[]}const o=[];for(const n of r)if(n.endsWith(".json"))try{o.push(decodeURIComponent(n.slice(0,-5)))}catch{}return o},"listFailureLogs");export{R as F,T as a,w as l};
@@ -1 +1 @@
1
- var h=Object.defineProperty;var f=(a,s)=>h(a,"name",{value:s,configurable:!0});import{createRequire as R}from"node:module";import{i as b,n as T,M as j}from"../packem_chunks/config.js";import{o as v}from"../packem_chunks/bin.js";const S=R(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=f(a=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,o]=l.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return l.getBuiltinModule(a)}return S(a)},"__cjs_getBuiltinModule"),{readdirSync:y}=k("node:fs");var F=Object.defineProperty,m=f((a,s)=>F(a,"name",{value:s,configurable:!0}),"i");const P=m((a,s)=>{let o=0,n=0,r=0;for(const[,t]of a)switch(t.status){case"failure":{r+=1;break}case"local-cache":case"local-cache-kept-existing":case"remote-cache":{n+=1;break}case"success":{o+=1;break}}const c=[];o>0&&c.push(`${String(o)} succeeded`),n>0&&c.push(`${String(n)} cached`),r>0&&c.push(`${String(r)} failed`);const u=(s/1e3).toFixed(1);return c.push(`${u}s`),c.join(" · ")},"formatTimingSummary"),p=m(a=>{const s=v(a);if(!b(s))return[];const o=y(s).filter(r=>r.endsWith(".json")),n=[];for(const r of o)try{n.push(T(j(s,r)))}catch{}return n},"loadRunSummaries"),A=m((a,s,o)=>{const n=o??p(a);if(n.length<2)return;let r=0,c=0;for(const e of n)typeof e.duration=="number"&&e.duration>0&&(r+=e.duration,c+=1);if(c<2)return;const u=r/c-s,t=Math.abs(u/1e3).toFixed(1);return Math.abs(u)<500?"(about average)":u>0?`(${t}s faster than avg)`:`(${t}s slower than avg)`},"compareDuration");var _=Object.defineProperty,d=f((a,s)=>_(a,"name",{value:s,configurable:!0}),"o");const D=d((a,s={},o)=>{const n=o??p(a);if(n.length===0)return[];const r=new Map;for(const t of n)if(!(s.since&&(t.startTime===void 0||t.startTime<s.since))&&Array.isArray(t.tasks))for(const e of t.tasks){if(e.cacheStatus==="HIT"||e.cacheStatus==="REMOTE_HIT"||e.cacheStatus==="SKIPPED")continue;const i=r.get(e.taskId)??{failures:0,project:e.target.project,retriedSuccesses:0,successes:0,target:e.target.target,totalRuns:0};i.totalRuns+=1,e.exitCode!==void 0&&e.exitCode!==0?(i.failures+=1,i.lastFailure=e.startTime??t.startTime):(e.retryAttempts&&e.retryAttempts>0&&(i.retriedSuccesses+=1,i.lastRetry=e.startTime??t.startTime),i.successes+=1),r.set(e.taskId,i)}const c=s.minRuns??2,u=[];for(const[t,e]of r){if(e.totalRuns<c||e.failures===0&&e.retriedSuccesses===0)continue;const i=(e.failures+.5*e.retriedSuccesses)/e.totalRuns;u.push({failures:e.failures,flakinessRate:i,lastFailure:e.lastFailure,lastRetry:e.lastRetry,project:e.project,retriedSuccesses:e.retriedSuccesses,successes:e.successes,target:e.target,taskId:t,totalRuns:e.totalRuns})}return u.sort((t,e)=>e.flakinessRate-t.flakinessRate),u},"analyzeFlakiness"),E=d(a=>{if(a.length===0)return["No flaky tasks detected."];const s=["Task","Runs","Failures","Retried","Rate","Last Failure"],o=a.map(t=>[t.taskId,String(t.totalRuns),String(t.failures),String(t.retriedSuccesses),`${(t.flakinessRate*100).toFixed(1)}%`,t.lastFailure??t.lastRetry??"—"]),n=s.map((t,e)=>{let i=0;for(const g of o)i=Math.max(i,(g[e]??"").length);return Math.max(t.length,i)}),r=d((t,e)=>t.padEnd(e),"pad"),c=n.map(t=>"─".repeat(t)).join("──"),u=[s.map((t,e)=>r(t,n[e])).join(" "),c];for(const t of o)u.push(t.map((e,i)=>r(e,n[i])).join(" "));return u},"formatFlakinessTable");export{D as a,E as b,A as c,P as f,p as l};
1
+ var h=Object.defineProperty;var f=(a,s)=>h(a,"name",{value:s,configurable:!0});import{createRequire as R}from"node:module";import{i as b,n as T,M as j}from"../packem_chunks/config.js";import{l as v}from"../packem_chunks/bin.js";const S=R(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=f(a=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,o]=l.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return l.getBuiltinModule(a)}return S(a)},"__cjs_getBuiltinModule"),{readdirSync:y}=k("node:fs");var F=Object.defineProperty,m=f((a,s)=>F(a,"name",{value:s,configurable:!0}),"i");const P=m((a,s)=>{let o=0,n=0,r=0;for(const[,t]of a)switch(t.status){case"failure":{r+=1;break}case"local-cache":case"local-cache-kept-existing":case"remote-cache":{n+=1;break}case"success":{o+=1;break}}const c=[];o>0&&c.push(`${String(o)} succeeded`),n>0&&c.push(`${String(n)} cached`),r>0&&c.push(`${String(r)} failed`);const u=(s/1e3).toFixed(1);return c.push(`${u}s`),c.join(" · ")},"formatTimingSummary"),p=m(a=>{const s=v(a);if(!b(s))return[];const o=y(s).filter(r=>r.endsWith(".json")),n=[];for(const r of o)try{n.push(T(j(s,r)))}catch{}return n},"loadRunSummaries"),A=m((a,s,o)=>{const n=o??p(a);if(n.length<2)return;let r=0,c=0;for(const e of n)typeof e.duration=="number"&&e.duration>0&&(r+=e.duration,c+=1);if(c<2)return;const u=r/c-s,t=Math.abs(u/1e3).toFixed(1);return Math.abs(u)<500?"(about average)":u>0?`(${t}s faster than avg)`:`(${t}s slower than avg)`},"compareDuration");var _=Object.defineProperty,d=f((a,s)=>_(a,"name",{value:s,configurable:!0}),"o");const D=d((a,s={},o)=>{const n=o??p(a);if(n.length===0)return[];const r=new Map;for(const t of n)if(!(s.since&&(t.startTime===void 0||t.startTime<s.since))&&Array.isArray(t.tasks))for(const e of t.tasks){if(e.cacheStatus==="HIT"||e.cacheStatus==="REMOTE_HIT"||e.cacheStatus==="SKIPPED")continue;const i=r.get(e.taskId)??{failures:0,project:e.target.project,retriedSuccesses:0,successes:0,target:e.target.target,totalRuns:0};i.totalRuns+=1,e.exitCode!==void 0&&e.exitCode!==0?(i.failures+=1,i.lastFailure=e.startTime??t.startTime):(e.retryAttempts&&e.retryAttempts>0&&(i.retriedSuccesses+=1,i.lastRetry=e.startTime??t.startTime),i.successes+=1),r.set(e.taskId,i)}const c=s.minRuns??2,u=[];for(const[t,e]of r){if(e.totalRuns<c||e.failures===0&&e.retriedSuccesses===0)continue;const i=(e.failures+.5*e.retriedSuccesses)/e.totalRuns;u.push({failures:e.failures,flakinessRate:i,lastFailure:e.lastFailure,lastRetry:e.lastRetry,project:e.project,retriedSuccesses:e.retriedSuccesses,successes:e.successes,target:e.target,taskId:t,totalRuns:e.totalRuns})}return u.sort((t,e)=>e.flakinessRate-t.flakinessRate),u},"analyzeFlakiness"),E=d(a=>{if(a.length===0)return["No flaky tasks detected."];const s=["Task","Runs","Failures","Retried","Rate","Last Failure"],o=a.map(t=>[t.taskId,String(t.totalRuns),String(t.failures),String(t.retriedSuccesses),`${(t.flakinessRate*100).toFixed(1)}%`,t.lastFailure??t.lastRetry??"—"]),n=s.map((t,e)=>{let i=0;for(const g of o)i=Math.max(i,(g[e]??"").length);return Math.max(t.length,i)}),r=d((t,e)=>t.padEnd(e),"pad"),c=n.map(t=>"─".repeat(t)).join("──"),u=[s.map((t,e)=>r(t,n[e])).join(" "),c];for(const t of o)u.push(t.map((e,i)=>r(e,n[i])).join(" "));return u},"formatFlakinessTable");export{D as a,E as b,A as c,P as f,p as l};
@@ -0,0 +1 @@
1
+ var x=Object.defineProperty;var v=(t,e)=>x(t,"name",{value:e,configurable:!0});import{m as k,D as C,g as S,f as D}from"./provenance-smHa8efI.js";import{aa as m}from"../packem_chunks/bin.js";import{x as A}from"./build-scripts-DsWMSWDs.js";import{n as h}from"./license-zZU7aavK.js";import{O as j,C as W,$ as E}from"../packem_chunks/config.js";import{F}from"./lockfile-C5DYMHVq.js";import{L}from"./dependency-scan-DPHTzA5r.js";const P=["firstSeen","installScripts","license","malware","publisherChange","score","unexpectedDeps","vulnerability"];var I=Object.defineProperty,R=v((t,e)=>I(t,"name",{value:e,configurable:!0}),"r");const b=6e4,M=R((t,e,n)=>{for(const i of n)if(i===t||i===`${t}@${e}`||i.endsWith("*")&&t.startsWith(i.slice(0,-1)))return!0;return!1},"isExcluded"),U=R(async(t,e)=>{const n=e.security?.policies?.firstSeen;if(n?.minutes===void 0||n.minutes<=0)return[];const i=n.minutes,a=n.exclude??[],o=e.security?.acceptedRisks,c=i*b,s=Date.now();return(await k(t.packages,C,async r=>{if(M(r.name,r.version,a))return;const l=await S(r.name,{workspaceRoot:t.workspaceRoot});if(l===void 0)return;const p=l.time?.[r.version];if(p===void 0)return;const u=Date.parse(p);if(Number.isNaN(u))return;const f=s-u;if(f>=c)return;const $=Math.max(0,Math.floor(f/b));return{acceptedRisk:m(r.name,r.version,o,"firstSeen"),data:{ageMinutes:$,minimumMinutes:i,publishedAt:p},packageName:r.name,policy:"firstSeen",reason:`${r.name}@${r.version} was published ${String($)} min ago — below the ${String(i)} min firstSeen cooldown.`,severity:"block",version:r.version}})).filter(r=>r!==void 0)},"evaluateFirstSeenPolicy");var V=Object.defineProperty,_=v((t,e)=>V(t,"name",{value:e,configurable:!0}),"n");const T=_((t,e)=>{const n=e.security?.policies?.installScripts;if(!n)return[];const i=n.allow??{},a=n.strict===!0;if(!a&&Object.keys(i).length===0)return[];const o=A(t.workspaceRoot,i,{pinVersions:e.security?.pinVersions===!0});if(o.unapproved.length===0)return[];const c=e.security?.acceptedRisks,s=a?"block":"warn";return o.unapproved.map(r=>({acceptedRisk:m(r.name,r.version??"*",c,"installScripts"),data:{hooks:r.hooks},packageName:r.name,policy:"installScripts",reason:`${r.name}${r.version?`@${r.version}`:""} declares unapproved build script(s): ${r.hooks.join(", ")}`,severity:s,version:r.version??"*"}))},"evaluateInstallScriptsPolicy");var H=Object.defineProperty,y=v((t,e)=>H(t,"name",{value:e,configurable:!0}),"a");const q=new Set(["AND","OR"]),z=y(t=>{const e=t.replaceAll("("," ").replaceAll(")"," ").split(/\s+/).map(a=>a.trim()).filter(a=>a.length>0),n=[];let i=!1;for(const a of e){const o=a.toUpperCase();if(i){i=!1;continue}if(o==="WITH"){i=!0;continue}if(q.has(o))continue;const c=a.endsWith("+"),s=c?a.slice(0,-1):a,r=h(s)??s;n.push(r),c&&n.push(`${r}-or-later`)}return n},"extractSpdxLeaves"),K=y(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 ")})`}},"declaredLicense"),Y=y((t,e)=>{if(e.length===0)return;const n=new Set(e.map(i=>h(i)??i).map(i=>i.toLowerCase()));for(const i of t)if(n.has(i.toLowerCase()))return i},"findDeniedLeaf"),B=y((t,e)=>{if(e.length===0)return;const n=new Set(e.map(i=>h(i)??i).map(i=>i.toLowerCase()));for(const i of t)if(!n.has(i.toLowerCase()))return i},"findUnallowedLeaf"),G=y((t,e)=>{const n=e.security?.policies?.license;if(!n)return[];const i=n.allow??[],a=n.deny??[];if(i.length===0&&a.length===0)return[];const o=e.security?.acceptedRisks,c=[];for(const s of t.packages){const r=t.manifestData?.get(`${s.name}@${s.version}`),l=r?K(r):void 0;if(!l){i.length>0&&c.push({acceptedRisk:m(s.name,s.version,o,"license"),data:{declaredLicense:null},packageName:s.name,policy:"license",reason:`${s.name}@${s.version} declares no license; allow-list mode requires one of: ${i.join(", ")}`,severity:"block",version:s.version});continue}const p=z(l),u=Y(p,a);if(u){c.push({acceptedRisk:m(s.name,s.version,o,"license"),data:{declaredLicense:l,deniedLicense:u},packageName:s.name,policy:"license",reason:`${s.name}@${s.version} uses denied license '${u}' (declared: ${l})`,severity:"block",version:s.version});continue}const f=B(p,i);f&&c.push({acceptedRisk:m(s.name,s.version,o,"license"),data:{allowList:i,declaredLicense:l,unallowedLicense:f},packageName:s.name,policy:"license",reason:`${s.name}@${s.version} uses license '${f}' which is not on the allow-list (declared: ${l})`,severity:"block",version:s.version})}return c},"evaluateLicensePolicy");var J=Object.defineProperty,N=v((t,e)=>J(t,"name",{value:e,configurable:!0}),"c$1");const Q=6e4,X=N((t,e,n)=>{for(const i of n)if(i===t||i===`${t}@${e}`||i.endsWith("*")&&t.startsWith(i.slice(0,-1)))return!0;return!1},"isExcluded"),Z=N(async(t,e)=>{const n=e.security?.policies?.publisherChange;if(n?.mode!=="no-downgrade")return[];const i=n.exclude??[],a=typeof n.ignoreAfter=="number"?n.ignoreAfter*Q:void 0,o=e.security?.acceptedRisks,c=Date.now();return(await k(t.packages,C,async s=>{if(X(s.name,s.version,i))return;const r=await S(s.name,{workspaceRoot:t.workspaceRoot});if(r===void 0)return;if(a!==void 0){const p=r.time?.[s.version],u=p===void 0?Number.NaN:Date.parse(p);if(!Number.isNaN(u)&&c-u>a)return}if(r.versions[s.version]?.dist?.attestations?.provenance!==void 0)return;const l=D(r,s.version);if(l!==void 0)return{acceptedRisk:m(s.name,s.version,o,"publisherChange"),data:{priorVersionWithProvenance:l},packageName:s.name,policy:"publisherChange",reason:`${s.name}@${s.version} dropped the provenance attestation that ${s.name}@${l} carried — publisher trust downgrade.`,severity:"block",version:s.version}})).filter(s=>s!==void 0)},"evaluatePublisherChangePolicy");var ee=Object.defineProperty,g=v((t,e)=>ee(t,"name",{value:e,configurable:!0}),"l$1");const te=g(t=>{for(const e of Object.values(L))for(const n of[e.file,...e.aliases??[]])if(t===n||t.endsWith(`/${n}`)||t.endsWith(`.${n}`))return e.type},"detectLockfileType"),ne=g((t,e,n)=>{const i=j(e)?e:W(t,e);let a;try{a=E(i)}catch{return}const o=te(i)??L[n]?.type;if(!o)return;const c=F(a,o);if(c.length===0)return;const s=new Set;for(const r of c)s.add(`${r.name}@${r.version}`);return s},"loadBaselineKeys"),ie=g((t,e)=>{for(const n of e)if(n===t||n.endsWith("*")&&t.startsWith(n.slice(0,-1)))return!0;return!1},"matchesAllowList"),se=g((t,e)=>{const n=e.security?.policies?.unexpectedDeps;if(!n)return[];const i=n.allow??[],a=n.baselineLockfile;if(i.length===0&&!a)return[];const o=a?ne(t.workspaceRoot,a,t.packageManager):void 0,c=e.security?.acceptedRisks,s=[];for(const r of t.packages){const l=i.length===0||ie(r.name,i),p=o?o.has(`${r.name}@${r.version}`):!0;if(l&&p)continue;const u=[],f={};l||(u.push(`not on allow-list (${i.length} entr${i.length===1?"y":"ies"})`),f.allowList=i),!p&&o&&(u.push(`not present in baseline lockfile (${a})`),f.baselineLockfile=a),s.push({acceptedRisk:m(r.name,r.version,c,"unexpectedDeps"),data:f,packageName:r.name,policy:"unexpectedDeps",reason:`${r.name}@${r.version} is unexpected: ${u.join("; ")}`,severity:"block",version:r.version})}return s},"evaluateUnexpectedDepsPolicy");var re=Object.defineProperty,oe=v((t,e)=>re(t,"name",{value:e,configurable:!0}),"E");const w={CRITICAL:0,HIGH:1,LOW:3,MODERATE:2,UNKNOWN:4},ae=oe((t,e)=>{const n=w[e.toUpperCase()]??2;return(w[t.toUpperCase()]??4)<=n},"severityPassesFilter");var ce=Object.defineProperty,le=v((t,e)=>ce(t,"name",{value:e,configurable:!0}),"c");const ue=le((t,e)=>{if(!t.osvFindings||t.osvFindings.size===0)return[];const n=e.security?.policies?.vulnerability?.failOn,i=e.security?.acceptedRisks,a=[];for(const o of t.packages){const c=t.osvFindings.get(o.name);if(!(!c||c.length===0))for(const s of c){const r=n?ae(s.severity,n)?"block":"warn":"info";a.push({acceptedRisk:m(o.name,o.version,i,"vulnerability"),data:{advisoryId:s.id,aliases:s.aliases??[],cvssScore:s.cvssScore,fixedVersions:s.fixedVersions,severity:s.severity,summary:s.summary},packageName:o.name,policy:"vulnerability",reason:`${s.severity} ${s.id} affects ${o.name}@${o.version}: ${s.summary}`,severity:r,version:o.version})}}return a},"evaluateVulnerabilityPolicy");var pe=Object.defineProperty,d=v((t,e)=>pe(t,"name",{value:e,configurable:!0}),"t");const O=[{evaluate:ue,isConfigured:d(t=>t.security?.policies?.vulnerability!==void 0,"isConfigured"),name:"vulnerability",offlineSupported:!0,surfaces:["audit","doctor"]},{evaluate:G,isConfigured:d(t=>{const e=t.security?.policies?.license;return!!(e&&(e.allow&&e.allow.length>0||e.deny&&e.deny.length>0))},"isConfigured"),name:"license",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:T,isConfigured:d(t=>{const e=t.security?.policies?.installScripts;return!!(e&&(e.allow&&Object.keys(e.allow).length>0||e.strict===!0))},"isConfigured"),name:"installScripts",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:se,isConfigured:d(t=>{const e=t.security?.policies?.unexpectedDeps;return!!(e&&(e.allow&&e.allow.length>0||typeof e.baselineLockfile=="string"))},"isConfigured"),name:"unexpectedDeps",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:U,isConfigured:d(t=>{const e=t.security?.policies?.firstSeen?.minutes;return typeof e=="number"&&e>0},"isConfigured"),name:"firstSeen",offlineSupported:!1,surfaces:["audit","doctor","install"]},{evaluate:Z,isConfigured:d(t=>t.security?.policies?.publisherChange?.mode==="no-downgrade","isConfigured"),name:"publisherChange",offlineSupported:!1,surfaces:["audit","doctor","install"]}],fe=d((t,e,n)=>O.filter(i=>i.surfaces.includes(t)?n!==void 0?n.has(i.name):i.isConfigured(e):!1),"selectModules"),ke=d(async(t,e,n)=>{const i=fe(e,n.visConfig,n.enabledPolicies),a=[];for(const o of i){if(t.offline&&!o.offlineSupported){a.push({packageName:"*",policy:o.name,reason:`policy.${o.name} skipped: requires network (--offline)`,severity:"info",version:"*"});continue}try{const c=await o.evaluate(t,n.visConfig);a.push(...c)}catch(c){const s=c instanceof Error?c.message:String(c);a.push({packageName:"*",policy:o.name,reason:`policy.${o.name} failed: ${s}`,severity:"info",version:"*"})}}return a},"evaluatePolicies"),de=(()=>{const t=new Map;for(const e of P)t.set(e.toLowerCase(),e);return t})(),Ce=d(()=>O.map(t=>t.name),"getRegisteredPolicyNames"),Se=d((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(P);const i=new Set;for(const a of t.split(",").map(o=>o.trim()).filter(o=>o.length>0)){const o=a.replace(/^_+/,"").replaceAll(/_+([a-z])/g,(s,r)=>r.toUpperCase()),c=de.get(o.toLowerCase());c===void 0?e?.(a):i.add(c)}return i},"parsePoliciesFlag");export{ke as e,Ce as g,Se as p,ae as s};
@@ -0,0 +1 @@
1
+ var o=Object.defineProperty;var r=(e,n)=>o(e,"name",{value:n,configurable:!0});var a=Object.defineProperty,c=r((e,n)=>a(e,"name",{value:n,configurable:!0}),"i");const l=new Set(["0BSD","AGPL-3.0","AGPL-3.0-only","AGPL-3.0-or-later","Apache-1.1","Apache-2.0","Artistic-2.0","BlueOak-1.0.0","BSD-2-Clause","BSD-3-Clause","BSL-1.0","CC0-1.0","CC-BY-3.0","CC-BY-4.0","CDDL-1.0","CDDL-1.1","EPL-1.0","EPL-2.0","GPL-2.0","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0","GPL-3.0-only","GPL-3.0-or-later","ISC","LGPL-2.0","LGPL-2.1","LGPL-3.0","MIT","MIT-0","MPL-1.1","MPL-2.0","Python-2.0","Unlicense","WTFPL","Zlib"]),L={apache2:"Apache-2.0","apache 2.0":"Apache-2.0",bsd:"BSD-3-Clause","bsd-2":"BSD-2-Clause","bsd-3":"BSD-3-Clause",mit:"MIT",public:"Unlicense","public domain":"Unlicense"},p=(()=>{const e=new Map;for(const n of l)e.set(n.toLowerCase(),n);for(const[n,t]of Object.entries(L))e.set(n,t);return e})(),P=c(e=>{const n=e.trim();if(n.length!==0)return l.has(n)?n:p.get(n.toLowerCase())},"normalizeSpdxId"),f=c(e=>{let n;if(typeof e.license=="string")n=e.license;else if(e.license&&typeof e.license=="object"&&typeof e.license.type=="string")n=e.license.type;else if(Array.isArray(e.licenses)&&e.licenses.length>0){const s=e.licenses[0];s&&typeof s.type=="string"&&(n=s.type)}if(!n)return;const t=n.trim();if(t.length===0)return;if(/[()]|\b(?:and|or|with)\b/i.test(t))return[{expression:t}];const i=P(t);return i?[{license:{id:i}}]:[{license:{name:t}}]},"extractLicenseChoice");export{f as e,P as n};
@@ -1,2 +1,2 @@
1
- var z=Object.defineProperty;var a=(t,e)=>z(t,"name",{value:e,configurable:!0});import{createRequire as Q}from"node:module";import{m as tt,o as O,M as p}from"../packem_chunks/config.js";import{aZ as lt,a4 as dt,a_ as W}from"../packem_chunks/bin.js";const U=Q(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=a(t=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,o]=k.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return k.getBuiltinModule(t)}return U(t)},"__cjs_getBuiltinModule"),{Socket:et}=y("node:net"),{randomBytes:ot}=y("node:crypto"),{readdir:st,writeFile:rt,rename:it,rm:T,open:A,readFile:at,stat:nt,unlink:j}=y("node:fs/promises"),{createRequire:ct}=y("node:module"),{spawn:ht}=y("node:child_process");var ut=Object.defineProperty,ft=a((t,e)=>ut(t,"name",{value:e,configurable:!0}),"i$1"),pt=Object.defineProperty,N=ft((t,e)=>pt(t,"name",{value:e,configurable:!0}),"s");const wt=ct(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=N(t=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[e,o]=m.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return m.getBuiltinModule(t)}return wt(t)},"__cjs_getBuiltinModule"),{lstat:x,mkdir:mt}=kt("node:fs/promises");var gt=Object.defineProperty,vt=N((t,e)=>gt(t,"name",{value:e,configurable:!0}),"o");const yt=vt(async t=>{tt(t);try{const e=await x(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await mt(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const o=await x(t);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(o))}'`,{cause:e})}},"ensureDir");var _t=Object.defineProperty,u=a((t,e)=>_t(t,"name",{value:e,configurable:!0}),"s");const bt=3e4,B=100;class $t extends Error{static{a(this,"ServiceReadinessError")}constructor(e,o){super(e),this.elapsedMs=o,this.name="ServiceReadinessError"}elapsedMs;static{u(this,"ServiceReadinessError")}}const Ht=u(async t=>{const e=t.host??"127.0.0.1",{port:o}=t,s=t.timeoutMs??bt,r=Date.now();for(;Date.now()-r<s;){if(await Et(e,o))return;await St(B)}throw new $t(`Timed out waiting for ${e}:${String(o)} to accept TCP connections (${String(s)}ms)`,Date.now()-r)},"waitForTcp"),Et=u((t,e)=>new Promise(o=>{const s=new et,r=u(i=>{s.removeAllListeners(),s.destroy(),o(i)},"onDone");s.once("connect",()=>{r(!0)}),s.once("error",()=>{r(!1)}),s.setTimeout(B,()=>{r(!1)});try{s.connect(e,t)}catch{r(!1)}}),"tryConnect"),St=u(t=>new Promise(e=>{setTimeout(e,t)}),"delay"),Pt=u(async(t,e)=>{const o=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});o&&await Ht({host:o.tcp.host,port:o.tcp.port,timeoutMs:e?.timeoutMs??o.tcp.timeoutMs})},"runReadiness");var Tt=Object.defineProperty,d=a((t,e)=>Tt(t,"name",{value:e,configurable:!0}),"o");const M=384,C=5e3,Mt=50,Rt=3e4,w=d(async t=>{const e=p(lt(t),"services");try{await yt(e)}catch(o){throw o.code==="ENOTDIR"?new Error(`Service registry path ${e} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:o}):o}return e},"getRegistryDir"),R=d(t=>t.replaceAll("/","_").replaceAll(":","__"),"slugify"),D=d((t,e)=>p(t,`${R(e)}.json`),"entryPath"),Dt=d((t,e)=>p(t,`${R(e)}.lock`),"lockPath"),b=d(async(t,e)=>{const o=await w(t),s=D(o,e);if(await dt(s))try{return await W(s)}catch{return}},"readEntry"),Ot=d(async t=>{const e=await w(t);let o;try{o=await st(e)}catch{return[]}const s=[];for(const r of o)if(r.endsWith(".json"))try{const i=await W(p(e,r));s.push(i)}catch{}return s},"readAllEntries"),jt=d(async(t,e)=>{const o=await w(t),s=D(o,e.id),r=p(o,`.${ot(8).toString("hex")}.tmp`);await rt(r,`${JSON.stringify(e,void 0,2)}
2
- `,{mode:M});try{await it(r,s)}catch(i){throw await T(r,{force:!0}).catch(()=>{}),i}},"writeEntry"),g=d(async(t,e,o)=>{const s=await w(t),r=o??await b(t,e);await T(D(s,e),{force:!0}),r&&await T(r.logFile,{force:!0}).catch(()=>{})},"deleteEntry"),f=d(t=>{try{return process.kill(t,0),!0}catch{return!1}},"isAlive"),Ut=d(async t=>{const e=await Ot(t),o=[],s=[];for(const r of e){if(f(r.pid)){s.push(r);continue}const i=await b(t,r.id);if(i&&i.pid!==r.pid){s.push(i);continue}await g(t,r.id,r).catch(()=>{}),o.push(r.id)}return{pruned:o,surviving:s}},"pruneDead"),xt=d(t=>new Promise(e=>{setTimeout(e,t)}),"sleep"),Ct=d(async t=>{try{const e=await A(t,"wx",M);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},"tryClaimLock"),Ft=d(async t=>{let e;try{const o=await at(t,"utf8"),s=Number.parseInt(o.trim(),10);e=Number.isFinite(s)?s:void 0}catch{return!0}if(e!==void 0&&!f(e))return!0;try{const o=await nt(t);return Date.now()-o.mtimeMs>Rt}catch{return!0}},"isLockStale"),G=d(async(t,e,o)=>{const s=await w(t),r=Dt(s,e),i=Date.now();for(;!await Ct(r);){if(await Ft(r)){await j(r).catch(()=>{});continue}if(Date.now()-i>=C)throw new Error(`Could not acquire service lock for ${e} within ${String(C)}ms — another \`vis service\` invocation appears to be holding it.`);await xt(Mt)}try{return await o()}finally{await j(r).catch(()=>{})}},"withServiceLock");var It=Object.defineProperty,n=a((t,e)=>It(t,"name",{value:e,configurable:!0}),"r");function v(t,e={},o){for(const s in t){const r=t[s],i=o?`${o}:${s}`:s;typeof r=="object"&&r!==null?v(r,e,i):typeof r=="function"&&(e[i]=r)}return e}a(v,"c");n(v,"flatHooks");function Lt(...t){const e={};for(const o of t){const s=v(o);for(const r in s)e[r]?e[r].push(s[r]):e[r]=[s[r]]}for(const o in e)if(e[o].length>1){const s=e[o];e[o]=(...r)=>V(s,i=>i(...r))}else e[o]=e[o][0];return e}a(Lt,"v");n(Lt,"mergeHooks");function V(t,e){return t.reduce((o,s)=>o.then(()=>e(s)),Promise.resolve())}a(V,"d$2");n(V,"serial");const q=(()=>{if(console.createTask)return console.createTask;const t={run:n(e=>e(),"run")};return()=>t})();function $(t,e,o,s){for(let r=o;r<t.length;r+=1)try{const i=s?s.run(()=>t[r](...e)):t[r](...e);if(i&&typeof i.then=="function")return Promise.resolve(i).then(()=>$(t,e,r+1,s))}catch(i){return Promise.reject(i)}}a($,"k");n($,"callHooks");function X(t,e,o){if(t.length>0)return $(t,e,0,q(o))}a(X,"y");n(X,"serialTaskCaller");function J(t,e,o){if(t.length>0){const s=q(o);return Promise.all(t.map(r=>s.run(()=>r(...e))))}}a(J,"m");n(J,"parallelTaskCaller");function At(t,e){return t.reduce((o,s)=>o.then(()=>s(...e||[])),Promise.resolve())}a(At,"x");n(At,"serialCaller");function Wt(t,e){return Promise.all(t.map(o=>o(...e||[])))}a(Wt,"P");n(Wt,"parallelCaller");function _(t,e){for(const o of[...t])o(e)}a(_,"a");n(_,"callEachWith");var Nt=class{static{a(this,"p")}static{n(this,"Hookable")}_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,o={}){if(!t||typeof e!="function")return()=>{};const s=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!o.allowDeprecated){let i=r.message;i||(i=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!e.name)try{Object.defineProperty(e,"name",{get:n(()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb","get"),configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let o,s=n((...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,e(...r)),"_function");return o=this.hook(t,s),o}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const o=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of o)this.hook(t,s)}deprecateHooks(t){for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=v(t),o=Object.keys(e).map(s=>this.hook(s,e[s]));return()=>{for(const s of o)s();o.length=0}}removeHooks(t){const e=v(t);for(const o in e)this.removeHook(o,e[o])}removeAllHooks(){this._hooks={}}callHook(t,...e){return this.callHookWith(X,t,e)}callHookParallel(t,...e){return this.callHookWith(J,t,e)}callHookWith(t,e,o){const s=this._before||this._after?{name:e,args:o,context:{}}:void 0;this._before&&_(this._before,s);const r=t(this._hooks[e]?[...this._hooks[e]]:[],o,e);return r instanceof Promise?r.finally(()=>{this._after&&s&&_(this._after,s)}):(this._after&&s&&_(this._after,s),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}};function K(){return new Nt}a(K,"w$2");n(K,"createHooks");(class{static{n(this,"HookableCore")}_hooks;constructor(){this._hooks={}}hook(t,e){return!t||typeof e!="function"?()=>{}:(this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)})}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}callHook(t,...e){const o=this._hooks[t];if(!(!o||o.length===0))return $(o,e,0)}});const F=typeof window<"u";function Bt(t,e={}){const o={inspect:F,group:F,filter:n(()=>!0,"filter"),...e},s=o.filter,r=typeof s=="string"?c=>c.startsWith(s):s,i=o.tag?`[${o.tag}] `:"",l=n(c=>i+c.name+"".padEnd(c._id,"\0"),"logPrefix"),h={},S=t.beforeEach(c=>{r!==void 0&&!r(c.name)||(h[c.name]=h[c.name]||0,c._id=h[c.name]++,console.time(l(c)))}),P=t.afterEach(c=>{r!==void 0&&!r(c.name)||(o.group&&console.groupCollapsed(c.name),o.inspect?console.timeLog(l(c),c.args):console.timeEnd(l(c)),o.group&&console.groupEnd(),h[c.name]--)});return{close:n(()=>{S(),P()},"close")}}a(Bt,"W");n(Bt,"createDebugger");var Gt=Object.defineProperty,H=a((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"t$1");const te=H(()=>K(),"createVisHooks"),ee=H(async(t,e)=>{if(!(!e||e.length===0))for(const o of e){if(o.hooks)for(const[s,r]of Object.entries(o.hooks)){const i=Array.isArray(r)?r:[r];for(const l of i)t.hook(s,l)}o.setup&&await o.setup(t)}},"registerPlugins");class oe{static{a(this,"HookableLifeCycle")}static{H(this,"HookableLifeCycle")}#o;#e;#s=new Map;constructor(e,o){this.#o=e,this.#e=o}startTasks(e){for(const o of e)this.#s.set(o.id,o),this.#t("task:before",o)}endTasks(e){for(const o of e)this.#s.delete(o.task.id),this.#t("task:after",o.task,o),o.status==="failure"?this.#t("task:failure",o.task,o):Vt(o.status)&&this.#t("task:cacheHit",o.task,o)}printCacheMiss(e,o){this.#t("task:cacheMiss",e,o)}onTaskStdout(e,o){this.#t("task:stdout",e,o)}onTaskStderr(e,o){this.#t("task:stderr",e,o)}#t(e,...o){Promise.resolve(this.#o.callHook(e,...o)).catch(s=>{if(this.#e)try{this.#e(e,s)}catch{}})}}const Vt=H(t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache","isCacheStatus");var qt=Object.defineProperty,Xt=a((t,e)=>qt(t,"name",{value:e,configurable:!0}),"i");const I=process.platform==="win32",Jt=Xt(async t=>{const{command:e,cwd:o,env:s,logFile:r}=t,i=await A(r,"a",M);let l;try{l=ht(I?"cmd":"/bin/sh",I?["/d","/s","/c",e]:["-c",e],{cwd:o,detached:!0,env:{...process.env,...s},stdio:["ignore",i.fd,i.fd],windowsHide:!0})}finally{await i.close().catch(()=>{})}if(l.pid===void 0&&await new Promise((h,S)=>{l.once("spawn",()=>{h()}),l.once("error",P=>{S(P)})}),l.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${e}`);return l.unref(),{pid:l.pid}},"spawnDetached");var Kt=Object.defineProperty,E=a((t,e)=>Kt(t,"name",{value:e,configurable:!0}),"t");const Y=5e3,se=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(e&&f(e.pid))throw new Error(`Service ${t.id} is already running (pid ${String(e.pid)})`);e&&await g(t.workspaceRoot,t.id,e);const o=await w(t.workspaceRoot),s=R(t.id),r=p(o,`${s}.log`),{pid:i}=await Jt({command:t.command,cwd:t.cwd,env:t.env,logFile:r}),l={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:r,pid:i,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await jt(t.workspaceRoot,l),t.skipReadiness!==!0)try{await Pt(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(h){throw await Z(i,t.config.killGracePeriodMs??Y).catch(()=>{}),await g(t.workspaceRoot,t.id,l).catch(()=>{}),h}return{entry:l}}),"startService"),re=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(!e)return{stopped:!1};if(!f(e.pid))return await g(t.workspaceRoot,t.id,e),{stopped:!1};const o=t.graceMs??e.config.killGracePeriodMs??Y;return await Z(e.pid,o),await g(t.workspaceRoot,t.id,e),{stopped:!0}}),"stopService"),Z=E(async(t,e)=>{L(t,"SIGTERM");const o=Date.now();for(;Date.now()-o<e;){if(!f(t))return;await new Promise(s=>{setTimeout(s,100)})}f(t)&&L(t,"SIGKILL")},"stopServiceByPid"),L=E((t,e)=>{try{process.platform==="win32"?process.kill(t,e):process.kill(-t,e)}catch(o){if(o.code==="ESRCH")return;throw o}},"sendSignalToServiceGroup");export{oe as H,$t as S,b as a,re as b,te as c,Ot as d,Pt as e,g as f,f as i,Ut as p,ee as r,se as s};
1
+ var Q=Object.defineProperty;var a=(t,e)=>Q(t,"name",{value:e,configurable:!0});import{createRequire as U}from"node:module";import{k as tt,m as O,M as p}from"../packem_chunks/config.js";import{b1 as lt,a5 as dt,b2 as W}from"../packem_chunks/bin.js";const Z=U(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=a(t=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,o]=k.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return k.getBuiltinModule(t)}return Z(t)},"__cjs_getBuiltinModule"),{Socket:et}=y("node:net"),{randomBytes:ot}=y("node:crypto"),{readdir:st,writeFile:rt,rename:it,rm:T,open:A,readFile:at,stat:nt,unlink:j}=y("node:fs/promises"),{createRequire:ct}=y("node:module"),{spawn:ht}=y("node:child_process");var ut=Object.defineProperty,ft=a((t,e)=>ut(t,"name",{value:e,configurable:!0}),"i$1"),pt=Object.defineProperty,N=ft((t,e)=>pt(t,"name",{value:e,configurable:!0}),"s");const wt=ct(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=N(t=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[e,o]=m.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return m.getBuiltinModule(t)}return wt(t)},"__cjs_getBuiltinModule"),{lstat:x,mkdir:mt}=kt("node:fs/promises");var gt=Object.defineProperty,vt=N((t,e)=>gt(t,"name",{value:e,configurable:!0}),"o");const yt=vt(async t=>{tt(t);try{const e=await x(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await mt(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const o=await x(t);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(o))}'`,{cause:e})}},"ensureDir");var _t=Object.defineProperty,u=a((t,e)=>_t(t,"name",{value:e,configurable:!0}),"s");const bt=3e4,B=100;class $t extends Error{static{a(this,"ServiceReadinessError")}constructor(e,o){super(e),this.elapsedMs=o,this.name="ServiceReadinessError"}elapsedMs;static{u(this,"ServiceReadinessError")}}const Ht=u(async t=>{const e=t.host??"127.0.0.1",{port:o}=t,s=t.timeoutMs??bt,r=Date.now();for(;Date.now()-r<s;){if(await Et(e,o))return;await St(B)}throw new $t(`Timed out waiting for ${e}:${String(o)} to accept TCP connections (${String(s)}ms)`,Date.now()-r)},"waitForTcp"),Et=u((t,e)=>new Promise(o=>{const s=new et,r=u(i=>{s.removeAllListeners(),s.destroy(),o(i)},"onDone");s.once("connect",()=>{r(!0)}),s.once("error",()=>{r(!1)}),s.setTimeout(B,()=>{r(!1)});try{s.connect(e,t)}catch{r(!1)}}),"tryConnect"),St=u(t=>new Promise(e=>{setTimeout(e,t)}),"delay"),Pt=u(async(t,e)=>{const o=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});o&&await Ht({host:o.tcp.host,port:o.tcp.port,timeoutMs:e?.timeoutMs??o.tcp.timeoutMs})},"runReadiness");var Tt=Object.defineProperty,d=a((t,e)=>Tt(t,"name",{value:e,configurable:!0}),"o");const M=384,C=5e3,Mt=50,Rt=3e4,w=d(async t=>{const e=p(lt(t),"services");try{await yt(e)}catch(o){throw o.code==="ENOTDIR"?new Error(`Service registry path ${e} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:o}):o}return e},"getRegistryDir"),R=d(t=>t.replaceAll("/","_").replaceAll(":","__"),"slugify"),D=d((t,e)=>p(t,`${R(e)}.json`),"entryPath"),Dt=d((t,e)=>p(t,`${R(e)}.lock`),"lockPath"),b=d(async(t,e)=>{const o=await w(t),s=D(o,e);if(await dt(s))try{return await W(s)}catch{return}},"readEntry"),Ot=d(async t=>{const e=await w(t);let o;try{o=await st(e)}catch{return[]}const s=[];for(const r of o)if(r.endsWith(".json"))try{const i=await W(p(e,r));s.push(i)}catch{}return s},"readAllEntries"),jt=d(async(t,e)=>{const o=await w(t),s=D(o,e.id),r=p(o,`.${ot(8).toString("hex")}.tmp`);await rt(r,`${JSON.stringify(e,void 0,2)}
2
+ `,{mode:M});try{await it(r,s)}catch(i){throw await T(r,{force:!0}).catch(()=>{}),i}},"writeEntry"),g=d(async(t,e,o)=>{const s=await w(t),r=o??await b(t,e);await T(D(s,e),{force:!0}),r&&await T(r.logFile,{force:!0}).catch(()=>{})},"deleteEntry"),f=d(t=>{try{return process.kill(t,0),!0}catch{return!1}},"isAlive"),Zt=d(async t=>{const e=await Ot(t),o=[],s=[];for(const r of e){if(f(r.pid)){s.push(r);continue}const i=await b(t,r.id);if(i&&i.pid!==r.pid){s.push(i);continue}await g(t,r.id,r).catch(()=>{}),o.push(r.id)}return{pruned:o,surviving:s}},"pruneDead"),xt=d(t=>new Promise(e=>{setTimeout(e,t)}),"sleep"),Ct=d(async t=>{try{const e=await A(t,"wx",M);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},"tryClaimLock"),Ft=d(async t=>{let e;try{const o=await at(t,"utf8"),s=Number.parseInt(o.trim(),10);e=Number.isFinite(s)?s:void 0}catch{return!0}if(e!==void 0&&!f(e))return!0;try{const o=await nt(t);return Date.now()-o.mtimeMs>Rt}catch{return!0}},"isLockStale"),G=d(async(t,e,o)=>{const s=await w(t),r=Dt(s,e),i=Date.now();for(;!await Ct(r);){if(await Ft(r)){await j(r).catch(()=>{});continue}if(Date.now()-i>=C)throw new Error(`Could not acquire service lock for ${e} within ${String(C)}ms — another \`vis service\` invocation appears to be holding it.`);await xt(Mt)}try{return await o()}finally{await j(r).catch(()=>{})}},"withServiceLock");var It=Object.defineProperty,n=a((t,e)=>It(t,"name",{value:e,configurable:!0}),"r");function v(t,e={},o){for(const s in t){const r=t[s],i=o?`${o}:${s}`:s;typeof r=="object"&&r!==null?v(r,e,i):typeof r=="function"&&(e[i]=r)}return e}a(v,"c");n(v,"flatHooks");function Lt(...t){const e={};for(const o of t){const s=v(o);for(const r in s)e[r]?e[r].push(s[r]):e[r]=[s[r]]}for(const o in e)if(e[o].length>1){const s=e[o];e[o]=(...r)=>V(s,i=>i(...r))}else e[o]=e[o][0];return e}a(Lt,"v");n(Lt,"mergeHooks");function V(t,e){return t.reduce((o,s)=>o.then(()=>e(s)),Promise.resolve())}a(V,"d$2");n(V,"serial");const q=(()=>{if(console.createTask)return console.createTask;const t={run:n(e=>e(),"run")};return()=>t})();function $(t,e,o,s){for(let r=o;r<t.length;r+=1)try{const i=s?s.run(()=>t[r](...e)):t[r](...e);if(i&&typeof i.then=="function")return Promise.resolve(i).then(()=>$(t,e,r+1,s))}catch(i){return Promise.reject(i)}}a($,"k");n($,"callHooks");function X(t,e,o){if(t.length>0)return $(t,e,0,q(o))}a(X,"y");n(X,"serialTaskCaller");function J(t,e,o){if(t.length>0){const s=q(o);return Promise.all(t.map(r=>s.run(()=>r(...e))))}}a(J,"m");n(J,"parallelTaskCaller");function At(t,e){return t.reduce((o,s)=>o.then(()=>s(...e||[])),Promise.resolve())}a(At,"x");n(At,"serialCaller");function Wt(t,e){return Promise.all(t.map(o=>o(...e||[])))}a(Wt,"P");n(Wt,"parallelCaller");function _(t,e){for(const o of[...t])o(e)}a(_,"a");n(_,"callEachWith");var Nt=class{static{a(this,"p")}static{n(this,"Hookable")}_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,o={}){if(!t||typeof e!="function")return()=>{};const s=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!o.allowDeprecated){let i=r.message;i||(i=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!e.name)try{Object.defineProperty(e,"name",{get:n(()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb","get"),configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let o,s=n((...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,e(...r)),"_function");return o=this.hook(t,s),o}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const o=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of o)this.hook(t,s)}deprecateHooks(t){for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=v(t),o=Object.keys(e).map(s=>this.hook(s,e[s]));return()=>{for(const s of o)s();o.length=0}}removeHooks(t){const e=v(t);for(const o in e)this.removeHook(o,e[o])}removeAllHooks(){this._hooks={}}callHook(t,...e){return this.callHookWith(X,t,e)}callHookParallel(t,...e){return this.callHookWith(J,t,e)}callHookWith(t,e,o){const s=this._before||this._after?{name:e,args:o,context:{}}:void 0;this._before&&_(this._before,s);const r=t(this._hooks[e]?[...this._hooks[e]]:[],o,e);return r instanceof Promise?r.finally(()=>{this._after&&s&&_(this._after,s)}):(this._after&&s&&_(this._after,s),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}};function K(){return new Nt}a(K,"w$2");n(K,"createHooks");(class{static{n(this,"HookableCore")}_hooks;constructor(){this._hooks={}}hook(t,e){return!t||typeof e!="function"?()=>{}:(this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)})}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}callHook(t,...e){const o=this._hooks[t];if(!(!o||o.length===0))return $(o,e,0)}});const F=typeof window<"u";function Bt(t,e={}){const o={inspect:F,group:F,filter:n(()=>!0,"filter"),...e},s=o.filter,r=typeof s=="string"?c=>c.startsWith(s):s,i=o.tag?`[${o.tag}] `:"",l=n(c=>i+c.name+"".padEnd(c._id,"\0"),"logPrefix"),h={},S=t.beforeEach(c=>{r!==void 0&&!r(c.name)||(h[c.name]=h[c.name]||0,c._id=h[c.name]++,console.time(l(c)))}),P=t.afterEach(c=>{r!==void 0&&!r(c.name)||(o.group&&console.groupCollapsed(c.name),o.inspect?console.timeLog(l(c),c.args):console.timeEnd(l(c)),o.group&&console.groupEnd(),h[c.name]--)});return{close:n(()=>{S(),P()},"close")}}a(Bt,"W");n(Bt,"createDebugger");var Gt=Object.defineProperty,H=a((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"t$1");const te=H(()=>K(),"createVisHooks"),ee=H(async(t,e)=>{if(!(!e||e.length===0))for(const o of e){if(o.hooks)for(const[s,r]of Object.entries(o.hooks)){const i=Array.isArray(r)?r:[r];for(const l of i)t.hook(s,l)}o.setup&&await o.setup(t)}},"registerPlugins");class oe{static{a(this,"HookableLifeCycle")}static{H(this,"HookableLifeCycle")}#o;#e;#s=new Map;constructor(e,o){this.#o=e,this.#e=o}startTasks(e){for(const o of e)this.#s.set(o.id,o),this.#t("task:before",o)}endTasks(e){for(const o of e)this.#s.delete(o.task.id),this.#t("task:after",o.task,o),o.status==="failure"?this.#t("task:failure",o.task,o):Vt(o.status)&&this.#t("task:cacheHit",o.task,o)}printCacheMiss(e,o){this.#t("task:cacheMiss",e,o)}onTaskStdout(e,o){this.#t("task:stdout",e,o)}onTaskStderr(e,o){this.#t("task:stderr",e,o)}#t(e,...o){Promise.resolve(this.#o.callHook(e,...o)).catch(s=>{if(this.#e)try{this.#e(e,s)}catch{}})}}const Vt=H(t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache","isCacheStatus");var qt=Object.defineProperty,Xt=a((t,e)=>qt(t,"name",{value:e,configurable:!0}),"i");const I=process.platform==="win32",Jt=Xt(async t=>{const{command:e,cwd:o,env:s,logFile:r}=t,i=await A(r,"a",M);let l;try{l=ht(I?"cmd":"/bin/sh",I?["/d","/s","/c",e]:["-c",e],{cwd:o,detached:!0,env:{...process.env,...s},stdio:["ignore",i.fd,i.fd],windowsHide:!0})}finally{await i.close().catch(()=>{})}if(l.pid===void 0&&await new Promise((h,S)=>{l.once("spawn",()=>{h()}),l.once("error",P=>{S(P)})}),l.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${e}`);return l.unref(),{pid:l.pid}},"spawnDetached");var Kt=Object.defineProperty,E=a((t,e)=>Kt(t,"name",{value:e,configurable:!0}),"t");const Y=5e3,se=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(e&&f(e.pid))throw new Error(`Service ${t.id} is already running (pid ${String(e.pid)})`);e&&await g(t.workspaceRoot,t.id,e);const o=await w(t.workspaceRoot),s=R(t.id),r=p(o,`${s}.log`),{pid:i}=await Jt({command:t.command,cwd:t.cwd,env:t.env,logFile:r}),l={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:r,pid:i,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await jt(t.workspaceRoot,l),t.skipReadiness!==!0)try{await Pt(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(h){throw await z(i,t.config.killGracePeriodMs??Y).catch(()=>{}),await g(t.workspaceRoot,t.id,l).catch(()=>{}),h}return{entry:l}}),"startService"),re=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(!e)return{stopped:!1};if(!f(e.pid))return await g(t.workspaceRoot,t.id,e),{stopped:!1};const o=t.graceMs??e.config.killGracePeriodMs??Y;return await z(e.pid,o),await g(t.workspaceRoot,t.id,e),{stopped:!0}}),"stopService"),z=E(async(t,e)=>{L(t,"SIGTERM");const o=Date.now();for(;Date.now()-o<e;){if(!f(t))return;await new Promise(s=>{setTimeout(s,100)})}f(t)&&L(t,"SIGKILL")},"stopServiceByPid"),L=E((t,e)=>{try{process.platform==="win32"?process.kill(t,e):process.kill(-t,e)}catch(o){if(o.code==="ESRCH")return;throw o}},"sendSignalToServiceGroup");export{oe as H,$t as S,b as a,re as b,te as c,Ot as d,Pt as e,g as f,f as i,Zt as p,ee as r,se as s};
@@ -1,4 +1,4 @@
1
- var E=Object.defineProperty;var R=(u,p)=>E(u,"name",{value:p,configurable:!0});import{M as d,i as o,$,B as h}from"../packem_chunks/config.js";import{K as x}from"../packem_chunks/bin.js";var S=Object.defineProperty,b=R((u,p)=>S(u,"name",{value:p,configurable:!0}),"k");const P=b((u,p,A,m=[])=>{const i=[];if(A===void 0)return i.push("minimumReleaseAge not set in vis.config; skipping native sync."),i;const r=Number.isFinite(A)?Math.max(0,Math.round(A)):0;switch(u){case"bun":{const n=d(p,"bunfig.toml");let e=o(n)?$(n):"";const a=r*60,t=`minimumReleaseAge = ${String(a)}`,s=m.length>0?`minimumReleaseAgeExcludes = [${m.map(c=>`"${c.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,g=/^\[install\][ \t]*\n/m.exec(e);if(g?.index===void 0){const c=s?`${t}
1
+ var E=Object.defineProperty;var R=(u,p)=>E(u,"name",{value:p,configurable:!0});import{M as d,i as o,$,B as h}from"../packem_chunks/config.js";import{M as x}from"../packem_chunks/bin.js";var S=Object.defineProperty,b=R((u,p)=>S(u,"name",{value:p,configurable:!0}),"k");const P=b((u,p,A,m=[])=>{const i=[];if(A===void 0)return i.push("minimumReleaseAge not set in vis.config; skipping native sync."),i;const r=Number.isFinite(A)?Math.max(0,Math.round(A)):0;switch(u){case"bun":{const n=d(p,"bunfig.toml");let e=o(n)?$(n):"";const a=r*60,t=`minimumReleaseAge = ${String(a)}`,s=m.length>0?`minimumReleaseAgeExcludes = [${m.map(c=>`"${c.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,g=/^\[install\][ \t]*\n/m.exec(e);if(g?.index===void 0){const c=s?`${t}
2
2
  ${s}`:t;e=`${e.trimEnd()?`${e.trimEnd()}
3
3
 
4
4
  `:""}[install]