gant-core 0.1.52 → 0.2.1

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 (52) hide show
  1. package/.prettierrc.json +10 -0
  2. package/lib/cli/config/defineConfig.js +2 -0
  3. package/lib/cli/config/index.js +2 -0
  4. package/lib/cli/copyfiles/index.js +2 -0
  5. package/lib/cli/create/config/index.js +10 -0
  6. package/lib/cli/create/index.js +2 -0
  7. package/lib/cli/create/module/index.js +10 -0
  8. package/lib/cli/i18n/index.js +9 -0
  9. package/lib/cli/i18n/utils.js +2 -0
  10. package/lib/cli/index.js +1 -90275
  11. package/lib/cli/ms/index.js +23 -0
  12. package/lib/cli/msmain.js +65 -0
  13. package/lib/cli/routes/index.js +2 -0
  14. package/lib/cli/template/msentry.txt +5 -0
  15. package/lib/cli/template/tsconfig.react.template.json +1 -1
  16. package/lib/cli/template/tsconfig.vue.template.json +1 -1
  17. package/lib/cli/tsconfig/index.js +2 -0
  18. package/lib/cli/utils/getJavascriptfile.js +10 -0
  19. package/lib/cli/utils/index.js +2 -0
  20. package/lib/cli/webpack/Webpack.js +2 -0
  21. package/lib/cli/webpack/config/analyzer.config.js +2 -0
  22. package/lib/cli/webpack/config/cssRules.js +2 -0
  23. package/lib/cli/webpack/config/default.config.js +2 -0
  24. package/lib/cli/webpack/config/development.config.js +2 -0
  25. package/lib/cli/webpack/config/index.js +2 -0
  26. package/lib/cli/webpack/config/production.config.js +14 -0
  27. package/lib/cli/webpack/plugins/copy.js +2 -0
  28. package/lib/cli/webpack/plugins/index.js +2 -0
  29. package/lib/core/cache/index.js +2 -0
  30. package/lib/core/cache/index.js.map +1 -0
  31. package/lib/core/event/index.js +2 -0
  32. package/lib/core/event/index.js.map +1 -0
  33. package/lib/core/i18n/index.js +2 -0
  34. package/lib/core/i18n/index.js.map +1 -0
  35. package/lib/core/index.js +2 -0
  36. package/lib/core/index.js.map +1 -0
  37. package/lib/core/microservices/index.js +2 -0
  38. package/lib/core/microservices/index.js.map +1 -0
  39. package/lib/core/request/index.js +2 -0
  40. package/lib/core/request/index.js.map +1 -0
  41. package/lib/core/store/index.js +2 -0
  42. package/lib/core/store/index.js.map +1 -0
  43. package/lib/core/theme/index.js +2 -0
  44. package/lib/core/theme/index.js.map +1 -0
  45. package/lib/core/utils/index.js +2 -0
  46. package/lib/core/utils/index.js.map +1 -0
  47. package/lib/{index.d.ts → types/index.d.ts} +25 -10
  48. package/package.json +7 -4
  49. package/rollup.config.js +31 -14
  50. package/lib/cli/index.js.map +0 -1
  51. package/lib/index.js +0 -6423
  52. package/lib/index.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ "use strict";var e=require("zlib"),t=require("../plugins/copy.js"),r=require("path"),n=require("../../utils/index.js"),o=require("mini-css-extract-plugin"),a=require("css-minimizer-webpack-plugin"),s=require("terser-webpack-plugin"),i=require("../../create/config/index.js"),c=require("crypto"),u=require("../../config/index.js"),l={},d={},f={};Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var m=e=>{let t,r=!1;return()=>(r||(t=e(),r=!0,e=void 0),t)};f.default=m;var p,h,y,g={};function v(){if(y)return g;y=1;const e=function(){if(h)return p;h=1;class e{static getOperator(e,t){return"left"===e?t?">":">=":t?"<":"<="}static formatRight(t,r,n){return!1===r?e.formatLeft(t,!r,!n):`should be ${e.getOperator("right",n)} ${t}`}static formatLeft(t,r,n){return!1===r?e.formatRight(t,!r,!n):`should be ${e.getOperator("left",n)} ${t}`}static formatRange(t,r,n,o,a){let s="should be";return s+=` ${e.getOperator(a?"left":"right",a?n:!n)} ${t} `,s+=a?"and":"or",s+=` ${e.getOperator(a?"right":"left",a?o:!o)} ${r}`,s}static getRangeValue(e,t){let r=t?1/0:-1/0,n=-1;const o=t?([e])=>e<=r:([e])=>e>=r;for(let t=0;t<e.length;t++)o(e[t])&&([r]=e[t],n=t);return n>-1?e[n]:[1/0,!0]}constructor(){this._left=[],this._right=[]}left(e,t=!1){this._left.push([e,t])}right(e,t=!1){this._right.push([e,t])}format(t=!0){const[r,n]=e.getRangeValue(this._left,t),[o,a]=e.getRangeValue(this._right,!t);if(!Number.isFinite(r)&&!Number.isFinite(o))return"";const s=n?r+1:r;return s===(a?o-1:o)?`should be ${t?"":"!"}= ${s}`:Number.isFinite(r)&&!Number.isFinite(o)?e.formatLeft(r,t,n):!Number.isFinite(r)&&Number.isFinite(o)?e.formatRight(o,t,a):e.formatRange(r,o,n,a,t)}}return p=e}();return g.stringHints=function(e,t){const r=[];let n="string";const o={...e};if(!t){const e=o.minLength,t=o.formatMinimum;o.minLength=o.maxLength,o.maxLength=e,o.formatMinimum=o.formatMaximum,o.formatMaximum=t}if("number"==typeof o.minLength)if(1===o.minLength)n="non-empty string";else{const e=Math.max(o.minLength-1,0);r.push(`should be longer than ${e} character${e>1?"s":""}`)}if("number"==typeof o.maxLength)if(0===o.maxLength)n="empty string";else{const e=o.maxLength+1;r.push(`should be shorter than ${e} character${e>1?"s":""}`)}return o.pattern&&r.push(`should${t?"":" not"} match pattern ${JSON.stringify(o.pattern)}`),o.format&&r.push(`should${t?"":" not"} match format ${JSON.stringify(o.format)}`),o.formatMinimum&&r.push(`should be ${o.formatExclusiveMinimum?">":">="} ${JSON.stringify(o.formatMinimum)}`),o.formatMaximum&&r.push(`should be ${o.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(o.formatMaximum)}`),[n].concat(r)},g.numberHints=function(t,r){const n=["integer"===t.type?"integer":"number"],o=new e;"number"==typeof t.minimum&&o.left(t.minimum),"number"==typeof t.exclusiveMinimum&&o.left(t.exclusiveMinimum,!0),"number"==typeof t.maximum&&o.right(t.maximum),"number"==typeof t.exclusiveMaximum&&o.right(t.exclusiveMaximum,!0);const a=o.format(r);return a&&n.push(a),"number"==typeof t.multipleOf&&n.push(`should${r?"":" not"} be multiple of ${t.multipleOf}`),n},g}Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var $,_=($=f)&&$.__esModule?$:{default:$};const b={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function w(e,t){const r=e.reduce(((e,r)=>Math.max(e,t(r))),0);return e.filter((e=>t(e)===r))}function P(e,t){let r=e.length-1;const n=t=>0!==e[r].schemaPath.indexOf(t);for(;r>-1&&!t.every(n);)if("anyOf"===e[r].keyword||"oneOf"===e[r].keyword){const t=S(e[r]),n=P(e.slice(0,r),t.concat(e[r].schemaPath));r=n-1}else r-=1;return r+1}function S(e){const{schema:t}=e;return Array.isArray(t)?t.map((({$ref:e})=>e)).filter((e=>e)):[]}function E(e,t){return e.replace(/\n(?!$)/g,`\n${t}`)}function j(e){return!!e.not}function x(e){return j(e)?x(e.not):e}function k(e){const t=x(e);return N(t)||C(t)||T(t)||D(t)||R(t)}function O(e){return"object"==typeof e&&null!==e}function N(e){return"number"===e.type||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||void 0!==e.multipleOf}function C(e){return"integer"===e.type||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||void 0!==e.multipleOf}function T(e){return"string"===e.type||void 0!==e.minLength||void 0!==e.maxLength||void 0!==e.pattern||void 0!==e.format||void 0!==e.formatMinimum||void 0!==e.formatMaximum}function R(e){return"boolean"===e.type}function I(e){return"array"===e.type||"number"==typeof e.minItems||"number"==typeof e.maxItems||void 0!==e.uniqueItems||void 0!==e.items||void 0!==e.additionalItems||void 0!==e.contains}function M(e){return"object"===e.type||void 0!==e.minProperties||void 0!==e.maxProperties||void 0!==e.required||void 0!==e.properties||void 0!==e.patternProperties||void 0!==e.additionalProperties||void 0!==e.dependencies||void 0!==e.propertyNames||void 0!==e.patternRequired}function D(e){return"null"===e.type}function A(e){if(!e)return"";if(!e.type){if(N(e)||C(e))return" | should be any non-number";if(T(e))return" | should be any non-string";if(I(e))return" | should be any non-array";if(M(e))return" | should be any non-object"}return""}function V(e){return e.length>0?`(${e.join(", ")})`:""}const z=(0,_.default)((()=>v()));function F(e,t){if(N(e)||C(e)){return z().numberHints(e,t)}if(T(e)){return z().stringHints(e,t)}return[]}let q=class extends Error{constructor(e,t,r={}){let n,o;if(super(),this.name="ValidationError",this.errors=e,this.schema=t,t.title&&(!r.name||!r.baseDataPath)){const e=t.title.match(/^(.+) (.+)$/);e&&(r.name||([,n]=e),r.baseDataPath||([,,o]=e))}this.headerName=r.name||n||"Object",this.baseDataPath=r.baseDataPath||o||"configuration",this.postFormatter=r.postFormatter||null;const a=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${function(e){return/^[aeiou]/i.test(e)?"an":"a"}(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${a}${this.formatValidationErrors(e)}`,Error.captureStackTrace(this,this.constructor)}getSchemaPart(e){const t=e.split("/");let r=this.schema;for(let e=1;e<t.length;e++){const n=r[t[e]];if(!n)break;r=n}return r}formatSchema(e,t=!0,r=[]){let n=t;const o=(t,o)=>o?r.includes(t)?"(recursive)":this.formatSchema(t,n,r.concat(e)):this.formatSchema(t,n,r);if(j(e)&&!M(e)){if(k(e.not))return n=!t,o(e.not);const r=!e.not.not;return n=!t,r?(t?"":"non ")+o(e.not):o(e.not)}if(e.instanceof){const{instanceof:t}=e;return(Array.isArray(t)?t:[t]).map((e=>"Function"===e?"function":e)).join(" | ")}if(e.enum){return`${e.enum.map((t=>null===t&&e.undefinedAsNull?`${JSON.stringify(t)} | undefined`:JSON.stringify(t))).join(" | ")}`}if(void 0!==e.const)return JSON.stringify(e.const);if(e.oneOf)return e.oneOf.map((e=>o(e,!0))).join(" | ");if(e.anyOf)return e.anyOf.map((e=>o(e,!0))).join(" | ");if(e.allOf)return e.allOf.map((e=>o(e,!0))).join(" & ");if(e.if){const{if:t,then:r,else:n}=e;return`${t?`if ${o(t)}`:""}${r?` then ${o(r)}`:""}${n?` else ${o(n)}`:""}`}if(e.$ref)return o(this.getSchemaPart(e.$ref),!0);if(N(e)||C(e)){const[r,...n]=F(e,t),o=`${r}${n.length>0?` ${V(n)}`:""}`;return t?o:n.length>0?`non-${r} | ${o}`:`non-${r}`}if(T(e)){const[r,...n]=F(e,t),o=`${r}${n.length>0?` ${V(n)}`:""}`;return t?o:"string"===o?"non-string":`non-string | ${o}`}if(R(e))return(t?"":"non-")+"boolean";if(I(e)){n=!0;const t=[];"number"==typeof e.minItems&&t.push(`should not have fewer than ${e.minItems} item${e.minItems>1?"s":""}`),"number"==typeof e.maxItems&&t.push(`should not have more than ${e.maxItems} item${e.maxItems>1?"s":""}`),e.uniqueItems&&t.push("should not have duplicate items");const r=void 0===e.additionalItems||Boolean(e.additionalItems);let a="";return e.items?Array.isArray(e.items)&&e.items.length>0?(a=`${e.items.map((e=>o(e))).join(", ")}`,r&&e.additionalItems&&O(e.additionalItems)&&Object.keys(e.additionalItems).length>0&&t.push(`additional items should be ${o(e.additionalItems)}`)):a=e.items&&Object.keys(e.items).length>0?`${o(e.items)}`:"any":a="any",e.contains&&Object.keys(e.contains).length>0&&t.push(`should contains at least one ${this.formatSchema(e.contains)} item`),`[${a}${r?", ...":""}]${t.length>0?` (${t.join(", ")})`:""}`}if(M(e)){n=!0;const t=[];if("number"==typeof e.minProperties&&t.push(`should not have fewer than ${e.minProperties} ${e.minProperties>1?"properties":"property"}`),"number"==typeof e.maxProperties&&t.push(`should not have more than ${e.maxProperties} ${e.minProperties&&e.minProperties>1?"properties":"property"}`),e.patternProperties&&Object.keys(e.patternProperties).length>0){const r=Object.keys(e.patternProperties);t.push(`additional property names should match pattern${r.length>1?"s":""} ${r.map((e=>JSON.stringify(e))).join(" | ")}`)}const r=e.properties?Object.keys(e.properties):[],a=e.required?e.required:[],s=[...new Set([].concat(a).concat(r))].map((e=>`${e}${a.includes(e)?"":"?"}`)).concat(void 0===e.additionalProperties||Boolean(e.additionalProperties)?e.additionalProperties&&O(e.additionalProperties)?[`<key>: ${o(e.additionalProperties)}`]:["…"]:[]).join(", "),{dependencies:i,propertyNames:c,patternRequired:u}=e;return i&&Object.keys(i).forEach((e=>{const r=i[e];Array.isArray(r)?t.push(`should have ${r.length>1?"properties":"property"} ${r.map((e=>`'${e}'`)).join(", ")} when property '${e}' is present`):t.push(`should be valid according to the schema ${o(r)} when property '${e}' is present`)})),c&&Object.keys(c).length>0&&t.push(`each property name should match format ${JSON.stringify(e.propertyNames.format)}`),u&&u.length>0&&t.push(`should have property matching pattern ${u.map((e=>JSON.stringify(e)))}`),`object {${s?` ${s} `:""}}${t.length>0?` (${t.join(", ")})`:""}`}return D(e)?(t?"":"non-")+"null":Array.isArray(e.type)?`${e.type.join(" | ")}`:JSON.stringify(e,null,2)}getSchemaPartText(e,t,r=!1,n=!0){if(!e)return"";if(Array.isArray(t))for(let r=0;r<t.length;r++){const n=e[t[r]];if(!n)break;e=n}for(;e.$ref;)e=this.getSchemaPart(e.$ref);let o=`${this.formatSchema(e,n)}${r?".":""}`;return e.description&&(o+=`\n-> ${e.description}`),e.link&&(o+=`\n-> Read more at ${e.link}`),o}getSchemaPartDescription(e){if(!e)return"";for(;e.$ref;)e=this.getSchemaPart(e.$ref);let t="";return e.description&&(t+=`\n-> ${e.description}`),e.link&&(t+=`\n-> Read more at ${e.link}`),t}formatValidationError(e){const{keyword:t,instancePath:r}=e,n=r.split("/").reduce(((e,t)=>(t.length>0&&(/^-?\d+$/.test(t)?e.push(`[${t}]`):/^\[/.test(t)?e.push(t):e.push(`.${t}`)),e)),[]).join(""),o=`${this.baseDataPath}${n}`;switch(t){case"type":{const{parentSchema:t,params:r}=e;switch(r.type){case"number":case"string":case"boolean":case"null":return`${o} should be a ${this.getSchemaPartText(t,!1,!0)}`;case"integer":return`${o} should be an ${this.getSchemaPartText(t,!1,!0)}`;case"array":return`${o} should be an array:\n${this.getSchemaPartText(t)}`;case"object":return`${o} should be an object:\n${this.getSchemaPartText(t)}`;default:return`${o} should be:\n${this.getSchemaPartText(t)}`}}case"instanceof":{const{parentSchema:t}=e;return`${o} should be an instance of ${this.getSchemaPartText(t,!1,!0)}`}case"pattern":{const{params:t,parentSchema:r}=e,{pattern:n}=t;return`${o} should match pattern ${JSON.stringify(n)}${A(r)}.${this.getSchemaPartDescription(r)}`}case"format":{const{params:t,parentSchema:r}=e,{format:n}=t;return`${o} should match format ${JSON.stringify(n)}${A(r)}.${this.getSchemaPartDescription(r)}`}case"formatMinimum":case"formatExclusiveMinimum":case"formatMaximum":case"formatExclusiveMaximum":{const{params:t,parentSchema:r}=e,{comparison:n,limit:a}=t;return`${o} should be ${n} ${JSON.stringify(a)}${A(r)}.${this.getSchemaPartDescription(r)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:t,params:r}=e,{comparison:n,limit:a}=r,[,...s]=F(t,!0);return 0===s.length&&s.push(`should be ${n} ${a}`),`${o} ${s.join(" ")}${A(t)}.${this.getSchemaPartDescription(t)}`}case"multipleOf":{const{params:t,parentSchema:r}=e,{multipleOf:n}=t;return`${o} should be multiple of ${n}${A(r)}.${this.getSchemaPartDescription(r)}`}case"patternRequired":{const{params:t,parentSchema:r}=e,{missingPattern:n}=t;return`${o} should have property matching pattern ${JSON.stringify(n)}${A(r)}.${this.getSchemaPartDescription(r)}`}case"minLength":{const{params:t,parentSchema:r}=e,{limit:n}=t;if(1===n)return`${o} should be a non-empty string${A(r)}.${this.getSchemaPartDescription(r)}`;const a=n-1;return`${o} should be longer than ${a} character${a>1?"s":""}${A(r)}.${this.getSchemaPartDescription(r)}`}case"minItems":{const{params:t,parentSchema:r}=e,{limit:n}=t;return 1===n?`${o} should be a non-empty array${A(r)}.${this.getSchemaPartDescription(r)}`:`${o} should not have fewer than ${n} items${A(r)}.${this.getSchemaPartDescription(r)}`}case"minProperties":{const{params:t,parentSchema:r}=e,{limit:n}=t;return 1===n?`${o} should be a non-empty object${A(r)}.${this.getSchemaPartDescription(r)}`:`${o} should not have fewer than ${n} properties${A(r)}.${this.getSchemaPartDescription(r)}`}case"maxLength":{const{params:t,parentSchema:r}=e,{limit:n}=t,a=n+1;return`${o} should be shorter than ${a} character${a>1?"s":""}${A(r)}.${this.getSchemaPartDescription(r)}`}case"maxItems":{const{params:t,parentSchema:r}=e,{limit:n}=t;return`${o} should not have more than ${n} items${A(r)}.${this.getSchemaPartDescription(r)}`}case"maxProperties":{const{params:t,parentSchema:r}=e,{limit:n}=t;return`${o} should not have more than ${n} properties${A(r)}.${this.getSchemaPartDescription(r)}`}case"uniqueItems":{const{params:t,parentSchema:r}=e,{i:n}=t;return`${o} should not contain the item '${e.data[n]}' twice${A(r)}.${this.getSchemaPartDescription(r)}`}case"additionalItems":{const{params:t,parentSchema:r}=e,{limit:n}=t;return`${o} should not have more than ${n} items${A(r)}. These items are valid:\n${this.getSchemaPartText(r)}`}case"contains":{const{parentSchema:t}=e;return`${o} should contains at least one ${this.getSchemaPartText(t,["contains"])} item${A(t)}.`}case"required":{const{parentSchema:t,params:r}=e,n=r.missingProperty.replace(/^\./,""),a=t&&Boolean(t.properties&&t.properties[n]);return`${o} misses the property '${n}'${A(t)}.${a?` Should be:\n${this.getSchemaPartText(t,["properties",n])}`:this.getSchemaPartDescription(t)}`}case"additionalProperties":{const{params:t,parentSchema:r}=e,{additionalProperty:n}=t;return`${o} has an unknown property '${n}'${A(r)}. These properties are valid:\n${this.getSchemaPartText(r)}`}case"dependencies":{const{params:t,parentSchema:r}=e,{property:n,deps:a}=t;return`${o} should have properties ${a.split(",").map((e=>`'${e.trim()}'`)).join(", ")} when property '${n}' is present${A(r)}.${this.getSchemaPartDescription(r)}`}case"propertyNames":{const{params:t,parentSchema:r,schema:n}=e,{propertyName:a}=t;return`${o} property name '${a}' is invalid${A(r)}. Property names should be match format ${JSON.stringify(n.format)}.${this.getSchemaPartDescription(r)}`}case"enum":{const{parentSchema:t}=e;return t&&t.enum&&1===t.enum.length?`${o} should be ${this.getSchemaPartText(t,!1,!0)}`:`${o} should be one of these:\n${this.getSchemaPartText(t)}`}case"const":{const{parentSchema:t}=e;return`${o} should be equal to constant ${this.getSchemaPartText(t,!1,!0)}`}case"not":{const t=M(e.parentSchema)?`\n${this.getSchemaPartText(e.parentSchema)}`:"",r=this.getSchemaPartText(e.schema,!1,!1,!1);if(k(e.schema))return`${o} should be any ${r}${t}.`;const{schema:n,parentSchema:a}=e;return`${o} should not be ${this.getSchemaPartText(n,!1,!0)}${a&&M(a)?`\n${this.getSchemaPartText(a)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:t,children:r}=e;if(r&&r.length>0){if(1===e.schema.length){const e=r[r.length-1],n=r.slice(0,r.length-1);return this.formatValidationError(Object.assign({},e,{children:n,parentSchema:Object.assign({},t,e.parentSchema)}))}let n=function(e){let t=e;return t=w(t,(e=>e.instancePath?e.instancePath.length:0)),t=w(t,(e=>b[e.keyword]||2)),t}(r);return 1===n.length?this.formatValidationError(n[0]):(n=function(e){const t=[];let r=e.length-1;for(;r>0;){const n=e[r];if("anyOf"===n.keyword||"oneOf"===n.keyword){const o=S(n),a=P(e.slice(0,r),o.concat(n.schemaPath));a!==r?(t.push(Object.assign({},n,{children:e.slice(a,r)})),r=a):t.push(n)}else t.push(n);r-=1}return 0===r&&t.push(e[r]),t.reverse()}(n),`${o} should be one of these:\n${this.getSchemaPartText(t)}\nDetails:\n${n.map((e=>` * ${E(this.formatValidationError(e)," ")}`)).join("\n")}`)}return`${o} should be one of these:\n${this.getSchemaPartText(t)}`}case"if":{const{params:t,parentSchema:r}=e,{failingKeyword:n}=t;return`${o} should match "${n}" schema:\n${this.getSchemaPartText(r,[n])}`}case"absolutePath":{const{message:t,parentSchema:r}=e;return`${o}: ${t}${this.getSchemaPartDescription(r)}`}default:{const{message:t,parentSchema:r}=e;return`${o} ${t} (${JSON.stringify(e,null,2)}).\n${this.getSchemaPartText(r,!1)}`}}}formatValidationErrors(e){return e.map((e=>{let t=this.formatValidationError(e);return this.postFormatter&&(t=this.postFormatter(t,e)),` - ${E(t," ")}`})).join("\n")}};var K=q;d.default=K;var U,L={exports:{}},G={},J={},H={},B={},W={},Z={};function Q(){return U||(U=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(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)i(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const a=new n("+");function s(e,...t){const r=[u(e[0])];let o=0;for(;o<t.length;)r.push(a),i(r,t[o]),r.push(a,u(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function i(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:u(Array.isArray(o)?o.join(","):o))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=s,e.addCodeArg=i,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},e.stringify=function(e){return new n(u(e))},e.safeStringify=u,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(Z)),Z}var Y,X,ee={};function te(){return Y||(Y=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Q();class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class a extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=a;const s=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,a=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(a);if(e)return e}else s=this._values[o]=new Map;s.set(a,n);const i=this._scope[o]||(this._scope[o]=[]),c=i.length;return i[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(o,a,s={},i){let c=t.nil;for(const u in o){const l=o[u];if(!l)continue;const d=s[u]=s[u]||new Map;l.forEach((o=>{if(d.has(o))return;d.set(o,n.Started);let s=a(o);if(s){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${o} = ${s};${this.opts._n}`}else{if(!(s=null==i?void 0:i(o)))throw new r(o);c=t._`${c}${s}${this.opts._n}`}d.set(o,n.Completed)}))}return c}}}(ee)),ee}function re(){return X||(X=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=Q(),r=te();var n=Q();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),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.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=te();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._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 a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class s extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,e,r),this}get names(){return k(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends i{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=O(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(N(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class p extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class h extends m{}class y extends p{}y.kind="else";class g extends p{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(C(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=O(this.condition,e,t),this}get names(){const e=super.names;return k(e,this.condition),this.else&&x(e,this.else.names),e}}g.kind="if";class v extends p{}v.kind="for";class $ extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=O(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class _ extends v{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:a}=this;return`for(${t} ${n}=${o}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){const e=k(super.names,this.from);return k(e,this.to)}}class b extends v{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=O(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class w extends p{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}w.kind="func";class P extends m{render(e){return"return "+super.render(e)}}P.kind="return";class S extends p{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class E extends p{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}E.kind="catch";class j extends p{render(e){return"finally"+super.render(e)}}j.kind="finally";function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function k(e,r){return r instanceof t._CodeOrName?x(e,r.names):e}function O(e,r,n){return e instanceof t.Name?a(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=a(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var o;function a(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function C(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${M(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new s(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new i(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,n,o,a=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const s=this._scope.toName(e);return this._for(new _(a,s,t,n),(()=>o(s)))}forOf(e,n,o,a=r.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(s,t._`${e}[${r}]`),o(s)}))}return this._for(new b("of",a,s,n),(()=>o(s)))}forIn(e,n,o,a=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const s=this._scope.toName(e);return this._for(new b("in",a,s,n),(()=>o(s)))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new E(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(E,j)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new w(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=C;const T=I(e.operators.AND);e.and=function(...e){return e.reduce(T)};const R=I(e.operators.OR);function I(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${M(r)} ${e} ${M(n)}`}function M(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(R)}}(W)),W}var ne,oe={};function ae(){if(ne)return oe;ne=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.checkStrictMode=oe.getErrorPath=oe.Type=oe.useFunc=oe.setEvaluated=oe.evaluatedPropsToName=oe.mergeEvaluated=oe.eachItem=oe.unescapeJsonPointer=oe.escapeJsonPointer=oe.escapeFragment=oe.unescapeFragment=oe.schemaRefOrVal=oe.schemaHasRulesButRef=oe.schemaHasRules=oe.checkUnknownRules=oe.alwaysValidSchema=oe.toHash=void 0;const e=re(),t=Q();function r(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||d(e,`unknown keyword: "${r}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function o(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function s({mergeNames:t,mergeToName:r,mergeValues:n,resultToName:o}){return(a,s,i,c)=>{const u=void 0===i?s:i instanceof e.Name?(s instanceof e.Name?t(a,s,i):r(a,s,i),i):s instanceof e.Name?(r(a,i,s),s):n(s,i);return c!==e.Name||u instanceof e.Name?u:o(a,u)}}function i(t,r){if(!0===r)return t.var("props",!0);const n=t.var("props",e._`{}`);return void 0!==r&&c(t,n,r),n}function c(t,r,n){Object.keys(n).forEach((n=>t.assign(e._`${r}${(0,e.getProperty)(n)}`,!0)))}oe.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},oe.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!n(t,e.self.RULES.all))},oe.checkUnknownRules=r,oe.schemaHasRules=n,oe.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},oe.schemaRefOrVal=function({topSchemaRef:t,schemaPath:r},n,o,a){if(!a){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return e._`${n}`}return e._`${t}${r}${(0,e.getProperty)(o)}`},oe.unescapeFragment=function(e){return a(decodeURIComponent(e))},oe.escapeFragment=function(e){return encodeURIComponent(o(e))},oe.escapeJsonPointer=o,oe.unescapeJsonPointer=a,oe.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},oe.mergeEvaluated={props:s({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,(()=>{t.if(e._`${r} === true`,(()=>t.assign(n,!0)),(()=>t.assign(n,e._`${n} || {}`).code(e._`Object.assign(${n}, ${r})`)))})),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,(()=>{!0===r?t.assign(n,!0):(t.assign(n,e._`${n} || {}`),c(t,n,r))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:i}),items:s({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,(()=>t.assign(n,e._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`))),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,(()=>t.assign(n,!0===r||e._`${n} > ${r} ? ${n} : ${r}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},oe.evaluatedPropsToName=i,oe.setEvaluated=c;const u={};var l;function d(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}return oe.useFunc=function(e,r){return e.scopeValue("func",{ref:r,code:u[r.code]||(u[r.code]=new t._Code(r.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(l||(oe.Type=l={})),oe.getErrorPath=function(t,r,n){if(t instanceof e.Name){const o=r===l.Num;return n?o?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:o?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,e.getProperty)(t).toString():"/"+o(t)},oe.checkStrictMode=d,oe}var se,ie,ce,ue={};function le(){if(se)return ue;se=1,Object.defineProperty(ue,"__esModule",{value:!0});const e=re(),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.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return ue.default=t,ue}function de(){return ie||(ie=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=re(),r=ae(),n=le();function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${o}]`)),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function a(e,r){const{gen:n,validateName:o,schemaEnv:a}=e;a.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,s,c){const{it:u}=r,{gen:l,compositeRule:d,allErrors:f}=u,m=i(r,n,s);(null!=c?c:d||f)?o(l,m):a(u,t._`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,s){const{it:c}=t,{gen:u,compositeRule:l,allErrors:d}=c;o(u,i(t,r,s)),l||d||a(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:a,errsCount:s,it:i}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,n.default.errors,(s=>{e.const(c,t._`${n.default.vErrors}[${s}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,i.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${i.errSchemaPath}/${r}`),i.opts.verbose&&(e.assign(t._`${c}.schema`,o),e.assign(t._`${c}.data`,a))}))};const s={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 i(e,r,o){const{createErrors:a}=e.it;return!1===a?t._`{}`:function(e,r,o={}){const{gen:a,it:i}=e,l=[c(i,o),u(e,o)];return function(e,{params:r,message:o},a){const{keyword:i,data:c,schemaValue:u,it:l}=e,{opts:d,propertyName:f,topSchemaRef:m,schemaPath:p}=l;a.push([s.keyword,i],[s.params,"function"==typeof r?r(e):r||t._`{}`]),d.messages&&a.push([s.message,"function"==typeof o?o(e):o]);d.verbose&&a.push([s.schema,u],[s.parentSchema,t._`${m}${p}`],[n.default.data,c]);f&&a.push([s.propertyName,f])}(e,r,l),a.object(...l)}(e,r,o)}function c({errorPath:e},{instancePath:o}){const a=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,a)]}function u({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:a}){let i=a?n:t.str`${n}/${e}`;return o&&(i=t.str`${i}${(0,r.getErrorPath)(o,r.Type.Str)}`),[s.schemaPath,i]}}(B)),B}var fe,me={},pe={};function he(){if(fe)return pe;fe=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.getRules=pe.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return pe.isJSONType=function(t){return"string"==typeof t&&e.has(t)},pe.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},pe}var ye,ge,ve={};function $e(){if(ye)return ve;function e(e,r){return r.rules.some((r=>t(e,r)))}function t(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}return ye=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.shouldUseRule=ve.shouldUseGroup=ve.schemaHasRulesForType=void 0,ve.schemaHasRulesForType=function({schema:t,self:r},n){const o=r.RULES.types[n];return o&&!0!==o&&e(t,o)},ve.shouldUseGroup=e,ve.shouldUseRule=t,ve}function _e(){if(ge)return me;ge=1,Object.defineProperty(me,"__esModule",{value:!0}),me.reportTypeError=me.checkDataTypes=me.checkDataType=me.coerceAndCheckDataType=me.getJSONTypes=me.getSchemaTypes=me.DataType=void 0;const e=he(),t=$e(),r=de(),n=re(),o=ae();var a;function s(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(e.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(a||(me.DataType=a={})),me.getSchemaTypes=function(e){const t=s(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},me.getJSONTypes=s,me.coerceAndCheckDataType=function(e,r){const{gen:o,data:s,opts:c}=e,l=function(e,t){return t?e.filter((e=>i.has(e)||"array"===t&&"array"===e)):[]}(r,c.coerceTypes),f=r.length>0&&!(0===l.length&&1===r.length&&(0,t.schemaHasRulesForType)(e,r[0]));if(f){const t=u(r,s,c.strictNumbers,a.Wrong);o.if(t,(()=>{l.length?function(e,t,r){const{gen:o,data:a,opts:s}=e,c=o.let("dataType",n._`typeof ${a}`),l=o.let("coerced",n._`undefined`);"array"===s.coerceTypes&&o.if(n._`${c} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>o.assign(a,n._`${a}[0]`).assign(c,n._`typeof ${a}`).if(u(t,a,s.strictNumbers),(()=>o.assign(l,a)))));o.if(n._`${l} !== undefined`);for(const e of r)(i.has(e)||"array"===e&&"array"===s.coerceTypes)&&f(e);function f(e){switch(e){case"string":return void o.elseIf(n._`${c} == "number" || ${c} == "boolean"`).assign(l,n._`"" + ${a}`).elseIf(n._`${a} === null`).assign(l,n._`""`);case"number":return void o.elseIf(n._`${c} == "boolean" || ${a} === null
3
+ || (${c} == "string" && ${a} && ${a} == +${a})`).assign(l,n._`+${a}`);case"integer":return void o.elseIf(n._`${c} === "boolean" || ${a} === null
4
+ || (${c} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(l,n._`+${a}`);case"boolean":return void o.elseIf(n._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(l,!1).elseIf(n._`${a} === "true" || ${a} === 1`).assign(l,!0);case"null":return o.elseIf(n._`${a} === "" || ${a} === 0 || ${a} === false`),void o.assign(l,null);case"array":o.elseIf(n._`${c} === "string" || ${c} === "number"
5
+ || ${c} === "boolean" || ${a} === null`).assign(l,n._`[${a}]`)}}o.else(),d(e),o.endIf(),o.if(n._`${l} !== undefined`,(()=>{o.assign(a,l),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(n._`${t} !== undefined`,(()=>e.assign(n._`${t}[${r}]`,o)))}(e,l)}))}(e,r,l):d(e)}))}return f};const i=new Set(["string","number","integer","boolean","null"]);function c(e,t,r,o=a.Correct){const s=o===a.Correct?n.operators.EQ:n.operators.NEQ;let i;switch(e){case"null":return n._`${t} ${s} null`;case"array":i=n._`Array.isArray(${t})`;break;case"object":i=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=c(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=c();break;default:return n._`typeof ${t} ${s} ${e}`}return o===a.Correct?i:(0,n.not)(i);function c(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function u(e,t,r,a){if(1===e.length)return c(e[0],t,r,a);let s;const i=(0,o.toHash)(e);if(i.array&&i.object){const e=n._`typeof ${t} != "object"`;s=i.null?e:n._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=n.nil;i.number&&delete i.integer;for(const e in i)s=(0,n.and)(s,c(e,t,r,a));return s}me.checkDataType=c,me.checkDataTypes=u;const l={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,a=(0,o.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:e}}(e);(0,r.reportError)(t,l)}return me.reportTypeError=d,me}var be,we={};var Pe,Se,Ee={},je={};function xe(){if(Pe)return je;Pe=1,Object.defineProperty(je,"__esModule",{value:!0}),je.validateUnion=je.validateArray=je.usePattern=je.callValidateCode=je.schemaProperties=je.allSchemaProperties=je.noPropertyInData=je.propertyInData=je.isOwnProperty=je.hasPropFunc=je.reportMissingProp=je.checkMissingProp=je.checkReportMissingProp=void 0;const e=re(),t=ae(),r=le(),n=ae();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function a(t,r,n){return e._`${o(t)}.call(${r}, ${n})`}function s(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} === undefined`;return o?(0,e.or)(s,(0,e.not)(a(t,r,n))):s}function i(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}je.checkReportMissingProp=function(t,r){const{gen:n,data:o,it:a}=t;n.if(s(n,o,r,a.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()}))},je.checkMissingProp=function({gen:t,data:r,it:{opts:n}},o,a){return(0,e.or)(...o.map((o=>(0,e.and)(s(t,r,o,n.ownProperties),e._`${a} = ${o}`))))},je.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},je.hasPropFunc=o,je.isOwnProperty=a,je.propertyInData=function(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return o?e._`${s} && ${a(t,r,n)}`:s},je.noPropertyInData=s,je.allSchemaProperties=i,je.schemaProperties=function(e,r){return i(r).filter((n=>!(0,t.alwaysValidSchema)(e,r[n])))},je.callValidateCode=function({schemaCode:t,data:n,it:{gen:o,topSchemaRef:a,schemaPath:s,errorPath:i},it:c},u,l,d){const f=d?e._`${t}, ${n}, ${a}${s}`:n,m=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,i)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&m.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const p=e._`${f}, ${o.object(...m)}`;return l!==e.nil?e._`${u}.call(${l}, ${p})`:e._`${u}(${p})`};const c=e._`new RegExp`;return je.usePattern=function({gen:t,it:{opts:r}},o){const a=r.unicodeRegExp?"u":"",{regExp:s}=r.code,i=s(o,a);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:e._`${"new RegExp"===s.code?c:(0,n.useFunc)(t,s)}(${o}, ${a})`})},je.validateArray=function(r){const{gen:n,data:o,keyword:a,it:s}=r,i=n.name("valid");if(s.allErrors){const e=n.let("valid",!0);return c((()=>n.assign(e,!1))),e}return n.var(i,!0),c((()=>n.break())),i;function c(s){const c=n.const("len",e._`${o}.length`);n.forRange("i",0,c,(o=>{r.subschema({keyword:a,dataProp:o,dataPropType:t.Type.Num},i),n.if((0,e.not)(i),s)}))}},je.validateUnion=function(r){const{gen:n,schema:o,keyword:a,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some((e=>(0,t.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const i=n.let("valid",!1),c=n.name("_valid");n.block((()=>o.forEach(((t,o)=>{const s=r.subschema({keyword:a,schemaProp:o,compositeRule:!0},c);n.assign(i,e._`${i} || ${c}`);r.mergeValidEvaluated(s,c)||n.if((0,e.not)(i))})))),r.result(i,(()=>r.reset()),(()=>r.error(!0)))},je}function ke(){if(Se)return Ee;Se=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.validateKeywordUsage=Ee.validSchemaType=Ee.funcKeywordCode=Ee.macroKeywordCode=void 0;const e=re(),t=le(),r=xe(),n=de();function o(t){const{gen:r,data:n,it:o}=t;r.if(o.parentData,(()=>r.assign(n,e._`${o.parentData}[${o.parentDataProperty}]`)))}function a(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return Ee.macroKeywordCode=function(t,r){const{gen:n,keyword:o,schema:s,parentSchema:i,it:c}=t,u=r.macro.call(c.self,s,i,c),l=a(n,o,u);!1!==c.opts.validateSchema&&c.self.validateSchema(u,!0);const d=n.name("valid");t.subschema({schema:u,schemaPath:e.nil,errSchemaPath:`${c.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},d),t.pass(d,(()=>t.error(!0)))},Ee.funcKeywordCode=function(s,i){var c;const{gen:u,keyword:l,schema:d,parentSchema:f,$data:m,it:p}=s;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(p,i);const h=!m&&i.compile?i.compile.call(p.self,d,f,p):i.validate,y=a(u,l,h),g=u.let("valid");function v(n=(i.async?e._`await `:e.nil)){const o=p.opts.passContext?t.default.this:t.default.self,a=!("compile"in i&&!m||!1===i.schema);u.assign(g,e._`${n}${(0,r.callValidateCode)(s,y,o,a)}`,i.modifying)}function $(t){var r;u.if((0,e.not)(null!==(r=i.valid)&&void 0!==r?r:g),t)}s.block$data(g,(function(){if(!1===i.errors)v(),i.modifying&&o(s),$((()=>s.error()));else{const r=i.async?function(){const t=u.let("ruleErrs",null);return u.try((()=>v(e._`await `)),(r=>u.assign(g,!1).if(e._`${r} instanceof ${p.ValidationError}`,(()=>u.assign(t,e._`${r}.errors`)),(()=>u.throw(r))))),t}():function(){const t=e._`${y}.errors`;return u.assign(t,null),v(e.nil),t}();i.modifying&&o(s),$((()=>function(r,o){const{gen:a}=r;a.if(e._`Array.isArray(${o})`,(()=>{a.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${o} : ${t.default.vErrors}.concat(${o})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)}),(()=>r.error()))}(s,r)))}})),s.ok(null!==(c=i.valid)&&void 0!==c?c:g)},Ee.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},Ee.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,a){if(Array.isArray(o.keyword)?!o.keyword.includes(a):o.keyword!==a)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[a])){const e=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},Ee}var Oe,Ne={};var Ce,Te,Re={};function Ie(){return Te||(Te=1,Ce=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;0!=o--;){var s=a[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}),Ce}var Me,De,Ae,Ve={exports:{}};function ze(){if(Me)return Ve.exports;Me=1;var e=Ve.exports=function(e,r,n){"function"==typeof r&&(n=r,r={}),t(r,"function"==typeof(n=r.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function t(r,n,o,a,s,i,c,u,l,d){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var f in n(a,s,i,c,u,l,d),a){var m=a[f];if(Array.isArray(m)){if(f in e.arrayKeywords)for(var p=0;p<m.length;p++)t(r,n,o,m[p],s+"/"+f+"/"+p,i,s,f,a,p)}else if(f in e.propsKeywords){if(m&&"object"==typeof m)for(var h in m)t(r,n,o,m[h],s+"/"+f+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),i,s,f,a,h)}else(f in e.keywords||r.allKeys&&!(f in e.skipKeywords))&&t(r,n,o,m,s+"/"+f,i,s,f,a)}o(a,s,i,c,u,l,d)}}return e.keywords={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},Ve.exports}function Fe(){if(De)return Re;De=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.getSchemaRefs=Re.resolveUrl=Re.normalizeId=Re._getFullPath=Re.getFullPath=Re.inlineRef=void 0;const e=ae(),t=Ie(),r=ze(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Re.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!a(e):!!t&&s(e)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e){for(const t in e){if(o.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(a))return!0;if("object"==typeof r&&a(r))return!0}return!1}function s(t){let r=0;for(const o in t){if("$ref"===o)return 1/0;if(r++,!n.has(o)&&("object"==typeof t[o]&&(0,e.eachItem)(t[o],(e=>r+=s(e))),r===1/0))return 1/0}return r}function i(e,t="",r){!1!==r&&(t=l(t));const n=e.parse(t);return c(e,n)}function c(e,t){return e.serialize(t).split("#")[0]+"#"}Re.getFullPath=i,Re._getFullPath=c;const u=/#\/?$/;function l(e){return e?e.replace(u,""):""}Re.normalizeId=l,Re.resolveUrl=function(e,t,r){return r=l(r),e.resolve(t,r)};const d=/^[a-z_][-a-z0-9._]*$/i;return Re.getSchemaRefs=function(e,n){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:a}=this.opts,s=l(e[o]||n),c={"":s},u=i(a,s,!1),f={},m=new Set;return r(e,{allKeys:!0},((e,t,r,n)=>{if(void 0===n)return;const a=u+t;let s=c[n];function i(t){const r=this.opts.uriResolver.resolve;if(t=l(s?r(s,t):t),m.has(t))throw h(t);m.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==l(a)&&("#"===t[0]?(p(e,f[t],t),f[t]=e):this.refs[t]=a),t}function y(e){if("string"==typeof e){if(!d.test(e))throw new Error(`invalid anchor "${e}"`);i.call(this,`#${e}`)}}"string"==typeof e[o]&&(s=i.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),c[t]=s})),f;function p(e,r,n){if(void 0!==r&&!t(e,r))throw h(n)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Re}function qe(){if(Ae)return J;Ae=1,Object.defineProperty(J,"__esModule",{value:!0}),J.getData=J.KeywordCxt=J.validateFunctionCode=void 0;const e=function(){if(ce)return H;ce=1,Object.defineProperty(H,"__esModule",{value:!0}),H.boolOrEmptySchema=H.topBoolOrEmptySchema=void 0;const e=de(),t=re(),r=le(),n={message:"boolean schema is false"};function o(t,r){const{gen:o,data:a}=t,s={gen:o,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(s,n,void 0,r)}return H.topBoolOrEmptySchema=function(e){const{gen:n,schema:a,validateName:s}=e;!1===a?o(e,!1):"object"==typeof a&&!0===a.$async?n.return(r.default.data):(n.assign(t._`${s}.errors`,null),n.return(!0))},H.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),o(e)):r.var(t,!0)},H}(),t=_e(),r=$e(),n=_e(),o=function(){if(be)return we;be=1,Object.defineProperty(we,"__esModule",{value:!0}),we.assignDefaults=void 0;const e=re(),t=ae();function r(r,n,o){const{gen:a,compositeRule:s,data:i,opts:c}=r;if(void 0===o)return;const u=e._`${i}${(0,e.getProperty)(n)}`;if(s)return void(0,t.checkStrictMode)(r,`default is ignored for: ${u}`);let l=e._`${u} === undefined`;"empty"===c.useDefaults&&(l=e._`${l} || ${u} === null || ${u} === ""`),a.if(l,e._`${u} = ${(0,e.stringify)(o)}`)}return we.assignDefaults=function(e,t){const{properties:n,items:o}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(o)&&o.forEach(((t,n)=>r(e,n,t.default)))},we}(),a=ke(),s=function(){if(Oe)return Ne;Oe=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.extendSubschemaMode=Ne.extendSubschemaData=Ne.getSubschema=void 0;const e=re(),t=ae();return Ne.getSubschema=function(r,{keyword:n,schemaProp:o,schema:a,schemaPath:s,errSchemaPath:i,topSchemaRef:c}){if(void 0!==n&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const a=r.schema[n];return void 0===o?{schema:a,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:a[o],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(o)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(o)}`}}if(void 0!==a){if(void 0===s||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:s,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},Ne.extendSubschemaData=function(r,n,{dataProp:o,dataPropType:a,data:s,dataTypes:i,propertyName:c}){if(void 0!==s&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=n;if(void 0!==o){const{errorPath:s,dataPathArr:i,opts:c}=n;l(u.let("data",e._`${n.data}${(0,e.getProperty)(o)}`,!0)),r.errorPath=e.str`${s}${(0,t.getErrorPath)(o,a,c.jsPropertySyntax)}`,r.parentDataProperty=e._`${o}`,r.dataPathArr=[...i,r.parentDataProperty]}function l(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}void 0!==s&&(l(s instanceof e.Name?s:u.let("data",s,!0)),void 0!==c&&(r.propertyName=c)),i&&(r.dataTypes=i)},Ne.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:a}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r},Ne}(),i=re(),c=le(),u=Fe(),l=ae(),d=de();function f({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},a){o.code.es5?e.func(t,i._`${c.default.data}, ${c.default.valCxt}`,n.$async,(()=>{e.code(i._`"use strict"; ${m(r,o)}`),function(e,t){e.if(c.default.valCxt,(()=>{e.var(c.default.instancePath,i._`${c.default.valCxt}.${c.default.instancePath}`),e.var(c.default.parentData,i._`${c.default.valCxt}.${c.default.parentData}`),e.var(c.default.parentDataProperty,i._`${c.default.valCxt}.${c.default.parentDataProperty}`),e.var(c.default.rootData,i._`${c.default.valCxt}.${c.default.rootData}`),t.dynamicRef&&e.var(c.default.dynamicAnchors,i._`${c.default.valCxt}.${c.default.dynamicAnchors}`)}),(()=>{e.var(c.default.instancePath,i._`""`),e.var(c.default.parentData,i._`undefined`),e.var(c.default.parentDataProperty,i._`undefined`),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,i._`{}`)}))}(e,o),e.code(a)})):e.func(t,i._`${c.default.data}, ${function(e){return i._`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${e.dynamicRef?i._`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}(o)}`,n.$async,(()=>e.code(m(r,o)).code(a)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?i._`/*# sourceURL=${r} */`:i.nil}function p(t,r){y(t)&&(g(t),h(t))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&$(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const a=n.const("_errs",c.default.errors);v(e,a),n.var(t,i._`${a} === ${c.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,l.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function v(e,r){if(e.opts.jtd)return _(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);_(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const a=r.$comment;if(!0===o.$comment)e.code(i._`${c.default.self}.logger.log(${a})`);else if("function"==typeof o.$comment){const r=i.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(i._`${c.default.self}.opts.$comment(${a}, ${r}, ${o}.schema)`)}}function _(e,t,o,a){const{gen:s,schema:u,data:d,allErrors:f,opts:m,self:p}=e,{RULES:h}=p;function y(l){(0,r.shouldUseGroup)(u,l)&&(l.type?(s.if((0,n.checkDataType)(l.type,d,m.strictNumbers)),b(e,l),1===t.length&&t[0]===l.type&&o&&(s.else(),(0,n.reportTypeError)(e)),s.endIf()):b(e,l),f||s.if(i._`${c.default.errors} === ${a||0}`))}!u.$ref||!m.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(u,h)?(m.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{P(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)P(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const o in n){const a=n[o];if("object"==typeof a&&(0,r.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some((e=>w(t,e)))&&S(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),s.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):s.block((()=>j(e,"$ref",h.all.$ref.definition)))}function b(e,t){const{gen:n,schema:a,opts:{useDefaults:s}}=e;s&&(0,o.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(a,n)&&j(e,n.keyword,n.definition,t.type)}))}function w(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function P(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,l.checkStrictMode)(e,t,e.opts.strictTypes)}J.validateFunctionCode=function(t){y(t)&&(g(t),h(t))?function(e){const{schema:t,opts:r,gen:n}=e;f(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,l.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(c.default.vErrors,null),n.let(c.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",i._`${r}.evaluated`),t.if(i._`${e.evaluated}.dynamicProps`,(()=>t.assign(i._`${e.evaluated}.props`,i._`undefined`))),t.if(i._`${e.evaluated}.dynamicItems`,(()=>t.assign(i._`${e.evaluated}.items`,i._`undefined`)))}(e),v(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:a}=e;r.$async?t.if(i._`${c.default.errors} === 0`,(()=>t.return(c.default.data)),(()=>t.throw(i._`new ${o}(${c.default.vErrors})`))):(t.assign(i._`${n}.errors`,c.default.vErrors),a.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof i.Name&&e.assign(i._`${t}.props`,r);n instanceof i.Name&&e.assign(i._`${t}.items`,n)}(e),t.return(i._`${c.default.errors} === 0`))}(e)}))}(t):f(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class E{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",O(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,i.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,i.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(i._`${t} !== undefined && (${(0,i.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?d.reportExtraError:d.reportError)(this,this.def.error,t)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=i.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=i.nil,t=i.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:a}=this;r.if((0,i.or)(i._`${n} === undefined`,t)),e!==i.nil&&r.assign(e,!0),(o.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==i.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:a}=this;return(0,i.or)(function(){if(r.length){if(!(t instanceof i.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return i._`${(0,n.checkDataTypes)(e,t,a.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return i._`!${r}(${t})`}return i.nil}())}subschema(e,t){const r=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(r,this.it,e),(0,s.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return p(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=l.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=l.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,i.Name))),!0}}function j(e,t,r,n){const o=new E(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}J.KeywordCxt=E;const x=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,a;if(""===e)return c.default.rootData;if("/"===e[0]){if(!x.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,a=c.default.rootData}else{const s=k.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+s[1];if(o=s[2],"#"===o){if(i>=t)throw new Error(d("property/index",i));return n[t-i]}if(i>t)throw new Error(d("data",i));if(a=r[t-i],!o)return a}let s=a;const u=o.split("/");for(const e of u)e&&(a=i._`${a}${(0,i.getProperty)((0,l.unescapeJsonPointer)(e))}`,s=i._`${s} && ${a}`);return s;function d(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return J.getData=O,J}var Ke,Ue={};function Le(){if(Ke)return Ue;Ke=1,Object.defineProperty(Ue,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return Ue.default=e,Ue}var Ge,Je={};function He(){if(Ge)return Je;Ge=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=Fe();class t extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return Je.default=t,Je}var Be,We={};function Ze(){if(Be)return We;Be=1,Object.defineProperty(We,"__esModule",{value:!0}),We.resolveSchema=We.getCompilingSchema=We.resolveRef=We.compileSchema=We.SchemaEnv=void 0;const e=re(),t=Le(),r=le(),n=Fe(),o=ae(),a=qe();class s{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function i(o){const s=u.call(this,o);if(s)return s;const i=(0,n.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:d}=this.opts,f=new e.CodeGen(this.scope,{es5:c,lines:l,ownProperties:d});let m;o.$async&&(m=f.scopeValue("Error",{ref:t.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const p=f.scopeName("validate");o.validateName=p;const h={gen:f,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:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:p,ValidationError:m,schema:o.schema,schemaEnv:o,rootId:i,baseId:o.baseId||i,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(o),(0,a.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,o));const n=new Function(`${r.default.self}`,`${r.default.scope}`,y)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=o.schema,n.schemaEnv=o,o.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:t,items:r}=h;n.evaluated={props:t instanceof e.Name?void 0:t,items:r instanceof e.Name?void 0:r,dynamicProps:t instanceof e.Name,dynamicItems:r instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return o.validate=n,o}catch(e){throw delete o.validate,delete o.validateName,y&&this.logger.error("Error compiling schema, function code:",y),e}finally{this._compilations.delete(o)}}function c(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:i.call(this,e)}function u(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function l(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||d.call(this,e,t)}function d(e,t){const r=this.opts.uriResolver.parse(t),o=(0,n._getFullPath)(this.opts.uriResolver,r);let a=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===a)return m.call(this,r,e);const c=(0,n.normalizeId)(o),u=this.refs[c]||this.schemas[c];if("string"==typeof u){const t=d.call(this,e,u);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,r,t)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||i.call(this,u),c===(0,n.normalizeId)(t)){const{schema:t}=u,{schemaId:r}=this.opts,o=t[r];return o&&(a=(0,n.resolveUrl)(this.opts.uriResolver,a,o)),new s({schema:t,schemaId:r,root:e,baseId:a})}return m.call(this,r,u)}}We.SchemaEnv=s,We.compileSchema=i,We.resolveRef=function(e,t,r){var o;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let i=l.call(this,e,r);if(void 0===i){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:a}=this.opts;n&&(i=new s({schema:n,schemaId:a,root:e,baseId:t}))}return void 0!==i?e.refs[r]=c.call(this,i):void 0},We.getCompilingSchema=u,We.resolveSchema=d;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:r,root:a}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const a of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,o.unescapeFragment)(a)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!f.has(a)&&s&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,s))}let c;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);c=d.call(this,a,e)}const{schemaId:u}=this.opts;return c=c||new s({schema:r,schemaId:u,root:a,baseId:t}),c.schema!==c.root.schema?c:void 0}return We}var Qe,Ye,Xe,et={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},tt={},rt={exports:{}};function nt(){return Qe||(Qe=1,function(e,t){i.commonjsGlobal,function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function s(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function i(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),s=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",i),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(s+"|"+t(l,i,"[\\:]"))+"*");var d=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(d+"\\."+d+"\\."+d+"\\."+d),m=r(a+"{1,4}"),p=r(r(m+"\\:"+m)+"|"+f),h=r(r(m+"\\:")+"{6}"+p),y=r("\\:\\:"+r(m+"\\:")+"{5}"+p),g=r(r(m)+"?\\:\\:"+r(m+"\\:")+"{4}"+p),v=r(r(r(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+r(m+"\\:")+"{3}"+p),$=r(r(r(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+r(m+"\\:")+"{2}"+p),_=r(r(r(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+p),b=r(r(r(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+p),w=r(r(r(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),P=r(r(r(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),S=r([h,y,g,v,$,_,b,w,P].join("|")),E=r(r(l+"|"+s)+"+");r("[vV]"+a+"+\\."+t(l,i,"[\\:]")+"+"),r(r(s+"|"+t(l,i))+"*");var j=r(s+"|"+t(l,i,"[\\:\\@]"));return r(r(s+"|"+t(l,i,"[\\@]"))+"+"),r(r(j+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,i,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+E+")")+"?\\]?$")}}var c=i(!1),u=i(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var s,i=e[Symbol.iterator]();!(n=(s=i.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,m=36,p=1,h=26,y=38,g=700,v=72,$=128,_="-",b=/^xn--/,w=/[^\0-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=m-p,j=Math.floor,x=String.fromCharCode;function k(e){throw new RangeError(S[e])}function O(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function N(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+O((e=e.replace(P,".")).split("."),t).join(".")}function C(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var T=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:m},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},I=function(e,t,r){var n=0;for(e=r?j(e/g):e>>1,e+=j(e/t);e>E*h>>1;n+=m)e=j(e/E);return j(n+(E+1)*e/(e+y))},M=function(e){var t=[],r=e.length,n=0,o=$,a=v,s=e.lastIndexOf(_);s<0&&(s=0);for(var i=0;i<s;++i)e.charCodeAt(i)>=128&&k("not-basic"),t.push(e.charCodeAt(i));for(var c=s>0?s+1:0;c<r;){for(var u=n,l=1,d=m;;d+=m){c>=r&&k("invalid-input");var y=T(e.charCodeAt(c++));(y>=m||y>j((f-n)/l))&&k("overflow"),n+=y*l;var g=d<=a?p:d>=a+h?h:d-a;if(y<g)break;var b=m-g;l>j(f/b)&&k("overflow"),l*=b}var w=t.length+1;a=I(n-u,w,0==u),j(n/w)>f-o&&k("overflow"),o+=j(n/w),n%=w,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},D=function(e){var t=[],r=(e=C(e)).length,n=$,o=0,a=v,s=!0,i=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(s=(u=l.next()).done);s=!0){var d=u.value;d<128&&t.push(x(d))}}catch(e){i=!0,c=e}finally{try{!s&&l.return&&l.return()}finally{if(i)throw c}}var y=t.length,g=y;for(y&&t.push(_);g<r;){var b=f,w=!0,P=!1,S=void 0;try{for(var E,O=e[Symbol.iterator]();!(w=(E=O.next()).done);w=!0){var N=E.value;N>=n&&N<b&&(b=N)}}catch(e){P=!0,S=e}finally{try{!w&&O.return&&O.return()}finally{if(P)throw S}}var T=g+1;b-n>j((f-o)/T)&&k("overflow"),o+=(b-n)*T,n=b;var M=!0,D=!1,A=void 0;try{for(var V,z=e[Symbol.iterator]();!(M=(V=z.next()).done);M=!0){var F=V.value;if(F<n&&++o>f&&k("overflow"),F==n){for(var q=o,K=m;;K+=m){var U=K<=a?p:K>=a+h?h:K-a;if(q<U)break;var L=q-U,G=m-U;t.push(x(R(U+L%G,0))),q=j(L/G)}t.push(x(R(q,0))),a=I(o,T,g==y),o=0,++g}}}catch(e){D=!0,A=e}finally{try{!M&&z.return&&z.return()}finally{if(D)throw A}}++o,++n}return t.join("")},A=function(e){return N(e,(function(e){return b.test(e)?M(e.slice(4).toLowerCase()):e}))},V=function(e){return N(e,(function(e){return w.test(e)?"xn--"+D(e):e}))},z={version:"2.1.0",ucs2:{decode:C,encode:function(e){return String.fromCodePoint.apply(String,d(e))}},decode:M,encode:D,toASCII:V,toUnicode:A},F={};function q(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function K(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&s)<<6|63&i)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=K(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,q).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,q).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,q).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,q).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,q).replace(t.PCT_ENCODED,o)),e}function L(e){return e.replace(/^0*(.*)/,"$1")||"0"}function G(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(L).join("."):e}function J(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var s=o.toLowerCase().split("::").reverse(),i=l(s,2),c=i[0],u=i[1],d=u?u.split(":").map(L):[],f=c.split(":").map(L),m=t.IPV4ADDRESS.test(f[f.length-1]),p=m?7:8,h=f.length-p,y=Array(p),g=0;g<p;++g)y[g]=d[g]||f[h+g]||"";m&&(y[p-1]=G(y[p-1],t));var v=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],$=void 0;if(v&&v.length>1){var _=y.slice(0,v.index),b=y.slice(v.index+v.length);$=_.join(":")+"::"+b.join(":")}else $=y.join(":");return a&&($+="%"+a),$}return e}var H=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(H);if(o){B?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=J(G(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=F[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)U(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=z.toASCII(r.host.replace(n.PCT_ENCODED,K).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}U(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function Z(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(J(G(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=F[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?z.toUnicode(e.host):z.toASCII(e.host.replace(r.PCT_ENCODED,K).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}U(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=Z(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var s=e.path;t.absolutePath||o&&o.absolutePath||(s=te(s)),void 0===a&&(s=s.replace(/^\/\//,"/%2F")),n.push(s)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(re(e,r),r),t=W(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=s({scheme:"null"},r);return re(ne(W(e,n),W(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(W(e,t),t):"object"===n(e)&&(e=W(re(e,t),t)),e}function se(e,t,r){return"string"==typeof e?e=re(W(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(W(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function ie(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,q)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,K)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=de(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},me={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},pe={},he="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),ve="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",$e=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),_e="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",be=new RegExp(he,"g"),we=new RegExp(ge,"g"),Pe=new RegExp(t("[^]",ve,"[\\.]",'[\\"]',$e),"g"),Se=new RegExp(t("[^]",he,_e),"g"),Ee=Se;function je(e){var t=K(e);return t.match(be)?t:e}var xe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},s=r.query.split("&"),i=0,c=s.length;i<c;++i){var u=s[i].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),d=0,f=l.length;d<f;++d)n.push(l[d]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var m=0,p=n.length;m<p;++m){var h=n[m].split("@");if(h[0]=ce(h[0]),t.unicodeSupport)h[1]=ce(h[1],t).toLowerCase();else try{h[1]=z.toASCII(ce(h[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[m]=h.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var s=0,i=n.length;s<i;++s){var c=String(n[s]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(we,je).replace(we,o).replace(Pe,q),d=c.slice(u+1);try{d=t.iri?z.toUnicode(d):z.toASCII(ce(d,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[s]=l+"@"+d}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var m=[];for(var p in f)f[p]!==pe[p]&&m.push(p.replace(we,je).replace(we,o).replace(Se,q)+"="+f[p].replace(we,je).replace(we,o).replace(Ee,q));return m.length&&(r.query=m.join("&")),r}},ke=/^([^\:]+)\:(.*)/,Oe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ke),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),s=r[2],i=o+":"+(t.nid||a),c=F[i];n.nid=a,n.nss=s,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=F[o];a&&(e=a.serialize(e,t));var s=e,i=e.nss;return s.path=(n||t.nid)+":"+i,s}},Ne=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ne)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};F[ue.scheme]=ue,F[le.scheme]=le,F[fe.scheme]=fe,F[me.scheme]=me,F[xe.scheme]=xe,F[Oe.scheme]=Oe,F[Ce.scheme]=Ce,e.SCHEMES=F,e.pctEncChar=q,e.pctDecChars=K,e.parse=W,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=se,e.escapeComponent=ie,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,rt.exports)),rt.exports}function ot(){return Xe||(Xe=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=qe();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=re();Object.defineProperty(e,"_",{enumerable:!0,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=Le(),o=He(),a=he(),s=Ze(),i=re(),c=Fe(),u=_e(),l=ae(),d=et,f=function(){if(Ye)return tt;Ye=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=nt();return e.code='require("ajv/dist/runtime/uri").default',tt.default=e,tt}(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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.",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 cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,a,s,i,c,u,l,d,p,h,y,g,v,$,_,b,w,P,S,E,j,x;const k=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===O||void 0===O?1:O||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(a=e.strictSchema)&&void 0!==a?a:k)||void 0===s||s,strictNumbers:null===(c=null!==(i=e.strictNumbers)&&void 0!==i?i:k)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:k)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:k)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:k)&&void 0!==y&&y,code:e.code?{...e.code,optimize:N,regExp:C}:{optimize:N,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===($=e.meta)||void 0===$||$,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(b=e.inlineRefs)||void 0===b||b,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(P=e.addUsedSchema)||void 0===P||P,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(j=e.unicodeRegExp)||void 0===j||j,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:T}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:h,es5:t,lines:r}),this.logger=function(e){if(!1===e)return j;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,y,e,"NOT SUPPORTED"),_.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=E.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new s.SchemaEnv({schema:{},schemaId:r});if(t=s.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(k.call(this,r,t),!t)return(0,l.eachItem)(r,(e=>O.call(this,e))),this;C.call(this,t);const n={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===n.type.length?e=>O.call(this,e,n):e=>n.type.forEach((t=>O.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,a=o[e];n&&a&&(o[e]=R(a))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let a;const{schemaId:i}=this.opts;if("object"==typeof e)a=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(void 0!==u)return u;r=(0,c.normalizeId)(a||r);const l=c.getSchemaRefs.call(this,e,r);return u=new s.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:l}),this._cache.set(u.schema,u),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=u),n&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const o in e){const a=o;a in t&&this.logger[n](`${r}: option ${o}. ${e[a]}`)}}function b(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function E(){const e={...this.opts};for(const t of p)delete e[t];return e}$.ValidationError=n.default,$.MissingRefError=o.default,e.default=$;const j={log(){},warn(){},error(){}};const x=/^[a-z_$][a-z0-9_$:-]*$/i;function k(e,t){const{RULES:r}=this;if((0,l.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function O(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let s=o?a.post:a.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},a.rules.push(s)),a.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,i,t.before):s.rules.push(i),a.all[e]=i,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const T={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,T]}}}(G)),G}var at,st={},it={},ct={};var ut,lt,dt={};function ft(){if(lt)return it;lt=1,Object.defineProperty(it,"__esModule",{value:!0});const e=function(){if(at)return ct;at=1,Object.defineProperty(ct,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ct.default=e,ct}(),t=function(){if(ut)return dt;ut=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.callRef=dt.getValidate=void 0;const e=He(),t=xe(),r=re(),n=le(),o=Ze(),a=ae(),s={keyword:"$ref",schemaType:"string",code(t){const{gen:n,schema:a,it:s}=t,{baseId:u,schemaEnv:l,validateName:d,opts:f,self:m}=s,{root:p}=l;if(("#"===a||"#/"===a)&&u===p.baseId)return function(){if(l===p)return c(t,d,l,l.$async);const e=n.scopeValue("root",{ref:p});return c(t,r._`${e}.validate`,p,p.$async)}();const h=o.resolveRef.call(m,p,u,a);if(void 0===h)throw new e.default(s.opts.uriResolver,u,a);return h instanceof o.SchemaEnv?function(e){const r=i(t,e);c(t,r,e,e.$async)}(h):function(e){const o=n.scopeValue("schema",!0===f.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),s=n.name("valid"),i=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:o,errSchemaPath:a},s);t.mergeEvaluated(i),t.ok(s)}(h)}};function i(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):r._`${n.scopeValue("wrapper",{ref:t})}.validate`}function c(e,o,s,i){const{gen:c,it:u}=e,{allErrors:l,schemaEnv:d,opts:f}=u,m=f.passContext?n.default.this:r.nil;function p(e){const t=r._`${e}.errors`;c.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),c.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function h(e){var t;if(!u.opts.unevaluated)return;const n=null===(t=null==s?void 0:s.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(n&&!n.dynamicProps)void 0!==n.props&&(u.props=a.mergeEvaluated.props(c,n.props,u.props));else{const t=c.var("props",r._`${e}.evaluated.props`);u.props=a.mergeEvaluated.props(c,t,u.props,r.Name)}if(!0!==u.items)if(n&&!n.dynamicItems)void 0!==n.items&&(u.items=a.mergeEvaluated.items(c,n.items,u.items));else{const t=c.var("items",r._`${e}.evaluated.items`);u.items=a.mergeEvaluated.items(c,t,u.items,r.Name)}}i?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const n=c.let("valid");c.try((()=>{c.code(r._`await ${(0,t.callValidateCode)(e,o,m)}`),h(o),l||c.assign(n,!0)}),(e=>{c.if(r._`!(${e} instanceof ${u.ValidationError})`,(()=>c.throw(e))),p(e),l||c.assign(n,!1)})),e.ok(n)}():e.result((0,t.callValidateCode)(e,o,m),(()=>h(o)),(()=>p(o)))}return dt.getValidate=i,dt.callRef=c,dt.default=s,dt}(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return it.default=r,it}var mt,pt={},ht={};var yt,gt={};var vt,$t,_t={},bt={};function wt(){if($t)return _t;$t=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=re(),t=ae(),r=function(){if(vt)return bt;function e(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}return vt=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',bt}(),n={message({keyword:t,schemaCode:r}){const n="maxLength"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} characters`},params:({schemaCode:t})=>e._`{limit: ${t}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:n,code(n){const{keyword:o,data:a,schemaCode:s,it:i}=n,c="maxLength"===o?e.operators.GT:e.operators.LT,u=!1===i.opts.unicode?e._`${a}.length`:e._`${(0,t.useFunc)(n.gen,r.default)}(${a})`;n.fail$data(e._`${u} ${c} ${s}`)}};return _t.default=o,_t}var Pt,St={};var Et,jt={};var xt,kt={};function Ot(){if(xt)return kt;xt=1,Object.defineProperty(kt,"__esModule",{value:!0});const e=xe(),t=re(),r=ae(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>t.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>t._`{missingProperty: ${e}}`},code(n){const{gen:o,schema:a,schemaCode:s,data:i,$data:c,it:u}=n,{opts:l}=u;if(!c&&0===a.length)return;const d=a.length>=l.loopRequired;if(u.allErrors?function(){if(d||c)n.block$data(t.nil,f);else for(const t of a)(0,e.checkReportMissingProp)(n,t)}():function(){const r=o.let("missing");if(d||c){const a=o.let("valid",!0);n.block$data(a,(()=>function(r,a){n.setParams({missingProperty:r}),o.forOf(r,s,(()=>{o.assign(a,(0,e.propertyInData)(o,i,r,l.ownProperties)),o.if((0,t.not)(a),(()=>{n.error(),o.break()}))}),t.nil)}(r,a))),n.ok(a)}else o.if((0,e.checkMissingProp)(n,a,r)),(0,e.reportMissingProp)(n,r),o.else()}(),l.strictRequired){const e=n.parentSchema.properties,{definedProperties:t}=n.it;for(const n of a)if(void 0===(null==e?void 0:e[n])&&!t.has(n)){const e=`required property "${n}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(u,e,u.opts.strictRequired)}}function f(){o.forOf("prop",s,(t=>{n.setParams({missingProperty:t}),o.if((0,e.noPropertyInData)(o,i,t,l.ownProperties),(()=>n.error()))}))}}};return kt.default=n,kt}var Nt,Ct={};var Tt,Rt,It={},Mt={};function Dt(){if(Tt)return Mt;Tt=1,Object.defineProperty(Mt,"__esModule",{value:!0});const e=Ie();return e.code='require("ajv/dist/runtime/equal").default',Mt.default=e,Mt}function At(){if(Rt)return It;Rt=1,Object.defineProperty(It,"__esModule",{value:!0});const e=_e(),t=re(),r=ae(),n=Dt(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:r}})=>t.str`must NOT have duplicate items (items ## ${r} and ${e} are identical)`,params:({params:{i:e,j:r}})=>t._`{i: ${e}, j: ${r}}`},code(o){const{gen:a,data:s,$data:i,schema:c,parentSchema:u,schemaCode:l,it:d}=o;if(!i&&!c)return;const f=a.let("valid"),m=u.items?(0,e.getSchemaTypes)(u.items):[];function p(r,n){const i=a.name("item"),c=(0,e.checkDataTypes)(m,i,d.opts.strictNumbers,e.DataType.Wrong),u=a.const("indices",t._`{}`);a.for(t._`;${r}--;`,(()=>{a.let(i,t._`${s}[${r}]`),a.if(c,t._`continue`),m.length>1&&a.if(t._`typeof ${i} == "string"`,t._`${i} += "_"`),a.if(t._`typeof ${u}[${i}] == "number"`,(()=>{a.assign(n,t._`${u}[${i}]`),o.error(),a.assign(f,!1).break()})).code(t._`${u}[${i}] = ${r}`)}))}function h(e,i){const c=(0,r.useFunc)(a,n.default),u=a.name("outer");a.label(u).for(t._`;${e}--;`,(()=>a.for(t._`${i} = ${e}; ${i}--;`,(()=>a.if(t._`${c}(${s}[${e}], ${s}[${i}])`,(()=>{o.error(),a.assign(f,!1).break(u)}))))))}o.block$data(f,(function(){const e=a.let("i",t._`${s}.length`),r=a.let("j");o.setParams({i:e,j:r}),a.assign(f,!0),a.if(t._`${e} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?p:h)(e,r)))}),t._`${l} === false`),o.ok(f)}};return It.default=o,It}var Vt,zt={};var Ft,qt,Kt={};function Ut(){if(Ft)return Kt;Ft=1,Object.defineProperty(Kt,"__esModule",{value:!0});const e=re(),t=ae(),r=Dt(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(n){const{gen:o,data:a,$data:s,schema:i,schemaCode:c,it:u}=n;if(!s&&0===i.length)throw new Error("enum must have non-empty array");const l=i.length>=u.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,t.useFunc)(o,r.default);let m;if(l||s)m=o.let("valid"),n.block$data(m,(function(){o.assign(m,!1),o.forOf("v",c,(t=>o.if(e._`${f()}(${a}, ${t})`,(()=>o.assign(m,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const t=o.const("vSchema",c);m=(0,e.or)(...i.map(((r,n)=>function(t,r){const n=i[r];return"object"==typeof n&&null!==n?e._`${f()}(${a}, ${t}[${r}])`:e._`${a} === ${n}`}(t,n))))}n.pass(m)}};return Kt.default=n,Kt}function Lt(){if(qt)return pt;qt=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=function(){if(mt)return ht;mt=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=re(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{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:t,schemaCode:n})=>e.str`must be ${r[t].okStr} ${n}`,params:({keyword:t,schemaCode:n})=>e._`{comparison: ${r[t].okStr}, limit: ${n}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:n,data:o,schemaCode:a}=t;t.fail$data(e._`${o} ${r[n].fail} ${a} || isNaN(${o})`)}};return ht.default=o,ht}(),t=function(){if(yt)return gt;yt=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=re(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:r,data:n,schemaCode:o,it:a}=t,s=a.opts.multipleOfPrecision,i=r.let("res"),c=s?e._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:e._`${i} !== parseInt(${i})`;t.fail$data(e._`(${o} === 0 || (${i} = ${n}/${o}, ${c}))`)}};return gt.default=t,gt}(),r=wt(),n=function(){if(Pt)return St;Pt=1,Object.defineProperty(St,"__esModule",{value:!0});const e=xe(),t=re(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>t.str`must match pattern "${e}"`,params:({schemaCode:e})=>t._`{pattern: ${e}}`},code(r){const{data:n,$data:o,schema:a,schemaCode:s,it:i}=r,c=i.opts.unicodeRegExp?"u":"",u=o?t._`(new RegExp(${s}, ${c}))`:(0,e.usePattern)(r,a);r.fail$data(t._`!${u}.test(${n})`)}};return St.default=r,St}(),o=function(){if(Et)return jt;Et=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=re(),t={message({keyword:t,schemaCode:r}){const n="maxProperties"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} properties`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,a="maxProperties"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`Object.keys(${n}).length ${a} ${o}`)}};return jt.default=r,jt}(),a=Ot(),s=function(){if(Nt)return Ct;Nt=1,Object.defineProperty(Ct,"__esModule",{value:!0});const e=re(),t={message({keyword:t,schemaCode:r}){const n="maxItems"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} items`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,a="maxItems"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`${n}.length ${a} ${o}`)}};return Ct.default=r,Ct}(),i=At(),c=function(){if(Vt)return zt;Vt=1,Object.defineProperty(zt,"__esModule",{value:!0});const e=re(),t=ae(),r=Dt(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(n){const{gen:o,data:a,$data:s,schemaCode:i,schema:c}=n;s||c&&"object"==typeof c?n.fail$data(e._`!${(0,t.useFunc)(o,r.default)}(${a}, ${i})`):n.fail(e._`${c} !== ${a}`)}};return zt.default=n,zt}(),u=Ut(),l=[e.default,t.default,r.default,n.default,o.default,a.default,s.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return pt.default=l,pt}var Gt,Jt={},Ht={};function Bt(){if(Gt)return Ht;Gt=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.validateAdditionalItems=void 0;const e=re(),t=ae(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{parentSchema:r,it:o}=e,{items:a}=r;Array.isArray(a)?n(e,a):(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(r,n){const{gen:o,schema:a,data:s,keyword:i,it:c}=r;c.items=!0;const u=o.const("len",e._`${s}.length`);if(!1===a)r.setParams({len:n.length}),r.pass(e._`${u} <= ${n.length}`);else if("object"==typeof a&&!(0,t.alwaysValidSchema)(c,a)){const a=o.var("valid",e._`${u} <= ${n.length}`);o.if((0,e.not)(a),(()=>function(a){o.forRange("i",n.length,u,(n=>{r.subschema({keyword:i,dataProp:n,dataPropType:t.Type.Num},a),c.allErrors||o.if((0,e.not)(a),(()=>o.break()))}))}(a))),r.ok(a)}}return Ht.validateAdditionalItems=n,Ht.default=r,Ht}var Wt,Zt,Qt={},Yt={};function Xt(){if(Wt)return Yt;Wt=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.validateTuple=void 0;const e=re(),t=ae(),r=xe(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:n,it:a}=e;if(Array.isArray(n))return o(e,"additionalItems",n);a.items=!0,(0,t.alwaysValidSchema)(a,n)||e.ok((0,r.validateArray)(e))}};function o(r,n,o=r.schema){const{gen:a,parentSchema:s,data:i,keyword:c,it:u}=r;!function(e){const{opts:r,errSchemaPath:a}=u,s=o.length,i=s===e.minItems&&(s===e.maxItems||!1===e[n]);if(r.strictTuples&&!i){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${n} are not specified or different at path "${a}"`;(0,t.checkStrictMode)(u,e,r.strictTuples)}}(s),u.opts.unevaluated&&o.length&&!0!==u.items&&(u.items=t.mergeEvaluated.items(a,o.length,u.items));const l=a.name("valid"),d=a.const("len",e._`${i}.length`);o.forEach(((n,o)=>{(0,t.alwaysValidSchema)(u,n)||(a.if(e._`${d} > ${o}`,(()=>r.subschema({keyword:c,schemaProp:o,dataProp:o},l))),r.ok(l))}))}return Yt.validateTuple=o,Yt.default=n,Yt}var er,tr={};var rr,nr={};function or(){if(rr)return nr;rr=1,Object.defineProperty(nr,"__esModule",{value:!0});const e=re(),t=ae(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${r}}`},code(r){const{gen:n,schema:o,parentSchema:a,data:s,it:i}=r;let c,u;const{minContains:l,maxContains:d}=a;i.opts.next?(c=void 0===l?1:l,u=d):c=1;const f=n.const("len",e._`${s}.length`);if(r.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,t.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,t.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void r.fail();if((0,t.alwaysValidSchema)(i,o)){let t=e._`${f} >= ${c}`;return void 0!==u&&(t=e._`${t} && ${f} <= ${u}`),void r.pass(t)}i.items=!0;const m=n.name("valid");function p(){const t=n.name("_valid"),r=n.let("count",0);h(t,(()=>n.if(t,(()=>function(t){n.code(e._`${t}++`),void 0===u?n.if(e._`${t} >= ${c}`,(()=>n.assign(m,!0).break())):(n.if(e._`${t} > ${u}`,(()=>n.assign(m,!1).break())),1===c?n.assign(m,!0):n.if(e._`${t} >= ${c}`,(()=>n.assign(m,!0))))}(r)))))}function h(e,o){n.forRange("i",0,f,(n=>{r.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},e),o()}))}void 0===u&&1===c?h(m,(()=>n.if(m,(()=>n.break())))):0===c?(n.let(m,!0),void 0!==u&&n.if(e._`${s}.length > 0`,p)):(n.let(m,!1),p()),r.result(m,(()=>r.reset()))}};return nr.default=r,nr}var ar,sr={};function ir(){return ar||(ar=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=re(),r=ae(),n=xe();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
6
+ missingProperty: ${o},
7
+ depsCount: ${r},
8
+ deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),s(e,r)}};function a(e,r=e.schema){const{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;const i=o.let("missing");for(const c in r){const u=r[c];if(0===u.length)continue;const l=(0,n.propertyInData)(o,a,c,s.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),s.allErrors?o.if(l,(()=>{for(const t of u)(0,n.checkReportMissingProp)(e,t)})):(o.if(t._`${l} && (${(0,n.checkMissingProp)(e,u,i)})`),(0,n.reportMissingProp)(e,i),o.else())}}function s(e,t=e.schema){const{gen:o,data:a,keyword:s,it:i}=e,c=o.name("valid");for(const u in t)(0,r.alwaysValidSchema)(i,t[u])||(o.if((0,n.propertyInData)(o,a,u,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>o.var(c,!0))),e.ok(c))}e.validatePropertyDeps=a,e.validateSchemaDeps=s,e.default=o}(sr)),sr}var cr,ur={};var lr,dr={};function fr(){if(lr)return dr;lr=1,Object.defineProperty(dr,"__esModule",{value:!0});const e=xe(),t=re(),r=le(),n=ae(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:a,schema:s,parentSchema:i,data:c,errsCount:u,it:l}=o;if(!u)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=l;if(l.props=!0,"all"!==f.removeAdditional&&(0,n.alwaysValidSchema)(l,s))return;const m=(0,e.allSchemaProperties)(i.properties),p=(0,e.allSchemaProperties)(i.patternProperties);function h(e){a.code(t._`delete ${c}[${e}]`)}function y(e){if("all"===f.removeAdditional||f.removeAdditional&&!1===s)h(e);else{if(!1===s)return o.setParams({additionalProperty:e}),o.error(),void(d||a.break());if("object"==typeof s&&!(0,n.alwaysValidSchema)(l,s)){const r=a.name("valid");"failing"===f.removeAdditional?(g(e,r,!1),a.if((0,t.not)(r),(()=>{o.reset(),h(e)}))):(g(e,r),d||a.if((0,t.not)(r),(()=>a.break())))}}}function g(e,t,r){const a={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(a,t)}a.forIn("key",c,(r=>{m.length||p.length?a.if(function(r){let s;if(m.length>8){const t=(0,n.schemaRefOrVal)(l,i.properties,"properties");s=(0,e.isOwnProperty)(a,t,r)}else s=m.length?(0,t.or)(...m.map((e=>t._`${r} === ${e}`))):t.nil;return p.length&&(s=(0,t.or)(s,...p.map((n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`)))),(0,t.not)(s)}(r),(()=>y(r))):y(r)})),o.ok(t._`${u} === ${r.default.errors}`)}};return dr.default=o,dr}var mr,pr={};var hr,yr={};var gr,vr={};var $r,_r={};var br,wr={};var Pr,Sr={};var Er,jr={};var xr,kr,Or={};function Nr(){if(kr)return Jt;kr=1,Object.defineProperty(Jt,"__esModule",{value:!0});const e=Bt(),t=function(){if(Zt)return Qt;Zt=1,Object.defineProperty(Qt,"__esModule",{value:!0});const e=Xt(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return Qt.default=t,Qt}(),r=Xt(),n=function(){if(er)return tr;er=1,Object.defineProperty(tr,"__esModule",{value:!0});const e=re(),t=ae(),r=xe(),n=Bt(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{schema:o,parentSchema:a,it:s}=e,{prefixItems:i}=a;s.items=!0,(0,t.alwaysValidSchema)(s,o)||(i?(0,n.validateAdditionalItems)(e,i):e.ok((0,r.validateArray)(e)))}};return tr.default=o,tr}(),o=or(),a=ir(),s=function(){if(cr)return ur;cr=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=re(),t=ae(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:a,it:s}=r;if((0,t.alwaysValidSchema)(s,o))return;const i=n.name("valid");n.forIn("key",a,(t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},i),n.if((0,e.not)(i),(()=>{r.error(!0),s.allErrors||n.break()}))})),r.ok(i)}};return ur.default=r,ur}(),i=fr(),c=function(){if(mr)return pr;mr=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=qe(),t=xe(),r=ae(),n=fr(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:i,data:c,it:u}=o;"all"===u.opts.removeAdditional&&void 0===i.additionalProperties&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const l=(0,t.allSchemaProperties)(s);for(const e of l)u.definedProperties.add(e);u.opts.unevaluated&&l.length&&!0!==u.props&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(l),u.props));const d=l.filter((e=>!(0,r.alwaysValidSchema)(u,s[e])));if(0===d.length)return;const f=a.name("valid");for(const e of d)m(e)?p(e):(a.if((0,t.propertyInData)(a,c,e,u.opts.ownProperties)),p(e),u.allErrors||a.else().var(f,!0),a.endIf()),o.it.definedProperties.add(e),o.ok(f);function m(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==s[e].default}function p(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},f)}}};return pr.default=o,pr}(),u=function(){if(hr)return yr;hr=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=xe(),t=re(),r=ae(),n=ae(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:i,parentSchema:c,it:u}=o,{opts:l}=u,d=(0,e.allSchemaProperties)(s),f=d.filter((e=>(0,r.alwaysValidSchema)(u,s[e])));if(0===d.length||f.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;const m=l.strictSchema&&!l.allowMatchingProperties&&c.properties,p=a.name("valid");!0===u.props||u.props instanceof t.Name||(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:h}=u;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,r.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){a.forIn("key",i,(s=>{a.if(t._`${(0,e.usePattern)(o,r)}.test(${s})`,(()=>{const e=f.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:n.Type.Str},p),u.opts.unevaluated&&!0!==h?a.assign(t._`${h}[${s}]`,!0):e||u.allErrors||a.if((0,t.not)(p),(()=>a.break()))}))}))}!function(){for(const e of d)m&&y(e),u.allErrors?g(e):(a.var(p,!0),g(e),a.if(p))}()}};return yr.default=o,yr}(),l=function(){if(gr)return vr;gr=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=ae(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const a=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};return vr.default=t,vr}(),d=function(){if($r)return _r;$r=1,Object.defineProperty(_r,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xe().validateUnion,error:{message:"must match a schema in anyOf"}};return _r.default=e,_r}(),f=function(){if(br)return wr;br=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=re(),t=ae(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:a,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&a.discriminator)return;const i=o,c=n.let("valid",!1),u=n.let("passing",null),l=n.name("_valid");r.setParams({passing:u}),n.block((function(){i.forEach(((o,a)=>{let i;(0,t.alwaysValidSchema)(s,o)?n.var(l,!0):i=r.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},l),a>0&&n.if(e._`${l} && ${c}`).assign(c,!1).assign(u,e._`[${u}, ${a}]`).else(),n.if(l,(()=>{n.assign(c,!0),n.assign(u,a),i&&r.mergeEvaluated(i,e.Name)}))}))})),r.result(c,(()=>r.reset()),(()=>r.error(!0)))}};return wr.default=r,wr}(),m=function(){if(Pr)return Sr;Pr=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ae(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=r.name("valid");n.forEach(((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const s=t.subschema({keyword:"allOf",schemaProp:n},a);t.ok(a),t.mergeEvaluated(s)}))}};return Sr.default=t,Sr}(),p=function(){if(Er)return jr;Er=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=re(),t=ae(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:a,it:s}=r;void 0===a.then&&void 0===a.else&&(0,t.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const i=n(s,"then"),c=n(s,"else");if(!i&&!c)return;const u=o.let("valid",!0),l=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);r.mergeEvaluated(e)}(),r.reset(),i&&c){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(l,d("then",e),d("else",e))}else i?o.if(l,d("then")):o.if((0,e.not)(l),d("else"));function d(t,n){return()=>{const a=r.subschema({keyword:t},l);o.assign(u,l),r.mergeValidEvaluated(a,u),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(u,(()=>r.error(!0)))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return jr.default=r,jr}(),h=function(){if(xr)return Or;xr=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=ae(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return Or.default=t,Or}();return Jt.default=function(y=!1){const g=[l.default,d.default,f.default,m.default,p.default,h.default,s.default,i.default,a.default,c.default,u.default];return y?g.push(t.default,n.default):g.push(e.default,r.default),g.push(o.default),g},Jt}var Cr,Tr,Rr={},Ir={};function Mr(){if(Tr)return Rr;Tr=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=function(){if(Cr)return Ir;Cr=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=re(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:a,schema:s,schemaCode:i,it:c}=t,{opts:u,errSchemaPath:l,schemaEnv:d,self:f}=c;u.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:f.formats,code:u.code.formats}),s=n.const("fDef",e._`${a}[${i}]`),c=n.let("fType"),l=n.let("format");n.if(e._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>n.assign(c,e._`${s}.type || "string"`).assign(l,e._`${s}.validate`)),(()=>n.assign(c,e._`"string"`).assign(l,s))),t.fail$data((0,e.or)(!1===u.strictSchema?e.nil:e._`${i} && !${l}`,function(){const t=d.$async?e._`(${s}.async ? await ${l}(${o}) : ${l}(${o}))`:e._`${l}(${o})`,n=e._`(typeof ${l} == "function" ? ${t} : ${l}.test(${o}))`;return e._`${l} && ${l} !== true && ${c} === ${r} && !${n}`}()))}():function(){const a=f.formats[s];if(!a)return void function(){if(!1!==u.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}f.logger.warn(e())}();if(!0===a)return;const[i,c,m]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):u.code.formats?e._`${u.code.formats}${(0,e.getProperty)(s)}`:void 0,o=n.scopeValue("formats",{key:s,ref:t,code:r});return"object"!=typeof t||t instanceof RegExp?["string",t,o]:[t.type||"string",t.validate,e._`${o}.validate`]}(a);i===r&&t.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw new Error("async format in sync schema");return e._`await ${m}(${o})`}return"function"==typeof c?e._`${m}(${o})`:e._`${m}.test(${o})`}())}())}};return Ir.default=t,Ir}(),t=[e.default];return Rr.default=t,Rr}var Dr,Ar,Vr={};function zr(){if(Ar)return st;Ar=1,Object.defineProperty(st,"__esModule",{value:!0});const e=ft(),t=Lt(),r=Nr(),n=Mr(),o=(Dr||(Dr=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.contentVocabulary=Vr.metadataVocabulary=void 0,Vr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vr),a=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return st.default=a,st}var Fr,qr,Kr={},Ur={};function Lr(){if(qr)return Kr;qr=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=re(),t=(Fr||(Fr=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(Ur.DiscrError=r={}))),Ur);var r;const n=Ze(),o=He(),a=ae(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(r){const{gen:s,data:i,schema:c,parentSchema:u,it:l}=r,{oneOf:d}=u;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=c.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const m=s.let("valid",!1),p=s.const("tag",e._`${i}${(0,e.getProperty)(f)}`);function h(t){const n=s.name("valid"),o=r.subschema({keyword:"oneOf",schemaProp:t},n);return r.mergeEvaluated(o,e.Name),n}s.if(e._`typeof ${p} == "string"`,(()=>function(){const i=function(){var e;const t={},r=i(u);let s=!0;for(let t=0;t<d.length;t++){let u=d[t];if((null==u?void 0:u.$ref)&&!(0,a.schemaHasRulesButRef)(u,l.self.RULES)){const e=u.$ref;if(u=n.resolveRef.call(l.self,l.schemaEnv.root,l.baseId,e),u instanceof n.SchemaEnv&&(u=u.schema),void 0===u)throw new o.default(l.opts.uriResolver,l.baseId,e)}const m=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof m)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);s=s&&(r||i(u)),c(m,t)}if(!s)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function c(e,t){if(e.const)m(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)m(r,t)}}function m(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();s.if(!1);for(const t in i)s.elseIf(e._`${p} === ${t}`),s.assign(m,h(i[t]));s.else(),r.error(!1,{discrError:t.DiscrError.Mapping,tag:p,tagName:f}),s.endIf()}()),(()=>r.error(!1,{discrError:t.DiscrError.Tag,tag:p,tagName:f}))),r.ok(m)}};return Kr.default=s,Kr}var Gr,Jr={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$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},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:"boolean",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:"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:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Hr,Br,Wr={exports:{}},Zr={exports:{}},Qr={exports:{}},Yr={exports:{}};function Xr(){return Br||(Br=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r((Hr||(Hr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re(),n=["undefined","string","number","object","function","boolean","symbol"];function o(){return{keyword:"typeof",schemaType:["string","array"],code(e){const{data:t,schema:n,schemaValue:o}=e;e.fail("string"==typeof n?r._`typeof ${t} != ${n}`:r._`${o}.indexOf(typeof ${t}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}t.default=o,e.exports=o}(Yr,Yr.exports)),Yr.exports)),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(Qr,Qr.exports)),Qr.exports}var en,tn,rn={exports:{}},nn={exports:{}};function on(){return tn||(tn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r((en||(en=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};"undefined"!=typeof Buffer&&(r.Buffer=Buffer),"undefined"!=typeof Promise&&(r.Promise=Promise);const n=Object.assign((function(){return{keyword:"instanceof",schemaType:["string","array"],compile(e){if("string"==typeof e){const t=o(e);return e=>e instanceof t}if(Array.isArray(e)){const t=e.map(o);return e=>{for(const r of t)if(e instanceof r)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}),{CONSTRUCTORS:r});function o(e){const t=r[e];if(t)return t;throw new Error(`invalid "instanceof" keyword value ${e}`)}t.default=n,e.exports=n}(nn,nn.exports)),nn.exports)),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(rn,rn.exports)),rn.exports}var an,sn,cn,un={exports:{}},ln={exports:{}},dn={};function fn(){if(an)return dn;return an=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=function(e){return()=>({keyword:e,type:"number",schemaType:"array",macro:function([t,r]){return function(t,r){if(t>r||"exclusiveRange"===e&&t===r)throw new Error("There are no numbers in range")}(t,r),"range"===e?{minimum:t,maximum:r}:{exclusiveMinimum:t,exclusiveMaximum:r}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}})},dn}function mn(){return sn||(sn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=(0,r(fn()).default)("range");t.default=n,e.exports=n}(ln,ln.exports)),ln.exports}var pn,hn,yn={exports:{}},gn={exports:{}};function vn(){return pn||(pn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=(0,r(fn()).default)("exclusiveRange");t.default=n,e.exports=n}(gn,gn.exports)),gn.exports}var $n,_n,bn,wn={exports:{}},Pn={exports:{}},Sn={};function En(){if($n)return Sn;$n=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.usePattern=Sn.metaSchemaRef=void 0;const e=re();return Sn.metaSchemaRef=function({defaultMeta:e}={}){return!1===e?{}:{$ref:e||"http://json-schema.org/schema"}},Sn.usePattern=function({gen:t,it:{opts:r}},n,o=(r.unicodeRegExp?"u":"")){const a=new RegExp(n,o);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`new RegExp(${n}, ${o})`})},Sn}function jn(){return _n||(_n=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re(),n=En(),o={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function s(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(e){const{data:t,schema:o}=e,s=function(t){if("object"==typeof t)return(0,n.usePattern)(e,t.pattern,t.flags);const r=a.exec(t);if(r)return(0,n.usePattern)(e,r[1],r[2]);throw new Error("cannot parse string into RegExp")}(o);e.pass(r._`${s}.test(${t})`)},metaSchema:{anyOf:[{type:"string"},o]}}}t.default=s,e.exports=s}(Pn,Pn.exports)),Pn.exports}var xn,kn,On={exports:{}},Nn={exports:{}};function Cn(){return xn||(xn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re(),n={trimStart:e=>e.trimStart(),trimEnd:e=>e.trimEnd(),trimLeft:e=>e.trimStart(),trimRight:e=>e.trimEnd(),trim:e=>e.trim(),toLowerCase:e=>e.toLowerCase(),toUpperCase:e=>e.toUpperCase(),toEnumCase:(e,t)=>(null==t?void 0:t.hash[a(e)])||e},o=Object.assign((function(){return{keyword:"transform",schemaType:"array",before:"enum",code(e){const{gen:t,data:o,schema:s,parentSchema:i,it:c}=e,{parentData:u,parentDataProperty:l}=c,d=s;if(!d.length)return;let f;if(d.includes("toEnumCase")){const e=function(e){const t={hash:{}};if(!e.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const r of e.enum){if("string"!=typeof r)continue;const e=a(r);if(t.hash[e])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');t.hash[e]=r}return t}(i);f=t.scopeValue("obj",{ref:e,code:(0,r.stringify)(e)})}function m(e){if(!e.length)return o;const a=e.pop();if(!(a in n))throw new Error(`transform: unknown transformation ${a}`);const s=t.scopeValue("func",{ref:n[a],code:r._`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(a)}`}),i=m(e);return f&&"toEnumCase"===a?r._`${s}(${i}, ${f})`:r._`${s}(${i})`}t.if(r._`typeof ${o} == "string" && ${u} !== undefined`,(()=>{t.assign(o,m(d.slice())),t.assign(r._`${u}[${l}]`,o)}))},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}),{transform:n});function a(e){return e.toLowerCase()}t.default=o,e.exports=o}(Nn,Nn.exports)),Nn.exports}var Tn,Rn,In={exports:{}},Mn={exports:{}};function Dn(){return Tn||(Tn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ie(),n=["number","integer","string","boolean","null"];function o(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(e,t){const o=function(e,t){return e.map((e=>{var r,o,a;const s=null===(a=null===(o=null===(r=t.items)||void 0===r?void 0:r.properties)||void 0===o?void 0:o[e])||void 0===a?void 0:a.type;return Array.isArray(s)?!s.includes("object")&&!s.includes("array"):n.includes(s)}))}(e,t);return t=>{if(t.length<=1)return!0;for(let n=0;n<e.length;n++){const a=e[n];if(o[n]){const e={};for(const r of t){if(!r||"object"!=typeof r)continue;let t=r[a];if(!t||"object"!=typeof t){if("string"==typeof t&&(t='"'+t),e[t])return!1;e[t]=!0}}}else for(let e=t.length;e--;){const n=t[e];if(n&&"object"==typeof n)for(let o=e;o--;){const e=t[o];if(e&&"object"==typeof e&&r(n[a],e[a]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}t.default=o,e.exports=o}(Mn,Mn.exports)),Mn.exports}var An,Vn,zn={exports:{}},Fn={exports:{}};function qn(){return An||(An=1,function(e,t){function r(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(e,t){if(!e)return!0;const r=Object.keys(t.properties);return 0===r.length||{required:r}},dependencies:["properties"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=r}(Fn,Fn.exports)),Fn.exports}var Kn,Un,Ln,Gn={exports:{}},Jn={exports:{}},Hn={};function Bn(){if(Kn)return Hn;return Kn=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.default=function(e){return()=>({keyword:e,type:"object",schemaType:"array",macro(t){if(0===t.length)return!0;if(1===t.length)return{required:t};const r="anyRequired"===e?"anyOf":"oneOf";return{[r]:t.map((e=>({required:[e]})))}},metaSchema:{type:"array",items:{type:"string"}}})},Hn}function Wn(){return Un||(Un=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=(0,r(Bn()).default)("anyRequired");t.default=n,e.exports=n}(Jn,Jn.exports)),Jn.exports}var Zn,Qn,Yn={exports:{}},Xn={exports:{}};function eo(){return Zn||(Zn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=(0,r(Bn()).default)("oneRequired");t.default=n,e.exports=n}(Xn,Xn.exports)),Xn.exports}var to,ro,no={exports:{}},oo={exports:{}};function ao(){return to||(to=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re(),n=En(),o={message:({params:{missingPattern:e}})=>r.str`should have property matching pattern '${e}'`,params:({params:{missingPattern:e}})=>r._`{missingPattern: ${e}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:o,code(e){const{gen:t,schema:o,data:a}=e;if(0===o.length)return;const s=t.let("valid",!0);for(const e of o)i(e);function i(o){const i=t.let("matched",!1);t.forIn("key",a,(a=>{t.assign(i,r._`${(0,n.usePattern)(e,o)}.test(${a})`),t.if(i,(()=>t.break()))})),e.setParams({missingPattern:o}),t.assign(s,(0,r.and)(s,i)),e.pass(s)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}t.default=a,e.exports=a}(oo,oo.exports)),oo.exports}var so,io,co={exports:{}},uo={exports:{}};function lo(){return so||(so=1,function(e,t){function r(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(e){return 0===e.length||(1===e.length?{not:{required:e}}:{not:{anyOf:e.map((e=>({required:[e]})))}})},metaSchema:{type:"array",items:{type:"string"}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=r}(uo,uo.exports)),uo.exports}var fo,mo,po={exports:{}},ho={exports:{}};function yo(){return fo||(fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=En();function n(e){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(e){const t=[];for(const r in e)t.push(o(r,e[r]));return{allOf:t}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,r.metaSchemaRef)(e)}}}function o(e,t){const r=e.split("/"),n={};let o=n;for(let e=1;e<r.length;e++){let n=r[e];const a=e===r.length-1;n=n.replace(/~1/g,"/").replace(/~0/g,"~");const s=o.properties={};let i;if(/[0-9]+/.test(n)){let e=+n;for(i=o.items=[],o.type=["object","array"];e--;)i.push({})}else o.type="object";o=a?t:{},s[n]=o,i&&i.push(o)}return n}t.default=n,e.exports=n}(ho,ho.exports)),ho.exports}var go,vo,$o={exports:{}},_o={exports:{}};function bo(){return go||(go=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(e){const{schema:t,data:n}=e,o=t.map((e=>r._`(${function(e){if(""===e)throw new Error("empty JSON pointer not allowed");const t=e.split("/");let o=n;const a=t.map(((e,t)=>t?o=r._`${o}${(0,r.getProperty)(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}(e))}`:o));return(0,r.and)(...a)}(e)}) === undefined`));e.fail((0,r.or)(...o))},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}t.default=n,e.exports=n}(_o,_o.exports)),_o.exports}var wo,Po,So={exports:{}},Eo={exports:{}};function jo(){return wo||(wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>(new Date).toISOString(),date:()=>()=>(new Date).toISOString().slice(0,10),time:()=>()=>(new Date).toISOString().slice(11),random:()=>()=>Math.random(),randomint:e=>{var t;const r=null!==(t=null==e?void 0:e.max)&&void 0!==t?t:2;return()=>Math.floor(Math.random()*r)},seq:e=>{var t;const n=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"";return r[n]||(r[n]=0),()=>r[n]++}},o=Object.assign((function(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(e,t,r){if(!r.opts.useDefaults||r.compositeRule)return()=>!0;const o={};for(const t in e)o[t]="object"==typeof(s=e[t])?function({func:e,args:t}){const r=n[e];return a(e,r),r(t)}(s):function(e=""){const t=n[e];return a(e,t),t()}(s);var s;const i="empty"===r.opts.useDefaults;return t=>{for(const r in e)(void 0===t[r]||i&&(null===t[r]||""===t[r]))&&(t[r]=o[r]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}),{DEFAULTS:n});function a(e,t){if(!t)throw new Error(`invalid "dynamicDefaults" keyword property value: ${e}`)}t.default=o,e.exports=o}(Eo,Eo.exports)),Eo.exports}var xo,ko,Oo,No,Co={exports:{}},To={exports:{}};function Ro(){return xo||(xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=re(),n=En(),o={message:({params:{schemaProp:e}})=>e?r.str`should match case "${e}" schema`:r.str`should match default case schema`,params:({params:{schemaProp:e}})=>e?r._`{failingCase: ${e}}`:r._`{failingDefault: true}`};function a(e){const t=(0,n.metaSchemaRef)(e);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:o,dependencies:["selectCases"],code(e){const{gen:t,schemaCode:n,parentSchema:o}=e;e.block$data(r.nil,(()=>{const a=t.let("valid",!0),s=t.name("_valid"),i=t.const("value",r._`${n} === null ? "null" : ${n}`);t.if(!1);for(const n in o.selectCases){e.setParams({schemaProp:n}),t.elseIf(r._`"" + ${i} == ${n}`);const o=e.subschema({keyword:"selectCases",schemaProp:n},s);e.mergeEvaluated(o,r.Name),t.assign(a,s)}if(t.else(),void 0!==o.selectDefault){e.setParams({schemaProp:void 0});const n=e.subschema({keyword:"selectDefault"},s);e.mergeEvaluated(n,r.Name),t.assign(a,s)}t.endIf(),e.pass(a)}))}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:t}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:t}]}t.default=a,e.exports=a}(To,To.exports)),To.exports}function Io(){return Oo||(Oo=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Xr()),o=r(on()),a=r((cn||(cn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(mn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(un,un.exports)),un.exports)),s=r((hn||(hn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(vn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(yn,yn.exports)),yn.exports)),c=r((bn||(bn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(jn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(wn,wn.exports)),wn.exports)),u=r((kn||(kn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Cn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(On,On.exports)),On.exports)),l=r((Rn||(Rn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Dn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(In,In.exports)),In.exports)),d=r((Vn||(Vn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(qn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(zn,zn.exports)),zn.exports)),f=r((Ln||(Ln=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Wn()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(Gn,Gn.exports)),Gn.exports)),m=r((Qn||(Qn=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(eo()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(Yn,Yn.exports)),Yn.exports)),p=r((ro||(ro=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(ao()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(no,no.exports)),no.exports)),h=r((io||(io=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(lo()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(co,co.exports)),co.exports)),y=r((mo||(mo=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(yo()),o=(e,t)=>e.addKeyword((0,n.default)(t));t.default=o,e.exports=o}(po,po.exports)),po.exports)),g=r((vo||(vo=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(bo()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}($o,$o.exports)),$o.exports)),v=r((Po||(Po=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(jo()),o=e=>e.addKeyword((0,n.default)());t.default=o,e.exports=o}(So,So.exports)),So.exports)),$=r((ko||(ko=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Ro()),o=(e,t)=>((0,n.default)(t).forEach((t=>e.addKeyword(t))),e);t.default=o,e.exports=o}(Co,Co.exports)),Co.exports)),_={typeof:n.default,instanceof:o.default,range:a.default,exclusiveRange:s.default,regexp:c.default,transform:u.default,uniqueItemProperties:l.default,allRequired:d.default,anyRequired:f.default,oneRequired:m.default,patternRequired:p.default,prohibited:h.default,deepProperties:y.default,deepRequired:g.default,dynamicDefaults:v.default,select:$.default};t.default=_,e.exports=_}(Zr,Zr.exports)),Zr.exports}var Mo,Do={exports:{}},Ao={};var Vo,zo={},Fo={exports:{}},qo={},Ko={},Uo={},Lo={},Go={},Jo={};function Ho(){return Vo||(Vo=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(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)i(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const a=new n("+");function s(e,...t){const r=[u(e[0])];let o=0;for(;o<t.length;)r.push(a),i(r,t[o]),r.push(a,u(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function i(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:u(Array.isArray(o)?o.join(","):o))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=s,e.addCodeArg=i,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},e.stringify=function(e){return new n(u(e))},e.safeStringify=u,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(Jo)),Jo}var Bo,Wo,Zo={};function Qo(){return Bo||(Bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ho();class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class a extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=a;const s=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,a=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(a);if(e)return e}else s=this._values[o]=new Map;s.set(a,n);const i=this._scope[o]||(this._scope[o]=[]),c=i.length;return i[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(o,a,s={},i){let c=t.nil;for(const u in o){const l=o[u];if(!l)continue;const d=s[u]=s[u]||new Map;l.forEach((o=>{if(d.has(o))return;d.set(o,n.Started);let s=a(o);if(s){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${o} = ${s};${this.opts._n}`}else{if(!(s=null==i?void 0:i(o)))throw new r(o);c=t._`${c}${s}${this.opts._n}`}d.set(o,n.Completed)}))}return c}}}(Zo)),Zo}function Yo(){return Wo||(Wo=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=Ho(),r=Qo();var n=Ho();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),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.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=Qo();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._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 a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class s extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,e,r),this}get names(){return k(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends i{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=O(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(N(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class p extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class h extends m{}class y extends p{}y.kind="else";class g extends p{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(C(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=O(this.condition,e,t),this}get names(){const e=super.names;return k(e,this.condition),this.else&&x(e,this.else.names),e}}g.kind="if";class v extends p{}v.kind="for";class $ extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=O(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class _ extends v{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:a}=this;return`for(${t} ${n}=${o}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){const e=k(super.names,this.from);return k(e,this.to)}}class b extends v{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=O(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class w extends p{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}w.kind="func";class P extends m{render(e){return"return "+super.render(e)}}P.kind="return";class S extends p{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class E extends p{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}E.kind="catch";class j extends p{render(e){return"finally"+super.render(e)}}j.kind="finally";function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function k(e,r){return r instanceof t._CodeOrName?x(e,r.names):e}function O(e,r,n){return e instanceof t.Name?a(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=a(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var o;function a(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function C(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${M(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new s(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new i(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,n,o,a=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const s=this._scope.toName(e);return this._for(new _(a,s,t,n),(()=>o(s)))}forOf(e,n,o,a=r.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(s,t._`${e}[${r}]`),o(s)}))}return this._for(new b("of",a,s,n),(()=>o(s)))}forIn(e,n,o,a=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const s=this._scope.toName(e);return this._for(new b("in",a,s,n),(()=>o(s)))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new E(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(E,j)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new w(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=C;const T=I(e.operators.AND);e.and=function(...e){return e.reduce(T)};const R=I(e.operators.OR);function I(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${M(r)} ${e} ${M(n)}`}function M(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(R)}}(Go)),Go}var Xo,ea={};function ta(){return Xo||(Xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=Yo(),r=Ho();function n(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:e,mergeToName:r,mergeValues:n,resultToName:o}){return(a,s,i,c)=>{const u=void 0===i?s:i instanceof t.Name?(s instanceof t.Name?e(a,s,i):r(a,s,i),i):s instanceof t.Name?(r(a,i,s),s):n(s,i);return c!==t.Name||u instanceof t.Name?u:o(a,u)}}function c(e,r){if(!0===r)return e.var("props",!0);const n=e.var("props",t._`{}`);return void 0!==r&&u(e,n,r),n}function u(e,r,n){Object.keys(n).forEach((n=>e.assign(t._`${r}${(0,t.getProperty)(n)}`,!0)))}e.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!o(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=o,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:r},n,o,a){if(!a){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return t._`${n}`}return t._`${e}${r}${(0,t.getProperty)(o)}`},e.unescapeFragment=function(e){return s(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(a(e))},e.escapeJsonPointer=a,e.unescapeJsonPointer=s,e.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},e.mergeEvaluated={props:i({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>{e.if(t._`${r} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,t._`${n} || {}`).code(t._`Object.assign(${n}, ${r})`)))})),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>{!0===r?e.assign(n,!0):(e.assign(n,t._`${n} || {}`),u(e,n,r))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:c}),items:i({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>e.assign(n,t._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`))),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>e.assign(n,!0===r||t._`${n} > ${r} ? ${n} : ${r}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=c,e.setEvaluated=u;const l={};var d;function f(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(d=e.Type||(e.Type={})),e.getErrorPath=function(e,r,n){if(e instanceof t.Name){const o=r===d.Num;return n?o?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:o?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,t.getProperty)(e).toString():"/"+a(e)},e.checkStrictMode=f}(ea)),ea}var ra,na,oa,aa={};function sa(){if(ra)return aa;ra=1,Object.defineProperty(aa,"__esModule",{value:!0});const e=Yo(),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.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return aa.default=t,aa}function ia(){return na||(na=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=Yo(),r=ta(),n=sa();function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${o}]`)),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function a(e,r){const{gen:n,validateName:o,schemaEnv:a}=e;a.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,s,c){const{it:u}=r,{gen:l,compositeRule:d,allErrors:f}=u,m=i(r,n,s);(null!=c?c:d||f)?o(l,m):a(u,t._`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,s){const{it:c}=t,{gen:u,compositeRule:l,allErrors:d}=c;o(u,i(t,r,s)),l||d||a(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:a,errsCount:s,it:i}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,n.default.errors,(s=>{e.const(c,t._`${n.default.vErrors}[${s}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,i.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${i.errSchemaPath}/${r}`),i.opts.verbose&&(e.assign(t._`${c}.schema`,o),e.assign(t._`${c}.data`,a))}))};const s={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 i(e,r,o){const{createErrors:a}=e.it;return!1===a?t._`{}`:function(e,r,o={}){const{gen:a,it:i}=e,l=[c(i,o),u(e,o)];return function(e,{params:r,message:o},a){const{keyword:i,data:c,schemaValue:u,it:l}=e,{opts:d,propertyName:f,topSchemaRef:m,schemaPath:p}=l;a.push([s.keyword,i],[s.params,"function"==typeof r?r(e):r||t._`{}`]),d.messages&&a.push([s.message,"function"==typeof o?o(e):o]);d.verbose&&a.push([s.schema,u],[s.parentSchema,t._`${m}${p}`],[n.default.data,c]);f&&a.push([s.propertyName,f])}(e,r,l),a.object(...l)}(e,r,o)}function c({errorPath:e},{instancePath:o}){const a=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,a)]}function u({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:a}){let i=a?n:t.str`${n}/${e}`;return o&&(i=t.str`${i}${(0,r.getErrorPath)(o,r.Type.Str)}`),[s.schemaPath,i]}}(Lo)),Lo}var ca,ua={},la={};function da(){if(ca)return la;ca=1,Object.defineProperty(la,"__esModule",{value:!0}),la.getRules=la.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return la.isJSONType=function(t){return"string"==typeof t&&e.has(t)},la.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},la}var fa,ma,pa={};function ha(){if(fa)return pa;function e(e,r){return r.rules.some((r=>t(e,r)))}function t(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}return fa=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.shouldUseRule=pa.shouldUseGroup=pa.schemaHasRulesForType=void 0,pa.schemaHasRulesForType=function({schema:t,self:r},n){const o=r.RULES.types[n];return o&&!0!==o&&e(t,o)},pa.shouldUseGroup=e,pa.shouldUseRule=t,pa}function ya(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=da(),r=ha(),n=ia(),o=Yo(),a=ta();var s;function i(e){const r=Array.isArray(e)?e:e?[e]:[];if(r.every(t.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(s=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){const t=i(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=i,e.coerceAndCheckDataType=function(e,t){const{gen:n,data:a,opts:i}=e,u=function(e,t){return t?e.filter((e=>c.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),d=t.length>0&&!(0===u.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(d){const r=l(t,a,i.strictNumbers,s.Wrong);n.if(r,(()=>{u.length?function(e,t,r){const{gen:n,data:a,opts:s}=e,i=n.let("dataType",o._`typeof ${a}`),u=n.let("coerced",o._`undefined`);"array"===s.coerceTypes&&n.if(o._`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>n.assign(a,o._`${a}[0]`).assign(i,o._`typeof ${a}`).if(l(t,a,s.strictNumbers),(()=>n.assign(u,a)))));n.if(o._`${u} !== undefined`);for(const e of r)(c.has(e)||"array"===e&&"array"===s.coerceTypes)&&d(e);function d(e){switch(e){case"string":return void n.elseIf(o._`${i} == "number" || ${i} == "boolean"`).assign(u,o._`"" + ${a}`).elseIf(o._`${a} === null`).assign(u,o._`""`);case"number":return void n.elseIf(o._`${i} == "boolean" || ${a} === null
9
+ || (${i} == "string" && ${a} && ${a} == +${a})`).assign(u,o._`+${a}`);case"integer":return void n.elseIf(o._`${i} === "boolean" || ${a} === null
10
+ || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(u,o._`+${a}`);case"boolean":return void n.elseIf(o._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(u,!1).elseIf(o._`${a} === "true" || ${a} === 1`).assign(u,!0);case"null":return n.elseIf(o._`${a} === "" || ${a} === 0 || ${a} === false`),void n.assign(u,null);case"array":n.elseIf(o._`${i} === "string" || ${i} === "number"
11
+ || ${i} === "boolean" || ${a} === null`).assign(u,o._`[${a}]`)}}n.else(),f(e),n.endIf(),n.if(o._`${u} !== undefined`,(()=>{n.assign(a,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,u)}))}(e,t,u):f(e)}))}return d};const c=new Set(["string","number","integer","boolean","null"]);function u(e,t,r,n=s.Correct){const a=n===s.Correct?o.operators.EQ:o.operators.NEQ;let i;switch(e){case"null":return o._`${t} ${a} null`;case"array":i=o._`Array.isArray(${t})`;break;case"object":i=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=c(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=c();break;default:return o._`typeof ${t} ${a} ${e}`}return n===s.Correct?i:(0,o.not)(i);function c(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function l(e,t,r,n){if(1===e.length)return u(e[0],t,r,n);let s;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=o._`typeof ${t} != "object"`;s=i.null?e:o._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=o.nil;i.number&&delete i.integer;for(const e in i)s=(0,o.and)(s,u(e,t,r,n));return s}e.checkDataType=u,e.checkDataTypes=l;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,d)}e.reportTypeError=f}(ua)),ua}var ga,va={};var $a,_a,ba={},wa={};function Pa(){if($a)return wa;$a=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.validateUnion=wa.validateArray=wa.usePattern=wa.callValidateCode=wa.schemaProperties=wa.allSchemaProperties=wa.noPropertyInData=wa.propertyInData=wa.isOwnProperty=wa.hasPropFunc=wa.reportMissingProp=wa.checkMissingProp=wa.checkReportMissingProp=void 0;const e=Yo(),t=ta(),r=sa(),n=ta();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function a(t,r,n){return e._`${o(t)}.call(${r}, ${n})`}function s(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} === undefined`;return o?(0,e.or)(s,(0,e.not)(a(t,r,n))):s}function i(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}wa.checkReportMissingProp=function(t,r){const{gen:n,data:o,it:a}=t;n.if(s(n,o,r,a.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()}))},wa.checkMissingProp=function({gen:t,data:r,it:{opts:n}},o,a){return(0,e.or)(...o.map((o=>(0,e.and)(s(t,r,o,n.ownProperties),e._`${a} = ${o}`))))},wa.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},wa.hasPropFunc=o,wa.isOwnProperty=a,wa.propertyInData=function(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return o?e._`${s} && ${a(t,r,n)}`:s},wa.noPropertyInData=s,wa.allSchemaProperties=i,wa.schemaProperties=function(e,r){return i(r).filter((n=>!(0,t.alwaysValidSchema)(e,r[n])))},wa.callValidateCode=function({schemaCode:t,data:n,it:{gen:o,topSchemaRef:a,schemaPath:s,errorPath:i},it:c},u,l,d){const f=d?e._`${t}, ${n}, ${a}${s}`:n,m=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,i)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&m.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const p=e._`${f}, ${o.object(...m)}`;return l!==e.nil?e._`${u}.call(${l}, ${p})`:e._`${u}(${p})`};const c=e._`new RegExp`;return wa.usePattern=function({gen:t,it:{opts:r}},o){const a=r.unicodeRegExp?"u":"",{regExp:s}=r.code,i=s(o,a);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:e._`${"new RegExp"===s.code?c:(0,n.useFunc)(t,s)}(${o}, ${a})`})},wa.validateArray=function(r){const{gen:n,data:o,keyword:a,it:s}=r,i=n.name("valid");if(s.allErrors){const e=n.let("valid",!0);return c((()=>n.assign(e,!1))),e}return n.var(i,!0),c((()=>n.break())),i;function c(s){const c=n.const("len",e._`${o}.length`);n.forRange("i",0,c,(o=>{r.subschema({keyword:a,dataProp:o,dataPropType:t.Type.Num},i),n.if((0,e.not)(i),s)}))}},wa.validateUnion=function(r){const{gen:n,schema:o,keyword:a,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some((e=>(0,t.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const i=n.let("valid",!1),c=n.name("_valid");n.block((()=>o.forEach(((t,o)=>{const s=r.subschema({keyword:a,schemaProp:o,compositeRule:!0},c);n.assign(i,e._`${i} || ${c}`);r.mergeValidEvaluated(s,c)||n.if((0,e.not)(i))})))),r.result(i,(()=>r.reset()),(()=>r.error(!0)))},wa}function Sa(){if(_a)return ba;_a=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.validateKeywordUsage=ba.validSchemaType=ba.funcKeywordCode=ba.macroKeywordCode=void 0;const e=Yo(),t=sa(),r=Pa(),n=ia();function o(t){const{gen:r,data:n,it:o}=t;r.if(o.parentData,(()=>r.assign(n,e._`${o.parentData}[${o.parentDataProperty}]`)))}function a(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return ba.macroKeywordCode=function(t,r){const{gen:n,keyword:o,schema:s,parentSchema:i,it:c}=t,u=r.macro.call(c.self,s,i,c),l=a(n,o,u);!1!==c.opts.validateSchema&&c.self.validateSchema(u,!0);const d=n.name("valid");t.subschema({schema:u,schemaPath:e.nil,errSchemaPath:`${c.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},d),t.pass(d,(()=>t.error(!0)))},ba.funcKeywordCode=function(s,i){var c;const{gen:u,keyword:l,schema:d,parentSchema:f,$data:m,it:p}=s;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(p,i);const h=!m&&i.compile?i.compile.call(p.self,d,f,p):i.validate,y=a(u,l,h),g=u.let("valid");function v(n=(i.async?e._`await `:e.nil)){const o=p.opts.passContext?t.default.this:t.default.self,a=!("compile"in i&&!m||!1===i.schema);u.assign(g,e._`${n}${(0,r.callValidateCode)(s,y,o,a)}`,i.modifying)}function $(t){var r;u.if((0,e.not)(null!==(r=i.valid)&&void 0!==r?r:g),t)}s.block$data(g,(function(){if(!1===i.errors)v(),i.modifying&&o(s),$((()=>s.error()));else{const r=i.async?function(){const t=u.let("ruleErrs",null);return u.try((()=>v(e._`await `)),(r=>u.assign(g,!1).if(e._`${r} instanceof ${p.ValidationError}`,(()=>u.assign(t,e._`${r}.errors`)),(()=>u.throw(r))))),t}():function(){const t=e._`${y}.errors`;return u.assign(t,null),v(e.nil),t}();i.modifying&&o(s),$((()=>function(r,o){const{gen:a}=r;a.if(e._`Array.isArray(${o})`,(()=>{a.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${o} : ${t.default.vErrors}.concat(${o})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)}),(()=>r.error()))}(s,r)))}})),s.ok(null!==(c=i.valid)&&void 0!==c?c:g)},ba.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},ba.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,a){if(Array.isArray(o.keyword)?!o.keyword.includes(a):o.keyword!==a)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[a])){const e=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},ba}var Ea,ja={};var xa,ka,Oa,Na={},Ca={exports:{}};function Ta(){if(xa)return Ca.exports;xa=1;var e=Ca.exports=function(e,r,n){"function"==typeof r&&(n=r,r={}),t(r,"function"==typeof(n=r.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function t(r,n,o,a,s,i,c,u,l,d){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var f in n(a,s,i,c,u,l,d),a){var m=a[f];if(Array.isArray(m)){if(f in e.arrayKeywords)for(var p=0;p<m.length;p++)t(r,n,o,m[p],s+"/"+f+"/"+p,i,s,f,a,p)}else if(f in e.propsKeywords){if(m&&"object"==typeof m)for(var h in m)t(r,n,o,m[h],s+"/"+f+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),i,s,f,a,h)}else(f in e.keywords||r.allKeys&&!(f in e.skipKeywords))&&t(r,n,o,m,s+"/"+f,i,s,f,a)}o(a,s,i,c,u,l,d)}}return e.keywords={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},Ca.exports}function Ra(){if(ka)return Na;ka=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.getSchemaRefs=Na.resolveUrl=Na.normalizeId=Na._getFullPath=Na.getFullPath=Na.inlineRef=void 0;const e=ta(),t=Ie(),r=Ta(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Na.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!a(e):!!t&&s(e)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e){for(const t in e){if(o.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(a))return!0;if("object"==typeof r&&a(r))return!0}return!1}function s(t){let r=0;for(const o in t){if("$ref"===o)return 1/0;if(r++,!n.has(o)&&("object"==typeof t[o]&&(0,e.eachItem)(t[o],(e=>r+=s(e))),r===1/0))return 1/0}return r}function i(e,t="",r){!1!==r&&(t=l(t));const n=e.parse(t);return c(e,n)}function c(e,t){return e.serialize(t).split("#")[0]+"#"}Na.getFullPath=i,Na._getFullPath=c;const u=/#\/?$/;function l(e){return e?e.replace(u,""):""}Na.normalizeId=l,Na.resolveUrl=function(e,t,r){return r=l(r),e.resolve(t,r)};const d=/^[a-z_][-a-z0-9._]*$/i;return Na.getSchemaRefs=function(e,n){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:a}=this.opts,s=l(e[o]||n),c={"":s},u=i(a,s,!1),f={},m=new Set;return r(e,{allKeys:!0},((e,t,r,n)=>{if(void 0===n)return;const a=u+t;let s=c[n];function i(t){const r=this.opts.uriResolver.resolve;if(t=l(s?r(s,t):t),m.has(t))throw h(t);m.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==l(a)&&("#"===t[0]?(p(e,f[t],t),f[t]=e):this.refs[t]=a),t}function y(e){if("string"==typeof e){if(!d.test(e))throw new Error(`invalid anchor "${e}"`);i.call(this,`#${e}`)}}"string"==typeof e[o]&&(s=i.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),c[t]=s})),f;function p(e,r,n){if(void 0!==r&&!t(e,r))throw h(n)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Na}function Ia(){if(Oa)return Ko;Oa=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.getData=Ko.KeywordCxt=Ko.validateFunctionCode=void 0;const e=function(){if(oa)return Uo;oa=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.boolOrEmptySchema=Uo.topBoolOrEmptySchema=void 0;const e=ia(),t=Yo(),r=sa(),n={message:"boolean schema is false"};function o(t,r){const{gen:o,data:a}=t,s={gen:o,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(s,n,void 0,r)}return Uo.topBoolOrEmptySchema=function(e){const{gen:n,schema:a,validateName:s}=e;!1===a?o(e,!1):"object"==typeof a&&!0===a.$async?n.return(r.default.data):(n.assign(t._`${s}.errors`,null),n.return(!0))},Uo.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),o(e)):r.var(t,!0)},Uo}(),t=ya(),r=ha(),n=ya(),o=function(){if(ga)return va;ga=1,Object.defineProperty(va,"__esModule",{value:!0}),va.assignDefaults=void 0;const e=Yo(),t=ta();function r(r,n,o){const{gen:a,compositeRule:s,data:i,opts:c}=r;if(void 0===o)return;const u=e._`${i}${(0,e.getProperty)(n)}`;if(s)return void(0,t.checkStrictMode)(r,`default is ignored for: ${u}`);let l=e._`${u} === undefined`;"empty"===c.useDefaults&&(l=e._`${l} || ${u} === null || ${u} === ""`),a.if(l,e._`${u} = ${(0,e.stringify)(o)}`)}return va.assignDefaults=function(e,t){const{properties:n,items:o}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(o)&&o.forEach(((t,n)=>r(e,n,t.default)))},va}(),a=Sa(),s=function(){if(Ea)return ja;Ea=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.extendSubschemaMode=ja.extendSubschemaData=ja.getSubschema=void 0;const e=Yo(),t=ta();return ja.getSubschema=function(r,{keyword:n,schemaProp:o,schema:a,schemaPath:s,errSchemaPath:i,topSchemaRef:c}){if(void 0!==n&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const a=r.schema[n];return void 0===o?{schema:a,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:a[o],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(o)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(o)}`}}if(void 0!==a){if(void 0===s||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:s,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},ja.extendSubschemaData=function(r,n,{dataProp:o,dataPropType:a,data:s,dataTypes:i,propertyName:c}){if(void 0!==s&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=n;if(void 0!==o){const{errorPath:s,dataPathArr:i,opts:c}=n;l(u.let("data",e._`${n.data}${(0,e.getProperty)(o)}`,!0)),r.errorPath=e.str`${s}${(0,t.getErrorPath)(o,a,c.jsPropertySyntax)}`,r.parentDataProperty=e._`${o}`,r.dataPathArr=[...i,r.parentDataProperty]}function l(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}void 0!==s&&(l(s instanceof e.Name?s:u.let("data",s,!0)),void 0!==c&&(r.propertyName=c)),i&&(r.dataTypes=i)},ja.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:a}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r},ja}(),i=Yo(),c=sa(),u=Ra(),l=ta(),d=ia();function f({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},a){o.code.es5?e.func(t,i._`${c.default.data}, ${c.default.valCxt}`,n.$async,(()=>{e.code(i._`"use strict"; ${m(r,o)}`),function(e,t){e.if(c.default.valCxt,(()=>{e.var(c.default.instancePath,i._`${c.default.valCxt}.${c.default.instancePath}`),e.var(c.default.parentData,i._`${c.default.valCxt}.${c.default.parentData}`),e.var(c.default.parentDataProperty,i._`${c.default.valCxt}.${c.default.parentDataProperty}`),e.var(c.default.rootData,i._`${c.default.valCxt}.${c.default.rootData}`),t.dynamicRef&&e.var(c.default.dynamicAnchors,i._`${c.default.valCxt}.${c.default.dynamicAnchors}`)}),(()=>{e.var(c.default.instancePath,i._`""`),e.var(c.default.parentData,i._`undefined`),e.var(c.default.parentDataProperty,i._`undefined`),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,i._`{}`)}))}(e,o),e.code(a)})):e.func(t,i._`${c.default.data}, ${function(e){return i._`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${e.dynamicRef?i._`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}(o)}`,n.$async,(()=>e.code(m(r,o)).code(a)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?i._`/*# sourceURL=${r} */`:i.nil}function p(t,r){y(t)&&(g(t),h(t))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&$(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const a=n.const("_errs",c.default.errors);v(e,a),n.var(t,i._`${a} === ${c.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,l.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function v(e,r){if(e.opts.jtd)return _(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);_(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const a=r.$comment;if(!0===o.$comment)e.code(i._`${c.default.self}.logger.log(${a})`);else if("function"==typeof o.$comment){const r=i.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(i._`${c.default.self}.opts.$comment(${a}, ${r}, ${o}.schema)`)}}function _(e,t,o,a){const{gen:s,schema:u,data:d,allErrors:f,opts:m,self:p}=e,{RULES:h}=p;function y(l){(0,r.shouldUseGroup)(u,l)&&(l.type?(s.if((0,n.checkDataType)(l.type,d,m.strictNumbers)),b(e,l),1===t.length&&t[0]===l.type&&o&&(s.else(),(0,n.reportTypeError)(e)),s.endIf()):b(e,l),f||s.if(i._`${c.default.errors} === ${a||0}`))}!u.$ref||!m.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(u,h)?(m.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{P(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)P(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const o in n){const a=n[o];if("object"==typeof a&&(0,r.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some((e=>w(t,e)))&&S(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),s.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):s.block((()=>j(e,"$ref",h.all.$ref.definition)))}function b(e,t){const{gen:n,schema:a,opts:{useDefaults:s}}=e;s&&(0,o.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(a,n)&&j(e,n.keyword,n.definition,t.type)}))}function w(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function P(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,l.checkStrictMode)(e,t,e.opts.strictTypes)}Ko.validateFunctionCode=function(t){y(t)&&(g(t),h(t))?function(e){const{schema:t,opts:r,gen:n}=e;f(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,l.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(c.default.vErrors,null),n.let(c.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",i._`${r}.evaluated`),t.if(i._`${e.evaluated}.dynamicProps`,(()=>t.assign(i._`${e.evaluated}.props`,i._`undefined`))),t.if(i._`${e.evaluated}.dynamicItems`,(()=>t.assign(i._`${e.evaluated}.items`,i._`undefined`)))}(e),v(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:a}=e;r.$async?t.if(i._`${c.default.errors} === 0`,(()=>t.return(c.default.data)),(()=>t.throw(i._`new ${o}(${c.default.vErrors})`))):(t.assign(i._`${n}.errors`,c.default.vErrors),a.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof i.Name&&e.assign(i._`${t}.props`,r);n instanceof i.Name&&e.assign(i._`${t}.items`,n)}(e),t.return(i._`${c.default.errors} === 0`))}(e)}))}(t):f(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class E{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",O(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,i.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,i.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(i._`${t} !== undefined && (${(0,i.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?d.reportExtraError:d.reportError)(this,this.def.error,t)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=i.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=i.nil,t=i.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:a}=this;r.if((0,i.or)(i._`${n} === undefined`,t)),e!==i.nil&&r.assign(e,!0),(o.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==i.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:a}=this;return(0,i.or)(function(){if(r.length){if(!(t instanceof i.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return i._`${(0,n.checkDataTypes)(e,t,a.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return i._`!${r}(${t})`}return i.nil}())}subschema(e,t){const r=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(r,this.it,e),(0,s.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return p(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=l.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=l.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,i.Name))),!0}}function j(e,t,r,n){const o=new E(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}Ko.KeywordCxt=E;const x=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,a;if(""===e)return c.default.rootData;if("/"===e[0]){if(!x.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,a=c.default.rootData}else{const s=k.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+s[1];if(o=s[2],"#"===o){if(i>=t)throw new Error(d("property/index",i));return n[t-i]}if(i>t)throw new Error(d("data",i));if(a=r[t-i],!o)return a}let s=a;const u=o.split("/");for(const e of u)e&&(a=i._`${a}${(0,i.getProperty)((0,l.unescapeJsonPointer)(e))}`,s=i._`${s} && ${a}`);return s;function d(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return Ko.getData=O,Ko}var Ma,Da={};function Aa(){if(Ma)return Da;Ma=1,Object.defineProperty(Da,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return Da.default=e,Da}var Va,za={};function Fa(){if(Va)return za;Va=1,Object.defineProperty(za,"__esModule",{value:!0});const e=Ra();class t extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return za.default=t,za}var qa,Ka={};function Ua(){if(qa)return Ka;qa=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.resolveSchema=Ka.getCompilingSchema=Ka.resolveRef=Ka.compileSchema=Ka.SchemaEnv=void 0;const e=Yo(),t=Aa(),r=sa(),n=Ra(),o=ta(),a=Ia();class s{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function i(o){const s=u.call(this,o);if(s)return s;const i=(0,n.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:d}=this.opts,f=new e.CodeGen(this.scope,{es5:c,lines:l,ownProperties:d});let m;o.$async&&(m=f.scopeValue("Error",{ref:t.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const p=f.scopeName("validate");o.validateName=p;const h={gen:f,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:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:p,ValidationError:m,schema:o.schema,schemaEnv:o,rootId:i,baseId:o.baseId||i,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(o),(0,a.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,o));const n=new Function(`${r.default.self}`,`${r.default.scope}`,y)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=o.schema,n.schemaEnv=o,o.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:t,items:r}=h;n.evaluated={props:t instanceof e.Name?void 0:t,items:r instanceof e.Name?void 0:r,dynamicProps:t instanceof e.Name,dynamicItems:r instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return o.validate=n,o}catch(e){throw delete o.validate,delete o.validateName,y&&this.logger.error("Error compiling schema, function code:",y),e}finally{this._compilations.delete(o)}}function c(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:i.call(this,e)}function u(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function l(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||d.call(this,e,t)}function d(e,t){const r=this.opts.uriResolver.parse(t),o=(0,n._getFullPath)(this.opts.uriResolver,r);let a=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===a)return m.call(this,r,e);const c=(0,n.normalizeId)(o),u=this.refs[c]||this.schemas[c];if("string"==typeof u){const t=d.call(this,e,u);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,r,t)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||i.call(this,u),c===(0,n.normalizeId)(t)){const{schema:t}=u,{schemaId:r}=this.opts,o=t[r];return o&&(a=(0,n.resolveUrl)(this.opts.uriResolver,a,o)),new s({schema:t,schemaId:r,root:e,baseId:a})}return m.call(this,r,u)}}Ka.SchemaEnv=s,Ka.compileSchema=i,Ka.resolveRef=function(e,t,r){var o;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let i=l.call(this,e,r);if(void 0===i){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:a}=this.opts;n&&(i=new s({schema:n,schemaId:a,root:e,baseId:t}))}return void 0!==i?e.refs[r]=c.call(this,i):void 0},Ka.getCompilingSchema=u,Ka.resolveSchema=d;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:r,root:a}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const a of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,o.unescapeFragment)(a)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!f.has(a)&&s&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,s))}let c;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);c=d.call(this,a,e)}const{schemaId:u}=this.opts;return c=c||new s({schema:r,schemaId:u,root:a,baseId:t}),c.schema!==c.root.schema?c:void 0}return Ka}var La,Ga,Ja={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},Ha={};function Ba(){return Ga||(Ga=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=Ia();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Yo();Object.defineProperty(e,"_",{enumerable:!0,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=Aa(),o=Fa(),a=da(),s=Ua(),i=Yo(),c=Ra(),u=ya(),l=ta(),d=Ja,f=function(){if(La)return Ha;La=1,Object.defineProperty(Ha,"__esModule",{value:!0});const e=nt();return e.code='require("ajv/dist/runtime/uri").default',Ha.default=e,Ha}(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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.",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 cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,a,s,i,c,u,l,d,p,h,y,g,v,$,_,b,w,P,S,E,j,x;const k=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===O||void 0===O?1:O||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(a=e.strictSchema)&&void 0!==a?a:k)||void 0===s||s,strictNumbers:null===(c=null!==(i=e.strictNumbers)&&void 0!==i?i:k)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:k)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:k)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:k)&&void 0!==y&&y,code:e.code?{...e.code,optimize:N,regExp:C}:{optimize:N,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===($=e.meta)||void 0===$||$,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(b=e.inlineRefs)||void 0===b||b,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(P=e.addUsedSchema)||void 0===P||P,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(j=e.unicodeRegExp)||void 0===j||j,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:T}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:h,es5:t,lines:r}),this.logger=function(e){if(!1===e)return j;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,y,e,"NOT SUPPORTED"),_.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=E.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new s.SchemaEnv({schema:{},schemaId:r});if(t=s.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(k.call(this,r,t),!t)return(0,l.eachItem)(r,(e=>O.call(this,e))),this;C.call(this,t);const n={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===n.type.length?e=>O.call(this,e,n):e=>n.type.forEach((t=>O.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,a=o[e];n&&a&&(o[e]=R(a))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let a;const{schemaId:i}=this.opts;if("object"==typeof e)a=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(void 0!==u)return u;r=(0,c.normalizeId)(a||r);const l=c.getSchemaRefs.call(this,e,r);return u=new s.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:l}),this._cache.set(u.schema,u),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=u),n&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const o in e){const a=o;a in t&&this.logger[n](`${r}: option ${o}. ${e[a]}`)}}function b(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function E(){const e={...this.opts};for(const t of p)delete e[t];return e}e.default=$,$.ValidationError=n.default,$.MissingRefError=o.default;const j={log(){},warn(){},error(){}};const x=/^[a-z_$][a-z0-9_$:-]*$/i;function k(e,t){const{RULES:r}=this;if((0,l.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function O(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let s=o?a.post:a.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},a.rules.push(s)),a.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,i,t.before):s.rules.push(i),a.all[e]=i,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const T={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,T]}}}(qo)),qo}var Wa,Za={},Qa={},Ya={};var Xa,es,ts={};function rs(){if(es)return Qa;es=1,Object.defineProperty(Qa,"__esModule",{value:!0});const e=function(){if(Wa)return Ya;Wa=1,Object.defineProperty(Ya,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ya.default=e,Ya}(),t=function(){if(Xa)return ts;Xa=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.callRef=ts.getValidate=void 0;const e=Fa(),t=Pa(),r=Yo(),n=sa(),o=Ua(),a=ta(),s={keyword:"$ref",schemaType:"string",code(t){const{gen:n,schema:a,it:s}=t,{baseId:u,schemaEnv:l,validateName:d,opts:f,self:m}=s,{root:p}=l;if(("#"===a||"#/"===a)&&u===p.baseId)return function(){if(l===p)return c(t,d,l,l.$async);const e=n.scopeValue("root",{ref:p});return c(t,r._`${e}.validate`,p,p.$async)}();const h=o.resolveRef.call(m,p,u,a);if(void 0===h)throw new e.default(s.opts.uriResolver,u,a);return h instanceof o.SchemaEnv?function(e){const r=i(t,e);c(t,r,e,e.$async)}(h):function(e){const o=n.scopeValue("schema",!0===f.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),s=n.name("valid"),i=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:o,errSchemaPath:a},s);t.mergeEvaluated(i),t.ok(s)}(h)}};function i(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):r._`${n.scopeValue("wrapper",{ref:t})}.validate`}function c(e,o,s,i){const{gen:c,it:u}=e,{allErrors:l,schemaEnv:d,opts:f}=u,m=f.passContext?n.default.this:r.nil;function p(e){const t=r._`${e}.errors`;c.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),c.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function h(e){var t;if(!u.opts.unevaluated)return;const n=null===(t=null==s?void 0:s.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(n&&!n.dynamicProps)void 0!==n.props&&(u.props=a.mergeEvaluated.props(c,n.props,u.props));else{const t=c.var("props",r._`${e}.evaluated.props`);u.props=a.mergeEvaluated.props(c,t,u.props,r.Name)}if(!0!==u.items)if(n&&!n.dynamicItems)void 0!==n.items&&(u.items=a.mergeEvaluated.items(c,n.items,u.items));else{const t=c.var("items",r._`${e}.evaluated.items`);u.items=a.mergeEvaluated.items(c,t,u.items,r.Name)}}i?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const n=c.let("valid");c.try((()=>{c.code(r._`await ${(0,t.callValidateCode)(e,o,m)}`),h(o),l||c.assign(n,!0)}),(e=>{c.if(r._`!(${e} instanceof ${u.ValidationError})`,(()=>c.throw(e))),p(e),l||c.assign(n,!1)})),e.ok(n)}():e.result((0,t.callValidateCode)(e,o,m),(()=>h(o)),(()=>p(o)))}return ts.getValidate=i,ts.callRef=c,ts.default=s,ts}(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Qa.default=r,Qa}var ns,os={},as={};var ss,is={};var cs,us,ls={},ds={};function fs(){if(us)return ls;us=1,Object.defineProperty(ls,"__esModule",{value:!0});const e=Yo(),t=ta(),r=function(){if(cs)return ds;function e(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}return cs=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',ds}(),n={message({keyword:t,schemaCode:r}){const n="maxLength"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} characters`},params:({schemaCode:t})=>e._`{limit: ${t}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:n,code(n){const{keyword:o,data:a,schemaCode:s,it:i}=n,c="maxLength"===o?e.operators.GT:e.operators.LT,u=!1===i.opts.unicode?e._`${a}.length`:e._`${(0,t.useFunc)(n.gen,r.default)}(${a})`;n.fail$data(e._`${u} ${c} ${s}`)}};return ls.default=o,ls}var ms,ps={};var hs,ys={};var gs,vs={};function $s(){if(gs)return vs;gs=1,Object.defineProperty(vs,"__esModule",{value:!0});const e=Pa(),t=Yo(),r=ta(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>t.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>t._`{missingProperty: ${e}}`},code(n){const{gen:o,schema:a,schemaCode:s,data:i,$data:c,it:u}=n,{opts:l}=u;if(!c&&0===a.length)return;const d=a.length>=l.loopRequired;if(u.allErrors?function(){if(d||c)n.block$data(t.nil,f);else for(const t of a)(0,e.checkReportMissingProp)(n,t)}():function(){const r=o.let("missing");if(d||c){const a=o.let("valid",!0);n.block$data(a,(()=>function(r,a){n.setParams({missingProperty:r}),o.forOf(r,s,(()=>{o.assign(a,(0,e.propertyInData)(o,i,r,l.ownProperties)),o.if((0,t.not)(a),(()=>{n.error(),o.break()}))}),t.nil)}(r,a))),n.ok(a)}else o.if((0,e.checkMissingProp)(n,a,r)),(0,e.reportMissingProp)(n,r),o.else()}(),l.strictRequired){const e=n.parentSchema.properties,{definedProperties:t}=n.it;for(const n of a)if(void 0===(null==e?void 0:e[n])&&!t.has(n)){const e=`required property "${n}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(u,e,u.opts.strictRequired)}}function f(){o.forOf("prop",s,(t=>{n.setParams({missingProperty:t}),o.if((0,e.noPropertyInData)(o,i,t,l.ownProperties),(()=>n.error()))}))}}};return vs.default=n,vs}var _s,bs={};var ws,Ps,Ss={},Es={};function js(){if(ws)return Es;ws=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=Ie();return e.code='require("ajv/dist/runtime/equal").default',Es.default=e,Es}function xs(){if(Ps)return Ss;Ps=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=ya(),t=Yo(),r=ta(),n=js(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:r}})=>t.str`must NOT have duplicate items (items ## ${r} and ${e} are identical)`,params:({params:{i:e,j:r}})=>t._`{i: ${e}, j: ${r}}`},code(o){const{gen:a,data:s,$data:i,schema:c,parentSchema:u,schemaCode:l,it:d}=o;if(!i&&!c)return;const f=a.let("valid"),m=u.items?(0,e.getSchemaTypes)(u.items):[];function p(r,n){const i=a.name("item"),c=(0,e.checkDataTypes)(m,i,d.opts.strictNumbers,e.DataType.Wrong),u=a.const("indices",t._`{}`);a.for(t._`;${r}--;`,(()=>{a.let(i,t._`${s}[${r}]`),a.if(c,t._`continue`),m.length>1&&a.if(t._`typeof ${i} == "string"`,t._`${i} += "_"`),a.if(t._`typeof ${u}[${i}] == "number"`,(()=>{a.assign(n,t._`${u}[${i}]`),o.error(),a.assign(f,!1).break()})).code(t._`${u}[${i}] = ${r}`)}))}function h(e,i){const c=(0,r.useFunc)(a,n.default),u=a.name("outer");a.label(u).for(t._`;${e}--;`,(()=>a.for(t._`${i} = ${e}; ${i}--;`,(()=>a.if(t._`${c}(${s}[${e}], ${s}[${i}])`,(()=>{o.error(),a.assign(f,!1).break(u)}))))))}o.block$data(f,(function(){const e=a.let("i",t._`${s}.length`),r=a.let("j");o.setParams({i:e,j:r}),a.assign(f,!0),a.if(t._`${e} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?p:h)(e,r)))}),t._`${l} === false`),o.ok(f)}};return Ss.default=o,Ss}var ks,Os={};var Ns,Cs,Ts={};function Rs(){if(Ns)return Ts;Ns=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=Yo(),t=ta(),r=js(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(n){const{gen:o,data:a,$data:s,schema:i,schemaCode:c,it:u}=n;if(!s&&0===i.length)throw new Error("enum must have non-empty array");const l=i.length>=u.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,t.useFunc)(o,r.default);let m;if(l||s)m=o.let("valid"),n.block$data(m,(function(){o.assign(m,!1),o.forOf("v",c,(t=>o.if(e._`${f()}(${a}, ${t})`,(()=>o.assign(m,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const t=o.const("vSchema",c);m=(0,e.or)(...i.map(((r,n)=>function(t,r){const n=i[r];return"object"==typeof n&&null!==n?e._`${f()}(${a}, ${t}[${r}])`:e._`${a} === ${n}`}(t,n))))}n.pass(m)}};return Ts.default=n,Ts}function Is(){if(Cs)return os;Cs=1,Object.defineProperty(os,"__esModule",{value:!0});const e=function(){if(ns)return as;ns=1,Object.defineProperty(as,"__esModule",{value:!0});const e=Yo(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{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:t,schemaCode:n})=>e.str`must be ${r[t].okStr} ${n}`,params:({keyword:t,schemaCode:n})=>e._`{comparison: ${r[t].okStr}, limit: ${n}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:n,data:o,schemaCode:a}=t;t.fail$data(e._`${o} ${r[n].fail} ${a} || isNaN(${o})`)}};return as.default=o,as}(),t=function(){if(ss)return is;ss=1,Object.defineProperty(is,"__esModule",{value:!0});const e=Yo(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:r,data:n,schemaCode:o,it:a}=t,s=a.opts.multipleOfPrecision,i=r.let("res"),c=s?e._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:e._`${i} !== parseInt(${i})`;t.fail$data(e._`(${o} === 0 || (${i} = ${n}/${o}, ${c}))`)}};return is.default=t,is}(),r=fs(),n=function(){if(ms)return ps;ms=1,Object.defineProperty(ps,"__esModule",{value:!0});const e=Pa(),t=Yo(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>t.str`must match pattern "${e}"`,params:({schemaCode:e})=>t._`{pattern: ${e}}`},code(r){const{data:n,$data:o,schema:a,schemaCode:s,it:i}=r,c=i.opts.unicodeRegExp?"u":"",u=o?t._`(new RegExp(${s}, ${c}))`:(0,e.usePattern)(r,a);r.fail$data(t._`!${u}.test(${n})`)}};return ps.default=r,ps}(),o=function(){if(hs)return ys;hs=1,Object.defineProperty(ys,"__esModule",{value:!0});const e=Yo(),t={message({keyword:t,schemaCode:r}){const n="maxProperties"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} properties`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,a="maxProperties"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`Object.keys(${n}).length ${a} ${o}`)}};return ys.default=r,ys}(),a=$s(),s=function(){if(_s)return bs;_s=1,Object.defineProperty(bs,"__esModule",{value:!0});const e=Yo(),t={message({keyword:t,schemaCode:r}){const n="maxItems"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} items`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,a="maxItems"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`${n}.length ${a} ${o}`)}};return bs.default=r,bs}(),i=xs(),c=function(){if(ks)return Os;ks=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=Yo(),t=ta(),r=js(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(n){const{gen:o,data:a,$data:s,schemaCode:i,schema:c}=n;s||c&&"object"==typeof c?n.fail$data(e._`!${(0,t.useFunc)(o,r.default)}(${a}, ${i})`):n.fail(e._`${c} !== ${a}`)}};return Os.default=n,Os}(),u=Rs(),l=[e.default,t.default,r.default,n.default,o.default,a.default,s.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return os.default=l,os}var Ms,Ds={},As={};function Vs(){if(Ms)return As;Ms=1,Object.defineProperty(As,"__esModule",{value:!0}),As.validateAdditionalItems=void 0;const e=Yo(),t=ta(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{parentSchema:r,it:o}=e,{items:a}=r;Array.isArray(a)?n(e,a):(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(r,n){const{gen:o,schema:a,data:s,keyword:i,it:c}=r;c.items=!0;const u=o.const("len",e._`${s}.length`);if(!1===a)r.setParams({len:n.length}),r.pass(e._`${u} <= ${n.length}`);else if("object"==typeof a&&!(0,t.alwaysValidSchema)(c,a)){const a=o.var("valid",e._`${u} <= ${n.length}`);o.if((0,e.not)(a),(()=>function(a){o.forRange("i",n.length,u,(n=>{r.subschema({keyword:i,dataProp:n,dataPropType:t.Type.Num},a),c.allErrors||o.if((0,e.not)(a),(()=>o.break()))}))}(a))),r.ok(a)}}return As.validateAdditionalItems=n,As.default=r,As}var zs,Fs,qs={},Ks={};function Us(){if(zs)return Ks;zs=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.validateTuple=void 0;const e=Yo(),t=ta(),r=Pa(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:n,it:a}=e;if(Array.isArray(n))return o(e,"additionalItems",n);a.items=!0,(0,t.alwaysValidSchema)(a,n)||e.ok((0,r.validateArray)(e))}};function o(r,n,o=r.schema){const{gen:a,parentSchema:s,data:i,keyword:c,it:u}=r;!function(e){const{opts:r,errSchemaPath:a}=u,s=o.length,i=s===e.minItems&&(s===e.maxItems||!1===e[n]);if(r.strictTuples&&!i){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${n} are not specified or different at path "${a}"`;(0,t.checkStrictMode)(u,e,r.strictTuples)}}(s),u.opts.unevaluated&&o.length&&!0!==u.items&&(u.items=t.mergeEvaluated.items(a,o.length,u.items));const l=a.name("valid"),d=a.const("len",e._`${i}.length`);o.forEach(((n,o)=>{(0,t.alwaysValidSchema)(u,n)||(a.if(e._`${d} > ${o}`,(()=>r.subschema({keyword:c,schemaProp:o,dataProp:o},l))),r.ok(l))}))}return Ks.validateTuple=o,Ks.default=n,Ks}var Ls,Gs={};var Js,Hs={};function Bs(){if(Js)return Hs;Js=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=Yo(),t=ta(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${r}}`},code(r){const{gen:n,schema:o,parentSchema:a,data:s,it:i}=r;let c,u;const{minContains:l,maxContains:d}=a;i.opts.next?(c=void 0===l?1:l,u=d):c=1;const f=n.const("len",e._`${s}.length`);if(r.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,t.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,t.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void r.fail();if((0,t.alwaysValidSchema)(i,o)){let t=e._`${f} >= ${c}`;return void 0!==u&&(t=e._`${t} && ${f} <= ${u}`),void r.pass(t)}i.items=!0;const m=n.name("valid");function p(){const t=n.name("_valid"),r=n.let("count",0);h(t,(()=>n.if(t,(()=>function(t){n.code(e._`${t}++`),void 0===u?n.if(e._`${t} >= ${c}`,(()=>n.assign(m,!0).break())):(n.if(e._`${t} > ${u}`,(()=>n.assign(m,!1).break())),1===c?n.assign(m,!0):n.if(e._`${t} >= ${c}`,(()=>n.assign(m,!0))))}(r)))))}function h(e,o){n.forRange("i",0,f,(n=>{r.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},e),o()}))}void 0===u&&1===c?h(m,(()=>n.if(m,(()=>n.break())))):0===c?(n.let(m,!0),void 0!==u&&n.if(e._`${s}.length > 0`,p)):(n.let(m,!1),p()),r.result(m,(()=>r.reset()))}};return Hs.default=r,Hs}var Ws,Zs={};function Qs(){return Ws||(Ws=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Yo(),r=ta(),n=Pa();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
12
+ missingProperty: ${o},
13
+ depsCount: ${r},
14
+ deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);a(e,t),s(e,r)}};function a(e,r=e.schema){const{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;const i=o.let("missing");for(const c in r){const u=r[c];if(0===u.length)continue;const l=(0,n.propertyInData)(o,a,c,s.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),s.allErrors?o.if(l,(()=>{for(const t of u)(0,n.checkReportMissingProp)(e,t)})):(o.if(t._`${l} && (${(0,n.checkMissingProp)(e,u,i)})`),(0,n.reportMissingProp)(e,i),o.else())}}function s(e,t=e.schema){const{gen:o,data:a,keyword:s,it:i}=e,c=o.name("valid");for(const u in t)(0,r.alwaysValidSchema)(i,t[u])||(o.if((0,n.propertyInData)(o,a,u,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>o.var(c,!0))),e.ok(c))}e.validatePropertyDeps=a,e.validateSchemaDeps=s,e.default=o}(Zs)),Zs}var Ys,Xs={};var ei,ti={};function ri(){if(ei)return ti;ei=1,Object.defineProperty(ti,"__esModule",{value:!0});const e=Pa(),t=Yo(),r=sa(),n=ta(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:a,schema:s,parentSchema:i,data:c,errsCount:u,it:l}=o;if(!u)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=l;if(l.props=!0,"all"!==f.removeAdditional&&(0,n.alwaysValidSchema)(l,s))return;const m=(0,e.allSchemaProperties)(i.properties),p=(0,e.allSchemaProperties)(i.patternProperties);function h(e){a.code(t._`delete ${c}[${e}]`)}function y(e){if("all"===f.removeAdditional||f.removeAdditional&&!1===s)h(e);else{if(!1===s)return o.setParams({additionalProperty:e}),o.error(),void(d||a.break());if("object"==typeof s&&!(0,n.alwaysValidSchema)(l,s)){const r=a.name("valid");"failing"===f.removeAdditional?(g(e,r,!1),a.if((0,t.not)(r),(()=>{o.reset(),h(e)}))):(g(e,r),d||a.if((0,t.not)(r),(()=>a.break())))}}}function g(e,t,r){const a={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(a,t)}a.forIn("key",c,(r=>{m.length||p.length?a.if(function(r){let s;if(m.length>8){const t=(0,n.schemaRefOrVal)(l,i.properties,"properties");s=(0,e.isOwnProperty)(a,t,r)}else s=m.length?(0,t.or)(...m.map((e=>t._`${r} === ${e}`))):t.nil;return p.length&&(s=(0,t.or)(s,...p.map((n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`)))),(0,t.not)(s)}(r),(()=>y(r))):y(r)})),o.ok(t._`${u} === ${r.default.errors}`)}};return ti.default=o,ti}var ni,oi={};var ai,si={};var ii,ci={};var ui,li={};var di,fi={};var mi,pi={};var hi,yi={};var gi,vi,$i={};function _i(){if(vi)return Ds;vi=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=Vs(),t=function(){if(Fs)return qs;Fs=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=Us(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return qs.default=t,qs}(),r=Us(),n=function(){if(Ls)return Gs;Ls=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=Yo(),t=ta(),r=Pa(),n=Vs(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{schema:o,parentSchema:a,it:s}=e,{prefixItems:i}=a;s.items=!0,(0,t.alwaysValidSchema)(s,o)||(i?(0,n.validateAdditionalItems)(e,i):e.ok((0,r.validateArray)(e)))}};return Gs.default=o,Gs}(),o=Bs(),a=Qs(),s=function(){if(Ys)return Xs;Ys=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Yo(),t=ta(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:a,it:s}=r;if((0,t.alwaysValidSchema)(s,o))return;const i=n.name("valid");n.forIn("key",a,(t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},i),n.if((0,e.not)(i),(()=>{r.error(!0),s.allErrors||n.break()}))})),r.ok(i)}};return Xs.default=r,Xs}(),i=ri(),c=function(){if(ni)return oi;ni=1,Object.defineProperty(oi,"__esModule",{value:!0});const e=Ia(),t=Pa(),r=ta(),n=ri(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:i,data:c,it:u}=o;"all"===u.opts.removeAdditional&&void 0===i.additionalProperties&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const l=(0,t.allSchemaProperties)(s);for(const e of l)u.definedProperties.add(e);u.opts.unevaluated&&l.length&&!0!==u.props&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(l),u.props));const d=l.filter((e=>!(0,r.alwaysValidSchema)(u,s[e])));if(0===d.length)return;const f=a.name("valid");for(const e of d)m(e)?p(e):(a.if((0,t.propertyInData)(a,c,e,u.opts.ownProperties)),p(e),u.allErrors||a.else().var(f,!0),a.endIf()),o.it.definedProperties.add(e),o.ok(f);function m(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==s[e].default}function p(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},f)}}};return oi.default=o,oi}(),u=function(){if(ai)return si;ai=1,Object.defineProperty(si,"__esModule",{value:!0});const e=Pa(),t=Yo(),r=ta(),n=ta(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:i,parentSchema:c,it:u}=o,{opts:l}=u,d=(0,e.allSchemaProperties)(s),f=d.filter((e=>(0,r.alwaysValidSchema)(u,s[e])));if(0===d.length||f.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;const m=l.strictSchema&&!l.allowMatchingProperties&&c.properties,p=a.name("valid");!0===u.props||u.props instanceof t.Name||(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:h}=u;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,r.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){a.forIn("key",i,(s=>{a.if(t._`${(0,e.usePattern)(o,r)}.test(${s})`,(()=>{const e=f.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:n.Type.Str},p),u.opts.unevaluated&&!0!==h?a.assign(t._`${h}[${s}]`,!0):e||u.allErrors||a.if((0,t.not)(p),(()=>a.break()))}))}))}!function(){for(const e of d)m&&y(e),u.allErrors?g(e):(a.var(p,!0),g(e),a.if(p))}()}};return si.default=o,si}(),l=function(){if(ii)return ci;ii=1,Object.defineProperty(ci,"__esModule",{value:!0});const e=ta(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const a=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};return ci.default=t,ci}(),d=function(){if(ui)return li;ui=1,Object.defineProperty(li,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Pa().validateUnion,error:{message:"must match a schema in anyOf"}};return li.default=e,li}(),f=function(){if(di)return fi;di=1,Object.defineProperty(fi,"__esModule",{value:!0});const e=Yo(),t=ta(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:a,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&a.discriminator)return;const i=o,c=n.let("valid",!1),u=n.let("passing",null),l=n.name("_valid");r.setParams({passing:u}),n.block((function(){i.forEach(((o,a)=>{let i;(0,t.alwaysValidSchema)(s,o)?n.var(l,!0):i=r.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},l),a>0&&n.if(e._`${l} && ${c}`).assign(c,!1).assign(u,e._`[${u}, ${a}]`).else(),n.if(l,(()=>{n.assign(c,!0),n.assign(u,a),i&&r.mergeEvaluated(i,e.Name)}))}))})),r.result(c,(()=>r.reset()),(()=>r.error(!0)))}};return fi.default=r,fi}(),m=function(){if(mi)return pi;mi=1,Object.defineProperty(pi,"__esModule",{value:!0});const e=ta(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=r.name("valid");n.forEach(((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const s=t.subschema({keyword:"allOf",schemaProp:n},a);t.ok(a),t.mergeEvaluated(s)}))}};return pi.default=t,pi}(),p=function(){if(hi)return yi;hi=1,Object.defineProperty(yi,"__esModule",{value:!0});const e=Yo(),t=ta(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:a,it:s}=r;void 0===a.then&&void 0===a.else&&(0,t.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const i=n(s,"then"),c=n(s,"else");if(!i&&!c)return;const u=o.let("valid",!0),l=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);r.mergeEvaluated(e)}(),r.reset(),i&&c){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(l,d("then",e),d("else",e))}else i?o.if(l,d("then")):o.if((0,e.not)(l),d("else"));function d(t,n){return()=>{const a=r.subschema({keyword:t},l);o.assign(u,l),r.mergeValidEvaluated(a,u),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(u,(()=>r.error(!0)))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return yi.default=r,yi}(),h=function(){if(gi)return $i;gi=1,Object.defineProperty($i,"__esModule",{value:!0});const e=ta(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return $i.default=t,$i}();return Ds.default=function(y=!1){const g=[l.default,d.default,f.default,m.default,p.default,h.default,s.default,i.default,a.default,c.default,u.default];return y?g.push(t.default,n.default):g.push(e.default,r.default),g.push(o.default),g},Ds}var bi,wi,Pi={},Si={};function Ei(){if(bi)return Si;bi=1,Object.defineProperty(Si,"__esModule",{value:!0});const e=Yo(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:a,schema:s,schemaCode:i,it:c}=t,{opts:u,errSchemaPath:l,schemaEnv:d,self:f}=c;u.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:f.formats,code:u.code.formats}),s=n.const("fDef",e._`${a}[${i}]`),c=n.let("fType"),l=n.let("format");n.if(e._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>n.assign(c,e._`${s}.type || "string"`).assign(l,e._`${s}.validate`)),(()=>n.assign(c,e._`"string"`).assign(l,s))),t.fail$data((0,e.or)(!1===u.strictSchema?e.nil:e._`${i} && !${l}`,function(){const t=d.$async?e._`(${s}.async ? await ${l}(${o}) : ${l}(${o}))`:e._`${l}(${o})`,n=e._`(typeof ${l} == "function" ? ${t} : ${l}.test(${o}))`;return e._`${l} && ${l} !== true && ${c} === ${r} && !${n}`}()))}():function(){const a=f.formats[s];if(!a)return void function(){if(!1===u.strictSchema)return void f.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===a)return;const[i,c,m]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):u.code.formats?e._`${u.code.formats}${(0,e.getProperty)(s)}`:void 0,o=n.scopeValue("formats",{key:s,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,e._`${o}.validate`];return["string",t,o]}(a);i===r&&t.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw new Error("async format in sync schema");return e._`await ${m}(${o})`}return"function"==typeof c?e._`${m}(${o})`:e._`${m}.test(${o})`}())}())}};return Si.default=t,Si}var ji,xi,ki={};function Oi(){if(xi)return Za;xi=1,Object.defineProperty(Za,"__esModule",{value:!0});const e=rs(),t=Is(),r=_i(),n=function(){if(wi)return Pi;wi=1,Object.defineProperty(Pi,"__esModule",{value:!0});const e=[Ei().default];return Pi.default=e,Pi}(),o=(ji||(ji=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.contentVocabulary=ki.metadataVocabulary=void 0,ki.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ki.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ki),a=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return Za.default=a,Za}var Ni,Ci,Ti={},Ri={};function Ii(){if(Ci)return Ti;Ci=1,Object.defineProperty(Ti,"__esModule",{value:!0});const e=Yo(),t=(Ni||(Ni=1,function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(Ri)),Ri),r=Ua(),n=ta(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(o){const{gen:a,data:s,schema:i,parentSchema:c,it:u}=o,{oneOf:l}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=i.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=a.let("valid",!1),m=a.const("tag",e._`${s}${(0,e.getProperty)(d)}`);function p(t){const r=a.name("valid"),n=o.subschema({keyword:"oneOf",schemaProp:t},r);return o.mergeEvaluated(n,e.Name),r}a.if(e._`typeof ${m} == "string"`,(()=>function(){const s=function(){var e;const t={},o=s(c);let a=!0;for(let t=0;t<l.length;t++){let c=l[t];(null==c?void 0:c.$ref)&&!(0,n.schemaHasRulesButRef)(c,u.self.RULES)&&(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==c?void 0:c.$ref),c instanceof r.SchemaEnv&&(c=c.schema));const f=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[d];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);a=a&&(o||s(c)),i(f,t)}if(!a)throw new Error(`discriminator: "${d}" must be required`);return t;function s({required:e}){return Array.isArray(e)&&e.includes(d)}function i(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${d}" values must be unique strings`);t[e]=r}}();a.if(!1);for(const t in s)a.elseIf(e._`${m} === ${t}`),a.assign(f,p(s[t]));a.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:d}),a.endIf()}()),(()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:d}))),o.ok(f)}};return Ti.default=o,Ti}var Mi,Di,Ai,Vi={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$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},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:"boolean",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:"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:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};function zi(){return Di||(Di=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=(Mi||(Mi=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=void 0;const r=Ba(),n=Oi(),o=Ii(),a=Vi,s=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Ia();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=Yo();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,"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 d=Aa();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=Fa();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(Fo,Fo.exports)),Fo.exports),r=Yo(),n=r.operators,o={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}},a={message:({keyword:e,schemaCode:t})=>r.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${o[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:n,data:a,schemaCode:s,keyword:i,it:c}=e,{opts:u,self:l}=c;if(!u.validateFormats)return;const d=new t.KeywordCxt(c,l.RULES.all.format.definition,"format");function f(e){return r._`${e}.compare(${a}, ${s}) ${o[i].fail} 0`}d.$data?function(){const t=n.scopeValue("formats",{ref:l.formats,code:u.code.formats}),o=n.const("fmt",r._`${t}[${d.schemaCode}]`);e.fail$data(r.or(r._`typeof ${o} != "object"`,r._`${o} instanceof RegExp`,r._`typeof ${o}.compare != "function"`,f(o)))}():function(){const t=d.schema,o=l.formats[t];if(!o||!0===o)return;if("object"!=typeof o||o instanceof RegExp||"function"!=typeof o.compare)throw new Error(`"${i}": format "${t}" does not define "compare" function`);const a=n.scopeValue("formats",{key:t,ref:o,code:u.code.formats?r._`${u.code.formats}${r.getProperty(t)}`:void 0});e.fail$data(f(a))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(zo)),zo}function Fi(){return Ai||(Ai=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=(Mo||(Mo=1,function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,a),time:t(i,c),"date-time":t((function(e){const t=e.split(u);return 2===t.length&&o(t[0])&&i(t[1],!0)}),l),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return d.test(e)&&f.test(e)},"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,"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,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|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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,regex:function(e){if(g.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},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:function(e){return m.lastIndex=0,m.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=h&&e>=p}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),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]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,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);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=r.exec(e);if(!t)return!1;const o=+t[1],a=+t[2],s=+t[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(o)?29:n[a])}function a(e,t){if(e&&t)return e>t?1:e<t?-1:0}const s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function i(e,t){const r=s.exec(e);if(!r)return!1;const n=+r[1],o=+r[2],a=+r[3],i=r[5];return(n<=23&&o<=59&&a<=59||23===n&&59===o&&60===a)&&(!t||""!==i)}function c(e,t){if(!e||!t)return;const r=s.exec(e),n=s.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const u=/t|\s/i;function l(e,t){if(!e||!t)return;const[r,n]=e.split(u),[o,s]=t.split(u),i=a(r,o);return void 0!==i?i||c(n,s):void 0}const d=/\/|:/,f=/^(?:[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,m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,p=-(2**31),h=2**31-1;function y(){return!0}const g=/[^\\]\\Z/}(Ao)),Ao),n=zi(),o=Yo(),a=new o.Name("fullFormats"),s=new o.Name("fastFormats"),i=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,a),e;const[o,i]="fast"===t.mode?[r.fastFormats,s]:[r.fullFormats,a];return c(e,t.formats||r.formatNames,o,i),t.keywords&&n.default(e),e};function c(e,t,r,n){var a,s;null!==(a=(s=e.opts.code).formats)&&void 0!==a||(s.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}i.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n},e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i}(Do,Do.exports)),Do.exports}var qi,Ki={};var Ui,Li={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return t.default}}),e.disableValidation=function(){a=!0,process&&process.env&&(process.env.SKIP_VALIDATION="y")},e.enableValidation=function(){a=!1,process&&process.env&&(process.env.SKIP_VALIDATION="n")},e.needValidate=s,e.validate=function(e,r,n){if(!s())return;let a=[];if(Array.isArray(r))for(let t=0;t<=r.length-1;t++)a.push(...c(e,r[t]).map((e=>o(e,t))));else a=c(e,r);if(a.length>0)throw new t.default(a,e,n)};var t=r(d);function r(e){return e&&e.__esModule?e:{default:e}}const n=(0,r(f).default)((()=>{const e=(Gr||(Gr=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=ot(),n=zr(),o=Lr(),a=Jr,s=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=qe();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=re();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,"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 d=Le();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=He();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(L,L.exports)),L.exports).default,t=(No||(No=1,function(e,t){var r=i.commonjsGlobal&&i.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Io()),o=(e,t)=>{if(Array.isArray(t)){for(const r of t)a(r)(e);return e}if(t)return a(t)(e),e;for(t in n.default)a(t)(e);return e};function a(e){const t=n.default[e];if(!t)throw new Error("Unknown keyword "+e);return t}o.get=a,t.default=o,e.exports=o,e.exports.default=o}(Wr,Wr.exports)),Wr.exports).default,r=Fi().default,n=new e({strict:!1,allErrors:!0,verbose:!0,$data:!0});t(n,["instanceof","patternRequired"]),r(n,{keywords:!0});const o=function(){if(qi)return Ki;function e(e,t,r){return{dataPath:void 0,schemaPath:void 0,keyword:"absolutePath",params:{absolutePath:r},message:e,parentSchema:t}}function t(t,r,n){return e(t?`The provided value ${JSON.stringify(n)} is not an absolute path!`:`A relative path is expected. However, the provided value ${JSON.stringify(n)} is an absolute path!`,r,n)}qi=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.default=void 0;var r=function(r){return r.addKeyword({keyword:"absolutePath",type:"string",errors:!0,compile(r,n){const o=a=>{let s=!0;return a.includes("!")&&(o.errors=[e(`The provided value ${JSON.stringify(a)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`,n,a)],s=!1),r===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(a)||(o.errors=[t(r,n,a)],s=!1),s};return o.errors=[],o}}),r};return Ki.default=r,Ki}().default;o(n);const a=function(){if(Ui)return Li;Ui=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=void 0;var e=function(e){return e.addKeyword({keyword:"undefinedAsNull",before:"enum",modifying:!0,validate(e,t,r,n){if(e&&n&&r&&void 0!==r.enum){const e=n.parentDataProperty;void 0===n.parentData[e]&&(n.parentData[n.parentDataProperty]=null)}return!0}}),e};return Li.default=e,Li}().default;return a(n),n}));function o(e,t){return e.instancePath=`[${t}]${e.instancePath}`,e.children&&e.children.forEach((e=>o(e,t))),e}let a=!1;function s(){if(a)return!1;if(process&&process.env&&process.env.SKIP_VALIDATION){const e=process.env.SKIP_VALIDATION.trim();if(/^(?:y|yes|true|1|on)$/i.test(e))return!1;if(/^(?:n|no|false|0|off)$/i.test(e))return!0}return!0}function c(e,t){const r=n().compile(e);return r(t)?[]:r.errors?function(e){let t=[];for(const r of e){const{instancePath:e}=r;let n=[];t=t.filter((t=>!t.instancePath.includes(e)||(t.children&&(n=n.concat(t.children.slice(0))),t.children=void 0,n.push(t),!1))),n.length&&(r.children=n),t.push(r)}return t}(r.errors):[]}}(l);const{validate:Gi,ValidationError:Ji,enableValidation:Hi,disableValidation:Bi,needValidate:Wi}=l;var Zi={validate:Gi,ValidationError:Ji,enableValidation:Hi,disableValidation:Bi,needValidate:Wi},Qi=c.randomBytes,Yi=function(){for(var e=Qi(16),t="",r=0;r<16;++r)t+=e[r].toString(16);return t}(),Xi=new RegExp('(\\\\)?"@__(F|R|D|M|S|A|U|I|B|L)-'+Yi+'-(\\d+)__@"',"g"),ec=/\{\s*\[native code\]\s*\}/g,tc=/function.*?\(/,rc=/.*?=>.*?/,nc=/[<>\/\u2028\u2029]/g,oc=["*","async"],ac={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\u2028":"\\u2028","\u2029":"\\u2029"};function sc(e){return ac[e]}var ic={type:"object",additionalProperties:!1,definitions:{Rule:{description:"Filtering rule as regex or string.",anyOf:[{instanceof:"RegExp",tsType:"RegExp"},{type:"string",minLength:1}]},Rules:{description:"Filtering rules.",anyOf:[{type:"array",items:{description:"A rule condition.",oneOf:[{$ref:"#/definitions/Rule"}]}},{$ref:"#/definitions/Rule"}]}},properties:{test:{description:"Include all assets that pass test assertion.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#test",oneOf:[{$ref:"#/definitions/Rules"}]},include:{description:"Include all assets matching any of these conditions.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#include",oneOf:[{$ref:"#/definitions/Rules"}]},exclude:{description:"Exclude all assets matching any of these conditions.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#exclude",oneOf:[{$ref:"#/definitions/Rules"}]},algorithm:{description:"The compression algorithm/function.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#algorithm",anyOf:[{type:"string"},{instanceof:"Function"}]},compressionOptions:{description:"Compression options for `algorithm`.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#compressionoptions",additionalProperties:!0,type:"object"},threshold:{description:"Only assets bigger than this size are processed. In bytes.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#threshold",type:"number"},minRatio:{description:"Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`).",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#minratio",type:"number"},deleteOriginalAssets:{description:"Whether to delete the original assets or not.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#deleteoriginalassets",anyOf:[{type:"boolean"},{instanceof:"Function"},{enum:["keep-source-map"]}]},filename:{description:"The target asset filename.",link:"https://github.com/webpack-contrib/compression-webpack-plugin/#filename",anyOf:[{type:"string"},{instanceof:"Function"}]}}};const cc=r,uc=c,{validate:lc}=Zi,dc=function e(t,r){r||(r={}),"number"!=typeof r&&"string"!=typeof r||(r={space:r});var n,o=[],a=[],s=[],i=[],c=[],u=[],l=[],d=[],f=[],m=[];return r.ignoreFunction&&"function"==typeof t&&(t=void 0),void 0===t?String(t):(n=r.isJSON&&!r.space?JSON.stringify(t):JSON.stringify(t,r.isJSON?null:function(e,t){if(r.ignoreFunction&&function(e){var t=[];for(var r in e)"function"==typeof e[r]&&t.push(r);for(var n=0;n<t.length;n++)delete e[t[n]]}(t),!t&&void 0!==t&&t!==BigInt(0))return t;var n=this[e],p=typeof n;if("object"===p){if(n instanceof RegExp)return"@__R-"+Yi+"-"+(a.push(n)-1)+"__@";if(n instanceof Date)return"@__D-"+Yi+"-"+(s.push(n)-1)+"__@";if(n instanceof Map)return"@__M-"+Yi+"-"+(i.push(n)-1)+"__@";if(n instanceof Set)return"@__S-"+Yi+"-"+(c.push(n)-1)+"__@";if(n instanceof Array&&n.filter((function(){return!0})).length!==n.length)return"@__A-"+Yi+"-"+(u.push(n)-1)+"__@";if(n instanceof URL)return"@__L-"+Yi+"-"+(m.push(n)-1)+"__@"}return"function"===p?"@__F-"+Yi+"-"+(o.push(n)-1)+"__@":"undefined"===p?"@__U-"+Yi+"-"+(l.push(n)-1)+"__@":"number"!==p||isNaN(n)||isFinite(n)?"bigint"===p?"@__B-"+Yi+"-"+(f.push(n)-1)+"__@":t:"@__I-"+Yi+"-"+(d.push(n)-1)+"__@"},r.space),"string"!=typeof n?String(n):(!0!==r.unsafe&&(n=n.replace(nc,sc)),0===o.length&&0===a.length&&0===s.length&&0===i.length&&0===c.length&&0===u.length&&0===l.length&&0===d.length&&0===f.length&&0===m.length?n:n.replace(Xi,(function(t,n,l,p){return n?t:"D"===l?'new Date("'+s[p].toISOString()+'")':"R"===l?"new RegExp("+e(a[p].source)+', "'+a[p].flags+'")':"M"===l?"new Map("+e(Array.from(i[p].entries()),r)+")":"S"===l?"new Set("+e(Array.from(c[p].values()),r)+")":"A"===l?"Array.prototype.slice.call("+e(Object.assign({length:u[p].length},u[p]),r)+")":"U"===l?"undefined":"I"===l?d[p]:"B"===l?'BigInt("'+f[p]+'")':"L"===l?"new URL("+e(m[p].toString(),r)+")":function(e){var t=e.toString();if(ec.test(t))throw new TypeError("Serializing native function: "+e.name);if(tc.test(t))return t;if(rc.test(t))return t;var r=t.indexOf("("),n=t.substr(0,r).trim().split(" ").filter((function(e){return e.length>0}));return n.filter((function(e){return-1===oc.indexOf(e)})).length>0?(n.indexOf("async")>-1?"async ":"")+"function"+(n.join("").indexOf("*")>-1?"*":"")+t.substr(r):t}(o[p])}))))},fc=ic;var mc=class{constructor(t){lc(fc,t||{},{name:"Compression Plugin",baseDataPath:"options"});const{test:r,include:n,exclude:o,algorithm:a="gzip",compressionOptions:s={},filename:i=("brotliCompress"===(t||{}).algorithm?"[path][base].br":"[path][base].gz"),threshold:c=0,minRatio:u=.8,deleteOriginalAssets:l=!1}=t||{};if(this.options={test:r,include:n,exclude:o,algorithm:a,compressionOptions:s,filename:i,threshold:c,minRatio:u,deleteOriginalAssets:l},this.algorithm=this.options.algorithm,"string"==typeof this.algorithm){const t=e;if(this.algorithm=t[this.algorithm],!this.algorithm)throw new Error(`Algorithm "${this.options.algorithm}" is not found in "zlib"`);const r={gzip:{level:t.constants.Z_BEST_COMPRESSION},deflate:{level:t.constants.Z_BEST_COMPRESSION},deflateRaw:{level:t.constants.Z_BEST_COMPRESSION},brotliCompress:{params:{[t.constants.BROTLI_PARAM_QUALITY]:t.constants.BROTLI_MAX_QUALITY}}}[a]||{};this.options.compressionOptions={...r,...this.options.compressionOptions}}}runCompressionAlgorithm(e){return new Promise(((t,r)=>{this.algorithm(e,this.options.compressionOptions,((e,n)=>{e?r(e):Buffer.isBuffer(n)?t(n):t(Buffer.from(n))}))}))}async compress(e,t,r){const n=t.getCache("CompressionWebpackPlugin"),o=(await Promise.all(Object.keys(r).map((async r=>{const{info:o,source:a}=t.getAsset(r);if(o.compressed)return!1;if(!e.webpack.ModuleFilenameHelpers.matchObject.bind(void 0,this.options)(r))return!1;let s;if("function"==typeof this.options.algorithm)if("function"==typeof this.options.filename)s=`compression-function-${uc.createHash("md5").update(dc(this.options.filename)).digest("hex")}`;else{let e=this.options.filename;const t=e.indexOf("?");t>=0&&(e=e.slice(0,t)),s=`${cc.extname(e).slice(1)}ed`}else s="gzip"===this.options.algorithm?"gzipped":`${this.options.algorithm}ed`;if(o.related&&o.related[s])return!1;const i=n.getItemCache(dc({name:r,algorithm:this.options.algorithm,compressionOptions:this.options.compressionOptions}),n.getLazyHashedEtag(a)),c=await i.getPromise()||{};let u;return!(!c.source&&("function"==typeof a.buffer?u=a.buffer():(u=a.source(),Buffer.isBuffer(u)||(u=Buffer.from(u))),u.length<this.options.threshold))&&{name:r,source:a,info:o,buffer:u,output:c,cacheItem:i,relatedName:s}})))).filter((e=>Boolean(e))),{RawSource:a}=e.webpack.sources,s=[];for(const e of o)s.push((async()=>{const{name:r,source:n,buffer:o,output:s,cacheItem:i,info:c,relatedName:u}=e;if(!s.source){if(!s.compressed)try{s.compressed=await this.runCompressionAlgorithm(o)}catch(e){return void t.errors.push(e)}if(s.compressed.length/o.length>this.options.minRatio)return void await i.storePromise({compressed:s.compressed});s.source=new a(s.compressed),await i.storePromise(s)}const l=t.getPath(this.options.filename,{filename:r}),d={compressed:!0};c.immutable&&"string"==typeof this.options.filename&&/(\[name]|\[base]|\[file])/.test(this.options.filename)&&(d.immutable=!0),this.options.deleteOriginalAssets?"keep-source-map"===this.options.deleteOriginalAssets?(t.updateAsset(r,n,{related:{sourceMap:null}}),t.deleteAsset(r)):"function"==typeof this.options.deleteOriginalAssets?this.options.deleteOriginalAssets(r)&&t.deleteAsset(r):t.deleteAsset(r):t.updateAsset(r,n,{related:{[u]:l}}),t.emitAsset(l,s.source,d)})());await Promise.all(s)}apply(e){const t=this.constructor.name;e.hooks.thisCompilation.tap(t,(r=>{r.hooks.processAssets.tapPromise({name:t,stage:e.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER,additionalAssets:!0},(t=>this.compress(e,r,t))),r.hooks.statsPrinter.tap(t,(e=>{e.hooks.print.for("asset.info.compressed").tap("compression-webpack-plugin",((e,{green:t,formatFlag:r})=>e?t(r("compressed")):""))}))}))}},pc=i.getDefaultExportFromCjs(mc);exports.getProConfig=(e,i)=>{const{outputPathDir:c="dist",publicPathDir:l=r.resolve(i,n.getSrcPath(),".gant/public"),optimization:d,library:f,compression:m=!0,terserOptions:p}=e,h=[],y={exclude:/node_modules/,...p,extractComments:!1,terserOptions:{compress:!0,mangle:!0,...p?.terserOptions}};return f?n.mergeConfig({mode:"production",optimization:{minimize:!0,minimizer:[new a,new s(y)],...d},plugins:[new o]},e):(!0===m&&h.push(new pc({algorithm:"gzip",test:/\.js(\?.*)?$/i,threshold:10240,minRatio:.7,deleteOriginalAssets:!1})),n.mergeConfig({mode:"production",optimization:{minimize:!0,minimizer:[new a,new s(y)],runtimeChunk:"single",...d,splitChunks:{chunks:"all",minSize:10240,maxAsyncRequests:3,maxInitialRequests:3,minChunks:1,maxSize:5242880,...d?.splitChunks,cacheGroups:{vendors:{chunks:"initial",name:"vendors",test:/[\\/]node_modules[\\/]/,priority:-10,reuseExistingChunk:!0},...u.get(d?.splitChunks,"cacheGroups",{})}}},plugins:[new o,new t.CopyFolderPlugin({patterns:[{from:l,to:r.resolve(i,c,"public")}]}),...h]},e))};