likec4 1.40.0 → 1.42.0

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 (42) hide show
  1. package/__app__/src/likec4.js +11785 -12231
  2. package/__app__/src/main.js +185 -129
  3. package/__app__/src/style.css +1 -1
  4. package/__app__/src/vendors.js +38526 -17009
  5. package/__app__/src/webcomponent.js +68 -0
  6. package/config/package.json +2 -2
  7. package/config/schema.json +575 -0
  8. package/dist/cli/index.mjs +573 -569
  9. package/dist/config/index.d.mts +4 -1
  10. package/dist/config/index.mjs +1 -1
  11. package/dist/index.d.mts +4 -4
  12. package/dist/index.mjs +1 -1
  13. package/dist/model/index.d.mts +47 -4
  14. package/dist/model/index.mjs +1 -1
  15. package/dist/shared/likec4.B5Q51Z1F.mjs +543 -0
  16. package/dist/shared/likec4.BCSBNe4z.d.mts +6808 -0
  17. package/dist/shared/likec4.CB2-Uaub.mjs +47 -0
  18. package/dist/shared/likec4.CJVbsoPD.mjs +256 -0
  19. package/dist/shared/{likec4.DDO3vjMr.d.mts → likec4.CaOUU1HJ.d.mts} +292 -201
  20. package/dist/shared/likec4.DOUP9ptn.mjs +1 -0
  21. package/dist/shared/{likec4.C8C0fF8a.mjs → likec4.DO_7oUns.mjs} +1 -1
  22. package/dist/shared/likec4.DdxVkEIS.mjs +4038 -0
  23. package/dist/vite-plugin/index.d.mts +4 -3
  24. package/dist/vite-plugin/index.mjs +1 -1
  25. package/dist/vite-plugin/internal.mjs +3 -3
  26. package/icons/all/package.json +4 -0
  27. package/model/builder/package.json +4 -0
  28. package/model/package.json +4 -0
  29. package/package.json +42 -42
  30. package/react/index.d.ts +6655 -0
  31. package/react/index.js +48628 -0
  32. package/react/package.json +3 -2
  33. package/vite-plugin/package.json +2 -2
  34. package/vite-plugin-modules.d.ts +5 -5
  35. package/__app__/src/webcomponent.tsx +0 -81
  36. package/dist/shared/likec4.CdNNo2L4.mjs +0 -1
  37. package/dist/shared/likec4.CxmGAh_J.mjs +0 -144
  38. package/dist/shared/likec4.DX1wM3Or.d.mts +0 -1704
  39. package/dist/shared/likec4.P9UC3Wd_.mjs +0 -257
  40. package/dist/shared/likec4.hpe1blK6.mjs +0 -4173
  41. package/react/index.d.mts +0 -6558
  42. package/react/index.mjs +0 -185
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{l as Ne,r as Cf,m as tt,o as mn,p as wt,q as Oo,a as ko,h as Tf,u as j,w as Io,s as Nf,v as Of,x as Ae,y as jo,z as Ht,A as Ke,B as kf,k as Lo,C as Do,d as If,L as Pe,D as bt,_ as jf,j as qo,E as Lf,F as xo,G as De,H as Df,I as qf,e as xf,J as at,U as yn,K as it,M as gn,O as $n,P as Mo,Q as Ho}from"../shared/likec4.hpe1blK6.mjs";import se,{existsSync as Me,copyFileSync as Uo,readdirSync as Mf,rmSync as vn,statSync as Hf}from"node:fs";import me,{hrtime as Uf,cwd as Ut,exit as Fo,argv as Ff,
3
- stdout as Vf}from"node:process";import{isMinimal as zf,nodeENV as Gf,isDevelopment as Bf}from"std-env";import Kf from"yargs";import{hideBin as Wf}from"yargs/helpers";import ie,{resolve as ae,dirname as We,join as Et,relative as He,sep as Vo,extname as St,isAbsolute as _n,basename as Ft}from"node:path";import zo,{mkdtemp as Vt,writeFile as Xe,mkdir as qe,stat as wn,copyFile as Xf,rm as Jf}from"node:fs/promises";import Rt,{tmpdir as zt}from"node:os";import{fileURLToPath as Go}from"node:url";import bn from"@vitejs/plugin-react";
4
- import Bo from"util";import En,{resolve as ct}from"path";import{j as Ko,e as Wo,C as Yf,t as Xo,N as ut,L as Sn,g as Qf,a as Zf,b as ed}from"../shared/likec4.P9UC3Wd_.mjs";import{build as At,createServer as td,preview as rd}from"vite";import nd from"node:module";import sd from"node:net";import{setTimeout as od}from"node:timers/promises";import{invariant as Rn,nonexhaustive as An}from"@likec4/core";import{promisify as $e,isDeepStrictEqual as ad}from"node:util";import Pt from"node:crypto";import id from"node:assert";
5
- import{l as lt}from"../shared/likec4.CxmGAh_J.mjs";import{isDeploymentRelationModel as cd,isRelationModel as ud,isDeploymentElementModel as ld,isLikeC4ViewModel as fd,isElementModel as dd}from"@likec4/core/model";import{compareNatural as pd,sortNaturalByFqn as hd,invariant as md,delay as Jo}from"@likec4/core/utils";let Pn;function yd(){try{return se.statSync("/.dockerenv"),!0}catch{return!1}}function gd(){try{return se.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function $d(){
6
- return Pn===void 0&&(Pn=yd()||gd()),Pn}let Cn;const vd=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function Ue(){return Cn===void 0&&(Cn=vd()||$d()),Cn}const be={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:ae},Re={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:Ue()?"enabled in container, disable by --no-use-dot":'use graphviz binaries ("dot" should be on PATH)',default:Ue()},Yo={boolean:!0,type:"\
7
- boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},Ct={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:ae},Tn={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},Qo={alias:"t",type:"string",desc:'base title of the app pages (default is "LikeC4")',default:"LikeC4"},Zo={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},_d={boolean:!0,
8
- type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},wd={alias:"l",type:"string",desc:Ue()?"listen 0.0.0.0 by default in container":"ip address of the network interface to listen on",default:Ue()?"0.0.0.0":"localhost"},Gt={alias:"p",type:"string",desc:'LikeC4 project, name eg. "my-project" or path to the project folder'},ea=e=>e instanceof URL?Go(e):e;function bd(e,{cwd:t=me.cwd(),type:r="file",stopAt:n}={}){let c=ie.resolve(ea(t)??"");const{root:s}=ie.
9
- parse(c);for(n=ie.resolve(c,ea(n)??s);c&&c!==n&&c!==s;){const o=ie.isAbsolute(e)?e:ie.join(c,e);try{const a=se.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||r==="directory"&&a?.isDirectory())return o}catch{}c=ie.dirname(c)}}function Ed({cwd:e=me.cwd()}={}){return bd("package.json",{cwd:e})}const Sd=Ne("vite"),Bt=We(Go(import.meta.url)),Rd=`
2
+ import{h as Te,r as kf,k as tt,l as mn,m as wt,u as j,w as No,o as Tf,p as Nf,q as Ae,s as Oo,v as Mt,x as We,y as Of,d as Io,z as jo,A as If,c as jf,L as Pe,B as Lf,j as Lo,C as Df,D as Do,E as De,F as qf,G as xf,e as Mf,H as at,U as yn,I as it,J as gn,K as $n,M as qo,Q as xo}from"../shared/likec4.DdxVkEIS.mjs";import se,{existsSync as He,copyFileSync as Mo,readdirSync as Hf,rmSync as vn,statSync as Uf}from"node:fs";import me,{hrtime as Ff,cwd as Ht,exit as Ho,argv as Vf,stdout as zf}from"node:process";
3
+ import{b as Uo,t as Fo,a as Gf,d as bt}from"../shared/likec4.CB2-Uaub.mjs";import{isMinimal as Bf,nodeENV as Kf,isDevelopment as Wf}from"std-env";import Xf from"yargs";import{hideBin as Jf}from"yargs/helpers";import ie,{resolve as oe,dirname as qe,join as Et,relative as Ue,sep as Vo,extname as St,isAbsolute as _n,basename as Ut}from"node:path";import zo,{mkdtemp as Ft,writeFile as Xe,mkdir as xe,stat as wn,copyFile as Yf,rm as Qf}from"node:fs/promises";import Rt,{tmpdir as Vt}from"node:os";import{
4
+ fileURLToPath as Go}from"node:url";import bn from"@vitejs/plugin-react";import Bo from"util";import En,{resolve as ct}from"path";import{j as Ko,e as Wo,C as Zf,t as Xo,N as ut,L as Sn,g as ed,a as td,b as rd}from"../shared/likec4.CJVbsoPD.mjs";import{build as At,createServer as nd,preview as sd}from"vite";import od from"node:module";import ad from"node:net";import{setTimeout as id}from"node:timers/promises";import{invariant as Rn,nonexhaustive as An}from"@likec4/core";import{promisify as $e,isDeepStrictEqual as cd}from"node:util";
5
+ import Pt from"node:crypto";import ud from"node:assert";import{l as lt}from"../shared/likec4.B5Q51Z1F.mjs";import{isDeploymentRelationModel as ld,isRelationModel as fd,isDeploymentElementModel as dd,isLikeC4ViewModel as pd,isElementModel as hd}from"@likec4/core/model";import{compareNatural as md,sortNaturalByFqn as yd,invariant as gd,delay as Jo}from"@likec4/core/utils";let Pn;function $d(){try{return se.statSync("/.dockerenv"),!0}catch{return!1}}function vd(){try{return se.readFileSync("/proc/s\
6
+ elf/cgroup","utf8").includes("docker")}catch{return!1}}function _d(){return Pn===void 0&&(Pn=$d()||vd()),Pn}let Cn;const wd=()=>{try{return se.statSync("/run/.containerenv"),!0}catch{return!1}};function Fe(){return Cn===void 0&&(Cn=wd()||_d()),Cn}const be={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:oe},Re={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:Fe()?"enabled in container, disable by --no-use-dot":'use graphviz b\
7
+ inaries ("dot" should be on PATH)',default:Fe()},Yo={boolean:!0,type:"boolean",desc:"use `@likec4/core` package in types",default:!1},Qo={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},zt={alias:"o",type:"string",desc:"output directory",normalize:!0,nargs:1,coerce:oe},kn={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4",nargs:1},Zo={alias:"t",type:"string",desc:'base title of the app p\
8
+ ages (default is "LikeC4")',default:"LikeC4",nargs:1},ea={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"',nargs:1},bd={boolean:!0,type:"boolean",desc:"outputs a single self-contained HTML file with all required resources inlined"},Ed={alias:"l",type:"string",desc:Fe()?"listen 0.0.0.0 by default in container":"ip address of the network interface to listen on",default:Fe()?"0.0.0.0":"localhost",nargs:1},Gt={alias:"p",type:"string",desc:'LikeC4 p\
9
+ roject, name eg. "my-project" or path to the project folder',nargs:1},ta=e=>e instanceof URL?Go(e):e;function Sd(e,{cwd:t=me.cwd(),type:r="file",stopAt:n}={}){let i=ie.resolve(ta(t)??"");const{root:s}=ie.parse(i);for(n=ie.resolve(i,ta(n)??s);i&&i!==n&&i!==s;){const o=ie.isAbsolute(e)?e:ie.join(i,e);try{const a=se.statSync(o,{throwIfNoEntry:!1});if(r==="file"&&a?.isFile()||r==="directory"&&a?.isDirectory())return o}catch{}i=ie.dirname(i)}}function Rd({cwd:e=me.cwd()}={}){return Sd("package.json",
10
+ {cwd:e})}const Ad=Te("vite"),Bt=qe(Go(import.meta.url)),Pd=`
10
11
  /* prettier-ignore-start */
11
12
  /* eslint-disable */
12
13
 
@@ -15,96 +16,96 @@ parse(c);for(n=ie.resolve(c,ea(n)??s);c&&c!==n&&c!==s;){const o=ie.isAbsolute(e)
15
16
  * DO NOT EDIT MANUALLY!
16
17
  ******************************************************************************/
17
18
 
18
- `.trimStart(),Ad=`
19
+ `.trimStart(),Cd=`
19
20
 
20
21
  /* prettier-ignore-end */
21
- `,Nn={banner:Rd,footer:Ad};function ta(){const e=Ed({cwd:Bt});if(!e)throw new Error("likec4 package folder not found");return We(e)}function On(){const e=ta(),t=[ae(e,"__app__"),ae(Bt,"../__app__"),ae(Bt,"../../__app__"),ae(Bt,"../../dist/__app__")],r=Cf(t,Me);if(!r)throw tt.error(`likec4 app root does not exist, tried:
22
+ `,Tn={banner:Pd,footer:Cd};function ra(){const e=Rd({cwd:Bt});if(!e)throw new Error("likec4 package folder not found");return qe(e)}function Nn(){const e=ra(),t=[oe(e,"__app__"),oe(Bt,"../__app__"),oe(Bt,"../../__app__"),oe(Bt,"../../dist/__app__")],r=kf(t,He);if(!r)throw tt.error(`likec4 app root does not exist, tried:
22
23
  ${t.join(`
23
- `)}`),new Error("likec4 app root does not exist");return r}async function kn(){const e=await Vt(Et(zt(),".likec4-public-"));return await Xe(Et(e,"likec4-views.js"),`// generated by likec4
24
- `),e}const In=1e4;function jn(){const e=ta();return{"likec4/icons":ae(e,"icons"),"likec4/react":ae(e,"react/index.mjs"),"likec4/model":ae(e,"dist/model/index.mjs"),"likec4/vite-plugin/internal":ae(e,"dist/vite-plugin/internal.mjs")}}var Ln={},ra;function Dn(){return ra||(ra=1,(function(e){e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,r)=>t.nodes.find(n=>n.type===r),e.exceedsLimit=(t,r,n=1,c)=>c===!1||!e.isInteger(
25
- t)||!e.isInteger(r)?!1:(Number(r)-Number(t))/Number(n)>=c,e.escapeNode=(t,r=0,n)=>{const c=t.nodes[r];c&&(n&&c.type===n||c.type==="open"||c.type==="close")&&c.escaped!==!0&&(c.value="\\"+c.value,c.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1,e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===
26
- !0||t.close===!0,e.reduce=t=>t.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),e.flatten=(...t)=>{const r=[],n=c=>{for(let s=0;s<c.length;s++){const o=c[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(t),r}})(Ln)),Ln}var qn,na;function xn(){if(na)return qn;na=1;const e=Dn();return qn=(t,r={})=>{const n=(c,s={})=>{const o=r.escapeInvalid&&e.isInvalidBrace(s),a=c.invalid===!0&&r.escapeInvalid===!0;let i="";if(c.value)return(o||
27
- a)&&e.isOpenOrClose(c)?"\\"+c.value:c.value;if(c.value)return c.value;if(c.nodes)for(const u of c.nodes)i+=n(u);return i};return n(t)},qn}var Mn,sa;function Pd(){return sa||(sa=1,Mn=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}),Mn}var Hn,oa;function Cd(){if(oa)return Hn;oa=1;const e=Pd(),t=(p,h,f)=>{if(e(p)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(h===void 0||p===
28
- h)return String(p);if(e(h)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let d={relaxZeros:!0,...f};typeof d.strictZeros=="boolean"&&(d.relaxZeros=d.strictZeros===!1);let $=String(d.relaxZeros),v=String(d.shorthand),w=String(d.capture),E=String(d.wrap),P=p+":"+h+"="+$+v+w+E;if(t.cache.hasOwnProperty(P))return t.cache[P].result;let k=Math.min(p,h),U=Math.max(p,h);if(Math.abs(k-U)===1){let M=p+"|"+h;return d.capture?`(${M})`:d.wrap===!1?M:`(?:${M})`}let q=S(
29
- p)||S(h),H={min:p,max:h,a:k,b:U},D=[],I=[];if(q&&(H.isPadded=q,H.maxLen=String(H.max).length),k<0){let M=U<0?Math.abs(U):1;I=s(M,Math.abs(k),H,d),k=H.a=0}return U>=0&&(D=s(k,U,H,d)),H.negatives=I,H.positives=D,H.result=r(I,D),d.capture===!0?H.result=`(${H.result})`:d.wrap!==!1&&D.length+I.length>1&&(H.result=`(?:${H.result})`),t.cache[P]=H,H.result};function r(p,h,f){let d=o(p,h,"-",!1)||[],$=o(h,p,"",!1)||[],v=o(p,h,"-?",!0)||[];return d.concat(v).concat($).join("|")}function n(p,h){let f=1,d=1,
30
- $=l(p,f),v=new Set([h]);for(;p<=$&&$<=h;)v.add($),f+=1,$=l(p,f);for($=m(h+1,d)-1;p<$&&$<=h;)v.add($),d+=1,$=m(h+1,d)-1;return v=[...v],v.sort(i),v}function c(p,h,f){if(p===h)return{pattern:p,count:[],digits:0};let d=a(p,h),$=d.length,v="",w=0;for(let E=0;E<$;E++){let[P,k]=d[E];P===k?v+=P:P!=="0"||k!=="9"?v+=_(P,k):w++}return w&&(v+=f.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[w],digits:$}}function s(p,h,f,d){let $=n(p,h),v=[],w=p,E;for(let P=0;P<$.length;P++){let k=$[P],U=c(String(w),String(
31
- k),d),q="";if(!f.isPadded&&E&&E.pattern===U.pattern){E.count.length>1&&E.count.pop(),E.count.push(U.count[0]),E.string=E.pattern+y(E.count),w=k+1;continue}f.isPadded&&(q=g(k,f,d)),U.string=q+U.pattern+y(U.count),v.push(U),w=k+1,E=U}return v}function o(p,h,f,d,$){let v=[];for(let w of p){let{string:E}=w;!d&&!u(h,"string",E)&&v.push(f+E),d&&u(h,"string",E)&&v.push(f+E)}return v}function a(p,h){let f=[];for(let d=0;d<p.length;d++)f.push([p[d],h[d]]);return f}function i(p,h){return p>h?1:h>p?-1:0}function u(p,h,f){
32
- return p.some(d=>d[h]===f)}function l(p,h){return Number(String(p).slice(0,-h)+"9".repeat(h))}function m(p,h){return p-p%Math.pow(10,h)}function y(p){let[h=0,f=""]=p;return f||h>1?`{${h+(f?","+f:"")}}`:""}function _(p,h,f){return`[${p}${h-p===1?"":"-"}${h}]`}function S(p){return/^-?(0+)\d/.test(p)}function g(p,h,f){if(!h.isPadded)return p;let d=Math.abs(h.maxLen-String(p).length),$=f.relaxZeros!==!1;switch(d){case 0:return"";case 1:return $?"0?":"0";case 2:return $?"0{0,2}":"00";default:return $?
33
- `0{0,${d}}`:`0{${d}}`}}return t.cache={},t.clearCache=()=>t.cache={},Hn=t,Hn}var Un,aa;function ia(){if(aa)return Un;aa=1;const e=Bo,t=Cd(),r=d=>d!==null&&typeof d=="object"&&!Array.isArray(d),n=d=>$=>d===!0?Number($):String($),c=d=>typeof d=="number"||typeof d=="string"&&d!=="",s=d=>Number.isInteger(+d),o=d=>{let $=`${d}`,v=-1;if($[0]==="-"&&($=$.slice(1)),$==="0")return!1;for(;$[++v]==="0";);return v>0},a=(d,$,v)=>typeof d=="string"||typeof $=="string"?!0:v.stringify===!0,i=(d,$,v)=>{if($>0){let w=d[0]===
34
- "-"?"-":"";w&&(d=d.slice(1)),d=w+d.padStart(w?$-1:$,"0")}return v===!1?String(d):d},u=(d,$)=>{let v=d[0]==="-"?"-":"";for(v&&(d=d.slice(1),$--);d.length<$;)d="0"+d;return v?"-"+d:d},l=(d,$,v)=>{d.negatives.sort((U,q)=>U<q?-1:U>q?1:0),d.positives.sort((U,q)=>U<q?-1:U>q?1:0);let w=$.capture?"":"?:",E="",P="",k;return d.positives.length&&(E=d.positives.map(U=>u(String(U),v)).join("|")),d.negatives.length&&(P=`-(${w}${d.negatives.map(U=>u(String(U),v)).join("|")})`),E&&P?k=`${E}|${P}`:k=E||P,$.wrap?
35
- `(${w}${k})`:k},m=(d,$,v,w)=>{if(v)return t(d,$,{wrap:!1,...w});let E=String.fromCharCode(d);if(d===$)return E;let P=String.fromCharCode($);return`[${E}-${P}]`},y=(d,$,v)=>{if(Array.isArray(d)){let w=v.wrap===!0,E=v.capture?"":"?:";return w?`(${E}${d.join("|")})`:d.join("|")}return t(d,$,v)},_=(...d)=>new RangeError("Invalid range arguments: "+e.inspect(...d)),S=(d,$,v)=>{if(v.strictRanges===!0)throw _([d,$]);return[]},g=(d,$)=>{if($.strictRanges===!0)throw new TypeError(`Expected step "${d}" to\
36
- be a number`);return[]},p=(d,$,v=1,w={})=>{let E=Number(d),P=Number($);if(!Number.isInteger(E)||!Number.isInteger(P)){if(w.strictRanges===!0)throw _([d,$]);return[]}E===0&&(E=0),P===0&&(P=0);let k=E>P,U=String(d),q=String($),H=String(v);v=Math.max(Math.abs(v),1);let D=o(U)||o(q)||o(H),I=D?Math.max(U.length,q.length,H.length):0,M=D===!1&&a(d,$,w)===!1,z=w.transform||n(M);if(w.toRegex&&v===1)return m(u(d,I),u($,I),!0,w);let F={negatives:[],positives:[]},G=A=>F[A<0?"negatives":"positives"].push(Math.
37
- abs(A)),Q=[],x=0;for(;k?E>=P:E<=P;)w.toRegex===!0&&v>1?G(E):Q.push(i(z(E,x),I,M)),E=k?E-v:E+v,x++;return w.toRegex===!0?v>1?l(F,w,I):y(Q,null,{wrap:!1,...w}):Q},h=(d,$,v=1,w={})=>{if(!s(d)&&d.length>1||!s($)&&$.length>1)return S(d,$,w);let E=w.transform||(M=>String.fromCharCode(M)),P=`${d}`.charCodeAt(0),k=`${$}`.charCodeAt(0),U=P>k,q=Math.min(P,k),H=Math.max(P,k);if(w.toRegex&&v===1)return m(q,H,!1,w);let D=[],I=0;for(;U?P>=k:P<=k;)D.push(E(P,I)),P=U?P-v:P+v,I++;return w.toRegex===!0?y(D,null,{
38
- wrap:!1,options:w}):D},f=(d,$,v,w={})=>{if($==null&&c(d))return[d];if(!c(d)||!c($))return S(d,$,w);if(typeof v=="function")return f(d,$,1,{transform:v});if(r(v))return f(d,$,0,v);let E={...w};return E.capture===!0&&(E.wrap=!0),v=v||E.step||1,s(v)?s(d)&&s($)?p(d,$,v,E):h(d,$,Math.max(Math.abs(v),1),E):v!=null&&!r(v)?g(v,E):f(d,$,1,v)};return Un=f,Un}var Fn,ca;function Td(){if(ca)return Fn;ca=1;const e=ia(),t=Dn();return Fn=(n,c={})=>{const s=(o,a={})=>{const i=t.isInvalidBrace(a),u=o.invalid===!0&&
39
- c.escapeInvalid===!0,l=i===!0||u===!0,m=c.escapeInvalid===!0?"\\":"";let y="";if(o.isOpen===!0)return m+o.value;if(o.isClose===!0)return console.log("node.isClose",m,o.value),m+o.value;if(o.type==="open")return l?m+o.value:"(";if(o.type==="close")return l?m+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":l?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const _=t.reduce(o.nodes),S=e(..._,{...c,wrap:!1,toRegex:!0,strictZeros:!0});if(S.length!==0)return _.length>1&&S.
40
- length>1?`(${S})`:S}if(o.nodes)for(const _ of o.nodes)y+=s(_,o);return y};return s(n)},Fn}var Vn,ua;function Nd(){if(ua)return Vn;ua=1;const e=ia(),t=xn(),r=Dn(),n=(s="",o="",a=!1)=>{const i=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return a?r.flatten(o).map(u=>`{${u}}`):o;for(const u of s)if(Array.isArray(u))for(const l of u)i.push(n(l,o,a));else for(let l of o)a===!0&&typeof l=="string"&&(l=`{${l}}`),i.push(Array.isArray(l)?n(u,l,a):u+l);return r.flatten(i)};return Vn=
41
- (s,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,i=(u,l={})=>{u.queue=[];let m=l,y=l.queue;for(;m.type!=="brace"&&m.type!=="root"&&m.parent;)m=m.parent,y=m.queue;if(u.invalid||u.dollar){y.push(n(y.pop(),t(u,o)));return}if(u.type==="brace"&&u.invalid!==!0&&u.nodes.length===2){y.push(n(y.pop(),["{}"]));return}if(u.nodes&&u.ranges>0){const p=r.reduce(u.nodes);if(r.exceedsLimit(...p,o.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase\
42
- or disable the limit.");let h=e(...p,o);h.length===0&&(h=t(u,o)),y.push(n(y.pop(),h)),u.nodes=[];return}const _=r.encloseBrace(u);let S=u.queue,g=u;for(;g.type!=="brace"&&g.type!=="root"&&g.parent;)g=g.parent,S=g.queue;for(let p=0;p<u.nodes.length;p++){const h=u.nodes[p];if(h.type==="comma"&&u.type==="brace"){p===1&&S.push(""),S.push("");continue}if(h.type==="close"){y.push(n(y.pop(),S,_));continue}if(h.value&&h.type!=="open"){S.push(n(S.pop(),h.value));continue}h.nodes&&i(h,u)}return S};return r.
43
- flatten(i(s))},Vn}var zn,la;function Od(){return la||(la=1,zn={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\
24
+ `)}`),new Error("likec4 app root does not exist");return r}async function On(){const e=await Ft(Et(Vt(),".likec4-public-"));return await Xe(Et(e,"likec4-views.js"),`// generated by likec4
25
+ `),e}const In=1e4;function jn(){const e=ra();return{"likec4/icons":oe(e,"icons"),"likec4/react":oe(e,"react/index.js"),"likec4/model":oe(e,"dist/model/index.mjs"),"likec4/vite-plugin/internal":oe(e,"dist/vite-plugin/internal.mjs")}}var Ln={},na;function Dn(){return na||(na=1,(function(e){e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,r)=>t.nodes.find(n=>n.type===r),e.exceedsLimit=(t,r,n=1,i)=>i===!1||!e.isInteger(t)||
26
+ !e.isInteger(r)?!1:(Number(r)-Number(t))/Number(n)>=i,e.escapeNode=(t,r=0,n)=>{const i=t.nodes[r];i&&(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1,e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===
27
+ !0||t.close===!0,e.reduce=t=>t.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),e.flatten=(...t)=>{const r=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&r.push(o)}return r};return n(t),r}})(Ln)),Ln}var qn,sa;function xn(){if(sa)return qn;sa=1;const e=Dn();return qn=(t,r={})=>{const n=(i,s={})=>{const o=r.escapeInvalid&&e.isInvalidBrace(s),a=i.invalid===!0&&r.escapeInvalid===!0;let u="";if(i.value)return(o||
28
+ a)&&e.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const c of i.nodes)u+=n(c);return u};return n(t)},qn}var Mn,oa;function kd(){return oa||(oa=1,Mn=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}),Mn}var Hn,aa;function Td(){if(aa)return Hn;aa=1;const e=kd(),t=(p,h,f)=>{if(e(p)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(h===void 0||p===
29
+ h)return String(p);if(e(h)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let d={relaxZeros:!0,...f};typeof d.strictZeros=="boolean"&&(d.relaxZeros=d.strictZeros===!1);let g=String(d.relaxZeros),v=String(d.shorthand),w=String(d.capture),E=String(d.wrap),P=p+":"+h+"="+g+v+w+E;if(t.cache.hasOwnProperty(P))return t.cache[P].result;let O=Math.min(p,h),U=Math.max(p,h);if(Math.abs(O-U)===1){let M=p+"|"+h;return d.capture?`(${M})`:d.wrap===!1?M:`(?:${M})`}let x=S(
30
+ p)||S(h),H={min:p,max:h,a:O,b:U},D=[],I=[];if(x&&(H.isPadded=x,H.maxLen=String(H.max).length),O<0){let M=U<0?Math.abs(U):1;I=s(M,Math.abs(O),H,d),O=H.a=0}return U>=0&&(D=s(O,U,H,d)),H.negatives=I,H.positives=D,H.result=r(I,D),d.capture===!0?H.result=`(${H.result})`:d.wrap!==!1&&D.length+I.length>1&&(H.result=`(?:${H.result})`),t.cache[P]=H,H.result};function r(p,h,f){let d=o(p,h,"-",!1)||[],g=o(h,p,"",!1)||[],v=o(p,h,"-?",!0)||[];return d.concat(v).concat(g).join("|")}function n(p,h){let f=1,d=1,
31
+ g=l(p,f),v=new Set([h]);for(;p<=g&&g<=h;)v.add(g),f+=1,g=l(p,f);for(g=m(h+1,d)-1;p<g&&g<=h;)v.add(g),d+=1,g=m(h+1,d)-1;return v=[...v],v.sort(u),v}function i(p,h,f){if(p===h)return{pattern:p,count:[],digits:0};let d=a(p,h),g=d.length,v="",w=0;for(let E=0;E<g;E++){let[P,O]=d[E];P===O?v+=P:P!=="0"||O!=="9"?v+=_(P,O):w++}return w&&(v+=f.shorthand===!0?"\\d":"[0-9]"),{pattern:v,count:[w],digits:g}}function s(p,h,f,d){let g=n(p,h),v=[],w=p,E;for(let P=0;P<g.length;P++){let O=g[P],U=i(String(w),String(
32
+ O),d),x="";if(!f.isPadded&&E&&E.pattern===U.pattern){E.count.length>1&&E.count.pop(),E.count.push(U.count[0]),E.string=E.pattern+y(E.count),w=O+1;continue}f.isPadded&&(x=$(O,f,d)),U.string=x+U.pattern+y(U.count),v.push(U),w=O+1,E=U}return v}function o(p,h,f,d,g){let v=[];for(let w of p){let{string:E}=w;!d&&!c(h,"string",E)&&v.push(f+E),d&&c(h,"string",E)&&v.push(f+E)}return v}function a(p,h){let f=[];for(let d=0;d<p.length;d++)f.push([p[d],h[d]]);return f}function u(p,h){return p>h?1:h>p?-1:0}function c(p,h,f){
33
+ return p.some(d=>d[h]===f)}function l(p,h){return Number(String(p).slice(0,-h)+"9".repeat(h))}function m(p,h){return p-p%Math.pow(10,h)}function y(p){let[h=0,f=""]=p;return f||h>1?`{${h+(f?","+f:"")}}`:""}function _(p,h,f){return`[${p}${h-p===1?"":"-"}${h}]`}function S(p){return/^-?(0+)\d/.test(p)}function $(p,h,f){if(!h.isPadded)return p;let d=Math.abs(h.maxLen-String(p).length),g=f.relaxZeros!==!1;switch(d){case 0:return"";case 1:return g?"0?":"0";case 2:return g?"0{0,2}":"00";default:return g?
34
+ `0{0,${d}}`:`0{${d}}`}}return t.cache={},t.clearCache=()=>t.cache={},Hn=t,Hn}var Un,ia;function ca(){if(ia)return Un;ia=1;const e=Bo,t=Td(),r=d=>d!==null&&typeof d=="object"&&!Array.isArray(d),n=d=>g=>d===!0?Number(g):String(g),i=d=>typeof d=="number"||typeof d=="string"&&d!=="",s=d=>Number.isInteger(+d),o=d=>{let g=`${d}`,v=-1;if(g[0]==="-"&&(g=g.slice(1)),g==="0")return!1;for(;g[++v]==="0";);return v>0},a=(d,g,v)=>typeof d=="string"||typeof g=="string"?!0:v.stringify===!0,u=(d,g,v)=>{if(g>0){let w=d[0]===
35
+ "-"?"-":"";w&&(d=d.slice(1)),d=w+d.padStart(w?g-1:g,"0")}return v===!1?String(d):d},c=(d,g)=>{let v=d[0]==="-"?"-":"";for(v&&(d=d.slice(1),g--);d.length<g;)d="0"+d;return v?"-"+d:d},l=(d,g,v)=>{d.negatives.sort((U,x)=>U<x?-1:U>x?1:0),d.positives.sort((U,x)=>U<x?-1:U>x?1:0);let w=g.capture?"":"?:",E="",P="",O;return d.positives.length&&(E=d.positives.map(U=>c(String(U),v)).join("|")),d.negatives.length&&(P=`-(${w}${d.negatives.map(U=>c(String(U),v)).join("|")})`),E&&P?O=`${E}|${P}`:O=E||P,g.wrap?
36
+ `(${w}${O})`:O},m=(d,g,v,w)=>{if(v)return t(d,g,{wrap:!1,...w});let E=String.fromCharCode(d);if(d===g)return E;let P=String.fromCharCode(g);return`[${E}-${P}]`},y=(d,g,v)=>{if(Array.isArray(d)){let w=v.wrap===!0,E=v.capture?"":"?:";return w?`(${E}${d.join("|")})`:d.join("|")}return t(d,g,v)},_=(...d)=>new RangeError("Invalid range arguments: "+e.inspect(...d)),S=(d,g,v)=>{if(v.strictRanges===!0)throw _([d,g]);return[]},$=(d,g)=>{if(g.strictRanges===!0)throw new TypeError(`Expected step "${d}" to\
37
+ be a number`);return[]},p=(d,g,v=1,w={})=>{let E=Number(d),P=Number(g);if(!Number.isInteger(E)||!Number.isInteger(P)){if(w.strictRanges===!0)throw _([d,g]);return[]}E===0&&(E=0),P===0&&(P=0);let O=E>P,U=String(d),x=String(g),H=String(v);v=Math.max(Math.abs(v),1);let D=o(U)||o(x)||o(H),I=D?Math.max(U.length,x.length,H.length):0,M=D===!1&&a(d,g,w)===!1,z=w.transform||n(M);if(w.toRegex&&v===1)return m(c(d,I),c(g,I),!0,w);let F={negatives:[],positives:[]},G=A=>F[A<0?"negatives":"positives"].push(Math.
38
+ abs(A)),Q=[],q=0;for(;O?E>=P:E<=P;)w.toRegex===!0&&v>1?G(E):Q.push(u(z(E,q),I,M)),E=O?E-v:E+v,q++;return w.toRegex===!0?v>1?l(F,w,I):y(Q,null,{wrap:!1,...w}):Q},h=(d,g,v=1,w={})=>{if(!s(d)&&d.length>1||!s(g)&&g.length>1)return S(d,g,w);let E=w.transform||(M=>String.fromCharCode(M)),P=`${d}`.charCodeAt(0),O=`${g}`.charCodeAt(0),U=P>O,x=Math.min(P,O),H=Math.max(P,O);if(w.toRegex&&v===1)return m(x,H,!1,w);let D=[],I=0;for(;U?P>=O:P<=O;)D.push(E(P,I)),P=U?P-v:P+v,I++;return w.toRegex===!0?y(D,null,{
39
+ wrap:!1,options:w}):D},f=(d,g,v,w={})=>{if(g==null&&i(d))return[d];if(!i(d)||!i(g))return S(d,g,w);if(typeof v=="function")return f(d,g,1,{transform:v});if(r(v))return f(d,g,0,v);let E={...w};return E.capture===!0&&(E.wrap=!0),v=v||E.step||1,s(v)?s(d)&&s(g)?p(d,g,v,E):h(d,g,Math.max(Math.abs(v),1),E):v!=null&&!r(v)?$(v,E):f(d,g,1,v)};return Un=f,Un}var Fn,ua;function Nd(){if(ua)return Fn;ua=1;const e=ca(),t=Dn();return Fn=(n,i={})=>{const s=(o,a={})=>{const u=t.isInvalidBrace(a),c=o.invalid===!0&&
40
+ i.escapeInvalid===!0,l=u===!0||c===!0,m=i.escapeInvalid===!0?"\\":"";let y="";if(o.isOpen===!0)return m+o.value;if(o.isClose===!0)return console.log("node.isClose",m,o.value),m+o.value;if(o.type==="open")return l?m+o.value:"(";if(o.type==="close")return l?m+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":l?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const _=t.reduce(o.nodes),S=e(..._,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(S.length!==0)return _.length>1&&S.
41
+ length>1?`(${S})`:S}if(o.nodes)for(const _ of o.nodes)y+=s(_,o);return y};return s(n)},Fn}var Vn,la;function Od(){if(la)return Vn;la=1;const e=ca(),t=xn(),r=Dn(),n=(s="",o="",a=!1)=>{const u=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return a?r.flatten(o).map(c=>`{${c}}`):o;for(const c of s)if(Array.isArray(c))for(const l of c)u.push(n(l,o,a));else for(let l of o)a===!0&&typeof l=="string"&&(l=`{${l}}`),u.push(Array.isArray(l)?n(c,l,a):c+l);return r.flatten(u)};return Vn=
42
+ (s,o={})=>{const a=o.rangeLimit===void 0?1e3:o.rangeLimit,u=(c,l={})=>{c.queue=[];let m=l,y=l.queue;for(;m.type!=="brace"&&m.type!=="root"&&m.parent;)m=m.parent,y=m.queue;if(c.invalid||c.dollar){y.push(n(y.pop(),t(c,o)));return}if(c.type==="brace"&&c.invalid!==!0&&c.nodes.length===2){y.push(n(y.pop(),["{}"]));return}if(c.nodes&&c.ranges>0){const p=r.reduce(c.nodes);if(r.exceedsLimit(...p,o.step,a))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase\
43
+ or disable the limit.");let h=e(...p,o);h.length===0&&(h=t(c,o)),y.push(n(y.pop(),h)),c.nodes=[];return}const _=r.encloseBrace(c);let S=c.queue,$=c;for(;$.type!=="brace"&&$.type!=="root"&&$.parent;)$=$.parent,S=$.queue;for(let p=0;p<c.nodes.length;p++){const h=c.nodes[p];if(h.type==="comma"&&c.type==="brace"){p===1&&S.push(""),S.push("");continue}if(h.type==="close"){y.push(n(y.pop(),S,_));continue}if(h.value&&h.type!=="open"){S.push(n(S.pop(),h.value));continue}h.nodes&&u(h,c)}return S};return r.
44
+ flatten(u(s))},Vn}var zn,fa;function Id(){return fa||(fa=1,zn={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\
44
45
  \f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
45
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),zn}var Gn,fa;function kd(){if(fa)return Gn;fa=1;const e=xn(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:c,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
46
- CHAR_LEFT_CURLY_BRACE:i,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:m,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:S,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=Od();return Gn=(h,f={})=>{if(typeof h!="string")throw new TypeError("Expected a string");const d=f||{},$=typeof d.maxLength=="number"?Math.min(t,d.maxLength):t;if(h.length>$)throw new SyntaxError(`Input length (${h.length}), exceeds max characters (${$})`);const v={type:"root",input:h,nodes:[]},w=[v];
47
- let E=v,P=v,k=0;const U=h.length;let q=0,H=0,D;const I=()=>h[q++],M=z=>{if(z.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&z.type==="text"){P.value+=z.value;return}return E.nodes.push(z),z.parent=E,z.prev=P,P=z,z};for(M({type:"bos"});q<U;)if(E=w[w.length-1],D=I(),!(D===g||D===S)){if(D===r){M({type:"text",value:(f.keepEscaping?D:"")+I()});continue}if(D===m){M({type:"text",value:"\\"+D});continue}if(D===l){k++;let z;for(;q<U&&(z=I());){if(D+=z,z===l){k++;continue}if(z===r){D+=
48
- I();continue}if(z===m&&(k--,k===0))break}M({type:"text",value:D});continue}if(D===o){E=M({type:"paren",nodes:[]}),w.push(E),M({type:"text",value:D});continue}if(D===a){if(E.type!=="paren"){M({type:"text",value:D});continue}E=w.pop(),M({type:"text",value:D}),E=w[w.length-1];continue}if(D===y||D===_||D===n){const z=D;let F;for(f.keepQuotes!==!0&&(D="");q<U&&(F=I());){if(F===r){D+=F+I();continue}if(F===z){f.keepQuotes===!0&&(D+=F);break}D+=F}M({type:"text",value:D});continue}if(D===i){H++;const F={
49
- type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||E.dollar===!0,depth:H,commas:0,ranges:0,nodes:[]};E=M(F),w.push(E),M({type:"open",value:D});continue}if(D===u){if(E.type!=="brace"){M({type:"text",value:D});continue}const z="close";E=w.pop(),E.close=!0,M({type:z,value:D}),H--,E=w[w.length-1];continue}if(D===c&&H>0){if(E.ranges>0){E.ranges=0;const z=E.nodes.shift();E.nodes=[z,{type:"text",value:e(E)}]}M({type:"comma",value:D}),E.commas++;continue}if(D===s&&H>0&&E.commas===0){
46
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),zn}var Gn,da;function jd(){if(da)return Gn;da=1;const e=xn(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,
47
+ CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:m,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:S,CHAR_ZERO_WIDTH_NOBREAK_SPACE:$}=Id();return Gn=(h,f={})=>{if(typeof h!="string")throw new TypeError("Expected a string");const d=f||{},g=typeof d.maxLength=="number"?Math.min(t,d.maxLength):t;if(h.length>g)throw new SyntaxError(`Input length (${h.length}), exceeds max characters (${g})`);const v={type:"root",input:h,nodes:[]},w=[v];
48
+ let E=v,P=v,O=0;const U=h.length;let x=0,H=0,D;const I=()=>h[x++],M=z=>{if(z.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&z.type==="text"){P.value+=z.value;return}return E.nodes.push(z),z.parent=E,z.prev=P,P=z,z};for(M({type:"bos"});x<U;)if(E=w[w.length-1],D=I(),!(D===$||D===S)){if(D===r){M({type:"text",value:(f.keepEscaping?D:"")+I()});continue}if(D===m){M({type:"text",value:"\\"+D});continue}if(D===l){O++;let z;for(;x<U&&(z=I());){if(D+=z,z===l){O++;continue}if(z===r){D+=
49
+ I();continue}if(z===m&&(O--,O===0))break}M({type:"text",value:D});continue}if(D===o){E=M({type:"paren",nodes:[]}),w.push(E),M({type:"text",value:D});continue}if(D===a){if(E.type!=="paren"){M({type:"text",value:D});continue}E=w.pop(),M({type:"text",value:D}),E=w[w.length-1];continue}if(D===y||D===_||D===n){const z=D;let F;for(f.keepQuotes!==!0&&(D="");x<U&&(F=I());){if(F===r){D+=F+I();continue}if(F===z){f.keepQuotes===!0&&(D+=F);break}D+=F}M({type:"text",value:D});continue}if(D===u){H++;const F={
50
+ type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||E.dollar===!0,depth:H,commas:0,ranges:0,nodes:[]};E=M(F),w.push(E),M({type:"open",value:D});continue}if(D===c){if(E.type!=="brace"){M({type:"text",value:D});continue}const z="close";E=w.pop(),E.close=!0,M({type:z,value:D}),H--,E=w[w.length-1];continue}if(D===i&&H>0){if(E.ranges>0){E.ranges=0;const z=E.nodes.shift();E.nodes=[z,{type:"text",value:e(E)}]}M({type:"comma",value:D}),E.commas++;continue}if(D===s&&H>0&&E.commas===0){
50
51
  const z=E.nodes;if(H===0||z.length===0){M({type:"text",value:D});continue}if(P.type==="dot"){if(E.range=[],P.value+=D,P.type="range",E.nodes.length!==3&&E.nodes.length!==5){E.invalid=!0,E.ranges=0,P.type="text";continue}E.ranges++,E.args=[];continue}if(P.type==="range"){z.pop();const F=z[z.length-1];F.value+=P.value+D,P=F,E.ranges--;continue}M({type:"dot",value:D});continue}M({type:"text",value:D})}do if(E=w.pop(),E.type!=="root"){E.nodes.forEach(G=>{G.nodes||(G.type==="open"&&(G.isOpen=!0),G.type===
51
- "close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});const z=w[w.length-1],F=z.nodes.indexOf(E);z.nodes.splice(F,1,...E.nodes)}while(w.length>0);return M({type:"eos"}),v},Gn}var Bn,da;function Id(){if(da)return Bn;da=1;const e=xn(),t=Td(),r=Nd(),n=kd(),c=(s,o={})=>{let a=[];if(Array.isArray(s))for(const i of s){const u=c.create(i,o);Array.isArray(u)?a.push(...u):a.push(u)}else a=[].concat(c.create(s,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return c.parse=(s,o={})=>n(
52
- s,o),c.stringify=(s,o={})=>e(typeof s=="string"?c.parse(s,o):s,o),c.compile=(s,o={})=>(typeof s=="string"&&(s=c.parse(s,o)),t(s,o)),c.expand=(s,o={})=>{typeof s=="string"&&(s=c.parse(s,o));let a=r(s,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},c.create=(s,o={})=>s===""||s.length<3?[s]:o.expand!==!0?c.compile(s,o):c.expand(s,o),Bn=c,Bn}var Kn={},Wn,pa;function Kt(){if(pa)return Wn;pa=1;const e=En,t="\\\\/",r=`[^${t}]`,n="\\.",c="\\+",s="\\?",o="\\/",a="(?\
53
- =.)",i="[^/]",u=`(?:${o}|$)`,l=`(?:^|${o})`,m=`${n}{1,2}${u}`,y=`(?!${n})`,_=`(?!${l}${m})`,S=`(?!${n}{0,1}${u})`,g=`(?!${m})`,p=`[^.${o}]`,h=`${i}*?`,f={DOT_LITERAL:n,PLUS_LITERAL:c,QMARK_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:i,END_ANCHOR:u,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:_,NO_DOT_SLASH:S,NO_DOTS_SLASH:g,QMARK_NO_DOT:p,STAR:h,START_ANCHOR:l},d={...f,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,
54
- NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`},$={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Wn={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:$,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
52
+ "close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});const z=w[w.length-1],F=z.nodes.indexOf(E);z.nodes.splice(F,1,...E.nodes)}while(w.length>0);return M({type:"eos"}),v},Gn}var Bn,pa;function Ld(){if(pa)return Bn;pa=1;const e=xn(),t=Nd(),r=Od(),n=jd(),i=(s,o={})=>{let a=[];if(Array.isArray(s))for(const u of s){const c=i.create(u,o);Array.isArray(c)?a.push(...c):a.push(c)}else a=[].concat(i.create(s,o));return o&&o.expand===!0&&o.nodupes===!0&&(a=[...new Set(a)]),a};return i.parse=(s,o={})=>n(
53
+ s,o),i.stringify=(s,o={})=>e(typeof s=="string"?i.parse(s,o):s,o),i.compile=(s,o={})=>(typeof s=="string"&&(s=i.parse(s,o)),t(s,o)),i.expand=(s,o={})=>{typeof s=="string"&&(s=i.parse(s,o));let a=r(s,o);return o.noempty===!0&&(a=a.filter(Boolean)),o.nodupes===!0&&(a=[...new Set(a)]),a},i.create=(s,o={})=>s===""||s.length<3?[s]:o.expand!==!0?i.compile(s,o):i.expand(s,o),Bn=i,Bn}var Kn={},Wn,ha;function Kt(){if(ha)return Wn;ha=1;const e=En,t="\\\\/",r=`[^${t}]`,n="\\.",i="\\+",s="\\?",o="\\/",a="(?\
54
+ =.)",u="[^/]",c=`(?:${o}|$)`,l=`(?:^|${o})`,m=`${n}{1,2}${c}`,y=`(?!${n})`,_=`(?!${l}${m})`,S=`(?!${n}{0,1}${c})`,$=`(?!${m})`,p=`[^.${o}]`,h=`${u}*?`,f={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,QMARK:u,END_ANCHOR:c,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:_,NO_DOT_SLASH:S,NO_DOTS_SLASH:$,QMARK_NO_DOT:p,STAR:h,START_ANCHOR:l},d={...f,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,
55
+ NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`},g={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Wn={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:g,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,
55
56
  REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,
56
57
  CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,
57
- CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:e.sep,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?d:f}},Wn}var ha;function Wt(){return ha||(ha=1,(function(e){const t=En,r=process.
58
- platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:c,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=Kt();e.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),e.hasRegexChars=a=>s.test(a),e.isRegexChar=a=>a.length===1&&e.hasRegexChars(a),e.escapeRegex=a=>a.replace(o,"\\$1"),e.toPosixSlashes=a=>a.replace(n,"/"),e.removeBackslashes=a=>a.replace(c,i=>i==="\\"?"":i),e.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||
59
- a[0]===8&&a[1]>=10},e.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||t.sep==="\\",e.escapeLast=(a,i,u)=>{const l=a.lastIndexOf(i,u);return l===-1?a:a[l-1]==="\\"?e.escapeLast(a,i,l-1):`${a.slice(0,l)}\\${a.slice(l)}`},e.removePrefix=(a,i={})=>{let u=a;return u.startsWith("./")&&(u=u.slice(2),i.prefix="./"),u},e.wrapOutput=(a,i={},u={})=>{const l=u.contains?"":"^",m=u.contains?"":"$";let y=`${l}(?:${a})${m}`;return i.negated===!0&&(y=`(?:^(?!${y}).*$)`),y}})(Kn)),Kn}var Xn,ma;function jd(){
60
- if(ma)return Xn;ma=1;const e=Wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:c,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:i,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:g}=Kt(),p=d=>d===a||d===n,h=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return Xn=(d,$)=>{const v=$||{},w=d.length-1,E=v.parts===!0||v.scanToEnd===!0,P=[],k=[],
61
- U=[];let q=d,H=-1,D=0,I=0,M=!1,z=!1,F=!1,G=!1,Q=!1,x=!1,A=!1,L=!1,N=!1,R=!1,b=0,C,B,K={value:"",depth:0,isGlob:!1};const ee=()=>H>=w,re=()=>q.charCodeAt(H+1),T=()=>(C=B,q.charCodeAt(++H));for(;H<w;){B=T();let J;if(B===n){A=K.backslashes=!0,B=T(),B===i&&(x=!0);continue}if(x===!0||B===i){for(b++;ee()!==!0&&(B=T());){if(B===n){A=K.backslashes=!0,T();continue}if(B===i){b++;continue}if(x!==!0&&B===s&&(B=T())===s){if(M=K.isBrace=!0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(x!==!0&&B===c){if(M=K.isBrace=
62
- !0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===_&&(b--,b===0)){x=!1,M=K.isBrace=!0,R=!0;break}}if(E===!0)continue;break}if(B===a){if(P.push(H),k.push(K),K={value:"",depth:0,isGlob:!1},R===!0)continue;if(C===s&&H===D+1){D+=2;continue}I=H+1;continue}if(v.noext!==!0&&(B===m||B===r||B===t||B===y||B===o)===!0&&re()===u){if(F=K.isGlob=!0,G=K.isExtglob=!0,R=!0,B===o&&H===D&&(N=!0),E===!0){for(;ee()!==!0&&(B=T());){if(B===n){A=K.backslashes=!0,B=T();continue}if(B===S){F=K.isGlob=!0,R=!0;break}}continue}
63
- break}if(B===t){if(C===t&&(Q=K.isGlobstar=!0),F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===y){if(F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===l){for(;ee()!==!0&&(J=T());){if(J===n){A=K.backslashes=!0,T();continue}if(J===g){z=K.isBracket=!0,F=K.isGlob=!0,R=!0;break}}if(E===!0)continue;break}if(v.nonegate!==!0&&B===o&&H===D){L=K.negated=!0,D++;continue}if(v.noparen!==!0&&B===u){if(F=K.isGlob=!0,E===!0){for(;ee()!==!0&&(B=T());){if(B===u){A=K.backslashes=!0,B=T();continue}if(B===S){R=!0;break}}
64
- continue}break}if(F===!0){if(R=!0,E===!0)continue;break}}v.noext===!0&&(G=!1,F=!1);let O=q,V="",X="";D>0&&(V=q.slice(0,D),q=q.slice(D),I-=D),O&&F===!0&&I>0?(O=q.slice(0,I),X=q.slice(I)):F===!0?(O="",X=q):O=q,O&&O!==""&&O!=="/"&&O!==q&&p(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),v.unescape===!0&&(X&&(X=e.removeBackslashes(X)),O&&A===!0&&(O=e.removeBackslashes(O)));const Z={prefix:V,input:d,start:D,base:O,glob:X,isBrace:M,isBracket:z,isGlob:F,isExtglob:G,isGlobstar:Q,negated:L,negatedExtglob:N};
65
- if(v.tokens===!0&&(Z.maxDepth=0,p(B)||k.push(K),Z.tokens=k),v.parts===!0||v.tokens===!0){let J;for(let ue=0;ue<P.length;ue++){const we=J?J+1:D,Y=P[ue],ne=d.slice(we,Y);v.tokens&&(ue===0&&D!==0?(k[ue].isPrefix=!0,k[ue].value=V):k[ue].value=ne,h(k[ue]),Z.maxDepth+=k[ue].depth),(ue!==0||ne!=="")&&U.push(ne),J=Y}if(J&&J+1<d.length){const ue=d.slice(J+1);U.push(ue),v.tokens&&(k[k.length-1].value=ue,h(k[k.length-1]),Z.maxDepth+=k[k.length-1].depth)}Z.slashes=P,Z.parts=U}return Z},Xn}var Jn,ya;function Ld(){
66
- if(ya)return Jn;ya=1;const e=Kt(),t=Wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=e,a=(l,m)=>{if(typeof m.expandRange=="function")return m.expandRange(...l,m);l.sort();const y=`[${l.join("-")}]`;try{new RegExp(y)}catch{return l.map(S=>t.escapeRegex(S)).join("..")}return y},i=(l,m)=>`Missing ${l}: "${m}" - use "\\\\${m}" to match literal characters`,u=(l,m)=>{if(typeof l!="string")throw new TypeError("Expected a string");l=o[l]||l;
67
- const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r;let S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);const g={type:"bos",value:"",output:y.prepend||""},p=[g],h=y.capture?"":"?:",f=t.isWindows(m),d=e.globChars(f),$=e.extglobChars(d),{DOT_LITERAL:v,PLUS_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:P,DOTS_SLASH:k,NO_DOT:U,NO_DOT_SLASH:q,NO_DOTS_SLASH:H,QMARK:D,QMARK_NO_DOT:I,STAR:M,START_ANCHOR:z}=d,F=Y=>`(${h}(?:(?!${z}${Y.dot?k:v}).\
68
- )*?)`,G=y.dot?"":U,Q=y.dot?D:I;let x=y.bash===!0?F(y):M;y.capture&&(x=`(${x})`),typeof y.noext=="boolean"&&(y.noextglob=y.noext);const A={input:l,index:-1,start:0,dot:y.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};l=t.removePrefix(l,A),S=l.length;const L=[],N=[],R=[];let b=g,C;const B=()=>A.index===S-1,K=A.peek=(Y=1)=>l[A.index+Y],ee=A.advance=()=>l[++A.index]||"",re=()=>l.slice(A.index+1),T=(Y="",ne=0)=>{A.consumed+=
69
- Y,A.index+=ne},O=Y=>{A.output+=Y.output!=null?Y.output:Y.value,T(Y.value)},V=()=>{let Y=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)ee(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},X=Y=>{A[Y]++,R.push(Y)},Z=Y=>{A[Y]--,R.pop()},J=Y=>{if(b.type==="globstar"){const ne=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),W=Y.extglob===!0||L.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!ne&&!W&&(A.output=A.output.slice(0,-b.output.length),b.type="star",
70
- b.value="*",b.output=x,A.output+=b.output)}if(L.length&&Y.type!=="paren"&&(L[L.length-1].inner+=Y.value),(Y.value||Y.output)&&O(Y),b&&b.type==="text"&&Y.type==="text"){b.value+=Y.value,b.output=(b.output||"")+Y.value;return}Y.prev=b,p.push(Y),b=Y},ue=(Y,ne)=>{const W={...$[ne],conditions:1,inner:""};W.prev=b,W.parens=A.parens,W.output=A.output;const te=(y.capture?"(":"")+W.open;X("parens"),J({type:Y,value:ne,output:A.output?"":P}),J({type:"paren",extglob:!0,value:ee(),output:te}),L.push(W)},we=Y=>{
71
- let ne=Y.close+(y.capture?")":""),W;if(Y.type==="negate"){let te=x;if(Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(te=F(y)),(te!==x||B()||/^\)+$/.test(re()))&&(ne=Y.close=`)$))${te}`),Y.inner.includes("*")&&(W=re())&&/^\.[^\\/.]+$/.test(W)){const le=u(W,{...m,fastpaths:!1}).output;ne=Y.close=`)${le})${te})`}Y.prev.type==="bos"&&(A.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:C,output:ne}),Z("parens")};if(y.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let Y=!1,ne=l.replace(s,(W,te,le,ye,he,xe)=>ye===
72
- "\\"?(Y=!0,W):ye==="?"?te?te+ye+(he?D.repeat(he.length):""):xe===0?Q+(he?D.repeat(he.length):""):D.repeat(le.length):ye==="."?v.repeat(le.length):ye==="*"?te?te+ye+(he?x:""):x:te?W:`\\${W}`);return Y===!0&&(y.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,W=>W.length%2===0?"\\\\":W?"\\":"")),ne===l&&y.contains===!0?(A.output=l,A):(A.output=t.wrapOutput(ne,A,m),A)}for(;!B();){if(C=ee(),C==="\0")continue;if(C==="\\"){const W=K();if(W==="/"&&y.bash!==!0||W==="."||W===";")continue;if(!W){
58
+ CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:e.sep,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?d:f}},Wn}var ma;function Wt(){return ma||(ma=1,(function(e){const t=En,r=process.
59
+ platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=Kt();e.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),e.hasRegexChars=a=>s.test(a),e.isRegexChar=a=>a.length===1&&e.hasRegexChars(a),e.escapeRegex=a=>a.replace(o,"\\$1"),e.toPosixSlashes=a=>a.replace(n,"/"),e.removeBackslashes=a=>a.replace(i,u=>u==="\\"?"":u),e.supportsLookbehinds=()=>{const a=process.version.slice(1).split(".").map(Number);return a.length===3&&a[0]>=9||
60
+ a[0]===8&&a[1]>=10},e.isWindows=a=>a&&typeof a.windows=="boolean"?a.windows:r===!0||t.sep==="\\",e.escapeLast=(a,u,c)=>{const l=a.lastIndexOf(u,c);return l===-1?a:a[l-1]==="\\"?e.escapeLast(a,u,l-1):`${a.slice(0,l)}\\${a.slice(l)}`},e.removePrefix=(a,u={})=>{let c=a;return c.startsWith("./")&&(c=c.slice(2),u.prefix="./"),c},e.wrapOutput=(a,u={},c={})=>{const l=c.contains?"":"^",m=c.contains?"":"$";let y=`${l}(?:${a})${m}`;return u.negated===!0&&(y=`(?:^(?!${y}).*$)`),y}})(Kn)),Kn}var Xn,ya;function Dd(){
61
+ if(ya)return Xn;ya=1;const e=Wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:$}=Kt(),p=d=>d===a||d===n,h=d=>{d.isPrefix!==!0&&(d.depth=d.isGlobstar?1/0:1)};return Xn=(d,g)=>{const v=g||{},w=d.length-1,E=v.parts===!0||v.scanToEnd===!0,P=[],O=[],
62
+ U=[];let x=d,H=-1,D=0,I=0,M=!1,z=!1,F=!1,G=!1,Q=!1,q=!1,A=!1,L=!1,T=!1,R=!1,b=0,C,B,K={value:"",depth:0,isGlob:!1};const ee=()=>H>=w,re=()=>x.charCodeAt(H+1),k=()=>(C=B,x.charCodeAt(++H));for(;H<w;){B=k();let J;if(B===n){A=K.backslashes=!0,B=k(),B===u&&(q=!0);continue}if(q===!0||B===u){for(b++;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,k();continue}if(B===u){b++;continue}if(q!==!0&&B===s&&(B=k())===s){if(M=K.isBrace=!0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(q!==!0&&B===i){if(M=K.isBrace=
63
+ !0,F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===_&&(b--,b===0)){q=!1,M=K.isBrace=!0,R=!0;break}}if(E===!0)continue;break}if(B===a){if(P.push(H),O.push(K),K={value:"",depth:0,isGlob:!1},R===!0)continue;if(C===s&&H===D+1){D+=2;continue}I=H+1;continue}if(v.noext!==!0&&(B===m||B===r||B===t||B===y||B===o)===!0&&re()===c){if(F=K.isGlob=!0,G=K.isExtglob=!0,R=!0,B===o&&H===D&&(T=!0),E===!0){for(;ee()!==!0&&(B=k());){if(B===n){A=K.backslashes=!0,B=k();continue}if(B===S){F=K.isGlob=!0,R=!0;break}}continue}
64
+ break}if(B===t){if(C===t&&(Q=K.isGlobstar=!0),F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===y){if(F=K.isGlob=!0,R=!0,E===!0)continue;break}if(B===l){for(;ee()!==!0&&(J=k());){if(J===n){A=K.backslashes=!0,k();continue}if(J===$){z=K.isBracket=!0,F=K.isGlob=!0,R=!0;break}}if(E===!0)continue;break}if(v.nonegate!==!0&&B===o&&H===D){L=K.negated=!0,D++;continue}if(v.noparen!==!0&&B===c){if(F=K.isGlob=!0,E===!0){for(;ee()!==!0&&(B=k());){if(B===c){A=K.backslashes=!0,B=k();continue}if(B===S){R=!0;break}}
65
+ continue}break}if(F===!0){if(R=!0,E===!0)continue;break}}v.noext===!0&&(G=!1,F=!1);let N=x,V="",X="";D>0&&(V=x.slice(0,D),x=x.slice(D),I-=D),N&&F===!0&&I>0?(N=x.slice(0,I),X=x.slice(I)):F===!0?(N="",X=x):N=x,N&&N!==""&&N!=="/"&&N!==x&&p(N.charCodeAt(N.length-1))&&(N=N.slice(0,-1)),v.unescape===!0&&(X&&(X=e.removeBackslashes(X)),N&&A===!0&&(N=e.removeBackslashes(N)));const Z={prefix:V,input:d,start:D,base:N,glob:X,isBrace:M,isBracket:z,isGlob:F,isExtglob:G,isGlobstar:Q,negated:L,negatedExtglob:T};
66
+ if(v.tokens===!0&&(Z.maxDepth=0,p(B)||O.push(K),Z.tokens=O),v.parts===!0||v.tokens===!0){let J;for(let ue=0;ue<P.length;ue++){const we=J?J+1:D,Y=P[ue],ne=d.slice(we,Y);v.tokens&&(ue===0&&D!==0?(O[ue].isPrefix=!0,O[ue].value=V):O[ue].value=ne,h(O[ue]),Z.maxDepth+=O[ue].depth),(ue!==0||ne!=="")&&U.push(ne),J=Y}if(J&&J+1<d.length){const ue=d.slice(J+1);U.push(ue),v.tokens&&(O[O.length-1].value=ue,h(O[O.length-1]),Z.maxDepth+=O[O.length-1].depth)}Z.slashes=P,Z.parts=U}return Z},Xn}var Jn,ga;function qd(){
67
+ if(ga)return Jn;ga=1;const e=Kt(),t=Wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=e,a=(l,m)=>{if(typeof m.expandRange=="function")return m.expandRange(...l,m);l.sort();const y=`[${l.join("-")}]`;try{new RegExp(y)}catch{return l.map(S=>t.escapeRegex(S)).join("..")}return y},u=(l,m)=>`Missing ${l}: "${m}" - use "\\\\${m}" to match literal characters`,c=(l,m)=>{if(typeof l!="string")throw new TypeError("Expected a string");l=o[l]||l;
68
+ const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r;let S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);const $={type:"bos",value:"",output:y.prepend||""},p=[$],h=y.capture?"":"?:",f=t.isWindows(m),d=e.globChars(f),g=e.extglobChars(d),{DOT_LITERAL:v,PLUS_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:P,DOTS_SLASH:O,NO_DOT:U,NO_DOT_SLASH:x,NO_DOTS_SLASH:H,QMARK:D,QMARK_NO_DOT:I,STAR:M,START_ANCHOR:z}=d,F=Y=>`(${h}(?:(?!${z}${Y.dot?O:v}).\
69
+ )*?)`,G=y.dot?"":U,Q=y.dot?D:I;let q=y.bash===!0?F(y):M;y.capture&&(q=`(${q})`),typeof y.noext=="boolean"&&(y.noextglob=y.noext);const A={input:l,index:-1,start:0,dot:y.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};l=t.removePrefix(l,A),S=l.length;const L=[],T=[],R=[];let b=$,C;const B=()=>A.index===S-1,K=A.peek=(Y=1)=>l[A.index+Y],ee=A.advance=()=>l[++A.index]||"",re=()=>l.slice(A.index+1),k=(Y="",ne=0)=>{A.consumed+=
70
+ Y,A.index+=ne},N=Y=>{A.output+=Y.output!=null?Y.output:Y.value,k(Y.value)},V=()=>{let Y=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)ee(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},X=Y=>{A[Y]++,R.push(Y)},Z=Y=>{A[Y]--,R.pop()},J=Y=>{if(b.type==="globstar"){const ne=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),W=Y.extglob===!0||L.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!ne&&!W&&(A.output=A.output.slice(0,-b.output.length),b.type="star",
71
+ b.value="*",b.output=q,A.output+=b.output)}if(L.length&&Y.type!=="paren"&&(L[L.length-1].inner+=Y.value),(Y.value||Y.output)&&N(Y),b&&b.type==="text"&&Y.type==="text"){b.value+=Y.value,b.output=(b.output||"")+Y.value;return}Y.prev=b,p.push(Y),b=Y},ue=(Y,ne)=>{const W={...g[ne],conditions:1,inner:""};W.prev=b,W.parens=A.parens,W.output=A.output;const te=(y.capture?"(":"")+W.open;X("parens"),J({type:Y,value:ne,output:A.output?"":P}),J({type:"paren",extglob:!0,value:ee(),output:te}),L.push(W)},we=Y=>{
72
+ let ne=Y.close+(y.capture?")":""),W;if(Y.type==="negate"){let te=q;if(Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(te=F(y)),(te!==q||B()||/^\)+$/.test(re()))&&(ne=Y.close=`)$))${te}`),Y.inner.includes("*")&&(W=re())&&/^\.[^\\/.]+$/.test(W)){const le=c(W,{...m,fastpaths:!1}).output;ne=Y.close=`)${le})${te})`}Y.prev.type==="bos"&&(A.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:C,output:ne}),Z("parens")};if(y.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(l)){let Y=!1,ne=l.replace(s,(W,te,le,ye,he,Me)=>ye===
73
+ "\\"?(Y=!0,W):ye==="?"?te?te+ye+(he?D.repeat(he.length):""):Me===0?Q+(he?D.repeat(he.length):""):D.repeat(le.length):ye==="."?v.repeat(le.length):ye==="*"?te?te+ye+(he?q:""):q:te?W:`\\${W}`);return Y===!0&&(y.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,W=>W.length%2===0?"\\\\":W?"\\":"")),ne===l&&y.contains===!0?(A.output=l,A):(A.output=t.wrapOutput(ne,A,m),A)}for(;!B();){if(C=ee(),C==="\0")continue;if(C==="\\"){const W=K();if(W==="/"&&y.bash!==!0||W==="."||W===";")continue;if(!W){
73
74
  C+="\\",J({type:"text",value:C});continue}const te=/^\\+/.exec(re());let le=0;if(te&&te[0].length>2&&(le=te[0].length,A.index+=le,le%2!==0&&(C+="\\")),y.unescape===!0?C=ee():C+=ee(),A.brackets===0){J({type:"text",value:C});continue}}if(A.brackets>0&&(C!=="]"||b.value==="["||b.value==="[^")){if(y.posix!==!1&&C===":"){const W=b.value.slice(1);if(W.includes("[")&&(b.posix=!0,W.includes(":"))){const te=b.value.lastIndexOf("["),le=b.value.slice(0,te),ye=b.value.slice(te+2),he=n[ye];if(he){b.value=le+
74
- he,A.backtrack=!0,ee(),!g.output&&p.indexOf(b)===1&&(g.output=P);continue}}}(C==="["&&K()!==":"||C==="-"&&K()==="]")&&(C=`\\${C}`),C==="]"&&(b.value==="["||b.value==="[^")&&(C=`\\${C}`),y.posix===!0&&C==="!"&&b.value==="["&&(C="^"),b.value+=C,O({value:C});continue}if(A.quotes===1&&C!=='"'){C=t.escapeRegex(C),b.value+=C,O({value:C});continue}if(C==='"'){A.quotes=A.quotes===1?0:1,y.keepQuotes===!0&&J({type:"text",value:C});continue}if(C==="("){X("parens"),J({type:"paren",value:C});continue}if(C===
75
- ")"){if(A.parens===0&&y.strictBrackets===!0)throw new SyntaxError(i("opening","("));const W=L[L.length-1];if(W&&A.parens===W.parens+1){we(L.pop());continue}J({type:"paren",value:C,output:A.parens?")":"\\)"}),Z("parens");continue}if(C==="["){if(y.nobracket===!0||!re().includes("]")){if(y.nobracket!==!0&&y.strictBrackets===!0)throw new SyntaxError(i("closing","]"));C=`\\${C}`}else X("brackets");J({type:"bracket",value:C});continue}if(C==="]"){if(y.nobracket===!0||b&&b.type==="bracket"&&b.value.length===
76
- 1){J({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(y.strictBrackets===!0)throw new SyntaxError(i("opening","["));J({type:"text",value:C,output:`\\${C}`});continue}Z("brackets");const W=b.value.slice(1);if(b.posix!==!0&&W[0]==="^"&&!W.includes("/")&&(C=`/${C}`),b.value+=C,O({value:C}),y.literalBrackets===!1||t.hasRegexChars(W))continue;const te=t.escapeRegex(b.value);if(A.output=A.output.slice(0,-b.value.length),y.literalBrackets===!0){A.output+=te,b.value=te;continue}b.value=
77
- `(${h}${te}|${b.value})`,A.output+=b.value;continue}if(C==="{"&&y.nobrace!==!0){X("braces");const W={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};N.push(W),J(W);continue}if(C==="}"){const W=N[N.length-1];if(y.nobrace===!0||!W){J({type:"text",value:C,output:C});continue}let te=")";if(W.dots===!0){const le=p.slice(),ye=[];for(let he=le.length-1;he>=0&&(p.pop(),le[he].type!=="brace");he--)le[he].type!=="dots"&&ye.unshift(le[he].value);te=a(ye,y),A.backtrack=
78
- !0}if(W.comma!==!0&&W.dots!==!0){const le=A.output.slice(0,W.outputIndex),ye=A.tokens.slice(W.tokensIndex);W.value=W.output="\\{",C=te="\\}",A.output=le;for(const he of ye)A.output+=he.output||he.value}J({type:"brace",value:C,output:te}),Z("braces"),N.pop();continue}if(C==="|"){L.length>0&&L[L.length-1].conditions++,J({type:"text",value:C});continue}if(C===","){let W=C;const te=N[N.length-1];te&&R[R.length-1]==="braces"&&(te.comma=!0,W="|"),J({type:"comma",value:C,output:W});continue}if(C==="/"){
79
- if(b.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",p.pop(),b=g;continue}J({type:"slash",value:C,output:E});continue}if(C==="."){if(A.braces>0&&b.type==="dot"){b.value==="."&&(b.output=v);const W=N[N.length-1];b.type="dots",b.output+=C,b.value+=C,W.dots=!0;continue}if(A.braces+A.parens===0&&b.type!=="bos"&&b.type!=="slash"){J({type:"text",value:C,output:v});continue}J({type:"dot",value:C,output:v});continue}if(C==="?"){if(!(b&&b.value==="(")&&y.noextglob!==!0&&K()===
75
+ he,A.backtrack=!0,ee(),!$.output&&p.indexOf(b)===1&&($.output=P);continue}}}(C==="["&&K()!==":"||C==="-"&&K()==="]")&&(C=`\\${C}`),C==="]"&&(b.value==="["||b.value==="[^")&&(C=`\\${C}`),y.posix===!0&&C==="!"&&b.value==="["&&(C="^"),b.value+=C,N({value:C});continue}if(A.quotes===1&&C!=='"'){C=t.escapeRegex(C),b.value+=C,N({value:C});continue}if(C==='"'){A.quotes=A.quotes===1?0:1,y.keepQuotes===!0&&J({type:"text",value:C});continue}if(C==="("){X("parens"),J({type:"paren",value:C});continue}if(C===
76
+ ")"){if(A.parens===0&&y.strictBrackets===!0)throw new SyntaxError(u("opening","("));const W=L[L.length-1];if(W&&A.parens===W.parens+1){we(L.pop());continue}J({type:"paren",value:C,output:A.parens?")":"\\)"}),Z("parens");continue}if(C==="["){if(y.nobracket===!0||!re().includes("]")){if(y.nobracket!==!0&&y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));C=`\\${C}`}else X("brackets");J({type:"bracket",value:C});continue}if(C==="]"){if(y.nobracket===!0||b&&b.type==="bracket"&&b.value.length===
77
+ 1){J({type:"text",value:C,output:`\\${C}`});continue}if(A.brackets===0){if(y.strictBrackets===!0)throw new SyntaxError(u("opening","["));J({type:"text",value:C,output:`\\${C}`});continue}Z("brackets");const W=b.value.slice(1);if(b.posix!==!0&&W[0]==="^"&&!W.includes("/")&&(C=`/${C}`),b.value+=C,N({value:C}),y.literalBrackets===!1||t.hasRegexChars(W))continue;const te=t.escapeRegex(b.value);if(A.output=A.output.slice(0,-b.value.length),y.literalBrackets===!0){A.output+=te,b.value=te;continue}b.value=
78
+ `(${h}${te}|${b.value})`,A.output+=b.value;continue}if(C==="{"&&y.nobrace!==!0){X("braces");const W={type:"brace",value:C,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};T.push(W),J(W);continue}if(C==="}"){const W=T[T.length-1];if(y.nobrace===!0||!W){J({type:"text",value:C,output:C});continue}let te=")";if(W.dots===!0){const le=p.slice(),ye=[];for(let he=le.length-1;he>=0&&(p.pop(),le[he].type!=="brace");he--)le[he].type!=="dots"&&ye.unshift(le[he].value);te=a(ye,y),A.backtrack=
79
+ !0}if(W.comma!==!0&&W.dots!==!0){const le=A.output.slice(0,W.outputIndex),ye=A.tokens.slice(W.tokensIndex);W.value=W.output="\\{",C=te="\\}",A.output=le;for(const he of ye)A.output+=he.output||he.value}J({type:"brace",value:C,output:te}),Z("braces"),T.pop();continue}if(C==="|"){L.length>0&&L[L.length-1].conditions++,J({type:"text",value:C});continue}if(C===","){let W=C;const te=T[T.length-1];te&&R[R.length-1]==="braces"&&(te.comma=!0,W="|"),J({type:"comma",value:C,output:W});continue}if(C==="/"){
80
+ if(b.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",p.pop(),b=$;continue}J({type:"slash",value:C,output:E});continue}if(C==="."){if(A.braces>0&&b.type==="dot"){b.value==="."&&(b.output=v);const W=T[T.length-1];b.type="dots",b.output+=C,b.value+=C,W.dots=!0;continue}if(A.braces+A.parens===0&&b.type!=="bos"&&b.type!=="slash"){J({type:"text",value:C,output:v});continue}J({type:"dot",value:C,output:v});continue}if(C==="?"){if(!(b&&b.value==="(")&&y.noextglob!==!0&&K()===
80
81
  "("&&K(2)!=="?"){ue("qmark",C);continue}if(b&&b.type==="paren"){const te=K();let le=C;if(te==="<"&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(b.value==="("&&!/[!=<:]/.test(te)||te==="<"&&!/<([!=]|\w+>)/.test(re()))&&(le=`\\${C}`),J({type:"text",value:C,output:le});continue}if(y.dot!==!0&&(b.type==="slash"||b.type==="bos")){J({type:"qmark",value:C,output:I});continue}J({type:"qmark",value:C,output:D});continue}if(C==="!"){if(y.noextglob!==
81
82
  !0&&K()==="("&&(K(2)!=="?"||!/[!=<:]/.test(K(3)))){ue("negate",C);continue}if(y.nonegate!==!0&&A.index===0){V();continue}}if(C==="+"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){ue("plus",C);continue}if(b&&b.value==="("||y.regex===!1){J({type:"plus",value:C,output:w});continue}if(b&&(b.type==="bracket"||b.type==="paren"||b.type==="brace")||A.parens>0){J({type:"plus",value:C});continue}J({type:"plus",value:w});continue}if(C==="@"){if(y.noextglob!==!0&&K()==="("&&K(2)!=="?"){J({type:"at",extglob:!0,
82
- value:C,output:""});continue}J({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const W=c.exec(re());W&&(C+=W[0],A.index+=W[0].length),J({type:"text",value:C});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=C,b.output=x,A.backtrack=!0,A.globstar=!0,T(C);continue}let Y=re();if(y.noextglob!==!0&&/^\([^?]/.test(Y)){ue("star",C);continue}if(b.type==="star"){if(y.noglobstar===!0){T(C);continue}const W=b.prev,te=W.prev,le=W.type==="slash"||
83
- W.type==="bos",ye=te&&(te.type==="star"||te.type==="globstar");if(y.bash===!0&&(!le||Y[0]&&Y[0]!=="/")){J({type:"star",value:C,output:""});continue}const he=A.braces>0&&(W.type==="comma"||W.type==="brace"),xe=L.length&&(W.type==="pipe"||W.type==="paren");if(!le&&W.type!=="paren"&&!he&&!xe){J({type:"star",value:C,output:""});continue}for(;Y.slice(0,3)==="/**";){const Be=l[A.index+4];if(Be&&Be!=="/")break;Y=Y.slice(3),T("/**",3)}if(W.type==="bos"&&B()){b.type="globstar",b.value+=C,b.output=F(y),A.
84
- output=b.output,A.globstar=!0,T(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&!ye&&B()){A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=F(y)+(y.strictSlashes?")":"|$)"),b.value+=C,A.globstar=!0,A.output+=W.output+b.output,T(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&Y[0]==="/"){const Be=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=`${F(
85
- y)}${E}|${E}${Be})`,b.value+=C,A.output+=W.output+b.output,A.globstar=!0,T(C+ee()),J({type:"slash",value:"/",output:""});continue}if(W.type==="bos"&&Y[0]==="/"){b.type="globstar",b.value+=C,b.output=`(?:^|${E}|${F(y)}${E})`,A.output=b.output,A.globstar=!0,T(C+ee()),J({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-b.output.length),b.type="globstar",b.output=F(y),b.value+=C,A.output+=b.output,A.globstar=!0,T(C);continue}const ne={type:"star",value:C,output:x};if(y.bash===!0){
86
- ne.output=".*?",(b.type==="bos"||b.type==="slash")&&(ne.output=G+ne.output),J(ne);continue}if(b&&(b.type==="bracket"||b.type==="paren")&&y.regex===!0){ne.output=C,J(ne);continue}(A.index===A.start||b.type==="slash"||b.type==="dot")&&(b.type==="dot"?(A.output+=q,b.output+=q):y.dot===!0?(A.output+=H,b.output+=H):(A.output+=G,b.output+=G),K()!=="*"&&(A.output+=P,b.output+=P)),J(ne)}for(;A.brackets>0;){if(y.strictBrackets===!0)throw new SyntaxError(i("closing","]"));A.output=t.escapeLast(A.output,"["),
87
- Z("brackets")}for(;A.parens>0;){if(y.strictBrackets===!0)throw new SyntaxError(i("closing",")"));A.output=t.escapeLast(A.output,"("),Z("parens")}for(;A.braces>0;){if(y.strictBrackets===!0)throw new SyntaxError(i("closing","}"));A.output=t.escapeLast(A.output,"{"),Z("braces")}if(y.strictSlashes!==!0&&(b.type==="star"||b.type==="bracket")&&J({type:"maybe_slash",value:"",output:`${E}?`}),A.backtrack===!0){A.output="";for(const Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=
88
- Y.suffix)}return A};return u.fastpaths=(l,m)=>{const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r,S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);l=o[l]||l;const g=t.isWindows(m),{DOT_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:$,NO_DOTS:v,NO_DOTS_SLASH:w,STAR:E,START_ANCHOR:P}=e.globChars(g),k=y.dot?v:$,U=y.dot?w:$,q=y.capture?"":"?:",H={negated:!1,prefix:""};let D=y.bash===!0?".*?":E;y.capture&&(D=`(${D})`);const I=G=>G.
89
- noglobstar===!0?D:`(${q}(?:(?!${P}${G.dot?d:p}).)*?)`,M=G=>{switch(G){case"*":return`${k}${f}${D}`;case".*":return`${p}${f}${D}`;case"*.*":return`${k}${D}${p}${f}${D}`;case"*/*":return`${k}${D}${h}${f}${U}${D}`;case"**":return k+I(y);case"**/*":return`(?:${k}${I(y)}${h})?${U}${f}${D}`;case"**/*.*":return`(?:${k}${I(y)}${h})?${U}${D}${p}${f}${D}`;case"**/.*":return`(?:${k}${I(y)}${h})?${p}${f}${D}`;default:{const Q=/^(.*?)\.(\w+)$/.exec(G);if(!Q)return;const x=M(Q[1]);return x?x+p+Q[2]:void 0}}},
90
- z=t.removePrefix(l,H);let F=M(z);return F&&y.strictSlashes!==!0&&(F+=`${h}?`),F},Jn=u,Jn}var Yn,ga;function Dd(){if(ga)return Yn;ga=1;const e=En,t=jd(),r=Ld(),n=Wt(),c=Kt(),s=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,i,u=!1)=>{if(Array.isArray(a)){const h=a.map(d=>o(d,i,u));return d=>{for(const $ of h){const v=$(d);if(v)return v}return!1}}const l=s(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!l)throw new TypeError("Expected pattern to be a non-empty string");const m=i||{},y=n.isWindows(
91
- i),_=l?o.compileRe(a,i):o.makeRe(a,i,!1,!0),S=_.state;delete _.state;let g=()=>!1;if(m.ignore){const h={...i,ignore:null,onMatch:null,onResult:null};g=o(m.ignore,h,u)}const p=(h,f=!1)=>{const{isMatch:d,match:$,output:v}=o.test(h,_,i,{glob:a,posix:y}),w={glob:a,state:S,regex:_,posix:y,input:h,output:v,match:$,isMatch:d};return typeof m.onResult=="function"&&m.onResult(w),d===!1?(w.isMatch=!1,f?w:!1):g(h)?(typeof m.onIgnore=="function"&&m.onIgnore(w),w.isMatch=!1,f?w:!1):(typeof m.onMatch=="functi\
92
- on"&&m.onMatch(w),f?w:!0)};return u&&(p.state=S),p};return o.test=(a,i,u,{glob:l,posix:m}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const y=u||{},_=y.format||(m?n.toPosixSlashes:null);let S=a===l,g=S&&_?_(a):a;return S===!1&&(g=_?_(a):a,S=g===l),(S===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?S=o.matchBase(a,i,u,m):S=i.exec(g)),{isMatch:!!S,match:S,output:g}},o.matchBase=(a,i,u,l=n.isWindows(u))=>(i instanceof
93
- RegExp?i:o.makeRe(i,u)).test(e.basename(a)),o.isMatch=(a,i,u)=>o(i,u)(a),o.parse=(a,i)=>Array.isArray(a)?a.map(u=>o.parse(u,i)):r(a,{...i,fastpaths:!1}),o.scan=(a,i)=>t(a,i),o.compileRe=(a,i,u=!1,l=!1)=>{if(u===!0)return a.output;const m=i||{},y=m.contains?"":"^",_=m.contains?"":"$";let S=`${y}(?:${a.output})${_}`;a&&a.negated===!0&&(S=`^(?!${S}).*$`);const g=o.toRegex(S,i);return l===!0&&(g.state=a),g},o.makeRe=(a,i={},u=!1,l=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-e\
94
- mpty string");let m={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(m.output=r.fastpaths(a,i)),m.output||(m=r(a,i)),o.compileRe(m,i,u,l)},o.toRegex=(a,i)=>{try{const u=i||{};return new RegExp(a,u.flags||(u.nocase?"i":""))}catch(u){if(i&&i.debug===!0)throw u;return/$^/}},o.constants=c,Yn=o,Yn}var Qn,$a;function qd(){return $a||($a=1,Qn=Dd()),Qn}var Zn,va;function xd(){if(va)return Zn;va=1;const e=Bo,t=Id(),r=qd(),n=Wt(),c=a=>a===""||a==="./",s=a=>{const i=a.indexOf("\
95
- {");return i>-1&&a.indexOf("}",i)>-1},o=(a,i,u)=>{i=[].concat(i),a=[].concat(a);let l=new Set,m=new Set,y=new Set,_=0,S=h=>{y.add(h.output),u&&u.onResult&&u.onResult(h)};for(let h=0;h<i.length;h++){let f=r(String(i[h]),{...u,onResult:S},!0),d=f.state.negated||f.state.negatedExtglob;d&&_++;for(let $ of a){let v=f($,!0);(d?!v.isMatch:v.isMatch)&&(d?l.add(v.output):(l.delete(v.output),m.add(v.output)))}}let p=(_===i.length?[...y]:[...m]).filter(h=>!l.has(h));if(u&&p.length===0){if(u.failglob===!0)throw new Error(
96
- `No matches found for "${i.join(", ")}"`);if(u.nonull===!0||u.nullglob===!0)return u.unescape?i.map(h=>h.replace(/\\/g,"")):i}return p};return o.match=o,o.matcher=(a,i)=>r(a,i),o.isMatch=(a,i,u)=>r(i,u)(a),o.any=o.isMatch,o.not=(a,i,u={})=>{i=[].concat(i).map(String);let l=new Set,m=[],y=S=>{u.onResult&&u.onResult(S),m.push(S.output)},_=new Set(o(a,i,{...u,onResult:y}));for(let S of m)_.has(S)||l.add(S);return[...l]},o.contains=(a,i,u)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
97
- ng: "${e.inspect(a)}"`);if(Array.isArray(i))return i.some(l=>o.contains(a,l,u));if(typeof i=="string"){if(c(a)||c(i))return!1;if(a.includes(i)||a.startsWith("./")&&a.slice(2).includes(i))return!0}return o.isMatch(a,i,{...u,contains:!0})},o.matchKeys=(a,i,u)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let l=o(Object.keys(a),i,u),m={};for(let y of l)m[y]=a[y];return m},o.some=(a,i,u)=>{let l=[].concat(a);for(let m of[].concat(i)){let y=r(String(m),u);if(l.
98
- some(_=>y(_)))return!0}return!1},o.every=(a,i,u)=>{let l=[].concat(a);for(let m of[].concat(i)){let y=r(String(m),u);if(!l.every(_=>y(_)))return!1}return!0},o.all=(a,i,u)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${e.inspect(a)}"`);return[].concat(i).every(l=>r(l,u)(a))},o.capture=(a,i,u)=>{let l=n.isWindows(u),y=r.makeRe(String(a),{...u,capture:!0}).exec(l?n.toPosixSlashes(i):i);if(y)return y.slice(1).map(_=>_===void 0?"":_)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
99
- scan(...a),o.parse=(a,i)=>{let u=[];for(let l of[].concat(a||[]))for(let m of t(String(l),i))u.push(r.parse(m,i));return u},o.braces=(a,i)=>{if(typeof a!="string")throw new TypeError("Expected a string");return i&&i.nobrace===!0||!s(a)?[a]:t(a,i)},o.braceExpand=(a,i)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...i,expand:!0})},o.hasBraces=s,Zn=o,Zn}var Md=xd();const _a=mn(Md),Hd={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
100
- function Ud(e,t,r,n=!1){const c=t.replaceAll(".","\\."),s=new RegExp(`<script([^>]*?) src="(?:[^"]*?/)?${c}"([^>]*)></script>`),o=/"?__VITE_PRELOAD__"?/g,a=r.replace(o,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),i=e.replace(s,(u,l,m)=>`<script${l}${m}>${a.trim()}</script>`);return n?Kd(i):i}function Fd(e,t,r){const n=t.replaceAll(".","\\."),c=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),s=r.replace('@charset "UTF-8";',"");return e.replace(c,(a,i,u)=>`<style${i}${u}>${s.trim()}\
101
- </style>`)}const Vd=/\.[mc]?js$/,zd=/\.css$/,Gd=/\.html?$/;function Bd({useRecommendedBuildConfig:e=!0,removeViteModuleLoader:t=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=Hd){return{name:"vite:singlefile",config:e?Wd:void 0,enforce:"post",generateBundle(c,s){const o=u=>this.info(`NOTE: asset not inlined: ${u}`);this.info(`
102
- `);const a={html:[],css:[],js:[],other:[]};for(const u of Object.keys(s))Gd.test(u)?a.html.push(u):zd.test(u)?a.css.push(u):Vd.test(u)?a.js.push(u):a.other.push(u);const i=[];for(const u of a.html){const l=s[u];let m=l.source;for(const y of a.js){if(r.length&&!_a.isMatch(y,r)){o(y);continue}const _=s[y];_.code!=null&&(this.info(`Inlining: ${y}`),i.push(y),m=Ud(m,_.fileName,_.code,t))}for(const y of a.css){if(r.length&&!_a.isMatch(y,r)){o(y);continue}const _=s[y];this.info(`Inlining: ${y}`),i.push(
103
- y),m=Fd(m,_.fileName,_.source)}l.source=m}if(n)for(const u of i)delete s[u];for(const u of a.other)o(u)}}}const Kd=e=>e.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Wd=e=>{e.build||(e.build={}),e.build.assetsInlineLimit=()=>!0,e.build.chunkSizeWarningLimit=1e8,e.build.cssCodeSplit=!1,e.base="./",e.build.assetsDir="",e.build.rollupOptions||(e.build.rollupOptions={}),e.build.rollupOptions.output||(e.build.rollupOptions.
104
- output={});const t=r=>{r.inlineDynamicImports=!0};if(Array.isArray(e.build.rollupOptions.output))for(const r of e.build.rollupOptions.output)t(r);else t(e.build.rollupOptions.output)};function ft(e){return e.length===0?"never":e.sort(pd).map(t=>` | ${JSON.stringify(t)}`).join(`
105
- `).trimStart()}function wa(e){const t=Oo(e);return t.length===0?"never":ko(t,hd,Tf(r=>` | ${JSON.stringify(r.id)}`)).join(`
106
- `).trimStart()}function ba(e){return`
107
- import type { Aux, SpecAux } from '@likec4/core/types';
83
+ value:C,output:""});continue}J({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);const W=i.exec(re());W&&(C+=W[0],A.index+=W[0].length),J({type:"text",value:C});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=C,b.output=q,A.backtrack=!0,A.globstar=!0,k(C);continue}let Y=re();if(y.noextglob!==!0&&/^\([^?]/.test(Y)){ue("star",C);continue}if(b.type==="star"){if(y.noglobstar===!0){k(C);continue}const W=b.prev,te=W.prev,le=W.type==="slash"||
84
+ W.type==="bos",ye=te&&(te.type==="star"||te.type==="globstar");if(y.bash===!0&&(!le||Y[0]&&Y[0]!=="/")){J({type:"star",value:C,output:""});continue}const he=A.braces>0&&(W.type==="comma"||W.type==="brace"),Me=L.length&&(W.type==="pipe"||W.type==="paren");if(!le&&W.type!=="paren"&&!he&&!Me){J({type:"star",value:C,output:""});continue}for(;Y.slice(0,3)==="/**";){const Ke=l[A.index+4];if(Ke&&Ke!=="/")break;Y=Y.slice(3),k("/**",3)}if(W.type==="bos"&&B()){b.type="globstar",b.value+=C,b.output=F(y),A.
85
+ output=b.output,A.globstar=!0,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&!ye&&B()){A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=F(y)+(y.strictSlashes?")":"|$)"),b.value+=C,A.globstar=!0,A.output+=W.output+b.output,k(C);continue}if(W.type==="slash"&&W.prev.type!=="bos"&&Y[0]==="/"){const Ke=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(W.output+b.output).length),W.output=`(?:${W.output}`,b.type="globstar",b.output=`${F(
86
+ y)}${E}|${E}${Ke})`,b.value+=C,A.output+=W.output+b.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}if(W.type==="bos"&&Y[0]==="/"){b.type="globstar",b.value+=C,b.output=`(?:^|${E}|${F(y)}${E})`,A.output=b.output,A.globstar=!0,k(C+ee()),J({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-b.output.length),b.type="globstar",b.output=F(y),b.value+=C,A.output+=b.output,A.globstar=!0,k(C);continue}const ne={type:"star",value:C,output:q};if(y.bash===!0){
87
+ ne.output=".*?",(b.type==="bos"||b.type==="slash")&&(ne.output=G+ne.output),J(ne);continue}if(b&&(b.type==="bracket"||b.type==="paren")&&y.regex===!0){ne.output=C,J(ne);continue}(A.index===A.start||b.type==="slash"||b.type==="dot")&&(b.type==="dot"?(A.output+=x,b.output+=x):y.dot===!0?(A.output+=H,b.output+=H):(A.output+=G,b.output+=G),K()!=="*"&&(A.output+=P,b.output+=P)),J(ne)}for(;A.brackets>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","]"));A.output=t.escapeLast(A.output,"["),
88
+ Z("brackets")}for(;A.parens>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing",")"));A.output=t.escapeLast(A.output,"("),Z("parens")}for(;A.braces>0;){if(y.strictBrackets===!0)throw new SyntaxError(u("closing","}"));A.output=t.escapeLast(A.output,"{"),Z("braces")}if(y.strictSlashes!==!0&&(b.type==="star"||b.type==="bracket")&&J({type:"maybe_slash",value:"",output:`${E}?`}),A.backtrack===!0){A.output="";for(const Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=
89
+ Y.suffix)}return A};return c.fastpaths=(l,m)=>{const y={...m},_=typeof y.maxLength=="number"?Math.min(r,y.maxLength):r,S=l.length;if(S>_)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${_}`);l=o[l]||l;const $=t.isWindows(m),{DOT_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:g,NO_DOTS:v,NO_DOTS_SLASH:w,STAR:E,START_ANCHOR:P}=e.globChars($),O=y.dot?v:g,U=y.dot?w:g,x=y.capture?"":"?:",H={negated:!1,prefix:""};let D=y.bash===!0?".*?":E;y.capture&&(D=`(${D})`);const I=G=>G.
90
+ noglobstar===!0?D:`(${x}(?:(?!${P}${G.dot?d:p}).)*?)`,M=G=>{switch(G){case"*":return`${O}${f}${D}`;case".*":return`${p}${f}${D}`;case"*.*":return`${O}${D}${p}${f}${D}`;case"*/*":return`${O}${D}${h}${f}${U}${D}`;case"**":return O+I(y);case"**/*":return`(?:${O}${I(y)}${h})?${U}${f}${D}`;case"**/*.*":return`(?:${O}${I(y)}${h})?${U}${D}${p}${f}${D}`;case"**/.*":return`(?:${O}${I(y)}${h})?${p}${f}${D}`;default:{const Q=/^(.*?)\.(\w+)$/.exec(G);if(!Q)return;const q=M(Q[1]);return q?q+p+Q[2]:void 0}}},
91
+ z=t.removePrefix(l,H);let F=M(z);return F&&y.strictSlashes!==!0&&(F+=`${h}?`),F},Jn=c,Jn}var Yn,$a;function xd(){if($a)return Yn;$a=1;const e=En,t=Dd(),r=qd(),n=Wt(),i=Kt(),s=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,u,c=!1)=>{if(Array.isArray(a)){const h=a.map(d=>o(d,u,c));return d=>{for(const g of h){const v=g(d);if(v)return v}return!1}}const l=s(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!l)throw new TypeError("Expected pattern to be a non-empty string");const m=u||{},y=n.isWindows(
92
+ u),_=l?o.compileRe(a,u):o.makeRe(a,u,!1,!0),S=_.state;delete _.state;let $=()=>!1;if(m.ignore){const h={...u,ignore:null,onMatch:null,onResult:null};$=o(m.ignore,h,c)}const p=(h,f=!1)=>{const{isMatch:d,match:g,output:v}=o.test(h,_,u,{glob:a,posix:y}),w={glob:a,state:S,regex:_,posix:y,input:h,output:v,match:g,isMatch:d};return typeof m.onResult=="function"&&m.onResult(w),d===!1?(w.isMatch=!1,f?w:!1):$(h)?(typeof m.onIgnore=="function"&&m.onIgnore(w),w.isMatch=!1,f?w:!1):(typeof m.onMatch=="functi\
93
+ on"&&m.onMatch(w),f?w:!0)};return c&&(p.state=S),p};return o.test=(a,u,c,{glob:l,posix:m}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const y=c||{},_=y.format||(m?n.toPosixSlashes:null);let S=a===l,$=S&&_?_(a):a;return S===!1&&($=_?_(a):a,S=$===l),(S===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?S=o.matchBase(a,u,c,m):S=u.exec($)),{isMatch:!!S,match:S,output:$}},o.matchBase=(a,u,c,l=n.isWindows(c))=>(u instanceof
94
+ RegExp?u:o.makeRe(u,c)).test(e.basename(a)),o.isMatch=(a,u,c)=>o(u,c)(a),o.parse=(a,u)=>Array.isArray(a)?a.map(c=>o.parse(c,u)):r(a,{...u,fastpaths:!1}),o.scan=(a,u)=>t(a,u),o.compileRe=(a,u,c=!1,l=!1)=>{if(c===!0)return a.output;const m=u||{},y=m.contains?"":"^",_=m.contains?"":"$";let S=`${y}(?:${a.output})${_}`;a&&a.negated===!0&&(S=`^(?!${S}).*$`);const $=o.toRegex(S,u);return l===!0&&($.state=a),$},o.makeRe=(a,u={},c=!1,l=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-e\
95
+ mpty string");let m={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(m.output=r.fastpaths(a,u)),m.output||(m=r(a,u)),o.compileRe(m,u,c,l)},o.toRegex=(a,u)=>{try{const c=u||{};return new RegExp(a,c.flags||(c.nocase?"i":""))}catch(c){if(u&&u.debug===!0)throw c;return/$^/}},o.constants=i,Yn=o,Yn}var Qn,va;function Md(){return va||(va=1,Qn=xd()),Qn}var Zn,_a;function Hd(){if(_a)return Zn;_a=1;const e=Bo,t=Ld(),r=Md(),n=Wt(),i=a=>a===""||a==="./",s=a=>{const u=a.indexOf("\
96
+ {");return u>-1&&a.indexOf("}",u)>-1},o=(a,u,c)=>{u=[].concat(u),a=[].concat(a);let l=new Set,m=new Set,y=new Set,_=0,S=h=>{y.add(h.output),c&&c.onResult&&c.onResult(h)};for(let h=0;h<u.length;h++){let f=r(String(u[h]),{...c,onResult:S},!0),d=f.state.negated||f.state.negatedExtglob;d&&_++;for(let g of a){let v=f(g,!0);(d?!v.isMatch:v.isMatch)&&(d?l.add(v.output):(l.delete(v.output),m.add(v.output)))}}let p=(_===u.length?[...y]:[...m]).filter(h=>!l.has(h));if(c&&p.length===0){if(c.failglob===!0)throw new Error(
97
+ `No matches found for "${u.join(", ")}"`);if(c.nonull===!0||c.nullglob===!0)return c.unescape?u.map(h=>h.replace(/\\/g,"")):u}return p};return o.match=o,o.matcher=(a,u)=>r(a,u),o.isMatch=(a,u,c)=>r(u,c)(a),o.any=o.isMatch,o.not=(a,u,c={})=>{u=[].concat(u).map(String);let l=new Set,m=[],y=S=>{c.onResult&&c.onResult(S),m.push(S.output)},_=new Set(o(a,u,{...c,onResult:y}));for(let S of m)_.has(S)||l.add(S);return[...l]},o.contains=(a,u,c)=>{if(typeof a!="string")throw new TypeError(`Expected a stri\
98
+ ng: "${e.inspect(a)}"`);if(Array.isArray(u))return u.some(l=>o.contains(a,l,c));if(typeof u=="string"){if(i(a)||i(u))return!1;if(a.includes(u)||a.startsWith("./")&&a.slice(2).includes(u))return!0}return o.isMatch(a,u,{...c,contains:!0})},o.matchKeys=(a,u,c)=>{if(!n.isObject(a))throw new TypeError("Expected the first argument to be an object");let l=o(Object.keys(a),u,c),m={};for(let y of l)m[y]=a[y];return m},o.some=(a,u,c)=>{let l=[].concat(a);for(let m of[].concat(u)){let y=r(String(m),c);if(l.
99
+ some(_=>y(_)))return!0}return!1},o.every=(a,u,c)=>{let l=[].concat(a);for(let m of[].concat(u)){let y=r(String(m),c);if(!l.every(_=>y(_)))return!1}return!0},o.all=(a,u,c)=>{if(typeof a!="string")throw new TypeError(`Expected a string: "${e.inspect(a)}"`);return[].concat(u).every(l=>r(l,c)(a))},o.capture=(a,u,c)=>{let l=n.isWindows(c),y=r.makeRe(String(a),{...c,capture:!0}).exec(l?n.toPosixSlashes(u):u);if(y)return y.slice(1).map(_=>_===void 0?"":_)},o.makeRe=(...a)=>r.makeRe(...a),o.scan=(...a)=>r.
100
+ scan(...a),o.parse=(a,u)=>{let c=[];for(let l of[].concat(a||[]))for(let m of t(String(l),u))c.push(r.parse(m,u));return c},o.braces=(a,u)=>{if(typeof a!="string")throw new TypeError("Expected a string");return u&&u.nobrace===!0||!s(a)?[a]:t(a,u)},o.braceExpand=(a,u)=>{if(typeof a!="string")throw new TypeError("Expected a string");return o.braces(a,{...u,expand:!0})},o.hasBraces=s,Zn=o,Zn}var Ud=Hd();const wa=mn(Ud),Fd={useRecommendedBuildConfig:!0,removeViteModuleLoader:!1,deleteInlinedFiles:!0};
101
+ function Vd(e,t,r,n=!1){const i=t.replaceAll(".","\\."),s=new RegExp(`<script([^>]*?) src="(?:[^"]*?/)?${i}"([^>]*)></script>`),o=/"?__VITE_PRELOAD__"?/g,a=r.replace(o,"void 0").replace(/<(\/script>|!--)/g,"\\x3C$1"),u=e.replace(s,(c,l,m)=>`<script${l}${m}>${a.trim()}</script>`);return n?Xd(u):u}function zd(e,t,r){const n=t.replaceAll(".","\\."),i=new RegExp(`<link([^>]*?) href="(?:[^"]*?/)?${n}"([^>]*)>`),s=r.replace('@charset "UTF-8";',"");return e.replace(i,(a,u,c)=>`<style${u}${c}>${s.trim()}\
102
+ </style>`)}const Gd=/\.[mc]?js$/,Bd=/\.css$/,Kd=/\.html?$/;function Wd({useRecommendedBuildConfig:e=!0,removeViteModuleLoader:t=!1,inlinePattern:r=[],deleteInlinedFiles:n=!0}=Fd){return{name:"vite:singlefile",config:e?Jd:void 0,enforce:"post",generateBundle(i,s){const o=c=>this.info(`NOTE: asset not inlined: ${c}`);this.info(`
103
+ `);const a={html:[],css:[],js:[],other:[]};for(const c of Object.keys(s))Kd.test(c)?a.html.push(c):Bd.test(c)?a.css.push(c):Gd.test(c)?a.js.push(c):a.other.push(c);const u=[];for(const c of a.html){const l=s[c];let m=l.source;for(const y of a.js){if(r.length&&!wa.isMatch(y,r)){o(y);continue}const _=s[y];_.code!=null&&(this.info(`Inlining: ${y}`),u.push(y),m=Vd(m,_.fileName,_.code,t))}for(const y of a.css){if(r.length&&!wa.isMatch(y,r)){o(y);continue}const _=s[y];this.info(`Inlining: ${y}`),u.push(
104
+ y),m=zd(m,_.fileName,_.source)}l.source=m}if(n)for(const c of u)delete s[c];for(const c of a.other)o(c)}}}const Xd=e=>e.replace(/(<script type="module" crossorigin>\s*)\(function(?: polyfill)?\(\)\s*\{[\s\S]*?\}\)\(\);/,'<script type="module">'),Jd=e=>{e.build||(e.build={}),e.build.assetsInlineLimit=()=>!0,e.build.chunkSizeWarningLimit=1e8,e.build.cssCodeSplit=!1,e.base="./",e.build.assetsDir="",e.build.rollupOptions||(e.build.rollupOptions={}),e.build.rollupOptions.output||(e.build.rollupOptions.
105
+ output={});const t=r=>{r.inlineDynamicImports=!0};if(Array.isArray(e.build.rollupOptions.output))for(const r of e.build.rollupOptions.output)t(r);else t(e.build.rollupOptions.output)};function ft(e){return e.length===0?"never":e.sort(md).map(t=>` | ${JSON.stringify(t)}`).join(`
106
+ `).trimStart()}function ba(e){const t=Uo(e);return t.length===0?"never":Fo(t,yd,Gf(r=>` | ${JSON.stringify(r.id)}`)).join(`
107
+ `).trimStart()}function Ea(e,t={}){const{useCorePackage:r=!1}=t;return`
108
+ import type { Aux, SpecAux } from '${r?"@likec4/core/types":"likec4/model"}';
108
109
 
109
110
  export type $Specs = SpecAux<
110
111
  // Element kinds
@@ -122,9 +123,9 @@ export type $Specs = SpecAux<
122
123
  export type $Aux = Aux<
123
124
  ${JSON.stringify(e.stage)},
124
125
  // Elements
125
- ${wa(e.$data.elements)},
126
+ ${ba(e.$data.elements)},
126
127
  // Deployments
127
- ${wa(e.$data.deployments.elements)},
128
+ ${ba(e.$data.deployments.elements)},
128
129
  // Views
129
130
  ${ft(wt(e.$data.views))},
130
131
  // Project ID
@@ -142,7 +143,7 @@ export type $DeploymentKind = $Aux['DeploymentKind']
142
143
  export type $Tag = $Aux['Tag']
143
144
  export type $Tags = readonly $Aux['Tag'][]
144
145
  export type $MetadataKey = $Aux['MetadataKey']
145
- `.trimStart()}function Xd(e){return`
146
+ `.trimStart()}function Yd(e,t={}){const r=Ea(e,t),{useCorePackage:n=!1}=t;return`
146
147
  /* prettier-ignore-start */
147
148
  /* eslint-disable */
148
149
 
@@ -151,13 +152,13 @@ export type $MetadataKey = $Aux['MetadataKey']
151
152
  * DO NOT EDIT MANUALLY!
152
153
  ******************************************************************************/
153
154
 
154
- import { LikeC4Model } from '@likec4/core/model'
155
- ${ba(e)}
155
+ import { LikeC4Model } from '${n?"@likec4/core":"likec4"}/model'
156
+ ${r}
156
157
 
157
158
  export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(${lt.stringify(e.$data,{space:2,quote:"'"})} as any) as any
158
159
 
159
160
  /* prettier-ignore-end */
160
- `.trimStart()}function Jd(e){return Ko(e,t=>Wo`${lt.stringify(t.id)}`,{separator:" | "})}function Yd(e){const t=Array.from(e),r=new Yf;return r.appendTemplate`
161
+ `.trimStart()}function Qd(e){return Ko(e,t=>Wo`${lt.stringify(t.id)}`,{separator:" | "})}function Zd(e){const t=Array.from(e),r=new Zf;return r.appendTemplate`
161
162
  /******************************************************************************
162
163
  * This file was generated
163
164
  * DO NOT EDIT MANUALLY!
@@ -169,9 +170,9 @@ export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(${lt.stringify(e.$
169
170
 
170
171
  import type { DiagramView } from 'likec4'
171
172
  `.append(ut,ut),t.length===0?(r.append("export {}",ut),Xo(r)):(r.appendTemplate`
172
- export type LikeC4ViewId = ${Jd(t)};
173
+ export type LikeC4ViewId = ${Qd(t)};
173
174
  export const LikeC4Views = {
174
- `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(t.length>1).append(Ko(t,c=>Wo`${lt.stringify(c.id)}: (${lt.stringify(c)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",ut,ut).appendTemplate`
175
+ `.indent({indentation:2,indentedChildren(n){n.appendNewLineIf(t.length>1).append(Ko(t,i=>Wo`${lt.stringify(i.id)}: (${lt.stringify(i)} as unknown) as DiagramView`,{separator:",",appendNewLineIfNotEmpty:!0}))}}).append("} as const satisfies Record<LikeC4ViewId, DiagramView>",ut,ut).appendTemplate`
175
176
  export type LikeC4Views = typeof LikeC4Views
176
177
 
177
178
  export function isLikeC4ViewId(value: unknown): value is LikeC4ViewId {
@@ -183,7 +184,7 @@ export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(${lt.stringify(e.$
183
184
  }
184
185
 
185
186
  /* prettier-ignore-end */
186
- `.append(ut),Xo(r))}function Qd(e){return md(!e.isParsed(),"can not generate react types for parsed model"),`
187
+ `.append(ut),Xo(r))}function ep(e,t={}){const{useCorePackage:r=!1}=t;gd(!e.isParsed(),"can not generate react types for parsed model");const n=Ea(e,t);return`
187
188
  /* prettier-ignore-start */
188
189
  /* eslint-disable */
189
190
 
@@ -194,14 +195,14 @@ export const likec4model: LikeC4Model<$Aux> = new LikeC4Model(${lt.stringify(e.$
194
195
 
195
196
  import type { PropsWithChildren } from 'react'
196
197
  import type { JSX } from 'react/jsx-runtime'
197
- import type { LikeC4Model } from '@likec4/core/model'
198
- import type { DiagramView } from '@likec4/core/types'
198
+ import type { LikeC4Model } from '${r?"@likec4/core":"likec4"}/model'
199
+ import type { DiagramView } from '${r?"@likec4/core/types":"likec4/model"}'
199
200
  import type {
200
201
  LikeC4ViewProps as GenericLikeC4ViewProps,
201
202
  ReactLikeC4Props as GenericReactLikeC4Props
202
203
  } from 'likec4/react'
203
204
 
204
- ${ba(e)}
205
+ ${n}
205
206
 
206
207
  declare function isLikeC4ViewId(value: unknown): value is $ViewId;
207
208
 
@@ -239,495 +240,494 @@ export {
239
240
  ReactLikeC4
240
241
  }
241
242
  /* prettier-ignore-end */
242
- `.trimStart()}const es=async({languageServices:e,likec4AssetsDir:t,...r})=>{const n=r.customLogger??Sd,c=On(),s=r?.useOverviewGraph===!0;n.info(`${j.cyan("likec4 app root")} ${j.dim(c)}`);const o=r.outputDir??ae(e.workspace,"dist");n.info(j.cyan("outDir")+" "+j.dim(o));let a="/";r.base&&(a=Io(r.base),!Nf(a)&&a!=="./"&&(a=Of(a))),a!=="/"&&n.info(`${j.green("app base url")} ${j.dim(a)}`);const i=r.webcomponentPrefix??"likec4",u=r.title??"LikeC4",l=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:t,
243
- webcomponentPrefix:i,title:u,root:c,languageServices:e,clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...jn(),"likec4/previews":t}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","@likec4/core/types","@likec4/core/model","@likec4/core/compute-view/relationships","@likec4/core/utils","@likec4/core","\
244
- likec4/model","likec4/react","likec4/vite-plugin/internal"],noDiscovery:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(i),PAGE_TITLE:JSON.stringify(u),__USE_OVERVIEW_GRAPH__:s?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,emptyOutDir:!1,sourcemap:!1,cssMinify:!1,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:In,rollupOptions:{treeshake:{preset:"\
245
- recommended"},...!l&&{input:[ae(c,"index.html"),ae(c,"src","main.js"),ae(c,"src","fonts.css"),ae(c,"src","style.css")],output:{manualChunks:m=>{if(!(m.endsWith(".css")||m.endsWith(".html")||m.includes("likec4/icons"))){if(m.includes("__app__")){let y=m.match(/__app__\/src\/([\w]+)\.js/)?.[1];return y?y[1]:void 0}if(m.includes("node_modules/likec4")||m.includes("node_modules/@likec4"))return"likec4";if(m.includes("node_modules"))return"vendors"}}}}}},customLogger:n,plugins:[bn(),Sn({languageServices:e.
246
- languageServices,useOverviewGraph:s}),l?Bd():void 0].filter(Boolean)}};async function ts({languageServices:e,outDir:t,base:r,webcomponentPrefix:n="likec4",filename:c="likec4-views.js"}){const s=Ne(["vite","webcomponent"]),o=On();return s.info(j.cyan("outDir")+" "+j.dim(t)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn(),dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.
247
- stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Nn,tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:In,lib:{entry:"src/webcomponent.tsx",fileName(a,i){return c},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:s,plugins:[bn(),Sn({languageServices:e.languageServices,
248
- useOverviewGraph:!1})]}}const Zd=["favicon.ico","robots.txt"],ep=async({buildWebcomponent:e=!0,webcomponentPrefix:t="likec4",title:r,languageServices:n,likec4AssetsDir:c,outputSingleFile:s,...o})=>{c??=await Vt(Et(zt(),".likec4-assets-"));const{isDev:a,...i}=await es({...o,languageServices:n,likec4AssetsDir:c,webcomponentPrefix:t,title:r,outputSingleFile:s}),u=await kn();for(const m of Zd){const y=ae(i.root,m);Me(y)&&Uo(y,ae(u,m))}const l=n.languageServices.projects();if(l.length===1){const m=await n.
249
- viewsService.computedViews(),y=await n.diagrams();if(y.length===0)throw process.exitCode=1,new Error("no views found");y.length===m.length?i.customLogger.info(`${j.dim("workspace:")} ${j.green("\u2713 all views layouted")}`):i.customLogger.warn(`${j.dim("workspace:")} ${j.yellow(`\u2717 layouted ${y.length} of ${m.length} views`)}`),y.forEach(_=>{_.hasLayoutDrift&&i.customLogger.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(_.id))})}else for(const m of l){const y=await n.
250
- viewsService.computedViews(m.id);y.length===0?i.customLogger.warn(`${j.dim("project:")} ${m.id} ${j.yellow("\u2717 no views found")}`):i.customLogger.info(`${j.dim("project:")} ${m.id} ${j.green(`${y.length} views`)}`)}if(e){const m=await ts({webcomponentPrefix:t,languageServices:n,outDir:u,base:i.base});await At(m)}if(await At({...i,publicDir:u,mode:"production"}),s)for(let m of Mf(ae(i.build.outDir)).filter(y=>y!=="index.html"))vn(ae(i.build.outDir,m),{recursive:!0});else{const m=ae(i.build.outDir,
251
- "index.html");Me(m)&&Uo(m,ae(i.build.outDir,"404.html"))}};function rs(e,t){return r=>r.length>1?[e,t,r[0],"--",...r.slice(1)]:[e,t,r[0]]}function tp(){return e=>["deno","run",`npm:${e[0]}`,...e.slice(1)]}const rp={agent:["npm",0],run:rs("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninst\
252
- all","-g",0]},Ea={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":rs("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},np={...Ea,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["\
253
- yarn","up","-i",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},Sa={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interactive":["pnpm","update","-i",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remo\
254
- ve","--global",0]},sp={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},op={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","\
255
- install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],execute:tp(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},ap={npm:rp,yarn:Ea,"yarn@berry":np,pnpm:Sa,"pnpm@6":{...Sa,run:rs("pnpm","run")},bun:sp,deno:op};function ip(e,t,r){const n=ap[e][t];return cp(n,r)}function cp(e,t){if(e==null)return null;const r=typeof e=="function"?e(t):e.flatMap(n=>typeof n==
256
- "number"?t:[n]);return{command:r[0],args:r.slice(1)}}const up=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Ra={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Aa={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",
257
- ".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function ns(e,t){try{const r=await zo.stat(e);return t==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*lp(e=me.cwd()){let t=ie.resolve(e);const{root:r}=ie.parse(t);for(;t&&t!==r;)yield t,t=ie.dirname(t)}async function Pa(e,t){return!e||!ns(e,"file")?null:await pp(e,t)}async function fp(e={}){const{cwd:t,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=e;let c;if(typeof e.stopDir=="string"){const s=ie.
258
- resolve(e.stopDir);c=o=>o===s}else c=e.stopDir;for(const s of lp(t)){for(const o of r)switch(o){case"lockfile":{for(const a of Object.keys(Ra))if(await ns(ie.join(s,a),"file")){const i=Ra[a],u=await Pa(ie.join(s,"package.json"),n);return u||{name:i,agent:i}}break}case"packageManager-field":case"devEngines-field":{const a=await Pa(ie.join(s,"package.json"),n);if(a)return a;break}case"install-metadata":{for(const a of Object.keys(Aa)){const i=a.endsWith("/")?"dir":"file";if(await ns(ie.join(s,a),i)){
259
- const u=Aa[a],l=u==="yarn"?hp(a)?"yarn":"yarn@berry":u;return{name:u,agent:l}}}break}}if(c?.(s))break}return null}function dp(e){const t=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof e.packageManager=="string"){const[r,n]=e.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:t(n)}}if(typeof e.devEngines?.packageManager?.name=="string")return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function pp(e,t){try{const r=JSON.parse(await zo.readFile(
260
- e,"utf8"));let n;const c=dp(r);if(c){const s=c.name,o=c.ver;let a=o;return s==="yarn"&&o&&Number.parseInt(o)>1?(n="yarn@berry",a="berry",{name:s,agent:n,version:a}):s==="pnpm"&&o&&Number.parseInt(o)<7?(n="pnpm@6",{name:s,agent:n,version:a}):up.includes(s)?(n=s,{name:s,agent:n,version:a}):t?.(r.packageManager)??null}}catch{}return null}function hp(e){return e.endsWith(".yarn_integrity")}function Ca(e){try{return!!nd.createRequire(import.meta.url).resolve(e)}catch(t){return Ae.debug(Ht(t)),!1}}async function Tt(){
261
- if(Ca("react")&&Ca("react-dom")){Ae.debug("react already installed");return}Ae.debug("react not installed");const e=await fp();e||(Ae.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const t=ip(e.agent,"add",["react","react-dom"]);t||(Ae.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await jo(t.command,t.args,{stdio:"inherit"})}catch(r){Ae.debug(Ht(r)),Ae.error`Please install dependencies manually: ${"\
262
- react"} ${"react-dom"}`,process.exit(1)}}function Ta(e){if(e.resolvedUrls)return Lo(e.resolvedUrls.network)??Lo(e.resolvedUrls.local)}function Na(e){if(!e.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");Ke([j.green("LikeC4 served at:"),"",j.dim("Local: ")+e.resolvedUrls.local.join(`
243
+ `.trimStart()}const es=async({languageServices:e,likec4AssetsDir:t,...r})=>{const n=r.customLogger??Ad,i=Nn(),s=r?.useOverviewGraph===!0;n.info(`${j.cyan("likec4 app root")} ${j.dim(i)}`);const o=r.outputDir??oe(e.workspace,"dist");n.info(j.cyan("outDir")+" "+j.dim(o));let a="/";r.base&&(a=No(r.base),!Tf(a)&&a!=="./"&&(a=Nf(a))),a!=="/"&&n.info(`${j.green("app base url")} ${j.dim(a)}`);const u=r.webcomponentPrefix??"likec4",c=r.title??"LikeC4",l=r.outputSingleFile??!1;return{isDev:!1,likec4AssetsDir:t,
244
+ webcomponentPrefix:u,title:c,root:i,languageServices:e,clearScreen:!1,base:a,resolve:{conditions:["production"],dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"],alias:{...jn(),"likec4/previews":t}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","@likec4/core/types","@likec4/core/model","@likec4/core/compute-view/relationships","@likec4/core/utils","@likec4/core","\
245
+ likec4/model","likec4/react","likec4/vite-plugin/internal"],noDiscovery:!0},esbuild:{tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},define:{WEBCOMPONENT_PREFIX:JSON.stringify(u),PAGE_TITLE:JSON.stringify(c),__USE_OVERVIEW_GRAPH__:s?"true":"false",__USE_HASH_HISTORY__:r?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,emptyOutDir:!1,sourcemap:!1,cssMinify:!1,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:In,rollupOptions:{treeshake:{preset:"\
246
+ recommended"},...!l&&{input:[oe(i,"index.html"),oe(i,"src","main.js"),oe(i,"src","fonts.css"),oe(i,"src","style.css")],output:{manualChunks:m=>{if(!(m.endsWith(".css")||m.endsWith(".html")||m.includes("likec4/icons"))){if(m.includes("__app__")){let y=m.match(/__app__\/src\/([\w]+)\.js/)?.[1];return y?y[1]:void 0}if(m.includes("node_modules/likec4")||m.includes("node_modules/@likec4"))return"likec4";if(m.includes("node_modules"))return"vendors"}}}}}},customLogger:n,plugins:[bn(),Sn({languageServices:e.
247
+ languageServices,useOverviewGraph:s}),l?Wd():void 0].filter(Boolean)}};async function ts({languageServices:e,outDir:t,base:r,webcomponentPrefix:n="likec4",filename:i="likec4-views.js"}){const s=Te(["vite","webcomponent"]),o=Nn();return s.info(j.cyan("outDir")+" "+j.dim(t)),{root:o,clearScreen:!1,base:r,configFile:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn(),dedupe:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client"]},define:{WEBCOMPONENT_PREFIX:JSON.
248
+ stringify(n),"process.env.NODE_ENV":'"production"'},esbuild:{...Tn,tsconfigRaw:{compilerOptions:{target:"ESNext",jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:In,lib:{entry:"src/webcomponent.js",fileName(a,u){return i},formats:["iife"],name:"LikeC4Views"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:s,plugins:[bn(),Sn({languageServices:e.languageServices,
249
+ useOverviewGraph:!1})]}}const tp=["favicon.ico","robots.txt"],rp=async({buildWebcomponent:e=!0,webcomponentPrefix:t="likec4",title:r,languageServices:n,likec4AssetsDir:i,outputSingleFile:s,...o})=>{i??=await Ft(Et(Vt(),".likec4-assets-"));const{isDev:a,...u}=await es({...o,languageServices:n,likec4AssetsDir:i,webcomponentPrefix:t,title:r,outputSingleFile:s}),c=await On();for(const m of tp){const y=oe(u.root,m);He(y)&&Mo(y,oe(c,m))}const l=n.languageServices.projects();if(l.length===1){const m=await n.
250
+ viewsService.computedViews(),y=await n.diagrams();if(y.length===0)throw process.exitCode=1,new Error("no views found");y.length===m.length?u.customLogger.info(`${j.dim("workspace:")} ${j.green("\u2713 all views layouted")}`):u.customLogger.warn(`${j.dim("workspace:")} ${j.yellow(`\u2717 layouted ${y.length} of ${m.length} views`)}`),y.forEach(_=>{_.hasLayoutDrift&&u.customLogger.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(_.id))})}else for(const m of l){const y=await n.
251
+ viewsService.computedViews(m.id);y.length===0?u.customLogger.warn(`${j.dim("project:")} ${m.id} ${j.yellow("\u2717 no views found")}`):u.customLogger.info(`${j.dim("project:")} ${m.id} ${j.green(`${y.length} views`)}`)}if(e){const m=await ts({webcomponentPrefix:t,languageServices:n,outDir:c,base:u.base});await At(m)}if(await At({...u,publicDir:c,mode:"production"}),s)for(let m of Hf(oe(u.build.outDir)).filter(y=>y!=="index.html"))vn(oe(u.build.outDir,m),{recursive:!0});else{const m=oe(u.build.outDir,
252
+ "index.html");He(m)&&Mo(m,oe(u.build.outDir,"404.html"))}};function rs(e,t){return r=>r.length>1?[e,t,r[0],"--",...r.slice(1)]:[e,t,r[0]]}function np(){return e=>["deno","run",`npm:${e[0]}`,...e.slice(1)]}const sp={agent:["npm",0],run:rs("npm","run"),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninst\
253
+ all","-g",0]},Sa={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],execute:["npx",0],"execute-local":rs("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},op={...Sa,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["\
254
+ yarn","up","-i",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]},Ra={agent:["pnpm",0],run:["pnpm","run",0],install:["pnpm","i",0],frozen:["pnpm","i","--frozen-lockfile",0],global:["pnpm","add","-g",0],add:["pnpm","add",0],upgrade:["pnpm","update",0],"upgrade-interactive":["pnpm","update","-i",0],execute:["pnpm","dlx",0],"execute-local":["pnpm","exec",0],uninstall:["pnpm","remove",0],global_uninstall:["pnpm","remo\
255
+ ve","--global",0]},ap={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update",0],execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},ip={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","\
256
+ install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],execute:np(),"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},cp={npm:sp,yarn:Sa,"yarn@berry":op,pnpm:Ra,"pnpm@6":{...Ra,run:rs("pnpm","run")},bun:ap,deno:ip};function up(e,t,r){const n=cp[e][t];return lp(n,r)}function lp(e,t){if(e==null)return null;const r=typeof e=="function"?e(t):e.flatMap(n=>typeof n==
257
+ "number"?t:[n]);return{command:r[0],args:r.slice(1)}}const fp=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],Aa={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},Pa={"node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",
258
+ ".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"};async function ns(e,t){try{const r=await zo.stat(e);return t==="file"?r.isFile():r.isDirectory()}catch{return!1}}function*dp(e=me.cwd()){let t=ie.resolve(e);const{root:r}=ie.parse(t);for(;t&&t!==r;)yield t,t=ie.dirname(t)}async function Ca(e,t){return!e||!ns(e,"file")?null:await mp(e,t)}async function pp(e={}){const{cwd:t,strategies:r=["lockfile","packageManager-field","devEngines-field"],onUnknown:n}=e;let i;if(typeof e.stopDir=="string"){const s=ie.
259
+ resolve(e.stopDir);i=o=>o===s}else i=e.stopDir;for(const s of dp(t)){for(const o of r)switch(o){case"lockfile":{for(const a of Object.keys(Aa))if(await ns(ie.join(s,a),"file")){const u=Aa[a],c=await Ca(ie.join(s,"package.json"),n);return c||{name:u,agent:u}}break}case"packageManager-field":case"devEngines-field":{const a=await Ca(ie.join(s,"package.json"),n);if(a)return a;break}case"install-metadata":{for(const a of Object.keys(Pa)){const u=a.endsWith("/")?"dir":"file";if(await ns(ie.join(s,a),u)){
260
+ const c=Pa[a],l=c==="yarn"?yp(a)?"yarn":"yarn@berry":c;return{name:c,agent:l}}}break}}if(i?.(s))break}return null}function hp(e){const t=r=>r?.match(/\d+(\.\d+){0,2}/)?.[0]??r;if(typeof e.packageManager=="string"){const[r,n]=e.packageManager.replace(/^\^/,"").split("@");return{name:r,ver:t(n)}}if(typeof e.devEngines?.packageManager?.name=="string")return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function mp(e,t){try{const r=JSON.parse(await zo.readFile(
261
+ e,"utf8"));let n;const i=hp(r);if(i){const s=i.name,o=i.ver;let a=o;return s==="yarn"&&o&&Number.parseInt(o)>1?(n="yarn@berry",a="berry",{name:s,agent:n,version:a}):s==="pnpm"&&o&&Number.parseInt(o)<7?(n="pnpm@6",{name:s,agent:n,version:a}):fp.includes(s)?(n=s,{name:s,agent:n,version:a}):t?.(r.packageManager)??null}}catch{}return null}function yp(e){return e.endsWith(".yarn_integrity")}function ka(e){try{return!!od.createRequire(import.meta.url).resolve(e)}catch(t){return Ae.debug(Mt(t)),!1}}async function Ct(){
262
+ if(ka("react")&&ka("react-dom")){Ae.debug("react already installed");return}Ae.debug("react not installed");const e=await pp();e||(Ae.error`Package manager not detected, please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));const t=up(e.agent,"add",["react","react-dom"]);t||(Ae.error`Please install dependencies manually: ${"react"} ${"react-dom"}`,process.exit(1));try{await Oo(t.command,t.args,{stdio:"inherit"})}catch(r){Ae.debug(Mt(r)),Ae.error`Please install dependencies manually: ${"\
263
+ react"} ${"react-dom"}`,process.exit(1)}}function Ta(e){if(e.resolvedUrls)return Io(e.resolvedUrls.network)??Io(e.resolvedUrls.local)}function Na(e){if(!e.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");We([j.green("LikeC4 served at:"),"",j.dim("Local: ")+e.resolvedUrls.local.join(`
263
264
  `+"".padEnd(9," ")),e.resolvedUrls.network.length?j.dim("Network: ")+e.resolvedUrls.network.join(`
264
- `+"".padEnd(9," ")):void 0].filter(t=>kf(t)).join(`
265
- `))}class Oa extends Error{constructor(t){super(`${t} is locked`)}}const dt={old:new Set,young:new Set},mp=1e3*15,Xt=1024,Jt=65535;let Nt;const yp=()=>{const e=Rt.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(e))for(const n of r)t.add(n.address);return t},ka=e=>new Promise((t,r)=>{const n=sd.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{const{port:c}=n.address();n.close(()=>{t(c)})})}),Ia=async(e,t)=>{if(e.host||e.port===0)return ka(e);for(const r of t)
266
- try{await ka({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},gp=function*(e){e&&(yield*e),yield 0};async function ss(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const c=e.exclude;if(typeof c[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const s of c){if(typeof s!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
267
- responding to the port you want excluded.");if(!Number.isSafeInteger(s))throw new TypeError(`Number ${s} in the exclude option is not a safe integer and can't be used`)}r=new Set(c)}Nt===void 0&&(Nt=setTimeout(()=>{Nt=void 0,dt.old=dt.young,dt.young=new Set},mp),Nt.unref&&Nt.unref());const n=yp();for(const c of gp(t))try{if(r.has(c))continue;let s=await Ia({...e,port:c},n);for(;dt.old.has(s)||dt.young.has(s);){if(c!==0)throw new Oa(c);s=await Ia({...e,port:c},n)}return dt.young.add(s),s}catch(s){
268
- if(!["EADDRINUSE","EACCES"].includes(s.code)&&!(s instanceof Oa))throw s}throw new Error("No available ports found")}function Yt(e,t){if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<Xt||e>Jt)throw new RangeError(`'from' must be between ${Xt} and ${Jt}`);if(t<Xt||t>Jt)throw new RangeError(`'to' must be between ${Xt} and ${Jt}`);if(e>t)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,c){for(let s=n;s<=
269
- c;s++)yield s}(e,t)}async function ja({buildWebcomponent:e=!0,hmr:t=!0,webcomponentPrefix:r="likec4",title:n,languageServices:c,likec4AssetsDir:s,openBrowser:o,listen:a,...i}){s??=await Vt(Et(zt(),".likec4-assets-"));const{isDev:u,...l}=await es({...i,languageServices:c,likec4AssetsDir:s,webcomponentPrefix:r,title:n}),m=l.customLogger,y=await ss({port:[5173,...Yt(61e3,61010),...Yt(62002,62010)]}),_=await ss({port:Yt(24678,24690)}),S=await kn(),g=a??(Ue()?"0.0.0.0":"localhost");t&&(m.info(`Enabli\
270
- ng HMR: localhost:${_}`),Ue()&&m.info(j.yellow(`ensure port ${_} is published from container`)));const p=await td({...l,define:t?{...l.define,"process.env.NODE_ENV":'"development"'}:l.define,mode:t?"development":l.mode,publicDir:S,server:{host:g,allowedHosts:!0,port:y,hmr:t&&{overlay:!0,port:_},fs:{strict:!1},open:o??(!u&&!Ue())}});return await p.listen(),e&&(async()=>{try{const h=await ts({webcomponentPrefix:r,languageServices:c,outDir:S,base:l.base});await At({...h,logLevel:"warn"})}catch(h){m.
271
- warn(Ht(h)),m.warn("webcomponent build failed, ignoring error and continue")}})(),p}async function $p({browserContext:e,views:t,output:r,logger:n,timeout:c,maxAttempts:s,outputType:o,theme:a}){let i;const u=t.map(y=>({view:y,attempt:1})),l=[];let m;for(;m=u.shift();){const{view:y,attempt:_}=m,S=`export/${encodeURIComponent(y.id)}`;try{if(_>1){i&&(i.close({runBeforeUnload:!0}).catch(d=>n.error(`failed to close page: ${d}`)),i=void 0);const f=Do(_*200,{min:200,max:1e3});n.info(j.cyan(S)+j.dim(` at\
272
- tempt ${_} of ${s} after ${f}ms`)),await od(f)}else y.hasLayoutDrift&&n.warn(j.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+j.red(y.id));let g=".";o==="relative"&&(g=y.relativePath??".",g.includes("/")?g=g.slice(0,g.lastIndexOf("/")):g=".");const p=ae(r,g,`${y.id}.png`);i??=await e.newPage();const h=16;await i.setViewportSize({width:y.bounds.width+40+h,height:y.bounds.height+40+h}),await i.goto(S+`?padding=20&theme=${a}`),n.info(j.cyan(S)+j.dim(` -> ${He(r,p)}`)),
273
- await i.waitForSelector(".react-flow.initialized"),y.nodes.some(f=>If(f.icon)&&f.icon.toLowerCase().startsWith("http"))&&await vp(i,c),await i.getByTestId("export-page").screenshot({animations:"disabled",path:p,omitBackground:!0}),l.push({view:y,path:p})}catch(g){i?.close({runBeforeUnload:!0}).catch(p=>n.error(`failed to close page: ${p}`)),n.error(j.red("failed "+S+`
274
- `+g)),_<s&&(u.push({view:y,attempt:_+1}),n.info(j.dim(`retry ${S}`))),i=void 0}}return l}async function vp(e,t){let r=await e.locator("//img").all();if(!r.length)return;const n=r.map(c=>c.evaluate(s=>s.complete||new Promise(o=>{s.onload=o,s.onerror=o}),{timeout:Math.max(15e3,t)}));await Promise.allSettled(n)}var La=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Da=e=>{throw TypeError(e)},_p=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Da("Object expected");var n,c;n=t[La("asyn\
275
- cDispose")],n===void 0&&(n=t[La("dispose")],c=n),typeof n!="function"&&Da("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},wp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="SuppressedError",u.error=o,u.suppressed=a,u},c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])
276
- return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){c(i)}if(r)throw t};return s()};async function qa({logger:e,serverUrl:t,theme:r="light",timeoutMs:n=15e3,views:c,output:s,outputType:o="relative",maxAttempts:a=3,chromiumSandbox:i=!1}){e.info(`${j.dim("output")} ${s}`),e.info(`${j.dim("base url")} ${t}
277
- `);const{chromium:u}=await import("playwright"),l=u.executablePath();e.info(j.cyan("Start chromium")+" "+j.dim(l));const m=await u.launch({chromiumSandbox:i,headless:!0});e.info(j.cyan("Color scheme: ")+r+`
278
- `);const y=await m.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:t,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});y.setDefaultNavigationTimeout(n),y.setDefaultTimeout(n);try{return await $p({browserContext:y,views:c,output:s,outputType:o,logger:e,maxAttempts:a,timeout:n,theme:r})}finally{e.info(j.cyan("close chromium")),await y.close(),await m.close()}}async function xa({path:e,useDotBin:t,theme:r="light",output:n,outputType:c,serverUrl:s,ignore:o=!1,timeoutMs:a=1e4,maxAttempts:i=3,filter:u,
279
- chromiumSandbox:l=!1}){var m=[];try{const g=Ne("export"),p=Uf(),h=_p(m,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0);n??=h.workspace;let f;const d=h.languageServices.projects();if(!s&&(g.info(j.cyan("start preview server")),f=await ja({languageServices:h,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),s=Ta(f),!s))throw g.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");for(const $ of d){
280
- d.length>1&&(g.info(j.dim("---------")),g.info(`${j.dim("project:")} ${$.id}`),g.info(`${j.dim("folder:")} ${$.folder.fsPath}`));let v=await h.diagrams($.id);if(u&&bt(u,1)&&bt(v,1)){const U=jf(u);g.info(`${j.cyan("filter")} ${j.dim(JSON.stringify(u))}`),v=v.filter(q=>U(q.id)?(g.info(`${j.green("include")} ${q.id} \u2705`),!0):(g.info(`${j.gray("skip")} ${j.dim(q.id)}`),!1))}if(!bt(v,1)){g.warn("no views found");continue}let w=d.length>1?Io(qo(s,"project",$.id)):s,E=d.length>1?qo(n,$.id):n;const P=await qa(
281
- {logger:g,serverUrl:w,theme:r,timeoutMs:a,views:v,output:E,outputType:c,maxAttempts:i,chromiumSandbox:l}),{pretty:k}=Lf(p);if(P.length>0&&g.info(j.green(`exported ${P.length} views in ${k}`)+`
282
- `),P.length!==v.length&&(o&&P.length>0?g.info(j.dim("ignore")+" "+j.red(`failed ${v.length-P.length} out of ${v.length} views`)):g.error(j.red(`failed ${v.length-P.length} out of ${v.length} views`))),P.length!==v.length&&(P.length===0||!o))throw new Error(`Failed ${v.length-P.length} out of ${v.length} views`)}f&&(g.info(j.cyan("stop server")),await f.close().catch($=>{g.error($)}))}catch(g){var y=g,_=!0}finally{var S=wp(m,y,_);S&&await S}}var Ma=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ha=e=>{
283
- throw TypeError(e)},bp=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Ha("Object expected");var n,c;n=t[Ma("asyncDispose")],n===void 0&&(n=t[Ma("dispose")],c=n),typeof n!="function"&&Ha("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},Ep=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="SuppressedError",u.error=o,u.suppressed=a,u},
284
- c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){c(i)}if(r)throw t};return s()};const{cyan:Ua,dim:Fa}=j;async function Sp({path:e,useDotBin:t,useHashHistory:r,webcomponentPrefix:n,title:c,useOverview:s=!1,output:o,outputSingleFile:a,base:i}){var u=[];try{await Tt();const _=Ne("c4:build"),S=bp(u,await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",logger:"vi\
285
- te",watch:!1}),!0),g=o??ae(S.workspace,"dist");let p=ae(g,"assets");if(s)try{p=ae(g,"assets","previews"),await qe(p,{recursive:!0}),_.info(`${Ua("Generate previews")} ${Fa(p)}
286
- `),await xa({path:e,useDotBin:t,output:p,outputType:"flat",ignore:!0})}catch(h){_.error(j.red("Failed to generate previews")),_.error(h),_.warn(j.yellow("Ignore previews and continue build")),vn(p,{recursive:!0,force:!0}),s=!1}await ep({base:i,useHashHistory:a||r,customLogger:_,useOverviewGraph:s,webcomponentPrefix:n,title:c,languageServices:S,likec4AssetsDir:p,outputDir:o,outputSingleFile:a}),s&&(_.info(`${Ua("clean previews")} ${Fa(p)}`),vn(p,{recursive:!0,force:!0}))}catch(_){var l=_,m=!0}finally{
287
- var y=Ep(u,l,m);y&&await y}}const Rp=e=>e.command({command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",be).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:ae}).option("base",Zo).option("use-hash-history",Yo).option("use-dot",Re).option("webcomponent-prefix",Tn).option("title",Qo).option("output-single-file",_d).example(`${j.green("$0 build -o ./build ./src")}`,j.gray("Search for likec\
288
- 4 files in 'src' and output static site to 'build'")),handler:async t=>{await Sp({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],webcomponentPrefix:t["webcomponent-prefix"],title:t.title,outputSingleFile:t["output-single-file"]??!1})}}),rt=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},os=new Set(["__proto__","prototype","constructor"]),Ap=new Set("0123456789");function Qt(e){const t=[];let r="",n="start",c=!1;for(const s of e)
289
- switch(s){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");c&&(r+=s),n="property",c=!c;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(c){c=!1,r+=s;break}if(os.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(c){c=!1,r+=s;
290
- break}if(n==="property"){if(os.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Ap.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),c&&(c=!1,r+="\\"),r+=s}}switch(c&&(r+="\\"),n){case"property":{if(os.has(r))return[];t.push(
291
- r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function as(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Va(e,t){if(as(e,t))throw new Error("Cannot use string index")}function Pp(e,t,r){if(!rt(e)||typeof t!="string")return r===void 0?e:r;const n=Qt(t);if(n.length===0)return r;for(let c=0;c<n.length;c++){const s=n[c];if(as(e,s)?e=c===n.length-1?void 0:null:
292
- e=e[s],e==null){if(c!==n.length-1)return r;break}}return e===void 0?r:e}function za(e,t,r){if(!rt(e)||typeof t!="string")return e;const n=e,c=Qt(t);for(let s=0;s<c.length;s++){const o=c[s];Va(e,o),s===c.length-1?e[o]=r:rt(e[o])||(e[o]=typeof c[s+1]=="number"?[]:{}),e=e[o]}return n}function Cp(e,t){if(!rt(e)||typeof t!="string")return!1;const r=Qt(t);for(let n=0;n<r.length;n++){const c=r[n];if(Va(e,c),n===r.length-1)return delete e[c],!0;if(e=e[c],!rt(e))return!1}}function Tp(e,t){if(!rt(e)||typeof t!=
293
- "string")return!1;const r=Qt(t);if(r.length===0)return!1;for(const n of r){if(!rt(e)||!(n in e)||as(e,n))return!1;e=e[n]}return!0}const Je=Rt.homedir(),is=Rt.tmpdir(),{env:pt}=me,Np=e=>{const t=ie.join(Je,"Library");return{data:ie.join(t,"Application Support",e),config:ie.join(t,"Preferences",e),cache:ie.join(t,"Caches",e),log:ie.join(t,"Logs",e),temp:ie.join(is,e)}},Op=e=>{const t=pt.APPDATA||ie.join(Je,"AppData","Roaming"),r=pt.LOCALAPPDATA||ie.join(Je,"AppData","Local");return{data:ie.join(r,
294
- e,"Data"),config:ie.join(t,e,"Config"),cache:ie.join(r,e,"Cache"),log:ie.join(r,e,"Log"),temp:ie.join(is,e)}},kp=e=>{const t=ie.basename(Je);return{data:ie.join(pt.XDG_DATA_HOME||ie.join(Je,".local","share"),e),config:ie.join(pt.XDG_CONFIG_HOME||ie.join(Je,".config"),e),cache:ie.join(pt.XDG_CACHE_HOME||ie.join(Je,".cache"),e),log:ie.join(pt.XDG_STATE_HOME||ie.join(Je,".local","state"),e),temp:ie.join(is,t,e)}};function Ip(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expec\
295
- ted a string, got ${typeof e}`);return t&&(e+=`-${t}`),me.platform==="darwin"?Np(e):me.platform==="win32"?Op(e):kp(e)}const Ye=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},Fe=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(c){return t(c)}},jp=me.getuid?!me.getuid():!1,Lp=1e4,Ce=()=>{},pe={isChangeErrorOk:e=>{if(!pe.isNodeError(e))return!1;const{code:t}=e;return t==="ENOSYS"||!jp&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!pe.isNodeError(
296
- e))return!1;const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!pe.isNodeError(e))throw e;if(!pe.isChangeErrorOk(e))throw e}};class Dp{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Lp,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),
265
+ `+"".padEnd(9," ")):void 0].filter(t=>Of(t)).join(`
266
+ `))}class Oa extends Error{constructor(t){super(`${t} is locked`)}}const dt={old:new Set,young:new Set},gp=1e3*15,Xt=1024,Jt=65535;let kt;const $p=()=>{const e=Rt.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(const r of Object.values(e))for(const n of r)t.add(n.address);return t},Ia=e=>new Promise((t,r)=>{const n=ad.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{const{port:i}=n.address();n.close(()=>{t(i)})})}),ja=async(e,t)=>{if(e.host||e.port===0)return Ia(e);for(const r of t)
267
+ try{await Ia({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},vp=function*(e){e&&(yield*e),yield 0};async function ss(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const s of i){if(typeof s!="number")throw new TypeError("Each item in the `exclude` option must be a number cor\
268
+ responding to the port you want excluded.");if(!Number.isSafeInteger(s))throw new TypeError(`Number ${s} in the exclude option is not a safe integer and can't be used`)}r=new Set(i)}kt===void 0&&(kt=setTimeout(()=>{kt=void 0,dt.old=dt.young,dt.young=new Set},gp),kt.unref&&kt.unref());const n=$p();for(const i of vp(t))try{if(r.has(i))continue;let s=await ja({...e,port:i},n);for(;dt.old.has(s)||dt.young.has(s);){if(i!==0)throw new Oa(i);s=await ja({...e,port:i},n)}return dt.young.add(s),s}catch(s){
269
+ if(!["EADDRINUSE","EACCES"].includes(s.code)&&!(s instanceof Oa))throw s}throw new Error("No available ports found")}function Yt(e,t){if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<Xt||e>Jt)throw new RangeError(`'from' must be between ${Xt} and ${Jt}`);if(t<Xt||t>Jt)throw new RangeError(`'to' must be between ${Xt} and ${Jt}`);if(e>t)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let s=n;s<=
270
+ i;s++)yield s}(e,t)}async function La({buildWebcomponent:e=!0,hmr:t=!0,webcomponentPrefix:r="likec4",title:n,languageServices:i,likec4AssetsDir:s,openBrowser:o,listen:a,...u}){s??=await Ft(Et(Vt(),".likec4-assets-"));const{isDev:c,...l}=await es({...u,languageServices:i,likec4AssetsDir:s,webcomponentPrefix:r,title:n}),m=l.customLogger,y=await ss({port:[5173,...Yt(61e3,61010),...Yt(62002,62010)]}),_=await ss({port:Yt(24678,24690)}),S=await On(),$=a??(Fe()?"0.0.0.0":"localhost");t&&(m.info(`Enabli\
271
+ ng HMR: localhost:${_}`),Fe()&&m.info(j.yellow(`ensure port ${_} is published from container`)));const p=await nd({...l,define:t?{...l.define,"process.env.NODE_ENV":'"development"'}:l.define,mode:t?"development":l.mode,publicDir:S,server:{host:$,allowedHosts:!0,port:y,hmr:t&&{overlay:!0,port:_},fs:{strict:!1},open:o??(!c&&!Fe())}});return await p.listen(),e&&(async()=>{try{const h=await ts({webcomponentPrefix:r,languageServices:i,outDir:S,base:l.base});await At({...h,logLevel:"warn"})}catch(h){m.
272
+ warn(Mt(h)),m.warn("webcomponent build failed, ignoring error and continue")}})(),p}async function _p({browserContext:e,views:t,output:r,logger:n,timeout:i,maxAttempts:s,dynamicVariant:o,outputType:a,theme:u}){let c;const l=t.map(_=>({view:_,attempt:1})),m=[];let y;for(;y=l.shift();){const{view:_,attempt:S}=y,$=`export/${encodeURIComponent(_.id)}`;try{if(S>1){c&&(c.close({runBeforeUnload:!0}).catch(v=>n.error(`failed to close page: ${v}`)),c=void 0);const g=jo(S*200,{min:200,max:1e3});n.info(j.cyan(
273
+ $)+j.dim(` attempt ${S} of ${s} after ${g}ms`)),await id(g)}else _.hasLayoutDrift&&n.warn(j.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+j.red(_.id));let p=".";a==="relative"&&(p=_.sourcePath??".",p.includes("/")?p=p.slice(0,p.lastIndexOf("/")):p=".");const h=oe(r,p,`${_.id}.png`);c??=await e.newPage();let f=_.bounds;o==="sequence"&&_._type==="dynamic"&&(f=_.sequenceLayout.bounds);const d=20;await c.setViewportSize({width:f.width+40+d,height:f.height+40+d}),await c.
274
+ goto(If($,{padding:20,theme:u,dynamic:o})),n.info(j.cyan($)+j.dim(` -> ${Ue(r,h)}`)),await c.waitForSelector(".react-flow.initialized"),_.nodes.some(g=>jf(g.icon)&&g.icon.toLowerCase().startsWith("http"))&&await wp(c,i),await c.getByTestId("export-page").screenshot({animations:"disabled",path:h,omitBackground:!0}),m.push({view:_,path:h})}catch(p){c?.close({runBeforeUnload:!0}).catch(h=>n.error(`failed to close page: ${h}`)),n.error(j.red("failed "+$+`
275
+ `+p)),S<s&&(l.push({view:_,attempt:S+1}),n.info(j.dim(`retry ${$}`))),c=void 0}}return m}async function wp(e,t){let r=await e.locator("//img").all();if(!r.length)return;const n=r.map(i=>i.evaluate(s=>s.complete||new Promise(o=>{s.onload=o,s.onerror=o}),{timeout:Math.max(15e3,t)}));await Promise.allSettled(n)}var Da=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),qa=e=>{throw TypeError(e)},bp=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&qa("Object expected");var n,i;n=t[Da("asyn\
276
+ cDispose")],n===void 0&&(n=t[Da("dispose")],i=n),typeof n!="function"&&qa("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},Ep=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=a,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])
277
+ return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){i(u)}if(r)throw t};return s()};async function xa({logger:e,serverUrl:t,theme:r="light",timeoutMs:n=15e3,views:i,output:s,outputType:o="relative",maxAttempts:a=3,chromiumSandbox:u=!1,sequence:c=!1}){e.info(`${j.dim("output")} ${s}`),e.info(`${j.dim("base url")} ${t}
278
+ `);const{chromium:l}=await import("playwright"),m=l.executablePath();e.info(j.cyan("Start chromium")+" "+j.dim(m));const y=await l.launch({chromiumSandbox:u,headless:!0});e.info(j.cyan("Color scheme: ")+r+`
279
+ `);const _=await y.newContext({deviceScaleFactor:2,colorScheme:r,baseURL:t,bypassCSP:!0,ignoreHTTPSErrors:!0,isMobile:!1});_.setDefaultNavigationTimeout(n),_.setDefaultTimeout(n);try{return await _p({browserContext:_,views:i,output:s,outputType:o,logger:e,maxAttempts:a,dynamicVariant:c?"sequence":"diagram",timeout:n,theme:r})}finally{e.info(j.cyan("close chromium")),await _.close(),await y.close()}}async function Ma({path:e,useDotBin:t,theme:r="light",output:n,outputType:i,serverUrl:s,ignore:o=!1,
280
+ timeoutMs:a=1e4,maxAttempts:u=3,filter:c,sequence:l=!1,chromiumSandbox:m=!1}){var y=[];try{const p=Te("export"),h=Ff(),f=bp(y,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0);n??=f.workspace;let d;const g=f.languageServices.projects();if(!s&&(p.info(j.cyan("start preview server")),d=await La({languageServices:f,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),s=Ta(d),!s))throw p.error("Vite server is not ready, no resolvedUrls"),new Error("Vite se\
281
+ rver is not ready, no resolvedUrls");for(const v of g){g.length>1&&(p.info(j.dim("---------")),p.info(`${j.dim("project:")} ${v.id}`),p.info(`${j.dim("folder:")} ${v.folder.fsPath}`));let w=await f.diagrams(v.id);if(c&&bt(c,1)&&bt(w,1)){const x=Lf(c);p.info(`${j.cyan("filter")} ${j.dim(JSON.stringify(c))}`),w=w.filter(H=>x(H.id)?(p.info(`${j.green("include")} ${H.id} \u2705`),!0):(p.info(`${j.gray("skip")} ${j.dim(H.id)}`),!1))}if(!bt(w,1)){p.warn("no views found");continue}let E=g.length>1?No(Lo(
282
+ s,"project",v.id)):s,P=g.length>1?Lo(n,v.id):n;const O=await xa({logger:p,serverUrl:E,theme:r,timeoutMs:a,views:w,output:P,outputType:i,maxAttempts:u,sequence:l,chromiumSandbox:m}),{pretty:U}=Df(h);if(O.length>0&&p.info(j.green(`exported ${O.length} views in ${U}`)+`
283
+ `),O.length!==w.length&&(o&&O.length>0?p.info(j.dim("ignore")+" "+j.red(`failed ${w.length-O.length} out of ${w.length} views`)):p.error(j.red(`failed ${w.length-O.length} out of ${w.length} views`))),O.length!==w.length&&(O.length===0||!o))throw new Error(`Failed ${w.length-O.length} out of ${w.length} views`)}d&&(p.info(j.cyan("stop server")),await d.close().catch(v=>{p.error(v)}))}catch(p){var _=p,S=!0}finally{var $=Ep(y,_,S);$&&await $}}var Ha=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ua=e=>{
284
+ throw TypeError(e)},Sp=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Ua("Object expected");var n,i;n=t[Ha("asyncDispose")],n===void 0&&(n=t[Ha("dispose")],i=n),typeof n!="function"&&Ua("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},Rp=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=a,c},
285
+ i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){i(u)}if(r)throw t};return s()};const{cyan:Fa,dim:Va}=j;async function Ap({path:e,useDotBin:t,useHashHistory:r,webcomponentPrefix:n,title:i,useOverview:s=!1,output:o,outputSingleFile:a,base:u}){var c=[];try{await Ct();const _=Te("c4:build"),S=Sp(c,await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",logger:"vi\
286
+ te",watch:!1}),!0),$=o??oe(S.workspace,"dist");let p=oe($,"assets");if(s)try{p=oe($,"assets","previews"),await xe(p,{recursive:!0}),_.info(`${Fa("Generate previews")} ${Va(p)}
287
+ `),await Ma({path:e,useDotBin:t,output:p,outputType:"flat",ignore:!0})}catch(h){_.error(j.red("Failed to generate previews")),_.error(h),_.warn(j.yellow("Ignore previews and continue build")),vn(p,{recursive:!0,force:!0}),s=!1}await rp({base:u,useHashHistory:a||r,customLogger:_,useOverviewGraph:s,webcomponentPrefix:n,title:i,languageServices:S,likec4AssetsDir:p,outputDir:o,outputSingleFile:a}),s&&(_.info(`${Fa("clean previews")} ${Va(p)}`),vn(p,{recursive:!0,force:!0}))}catch(_){var l=_,m=!0}finally{
288
+ var y=Rp(c,l,m);y&&await y}}const Pp=e=>e.command({command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:t=>t.positional("path",be).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:oe}).option("base",ea).option("use-hash-history",Qo).option("use-dot",Re).option("webcomponent-prefix",kn).option("title",Zo).option("output-single-file",bd).example(`${j.green("$0 build -o ./build ./src")}`,j.gray("Search for likec\
289
+ 4 files in 'src' and output static site to 'build'")),handler:async t=>{await Ap({path:t.path,output:t.output,base:t.base,useHashHistory:t["use-hash-history"],useDotBin:t["use-dot"],webcomponentPrefix:t["webcomponent-prefix"],title:t.title,outputSingleFile:t["output-single-file"]??!1})}}),rt=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},os=new Set(["__proto__","prototype","constructor"]),Cp=new Set("0123456789");function Qt(e){const t=[];let r="",n="start",i=!1;for(const s of e)
290
+ switch(s){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=s),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=s;break}if(os.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=s;
291
+ break}if(n==="property"){if(os.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Cp.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=s}}switch(i&&(r+="\\"),n){case"property":{if(os.has(r))return[];t.push(
292
+ r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function as(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function za(e,t){if(as(e,t))throw new Error("Cannot use string index")}function kp(e,t,r){if(!rt(e)||typeof t!="string")return r===void 0?e:r;const n=Qt(t);if(n.length===0)return r;for(let i=0;i<n.length;i++){const s=n[i];if(as(e,s)?e=i===n.length-1?void 0:null:
293
+ e=e[s],e==null){if(i!==n.length-1)return r;break}}return e===void 0?r:e}function Ga(e,t,r){if(!rt(e)||typeof t!="string")return e;const n=e,i=Qt(t);for(let s=0;s<i.length;s++){const o=i[s];za(e,o),s===i.length-1?e[o]=r:rt(e[o])||(e[o]=typeof i[s+1]=="number"?[]:{}),e=e[o]}return n}function Tp(e,t){if(!rt(e)||typeof t!="string")return!1;const r=Qt(t);for(let n=0;n<r.length;n++){const i=r[n];if(za(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!rt(e))return!1}}function Np(e,t){if(!rt(e)||typeof t!=
294
+ "string")return!1;const r=Qt(t);if(r.length===0)return!1;for(const n of r){if(!rt(e)||!(n in e)||as(e,n))return!1;e=e[n]}return!0}const Je=Rt.homedir(),is=Rt.tmpdir(),{env:pt}=me,Op=e=>{const t=ie.join(Je,"Library");return{data:ie.join(t,"Application Support",e),config:ie.join(t,"Preferences",e),cache:ie.join(t,"Caches",e),log:ie.join(t,"Logs",e),temp:ie.join(is,e)}},Ip=e=>{const t=pt.APPDATA||ie.join(Je,"AppData","Roaming"),r=pt.LOCALAPPDATA||ie.join(Je,"AppData","Local");return{data:ie.join(r,
295
+ e,"Data"),config:ie.join(t,e,"Config"),cache:ie.join(r,e,"Cache"),log:ie.join(r,e,"Log"),temp:ie.join(is,e)}},jp=e=>{const t=ie.basename(Je);return{data:ie.join(pt.XDG_DATA_HOME||ie.join(Je,".local","share"),e),config:ie.join(pt.XDG_CONFIG_HOME||ie.join(Je,".config"),e),cache:ie.join(pt.XDG_CACHE_HOME||ie.join(Je,".cache"),e),log:ie.join(pt.XDG_STATE_HOME||ie.join(Je,".local","state"),e),temp:ie.join(is,t,e)}};function Lp(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expec\
296
+ ted a string, got ${typeof e}`);return t&&(e+=`-${t}`),me.platform==="darwin"?Op(e):me.platform==="win32"?Ip(e):jp(e)}const Ye=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},Ve=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}},Dp=me.getuid?!me.getuid():!1,qp=1e4,Ce=()=>{},pe={isChangeErrorOk:e=>{if(!pe.isNodeError(e))return!1;const{code:t}=e;return t==="ENOSYS"||!Dp&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!pe.isNodeError(
297
+ e))return!1;const{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!pe.isNodeError(e))throw e;if(!pe.isChangeErrorOk(e))throw e}};class xp{constructor(){this.interval=25,this.intervalId=void 0,this.limit=qp,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),
297
298
  delete this.intervalId)},this.add=t=>{this.queueWaiting.add(t),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=t=>{this.queueWaiting.delete(t),this.queueActive.delete(t)},this.schedule=()=>new Promise(t=>{const r=()=>this.remove(n),n=()=>t(r);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(const t of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(t),this.queueActive.
298
- add(t),t()}}}}}const qp=new Dp,Qe=(e,t)=>function(n){return function c(...s){return qp.schedule().then(o=>{const a=u=>(o(),u),i=u=>{if(o(),Date.now()>=n)throw u;if(t(u)){const l=Math.round(100*Math.random());return new Promise(y=>setTimeout(y,l)).then(()=>c.apply(void 0,s))}throw u};return e.apply(void 0,s).then(a,i)})}},Ze=(e,t)=>function(n){return function c(...s){try{return e.apply(void 0,s)}catch(o){if(Date.now()>n)throw o;if(t(o))return c.apply(void 0,s);throw o}}},ve={attempt:{chmod:Ye($e(
299
- se.chmod),pe.onChangeError),chown:Ye($e(se.chown),pe.onChangeError),close:Ye($e(se.close),Ce),fsync:Ye($e(se.fsync),Ce),mkdir:Ye($e(se.mkdir),Ce),realpath:Ye($e(se.realpath),Ce),stat:Ye($e(se.stat),Ce),unlink:Ye($e(se.unlink),Ce),chmodSync:Fe(se.chmodSync,pe.onChangeError),chownSync:Fe(se.chownSync,pe.onChangeError),closeSync:Fe(se.closeSync,Ce),existsSync:Fe(se.existsSync,Ce),fsyncSync:Fe(se.fsync,Ce),mkdirSync:Fe(se.mkdirSync,Ce),realpathSync:Fe(se.realpathSync,Ce),statSync:Fe(se.statSync,Ce),
300
- unlinkSync:Fe(se.unlinkSync,Ce)},retry:{close:Qe($e(se.close),pe.isRetriableError),fsync:Qe($e(se.fsync),pe.isRetriableError),open:Qe($e(se.open),pe.isRetriableError),readFile:Qe($e(se.readFile),pe.isRetriableError),rename:Qe($e(se.rename),pe.isRetriableError),stat:Qe($e(se.stat),pe.isRetriableError),write:Qe($e(se.write),pe.isRetriableError),writeFile:Qe($e(se.writeFile),pe.isRetriableError),closeSync:Ze(se.closeSync,pe.isRetriableError),fsyncSync:Ze(se.fsyncSync,pe.isRetriableError),openSync:Ze(
301
- se.openSync,pe.isRetriableError),readFileSync:Ze(se.readFileSync,pe.isRetriableError),renameSync:Ze(se.renameSync,pe.isRetriableError),statSync:Ze(se.statSync,pe.isRetriableError),writeSync:Ze(se.writeSync,pe.isRetriableError),writeFileSync:Ze(se.writeFileSync,pe.isRetriableError)}},xp="utf8",Ga=438,Mp=511,Hp={},Up=Rt.userInfo().uid,Fp=Rt.userInfo().gid,Vp=1e3,zp=!!me.getuid;me.getuid&&me.getuid();const Ba=128,Gp=e=>e instanceof Error&&"code"in e,Ka=e=>typeof e=="string",cs=e=>e===void 0,Bp=me.platform===
302
- "linux",Wa=me.platform==="win32",us=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Wa||us.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Bp&&us.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Kp{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();t&&(Wa&&t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL"?me.kill(me.pid,"SIGTERM"):me.kill(me.pid,t))}},this.hook=()=>{me.
303
- once("exit",()=>this.exit());for(const t of us)try{me.once(t,()=>this.exit(t))}catch{}},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t)}),this.hook()}}const Wp=new Kp,Xp=Wp.register,_e={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),c=`.tmp-${Date.now().toString().slice(-10)}${t}`;return`${e}${c}`},get:(e,t,r=!0)=>{const n=_e.truncate(t(e));return n in _e.store?_e.get(e,t,r):(_e.store[n]=r,[n,()=>delete _e.store[n]])},purge:e=>{
304
- _e.store[e]&&(delete _e.store[e],ve.attempt.unlink(e))},purgeSync:e=>{_e.store[e]&&(delete _e.store[e],ve.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(const e in _e.store)_e.purgeSync(e)},truncate:e=>{const t=ie.basename(e);if(t.length<=Ba)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const n=t.length-Ba;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Xp(_e.purgeSyncAll);function Xa(e,t,r=Hp){if(Ka(r))return Xa(e,t,{encoding:r});
305
- const n=Date.now()+((r.timeout??Vp)||-1);let c=null,s=null,o=null;try{const a=ve.attempt.realpathSync(e),i=!!a;e=a||e,[s,c]=_e.get(e,r.tmpCreate||_e.create,r.tmpPurge!==!1);const u=zp&&cs(r.chown),l=cs(r.mode);if(i&&(u||l)){const m=ve.attempt.statSync(e);m&&(r={...r},u&&(r.chown={uid:m.uid,gid:m.gid}),l&&(r.mode=m.mode))}if(!i){const m=ie.dirname(e);ve.attempt.mkdirSync(m,{mode:Mp,recursive:!0})}o=ve.retry.openSync(n)(s,"w",r.mode||Ga),r.tmpCreated&&r.tmpCreated(s),Ka(t)?ve.retry.writeSync(n)(o,
306
- t,0,r.encoding||xp):cs(t)||ve.retry.writeSync(n)(o,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?ve.retry.fsyncSync(n)(o):ve.attempt.fsync(o)),ve.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Up||r.chown.gid!==Fp)&&ve.attempt.chownSync(s,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Ga&&ve.attempt.chmodSync(s,r.mode);try{ve.retry.renameSync(n)(s,e)}catch(m){if(!Gp(m)||m.code!=="ENAMETOOLONG")throw m;ve.retry.renameSync(n)(s,_e.truncate(e))}c(),s=null}finally{o&&ve.attempt.closeSync(o),s&&_e.
307
- purge(s)}}var Zt={exports:{}},ls={},Ve={},nt={},fs={},ds={},ps={},Ja;function er(){return Ja||(Ja=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid\
308
- identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((d,$)=>`${d}${$}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.
309
- reduce((d,$)=>($ instanceof r&&(d[$.str]=(d[$.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function c(h,...f){const d=[h[0]];let $=0;for(;$<f.length;)a(d,f[$]),d.push(h[++$]);return new n(d)}e._=c;const s=new n("+");function o(h,...f){const d=[_(h[0])];let $=0;for(;$<f.length;)d.push(s),a(d,f[$]),d.push(s,_(h[++$]));return i(d),new n(d)}e.str=o;function a(h,f){f instanceof n?h.push(...f._items):f instanceof r?h.push(f):h.push(m(f))}e.addCodeArg=a;function i(h){let f=1;for(;f<h.length-1;){if(h[f]===
310
- s){const d=u(h[f-1],h[f+1]);if(d!==void 0){h.splice(f-1,3,d);continue}h[f++]="+"}f++}}function u(h,f){if(f==='""')return h;if(h==='""')return f;if(typeof h=="string")return f instanceof r||h[h.length-1]!=='"'?void 0:typeof f!="string"?`${h.slice(0,-1)}${f}"`:f[0]==='"'?h.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(h instanceof r))return`"${h}${f.slice(1)}`}function l(h,f){return f.emptyStr()?h:h.emptyStr()?f:o`${h}${f}`}e.strConcat=l;function m(h){return typeof h=="number"||
311
- typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function y(h){return new n(_(h))}e.stringify=y;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function S(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new n(`.${h}`):c`[${h}]`}e.getProperty=S;function g(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new n(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=
312
- g;function p(h){return new n(h.toString())}e.regexpCode=p})(ps)),ps}var hs={},Ya;function Qa(){return Ya||(Ya=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=er();class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("cons\
313
- t"),let:new t.Name("let"),var:new t.Name("var")};class c{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,m;if(!((m=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||m===void 0)&&m.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: \
314
- prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=c;class s extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:m}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${m}]`}}e.ValueScopeName=s;const o=(0,t._)`\n`;class a extends c{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?o:t.nil}}get(){return this._scope}name(u){return new s(u,this._newName(u))}value(u,l){var m;if(l.
315
- ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(u),{prefix:_}=y,S=(m=l.key)!==null&&m!==void 0?m:l.ref;let g=this._values[_];if(g){const f=g.get(S);if(f)return f}else g=this._values[_]=new Map;g.set(S,y);const p=this._scope[_]||(this._scope[_]=[]),h=p.length;return p[h]=l.ref,y.setValue(l,{property:_,itemIndex:h}),y}getValue(u,l){const m=this._values[u];if(m)return m.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,m=>{if(m.scopePath===void 0)
316
- throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${u}${m.scopePath}`})}scopeCode(u=this._values,l,m){return this._reduceValues(u,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},l,m)}_reduceValues(u,l,m={},y){let _=t.nil;for(const S in u){const g=u[S];if(!g)continue;const p=m[S]=m[S]||new Map;g.forEach(h=>{if(p.has(h))return;p.set(h,n.Started);let f=l(h);if(f){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${d} ${h} = ${f};${this.
317
- opts._n}`}else if(f=y?.(h))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r(h);p.set(h,n.Completed)})}return _}}e.ValueScope=a})(hs)),hs}var Za;function oe(){return Za||(Za=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=er(),r=Qa();var n=er();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n.
299
+ add(t),t()}}}}}const Mp=new xp,Qe=(e,t)=>function(n){return function i(...s){return Mp.schedule().then(o=>{const a=c=>(o(),c),u=c=>{if(o(),Date.now()>=n)throw c;if(t(c)){const l=Math.round(100*Math.random());return new Promise(y=>setTimeout(y,l)).then(()=>i.apply(void 0,s))}throw c};return e.apply(void 0,s).then(a,u)})}},Ze=(e,t)=>function(n){return function i(...s){try{return e.apply(void 0,s)}catch(o){if(Date.now()>n)throw o;if(t(o))return i.apply(void 0,s);throw o}}},ve={attempt:{chmod:Ye($e(
300
+ se.chmod),pe.onChangeError),chown:Ye($e(se.chown),pe.onChangeError),close:Ye($e(se.close),Ce),fsync:Ye($e(se.fsync),Ce),mkdir:Ye($e(se.mkdir),Ce),realpath:Ye($e(se.realpath),Ce),stat:Ye($e(se.stat),Ce),unlink:Ye($e(se.unlink),Ce),chmodSync:Ve(se.chmodSync,pe.onChangeError),chownSync:Ve(se.chownSync,pe.onChangeError),closeSync:Ve(se.closeSync,Ce),existsSync:Ve(se.existsSync,Ce),fsyncSync:Ve(se.fsync,Ce),mkdirSync:Ve(se.mkdirSync,Ce),realpathSync:Ve(se.realpathSync,Ce),statSync:Ve(se.statSync,Ce),
301
+ unlinkSync:Ve(se.unlinkSync,Ce)},retry:{close:Qe($e(se.close),pe.isRetriableError),fsync:Qe($e(se.fsync),pe.isRetriableError),open:Qe($e(se.open),pe.isRetriableError),readFile:Qe($e(se.readFile),pe.isRetriableError),rename:Qe($e(se.rename),pe.isRetriableError),stat:Qe($e(se.stat),pe.isRetriableError),write:Qe($e(se.write),pe.isRetriableError),writeFile:Qe($e(se.writeFile),pe.isRetriableError),closeSync:Ze(se.closeSync,pe.isRetriableError),fsyncSync:Ze(se.fsyncSync,pe.isRetriableError),openSync:Ze(
302
+ se.openSync,pe.isRetriableError),readFileSync:Ze(se.readFileSync,pe.isRetriableError),renameSync:Ze(se.renameSync,pe.isRetriableError),statSync:Ze(se.statSync,pe.isRetriableError),writeSync:Ze(se.writeSync,pe.isRetriableError),writeFileSync:Ze(se.writeFileSync,pe.isRetriableError)}},Hp="utf8",Ba=438,Up=511,Fp={},Vp=Rt.userInfo().uid,zp=Rt.userInfo().gid,Gp=1e3,Bp=!!me.getuid;me.getuid&&me.getuid();const Ka=128,Kp=e=>e instanceof Error&&"code"in e,Wa=e=>typeof e=="string",cs=e=>e===void 0,Wp=me.platform===
303
+ "linux",Xa=me.platform==="win32",us=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Xa||us.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),Wp&&us.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");class Xp{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(const r of this.callbacks)r();t&&(Xa&&t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL"?me.kill(me.pid,"SIGTERM"):me.kill(me.pid,t))}},this.hook=()=>{me.
304
+ once("exit",()=>this.exit());for(const t of us)try{me.once(t,()=>this.exit(t))}catch{}},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t)}),this.hook()}}const Jp=new Xp,Yp=Jp.register,_e={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=`.tmp-${Date.now().toString().slice(-10)}${t}`;return`${e}${i}`},get:(e,t,r=!0)=>{const n=_e.truncate(t(e));return n in _e.store?_e.get(e,t,r):(_e.store[n]=r,[n,()=>delete _e.store[n]])},purge:e=>{
305
+ _e.store[e]&&(delete _e.store[e],ve.attempt.unlink(e))},purgeSync:e=>{_e.store[e]&&(delete _e.store[e],ve.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(const e in _e.store)_e.purgeSync(e)},truncate:e=>{const t=ie.basename(e);if(t.length<=Ka)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const n=t.length-Ka;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};Yp(_e.purgeSyncAll);function Ja(e,t,r=Fp){if(Wa(r))return Ja(e,t,{encoding:r});
306
+ const n=Date.now()+((r.timeout??Gp)||-1);let i=null,s=null,o=null;try{const a=ve.attempt.realpathSync(e),u=!!a;e=a||e,[s,i]=_e.get(e,r.tmpCreate||_e.create,r.tmpPurge!==!1);const c=Bp&&cs(r.chown),l=cs(r.mode);if(u&&(c||l)){const m=ve.attempt.statSync(e);m&&(r={...r},c&&(r.chown={uid:m.uid,gid:m.gid}),l&&(r.mode=m.mode))}if(!u){const m=ie.dirname(e);ve.attempt.mkdirSync(m,{mode:Up,recursive:!0})}o=ve.retry.openSync(n)(s,"w",r.mode||Ba),r.tmpCreated&&r.tmpCreated(s),Wa(t)?ve.retry.writeSync(n)(o,
307
+ t,0,r.encoding||Hp):cs(t)||ve.retry.writeSync(n)(o,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?ve.retry.fsyncSync(n)(o):ve.attempt.fsync(o)),ve.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Vp||r.chown.gid!==zp)&&ve.attempt.chownSync(s,r.chown.uid,r.chown.gid),r.mode&&r.mode!==Ba&&ve.attempt.chmodSync(s,r.mode);try{ve.retry.renameSync(n)(s,e)}catch(m){if(!Kp(m)||m.code!=="ENAMETOOLONG")throw m;ve.retry.renameSync(n)(s,_e.truncate(e))}i(),s=null}finally{o&&ve.attempt.closeSync(o),s&&_e.
308
+ purge(s)}}var Zt={exports:{}},ls={},ze={},nt={},fs={},ds={},ps={},Ya;function er(){return Ya||(Ya=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid\
309
+ identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((d,g)=>`${d}${g}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.
310
+ reduce((d,g)=>(g instanceof r&&(d[g.str]=(d[g.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function i(h,...f){const d=[h[0]];let g=0;for(;g<f.length;)a(d,f[g]),d.push(h[++g]);return new n(d)}e._=i;const s=new n("+");function o(h,...f){const d=[_(h[0])];let g=0;for(;g<f.length;)d.push(s),a(d,f[g]),d.push(s,_(h[++g]));return u(d),new n(d)}e.str=o;function a(h,f){f instanceof n?h.push(...f._items):f instanceof r?h.push(f):h.push(m(f))}e.addCodeArg=a;function u(h){let f=1;for(;f<h.length-1;){if(h[f]===
311
+ s){const d=c(h[f-1],h[f+1]);if(d!==void 0){h.splice(f-1,3,d);continue}h[f++]="+"}f++}}function c(h,f){if(f==='""')return h;if(h==='""')return f;if(typeof h=="string")return f instanceof r||h[h.length-1]!=='"'?void 0:typeof f!="string"?`${h.slice(0,-1)}${f}"`:f[0]==='"'?h.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(h instanceof r))return`"${h}${f.slice(1)}`}function l(h,f){return f.emptyStr()?h:h.emptyStr()?f:o`${h}${f}`}e.strConcat=l;function m(h){return typeof h=="number"||
312
+ typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function y(h){return new n(_(h))}e.stringify=y;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function S(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}e.getProperty=S;function $(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new n(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=
313
+ $;function p(h){return new n(h.toString())}e.regexpCode=p})(ps)),ps}var hs={},Qa;function Za(){return Qa||(Qa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=er();class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("cons\
314
+ t"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:c,parent:l}={}){this._names={},this._prefixes=c,this._parent=l}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const l=this._names[c]||this._nameGroup(c);return`${c}${l.index++}`}_nameGroup(c){var l,m;if(!((m=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||m===void 0)&&m.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: \
315
+ prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=i;class s extends t.Name{constructor(c,l){super(l),this.prefix=c}setValue(c,{property:l,itemIndex:m}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(l)}[${m}]`}}e.ValueScopeName=s;const o=(0,t._)`\n`;class a extends i{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?o:t.nil}}get(){return this._scope}name(c){return new s(c,this._newName(c))}value(c,l){var m;if(l.
316
+ ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(c),{prefix:_}=y,S=(m=l.key)!==null&&m!==void 0?m:l.ref;let $=this._values[_];if($){const f=$.get(S);if(f)return f}else $=this._values[_]=new Map;$.set(S,y);const p=this._scope[_]||(this._scope[_]=[]),h=p.length;return p[h]=l.ref,y.setValue(l,{property:_,itemIndex:h}),y}getValue(c,l){const m=this._values[c];if(m)return m.get(l)}scopeRefs(c,l=this._values){return this._reduceValues(l,m=>{if(m.scopePath===void 0)
317
+ throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${c}${m.scopePath}`})}scopeCode(c=this._values,l,m){return this._reduceValues(c,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},l,m)}_reduceValues(c,l,m={},y){let _=t.nil;for(const S in c){const $=c[S];if(!$)continue;const p=m[S]=m[S]||new Map;$.forEach(h=>{if(p.has(h))return;p.set(h,n.Started);let f=l(h);if(f){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${d} ${h} = ${f};${this.
318
+ opts._n}`}else if(f=y?.(h))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r(h);p.set(h,n.Completed)})}return _}}e.ValueScope=a})(hs)),hs}var ei;function ae(){return ei||(ei=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=er(),r=Za();var n=er();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n.
318
319
  _}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.
319
- regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var c=Qa();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return c.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return c.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return c.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return c.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t.
320
+ regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=Za();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t.
320
321
  _Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(R,b){return this}}class o extends s{constructor(R,b,C){super(),this.varKind=R,this.name=b,this.rhs=C}render({es5:R,_n:b}){const C=R?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+b}optimizeNames(R,b){if(R[this.name.
321
- str])return this.rhs&&(this.rhs=I(this.rhs,R,b)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(R,b,C){super(),this.lhs=R,this.rhs=b,this.sideEffects=C}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,b){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=I(this.rhs,R,b),this}get names(){const R=this.lhs instanceof t.Name?{}:{...this.lhs.names};return D(R,this.rhs)}}class i extends a{constructor(R,b,C,B){
322
- super(R,C,B),this.op=b}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}}class u extends s{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}}class l extends s{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}}class m extends s{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}}class y extends s{constructor(R){super(),
322
+ str])return this.rhs&&(this.rhs=I(this.rhs,R,b)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(R,b,C){super(),this.lhs=R,this.rhs=b,this.sideEffects=C}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,b){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=I(this.rhs,R,b),this}get names(){const R=this.lhs instanceof t.Name?{}:{...this.lhs.names};return D(R,this.rhs)}}class u extends a{constructor(R,b,C,B){
323
+ super(R,C,B),this.op=b}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}}class c extends s{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}}class l extends s{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}}class m extends s{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}}class y extends s{constructor(R){super(),
323
324
  this.code=R}render({_n:R}){return`${this.code};`+R}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(R,b){return this.code=I(this.code,R,b),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends s{constructor(R=[]){super(),this.nodes=R}render(R){return this.nodes.reduce((b,C)=>b+C.render(R),"")}optimizeNodes(){const{nodes:R}=this;let b=R.length;for(;b--;){const C=R[b].optimizeNodes();Array.isArray(C)?R.splice(b,1,...C):C?R[b]=C:R.splice(b,1)}return R.
324
- length>0?this:void 0}optimizeNames(R,b){const{nodes:C}=this;let B=C.length;for(;B--;){const K=C[B];K.optimizeNames(R,b)||(M(R,K.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((R,b)=>H(R,b.names),{})}}class S extends _{render(R){return"{"+R._n+super.render(R)+"}"+R._n}}class g extends _{}class p extends S{}p.kind="else";class h extends S{constructor(R,b){super(b),this.condition=R}render(R){let b=`if(${this.condition})`+super.render(R);return this.else&&(b+=
325
+ length>0?this:void 0}optimizeNames(R,b){const{nodes:C}=this;let B=C.length;for(;B--;){const K=C[B];K.optimizeNames(R,b)||(M(R,K.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((R,b)=>H(R,b.names),{})}}class S extends _{render(R){return"{"+R._n+super.render(R)+"}"+R._n}}class $ extends _{}class p extends S{}p.kind="else";class h extends S{constructor(R,b){super(b),this.condition=R}render(R){let b=`if(${this.condition})`+super.render(R);return this.else&&(b+=
325
326
  "else "+this.else.render(R)),b}optimizeNodes(){super.optimizeNodes();const R=this.condition;if(R===!0)return this.nodes;let b=this.else;if(b){const C=b.optimizeNodes();b=this.else=Array.isArray(C)?new p(C):C}if(b)return R===!1?b instanceof h?b:b.nodes:this.nodes.length?this:new h(z(R),b instanceof h?[b]:b.nodes);if(!(R===!1||!this.nodes.length))return this}optimizeNames(R,b){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(R,b),!!(super.optimizeNames(R,b)||this.else))return this.
326
- condition=I(this.condition,R,b),this}get names(){const R=super.names;return D(R,this.condition),this.else&&H(R,this.else.names),R}}h.kind="if";class f extends S{}f.kind="for";class d extends f{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,b){if(super.optimizeNames(R,b))return this.iteration=I(this.iteration,R,b),this}get names(){return H(super.names,this.iteration.names)}}class $ extends f{constructor(R,b,C,B){super(),this.varKind=
327
+ condition=I(this.condition,R,b),this}get names(){const R=super.names;return D(R,this.condition),this.else&&H(R,this.else.names),R}}h.kind="if";class f extends S{}f.kind="for";class d extends f{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,b){if(super.optimizeNames(R,b))return this.iteration=I(this.iteration,R,b),this}get names(){return H(super.names,this.iteration.names)}}class g extends f{constructor(R,b,C,B){super(),this.varKind=
327
328
  R,this.name=b,this.from=C,this.to=B}render(R){const b=R.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:K}=this;return`for(${b} ${C}=${B}; ${C}<${K}; ${C}++)`+super.render(R)}get names(){const R=D(super.names,this.from);return D(R,this.to)}}class v extends f{constructor(R,b,C,B){super(),this.loop=R,this.varKind=b,this.name=C,this.iterable=B}render(R){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(R)}optimizeNames(R,b){if(super.optimizeNames(R,b))return this.
328
329
  iterable=I(this.iterable,R,b),this}get names(){return H(super.names,this.iterable.names)}}class w extends S{constructor(R,b,C){super(),this.name=R,this.args=b,this.async=C}render(R){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(R)}}w.kind="func";class E extends _{render(R){return"return "+super.render(R)}}E.kind="return";class P extends S{render(R){let b="try"+super.render(R);return this.catch&&(b+=this.catch.render(R)),this.finally&&(b+=this.finally.render(R)),
329
- b}optimizeNodes(){var R,b;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(R,b){var C,B;return super.optimizeNames(R,b),(C=this.catch)===null||C===void 0||C.optimizeNames(R,b),(B=this.finally)===null||B===void 0||B.optimizeNames(R,b),this}get names(){const R=super.names;return this.catch&&H(R,this.catch.names),this.finally&&H(R,this.finally.names),R}}class k extends S{constructor(R){super(),
330
- this.error=R}render(R){return`catch(${this.error})`+super.render(R)}}k.kind="catch";class U extends S{render(R){return"finally"+super.render(R)}}U.kind="finally";class q{constructor(R,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
331
- `:""},this._extScope=R,this._scope=new r.Scope({parent:R}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,b){const C=this._extScope.value(R,b);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(R,b){return this._extScope.getValue(R,b)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,b,C,B){
332
- const K=this._scope.toName(b);return C!==void 0&&B&&(this._constants[K.str]=C),this._leafNode(new o(R,K,C)),K}const(R,b,C){return this._def(r.varKinds.const,R,b,C)}let(R,b,C){return this._def(r.varKinds.let,R,b,C)}var(R,b,C){return this._def(r.varKinds.var,R,b,C)}assign(R,b,C){return this._leafNode(new a(R,b,C))}add(R,b){return this._leafNode(new i(R,e.operators.ADD,b))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new y(R)),this}object(...R){const b=["{"];for(const[C,B]of R)
330
+ b}optimizeNodes(){var R,b;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(R,b){var C,B;return super.optimizeNames(R,b),(C=this.catch)===null||C===void 0||C.optimizeNames(R,b),(B=this.finally)===null||B===void 0||B.optimizeNames(R,b),this}get names(){const R=super.names;return this.catch&&H(R,this.catch.names),this.finally&&H(R,this.finally.names),R}}class O extends S{constructor(R){super(),
331
+ this.error=R}render(R){return`catch(${this.error})`+super.render(R)}}O.kind="catch";class U extends S{render(R){return"finally"+super.render(R)}}U.kind="finally";class x{constructor(R,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
332
+ `:""},this._extScope=R,this._scope=new r.Scope({parent:R}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,b){const C=this._extScope.value(R,b);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(R,b){return this._extScope.getValue(R,b)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,b,C,B){
333
+ const K=this._scope.toName(b);return C!==void 0&&B&&(this._constants[K.str]=C),this._leafNode(new o(R,K,C)),K}const(R,b,C){return this._def(r.varKinds.const,R,b,C)}let(R,b,C){return this._def(r.varKinds.let,R,b,C)}var(R,b,C){return this._def(r.varKinds.var,R,b,C)}assign(R,b,C){return this._leafNode(new a(R,b,C))}add(R,b){return this._leafNode(new u(R,e.operators.ADD,b))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new y(R)),this}object(...R){const b=["{"];for(const[C,B]of R)
333
334
  b.length>1&&b.push(","),b.push(C),(C!==B||this.opts.es5)&&(b.push(":"),(0,t.addCodeArg)(b,B));return b.push("}"),new t._Code(b)}if(R,b,C){if(this._blockNode(new h(R)),b&&C)this.code(b).else().code(C).endIf();else if(b)this.code(b).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(R){return this._elseNode(new h(R))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(h,p)}_for(R,b){return this._blockNode(R),b&&this.code(b).endFor(),this}for(R,b){
334
- return this._for(new d(R),b)}forRange(R,b,C,B,K=this.opts.es5?r.varKinds.var:r.varKinds.let){const ee=this._scope.toName(R);return this._for(new $(K,ee,b,C),()=>B(ee))}forOf(R,b,C,B=r.varKinds.const){const K=this._scope.toName(R);if(this.opts.es5){const ee=b instanceof t.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,t._)`${ee}.length`,re=>{this.var(K,(0,t._)`${ee}[${re}]`),C(K)})}return this._for(new v("of",B,K,b),()=>C(K))}forIn(R,b,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){
335
- if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${b})`,C);const K=this._scope.toName(R);return this._for(new v("in",B,K,b),()=>C(K))}endFor(){return this._endBlockNode(f)}label(R){return this._leafNode(new u(R))}break(R){return this._leafNode(new l(R))}return(R){const b=new E;if(this._blockNode(b),this.code(R),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(R,b,C){if(!b&&!C)throw new Error('CodeGen: "try" without "c\
336
- atch" and "finally"');const B=new P;if(this._blockNode(B),this.code(R),b){const K=this.name("e");this._currNode=B.catch=new k(K),b(K)}return C&&(this._currNode=B.finally=new U,this.code(C)),this._endBlockNode(k,U)}throw(R){return this._leafNode(new m(R))}block(R,b){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(b),this}endBlock(R){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-b;if(C<0||
335
+ return this._for(new d(R),b)}forRange(R,b,C,B,K=this.opts.es5?r.varKinds.var:r.varKinds.let){const ee=this._scope.toName(R);return this._for(new g(K,ee,b,C),()=>B(ee))}forOf(R,b,C,B=r.varKinds.const){const K=this._scope.toName(R);if(this.opts.es5){const ee=b instanceof t.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,t._)`${ee}.length`,re=>{this.var(K,(0,t._)`${ee}[${re}]`),C(K)})}return this._for(new v("of",B,K,b),()=>C(K))}forIn(R,b,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){
336
+ if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${b})`,C);const K=this._scope.toName(R);return this._for(new v("in",B,K,b),()=>C(K))}endFor(){return this._endBlockNode(f)}label(R){return this._leafNode(new c(R))}break(R){return this._leafNode(new l(R))}return(R){const b=new E;if(this._blockNode(b),this.code(R),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(R,b,C){if(!b&&!C)throw new Error('CodeGen: "try" without "c\
337
+ atch" and "finally"');const B=new P;if(this._blockNode(B),this.code(R),b){const K=this.name("e");this._currNode=B.catch=new O(K),b(K)}return C&&(this._currNode=B.finally=new U,this.code(C)),this._endBlockNode(O,U)}throw(R){return this._leafNode(new m(R))}block(R,b){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(b),this}endBlock(R){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-b;if(C<0||
337
338
  R!==void 0&&C!==R)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${R} expected`);return this._nodes.length=b,this}func(R,b=t.nil,C,B){return this._blockNode(new w(R,b,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(R=1){for(;R-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(R){return this._currNode.nodes.push(R),this}_blockNode(R){this._currNode.nodes.push(R),this._nodes.push(R)}_endBlockNode(R,b){
338
- const C=this._currNode;if(C instanceof R||b&&C instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${R.kind}/${b.kind}`:R.kind}"`)}_elseNode(R){const b=this._currNode;if(!(b instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=R,this}get _root(){return this._nodes[0]}get _currNode(){const R=this._nodes;return R[R.length-1]}set _currNode(R){const b=this._nodes;b[b.length-1]=R}}e.CodeGen=q;function H(N,R){for(const b in R)N[b]=
339
- (N[b]||0)+(R[b]||0);return N}function D(N,R){return R instanceof t._CodeOrName?H(N,R.names):N}function I(N,R,b){if(N instanceof t.Name)return C(N);if(!B(N))return N;return new t._Code(N._items.reduce((K,ee)=>(ee instanceof t.Name&&(ee=C(ee)),ee instanceof t._Code?K.push(...ee._items):K.push(ee),K),[]));function C(K){const ee=b[K.str];return ee===void 0||R[K.str]!==1?K:(delete R[K.str],ee)}function B(K){return K instanceof t._Code&&K._items.some(ee=>ee instanceof t.Name&&R[ee.str]===1&&b[ee.str]!==
340
- void 0)}}function M(N,R){for(const b in R)N[b]=(N[b]||0)-(R[b]||0)}function z(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,t._)`!${L(N)}`}e.not=z;const F=A(e.operators.AND);function G(...N){return N.reduce(F)}e.and=G;const Q=A(e.operators.OR);function x(...N){return N.reduce(Q)}e.or=x;function A(N){return(R,b)=>R===t.nil?b:b===t.nil?R:(0,t._)`${L(R)} ${N} ${L(b)}`}function L(N){return N instanceof t.Name?N:(0,t._)`(${N})`}})(ds)),ds}var ce={},ei;function fe(){if(ei)return ce;
341
- ei=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.checkStrictMode=ce.getErrorPath=ce.Type=ce.useFunc=ce.setEvaluated=ce.evaluatedPropsToName=ce.mergeEvaluated=ce.eachItem=ce.unescapeJsonPointer=ce.escapeJsonPointer=ce.escapeFragment=ce.unescapeFragment=ce.schemaRefOrVal=ce.schemaHasRulesButRef=ce.schemaHasRules=ce.checkUnknownRules=ce.alwaysValidSchema=ce.toHash=void 0;const e=oe(),t=er();function r(v){const w={};for(const E of v)w[E]=!0;return w}ce.toHash=r;function n(v,w){return typeof w==
342
- "boolean"?w:Object.keys(w).length===0?!0:(c(v,w),!s(w,v.self.RULES.all))}ce.alwaysValidSchema=n;function c(v,w=v.schema){const{opts:E,self:P}=v;if(!E.strictSchema||typeof w=="boolean")return;const k=P.RULES.keywords;for(const U in w)k[U]||$(v,`unknown keyword: "${U}"`)}ce.checkUnknownRules=c;function s(v,w){if(typeof v=="boolean")return!v;for(const E in v)if(w[E])return!0;return!1}ce.schemaHasRules=s;function o(v,w){if(typeof v=="boolean")return!v;for(const E in v)if(E!=="$ref"&&w.all[E])return!0;
343
- return!1}ce.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:w},E,P,k){if(!k){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${v}${w}${(0,e.getProperty)(P)}`}ce.schemaRefOrVal=a;function i(v){return m(decodeURIComponent(v))}ce.unescapeFragment=i;function u(v){return encodeURIComponent(l(v))}ce.escapeFragment=u;function l(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ce.escapeJsonPointer=l;function m(v){
344
- return v.replace(/~1/g,"/").replace(/~0/g,"~")}ce.unescapeJsonPointer=m;function y(v,w){if(Array.isArray(v))for(const E of v)w(E);else w(v)}ce.eachItem=y;function _({mergeNames:v,mergeToName:w,mergeValues:E,resultToName:P}){return(k,U,q,H)=>{const D=q===void 0?U:q instanceof e.Name?(U instanceof e.Name?v(k,U,q):w(k,U,q),q):U instanceof e.Name?(w(k,q,U),U):E(U,q);return H===e.Name&&!(D instanceof e.Name)?P(k,D):D}}ce.mergeEvaluated={props:_({mergeNames:(v,w,E)=>v.if((0,e._)`${E} !== true && ${w} !== undefined`,
345
- ()=>{v.if((0,e._)`${w} === true`,()=>v.assign(E,!0),()=>v.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${w})`))}),mergeToName:(v,w,E)=>v.if((0,e._)`${E} !== true`,()=>{w===!0?v.assign(E,!0):(v.assign(E,(0,e._)`${E} || {}`),g(v,E,w))}),mergeValues:(v,w)=>v===!0?!0:{...v,...w},resultToName:S}),items:_({mergeNames:(v,w,E)=>v.if((0,e._)`${E} !== true && ${w} !== undefined`,()=>v.assign(E,(0,e._)`${w} === true ? true : ${E} > ${w} ? ${E} : ${w}`)),mergeToName:(v,w,E)=>v.if((0,e._)`${E} !== true`,
346
- ()=>v.assign(E,w===!0?!0:(0,e._)`${E} > ${w} ? ${E} : ${w}`)),mergeValues:(v,w)=>v===!0?!0:Math.max(v,w),resultToName:(v,w)=>v.var("items",w)})};function S(v,w){if(w===!0)return v.var("props",!0);const E=v.var("props",(0,e._)`{}`);return w!==void 0&&g(v,E,w),E}ce.evaluatedPropsToName=S;function g(v,w,E){Object.keys(E).forEach(P=>v.assign((0,e._)`${w}${(0,e.getProperty)(P)}`,!0))}ce.setEvaluated=g;const p={};function h(v,w){return v.scopeValue("func",{ref:w,code:p[w.code]||(p[w.code]=new t._Code(
347
- w.code))})}ce.useFunc=h;var f;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(f||(ce.Type=f={}));function d(v,w,E){if(v instanceof e.Name){const P=w===f.Num;return E?P?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:P?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(v).toString():"/"+l(v)}ce.getErrorPath=d;function $(v,w,E=v.opts.strictSchema){if(E){if(w=`strict mode: ${w}`,E===!0)throw new Error(w);v.self.logger.warn(w)}}return ce.
348
- checkStrictMode=$,ce}var tr={},ti;function Oe(){if(ti)return tr;ti=1,Object.defineProperty(tr,"__esModule",{value:!0});const e=oe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.
349
- Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return tr.default=t,tr}var ri;function rr(){return ri||(ri=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=oe(),r=fe(),n=Oe();e.keywordError={message:({keyword:p})=>(0,t.str)`must pass "${p}" keyword validation`},e.keyword$DataError={message:({
350
- keyword:p,schemaType:h})=>h?(0,t.str)`"${p}" keyword must be ${h} ($data)`:(0,t.str)`"${p}" keyword is invalid ($data)`};function c(p,h=e.keywordError,f,d){const{it:$}=p,{gen:v,compositeRule:w,allErrors:E}=$,P=m(p,h,f);d??(w||E)?i(v,P):u($,(0,t._)`[${P}]`)}e.reportError=c;function s(p,h=e.keywordError,f){const{it:d}=p,{gen:$,compositeRule:v,allErrors:w}=d,E=m(p,h,f);i($,E),v||w||u(d,n.default.vErrors)}e.reportExtraError=s;function o(p,h){p.assign(n.default.errors,h),p.if((0,t._)`${n.default.vErrors} !== null`,
351
- ()=>p.if(h,()=>p.assign((0,t._)`${n.default.vErrors}.length`,h),()=>p.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:p,keyword:h,schemaValue:f,data:d,errsCount:$,it:v}){if($===void 0)throw new Error("ajv implementation error");const w=p.name("err");p.forRange("i",$,n.default.errors,E=>{p.const(w,(0,t._)`${n.default.vErrors}[${E}]`),p.if((0,t._)`${w}.instancePath === undefined`,()=>p.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(n.default.instancePath,v.errorPath))),p.assign(
352
- (0,t._)`${w}.schemaPath`,(0,t.str)`${v.errSchemaPath}/${h}`),v.opts.verbose&&(p.assign((0,t._)`${w}.schema`,f),p.assign((0,t._)`${w}.data`,d))})}e.extendErrors=a;function i(p,h){const f=p.const("err",h);p.if((0,t._)`${n.default.vErrors} === null`,()=>p.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),p.code((0,t._)`${n.default.errors}++`)}function u(p,h){const{gen:f,validateName:d,schemaEnv:$}=p;$.$async?f.throw((0,t._)`new ${p.ValidationError}(${h})`):(f.assign(
353
- (0,t._)`${d}.errors`,h),f.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(p,h,f){const{createErrors:d}=p.it;return d===!1?(0,t._)`{}`:y(p,h,f)}function y(p,h,f={}){const{gen:d,it:$}=p,v=[_($,f),S(p,f)];return g(p,h,v),d.object(...v)}function _({errorPath:p},{instancePath:h}){const f=h?
354
- (0,t.str)`${p}${(0,r.getErrorPath)(h,r.Type.Str)}`:p;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function S({keyword:p,it:{errSchemaPath:h}},{schemaPath:f,parentSchema:d}){let $=d?h:(0,t.str)`${h}/${p}`;return f&&($=(0,t.str)`${$}${(0,r.getErrorPath)(f,r.Type.Str)}`),[l.schemaPath,$]}function g(p,{params:h,message:f},d){const{keyword:$,data:v,schemaValue:w,it:E}=p,{opts:P,propertyName:k,topSchemaRef:U,schemaPath:q}=E;d.push([l.keyword,$],[l.params,typeof h=="function"?
355
- h(p):h||(0,t._)`{}`]),P.messages&&d.push([l.message,typeof f=="function"?f(p):f]),P.verbose&&d.push([l.schema,w],[l.parentSchema,(0,t._)`${U}${q}`],[n.default.data,v]),k&&d.push([l.propertyName,k])}})(fs)),fs}var ni;function Jp(){if(ni)return nt;ni=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.boolOrEmptySchema=nt.topBoolOrEmptySchema=void 0;const e=rr(),t=oe(),r=Oe(),n={message:"boolean schema is false"};function c(a){const{gen:i,schema:u,validateName:l}=a;u===!1?o(a,!1):typeof u=="obj\
356
- ect"&&u.$async===!0?i.return(r.default.data):(i.assign((0,t._)`${l}.errors`,null),i.return(!0))}nt.topBoolOrEmptySchema=c;function s(a,i){const{gen:u,schema:l}=a;l===!1?(u.var(i,!1),o(a)):u.var(i,!0)}nt.boolOrEmptySchema=s;function o(a,i){const{gen:u,data:l}=a,m={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(m,n,void 0,i)}return nt}var ge={},st={},si;function oi(){if(si)return st;si=1,Object.defineProperty(st,"__esModule",{value:!0}),
357
- st.getRules=st.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(c){return typeof c=="string"&&t.has(c)}st.isJSONType=r;function n(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}return st.getRules=n,st}var ze={},
358
- ai;function ii(){if(ai)return ze;ai=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.shouldUseRule=ze.shouldUseGroup=ze.schemaHasRulesForType=void 0;function e({schema:n,self:c},s){const o=c.RULES.types[s];return o&&o!==!0&&t(n,o)}ze.schemaHasRulesForType=e;function t(n,c){return c.rules.some(s=>r(n,s))}ze.shouldUseGroup=t;function r(n,c){var s;return n[c.keyword]!==void 0||((s=c.definition.implements)===null||s===void 0?void 0:s.some(o=>n[o]!==void 0))}return ze.shouldUseRule=r,ze}var ci;
359
- function nr(){if(ci)return ge;ci=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.reportTypeError=ge.checkDataTypes=ge.checkDataType=ge.coerceAndCheckDataType=ge.getJSONTypes=ge.getSchemaTypes=ge.DataType=void 0;const e=oi(),t=ii(),r=rr(),n=oe(),c=fe();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(ge.DataType=s={}));function o(f){const d=a(f.type);if(d.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&
360
- f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&d.push("null")}return d}ge.getSchemaTypes=o;function a(f){const d=Array.isArray(f)?f:f?[f]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ge.getJSONTypes=a;function i(f,d){const{gen:$,data:v,opts:w}=f,E=l(d,w.coerceTypes),P=d.length>0&&!(E.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(f,d[0]));if(P){const k=S(d,v,w.strictNumbers,s.Wrong);
361
- $.if(k,()=>{E.length?m(f,d,E):p(f)})}return P}ge.coerceAndCheckDataType=i;const u=new Set(["string","number","integer","boolean","null"]);function l(f,d){return d?f.filter($=>u.has($)||d==="array"&&$==="array"):[]}function m(f,d,$){const{gen:v,data:w,opts:E}=f,P=v.let("dataType",(0,n._)`typeof ${w}`),k=v.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&v.if((0,n._)`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>v.assign(w,(0,n._)`${w}[0]`).assign(P,(0,n._)`typeof ${w}`).
362
- if(S(d,w,E.strictNumbers),()=>v.assign(k,w))),v.if((0,n._)`${k} !== undefined`);for(const q of $)(u.has(q)||q==="array"&&E.coerceTypes==="array")&&U(q);v.else(),p(f),v.endIf(),v.if((0,n._)`${k} !== undefined`,()=>{v.assign(w,k),y(f,k)});function U(q){switch(q){case"string":v.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(k,(0,n._)`"" + ${w}`).elseIf((0,n._)`${w} === null`).assign(k,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${P} == "boolean" || ${w} === null
363
- || (${P} == "string" && ${w} && ${w} == +${w})`).assign(k,(0,n._)`+${w}`);return;case"integer":v.elseIf((0,n._)`${P} === "boolean" || ${w} === null
364
- || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(k,(0,n._)`+${w}`);return;case"boolean":v.elseIf((0,n._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(k,!1).elseIf((0,n._)`${w} === "true" || ${w} === 1`).assign(k,!0);return;case"null":v.elseIf((0,n._)`${w} === "" || ${w} === 0 || ${w} === false`),v.assign(k,null);return;case"array":v.elseIf((0,n._)`${P} === "string" || ${P} === "number"
365
- || ${P} === "boolean" || ${w} === null`).assign(k,(0,n._)`[${w}]`)}}}function y({gen:f,parentData:d,parentDataProperty:$},v){f.if((0,n._)`${d} !== undefined`,()=>f.assign((0,n._)`${d}[${$}]`,v))}function _(f,d,$,v=s.Correct){const w=v===s.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${d} ${w} null`;case"array":E=(0,n._)`Array.isArray(${d})`;break;case"object":E=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":E=
366
- P((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":E=P();break;default:return(0,n._)`typeof ${d} ${w} ${f}`}return v===s.Correct?E:(0,n.not)(E);function P(k=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,k,$?(0,n._)`isFinite(${d})`:n.nil)}}ge.checkDataType=_;function S(f,d,$,v){if(f.length===1)return _(f[0],d,$,v);let w;const E=(0,c.toHash)(f);if(E.array&&E.object){const P=(0,n._)`typeof ${d} != "object"`;w=E.null?P:(0,n._)`!${d} || ${P}`,delete E.null,delete E.array,delete E.object}else
367
- w=n.nil;E.number&&delete E.integer;for(const P in E)w=(0,n.and)(w,_(P,d,$,v));return w}ge.checkDataTypes=S;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:d})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${d}}`};function p(f){const d=h(f);(0,r.reportError)(d,g)}ge.reportTypeError=p;function h(f){const{gen:d,data:$,schema:v}=f,w=(0,c.schemaRefOrVal)(f,v,"type");return{gen:d,keyword:"type",data:$,schema:v.type,schemaCode:w,schemaValue:w,parentSchema:v,params:{},
368
- it:f}}return ge}var Ot={},ui;function Yp(){if(ui)return Ot;ui=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.assignDefaults=void 0;const e=oe(),t=fe();function r(c,s){const{properties:o,items:a}=c.schema;if(s==="object"&&o)for(const i in o)n(c,i,o[i].default);else s==="array"&&Array.isArray(a)&&a.forEach((i,u)=>n(c,u,i.default))}Ot.assignDefaults=r;function n(c,s,o){const{gen:a,compositeRule:i,data:u,opts:l}=c;if(o===void 0)return;const m=(0,e._)`${u}${(0,e.getProperty)(s)}`;if(i){(0,t.checkStrictMode)(
369
- c,`default is ignored for: ${m}`);return}let y=(0,e._)`${m} === undefined`;l.useDefaults==="empty"&&(y=(0,e._)`${y} || ${m} === null || ${m} === ""`),a.if(y,(0,e._)`${m} = ${(0,e.stringify)(o)}`)}return Ot}var ke={},de={},li;function Ie(){if(li)return de;li=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=
370
- de.checkMissingProp=de.checkReportMissingProp=void 0;const e=oe(),t=fe(),r=Oe(),n=fe();function c(f,d){const{gen:$,data:v,it:w}=f;$.if(l($,v,d,w.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${d}`},!0),f.error()})}de.checkReportMissingProp=c;function s({gen:f,data:d,it:{opts:$}},v,w){return(0,e.or)(...v.map(E=>(0,e.and)(l(f,d,E,$.ownProperties),(0,e._)`${w} = ${E}`)))}de.checkMissingProp=s;function o(f,d){f.setParams({missingProperty:d},!0),f.error()}de.reportMissingProp=o;function a(f){
371
- return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=a;function i(f,d,$){return(0,e._)`${a(f)}.call(${d}, ${$})`}de.isOwnProperty=i;function u(f,d,$,v){const w=(0,e._)`${d}${(0,e.getProperty)($)} !== undefined`;return v?(0,e._)`${w} && ${i(f,d,$)}`:w}de.propertyInData=u;function l(f,d,$,v){const w=(0,e._)`${d}${(0,e.getProperty)($)} === undefined`;return v?(0,e.or)(w,(0,e.not)(i(f,d,$))):w}de.noPropertyInData=l;function m(f){
372
- return f?Object.keys(f).filter(d=>d!=="__proto__"):[]}de.allSchemaProperties=m;function y(f,d){return m(d).filter($=>!(0,t.alwaysValidSchema)(f,d[$]))}de.schemaProperties=y;function _({schemaCode:f,data:d,it:{gen:$,topSchemaRef:v,schemaPath:w,errorPath:E},it:P},k,U,q){const H=q?(0,e._)`${f}, ${d}, ${v}${w}`:d,D=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];
373
- P.opts.dynamicRef&&D.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const I=(0,e._)`${H}, ${$.object(...D)}`;return U!==e.nil?(0,e._)`${k}.call(${U}, ${I})`:(0,e._)`${k}(${I})`}de.callValidateCode=_;const S=(0,e._)`new RegExp`;function g({gen:f,it:{opts:d}},$){const v=d.unicodeRegExp?"u":"",{regExp:w}=d.code,E=w($,v);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${w.code==="new RegExp"?S:(0,n.useFunc)(f,w)}(${$}, ${v})`})}de.usePattern=g;function p(f){const{gen:d,
374
- data:$,keyword:v,it:w}=f,E=d.name("valid");if(w.allErrors){const k=d.let("valid",!0);return P(()=>d.assign(k,!1)),k}return d.var(E,!0),P(()=>d.break()),E;function P(k){const U=d.const("len",(0,e._)`${$}.length`);d.forRange("i",0,U,q=>{f.subschema({keyword:v,dataProp:q,dataPropType:t.Type.Num},E),d.if((0,e.not)(E),k)})}}de.validateArray=p;function h(f){const{gen:d,schema:$,keyword:v,it:w}=f;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(U=>(0,t.alwaysValidSchema)(w,U))&&
375
- !w.opts.unevaluated)return;const P=d.let("valid",!1),k=d.name("_valid");d.block(()=>$.forEach((U,q)=>{const H=f.subschema({keyword:v,schemaProp:q,compositeRule:!0},k);d.assign(P,(0,e._)`${P} || ${k}`),f.mergeValidEvaluated(H,k)||d.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return de.validateUnion=h,de}var fi;function Qp(){if(fi)return ke;fi=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateKeywordUsage=ke.validSchemaType=ke.funcKeywordCode=ke.macroKeywordCode=void 0;
376
- const e=oe(),t=Oe(),r=Ie(),n=rr();function c(y,_){const{gen:S,keyword:g,schema:p,parentSchema:h,it:f}=y,d=_.macro.call(f.self,p,h,f),$=u(S,g,d);f.opts.validateSchema!==!1&&f.self.validateSchema(d,!0);const v=S.name("valid");y.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:$,compositeRule:!0},v),y.pass(v,()=>y.error(!0))}ke.macroKeywordCode=c;function s(y,_){var S;const{gen:g,keyword:p,schema:h,parentSchema:f,$data:d,it:$}=y;i($,_);const v=!d&&_.compile?
377
- _.compile.call($.self,h,f,$):_.validate,w=u(g,p,v),E=g.let("valid");y.block$data(E,P),y.ok((S=_.valid)!==null&&S!==void 0?S:E);function P(){if(_.errors===!1)q(),_.modifying&&o(y),H(()=>y.error());else{const D=_.async?k():U();_.modifying&&o(y),H(()=>a(y,D))}}function k(){const D=g.let("ruleErrs",null);return g.try(()=>q((0,e._)`await `),I=>g.assign(E,!1).if((0,e._)`${I} instanceof ${$.ValidationError}`,()=>g.assign(D,(0,e._)`${I}.errors`),()=>g.throw(I))),D}function U(){const D=(0,e._)`${w}.errors`;
378
- return g.assign(D,null),q(e.nil),D}function q(D=_.async?(0,e._)`await `:e.nil){const I=$.opts.passContext?t.default.this:t.default.self,M=!("compile"in _&&!d||_.schema===!1);g.assign(E,(0,e._)`${D}${(0,r.callValidateCode)(y,w,I,M)}`,_.modifying)}function H(D){var I;g.if((0,e.not)((I=_.valid)!==null&&I!==void 0?I:E),D)}}ke.funcKeywordCode=s;function o(y){const{gen:_,data:S,it:g}=y;_.if(g.parentData,()=>_.assign(S,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:S}=y;S.
379
- if((0,e._)`Array.isArray(${_})`,()=>{S.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(y)},()=>y.error())}function i({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function u(y,_,S){if(S===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,e.
380
- stringify)(S)})}function l(y,_,S=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||S&&typeof y>"u")}ke.validSchemaType=l;function m({schema:y,opts:_,self:S,errSchemaPath:g},p,h){if(Array.isArray(p.keyword)?!p.keyword.includes(h):p.keyword!==h)throw new Error("ajv implementation error");const f=p.dependencies;if(f?.some(d=>!Object.prototype.hasOwnProperty.call(y,d)))throw new Error(`parent schema must have dependencies o\
381
- f ${h}: ${f.join(",")}`);if(p.validateSchema&&!p.validateSchema(y[h])){const $=`keyword "${h}" value is invalid at path "${g}": `+S.errorsText(p.validateSchema.errors);if(_.validateSchema==="log")S.logger.error($);else throw new Error($)}}return ke.validateKeywordUsage=m,ke}var Ge={},di;function Zp(){if(di)return Ge;di=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.extendSubschemaMode=Ge.extendSubschemaData=Ge.getSubschema=void 0;const e=oe(),t=fe();function r(s,{keyword:o,schemaProp:a,schema:i,
382
- schemaPath:u,errSchemaPath:l,topSchemaRef:m}){if(o!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const y=s.schema[o];return a===void 0?{schema:y,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${o}`}:{schema:y[a],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(o)}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${o}/${(0,t.escapeFragment)(a)}`}}if(i!==void 0){if(u===void 0||
383
- l===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:u,topSchemaRef:m,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Ge.getSubschema=r;function n(s,o,{dataProp:a,dataPropType:i,data:u,dataTypes:l,propertyName:m}){if(u!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=o;if(a!==void 0){const{errorPath:S,dataPathArr:g,opts:p}=o,
384
- h=y.let("data",(0,e._)`${o.data}${(0,e.getProperty)(a)}`,!0);_(h),s.errorPath=(0,e.str)`${S}${(0,t.getErrorPath)(a,i,p.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${a}`,s.dataPathArr=[...g,s.parentDataProperty]}if(u!==void 0){const S=u instanceof e.Name?u:y.let("data",u,!0);_(S),m!==void 0&&(s.propertyName=m)}l&&(s.dataTypes=l);function _(S){s.data=S,s.dataLevel=o.dataLevel+1,s.dataTypes=[],o.definedProperties=new Set,s.parentData=o.data,s.dataNames=[...o.dataNames,S]}}Ge.extendSubschemaData=
385
- n;function c(s,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:i,createErrors:u,allErrors:l}){i!==void 0&&(s.compositeRule=i),u!==void 0&&(s.createErrors=u),l!==void 0&&(s.allErrors=l),s.jtdDiscriminator=o,s.jtdMetadata=a}return Ge.extendSubschemaMode=c,Ge}var Ee={},ms={exports:{}},pi;function eh(){if(pi)return ms.exports;pi=1;var e=ms.exports=function(n,c,s){typeof c=="function"&&(s=c,c={}),s=c.cb||s;var o=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};t(c,o,a,n,"",n)};e.keywords=
339
+ const C=this._currNode;if(C instanceof R||b&&C instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${R.kind}/${b.kind}`:R.kind}"`)}_elseNode(R){const b=this._currNode;if(!(b instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=R,this}get _root(){return this._nodes[0]}get _currNode(){const R=this._nodes;return R[R.length-1]}set _currNode(R){const b=this._nodes;b[b.length-1]=R}}e.CodeGen=x;function H(T,R){for(const b in R)T[b]=
340
+ (T[b]||0)+(R[b]||0);return T}function D(T,R){return R instanceof t._CodeOrName?H(T,R.names):T}function I(T,R,b){if(T instanceof t.Name)return C(T);if(!B(T))return T;return new t._Code(T._items.reduce((K,ee)=>(ee instanceof t.Name&&(ee=C(ee)),ee instanceof t._Code?K.push(...ee._items):K.push(ee),K),[]));function C(K){const ee=b[K.str];return ee===void 0||R[K.str]!==1?K:(delete R[K.str],ee)}function B(K){return K instanceof t._Code&&K._items.some(ee=>ee instanceof t.Name&&R[ee.str]===1&&b[ee.str]!==
341
+ void 0)}}function M(T,R){for(const b in R)T[b]=(T[b]||0)-(R[b]||0)}function z(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${L(T)}`}e.not=z;const F=A(e.operators.AND);function G(...T){return T.reduce(F)}e.and=G;const Q=A(e.operators.OR);function q(...T){return T.reduce(Q)}e.or=q;function A(T){return(R,b)=>R===t.nil?b:b===t.nil?R:(0,t._)`${L(R)} ${T} ${L(b)}`}function L(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(ds)),ds}var ce={},ti;function fe(){if(ti)return ce;
342
+ ti=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.checkStrictMode=ce.getErrorPath=ce.Type=ce.useFunc=ce.setEvaluated=ce.evaluatedPropsToName=ce.mergeEvaluated=ce.eachItem=ce.unescapeJsonPointer=ce.escapeJsonPointer=ce.escapeFragment=ce.unescapeFragment=ce.schemaRefOrVal=ce.schemaHasRulesButRef=ce.schemaHasRules=ce.checkUnknownRules=ce.alwaysValidSchema=ce.toHash=void 0;const e=ae(),t=er();function r(v){const w={};for(const E of v)w[E]=!0;return w}ce.toHash=r;function n(v,w){return typeof w==
343
+ "boolean"?w:Object.keys(w).length===0?!0:(i(v,w),!s(w,v.self.RULES.all))}ce.alwaysValidSchema=n;function i(v,w=v.schema){const{opts:E,self:P}=v;if(!E.strictSchema||typeof w=="boolean")return;const O=P.RULES.keywords;for(const U in w)O[U]||g(v,`unknown keyword: "${U}"`)}ce.checkUnknownRules=i;function s(v,w){if(typeof v=="boolean")return!v;for(const E in v)if(w[E])return!0;return!1}ce.schemaHasRules=s;function o(v,w){if(typeof v=="boolean")return!v;for(const E in v)if(E!=="$ref"&&w.all[E])return!0;
344
+ return!1}ce.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:w},E,P,O){if(!O){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${v}${w}${(0,e.getProperty)(P)}`}ce.schemaRefOrVal=a;function u(v){return m(decodeURIComponent(v))}ce.unescapeFragment=u;function c(v){return encodeURIComponent(l(v))}ce.escapeFragment=c;function l(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ce.escapeJsonPointer=l;function m(v){
345
+ return v.replace(/~1/g,"/").replace(/~0/g,"~")}ce.unescapeJsonPointer=m;function y(v,w){if(Array.isArray(v))for(const E of v)w(E);else w(v)}ce.eachItem=y;function _({mergeNames:v,mergeToName:w,mergeValues:E,resultToName:P}){return(O,U,x,H)=>{const D=x===void 0?U:x instanceof e.Name?(U instanceof e.Name?v(O,U,x):w(O,U,x),x):U instanceof e.Name?(w(O,x,U),U):E(U,x);return H===e.Name&&!(D instanceof e.Name)?P(O,D):D}}ce.mergeEvaluated={props:_({mergeNames:(v,w,E)=>v.if((0,e._)`${E} !== true && ${w} !== undefined`,
346
+ ()=>{v.if((0,e._)`${w} === true`,()=>v.assign(E,!0),()=>v.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${w})`))}),mergeToName:(v,w,E)=>v.if((0,e._)`${E} !== true`,()=>{w===!0?v.assign(E,!0):(v.assign(E,(0,e._)`${E} || {}`),$(v,E,w))}),mergeValues:(v,w)=>v===!0?!0:{...v,...w},resultToName:S}),items:_({mergeNames:(v,w,E)=>v.if((0,e._)`${E} !== true && ${w} !== undefined`,()=>v.assign(E,(0,e._)`${w} === true ? true : ${E} > ${w} ? ${E} : ${w}`)),mergeToName:(v,w,E)=>v.if((0,e._)`${E} !== true`,
347
+ ()=>v.assign(E,w===!0?!0:(0,e._)`${E} > ${w} ? ${E} : ${w}`)),mergeValues:(v,w)=>v===!0?!0:Math.max(v,w),resultToName:(v,w)=>v.var("items",w)})};function S(v,w){if(w===!0)return v.var("props",!0);const E=v.var("props",(0,e._)`{}`);return w!==void 0&&$(v,E,w),E}ce.evaluatedPropsToName=S;function $(v,w,E){Object.keys(E).forEach(P=>v.assign((0,e._)`${w}${(0,e.getProperty)(P)}`,!0))}ce.setEvaluated=$;const p={};function h(v,w){return v.scopeValue("func",{ref:w,code:p[w.code]||(p[w.code]=new t._Code(
348
+ w.code))})}ce.useFunc=h;var f;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(f||(ce.Type=f={}));function d(v,w,E){if(v instanceof e.Name){const P=w===f.Num;return E?P?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:P?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(v).toString():"/"+l(v)}ce.getErrorPath=d;function g(v,w,E=v.opts.strictSchema){if(E){if(w=`strict mode: ${w}`,E===!0)throw new Error(w);v.self.logger.warn(w)}}return ce.
349
+ checkStrictMode=g,ce}var tr={},ri;function Ne(){if(ri)return tr;ri=1,Object.defineProperty(tr,"__esModule",{value:!0});const e=ae(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.
350
+ Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return tr.default=t,tr}var ni;function rr(){return ni||(ni=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ae(),r=fe(),n=Ne();e.keywordError={message:({keyword:p})=>(0,t.str)`must pass "${p}" keyword validation`},e.keyword$DataError={message:({
351
+ keyword:p,schemaType:h})=>h?(0,t.str)`"${p}" keyword must be ${h} ($data)`:(0,t.str)`"${p}" keyword is invalid ($data)`};function i(p,h=e.keywordError,f,d){const{it:g}=p,{gen:v,compositeRule:w,allErrors:E}=g,P=m(p,h,f);d??(w||E)?u(v,P):c(g,(0,t._)`[${P}]`)}e.reportError=i;function s(p,h=e.keywordError,f){const{it:d}=p,{gen:g,compositeRule:v,allErrors:w}=d,E=m(p,h,f);u(g,E),v||w||c(d,n.default.vErrors)}e.reportExtraError=s;function o(p,h){p.assign(n.default.errors,h),p.if((0,t._)`${n.default.vErrors} !== null`,
352
+ ()=>p.if(h,()=>p.assign((0,t._)`${n.default.vErrors}.length`,h),()=>p.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:p,keyword:h,schemaValue:f,data:d,errsCount:g,it:v}){if(g===void 0)throw new Error("ajv implementation error");const w=p.name("err");p.forRange("i",g,n.default.errors,E=>{p.const(w,(0,t._)`${n.default.vErrors}[${E}]`),p.if((0,t._)`${w}.instancePath === undefined`,()=>p.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(n.default.instancePath,v.errorPath))),p.assign(
353
+ (0,t._)`${w}.schemaPath`,(0,t.str)`${v.errSchemaPath}/${h}`),v.opts.verbose&&(p.assign((0,t._)`${w}.schema`,f),p.assign((0,t._)`${w}.data`,d))})}e.extendErrors=a;function u(p,h){const f=p.const("err",h);p.if((0,t._)`${n.default.vErrors} === null`,()=>p.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),p.code((0,t._)`${n.default.errors}++`)}function c(p,h){const{gen:f,validateName:d,schemaEnv:g}=p;g.$async?f.throw((0,t._)`new ${p.ValidationError}(${h})`):(f.assign(
354
+ (0,t._)`${d}.errors`,h),f.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(p,h,f){const{createErrors:d}=p.it;return d===!1?(0,t._)`{}`:y(p,h,f)}function y(p,h,f={}){const{gen:d,it:g}=p,v=[_(g,f),S(p,f)];return $(p,h,v),d.object(...v)}function _({errorPath:p},{instancePath:h}){const f=h?
355
+ (0,t.str)`${p}${(0,r.getErrorPath)(h,r.Type.Str)}`:p;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function S({keyword:p,it:{errSchemaPath:h}},{schemaPath:f,parentSchema:d}){let g=d?h:(0,t.str)`${h}/${p}`;return f&&(g=(0,t.str)`${g}${(0,r.getErrorPath)(f,r.Type.Str)}`),[l.schemaPath,g]}function $(p,{params:h,message:f},d){const{keyword:g,data:v,schemaValue:w,it:E}=p,{opts:P,propertyName:O,topSchemaRef:U,schemaPath:x}=E;d.push([l.keyword,g],[l.params,typeof h=="function"?
356
+ h(p):h||(0,t._)`{}`]),P.messages&&d.push([l.message,typeof f=="function"?f(p):f]),P.verbose&&d.push([l.schema,w],[l.parentSchema,(0,t._)`${U}${x}`],[n.default.data,v]),O&&d.push([l.propertyName,O])}})(fs)),fs}var si;function Qp(){if(si)return nt;si=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.boolOrEmptySchema=nt.topBoolOrEmptySchema=void 0;const e=rr(),t=ae(),r=Ne(),n={message:"boolean schema is false"};function i(a){const{gen:u,schema:c,validateName:l}=a;c===!1?o(a,!1):typeof c=="obj\
357
+ ect"&&c.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${l}.errors`,null),u.return(!0))}nt.topBoolOrEmptySchema=i;function s(a,u){const{gen:c,schema:l}=a;l===!1?(c.var(u,!1),o(a)):c.var(u,!0)}nt.boolOrEmptySchema=s;function o(a,u){const{gen:c,data:l}=a,m={gen:c,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(m,n,void 0,u)}return nt}var ge={},st={},oi;function ai(){if(oi)return st;oi=1,Object.defineProperty(st,"__esModule",{value:!0}),
358
+ st.getRules=st.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}st.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return st.getRules=n,st}var Ge={},
359
+ ii;function ci(){if(ii)return Ge;ii=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.shouldUseRule=Ge.shouldUseGroup=Ge.schemaHasRulesForType=void 0;function e({schema:n,self:i},s){const o=i.RULES.types[s];return o&&o!==!0&&t(n,o)}Ge.schemaHasRulesForType=e;function t(n,i){return i.rules.some(s=>r(n,s))}Ge.shouldUseGroup=t;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(o=>n[o]!==void 0))}return Ge.shouldUseRule=r,Ge}var ui;
360
+ function nr(){if(ui)return ge;ui=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.reportTypeError=ge.checkDataTypes=ge.checkDataType=ge.coerceAndCheckDataType=ge.getJSONTypes=ge.getSchemaTypes=ge.DataType=void 0;const e=ai(),t=ci(),r=rr(),n=ae(),i=fe();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(ge.DataType=s={}));function o(f){const d=a(f.type);if(d.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&
361
+ f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&d.push("null")}return d}ge.getSchemaTypes=o;function a(f){const d=Array.isArray(f)?f:f?[f]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ge.getJSONTypes=a;function u(f,d){const{gen:g,data:v,opts:w}=f,E=l(d,w.coerceTypes),P=d.length>0&&!(E.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(f,d[0]));if(P){const O=S(d,v,w.strictNumbers,s.Wrong);
362
+ g.if(O,()=>{E.length?m(f,d,E):p(f)})}return P}ge.coerceAndCheckDataType=u;const c=new Set(["string","number","integer","boolean","null"]);function l(f,d){return d?f.filter(g=>c.has(g)||d==="array"&&g==="array"):[]}function m(f,d,g){const{gen:v,data:w,opts:E}=f,P=v.let("dataType",(0,n._)`typeof ${w}`),O=v.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&v.if((0,n._)`${P} == 'object' && Array.isArray(${w}) && ${w}.length == 1`,()=>v.assign(w,(0,n._)`${w}[0]`).assign(P,(0,n._)`typeof ${w}`).
363
+ if(S(d,w,E.strictNumbers),()=>v.assign(O,w))),v.if((0,n._)`${O} !== undefined`);for(const x of g)(c.has(x)||x==="array"&&E.coerceTypes==="array")&&U(x);v.else(),p(f),v.endIf(),v.if((0,n._)`${O} !== undefined`,()=>{v.assign(w,O),y(f,O)});function U(x){switch(x){case"string":v.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(O,(0,n._)`"" + ${w}`).elseIf((0,n._)`${w} === null`).assign(O,(0,n._)`""`);return;case"number":v.elseIf((0,n._)`${P} == "boolean" || ${w} === null
364
+ || (${P} == "string" && ${w} && ${w} == +${w})`).assign(O,(0,n._)`+${w}`);return;case"integer":v.elseIf((0,n._)`${P} === "boolean" || ${w} === null
365
+ || (${P} === "string" && ${w} && ${w} == +${w} && !(${w} % 1))`).assign(O,(0,n._)`+${w}`);return;case"boolean":v.elseIf((0,n._)`${w} === "false" || ${w} === 0 || ${w} === null`).assign(O,!1).elseIf((0,n._)`${w} === "true" || ${w} === 1`).assign(O,!0);return;case"null":v.elseIf((0,n._)`${w} === "" || ${w} === 0 || ${w} === false`),v.assign(O,null);return;case"array":v.elseIf((0,n._)`${P} === "string" || ${P} === "number"
366
+ || ${P} === "boolean" || ${w} === null`).assign(O,(0,n._)`[${w}]`)}}}function y({gen:f,parentData:d,parentDataProperty:g},v){f.if((0,n._)`${d} !== undefined`,()=>f.assign((0,n._)`${d}[${g}]`,v))}function _(f,d,g,v=s.Correct){const w=v===s.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${d} ${w} null`;case"array":E=(0,n._)`Array.isArray(${d})`;break;case"object":E=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":E=
367
+ P((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":E=P();break;default:return(0,n._)`typeof ${d} ${w} ${f}`}return v===s.Correct?E:(0,n.not)(E);function P(O=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,O,g?(0,n._)`isFinite(${d})`:n.nil)}}ge.checkDataType=_;function S(f,d,g,v){if(f.length===1)return _(f[0],d,g,v);let w;const E=(0,i.toHash)(f);if(E.array&&E.object){const P=(0,n._)`typeof ${d} != "object"`;w=E.null?P:(0,n._)`!${d} || ${P}`,delete E.null,delete E.array,delete E.object}else
368
+ w=n.nil;E.number&&delete E.integer;for(const P in E)w=(0,n.and)(w,_(P,d,g,v));return w}ge.checkDataTypes=S;const $={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:d})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${d}}`};function p(f){const d=h(f);(0,r.reportError)(d,$)}ge.reportTypeError=p;function h(f){const{gen:d,data:g,schema:v}=f,w=(0,i.schemaRefOrVal)(f,v,"type");return{gen:d,keyword:"type",data:g,schema:v.type,schemaCode:w,schemaValue:w,parentSchema:v,params:{},
369
+ it:f}}return ge}var Tt={},li;function Zp(){if(li)return Tt;li=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.assignDefaults=void 0;const e=ae(),t=fe();function r(i,s){const{properties:o,items:a}=i.schema;if(s==="object"&&o)for(const u in o)n(i,u,o[u].default);else s==="array"&&Array.isArray(a)&&a.forEach((u,c)=>n(i,c,u.default))}Tt.assignDefaults=r;function n(i,s,o){const{gen:a,compositeRule:u,data:c,opts:l}=i;if(o===void 0)return;const m=(0,e._)`${c}${(0,e.getProperty)(s)}`;if(u){(0,t.checkStrictMode)(
370
+ i,`default is ignored for: ${m}`);return}let y=(0,e._)`${m} === undefined`;l.useDefaults==="empty"&&(y=(0,e._)`${y} || ${m} === null || ${m} === ""`),a.if(y,(0,e._)`${m} = ${(0,e.stringify)(o)}`)}return Tt}var Oe={},de={},fi;function Ie(){if(fi)return de;fi=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=
371
+ de.checkMissingProp=de.checkReportMissingProp=void 0;const e=ae(),t=fe(),r=Ne(),n=fe();function i(f,d){const{gen:g,data:v,it:w}=f;g.if(l(g,v,d,w.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${d}`},!0),f.error()})}de.checkReportMissingProp=i;function s({gen:f,data:d,it:{opts:g}},v,w){return(0,e.or)(...v.map(E=>(0,e.and)(l(f,d,E,g.ownProperties),(0,e._)`${w} = ${E}`)))}de.checkMissingProp=s;function o(f,d){f.setParams({missingProperty:d},!0),f.error()}de.reportMissingProp=o;function a(f){
372
+ return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=a;function u(f,d,g){return(0,e._)`${a(f)}.call(${d}, ${g})`}de.isOwnProperty=u;function c(f,d,g,v){const w=(0,e._)`${d}${(0,e.getProperty)(g)} !== undefined`;return v?(0,e._)`${w} && ${u(f,d,g)}`:w}de.propertyInData=c;function l(f,d,g,v){const w=(0,e._)`${d}${(0,e.getProperty)(g)} === undefined`;return v?(0,e.or)(w,(0,e.not)(u(f,d,g))):w}de.noPropertyInData=l;function m(f){
373
+ return f?Object.keys(f).filter(d=>d!=="__proto__"):[]}de.allSchemaProperties=m;function y(f,d){return m(d).filter(g=>!(0,t.alwaysValidSchema)(f,d[g]))}de.schemaProperties=y;function _({schemaCode:f,data:d,it:{gen:g,topSchemaRef:v,schemaPath:w,errorPath:E},it:P},O,U,x){const H=x?(0,e._)`${f}, ${d}, ${v}${w}`:d,D=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];
374
+ P.opts.dynamicRef&&D.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const I=(0,e._)`${H}, ${g.object(...D)}`;return U!==e.nil?(0,e._)`${O}.call(${U}, ${I})`:(0,e._)`${O}(${I})`}de.callValidateCode=_;const S=(0,e._)`new RegExp`;function $({gen:f,it:{opts:d}},g){const v=d.unicodeRegExp?"u":"",{regExp:w}=d.code,E=w(g,v);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${w.code==="new RegExp"?S:(0,n.useFunc)(f,w)}(${g}, ${v})`})}de.usePattern=$;function p(f){const{gen:d,
375
+ data:g,keyword:v,it:w}=f,E=d.name("valid");if(w.allErrors){const O=d.let("valid",!0);return P(()=>d.assign(O,!1)),O}return d.var(E,!0),P(()=>d.break()),E;function P(O){const U=d.const("len",(0,e._)`${g}.length`);d.forRange("i",0,U,x=>{f.subschema({keyword:v,dataProp:x,dataPropType:t.Type.Num},E),d.if((0,e.not)(E),O)})}}de.validateArray=p;function h(f){const{gen:d,schema:g,keyword:v,it:w}=f;if(!Array.isArray(g))throw new Error("ajv implementation error");if(g.some(U=>(0,t.alwaysValidSchema)(w,U))&&
376
+ !w.opts.unevaluated)return;const P=d.let("valid",!1),O=d.name("_valid");d.block(()=>g.forEach((U,x)=>{const H=f.subschema({keyword:v,schemaProp:x,compositeRule:!0},O);d.assign(P,(0,e._)`${P} || ${O}`),f.mergeValidEvaluated(H,O)||d.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return de.validateUnion=h,de}var di;function eh(){if(di)return Oe;di=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.validateKeywordUsage=Oe.validSchemaType=Oe.funcKeywordCode=Oe.macroKeywordCode=void 0;
377
+ const e=ae(),t=Ne(),r=Ie(),n=rr();function i(y,_){const{gen:S,keyword:$,schema:p,parentSchema:h,it:f}=y,d=_.macro.call(f.self,p,h,f),g=c(S,$,d);f.opts.validateSchema!==!1&&f.self.validateSchema(d,!0);const v=S.name("valid");y.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${$}`,topSchemaRef:g,compositeRule:!0},v),y.pass(v,()=>y.error(!0))}Oe.macroKeywordCode=i;function s(y,_){var S;const{gen:$,keyword:p,schema:h,parentSchema:f,$data:d,it:g}=y;u(g,_);const v=!d&&_.compile?
378
+ _.compile.call(g.self,h,f,g):_.validate,w=c($,p,v),E=$.let("valid");y.block$data(E,P),y.ok((S=_.valid)!==null&&S!==void 0?S:E);function P(){if(_.errors===!1)x(),_.modifying&&o(y),H(()=>y.error());else{const D=_.async?O():U();_.modifying&&o(y),H(()=>a(y,D))}}function O(){const D=$.let("ruleErrs",null);return $.try(()=>x((0,e._)`await `),I=>$.assign(E,!1).if((0,e._)`${I} instanceof ${g.ValidationError}`,()=>$.assign(D,(0,e._)`${I}.errors`),()=>$.throw(I))),D}function U(){const D=(0,e._)`${w}.errors`;
379
+ return $.assign(D,null),x(e.nil),D}function x(D=_.async?(0,e._)`await `:e.nil){const I=g.opts.passContext?t.default.this:t.default.self,M=!("compile"in _&&!d||_.schema===!1);$.assign(E,(0,e._)`${D}${(0,r.callValidateCode)(y,w,I,M)}`,_.modifying)}function H(D){var I;$.if((0,e.not)((I=_.valid)!==null&&I!==void 0?I:E),D)}}Oe.funcKeywordCode=s;function o(y){const{gen:_,data:S,it:$}=y;_.if($.parentData,()=>_.assign(S,(0,e._)`${$.parentData}[${$.parentDataProperty}]`))}function a(y,_){const{gen:S}=y;S.
380
+ if((0,e._)`Array.isArray(${_})`,()=>{S.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(y)},()=>y.error())}function u({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function c(y,_,S){if(S===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,e.
381
+ stringify)(S)})}function l(y,_,S=!1){return!_.length||_.some($=>$==="array"?Array.isArray(y):$==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==$||S&&typeof y>"u")}Oe.validSchemaType=l;function m({schema:y,opts:_,self:S,errSchemaPath:$},p,h){if(Array.isArray(p.keyword)?!p.keyword.includes(h):p.keyword!==h)throw new Error("ajv implementation error");const f=p.dependencies;if(f?.some(d=>!Object.prototype.hasOwnProperty.call(y,d)))throw new Error(`parent schema must have dependencies o\
382
+ f ${h}: ${f.join(",")}`);if(p.validateSchema&&!p.validateSchema(y[h])){const g=`keyword "${h}" value is invalid at path "${$}": `+S.errorsText(p.validateSchema.errors);if(_.validateSchema==="log")S.logger.error(g);else throw new Error(g)}}return Oe.validateKeywordUsage=m,Oe}var Be={},pi;function th(){if(pi)return Be;pi=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.extendSubschemaMode=Be.extendSubschemaData=Be.getSubschema=void 0;const e=ae(),t=fe();function r(s,{keyword:o,schemaProp:a,schema:u,
383
+ schemaPath:c,errSchemaPath:l,topSchemaRef:m}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const y=s.schema[o];return a===void 0?{schema:y,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${o}`}:{schema:y[a],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(o)}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${o}/${(0,t.escapeFragment)(a)}`}}if(u!==void 0){if(c===void 0||
384
+ l===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:c,topSchemaRef:m,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Be.getSubschema=r;function n(s,o,{dataProp:a,dataPropType:u,data:c,dataTypes:l,propertyName:m}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=o;if(a!==void 0){const{errorPath:S,dataPathArr:$,opts:p}=o,
385
+ h=y.let("data",(0,e._)`${o.data}${(0,e.getProperty)(a)}`,!0);_(h),s.errorPath=(0,e.str)`${S}${(0,t.getErrorPath)(a,u,p.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${a}`,s.dataPathArr=[...$,s.parentDataProperty]}if(c!==void 0){const S=c instanceof e.Name?c:y.let("data",c,!0);_(S),m!==void 0&&(s.propertyName=m)}l&&(s.dataTypes=l);function _(S){s.data=S,s.dataLevel=o.dataLevel+1,s.dataTypes=[],o.definedProperties=new Set,s.parentData=o.data,s.dataNames=[...o.dataNames,S]}}Be.extendSubschemaData=
386
+ n;function i(s,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:u,createErrors:c,allErrors:l}){u!==void 0&&(s.compositeRule=u),c!==void 0&&(s.createErrors=c),l!==void 0&&(s.allErrors=l),s.jtdDiscriminator=o,s.jtdMetadata=a}return Be.extendSubschemaMode=i,Be}var Ee={},ms={exports:{}},hi;function rh(){if(hi)return ms.exports;hi=1;var e=ms.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var o=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};t(i,o,a,n,"",n)};e.keywords=
386
387
  {additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};
387
- function t(n,c,s,o,a,i,u,l,m,y){if(o&&typeof o=="object"&&!Array.isArray(o)){c(o,a,i,u,l,m,y);for(var _ in o){var S=o[_];if(Array.isArray(S)){if(_ in e.arrayKeywords)for(var g=0;g<S.length;g++)t(n,c,s,S[g],a+"/"+_+"/"+g,i,a,_,o,g)}else if(_ in e.propsKeywords){if(S&&typeof S=="object")for(var p in S)t(n,c,s,S[p],a+"/"+_+"/"+r(p),i,a,_,o,p)}else(_ in e.keywords||n.allKeys&&!(_ in e.skipKeywords))&&t(n,c,s,S,a+"/"+_,i,a,_,o)}s(o,a,i,u,l,m,y)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
388
- "~1")}return ms.exports}var hi;function sr(){if(hi)return Ee;hi=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getSchemaRefs=Ee.resolveUrl=Ee.normalizeId=Ee._getFullPath=Ee.getFullPath=Ee.inlineRef=void 0;const e=fe(),t=xo(),r=eh(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(g,p=!0){return typeof g=="boolean"?!0:p===!0?!o(g):p?a(g)<=
389
- p:!1}Ee.inlineRef=c;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(g){for(const p in g){if(s.has(p))return!0;const h=g[p];if(Array.isArray(h)&&h.some(o)||typeof h=="object"&&o(h))return!0}return!1}function a(g){let p=0;for(const h in g){if(h==="$ref")return 1/0;if(p++,!n.has(h)&&(typeof g[h]=="object"&&(0,e.eachItem)(g[h],f=>p+=a(f)),p===1/0))return 1/0}return p}function i(g,p="",h){h!==!1&&(p=m(p));const f=g.parse(p);return u(g,f)}Ee.getFullPath=
390
- i;function u(g,p){return g.serialize(p).split("#")[0]+"#"}Ee._getFullPath=u;const l=/#\/?$/;function m(g){return g?g.replace(l,""):""}Ee.normalizeId=m;function y(g,p,h){return h=m(h),g.resolve(p,h)}Ee.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function S(g,p){if(typeof g=="boolean")return{};const{schemaId:h,uriResolver:f}=this.opts,d=m(g[h]||p),$={"":d},v=i(f,d,!1),w={},E=new Set;return r(g,{allKeys:!0},(U,q,H,D)=>{if(D===void 0)return;const I=v+q;let M=$[D];typeof U[h]=="string"&&(M=z.call(this,
391
- U[h])),F.call(this,U.$anchor),F.call(this,U.$dynamicAnchor),$[q]=M;function z(G){const Q=this.opts.uriResolver.resolve;if(G=m(M?Q(M,G):G),E.has(G))throw k(G);E.add(G);let x=this.refs[G];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?P(U,x.schema,G):G!==m(I)&&(G[0]==="#"?(P(U,w[G],G),w[G]=U):this.refs[G]=I),G}function F(G){if(typeof G=="string"){if(!_.test(G))throw new Error(`invalid anchor "${G}"`);z.call(this,`#${G}`)}}}),w;function P(U,q,H){if(q!==void 0&&!t(U,q))throw k(H)}function k(U){
392
- return new Error(`reference "${U}" resolves to more than one schema`)}}return Ee.getSchemaRefs=S,Ee}var mi;function kt(){if(mi)return Ve;mi=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.getData=Ve.KeywordCxt=Ve.validateFunctionCode=void 0;const e=Jp(),t=nr(),r=ii(),n=nr(),c=Yp(),s=Qp(),o=Zp(),a=oe(),i=Oe(),u=sr(),l=fe(),m=rr();function y(T){if(v(T)&&(E(T),$(T))){p(T);return}_(T,()=>(0,e.topBoolOrEmptySchema)(T))}Ve.validateFunctionCode=y;function _({gen:T,validateName:O,schema:V,schemaEnv:X,
393
- opts:Z},J){Z.code.es5?T.func(O,(0,a._)`${i.default.data}, ${i.default.valCxt}`,X.$async,()=>{T.code((0,a._)`"use strict"; ${f(V,Z)}`),g(T,Z),T.code(J)}):T.func(O,(0,a._)`${i.default.data}, ${S(Z)}`,X.$async,()=>T.code(f(V,Z)).code(J))}function S(T){return(0,a._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${T.dynamicRef?(0,a._)`, ${i.default.dynamicAnchors}={}`:a.nil}}={}`}function g(T,O){T.if(i.default.valCxt,()=>{
394
- T.var(i.default.instancePath,(0,a._)`${i.default.valCxt}.${i.default.instancePath}`),T.var(i.default.parentData,(0,a._)`${i.default.valCxt}.${i.default.parentData}`),T.var(i.default.parentDataProperty,(0,a._)`${i.default.valCxt}.${i.default.parentDataProperty}`),T.var(i.default.rootData,(0,a._)`${i.default.valCxt}.${i.default.rootData}`),O.dynamicRef&&T.var(i.default.dynamicAnchors,(0,a._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{T.var(i.default.instancePath,(0,a._)`""`),T.var(i.default.
395
- parentData,(0,a._)`undefined`),T.var(i.default.parentDataProperty,(0,a._)`undefined`),T.var(i.default.rootData,i.default.data),O.dynamicRef&&T.var(i.default.dynamicAnchors,(0,a._)`{}`)})}function p(T){const{schema:O,opts:V,gen:X}=T;_(T,()=>{V.$comment&&O.$comment&&D(T),U(T),X.let(i.default.vErrors,null),X.let(i.default.errors,0),V.unevaluated&&h(T),P(T),I(T)})}function h(T){const{gen:O,validateName:V}=T;T.evaluated=O.const("evaluated",(0,a._)`${V}.evaluated`),O.if((0,a._)`${T.evaluated}.dynamicProps`,
396
- ()=>O.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),O.if((0,a._)`${T.evaluated}.dynamicItems`,()=>O.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function f(T,O){const V=typeof T=="object"&&T[O.schemaId];return V&&(O.code.source||O.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function d(T,O){if(v(T)&&(E(T),$(T))){w(T,O);return}(0,e.boolOrEmptySchema)(T,O)}function $({schema:T,self:O}){if(typeof T=="boolean")return!T;for(const V in T)if(O.RULES.all[V])return!0;return!1}
397
- function v(T){return typeof T.schema!="boolean"}function w(T,O){const{schema:V,gen:X,opts:Z}=T;Z.$comment&&V.$comment&&D(T),q(T),H(T);const J=X.const("_errs",i.default.errors);P(T,J),X.var(O,(0,a._)`${J} === ${i.default.errors}`)}function E(T){(0,l.checkUnknownRules)(T),k(T)}function P(T,O){if(T.opts.jtd)return z(T,[],!1,O);const V=(0,t.getSchemaTypes)(T.schema),X=(0,t.coerceAndCheckDataType)(T,V);z(T,V,!X,O)}function k(T){const{schema:O,errSchemaPath:V,opts:X,self:Z}=T;O.$ref&&X.ignoreKeywordsWithRef&&
398
- (0,l.schemaHasRulesButRef)(O,Z.RULES)&&Z.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function U(T){const{schema:O,opts:V}=T;O.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,l.checkStrictMode)(T,"default is ignored in the schema root")}function q(T){const O=T.schema[T.opts.schemaId];O&&(T.baseId=(0,u.resolveUrl)(T.opts.uriResolver,T.baseId,O))}function H(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function D({gen:T,schemaEnv:O,
399
- schema:V,errSchemaPath:X,opts:Z}){const J=V.$comment;if(Z.$comment===!0)T.code((0,a._)`${i.default.self}.logger.log(${J})`);else if(typeof Z.$comment=="function"){const ue=(0,a.str)`${X}/$comment`,we=T.scopeValue("root",{ref:O.root});T.code((0,a._)`${i.default.self}.opts.$comment(${J}, ${ue}, ${we}.schema)`)}}function I(T){const{gen:O,schemaEnv:V,validateName:X,ValidationError:Z,opts:J}=T;V.$async?O.if((0,a._)`${i.default.errors} === 0`,()=>O.return(i.default.data),()=>O.throw((0,a._)`new ${Z}(${i.
400
- default.vErrors})`)):(O.assign((0,a._)`${X}.errors`,i.default.vErrors),J.unevaluated&&M(T),O.return((0,a._)`${i.default.errors} === 0`))}function M({gen:T,evaluated:O,props:V,items:X}){V instanceof a.Name&&T.assign((0,a._)`${O}.props`,V),X instanceof a.Name&&T.assign((0,a._)`${O}.items`,X)}function z(T,O,V,X){const{gen:Z,schema:J,data:ue,allErrors:we,opts:Y,self:ne}=T,{RULES:W}=ne;if(J.$ref&&(Y.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(J,W))){Z.block(()=>B(T,"$ref",W.all.$ref.definition));
401
- return}Y.jtd||G(T,O),Z.block(()=>{for(const le of W.rules)te(le);te(W.post)});function te(le){(0,r.shouldUseGroup)(J,le)&&(le.type?(Z.if((0,n.checkDataType)(le.type,ue,Y.strictNumbers)),F(T,le),O.length===1&&O[0]===le.type&&V&&(Z.else(),(0,n.reportTypeError)(T)),Z.endIf()):F(T,le),we||Z.if((0,a._)`${i.default.errors} === ${X||0}`))}}function F(T,O){const{gen:V,schema:X,opts:{useDefaults:Z}}=T;Z&&(0,c.assignDefaults)(T,O.type),V.block(()=>{for(const J of O.rules)(0,r.shouldUseRule)(X,J)&&B(T,J.keyword,
402
- J.definition,O.type)})}function G(T,O){T.schemaEnv.meta||!T.opts.strictTypes||(Q(T,O),T.opts.allowUnionTypes||x(T,O),A(T,T.dataTypes))}function Q(T,O){if(O.length){if(!T.dataTypes.length){T.dataTypes=O;return}O.forEach(V=>{N(T.dataTypes,V)||b(T,`type "${V}" not allowed by context "${T.dataTypes.join(",")}"`)}),R(T,O)}}function x(T,O){O.length>1&&!(O.length===2&&O.includes("null"))&&b(T,"use allowUnionTypes to allow union type keyword")}function A(T,O){const V=T.self.RULES.all;for(const X in V){const Z=V[X];
403
- if(typeof Z=="object"&&(0,r.shouldUseRule)(T.schema,Z)){const{type:J}=Z.definition;J.length&&!J.some(ue=>L(O,ue))&&b(T,`missing type "${J.join(",")}" for keyword "${X}"`)}}}function L(T,O){return T.includes(O)||O==="number"&&T.includes("integer")}function N(T,O){return T.includes(O)||O==="integer"&&T.includes("number")}function R(T,O){const V=[];for(const X of T.dataTypes)N(O,X)?V.push(X):O.includes("integer")&&X==="number"&&V.push("integer");T.dataTypes=V}function b(T,O){const V=T.schemaEnv.baseId+
404
- T.errSchemaPath;O+=` at "${V}" (strictTypes)`,(0,l.checkStrictMode)(T,O,T.opts.strictTypes)}class C{constructor(O,V,X){if((0,s.validateKeywordUsage)(O,V,X),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=X,this.data=O.data,this.schema=O.schema[X],this.$data=V.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(O,this.schema,X,this.$data),this.schemaType=V.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=V,this.$data)this.schemaCode=
405
- O.gen.const("vSchema",re(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${X} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=O.gen.const("_errs",i.default.errors))}result(O,V,X){this.failResult((0,a.not)(O),V,X)}failResult(O,V,X){this.gen.if(O),X?X():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():
406
- this.gen.else()}pass(O,V){this.failResult((0,a.not)(O),void 0,V)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),O)})`)}error(O,V,X){if(V){this.setParams(V),this._error(O,X),this.setParams({});return}this._error(O,X)}_error(O,V){(O?m.reportExtraError:m.
407
- reportError)(this,this.def.error,V)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,V){V?Object.assign(this.params,O):this.params=O}block$data(O,V,X=a.nil){this.gen.block(()=>{this.check$data(O,X),V()})}check$data(O=a.nil,V=a.nil){if(!this.$data)return;const{gen:X,schemaCode:Z,schemaType:J,
408
- def:ue}=this;X.if((0,a.or)((0,a._)`${Z} === undefined`,V)),O!==a.nil&&X.assign(O,!0),(J.length||ue.validateSchema)&&(X.elseIf(this.invalid$data()),this.$dataError(),O!==a.nil&&X.assign(O,!1)),X.else()}invalid$data(){const{gen:O,schemaCode:V,schemaType:X,def:Z,it:J}=this;return(0,a.or)(ue(),we());function ue(){if(X.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Y=Array.isArray(X)?X:[X];return(0,a._)`${(0,n.checkDataTypes)(Y,V,J.opts.strictNumbers,n.DataType.Wrong)}`}
409
- return a.nil}function we(){if(Z.validateSchema){const Y=O.scopeValue("validate$data",{ref:Z.validateSchema});return(0,a._)`!${Y}(${V})`}return a.nil}}subschema(O,V){const X=(0,o.getSubschema)(this.it,O);(0,o.extendSubschemaData)(X,this.it,O),(0,o.extendSubschemaMode)(X,O);const Z={...this.it,...X,items:void 0,props:void 0};return d(Z,V),Z}mergeEvaluated(O,V){const{it:X,gen:Z}=this;X.opts.unevaluated&&(X.props!==!0&&O.props!==void 0&&(X.props=l.mergeEvaluated.props(Z,O.props,X.props,V)),X.items!==
410
- !0&&O.items!==void 0&&(X.items=l.mergeEvaluated.items(Z,O.items,X.items,V)))}mergeValidEvaluated(O,V){const{it:X,gen:Z}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return Z.if(V,()=>this.mergeEvaluated(O,a.Name)),!0}}Ve.KeywordCxt=C;function B(T,O,V,X){const Z=new C(T,V,O);"code"in V?V.code(Z,X):Z.$data&&V.validate?(0,s.funcKeywordCode)(Z,V):"macro"in V?(0,s.macroKeywordCode)(Z,V):(V.compile||V.validate)&&(0,s.funcKeywordCode)(Z,V)}const K=/^\/(?:[^~]|~0|~1)*$/,ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
411
- function re(T,{dataLevel:O,dataNames:V,dataPathArr:X}){let Z,J;if(T==="")return i.default.rootData;if(T[0]==="/"){if(!K.test(T))throw new Error(`Invalid JSON-pointer: ${T}`);Z=T,J=i.default.rootData}else{const ne=ee.exec(T);if(!ne)throw new Error(`Invalid JSON-pointer: ${T}`);const W=+ne[1];if(Z=ne[2],Z==="#"){if(W>=O)throw new Error(Y("property/index",W));return X[O-W]}if(W>O)throw new Error(Y("data",W));if(J=V[O-W],!Z)return J}let ue=J;const we=Z.split("/");for(const ne of we)ne&&(J=(0,a._)`${J}${(0,a.
412
- getProperty)((0,l.unescapeJsonPointer)(ne))}`,ue=(0,a._)`${ue} && ${J}`);return ue;function Y(ne,W){return`Cannot access ${ne} ${W} levels up, current level is ${O}`}}return Ve.getData=re,Ve}var or={},yi;function ar(){if(yi)return or;yi=1,Object.defineProperty(or,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return or.default=e,or}var ir={},gi;function It(){if(gi)return ir;gi=1,Object.defineProperty(ir,"__esMod\
413
- ule",{value:!0});const e=sr();class t extends Error{constructor(n,c,s,o){super(o||`can't resolve reference ${s} from id ${c}`),this.missingRef=(0,e.resolveUrl)(n,c,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ir.default=t,ir}var Te={},$i;function cr(){if($i)return Te;$i=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.resolveSchema=Te.getCompilingSchema=Te.resolveRef=Te.compileSchema=Te.SchemaEnv=void 0;const e=oe(),t=ar(),r=Oe(),n=sr(),c=fe(),s=kt();
414
- class o{constructor(h){var f;this.refs={},this.dynamicAnchors={};let d;typeof h.schema=="object"&&(d=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(f=h.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(d?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=d?.$async,this.refs={}}}Te.SchemaEnv=o;function a(p){const h=l.call(this,p);if(h)return h;const f=(0,n.getFullPath)(this.opts.uriResolver,p.root.baseId),
415
- {es5:d,lines:$}=this.opts.code,{ownProperties:v}=this.opts,w=new e.CodeGen(this.scope,{es5:d,lines:$,ownProperties:v});let E;p.$async&&(E=w.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=w.scopeName("validate");p.validateName=P;const k={gen:w,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],
416
- definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:p.schema,code:(0,e.stringify)(p.schema)}:{ref:p.schema}),validateName:P,ValidationError:E,schema:p.schema,schemaEnv:p,rootId:f,baseId:p.baseId||f,schemaPath:e.nil,errSchemaPath:p.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(p),(0,s.validateFunctionCode)(k),w.optimize(this.opts.code.optimize);const q=w.toString();U=`${w.scopeRefs(r.default.
417
- scope)}return ${q}`,this.opts.code.process&&(U=this.opts.code.process(U,p));const D=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(P,{ref:D}),D.errors=null,D.schema=p.schema,D.schemaEnv=p,p.$async&&(D.$async=!0),this.opts.code.source===!0&&(D.source={validateName:P,validateCode:q,scopeValues:w._values}),this.opts.unevaluated){const{props:I,items:M}=k;D.evaluated={props:I instanceof e.Name?void 0:I,items:M instanceof e.Name?void 0:M,dynamicProps:I instanceof
418
- e.Name,dynamicItems:M instanceof e.Name},D.source&&(D.source.evaluated=(0,e.stringify)(D.evaluated))}return p.validate=D,p}catch(q){throw delete p.validate,delete p.validateName,U&&this.logger.error("Error compiling schema, function code:",U),q}finally{this._compilations.delete(p)}}Te.compileSchema=a;function i(p,h,f){var d;f=(0,n.resolveUrl)(this.opts.uriResolver,h,f);const $=p.refs[f];if($)return $;let v=y.call(this,p,f);if(v===void 0){const w=(d=p.localRefs)===null||d===void 0?void 0:d[f],{schemaId:E}=this.
419
- opts;w&&(v=new o({schema:w,schemaId:E,root:p,baseId:h}))}if(v!==void 0)return p.refs[f]=u.call(this,v)}Te.resolveRef=i;function u(p){return(0,n.inlineRef)(p.schema,this.opts.inlineRefs)?p.schema:p.validate?p:a.call(this,p)}function l(p){for(const h of this._compilations)if(m(h,p))return h}Te.getCompilingSchema=l;function m(p,h){return p.schema===h.schema&&p.root===h.root&&p.baseId===h.baseId}function y(p,h){let f;for(;typeof(f=this.refs[h])=="string";)h=f;return f||this.schemas[h]||_.call(this,p,
420
- h)}function _(p,h){const f=this.opts.uriResolver.parse(h),d=(0,n._getFullPath)(this.opts.uriResolver,f);let $=(0,n.getFullPath)(this.opts.uriResolver,p.baseId,void 0);if(Object.keys(p.schema).length>0&&d===$)return g.call(this,f,p);const v=(0,n.normalizeId)(d),w=this.refs[v]||this.schemas[v];if(typeof w=="string"){const E=_.call(this,p,w);return typeof E?.schema!="object"?void 0:g.call(this,f,E)}if(typeof w?.schema=="object"){if(w.validate||a.call(this,w),v===(0,n.normalizeId)(h)){const{schema:E}=w,
421
- {schemaId:P}=this.opts,k=E[P];return k&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,k)),new o({schema:E,schemaId:P,root:p,baseId:$})}return g.call(this,f,w)}}Te.resolveSchema=_;const S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(p,{baseId:h,schema:f,root:d}){var $;if((($=p.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const E of p.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,c.unescapeFragment)(E)];if(P===void 0)
422
- return;f=P;const k=typeof f=="object"&&f[this.opts.schemaId];!S.has(E)&&k&&(h=(0,n.resolveUrl)(this.opts.uriResolver,h,k))}let v;if(typeof f!="boolean"&&f.$ref&&!(0,c.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,h,f.$ref);v=_.call(this,d,E)}const{schemaId:w}=this.opts;if(v=v||new o({schema:f,schemaId:w,root:d,baseId:h}),v.schema!==v.root.schema)return v}return Te}const vi="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",_i="M\
423
- eta-schema for $data reference (JSON AnySchema extension proposal)",wi="object",bi=["$data"],Ei={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Si=!1,th={$id:vi,description:_i,type:wi,required:bi,properties:Ei,additionalProperties:Si},rh={__proto__:null,$id:vi,additionalProperties:Si,default:th,description:_i,properties:Ei,required:bi,type:wi},nh=De(rh);var ur={},jt={exports:{}},ys,Ri;function sh(){return Ri||(Ri=1,ys={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,
424
- 8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),ys}var gs,Ai;function oh(){if(Ai)return gs;Ai=1;const{HEX:e}=sh(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const p=g.match(t)||[],[h]=p;return h?{host:o(h,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function n(g,p=!1){let h="",f=!0;for(const d of g){if(e[d]===void 0)return;d!=="0"&&f===!0&&(f=!1),f||(h+=d)}return p&&h.length===0&&(h=
425
- "0"),h}function c(g){let p=0;const h={error:!1,address:"",zone:""},f=[],d=[];let $=!1,v=!1,w=!1;function E(){if(d.length){if($===!1){const P=n(d);if(P!==void 0)f.push(P);else return h.error=!0,!1}d.length=0}return!0}for(let P=0;P<g.length;P++){const k=g[P];if(!(k==="["||k==="]"))if(k===":"){if(v===!0&&(w=!0),!E())break;if(p++,f.push(":"),p>7){h.error=!0;break}P-1>=0&&g[P-1]===":"&&(v=!0);continue}else if(k==="%"){if(!E())break;$=!0}else{d.push(k);continue}}return d.length&&($?h.zone=d.join(""):w?
426
- f.push(d.join("")):f.push(n(d))),h.address=f.join(""),h}function s(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const p=c(g);if(p.error)return{host:g,isIPV6:!1};{let h=p.address,f=p.address;return p.zone&&(h+="%"+p.zone,f+="%25"+p.zone),{host:h,escapedHost:f,isIPV6:!0}}}function o(g,p){let h="",f=!0;const d=g.length;for(let $=0;$<d;$++){const v=g[$];v==="0"&&f?($+1<=d&&g[$+1]===p||$+1===d)&&(h+=v,f=!1):(v===p?f=!0:f=!1,h+=v)}return h}function a(g,p){let h=0;for(let f=0;f<g.length;f++)g[f]===p&&h++;
427
- return h}const i=/^\.\.?\//u,u=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const p=[];for(;g.length;)if(g.match(i))g=g.replace(i,"");else if(g.match(u))g=g.replace(u,"/");else if(g.match(l))g=g.replace(l,"/"),p.pop();else if(g==="."||g==="..")g="";else{const h=g.match(m);if(h){const f=h[0];g=g.slice(f.length),p.push(f)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function _(g,p){const h=p!==!0?escape:unescape;return g.scheme!==void 0&&
428
- (g.scheme=h(g.scheme)),g.userinfo!==void 0&&(g.userinfo=h(g.userinfo)),g.host!==void 0&&(g.host=h(g.host)),g.path!==void 0&&(g.path=h(g.path)),g.query!==void 0&&(g.query=h(g.query)),g.fragment!==void 0&&(g.fragment=h(g.fragment)),g}function S(g){const p=[];if(g.userinfo!==void 0&&(p.push(g.userinfo),p.push("@")),g.host!==void 0){let h=unescape(g.host);const f=r(h);if(f.isIPV4)h=f.host;else{const d=s(f.host);d.isIPV6===!0?h=`[${d.escapedHost}]`:h=g.host}p.push(h)}return(typeof g.port=="number"||typeof g.
429
- port=="string")&&(p.push(":"),p.push(String(g.port))),p.length?p.join(""):void 0}return gs={recomposeAuthority:S,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:s,stringArrayToHexStripped:n},gs}var $s,Pi;function ah(){if(Pi)return $s;Pi=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()===
430
- "wss"}function n(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function c(f){const d=String(f.scheme).toLowerCase()==="https";return(f.port===(d?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function s(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function o(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){
431
- const[d,$]=f.resourceName.split("?");f.path=d&&d!=="/"?d:void 0,f.query=$,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,d){if(!f.path)return f.error="URN can not be parsed",f;const $=f.path.match(t);if($){const v=d.scheme||f.scheme||"urn";f.nid=$[1].toLowerCase(),f.nss=$[2];const w=`${v}:${d.nid||f.nid}`,E=h[w];f.path=void 0,E&&(f=E.parse(f,d))}else f.error=f.error||"URN can not be parsed.";return f}function i(f,d){const $=d.scheme||f.scheme||"urn",v=f.nid.toLowerCase(),w=`${$}:${d.
432
- nid||v}`,E=h[w];E&&(f=E.serialize(f,d));const P=f,k=f.nss;return P.path=`${v||d.nid}:${k}`,d.skipEscape=!0,P}function u(f,d){const $=f;return $.uuid=$.nss,$.nss=void 0,!d.tolerant&&(!$.uuid||!e.test($.uuid))&&($.error=$.error||"UUID is not valid."),$}function l(f){const d=f;return d.nss=(f.uuid||"").toLowerCase(),d}const m={scheme:"http",domainHost:!0,parse:n,serialize:c},y={scheme:"https",domainHost:m.domainHost,parse:n,serialize:c},_={scheme:"ws",domainHost:!0,parse:s,serialize:o},S={scheme:"w\
433
- ss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},h={http:m,https:y,ws:_,wss:S,urn:{scheme:"urn",parse:a,serialize:i,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:u,serialize:l,skipNormalize:!0}};return $s=h,$s}var Ci;function ih(){if(Ci)return jt.exports;Ci=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:c}=oh(),s=ah();function o(p,h){return typeof p=="string"?p=l(S(p,h),h):typeof p=="object"&&(p=S(l(p,h),h)),p}function a(p,h,f){
434
- const d=Object.assign({scheme:"null"},f),$=i(S(p,d),S(h,d),d,!0);return l($,{...d,skipEscape:!0})}function i(p,h,f,d){const $={};return d||(p=S(l(p,f),f),h=S(l(h,f),f)),f=f||{},!f.tolerant&&h.scheme?($.scheme=h.scheme,$.userinfo=h.userinfo,$.host=h.host,$.port=h.port,$.path=r(h.path||""),$.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?($.userinfo=h.userinfo,$.host=h.host,$.port=h.port,$.path=r(h.path||""),$.query=h.query):(h.path?(h.path.charAt(0)==="/"?$.path=r(h.path):((p.
435
- userinfo!==void 0||p.host!==void 0||p.port!==void 0)&&!p.path?$.path="/"+h.path:p.path?$.path=p.path.slice(0,p.path.lastIndexOf("/")+1)+h.path:$.path=h.path,$.path=r($.path)),$.query=h.query):($.path=p.path,h.query!==void 0?$.query=h.query:$.query=p.query),$.userinfo=p.userinfo,$.host=p.host,$.port=p.port),$.scheme=p.scheme),$.fragment=h.fragment,$}function u(p,h,f){return typeof p=="string"?(p=unescape(p),p=l(c(S(p,f),!0),{...f,skipEscape:!0})):typeof p=="object"&&(p=l(c(p,!0),{...f,skipEscape:!0})),
436
- typeof h=="string"?(h=unescape(h),h=l(c(S(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=l(c(h,!0),{...f,skipEscape:!0})),p.toLowerCase()===h.toLowerCase()}function l(p,h){const f={host:p.host,scheme:p.scheme,userinfo:p.userinfo,port:p.port,path:p.path,query:p.query,nid:p.nid,nss:p.nss,uuid:p.uuid,fragment:p.fragment,reference:p.reference,resourceName:p.resourceName,secure:p.secure,error:""},d=Object.assign({},h),$=[],v=s[(d.scheme||f.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(
437
- f,d),f.path!==void 0&&(d.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),d.reference!=="suffix"&&f.scheme&&$.push(f.scheme,":");const w=n(f);if(w!==void 0&&(d.reference!=="suffix"&&$.push("//"),$.push(w),f.path&&f.path.charAt(0)!=="/"&&$.push("/")),f.path!==void 0){let E=f.path;!d.absolutePath&&(!v||!v.absolutePath)&&(E=r(E)),w===void 0&&(E=E.replace(/^\/\//u,"/%2F")),$.push(E)}return f.query!==void 0&&$.push("?",f.query),f.fragment!==
438
- void 0&&$.push("#",f.fragment),$.join("")}const m=Array.from({length:127},(p,h)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(h)));function y(p){let h=0;for(let f=0,d=p.length;f<d;++f)if(h=p.charCodeAt(f),h>126||m[h])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(p,h){const f=Object.assign({},h),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},
439
- $=p.indexOf("%")!==-1;let v=!1;f.reference==="suffix"&&(p=(f.scheme?f.scheme+":":"")+"//"+p);const w=p.match(_);if(w){if(d.scheme=w[1],d.userinfo=w[3],d.host=w[4],d.port=parseInt(w[5],10),d.path=w[6]||"",d.query=w[7],d.fragment=w[8],isNaN(d.port)&&(d.port=w[5]),d.host){const P=t(d.host);if(P.isIPV4===!1){const k=e(P.host);d.host=k.host.toLowerCase(),v=k.isIPV6}else d.host=P.host,v=!0}d.scheme===void 0&&d.userinfo===void 0&&d.host===void 0&&d.port===void 0&&d.query===void 0&&!d.path?d.reference="\
388
+ function t(n,i,s,o,a,u,c,l,m,y){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,a,u,c,l,m,y);for(var _ in o){var S=o[_];if(Array.isArray(S)){if(_ in e.arrayKeywords)for(var $=0;$<S.length;$++)t(n,i,s,S[$],a+"/"+_+"/"+$,u,a,_,o,$)}else if(_ in e.propsKeywords){if(S&&typeof S=="object")for(var p in S)t(n,i,s,S[p],a+"/"+_+"/"+r(p),u,a,_,o,p)}else(_ in e.keywords||n.allKeys&&!(_ in e.skipKeywords))&&t(n,i,s,S,a+"/"+_,u,a,_,o)}s(o,a,u,c,l,m,y)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,
389
+ "~1")}return ms.exports}var mi;function sr(){if(mi)return Ee;mi=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getSchemaRefs=Ee.resolveUrl=Ee.normalizeId=Ee._getFullPath=Ee.getFullPath=Ee.inlineRef=void 0;const e=fe(),t=Do(),r=rh(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i($,p=!0){return typeof $=="boolean"?!0:p===!0?!o($):p?a($)<=
390
+ p:!1}Ee.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o($){for(const p in $){if(s.has(p))return!0;const h=$[p];if(Array.isArray(h)&&h.some(o)||typeof h=="object"&&o(h))return!0}return!1}function a($){let p=0;for(const h in $){if(h==="$ref")return 1/0;if(p++,!n.has(h)&&(typeof $[h]=="object"&&(0,e.eachItem)($[h],f=>p+=a(f)),p===1/0))return 1/0}return p}function u($,p="",h){h!==!1&&(p=m(p));const f=$.parse(p);return c($,f)}Ee.getFullPath=
391
+ u;function c($,p){return $.serialize(p).split("#")[0]+"#"}Ee._getFullPath=c;const l=/#\/?$/;function m($){return $?$.replace(l,""):""}Ee.normalizeId=m;function y($,p,h){return h=m(h),$.resolve(p,h)}Ee.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function S($,p){if(typeof $=="boolean")return{};const{schemaId:h,uriResolver:f}=this.opts,d=m($[h]||p),g={"":d},v=u(f,d,!1),w={},E=new Set;return r($,{allKeys:!0},(U,x,H,D)=>{if(D===void 0)return;const I=v+x;let M=g[D];typeof U[h]=="string"&&(M=z.call(this,
392
+ U[h])),F.call(this,U.$anchor),F.call(this,U.$dynamicAnchor),g[x]=M;function z(G){const Q=this.opts.uriResolver.resolve;if(G=m(M?Q(M,G):G),E.has(G))throw O(G);E.add(G);let q=this.refs[G];return typeof q=="string"&&(q=this.refs[q]),typeof q=="object"?P(U,q.schema,G):G!==m(I)&&(G[0]==="#"?(P(U,w[G],G),w[G]=U):this.refs[G]=I),G}function F(G){if(typeof G=="string"){if(!_.test(G))throw new Error(`invalid anchor "${G}"`);z.call(this,`#${G}`)}}}),w;function P(U,x,H){if(x!==void 0&&!t(U,x))throw O(H)}function O(U){
393
+ return new Error(`reference "${U}" resolves to more than one schema`)}}return Ee.getSchemaRefs=S,Ee}var yi;function Nt(){if(yi)return ze;yi=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.getData=ze.KeywordCxt=ze.validateFunctionCode=void 0;const e=Qp(),t=nr(),r=ci(),n=nr(),i=Zp(),s=eh(),o=th(),a=ae(),u=Ne(),c=sr(),l=fe(),m=rr();function y(k){if(v(k)&&(E(k),g(k))){p(k);return}_(k,()=>(0,e.topBoolOrEmptySchema)(k))}ze.validateFunctionCode=y;function _({gen:k,validateName:N,schema:V,schemaEnv:X,
394
+ opts:Z},J){Z.code.es5?k.func(N,(0,a._)`${u.default.data}, ${u.default.valCxt}`,X.$async,()=>{k.code((0,a._)`"use strict"; ${f(V,Z)}`),$(k,Z),k.code(J)}):k.func(N,(0,a._)`${u.default.data}, ${S(Z)}`,X.$async,()=>k.code(f(V,Z)).code(J))}function S(k){return(0,a._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${k.dynamicRef?(0,a._)`, ${u.default.dynamicAnchors}={}`:a.nil}}={}`}function $(k,N){k.if(u.default.valCxt,()=>{
395
+ k.var(u.default.instancePath,(0,a._)`${u.default.valCxt}.${u.default.instancePath}`),k.var(u.default.parentData,(0,a._)`${u.default.valCxt}.${u.default.parentData}`),k.var(u.default.parentDataProperty,(0,a._)`${u.default.valCxt}.${u.default.parentDataProperty}`),k.var(u.default.rootData,(0,a._)`${u.default.valCxt}.${u.default.rootData}`),N.dynamicRef&&k.var(u.default.dynamicAnchors,(0,a._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{k.var(u.default.instancePath,(0,a._)`""`),k.var(u.default.
396
+ parentData,(0,a._)`undefined`),k.var(u.default.parentDataProperty,(0,a._)`undefined`),k.var(u.default.rootData,u.default.data),N.dynamicRef&&k.var(u.default.dynamicAnchors,(0,a._)`{}`)})}function p(k){const{schema:N,opts:V,gen:X}=k;_(k,()=>{V.$comment&&N.$comment&&D(k),U(k),X.let(u.default.vErrors,null),X.let(u.default.errors,0),V.unevaluated&&h(k),P(k),I(k)})}function h(k){const{gen:N,validateName:V}=k;k.evaluated=N.const("evaluated",(0,a._)`${V}.evaluated`),N.if((0,a._)`${k.evaluated}.dynamicProps`,
397
+ ()=>N.assign((0,a._)`${k.evaluated}.props`,(0,a._)`undefined`)),N.if((0,a._)`${k.evaluated}.dynamicItems`,()=>N.assign((0,a._)`${k.evaluated}.items`,(0,a._)`undefined`))}function f(k,N){const V=typeof k=="object"&&k[N.schemaId];return V&&(N.code.source||N.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function d(k,N){if(v(k)&&(E(k),g(k))){w(k,N);return}(0,e.boolOrEmptySchema)(k,N)}function g({schema:k,self:N}){if(typeof k=="boolean")return!k;for(const V in k)if(N.RULES.all[V])return!0;return!1}
398
+ function v(k){return typeof k.schema!="boolean"}function w(k,N){const{schema:V,gen:X,opts:Z}=k;Z.$comment&&V.$comment&&D(k),x(k),H(k);const J=X.const("_errs",u.default.errors);P(k,J),X.var(N,(0,a._)`${J} === ${u.default.errors}`)}function E(k){(0,l.checkUnknownRules)(k),O(k)}function P(k,N){if(k.opts.jtd)return z(k,[],!1,N);const V=(0,t.getSchemaTypes)(k.schema),X=(0,t.coerceAndCheckDataType)(k,V);z(k,V,!X,N)}function O(k){const{schema:N,errSchemaPath:V,opts:X,self:Z}=k;N.$ref&&X.ignoreKeywordsWithRef&&
399
+ (0,l.schemaHasRulesButRef)(N,Z.RULES)&&Z.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function U(k){const{schema:N,opts:V}=k;N.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,l.checkStrictMode)(k,"default is ignored in the schema root")}function x(k){const N=k.schema[k.opts.schemaId];N&&(k.baseId=(0,c.resolveUrl)(k.opts.uriResolver,k.baseId,N))}function H(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function D({gen:k,schemaEnv:N,
400
+ schema:V,errSchemaPath:X,opts:Z}){const J=V.$comment;if(Z.$comment===!0)k.code((0,a._)`${u.default.self}.logger.log(${J})`);else if(typeof Z.$comment=="function"){const ue=(0,a.str)`${X}/$comment`,we=k.scopeValue("root",{ref:N.root});k.code((0,a._)`${u.default.self}.opts.$comment(${J}, ${ue}, ${we}.schema)`)}}function I(k){const{gen:N,schemaEnv:V,validateName:X,ValidationError:Z,opts:J}=k;V.$async?N.if((0,a._)`${u.default.errors} === 0`,()=>N.return(u.default.data),()=>N.throw((0,a._)`new ${Z}(${u.
401
+ default.vErrors})`)):(N.assign((0,a._)`${X}.errors`,u.default.vErrors),J.unevaluated&&M(k),N.return((0,a._)`${u.default.errors} === 0`))}function M({gen:k,evaluated:N,props:V,items:X}){V instanceof a.Name&&k.assign((0,a._)`${N}.props`,V),X instanceof a.Name&&k.assign((0,a._)`${N}.items`,X)}function z(k,N,V,X){const{gen:Z,schema:J,data:ue,allErrors:we,opts:Y,self:ne}=k,{RULES:W}=ne;if(J.$ref&&(Y.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(J,W))){Z.block(()=>B(k,"$ref",W.all.$ref.definition));
402
+ return}Y.jtd||G(k,N),Z.block(()=>{for(const le of W.rules)te(le);te(W.post)});function te(le){(0,r.shouldUseGroup)(J,le)&&(le.type?(Z.if((0,n.checkDataType)(le.type,ue,Y.strictNumbers)),F(k,le),N.length===1&&N[0]===le.type&&V&&(Z.else(),(0,n.reportTypeError)(k)),Z.endIf()):F(k,le),we||Z.if((0,a._)`${u.default.errors} === ${X||0}`))}}function F(k,N){const{gen:V,schema:X,opts:{useDefaults:Z}}=k;Z&&(0,i.assignDefaults)(k,N.type),V.block(()=>{for(const J of N.rules)(0,r.shouldUseRule)(X,J)&&B(k,J.keyword,
403
+ J.definition,N.type)})}function G(k,N){k.schemaEnv.meta||!k.opts.strictTypes||(Q(k,N),k.opts.allowUnionTypes||q(k,N),A(k,k.dataTypes))}function Q(k,N){if(N.length){if(!k.dataTypes.length){k.dataTypes=N;return}N.forEach(V=>{T(k.dataTypes,V)||b(k,`type "${V}" not allowed by context "${k.dataTypes.join(",")}"`)}),R(k,N)}}function q(k,N){N.length>1&&!(N.length===2&&N.includes("null"))&&b(k,"use allowUnionTypes to allow union type keyword")}function A(k,N){const V=k.self.RULES.all;for(const X in V){const Z=V[X];
404
+ if(typeof Z=="object"&&(0,r.shouldUseRule)(k.schema,Z)){const{type:J}=Z.definition;J.length&&!J.some(ue=>L(N,ue))&&b(k,`missing type "${J.join(",")}" for keyword "${X}"`)}}}function L(k,N){return k.includes(N)||N==="number"&&k.includes("integer")}function T(k,N){return k.includes(N)||N==="integer"&&k.includes("number")}function R(k,N){const V=[];for(const X of k.dataTypes)T(N,X)?V.push(X):N.includes("integer")&&X==="number"&&V.push("integer");k.dataTypes=V}function b(k,N){const V=k.schemaEnv.baseId+
405
+ k.errSchemaPath;N+=` at "${V}" (strictTypes)`,(0,l.checkStrictMode)(k,N,k.opts.strictTypes)}class C{constructor(N,V,X){if((0,s.validateKeywordUsage)(N,V,X),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=X,this.data=N.data,this.schema=N.schema[X],this.$data=V.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(N,this.schema,X,this.$data),this.schemaType=V.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=V,this.$data)this.schemaCode=
406
+ N.gen.const("vSchema",re(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${X} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=N.gen.const("_errs",u.default.errors))}result(N,V,X){this.failResult((0,a.not)(N),V,X)}failResult(N,V,X){this.gen.if(N),X?X():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():
407
+ this.gen.else()}pass(N,V){this.failResult((0,a.not)(N),void 0,V)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),N)})`)}error(N,V,X){if(V){this.setParams(V),this._error(N,X),this.setParams({});return}this._error(N,X)}_error(N,V){(N?m.reportExtraError:m.
408
+ reportError)(this,this.def.error,V)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,V){V?Object.assign(this.params,N):this.params=N}block$data(N,V,X=a.nil){this.gen.block(()=>{this.check$data(N,X),V()})}check$data(N=a.nil,V=a.nil){if(!this.$data)return;const{gen:X,schemaCode:Z,schemaType:J,
409
+ def:ue}=this;X.if((0,a.or)((0,a._)`${Z} === undefined`,V)),N!==a.nil&&X.assign(N,!0),(J.length||ue.validateSchema)&&(X.elseIf(this.invalid$data()),this.$dataError(),N!==a.nil&&X.assign(N,!1)),X.else()}invalid$data(){const{gen:N,schemaCode:V,schemaType:X,def:Z,it:J}=this;return(0,a.or)(ue(),we());function ue(){if(X.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Y=Array.isArray(X)?X:[X];return(0,a._)`${(0,n.checkDataTypes)(Y,V,J.opts.strictNumbers,n.DataType.Wrong)}`}
410
+ return a.nil}function we(){if(Z.validateSchema){const Y=N.scopeValue("validate$data",{ref:Z.validateSchema});return(0,a._)`!${Y}(${V})`}return a.nil}}subschema(N,V){const X=(0,o.getSubschema)(this.it,N);(0,o.extendSubschemaData)(X,this.it,N),(0,o.extendSubschemaMode)(X,N);const Z={...this.it,...X,items:void 0,props:void 0};return d(Z,V),Z}mergeEvaluated(N,V){const{it:X,gen:Z}=this;X.opts.unevaluated&&(X.props!==!0&&N.props!==void 0&&(X.props=l.mergeEvaluated.props(Z,N.props,X.props,V)),X.items!==
411
+ !0&&N.items!==void 0&&(X.items=l.mergeEvaluated.items(Z,N.items,X.items,V)))}mergeValidEvaluated(N,V){const{it:X,gen:Z}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return Z.if(V,()=>this.mergeEvaluated(N,a.Name)),!0}}ze.KeywordCxt=C;function B(k,N,V,X){const Z=new C(k,V,N);"code"in V?V.code(Z,X):Z.$data&&V.validate?(0,s.funcKeywordCode)(Z,V):"macro"in V?(0,s.macroKeywordCode)(Z,V):(V.compile||V.validate)&&(0,s.funcKeywordCode)(Z,V)}const K=/^\/(?:[^~]|~0|~1)*$/,ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
412
+ function re(k,{dataLevel:N,dataNames:V,dataPathArr:X}){let Z,J;if(k==="")return u.default.rootData;if(k[0]==="/"){if(!K.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);Z=k,J=u.default.rootData}else{const ne=ee.exec(k);if(!ne)throw new Error(`Invalid JSON-pointer: ${k}`);const W=+ne[1];if(Z=ne[2],Z==="#"){if(W>=N)throw new Error(Y("property/index",W));return X[N-W]}if(W>N)throw new Error(Y("data",W));if(J=V[N-W],!Z)return J}let ue=J;const we=Z.split("/");for(const ne of we)ne&&(J=(0,a._)`${J}${(0,a.
413
+ getProperty)((0,l.unescapeJsonPointer)(ne))}`,ue=(0,a._)`${ue} && ${J}`);return ue;function Y(ne,W){return`Cannot access ${ne} ${W} levels up, current level is ${N}`}}return ze.getData=re,ze}var or={},gi;function ar(){if(gi)return or;gi=1,Object.defineProperty(or,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return or.default=e,or}var ir={},$i;function Ot(){if($i)return ir;$i=1,Object.defineProperty(ir,"__esMod\
414
+ ule",{value:!0});const e=sr();class t extends Error{constructor(n,i,s,o){super(o||`can't resolve reference ${s} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return ir.default=t,ir}var ke={},vi;function cr(){if(vi)return ke;vi=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.resolveSchema=ke.getCompilingSchema=ke.resolveRef=ke.compileSchema=ke.SchemaEnv=void 0;const e=ae(),t=ar(),r=Ne(),n=sr(),i=fe(),s=Nt();
415
+ class o{constructor(h){var f;this.refs={},this.dynamicAnchors={};let d;typeof h.schema=="object"&&(d=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(f=h.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(d?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=d?.$async,this.refs={}}}ke.SchemaEnv=o;function a(p){const h=l.call(this,p);if(h)return h;const f=(0,n.getFullPath)(this.opts.uriResolver,p.root.baseId),
416
+ {es5:d,lines:g}=this.opts.code,{ownProperties:v}=this.opts,w=new e.CodeGen(this.scope,{es5:d,lines:g,ownProperties:v});let E;p.$async&&(E=w.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=w.scopeName("validate");p.validateName=P;const O={gen:w,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],
417
+ definedProperties:new Set,topSchemaRef:w.scopeValue("schema",this.opts.code.source===!0?{ref:p.schema,code:(0,e.stringify)(p.schema)}:{ref:p.schema}),validateName:P,ValidationError:E,schema:p.schema,schemaEnv:p,rootId:f,baseId:p.baseId||f,schemaPath:e.nil,errSchemaPath:p.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(p),(0,s.validateFunctionCode)(O),w.optimize(this.opts.code.optimize);const x=w.toString();U=`${w.scopeRefs(r.default.
418
+ scope)}return ${x}`,this.opts.code.process&&(U=this.opts.code.process(U,p));const D=new Function(`${r.default.self}`,`${r.default.scope}`,U)(this,this.scope.get());if(this.scope.value(P,{ref:D}),D.errors=null,D.schema=p.schema,D.schemaEnv=p,p.$async&&(D.$async=!0),this.opts.code.source===!0&&(D.source={validateName:P,validateCode:x,scopeValues:w._values}),this.opts.unevaluated){const{props:I,items:M}=O;D.evaluated={props:I instanceof e.Name?void 0:I,items:M instanceof e.Name?void 0:M,dynamicProps:I instanceof
419
+ e.Name,dynamicItems:M instanceof e.Name},D.source&&(D.source.evaluated=(0,e.stringify)(D.evaluated))}return p.validate=D,p}catch(x){throw delete p.validate,delete p.validateName,U&&this.logger.error("Error compiling schema, function code:",U),x}finally{this._compilations.delete(p)}}ke.compileSchema=a;function u(p,h,f){var d;f=(0,n.resolveUrl)(this.opts.uriResolver,h,f);const g=p.refs[f];if(g)return g;let v=y.call(this,p,f);if(v===void 0){const w=(d=p.localRefs)===null||d===void 0?void 0:d[f],{schemaId:E}=this.
420
+ opts;w&&(v=new o({schema:w,schemaId:E,root:p,baseId:h}))}if(v!==void 0)return p.refs[f]=c.call(this,v)}ke.resolveRef=u;function c(p){return(0,n.inlineRef)(p.schema,this.opts.inlineRefs)?p.schema:p.validate?p:a.call(this,p)}function l(p){for(const h of this._compilations)if(m(h,p))return h}ke.getCompilingSchema=l;function m(p,h){return p.schema===h.schema&&p.root===h.root&&p.baseId===h.baseId}function y(p,h){let f;for(;typeof(f=this.refs[h])=="string";)h=f;return f||this.schemas[h]||_.call(this,p,
421
+ h)}function _(p,h){const f=this.opts.uriResolver.parse(h),d=(0,n._getFullPath)(this.opts.uriResolver,f);let g=(0,n.getFullPath)(this.opts.uriResolver,p.baseId,void 0);if(Object.keys(p.schema).length>0&&d===g)return $.call(this,f,p);const v=(0,n.normalizeId)(d),w=this.refs[v]||this.schemas[v];if(typeof w=="string"){const E=_.call(this,p,w);return typeof E?.schema!="object"?void 0:$.call(this,f,E)}if(typeof w?.schema=="object"){if(w.validate||a.call(this,w),v===(0,n.normalizeId)(h)){const{schema:E}=w,
422
+ {schemaId:P}=this.opts,O=E[P];return O&&(g=(0,n.resolveUrl)(this.opts.uriResolver,g,O)),new o({schema:E,schemaId:P,root:p,baseId:g})}return $.call(this,f,w)}}ke.resolveSchema=_;const S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function $(p,{baseId:h,schema:f,root:d}){var g;if(((g=p.fragment)===null||g===void 0?void 0:g[0])!=="/")return;for(const E of p.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,i.unescapeFragment)(E)];if(P===void 0)
423
+ return;f=P;const O=typeof f=="object"&&f[this.opts.schemaId];!S.has(E)&&O&&(h=(0,n.resolveUrl)(this.opts.uriResolver,h,O))}let v;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,h,f.$ref);v=_.call(this,d,E)}const{schemaId:w}=this.opts;if(v=v||new o({schema:f,schemaId:w,root:d,baseId:h}),v.schema!==v.root.schema)return v}return ke}const _i="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",wi="M\
424
+ eta-schema for $data reference (JSON AnySchema extension proposal)",bi="object",Ei=["$data"],Si={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Ri=!1,nh={$id:_i,description:wi,type:bi,required:Ei,properties:Si,additionalProperties:Ri},sh={__proto__:null,$id:_i,additionalProperties:Ri,default:nh,description:wi,properties:Si,required:Ei,type:bi},oh=De(sh);var ur={},It={exports:{}},ys,Ai;function ah(){return Ai||(Ai=1,ys={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,
425
+ 8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),ys}var gs,Pi;function ih(){if(Pi)return gs;Pi=1;const{HEX:e}=ah(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r($){if(a($,".")<3)return{host:$,isIPV4:!1};const p=$.match(t)||[],[h]=p;return h?{host:o(h,"."),isIPV4:!0}:{host:$,isIPV4:!1}}function n($,p=!1){let h="",f=!0;for(const d of $){if(e[d]===void 0)return;d!=="0"&&f===!0&&(f=!1),f||(h+=d)}return p&&h.length===0&&(h=
426
+ "0"),h}function i($){let p=0;const h={error:!1,address:"",zone:""},f=[],d=[];let g=!1,v=!1,w=!1;function E(){if(d.length){if(g===!1){const P=n(d);if(P!==void 0)f.push(P);else return h.error=!0,!1}d.length=0}return!0}for(let P=0;P<$.length;P++){const O=$[P];if(!(O==="["||O==="]"))if(O===":"){if(v===!0&&(w=!0),!E())break;if(p++,f.push(":"),p>7){h.error=!0;break}P-1>=0&&$[P-1]===":"&&(v=!0);continue}else if(O==="%"){if(!E())break;g=!0}else{d.push(O);continue}}return d.length&&(g?h.zone=d.join(""):w?
427
+ f.push(d.join("")):f.push(n(d))),h.address=f.join(""),h}function s($){if(a($,":")<2)return{host:$,isIPV6:!1};const p=i($);if(p.error)return{host:$,isIPV6:!1};{let h=p.address,f=p.address;return p.zone&&(h+="%"+p.zone,f+="%25"+p.zone),{host:h,escapedHost:f,isIPV6:!0}}}function o($,p){let h="",f=!0;const d=$.length;for(let g=0;g<d;g++){const v=$[g];v==="0"&&f?(g+1<=d&&$[g+1]===p||g+1===d)&&(h+=v,f=!1):(v===p?f=!0:f=!1,h+=v)}return h}function a($,p){let h=0;for(let f=0;f<$.length;f++)$[f]===p&&h++;
428
+ return h}const u=/^\.\.?\//u,c=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\n)*?(?=\/|$)/u;function y($){const p=[];for(;$.length;)if($.match(u))$=$.replace(u,"");else if($.match(c))$=$.replace(c,"/");else if($.match(l))$=$.replace(l,"/"),p.pop();else if($==="."||$==="..")$="";else{const h=$.match(m);if(h){const f=h[0];$=$.slice(f.length),p.push(f)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function _($,p){const h=p!==!0?escape:unescape;return $.scheme!==void 0&&
429
+ ($.scheme=h($.scheme)),$.userinfo!==void 0&&($.userinfo=h($.userinfo)),$.host!==void 0&&($.host=h($.host)),$.path!==void 0&&($.path=h($.path)),$.query!==void 0&&($.query=h($.query)),$.fragment!==void 0&&($.fragment=h($.fragment)),$}function S($){const p=[];if($.userinfo!==void 0&&(p.push($.userinfo),p.push("@")),$.host!==void 0){let h=unescape($.host);const f=r(h);if(f.isIPV4)h=f.host;else{const d=s(f.host);d.isIPV6===!0?h=`[${d.escapedHost}]`:h=$.host}p.push(h)}return(typeof $.port=="number"||typeof $.
430
+ port=="string")&&(p.push(":"),p.push(String($.port))),p.length?p.join(""):void 0}return gs={recomposeAuthority:S,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:s,stringArrayToHexStripped:n},gs}var $s,Ci;function ch(){if(Ci)return $s;Ci=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()===
431
+ "wss"}function n(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function i(f){const d=String(f.scheme).toLowerCase()==="https";return(f.port===(d?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function s(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function o(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){
432
+ const[d,g]=f.resourceName.split("?");f.path=d&&d!=="/"?d:void 0,f.query=g,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,d){if(!f.path)return f.error="URN can not be parsed",f;const g=f.path.match(t);if(g){const v=d.scheme||f.scheme||"urn";f.nid=g[1].toLowerCase(),f.nss=g[2];const w=`${v}:${d.nid||f.nid}`,E=h[w];f.path=void 0,E&&(f=E.parse(f,d))}else f.error=f.error||"URN can not be parsed.";return f}function u(f,d){const g=d.scheme||f.scheme||"urn",v=f.nid.toLowerCase(),w=`${g}:${d.
433
+ nid||v}`,E=h[w];E&&(f=E.serialize(f,d));const P=f,O=f.nss;return P.path=`${v||d.nid}:${O}`,d.skipEscape=!0,P}function c(f,d){const g=f;return g.uuid=g.nss,g.nss=void 0,!d.tolerant&&(!g.uuid||!e.test(g.uuid))&&(g.error=g.error||"UUID is not valid."),g}function l(f){const d=f;return d.nss=(f.uuid||"").toLowerCase(),d}const m={scheme:"http",domainHost:!0,parse:n,serialize:i},y={scheme:"https",domainHost:m.domainHost,parse:n,serialize:i},_={scheme:"ws",domainHost:!0,parse:s,serialize:o},S={scheme:"w\
434
+ ss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},h={http:m,https:y,ws:_,wss:S,urn:{scheme:"urn",parse:a,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:c,serialize:l,skipNormalize:!0}};return $s=h,$s}var ki;function uh(){if(ki)return It.exports;ki=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:i}=ih(),s=ch();function o(p,h){return typeof p=="string"?p=l(S(p,h),h):typeof p=="object"&&(p=S(l(p,h),h)),p}function a(p,h,f){
435
+ const d=Object.assign({scheme:"null"},f),g=u(S(p,d),S(h,d),d,!0);return l(g,{...d,skipEscape:!0})}function u(p,h,f,d){const g={};return d||(p=S(l(p,f),f),h=S(l(h,f),f)),f=f||{},!f.tolerant&&h.scheme?(g.scheme=h.scheme,g.userinfo=h.userinfo,g.host=h.host,g.port=h.port,g.path=r(h.path||""),g.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(g.userinfo=h.userinfo,g.host=h.host,g.port=h.port,g.path=r(h.path||""),g.query=h.query):(h.path?(h.path.charAt(0)==="/"?g.path=r(h.path):((p.
436
+ userinfo!==void 0||p.host!==void 0||p.port!==void 0)&&!p.path?g.path="/"+h.path:p.path?g.path=p.path.slice(0,p.path.lastIndexOf("/")+1)+h.path:g.path=h.path,g.path=r(g.path)),g.query=h.query):(g.path=p.path,h.query!==void 0?g.query=h.query:g.query=p.query),g.userinfo=p.userinfo,g.host=p.host,g.port=p.port),g.scheme=p.scheme),g.fragment=h.fragment,g}function c(p,h,f){return typeof p=="string"?(p=unescape(p),p=l(i(S(p,f),!0),{...f,skipEscape:!0})):typeof p=="object"&&(p=l(i(p,!0),{...f,skipEscape:!0})),
437
+ typeof h=="string"?(h=unescape(h),h=l(i(S(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=l(i(h,!0),{...f,skipEscape:!0})),p.toLowerCase()===h.toLowerCase()}function l(p,h){const f={host:p.host,scheme:p.scheme,userinfo:p.userinfo,port:p.port,path:p.path,query:p.query,nid:p.nid,nss:p.nss,uuid:p.uuid,fragment:p.fragment,reference:p.reference,resourceName:p.resourceName,secure:p.secure,error:""},d=Object.assign({},h),g=[],v=s[(d.scheme||f.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(
438
+ f,d),f.path!==void 0&&(d.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),d.reference!=="suffix"&&f.scheme&&g.push(f.scheme,":");const w=n(f);if(w!==void 0&&(d.reference!=="suffix"&&g.push("//"),g.push(w),f.path&&f.path.charAt(0)!=="/"&&g.push("/")),f.path!==void 0){let E=f.path;!d.absolutePath&&(!v||!v.absolutePath)&&(E=r(E)),w===void 0&&(E=E.replace(/^\/\//u,"/%2F")),g.push(E)}return f.query!==void 0&&g.push("?",f.query),f.fragment!==
439
+ void 0&&g.push("#",f.fragment),g.join("")}const m=Array.from({length:127},(p,h)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(h)));function y(p){let h=0;for(let f=0,d=p.length;f<d;++f)if(h=p.charCodeAt(f),h>126||m[h])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(p,h){const f=Object.assign({},h),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},
440
+ g=p.indexOf("%")!==-1;let v=!1;f.reference==="suffix"&&(p=(f.scheme?f.scheme+":":"")+"//"+p);const w=p.match(_);if(w){if(d.scheme=w[1],d.userinfo=w[3],d.host=w[4],d.port=parseInt(w[5],10),d.path=w[6]||"",d.query=w[7],d.fragment=w[8],isNaN(d.port)&&(d.port=w[5]),d.host){const P=t(d.host);if(P.isIPV4===!1){const O=e(P.host);d.host=O.host.toLowerCase(),v=O.isIPV6}else d.host=P.host,v=!0}d.scheme===void 0&&d.userinfo===void 0&&d.host===void 0&&d.port===void 0&&d.query===void 0&&!d.path?d.reference="\
440
441
  same-document":d.scheme===void 0?d.reference="relative":d.fragment===void 0?d.reference="absolute":d.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==d.reference&&(d.error=d.error||"URI is not a "+f.reference+" reference.");const E=s[(f.scheme||d.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!E||!E.unicodeSupport)&&d.host&&(f.domainHost||E&&E.domainHost)&&v===!1&&y(d.host))try{d.host=URL.domainToASCII(d.host.toLowerCase())}catch(P){d.error=d.error||"Host's domain name can n\
441
- ot be converted to ASCII: "+P}(!E||E&&!E.skipNormalize)&&($&&d.scheme!==void 0&&(d.scheme=unescape(d.scheme)),$&&d.host!==void 0&&(d.host=unescape(d.host)),d.path&&(d.path=escape(unescape(d.path))),d.fragment&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),E&&E.parse&&E.parse(d,f)}else d.error=d.error||"URI can not be parsed.";return d}const g={SCHEMES:s,normalize:o,resolve:a,resolveComponents:i,equal:u,serialize:l,parse:S};return jt.exports=g,jt.exports.default=g,jt.exports.fastUri=g,jt.
442
- exports}var Ti;function ch(){if(Ti)return ur;Ti=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=ih();return e.code='require("ajv/dist/runtime/uri").default',ur.default=e,ur}var Ni;function Oi(){return Ni||(Ni=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=kt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=oe();Object.defineProperty(e,"_",{enumerable:!0,
443
- get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ar(),c=It(),s=oi(),o=cr(),a=oe(),i=sr(),u=nr(),l=fe(),m=nh,y=ch(),
444
- _=(x,A)=>new RegExp(x,A);_.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),p={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",
442
+ ot be converted to ASCII: "+P}(!E||E&&!E.skipNormalize)&&(g&&d.scheme!==void 0&&(d.scheme=unescape(d.scheme)),g&&d.host!==void 0&&(d.host=unescape(d.host)),d.path&&(d.path=escape(unescape(d.path))),d.fragment&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),E&&E.parse&&E.parse(d,f)}else d.error=d.error||"URI can not be parsed.";return d}const $={SCHEMES:s,normalize:o,resolve:a,resolveComponents:u,equal:c,serialize:l,parse:S};return It.exports=$,It.exports.default=$,It.exports.fastUri=$,It.
443
+ exports}var Ti;function lh(){if(Ti)return ur;Ti=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=uh();return e.code='require("ajv/dist/runtime/uri").default',ur.default=e,ur}var Ni;function Oi(){return Ni||(Ni=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Nt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ae();Object.defineProperty(e,"_",{enumerable:!0,
444
+ get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ar(),i=Ot(),s=ai(),o=cr(),a=ae(),u=sr(),c=nr(),l=fe(),m=oh,y=lh(),
445
+ _=(q,A)=>new RegExp(q,A);_.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),p={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",
445
446
  missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cach\
446
- e, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function d(x){var A,L,N,R,b,C,B,K,ee,re,T,O,V,X,Z,J,ue,we,Y,ne,W,te,le,ye,he;const xe=x.strict,Be=(A=x.code)===null||A===void 0?void 0:A.optimize,To=Be===!0||Be===void 0?1:Be||0,No=(N=(L=x.code)===null||L===void 0?void 0:L.regExp)!==null&&N!==void 0?N:_,
447
- Pf=(R=x.uriResolver)!==null&&R!==void 0?R:y.default;return{strictSchema:(C=(b=x.strictSchema)!==null&&b!==void 0?b:xe)!==null&&C!==void 0?C:!0,strictNumbers:(K=(B=x.strictNumbers)!==null&&B!==void 0?B:xe)!==null&&K!==void 0?K:!0,strictTypes:(re=(ee=x.strictTypes)!==null&&ee!==void 0?ee:xe)!==null&&re!==void 0?re:"log",strictTuples:(O=(T=x.strictTuples)!==null&&T!==void 0?T:xe)!==null&&O!==void 0?O:"log",strictRequired:(X=(V=x.strictRequired)!==null&&V!==void 0?V:xe)!==null&&X!==void 0?X:!1,code:x.
448
- code?{...x.code,optimize:To,regExp:No}:{optimize:To,regExp:No},loopRequired:(Z=x.loopRequired)!==null&&Z!==void 0?Z:f,loopEnum:(J=x.loopEnum)!==null&&J!==void 0?J:f,meta:(ue=x.meta)!==null&&ue!==void 0?ue:!0,messages:(we=x.messages)!==null&&we!==void 0?we:!0,inlineRefs:(Y=x.inlineRefs)!==null&&Y!==void 0?Y:!0,schemaId:(ne=x.schemaId)!==null&&ne!==void 0?ne:"$id",addUsedSchema:(W=x.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(te=x.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(le=
449
- x.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(ye=x.unicodeRegExp)!==null&&ye!==void 0?ye:!0,int32range:(he=x.int32range)!==null&&he!==void 0?he:!0,uriResolver:Pf}}class ${constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...d(A)};const{es5:L,lines:N}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:L,lines:N}),this.logger=H(A.logger);const R=A.validateFormats;A.validateFormats=
450
- !1,this.RULES=(0,s.getRules)(),v.call(this,p,A,"NOT SUPPORTED"),v.call(this,h,A,"DEPRECATED","warn"),this._metaOpts=U.call(this),A.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&k.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),E.call(this),A.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:L,schemaId:N}=this.opts;let R=m;N==="id"&&(R={...m},R.id=R.$id,delete R.$id),L&&A&&this.
451
- addMetaSchema(R,R[N],!1)}defaultMeta(){const{meta:A,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[L]||A:void 0}validate(A,L){let N;if(typeof A=="string"){if(N=this.getSchema(A),!N)throw new Error(`no schema with key or ref "${A}"`)}else N=this.compile(A);const R=N(L);return"$async"in N||(this.errors=N.errors),R}compile(A,L){const N=this._addSchema(A,L);return N.validate||this._compileSchemaEnv(N)}compileAsync(A,L){if(typeof this.opts.loadSchema!="function")throw new Error(
452
- "options.loadSchema should be a function");const{loadSchema:N}=this.opts;return R.call(this,A,L);async function R(re,T){await b.call(this,re.$schema);const O=this._addSchema(re,T);return O.validate||C.call(this,O)}async function b(re){re&&!this.getSchema(re)&&await R.call(this,{$ref:re},!0)}async function C(re){try{return this._compileSchemaEnv(re)}catch(T){if(!(T instanceof c.default))throw T;return B.call(this,T),await K.call(this,T.missingSchema),C.call(this,re)}}function B({missingSchema:re,
453
- missingRef:T}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${T} cannot be resolved`)}async function K(re){const T=await ee.call(this,re);this.refs[re]||await b.call(this,T.$schema),this.refs[re]||this.addSchema(T,re,L)}async function ee(re){const T=this._loading[re];if(T)return T;try{return await(this._loading[re]=N(re))}finally{delete this._loading[re]}}}addSchema(A,L,N,R=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,N,R);return this}
454
- let b;if(typeof A=="object"){const{schemaId:C}=this.opts;if(b=A[C],b!==void 0&&typeof b!="string")throw new Error(`schema ${C} must be string`)}return L=(0,i.normalizeId)(L||b),this._checkUnique(L),this.schemas[L]=this._addSchema(A,N,L,R,!0),this}addMetaSchema(A,L,N=this.opts.validateSchema){return this.addSchema(A,L,!0,N),this}validateSchema(A,L){if(typeof A=="boolean")return!0;let N;if(N=A.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||
455
- this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const R=this.validate(N,A);if(!R&&L){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return R}getSchema(A){let L;for(;typeof(L=w.call(this,A))=="string";)A=L;if(L===void 0){const{schemaId:N}=this.opts,R=new o.SchemaEnv({schema:{},schemaId:N});if(L=o.resolveSchema.call(this,R,A),!L)return;this.refs[A]=L}return L.validate||this.
456
- _compileSchemaEnv(L)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=w.call(this,A);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const L=A;this._cache.delete(L);let N=A[this.opts.schemaId];return N&&
457
- (N=(0,i.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const L of A)this.addKeyword(L);return this}addKeyword(A,L){let N;if(typeof A=="string")N=A,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=N);else if(typeof A=="object"&&L===void 0){if(L=A,N=L.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string\
458
- or non-empty array")}else throw new Error("invalid addKeywords parameters");if(I.call(this,N,L),!L)return(0,l.eachItem)(N,b=>M.call(this,b)),this;F.call(this,L);const R={...L,type:(0,u.getJSONTypes)(L.type),schemaType:(0,u.getJSONTypes)(L.schemaType)};return(0,l.eachItem)(N,R.type.length===0?b=>M.call(this,b,R):b=>R.type.forEach(C=>M.call(this,b,R,C))),this}getKeyword(A){const L=this.RULES.all[A];return typeof L=="object"?L.definition:!!L}removeKeyword(A){const{RULES:L}=this;delete L.keywords[A],
459
- delete L.all[A];for(const N of L.rules){const R=N.rules.findIndex(b=>b.keyword===A);R>=0&&N.rules.splice(R,1)}return this}addFormat(A,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[A]=L,this}errorsText(A=this.errors,{separator:L=", ",dataVar:N="data"}={}){return!A||A.length===0?"No errors":A.map(R=>`${N}${R.instancePath} ${R.message}`).reduce((R,b)=>R+L+b)}$dataMetaSchema(A,L){const N=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const R of L){const b=R.split("/").slice(1);let C=A;
460
- for(const B of b)C=C[B];for(const B in N){const K=N[B];if(typeof K!="object")continue;const{$data:ee}=K.definition,re=C[B];ee&&re&&(C[B]=Q(re))}}return A}_removeAllSchemas(A,L){for(const N in A){const R=A[N];(!L||L.test(N))&&(typeof R=="string"?delete A[N]:R&&!R.meta&&(this._cache.delete(R.schema),delete A[N]))}}_addSchema(A,L,N,R=this.opts.validateSchema,b=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof A=="object")C=A[B];else{if(this.opts.jtd)throw new Error("schema must b\
461
- e object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let K=this._cache.get(A);if(K!==void 0)return K;N=(0,i.normalizeId)(C||N);const ee=i.getSchemaRefs.call(this,A,N);return K=new o.SchemaEnv({schema:A,schemaId:B,meta:L,baseId:N,localRefs:ee}),this._cache.set(K.schema,K),b&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=K),R&&this.validateSchema(A,!0),K}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" alrea\
462
- dy exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):o.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const L=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=L}}}$.ValidationError=n.default,$.MissingRefError=c.default,e.default=$;function v(x,A,L,N="error"){for(const R in x){const b=R;b in A&&this.logger[N](`${L}: option ${R}. ${x[b]}`)}}function w(x){return x=(0,i.normalizeId)(
463
- x),this.schemas[x]||this.refs[x]}function E(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const A in x)this.addSchema(x[A],A)}function P(){for(const x in this.opts.formats){const A=this.opts.formats[x];A&&this.addFormat(x,A)}}function k(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in x){const L=x[A];L.keyword||(L.keyword=A),this.addKeyword(L)}}function U(){const x={...this.opts};
464
- for(const A of S)delete x[A];return x}const q={log(){},warn(){},error(){}};function H(x){if(x===!1)return q;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function I(x,A){const{RULES:L}=this;if((0,l.eachItem)(x,N=>{if(L.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!D.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!A&&A.$data&&!("code"in A||"val\
465
- idate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function M(x,A,L){var N;const R=A?.post;if(L&&R)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let C=R?b.post:b.rules.find(({type:K})=>K===L);if(C||(C={type:L,rules:[]},b.rules.push(C)),b.keywords[x]=!0,!A)return;const B={keyword:x,definition:{...A,type:(0,u.getJSONTypes)(A.type),schemaType:(0,u.getJSONTypes)(A.schemaType)}};A.before?z.call(this,C,B,A.before):C.rules.push(B),b.
466
- all[x]=B,(N=A.implements)===null||N===void 0||N.forEach(K=>this.addKeyword(K))}function z(x,A,L){const N=x.rules.findIndex(R=>R.keyword===L);N>=0?x.rules.splice(N,0,A):(x.rules.push(A),this.logger.warn(`rule ${L} is not defined`))}function F(x){let{metaSchema:A}=x;A!==void 0&&(x.$data&&this.opts.$data&&(A=Q(A)),x.validateSchema=this.compile(A,!0))}const G={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(x){return{anyOf:[x,G]}}})(ls)),ls}var lr={},
467
- fr={},dr={},ki;function uh(){if(ki)return dr;ki=1,Object.defineProperty(dr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return dr.default=e,dr}var et={},Ii;function vs(){if(Ii)return et;Ii=1,Object.defineProperty(et,"__esModule",{value:!0}),et.callRef=et.getValidate=void 0;const e=It(),t=Ie(),r=oe(),n=Oe(),c=cr(),s=fe(),o={keyword:"$ref",schemaType:"string",code(u){const{gen:l,schema:m,it:y}=u,{baseId:_,schemaEnv:S,
468
- validateName:g,opts:p,self:h}=y,{root:f}=S;if((m==="#"||m==="#/")&&_===f.baseId)return $();const d=c.resolveRef.call(h,f,_,m);if(d===void 0)throw new e.default(y.opts.uriResolver,_,m);if(d instanceof c.SchemaEnv)return v(d);return w(d);function $(){if(S===f)return i(u,g,S,S.$async);const E=l.scopeValue("root",{ref:f});return i(u,(0,r._)`${E}.validate`,f,f.$async)}function v(E){const P=a(u,E);i(u,P,E,E.$async)}function w(E){const P=l.scopeValue("schema",p.code.source===!0?{ref:E,code:(0,r.stringify)(
469
- E)}:{ref:E}),k=l.name("valid"),U=u.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:m},k);u.mergeEvaluated(U),u.ok(k)}}};function a(u,l){const{gen:m}=u;return l.validate?m.scopeValue("validate",{ref:l.validate}):(0,r._)`${m.scopeValue("wrapper",{ref:l})}.validate`}et.getValidate=a;function i(u,l,m,y){const{gen:_,it:S}=u,{allErrors:g,schemaEnv:p,opts:h}=S,f=h.passContext?n.default.this:r.nil;y?d():$();function d(){if(!p.$async)throw new Error("async schema referenced\
470
- by sync schema");const E=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(u,l,f)}`),w(l),g||_.assign(E,!0)},P=>{_.if((0,r._)`!(${P} instanceof ${S.ValidationError})`,()=>_.throw(P)),v(P),g||_.assign(E,!1)}),u.ok(E)}function $(){u.result((0,t.callValidateCode)(u,l,f),()=>w(l),()=>v(l))}function v(E){const P=(0,r._)`${E}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),_.assign(n.default.errors,(0,r._)`${n.
471
- default.vErrors}.length`)}function w(E){var P;if(!S.opts.unevaluated)return;const k=(P=m?.validate)===null||P===void 0?void 0:P.evaluated;if(S.props!==!0)if(k&&!k.dynamicProps)k.props!==void 0&&(S.props=s.mergeEvaluated.props(_,k.props,S.props));else{const U=_.var("props",(0,r._)`${E}.evaluated.props`);S.props=s.mergeEvaluated.props(_,U,S.props,r.Name)}if(S.items!==!0)if(k&&!k.dynamicItems)k.items!==void 0&&(S.items=s.mergeEvaluated.items(_,k.items,S.items));else{const U=_.var("items",(0,r._)`${E}.evaluated.items`);
472
- S.items=s.mergeEvaluated.items(_,U,S.items,r.Name)}}}return et.callRef=i,et.default=o,et}var ji;function Li(){if(ji)return fr;ji=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=uh(),t=vs(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return fr.default=r,fr}var pr={},hr={},Di;function lh(){if(Di)return hr;Di=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=oe(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{
473
- okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:o})=>(0,e.str)`must be ${r[s].okStr} ${o}`,params:({keyword:s,schemaCode:o})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${o}}`},c={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:o,data:a,schemaCode:i}=s;s.fail$data((0,e._)`${a} ${r[o].fail} ${i} || isNaN(${a})`)}};return hr.default=c,hr}
474
- var mr={},qi;function fh(){if(qi)return mr;qi=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=oe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:c,data:s,schemaCode:o,it:a}=n,i=a.opts.multipleOfPrecision,u=c.let("res"),l=i?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${i}`:(0,e._)`${u} !== parseInt(${u})`;n.fail$data((0,e.
475
- _)`(${o} === 0 || (${u} = ${s}/${o}, ${l}))`)}};return mr.default=r,mr}var yr={},gr={},xi;function dh(){if(xi)return gr;xi=1,Object.defineProperty(gr,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,c=0,s;for(;c<r;)n++,s=t.charCodeAt(c++),s>=55296&&s<=56319&&c<r&&(s=t.charCodeAt(c),(s&64512)===56320&&c++);return n}return gr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',gr}var Mi;function ph(){if(Mi)return yr;Mi=1,Object.defineProperty(yr,"__esModule",{value:!0});
476
- const e=oe(),t=fe(),r=dh(),c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:o}){const a=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:o,data:a,schemaCode:i,it:u}=s,l=o==="maxLength"?e.operators.GT:e.operators.LT,m=u.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${a})`;s.fail$data((0,e.
477
- _)`${m} ${l} ${i}`)}};return yr.default=c,yr}var $r={},Hi;function hh(){if(Hi)return $r;Hi=1,Object.defineProperty($r,"__esModule",{value:!0});const e=Ie(),t=oe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:c})=>(0,t.str)`must match pattern "${c}"`,params:({schemaCode:c})=>(0,t._)`{pattern: ${c}}`},code(c){const{data:s,$data:o,schema:a,schemaCode:i,it:u}=c,l=u.opts.unicodeRegExp?"u":"",m=o?(0,t._)`(new RegExp(${i}, ${l}))`:(0,e.usePattern)(c,a);c.fail$data(
478
- (0,t._)`!${m}.test(${s})`)}};return $r.default=n,$r}var vr={},Ui;function mh(){if(Ui)return vr;Ui=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=oe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:c}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:c,data:s,schemaCode:o}=n,a=c==="maxP\
479
- roperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${a} ${o}`)}};return vr.default=r,vr}var _r={},Fi;function yh(){if(Fi)return _r;Fi=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Ie(),t=oe(),r=fe(),c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:o,schema:a,
480
- schemaCode:i,data:u,$data:l,it:m}=s,{opts:y}=m;if(!l&&a.length===0)return;const _=a.length>=y.loopRequired;if(m.allErrors?S():g(),y.strictRequired){const f=s.parentSchema.properties,{definedProperties:d}=s.it;for(const $ of a)if(f?.[$]===void 0&&!d.has($)){const v=m.schemaEnv.baseId+m.errSchemaPath,w=`required property "${$}" is not defined at "${v}" (strictRequired)`;(0,r.checkStrictMode)(m,w,m.opts.strictRequired)}}function S(){if(_||l)s.block$data(t.nil,p);else for(const f of a)(0,e.checkReportMissingProp)(
481
- s,f)}function g(){const f=o.let("missing");if(_||l){const d=o.let("valid",!0);s.block$data(d,()=>h(f,d)),s.ok(d)}else o.if((0,e.checkMissingProp)(s,a,f)),(0,e.reportMissingProp)(s,f),o.else()}function p(){o.forOf("prop",i,f=>{s.setParams({missingProperty:f}),o.if((0,e.noPropertyInData)(o,u,f,y.ownProperties),()=>s.error())})}function h(f,d){s.setParams({missingProperty:f}),o.forOf(f,i,()=>{o.assign(d,(0,e.propertyInData)(o,u,f,y.ownProperties)),o.if((0,t.not)(d),()=>{s.error(),o.break()})},t.nil)}}};
482
- return _r.default=c,_r}var wr={},Vi;function gh(){if(Vi)return wr;Vi=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=oe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:c}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:c,data:s,schemaCode:o}=n,a=c==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e.
483
- _)`${s}.length ${a} ${o}`)}};return wr.default=r,wr}var br={},Er={},zi;function _s(){if(zi)return Er;zi=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=xo();return e.code='require("ajv/dist/runtime/equal").default',Er.default=e,Er}var Gi;function $h(){if(Gi)return br;Gi=1,Object.defineProperty(br,"__esModule",{value:!0});const e=nr(),t=oe(),r=fe(),n=_s(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${o} are identical)`,
484
- params:({params:{i:o,j:a}})=>(0,t._)`{i: ${o}, j: ${a}}`},code(o){const{gen:a,data:i,$data:u,schema:l,parentSchema:m,schemaCode:y,it:_}=o;if(!u&&!l)return;const S=a.let("valid"),g=m.items?(0,e.getSchemaTypes)(m.items):[];o.block$data(S,p,(0,t._)`${y} === false`),o.ok(S);function p(){const $=a.let("i",(0,t._)`${i}.length`),v=a.let("j");o.setParams({i:$,j:v}),a.assign(S,!0),a.if((0,t._)`${$} > 1`,()=>(h()?f:d)($,v))}function h(){return g.length>0&&!g.some($=>$==="object"||$==="array")}function f($,v){
485
- const w=a.name("item"),E=(0,e.checkDataTypes)(g,w,_.opts.strictNumbers,e.DataType.Wrong),P=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${$}--;`,()=>{a.let(w,(0,t._)`${i}[${$}]`),a.if(E,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${w} == "string"`,(0,t._)`${w} += "_"`),a.if((0,t._)`typeof ${P}[${w}] == "number"`,()=>{a.assign(v,(0,t._)`${P}[${w}]`),o.error(),a.assign(S,!1).break()}).code((0,t._)`${P}[${w}] = ${$}`)})}function d($,v){const w=(0,r.useFunc)(a,n.default),E=a.name("outer");a.
486
- label(E).for((0,t._)`;${$}--;`,()=>a.for((0,t._)`${v} = ${$}; ${v}--;`,()=>a.if((0,t._)`${w}(${i}[${$}], ${i}[${v}])`,()=>{o.error(),a.assign(S,!1).break(E)})))}}};return br.default=s,br}var Sr={},Bi;function vh(){if(Bi)return Sr;Bi=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=oe(),t=fe(),r=_s(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:o,data:a,$data:i,schemaCode:u,schema:l}=s;i||
487
- l&&typeof l=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(o,r.default)}(${a}, ${u})`):s.fail((0,e._)`${l} !== ${a}`)}};return Sr.default=c,Sr}var Rr={},Ki;function _h(){if(Ki)return Rr;Ki=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=oe(),t=fe(),r=_s(),c={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:o,data:a,$data:i,schema:u,schemaCode:l,it:m}=s;if(!i&&
488
- u.length===0)throw new Error("enum must have non-empty array");const y=u.length>=m.opts.loopEnum;let _;const S=()=>_??(_=(0,t.useFunc)(o,r.default));let g;if(y||i)g=o.let("valid"),s.block$data(g,p);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const f=o.const("vSchema",l);g=(0,e.or)(...u.map((d,$)=>h(f,$)))}s.pass(g);function p(){o.assign(g,!1),o.forOf("v",l,f=>o.if((0,e._)`${S()}(${a}, ${f})`,()=>o.assign(g,!0).break()))}function h(f,d){const $=u[d];return typeof $=="obj\
489
- ect"&&$!==null?(0,e._)`${S()}(${a}, ${f}[${d}])`:(0,e._)`${a} === ${$}`}}};return Rr.default=c,Rr}var Wi;function Xi(){if(Wi)return pr;Wi=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=lh(),t=fh(),r=ph(),n=hh(),c=mh(),s=yh(),o=gh(),a=$h(),i=vh(),u=_h(),l=[e.default,t.default,r.default,n.default,c.default,s.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,u.default];return pr.default=l,pr}var Ar={},ht={},Ji;
490
- function Yi(){if(Ji)return ht;Ji=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.validateAdditionalItems=void 0;const e=oe(),t=fe(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:o,it:a}=s,{items:i}=o;if(!Array.isArray(i)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "ite\
491
- ms" is not an array of schemas');return}c(s,i)}};function c(s,o){const{gen:a,schema:i,data:u,keyword:l,it:m}=s;m.items=!0;const y=a.const("len",(0,e._)`${u}.length`);if(i===!1)s.setParams({len:o.length}),s.pass((0,e._)`${y} <= ${o.length}`);else if(typeof i=="object"&&!(0,t.alwaysValidSchema)(m,i)){const S=a.var("valid",(0,e._)`${y} <= ${o.length}`);a.if((0,e.not)(S),()=>_(S)),s.ok(S)}function _(S){a.forRange("i",o.length,y,g=>{s.subschema({keyword:l,dataProp:g,dataPropType:t.Type.Num},S),m.allErrors||
492
- a.if((0,e.not)(S),()=>a.break())})}}return ht.validateAdditionalItems=c,ht.default=n,ht}var Pr={},mt={},Qi;function Zi(){if(Qi)return mt;Qi=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.validateTuple=void 0;const e=oe(),t=fe(),r=Ie(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:o,it:a}=s;if(Array.isArray(o))return c(s,"additionalItems",o);a.items=!0,!(0,t.alwaysValidSchema)(a,o)&&s.ok((0,r.validateArray)(s))}};function c(s,o,a=s.
493
- schema){const{gen:i,parentSchema:u,data:l,keyword:m,it:y}=s;g(u),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(i,a.length,y.items));const _=i.name("valid"),S=i.const("len",(0,e._)`${l}.length`);a.forEach((p,h)=>{(0,t.alwaysValidSchema)(y,p)||(i.if((0,e._)`${S} > ${h}`,()=>s.subschema({keyword:m,schemaProp:h,dataProp:h},_)),s.ok(_))});function g(p){const{opts:h,errSchemaPath:f}=y,d=a.length,$=d===p.minItems&&(d===p.maxItems||p[o]===!1);if(h.strictTuples&&!$){const v=`\
494
- "${m}" is ${d}-tuple, but minItems or maxItems/${o} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,v,h.strictTuples)}}}return mt.validateTuple=c,mt.default=n,mt}var ec;function wh(){if(ec)return Pr;ec=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Zi(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Pr.default=t,Pr}var Cr={},tc;function bh(){if(tc)return Cr;tc=1,Object.defineProperty(
495
- Cr,"__esModule",{value:!0});const e=oe(),t=fe(),r=Ie(),n=Yi(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:i,it:u}=o,{prefixItems:l}=i;u.items=!0,!(0,t.alwaysValidSchema)(u,a)&&(l?(0,n.validateAdditionalItems)(o,l):o.ok((0,r.validateArray)(o)))}};return Cr.default=s,Cr}var Tr={},rc;function Eh(){
496
- if(rc)return Tr;rc=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=oe(),t=fe(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:c,max:s}})=>s===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${s} valid item(s)`,params:({params:{min:c,max:s}})=>s===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${s}}`},code(c){
497
- const{gen:s,schema:o,parentSchema:a,data:i,it:u}=c;let l,m;const{minContains:y,maxContains:_}=a;u.opts.next?(l=y===void 0?1:y,m=_):l=1;const S=s.const("len",(0,e._)`${i}.length`);if(c.setParams({min:l,max:m}),m===void 0&&l===0){(0,t.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0,t.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,t.alwaysValidSchema)(u,o)){let d=(0,e._)`${S} >= ${l}`;
498
- m!==void 0&&(d=(0,e._)`${d} && ${S} <= ${m}`),c.pass(d);return}u.items=!0;const g=s.name("valid");m===void 0&&l===1?h(g,()=>s.if(g,()=>s.break())):l===0?(s.let(g,!0),m!==void 0&&s.if((0,e._)`${i}.length > 0`,p)):(s.let(g,!1),p()),c.result(g,()=>c.reset());function p(){const d=s.name("_valid"),$=s.let("count",0);h(d,()=>s.if(d,()=>f($)))}function h(d,$){s.forRange("i",0,S,v=>{c.subschema({keyword:"contains",dataProp:v,dataPropType:t.Type.Num,compositeRule:!0},d),$()})}function f(d){s.code((0,e._)`${d}++`),
499
- m===void 0?s.if((0,e._)`${d} >= ${l}`,()=>s.assign(g,!0).break()):(s.if((0,e._)`${d} > ${m}`,()=>s.assign(g,!1).break()),l===1?s.assign(g,!0):s.if((0,e._)`${d} >= ${l}`,()=>s.assign(g,!0)))}}};return Tr.default=n,Tr}var ws={},nc;function bs(){return nc||(nc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=oe(),r=fe(),n=Ie();e.error={message:({params:{property:i,depsCount:u,deps:l}})=>{const m=u===1?"property":"prop\
500
- erties";return(0,t.str)`must have ${m} ${l} when property ${i} is present`},params:({params:{property:i,depsCount:u,deps:l,missingProperty:m}})=>(0,t._)`{property: ${i},
447
+ e, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function d(q){var A,L,T,R,b,C,B,K,ee,re,k,N,V,X,Z,J,ue,we,Y,ne,W,te,le,ye,he;const Me=q.strict,Ke=(A=q.code)===null||A===void 0?void 0:A.optimize,ko=Ke===!0||Ke===void 0?1:Ke||0,To=(T=(L=q.code)===null||L===void 0?void 0:L.regExp)!==null&&T!==void 0?T:_,
448
+ Cf=(R=q.uriResolver)!==null&&R!==void 0?R:y.default;return{strictSchema:(C=(b=q.strictSchema)!==null&&b!==void 0?b:Me)!==null&&C!==void 0?C:!0,strictNumbers:(K=(B=q.strictNumbers)!==null&&B!==void 0?B:Me)!==null&&K!==void 0?K:!0,strictTypes:(re=(ee=q.strictTypes)!==null&&ee!==void 0?ee:Me)!==null&&re!==void 0?re:"log",strictTuples:(N=(k=q.strictTuples)!==null&&k!==void 0?k:Me)!==null&&N!==void 0?N:"log",strictRequired:(X=(V=q.strictRequired)!==null&&V!==void 0?V:Me)!==null&&X!==void 0?X:!1,code:q.
449
+ code?{...q.code,optimize:ko,regExp:To}:{optimize:ko,regExp:To},loopRequired:(Z=q.loopRequired)!==null&&Z!==void 0?Z:f,loopEnum:(J=q.loopEnum)!==null&&J!==void 0?J:f,meta:(ue=q.meta)!==null&&ue!==void 0?ue:!0,messages:(we=q.messages)!==null&&we!==void 0?we:!0,inlineRefs:(Y=q.inlineRefs)!==null&&Y!==void 0?Y:!0,schemaId:(ne=q.schemaId)!==null&&ne!==void 0?ne:"$id",addUsedSchema:(W=q.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(te=q.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(le=
450
+ q.validateFormats)!==null&&le!==void 0?le:!0,unicodeRegExp:(ye=q.unicodeRegExp)!==null&&ye!==void 0?ye:!0,int32range:(he=q.int32range)!==null&&he!==void 0?he:!0,uriResolver:Cf}}class g{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...d(A)};const{es5:L,lines:T}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:$,es5:L,lines:T}),this.logger=H(A.logger);const R=A.validateFormats;A.validateFormats=
451
+ !1,this.RULES=(0,s.getRules)(),v.call(this,p,A,"NOT SUPPORTED"),v.call(this,h,A,"DEPRECATED","warn"),this._metaOpts=U.call(this),A.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&O.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),E.call(this),A.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:L,schemaId:T}=this.opts;let R=m;T==="id"&&(R={...m},R.id=R.$id,delete R.$id),L&&A&&this.
452
+ addMetaSchema(R,R[T],!1)}defaultMeta(){const{meta:A,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[L]||A:void 0}validate(A,L){let T;if(typeof A=="string"){if(T=this.getSchema(A),!T)throw new Error(`no schema with key or ref "${A}"`)}else T=this.compile(A);const R=T(L);return"$async"in T||(this.errors=T.errors),R}compile(A,L){const T=this._addSchema(A,L);return T.validate||this._compileSchemaEnv(T)}compileAsync(A,L){if(typeof this.opts.loadSchema!="function")throw new Error(
453
+ "options.loadSchema should be a function");const{loadSchema:T}=this.opts;return R.call(this,A,L);async function R(re,k){await b.call(this,re.$schema);const N=this._addSchema(re,k);return N.validate||C.call(this,N)}async function b(re){re&&!this.getSchema(re)&&await R.call(this,{$ref:re},!0)}async function C(re){try{return this._compileSchemaEnv(re)}catch(k){if(!(k instanceof i.default))throw k;return B.call(this,k),await K.call(this,k.missingSchema),C.call(this,re)}}function B({missingSchema:re,
454
+ missingRef:k}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${k} cannot be resolved`)}async function K(re){const k=await ee.call(this,re);this.refs[re]||await b.call(this,k.$schema),this.refs[re]||this.addSchema(k,re,L)}async function ee(re){const k=this._loading[re];if(k)return k;try{return await(this._loading[re]=T(re))}finally{delete this._loading[re]}}}addSchema(A,L,T,R=this.opts.validateSchema){if(Array.isArray(A)){for(const C of A)this.addSchema(C,void 0,T,R);return this}
455
+ let b;if(typeof A=="object"){const{schemaId:C}=this.opts;if(b=A[C],b!==void 0&&typeof b!="string")throw new Error(`schema ${C} must be string`)}return L=(0,u.normalizeId)(L||b),this._checkUnique(L),this.schemas[L]=this._addSchema(A,T,L,R,!0),this}addMetaSchema(A,L,T=this.opts.validateSchema){return this.addSchema(A,L,!0,T),this}validateSchema(A,L){if(typeof A=="boolean")return!0;let T;if(T=A.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||
456
+ this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const R=this.validate(T,A);if(!R&&L){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return R}getSchema(A){let L;for(;typeof(L=w.call(this,A))=="string";)A=L;if(L===void 0){const{schemaId:T}=this.opts,R=new o.SchemaEnv({schema:{},schemaId:T});if(L=o.resolveSchema.call(this,R,A),!L)return;this.refs[A]=L}return L.validate||this.
457
+ _compileSchemaEnv(L)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=w.call(this,A);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const L=A;this._cache.delete(L);let T=A[this.opts.schemaId];return T&&
458
+ (T=(0,u.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const L of A)this.addKeyword(L);return this}addKeyword(A,L){let T;if(typeof A=="string")T=A,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=T);else if(typeof A=="object"&&L===void 0){if(L=A,T=L.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string\
459
+ or non-empty array")}else throw new Error("invalid addKeywords parameters");if(I.call(this,T,L),!L)return(0,l.eachItem)(T,b=>M.call(this,b)),this;F.call(this,L);const R={...L,type:(0,c.getJSONTypes)(L.type),schemaType:(0,c.getJSONTypes)(L.schemaType)};return(0,l.eachItem)(T,R.type.length===0?b=>M.call(this,b,R):b=>R.type.forEach(C=>M.call(this,b,R,C))),this}getKeyword(A){const L=this.RULES.all[A];return typeof L=="object"?L.definition:!!L}removeKeyword(A){const{RULES:L}=this;delete L.keywords[A],
460
+ delete L.all[A];for(const T of L.rules){const R=T.rules.findIndex(b=>b.keyword===A);R>=0&&T.rules.splice(R,1)}return this}addFormat(A,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[A]=L,this}errorsText(A=this.errors,{separator:L=", ",dataVar:T="data"}={}){return!A||A.length===0?"No errors":A.map(R=>`${T}${R.instancePath} ${R.message}`).reduce((R,b)=>R+L+b)}$dataMetaSchema(A,L){const T=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const R of L){const b=R.split("/").slice(1);let C=A;
461
+ for(const B of b)C=C[B];for(const B in T){const K=T[B];if(typeof K!="object")continue;const{$data:ee}=K.definition,re=C[B];ee&&re&&(C[B]=Q(re))}}return A}_removeAllSchemas(A,L){for(const T in A){const R=A[T];(!L||L.test(T))&&(typeof R=="string"?delete A[T]:R&&!R.meta&&(this._cache.delete(R.schema),delete A[T]))}}_addSchema(A,L,T,R=this.opts.validateSchema,b=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof A=="object")C=A[B];else{if(this.opts.jtd)throw new Error("schema must b\
462
+ e object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let K=this._cache.get(A);if(K!==void 0)return K;T=(0,u.normalizeId)(C||T);const ee=u.getSchemaRefs.call(this,A,T);return K=new o.SchemaEnv({schema:A,schemaId:B,meta:L,baseId:T,localRefs:ee}),this._cache.set(K.schema,K),b&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=K),R&&this.validateSchema(A,!0),K}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" alrea\
463
+ dy exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):o.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const L=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,A)}finally{this.opts=L}}}g.ValidationError=n.default,g.MissingRefError=i.default,e.default=g;function v(q,A,L,T="error"){for(const R in q){const b=R;b in A&&this.logger[T](`${L}: option ${R}. ${q[b]}`)}}function w(q){return q=(0,u.normalizeId)(
464
+ q),this.schemas[q]||this.refs[q]}function E(){const q=this.opts.schemas;if(q)if(Array.isArray(q))this.addSchema(q);else for(const A in q)this.addSchema(q[A],A)}function P(){for(const q in this.opts.formats){const A=this.opts.formats[q];A&&this.addFormat(q,A)}}function O(q){if(Array.isArray(q)){this.addVocabulary(q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in q){const L=q[A];L.keyword||(L.keyword=A),this.addKeyword(L)}}function U(){const q={...this.opts};
465
+ for(const A of S)delete q[A];return q}const x={log(){},warn(){},error(){}};function H(q){if(q===!1)return x;if(q===void 0)return console;if(q.log&&q.warn&&q.error)return q;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function I(q,A){const{RULES:L}=this;if((0,l.eachItem)(q,T=>{if(L.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!D.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!A&&A.$data&&!("code"in A||"val\
466
+ idate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function M(q,A,L){var T;const R=A?.post;if(L&&R)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let C=R?b.post:b.rules.find(({type:K})=>K===L);if(C||(C={type:L,rules:[]},b.rules.push(C)),b.keywords[q]=!0,!A)return;const B={keyword:q,definition:{...A,type:(0,c.getJSONTypes)(A.type),schemaType:(0,c.getJSONTypes)(A.schemaType)}};A.before?z.call(this,C,B,A.before):C.rules.push(B),b.
467
+ all[q]=B,(T=A.implements)===null||T===void 0||T.forEach(K=>this.addKeyword(K))}function z(q,A,L){const T=q.rules.findIndex(R=>R.keyword===L);T>=0?q.rules.splice(T,0,A):(q.rules.push(A),this.logger.warn(`rule ${L} is not defined`))}function F(q){let{metaSchema:A}=q;A!==void 0&&(q.$data&&this.opts.$data&&(A=Q(A)),q.validateSchema=this.compile(A,!0))}const G={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(q){return{anyOf:[q,G]}}})(ls)),ls}var lr={},
468
+ fr={},dr={},Ii;function fh(){if(Ii)return dr;Ii=1,Object.defineProperty(dr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return dr.default=e,dr}var et={},ji;function vs(){if(ji)return et;ji=1,Object.defineProperty(et,"__esModule",{value:!0}),et.callRef=et.getValidate=void 0;const e=Ot(),t=Ie(),r=ae(),n=Ne(),i=cr(),s=fe(),o={keyword:"$ref",schemaType:"string",code(c){const{gen:l,schema:m,it:y}=c,{baseId:_,schemaEnv:S,
469
+ validateName:$,opts:p,self:h}=y,{root:f}=S;if((m==="#"||m==="#/")&&_===f.baseId)return g();const d=i.resolveRef.call(h,f,_,m);if(d===void 0)throw new e.default(y.opts.uriResolver,_,m);if(d instanceof i.SchemaEnv)return v(d);return w(d);function g(){if(S===f)return u(c,$,S,S.$async);const E=l.scopeValue("root",{ref:f});return u(c,(0,r._)`${E}.validate`,f,f.$async)}function v(E){const P=a(c,E);u(c,P,E,E.$async)}function w(E){const P=l.scopeValue("schema",p.code.source===!0?{ref:E,code:(0,r.stringify)(
470
+ E)}:{ref:E}),O=l.name("valid"),U=c.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:m},O);c.mergeEvaluated(U),c.ok(O)}}};function a(c,l){const{gen:m}=c;return l.validate?m.scopeValue("validate",{ref:l.validate}):(0,r._)`${m.scopeValue("wrapper",{ref:l})}.validate`}et.getValidate=a;function u(c,l,m,y){const{gen:_,it:S}=c,{allErrors:$,schemaEnv:p,opts:h}=S,f=h.passContext?n.default.this:r.nil;y?d():g();function d(){if(!p.$async)throw new Error("async schema referenced\
471
+ by sync schema");const E=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(c,l,f)}`),w(l),$||_.assign(E,!0)},P=>{_.if((0,r._)`!(${P} instanceof ${S.ValidationError})`,()=>_.throw(P)),v(P),$||_.assign(E,!1)}),c.ok(E)}function g(){c.result((0,t.callValidateCode)(c,l,f),()=>w(l),()=>v(l))}function v(E){const P=(0,r._)`${E}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),_.assign(n.default.errors,(0,r._)`${n.
472
+ default.vErrors}.length`)}function w(E){var P;if(!S.opts.unevaluated)return;const O=(P=m?.validate)===null||P===void 0?void 0:P.evaluated;if(S.props!==!0)if(O&&!O.dynamicProps)O.props!==void 0&&(S.props=s.mergeEvaluated.props(_,O.props,S.props));else{const U=_.var("props",(0,r._)`${E}.evaluated.props`);S.props=s.mergeEvaluated.props(_,U,S.props,r.Name)}if(S.items!==!0)if(O&&!O.dynamicItems)O.items!==void 0&&(S.items=s.mergeEvaluated.items(_,O.items,S.items));else{const U=_.var("items",(0,r._)`${E}.evaluated.items`);
473
+ S.items=s.mergeEvaluated.items(_,U,S.items,r.Name)}}}return et.callRef=u,et.default=o,et}var Li;function Di(){if(Li)return fr;Li=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=fh(),t=vs(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return fr.default=r,fr}var pr={},hr={},qi;function dh(){if(qi)return hr;qi=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=ae(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{
474
+ okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:o})=>(0,e.str)`must be ${r[s].okStr} ${o}`,params:({keyword:s,schemaCode:o})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${o}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:o,data:a,schemaCode:u}=s;s.fail$data((0,e._)`${a} ${r[o].fail} ${u} || isNaN(${a})`)}};return hr.default=i,hr}
475
+ var mr={},xi;function ph(){if(xi)return mr;xi=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=ae(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:o,it:a}=n,u=a.opts.multipleOfPrecision,c=i.let("res"),l=u?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${u}`:(0,e._)`${c} !== parseInt(${c})`;n.fail$data((0,e.
476
+ _)`(${o} === 0 || (${c} = ${s}/${o}, ${l}))`)}};return mr.default=r,mr}var yr={},gr={},Mi;function hh(){if(Mi)return gr;Mi=1,Object.defineProperty(gr,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,s;for(;i<r;)n++,s=t.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=t.charCodeAt(i),(s&64512)===56320&&i++);return n}return gr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',gr}var Hi;function mh(){if(Hi)return yr;Hi=1,Object.defineProperty(yr,"__esModule",{value:!0});
477
+ const e=ae(),t=fe(),r=hh(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:o}){const a=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:o,data:a,schemaCode:u,it:c}=s,l=o==="maxLength"?e.operators.GT:e.operators.LT,m=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${a})`;s.fail$data((0,e.
478
+ _)`${m} ${l} ${u}`)}};return yr.default=i,yr}var $r={},Ui;function yh(){if(Ui)return $r;Ui=1,Object.defineProperty($r,"__esModule",{value:!0});const e=Ie(),t=ae(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:s,$data:o,schema:a,schemaCode:u,it:c}=i,l=c.opts.unicodeRegExp?"u":"",m=o?(0,t._)`(new RegExp(${u}, ${l}))`:(0,e.usePattern)(i,a);i.fail$data(
479
+ (0,t._)`!${m}.test(${s})`)}};return $r.default=n,$r}var vr={},Fi;function gh(){if(Fi)return vr;Fi=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=ae(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:o}=n,a=i==="maxP\
480
+ roperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${a} ${o}`)}};return vr.default=r,vr}var _r={},Vi;function $h(){if(Vi)return _r;Vi=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:o,schema:a,
481
+ schemaCode:u,data:c,$data:l,it:m}=s,{opts:y}=m;if(!l&&a.length===0)return;const _=a.length>=y.loopRequired;if(m.allErrors?S():$(),y.strictRequired){const f=s.parentSchema.properties,{definedProperties:d}=s.it;for(const g of a)if(f?.[g]===void 0&&!d.has(g)){const v=m.schemaEnv.baseId+m.errSchemaPath,w=`required property "${g}" is not defined at "${v}" (strictRequired)`;(0,r.checkStrictMode)(m,w,m.opts.strictRequired)}}function S(){if(_||l)s.block$data(t.nil,p);else for(const f of a)(0,e.checkReportMissingProp)(
482
+ s,f)}function $(){const f=o.let("missing");if(_||l){const d=o.let("valid",!0);s.block$data(d,()=>h(f,d)),s.ok(d)}else o.if((0,e.checkMissingProp)(s,a,f)),(0,e.reportMissingProp)(s,f),o.else()}function p(){o.forOf("prop",u,f=>{s.setParams({missingProperty:f}),o.if((0,e.noPropertyInData)(o,c,f,y.ownProperties),()=>s.error())})}function h(f,d){s.setParams({missingProperty:f}),o.forOf(f,u,()=>{o.assign(d,(0,e.propertyInData)(o,c,f,y.ownProperties)),o.if((0,t.not)(d),()=>{s.error(),o.break()})},t.nil)}}};
483
+ return _r.default=i,_r}var wr={},zi;function vh(){if(zi)return wr;zi=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ae(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:o}=n,a=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e.
484
+ _)`${s}.length ${a} ${o}`)}};return wr.default=r,wr}var br={},Er={},Gi;function _s(){if(Gi)return Er;Gi=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=Do();return e.code='require("ajv/dist/runtime/equal").default',Er.default=e,Er}var Bi;function _h(){if(Bi)return br;Bi=1,Object.defineProperty(br,"__esModule",{value:!0});const e=nr(),t=ae(),r=fe(),n=_s(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${o} are identical)`,
485
+ params:({params:{i:o,j:a}})=>(0,t._)`{i: ${o}, j: ${a}}`},code(o){const{gen:a,data:u,$data:c,schema:l,parentSchema:m,schemaCode:y,it:_}=o;if(!c&&!l)return;const S=a.let("valid"),$=m.items?(0,e.getSchemaTypes)(m.items):[];o.block$data(S,p,(0,t._)`${y} === false`),o.ok(S);function p(){const g=a.let("i",(0,t._)`${u}.length`),v=a.let("j");o.setParams({i:g,j:v}),a.assign(S,!0),a.if((0,t._)`${g} > 1`,()=>(h()?f:d)(g,v))}function h(){return $.length>0&&!$.some(g=>g==="object"||g==="array")}function f(g,v){
486
+ const w=a.name("item"),E=(0,e.checkDataTypes)($,w,_.opts.strictNumbers,e.DataType.Wrong),P=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${g}--;`,()=>{a.let(w,(0,t._)`${u}[${g}]`),a.if(E,(0,t._)`continue`),$.length>1&&a.if((0,t._)`typeof ${w} == "string"`,(0,t._)`${w} += "_"`),a.if((0,t._)`typeof ${P}[${w}] == "number"`,()=>{a.assign(v,(0,t._)`${P}[${w}]`),o.error(),a.assign(S,!1).break()}).code((0,t._)`${P}[${w}] = ${g}`)})}function d(g,v){const w=(0,r.useFunc)(a,n.default),E=a.name("outer");a.
487
+ label(E).for((0,t._)`;${g}--;`,()=>a.for((0,t._)`${v} = ${g}; ${v}--;`,()=>a.if((0,t._)`${w}(${u}[${g}], ${u}[${v}])`,()=>{o.error(),a.assign(S,!1).break(E)})))}}};return br.default=s,br}var Sr={},Ki;function wh(){if(Ki)return Sr;Ki=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:o,data:a,$data:u,schemaCode:c,schema:l}=s;u||
488
+ l&&typeof l=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(o,r.default)}(${a}, ${c})`):s.fail((0,e._)`${l} !== ${a}`)}};return Sr.default=i,Sr}var Rr={},Wi;function bh(){if(Wi)return Rr;Wi=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=ae(),t=fe(),r=_s(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:o,data:a,$data:u,schema:c,schemaCode:l,it:m}=s;if(!u&&
489
+ c.length===0)throw new Error("enum must have non-empty array");const y=c.length>=m.opts.loopEnum;let _;const S=()=>_??(_=(0,t.useFunc)(o,r.default));let $;if(y||u)$=o.let("valid"),s.block$data($,p);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const f=o.const("vSchema",l);$=(0,e.or)(...c.map((d,g)=>h(f,g)))}s.pass($);function p(){o.assign($,!1),o.forOf("v",l,f=>o.if((0,e._)`${S()}(${a}, ${f})`,()=>o.assign($,!0).break()))}function h(f,d){const g=c[d];return typeof g=="obj\
490
+ ect"&&g!==null?(0,e._)`${S()}(${a}, ${f}[${d}])`:(0,e._)`${a} === ${g}`}}};return Rr.default=i,Rr}var Xi;function Ji(){if(Xi)return pr;Xi=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=dh(),t=ph(),r=mh(),n=yh(),i=gh(),s=$h(),o=vh(),a=_h(),u=wh(),c=bh(),l=[e.default,t.default,r.default,n.default,i.default,s.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,c.default];return pr.default=l,pr}var Ar={},ht={},Yi;
491
+ function Qi(){if(Yi)return ht;Yi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.validateAdditionalItems=void 0;const e=ae(),t=fe(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:o,it:a}=s,{items:u}=o;if(!Array.isArray(u)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "ite\
492
+ ms" is not an array of schemas');return}i(s,u)}};function i(s,o){const{gen:a,schema:u,data:c,keyword:l,it:m}=s;m.items=!0;const y=a.const("len",(0,e._)`${c}.length`);if(u===!1)s.setParams({len:o.length}),s.pass((0,e._)`${y} <= ${o.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(m,u)){const S=a.var("valid",(0,e._)`${y} <= ${o.length}`);a.if((0,e.not)(S),()=>_(S)),s.ok(S)}function _(S){a.forRange("i",o.length,y,$=>{s.subschema({keyword:l,dataProp:$,dataPropType:t.Type.Num},S),m.allErrors||
493
+ a.if((0,e.not)(S),()=>a.break())})}}return ht.validateAdditionalItems=i,ht.default=n,ht}var Pr={},mt={},Zi;function ec(){if(Zi)return mt;Zi=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.validateTuple=void 0;const e=ae(),t=fe(),r=Ie(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:o,it:a}=s;if(Array.isArray(o))return i(s,"additionalItems",o);a.items=!0,!(0,t.alwaysValidSchema)(a,o)&&s.ok((0,r.validateArray)(s))}};function i(s,o,a=s.
494
+ schema){const{gen:u,parentSchema:c,data:l,keyword:m,it:y}=s;$(c),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(u,a.length,y.items));const _=u.name("valid"),S=u.const("len",(0,e._)`${l}.length`);a.forEach((p,h)=>{(0,t.alwaysValidSchema)(y,p)||(u.if((0,e._)`${S} > ${h}`,()=>s.subschema({keyword:m,schemaProp:h,dataProp:h},_)),s.ok(_))});function $(p){const{opts:h,errSchemaPath:f}=y,d=a.length,g=d===p.minItems&&(d===p.maxItems||p[o]===!1);if(h.strictTuples&&!g){const v=`\
495
+ "${m}" is ${d}-tuple, but minItems or maxItems/${o} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,v,h.strictTuples)}}}return mt.validateTuple=i,mt.default=n,mt}var tc;function Eh(){if(tc)return Pr;tc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=ec(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Pr.default=t,Pr}var Cr={},rc;function Sh(){if(rc)return Cr;rc=1,Object.defineProperty(
496
+ Cr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Ie(),n=Qi(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:u,it:c}=o,{prefixItems:l}=u;c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&(l?(0,n.validateAdditionalItems)(o,l):o.ok((0,r.validateArray)(o)))}};return Cr.default=s,Cr}var kr={},nc;function Rh(){
497
+ if(nc)return kr;nc=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${s}}`},code(i){
498
+ const{gen:s,schema:o,parentSchema:a,data:u,it:c}=i;let l,m;const{minContains:y,maxContains:_}=a;c.opts.next?(l=y===void 0?1:y,m=_):l=1;const S=s.const("len",(0,e._)`${u}.length`);if(i.setParams({min:l,max:m}),m===void 0&&l===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(c,o)){let d=(0,e._)`${S} >= ${l}`;
499
+ m!==void 0&&(d=(0,e._)`${d} && ${S} <= ${m}`),i.pass(d);return}c.items=!0;const $=s.name("valid");m===void 0&&l===1?h($,()=>s.if($,()=>s.break())):l===0?(s.let($,!0),m!==void 0&&s.if((0,e._)`${u}.length > 0`,p)):(s.let($,!1),p()),i.result($,()=>i.reset());function p(){const d=s.name("_valid"),g=s.let("count",0);h(d,()=>s.if(d,()=>f(g)))}function h(d,g){s.forRange("i",0,S,v=>{i.subschema({keyword:"contains",dataProp:v,dataPropType:t.Type.Num,compositeRule:!0},d),g()})}function f(d){s.code((0,e._)`${d}++`),
500
+ m===void 0?s.if((0,e._)`${d} >= ${l}`,()=>s.assign($,!0).break()):(s.if((0,e._)`${d} > ${m}`,()=>s.assign($,!1).break()),l===1?s.assign($,!0):s.if((0,e._)`${d} >= ${l}`,()=>s.assign($,!0)))}}};return kr.default=n,kr}var ws={},sc;function bs(){return sc||(sc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ae(),r=fe(),n=Ie();e.error={message:({params:{property:u,depsCount:c,deps:l}})=>{const m=c===1?"property":"prop\
501
+ erties";return(0,t.str)`must have ${m} ${l} when property ${u} is present`},params:({params:{property:u,depsCount:c,deps:l,missingProperty:m}})=>(0,t._)`{property: ${u},
501
502
  missingProperty: ${m},
502
- depsCount: ${u},
503
- deps: ${l}}`};const c={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[u,l]=s(i);o(i,u),a(i,l)}};function s({schema:i}){const u={},l={};for(const m in i){if(m==="__proto__")continue;const y=Array.isArray(i[m])?u:l;y[m]=i[m]}return[u,l]}function o(i,u=i.schema){const{gen:l,data:m,it:y}=i;if(Object.keys(u).length===0)return;const _=l.let("missing");for(const S in u){const g=u[S];if(g.length===0)continue;const p=(0,n.propertyInData)(l,m,S,y.opts.ownProperties);
504
- i.setParams({property:S,depsCount:g.length,deps:g.join(", ")}),y.allErrors?l.if(p,()=>{for(const h of g)(0,n.checkReportMissingProp)(i,h)}):(l.if((0,t._)`${p} && (${(0,n.checkMissingProp)(i,g,_)})`),(0,n.reportMissingProp)(i,_),l.else())}}e.validatePropertyDeps=o;function a(i,u=i.schema){const{gen:l,data:m,keyword:y,it:_}=i,S=l.name("valid");for(const g in u)(0,r.alwaysValidSchema)(_,u[g])||(l.if((0,n.propertyInData)(l,m,g,_.opts.ownProperties),()=>{const p=i.subschema({keyword:y,schemaProp:g},S);
505
- i.mergeValidEvaluated(p,S)},()=>l.var(S,!0)),i.ok(S))}e.validateSchemaDeps=a,e.default=c})(ws)),ws}var Nr={},sc;function Sh(){if(sc)return Nr;sc=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=oe(),t=fe(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:s,schema:o,data:a,it:i}=c;if((0,t.alwaysValidSchema)(i,o))return;const u=s.name("v\
506
- alid");s.forIn("key",a,l=>{c.setParams({propertyName:l}),c.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},u),s.if((0,e.not)(u),()=>{c.error(!0),i.allErrors||s.break()})}),c.ok(u)}};return Nr.default=n,Nr}var Or={},oc;function ac(){if(oc)return Or;oc=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=Ie(),t=oe(),r=Oe(),n=fe(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,
507
- error:{message:"must NOT have additional properties",params:({params:o})=>(0,t._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:i,parentSchema:u,data:l,errsCount:m,it:y}=o;if(!m)throw new Error("ajv implementation error");const{allErrors:_,opts:S}=y;if(y.props=!0,S.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(y,i))return;const g=(0,e.allSchemaProperties)(u.properties),p=(0,e.allSchemaProperties)(u.patternProperties);h(),o.ok((0,t._)`${m} === ${r.default.errors}`);
508
- function h(){a.forIn("key",l,w=>{!g.length&&!p.length?$(w):a.if(f(w),()=>$(w))})}function f(w){let E;if(g.length>8){const P=(0,n.schemaRefOrVal)(y,u.properties,"properties");E=(0,e.isOwnProperty)(a,P,w)}else g.length?E=(0,t.or)(...g.map(P=>(0,t._)`${w} === ${P}`)):E=t.nil;return p.length&&(E=(0,t.or)(E,...p.map(P=>(0,t._)`${(0,e.usePattern)(o,P)}.test(${w})`))),(0,t.not)(E)}function d(w){a.code((0,t._)`delete ${l}[${w}]`)}function $(w){if(S.removeAdditional==="all"||S.removeAdditional&&i===!1){d(
509
- w);return}if(i===!1){o.setParams({additionalProperty:w}),o.error(),_||a.break();return}if(typeof i=="object"&&!(0,n.alwaysValidSchema)(y,i)){const E=a.name("valid");S.removeAdditional==="failing"?(v(w,E,!1),a.if((0,t.not)(E),()=>{o.reset(),d(w)})):(v(w,E),_||a.if((0,t.not)(E),()=>a.break()))}}function v(w,E,P){const k={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};P===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(k,E)}}};return Or.default=s,
510
- Or}var kr={},ic;function Rh(){if(ic)return kr;ic=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=kt(),t=Ie(),r=fe(),n=ac(),c={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,parentSchema:i,data:u,it:l}=s;l.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(a);for(const p of m)l.definedProperties.add(p);l.opts.unevaluated&&m.length&&l.
511
- props!==!0&&(l.props=r.mergeEvaluated.props(o,(0,r.toHash)(m),l.props));const y=m.filter(p=>!(0,r.alwaysValidSchema)(l,a[p]));if(y.length===0)return;const _=o.name("valid");for(const p of y)S(p)?g(p):(o.if((0,t.propertyInData)(o,u,p,l.opts.ownProperties)),g(p),l.allErrors||o.else().var(_,!0),o.endIf()),s.it.definedProperties.add(p),s.ok(_);function S(p){return l.opts.useDefaults&&!l.compositeRule&&a[p].default!==void 0}function g(p){s.subschema({keyword:"properties",schemaProp:p,dataProp:p},_)}}};
512
- return kr.default=c,kr}var Ir={},cc;function Ah(){if(cc)return Ir;cc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=Ie(),t=oe(),r=fe(),n=fe(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,data:i,parentSchema:u,it:l}=s,{opts:m}=l,y=(0,e.allSchemaProperties)(a),_=y.filter($=>(0,r.alwaysValidSchema)(l,a[$]));if(y.length===0||_.length===y.length&&(!l.opts.unevaluated||l.props===!0))return;const S=m.strictSchema&&!m.allowMatchingProperties&&
513
- u.properties,g=o.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,n.evaluatedPropsToName)(o,l.props));const{props:p}=l;h();function h(){for(const $ of y)S&&f($),l.allErrors?d($):(o.var(g,!0),d($),o.if(g))}function f($){for(const v in S)new RegExp($).test(v)&&(0,r.checkStrictMode)(l,`property ${v} matches pattern ${$} (use allowMatchingProperties)`)}function d($){o.forIn("key",i,v=>{o.if((0,t._)`${(0,e.usePattern)(s,$)}.test(${v})`,()=>{const w=_.includes($);w||s.subschema({keyword:"\
514
- patternProperties",schemaProp:$,dataProp:v,dataPropType:n.Type.Str},g),l.opts.unevaluated&&p!==!0?o.assign((0,t._)`${p}[${v}]`,!0):!w&&!l.allErrors&&o.if((0,t.not)(g),()=>o.break())})})}}};return Ir.default=c,Ir}var jr={},uc;function Ph(){if(uc)return jr;uc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=fe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:c,it:s}=r;if((0,e.alwaysValidSchema)(s,c)){r.fail();return}const o=n.name("valid");r.subschema(
515
- {keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return jr.default=t,jr}var Lr={},lc;function Ch(){if(lc)return Lr;lc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ie().validateUnion,error:{message:"must match a schema in anyOf"}};return Lr.default=t,Lr}var Dr={},fc;function Th(){if(fc)return Dr;fc=1,Object.defineProperty(Dr,"__es\
516
- Module",{value:!0});const e=oe(),t=fe(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},code(c){const{gen:s,schema:o,parentSchema:a,it:i}=c;if(!Array.isArray(o))throw new Error("ajv implementation error");if(i.opts.discriminator&&a.discriminator)return;const u=o,l=s.let("valid",!1),m=s.let("passing",null),y=s.name("_valid");c.setParams({passing:m}),s.block(_),c.result(l,()=>c.
517
- reset(),()=>c.error(!0));function _(){u.forEach((S,g)=>{let p;(0,t.alwaysValidSchema)(i,S)?s.var(y,!0):p=c.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&s.if((0,e._)`${y} && ${l}`).assign(l,!1).assign(m,(0,e._)`[${m}, ${g}]`).else(),s.if(y,()=>{s.assign(l,!0),s.assign(m,g),p&&c.mergeEvaluated(p,e.Name)})})}}};return Dr.default=n,Dr}var qr={},dc;function Nh(){if(dc)return qr;dc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=fe(),t={keyword:"allOf",schemaType:"arra\
518
- y",code(r){const{gen:n,schema:c,it:s}=r;if(!Array.isArray(c))throw new Error("ajv implementation error");const o=n.name("valid");c.forEach((a,i)=>{if((0,e.alwaysValidSchema)(s,a))return;const u=r.subschema({keyword:"allOf",schemaProp:i},o);r.ok(o),r.mergeEvaluated(u)})}};return qr.default=t,qr}var xr={},pc;function Oh(){if(pc)return xr;pc=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=oe(),t=fe(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.
519
- str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:o,parentSchema:a,it:i}=s;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const u=c(i,"then"),l=c(i,"else");if(!u&&!l)return;const m=o.let("valid",!0),y=o.name("_valid");if(_(),s.reset(),u&&l){const g=o.let("ifClause");s.setParams({ifClause:g}),o.if(y,S("then",g),S("else",g))}else u?o.if(y,S("then")):o.if((0,e.not)(y),S("el\
520
- se"));s.pass(m,()=>s.error(!0));function _(){const g=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);s.mergeEvaluated(g)}function S(g,p){return()=>{const h=s.subschema({keyword:g},y);o.assign(m,y),s.mergeValidEvaluated(h,m),p?o.assign(p,(0,e._)`${g}`):s.setParams({ifClause:g})}}}};function c(s,o){const a=s.schema[o];return a!==void 0&&!(0,t.alwaysValidSchema)(s,a)}return xr.default=n,xr}var Mr={},hc;function kh(){if(hc)return Mr;hc=1,Object.defineProperty(Mr,"__esModu\
521
- le",{value:!0});const e=fe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:c}){n.if===void 0&&(0,e.checkStrictMode)(c,`"${r}" without "if" is ignored`)}};return Mr.default=t,Mr}var mc;function yc(){if(mc)return Ar;mc=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Yi(),t=wh(),r=Zi(),n=bh(),c=Eh(),s=bs(),o=Sh(),a=ac(),i=Rh(),u=Ah(),l=Ph(),m=Ch(),y=Th(),_=Nh(),S=Oh(),g=kh();function p(h=!1){const f=[l.default,m.default,y.default,_.default,
522
- S.default,g.default,o.default,a.default,s.default,i.default,u.default];return h?f.push(t.default,n.default):f.push(e.default,r.default),f.push(c.default),f}return Ar.default=p,Ar}var Hr={},yt={},gc;function $c(){if(gc)return yt;gc=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.dynamicAnchor=void 0;const e=oe(),t=Oe(),r=cr(),n=vs(),c={keyword:"$dynamicAnchor",schemaType:"string",code:a=>s(a,a.schema)};function s(a,i){const{gen:u,it:l}=a;l.schemaEnv.root.dynamicAnchors[i]=!0;const m=(0,e._)`${t.
523
- default.dynamicAnchors}${(0,e.getProperty)(i)}`,y=l.errSchemaPath==="#"?l.validateName:o(a);u.if((0,e._)`!${m}`,()=>u.assign(m,y))}yt.dynamicAnchor=s;function o(a){const{schemaEnv:i,schema:u,self:l}=a.it,{root:m,baseId:y,localRefs:_,meta:S}=i.root,{schemaId:g}=l.opts,p=new r.SchemaEnv({schema:u,schemaId:g,root:m,baseId:y,localRefs:_,meta:S});return r.compileSchema.call(l,p),(0,n.getValidate)(a,p)}return yt.default=c,yt}var gt={},vc;function _c(){if(vc)return gt;vc=1,Object.defineProperty(gt,"__e\
524
- sModule",{value:!0}),gt.dynamicRef=void 0;const e=oe(),t=Oe(),r=vs(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>c(s,s.schema)};function c(s,o){const{gen:a,keyword:i,it:u}=s;if(o[0]!=="#")throw new Error(`"${i}" only supports hash fragment reference`);const l=o.slice(1);if(u.allErrors)m();else{const _=a.let("valid",!1);m(_),s.ok(_)}function m(_){if(u.schemaEnv.root.dynamicAnchors[l]){const S=a.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);a.if(S,y(S,_),y(u.validateName,
525
- _))}else y(u.validateName,_)()}function y(_,S){return S?()=>a.block(()=>{(0,r.callRef)(s,_),a.let(S,!0)}):()=>(0,r.callRef)(s,_)}}return gt.dynamicRef=c,gt.default=n,gt}var Ur={},wc;function Ih(){if(wc)return Ur;wc=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=$c(),t=fe(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Ur.default=r,Ur}var Fr={},bc;function jh(){if(bc)
526
- return Fr;bc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=_c(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Fr.default=t,Fr}var Ec;function Lh(){if(Ec)return Hr;Ec=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=$c(),t=_c(),r=Ih(),n=jh(),c=[e.default,t.default,r.default,n.default];return Hr.default=c,Hr}var Vr={},zr={},Sc;function Dh(){if(Sc)return zr;Sc=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=bs(),t={keyword:"\
527
- dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return zr.default=t,zr}var Gr={},Rc;function qh(){if(Rc)return Gr;Rc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=bs(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Gr.default=t,Gr}var Br={},Ac;function xh(){if(Ac)return Br;Ac=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=fe(),t={keyword:["maxContains",
528
- "minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:c}){n.contains===void 0&&(0,e.checkStrictMode)(c,`"${r}" without "contains" is ignored`)}};return Br.default=t,Br}var Pc;function Mh(){if(Pc)return Vr;Pc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=Dh(),t=qh(),r=xh(),n=[e.default,t.default,r.default];return Vr.default=n,Vr}var Kr={},Wr={},Cc;function Hh(){if(Cc)return Wr;Cc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=oe(),t=fe(),r=Oe(),
529
- c={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,e._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:o,schema:a,data:i,errsCount:u,it:l}=s;if(!u)throw new Error("ajv implementation error");const{allErrors:m,props:y}=l;y instanceof e.Name?o.if((0,e._)`${y} !== true`,()=>o.forIn("key",i,p=>o.if(S(y,p),()=>_(p)))):y!==!0&&o.forIn("key",i,p=>y===void 0?_(p):
530
- o.if(g(y,p),()=>_(p))),l.props=!0,s.ok((0,e._)`${u} === ${r.default.errors}`);function _(p){if(a===!1){s.setParams({unevaluatedProperty:p}),s.error(),m||o.break();return}if(!(0,t.alwaysValidSchema)(l,a)){const h=o.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:t.Type.Str},h),m||o.if((0,e.not)(h),()=>o.break())}}function S(p,h){return(0,e._)`!${p} || !${p}[${h}]`}function g(p,h){const f=[];for(const d in p)p[d]===!0&&f.push((0,e._)`${h} !== ${d}`);return(0,e.and)(
531
- ...f)}}};return Wr.default=c,Wr}var Xr={},Tc;function Uh(){if(Tc)return Xr;Tc=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=oe(),t=fe(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{gen:s,schema:o,data:a,it:i}=c,u=i.items||0;if(u===!0)return;const l=s.const("len",(0,e._)`${a}.length`);if(o===!1)c.setParams({len:u}),
532
- c.fail((0,e._)`${l} > ${u}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(i,o)){const y=s.var("valid",(0,e._)`${l} <= ${u}`);s.if((0,e.not)(y),()=>m(y,u)),c.ok(y)}i.items=!0;function m(y,_){s.forRange("i",_,l,S=>{c.subschema({keyword:"unevaluatedItems",dataProp:S,dataPropType:t.Type.Num},y),i.allErrors||s.if((0,e.not)(y),()=>s.break())})}}};return Xr.default=n,Xr}var Nc;function Fh(){if(Nc)return Kr;Nc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=Hh(),t=Uh(),r=[e.default,t.
533
- default];return Kr.default=r,Kr}var Jr={},Yr={},Oc;function Vh(){if(Oc)return Yr;Oc=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=oe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,c){const{gen:s,data:o,$data:a,schema:i,schemaCode:u,it:l}=n,{opts:m,errSchemaPath:y,schemaEnv:_,self:S}=l;if(!m.validateFormats)return;a?g():p();function g(){
534
- const h=s.scopeValue("formats",{ref:S.formats,code:m.code.formats}),f=s.const("fDef",(0,e._)`${h}[${u}]`),d=s.let("fType"),$=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(d,(0,e._)`${f}.type || "string"`).assign($,(0,e._)`${f}.validate`),()=>s.assign(d,(0,e._)`"string"`).assign($,f)),n.fail$data((0,e.or)(v(),w()));function v(){return m.strictSchema===!1?e.nil:(0,e._)`${u} && !${$}`}function w(){const E=_.$async?(0,e._)`(${f}.async ? await ${$}(${o}) : ${$}(${o}))`:
535
- (0,e._)`${$}(${o})`,P=(0,e._)`(typeof ${$} == "function" ? ${E} : ${$}.test(${o}))`;return(0,e._)`${$} && ${$} !== true && ${d} === ${c} && !${P}`}}function p(){const h=S.formats[i];if(!h){v();return}if(h===!0)return;const[f,d,$]=w(h);f===c&&n.pass(E());function v(){if(m.strictSchema===!1){S.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${y}"`}}function w(P){const k=P instanceof RegExp?(0,e.regexpCode)(P):m.code.formats?(0,e._)`${m.
536
- code.formats}${(0,e.getProperty)(i)}`:void 0,U=s.scopeValue("formats",{key:i,ref:P,code:k});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${U}.validate`]:["string",P,U]}function E(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${o})`}return typeof d=="function"?(0,e._)`${$}(${o})`:(0,e._)`${$}.test(${o})`}}}};return Yr.default=r,Yr}var kc;function Ic(){if(kc)return Jr;
537
- kc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const t=[Vh().default];return Jr.default=t,Jr}var ot={},jc;function Lc(){return jc||(jc=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.contentVocabulary=ot.metadataVocabulary=void 0,ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ot}var Dc;function zh(){if(Dc)return lr;Dc=1,Object.defineProperty(lr,"__es\
538
- Module",{value:!0});const e=Li(),t=Xi(),r=yc(),n=Lh(),c=Mh(),s=Fh(),o=Ic(),a=Lc(),i=[n.default,e.default,t.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,c.default,s.default];return lr.default=i,lr}var Qr={},Lt={},qc;function Gh(){if(qc)return Lt;qc=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Lt.DiscrError=e={})),Lt}var xc;function Mc(){if(xc)return Qr;xc=1,Object.defineProperty(
539
- Qr,"__esModule",{value:!0});const e=oe(),t=Gh(),r=cr(),n=It(),c=fe(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:i}})=>a===t.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:a,tag:i,tagName:u}})=>(0,e._)`{error: ${a}, tag: ${u}, tagValue: ${i}}`},code(a){const{gen:i,data:u,schema:l,parentSchema:m,it:y}=a,{oneOf:_}=m;if(!y.opts.discriminator)throw new Error("discriminator: r\
540
- equires discriminator option");const S=l.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=i.let("valid",!1),p=i.const("tag",(0,e._)`${u}${(0,e.getProperty)(S)}`);i.if((0,e._)`typeof ${p} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:p,tagName:S})),a.ok(g);function h(){const $=d();i.if(!1);for(const v in $)
541
- i.elseIf((0,e._)`${p} === ${v}`),i.assign(g,f($[v]));i.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:p,tagName:S}),i.endIf()}function f($){const v=i.name("valid"),w=a.subschema({keyword:"oneOf",schemaProp:$},v);return a.mergeEvaluated(w,e.Name),v}function d(){var $;const v={},w=P(m);let E=!0;for(let q=0;q<_.length;q++){let H=_[q];if(H?.$ref&&!(0,c.schemaHasRulesButRef)(H,y.self.RULES)){const I=H.$ref;if(H=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,I),H instanceof r.SchemaEnv&&(H=
542
- H.schema),H===void 0)throw new n.default(y.opts.uriResolver,y.baseId,I)}const D=($=H?.properties)===null||$===void 0?void 0:$[S];if(typeof D!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);E=E&&(w||P(H)),k(D,q)}if(!E)throw new Error(`discriminator: "${S}" must be required`);return v;function P({required:q}){return Array.isArray(q)&&q.includes(S)}function k(q,H){if(q.const)U(q.const,H);else if(q.enum)for(const D of q.enum)U(D,H);else
543
- throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function U(q,H){if(typeof q!="string"||q in v)throw new Error(`discriminator: "${S}" values must be unique strings`);v[q]=H}}}};return Qr.default=o,Qr}var Zr={};const Hc="https://json-schema.org/draft/2020-12/schema",Uc="https://json-schema.org/draft/2020-12/schema",Fc={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020\
544
- -12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},Vc="meta",zc="Core and Validation specifications meta-schema",Gc=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/c\
545
- ontent"}],Bc=["object","boolean"],Kc="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Wc={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantic\
546
- s.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},Bh={$schema:Hc,$id:Uc,$vocabulary:Fc,$dynamicAnchor:Vc,title:zc,allOf:Gc,type:Bc,$comment:Kc,
547
- properties:Wc},Kh={__proto__:null,$comment:Kc,$dynamicAnchor:Vc,$id:Uc,$schema:Hc,$vocabulary:Fc,allOf:Gc,default:Bh,properties:Wc,title:zc,type:Bc},Wh=De(Kh),Xc="https://json-schema.org/draft/2020-12/schema",Jc="https://json-schema.org/draft/2020-12/meta/applicator",Yc={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Qc="meta",Zc="Applicator vocabulary meta-schema",eu=["object","boolean"],tu={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"\
503
+ depsCount: ${c},
504
+ deps: ${l}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[c,l]=s(u);o(u,c),a(u,l)}};function s({schema:u}){const c={},l={};for(const m in u){if(m==="__proto__")continue;const y=Array.isArray(u[m])?c:l;y[m]=u[m]}return[c,l]}function o(u,c=u.schema){const{gen:l,data:m,it:y}=u;if(Object.keys(c).length===0)return;const _=l.let("missing");for(const S in c){const $=c[S];if($.length===0)continue;const p=(0,n.propertyInData)(l,m,S,y.opts.ownProperties);
505
+ u.setParams({property:S,depsCount:$.length,deps:$.join(", ")}),y.allErrors?l.if(p,()=>{for(const h of $)(0,n.checkReportMissingProp)(u,h)}):(l.if((0,t._)`${p} && (${(0,n.checkMissingProp)(u,$,_)})`),(0,n.reportMissingProp)(u,_),l.else())}}e.validatePropertyDeps=o;function a(u,c=u.schema){const{gen:l,data:m,keyword:y,it:_}=u,S=l.name("valid");for(const $ in c)(0,r.alwaysValidSchema)(_,c[$])||(l.if((0,n.propertyInData)(l,m,$,_.opts.ownProperties),()=>{const p=u.subschema({keyword:y,schemaProp:$},S);
506
+ u.mergeValidEvaluated(p,S)},()=>l.var(S,!0)),u.ok(S))}e.validateSchemaDeps=a,e.default=i})(ws)),ws}var Tr={},oc;function Ah(){if(oc)return Tr;oc=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:o,data:a,it:u}=i;if((0,t.alwaysValidSchema)(u,o))return;const c=s.name("v\
507
+ alid");s.forIn("key",a,l=>{i.setParams({propertyName:l}),i.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},c),s.if((0,e.not)(c),()=>{i.error(!0),u.allErrors||s.break()})}),i.ok(c)}};return Tr.default=n,Tr}var Nr={},ac;function ic(){if(ac)return Nr;ac=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=Ie(),t=ae(),r=Ne(),n=fe(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,
508
+ error:{message:"must NOT have additional properties",params:({params:o})=>(0,t._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:u,parentSchema:c,data:l,errsCount:m,it:y}=o;if(!m)throw new Error("ajv implementation error");const{allErrors:_,opts:S}=y;if(y.props=!0,S.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(y,u))return;const $=(0,e.allSchemaProperties)(c.properties),p=(0,e.allSchemaProperties)(c.patternProperties);h(),o.ok((0,t._)`${m} === ${r.default.errors}`);
509
+ function h(){a.forIn("key",l,w=>{!$.length&&!p.length?g(w):a.if(f(w),()=>g(w))})}function f(w){let E;if($.length>8){const P=(0,n.schemaRefOrVal)(y,c.properties,"properties");E=(0,e.isOwnProperty)(a,P,w)}else $.length?E=(0,t.or)(...$.map(P=>(0,t._)`${w} === ${P}`)):E=t.nil;return p.length&&(E=(0,t.or)(E,...p.map(P=>(0,t._)`${(0,e.usePattern)(o,P)}.test(${w})`))),(0,t.not)(E)}function d(w){a.code((0,t._)`delete ${l}[${w}]`)}function g(w){if(S.removeAdditional==="all"||S.removeAdditional&&u===!1){d(
510
+ w);return}if(u===!1){o.setParams({additionalProperty:w}),o.error(),_||a.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(y,u)){const E=a.name("valid");S.removeAdditional==="failing"?(v(w,E,!1),a.if((0,t.not)(E),()=>{o.reset(),d(w)})):(v(w,E),_||a.if((0,t.not)(E),()=>a.break()))}}function v(w,E,P){const O={keyword:"additionalProperties",dataProp:w,dataPropType:n.Type.Str};P===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(O,E)}}};return Nr.default=s,
511
+ Nr}var Or={},cc;function Ph(){if(cc)return Or;cc=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=Nt(),t=Ie(),r=fe(),n=ic(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,parentSchema:u,data:c,it:l}=s;l.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(a);for(const p of m)l.definedProperties.add(p);l.opts.unevaluated&&m.length&&l.
512
+ props!==!0&&(l.props=r.mergeEvaluated.props(o,(0,r.toHash)(m),l.props));const y=m.filter(p=>!(0,r.alwaysValidSchema)(l,a[p]));if(y.length===0)return;const _=o.name("valid");for(const p of y)S(p)?$(p):(o.if((0,t.propertyInData)(o,c,p,l.opts.ownProperties)),$(p),l.allErrors||o.else().var(_,!0),o.endIf()),s.it.definedProperties.add(p),s.ok(_);function S(p){return l.opts.useDefaults&&!l.compositeRule&&a[p].default!==void 0}function $(p){s.subschema({keyword:"properties",schemaProp:p,dataProp:p},_)}}};
513
+ return Or.default=i,Or}var Ir={},uc;function Ch(){if(uc)return Ir;uc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=Ie(),t=ae(),r=fe(),n=fe(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:o,schema:a,data:u,parentSchema:c,it:l}=s,{opts:m}=l,y=(0,e.allSchemaProperties)(a),_=y.filter(g=>(0,r.alwaysValidSchema)(l,a[g]));if(y.length===0||_.length===y.length&&(!l.opts.unevaluated||l.props===!0))return;const S=m.strictSchema&&!m.allowMatchingProperties&&
514
+ c.properties,$=o.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,n.evaluatedPropsToName)(o,l.props));const{props:p}=l;h();function h(){for(const g of y)S&&f(g),l.allErrors?d(g):(o.var($,!0),d(g),o.if($))}function f(g){for(const v in S)new RegExp(g).test(v)&&(0,r.checkStrictMode)(l,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function d(g){o.forIn("key",u,v=>{o.if((0,t._)`${(0,e.usePattern)(s,g)}.test(${v})`,()=>{const w=_.includes(g);w||s.subschema({keyword:"\
515
+ patternProperties",schemaProp:g,dataProp:v,dataPropType:n.Type.Str},$),l.opts.unevaluated&&p!==!0?o.assign((0,t._)`${p}[${v}]`,!0):!w&&!l.allErrors&&o.if((0,t.not)($),()=>o.break())})})}}};return Ir.default=i,Ir}var jr={},lc;function kh(){if(lc)return jr;lc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=fe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,e.alwaysValidSchema)(s,i)){r.fail();return}const o=n.name("valid");r.subschema(
516
+ {keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return jr.default=t,jr}var Lr={},fc;function Th(){if(fc)return Lr;fc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ie().validateUnion,error:{message:"must match a schema in anyOf"}};return Lr.default=t,Lr}var Dr={},dc;function Nh(){if(dc)return Dr;dc=1,Object.defineProperty(Dr,"__es\
517
+ Module",{value:!0});const e=ae(),t=fe(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:o,parentSchema:a,it:u}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(u.opts.discriminator&&a.discriminator)return;const c=o,l=s.let("valid",!1),m=s.let("passing",null),y=s.name("_valid");i.setParams({passing:m}),s.block(_),i.result(l,()=>i.
518
+ reset(),()=>i.error(!0));function _(){c.forEach((S,$)=>{let p;(0,t.alwaysValidSchema)(u,S)?s.var(y,!0):p=i.subschema({keyword:"oneOf",schemaProp:$,compositeRule:!0},y),$>0&&s.if((0,e._)`${y} && ${l}`).assign(l,!1).assign(m,(0,e._)`[${m}, ${$}]`).else(),s.if(y,()=>{s.assign(l,!0),s.assign(m,$),p&&i.mergeEvaluated(p,e.Name)})})}}};return Dr.default=n,Dr}var qr={},pc;function Oh(){if(pc)return qr;pc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=fe(),t={keyword:"allOf",schemaType:"arra\
519
+ y",code(r){const{gen:n,schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=n.name("valid");i.forEach((a,u)=>{if((0,e.alwaysValidSchema)(s,a))return;const c=r.subschema({keyword:"allOf",schemaProp:u},o);r.ok(o),r.mergeEvaluated(c)})}};return qr.default=t,qr}var xr={},hc;function Ih(){if(hc)return xr;hc=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.
520
+ str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:o,parentSchema:a,it:u}=s;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const c=i(u,"then"),l=i(u,"else");if(!c&&!l)return;const m=o.let("valid",!0),y=o.name("_valid");if(_(),s.reset(),c&&l){const $=o.let("ifClause");s.setParams({ifClause:$}),o.if(y,S("then",$),S("else",$))}else c?o.if(y,S("then")):o.if((0,e.not)(y),S("el\
521
+ se"));s.pass(m,()=>s.error(!0));function _(){const $=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);s.mergeEvaluated($)}function S($,p){return()=>{const h=s.subschema({keyword:$},y);o.assign(m,y),s.mergeValidEvaluated(h,m),p?o.assign(p,(0,e._)`${$}`):s.setParams({ifClause:$})}}}};function i(s,o){const a=s.schema[o];return a!==void 0&&!(0,t.alwaysValidSchema)(s,a)}return xr.default=n,xr}var Mr={},mc;function jh(){if(mc)return Mr;mc=1,Object.defineProperty(Mr,"__esModu\
522
+ le",{value:!0});const e=fe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Mr.default=t,Mr}var yc;function gc(){if(yc)return Ar;yc=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Qi(),t=Eh(),r=ec(),n=Sh(),i=Rh(),s=bs(),o=Ah(),a=ic(),u=Ph(),c=Ch(),l=kh(),m=Th(),y=Nh(),_=Oh(),S=Ih(),$=jh();function p(h=!1){const f=[l.default,m.default,y.default,_.default,
523
+ S.default,$.default,o.default,a.default,s.default,u.default,c.default];return h?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Ar.default=p,Ar}var Hr={},yt={},$c;function vc(){if($c)return yt;$c=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.dynamicAnchor=void 0;const e=ae(),t=Ne(),r=cr(),n=vs(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>s(a,a.schema)};function s(a,u){const{gen:c,it:l}=a;l.schemaEnv.root.dynamicAnchors[u]=!0;const m=(0,e._)`${t.
524
+ default.dynamicAnchors}${(0,e.getProperty)(u)}`,y=l.errSchemaPath==="#"?l.validateName:o(a);c.if((0,e._)`!${m}`,()=>c.assign(m,y))}yt.dynamicAnchor=s;function o(a){const{schemaEnv:u,schema:c,self:l}=a.it,{root:m,baseId:y,localRefs:_,meta:S}=u.root,{schemaId:$}=l.opts,p=new r.SchemaEnv({schema:c,schemaId:$,root:m,baseId:y,localRefs:_,meta:S});return r.compileSchema.call(l,p),(0,n.getValidate)(a,p)}return yt.default=i,yt}var gt={},_c;function wc(){if(_c)return gt;_c=1,Object.defineProperty(gt,"__e\
525
+ sModule",{value:!0}),gt.dynamicRef=void 0;const e=ae(),t=Ne(),r=vs(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>i(s,s.schema)};function i(s,o){const{gen:a,keyword:u,it:c}=s;if(o[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);const l=o.slice(1);if(c.allErrors)m();else{const _=a.let("valid",!1);m(_),s.ok(_)}function m(_){if(c.schemaEnv.root.dynamicAnchors[l]){const S=a.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);a.if(S,y(S,_),y(c.validateName,
526
+ _))}else y(c.validateName,_)()}function y(_,S){return S?()=>a.block(()=>{(0,r.callRef)(s,_),a.let(S,!0)}):()=>(0,r.callRef)(s,_)}}return gt.dynamicRef=i,gt.default=n,gt}var Ur={},bc;function Lh(){if(bc)return Ur;bc=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=vc(),t=fe(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Ur.default=r,Ur}var Fr={},Ec;function Dh(){if(Ec)
527
+ return Fr;Ec=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=wc(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Fr.default=t,Fr}var Sc;function qh(){if(Sc)return Hr;Sc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=vc(),t=wc(),r=Lh(),n=Dh(),i=[e.default,t.default,r.default,n.default];return Hr.default=i,Hr}var Vr={},zr={},Rc;function xh(){if(Rc)return zr;Rc=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=bs(),t={keyword:"\
528
+ dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return zr.default=t,zr}var Gr={},Ac;function Mh(){if(Ac)return Gr;Ac=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=bs(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Gr.default=t,Gr}var Br={},Pc;function Hh(){if(Pc)return Br;Pc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=fe(),t={keyword:["maxContains",
529
+ "minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return Br.default=t,Br}var Cc;function Uh(){if(Cc)return Vr;Cc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=xh(),t=Mh(),r=Hh(),n=[e.default,t.default,r.default];return Vr.default=n,Vr}var Kr={},Wr={},kc;function Fh(){if(kc)return Wr;kc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ae(),t=fe(),r=Ne(),
530
+ i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,e._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:o,schema:a,data:u,errsCount:c,it:l}=s;if(!c)throw new Error("ajv implementation error");const{allErrors:m,props:y}=l;y instanceof e.Name?o.if((0,e._)`${y} !== true`,()=>o.forIn("key",u,p=>o.if(S(y,p),()=>_(p)))):y!==!0&&o.forIn("key",u,p=>y===void 0?_(p):
531
+ o.if($(y,p),()=>_(p))),l.props=!0,s.ok((0,e._)`${c} === ${r.default.errors}`);function _(p){if(a===!1){s.setParams({unevaluatedProperty:p}),s.error(),m||o.break();return}if(!(0,t.alwaysValidSchema)(l,a)){const h=o.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:t.Type.Str},h),m||o.if((0,e.not)(h),()=>o.break())}}function S(p,h){return(0,e._)`!${p} || !${p}[${h}]`}function $(p,h){const f=[];for(const d in p)p[d]===!0&&f.push((0,e._)`${h} !== ${d}`);return(0,e.and)(
532
+ ...f)}}};return Wr.default=i,Wr}var Xr={},Tc;function Vh(){if(Tc)return Xr;Tc=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=ae(),t=fe(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:s,schema:o,data:a,it:u}=i,c=u.items||0;if(c===!0)return;const l=s.const("len",(0,e._)`${a}.length`);if(o===!1)i.setParams({len:c}),
533
+ i.fail((0,e._)`${l} > ${c}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(u,o)){const y=s.var("valid",(0,e._)`${l} <= ${c}`);s.if((0,e.not)(y),()=>m(y,c)),i.ok(y)}u.items=!0;function m(y,_){s.forRange("i",_,l,S=>{i.subschema({keyword:"unevaluatedItems",dataProp:S,dataPropType:t.Type.Num},y),u.allErrors||s.if((0,e.not)(y),()=>s.break())})}}};return Xr.default=n,Xr}var Nc;function zh(){if(Nc)return Kr;Nc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=Fh(),t=Vh(),r=[e.default,t.
534
+ default];return Kr.default=r,Kr}var Jr={},Yr={},Oc;function Gh(){if(Oc)return Yr;Oc=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=ae(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:s,data:o,$data:a,schema:u,schemaCode:c,it:l}=n,{opts:m,errSchemaPath:y,schemaEnv:_,self:S}=l;if(!m.validateFormats)return;a?$():p();function $(){
535
+ const h=s.scopeValue("formats",{ref:S.formats,code:m.code.formats}),f=s.const("fDef",(0,e._)`${h}[${c}]`),d=s.let("fType"),g=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(d,(0,e._)`${f}.type || "string"`).assign(g,(0,e._)`${f}.validate`),()=>s.assign(d,(0,e._)`"string"`).assign(g,f)),n.fail$data((0,e.or)(v(),w()));function v(){return m.strictSchema===!1?e.nil:(0,e._)`${c} && !${g}`}function w(){const E=_.$async?(0,e._)`(${f}.async ? await ${g}(${o}) : ${g}(${o}))`:
536
+ (0,e._)`${g}(${o})`,P=(0,e._)`(typeof ${g} == "function" ? ${E} : ${g}.test(${o}))`;return(0,e._)`${g} && ${g} !== true && ${d} === ${i} && !${P}`}}function p(){const h=S.formats[u];if(!h){v();return}if(h===!0)return;const[f,d,g]=w(h);f===i&&n.pass(E());function v(){if(m.strictSchema===!1){S.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${y}"`}}function w(P){const O=P instanceof RegExp?(0,e.regexpCode)(P):m.code.formats?(0,e._)`${m.
537
+ code.formats}${(0,e.getProperty)(u)}`:void 0,U=s.scopeValue("formats",{key:u,ref:P,code:O});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${U}.validate`]:["string",P,U]}function E(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${g}(${o})`}return typeof d=="function"?(0,e._)`${g}(${o})`:(0,e._)`${g}.test(${o})`}}}};return Yr.default=r,Yr}var Ic;function jc(){if(Ic)return Jr;
538
+ Ic=1,Object.defineProperty(Jr,"__esModule",{value:!0});const t=[Gh().default];return Jr.default=t,Jr}var ot={},Lc;function Dc(){return Lc||(Lc=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.contentVocabulary=ot.metadataVocabulary=void 0,ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ot}var qc;function Bh(){if(qc)return lr;qc=1,Object.defineProperty(lr,"__es\
539
+ Module",{value:!0});const e=Di(),t=Ji(),r=gc(),n=qh(),i=Uh(),s=zh(),o=jc(),a=Dc(),u=[n.default,e.default,t.default,(0,r.default)(!0),o.default,a.metadataVocabulary,a.contentVocabulary,i.default,s.default];return lr.default=u,lr}var Qr={},jt={},xc;function Kh(){if(xc)return jt;xc=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(jt.DiscrError=e={})),jt}var Mc;function Hc(){if(Mc)return Qr;Mc=1,Object.defineProperty(
540
+ Qr,"__esModule",{value:!0});const e=ae(),t=Kh(),r=cr(),n=Ot(),i=fe(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:u}})=>a===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:a,tag:u,tagName:c}})=>(0,e._)`{error: ${a}, tag: ${c}, tagValue: ${u}}`},code(a){const{gen:u,data:c,schema:l,parentSchema:m,it:y}=a,{oneOf:_}=m;if(!y.opts.discriminator)throw new Error("discriminator: r\
541
+ equires discriminator option");const S=l.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const $=u.let("valid",!1),p=u.const("tag",(0,e._)`${c}${(0,e.getProperty)(S)}`);u.if((0,e._)`typeof ${p} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:p,tagName:S})),a.ok($);function h(){const g=d();u.if(!1);for(const v in g)
542
+ u.elseIf((0,e._)`${p} === ${v}`),u.assign($,f(g[v]));u.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:p,tagName:S}),u.endIf()}function f(g){const v=u.name("valid"),w=a.subschema({keyword:"oneOf",schemaProp:g},v);return a.mergeEvaluated(w,e.Name),v}function d(){var g;const v={},w=P(m);let E=!0;for(let x=0;x<_.length;x++){let H=_[x];if(H?.$ref&&!(0,i.schemaHasRulesButRef)(H,y.self.RULES)){const I=H.$ref;if(H=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,I),H instanceof r.SchemaEnv&&(H=
543
+ H.schema),H===void 0)throw new n.default(y.opts.uriResolver,y.baseId,I)}const D=(g=H?.properties)===null||g===void 0?void 0:g[S];if(typeof D!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);E=E&&(w||P(H)),O(D,x)}if(!E)throw new Error(`discriminator: "${S}" must be required`);return v;function P({required:x}){return Array.isArray(x)&&x.includes(S)}function O(x,H){if(x.const)U(x.const,H);else if(x.enum)for(const D of x.enum)U(D,H);else
544
+ throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function U(x,H){if(typeof x!="string"||x in v)throw new Error(`discriminator: "${S}" values must be unique strings`);v[x]=H}}}};return Qr.default=o,Qr}var Zr={};const Uc="https://json-schema.org/draft/2020-12/schema",Fc="https://json-schema.org/draft/2020-12/schema",Vc={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020\
545
+ -12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},zc="meta",Gc="Core and Validation specifications meta-schema",Bc=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/c\
546
+ ontent"}],Kc=["object","boolean"],Wc="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Xc={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantic\
547
+ s.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},Wh={$schema:Uc,$id:Fc,$vocabulary:Vc,$dynamicAnchor:zc,title:Gc,allOf:Bc,type:Kc,$comment:Wc,
548
+ properties:Xc},Xh={__proto__:null,$comment:Wc,$dynamicAnchor:zc,$id:Fc,$schema:Uc,$vocabulary:Vc,allOf:Bc,default:Wh,properties:Xc,title:Gc,type:Kc},Jh=De(Xh),Jc="https://json-schema.org/draft/2020-12/schema",Yc="https://json-schema.org/draft/2020-12/meta/applicator",Qc={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Zc="meta",eu="Applicator vocabulary meta-schema",tu=["object","boolean"],ru={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"\
548
549
  #meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"\
549
- #/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},ru={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},Xh={$schema:Xc,$id:Jc,$vocabulary:Yc,$dynamicAnchor:Qc,title:Zc,type:eu,properties:tu,$defs:ru},Jh={__proto__:null,$defs:ru,$dynamicAnchor:Qc,$id:Jc,$schema:Xc,$vocabulary:Yc,default:Xh,properties:tu,title:Zc,type:eu},Yh=De(Jh),nu="https://json-schema.org/draft/2020-12/schema",su="https://json-schema.org/draft/2020-12/meta/unevaluated",ou={"ht\
550
- tps://json-schema.org/draft/2020-12/vocab/unevaluated":!0},au="meta",iu="Unevaluated applicator vocabulary meta-schema",cu=["object","boolean"],uu={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},Qh={$schema:nu,$id:su,$vocabulary:ou,$dynamicAnchor:au,title:iu,type:cu,properties:uu},Zh={__proto__:null,$dynamicAnchor:au,$id:su,$schema:nu,$vocabulary:ou,default:Qh,properties:uu,title:iu,type:cu},em=De(Zh),lu="https://json-schema.org/draft/2020-12/schema",fu="http\
551
- s://json-schema.org/draft/2020-12/meta/content",du={"https://json-schema.org/draft/2020-12/vocab/content":!0},pu="meta",hu="Content vocabulary meta-schema",mu=["object","boolean"],yu={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},tm={$schema:lu,$id:fu,$vocabulary:du,$dynamicAnchor:pu,title:hu,type:mu,properties:yu},rm={__proto__:null,$dynamicAnchor:pu,$id:fu,$schema:lu,$vocabulary:du,default:tm,properties:yu,title:hu,type:mu},nm=De(rm),gu="\
552
- https://json-schema.org/draft/2020-12/schema",$u="https://json-schema.org/draft/2020-12/meta/core",vu={"https://json-schema.org/draft/2020-12/vocab/core":!0},_u="meta",wu="Core vocabulary meta-schema",bu=["object","boolean"],Eu={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{
553
- $ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Su={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},sm={$schema:gu,$id:$u,$vocabulary:vu,$dynamicAnchor:_u,title:wu,type:bu,properties:Eu,$defs:Su},om={__proto__:null,
554
- $defs:Su,$dynamicAnchor:_u,$id:$u,$schema:gu,$vocabulary:vu,default:sm,properties:Eu,title:wu,type:bu},am=De(om),Ru="https://json-schema.org/draft/2020-12/schema",Au="https://json-schema.org/draft/2020-12/meta/format-annotation",Pu={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Cu="meta",Tu="Format vocabulary meta-schema for annotation results",Nu=["object","boolean"],Ou={format:{type:"string"}},im={$schema:Ru,$id:Au,$vocabulary:Pu,$dynamicAnchor:Cu,title:Tu,type:Nu,properties:Ou},
555
- cm={__proto__:null,$dynamicAnchor:Cu,$id:Au,$schema:Ru,$vocabulary:Pu,default:im,properties:Ou,title:Tu,type:Nu},um=De(cm),ku="https://json-schema.org/draft/2020-12/schema",Iu="https://json-schema.org/draft/2020-12/meta/meta-data",ju={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Lu="meta",Du="Meta-data vocabulary meta-schema",qu=["object","boolean"],xu={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},
556
- writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},lm={$schema:ku,$id:Iu,$vocabulary:ju,$dynamicAnchor:Lu,title:Du,type:qu,properties:xu},fm={__proto__:null,$dynamicAnchor:Lu,$id:Iu,$schema:ku,$vocabulary:ju,default:lm,properties:xu,title:Du,type:qu},dm=De(fm),Mu="https://json-schema.org/draft/2020-12/schema",Hu="https://json-schema.org/draft/2020-12/meta/validation",Uu={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Fu="meta",Vu="Validation vocabulary meta-sch\
557
- ema",zu=["object","boolean"],Gu={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{
558
- $ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Bu={nonNegativeInteger:{type:"integ\
559
- er",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},pm={$schema:Mu,$id:Hu,$vocabulary:Uu,$dynamicAnchor:Fu,title:Vu,type:zu,properties:Gu,$defs:Bu},hm={__proto__:null,$defs:Bu,$dynamicAnchor:Fu,$id:Hu,$schema:Mu,$vocabulary:Uu,default:pm,properties:Gu,title:Vu,type:zu},mm=De(hm);var Ku;function ym(){if(Ku)
560
- return Zr;Ku=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=Wh,t=Yh,r=em,n=nm,c=am,s=um,o=dm,a=mm,i=["/properties"];function u(l){return[e,t,r,n,c,m(this,s),o,m(this,a)].forEach(y=>this.addMetaSchema(y,void 0,!1)),this;function m(y,_){return l?y.$dataMetaSchema(_,i):_}}return Zr.default=u,Zr}var Wu;function gm(){return Wu||(Wu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=
561
- t.Ajv2020=void 0;const r=Oi(),n=zh(),c=Mc(),s=ym(),o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(_={}){super({..._,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:_,meta:S}=this.opts;S&&(s.default.call(this,_),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){
562
- return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=kt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var u=oe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){
563
- return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var m=It();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Zt,Zt.exports)),Zt.exports}var $m=gm(),
564
- en={exports:{}},Es={},Xu;function vm(){return Xu||(Xu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(q,H){return{validate:q,compare:H}}e.fullFormats={date:t(s,o),time:t(i(!0),u),"date-time":t(y(!0),_),"iso-time":t(i(),l),"iso-date-time":t(y(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
550
+ #/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},nu={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},Yh={$schema:Jc,$id:Yc,$vocabulary:Qc,$dynamicAnchor:Zc,title:eu,type:tu,properties:ru,$defs:nu},Qh={__proto__:null,$defs:nu,$dynamicAnchor:Zc,$id:Yc,$schema:Jc,$vocabulary:Qc,default:Yh,properties:ru,title:eu,type:tu},Zh=De(Qh),su="https://json-schema.org/draft/2020-12/schema",ou="https://json-schema.org/draft/2020-12/meta/unevaluated",au={"ht\
551
+ tps://json-schema.org/draft/2020-12/vocab/unevaluated":!0},iu="meta",cu="Unevaluated applicator vocabulary meta-schema",uu=["object","boolean"],lu={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},em={$schema:su,$id:ou,$vocabulary:au,$dynamicAnchor:iu,title:cu,type:uu,properties:lu},tm={__proto__:null,$dynamicAnchor:iu,$id:ou,$schema:su,$vocabulary:au,default:em,properties:lu,title:cu,type:uu},rm=De(tm),fu="https://json-schema.org/draft/2020-12/schema",du="http\
552
+ s://json-schema.org/draft/2020-12/meta/content",pu={"https://json-schema.org/draft/2020-12/vocab/content":!0},hu="meta",mu="Content vocabulary meta-schema",yu=["object","boolean"],gu={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},nm={$schema:fu,$id:du,$vocabulary:pu,$dynamicAnchor:hu,title:mu,type:yu,properties:gu},sm={__proto__:null,$dynamicAnchor:hu,$id:du,$schema:fu,$vocabulary:pu,default:nm,properties:gu,title:mu,type:yu},om=De(sm),$u="\
553
+ https://json-schema.org/draft/2020-12/schema",vu="https://json-schema.org/draft/2020-12/meta/core",_u={"https://json-schema.org/draft/2020-12/vocab/core":!0},wu="meta",bu="Core vocabulary meta-schema",Eu=["object","boolean"],Su={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{
554
+ $ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Ru={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},am={$schema:$u,$id:vu,$vocabulary:_u,$dynamicAnchor:wu,title:bu,type:Eu,properties:Su,$defs:Ru},im={__proto__:null,
555
+ $defs:Ru,$dynamicAnchor:wu,$id:vu,$schema:$u,$vocabulary:_u,default:am,properties:Su,title:bu,type:Eu},cm=De(im),Au="https://json-schema.org/draft/2020-12/schema",Pu="https://json-schema.org/draft/2020-12/meta/format-annotation",Cu={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},ku="meta",Tu="Format vocabulary meta-schema for annotation results",Nu=["object","boolean"],Ou={format:{type:"string"}},um={$schema:Au,$id:Pu,$vocabulary:Cu,$dynamicAnchor:ku,title:Tu,type:Nu,properties:Ou},
556
+ lm={__proto__:null,$dynamicAnchor:ku,$id:Pu,$schema:Au,$vocabulary:Cu,default:um,properties:Ou,title:Tu,type:Nu},fm=De(lm),Iu="https://json-schema.org/draft/2020-12/schema",ju="https://json-schema.org/draft/2020-12/meta/meta-data",Lu={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Du="meta",qu="Meta-data vocabulary meta-schema",xu=["object","boolean"],Mu={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},
557
+ writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},dm={$schema:Iu,$id:ju,$vocabulary:Lu,$dynamicAnchor:Du,title:qu,type:xu,properties:Mu},pm={__proto__:null,$dynamicAnchor:Du,$id:ju,$schema:Iu,$vocabulary:Lu,default:dm,properties:Mu,title:qu,type:xu},hm=De(pm),Hu="https://json-schema.org/draft/2020-12/schema",Uu="https://json-schema.org/draft/2020-12/meta/validation",Fu={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Vu="meta",zu="Validation vocabulary meta-sch\
558
+ ema",Gu=["object","boolean"],Bu={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{
559
+ $ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Ku={nonNegativeInteger:{type:"integ\
560
+ er",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},mm={$schema:Hu,$id:Uu,$vocabulary:Fu,$dynamicAnchor:Vu,title:zu,type:Gu,properties:Bu,$defs:Ku},ym={__proto__:null,$defs:Ku,$dynamicAnchor:Vu,$id:Uu,$schema:Hu,$vocabulary:Fu,default:mm,properties:Bu,title:zu,type:Gu},gm=De(ym);var Wu;function $m(){if(Wu)
561
+ return Zr;Wu=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=Jh,t=Zh,r=rm,n=om,i=cm,s=fm,o=hm,a=gm,u=["/properties"];function c(l){return[e,t,r,n,i,m(this,s),o,m(this,a)].forEach(y=>this.addMetaSchema(y,void 0,!1)),this;function m(y,_){return l?y.$dataMetaSchema(_,u):_}}return Zr.default=c,Zr}var Xu;function vm(){return Xu||(Xu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=
562
+ t.Ajv2020=void 0;const r=Oi(),n=Bh(),i=Hc(),s=$m(),o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(_={}){super({..._,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:_,meta:S}=this.opts;S&&(s.default.call(this,_),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){
563
+ return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var u=Nt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){
564
+ return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var m=Ot();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Zt,Zt.exports)),Zt.exports}var _m=vm(),
565
+ en={exports:{}},Es={},Ju;function wm(){return Ju||(Ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(x,H){return{validate:x,compare:H}}e.fullFormats={date:t(s,o),time:t(u(!0),c),"date-time":t(y(!0),_),"iso-time":t(u(),l),"iso-date-time":t(y(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
565
566
  "uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
566
567
  email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
567
568
  regex:U,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:d,int32:{type:"number",validate:w},int64:{type:"number",validate:E},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,
568
- o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
569
- email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(q){return q%4===0&&(q%100!==0||q%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(q){const H=n.exec(q);if(!H)return!1;const D=+H[1],I=+H[2],M=+H[3];return I>=1&&I<=12&&M>=1&&M<=(I===2&&r(D)?29:c[I])}function o(q,H){if(q&&H)return q>H?1:q<H?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
570
- function i(q){return function(D){const I=a.exec(D);if(!I)return!1;const M=+I[1],z=+I[2],F=+I[3],G=I[4],Q=I[5]==="-"?-1:1,x=+(I[6]||0),A=+(I[7]||0);if(x>23||A>59||q&&!G)return!1;if(M<=23&&z<=59&&F<60)return!0;const L=z-A*Q,N=M-x*Q-(L<0?1:0);return(N===23||N===-1)&&(L===59||L===-1)&&F<61}}function u(q,H){if(!(q&&H))return;const D=new Date("2020-01-01T"+q).valueOf(),I=new Date("2020-01-01T"+H).valueOf();if(D&&I)return D-I}function l(q,H){if(!(q&&H))return;const D=a.exec(q),I=a.exec(H);if(D&&I)return q=
571
- D[1]+D[2]+D[3],H=I[1]+I[2]+I[3],q>H?1:q<H?-1:0}const m=/t|\s/i;function y(q){const H=i(q);return function(I){const M=I.split(m);return M.length===2&&s(M[0])&&H(M[1])}}function _(q,H){if(!(q&&H))return;const D=new Date(q).valueOf(),I=new Date(H).valueOf();if(D&&I)return D-I}function S(q,H){if(!(q&&H))return;const[D,I]=q.split(m),[M,z]=H.split(m),F=o(D,M);if(F!==void 0)return F||u(I,z)}const g=/\/|:/,p=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
572
- function h(q){return g.test(q)&&p.test(q)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d(q){return f.lastIndex=0,f.test(q)}const $=-2147483648,v=2**31-1;function w(q){return Number.isInteger(q)&&q<=v&&q>=$}function E(q){return Number.isInteger(q)}function P(){return!0}const k=/[^\\]\\Z/;function U(q){if(k.test(q))return!1;try{return new RegExp(q),!0}catch{return!1}}})(Es)),Es}var Ss={},tn={exports:{}},rn={},Ju;function _m(){if(Ju)return rn;Ju=1,Object.defineProperty(
573
- rn,"__esModule",{value:!0});const e=Li(),t=Xi(),r=yc(),n=Ic(),c=Lc(),s=[e.default,t.default,(0,r.default)(),n.default,c.metadataVocabulary,c.contentVocabulary];return rn.default=s,rn}const Yu="http://json-schema.org/draft-07/schema#",Qu="http://json-schema.org/draft-07/schema#",Zu="Core schema meta-schema",el={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
574
- simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},tl=["object","boolean"],rl={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},
569
+ o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
570
+ email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(x){return x%4===0&&(x%100!==0||x%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(x){const H=n.exec(x);if(!H)return!1;const D=+H[1],I=+H[2],M=+H[3];return I>=1&&I<=12&&M>=1&&M<=(I===2&&r(D)?29:i[I])}function o(x,H){if(x&&H)return x>H?1:x<H?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
571
+ function u(x){return function(D){const I=a.exec(D);if(!I)return!1;const M=+I[1],z=+I[2],F=+I[3],G=I[4],Q=I[5]==="-"?-1:1,q=+(I[6]||0),A=+(I[7]||0);if(q>23||A>59||x&&!G)return!1;if(M<=23&&z<=59&&F<60)return!0;const L=z-A*Q,T=M-q*Q-(L<0?1:0);return(T===23||T===-1)&&(L===59||L===-1)&&F<61}}function c(x,H){if(!(x&&H))return;const D=new Date("2020-01-01T"+x).valueOf(),I=new Date("2020-01-01T"+H).valueOf();if(D&&I)return D-I}function l(x,H){if(!(x&&H))return;const D=a.exec(x),I=a.exec(H);if(D&&I)return x=
572
+ D[1]+D[2]+D[3],H=I[1]+I[2]+I[3],x>H?1:x<H?-1:0}const m=/t|\s/i;function y(x){const H=u(x);return function(I){const M=I.split(m);return M.length===2&&s(M[0])&&H(M[1])}}function _(x,H){if(!(x&&H))return;const D=new Date(x).valueOf(),I=new Date(H).valueOf();if(D&&I)return D-I}function S(x,H){if(!(x&&H))return;const[D,I]=x.split(m),[M,z]=H.split(m),F=o(D,M);if(F!==void 0)return F||c(I,z)}const $=/\/|:/,p=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
573
+ function h(x){return $.test(x)&&p.test(x)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d(x){return f.lastIndex=0,f.test(x)}const g=-2147483648,v=2**31-1;function w(x){return Number.isInteger(x)&&x<=v&&x>=g}function E(x){return Number.isInteger(x)}function P(){return!0}const O=/[^\\]\\Z/;function U(x){if(O.test(x))return!1;try{return new RegExp(x),!0}catch{return!1}}})(Es)),Es}var Ss={},tn={exports:{}},rn={},Yu;function bm(){if(Yu)return rn;Yu=1,Object.defineProperty(
574
+ rn,"__esModule",{value:!0});const e=Di(),t=Ji(),r=gc(),n=jc(),i=Dc(),s=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return rn.default=s,rn}const Qu="http://json-schema.org/draft-07/schema#",Zu="http://json-schema.org/draft-07/schema#",el="Core schema meta-schema",tl={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},
575
+ simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},rl=["object","boolean"],nl={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},
575
576
  maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolea\
576
577
  n",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"\
577
578
  object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/def\
578
- initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},wm={$schema:Yu,$id:Qu,title:Zu,definitions:el,type:tl,properties:rl,default:!0},bm={__proto__:null,$id:Qu,$schema:Yu,default:wm,definitions:el,properties:rl,title:Zu,type:tl},Em=De(bm);var nl;function Sm(){return nl||(nl=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Oi(),n=_m(),c=Mc(),
579
- s=Em,o=["/properties"],a="http://json-schema.org/draft-07/schema";class i extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(S,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
580
- (this.getSchema(a)?a:void 0)}}t.Ajv=i,e.exports=t=i,e.exports.Ajv=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var u=kt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=oe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,
581
- "nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var m=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var y=It();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(tn,tn.exports)),tn.exports}var sl;function Rm(){return sl||(sl=1,(function(e){
582
- Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Sm(),r=oe(),n=r.operators,c={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:a,schemaCode:i})=>(0,r.str)`should be ${c[a].okStr} ${i}`,params:({keyword:a,schemaCode:i})=>(0,r._)`{comparison: ${c[a].okStr}, limit: ${i}}`};e.formatLimitDefinition=
583
- {keyword:Object.keys(c),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:i,data:u,schemaCode:l,keyword:m,it:y}=a,{opts:_,self:S}=y;if(!_.validateFormats)return;const g=new t.KeywordCxt(y,S.RULES.all.format.definition,"format");g.$data?p():h();function p(){const d=i.scopeValue("formats",{ref:S.formats,code:_.code.formats}),$=i.const("fmt",(0,r._)`${d}[${g.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${$} != "object"`,(0,r._)`${$} instanceof RegExp`,(0,r._)`typeof ${$}.compare != "function"`,
584
- f($)))}function h(){const d=g.schema,$=S.formats[d];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${m}": format "${d}" does not define "compare" function`);const v=i.scopeValue("formats",{key:d,ref:$,code:_.code.formats?(0,r._)`${_.code.formats}${(0,r.getProperty)(d)}`:void 0});a.fail$data(f(v))}function f(d){return(0,r._)`${d}.compare(${u}, ${l}) ${c[m].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(e.formatLimitDefinition),
585
- a);e.default=o})(Ss)),Ss}var ol;function Am(){return ol||(ol=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=vm(),n=Rm(),c=oe(),s=new c.Name("fullFormats"),o=new c.Name("fastFormats"),a=(u,l={keywords:!0})=>{if(Array.isArray(l))return i(u,l,r.fullFormats,s),u;const[m,y]=l.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],_=l.formats||r.formatNames;return i(u,_,m,y),l.keywords&&(0,n.default)(u),u};a.get=(u,l="full")=>{const y=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!y)
586
- throw new Error(`Unknown format "${u}"`);return y};function i(u,l,m,y){var _,S;(_=(S=u.opts.code).formats)!==null&&_!==void 0||(S.formats=(0,c._)`require("ajv-formats/dist/formats").${y}`);for(const g of l)u.addFormat(g,m[g])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a})(en,en.exports)),en.exports}var Pm=Am();const Cm=mn(Pm),Tm=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const c=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(
587
- t,r);!Nm(c,s)&&n||Object.defineProperty(e,r,s)},Nm=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Om=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},km=(e,t)=>`/* Wrapped ${e}*/
588
- ${t}`,Im=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),jm=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Lm=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,c=km.bind(null,n,t.toString());Object.defineProperty(c,"name",jm);const{writable:s,enumerable:o,configurable:a}=Im;Object.defineProperty(e,"toString",{value:c,writable:s,enumerable:o,configurable:a})};function Dm(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const c of Reflect.ownKeys(t))Tm(e,
589
- t,c,r);return Om(e,t),Lm(e,t,n),e}const al=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:c=!1,after:s=!0}=t;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!c&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,i;const u=function(...l){const m=this,y=()=>{o=void 0,a&&(clearTimeout(a),a=
590
- void 0),s&&(i=e.apply(m,l))},_=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),s&&(i=e.apply(m,l))},S=c&&!o;return clearTimeout(o),o=setTimeout(y,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(_,n)),S&&(i=e.apply(m,l)),i};return Dm(u,e),u.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},u};var nn={exports:{}},Rs,il;function sn(){if(il)return Rs;il=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,c=t-6;return Rs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,
591
- MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Rs}var As,cl;function on(){return cl||(cl=1,As=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),As}var ul;function Dt(){return ul||(ul=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
592
- MAX_LENGTH:c}=sn(),s=on();t=e.exports={};const o=t.re=[],a=t.safeRe=[],i=t.src=[],u=t.safeSrc=[],l=t.t={};let m=0;const y="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",c],[y,n]],S=p=>{for(const[h,f]of _)p=p.split(`${h}*`).join(`${h}{0,${f}}`).split(`${h}+`).join(`${h}{1,${f}}`);return p},g=(p,h,f)=>{const d=S(h),$=m++;s(p,$,h),l[p]=$,i[$]=h,u[$]=d,o[$]=new RegExp(h,f?"g":void 0),a[$]=new RegExp(d,f?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",
593
- `\\d*[a-zA-Z-]${y}*`),g("MAINVERSION",`(${i[l.NUMERICIDENTIFIER]})\\.(${i[l.NUMERICIDENTIFIER]})\\.(${i[l.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${i[l.NUMERICIDENTIFIERLOOSE]})\\.(${i[l.NUMERICIDENTIFIERLOOSE]})\\.(${i[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${i[l.NONNUMERICIDENTIFIER]}|${i[l.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${i[l.NONNUMERICIDENTIFIER]}|${i[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${i[l.PRERELEASEIDENTIFIER]}(?:\\.${i[l.
594
- PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${i[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[l.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${y}+`),g("BUILD",`(?:\\+(${i[l.BUILDIDENTIFIER]}(?:\\.${i[l.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${i[l.MAINVERSION]}${i[l.PRERELEASE]}?${i[l.BUILD]}?`),g("FULL",`^${i[l.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${i[l.MAINVERSIONLOOSE]}${i[l.PRERELEASELOOSE]}?${i[l.BUILD]}?`),g("LOOSE",`^${i[l.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRAN\
595
- GEIDENTIFIERLOOSE",`${i[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${i[l.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${i[l.XRANGEIDENTIFIER]})(?:\\.(${i[l.XRANGEIDENTIFIER]})(?:\\.(${i[l.XRANGEIDENTIFIER]})(?:${i[l.PRERELEASE]})?${i[l.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${i[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[l.XRANGEIDENTIFIERLOOSE]})(?:${i[l.PRERELEASELOOSE]})?${i[l.BUILD]}?)?)?`),g("XRANGE",`^${i[l.GTLT]}\\s*${i[l.XRANGEPLAIN]}\
596
- $`),g("XRANGELOOSE",`^${i[l.GTLT]}\\s*${i[l.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),g("COERCE",`${i[l.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",i[l.COERCEPLAIN]+`(?:${i[l.PRERELEASE]})?(?:${i[l.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",i[l.COERCE],!0),g("COERCERTLFULL",i[l.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${i[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${i[l.LONETILDE]}${i[l.XRANGEPLAIN]}\
597
- $`),g("TILDELOOSE",`^${i[l.LONETILDE]}${i[l.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${i[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${i[l.LONECARET]}${i[l.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${i[l.LONECARET]}${i[l.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${i[l.GTLT]}\\s*(${i[l.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${i[l.GTLT]}\\s*(${i[l.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${i[l.GTLT]}\\s*(${i[l.LOOSEPLAIN]}|${i[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=
598
- "$1$2$3",g("HYPHENRANGE",`^\\s*(${i[l.XRANGEPLAIN]})\\s+-\\s+(${i[l.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${i[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[l.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(nn,nn.exports)),nn.exports}var Ps,ll;function Cs(){if(ll)return Ps;ll=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ps=n=>n?typeof n!="object"?e:n:t,Ps}var Ts,fl;function dl(){if(fl)return Ts;
599
- fl=1;const e=/^[0-9]+$/,t=(n,c)=>{const s=e.test(n),o=e.test(c);return s&&o&&(n=+n,c=+c),n===c?0:s&&!o?-1:o&&!s?1:n<c?-1:1};return Ts={compareIdentifiers:t,rcompareIdentifiers:(n,c)=>t(c,n)},Ts}var Ns,pl;function Se(){if(pl)return Ns;pl=1;const e=on(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=sn(),{safeRe:n,t:c}=Dt(),s=Cs(),{compareIdentifiers:o}=dl();class a{constructor(u,l){if(l=s(l),u instanceof a){if(u.loose===!!l.loose&&u.includePrerelease===!!l.includePrerelease)return u;u=u.version}else if(typeof u!=
600
- "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",u,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const m=u.trim().match(l.loose?n[c.LOOSE]:n[c.FULL]);if(!m)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
579
+ initions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Em={$schema:Qu,$id:Zu,title:el,definitions:tl,type:rl,properties:nl,default:!0},Sm={__proto__:null,$id:Zu,$schema:Qu,default:Em,definitions:tl,properties:nl,title:el,type:rl},Rm=De(Sm);var sl;function Am(){return sl||(sl=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Oi(),n=bm(),i=Hc(),
580
+ s=Rm,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(S,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||
581
+ (this.getSchema(a)?a:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var c=Nt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,
582
+ "nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var m=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var y=Ot();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(tn,tn.exports)),tn.exports}var ol;function Pm(){return ol||(ol=1,(function(e){
583
+ Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Am(),r=ae(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:a,schemaCode:u})=>(0,r.str)`should be ${i[a].okStr} ${u}`,params:({keyword:a,schemaCode:u})=>(0,r._)`{comparison: ${i[a].okStr}, limit: ${u}}`};e.formatLimitDefinition=
584
+ {keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:u,data:c,schemaCode:l,keyword:m,it:y}=a,{opts:_,self:S}=y;if(!_.validateFormats)return;const $=new t.KeywordCxt(y,S.RULES.all.format.definition,"format");$.$data?p():h();function p(){const d=u.scopeValue("formats",{ref:S.formats,code:_.code.formats}),g=u.const("fmt",(0,r._)`${d}[${$.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${g} != "object"`,(0,r._)`${g} instanceof RegExp`,(0,r._)`typeof ${g}.compare != "function"`,
585
+ f(g)))}function h(){const d=$.schema,g=S.formats[d];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${m}": format "${d}" does not define "compare" function`);const v=u.scopeValue("formats",{key:d,ref:g,code:_.code.formats?(0,r._)`${_.code.formats}${(0,r.getProperty)(d)}`:void 0});a.fail$data(f(v))}function f(d){return(0,r._)`${d}.compare(${c}, ${l}) ${i[m].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(e.formatLimitDefinition),
586
+ a);e.default=o})(Ss)),Ss}var al;function Cm(){return al||(al=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=wm(),n=Pm(),i=ae(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(c,l={keywords:!0})=>{if(Array.isArray(l))return u(c,l,r.fullFormats,s),c;const[m,y]=l.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],_=l.formats||r.formatNames;return u(c,_,m,y),l.keywords&&(0,n.default)(c),c};a.get=(c,l="full")=>{const y=(l==="fast"?r.fastFormats:r.fullFormats)[c];if(!y)
587
+ throw new Error(`Unknown format "${c}"`);return y};function u(c,l,m,y){var _,S;(_=(S=c.opts.code).formats)!==null&&_!==void 0||(S.formats=(0,i._)`require("ajv-formats/dist/formats").${y}`);for(const $ of l)c.addFormat($,m[$])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a})(en,en.exports)),en.exports}var km=Cm();const Tm=mn(km),Nm=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;const i=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(
588
+ t,r);!Om(i,s)&&n||Object.defineProperty(e,r,s)},Om=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Im=(e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},jm=(e,t)=>`/* Wrapped ${e}*/
589
+ ${t}`,Lm=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Dm=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),qm=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `,i=jm.bind(null,n,t.toString());Object.defineProperty(i,"name",Dm);const{writable:s,enumerable:o,configurable:a}=Lm;Object.defineProperty(e,"toString",{value:i,writable:s,enumerable:o,configurable:a})};function xm(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))Nm(e,
590
+ t,i,r);return Im(e,t),qm(e,t,n),e}const il=(e,t={})=>{if(typeof e!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:s=!0}=t;if(r<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,u;const c=function(...l){const m=this,y=()=>{o=void 0,a&&(clearTimeout(a),a=
591
+ void 0),s&&(u=e.apply(m,l))},_=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),s&&(u=e.apply(m,l))},S=i&&!o;return clearTimeout(o),o=setTimeout(y,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(_,n)),S&&(u=e.apply(m,l)),u};return xm(c,e),c.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},c};var nn={exports:{}},Rs,cl;function sn(){if(cl)return Rs;cl=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return Rs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,
592
+ MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Rs}var As,ul;function on(){return ul||(ul=1,As=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),As}var ll;function Lt(){return ll||(ll=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,
593
+ MAX_LENGTH:i}=sn(),s=on();t=e.exports={};const o=t.re=[],a=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],l=t.t={};let m=0;const y="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",i],[y,n]],S=p=>{for(const[h,f]of _)p=p.split(`${h}*`).join(`${h}{0,${f}}`).split(`${h}+`).join(`${h}{1,${f}}`);return p},$=(p,h,f)=>{const d=S(h),g=m++;s(p,g,h),l[p]=g,u[g]=h,c[g]=d,o[g]=new RegExp(h,f?"g":void 0),a[g]=new RegExp(d,f?"g":void 0)};$("NUMERICIDENTIFIER","0|[1-9]\\d*"),$("NUMERICIDENTIFIERLOOSE","\\d+"),$("NONNUMERICIDENTIFIER",
594
+ `\\d*[a-zA-Z-]${y}*`),$("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),$("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASEIDENTIFIER",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIER]})`),$("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIERLOOSE]})`),$("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.
595
+ PRERELEASEIDENTIFIER]})*))`),$("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),$("BUILDIDENTIFIER",`${y}+`),$("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),$("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),$("FULL",`^${u[l.FULLPLAIN]}$`),$("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),$("LOOSE",`^${u[l.LOOSEPLAIN]}$`),$("GTLT","((?:<|>)?=?)"),$("XRAN\
596
+ GEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),$("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),$("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),$("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),$("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}\
597
+ $`),$("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),$("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),$("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?(?:${u[l.BUILD]})?(?:$|[^\\d])`),$("COERCERTL",u[l.COERCE],!0),$("COERCERTLFULL",u[l.COERCEFULL],!0),$("LONETILDE","(?:~>?)"),$("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",$("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}\
598
+ $`),$("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),$("LONECARET","(?:\\^)"),$("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",$("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),$("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),$("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),$("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),$("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=
599
+ "$1$2$3",$("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),$("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),$("STAR","(<|>)?=?\\s*\\*"),$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(nn,nn.exports)),nn.exports}var Ps,fl;function Cs(){if(fl)return Ps;fl=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ps=n=>n?typeof n!="object"?e:n:t,Ps}var ks,dl;function pl(){if(dl)return ks;
600
+ dl=1;const e=/^[0-9]+$/,t=(n,i)=>{const s=e.test(n),o=e.test(i);return s&&o&&(n=+n,i=+i),n===i?0:s&&!o?-1:o&&!s?1:n<i?-1:1};return ks={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},ks}var Ts,hl;function Se(){if(hl)return Ts;hl=1;const e=on(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=sn(),{safeRe:n,t:i}=Lt(),s=Cs(),{compareIdentifiers:o}=pl();class a{constructor(c,l){if(l=s(l),c instanceof a){if(c.loose===!!l.loose&&c.includePrerelease===!!l.includePrerelease)return c;c=c.version}else if(typeof c!=
601
+ "string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const m=c.trim().match(l.loose?n[i.LOOSE]:n[i.FULL]);if(!m)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>r||this.major<0)throw new TypeError("Invalid major versi\
601
602
  on");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(y=>{if(/^[0-9]+$/.test(y)){const _=+y;if(_>=0&&_<r)return _}return y}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){
602
- return this.version}compare(u){if(e("SemVer.compare",this.version,this.options,u),!(u instanceof a)){if(typeof u=="string"&&u===this.version)return 0;u=new a(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof a||(u=new a(u,this.options)),o(this.major,u.major)||o(this.minor,u.minor)||o(this.patch,u.patch)}comparePre(u){if(u instanceof a||(u=new a(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.
603
- prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let l=0;do{const m=this.prerelease[l],y=u.prerelease[l];if(e("prerelease compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}compareBuild(u){u instanceof a||(u=new a(u,this.options));let l=0;do{const m=this.build[l],y=u.build[l];if(e("build compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;
604
- if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}inc(u,l,m){if(u.startsWith("pre")){if(!l&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const y=`-${l}`.match(this.options.loose?n[c.PRERELEASELOOSE]:n[c.PRERELEASE]);if(!y||y[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.
603
+ return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),o(this.major,c.major)||o(this.minor,c.minor)||o(this.patch,c.patch)}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.
604
+ prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let l=0;do{const m=this.prerelease[l],y=c.prerelease[l];if(e("prerelease compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let l=0;do{const m=this.build[l],y=c.build[l];if(e("build compare",l,m,y),m===void 0&&y===void 0)return 0;if(y===void 0)return 1;
605
+ if(m===void 0)return-1;if(m===y)continue;return o(m,y)}while(++l)}inc(c,l,m){if(c.startsWith("pre")){if(!l&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const y=`-${l}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!y||y[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.
605
606
  minor++,this.inc("pre",l,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,m),this.inc("pre",l,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,m),this.inc("pre",l,m);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.
606
607
  patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const y=Number(m)?1:0;if(this.prerelease.length===0)this.prerelease=[y];else{let _=this.prerelease.length;for(;--_>=0;)typeof this.prerelease[_]=="number"&&(this.prerelease[_]++,_=-2);if(_===-1){if(l===this.prerelease.join(".")&&m===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.
607
- push(y)}}if(l){let _=[l,y];m===!1&&(_=[l]),o(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=_):this.prerelease=_}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ns=a,Ns}var Os,hl;function $t(){if(hl)return Os;hl=1;const e=Se();return Os=(r,n,c=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(s){if(!c)return null;throw s}},Os}var ks,ml;function qm(){
608
- if(ml)return ks;ml=1;const e=$t();return ks=(r,n)=>{const c=e(r,n);return c?c.version:null},ks}var Is,yl;function xm(){if(yl)return Is;yl=1;const e=$t();return Is=(r,n)=>{const c=e(r.trim().replace(/^[=v]+/,""),n);return c?c.version:null},Is}var js,gl;function Mm(){if(gl)return js;gl=1;const e=Se();return js=(r,n,c,s,o)=>{typeof c=="string"&&(o=s,s=c,c=void 0);try{return new e(r instanceof e?r.version:r,c).inc(n,s,o).version}catch{return null}},js}var Ls,$l;function Hm(){if($l)return Ls;$l=1;const e=$t();
609
- return Ls=(r,n)=>{const c=e(r,null,!0),s=e(n,null,!0),o=c.compare(s);if(o===0)return null;const a=o>0,i=a?c:s,u=a?s:c,l=!!i.prerelease.length;if(!!u.prerelease.length&&!l){if(!u.patch&&!u.minor)return"major";if(u.compareMain(i)===0)return u.minor&&!u.patch?"minor":"patch"}const y=l?"pre":"";return c.major!==s.major?y+"major":c.minor!==s.minor?y+"minor":c.patch!==s.patch?y+"patch":"prerelease"},Ls}var Ds,vl;function Um(){if(vl)return Ds;vl=1;const e=Se();return Ds=(r,n)=>new e(r,n).major,Ds}var qs,
610
- _l;function Fm(){if(_l)return qs;_l=1;const e=Se();return qs=(r,n)=>new e(r,n).minor,qs}var xs,wl;function Vm(){if(wl)return xs;wl=1;const e=Se();return xs=(r,n)=>new e(r,n).patch,xs}var Ms,bl;function zm(){if(bl)return Ms;bl=1;const e=$t();return Ms=(r,n)=>{const c=e(r,n);return c&&c.prerelease.length?c.prerelease:null},Ms}var Hs,El;function je(){if(El)return Hs;El=1;const e=Se();return Hs=(r,n,c)=>new e(r,c).compare(new e(n,c)),Hs}var Us,Sl;function Gm(){if(Sl)return Us;Sl=1;const e=je();return Us=
611
- (r,n,c)=>e(n,r,c),Us}var Fs,Rl;function Bm(){if(Rl)return Fs;Rl=1;const e=je();return Fs=(r,n)=>e(r,n,!0),Fs}var Vs,Al;function zs(){if(Al)return Vs;Al=1;const e=Se();return Vs=(r,n,c)=>{const s=new e(r,c),o=new e(n,c);return s.compare(o)||s.compareBuild(o)},Vs}var Gs,Pl;function Km(){if(Pl)return Gs;Pl=1;const e=zs();return Gs=(r,n)=>r.sort((c,s)=>e(c,s,n)),Gs}var Bs,Cl;function Wm(){if(Cl)return Bs;Cl=1;const e=zs();return Bs=(r,n)=>r.sort((c,s)=>e(s,c,n)),Bs}var Ks,Tl;function an(){if(Tl)return Ks;
612
- Tl=1;const e=je();return Ks=(r,n,c)=>e(r,n,c)>0,Ks}var Ws,Nl;function Xs(){if(Nl)return Ws;Nl=1;const e=je();return Ws=(r,n,c)=>e(r,n,c)<0,Ws}var Js,Ol;function kl(){if(Ol)return Js;Ol=1;const e=je();return Js=(r,n,c)=>e(r,n,c)===0,Js}var Ys,Il;function jl(){if(Il)return Ys;Il=1;const e=je();return Ys=(r,n,c)=>e(r,n,c)!==0,Ys}var Qs,Ll;function Zs(){if(Ll)return Qs;Ll=1;const e=je();return Qs=(r,n,c)=>e(r,n,c)>=0,Qs}var eo,Dl;function to(){if(Dl)return eo;Dl=1;const e=je();return eo=(r,n,c)=>e(r,
613
- n,c)<=0,eo}var ro,ql;function xl(){if(ql)return ro;ql=1;const e=kl(),t=jl(),r=an(),n=Zs(),c=Xs(),s=to();return ro=(a,i,u,l)=>{switch(i){case"===":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a===u;case"!==":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a!==u;case"":case"=":case"==":return e(a,u,l);case"!=":return t(a,u,l);case">":return r(a,u,l);case">=":return n(a,u,l);case"<":return c(a,u,l);case"<=":return s(a,u,l);default:throw new TypeError(
614
- `Invalid operator: ${i}`)}},ro}var no,Ml;function Xm(){if(Ml)return no;Ml=1;const e=Se(),t=$t(),{safeRe:r,t:n}=Dt();return no=(s,o)=>{if(s instanceof e)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;o=o||{};let a=null;if(!o.rtl)a=s.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const _=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let S;for(;(S=_.exec(s))&&(!a||a.index+a[0].length!==s.length);)(!a||S.index+S[0].length!==a.index+a[0].length)&&(a=
615
- S),_.lastIndex=S.index+S[1].length+S[2].length;_.lastIndex=-1}if(a===null)return null;const i=a[2],u=a[3]||"0",l=a[4]||"0",m=o.includePrerelease&&a[5]?`-${a[5]}`:"",y=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${i}.${u}.${l}${m}${y}`,o)},no}var so,Hl;function Jm(){if(Hl)return so;Hl=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&
616
- n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return so=e,so}var oo,Ul;function Le(){if(Ul)return oo;Ul=1;const e=/\s+/g;class t{constructor(M,z){if(z=c(z),M instanceof t)return M.loose===!!z.loose&&M.includePrerelease===!!z.includePrerelease?M:new t(M.raw,z);if(M instanceof s)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,
617
- this.raw=M.trim().replace(e," "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(G=>!g(G[0])),this.set.length===0)this.set=[F];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&p(G[0])){this.set=[G];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.
618
- set.length;M++){M>0&&(this.formatted+="||");const z=this.set[M];for(let F=0;F<z.length;F++)F>0&&(this.formatted+=" "),this.formatted+=z[F].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const F=((this.options.includePrerelease&&_)|(this.options.loose&&S))+":"+M,G=n.get(F);if(G)return G;const Q=this.options.loose,x=Q?i[u.HYPHENRANGELOOSE]:i[u.HYPHENRANGE];M=M.replace(x,H(this.options.includePrerelease)),o("hyphen replace",M),M=M.replace(
619
- i[u.COMPARATORTRIM],l),o("comparator trim",M),M=M.replace(i[u.TILDETRIM],m),o("tilde trim",M),M=M.replace(i[u.CARETTRIM],y),o("caret trim",M);let A=M.split(" ").map(b=>f(b,this.options)).join(" ").split(/\s+/).map(b=>q(b,this.options));Q&&(A=A.filter(b=>(o("loose invalid filter",b,this.options),!!b.match(i[u.COMPARATORLOOSE])))),o("range list",A);const L=new Map,N=A.map(b=>new s(b,this.options));for(const b of N){if(g(b))return[b];L.set(b.value,b)}L.size>1&&L.has("")&&L.delete("");const R=[...L.
620
- values()];return n.set(F,R),R}intersects(M,z){if(!(M instanceof t))throw new TypeError("a Range is required");return this.set.some(F=>h(F,z)&&M.set.some(G=>h(G,z)&&F.every(Q=>G.every(x=>Q.intersects(x,z)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new a(M,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(D(this.set[z],M,this.options))return!0;return!1}}oo=t;const r=Jm(),n=new r,c=Cs(),s=cn(),o=on(),a=Se(),{safeRe:i,t:u,comparatorTrimReplace:l,tildeTrimReplace:m,caretTrimReplace:y}=Dt(),
621
- {FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:S}=sn(),g=I=>I.value==="<0.0.0-0",p=I=>I.value==="",h=(I,M)=>{let z=!0;const F=I.slice();let G=F.pop();for(;z&&F.length;)z=F.every(Q=>G.intersects(Q,M)),G=F.pop();return z},f=(I,M)=>(o("comp",I,M),I=w(I,M),o("caret",I),I=$(I,M),o("tildes",I),I=P(I,M),o("xrange",I),I=U(I,M),o("stars",I),I),d=I=>!I||I.toLowerCase()==="x"||I==="*",$=(I,M)=>I.trim().split(/\s+/).map(z=>v(z,M)).join(" "),v=(I,M)=>{const z=M.loose?i[u.TILDELOOSE]:i[u.TILDE];return I.replace(z,(F,G,Q,x,A)=>{
622
- o("tilde",I,F,G,Q,x,A);let L;return d(G)?L="":d(Q)?L=`>=${G}.0.0 <${+G+1}.0.0-0`:d(x)?L=`>=${G}.${Q}.0 <${G}.${+Q+1}.0-0`:A?(o("replaceTilde pr",A),L=`>=${G}.${Q}.${x}-${A} <${G}.${+Q+1}.0-0`):L=`>=${G}.${Q}.${x} <${G}.${+Q+1}.0-0`,o("tilde return",L),L})},w=(I,M)=>I.trim().split(/\s+/).map(z=>E(z,M)).join(" "),E=(I,M)=>{o("caret",I,M);const z=M.loose?i[u.CARETLOOSE]:i[u.CARET],F=M.includePrerelease?"-0":"";return I.replace(z,(G,Q,x,A,L)=>{o("caret",I,G,Q,x,A,L);let N;return d(Q)?N="":d(x)?N=`>=${Q}\
623
- .0.0${F} <${+Q+1}.0.0-0`:d(A)?Q==="0"?N=`>=${Q}.${x}.0${F} <${Q}.${+x+1}.0-0`:N=`>=${Q}.${x}.0${F} <${+Q+1}.0.0-0`:L?(o("replaceCaret pr",L),Q==="0"?x==="0"?N=`>=${Q}.${x}.${A}-${L} <${Q}.${x}.${+A+1}-0`:N=`>=${Q}.${x}.${A}-${L} <${Q}.${+x+1}.0-0`:N=`>=${Q}.${x}.${A}-${L} <${+Q+1}.0.0-0`):(o("no pr"),Q==="0"?x==="0"?N=`>=${Q}.${x}.${A}${F} <${Q}.${x}.${+A+1}-0`:N=`>=${Q}.${x}.${A}${F} <${Q}.${+x+1}.0-0`:N=`>=${Q}.${x}.${A} <${+Q+1}.0.0-0`),o("caret return",N),N})},P=(I,M)=>(o("replaceXRanges",I,
624
- M),I.split(/\s+/).map(z=>k(z,M)).join(" ")),k=(I,M)=>{I=I.trim();const z=M.loose?i[u.XRANGELOOSE]:i[u.XRANGE];return I.replace(z,(F,G,Q,x,A,L)=>{o("xRange",I,F,G,Q,x,A,L);const N=d(Q),R=N||d(x),b=R||d(A),C=b;return G==="="&&C&&(G=""),L=M.includePrerelease?"-0":"",N?G===">"||G==="<"?F="<0.0.0-0":F="*":G&&C?(R&&(x=0),A=0,G===">"?(G=">=",R?(Q=+Q+1,x=0,A=0):(x=+x+1,A=0)):G==="<="&&(G="<",R?Q=+Q+1:x=+x+1),G==="<"&&(L="-0"),F=`${G+Q}.${x}.${A}${L}`):R?F=`>=${Q}.0.0${L} <${+Q+1}.0.0-0`:b&&(F=`>=${Q}.${x}\
625
- .0${L} <${Q}.${+x+1}.0-0`),o("xRange return",F),F})},U=(I,M)=>(o("replaceStars",I,M),I.trim().replace(i[u.STAR],"")),q=(I,M)=>(o("replaceGTE0",I,M),I.trim().replace(i[M.includePrerelease?u.GTE0PRE:u.GTE0],"")),H=I=>(M,z,F,G,Q,x,A,L,N,R,b,C)=>(d(F)?z="":d(G)?z=`>=${F}.0.0${I?"-0":""}`:d(Q)?z=`>=${F}.${G}.0${I?"-0":""}`:x?z=`>=${z}`:z=`>=${z}${I?"-0":""}`,d(N)?L="":d(R)?L=`<${+N+1}.0.0-0`:d(b)?L=`<${N}.${+R+1}.0-0`:C?L=`<=${N}.${R}.${b}-${C}`:I?L=`<${N}.${R}.${+b+1}-0`:L=`<=${L}`,`${z} ${L}`.trim()),
626
- D=(I,M,z)=>{for(let F=0;F<I.length;F++)if(!I[F].test(M))return!1;if(M.prerelease.length&&!z.includePrerelease){for(let F=0;F<I.length;F++)if(o(I[F].semver),I[F].semver!==s.ANY&&I[F].semver.prerelease.length>0){const G=I[F].semver;if(G.major===M.major&&G.minor===M.minor&&G.patch===M.patch)return!0}return!1}return!0};return oo}var ao,Fl;function cn(){if(Fl)return ao;Fl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,m){if(m=r(m),l instanceof t){if(l.loose===!!m.loose)
627
- return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,m),this.options=m,this.loose=!!m.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const m=this.options.loose?n[c.COMPARATORLOOSE]:n[c.COMPARATOR],y=l.match(m);if(!y)throw new TypeError(`Invalid comparator: ${l}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new a(y[2],this.options.loose):this.semver=e}toString(){
628
- return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,m){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new i(l.value,m).test(this.value):l.operator===""?l.value===""?!0:new i(this.value,m).test(l.semver):(m=r(m),m.includePrerelease&&(this.value==="<0.0.0\
608
+ push(y)}}if(l){let _=[l,y];m===!1&&(_=[l]),o(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=_):this.prerelease=_}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ts=a,Ts}var Ns,ml;function $t(){if(ml)return Ns;ml=1;const e=Se();return Ns=(r,n,i=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(s){if(!i)return null;throw s}},Ns}var Os,yl;function Mm(){
609
+ if(yl)return Os;yl=1;const e=$t();return Os=(r,n)=>{const i=e(r,n);return i?i.version:null},Os}var Is,gl;function Hm(){if(gl)return Is;gl=1;const e=$t();return Is=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Is}var js,$l;function Um(){if($l)return js;$l=1;const e=Se();return js=(r,n,i,s,o)=>{typeof i=="string"&&(o=s,s=i,i=void 0);try{return new e(r instanceof e?r.version:r,i).inc(n,s,o).version}catch{return null}},js}var Ls,vl;function Fm(){if(vl)return Ls;vl=1;const e=$t();
610
+ return Ls=(r,n)=>{const i=e(r,null,!0),s=e(n,null,!0),o=i.compare(s);if(o===0)return null;const a=o>0,u=a?i:s,c=a?s:i,l=!!u.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(u)===0)return c.minor&&!c.patch?"minor":"patch"}const y=l?"pre":"";return i.major!==s.major?y+"major":i.minor!==s.minor?y+"minor":i.patch!==s.patch?y+"patch":"prerelease"},Ls}var Ds,_l;function Vm(){if(_l)return Ds;_l=1;const e=Se();return Ds=(r,n)=>new e(r,n).major,Ds}var qs,
611
+ wl;function zm(){if(wl)return qs;wl=1;const e=Se();return qs=(r,n)=>new e(r,n).minor,qs}var xs,bl;function Gm(){if(bl)return xs;bl=1;const e=Se();return xs=(r,n)=>new e(r,n).patch,xs}var Ms,El;function Bm(){if(El)return Ms;El=1;const e=$t();return Ms=(r,n)=>{const i=e(r,n);return i&&i.prerelease.length?i.prerelease:null},Ms}var Hs,Sl;function je(){if(Sl)return Hs;Sl=1;const e=Se();return Hs=(r,n,i)=>new e(r,i).compare(new e(n,i)),Hs}var Us,Rl;function Km(){if(Rl)return Us;Rl=1;const e=je();return Us=
612
+ (r,n,i)=>e(n,r,i),Us}var Fs,Al;function Wm(){if(Al)return Fs;Al=1;const e=je();return Fs=(r,n)=>e(r,n,!0),Fs}var Vs,Pl;function zs(){if(Pl)return Vs;Pl=1;const e=Se();return Vs=(r,n,i)=>{const s=new e(r,i),o=new e(n,i);return s.compare(o)||s.compareBuild(o)},Vs}var Gs,Cl;function Xm(){if(Cl)return Gs;Cl=1;const e=zs();return Gs=(r,n)=>r.sort((i,s)=>e(i,s,n)),Gs}var Bs,kl;function Jm(){if(kl)return Bs;kl=1;const e=zs();return Bs=(r,n)=>r.sort((i,s)=>e(s,i,n)),Bs}var Ks,Tl;function an(){if(Tl)return Ks;
613
+ Tl=1;const e=je();return Ks=(r,n,i)=>e(r,n,i)>0,Ks}var Ws,Nl;function Xs(){if(Nl)return Ws;Nl=1;const e=je();return Ws=(r,n,i)=>e(r,n,i)<0,Ws}var Js,Ol;function Il(){if(Ol)return Js;Ol=1;const e=je();return Js=(r,n,i)=>e(r,n,i)===0,Js}var Ys,jl;function Ll(){if(jl)return Ys;jl=1;const e=je();return Ys=(r,n,i)=>e(r,n,i)!==0,Ys}var Qs,Dl;function Zs(){if(Dl)return Qs;Dl=1;const e=je();return Qs=(r,n,i)=>e(r,n,i)>=0,Qs}var eo,ql;function to(){if(ql)return eo;ql=1;const e=je();return eo=(r,n,i)=>e(r,
614
+ n,i)<=0,eo}var ro,xl;function Ml(){if(xl)return ro;xl=1;const e=Il(),t=Ll(),r=an(),n=Zs(),i=Xs(),s=to();return ro=(a,u,c,l)=>{switch(u){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,l);case"!=":return t(a,c,l);case">":return r(a,c,l);case">=":return n(a,c,l);case"<":return i(a,c,l);case"<=":return s(a,c,l);default:throw new TypeError(
615
+ `Invalid operator: ${u}`)}},ro}var no,Hl;function Ym(){if(Hl)return no;Hl=1;const e=Se(),t=$t(),{safeRe:r,t:n}=Lt();return no=(s,o)=>{if(s instanceof e)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;o=o||{};let a=null;if(!o.rtl)a=s.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const _=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let S;for(;(S=_.exec(s))&&(!a||a.index+a[0].length!==s.length);)(!a||S.index+S[0].length!==a.index+a[0].length)&&(a=
616
+ S),_.lastIndex=S.index+S[1].length+S[2].length;_.lastIndex=-1}if(a===null)return null;const u=a[2],c=a[3]||"0",l=a[4]||"0",m=o.includePrerelease&&a[5]?`-${a[5]}`:"",y=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${u}.${c}.${l}${m}${y}`,o)},no}var so,Ul;function Qm(){if(Ul)return so;Ul=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&
617
+ n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return so=e,so}var oo,Fl;function Le(){if(Fl)return oo;Fl=1;const e=/\s+/g;class t{constructor(M,z){if(z=i(z),M instanceof t)return M.loose===!!z.loose&&M.includePrerelease===!!z.includePrerelease?M:new t(M.raw,z);if(M instanceof s)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,
618
+ this.raw=M.trim().replace(e," "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(G=>!$(G[0])),this.set.length===0)this.set=[F];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&p(G[0])){this.set=[G];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.
619
+ set.length;M++){M>0&&(this.formatted+="||");const z=this.set[M];for(let F=0;F<z.length;F++)F>0&&(this.formatted+=" "),this.formatted+=z[F].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const F=((this.options.includePrerelease&&_)|(this.options.loose&&S))+":"+M,G=n.get(F);if(G)return G;const Q=this.options.loose,q=Q?u[c.HYPHENRANGELOOSE]:u[c.HYPHENRANGE];M=M.replace(q,H(this.options.includePrerelease)),o("hyphen replace",M),M=M.replace(
620
+ u[c.COMPARATORTRIM],l),o("comparator trim",M),M=M.replace(u[c.TILDETRIM],m),o("tilde trim",M),M=M.replace(u[c.CARETTRIM],y),o("caret trim",M);let A=M.split(" ").map(b=>f(b,this.options)).join(" ").split(/\s+/).map(b=>x(b,this.options));Q&&(A=A.filter(b=>(o("loose invalid filter",b,this.options),!!b.match(u[c.COMPARATORLOOSE])))),o("range list",A);const L=new Map,T=A.map(b=>new s(b,this.options));for(const b of T){if($(b))return[b];L.set(b.value,b)}L.size>1&&L.has("")&&L.delete("");const R=[...L.
621
+ values()];return n.set(F,R),R}intersects(M,z){if(!(M instanceof t))throw new TypeError("a Range is required");return this.set.some(F=>h(F,z)&&M.set.some(G=>h(G,z)&&F.every(Q=>G.every(q=>Q.intersects(q,z)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new a(M,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(D(this.set[z],M,this.options))return!0;return!1}}oo=t;const r=Qm(),n=new r,i=Cs(),s=cn(),o=on(),a=Se(),{safeRe:u,t:c,comparatorTrimReplace:l,tildeTrimReplace:m,caretTrimReplace:y}=Lt(),
622
+ {FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:S}=sn(),$=I=>I.value==="<0.0.0-0",p=I=>I.value==="",h=(I,M)=>{let z=!0;const F=I.slice();let G=F.pop();for(;z&&F.length;)z=F.every(Q=>G.intersects(Q,M)),G=F.pop();return z},f=(I,M)=>(o("comp",I,M),I=w(I,M),o("caret",I),I=g(I,M),o("tildes",I),I=P(I,M),o("xrange",I),I=U(I,M),o("stars",I),I),d=I=>!I||I.toLowerCase()==="x"||I==="*",g=(I,M)=>I.trim().split(/\s+/).map(z=>v(z,M)).join(" "),v=(I,M)=>{const z=M.loose?u[c.TILDELOOSE]:u[c.TILDE];return I.replace(z,(F,G,Q,q,A)=>{
623
+ o("tilde",I,F,G,Q,q,A);let L;return d(G)?L="":d(Q)?L=`>=${G}.0.0 <${+G+1}.0.0-0`:d(q)?L=`>=${G}.${Q}.0 <${G}.${+Q+1}.0-0`:A?(o("replaceTilde pr",A),L=`>=${G}.${Q}.${q}-${A} <${G}.${+Q+1}.0-0`):L=`>=${G}.${Q}.${q} <${G}.${+Q+1}.0-0`,o("tilde return",L),L})},w=(I,M)=>I.trim().split(/\s+/).map(z=>E(z,M)).join(" "),E=(I,M)=>{o("caret",I,M);const z=M.loose?u[c.CARETLOOSE]:u[c.CARET],F=M.includePrerelease?"-0":"";return I.replace(z,(G,Q,q,A,L)=>{o("caret",I,G,Q,q,A,L);let T;return d(Q)?T="":d(q)?T=`>=${Q}\
624
+ .0.0${F} <${+Q+1}.0.0-0`:d(A)?Q==="0"?T=`>=${Q}.${q}.0${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.0${F} <${+Q+1}.0.0-0`:L?(o("replaceCaret pr",L),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}-${L} <${Q}.${q}.${+A+1}-0`:T=`>=${Q}.${q}.${A}-${L} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A}-${L} <${+Q+1}.0.0-0`):(o("no pr"),Q==="0"?q==="0"?T=`>=${Q}.${q}.${A}${F} <${Q}.${q}.${+A+1}-0`:T=`>=${Q}.${q}.${A}${F} <${Q}.${+q+1}.0-0`:T=`>=${Q}.${q}.${A} <${+Q+1}.0.0-0`),o("caret return",T),T})},P=(I,M)=>(o("replaceXRanges",I,
625
+ M),I.split(/\s+/).map(z=>O(z,M)).join(" ")),O=(I,M)=>{I=I.trim();const z=M.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return I.replace(z,(F,G,Q,q,A,L)=>{o("xRange",I,F,G,Q,q,A,L);const T=d(Q),R=T||d(q),b=R||d(A),C=b;return G==="="&&C&&(G=""),L=M.includePrerelease?"-0":"",T?G===">"||G==="<"?F="<0.0.0-0":F="*":G&&C?(R&&(q=0),A=0,G===">"?(G=">=",R?(Q=+Q+1,q=0,A=0):(q=+q+1,A=0)):G==="<="&&(G="<",R?Q=+Q+1:q=+q+1),G==="<"&&(L="-0"),F=`${G+Q}.${q}.${A}${L}`):R?F=`>=${Q}.0.0${L} <${+Q+1}.0.0-0`:b&&(F=`>=${Q}.${q}\
626
+ .0${L} <${Q}.${+q+1}.0-0`),o("xRange return",F),F})},U=(I,M)=>(o("replaceStars",I,M),I.trim().replace(u[c.STAR],"")),x=(I,M)=>(o("replaceGTE0",I,M),I.trim().replace(u[M.includePrerelease?c.GTE0PRE:c.GTE0],"")),H=I=>(M,z,F,G,Q,q,A,L,T,R,b,C)=>(d(F)?z="":d(G)?z=`>=${F}.0.0${I?"-0":""}`:d(Q)?z=`>=${F}.${G}.0${I?"-0":""}`:q?z=`>=${z}`:z=`>=${z}${I?"-0":""}`,d(T)?L="":d(R)?L=`<${+T+1}.0.0-0`:d(b)?L=`<${T}.${+R+1}.0-0`:C?L=`<=${T}.${R}.${b}-${C}`:I?L=`<${T}.${R}.${+b+1}-0`:L=`<=${L}`,`${z} ${L}`.trim()),
627
+ D=(I,M,z)=>{for(let F=0;F<I.length;F++)if(!I[F].test(M))return!1;if(M.prerelease.length&&!z.includePrerelease){for(let F=0;F<I.length;F++)if(o(I[F].semver),I[F].semver!==s.ANY&&I[F].semver.prerelease.length>0){const G=I[F].semver;if(G.major===M.major&&G.minor===M.minor&&G.patch===M.patch)return!0}return!1}return!0};return oo}var ao,Vl;function cn(){if(Vl)return ao;Vl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,m){if(m=r(m),l instanceof t){if(l.loose===!!m.loose)
628
+ return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,m),this.options=m,this.loose=!!m.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const m=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],y=l.match(m);if(!y)throw new TypeError(`Invalid comparator: ${l}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new a(y[2],this.options.loose):this.semver=e}toString(){
629
+ return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,m){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(l.value,m).test(this.value):l.operator===""?l.value===""?!0:new u(this.value,m).test(l.semver):(m=r(m),m.includePrerelease&&(this.value==="<0.0.0\
629
630
  -0"||l.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||s(this.semver,"<",l.semver,m)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||s(this.semver,">",l.semver,m)&&this.operator.startsWith("<")&&l.operator.startsWith(
630
- ">")))}}ao=t;const r=Cs(),{safeRe:n,t:c}=Dt(),s=xl(),o=on(),a=Se(),i=Le();return ao}var io,Vl;function un(){if(Vl)return io;Vl=1;const e=Le();return io=(r,n,c)=>{try{n=new e(n,c)}catch{return!1}return n.test(r)},io}var co,zl;function Ym(){if(zl)return co;zl=1;const e=Le();return co=(r,n)=>new e(r,n).set.map(c=>c.map(s=>s.value).join(" ").trim().split(" ")),co}var uo,Gl;function Qm(){if(Gl)return uo;Gl=1;const e=Se(),t=Le();return uo=(n,c,s)=>{let o=null,a=null,i=null;try{i=new t(c,s)}catch{return null}
631
- return n.forEach(u=>{i.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new e(o,s))}),o},uo}var lo,Bl;function Zm(){if(Bl)return lo;Bl=1;const e=Se(),t=Le();return lo=(n,c,s)=>{let o=null,a=null,i=null;try{i=new t(c,s)}catch{return null}return n.forEach(u=>{i.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new e(o,s))}),o},lo}var fo,Kl;function ey(){if(Kl)return fo;Kl=1;const e=Se(),t=Le(),r=an();return fo=(c,s)=>{c=new t(c,s);let o=new e("0.0.0");if(c.test(o)||(o=new e("0.0.0-0"),c.test(o)))return o;o=null;for(let a=0;a<
632
- c.set.length;++a){const i=c.set[a];let u=null;i.forEach(l=>{const m=new e(l.semver.version);switch(l.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!u||r(m,u))&&(u=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),u&&(!o||r(o,u))&&(o=u)}return o&&c.test(o)?o:null},fo}var po,Wl;function ty(){if(Wl)return po;Wl=1;const e=Le();return po=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},
633
- po}var ho,Xl;function mo(){if(Xl)return ho;Xl=1;const e=Se(),t=cn(),{ANY:r}=t,n=Le(),c=un(),s=an(),o=Xs(),a=to(),i=Zs();return ho=(l,m,y,_)=>{l=new e(l,_),m=new n(m,_);let S,g,p,h,f;switch(y){case">":S=s,g=a,p=o,h=">",f=">=";break;case"<":S=o,g=i,p=s,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(l,m,_))return!1;for(let d=0;d<m.set.length;++d){const $=m.set[d];let v=null,w=null;if($.forEach(E=>{E.semver===r&&(E=new t(">=0.0.0")),v=v||E,w=w||E,S(E.semver,
634
- v.semver,_)?v=E:p(E.semver,w.semver,_)&&(w=E)}),v.operator===h||v.operator===f||(!w.operator||w.operator===h)&&g(l,w.semver))return!1;if(w.operator===f&&p(l,w.semver))return!1}return!0},ho}var yo,Jl;function ry(){if(Jl)return yo;Jl=1;const e=mo();return yo=(r,n,c)=>e(r,n,">",c),yo}var go,Yl;function ny(){if(Yl)return go;Yl=1;const e=mo();return go=(r,n,c)=>e(r,n,"<",c),go}var $o,Ql;function sy(){if(Ql)return $o;Ql=1;const e=Le();return $o=(r,n,c)=>(r=new e(r,c),n=new e(n,c),r.intersects(n,c)),$o}
635
- var vo,Zl;function oy(){if(Zl)return vo;Zl=1;const e=un(),t=je();return vo=(r,n,c)=>{const s=[];let o=null,a=null;const i=r.sort((y,_)=>t(y,_,c));for(const y of i)e(y,n,c)?(a=y,o||(o=y)):(a&&s.push([o,a]),a=null,o=null);o&&s.push([o,null]);const u=[];for(const[y,_]of s)y===_?u.push(y):!_&&y===i[0]?u.push("*"):_?y===i[0]?u.push(`<=${_}`):u.push(`${y} - ${_}`):u.push(`>=${y}`);const l=u.join(" || "),m=typeof n.raw=="string"?n.raw:String(n);return l.length<m.length?l:n},vo}var _o,ef;function ay(){if(ef)
636
- return _o;ef=1;const e=Le(),t=cn(),{ANY:r}=t,n=un(),c=je(),s=(m,y,_={})=>{if(m===y)return!0;m=new e(m,_),y=new e(y,_);let S=!1;e:for(const g of m.set){for(const p of y.set){const h=i(g,p,_);if(S=S||h!==null,h)continue e}if(S)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],i=(m,y,_)=>{if(m===y)return!0;if(m.length===1&&m[0].semver===r){if(y.length===1&&y[0].semver===r)return!0;_.includePrerelease?m=o:m=a}if(y.length===1&&y[0].semver===r){if(_.includePrerelease)return!0;y=a}const S=new Set;
637
- let g,p;for(const P of m)P.operator===">"||P.operator===">="?g=u(g,P,_):P.operator==="<"||P.operator==="<="?p=l(p,P,_):S.add(P.semver);if(S.size>1)return null;let h;if(g&&p){if(h=c(g.semver,p.semver,_),h>0)return null;if(h===0&&(g.operator!==">="||p.operator!=="<="))return null}for(const P of S){if(g&&!n(P,String(g),_)||p&&!n(P,String(p),_))return null;for(const k of y)if(!n(P,String(k),_))return!1;return!0}let f,d,$,v,w=p&&!_.includePrerelease&&p.semver.prerelease.length?p.semver:!1,E=g&&!_.includePrerelease&&
638
- g.semver.prerelease.length?g.semver:!1;w&&w.prerelease.length===1&&p.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const P of y){if(v=v||P.operator===">"||P.operator===">=",$=$||P.operator==="<"||P.operator==="<=",g){if(E&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===E.major&&P.semver.minor===E.minor&&P.semver.patch===E.patch&&(E=!1),P.operator===">"||P.operator===">="){if(f=u(g,P,_),f===P&&f!==g)return!1}else if(g.operator===">="&&!n(g.semver,String(P),_))return!1}if(p){if(w&&
639
- P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===w.major&&P.semver.minor===w.minor&&P.semver.patch===w.patch&&(w=!1),P.operator==="<"||P.operator==="<="){if(d=l(p,P,_),d===P&&d!==p)return!1}else if(p.operator==="<="&&!n(p.semver,String(P),_))return!1}if(!P.operator&&(p||g)&&h!==0)return!1}return!(g&&$&&!p&&h!==0||p&&v&&!g&&h!==0||E||w)},u=(m,y,_)=>{if(!m)return y;const S=c(m.semver,y.semver,_);return S>0?m:S<0||y.operator===">"&&m.operator===">="?y:m},l=(m,y,_)=>{if(!m)return y;
640
- const S=c(m.semver,y.semver,_);return S<0?m:S>0||y.operator==="<"&&m.operator==="<="?y:m};return _o=s,_o}var wo,tf;function iy(){if(tf)return wo;tf=1;const e=Dt(),t=sn(),r=Se(),n=dl(),c=$t(),s=qm(),o=xm(),a=Mm(),i=Hm(),u=Um(),l=Fm(),m=Vm(),y=zm(),_=je(),S=Gm(),g=Bm(),p=zs(),h=Km(),f=Wm(),d=an(),$=Xs(),v=kl(),w=jl(),E=Zs(),P=to(),k=xl(),U=Xm(),q=cn(),H=Le(),D=un(),I=Ym(),M=Qm(),z=Zm(),F=ey(),G=ty(),Q=mo(),x=ry(),A=ny(),L=sy(),N=oy(),R=ay();return wo={parse:c,valid:s,clean:o,inc:a,diff:i,major:u,minor:l,
641
- patch:m,prerelease:y,compare:_,rcompare:S,compareLoose:g,compareBuild:p,sort:h,rsort:f,gt:d,lt:$,eq:v,neq:w,gte:E,lte:P,cmp:k,coerce:U,Comparator:q,Range:H,satisfies:D,toComparators:I,maxSatisfying:M,minSatisfying:z,minVersion:F,validRange:G,outside:Q,gtr:x,ltr:A,intersects:L,simplifyRange:N,subset:R,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},wo}var bo=iy();
642
- const vt=mn(bo),cy=Object.prototype.toString,uy="[object Uint8Array]",ly="[object ArrayBuffer]";function rf(e,t,r){return e?e.constructor===t?!0:cy.call(e)===r:!1}function nf(e){return rf(e,Uint8Array,uy)}function fy(e){return rf(e,ArrayBuffer,ly)}function dy(e){return nf(e)||fy(e)}function py(e){if(!nf(e))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function hy(e){if(!dy(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function sf(e,t){
643
- if(e.length===0)return new Uint8Array(0);t??=e.reduce((c,s)=>c+s.length,0);const r=new Uint8Array(t);let n=0;for(const c of e)py(c),r.set(c,n),n+=c.length;return r}const of={utf8:new globalThis.TextDecoder("utf8")};function af(e,t="utf8"){return hy(e),of[t]??=new globalThis.TextDecoder(t),of[t].decode(e)}function my(e){if(typeof e!="string")throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}const yy=new globalThis.TextEncoder;function Eo(e){return my(e),yy.encode(e)}Array.from({length:256},
644
- (e,t)=>t.toString(16).padStart(2,"0"));const gy=Cm.default,cf="aes-256-cbc",_t=()=>Object.create(null),$y=e=>e!=null,vy=(e,t)=>{const r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},ln="__internal__",So=`${ln}.migrations.version`;class _y{path;events;#n;#t;#e;#r={};constructor(t={}){const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,
645
- accessPropertiesByDotNotation:!0,configFileMode:438,...t};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=Ip(r.projectName,{suffix:r.projectSuffix}).config}if(this.#e=r,r.schema??r.ajvOptions??r.rootSchema){if(r.schema&&typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");const o=new $m.Ajv2020({allErrors:!0,useDefaults:!0,...r.ajvOptions});gy(o);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.
646
- compile(a);for(const[i,u]of Object.entries(r.schema??{}))u?.default&&(this.#r[i]=u.default)}r.defaults&&(this.#r={...this.#r,...r.defaults}),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new EventTarget,this.#t=r.encryptionKey;const n=r.fileExtension?`.${r.fileExtension}`:"";this.path=ie.resolve(r.cwd,`${r.configName??"config"}${n}`);const c=this.store,s=Object.assign(_t(),r.defaults,c);if(r.migrations){if(!r.projectVersion)throw new Error(
647
- "Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(s);try{id.deepEqual(c,s)}catch{this.store=s}r.watch&&this._watch()}get(t,r){if(this.#e.accessPropertiesByDotNotation)return this._get(t,r);const{store:n}=this;return t in n?n[t]:r}set(t,r){if(typeof t!="string"&&typeof t!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`);if(typeof t!="object"&&r===void 0)throw new TypeError(
648
- "Use `delete()` to clear values");if(this._containsReservedKey(t))throw new TypeError(`Please don't use the ${ln} key, as it's used to manage this module internal operations.`);const{store:n}=this,c=(s,o)=>{vy(s,o),this.#e.accessPropertiesByDotNotation?za(n,s,o):n[s]=o};if(typeof t=="object"){const s=t;for(const[o,a]of Object.entries(s))c(o,a)}else c(t,r);this.store=n}has(t){return this.#e.accessPropertiesByDotNotation?Tp(this.store,t):t in this.store}reset(...t){for(const r of t)$y(this.#r[r])&&
649
- this.set(r,this.#r[r])}delete(t){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Cp(r,t):delete r[t],this.store=r}clear(){this.store=_t();for(const t of Object.keys(this.#r))this.reset(t)}onDidChange(t,r){if(typeof t!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(t),r)}onDidAnyChange(t){if(typeof t!=
631
+ ">")))}}ao=t;const r=Cs(),{safeRe:n,t:i}=Lt(),s=Ml(),o=on(),a=Se(),u=Le();return ao}var io,zl;function un(){if(zl)return io;zl=1;const e=Le();return io=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},io}var co,Gl;function Zm(){if(Gl)return co;Gl=1;const e=Le();return co=(r,n)=>new e(r,n).set.map(i=>i.map(s=>s.value).join(" ").trim().split(" ")),co}var uo,Bl;function ey(){if(Bl)return uo;Bl=1;const e=Se(),t=Le();return uo=(n,i,s)=>{let o=null,a=null,u=null;try{u=new t(i,s)}catch{return null}
632
+ return n.forEach(c=>{u.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new e(o,s))}),o},uo}var lo,Kl;function ty(){if(Kl)return lo;Kl=1;const e=Se(),t=Le();return lo=(n,i,s)=>{let o=null,a=null,u=null;try{u=new t(i,s)}catch{return null}return n.forEach(c=>{u.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new e(o,s))}),o},lo}var fo,Wl;function ry(){if(Wl)return fo;Wl=1;const e=Se(),t=Le(),r=an();return fo=(i,s)=>{i=new t(i,s);let o=new e("0.0.0");if(i.test(o)||(o=new e("0.0.0-0"),i.test(o)))return o;o=null;for(let a=0;a<
633
+ i.set.length;++a){const u=i.set[a];let c=null;u.forEach(l=>{const m=new e(l.semver.version);switch(l.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!c||r(m,c))&&(c=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),c&&(!o||r(o,c))&&(o=c)}return o&&i.test(o)?o:null},fo}var po,Xl;function ny(){if(Xl)return po;Xl=1;const e=Le();return po=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},
634
+ po}var ho,Jl;function mo(){if(Jl)return ho;Jl=1;const e=Se(),t=cn(),{ANY:r}=t,n=Le(),i=un(),s=an(),o=Xs(),a=to(),u=Zs();return ho=(l,m,y,_)=>{l=new e(l,_),m=new n(m,_);let S,$,p,h,f;switch(y){case">":S=s,$=a,p=o,h=">",f=">=";break;case"<":S=o,$=u,p=s,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(l,m,_))return!1;for(let d=0;d<m.set.length;++d){const g=m.set[d];let v=null,w=null;if(g.forEach(E=>{E.semver===r&&(E=new t(">=0.0.0")),v=v||E,w=w||E,S(E.semver,
635
+ v.semver,_)?v=E:p(E.semver,w.semver,_)&&(w=E)}),v.operator===h||v.operator===f||(!w.operator||w.operator===h)&&$(l,w.semver))return!1;if(w.operator===f&&p(l,w.semver))return!1}return!0},ho}var yo,Yl;function sy(){if(Yl)return yo;Yl=1;const e=mo();return yo=(r,n,i)=>e(r,n,">",i),yo}var go,Ql;function oy(){if(Ql)return go;Ql=1;const e=mo();return go=(r,n,i)=>e(r,n,"<",i),go}var $o,Zl;function ay(){if(Zl)return $o;Zl=1;const e=Le();return $o=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),$o}
636
+ var vo,ef;function iy(){if(ef)return vo;ef=1;const e=un(),t=je();return vo=(r,n,i)=>{const s=[];let o=null,a=null;const u=r.sort((y,_)=>t(y,_,i));for(const y of u)e(y,n,i)?(a=y,o||(o=y)):(a&&s.push([o,a]),a=null,o=null);o&&s.push([o,null]);const c=[];for(const[y,_]of s)y===_?c.push(y):!_&&y===u[0]?c.push("*"):_?y===u[0]?c.push(`<=${_}`):c.push(`${y} - ${_}`):c.push(`>=${y}`);const l=c.join(" || "),m=typeof n.raw=="string"?n.raw:String(n);return l.length<m.length?l:n},vo}var _o,tf;function cy(){if(tf)
637
+ return _o;tf=1;const e=Le(),t=cn(),{ANY:r}=t,n=un(),i=je(),s=(m,y,_={})=>{if(m===y)return!0;m=new e(m,_),y=new e(y,_);let S=!1;e:for(const $ of m.set){for(const p of y.set){const h=u($,p,_);if(S=S||h!==null,h)continue e}if(S)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],u=(m,y,_)=>{if(m===y)return!0;if(m.length===1&&m[0].semver===r){if(y.length===1&&y[0].semver===r)return!0;_.includePrerelease?m=o:m=a}if(y.length===1&&y[0].semver===r){if(_.includePrerelease)return!0;y=a}const S=new Set;
638
+ let $,p;for(const P of m)P.operator===">"||P.operator===">="?$=c($,P,_):P.operator==="<"||P.operator==="<="?p=l(p,P,_):S.add(P.semver);if(S.size>1)return null;let h;if($&&p){if(h=i($.semver,p.semver,_),h>0)return null;if(h===0&&($.operator!==">="||p.operator!=="<="))return null}for(const P of S){if($&&!n(P,String($),_)||p&&!n(P,String(p),_))return null;for(const O of y)if(!n(P,String(O),_))return!1;return!0}let f,d,g,v,w=p&&!_.includePrerelease&&p.semver.prerelease.length?p.semver:!1,E=$&&!_.includePrerelease&&
639
+ $.semver.prerelease.length?$.semver:!1;w&&w.prerelease.length===1&&p.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const P of y){if(v=v||P.operator===">"||P.operator===">=",g=g||P.operator==="<"||P.operator==="<=",$){if(E&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===E.major&&P.semver.minor===E.minor&&P.semver.patch===E.patch&&(E=!1),P.operator===">"||P.operator===">="){if(f=c($,P,_),f===P&&f!==$)return!1}else if($.operator===">="&&!n($.semver,String(P),_))return!1}if(p){if(w&&
640
+ P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===w.major&&P.semver.minor===w.minor&&P.semver.patch===w.patch&&(w=!1),P.operator==="<"||P.operator==="<="){if(d=l(p,P,_),d===P&&d!==p)return!1}else if(p.operator==="<="&&!n(p.semver,String(P),_))return!1}if(!P.operator&&(p||$)&&h!==0)return!1}return!($&&g&&!p&&h!==0||p&&v&&!$&&h!==0||E||w)},c=(m,y,_)=>{if(!m)return y;const S=i(m.semver,y.semver,_);return S>0?m:S<0||y.operator===">"&&m.operator===">="?y:m},l=(m,y,_)=>{if(!m)return y;
641
+ const S=i(m.semver,y.semver,_);return S<0?m:S>0||y.operator==="<"&&m.operator==="<="?y:m};return _o=s,_o}var wo,rf;function uy(){if(rf)return wo;rf=1;const e=Lt(),t=sn(),r=Se(),n=pl(),i=$t(),s=Mm(),o=Hm(),a=Um(),u=Fm(),c=Vm(),l=zm(),m=Gm(),y=Bm(),_=je(),S=Km(),$=Wm(),p=zs(),h=Xm(),f=Jm(),d=an(),g=Xs(),v=Il(),w=Ll(),E=Zs(),P=to(),O=Ml(),U=Ym(),x=cn(),H=Le(),D=un(),I=Zm(),M=ey(),z=ty(),F=ry(),G=ny(),Q=mo(),q=sy(),A=oy(),L=ay(),T=iy(),R=cy();return wo={parse:i,valid:s,clean:o,inc:a,diff:u,major:c,minor:l,
642
+ patch:m,prerelease:y,compare:_,rcompare:S,compareLoose:$,compareBuild:p,sort:h,rsort:f,gt:d,lt:g,eq:v,neq:w,gte:E,lte:P,cmp:O,coerce:U,Comparator:x,Range:H,satisfies:D,toComparators:I,maxSatisfying:M,minSatisfying:z,minVersion:F,validRange:G,outside:Q,gtr:q,ltr:A,intersects:L,simplifyRange:T,subset:R,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},wo}var bo=uy();
643
+ const vt=mn(bo),ly=Object.prototype.toString,fy="[object Uint8Array]",dy="[object ArrayBuffer]";function nf(e,t,r){return e?e.constructor===t?!0:ly.call(e)===r:!1}function sf(e){return nf(e,Uint8Array,fy)}function py(e){return nf(e,ArrayBuffer,dy)}function hy(e){return sf(e)||py(e)}function my(e){if(!sf(e))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function yy(e){if(!hy(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function of(e,t){
644
+ if(e.length===0)return new Uint8Array(0);t??=e.reduce((i,s)=>i+s.length,0);const r=new Uint8Array(t);let n=0;for(const i of e)my(i),r.set(i,n),n+=i.length;return r}const af={utf8:new globalThis.TextDecoder("utf8")};function cf(e,t="utf8"){return yy(e),af[t]??=new globalThis.TextDecoder(t),af[t].decode(e)}function gy(e){if(typeof e!="string")throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}const $y=new globalThis.TextEncoder;function Eo(e){return gy(e),$y.encode(e)}Array.from({length:256},
645
+ (e,t)=>t.toString(16).padStart(2,"0"));const vy=Tm.default,uf="aes-256-cbc",_t=()=>Object.create(null),_y=e=>e!=null,wy=(e,t)=>{const r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},ln="__internal__",So=`${ln}.migrations.version`;class by{path;events;#n;#t;#e;#r={};constructor(t={}){const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,
646
+ accessPropertiesByDotNotation:!0,configFileMode:438,...t};if(!r.cwd){if(!r.projectName)throw new Error("Please specify the `projectName` option.");r.cwd=Lp(r.projectName,{suffix:r.projectSuffix}).config}if(this.#e=r,r.schema??r.ajvOptions??r.rootSchema){if(r.schema&&typeof r.schema!="object")throw new TypeError("The `schema` option must be an object.");const o=new _m.Ajv2020({allErrors:!0,useDefaults:!0,...r.ajvOptions});vy(o);const a={...r.rootSchema,type:"object",properties:r.schema};this.#n=o.
647
+ compile(a);for(const[u,c]of Object.entries(r.schema??{}))c?.default&&(this.#r[u]=c.default)}r.defaults&&(this.#r={...this.#r,...r.defaults}),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new EventTarget,this.#t=r.encryptionKey;const n=r.fileExtension?`.${r.fileExtension}`:"";this.path=ie.resolve(r.cwd,`${r.configName??"config"}${n}`);const i=this.store,s=Object.assign(_t(),r.defaults,i);if(r.migrations){if(!r.projectVersion)throw new Error(
648
+ "Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}this._validate(s);try{ud.deepEqual(i,s)}catch{this.store=s}r.watch&&this._watch()}get(t,r){if(this.#e.accessPropertiesByDotNotation)return this._get(t,r);const{store:n}=this;return t in n?n[t]:r}set(t,r){if(typeof t!="string"&&typeof t!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`);if(typeof t!="object"&&r===void 0)throw new TypeError(
649
+ "Use `delete()` to clear values");if(this._containsReservedKey(t))throw new TypeError(`Please don't use the ${ln} key, as it's used to manage this module internal operations.`);const{store:n}=this,i=(s,o)=>{wy(s,o),this.#e.accessPropertiesByDotNotation?Ga(n,s,o):n[s]=o};if(typeof t=="object"){const s=t;for(const[o,a]of Object.entries(s))i(o,a)}else i(t,r);this.store=n}has(t){return this.#e.accessPropertiesByDotNotation?Np(this.store,t):t in this.store}reset(...t){for(const r of t)_y(this.#r[r])&&
650
+ this.set(r,this.#r[r])}delete(t){const{store:r}=this;this.#e.accessPropertiesByDotNotation?Tp(r,t):delete r[t],this.store=r}clear(){this.store=_t();for(const t of Object.keys(this.#r))this.reset(t)}onDidChange(t,r){if(typeof t!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`);if(typeof r!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`);return this._handleChange(()=>this.get(t),r)}onDidAnyChange(t){if(typeof t!=
650
651
  "function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleChange(()=>this.store,t)}get size(){return Object.keys(this.store).length}get store(){try{const t=se.readFileSync(this.path,this.#t?null:"utf8"),r=this._encryptData(t),n=this._deserialize(r);return this._validate(n),Object.assign(_t(),n)}catch(t){if(t?.code==="ENOENT")return this._ensureDirectory(),_t();if(this.#e.clearInvalidConfig&&t.name==="SyntaxError")return _t();throw t}}set store(t){
651
- this._ensureDirectory(),this._validate(t),this._write(t),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[t,r]of Object.entries(this.store))yield[t,r]}_encryptData(t){if(!this.#t)return typeof t=="string"?t:af(t);try{const r=t.slice(0,16),n=Pt.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),c=Pt.createDecipheriv(cf,n,r),s=t.slice(17),o=typeof s=="string"?Eo(s):s;return af(sf([c.update(o),c.final()]))}catch{}return t.toString()}_handleChange(t,r){let n=t();const c=()=>{
652
- const s=n,o=t();ad(o,s)||(n=o,r.call(this,o,s))};return this.events.addEventListener("change",c),()=>{this.events.removeEventListener("change",c)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,void 0," ");_validate(t){if(!this.#n||this.#n(t)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:c,message:s=""})=>`\`${c.slice(1)}\` ${s}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){se.mkdirSync(ie.dirname(this.path),{recursive:!0})}_write(t){
653
- let r=this._serialize(t);if(this.#t){const n=Pt.randomBytes(16),c=Pt.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),s=Pt.createCipheriv(cf,c,n);r=sf([n,Eo(":"),s.update(Eo(r)),s.final()])}if(me.env.SNAP)se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{Xa(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),se.existsSync(this.path)||this._write(_t()),
654
- me.platform==="win32"?se.watch(this.path,{persistent:!1},al(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):se.watchFile(this.path,{persistent:!1},al(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(t,r,n){let c=this._get(So,"0.0.0");const s=Object.keys(t).filter(a=>this._shouldPerformMigration(a,c,r));let o={...this.store};for(const a of s)try{n&&n(this,{fromVersion:c,toVersion:a,finalVersion:r,versions:s});const i=t[a];i?.(this),this._set(So,a),c=a,o=
655
- {...this.store}}catch(i){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${i}`)}(this._isVersionInRangeFormat(c)||!vt.eq(c,r))&&this._set(So,r)}_containsReservedKey(t){return typeof t=="object"&&Object.keys(t)[0]===ln?!0:typeof t!="string"?!1:this.#e.accessPropertiesByDotNotation?!!t.startsWith(`${ln}.`):!1}_isVersionInRangeFormat(t){return vt.clean(t)===null}_shouldPerformMigration(t,r,n){return this.
656
- _isVersionInRangeFormat(t)?r!=="0.0.0"&&vt.satisfies(r,t)?!1:vt.satisfies(n,t):!(vt.lte(t,r)||vt.gt(t,n))}_get(t,r){return Pp(this.store,t,r)}_set(t,r){const{store:n}=this;za(n,t,r),this.store=n}}class uf extends Error{response;request;options;constructor(t,r,n){const c=t.status||t.status===0?t.status:"",s=t.statusText||"",o=`${c} ${s}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.
657
- options=n}}class lf extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const ff=(()=>{let e=!1,t=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(c){if(c instanceof Error&&c.message==="unsupported \
658
- BodyInit type")return!1;throw c}return e&&!t})(),wy=typeof globalThis.AbortController=="function",by=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Ey=typeof globalThis.ReadableStream=="function",Sy=typeof globalThis.FormData=="function",df=["get","post","put","patch","head","delete"],Ry={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Ro=2147483647,Ay=new TextEncoder().encode("------WebKitFormBoundaryax\
659
- pyiPgbbPti10Rw").length,pf=Symbol("stop"),Py={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Cy={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},Ty=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=Ay,t+=new TextEncoder().
652
+ this._ensureDirectory(),this._validate(t),this._write(t),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(const[t,r]of Object.entries(this.store))yield[t,r]}_encryptData(t){if(!this.#t)return typeof t=="string"?t:cf(t);try{const r=t.slice(0,16),n=Pt.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=Pt.createDecipheriv(uf,n,r),s=t.slice(17),o=typeof s=="string"?Eo(s):s;return cf(of([i.update(o),i.final()]))}catch{}return t.toString()}_handleChange(t,r){let n=t();const i=()=>{
653
+ const s=n,o=t();cd(o,s)||(n=o,r.call(this,o,s))};return this.events.addEventListener("change",i),()=>{this.events.removeEventListener("change",i)}}_deserialize=t=>JSON.parse(t);_serialize=t=>JSON.stringify(t,void 0," ");_validate(t){if(!this.#n||this.#n(t)||!this.#n.errors)return;const n=this.#n.errors.map(({instancePath:i,message:s=""})=>`\`${i.slice(1)}\` ${s}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){se.mkdirSync(ie.dirname(this.path),{recursive:!0})}_write(t){
654
+ let r=this._serialize(t);if(this.#t){const n=Pt.randomBytes(16),i=Pt.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),s=Pt.createCipheriv(uf,i,n);r=of([n,Eo(":"),s.update(Eo(r)),s.final()])}if(me.env.SNAP)se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});else try{Ja(this.path,r,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){se.writeFileSync(this.path,r,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),se.existsSync(this.path)||this._write(_t()),
655
+ me.platform==="win32"?se.watch(this.path,{persistent:!1},il(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):se.watchFile(this.path,{persistent:!1},il(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(t,r,n){let i=this._get(So,"0.0.0");const s=Object.keys(t).filter(a=>this._shouldPerformMigration(a,i,r));let o={...this.store};for(const a of s)try{n&&n(this,{fromVersion:i,toVersion:a,finalVersion:r,versions:s});const u=t[a];u?.(this),this._set(So,a),i=a,o=
656
+ {...this.store}}catch(u){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${u}`)}(this._isVersionInRangeFormat(i)||!vt.eq(i,r))&&this._set(So,r)}_containsReservedKey(t){return typeof t=="object"&&Object.keys(t)[0]===ln?!0:typeof t!="string"?!1:this.#e.accessPropertiesByDotNotation?!!t.startsWith(`${ln}.`):!1}_isVersionInRangeFormat(t){return vt.clean(t)===null}_shouldPerformMigration(t,r,n){return this.
657
+ _isVersionInRangeFormat(t)?r!=="0.0.0"&&vt.satisfies(r,t)?!1:vt.satisfies(n,t):!(vt.lte(t,r)||vt.gt(t,n))}_get(t,r){return kp(this.store,t,r)}_set(t,r){const{store:n}=this;Ga(n,t,r),this.store=n}}class lf extends Error{response;request;options;constructor(t,r,n){const i=t.status||t.status===0?t.status:"",s=t.statusText||"",o=`${i} ${s}`.trim(),a=o?`status code ${o}`:"an unknown error";super(`Request failed with ${a}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.
658
+ options=n}}class ff extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}}const df=(()=>{let e=!1,t=!1;const r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported \
659
+ BodyInit type")return!1;throw i}return e&&!t})(),Ey=typeof globalThis.AbortController=="function",Sy=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Ry=typeof globalThis.ReadableStream=="function",Ay=typeof globalThis.FormData=="function",pf=["get","post","put","patch","head","delete"],Py={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Ro=2147483647,Cy=new TextEncoder().encode("------WebKitFormBoundaryax\
660
+ pyiPgbbPti10Rw").length,hf=Symbol("stop"),ky={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},Ty={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},Ny=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=Cy,t+=new TextEncoder().
660
661
  encode(`Content-Disposition: form-data; name="${r}"`).length,t+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(
661
- t).length}catch{return 0}return 0},Ny=(e,t)=>{const r=Number(e.headers.get("content-length"))||0;let n=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:n},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(c){const s=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function o(){const{done:a,value:i}=await s.read();if(a){c.close();return}if(t){n+=
662
- i.byteLength;const u=r===0?0:n/r;t({percent:u,transferredBytes:n,totalBytes:r},i)}c.enqueue(i),await o()}await o()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},Oy=(e,t)=>{const r=Ty(e.body);let n=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(c){const s=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:i}=await s.read();if(a){t&&t({percent:1,transferredBytes:n,totalBytes:Math.
663
- max(r,n)},new Uint8Array),c.close();return}n+=i.byteLength;let u=r===0?0:n/r;(r<n||u===1)&&(u=.99),t&&t({percent:Number(u.toFixed(2)),transferredBytes:n,totalBytes:r},i),c.enqueue(i),await o()}await o()}})})},qt=e=>e!==null&&typeof e=="object",fn=(...e)=>{for(const t of e)if((!qt(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Ao({},...e)},hf=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,c=new globalThis.
664
- Headers(t);for(const[s,o]of c.entries())n&&o==="undefined"||o===void 0?r.delete(s):r.set(s,o);return r};function dn(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Ao(e[r]??[],t[r]??[])}const mf=(e={},t={})=>({beforeRequest:dn(e,t,"beforeRequest"),beforeRetry:dn(e,t,"beforeRetry"),afterResponse:dn(e,t,"afterResponse"),beforeError:dn(e,t,"beforeError")}),Ao=(...e)=>{let t={},r={},n={};for(const c of e)if(Array.isArray(c))Array.isArray(t)||(t=[]),t=[...t,...c];else if(qt(c)){for(let[s,o]of Object.
665
- entries(c))qt(o)&&s in t&&(o=Ao(t[s],o)),t={...t,[s]:o};qt(c.hooks)&&(n=mf(n,c.hooks),t.hooks=n),qt(c.headers)&&(r=hf(r,c.headers),t.headers=r)}return t},ky=e=>df.includes(e)?e.toUpperCase():e,Iy=["get","put","head","delete","options","trace"],jy=[408,413,429,500,502,503,504],Ly=[413,429,503],yf={limit:2,methods:Iy,statusCodes:jy,afterStatusCodes:Ly,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Dy=(e={})=>{if(typeof e=="number")return{...yf,
666
- limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...yf,...e}};async function qy(e,t,r,n){return new Promise((c,s)=>{const o=setTimeout(()=>{r&&r.abort(),s(new lf(e))},n.timeout);n.fetch(e,t).then(c).catch(s).then(()=>{clearTimeout(o)})})}async function xy(e,{signal:t}){return new Promise((r,n)=>{t&&(t.throwIfAborted(),t.addEventListener("a\
667
- bort",c,{once:!0}));function c(){clearTimeout(s),n(t.reason)}const s=setTimeout(()=>{t?.removeEventListener("abort",c),r()},e)})}const My=(e,t)=>{const r={};for(const n in t)!(n in Cy)&&!(n in Py)&&!(n in e)&&(r[n]=t[n]);return r};class hn{static create(t,r){const n=new hn(t,r),c=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Ro)throw new RangeError(`The \`timeout\` option cannot be greater than ${Ro}`);await Promise.resolve();let a=await n._fetch();for(const i of n._options.
668
- hooks.afterResponse){const u=await i(n.request,n._options,n._decorateResponse(a.clone()));u instanceof globalThis.Response&&(a=u)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let i=new uf(a,n.request,n._options);for(const u of n._options.hooks.beforeError)i=await u(i);throw i}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Ey)throw new Error("Streams are not support\
669
- ed in your environment. `ReadableStream` is missing.");return Ny(a.clone(),n._options.onDownloadProgress)}return a},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(c):c()).finally(async()=>{n.request.bodyUsed||await n.request.body?.cancel()});for(const[a,i]of Object.entries(Ry))o[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||i);const u=await o;if(a==="json"){if(u.status===204||(await u.clone().arrayBuffer()).byteLength===0)return"";if(r.
670
- parseJson)return r.parseJson(await u.text())}return u[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:hf(this._input.headers,r.headers),hooks:mf({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ky(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:Dy(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(
671
- globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(wy&&by){const n=this._options.signal??
672
- this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(ff&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this.
673
- _options),this._options.searchParams){const c="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);(Sy&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.
674
- Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!ff)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=Oy(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.
675
- limit||t instanceof lf)throw t;if(t instanceof uf){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const n=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(t.response.status)){let c=Number(n)*1e3;Number.isNaN(c)?c=Date.parse(n)-Date.now():c>=Date.parse("2024-01-01")&&(c-=Date.now());const s=this._options.
676
- retry.maxRetryAfter??c;return c<s?c:s}if(t.response.status===413)throw t}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){const n=Math.min(this._calculateRetryDelay(r),Ro);if(this._retryCount<1)throw r;await xy(n,{signal:this._options.signal});for(const c of this._options.hooks.beforeRetry)
677
- if(await c({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===pf)return;return this._retry(t)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const c=await n(this.request,this._options);if(c instanceof Request){this.request=c;break}if(c instanceof Response)return c}const t=My(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):qy(r,t,this.abortController,this._options)}}const Po=e=>{
678
- const t=(r,n)=>hn.create(r,fn(e,n));for(const r of df)t[r]=(n,c)=>hn.create(n,fn(e,c,{method:r}));return t.create=r=>Po(fn(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Po(fn(e,r))),t.stop=pf,t},Hy=Po(),Co=new _y({projectName:Df,serialize:e=>lt.stringify(e,null,2),deserialize:e=>lt.parse(e)}),Uy=1e3*60*60*24,gf="check-update";function Fy(){if(zf||Gf===gf)return;const e=Co.get("lastUpdateCheck"),t=Co.get("latestVersion");if(qf(t)||xf(e)||e+Uy<Date.now())try{jo("likec4",["check-update"],{stdio:"\
679
- ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:gf}}).catch(()=>{})}catch{}t&&bo.gt(t,at)&&Ke(["Update available: ",j.dim(at),j.reset(" \u2192 "),j.green(t)].join(""))}async function Vy(){try{const e=await zy();Rn(e,"No version found in latest npm"),Co.set({lastUpdateCheck:Date.now(),latestVersion:e}),bo.gt(e,at)?Ke(["Update available: ",j.dim(at),j.reset(" \u2192 "),j.green(e)].join("")):Ke(j.dim("Up to date: ")+" "+j.green(at))}catch(e){Ae.error(Ht(e))}}async function zy(){return(await Hy("ht\
680
- tps://registry.npmjs.org/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}const Gy=e=>e.command({command:"check-update",describe:"Check for updates",handler:async()=>{await Vy()}});function By(e,t){if(!t)return e.languageServices.projectsManager.ensureProjectId();const r=ae(t);if(r===e.workspace)return e.languageServices.projectsManager.ensureProjectId();if(Me(r)&&Hf(r).isDirectory()){Ae.debug`Project path exists: ${r}`;
681
- const n=yn.file(r.endsWith(Vo)?r:r+Vo),c=e.languageServices.projects().find(s=>s.folder.fsPath===n.fsPath);if(c)return Ae.debug`Found project ${c.id} at path: ${r}`,c.id;Ae.debug`No project registered at path: ${r}`}return e.languageServices.projectsManager.ensureProjectId(t)}function pn(e,t){const r=By(e,t),n=e.languageServices.projectsManager.getProject(r);return e.languageServices.projectsManager.defaultProjectId=r,{projectId:r,projectFolder:n.folderUri.fsPath,config:n.config}}var $f=(e,t)=>(t=
682
- Symbol[e])?t:Symbol.for("Symbol."+e),vf=e=>{throw TypeError(e)},Ky=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&vf("Object expected");var n,c;n=t[$f("asyncDispose")],n===void 0&&(n=t[$f("dispose")],c=n),typeof n!="function"&&vf("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},Wy=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="\
683
- SuppressedError",u.error=o,u.suppressed=a,u},c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){c(i)}if(r)throw t};return s()};const xt=Ae.getChild("generator");async function _f({name:e,path:t,useDotBin:r,project:n}){var c=[];try{const i=it(xt),u=Ky(c,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:l,config:m}=pn(
684
- u,n);n&&xt.info(`${j.dim("project")} ${j.green(l)}`);const y=m.generators?.[e];if(!y)throw xt.error(j.red(`generator ${e} does not exist in project config`)),new Error(`generator ${e} does not exist in project config`);xt.info(`${j.dim("generator")} ${j.green(e)}`);const _=await u.layoutedModel(l);await Xy({likec4:u,model:_,generator:y,logger:xt.getChild(e)}),i.stopAndLog()}catch(i){var s=i,o=!0}finally{var a=Wy(c,s,o);a&&await a}}async function Xy({likec4:e,model:t,generator:r,logger:n}){const c=e.
685
- languageServices,s=new Set,o=c.project(t.project.id),a=t.project.id;n.debug(`${j.dim("runnig for project:")} ${j.green(o.id)}`),await Promise.resolve().then(()=>r({likec4model:t,ctx:{workspace:e.languageServices.workspaceUri,project:o,locate:i=>{let u=null;switch(!0){case dd(i):u=c.locate({element:i.id,projectId:a});break;case fd(i):u=c.locate({view:i.id,projectId:a});break;case ld(i):u=c.locate({deployment:i.id,projectId:a});break;case ud(i):case cd(i):u=c.locate({relation:i.id,projectId:a});break;default:
686
- An(i)}if(!u)throw n.error`Cannot locate ${i}`,new Error(`Cannot locate ${i}`);const l=yn.parse(u.uri);return{range:u.range,document:l,relativePath:gn.relative(o.folder,l),folder:gn.dirname(l).fsPath,filename:gn.basename(l)}},write:async({path:i,content:u})=>{let l;yn.isUri(i)?l=i.fsPath:l=ae(o.folder.fsPath,...Array.isArray(i)?i:[i]);const m=We(l);s.has(m)||(Me(m)||(n.debug(`${j.dim("create directory")} ${m}`),await qe(m,{recursive:!0})),s.add(m)),n.debug(`${j.dim("write")} ${l}`),await Xe(l,u)},
687
- abort:i=>{throw n.error(i||"Generator aborted"),new Error(i||"Generator aborted")}}}))}async function Jy(e,t,r){t=t??ae(e.workspace,"likec4.generated.ts"),St(t)!==".ts"&&(t=t+".ts"),await qe(We(t),{recursive:!0});const n=await e.diagrams(),c=Yd([...n]);await Xe(t,c),r.info(`${j.dim("generated")} ${He(process.cwd(),t)}`)}async function Yy(e,t,r){await qe(t,{recursive:!0}),r.info(`${j.dim("format")} ${j.green("dot")}`),r.info(`${j.dim("outdir")} ${t}`);const n=new Set,c=e.computedModel(),s=Oo(c.$data.
688
- views);let o=0;for(const a of s)try{const i=await e.viewsService.layouter.dot({view:a,specification:c.specification});let u=a.relativePath??".";u.includes("/")?u=u.slice(0,u.lastIndexOf("/")):u=".",u!==""&&!n.has(u)&&(await qe(ae(t,u),{recursive:!0}),n.add(u));const l=ae(t,u,a.id+".dot");await Xe(l,i),r.info(`${j.dim("generated")} ${He(process.cwd(),l)}`),o++}catch(i){Ae.error(`error while generating ${a.id}`,{error:i})}o>0&&r.info(`${j.dim("total")} ${o} files`)}async function Qy(e,t,r,n){await qe(
689
- r,{recursive:!0}),n.info(`${j.dim("format")} ${j.green(t)}`),n.info(`${j.dim("outdir")} ${r}`);let c,s;switch(t){case"d2":c=".d2",s=ed;break;case"mermaid":c=".mmd",s=Zf;break;case"plantuml":c=".puml",s=Qf;break;default:An(t)}const o=new Set,a=await e.layoutedModel();let i=0;for(const u of a.views()){const l=u.$view;try{let m=l.relativePath??".";m.includes("/")?m=m.slice(0,m.lastIndexOf("/")):m=".",m!==""&&!o.has(m)&&(await qe(ae(r,m),{recursive:!0}),o.add(m));const y=ae(r,m,l.id+c),_=s(u);await Xe(
690
- y,_),n.info(`${j.dim("generated")} ${He(process.cwd(),y)}`),i++}catch(m){n.error(`error while generating ${l.id}`,{error:m})}}i>0&&n.info(`${j.dim("total")} ${i} files`)}async function Mt({path:e,useDotBin:t,...r}){const n=Ne("c4:codegen"),c=it(n),s=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm"});if(s.ensureSingleProject(),(await s.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"view\
691
- s":{await Jy(s,r.outfile,n);break}case"dot":{await Yy(s,r.outdir??e,n);break}case"d2":case"mermaid":case"plantuml":{await Qy(s,r.format,r.outdir??e,n);break}default:An(r)}c.stopAndLog()}var wf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),bf=e=>{throw TypeError(e)},Zy=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&bf("Object expected");var n,c;n=t[wf("asyncDispose")],n===void 0&&(n=t[wf("dispose")],c=n),typeof n!="function"&&bf("Object not disposable"),c&&(n=function(){try{c.call(
692
- this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},eg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="SuppressedError",u.error=o,u.suppressed=a,u},c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){c(i)}if(r)throw t};return s()};async function tg({path:e,useDotBin:t,
693
- outfile:r,project:n}){var c=[];try{const i=Ne("c4:codegen"),u=it(i),l=Zy(c,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:m,projectFolder:y}=pn(l,n);n&&i.info(`${j.dim("project")} ${j.green(m)}`),i.info(`${j.dim("format")} ${j.green("model")}`);const _=await l.layoutedModel(m);for(const f of _.views())f.$view.hasLayoutDrift&&i.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(f.id));let S=ae(l.projectsManager.hasMultipleProjects()?
694
- y:l.workspace,"likec4-model.ts");if(r&&(S=_n(r)?r:ae(r),Me(r)&&(await wn(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const g=Ft(S);i.info(`${j.dim("filename")} ${g}`);const p=St(g).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(p))throw i.error(`output file ${r} has extension "${p}"`),new Error(`output file ${r} must be a .ts, .mts or .cts file`);const h=We(S);i.info(`${j.dim("outdir")} ${h}`),await qe(h,{recursive:!0}),await Xe(S,Xd(_),{encoding:"utf-8"}),u.stopAndLog(),
695
- Ke($n(`
662
+ t).length}catch{return 0}return 0},Oy=(e,t)=>{const r=Number(e.headers.get("content-length"))||0;let n=0;return e.status===204?(t&&t({percent:1,totalBytes:r,transferredBytes:n},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(i){const s=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function o(){const{done:a,value:u}=await s.read();if(a){i.close();return}if(t){n+=
663
+ u.byteLength;const c=r===0?0:n/r;t({percent:c,transferredBytes:n,totalBytes:r},u)}i.enqueue(u),await o()}await o()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},Iy=(e,t)=>{const r=Ny(e.body);let n=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(i){const s=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:u}=await s.read();if(a){t&&t({percent:1,transferredBytes:n,totalBytes:Math.
664
+ max(r,n)},new Uint8Array),i.close();return}n+=u.byteLength;let c=r===0?0:n/r;(r<n||c===1)&&(c=.99),t&&t({percent:Number(c.toFixed(2)),transferredBytes:n,totalBytes:r},u),i.enqueue(u),await o()}await o()}})})},Dt=e=>e!==null&&typeof e=="object",fn=(...e)=>{for(const t of e)if((!Dt(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Ao({},...e)},mf=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,i=new globalThis.
665
+ Headers(t);for(const[s,o]of i.entries())n&&o==="undefined"||o===void 0?r.delete(s):r.set(s,o);return r};function dn(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Ao(e[r]??[],t[r]??[])}const yf=(e={},t={})=>({beforeRequest:dn(e,t,"beforeRequest"),beforeRetry:dn(e,t,"beforeRetry"),afterResponse:dn(e,t,"afterResponse"),beforeError:dn(e,t,"beforeError")}),Ao=(...e)=>{let t={},r={},n={};for(const i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(Dt(i)){for(let[s,o]of Object.
666
+ entries(i))Dt(o)&&s in t&&(o=Ao(t[s],o)),t={...t,[s]:o};Dt(i.hooks)&&(n=yf(n,i.hooks),t.hooks=n),Dt(i.headers)&&(r=mf(r,i.headers),t.headers=r)}return t},jy=e=>pf.includes(e)?e.toUpperCase():e,Ly=["get","put","head","delete","options","trace"],Dy=[408,413,429,500,502,503,504],qy=[413,429,503],gf={limit:2,methods:Ly,statusCodes:Dy,afterStatusCodes:qy,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},xy=(e={})=>{if(typeof e=="number")return{...gf,
667
+ limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...gf,...e}};async function My(e,t,r,n){return new Promise((i,s)=>{const o=setTimeout(()=>{r&&r.abort(),s(new ff(e))},n.timeout);n.fetch(e,t).then(i).catch(s).then(()=>{clearTimeout(o)})})}async function Hy(e,{signal:t}){return new Promise((r,n)=>{t&&(t.throwIfAborted(),t.addEventListener("a\
668
+ bort",i,{once:!0}));function i(){clearTimeout(s),n(t.reason)}const s=setTimeout(()=>{t?.removeEventListener("abort",i),r()},e)})}const Uy=(e,t)=>{const r={};for(const n in t)!(n in Ty)&&!(n in ky)&&!(n in e)&&(r[n]=t[n]);return r};class hn{static create(t,r){const n=new hn(t,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Ro)throw new RangeError(`The \`timeout\` option cannot be greater than ${Ro}`);await Promise.resolve();let a=await n._fetch();for(const u of n._options.
669
+ hooks.afterResponse){const c=await u(n.request,n._options,n._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let u=new lf(a,n.request,n._options);for(const c of n._options.hooks.beforeError)u=await c(u);throw u}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Ry)throw new Error("Streams are not support\
670
+ ed in your environment. `ReadableStream` is missing.");return Oy(a.clone(),n._options.onDownloadProgress)}return a},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i()).finally(async()=>{n.request.bodyUsed||await n.request.body?.cancel()});for(const[a,u]of Object.entries(Py))o[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||u);const c=await o;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.
671
+ parseJson)return r.parseJson(await c.text())}return c[a]()};return o}request;abortController;_retryCount=0;_input;_options;constructor(t,r={}){if(this._input=t,this._options={...r,headers:mf(this._input.headers,r.headers),hooks:yf({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:jy(r.method??this._input.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:xy(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(
672
+ globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Ey&&Sy){const n=this._options.signal??
673
+ this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=n?AbortSignal.any([n,this.abortController.signal]):this.abortController.signal}if(df&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this.
674
+ _options),this._options.searchParams){const i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(Ay&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.
675
+ Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!df)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=Iy(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount>this._options.retry.
676
+ limit||t instanceof ff)throw t;if(t instanceof lf){if(!this._options.retry.statusCodes.includes(t.response.status))throw t;const n=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(t.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const s=this._options.
677
+ retry.maxRetryAfter??i;return i<s?i:s}if(t.response.status===413)throw t}const r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(r){const n=Math.min(this._calculateRetryDelay(r),Ro);if(this._retryCount<1)throw r;await Hy(n,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)
678
+ if(await i({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===hf)return;return this._retry(t)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const t=Uy(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,t):My(r,t,this.abortController,this._options)}}const Po=e=>{
679
+ const t=(r,n)=>hn.create(r,fn(e,n));for(const r of pf)t[r]=(n,i)=>hn.create(n,fn(e,i,{method:r}));return t.create=r=>Po(fn(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Po(fn(e,r))),t.stop=hf,t},Fy=Po(),Co=new by({projectName:qf,serialize:e=>lt.stringify(e,null,2),deserialize:e=>lt.parse(e)}),Vy=1e3*60*60*24,$f="check-update";function zy(){if(Bf||Kf===$f)return;const e=Co.get("lastUpdateCheck"),t=Co.get("latestVersion");if(xf(t)||Mf(e)||e+Vy<Date.now())try{Oo("likec4",["check-update"],{stdio:"\
680
+ ignore",preferLocal:!0,detached:!0,env:{NODE_ENV:$f}}).catch(()=>{})}catch{}t&&bo.gt(t,at)&&We(["Update available: ",j.dim(at),j.reset(" \u2192 "),j.green(t)].join(""))}async function Gy(){try{const e=await By();Rn(e,"No version found in latest npm"),Co.set({lastUpdateCheck:Date.now(),latestVersion:e}),bo.gt(e,at)?We(["Update available: ",j.dim(at),j.reset(" \u2192 "),j.green(e)].join("")):We(j.dim("Up to date: ")+" "+j.green(at))}catch(e){Ae.error(Mt(e))}}async function By(){return(await Fy("ht\
681
+ tps://registry.npmjs.org/likec4/latest",{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},keepalive:!0}).json()).version}const Ky=e=>e.command({command:"check-update",describe:"Check for updates",handler:async()=>{await Gy()}});function Wy(e,t){if(!t)return e.languageServices.projectsManager.ensureProjectId();const r=oe(t);if(r===e.workspace)return e.languageServices.projectsManager.ensureProjectId();if(He(r)&&Uf(r).isDirectory()){Ae.debug`Project path exists: ${r}`;
682
+ const n=yn.file(r.endsWith(Vo)?r:r+Vo),i=e.languageServices.projects().find(s=>s.folder.fsPath===n.fsPath);if(i)return Ae.debug`Found project ${i.id} at path: ${r}`,i.id;Ae.debug`No project registered at path: ${r}`}return e.languageServices.projectsManager.ensureProjectId(t)}function pn(e,t){const r=Wy(e,t),n=e.languageServices.projectsManager.getProject(r);return e.languageServices.projectsManager.defaultProjectId=r,{projectId:r,projectFolder:n.folderUri.fsPath,config:n.config}}var vf=(e,t)=>(t=
683
+ Symbol[e])?t:Symbol.for("Symbol."+e),_f=e=>{throw TypeError(e)},Xy=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&_f("Object expected");var n,i;n=t[vf("asyncDispose")],n===void 0&&(n=t[vf("dispose")],i=n),typeof n!="function"&&_f("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},Jy=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="\
684
+ SuppressedError",c.error=o,c.suppressed=a,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){i(u)}if(r)throw t};return s()};const qt=Ae.getChild("generator");async function wf({name:e,path:t,useDotBin:r,project:n}){var i=[];try{const u=it(qt),c=Xy(i,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:l,config:m}=pn(
685
+ c,n);n&&qt.info(`${j.dim("project")} ${j.green(l)}`);const y=m.generators?.[e];if(!y)throw qt.error(j.red(`generator ${e} does not exist in project config`)),new Error(`generator ${e} does not exist in project config`);qt.info(`${j.dim("generator")} ${j.green(e)}`);const _=await c.layoutedModel(l);await Yy({likec4:c,model:_,generator:y,logger:qt.getChild(e)}),u.stopAndLog()}catch(u){var s=u,o=!0}finally{var a=Jy(i,s,o);a&&await a}}async function Yy({likec4:e,model:t,generator:r,logger:n}){const i=e.
686
+ languageServices,s=new Set,o=i.project(t.project.id),a=t.project.id;n.debug(`${j.dim("runnig for project:")} ${j.green(o.id)}`),await Promise.resolve().then(()=>r({likec4model:t,ctx:{workspace:e.languageServices.workspaceUri,project:o,locate:u=>{let c=null;switch(!0){case hd(u):c=i.locate({element:u.id,projectId:a});break;case pd(u):c=i.locate({view:u.id,projectId:a});break;case dd(u):c=i.locate({deployment:u.id,projectId:a});break;case fd(u):case ld(u):c=i.locate({relation:u.id,projectId:a});break;default:
687
+ An(u)}if(!c)throw n.error(`Cannot locate ${u.id}`,{target:u}),new Error(`Cannot locate ${u.id}`);const l=yn.parse(c.uri);return{range:c.range,document:l,relativePath:gn.relative(o.folder,l),folder:gn.dirname(l).fsPath,filename:gn.basename(l)}},write:async({path:u,content:c})=>{let l;yn.isUri(u)?l=u.fsPath:l=oe(o.folder.fsPath,...Array.isArray(u)?u:[u]);const m=qe(l);s.has(m)||(He(m)||(n.debug(`${j.dim("create directory")} ${m}`),await xe(m,{recursive:!0})),s.add(m)),n.debug(`${j.dim("write")} ${l}`),
688
+ await Xe(l,c)},abort:u=>{throw n.error(u||"Generator aborted"),new Error(u||"Generator aborted")}}}))}async function Qy(e,t,r){t=t??oe(e.workspace,"likec4.generated.ts"),St(t)!==".ts"&&(t=t+".ts"),await xe(qe(t),{recursive:!0});const n=await e.diagrams(),i=Zd([...n]);await Xe(t,i),r.info(`${j.dim("generated")} ${Ue(process.cwd(),t)}`)}async function Zy(e,t,r){await xe(t,{recursive:!0}),r.info(`${j.dim("format")} ${j.green("dot")}`),r.info(`${j.dim("outdir")} ${t}`);const n=new Set,i=e.computedModel(),
689
+ s=Uo(i.$data.views);let o=0;for(const a of s)try{const u=await e.viewsService.layouter.dot({view:a,styles:i.$styles});let c=".";a.sourcePath&&(c=qe(a.sourcePath)),c=oe(t,c),n.has(c)||(await xe(c,{recursive:!0}),n.add(c));const l=oe(c,a.id+".dot");await Xe(l,u),r.info(`${j.dim("generated")} ${Ue(process.cwd(),l)}`),o++}catch(u){Ae.error(`error while generating ${a.id}`,{error:u})}o>0&&r.info(`${j.dim("total")} ${o} files`)}async function eg(e,t,r,n){await xe(r,{recursive:!0}),n.info(`${j.dim("for\
690
+ mat")} ${j.green(t)}`),n.info(`${j.dim("outdir")} ${r}`);let i,s;switch(t){case"d2":i=".d2",s=rd;break;case"mermaid":i=".mmd",s=td;break;case"plantuml":i=".puml",s=ed;break;default:An(t)}const o=new Set,a=await e.layoutedModel();let u=0;for(const c of a.views()){const l=c.$view;try{let m=".";l.sourcePath&&(m=qe(l.sourcePath)),m=oe(r,m),o.has(m)||(await xe(m,{recursive:!0}),o.add(m));const y=oe(m,l.id+i),_=s(c);await Xe(y,_),n.info(`${j.dim("generated")} ${Ue(process.cwd(),y)}`),u++}catch(m){n.error(
691
+ `error while generating ${l.id}`,{error:m})}}u>0&&n.info(`${j.dim("total")} ${u} files`)}async function xt({path:e,useDotBin:t,...r}){const n=Te("c4:codegen"),i=it(n),s=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm"});if(s.ensureSingleProject(),(await s.viewsService.computedViews()).length===0)throw n.warn("no views found"),process.exitCode=1,new Error("no views found");switch(r.format){case"views":{await Qy(s,r.outfile,n);break}case"dot":{await Zy(s,r.outdir??e,n);break}case"\
692
+ d2":case"mermaid":case"plantuml":{await eg(s,r.format,r.outdir??e,n);break}default:An(r)}i.stopAndLog()}var bf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ef=e=>{throw TypeError(e)},tg=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Ef("Object expected");var n,i;n=t[bf("asyncDispose")],n===void 0&&(n=t[bf("dispose")],i=n),typeof n!="function"&&Ef("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},
693
+ rg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=a,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){i(u)}if(r)throw t};return s()};async function ng({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var s=[];try{const c=Te("c4:codegen"),l=it(
694
+ c),m=tg(s,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("model")}`);const S=await m.layoutedModel(y);for(const d of S.views())d.$view.hasLayoutDrift&&c.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(d.id));let $=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-model.ts");if(n&&($=_n(n)?n:oe(
695
+ n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const p=Ut($);c.info(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(![".ts",".mts",".cts"].includes(h))throw c.error(`output file ${n} has extension "${h}"`),new Error(`output file ${n} must be a .ts, .mts or .cts file`);const f=qe($);c.info(`${j.dim("outdir")} ${f}`),await xe(f,{recursive:!0}),await Xe($,Yd(S,{useCorePackage:r}),{encoding:"utf-8"}),l.stopAndLog(),We($n(`
696
696
  ${j.dim("Source generated:")}
697
- ${He(Ut(),S)}
697
+ ${Ue(Ht(),$)}
698
698
 
699
699
  ${j.dim("How to use:")}
700
700
  ${j.underline("https://likec4.dev/tooling/code-generation/model/")}
701
- `).trim(),{padding:1,borderColor:"green",borderStyle:"round"})}catch(i){var s=i,o=!0}finally{var a=eg(c,s,o);a&&await a}}async function rg({languageServices:e,outDir:t,filename:r="likec4-react.mjs"}){const n=Ne(["vite","react"]),c=On();return n.info(`${j.cyan("likec4 app root")} ${j.dim(c)}`),n.info(j.cyan("outDir")+" "+j.dim(t)),{customLogger:n,root:c,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn()},esbuild:{banner:`'use client'
702
- `+Nn.banner,footer:Nn.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!1,copyPublicDir:!1,chunkSizeWarningLimit:In,lib:{entry:"react/likec4.tsx",fileName(s,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/react","likec4/mode\
703
- l","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/,/@likec4\/core.*/],onwarn(s,o){s.code!=="SOURCEMAP_ERROR"&&o(s)}}},plugins:[bn({}),Sn({languageServices:e.languageServices,useOverviewGraph:!1})]}}var Ef=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Sf=e=>{throw TypeError(e)},ng=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Sf("Object expected");var n,c;n=t[Ef("asyncDispose")],n===void 0&&(n=t[Ef("dispose")],c=n),typeof n!=
704
- "function"&&Sf("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},sg=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="SuppressedError",u.error=o,u.suppressed=a,u},c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){
705
- c(i)}if(r)throw t};return s()};async function og({path:e,useDotBin:t,outfile:r,project:n}){var c=[];try{await Tt();const i=Ne("c4:codegen"),u=it(i),l=ng(c,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:m,projectFolder:y}=pn(l,n);n&&i.info(`${j.dim("project")} ${j.green(m)}`),i.info(`${j.dim("format")} ${j.green("react")}`);const _=await l.diagrams(m);if(_.length===0)throw process.exitCode=1,new Error("no views found");_.forEach(v=>{v.hasLayoutDrift&&
706
- i.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(v.id))});let S=ae(l.projectsManager.hasMultipleProjects()?y:l.workspace,"likec4-views.js");if(r&&(S=_n(r)?r:ae(r),Me(r)&&(await wn(r)).isDirectory()))throw new Error(`output file is a directory: ${r}`);const g=We(S);i.info(`${j.dim("outdir")} ${g}`);const p=Ft(S);i.info(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(h))throw i.error(`output file ${r} has extensi\
707
- on "${h}"`),new Error(`output file ${r} must be a .js, .jsx or .mjs`);const f=await rg({languageServices:l,outDir:g,filename:p});await At({...f,logLevel:"warn"});const d=await l.layoutedModel(m),$=ae(g,Ft(S,h)+(h===".mjs"?".d.mts":".d.ts"));await Xe($,Qd(d)),u.stopAndLog(),Ke($n(`
701
+ `).trim(),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var o=c,a=!0}finally{var u=rg(s,o,a);u&&await u}}async function sg({languageServices:e,outDir:t,filename:r="likec4-react.mjs"}){const n=Te(["vite","react"]),i=Nn();return n.info(`${j.cyan("likec4 app root")} ${j.dim(i)}`),n.info(j.cyan("outDir")+" "+j.dim(t)),{customLogger:n,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",resolve:{conditions:["production"],alias:jn()},esbuild:{banner:`'use client'
702
+ `+Tn.banner,footer:Tn.footer,jsx:"transform",jsxDev:!1,jsxSideEffects:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2022",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:t,emptyOutDir:!1,sourcemap:!1,minify:!1,copyPublicDir:!1,chunkSizeWarningLimit:In,lib:{entry:"react/likec4.tsx",fileName(s,o){return r},formats:["es"]},rollupOptions:{output:{compact:!1,exports:"named"},external:["likec4/react","likec4/mode\
703
+ l","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/,/@likec4\/core.*/],onwarn(s,o){s.code!=="SOURCEMAP_ERROR"&&o(s)}}},plugins:[bn({}),Sn({languageServices:e.languageServices,useOverviewGraph:!1})]}}var Sf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Rf=e=>{throw TypeError(e)},og=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Rf("Object expected");var n,i;n=t[Sf("asyncDispose")],n===void 0&&(n=t[Sf("dispose")],i=n),typeof n!=
704
+ "function"&&Rf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push([r]);return t},ag=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=a,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){
705
+ i(u)}if(r)throw t};return s()};async function ig({path:e,useDotBin:t,useCorePackage:r,outfile:n,project:i}){var s=[];try{await Ct();const c=Te("c4:codegen"),l=it(c),m=og(s,await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,i);i&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("react")}`);const S=await m.diagrams(y);if(S.length===0)throw process.exitCode=1,new Error("no views found");S.forEach(w=>{w.
706
+ hasLayoutDrift&&c.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(w.id))});let $=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(n&&($=_n(n)?n:oe(n),He(n)&&(await wn(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const p=qe($);c.info(`${j.dim("outdir")} ${p}`);const h=Ut($);c.info(`${j.dim("filename")} ${h}`);const f=St(h).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(f))throw c.error(`output file ${n}\
707
+ has extension "${f}"`),new Error(`output file ${n} must be a .js, .jsx or .mjs`);const d=await sg({languageServices:m,outDir:p,filename:h});await At({...d,logLevel:"warn"});const g=await m.layoutedModel(y),v=oe(p,Ut($,f)+(f===".mjs"?".d.mts":".d.ts"));await Xe(v,ep(g,{useCorePackage:r})),l.stopAndLog(),We($n(`
708
708
  ${j.dim("Sources generated:")}
709
- ${He(Ut(),S)}
710
- ${He(Ut(),$)}
709
+ ${Ue(Ht(),$)}
710
+ ${Ue(Ht(),v)}
711
711
 
712
712
  ${j.dim("How to use:")}
713
713
  ${j.underline("https://likec4.dev/tooling/code-generation/react/")}
714
- `),{padding:1,borderColor:"green",borderStyle:"round"})}catch(i){var s=i,o=!0}finally{var a=sg(c,s,o);a&&await a}}var Rf=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Af=e=>{throw TypeError(e)},ag=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Af("Object expected");var n,c;n=t[Rf("asyncDispose")],n===void 0&&(n=t[Rf("dispose")],c=n),typeof n!="function"&&Af("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push(
715
- [r]);return t},ig=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,i,u){return u=Error(i),u.name="SuppressedError",u.error=o,u.suppressed=a,u},c=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,i=>(c(i),s()))}catch(i){c(i)}if(r)throw t};return s()};async function cg({project:e,path:t,useDotBin:r,webcomponentPrefix:n="likec4",outfile:c}){var s=[];try{await Tt();
716
- const u=Ne("c4:codegen"),l=it(u),m=ag(s,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,e);e&&u.info(`${j.dim("project")} ${j.green(y)}`),u.info(`${j.dim("format")} ${j.green("webcomponent")}`);const S=await m.diagrams(y);if(!bt(S,1))throw u.warn("no views found"),process.exitCode=1,new Error("no views found");S.forEach(v=>{v.hasLayoutDrift&&u.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(v.
717
- id))});let g=ae(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(c&&(g=_n(c)?c:ae(c),Me(c)&&(await wn(c)).isDirectory()))throw new Error(`output file is a directory: ${c}`);tt.debug(`${j.dim("outfilepath")} ${g}`);const p=Ft(g);tt.debug(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(h!==".js"&&h!==".mjs")throw tt.warn(`output file ${c} has extension "${h}"`),new Error(`output file ${c} must be a .js or .mjs`);const f=await kn();tt.debug(`${j.dim("cre\
718
- ated temp public")} ${f}`);const d=await ts({languageServices:m,outDir:f,filename:p,webcomponentPrefix:n,base:"/"});tt.debug(`${j.dim("vite build webcomponent")}`),await At({...d,logLevel:"warn"});const $=ae(f,p);if(!Me($))throw new Error(`output file not found: ${$}`);await qe(We(g),{recursive:!0}),await Xf($,g),u.info(`${j.dim("generated")} ${g}`),tt.debug(`${j.dim("remove temp public")}`),await Jf(f,{recursive:!0,force:!0}),l.stopAndLog(),Ke($n(`
714
+ `),{padding:1,borderColor:"green",borderStyle:"round"})}catch(c){var o=c,a=!0}finally{var u=ag(s,o,a);u&&await u}}var Af=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Pf=e=>{throw TypeError(e)},cg=(e,t,r)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&Pf("Object expected");var n,i;n=t[Af("asyncDispose")],n===void 0&&(n=t[Af("dispose")],i=n),typeof n!="function"&&Pf("Object not disposable"),i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.push([r,n,t])}else e.push(
715
+ [r]);return t},ug=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,a,u,c){return c=Error(u),c.name="SuppressedError",c.error=o,c.suppressed=a,c},i=o=>t=r?new n(o,t,"An error was suppressed during disposal"):(r=!0,o),s=o=>{for(;o=e.pop();)try{var a=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(a).then(s,u=>(i(u),s()))}catch(u){i(u)}if(r)throw t};return s()};async function lg({project:e,path:t,useDotBin:r,webcomponentPrefix:n="likec4",outfile:i}){var s=[];try{await Ct();
716
+ const c=Te("c4:codegen"),l=it(c),m=cg(s,await Pe.fromWorkspace(t,{logger:"vite",graphviz:r?"binary":"wasm",watch:!1}),!0),{projectId:y,projectFolder:_}=pn(m,e);e&&c.info(`${j.dim("project")} ${j.green(y)}`),c.info(`${j.dim("format")} ${j.green("webcomponent")}`);const S=await m.diagrams(y);if(!bt(S,1))throw c.warn("no views found"),process.exitCode=1,new Error("no views found");S.forEach(v=>{v.hasLayoutDrift&&c.warn(j.yellow("drift detected, manual layout can not be applied, view:")+" "+j.red(v.
717
+ id))});let $=oe(m.projectsManager.hasMultipleProjects()?_:m.workspace,"likec4-views.js");if(i&&($=_n(i)?i:oe(i),He(i)&&(await wn(i)).isDirectory()))throw new Error(`output file is a directory: ${i}`);tt.debug(`${j.dim("outfilepath")} ${$}`);const p=Ut($);tt.debug(`${j.dim("filename")} ${p}`);const h=St(p).toLocaleLowerCase();if(h!==".js"&&h!==".mjs")throw tt.warn(`output file ${i} has extension "${h}"`),new Error(`output file ${i} must be a .js or .mjs`);const f=await On();tt.debug(`${j.dim("cre\
718
+ ated temp public")} ${f}`);const d=await ts({languageServices:m,outDir:f,filename:p,webcomponentPrefix:n,base:"/"});tt.debug(`${j.dim("vite build webcomponent")}`),await At({...d,logLevel:"warn"});const g=oe(f,p);if(!He(g))throw new Error(`output file not found: ${g}`);await xe(qe($),{recursive:!0}),await Yf(g,$),c.info(`${j.dim("generated")} ${$}`),tt.debug(`${j.dim("remove temp public")}`),await Qf(f,{recursive:!0,force:!0}),l.stopAndLog(),We($n(`
719
719
  ${j.dim("Webcomponents generated to:")}
720
- ${He(Ut(),g)}
720
+ ${Ue(Ht(),$)}
721
721
 
722
722
  ${j.dim("Setup and usage instructions:")}
723
723
  ${j.blue("https://likec4.dev/tooling/code-generation/webcomponent/")}
724
- `))}catch(u){var o=u,a=!0}finally{var i=ig(s,o,a);i&&await i}}const ug=e=>e.command({command:"generate <command> [path]",aliases:["codegen","gen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",be).command("react [path]","generate react component to render likec4 view",r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:ct}).option("use-dot",
725
- Re),async r=>{await og({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile})}).command({command:"webcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:ct}).option("webcomponent-prefix",Tn).option("use-dot",Re),handler:async r=>{await cg({project:r.project,useDotBin:r.useDotBin,path:r.
726
- path,outfile:r.outfile,webcomponentPrefix:r.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:ct}).option("use-dot",Re),handler:async r=>{await tg({path:r.path,useDotBin:r.useDotBin,outfile:r.outfile,project:r.project})}}).command({command:"views-data [path]",aliases:["views"],describe:"\
727
- {deprecated} use codegen model",deprecated:!0,builder:r=>r.positional("path",be).option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:ct}).option("use-dot",Re),handler:async r=>{await Mt({format:"views",path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:r=>r.positional("path",be).option("outdir",Ct).option("use-dot",Re),handler:async r=>{await Mt({format:"dot",path:r.path,
728
- useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:r=>r.positional("path",be).option("outdir",Ct).option("use-dot",Re),handler:async r=>{await Mt({format:"d2",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"mermaid [path]",aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:r=>r.positional("path",be).option("outdir",Ct).option("use-dot",Re),handler:async r=>{await Mt({format:"mermaid",useDotBin:r.
729
- useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"plantuml [path]",aliases:["puml"],describe:"generate PlantUML files (.puml)",builder:r=>r.positional("path",be).option("outdir",Ct).option("use-dot",Re),handler:async r=>{await Mt({format:"plantuml",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"<custom> [path]",describe:"run custom generator from likec4 config",builder:r=>r.positional("path",be).option("project",Gt).option("use-dot",Re),handler:async r=>{await _f(
730
- {name:"custom",path:r.path,project:r.project,useDotBin:r.useDotBin})}}).epilog(`${j.bold("Examples:")}
724
+ `))}catch(c){var o=c,a=!0}finally{var u=ug(s,o,a);u&&await u}}const fg=e=>e.command({command:"gen <command> [path]",aliases:["generate","codegen"],describe:"Generate various artifacts from LikeC4 sources",builder:t=>t.positional("path",be).command("react [path]","generate react component to render likec4 view",r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.jsx, .mjs or .js)",normalize:!0,coerce:ct}).option("use-dot",
725
+ Re).option("use-core-package",Yo),async r=>{await ig({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,useCorePackage:r.useCorePackage})}).command({command:"webcomponent [path]",aliases:["wc","webcomp"],describe:"generate js with webcomponents",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.mjs or .js)",normalize:!0,coerce:ct}).option("webcomponent-prefix",kn).option("use-dot",Re),handler:async r=>{
726
+ await lg({project:r.project,useDotBin:r.useDotBin,path:r.path,outfile:r.outfile,webcomponentPrefix:r.webcomponentPrefix})}}).command({command:"model [path]",aliases:["ts"],describe:"generate LikeC4Model (.ts)",builder:r=>r.positional("path",be).option("project",Gt).option("outfile",{alias:"o",type:"string",desc:"<file> path to output file (.ts)",normalize:!0,coerce:ct}).option("use-dot",Re).option("use-core-package",Yo),handler:async r=>{await ng({path:r.path,useDotBin:r.useDotBin,useCorePackage:r.
727
+ useCorePackage,outfile:r.outfile,project:r.project})}}).command({command:"views-data [path]",aliases:["views"],describe:"{deprecated} use codegen model",deprecated:!0,builder:r=>r.positional("path",be).option("outfile",{alias:"o",type:"string",desc:"<file> output .ts file",normalize:!0,coerce:ct}).option("use-dot",Re),handler:async r=>{await xt({format:"views",path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).command({command:"dot [path]",describe:"generate graphviz files (.dot)",builder:r=>r.
728
+ positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"dot",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"d2 [path]",describe:"generate D2 files (.d2)",builder:r=>r.positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"d2",path:r.path,useDotBin:r.useDotBin,outdir:r.outdir})}}).command({command:"mermaid [path]",aliases:["mmd"],describe:"generate Mermaid files (.mmd)",builder:r=>r.positional(
729
+ "path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"mermaid",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"plantuml [path]",aliases:["puml"],describe:"generate PlantUML files (.puml)",builder:r=>r.positional("path",be).option("outdir",zt).option("use-dot",Re),handler:async r=>{await xt({format:"plantuml",useDotBin:r.useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"<custom> [path]",describe:"run custom generator from likec\
730
+ 4 config",builder:r=>r.positional("path",be).option("project",Gt).option("use-dot",Re),handler:async r=>{await wf({name:"custom",path:r.path,project:r.project,useDotBin:r.useDotBin})}}).epilog(`${j.bold("Examples:")}
731
731
  likec4 gen react -o dist/likec4-views.mjs ./src/likec4
732
732
  likec4 gen model -o likec4-model.ts
733
733
  likec4 gen ts --outfile likec4-model.ts
@@ -735,11 +735,12 @@ useDotBin,path:r.path,outdir:r.outdir})}}).command({command:"plantuml [path]",al
735
735
  likec4 gen mmd --outdir assets/
736
736
  likec4 gen plantuml --outdir assets/
737
737
  likec4 gen dot -o out .
738
- `),handler:async t=>{await _f({name:t.command,path:t.path,project:t.project,useDotBin:t.useDotBin})}});async function lg({path:e,useDotBin:t,outfile:r}){const n=Ne("c4:export"),c=it(n),s=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1});s.ensureSingleProject();const o=await s.layoutedModel();St(r)!==".json"&&(r=r+".json"),await qe(We(r),{recursive:!0});const a=JSON.stringify(o.$model,null,2);await Xe(r,a),n.info(`${j.dim("generated")} ${He(process.cwd(),r)}`),c.stopAndLog(
739
- "\u2713 export in ")}const fg=e=>e.command({command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${j.bold("Usage:")} $0 export <format> [path]`).positional("path",be).command({command:"png [path]",describe:"export views to PNG",builder:r=>r.option("output",Ct).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"flatten all images in output directory ignoring sources structure"}).
740
- option("use-dot",Re).options({filter:{alias:"f",array:!0,string:!0,desc:`include views with ids matching given patterns
741
- multiple patterns are combined with OR`},ignore:{boolean:!0,alias:"i",desc:"continue if export fails for some views"},timeout:{type:"number",alias:"t",desc:"timeout for playwright (in seconds)",default:10},"max-attempts":{type:"number",desc:"max attempts to export failing view, 1 means no retry",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"},"chromium-sandbox":{boolean:!0,desc:`enable/disable chromium sandbox
742
- see Playwright docs`,default:!1}}).epilog(`${j.bold("Examples:")}
738
+ `),handler:async t=>{await wf({name:t.command,path:t.path,project:t.project,useDotBin:t.useDotBin})}});async function dg({path:e,useDotBin:t,outfile:r}){const n=Te("c4:export"),i=it(n),s=await Pe.fromWorkspace(e,{logger:"vite",graphviz:t?"binary":"wasm",watch:!1});s.ensureSingleProject();const o=await s.layoutedModel();St(r)!==".json"&&(r=r+".json"),await xe(qe(r),{recursive:!0});const a=JSON.stringify(o.$model,null,2);await Xe(r,a),n.info(`${j.dim("generated")} ${Ue(process.cwd(),r)}`),i.stopAndLog(
739
+ "\u2713 export in ")}const pg=e=>e.command({command:"export <format> [path]",describe:"Export to images or JSON",builder:t=>t.usage(`${j.bold("Usage:")} $0 export <format> [path]`).positional("path",be).command({command:"png [path]",describe:"export views to PNG",builder:r=>r.options({output:{alias:["o","outdir"],type:"string",desc:"output directory, if not specified, images are saved next to sources",normalize:!0,nargs:1,coerce:oe},theme:{choices:["light","dark"],desc:"color-scheme to use, defa\
740
+ ults to light",conflicts:["dark","light"],nargs:1},dark:{type:"boolean",desc:"use dark theme, shortcut for --theme=dark",conflicts:["theme","light"]},light:{type:"boolean",desc:"use light theme, shortcut for --theme=light",conflicts:["theme","dark"]},"use-dot":Re,seq:{boolean:!0,alias:["sequence"],type:"boolean",desc:"use sequence layout for dynamic views"},flat:{alias:["flatten"],boolean:!0,type:"boolean",desc:"flatten all images in output directory ignoring sources structure"},filter:{alias:"f",
741
+ array:!0,string:!0,desc:`include views with ids matching given patterns
742
+ multiple patterns are combined with OR`},ignore:{boolean:!0,alias:"i",desc:"continue if export fails for some views"},timeout:{type:"number",alias:"t",desc:"timeout for playwright (in seconds)",default:15,nargs:1},"max-attempts":{type:"number",desc:"max attempts to export failing view, 1 means no retry",default:3,nargs:1},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server",nargs:1},"chromium-sandbox":{boolean:!0,desc:"enable chromium sandbox (see Playwright docs\
743
+ )",default:!1}}).epilog(`${j.bold("Examples:")}
743
744
  ${j.green("$0 export png")}
744
745
  ${j.gray("Search for likec4 files in current directory and output PNG next to sources")}
745
746
 
@@ -748,14 +749,17 @@ see Playwright docs`,default:!1}}).epilog(`${j.bold("Examples:")}
748
749
 
749
750
  ${j.green('$0 export png -f "team1*" -f "team2*" --flat -o ./png src/likec4')}
750
751
  ${j.gray("Export views matching team1* or team2* only")}
751
- `),handler:async r=>{Rn(r.timeout>=1,"timeout must be >= 1"),Rn(r["max-attempts"]>=1,"max-attempts must be >= 1"),await Tt(),await xa({path:r.path,useDotBin:r.useDotBin,output:r.output,timeoutMs:r.timeout*1e3,maxAttempts:r.maxAttempts,ignore:r.ignore===!0,outputType:r.flat?"flat":"relative",serverUrl:r.serverUrl,theme:r.theme??"light",filter:r.filter,chromiumSandbox:r["chromium-sandbox"]})}}).command({command:"json [path]",describe:"export model to JSON",builder:r=>r.option("outfile",{alias:"o",
752
- type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:ae}).option("use-dot",Re).epilog(`${j.bold("Examples:")}
752
+
753
+ ${j.green('$0 export png -f "use-case*" --sequence src/likec4')}
754
+ ${j.gray("Export views matching use-case* using sequence layout")}
755
+ `),handler:async r=>{Rn(r.timeout>=1,"timeout must be >= 1"),Rn(r["max-attempts"]>=1,"max-attempts must be >= 1"),await Ct();const n=r.theme??(r.dark?"dark":"light");await Ma({path:r.path,useDotBin:r["use-dot"],output:r.output,timeoutMs:r.timeout*1e3,maxAttempts:r.maxAttempts,ignore:r.ignore===!0,outputType:r.flat?"flat":"relative",serverUrl:r.serverUrl,theme:n,filter:r.filter,sequence:r.seq,chromiumSandbox:r["chromium-sandbox"]})}}).command({command:"json [path]",describe:"export model to JSON",
756
+ builder:r=>r.option("outfile",{alias:"o",type:"string",desc:"<file> output .json file",default:"likec4.json",normalize:!0,coerce:oe}).option("use-dot",Re).epilog(`${j.bold("Examples:")}
753
757
  ${j.green("$0 export json")}
754
758
  ${j.gray("Search for likec4 files in current directory and output JSON to likec4.json")}
755
759
 
756
760
  ${j.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
757
761
  ${j.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
758
- `),handler:async r=>{await lg({path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).updateStrings({"Commands:":j.bold("Formats:")}),handler:()=>{}}),dg=e=>e.command({command:"mcp [path]",aliases:[],describe:"Start MCP server",builder:t=>t.usage(`${j.bold("Usage:")} $0 mcp [path]`).positional("path",be).option("stdio",{boolean:!0,description:"use stdio transport",conflicts:["http","port"]}).option("http",{boolean:!0,description:"use streamable http transport (use 33335 port by default)",conflicts:"\
762
+ `),handler:async r=>{await dg({path:r.path,useDotBin:r.useDotBin,outfile:r.outfile})}}).updateStrings({"Commands:":j.bold("Formats:")}),handler:()=>{}}),hg=e=>e.command({command:"mcp [path]",aliases:[],describe:"Start MCP server",builder:t=>t.usage(`${j.bold("Usage:")} $0 mcp [path]`).positional("path",be).option("stdio",{boolean:!0,description:"use stdio transport",conflicts:["http","port"]}).option("http",{boolean:!0,description:"use streamable http transport (use 33335 port by default)",conflicts:"\
759
763
  stdio"}).option("port",{alias:"p",number:!0,description:"enables http transport and sets the port",conflicts:"stdio"}).option("use-dot",Re).epilog(`${j.bold("Examples:")}
760
764
  ${j.green("$0 mcp")}
761
765
  ${j.gray("Start MCP with default stdio transport")}
@@ -763,7 +767,7 @@ ${j.green("$0 mcp --http ./src")}
763
767
  ${j.gray("Start MCP with streamable http transport on port 33335 at ./src folder")}
764
768
  ${j.green("$0 mcp -p 1234")}
765
769
  ${j.gray("Start MCP with streamable http transport on port 1234")}
766
- `),handler:async t=>{t.http||t.port?await pg(t.path,t.useDot,t.port):await hg(t.path,t.useDot)}});async function pg(e,t,r=33335){await Pe.fromWorkspace(e,{mcp:{port:r},watch:!0,graphviz:t?"binary":"wasm"}),Ke([j.green("LikeC4 MCP served at:"),`
770
+ `),handler:async t=>{t.http||t.port?await mg(t.path,t.useDot,t.port):await yg(t.path,t.useDot)}});async function mg(e,t,r=33335){await Pe.fromWorkspace(e,{mcp:{port:r},watch:!0,graphviz:t?"binary":"wasm"}),We([j.green("LikeC4 MCP served at:"),`
767
771
  {
768
772
  "mcpServers": {
769
773
  "likec4": {
@@ -775,13 +779,13 @@ ${j.green("$0 mcp -p 1234")}
775
779
  ${j.dim("Documentation:")}
776
780
  ${j.underline("https://likec4.dev/tooling/mcp/#using-extension")}
777
781
  `].join(`
778
- `))}async function hg(e,t){await Pe.fromWorkspace(e,{mcp:"stdio",watch:!0,graphviz:t?"binary":"wasm"})}async function mg(e){const{isDev:t,...r}=await es({...e,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await ss({port:Yt(62001,62010)}),c=e?.open??!1;return await rd({...r,mode:"production",preview:{host:e.listen??"127.0.0.1",allowedHosts:!0,port:n,open:c}})}async function yg({path:e,output:t,base:r,listen:n}){const c=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),s=await mg({base:r,languageServices:c,
779
- outputDir:t,open:!Ue(),listen:n});Na(s)}const gg=e=>e.command({command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
780
- if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"},listen:{alias:"l",type:"string",desc:"ip address of the network interface to listen on"}}).coerce(["path","output"],ct).default("path",ct("."),".").default("listen","127.0.0.1","localhost"),handler:async t=>{await yg(t)}});async function $g({path:e,useDotBin:t,webcomponentPrefix:r,
781
- title:n,useHashHistory:c,useOverview:s=!1,base:o,listen:a}){process.env.NODE_ENV="development";const i=await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",watch:!0}),u=await Vt(Et(zt(),".likec4-assets-")),l=await ja({buildWebcomponent:!0,hmr:!0,base:o,webcomponentPrefix:r,title:n,languageServices:i,useHashHistory:c,useOverviewGraph:s,likec4AssetsDir:u,listen:a});if(l.config.logger.clearScreen("info"),Na(l),!s)return;const m=await i.diagrams();if(bt(m,1)){const y=Ne("c4:export"),_=Ta(l);if(!_){y.
782
- error("no preview server url");return}y.info(j.cyan("wait 5sec before generating previews")),await Jo(5e3);try{await qa({serverUrl:_,logger:y,views:m,theme:"light",output:u,outputType:"flat"}),await Jo(1e3),y.info(j.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(S){y.error(j.red("Failed to generate previews")),y.error(S)}}else l.config.logger.warn("no views found, no previews generated")}const vg=e=>e.command({command:"start [path]",aliases:["serve",
783
- "dev"],describe:"Start local dev server to preview LikeC4 views",builder:t=>t.positional("path",be).option("base",Zo).option("webcomponent-prefix",Tn).option("title",Qo).option("use-hash-history",Yo).option("use-dot",Re).option("listen",wd),handler:async t=>{await Tt(),await $g({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],title:t.title,useHashHistory:t["use-hash-history"],listen:t.listen})}});async function _g({path:e,ignoreLayout:t}){const r=await Pe.
784
- fromWorkspace(e,{logger:"vite",watch:!1}),n=Ne("c4:views");let c=!0;return c=await s(r)&&c,c=(t||await o(r,n))&&c,c?0:Fo(1);function s(a){return a.getErrors().length===0}async function o(a,i){const u=await a.diagrams();let l=!1;for(const m of u)m.hasLayoutDrift===!0&&(l=!0,i.error(j.red(`Layout drift detected on view '${m.id}' at ${ae(e,m.relativePath??".")}`)));return!l}}const wg=e=>e.command({command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional(
785
- "path",be).option("ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await _g({path:t.path,ignoreLayout:t["ignore-layout"]})}});Mo({sinks:{console:Ho()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:Bf?"debug":"info"}]});async function bg(){!Ue()&&Fy(),await ko(Kf(Wf(Ff)),vg,Rp,ug,fg,gg,wg,dg,Gy,e=>e.command({command:"completion",describe:"Generate completion script",handler:()=>{e.showCompletionScript()}})).
786
- scriptName("likec4").usage("Usage: $0 <command>").version(at).alias("v","version").alias("h","help").help("help").option("verbose",{type:"boolean",default:!1,describe:"verbose logging",global:!0}).demandCommand(1,"Please run with valid command").recommendCommands().showHelpOnFail(!0).updateStrings({"Options:":j.bold("Options:"),"Positionals:":j.bold("Arguments:"),"Commands:":j.bold("Commands:"),"Examples:":j.bold("Examples:")}).wrap(Do(Vf.columns-20,{min:80,max:120})).middleware(e=>{e.verbose&&Mo(
787
- {sinks:{console:Ho()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]})}).parseAsync()}bg().catch(()=>{Fo(1)}),process.on("unhandledRejection",e=>{console.error("Unhandled rejection",e)});
782
+ `))}async function yg(e,t){await Pe.fromWorkspace(e,{mcp:"stdio",watch:!0,graphviz:t?"binary":"wasm"})}async function gg(e){const{isDev:t,...r}=await es({...e,likec4AssetsDir:"",webcomponentPrefix:void 0}),n=await ss({port:Yt(62001,62010)}),i=e?.open??!1;return await sd({...r,mode:"production",preview:{host:e.listen??"127.0.0.1",allowedHosts:!0,port:n,open:i}})}async function $g({path:e,output:t,base:r,listen:n}){const i=await Pe.fromWorkspace(e,{logger:"vite",watch:!1}),s=await gg({base:r,languageServices:i,
783
+ outputDir:t,open:!Fe(),listen:n});Na(s)}const vg=e=>e.command({command:"preview [path]",describe:"Start local server to preview production build",builder:t=>t.positional("path",{type:"string",desc:`Directory with LikeC4 source files
784
+ if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"},listen:{alias:"l",type:"string",desc:"ip address of the network interface to listen on"}}).coerce(["path","output"],ct).default("path",ct("."),".").default("listen","127.0.0.1","localhost"),handler:async t=>{await $g(t)}});async function _g({path:e,useDotBin:t,webcomponentPrefix:r,
785
+ title:n,useHashHistory:i,useOverview:s=!1,base:o,listen:a}){process.env.NODE_ENV="development";const u=await Pe.fromWorkspace(e,{graphviz:t?"binary":"wasm",watch:!0}),c=await Ft(Et(Vt(),".likec4-assets-")),l=await La({buildWebcomponent:!0,hmr:!0,base:o,webcomponentPrefix:r,title:n,languageServices:u,useHashHistory:i,useOverviewGraph:s,likec4AssetsDir:c,listen:a});if(l.config.logger.clearScreen("info"),Na(l),!s)return;const m=await u.diagrams();if(bt(m,1)){const y=Te("c4:export"),_=Ta(l);if(!_){y.
786
+ error("no preview server url");return}y.info(j.cyan("wait 5sec before generating previews")),await Jo(5e3);try{await xa({serverUrl:_,logger:y,views:m,theme:"light",output:c,outputType:"flat"}),await Jo(1e3),y.info(j.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(S){y.error(j.red("Failed to generate previews")),y.error(S)}}else l.config.logger.warn("no views found, no previews generated")}const wg=e=>e.command({command:"start [path]",aliases:["serve",
787
+ "dev"],describe:"Start local dev server to preview LikeC4 views",builder:t=>t.positional("path",be).option("base",ea).option("webcomponent-prefix",kn).option("title",Zo).option("use-hash-history",Qo).option("use-dot",Re).option("listen",Ed),handler:async t=>{await Ct(),await _g({path:t.path,useDotBin:t["use-dot"],base:t.base,webcomponentPrefix:t["webcomponent-prefix"],title:t.title,useHashHistory:t["use-hash-history"],listen:t.listen})}});async function bg({path:e,ignoreLayout:t}){const r=await Pe.
788
+ fromWorkspace(e,{logger:"vite",watch:!1}),n=Te("c4:views");let i=s(r);return i=i&&(t||await o(r,n)),i?0:Ho(1);function s(a){return a.getErrors().length===0}async function o(a,u){const c=await a.diagrams();let l=!1;for(const m of c)m.hasLayoutDrift===!0&&(l=!0,u.error(j.red(`Layout drift detected on view '${m.id}' at ${oe(e,m.sourcePath??".")}`)));return!l}}const Eg=e=>e.command({command:"validate [path]",aliases:[],describe:"Validate model syntax and manual layout",builder:t=>t.positional("path",
789
+ be).option("ignore-layout",{alias:["skip-layout"],boolean:!0,default:!1,description:"do not validate layout of views"}),handler:async t=>{await bg({path:t.path,ignoreLayout:t["ignore-layout"]})}});qo({sinks:{console:xo()},loggers:[{category:"likec4",sinks:["console"],lowestLevel:Wf?"debug":"info"}]});async function Sg(){!Fe()&&zy(),await Fo(Xf(Jf(Vf)),wg,Pp,fg,pg,vg,Eg,hg,Ky,e=>e.command({command:"completion",describe:"Generate completion script",handler:()=>{e.showCompletionScript()}})).scriptName(
790
+ "likec4").usage("Usage: $0 <command>").version(at).alias("v","version").alias("h","help").help("help").option("verbose",{type:"boolean",default:!1,describe:"verbose logging",global:!0}).demandCommand(1,"Please run with valid command").recommendCommands().showHelpOnFail(!0).updateStrings({"Options:":j.bold("Options:"),"Positionals:":j.bold("Arguments:"),"Commands:":j.bold("Commands:"),"Examples:":j.bold("Examples:")}).wrap(jo(zf.columns-10,{min:80,max:150})).middleware(e=>{e.verbose&&qo({sinks:{console:xo()},
791
+ loggers:[{category:"likec4",sinks:["console"],lowestLevel:"debug"}]})}).parseAsync()}Sg().catch(()=>{Ho(1)}),process.on("unhandledRejection",e=>{console.error("Unhandled rejection",e)});