@communecter/cocolight-api-client 1.0.4 → 1.0.6
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CocolightApiClient=t():e.CocolightApiClient=t()}(this,(()=>(()=>{var e={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const
|
|
2
|
-
|| (${a} == "string" && ${
|
|
3
|
-
|| (${a} === "string" && ${
|
|
4
|
-
|| ${a} === "boolean" || ${i} === null`).assign(c,o._`[${i}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(i,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return d};const p=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=c.Correct){const i=n===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${i} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return o._`typeof ${t} ${i} ${e}`}return n===c.Correct?s:(0,o.not)(s);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function u(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let i;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;i=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else i=o.nil;s.number&&delete s.integer;for(const e in s)i=(0,o.and)(i,l(e,t,r,n));return i}t.checkDataType=l,t.checkDataTypes=u;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,f)}t.reportTypeError=m},343:e=>{"use strict";const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function i(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const o={scheme:"http",domainHost:!0,parse:i,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(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){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:o,https:{scheme:"https",domainHost:o.domainHost,parse:i,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(r);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const i=`${r}:${t.nid||e.nid}`,s=c[i];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=c[i];s&&(e=s.serialize(e,t));const o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const n=e;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&t.test(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.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:{}}}},422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),i=r(9029),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",d=r?i._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,s);e.fail$data(i._`!${d}.test(${t})`)}};t.default=s},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(9029),i=r(4227),s=r(5765),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:d}=e;!function(e){const{opts:n,errSchemaPath:s}=d,o=r.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,i.checkStrictMode)(d,e,n.strictTuples)}}(o),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=i.mergeEvaluated.items(s,r.length,d.items));const p=s.name("valid"),l=s.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(d,t)||(s.if(n._`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},p))),e.ok(p))}))}t.validateTuple=a,t.default=o},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),i=r(9029),s=r(4227),o=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:d,schemaCode:p,it:l}=e;if(!a&&!c)return;const u=t.let("valid"),f=d.items?(0,n.getSchemaTypes)(d.items):[];function m(s,o){const a=t.name("item"),c=(0,n.checkDataTypes)(f,a,l.opts.strictNumbers,n.DataType.Wrong),d=t.const("indices",i._`{}`);t.for(i._`;${s}--;`,(()=>{t.let(a,i._`${r}[${s}]`),t.if(c,i._`continue`),f.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${d}[${a}] == "number"`,(()=>{t.assign(o,i._`${d}[${a}]`),e.error(),t.assign(u,!1).break()})).code(i._`${d}[${a}] = ${s}`)}))}function y(n,a){const c=(0,s.useFunc)(t,o.default),d=t.name("outer");t.label(d).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(u,!1).break(d)}))))))}e.block$data(u,(function(){const n=t.let("i",i._`${r}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(u,!0),t.if(i._`${n} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?m:y)(n,s)))}),i._`${p} === false`),e.ok(u)}};t.default=a},793:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var o=new Array(s);o[0]=i(e);for(var a=1;a<s;a++)o[a]=i(r[a]);return o.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var d="",p=0,l=-1,u=e&&e.length||0,f=0;f<u;){if(37===e.charCodeAt(f)&&f+1<u){switch(l=l>-1?l:0,e.charCodeAt(f+1)){case 100:case 102:if(p>=c)break;if(null==r[p])break;l<f&&(d+=e.slice(l,f)),d+=Number(r[p]),l=f+2,f++;break;case 105:if(p>=c)break;if(null==r[p])break;l<f&&(d+=e.slice(l,f)),d+=Math.floor(Number(r[p])),l=f+2,f++;break;case 79:case 111:case 106:if(p>=c)break;if(void 0===r[p])break;l<f&&(d+=e.slice(l,f));var m=typeof r[p];if("string"===m){d+="'"+r[p]+"'",l=f+2,f++;break}if("function"===m){d+=r[p].name||"<anonymous>",l=f+2,f++;break}d+=i(r[p]),l=f+2,f++;break;case 115:if(p>=c)break;l<f&&(d+=e.slice(l,f)),d+=String(r[p]),l=f+2,f++;break;case 37:l<f&&(d+=e.slice(l,f)),d+="%",l=f+2,f++,p--}++p}++f}return-1===l?e:(l<u&&(d+=e.slice(l)),d)}},1111:e=>{"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${s} ${i}`)}};t.default=i},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=o(s,"then"),c=o(s,"else");if(!a&&!c)return;const d=t.let("valid",!0),p=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(p,l("then",r),l("else",r))}else a?t.if(p,l("then")):t.if((0,n.not)(p),l("else"));function l(r,i){return()=>{const s=e.subschema({keyword:r},p);t.assign(d,p),e.mergeValidEvaluated(s,d),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(d,(()=>e.error(!0)))}};function o(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=s},1520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{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 n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)c(r,t[n]),r.push(e[++n]);return new i(r)}t._Code=i,t.nil=new i(""),t._=s;const o=new i("+");function a(e,...t){const r=[p(e[0])];let n=0;for(;n<t.length;)r.push(o),c(r,t[n]),r.push(o,p(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===o){const r=d(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new i(r)}function c(e,t){var r;t instanceof i?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:p(Array.isArray(r)?r.join(","):r))}function d(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==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 n?void 0:`"${e}${t.slice(1)}`}function p(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new i(p(e))},t.safeStringify=p,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):s`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},2017:e=>{"use strict";e.exports=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,i,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))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=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},2079:e=>{"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},2128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3463),i=r(3693),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=s},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8727),i=r(208),s=r(7887),o=r(208),a=r(7870),c=r(3673),d=r(4495),p=r(9029),l=r(2023),u=r(6939),f=r(4227),m=r(8708);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,p._`${l.default.data}, ${l.default.valCxt}`,n.$async,(()=>{e.code(p._`"use strict"; ${h(r,i)}`),function(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,p._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,p._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,p._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,p._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,p._`""`),e.var(l.default.parentData,p._`undefined`),e.var(l.default.parentDataProperty,p._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`{}`)}))}(e,i),e.code(s)})):e.func(t,p._`${l.default.data}, ${function(e){return p._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?p._`, ${l.default.dynamicAnchors}={}`:p.nil}}={}`}(i)}`,n.$async,(()=>e.code(h(r,i)).code(s)))}function h(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?p._`/*# sourceURL=${r} */`:p.nil}function g({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 b(e){return"boolean"!=typeof e.schema}function v(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function $(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);_(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(!0===i.$comment)e.code(p._`${l.default.self}.logger.log(${s})`);else if("function"==typeof i.$comment){const r=p.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(p._`${l.default.self}.opts.$comment(${s}, ${r}, ${i}.schema)`)}}function _(e,t,r,n){const{gen:i,schema:a,data:c,allErrors:d,opts:u,self:m}=e,{RULES:y}=m;function h(f){(0,s.shouldUseGroup)(a,f)&&(f.type?(i.if((0,o.checkDataType)(f.type,c,u.strictNumbers)),j(e,f),1===t.length&&t[0]===f.type&&r&&(i.else(),(0,o.reportTypeError)(e)),i.endIf()):j(e,f),d||i.if(p._`${l.default.errors} === ${n||0}`))}!a.$ref||!u.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,y)?(u.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{O(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)O(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,s.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&P(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of y.rules)h(e);h(y.post)}))):i.block((()=>S(e,"$ref",y.all.$ref.definition)))}function j(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(n,r)&&S(e,r.keyword,r.definition,t.type)}))}function O(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;y(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(l.default.vErrors,null),n.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",p._`${r}.evaluated`),t.if(p._`${e.evaluated}.dynamicProps`,(()=>t.assign(p._`${e.evaluated}.props`,p._`undefined`))),t.if(p._`${e.evaluated}.dynamicItems`,(()=>t.assign(p._`${e.evaluated}.items`,p._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if(p._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(p._`new ${i}(${l.default.vErrors})`))):(t.assign(p._`${n}.errors`,l.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof p.Name&&e.assign(p._`${t}.props`,r),n instanceof p.Name&&e.assign(p._`${t}.items`,n)}(e),t.return(p._`${l.default.errors} === 0`))}(e)}))}(e):y(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class E{constructor(e,t,r){if((0,c.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,f.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",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.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",l.default.errors))}result(e,t,r){this.failResult((0,p.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,p.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(p._`${t} !== undefined && (${(0,p.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?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.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=p.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=p.nil,t=p.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:s}=this;r.if((0,p.or)(p._`${n} === undefined`,t)),e!==p.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==p.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,p.or)(function(){if(r.length){if(!(t instanceof p.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return p._`${(0,o.checkDataTypes)(e,t,i.opts.strictNumbers,o.DataType.Wrong)}`}return p.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return p._`!${r}(${t})`}return p.nil}())}subschema(e,t){const r=(0,d.getSubschema)(this.it,e);(0,d.extendSubschemaData)(r,this.it,e),(0,d.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(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 s=n.const("_errs",l.default.errors);$(e,s),n.var(t,p._`${s} === ${l.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.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,p.Name))),!0}}function S(e,t,r,n){const i=new E(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=E;const T=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!T.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=l.default.rootData}else{const o=k.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(i=o[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=r[t-a],!i)return s}let o=s;const a=i.split("/");for(const e of a)e&&(s=p._`${s}${(0,p.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=p._`${o} && ${s}`);return o;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=N},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:o,it:a}=e;let c,d;const{minContains:p,maxContains:l}=s;a.opts.next?(c=void 0===p?1:p,d=l):c=1;const u=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:d}),void 0===d&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&c>d)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${u} >= ${c}`;return void 0!==d&&(t=n._`${t} && ${u} <= ${d}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function m(){const e=t.name("_valid"),r=t.let("count",0);y(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===d?t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${d}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function y(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===d&&1===c?y(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==d&&t.if(n._`${o}.length > 0`,m)):(t.let(f,!1),m()),e.result(f,(()=>e.reset()))}};t.default=s},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),i=r(4227),s=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
|
|
5
|
-
missingProperty: ${
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CocolightApiClient=t():e.CocolightApiClient=t()}(this,(()=>(()=>{var e={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2586),n=r(5765),s=r(4227),i=r(8660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&i.default.code(new o.KeywordCxt(l,i.default,"additionalProperties"));const u=(0,n.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=s.mergeEvaluated.props(t,(0,s.toHash)(u),l.props));const d=u.filter((e=>!(0,s.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const m=t.name("valid");for(const r of d)p(r)?f(r):(t.if((0,n.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(m,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(m);function p(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},m)}}};t.default=a},208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const o=r(396),n=r(7887),s=r(8708),i=r(9029),a=r(4227);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(o.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c||(t.DataType=c={})),t.getSchemaTypes=function(e){const t=l(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},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:o,opts:s}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(l){const n=m(t,o,s.strictNumbers,c.Wrong);r.if(n,(()=>{a.length?function(e,t,r){const{gen:o,data:n,opts:s}=e,a=o.let("dataType",i._`typeof ${n}`),c=o.let("coerced",i._`undefined`);"array"===s.coerceTypes&&o.if(i._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>o.assign(n,i._`${n}[0]`).assign(a,i._`typeof ${n}`).if(m(t,n,s.strictNumbers),(()=>o.assign(c,n))))),o.if(i._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void o.elseIf(i._`${a} == "number" || ${a} == "boolean"`).assign(c,i._`"" + ${n}`).elseIf(i._`${n} === null`).assign(c,i._`""`);case"number":return void o.elseIf(i._`${a} == "boolean" || ${n} === null
|
|
2
|
+
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(c,i._`+${n}`);case"integer":return void o.elseIf(i._`${a} === "boolean" || ${n} === null
|
|
3
|
+
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(c,i._`+${n}`);case"boolean":return void o.elseIf(i._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(c,!1).elseIf(i._`${n} === "true" || ${n} === 1`).assign(c,!0);case"null":return o.elseIf(i._`${n} === "" || ${n} === 0 || ${n} === false`),void o.assign(c,null);case"array":o.elseIf(i._`${a} === "string" || ${a} === "number"
|
|
4
|
+
|| ${a} === "boolean" || ${n} === null`).assign(c,i._`[${n}]`)}}o.else(),f(e),o.endIf(),o.if(i._`${c} !== undefined`,(()=>{o.assign(n,c),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(i._`${t} !== undefined`,(()=>e.assign(i._`${t}[${r}]`,o)))}(e,c)}))}(e,t,a):f(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,o=c.Correct){const n=o===c.Correct?i.operators.EQ:i.operators.NEQ;let s;switch(e){case"null":return i._`${t} ${n} null`;case"array":s=i._`Array.isArray(${t})`;break;case"object":s=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=a(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=a();break;default:return i._`typeof ${t} ${n} ${e}`}return o===c.Correct?s:(0,i.not)(s);function a(e=i.nil){return(0,i.and)(i._`typeof ${t} == "number"`,e,r?i._`isFinite(${t})`:i.nil)}}function m(e,t,r,o){if(1===e.length)return d(e[0],t,r,o);let n;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=i._`typeof ${t} != "object"`;n=s.null?e:i._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=i.nil;s.number&&delete s.integer;for(const e in s)n=(0,i.and)(n,d(e,t,r,o));return n}t.checkDataType=d,t.checkDataTypes=m;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?i._`{type: ${e}}`:i._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:o}=e,n=(0,a.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}(e);(0,s.reportError)(t,p)}t.reportTypeError=f},343:e=>{"use strict";const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function o(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function n(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const i={scheme:"http",domainHost:!0,parse:n,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=o(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(o(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){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:i,https:{scheme:"https",domainHost:i.domainHost,parse:n,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const o=e.path.match(r);if(o){const r=t.scheme||e.scheme||"urn";e.nid=o[1].toLowerCase(),e.nss=o[2];const n=`${r}:${t.nid||e.nid}`,s=c[n];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),n=`${r}:${t.nid||o}`,s=c[n];s&&(e=s.serialize(e,t));const i=e,a=e.nss;return i.path=`${o||t.nid}:${a}`,t.skipEscape=!0,i},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const o=e;return o.uuid=o.nss,o.nss=void 0,r.tolerant||o.uuid&&t.test(o.uuid)||(o.error=o.error||"UUID is not valid."),o},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.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:{}}}},422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5765),n=r(9029),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match pattern "${e}"`,params:({schemaCode:e})=>n._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:i,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?n._`(new RegExp(${i}, ${c}))`:(0,o.usePattern)(e,s);e.fail$data(n._`!${l}.test(${t})`)}};t.default=s},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const o=r(9029),n=r(4227),s=r(5765),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,n.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:s,parentSchema:i,data:a,keyword:c,it:l}=e;!function(e){const{opts:o,errSchemaPath:s}=l,i=r.length,a=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(o.strictTuples&&!a){const e=`"${c}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,n.checkStrictMode)(l,e,o.strictTuples)}}(i),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=n.mergeEvaluated.items(s,r.length,l.items));const u=s.name("valid"),d=s.const("len",o._`${a}.length`);r.forEach(((t,r)=>{(0,n.alwaysValidSchema)(l,t)||(s.if(o._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=i},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(208),n=r(9029),s=r(4227),i=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>n.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>n._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!a&&!c)return;const m=t.let("valid"),p=l.items?(0,o.getSchemaTypes)(l.items):[];function f(s,i){const a=t.name("item"),c=(0,o.checkDataTypes)(p,a,d.opts.strictNumbers,o.DataType.Wrong),l=t.const("indices",n._`{}`);t.for(n._`;${s}--;`,(()=>{t.let(a,n._`${r}[${s}]`),t.if(c,n._`continue`),p.length>1&&t.if(n._`typeof ${a} == "string"`,n._`${a} += "_"`),t.if(n._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(i,n._`${l}[${a}]`),e.error(),t.assign(m,!1).break()})).code(n._`${l}[${a}] = ${s}`)}))}function h(o,a){const c=(0,s.useFunc)(t,i.default),l=t.name("outer");t.label(l).for(n._`;${o}--;`,(()=>t.for(n._`${a} = ${o}; ${a}--;`,(()=>t.if(n._`${c}(${r}[${o}], ${r}[${a}])`,(()=>{e.error(),t.assign(m,!1).break(l)}))))))}e.block$data(m,(function(){const o=t.let("i",n._`${r}.length`),s=t.let("j");e.setParams({i:o,j:s}),t.assign(m,!0),t.if(n._`${o} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?f:h)(o,s)))}),n._`${u} === false`),e.ok(m)}};t.default=a},793:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,o){var n=o&&o.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var i=new Array(s);i[0]=n(e);for(var a=1;a<s;a++)i[a]=n(r[a]);return i.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",u=0,d=-1,m=e&&e.length||0,p=0;p<m;){if(37===e.charCodeAt(p)&&p+1<m){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;d<p&&(l+=e.slice(d,p)),l+=Number(r[u]),d=p+2,p++;break;case 105:if(u>=c)break;if(null==r[u])break;d<p&&(l+=e.slice(d,p)),l+=Math.floor(Number(r[u])),d=p+2,p++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===r[u])break;d<p&&(l+=e.slice(d,p));var f=typeof r[u];if("string"===f){l+="'"+r[u]+"'",d=p+2,p++;break}if("function"===f){l+=r[u].name||"<anonymous>",d=p+2,p++;break}l+=n(r[u]),d=p+2,p++;break;case 115:if(u>=c)break;d<p&&(l+=e.slice(d,p)),l+=String(r[u]),d=p+2,p++;break;case 37:d<p&&(l+=e.slice(d,p)),l+="%",d=p+2,p++,u--}++u}++p}return-1===d?e:(d<m&&(l+=e.slice(d)),l)}},1111:e=>{"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?o.operators.GT:o.operators.LT;e.fail$data(o._`${r}.length ${s} ${n}`)}};t.default=n},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>o.str`must match "${e.ifClause}" schema`,params:({params:e})=>o._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,n.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=i(s,"then"),c=i(s,"else");if(!a&&!c)return;const l=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else a?t.if(u,d("then")):t.if((0,o.not)(u),d("else"));function d(r,n){return()=>{const s=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(s,l),n?t.assign(n,o._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function i(e,t){const r=e.schema[t];return void 0!==r&&!(0,n.alwaysValidSchema)(e,r)}t.default=s},1520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=o;class n extends r{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 o&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)c(r,t[o]),r.push(e[++o]);return new n(r)}t._Code=n,t.nil=new n(""),t._=s;const i=new n("+");function a(e,...t){const r=[u(e[0])];let o=0;for(;o<t.length;)r.push(i),c(r,t[o]),r.push(i,u(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===i){const r=l(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 c(e,t){var r;t instanceof n?e.push(...t._items):t instanceof o?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:u(Array.isArray(r)?r.join(","):r))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof o||'"'!==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 o?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new n(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new n(`.${e}`):s`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new n(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new n(e.toString())}},2017:e=>{"use strict";e.exports=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 o,n,s;if(Array.isArray(t)){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(!e(t[n],r[n]))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((o=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(r,s[n]))return!1;for(n=o;0!=n--;){var i=s[n];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};t.default=n},2079:e=>{"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},2128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(3463),n=r(3693),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,n.default];t.default=s},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const o=r(8727),n=r(208),s=r(7887),i=r(208),a=r(7870),c=r(3673),l=r(4495),u=r(9029),d=r(2023),m=r(6939),p=r(4227),f=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},s){n.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,o.$async,(()=>{e.code(u._`"use strict"; ${y(r,n)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,n),e.code(s)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(n)}`,o.$async,(()=>e.code(y(r,n)).code(s)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function g({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 v(e){return"boolean"!=typeof e.schema}function b(e){(0,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return $(e,[],!1,t);const r=(0,n.getSchemaTypes)(e.schema);$(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function _({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){const s=r.$comment;if(!0===n.$comment)e.code(u._`${d.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const r=u.str`${o}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${s}, ${r}, ${n}.schema)`)}}function $(e,t,r,o){const{gen:n,schema:a,data:c,allErrors:l,opts:m,self:f}=e,{RULES:h}=f;function y(p){(0,s.shouldUseGroup)(a,p)&&(p.type?(n.if((0,i.checkDataType)(p.type,c,m.strictNumbers)),E(e,p),1===t.length&&t[0]===p.type&&r&&(n.else(),(0,i.reportTypeError)(e)),n.endIf()):E(e,p),l||n.if(u._`${d.default.errors} === ${o||0}`))}!a.$ref||!m.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,h)?(m.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{O(e.dataTypes,t)||T(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const o of e.dataTypes)O(t,o)?r.push(o):t.includes("integer")&&"number"===o&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&T(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const o in r){const n=r[o];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;r.length&&!r.some((e=>{return o=e,(r=t).includes(o)||"number"===o&&r.includes("integer");var r,o}))&&T(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes))}(e,t),n.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):n.block((()=>S(e,"$ref",h.all.$ref.definition)))}function E(e,t){const{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(o,r)&&S(e,r.keyword,r.definition,t.type)}))}function O(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),g(e))?function(e){const{schema:t,opts:r,gen:o}=e;h(e,(()=>{r.$comment&&t.$comment&&_(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),o.let(d.default.vErrors,null),o.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:s}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${n}(${d.default.vErrors})`))):(t.assign(u._`${o}.errors`,d.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:o}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),o instanceof u.Name&&e.assign(u._`${t}.items`,o)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,o.topBoolOrEmptySchema)(e)))};class P{constructor(e,t,r){if((0,c.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,p.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",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.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",d.default.errors))}result(e,t,r){this.failResult((0,u.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,u.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(u._`${t} !== undefined && (${(0,u.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?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.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=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:o,schemaType:n,def:s}=this;r.if((0,u.or)(u._`${o} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(n.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:n}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,i.checkDataTypes)(e,t,n.opts.strictNumbers,i.DataType.Wrong)}`}return u.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),g(e))?function(e,t){const{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&_(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,m.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 s=o.const("_errs",d.default.errors);w(e,s),o.var(t,u._`${s} === ${d.default.errors}`)}(e,t):(0,o.boolOrEmptySchema)(e,t)}(n,t),n}mergeEvaluated(e,t){const{it:r,gen:o}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(o,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(o,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:o}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return o.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function S(e,t,r,o){const n=new P(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,c.funcKeywordCode)(n,r):"macro"in r?(0,c.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(n,r)}t.KeywordCxt=P;const j=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,s;if(""===e)return d.default.rootData;if("/"===e[0]){if(!j.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=d.default.rootData}else{const i=k.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(n=i[2],"#"===n){if(a>=t)throw new Error(c("property/index",a));return o[t-a]}if(a>t)throw new Error(c("data",a));if(s=r[t-a],!n)return s}let i=s;const a=n.split("/");for(const e of a)e&&(s=u._`${s}${(0,u.getProperty)((0,p.unescapeJsonPointer)(e))}`,i=u._`${i} && ${s}`);return i;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=N},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?o.str`must contain at least ${e} valid item(s)`:o.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?o._`{minContains: ${e}}`:o._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:i,it:a}=e;let c,l;const{minContains:u,maxContains:d}=s;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const m=t.const("len",o._`${i}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,n.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,n.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n.alwaysValidSchema)(a,r)){let t=o._`${m} >= ${c}`;return void 0!==l&&(t=o._`${t} && ${m} <= ${l}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(o._`${e}++`),void 0===l?t.if(o._`${e} >= ${c}`,(()=>t.assign(p,!0).break())):(t.if(o._`${e} > ${l}`,(()=>t.assign(p,!1).break())),1===c?t.assign(p,!0):t.if(o._`${e} >= ${c}`,(()=>t.assign(p,!0))))}(r)))))}function h(r,o){t.forRange("i",0,m,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:!0},r),o()}))}void 0===l&&1===c?h(p,(()=>t.if(p,(()=>t.break())))):0===c?(t.let(p,!0),void 0!==l&&t.if(o._`${i}.length > 0`,f)):(t.let(p,!1),f()),e.result(p,(()=>e.reset()))}};t.default=s},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const o=r(9029),n=r(4227),s=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=1===t?"property":"properties";return o.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>o._`{property: ${e},
|
|
5
|
+
missingProperty: ${n},
|
|
6
6
|
depsCount: ${t},
|
|
7
|
-
deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:o}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const p=(0,s.propertyInData)(r,i,c,o.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),o.allErrors?r.if(p,(()=>{for(const t of d)(0,s.checkReportMissingProp)(e,t)})):(r.if(n._`${p} && (${(0,s.checkMissingProp)(e,d,a)})`),(0,s.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:o,it:a}=e,c=r.name("valid");for(const d in t)(0,i.alwaysValidSchema)(a,t[d])||(r.if((0,s.propertyInData)(r,n,d,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:d},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},3282:(e,t,r)=>{"use strict";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 n=r(4042),i=r(6144),s=r(6653),o=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var p=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var l=r(9029);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 u=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},3463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},3558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},3673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(9029),i=r(2023),s=r(5765),o=r(8708);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:s,parentSchema:o,it:a}=e,d=t.macro.call(a.self,s,o,a),p=c(r,i,d);!1!==a.opts.validateSchema&&a.self.validateSchema(d,!0);const l=r.name("valid");e.subschema({schema:d,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:p,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:d,keyword:p,schema:l,parentSchema:u,$data:f,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const y=!f&&t.compile?t.compile.call(m.self,l,u,m):t.validate,h=c(d,p,y),g=d.let("valid");function b(r=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!f||!1===t.schema);d.assign(g,n._`${r}${(0,s.callValidateCode)(e,h,o,a)}`,t.modifying)}function v(e){var r;d.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const r=t.async?function(){const e=d.let("ruleErrs",null);return d.try((()=>b(n._`await `)),(t=>d.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>d.assign(e,n._`${t}.errors`)),(()=>d.throw(t))))),e}():function(){const e=n._`${h}.errors`;return d.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.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))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const o=i.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4551),i=r(5765),s=r(9029),o=r(2023),a=r(3835),c=r(4227),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:o,schemaEnv:c,validateName:d,opts:u,self:f}=i,{root:m}=c;if(("#"===r||"#/"===r)&&o===m.baseId)return function(){if(c===m)return l(e,d,c,c.$async);const r=t.scopeValue("root",{ref:m});return l(e,s._`${r}.validate`,m,m.$async)}();const y=a.resolveRef.call(f,m,o,r);if(void 0===y)throw new n.default(i.opts.uriResolver,o,r);return y instanceof a.SchemaEnv?function(t){const r=p(e,t);l(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===u.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:i,errSchemaPath:r},o);e.mergeEvaluated(a),e.ok(o)}(y)}};function p(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,r,n){const{gen:a,it:d}=e,{allErrors:p,schemaEnv:l,opts:u}=d,f=u.passContext?o.default.this:s.nil;function m(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function y(e){var t;if(!d.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(n&&!n.dynamicProps)void 0!==n.props&&(d.props=c.mergeEvaluated.props(a,n.props,d.props));else{const t=a.var("props",s._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(a,t,d.props,s.Name)}if(!0!==d.items)if(n&&!n.dynamicItems)void 0!==n.items&&(d.items=c.mergeEvaluated.items(a,n.items,d.items));else{const t=a.var("items",s._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(a,t,d.items,s.Name)}}n?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(s._`await ${(0,i.callValidateCode)(e,t,f)}`),y(t),p||a.assign(r,!0)}),(e=>{a.if(s._`!(${e} instanceof ${d.ValidationError})`,(()=>a.throw(e))),m(e),p||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,f),(()=>y(t)),(()=>m(t)))}t.getValidate=p,t.callRef=l,t.default=d},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(9029),i=r(3558),s=r(2023),o=r(6939),a=r(4227),c=r(2586);class d{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,o.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 p(e){const t=u.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:d}=this.opts.code,{ownProperties:p}=this.opts,l=new n.CodeGen(this.scope,{es5:a,lines:d,ownProperties:p});let f;e.$async&&(f=l.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=l.scopeName("validate");e.validateName=m;const y={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,c.validateFunctionCode)(y),l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(m,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:m,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function l(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:p.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 f(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=this.opts.uriResolver.parse(t),n=(0,o._getFullPath)(this.opts.uriResolver,r);let i=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return h.call(this,r,e);const s=(0,o.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return h.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||p.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,o.resolveUrl)(this.opts.uriResolver,i,n)),new d({schema:t,schemaId:r,root:e,baseId:i})}return h.call(this,r,a)}}t.SchemaEnv=d,t.compileSchema=p,t.resolveRef=function(e,t,r){var n;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=f.call(this,e,r);if(void 0===s){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;i&&(s=new d({schema:i,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[r]=l.call(this,s):void 0},t.getCompilingSchema=u,t.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(n)&&i&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,i))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=m.call(this,n,e)}const{schemaId:c}=this.opts;return s=s||new d({schema:r,schemaId:c,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},3837:e=>{"use strict";e.exports=JSON.parse('{"$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":false}')},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},3966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s=r(5765),o=r(5457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),i=r(9029),s=r(4227),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:d}=e,{opts:p}=d;if(!c&&0===r.length)return;const l=r.length>=p.loopRequired;if(d.allErrors?function(){if(l||c)e.block$data(i.nil,u);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(l||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(s,(0,n.propertyInData)(t,a,r,p.ownProperties)),t.if((0,i.not)(s),(()=>{e.error(),t.break()}))}),i.nil)}(s,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,s)),(0,n.reportMissingProp)(e,s),t.else()}(),p.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(d,t,d.opts.strictRequired)}}function u(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,p.ownProperties),(()=>e.error()))}))}}};t.default=o},4018:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(s,o),time:r(c(!0),d),"date-time":r(u(!0),f),"iso-time":r(c(),p),"iso-date-time":r(u(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return y.test(e)&&h.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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(w.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 g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=b}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"iso-date-time":r(/^\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,m),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},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:i[s])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){const r=a.exec(t);if(!r)return!1;const n=+r[1],i=+r[2],s=+r[3],o=r[4],c="-"===r[5]?-1:1,d=+(r[6]||0),p=+(r[7]||0);if(d>23||p>59||e&&!o)return!1;if(n<=23&&i<=59&&s<60)return!0;const l=i-p*c,u=n-d*c-(l<0?1:0);return(23===u||-1===u)&&(59===l||-1===l)&&s<61}}function d(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return r&&n?r-n:void 0}function p(e,t){if(!e||!t)return;const r=a.exec(e),n=a.exec(t);return r&&n?(e=r[1]+r[2]+r[3])>(t=n[1]+n[2]+n[3])?1:e<t?-1:0:void 0}const l=/t|\s/i;function u(e){const t=c(e);return function(e){const r=e.split(l);return 2===r.length&&s(r[0])&&t(r[1])}}function f(e,t){if(!e||!t)return;const r=new Date(e).valueOf(),n=new Date(t).valueOf();return r&&n?r-n:void 0}function m(e,t){if(!e||!t)return;const[r,n]=e.split(l),[i,s]=t.split(l),a=o(r,i);return void 0!==a?a||d(n,s):void 0}const y=/\/|:/,h=/^(?:[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,g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,b=-(2**31),v=2**31-1;function $(){return!0}const w=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const s=r(3558),o=r(4551),a=r(396),c=r(3835),d=r(9029),p=r(6939),l=r(208),u=r(4227),f=r(3837),m=r(5944),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,r,n,i,s,o,a,c,d,p,l,u,f,h,g,b,v,$,w,_,j,O,P,E,S;const T=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===k||void 0===k?1:k||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:y,R=null!==(i=e.uriResolver)&&void 0!==i?i:m.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:T)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:T)||void 0===c||c,strictTypes:null!==(p=null!==(d=e.strictTypes)&&void 0!==d?d:T)&&void 0!==p?p:"log",strictTuples:null!==(u=null!==(l=e.strictTuples)&&void 0!==l?l:T)&&void 0!==u?u:"log",strictRequired:null!==(h=null!==(f=e.strictRequired)&&void 0!==f?f:T)&&void 0!==h&&h,code:e.code?{...e.code,optimize:N,regExp:I}:{optimize:N,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(E=e.unicodeRegExp)||void 0===E||E,int32range:null===(S=e.int32range)||void 0===S||S,uriResolver:R}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;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,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),O.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},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 i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function i(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 a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({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 d.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function d(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 i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,p.normalizeId)(t||i),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=j.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.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=j.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,p.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(N.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>I.call(this,e))),this;A.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.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 i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=i[e];n&&s&&(i[e]=C(s))}}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,i=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];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 a=this._cache.get(e);if(void 0!==a)return a;r=(0,p.normalizeId)(s||r);const d=p.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:d}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_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):c.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{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const i in e){const s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function j(e){return e=(0,p.normalizeId)(e),this.schemas[e]||this.refs[e]}function O(){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 E(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 S(){const e={...this.opts};for(const t of h)delete e[t];return e}w.ValidationError=s.default,w.MissingRefError=o.default,t.default=w;const T={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){const{RULES:r}=this;if((0,u.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.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 I(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=i?s.post:s.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?R.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function R(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 A(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}const x={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,x]}}},4227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(9029),i=r(1520);function s(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||m(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 c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(s,o,a,c)=>{const d=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(s,o,a):t(s,o,a),a):o instanceof n.Name?(t(s,a,o),o):r(o,a);return c!==n.Name||d instanceof n.Name?d:i(s,d)}}function p(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&l(e,r,t),r}function l(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=o,t.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},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:d({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),l(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:p}),items:d({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=p,t.setEvaluated=l;const u={};var f;function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f||(t.Type=f={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===f.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${s} ${i}`)}};t.default=i},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),i=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;p(d.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${o}${(0,i.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function p(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==o&&(p(o instanceof n.Name?o:d.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:d,errSchemaPath:p,schemaEnv:l,self:u}=c;d.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:u.formats,code:d.code.formats}),o=r.const("fDef",n._`${s}[${a}]`),c=r.let("fType"),p=r.let("format");r.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,n._`${o}.type || "string"`).assign(p,n._`${o}.validate`)),(()=>r.assign(c,n._`"string"`).assign(p,o))),e.fail$data((0,n.or)(!1===d.strictSchema?n.nil:n._`${a} && !${p}`,function(){const e=l.$async?n._`(${o}.async ? await ${p}(${i}) : ${p}(${i}))`:n._`${p}(${i})`,r=n._`(typeof ${p} == "function" ? ${e} : ${p}.test(${i}))`;return n._`${p} && ${p} !== true && ${c} === ${t} && !${r}`}()))}():function(){const s=u.formats[o];if(!s)return void function(){if(!1!==d.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${p}"`}u.logger.warn(e())}();if(!0===s)return;const[a,c,f]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):d.code.formats?n._`${d.code.formats}${(0,n.getProperty)(o)}`:void 0,i=r.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return n._`await ${f}(${i})`}return"function"==typeof c?n._`${f}(${i})`:n._`${f}.test(${i})`}())}())}};t.default=i},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),i=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function s(e){if(d(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(i)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function o(e,t=!1){let r="",i=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===i&&(i=!1),i||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(d(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],i=[];let s=!1,a=!1,c=!1;function d(){if(i.length){if(!1===s){const e=o(i);if(void 0===e)return r.error=!0,!1;n.push(e)}i.length=0}return!0}for(let o=0;o<e.length;o++){const p=e[o];if("["!==p&&"]"!==p)if(":"!==p)if("%"===p){if(!d())break;s=!0}else i.push(p);else{if(!0===a&&(c=!0),!d())break;if(t++,n.push(":"),t>7){r.error=!0;break}o-1>=0&&":"===e[o-1]&&(a=!0)}}return i.length&&(s?r.zone=i.join(""):c?n.push(i.join("")):n.push(o(i))),r.address=n.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,escapedHost:r,isIPV6:!0}}}function c(e,t){let r="",n=!0;const i=e.length;for(let s=0;s<i;s++){const o=e[s];"0"===o&&n?(s+1<=i&&e[s+1]===t||s+1===i)&&(r+=o,n=!1):(n=o===t,r+=o)}return r}function d(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const p=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={recomposeAuthority:function(e){const t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);const n=s(r);if(n.isIPV4)r=n.host;else{const t=a(n.host);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){const t=[];for(;e.length;)if(e.match(p))e=e.replace(p,"");else if(e.match(l))e=e.replace(l,"/");else if(e.match(u))e=e.replace(u,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(f);if(!r)throw new Error("Unexpected dot segment condition");{const n=r[0];e=e.slice(n.length),t.push(n)}}return t.join("")},normalizeIPv4:s,normalizeIPv6:a,stringArrayToHexStripped:o}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=l;const i=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},s={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:y,errWithCause:y};function o(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),d={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function p(e,t){const r={logger:t,parent:e[c]};t[c]=r}function l(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},s=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const y=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(y);"function"==typeof r&&g.forEach((function(e){r[e]=r})),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",$=Object.create(r);$.log||($.log=v),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:i[e]||i[d[e]||"log"]||v})),e[a]=n}($,g,r),p({},$),Object.defineProperty($,"levelVal",{get:function(){return o(this.level,this)}}),Object.defineProperty($,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,u(this,w,$,"error"),u(this,w,$,"fatal"),u(this,w,$,"warn"),u(this,w,$,"info"),u(this,w,$,"debug"),u(this,w,$,"trace"),y.forEach((e=>{u(this,w,$,e)}))}});const w={transmit:t,serialize:s,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:h(e),messageKey:e.messageKey||"msg",onChild:e.onChild||v};function _(r,i,o){if(!i)throw new Error("missing bindings for child Pino");o=o||{},s&&i.serializers&&(o.serializers=i.serializers);const a=o.serializers;if(s&&a){var c=Object.assign({},n,a),d=!0===e.browser.serialize?Object.keys(c):s;delete i.serializers,f([i],d,c,this._stdErrSerialize)}function l(e){this._childLevel=1+(0|e._childLevel),this.bindings=i,c&&(this.serializers=c,this._serialize=d),t&&(this._logEvent=m([].concat(e._logEvent.bindings,i)))}l.prototype=this;const u=new l(this);return p(this,u),u.child=function(...e){return _.call(this,r,...e)},u.level=o.level||this.level,r.onChild(u),u}return $.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},l.levels.values,t),labels:Object.assign({},l.levels.labels,function(e){const t={};return Object.keys(e).forEach((function(r){t[e[r]]=r})),t}(t))}}(e),$.level=b,$.setMaxListeners=$.getMaxListeners=$.emit=$.addListener=$.on=$.prependListener=$.once=$.prependOnceListener=$.removeListener=$.removeAllListeners=$.listeners=$.listenerCount=$.eventNames=$.write=$.flush=v,$.serializers=n,$._serialize=s,$._stdErrSerialize=c,$.child=function(...e){return _.call(this,w,...e)},t&&($._logEvent=m()),$}function u(e,t,r,s){if(Object.defineProperty(e,s,{value:o(e.level,r)>o(s,r)?v:r[a][s],writable:!0,enumerable:!0,configurable:!0}),e[s]===v){if(!t.transmit)return;const n=o(t.transmit.level||e.level,r);if(o(s,r)<n)return}e[s]=function(e,t,r,s){return c=e[a][s],function(){const a=t.timestamp(),d=new Array(arguments.length),p=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var l=0;l<d.length;l++)d[l]=arguments[l];var u=!1;if(t.serialize&&(f(d,this._serialize,this.serializers,this._stdErrSerialize),u=!0),t.asObject||t.formatters?c.call(p,function(e,t,r,i,s){const{level:o,log:a=e=>e}=s.formatters||{},c=r.slice();let d=c[0];const p={};if(i&&(p.time=i),o){const r=o(t,e.levels.values[t]);Object.assign(p,r)}else p.level=e.levels.values[t];let l=1+(0|e._childLevel);if(l<1&&(l=1),null!==d&&"object"==typeof d){for(;l--&&"object"==typeof c[0];)Object.assign(p,c.shift());d=c.length?n(c.shift(),c):void 0}else"string"==typeof d&&(d=n(c.shift(),c));return void 0!==d&&(p[s.messageKey]=d),a(p)}(this,s,d,a,t)):c.apply(p,d),t.transmit){const n=t.transmit.level||e._level,i=o(n,r),c=o(s,r);if(c<i)return;!function(e,t,r,n=!1){const i=t.send,s=t.ts,o=t.methodLevel,a=t.methodValue,c=t.val,d=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=r.filter((function(e){return-1===d.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=a,i(o,e._logEvent,c),e._logEvent=m(d)}(this,{ts:a,methodLevel:s,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:o(e._level,r)},d,u)}};var c}(e,t,r,s);const d=function(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[c];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==d.length&&(e[s]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(d,e[s]))}function f(e,t,r,n){for(const i in e)if(n&&e[i]instanceof Error)e[i]=l.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i])&&t)for(const n in e[i])t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function m(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function y(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}function h(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?$:w}function g(){return{}}function b(e){return e}function v(){}function $(){return!1}function w(){return Date.now()}l.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},l.stdSerializers=s,l.stdTimeFunctions=Object.assign({},{nullTime:$,epochTime:w,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=l,e.exports.pino=l},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),i=r(9029),s=r(4227),o=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:d}=e,{opts:p}=d,l=(0,n.allSchemaProperties)(r),u=l.filter((e=>(0,s.alwaysValidSchema)(d,r[e])));if(0===l.length||u.length===l.length&&(!d.opts.unevaluated||!0===d.props))return;const f=p.strictSchema&&!p.allowMatchingProperties&&c.properties,m=t.name("valid");!0===d.props||d.props instanceof i.Name||(d.props=(0,o.evaluatedPropsToName)(t,d.props));const{props:y}=d;function h(e){for(const t in f)new RegExp(e).test(t)&&(0,s.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(s=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${s})`,(()=>{const n=u.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:o.Type.Str},m),d.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${s}]`,!0):n||d.allErrors||t.if((0,i.not)(m),(()=>t.break()))}))}))}!function(){for(const e of l)f&&h(e),d.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(494),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),i=r(4227),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:r,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const d=r.const("len",n._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${d} <= ${t.length}`);else if("object"==typeof s&&!(0,i.alwaysValidSchema)(c,s)){const s=r.var("valid",n._`${d} <= ${t.length}`);r.if((0,n.not)(s),(()=>function(s){r.forRange("i",t.length,d,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},s),c.allErrors||r.if((0,n.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=o,t.default=s},5765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(9029),i=r(4227),s=r(2023),o=r(4227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function d(e,t,r,i){const s=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(s,(0,n.not)(c(e,t,r))):s}function p(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:s}=e;r.if(d(r,i,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,s){return(0,n.or)(...i.map((i=>(0,n.and)(d(e,t,i,r.ownProperties),n._`${s} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const s=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${s} && ${c(e,t,r)}`:s},t.noPropertyInData=d,t.allSchemaProperties=p,t.schemaProperties=function(e,t){return p(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:o,errorPath:a},it:c},d,p,l){const u=l?n._`${e}, ${t}, ${i}${o}`:t,f=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=n._`${u}, ${r.object(...f)}`;return p!==n.nil?n._`${d}.call(${p}, ${m})`:n._`${d}(${m})`};const l=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===s.code?l:(0,o.useFunc)(e,s)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const o=e.subschema({keyword:s,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},5844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=i},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=n.operators,s={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${s[t].fail} ${i} || isNaN(${r})`)}};t.default=a},5944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8343);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6022:e=>{!function(){"use strict";var t=[,function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.lengthOf=t.keysOf=t.isObject=t.isInfOrNaN=t.isFunction=t.isArguments=t.hasOwn=t.handleError=t.convertMapToObject=t.checkError=void 0,t.isFunction=function(e){return"function"==typeof e},t.isObject=function(e){return"object"===n(e)},t.keysOf=function(e){return Object.keys(e)},t.lengthOf=function(e){return Object.keys(e).length};var i=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=i,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,i,s=(i=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(s.push(n.value),!t||s.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(a)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=s[0],a=s[1];return e[o]=a,e}),{})},t.isArguments=function(e){return null!=e&&i(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var s={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=s,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(s.maxStack(e.message))throw new Error("Converting circular structure to JSON");throw e}}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=void 0;for(var r=Object.create(null),n=function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)},i=0;i<64;i++)r[n(i)]=i;var s=function(e){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var t=[],r=0;r<e;r++)t.push(0);return t.$Uint8ArrayPolyfill=!0,t}return new Uint8Array(new ArrayBuffer(e))},o={encode:function(e){if("string"==typeof e){var t=e;e=s(t.length);for(var r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=i}}for(var o=[],a=null,c=null,d=null,p=null,l=0;l<e.length;l++)switch(l%3){case 0:a=e[l]>>2&63,c=(3&e[l])<<4;break;case 1:c|=e[l]>>4&15,d=(15&e[l])<<2;break;case 2:d|=e[l]>>6&3,p=63&e[l],o.push(n(a)),o.push(n(c)),o.push(n(d)),o.push(n(p)),a=null,c=null,d=null,p=null}return null!=a&&(o.push(n(a)),o.push(n(c)),null==d?o.push("="):o.push(n(d)),null==p&&o.push("=")),o.join("")},decode:function(e){var t=Math.floor(3*e.length/4);"="==e.charAt(e.length-1)&&(t--,"="==e.charAt(e.length-2)&&t--);for(var n,i=s(t),o=null,a=null,c=null,d=0,p=0;p<e.length;p++){var l="="===(n=e.charAt(p))?-1:r[n];switch(p%4){case 0:if(l<0)throw new Error("invalid base64 string");o=l<<2;break;case 1:if(l<0)throw new Error("invalid base64 string");o|=l>>4,i[d++]=o,a=(15&l)<<4;break;case 2:l>=0&&(a|=l>>2,i[d++]=a,c=(3&l)<<6);break;case 3:l>=0&&(i[d++]=c|l)}}return i},newBinary:s};t.Base64=o},function(e){e.exports={_noYieldsAllowed:function(e){return e()}}},function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function e(t,i,s,o,a){var c=i[t];switch(r(c)){case"string":return n(c);case"number":return isFinite(c)?String(c):"null";case"boolean":return String(c);case"object":if(!c)return"null";var d,p=o+s,l=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var u=c.length,f=0;f<u;f+=1)l[f]=e(f,c,s,p,a)||"null";return d=0===l.length?"[]":p?"[\n"+p+l.join(",\n"+p)+"\n"+o+"]":"["+l.join(",")+"]"}var m=Object.keys(c);return a&&(m=m.sort()),m.forEach((function(t){(d=e(t,c,s,p,a))&&l.push(n(t)+(p?": ":":")+d)})),d=0===l.length?"{}":p?"{\n"+p+l.join(",\n"+p)+"\n"+o+"}":"{"+l.join(",")+"}"}};t.default=function(e,t){var r=Object.assign({indent:"",canonical:!1},t);if(!0===r.indent)r.indent=" ";else if("number"==typeof r.indent){for(var n="",s=0;s<r.indent;s++)n+=" ";r.indent=n}return i("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}var i={};!function(){var e=i,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var s=n(1),o={};e.EJSON=o;var a=new Map;o.addType=function(e,t){if(a.has(e))throw new Error("Type ".concat(e," already present"));a.set(e,t)};var c=[{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$date")&&1===(0,s.lengthOf)(e)},matchObject:function(e){return e instanceof Date},toJSONValue:function(e){return{$date:e.getTime()}},fromJSONValue:function(e){return new Date(e.$date)}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$regexp")&&(0,s.hasOwn)(e,"$flags")&&2===(0,s.lengthOf)(e)},matchObject:function(e){return e instanceof RegExp},toJSONValue:function(e){return{$regexp:e.source,$flags:e.flags}},fromJSONValue:function(e){return new RegExp(e.$regexp,e.$flags.slice(0,50).replace(/[^gimuy]/g,"").replace(/(.)(?=.*\1)/g,""))}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$InfNaN")&&1===(0,s.lengthOf)(e)},matchObject:s.isInfOrNaN,toJSONValue:function(e){return{$InfNaN:Number.isNaN(e)?0:e===1/0?1:-1}},fromJSONValue:function(e){return e.$InfNaN/0}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$binary")&&1===(0,s.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,s.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$escape")&&1===(0,s.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,s.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,s.keysOf)(e).forEach((function(r){t[r]=o.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,s.keysOf)(e.$escape).forEach((function(r){t[r]=o.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$type")&&(0,s.hasOwn)(e,"$value")&&2===(0,s.lengthOf)(e)},matchObject:function(e){return o._isCustomType(e)},toJSONValue:function(e){var t=r._noYieldsAllowed((function(){return e.toJSONValue()}));return{$type:e.typeName(),$value:t}},fromJSONValue:function(e){var t=e.$type;if(!a.has(t))throw new Error("Custom EJSON type ".concat(t," is not defined"));var n=a.get(t);return r._noYieldsAllowed((function(){return n(e.$value)}))}}];o._isCustomType=function(e){return e&&(0,s.isFunction)(e.toJSONValue)&&(0,s.isFunction)(e.typeName)&&a.has(e.typeName())},o._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,s.convertMapToObject)(a)},o._getConverters=function(){return c};var d=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},p=function e(t){if(null===t)return null;var r=d(t);return void 0!==r?r:(0,s.isObject)(t)?((0,s.keysOf)(t).forEach((function(r){var n=t[r];if((0,s.isObject)(n)||void 0===n||(0,s.isInfOrNaN)(n)){var i=d(n);i?t[r]=i:e(n)}})),t):t};o._adjustTypesToJSONValue=p,o.toJSONValue=function(e){var t=d(e);if(void 0!==t)return t;var r=e;return(0,s.isObject)(e)&&(r=o.clone(e),p(r)),r};var l=function(e){if((0,s.isObject)(e)&&null!==e){var t=(0,s.keysOf)(e);if(t.length<=2&&t.every((function(e){return"string"==typeof e&&"$"===e.substr(0,1)})))for(var r=0;r<c.length;r++){var n=c[r];if(n.matchJSONValue(e))return n.fromJSONValue(e)}}return e},u=function e(t){if(null===t)return null;var r=l(t);return r!==t?r:(0,s.isObject)(t)?((0,s.keysOf)(t).forEach((function(r){var n=t[r];if((0,s.isObject)(n)){var i=l(n);if(n!==i)return void(t[r]=i);e(n)}})),t):t};o._adjustTypesFromJSONValue=u,o.fromJSONValue=function(e){var t=l(e);return t===e&&(0,s.isObject)(e)&&(t=o.clone(e),u(t)),t},o.stringify=(0,s.handleError)((function(e,t){var r=o.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),o.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return o.fromJSONValue(JSON.parse(e))},o.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},o.equals=function(e,t,r){var n,i=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,s.isObject)(e)||!(0,s.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(o.isBinary(e)&&o.isBinary(t)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if((0,s.isFunction)(e.equals))return e.equals(t,r);if((0,s.isFunction)(t.equals))return t.equals(e,r);var a,c=Array.isArray(e),d=Array.isArray(t);if(c!==d)return!1;if(c&&d){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!o.equals(e[n],t[n],r))return!1;return!0}switch(o._isCustomType(e)+o._isCustomType(t)){case 1:return!1;case 2:return o.equals(o.toJSONValue(e),o.toJSONValue(t))}var p=(0,s.keysOf)(e),l=(0,s.keysOf)(t);return i?(n=0,a=p.every((function(i){return!(n>=l.length||i!==l[n]||!o.equals(e[i],t[l[n]],r)||(n++,0))}))):(n=0,a=p.every((function(i){return!!(0,s.hasOwn)(t,i)&&!!o.equals(e[i],t[i],r)&&(n++,!0)}))),a&&n===l.length},o.clone=function(e){var t;if(!(0,s.isObject)(e))return e;if(null===e)return null;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return e;if(o.isBinary(e)){t=o.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(o.clone):(0,s.isArguments)(e)?Array.from(e).map(o.clone):(0,s.isFunction)(e.clone)?e.clone():o._isCustomType(e)?o.fromJSONValue(o.clone(o.toJSONValue(e)),!0):(t={},(0,s.keysOf)(e).forEach((function(r){t[r]=o.clone(e[r])})),t)},o.newBinary=t.newBinary}(),e.exports=i.EJSON}()},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),i=r(7060),s=r(6378),o=r(7532),a=r(9857),c=[n.default,i.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=r,c=t.let("valid",!1),d=t.let("passing",null),p=t.name("_valid");e.setParams({passing:d}),t.block((function(){a.forEach(((r,s)=>{let a;(0,i.alwaysValidSchema)(o,r)?t.var(p,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},p),s>0&&t.if(n._`${p} && ${c}`).assign(c,!1).assign(d,n._`[${d}, ${s}]`).else(),t.if(p,(()=>{t.assign(c,!0),t.assign(d,s),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},6250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},6378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5457),i=r(5354),s=r(494),o=r(3966),a=r(2661),c=r(3025),d=r(9713),p=r(8660),l=r(117),u=r(5333),f=r(7923),m=r(6505),y=r(6163),h=r(5844),g=r(1239),b=r(4426);t.default=function(e=!1){const t=[f.default,m.default,y.default,h.default,g.default,b.default,d.default,p.default,c.default,l.default,u.default];return e?t.push(i.default,o.default):t.push(n.default,s.default),t.push(a.default),t}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),i=r(9029),s=i.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>i.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:d,self:p}=c;if(!d.validateFormats)return;const l=new n.KeywordCxt(c,p.RULES.all.format.definition,"format");function u(e){return i._`${e}.compare(${r}, ${s}) ${o[a].fail} 0`}l.$data?function(){const r=t.scopeValue("formats",{ref:p.formats,code:d.code.formats}),n=t.const("fmt",i._`${r}[${l.schemaCode}]`);e.fail$data((0,i.or)(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,u(n)))}():function(){const r=l.schema,n=p.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:n,code:d.code.formats?i._`${d.code.formats}${(0,i.getProperty)(r)}`:void 0});e.fail$data(u(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},6653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(7652),s=r(3835),o=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:d,it:p}=e,{oneOf:l}=d;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=c.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),m=t.const("tag",n._`${r}${(0,n.getProperty)(u)}`);function y(r){const i=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(s,n.Name),i}t.if(n._`typeof ${m} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(d);let n=!0;for(let t=0;t<l.length;t++){let d=l[t];if((null==d?void 0:d.$ref)&&!(0,a.schemaHasRulesButRef)(d,p.self.RULES)){const e=d.$ref;if(d=s.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,e),d instanceof s.SchemaEnv&&(d=d.schema),void 0===d)throw new o.default(p.opts.uriResolver,p.baseId,e)}const f=null===(e=null==d?void 0:d.properties)||void 0===e?void 0:e[u];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);n=n&&(r||i(d)),c(f,t)}if(!n)throw new Error(`discriminator: "${u}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(u)}function c(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" 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: "${u}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${m} === ${e}`),t.assign(f,y(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:m,tagName:u}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:m,tagName:u}))),e.ok(f)}};t.default=c},6939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(4227),i=r(2017),s=r(7106),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&d(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function d(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!o.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=d(e))),t===1/0))return 1/0}return t}function p(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return l(e,n)}function l(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=p,t._getFullPath=l;const u=/#\/?$/;function f(e){return e?e.replace(u,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,o=f(e[r]||t),a={"":o},c=p(n,o,!1),d={},l=new Set;return s(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const s=c+t;let o=a[i];function p(t){const r=this.opts.uriResolver.resolve;if(t=f(o?r(o,t):t),l.has(t))throw y(t);l.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==f(s)&&("#"===t[0]?(u(e,d[t],t),d[t]=e):this.refs[t]=s),t}function h(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);p.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=p.call(this,e[r])),h.call(this,e.$anchor),h.call(this,e.$dynamicAnchor),a[t]=o})),d;function u(e,t,r){if(void 0!==t&&!i(e,t))throw y(r)}function y(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,s,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,s,o,d;if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=o.length,d=p,console&&console.warn&&console.warn(d)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function u(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):m(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var d=c.length,p=m(c,d);for(r=0;r<d;++r)n(p[r],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return u(this,e,!0)},s.prototype.rawListeners=function(e){return u(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5882),i=r(3439),s=r(7307),o=r(422),a=r(4486),c=r(4003),d=r(1163),p=r(617),l=r(7935),u=r(8643),f=[n.default,i.default,s.default,o.default,a.default,c.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];t.default=f},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,s,o,a,c,d,p,l){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var u in n(s,o,a,c,d,p,l),s){var f=s[u];if(Array.isArray(f)){if(u in t.arrayKeywords)for(var m=0;m<f.length;m++)r(e,n,i,f[m],o+"/"+u+"/"+m,a,o,u,s,m)}else if(u in t.propsKeywords){if(f&&"object"==typeof f)for(var y in f)r(e,n,i,f[y],o+"/"+u+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,u,s,y)}else(u in t.keywords||e.allKeys&&!(u in t.skipKeywords))&&r(e,n,i,f,o+"/"+u,a,o,u,s)}i(s,o,a,c,d,p,l)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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}},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s=r(3853),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,d=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(n._`${d} ${c} ${o}`)}};t.default=o},7532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(4737).default];t.default=n},7652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},7845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(1520);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s||(t.UsedValueState=s={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.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}}}t.Scope=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.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:i}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[i];if(o){const e=o.get(s);if(e)return e}else o=this._values[i]=new Map;o.set(s,n);const a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.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(e,r,o={},a){let c=n.nil;for(const d in e){const p=e[d];if(!p)continue;const l=o[d]=o[d]||new Map;p.forEach((e=>{if(l.has(e))return;l.set(e,s.Started);let o=r(e);if(o){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new i(e);c=n._`${c}${o}${this.opts._n}`}l.set(e,s.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9029),i=r(4227);function s(e,t,r){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const d=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,i.checkStrictMode)(e,`default is ignored for: ${d}`);let p=n._`${d} === undefined`;"empty"===c.useDefaults&&(p=n._`${p} || ${d} === null || ${d} === ""`),s.if(p,n._`${d} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)s(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>s(e,r,t.default)))}},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(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])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s=r(6250),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,s.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=o},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),i=r(6461),s=r(9029),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,n.fullFormats,o),e;const[r,s]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,o];return d(e,t.formats||n.formatNames,r,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,n){var i,o;null!==(i=(o=e.opts.code).formats)&&void 0!==i||(o.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}c.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},8343:(e,t,r)=>{"use strict";const{normalizeIPv6:n,normalizeIPv4:i,removeDotSegments:s,recomposeAuthority:o,normalizeComponentEncoding:a}=r(4834),c=r(343);function d(e,t,r,n){const i={};return n||(e=f(p(e,r),r),t=f(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=s(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=s(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=s(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=s(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function p(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],a=c[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&i.push(r.scheme,":");const d=o(r);if(void 0!==d&&("suffix"!==n.reference&&i.push("//"),i.push(d),r.path&&"/"!==r.path.charAt(0)&&i.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=s(e)),void 0===d&&(e=e.replace(/^\/\//u,"/%2F")),i.push(e)}return void 0!==r.query&&i.push("?",r.query),void 0!==r.fragment&&i.push("#",r.fragment),i.join("")}const l=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(e,t){const r=Object.assign({},t),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const d=e.match(u);if(d){if(s.scheme=d[1],s.userinfo=d[3],s.host=d[4],s.port=parseInt(d[5],10),s.path=d[6]||"",s.query=d[7],s.fragment=d[8],isNaN(s.port)&&(s.port=d[5]),s.host){const e=i(s.host);if(!1===e.isIPV4){const t=n(e.host);s.host=t.host.toLowerCase(),a=t.isIPV6}else s.host=e.host,a=!0}void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||void 0!==s.query||s.path?void 0===s.scheme?s.reference="relative":void 0===s.fragment?s.reference="absolute":s.reference="uri":s.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||s.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&s.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||l[t])return!0;return!1}(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(e){s.error=s.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(o&&void 0!==s.scheme&&(s.scheme=unescape(s.scheme)),o&&void 0!==s.host&&(s.host=unescape(s.host)),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),e&&e.parse&&e.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}const m={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=p(f(e,t),t):"object"==typeof e&&(e=f(p(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return p(d(f(e,n),f(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:d,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=p(a(f(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=p(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=p(a(f(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=p(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:f};e.exports=m,e.exports.default=m,e.exports.fastUri=m},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s=r(6250),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:d}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const p=a.length>=d.opts.loopEnum;let l;const u=()=>null!=l?l:l=(0,i.useFunc)(t,s.default);let f;if(p||o)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",c,(e=>t.if(n._`${u()}(${r}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${u()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(f)}};t.default=o},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),i=r(9029),s=r(2023),o=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:d,it:p}=e;if(!d)throw new Error("ajv implementation error");const{allErrors:l,opts:u}=p;if(p.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(p,r))return;const f=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function y(e){t.code(i._`delete ${c}[${e}]`)}function h(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)y(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(p,r)){const r=t.name("valid");"failing"===u.removeAdditional?(g(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),y(n)}))):(g(n,r),l||t.if((0,i.not)(r),(()=>t.break())))}}}function g(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",c,(r=>{f.length||m.length?t.if(function(r){let s;if(f.length>8){const e=(0,o.schemaRefOrVal)(p,a.properties,"properties");s=(0,n.isOwnProperty)(t,e,r)}else s=f.length?(0,i.or)(...f.map((e=>i._`${r} === ${e}`))):i.nil;return m.length&&(s=(0,i.or)(s,...m.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(s)}(r),(()=>h(r))):h(r)})),e.ok(i._`${d} === ${s.default.errors}`)}};t.default=a},8708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(9029),i=r(4227),s=r(2023);function o(e,t){const r=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,n._`[${r}]`)),n._`${s.default.vErrors}.push(${r})`),e.code(n._`${s.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:s}=e;s.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,s){const{it:c}=e,{gen:p,compositeRule:l,allErrors:u}=c,f=d(e,r,i);(null!=s?s:l||u)?o(p,f):a(c,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:p,allErrors:l}=i;o(c,d(e,r,n)),p||l||a(i,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,n._`${s.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,i))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function d(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:o}=e,a=[p(o,r),l(e,r)];return function(e,{params:t,message:r},i){const{keyword:o,data:a,schemaValue:d,it:p}=e,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:m}=p;i.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),l.messages&&i.push([c.message,"function"==typeof r?r(e):r]),l.verbose&&i.push([c.schema,d],[c.parentSchema,n._`${f}${m}`],[s.default.data,a]),u&&i.push([c.propertyName,u])}(e,t,a),i.object(...a)}(e,t,r)}function p({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,r)]}function l({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let o=s?t:n.str`${t}/${e}`;return r&&(o=n.str`${o}${(0,i.getErrorPath)(r,i.Type.Str)}`),[c.schemaPath,o]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),i=r(9029),s=r(2023),o={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,s={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},9029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(1520),i=r(7845);var s=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class d 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,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return N(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class p extends d{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m 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=I(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class y 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 i=r[n];i.optimizeNames(e,t)||(R(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>k(e,t.names)),{})}}class h extends y{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends y{}class b extends h{}b.kind="else";class v extends h{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 b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(A(e),t instanceof v?[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=I(this.condition,e,t),this}get names(){const e=super.names;return N(e,this.condition),this.else&&k(e,this.else.names),e}}v.kind="if";class $ extends h{}$.kind="for";class w extends ${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=I(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class _ extends ${constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${t} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=N(super.names,this.from);return N(e,this.to)}}class j extends ${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=I(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}}class O extends h{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)}}O.kind="func";class P extends y{render(e){return"return "+super.render(e)}}P.kind="return";class E extends h{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&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}}class S extends h{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class T extends h{render(e){return"finally"+super.render(e)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function N(e,t){return t instanceof n._CodeOrName?k(e,t.names):e}function I(e,t,r){return e instanceof n.Name?s(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=s(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function s(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function R(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function A(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}T.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new g]}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 i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new c(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new d(e,t,r))}add(e,r){return this._leafNode(new p(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new v(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 v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(s,o,t,r),(()=>n(o)))}forOf(e,t,r,s=i.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),r(o)}))}return this._for(new j("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new j("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(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 E;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new S(e),t(e)}return r&&(this._currNode=n.finally=new T,this.code(r)),this._endBlockNode(S,T)}throw(e){return this._leafNode(new f(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,t=n.nil,r,i){return this._blockNode(new O(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(O)}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 v))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}},t.not=A;const x=q(t.operators.AND);t.and=function(...e){return e.reduce(x)};const C=q(t.operators.OR);function q(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(C)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),i=r(4227),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:o}=e;if((0,i.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},9857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.d(n,{default:()=>Ut});var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>ue,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>ye,navigator:()=>fe,origin:()=>he});var t=r(7007),i=r(3282),s=r(8182);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:c}=Object,d=(p=Object.create(null),e=>{const t=a.call(e);return p[t]||(p[t]=t.slice(8,-1).toLowerCase())});var p;const l=e=>(e=e.toLowerCase(),t=>d(t)===e),u=e=>t=>typeof t===e,{isArray:f}=Array,m=u("undefined"),y=l("ArrayBuffer"),h=u("string"),g=u("function"),b=u("number"),v=e=>null!==e&&"object"==typeof e,$=e=>{if("object"!==d(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=l("Date"),_=l("File"),j=l("Blob"),O=l("FileList"),P=l("URLSearchParams"),[E,S,T,k]=["ReadableStream","Request","Response","Headers"].map(l);function N(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(n=0;n<s;n++)o=i[n],t.call(null,e[o],o,e)}}function I(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!m(e)&&e!==R,x=(C="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>C&&e instanceof C);var C;const q=l("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),L=l("RegExp"),U=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};N(r,((r,i)=>{let s;!1!==(s=t(r,i,e))&&(n[i]=s||r)})),Object.defineProperties(e,n)},z=l("AsyncFunction"),M=(F="function"==typeof setImmediate,V=g(R.postMessage),F?setImmediate:V?(B=`axios@${Math.random()}`,J=[],R.addEventListener("message",(({source:e,data:t})=>{e===R&&t===B&&J.length&&J.shift()()}),!1),e=>{J.push(e),R.postMessage(B,"*")}):e=>setTimeout(e));var F,V,B,J;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(R):"undefined"!=typeof process&&process.nextTick||M,K={isArray:f,isArrayBuffer:y,isBuffer:function(e){return null!==e&&!m(e)&&null!==e.constructor&&!m(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=d(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer),t},isString:h,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:$,isReadableStream:E,isRequest:S,isResponse:T,isHeaders:k,isUndefined:m,isDate:w,isFile:_,isBlob:j,isRegExp:L,isFunction:g,isStream:e=>v(e)&&g(e.pipe),isURLSearchParams:P,isTypedArray:x,isFileList:O,forEach:N,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,i)=>{const s=t&&I(r,i)||i;$(r[s])&&$(n)?r[s]=e(r[s],n):$(n)?r[s]=e({},n):f(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(N(t,((t,n)=>{r&&g(t)?e[n]=o(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,s,o;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],n&&!n(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==r&&c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:l,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:q,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:U,freezeMethods:e=>{U(e,((t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];g(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return f(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:I,global:R,isContextDefined:A,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=f(e)?[]:{};return N(e,((e,t)=>{const s=r(e,n+1);!m(s)&&(i[t]=s)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(v(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:M,asap:G};function H(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const W=H.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(H,X),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,r,n,i,s)=>{const o=Object.create(W);return K.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Y=H;function Z(e){return K.isPlainObject(e)||K.isArray(e)}function Q(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,r){return e?e.concat(t).map((function(e,t){return e=Q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const te=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)})),re=function(e,t,r){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,i=r.visitor||d,s=r.dots,o=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!a&&K.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(K.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(Z)}(e)||(K.isFileList(e)||K.endsWith(r,"[]"))&&(a=K.toArray(e)))return r=Q(r),a.forEach((function(e,n){!K.isUndefined(e)&&null!==e&&t.append(!0===o?ee([r],n,s):null===o?r:r+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(i,r,s),c(e)),!1)}const p=[],l=Object.assign(te,{defaultVisitor:d,convertValue:c,isVisitable:Z});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!K.isUndefined(r)){if(-1!==p.indexOf(r))throw Error("Circular reference detected in "+n.join("."));p.push(r),K.forEach(r,(function(r,s){!0===(!(K.isUndefined(r)||null===r)&&i.call(t,r,K.isString(s)?s.trim():s,n,l))&&e(r,n?n.concat(s):[s])})),p.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ie(e,t){this._pairs=[],e&&re(e,this,t)}const se=ie.prototype;se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const oe=ie;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const n=r&&r.encode||ae;K.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(s=i?i(t,r):K.isURLSearchParams(t)?t.toString():new oe(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const de=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ue="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,me=ue&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),ye="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,he=ue&&window.location.href||"http://localhost",ge={...e,...le},be=function(e){function t(e,r,n,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;return s=!s&&K.isArray(n)?n.length:s,a?(K.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!o):(n[s]&&K.isObject(n[s])||(n[s]=[]),t(e,r,n[s],i)&&K.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}(n[s])),!o)}if(K.isFormData(e)&&K.isFunction(e.entries)){const r={};return K.forEachEntry(e,((e,n)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},ve={transitional:pe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=K.isObject(e);if(i&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return n?JSON.stringify(be(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ge.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=K.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{ve.headers[e]={}}));const $e=ve,we=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function je(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:K.isArray(e)?e.map(Oe):String(e)}function Pe(e,t,r,n,i){return K.isFunction(n)?n.call(this,t,r):(i&&(t=r),K.isString(t)?K.isString(n)?-1!==t.indexOf(n):K.isRegExp(n)?n.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=je(t);if(!i)throw new Error("header name must be a non-empty string");const s=K.findKey(n,i);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=Oe(e))}const s=(e,t)=>K.forEach(e,((e,r)=>i(e,r,t)));if(K.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&we[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(K.isHeaders(e))for(const[t,n]of e.entries())i(n,t,r);else null!=e&&i(t,e,r);return this}get(e,t){if(e=je(e)){const r=K.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(K.isFunction(t))return t.call(this,e,r);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=je(e)){const r=K.findKey(this,e);return!(!r||void 0===this[r]||t&&!Pe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=je(e)){const i=K.findKey(r,e);!i||t&&!Pe(0,r[i],i,t)||(delete r[i],n=!0)}}return K.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!Pe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return K.forEach(this,((n,i)=>{const s=K.findKey(r,i);if(s)return t[s]=Oe(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=Oe(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&K.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=je(e);t[n]||(function(e,t){const r=K.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return K.isArray(e)?e.forEach(n):n(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),K.freezeMethods(Ee);const Se=Ee;function Te(e,t){const r=this||$e,n=t||r,i=Se.from(n.headers);let s=n.data;return K.forEach(e,(function(e){s=e.call(r,s,i.normalize(),t?t.status:void 0)})),i.normalize(),s}function ke(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}K.inherits(Ne,Y,{__CANCEL__:!0});const Ie=Ne;function Re(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Ae=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),d=n[o];i||(i=c),r[s]=a,n[s]=c;let p=o,l=0;for(;p!==s;)l+=r[p++],p%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i<t)return;const u=d&&c-d;return u?Math.round(1e3*l/u):void 0}}(50,250);return function(e,t){let r,n,i=0,s=1e3/t;const o=(t,s=Date.now())=>{i=s,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=s?o(e,t):(r=e,n||(n=setTimeout((()=>{n=null,o(r)}),s-a)))},()=>r&&o(r)]}((r=>{const s=r.loaded,o=r.lengthComputable?r.total:void 0,a=s-n,c=i(a);n=s,e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),r)},xe=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ce=e=>(...t)=>K.asap((()=>e(...t))),qe=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,De=ge.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];K.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),K.isString(n)&&o.push("path="+n),K.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Se?{...e}:e;function ze(e,t){t=t||{};const r={};function n(e,t,r,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,r,i){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function s(e,t){if(!K.isUndefined(t))return n(void 0,t)}function o(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,s){return s in t?n(r,i):s in e?n(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,r)=>i(Ue(e),Ue(t),0,!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=c[n]||i,o=s(e[n],t[n],n);K.isUndefined(o)&&s!==a||(r[n]=o)})),r}const Me=e=>{const t=ze({},e);let r,{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Se.from(a),t.url=ce(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(t)),i||!1!==i&&qe(t.url))){const e=s&&o&&De.read(o);e&&a.set(s,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Me(e);let i=n.data;const s=Se.from(n.headers).normalize();let o,a,c,d,p,{responseType:l,onUploadProgress:u,onDownloadProgress:f}=n;function m(){d&&d(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let y=new XMLHttpRequest;function h(){if(!y)return;const n=Se.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Re((function(e){t(e),m()}),(function(e){r(e),m()}),{data:l&&"text"!==l&&"json"!==l?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=h:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(h)},y.onabort=function(){y&&(r(new Y("Request aborted",Y.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||pe;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Y(t,i.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,y)),y=null},void 0===i&&s.setContentType(null),"setRequestHeader"in y&&K.forEach(s.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),K.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),l&&"json"!==l&&(y.responseType=n.responseType),f&&([c,p]=Ae(f,!0),y.addEventListener("progress",c)),u&&y.upload&&([a,d]=Ae(u),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",d)),(n.cancelToken||n.signal)&&(o=t=>{y&&(r(!t||t.type?new Ie(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ge.protocols.indexOf(g)?r(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,e)):y.send(i||null)}))},Ve=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new Ie(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,i(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:a}=n;return a.unsubscribe=()=>K.asap(o),a}},Be=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Je=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Be(r,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let s=n.byteLength;if(r){let e=o+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},Ge="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=Ge&&"function"==typeof ReadableStream,He=Ge&&("function"==typeof TextEncoder?(We=new TextEncoder,e=>We.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var We;const Xe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ye=Ke&&Xe((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ze=Ke&&Xe((()=>K.isReadableStream(new Response("").body))),Qe={stream:Ze&&(e=>e.body)};var et;Ge&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=K.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})})));const tt={http:null,xhr:Fe,fetch:Ge&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:d,headers:p,withCredentials:l="same-origin",fetchOptions:u}=Me(e);d=d?(d+"").toLowerCase():"text";let f,m=Ve([i,s&&s.toAbortSignal()],o);const y=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let h;try{if(c&&Ye&&"get"!==r&&"head"!==r&&0!==(h=await(async(e,t)=>{const r=K.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await He(e)).byteLength:void 0)})(t):r})(p,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(K.isFormData(n)&&(e=r.headers.get("content-type"))&&p.setContentType(e),r.body){const[e,t]=xe(h,Ae(Ce(c)));n=Je(r.body,65536,e,t)}}K.isString(l)||(l=l?"include":"omit");const i="credentials"in Request.prototype;f=new Request(t,{...u,signal:m,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:n,duplex:"half",credentials:i?l:void 0});let s=await fetch(f);const o=Ze&&("stream"===d||"response"===d);if(Ze&&(a||o&&y)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=K.toFiniteNumber(s.headers.get("content-length")),[r,n]=a&&xe(t,Ae(Ce(a),!0))||[];s=new Response(Je(s.body,65536,r,(()=>{n&&n(),y&&y()})),e)}d=d||"text";let g=await Qe[K.findKey(Qe,d)||"text"](s,e);return!o&&y&&y(),await new Promise(((t,r)=>{Re(t,r,{data:g,headers:Se.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:f})}))}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,f),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,f)}})};K.forEach(tt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const rt=e=>`- ${e}`,nt=e=>K.isFunction(e)||null===e||!1===e,it=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let s=0;s<t;s++){let t;if(r=e[s],n=r,!nt(r)&&(n=tt[(t=String(r)).toLowerCase()],void 0===n))throw new Y(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+s]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ie(null,e)}function ot(e){return st(e),e.headers=Se.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),it(e.adapter||$e.adapter)(e).then((function(t){return st(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return ke(t)||(st(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ct={};at.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,s)=>{if(!1===e)throw new Y(n(i," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!ct[i]&&(ct[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,s)}},at.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const dt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=t[s];if(o){const t=e[s],r=void 0===t||o(t,s,e);if(!0!==r)throw new Y("option "+s+" must be "+r,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}},validators:at},pt=dt.validators;class lt{constructor(e){this.defaults=e,this.interceptors={request:new de,response:new de}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ze(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&dt.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),null!=n&&(K.isFunction(n)?t.paramsSerializer={serialize:n}:dt.assertOptions(n,{encode:pt.function,serialize:pt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),dt.assertOptions(t,{baseUrl:pt.spelling("baseURL"),withXsrfToken:pt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&K.merge(i.common,i[t.method]);i&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Se.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let p,l=0;if(!a){const e=[ot.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),p=e.length,d=Promise.resolve(t);l<p;)d=d.then(e[l++],e[l++]);return d}p=o.length;let u=t;for(l=0;l<p;){const e=o[l++],t=o[l++];try{u=e(u)}catch(e){t.call(this,e);break}}try{d=ot.call(this,u)}catch(e){return Promise.reject(e)}for(l=0,p=c.length;l<p;)d=d.then(c[l++],c[l++]);return d}getUri(e){return ce(Le((e=ze(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(e){lt.prototype[e]=function(t,r){return this.request(ze(r||{},{method:e,url:t,data:(r||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(ze(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}lt.prototype[e]=t(),lt.prototype[e+"Form"]=t(!0)}));const ut=lt;class ft{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Ie(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ft((function(t){e=t})),cancel:e}}}const mt=ft,yt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yt).forEach((([e,t])=>{yt[t]=e}));const ht=yt,gt=function e(t){const r=new ut(t),n=o(ut.prototype.request,r);return K.extend(n,ut.prototype,r,{allOwnKeys:!0}),K.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ze(t,r))},n}($e);gt.Axios=ut,gt.CanceledError=Ie,gt.CancelToken=mt,gt.isCancel=ke,gt.VERSION="1.8.4",gt.toFormData=re,gt.AxiosError=Y,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=ze,gt.AxiosHeaders=Se,gt.formToJSON=e=>be(K.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=it,gt.HttpStatusCode=ht,gt.default=gt;const bt=gt;var vt=r(1111);const $t="axios-retry";function wt(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&vt(e)}const _t=["get","head","options"],jt=_t.concat(["put","delete"]);function Ot(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Pt(e){return!!e.config?.method&&Ot(e)&&-1!==jt.indexOf(e.config.method)}function Et(e){return wt(e)||Pt(e)}function St(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const Tt={retries:3,retryCondition:Et,retryDelay:function(e=0,t=void 0){return Math.max(0,St(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function kt(e,t,r=!1){const n=function(e,t){return{...Tt,...t,...e[$t]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[$t]=n,n}const Nt=(e,t)=>{const r=e.interceptors.request.use((e=>(kt(e,t,!0),e[$t]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const i=kt(n,t);return r.response&&i.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,i=(e.retryCount||0)<r&&n(t);if("object"==typeof i)try{return!1!==await i}catch(e){return!1}return i}(i,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:s,onRetry:o}=t,a=i(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,i=n.timeout-e-a;if(i<=0)return Promise.reject(r);n.timeout=i}return n.transformRequest=[e=>e],await o(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(i),t(e(n))},i=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,i,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(i,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};Nt.isNetworkError=wt,Nt.isSafeRequestError=function(e){return!!e.config?.method&&Ot(e)&&-1!==_t.indexOf(e.config.method)},Nt.isIdempotentRequestError=Pt,Nt.isNetworkOrIdempotentRequestError=Et,Nt.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,i=Math.max(n,St(t));return i+.2*i*Math.random()},Nt.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,St(r))}},Nt.isRetryableError=Ot;const It=Nt;var Rt=r(6022),At=r(4874);const xt={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!xt._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof xt.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new xt.ObjectID(this._str)}typeName(){return"oid"}getTimestamp(){return Number.parseInt(this._str.substr(0,8),16)}valueOf(){return this._str}toJSONValue(){return this.valueOf()}toHexString(){return this.valueOf()}}},Ct=xt,qt=[{name:"Enregistrement d'un utilisateur",path:"/co2/person/register",constant:"PERSON_REGISTER",method:"POST",auth:"none",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",contentType:"application/x-www-form-urlencoded",request:{type:"object",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",properties:{name:{type:"string",description:"Nom complet de l'utilisateur"},username:{type:"string",description:"Pseudo ou identifiant unique"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},pwd:{type:"string",description:"Mot de passe"},app:{type:"string",description:"Nom de l'application"},pendingUserId:{type:"string",description:"ID d’un utilisateur en attente (facultatif)"},mode:{type:"string",description:"Mode d’enregistrement"},isInvitation:{type:"boolean",description:"Indique s’il s’agit d’une invitation (facultatif)"}},required:["name","username","email","pwd"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"string"},person:{type:"object",properties:{name:{type:"string"},username:{type:"string"},pwd:{type:"string"},email:{type:"string",format:"email"},_id:{type:"string"}},required:["name","username","pwd","email","_id"]}},required:["result","msg","id","person"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Authentification",path:"/api/cocolight/authenticate",constant:"AUTHENTICATE_URL",method:"POST",auth:"none",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",contentType:"application/json",postActions:[{type:"setToken",path:"accessToken"},{type:"setRefreshToken",path:"refreshToken"},{type:"setUserId",path:"user.id"},{type:"emitEvent",event:"userLoggedIn",payloadPath:"user"}],request:{type:"object",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},password:{type:"string",description:"Mot de passe de l'utilisateur"}},required:["email","password"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{anyOf:[{type:"string",format:"uri"},{type:"string",enum:[""]}],description:"URL de l'image de profil utilisateur, ou chaîne vide"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (identifiants incorrects)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Rafraîchir un token",path:"/api/cocolight/refreshtoken",constant:"REFRESH_TOKEN_URL",method:"POST",auth:"none",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",contentType:"application/json",request:{type:"object",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",properties:{refreshToken:{type:"string",description:"Token de rafraîchissement"}},required:["refreshToken"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après un rafraîchissement réussi.",properties:{token:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"}},required:["token","refreshToken"],additionalProperties:!1},401:{type:"object",description:"Erreur de rafraîchissement (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les informations utilisateur",path:"/api/cocolight/me",constant:"ME_INFO_URL",method:"POST",auth:"bearer",description:"Récupère les informations du profil utilisateur pour un token donné.",contentType:"application/json",responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{$ref:"#/$defs/_idObject"},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string"},modified:{$ref:"#/$defs/dateObject"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{type:"string"},profilMarkerImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilBannerUrl:{type:"string",format:"uri-reference"},profilRealBannerUrl:{type:"string",format:"uri-reference"},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","email","username","roles","collection","preferences","slug"]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupération de mot de passe",path:"/co2/person/sendemail",constant:"PASSWORD_RECOVERY",method:"POST",auth:"none",description:"Envoie un email pour récupérer le mot de passe.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},type:{type:"string",description:"Type d'email envoyé",const:"password",default:"password"}},required:["email","type"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Erreur: email non trouvé dans la base",type:"object",properties:{result:{type:"boolean",const:!1},errId:{type:"string",const:"UNKNOWN_ACCOUNT_ID"},msg:{type:"string"}},required:["result","errId","msg"],additionalProperties:!1},{description:"Succès: email de récupération envoyé",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Échange de token avec un autre serveur",path:"/api/cocolight/exchangetoken",constant:"SERVER_EXCHANGE_TOKEN",method:"POST",auth:"bearer",description:"Permet de se connecter à un autre serveur Communecter en échangeant un token.",contentType:"application/json",request:{type:"object",properties:{serverUrl:{type:"string",description:"URL du serveur distant"}},required:["serverUrl"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{type:"string",format:"uri",description:"URL de l'image de profil utilisateur"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Changer le mot de passe",path:"/co2/person/changepassword",constant:"CHANGE_PASSWORD",method:"POST",auth:"bearer",description:"Permet de changer le mot de passe d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{mode:{type:"string",description:"Mode ou contexte du changement",const:"changePassword",default:"changePassword"},userId:{type:"string",description:"Identifiant de l'utilisateur",default:"@userId"},oldPassword:{type:"string",description:"Ancien mot de passe"},newPassword:{type:"string",description:"Nouveau mot de passe"},newPassword2:{type:"string",description:"Confirmation du nouveau mot de passe"},scope:{type:["string"],description:"Périmètre concerné",default:""}},required:["mode","userId","oldPassword","newPassword","newPassword2"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer un compte",path:"/co2/element/delete/id/{id}/type/citoyens",constant:"DELETE_ACCOUNT",method:"POST",auth:"bearer",description:"Permet de supprimer un compte utilisateur.",contentType:"application/x-www-form-urlencoded",postActions:[{type:"resetSession"},{type:"emitEvent",event:"accountDeleted",path:null}],pathParams:{type:"object",properties:{id:{type:"string",description:"Identifiant de l'utilisateur à supprimer",default:"@userId"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{reason:{type:"string",description:"Raison de la suppression",default:""}},required:["reason"],additionalProperties:!1},responses:{200:{type:"object",description:"Réponse après la suppression du compte",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les paramètres utilisateur",path:"/co2/element/updatesettings",constant:"UPDATE_SETTINGS",method:"POST",auth:"bearer",description:"Mise à jour des paramètres spécifiques d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{type:{type:"string"},value:{},typeEntity:{type:"string",default:"citoyens"},idEntity:{type:"string"}},required:["type","value","typeEntity","idEntity"],additionalProperties:!1,allOf:[{if:{properties:{typeEntity:{const:"citoyens"}}},then:{properties:{idEntity:{type:"string",default:"@userId"}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["birthDate","email","locality","phone","directory"]}}},then:{properties:{value:{type:"string",enum:["private","public","mask"]}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["activitypub","isOpenData"]}}},then:{properties:{value:{type:"boolean"}}}},{if:{properties:{typeEntity:{not:{const:"citoyens"}},type:{enum:["isOpenData","isOpenEdition","private","feedback"]}}},then:{properties:{value:{type:"boolean"}}}}]},responses:{200:{type:"object",description:"Réponse après la mise à jour des paramètres",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour la description d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_DESCRIPTION",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour la description courte et complète d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"descriptions",default:"descriptions",description:"Nom du bloc à mettre à jour (doit être 'descriptions')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:["string","null"],default:"",description:"Périmètre de mise à jour",$comment:"Non utilisé dans l'application Cocolight"},descMentions:{type:"string",description:"Mentions dans la description",default:"",$comment:"Non utilisé dans l'application Cocolight"},shortDescription:{type:"string",description:"Courte description"},description:{type:"string",description:"Description complète"}},required:["block","typeElement","id"],additionalProperties:!1,allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["description"],properties:{description:{not:{type:"null"}}}},{required:["shortDescription"],properties:{shortDescription:{not:{type:"null"}}}}]}]},responses:{200:{type:"object",description:"Réponse après la mise à jour de la description",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",properties:{shortDescription:{type:["string","null"]},description:{type:["string","null"]}},additionalProperties:!0}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les informations d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_INFO",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les informations générales d'un élément (nom, contacts, etc.).",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"}},required:["block","typeElement","id"],$defs:{sharedFields:{name:{type:"string",description:"Nom de l'entité"},url:{type:"string",format:"uri",description:"Lien vers le site ou la page publique"},email:{type:"string",format:"email",description:"Adresse email"},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'}}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},id:{type:"string",description:"ID de l'élément concerné",default:"@userId"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},birthDate:{type:"string",format:"date",description:"Date de naissance"},fixe:{type:"string",description:"Téléphone fixe"},mobile:{type:"string",description:"Téléphone mobile"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["birthDate"],properties:{birthDate:{not:{type:"null"}}}},{required:["fixe"],properties:{fixe:{not:{type:"null"}}}},{required:["mobile"],properties:{mobile:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"projects"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},avancement:{type:"string",enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],description:"État d'avancement du projet"},parent:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{type:{type:"string",description:"Type d'entité parent"},name:{type:"string",description:"Nom de l'entité parent"}},required:["type","name"],additionalProperties:!1}},additionalProperties:!1,description:"Objet contenant les entités parentes (clé = ID). null signifie que les parents ne sont pas modifiés."}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["avancement"],properties:{avancement:{not:{type:"null"}}}},{required:["parent"],properties:{parent:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"organizations"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},type:{type:"string",enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],description:"Type d'organisation (ex. association, entreprise)"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["type"],properties:{type:{not:{type:"null"}}}}],additionalProperties:!1}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les réseaux sociaux d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SOCIAL",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les liens vers les réseaux sociaux d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"network",default:"network",description:"Nom du bloc à mettre à jour (doit être 'network')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},gitlab:{$ref:"#/$defs/socialField",description:"Compte Gitlab"},github:{$ref:"#/$defs/socialField",description:"Compte Github"},twitter:{$ref:"#/$defs/socialField",description:"Compte Twitter"},facebook:{$ref:"#/$defs/socialField",description:"Compte Facebook"},instagram:{$ref:"#/$defs/socialField",description:"Compte Instagram"},diaspora:{$ref:"#/$defs/socialField",description:"Compte Diaspora"},mastodon:{$ref:"#/$defs/socialField",description:"Compte Mastodon"},telegram:{$ref:"#/$defs/socialField",description:"Compte Telegram"},signal:{$ref:"#/$defs/socialField",description:"Compte Signal"}},required:["block","typeElement","id"],$defs:{socialField:{anyOf:[{type:"string",enum:[""],description:"Vide pour effacer le champ"},{type:"string",format:"uri",description:"URL du profil sur le réseau social"}]}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["gitlab"],properties:{gitlab:{not:{type:"null"}}}},{required:["github"],properties:{github:{not:{type:"null"}}}},{required:["twitter"],properties:{twitter:{not:{type:"null"}}}},{required:["facebook"],properties:{facebook:{not:{type:"null"}}}},{required:["instagram"],properties:{instagram:{not:{type:"null"}}}},{required:["diaspora"],properties:{diaspora:{not:{type:"null"}}}},{required:["mastodon"],properties:{mastodon:{not:{type:"null"}}}},{required:["telegram"],properties:{telegram:{not:{type:"null"}}}},{required:["signal"],properties:{signal:{not:{type:"null"}}}}]}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les localités d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_LOCALITY",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour l'adresse et les informations géographiques d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"localities",default:"localities",description:"Nom du bloc à mettre à jour (doit être 'localities')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},geo:{type:"object",description:"Coordonnées géographiques",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],additionalProperties:!1},geoPosition:{type:"object",description:"Position géographique GeoJSON",properties:{type:{type:"string",const:"Point",description:"Type GeoJSON (doit être 'Point')"},coordinates:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Tableau contenant [longitude, latitude]"},float:{type:"boolean",const:!0,default:!0,description:"Indicateur pour forcer la conversion en float côté serveur"}},required:["type","coordinates","float"],additionalProperties:!0},address:{type:"object",properties:{"@type":{type:"string",const:"PostalAddress"},addressCountry:{type:"string"},codeInsee:{type:"string"},addressLocality:{type:"string"},localityId:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{type:"string",description:"ID du département. Peut être vide pour les pays étrangers.",minLength:0},level3Name:{type:"string",description:"Nom du département. Peut être vide pour les pays étrangers.",minLength:0},level4:{type:"string",description:"ID de la commune. Peut être vide pour les pays étrangers.",minLength:0},level4Name:{type:"string",description:"Nom de la commune. Peut être vide pour les pays étrangers.",minLength:0},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],additionalProperties:!1,$comment:"Certains champs comme level3/level4 peuvent être vides selon le pays (ex : Maurice)"}},required:["block","typeElement","id","address"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour le slug d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SLUG",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour le slug pour une URL simplifiée.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",$comment:"Non utilisé dans l'application Cocolight"},slug:{type:"string",description:"Slug simplifié pour URL",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","typeElement","id","slug"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{description:"Réponse après la mise à jour de l'élément",oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,properties:{slug:{type:"string"}}}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Vérifier l'état d'une URL",path:"/co2/slug/check",constant:"CHECK",method:"POST",auth:"bearer",description:"Vérifie si une URL (slug) est valide ou disponible.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc"},id:{type:"string",description:"ID de l'élément"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'élément"},slug:{type:"string",description:"Slug à vérifier",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","type","id","slug"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{oneOf:[{description:"Slug valide ou disponible",type:"object",properties:{result:{type:"boolean",const:!0},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1},{description:"Slug non valide ou non disponible",type:"object",properties:{result:{type:"boolean",const:!1},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour l'image de profil",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",method:"POST",constant:"PROFIL_IMAGE",constantCocolight:["PROFIL_IMAGE","UPDATE_PDP"],auth:"bearer",description:"Permet de mettre à jour l'image de profil d'un utilisateur ou d'une entité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{profil_avatar:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image de profil au format binaire"}},required:["profil_avatar"],additionalProperties:!1},responses:{200:{description:"Réponse après l'enregistrement de l'image de profil",oneOf:[{type:"object",properties:{resultUpload:{type:"boolean",const:!0},success:{type:"boolean",const:!0},name:{type:"string",description:"Nom du fichier enregistré"},docPath:{type:"string",description:"Chemin du fichier sur le serveur"},size:{type:"integer",description:"Taille du fichier en octets"},result:{type:"boolean",const:!0},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",properties:{$id:{type:"string",description:"ID du document enregistré"}},required:["$id"],additionalProperties:!1},src:{type:"object",description:"Informations sur les images générées",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},changes:{type:"object",properties:{profilImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilMarkerImageUrl:{type:"string",format:"uri-reference"}},required:["profilImageUrl","profilMediumImageUrl","profilThumbImageUrl","profilMarkerImageUrl"],additionalProperties:!1}},required:["result","msg","changes"],additionalProperties:!1},survey:{type:["boolean","null"],description:"Peut être à false ou null selon les cas"}},required:["resultUpload","success","name","docPath","size","result","msg","id","src"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Obtenir les éléments liés",path:"/co2/element/about/type/{type}/id/{id}/json/true",constant:"GET_ELEMENTS_ABOUT",method:"POST",auth:"none",description:"Récupère les informations détaillées d'un élément et de ses éléments liés.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},id:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["type","id"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{tpl:{type:"string",default:"ficheInfoElement",const:"ficheInfoElement",description:"Template utilisé (ex: ficheInfoElement)"}},required:["tpl"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},oneOf:[{type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{$ref:"#/$defs/_idObject"},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string",enum:["citoyens"]},modified:{$ref:"#/$defs/dateObject"},created:{$ref:"#/$defs/dateObject"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilRealBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","username","roles","collection","preferences","slug"]},{description:"Schéma JSON pour les informations détaillées d'un projet",type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},collection:{type:"string",enum:["projects"]},created:{$ref:"#/$defs/dateObject"},creator:{type:"string"},modified:{$ref:"#/$defs/dateObject"},name:{type:"string"},parent:{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{type:{type:"string"},name:{type:"string"},_id:{$ref:"#/$defs/_idObject"},slug:{type:"string"},profilThumbImageUrl:{type:"string"}},required:["type","name"],additionalProperties:!0}},additionalProperties:!1},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},crowdfunding:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},private:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},updated:{$ref:"#/$defs/dateObject"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},typeSig:{type:"string"},type:{type:"string"}},required:["_id","collection","created","creator","modified","name","parent","preferences","slug","typeSig","type","updated"]},{description:"Schéma JSON pour les informations détaillées d'une organisation",type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},collection:{type:"string",enum:["organizations"]},created:{$ref:"#/$defs/dateObject"},creator:{type:"string"},modified:{$ref:"#/$defs/dateObject"},name:{type:"string"},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},type:{type:"string"},updated:{$ref:"#/$defs/dateObject"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de profil (vide ou URI)."},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image miniature (vide ou URI)."},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image pour le marqueur (vide ou URI)."},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de taille moyenne (vide ou URI)."}},required:["_id","collection","modified","name","preferences","slug","type","updated"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Gérer des connexions multiples",path:"/co2/link/multiconnect",constant:"MULTICONNECT",method:"POST",auth:"bearer",description:"Permet d’inviter ou de connecter plusieurs utilisateurs en même temps à une entité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},listInvite:{type:"object",description:"Liste des citoyens invités",patternProperties:{"^(citoyens|projects|organizations)$":{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{name:{type:"string",description:"Nom de l'invité"}},required:["name"],additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1}},required:["parentId","parentType","listInvite"],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},oneOf:[{type:"object",properties:{citoyens:{type:"array",items:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},newElement:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},name:{type:"string"},profilThumbImageUrl:{type:"string"},id:{type:"string"},isInviting:{type:"boolean"}},required:["_id","name","profilThumbImageUrl","id","isInviting"],additionalProperties:!0},newElementType:{type:"string",const:"citoyens"}},required:["result","msg","newElement","newElementType"]},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},required:["citoyens"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les actualités",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/{json}",constant:"GET_NEWS",constantCocolight:"GET_NEWS",method:"POST",auth:"none",description:"Récupère la liste d’actualités selon plusieurs critères.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{isLive:{type:"boolean",default:!0,description:"Indique si l'actualité est en direct"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'actualité (ex: 'citoyens', 'projects', 'organizations')"},id:{type:"string",description:"ID de l'élément (ex: ID d'un utilisateur, d'un projet ou d'une organisation)"},json:{type:"boolean",default:!0,description:"Indique si la réponse doit être au format JSON"}},required:["isLive","type","id","json"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{dateLimit:{type:"integer",default:0,description:"Limite de date timestamp ou 0"},search:{type:"object",properties:{name:{type:"string",default:"",description:"Nom ou terme recherché"}},required:["name"],additionalProperties:!1},indexStep:{type:"integer",default:12,description:"Nombre de résultats par page"}},required:["dateLimit","indexStep"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",description:"Réponse renvoyée lorsqu'aucune actualité n'est disponible",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean",const:!0},news:{type:"array",minItems:0,maxItems:0},limitDate:{type:"boolean",const:!1}},required:["type","endStream","news","limitDate"]},{type:"object",description:"Réponse renvoyée lorsqu'une ou plusieurs actualités sont disponibles",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean"},news:{type:"object",description:"Contient plusieurs objets news. Chaque clé est un identifiant dynamique (par exemple, un ObjectID Mongo) et chaque valeur doit respecter la structure définie par NewsCommonSchema.",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/NewsSchema"}},additionalProperties:!1},limitDate:{type:"object"}},required:["type","endStream","news","limitDate"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer des actualités par IDs",path:"/news/co/getbyids",constant:"GET_NEWS_BY_ID",method:"POST",auth:"none",description:"Récupère des actualités à partir d’une liste d’identifiants.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Liste des IDs d’actualités à récupérer"}},required:["ids"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},type:"array",items:{$ref:"#/$defs/NewsSchema"},description:"Liste d'actualités correspondant aux IDs fournis"}}},{name:"Ajouter une actualité",path:"/news/co/save",constant:"ADD_NEWS",method:"POST",auth:"bearer",description:"Ajoute une nouvelle actualité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},json:{type:"boolean",const:!0,default:!0,description:"Indique que la réponse est au format JSON."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["scope","markdownActive","parentId","parentType","type","json"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","id","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter une image à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",constant:"ADD_IMAGE_NEWS",constantCocolight:"ADD_IMAGE_NEWS",method:"POST",auth:"bearer",description:"Ajoute une images à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsImage:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsImage"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation."},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter un fichier à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",constant:"ADD_FILE_NEWS",constantCocolight:"ADD_FILE_NEWS",method:"POST",auth:"bearer",description:"Ajoute un fichier à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsFile:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsFile"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer une actualité",path:"/news/co/delete/id/{id}",constant:"DELETE_NEWS",constantCocolight:"DELETE_NEWS",method:"POST",auth:"bearer",description:"Supprime une actualité existante.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{id:{type:"string",description:"ID de l'actualité à supprimer"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{isLive:{type:"boolean",default:!1}},required:["isLive"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de la suppression",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},type:{type:"string",const:"news"},commentsDeleted:{type:"number",description:"Nombre de commentaires supprimés",$comment:"bizarre même si il y a des commentaires ce champs reste à 0"}},required:["result","msg","type","commentsDeleted"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la suppression",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour une actualité",path:"/news/co/update",constant:"UPDATE_NEWS",method:"POST",auth:"bearer",description:"Met à jour le contenu d’une actualité existante.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{idNews:{type:"string",description:"ID de l'actualité à mettre à jour"},text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["idNews","scope","markdownActive","parentId","parentType","type"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Partager une actualité",path:"/news/co/share",constant:"SHARE_NEWS",constantCocolight:"SHARE_NEWS",method:"POST",auth:"bearer",description:"Partage une actualité avec une entité ou un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'actualité à partager"},parentType:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},childId:{type:"string",description:"ID de l'entité partageante"},childType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité partageante"},connectType:{type:"string",const:"share",default:"share",description:"Type de connexion, toujours 'share'."},comment:{type:"string",description:"Commentaire de partage"}},required:["parentId","parentType","childId","childType","connectType"],allOf:[{if:{properties:{childType:{const:"citoyens"}}},then:{properties:{childId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},oneOf:[{type:"object",description:"Réponse en cas de succès du partage",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},data:{type:"object",required:["_id","type","verb","target","author","object","scope","created","sharedBy","collection","icon","updated","typeSig","lastAuthorShare"],properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string",const:"activityStream"},verb:{type:"string",const:"share"},target:{$ref:"#/$defs/user"},author:{$ref:"#/$defs/user"},object:{type:"object",required:["id","type","authorName","authorId","_id","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","typeSig","lastAuthorShare"],properties:{id:{type:"string"},type:{type:"string",const:"news"},authorName:{type:"string"},authorId:{type:"string"},_id:{$ref:"#/$defs/_idObject"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}}},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string"},lastAuthorShare:{$ref:"#/$defs/sharedUser"}}},scope:{type:"object",properties:{type:{type:"string"}}},created:{$ref:"#/$defs/dateObject"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},collection:{type:"string",const:"news"},icon:{type:"string"},imageBackground:{type:["string","null"]},name:{type:["string","null"]},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string"},lastAuthorShare:{$ref:"#/$defs/sharedUser"}}},idNews:{type:"string"}},required:["result","msg","data","idNews"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec du partage",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les commentaires",path:"/co2/comment/index/type/{type}/id/{id}/json/true",constant:"GET_COMMENTS",method:"POST",auth:"none",description:"Récupère les commentaires d’un élément.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["news"],default:"news",description:"Type de l'élément"},id:{type:"string",description:"ID de l'élément dont on veut récupérer les commentaires"}},required:["type","id"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},author:{type:"object",required:["id","name","typeSig"],properties:{id:{type:"string"},name:{type:"string"},username:{type:"string"},email:{type:"string",format:"email"},tags:{type:["array","null"]},profilImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilMarkerImageUrl:{type:"string",format:"uri-reference"},address:{type:"object"},preferences:{type:"object",required:["isOpenData","sendMail"],properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{type:"boolean"},activitypub:{type:"boolean"}}},typeSig:{type:"string"}}},views:{type:"object",patternProperties:{"^[a-f0-9]{24}$":{type:"object",required:["date"],properties:{date:{$ref:"#/$defs/dateObject"}}}},additionalProperties:!1},comment:{type:"object",required:["_id","contextId","contextType","parentId","text","created","author","collection","status","views","postedDate","argval","replies"],properties:{_id:{$ref:"#/$defs/_idObject"},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:"string"},text:{type:"string"},created:{$ref:"#/$defs/dateObject"},author:{$ref:"#/$defs/author"},collection:{type:"string",enum:["comments"]},tags:{type:["array","null"]},status:{type:"string"},views:{$ref:"#/$defs/views"},postedDate:{$ref:"#/$defs/dateObject"},argval:{type:"string"},replies:{anyOf:[{type:"object",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/comment"}},additionalProperties:!1},{type:"array",maxItems:0}]}}}},oneOf:[{description:"Réponse sans commentaires",type:"array",minItems:0,maxItems:0},{description:"Réponse avec commentaires",type:"object",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/comment"}},additionalProperties:!1}]}}},{name:"Ajouter un commentaire",path:"/co2/comment/save",constant:"ADD_COMMENTS",method:"POST",auth:"bearer",description:"Ajoute un commentaire à une actualité ou autre contexte.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentCommentId:{type:"string",description:"ID du commentaire parent (null si pas de parent)",default:""},text:{type:"string",description:"Contenu du commentaire"},contextId:{type:"string",description:"ID de l'élément auquel le commentaire est associé"},contextType:{type:"string",enum:["news"],default:"news",description:"Type de l'élément auquel le commentaire est associé"},argval:{type:"string",description:"Valeur de l'argument (optionnel)",default:""},path:{type:"string",description:"Chemin de l'élément (optionnel)",default:""},mentions:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"ID de l'utilisateur mentionné"},name:{type:"string",description:"Nom de l'utilisateur mentionné"},slug:{type:"string",description:"Slug de l'utilisateur mentionné"},type:{type:"string",description:"Type de l'utilisateur mentionné"},value:{type:"string",description:"Valeur de la mention"},count:{type:"number",description:"Nombre de fois que l'utilisateur est mentionné"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}}},required:["text","contextId","contextType"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},author:{type:"object",required:["id","name"],properties:{id:{type:"string"},name:{type:"string"},username:{type:"string"},email:{type:"string",format:"email"},tags:{type:["array","null"]},profilImageUrl:{type:"string"},profilThumbImageUrl:{type:"string"},profilMarkerImageUrl:{type:"string"},address:{type:"object"},preferences:{type:"object",required:["isOpenData","sendMail"],properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{type:"boolean"},activitypub:{type:"boolean"}}},typeSig:{type:"string"}}},views:{type:"object",patternProperties:{"^[a-f0-9]{24}$":{type:"object",required:["date"],properties:{date:{$ref:"#/$defs/dateObject"}}}},additionalProperties:!1},comment:{type:"object",required:["_id","contextId","contextType","parentId","text","created","author","collection","status","views","postedDate","argval"],properties:{_id:{$ref:"#/$defs/_idObject"},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:["string","null"]},text:{type:"string"},created:{$ref:"#/$defs/dateObject"},author:{$ref:"#/$defs/author"},collection:{type:"string",enum:["comments"]},tags:{type:["array","null"]},status:{type:"string"},views:{$ref:"#/$defs/views"},postedDate:{$ref:"#/$defs/dateObject"},argval:{type:"string"}}}},oneOf:[{type:"object",description:"Réponse en cas de succès de l'ajout du commentaire",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{$ref:"#/$defs/_idObject"},newComment:{$ref:"#/$defs/comment"},time:{type:"integer"}},required:["result","msg","id","newComment","time"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de l'ajout du commentaire",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer un commentaire",path:"/co2/comment/delete/id/{id}",constant:"DELETE_COMMENTS",method:"POST",auth:"bearer",description:"Supprime un commentaire existant.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{id:{type:"string",description:"ID du commentaire à supprimer"}},required:["id"],additionalProperties:!1},responses:{200:{$defs:{_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},oneOf:[{type:"object",description:"Réponse en cas de succès de la suppression du commentaire",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},elt:{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:["string","null"]}}}},required:["result","msg","elt"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la suppression du commentaire",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour un commentaire",path:"/co2/comment/update",constant:"UPDATE_COMMENTS",method:"POST",auth:"bearer",description:"Met à jour le contenu d’un commentaire.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{id:{type:"string",description:"ID du commentaire à mettre à jour"},params:{type:"object",properties:{text:{type:"string",description:"Nouveau texte du commentaire"},mentions:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"ID de l'utilisateur mentionné"},name:{type:"string",description:"Nom de l'utilisateur mentionné"},slug:{type:"string",description:"Slug de l'utilisateur mentionné"},type:{type:"string",description:"Type de l'utilisateur mentionné"},value:{type:"string",description:"Valeur de la mention"},count:{type:"number",description:"Nombre de fois que l'utilisateur est mentionné"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}}},required:["text"]}},required:["id","params"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de la mise à jour du commentaire",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},comment:{type:"object",properties:{ok:{type:"number"},nModified:{type:"number"},n:{type:"number"},err:{type:["string","null"]},errmsg:{type:["string","null"]},updatedExisting:{type:"boolean"}},required:["ok","nModified","n","err","errmsg","updatedExisting"],additionalProperties:!1}},required:["result","msg","comment"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la mise à jour du commentaire",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Rechercher des tags",path:"/api/tags/search?q={q}",constant:"SEARCH_TAGS",method:"POST",auth:"none",description:"Recherche des tags correspondant à un mot-clé.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{q:{type:"string",description:"Mot-clé de recherche"}},required:["q"],additionalProperties:!1},responses:{200:{$defs:{_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1}},oneOf:[{type:"array",description:"Réponse sans résultat : contient un seul objet avec uniquement le champ 'tag' correspondant au terme recherché.",minItems:1,maxItems:1,items:{type:"object",required:["tag"],properties:{tag:{type:"string",description:"Terme recherché"}},additionalProperties:!1}},{type:"array",description:"Réponse avec résultats : contient plusieurs objets avec les champs '_id', 'tag' et 'field_length'.",minItems:1,items:{type:"object",required:["_id","tag","field_length"],properties:{_id:{$ref:"#/$defs/_idObject"},tag:{type:"string"},field_length:{type:"integer",minimum:0}},additionalProperties:!1}}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Afficher les votes d'une actualité",path:"/co2/action/list/type/{type}/id/{id}/actionType/vote/json/true",constant:"SHOW_VOTE",method:"POST",auth:"none",description:"Récupère la liste des votes (like, love, etc.) sur une actualité.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["news"],default:"news",description:"Type de l'élément"},id:{type:"string",description:"ID de l'élément dont on veut récupérer les votes"}},required:["type","id"],additionalProperties:!1},responses:{200:{$defs:{_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]}},oneOf:[{type:"object",required:["_id","vote","voteCount"],properties:{_id:{$ref:"#/$defs/_idObject"},vote:{type:"object",description:"Votes individuels, indexés par identifiant utilisateur",patternProperties:{"^[a-f0-9]{24}$":{type:"object",required:["status","date","_id","name","slug"],properties:{status:{type:"string",enum:["love","bothered","scared","like","enjoy","sad","support","glad"]},date:{$ref:"#/$defs/dateObject"},_id:{$ref:"#/$defs/_idObject"},name:{type:"string"},profilThumbImageUrl:{type:"string"},slug:{type:"string"}}}},additionalProperties:!1},voteCount:{type:"object",description:"Nombre total de votes par type de réaction",properties:{love:{type:"integer",minimum:0},bothered:{type:"integer",minimum:0},scared:{type:"integer",minimum:0},like:{type:"integer",minimum:0},enjoy:{type:"integer",minimum:0},sad:{type:"integer",minimum:0},support:{type:"integer",minimum:0},glad:{type:"integer",minimum:0}},additionalProperties:!1}}},{type:"object",required:["_id"],properties:{_id:{$ref:"#/$defs/_idObject"}},additionalProperties:!1,description:"Cas sans votes : uniquement l'identifiant de l'objet concerné"}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Recherche globale avec autocomplétion",path:"/co2/search/globalautocomplete",constant:"GLOBAL_AUTOCOMPLETE",constantCocolight:"GLOBALAUTOCOMPLETE",functionCocolight:"globalautocomplete",method:"POST",auth:"none",description:"Effectue une recherche globale avec possibilité d’autocomplétion.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{name:{type:"string",description:"Nom ou mot-clé de la recherche"},locality:{type:"object",description:"Liste des localités ciblées avec leur identifiant et leur type (city ou level1)",patternProperties:{"^[^\\s]+$":{type:"object",properties:{id:{type:"string",description:"Identifiant de la localité"},type:{type:"string",enum:["cities","level1"],description:"Type de la localité : 'cities' pour une ville ou 'level1' pour une région"}},required:["id","type"],additionalProperties:!1}},additionalProperties:!1},searchType:{type:"array",description:"Types d'entités à inclure dans la recherche",items:{type:"string",enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"]}},searchTags:{type:"array",description:"Balises (tags) à utiliser pour filtrer la recherche",items:{type:"string"}},ranges:{type:"object",description:"Configuration des plages de résultats pour chaque type de recherche",patternProperties:{"^[^\\s]+$":{type:"object",properties:{indexMin:{type:"number",description:"Index de départ pour la pagination"},indexMax:{type:"number",description:"Index de fin pour la pagination"}},required:["indexMin","indexMax"],additionalProperties:!1}},additionalProperties:!1},countType:{type:"array",description:"Liste fixe des types à compter dans les résultats",items:{type:"string",enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"]},const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"]},indexMin:{type:"number",const:0,default:0,description:"Index de départ global pour la pagination (toujours 0)"},indexStep:{type:"number",description:"Nombre d’éléments à récupérer (limite de pagination)"},initType:{type:"string",const:"",default:"",description:"Type initial de la recherche, vide par défaut"},count:{type:"boolean",const:!0,default:!0,description:"Indique si les types doivent être comptés dans les résultats"},notSourceKey:{type:"boolean",const:!0,default:!0,description:"Flag pour ne pas filtrer sur une clé de source spécifique"},filters:{type:"string",const:"",default:"",description:"Filtres additionnels appliqués à la recherche (actuellement vide)"},fediverse:{type:"boolean",const:!1,default:!1,description:"Indique si la recherche doit s'étendre au Fediverse (toujours désactivé)"}},required:["name","searchType","countType","indexMin","indexStep","initType","count","notSourceKey","filters","fediverse"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},emptyArray:{type:"array",minItems:0,maxItems:0}},oneOf:[{type:"object",description:"Réponse avec résultats de recherche",properties:{results:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},collection:{type:"string"},created:{$ref:"#/$defs/dateObject"},name:{type:"string"},parent:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["type"]}}},updated:{$ref:"#/$defs/dateObject"},slug:{type:"string"},links:{type:"object"}},required:["_id","collection","name"]}}},count:{type:"object",patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":{type:"integer",minimum:0}},minProperties:1,additionalProperties:!1}},required:["results","count"],additionalProperties:!1},{type:"object",description:"Réponse sans résultats de recherche",properties:{results:{$ref:"#/$defs/emptyArray"},count:{type:"object",minProperties:1,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":{type:"integer",const:0}},additionalProperties:!1}},required:["results","count"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Recherche de villes avec autocomplétion",path:"/co2/search/globalautocomplete",constant:"CITY_AUTOCOMPLETE",constantCocolight:"GLOBALAUTOCOMPLETE",functionCocolight:"globalAutocompleteCities",method:"POST",auth:"none",description:"Recherche des villes en fonction d’un nom, autocomplétion rapide.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{name:{type:"string",description:"Nom de la ville"},locality:{type:"string",const:"",default:"",description:"Localité vide ou spécifique"},searchType:{type:"array",items:{type:"string",enum:["cities"]},const:["cities"],default:["cities"]},searchBy:{type:"string",description:"Mode de recherche (ex: ALL)",const:"ALL",default:"ALL"},indexMin:{type:"integer",description:"Index minimum",minimum:0},indexMax:{type:"integer",description:"Index maximum",minimum:5}},required:["name","locality","searchType"],additionalProperties:!1},responses:{200:{$defs:{_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},geoObject:{type:"object",required:["latitude","longitude"],properties:{"@type":{type:"string"},latitude:{type:"string"},longitude:{type:"string"}}},geoPositionObject:{type:"object",required:["type","coordinates"],properties:{type:{type:"string"},float:{type:["string","boolean"]},coordinates:{type:"array",items:{type:"number"},minItems:2,maxItems:2}}},emptyArray:{type:"array",minItems:0,maxItems:0}},oneOf:[{type:"object",description:"Réponse avec résultats de recherche",properties:{results:{type:"array",items:{type:"object",required:["_id","type"],properties:{_id:{$ref:"#/$defs/_idObject"},type:{type:"string"},name:{type:"string"},alternateName:{type:"string"},postalCode:{type:"string"},postalCodes:{type:"array",items:{type:"object",required:["postalCode","geoPosition"],properties:{postalCode:{type:"string"},geoPosition:{$ref:"#/$defs/geoPositionObject"}}}},geo:{$ref:"#/$defs/geoObject"},insee:{type:"string"},country:{type:"string"},countryCode:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{type:"string"},level3Name:{type:"string"},level4:{type:"string"},level4Name:{type:"string"},allCP:{type:"boolean"},uniqueCp:{type:"boolean"},level:{type:"array",items:{type:"string"}}},additionalProperties:!0}}},required:["results"],additionalProperties:!1},{type:"object",description:"Réponse sans résultats de recherche",properties:{results:{$ref:"#/$defs/emptyArray"}},required:["results"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Suggestions d'entrée",path:"/co2/search/globalautocomplete",method:"POST",constant:"SUGGESTION_INPUT",constantCocolight:"GLOBALAUTOCOMPLETE",functionCocolight:"suggestionInput",auth:"none",description:"Fournit des suggestions basées sur le nom recherché, etc.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{name:{type:"string",description:"Nom ou terme recherché"},searchType:{description:"Types d'entités à inclure dans la recherche",type:"array",items:{type:"string",enum:["organizations","projects","poi"]}},indexMin:{description:"Index minimum pour la pagination",type:"integer",minimum:0,default:0},indexMax:{description:"Index maximum pour la pagination",type:"integer",minimum:20,default:20}},required:["name","searchType","indexMin","indexMax"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{description:"Peut être un objet { sec, usec } ou un timestamp entier (sec)",oneOf:[{type:"object",required:["sec","usec"],properties:{sec:{type:"number"},usec:{type:"number"}},additionalProperties:!1},{type:"integer"}]},_idObject:{type:"object",properties:{$id:{type:"string",pattern:"^[a-f0-9]{24}$"}},required:["$id"],additionalProperties:!1},emptyArray:{type:"array",minItems:0,maxItems:0}},oneOf:[{type:"object",description:"Réponse avec résultats de recherche",properties:{results:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{_id:{$ref:"#/$defs/_idObject"},collection:{type:"string"},created:{$ref:"#/$defs/dateObject"},name:{type:"string"},parent:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["type"]}}},updated:{$ref:"#/$defs/dateObject"},slug:{type:"string"},links:{type:"object"}},required:["_id","collection","name"]}}}},required:["results"],additionalProperties:!1},{type:"object",description:"Réponse sans résultats de recherche",properties:{results:{$ref:"#/$defs/emptyArray"},count:{type:"object",minProperties:1,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":{type:"integer",const:0}},additionalProperties:!1}},required:["results","count"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les projets non administrables",path:"/co2/search/globalautocomplete",constant:"GET_PROJECTS_NO_ADMIN",constantCocolight:"GLOBALAUTOCOMPLETE",functionCocolight:"getProjectsNoAdmin",method:"POST",auth:"none",description:"Récupère les projets accessibles sans droits d'administration.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{name:{type:"string",description:"Nom ou terme recherché"},searchType:{description:"Types d'entités à inclure dans la recherche",type:"array",items:{type:"string",enum:["projects"]},const:["projects"],default:["projects"]},indexMin:{description:"Index minimum pour la pagination",type:"integer",minimum:0,default:0},initType:{type:"string",const:"",default:"",description:"Type initial de la recherche, vide par défaut"},count:{type:"boolean",const:!0,default:!0,description:"Indique si les types doivent être comptés dans les résultats"},countType:{type:"array",description:"Liste fixe des types à compter dans les résultats",items:{type:"string",enum:["projects"]},const:["projects"],default:["projects"]},indexStep:{type:"integer",description:"Nombre d’éléments à récupérer (limite de pagination)",default:30},notSourceKey:{type:"boolean",const:!0,default:!0,description:"Flag pour ne pas filtrer sur une clé de source spécifique"},filters:{type:"object",properties:{$or:{type:"object",patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":{type:"object",properties:{$exists:{const:!0}},required:["$exists"],additionalProperties:!1},"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":{type:"object",properties:{$exists:{const:!0}},required:["$exists"],additionalProperties:!1}},additionalProperties:!1,minProperties:2,maxProperties:2}},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":{type:"object",properties:{$exists:{const:!0}},required:["$exists"],additionalProperties:!1}},required:["$or"],additionalProperties:!1,default:{$or:{"links.contributors.@userId":{$exists:!0},"parent.@userId":{$exists:!0}},"links.contributors.@userId":{$exists:!0}}},locality:{type:"string",const:"",default:"",description:"Localité vide ou spécifique"},fediverse:{type:"boolean",const:!1,default:!1,description:"Indique si la recherche doit s'étendre au Fediverse (toujours désactivé)"}},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],additionalProperties:!1}}];class Dt extends Error{constructor(e,t,r){super(e),this.name="ApiClientError",this.status=t,this.details=r}}class Lt extends Error{constructor(e){super(e),this.name="CircuitBreakerError"}}Rt.addType("oid",(e=>new Ct.ObjectID(e)));class Ut extends t.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:n="/api/cocolight/refreshtoken",endpoints:o=qt,timeout:a=3e4,debug:c=!1,maxRetries:d=0,circuitBreakerThreshold:p=5,circuitBreakerResetTime:l=6e4,fromJSONValue:u=!0}={}){if(super(),!e)throw new Dt('Le paramètre "baseURL" est obligatoire.',500);this._baseURL=e,this._refreshToken=r,this._refreshUrl=n,this._endpoints=o,this._debug=c;let f=null;this._fromJSONValue=u,Object.defineProperty(this,"userId",{get:()=>f,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{f=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new i({strict:!1,useDefaults:!0}),s(this._ajv),this._logger=At({transport:{target:"pino-pretty",options:{colorize:!0}},level:c?"debug":"info"}),this._client=bt.create({baseURL:e,timeout:a}),d>0&&(It(this._client,{retries:d,retryDelay:It.exponentialDelay,retryCondition:e=>It.isNetworkError(e)||It.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${d} max`)),this._breakerThreshold=p,this._breakerResetTime=l,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,t&&this.setToken(t),this._client.interceptors.response.use((e=>e),(async e=>{if(e.response&&401===e.response.status&&this._refreshToken)try{if(await this._refreshAccessToken())return this._client.request(e.config)}catch(e){throw new Dt(e.message,401,e)}throw e}))}setToken(e){this._accessToken=e,this._client.defaults.headers.common.Authorization="Bearer "+e,this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){this._refreshToken=e,this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}async _refreshAccessToken(){if(!this._refreshToken)return!1;try{const e=await this._client.post(this._refreshUrl,{refreshToken:this._refreshToken},{headers:{"Content-Type":"application/json"}});return!(!e.data||!e.data.accessToken||(this.setToken(e.data.accessToken),e.data.refreshToken&&this.setRefreshToken(e.data.refreshToken),this.emit("refreshSuccess",e.data),0))}catch(e){return this._logger.error(`[ApiClient] Refresh Error : ${e.message}`),!1}}_checkCircuitBreaker(){return!this._breakerOpen||Date.now()-this._lastBreakerOpenTime>this._breakerResetTime&&(this._breakerOpen=!1,this._breakerErrorCount=0,this._logger.warn("[ApiClient] Circuit breaker réinitialisé"),!0)}_updateCircuitBreakerError(){this._breakerErrorCount+=1,this._logger.warn(`[ApiClient] Erreur #${this._breakerErrorCount} sur ${this._breakerThreshold}`),this._breakerErrorCount>=this._breakerThreshold&&(this._breakerOpen=!0,this._lastBreakerOpenTime=Date.now(),this._logger.error("[ApiClient] Circuit breaker ACTIVÉ - L'API est considérée indisponible"))}_resetCircuitBreakerSuccess(){this._breakerErrorCount=0,this._breakerOpen&&(this._breakerOpen=!1,this._logger.warn("[ApiClient] Circuit breaker refermé suite à un succès"))}static stripNullsInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)null===e[t]||void 0===e[t]?e.splice(t,1):"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||void 0===e[t]?delete e[t]:"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e){const t={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL},r=e=>"string"!=typeof e?e:e.replace(/@(\w+)/g,((e,r)=>{const n=t[r],i="function"==typeof n?n():void 0;return null==i?`@${r}`:i})),n=e=>{if((e=>e&&"object"==typeof e&&("function"==typeof e.pipe||"undefined"!=typeof Buffer&&e instanceof Buffer))(e))return e;if(Array.isArray(e))return e.map(n);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[i,s]of Object.entries(e))t[r(i)]=n(s);return t}return"string"==typeof e?r(e):e};return n(e)}_cleanSchemaLeftoverAlias(e){const t=/@\w+/;if(Array.isArray(e))return e.map((e=>this._cleanSchemaLeftoverAlias(e)));if(e&&"object"==typeof e){const r={};for(const n of Object.keys(e)){const i=e[n];if(!t.test(n)){if("default"===n){if("string"==typeof i&&t.test(i))continue;if(i&&"object"==typeof i){const e=this._cleanSchemaLeftoverAlias(i);Object.keys(e).length>0&&(r[n]=e);continue}}"string"==typeof i&&t.test(i)||(r[n]=this._cleanSchemaLeftoverAlias(i))}}return r}return e}async callEndpoint(e,t={},r=!0,n=!0){if(!this._checkCircuitBreaker())throw new Lt("Le circuit breaker est activé, impossible d'appeler l'API");const i=this._endpoints.find((t=>t.constant===e));if(!i)throw new Dt(`Endpoint introuvable : ${e}`,404);const{path:s,method:o,contentType:a,auth:c,pathParams:d,request:p,responses:l}=i,u=(o||"GET").toLowerCase(),f=a||"application/json",m={"Content-Type":f};if(this._accessToken)"bearer"===c?m.Authorization=`Bearer ${this._accessToken}`:c&&"none"!==c||m.Authorization||(m.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===c)throw new Dt(`Token requis pour l'endpoint sécurisé : ${e}`,401);let y,h=s;if(d){let e=d;"none"===c&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(d));const r=t.pathParams||{},n=this._ajv.compile(e);if(!n(r))throw this.emit("validationError",{stage:"pathParams",errors:n.errors}),new Dt("Path parameter validation failed.",400,n.errors);const i=this._resolveSpecialValuesInPlace(r);h=h.replace(/\{(\w+)\}/g,((e,t)=>{const r=i[t];if(void 0!==r)return encodeURIComponent(r);throw new Dt(`Path param manquant ou non résolu : {${t}}`,400)}))}if(p){let e=p;"none"===c&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(p));const r={...t};delete r.pathParams;const n=Ut.stripNullsInPlace(r),i=this._ajv.compile(e);if(!i(n))throw this.emit("validationError",{stage:"request",errors:i.errors}),new Dt("Request validation failed.",400,i.errors);t=this._resolveSpecialValuesInPlace(n)}"application/json"===f||"multipart/form-data"===f?y=t:"application/x-www-form-urlencoded"===f&&(y=Ut.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${h}, method=${u}`);try{const e=await this._client.request({url:h,method:u,headers:m,["get"===u?"params":"data"]:y});if(n){const t=e.status.toString(),r=l?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data))throw this.emit("validationError",{stage:"response",errors:n.errors}),new Dt("Response validation failed.",t,n.errors)}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(i.postActions)&&i.postActions.forEach((t=>{const r=t.path?this._getValueByPath(e.data,t.path):null;switch(t.type){case"setToken":this.setToken(r);break;case"setRefreshToken":this.setRefreshToken(r);break;case"setUserId":this._setUserId(r);break;case"resetSession":this.resetSession();break;case"emitEvent":t.event&&(this.emit(t.event,r),this._logger.debug(`[ApiClient] Event émis : ${t.event}`,r));break;case"callMethod":"function"==typeof this[t.method]?(this[t.method](),this._logger.debug(`[ApiClient] Méthode appelée : ${t.method}`)):this._logger.warn(`[ApiClient] Méthode inconnue : ${t.method}`);break;default:this._logger.warn(`[ApiClient] Action inconnue : ${t.type}`)}})),e}catch(e){throw this._updateCircuitBreakerError(),e}}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),delete this._client.defaults.headers.common.Authorization,this._logger.info("[ApiClient] Session utilisateur réinitialisée."),this.emit("sessionReset")}_getValueByPath(e,t){if(t)return t.split(".").reduce(((e,t)=>e&&e[t]),e)}static toURLSearchParams(e,t={}){return this._buildParams(e,new URLSearchParams,t)}static _buildParams(e,t,r={}){if("object"!=typeof e||null===e)throw new TypeError("La donnée doit être un objet non nul.");const{dots:n=!1,indexes:i=!1,metaTokens:s=!0}=r,o=[];function a(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function c(e){return e.endsWith("[]")?e.slice(0,-2):e}function d(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function p(e){return null==e?"":e instanceof Date?e.toISOString():(e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||ArrayBuffer.isView(e),e)}return function e(r,l=[]){null==r||o.includes(r)||(o.push(r),Object.entries(r).forEach((([r,o])=>{void 0!==o&&function(e,r,o){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=s?r:r.slice(0,-2),t.append(d(o,r,n),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,s)=>{if(null!=e){const a=i?d(o.concat(r),s,n):`${d(o,r,n)}[]`;t.append(a,p(e))}})),!1}return!!a(e)||(t.append(d(o,r,n),p(e)),!1)}(o,r.trim(),l)&&e(o,l.concat(c(r)))})),o.pop())}(e),t}_transformData(e){if(e&&"object"==typeof e)if(e.resultGoods?.msg)e=this._normalizeJsonData({msg:e.resultGoods.msg,...e});else if(e.resultErrors?.msg)e=this._normalizeJsonData({msg:e.resultErrors.msg,...e});else if(e.results&&"object"==typeof e.results&&!Array.isArray(e.results))e.results=Object.keys(e.results).map((t=>this._normalizeJsonData({id:t,...e.results[t]})));else if(Array.isArray(e.results))e.results=e.results.map((e=>this._normalizeJsonData(e)));else if(e.news&&Array.isArray(e.news)&&0===e.news.length)e=e.news;else if(e.news&&"object"==typeof e.news&&!Array.isArray(e.news))e=Object.keys(e.news).map((t=>this._normalizeJsonData({id:t,...e.news[t]})));else if(e.notif&&"object"==typeof e.notif&&!Array.isArray(e.notif))e.notif=Object.keys(e.notif).map((t=>this._normalizeJsonData({id:t,...e.notif[t]})));else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens)&&e.organizations&&"object"==typeof e.organizations&&!Array.isArray(e.organizations))e=[...Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]}))),...Object.keys(e.organizations).map((t=>this._normalizeJsonData({id:t,...e.organizations[t]})))];else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens))e=Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]})));else if(e.cities&&"object"==typeof e.cities&&!Array.isArray(e.cities))e=Object.keys(e.cities).map((t=>this._normalizeJsonData({id:t,...e.cities[t]})));else if(e.cities&&Array.isArray(e.cities)&&0===e.cities.length)e=e.cities;else if(e.newComment&&"object"==typeof e.newComment)e.newComment=this._normalizeJsonData({...e.newComment});else if(Array.isArray(e))e=e.map((e=>this._normalizeJsonData(e)));else if(e.map&&"object"==typeof e.map)e.map=this._normalizeJsonData(e.map);else if(e.object&&"object"==typeof e.object)e.object=this._normalizeJsonData(e.object);else if("object"==typeof e&&Object.keys(e).length>0){const t=Object.keys(e).every((e=>/^[0-9a-fA-F]{24}$/.test(e)));e=t?Object.keys(e).map((t=>({id:t,...this._normalizeJsonData(e[t])}))):this._normalizeJsonData(e)}return e}_normalizeJsonData(e){if(!e||"object"!=typeof e)return e;if(e=this._normalizeRecursively(e),e?.mediaImg?.images&&Array.isArray(e.mediaImg.images)&&e.mediaImg.images.length>0&&(e.mediaImg.countImages=e.mediaImg.images.length),e?.mediaFile?.files&&Array.isArray(e.mediaFile.files)&&e.mediaFile.files.length>0&&(e.mediaFile.countFiles=e.mediaFile.files.length),e?.src?.changes&&"object"==typeof e.src.changes&&Object.keys(e.src.changes).length>0&&Object.keys(e.src.changes).forEach((t=>{e.src.changes[t]&&(e.src.changes[t]=this._ensureFullURL(e.src.changes[t]))})),e?.openingHours&&Array.isArray(e.openingHours)&&e.openingHours.length>0&&(e.openingHours=e.openingHours.filter((e=>e.dayOfWeek&&e.hours&&e.hours[0]&&e.hours[0].opens))),e.replies&&"object"==typeof e.replies&&Object.keys(e.replies).length>0&&(e.replies=Object.keys(e.replies).map((t=>this._normalizeJsonData({id:t,...e.replies[t]})))),e?.author&&"object"==typeof e.author&&Object.keys(e.author).length>0&&!("profilThumbImageUrl"in e.author)){const t=Object.keys(e.author)[0];e.author={...e.author[t]}}return e?.timeAgo&&delete e.timeAgo,this._fromJSONValue?Rt.fromJSONValue(e):e}_ensureFullURL(e){if(!e)return e;if(!(e=e.trim())||/^https?:\/\//i.test(e))return e;let t="/";return t=this._baseURL.endsWith("/")&&e.startsWith("/")||this._baseURL.endsWith("/")||e.startsWith("/")?"":"/",`${this._baseURL}${t}${e}`}_normalizeDatesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeDatesRecursively(e))):(Object.keys(e).forEach((t=>{this._dateFields.includes(t)&&(e[t]&&"object"==typeof e[t]&&e[t].sec&&"number"==typeof e[t].sec?e[t]={$date:1e3*e[t].sec}:"number"==typeof e[t]&&(e[t]={$date:1e3*e[t]})),e[t]&&"object"==typeof e[t]&&this._normalizeDatesRecursively(e[t])})),e)}_normalizeImagesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeImagesRecursively(e))):(Object.keys(e).forEach((t=>{this._imageFields.includes(t)&&"string"==typeof e[t]&&""!==e[t].trim()&&(e[t]=this._ensureFullURL(e[t])),"content"===t&&e[t]?.image&&(e[t].image=this._ensureFullURL(e[t].image)),e[t]&&"object"==typeof e[t]&&this._normalizeImagesRecursively(e[t])})),e)}_normalizeIdRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeIdRecursively(e))):(e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),Object.keys(e).forEach((t=>{e[t]&&"object"==typeof e[t]&&(e[t]=this._normalizeIdRecursively(e[t]))})),e)}_normalizeBooleansRecursively(e){return"string"==typeof e?"true"===e||"false"!==e&&e:Array.isArray(e)?e.map((e=>this._normalizeBooleansRecursively(e))):(null!==e&&"object"==typeof e&&Object.keys(e).forEach((t=>{e[t]=this._normalizeBooleansRecursively(e[t])})),e)}_normalizeString(e){return"true"===e||"false"!==e&&e}_normalizeId(e){return e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),e}_normalizeDate(e){return e&&"object"==typeof e&&"number"==typeof e.sec?{$date:1e3*e.sec}:"number"==typeof e?{$date:1e3*e}:e}_normalizeImage(e){return"string"==typeof e&&""!==e.trim()?this._ensureFullURL(e):e}_imageFields=["profilImageUrl","profilThumbImageUrl","profilMediumImageUrl","profilMarkerImageUrl","profilBannerUrl","profilRealBannerUrl","imagePath","imageThumbPath","docPath"];_dateFields=["modified","created","updated","birthDate","lastLoginDate","startDate","endDate","date"];_normalizeRecursively(e){if("string"==typeof e)return this._normalizeString(e);if(Array.isArray(e))return e.map((e=>this._normalizeRecursively(e)));if(null!==e&&"object"==typeof e){const t={};return Object.keys(e).forEach((r=>{let n=this._normalizeRecursively(e[r]);this._dateFields.includes(r)&&(n=this._normalizeDate(n)),this._imageFields.includes(r)&&(n=this._normalizeImage(n)),"content"===r&&n&&"object"==typeof n&&n.image&&(n.image=this._normalizeImage(n.image)),t[r]=n})),this._normalizeId(t)}return e}}})(),n.default})()));
|
|
7
|
+
deps: ${r}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const o in e)"__proto__"!==o&&((Array.isArray(e[o])?t:r)[o]=e[o]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:n,it:i}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const u=(0,s.propertyInData)(r,n,c,i.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),i.allErrors?r.if(u,(()=>{for(const t of l)(0,s.checkReportMissingProp)(e,t)})):(r.if(o._`${u} && (${(0,s.checkMissingProp)(e,l,a)})`),(0,s.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:o,keyword:i,it:a}=e,c=r.name("valid");for(const l in t)(0,n.alwaysValidSchema)(a,t[l])||(r.if((0,s.propertyInData)(r,o,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=i},3282:(e,t,r)=>{"use strict";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 o=r(4042),n=r(6144),s=r(6653),i=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends o.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var m=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var p=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>o.str`must be multiple of ${e}`,params:({schemaCode:e})=>o._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,a=t.let("res"),c=i?o._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:o._`${a} !== parseInt(${a})`;e.fail$data(o._`(${n} === 0 || (${a} = ${r}/${n}, ${c}))`)}};t.default=n},3463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},3558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},3673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const o=r(9029),n=r(2023),s=r(5765),i=r(8708);function a(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,o._`${n.parentData}[${n.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,o.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:a}=e,l=t.macro.call(a.self,s,i,a),u=c(r,n,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:o.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:u,schema:d,parentSchema:m,$data:p,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const h=!p&&t.compile?t.compile.call(f.self,d,m,f):t.validate,y=c(l,u,h),g=l.let("valid");function v(r=(t.async?o._`await `:o.nil)){const i=f.opts.passContext?n.default.this:n.default.self,a=!("compile"in t&&!p||!1===t.schema);l.assign(g,o._`${r}${(0,s.callValidateCode)(e,y,i,a)}`,t.modifying)}function b(e){var r;l.if((0,o.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>v(o._`await `)),(t=>l.assign(g,!1).if(o._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,o._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=o._`${y}.errors`;return l.assign(e,null),v(o.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(o._`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,o._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,o._`${n.default.vErrors}.length`),(0,i.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.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))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:o},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const i=n.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const o=r(4551),n=r(5765),s=r(9029),i=r(2023),a=r(3835),c=r(4227),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:c,validateName:l,opts:m,self:p}=n,{root:f}=c;if(("#"===r||"#/"===r)&&i===f.baseId)return function(){if(c===f)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return d(e,s._`${r}.validate`,f,f.$async)}();const h=a.resolveRef.call(p,f,i,r);if(void 0===h)throw new o.default(n.opts.uriResolver,i,r);return h instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(h):function(o){const n=t.scopeValue("schema",!0===m.code.source?{ref:o,code:(0,s.stringify)(o)}:{ref:o}),i=t.name("valid"),a=e.subschema({schema:o,dataTypes:[],schemaPath:s.nil,topSchemaRef:n,errSchemaPath:r},i);e.mergeEvaluated(a),e.ok(i)}(h)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,o){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:m}=l,p=m.passContext?i.default.this:s.nil;function f(e){const t=s._`${e}.errors`;a.assign(i.default.vErrors,s._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),a.assign(i.default.errors,s._`${i.default.vErrors}.length`)}function h(e){var t;if(!l.opts.unevaluated)return;const o=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(o&&!o.dynamicProps)void 0!==o.props&&(l.props=c.mergeEvaluated.props(a,o.props,l.props));else{const t=a.var("props",s._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,s.Name)}if(!0!==l.items)if(o&&!o.dynamicItems)void 0!==o.items&&(l.items=c.mergeEvaluated.items(a,o.items,l.items));else{const t=a.var("items",s._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,s.Name)}}o?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(s._`await ${(0,n.callValidateCode)(e,t,p)}`),h(t),u||a.assign(r,!0)}),(e=>{a.if(s._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,n.callValidateCode)(e,t,p),(()=>h(t)),(()=>f(t)))}t.getValidate=u,t.callRef=d,t.default=l},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const o=r(9029),n=r(3558),s=r(2023),i=r(6939),a=r(4227),c=r(2586);class l{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,i.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 u(e){const t=m.call(this,e);if(t)return t;const r=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new o.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let p;e.$async&&(p=d.scopeValue("Error",{ref:n.default,code:o._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const h={gen:d,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,o.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:o.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:o._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);const t=d.toString();y=`${d.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,y)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=h;r.evaluated={props:e instanceof o.Name?void 0:e,items:t instanceof o.Name?void 0:t,dynamicProps:e instanceof o.Name,dynamicItems:t instanceof o.Name},r.source&&(r.source.evaluated=(0,o.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function d(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function m(e){for(const o of this._compilations)if(r=e,(t=o).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return o;var t,r}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),o=(0,i._getFullPath)(this.opts.uriResolver,r);let n=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return y.call(this,r,e);const s=(0,i.normalizeId)(o),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),s===(0,i.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,o=t[r];return o&&(n=(0,i.resolveUrl)(this.opts.uriResolver,n,o)),new l({schema:t,schemaId:r,root:e,baseId:n})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var o;r=(0,i.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let s=p.call(this,e,r);if(void 0===s){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:i}=this.opts;n&&(s=new l({schema:n,schemaId:i,root:e,baseId:t}))}return void 0!==s?e.refs[r]=d.call(this,s):void 0},t.getCompilingSchema=m,t.resolveSchema=f;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:o}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const o of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(o)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(o)&&n&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,i.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=f.call(this,o,e)}const{schemaId:c}=this.opts;return s=s||new l({schema:r,schemaId:c,root:o,baseId:t}),s.schema!==s.root.schema?s:void 0}},3837:e=>{"use strict";e.exports=JSON.parse('{"$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":false}')},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,o=0,n=0;for(;n<t;)o++,r=e.charCodeAt(n++),r>=55296&&r<=56319&&n<t&&(r=e.charCodeAt(n),56320==(64512&r)&&n++);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},3966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s=r(5765),i=r(5457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>o.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>o._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:o}=e,{prefixItems:a}=r;o.items=!0,(0,n.alwaysValidSchema)(o,t)||(a?(0,i.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5765),n=r(9029),s=r(4227),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>n.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>n._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:i,data:a,$data:c,it:l}=e,{opts:u}=l;if(!c&&0===r.length)return;const d=r.length>=u.loopRequired;if(l.allErrors?function(){if(d||c)e.block$data(n.nil,m);else for(const t of r)(0,o.checkReportMissingProp)(e,t)}():function(){const s=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,i,(()=>{t.assign(s,(0,o.propertyInData)(t,a,r,u.ownProperties)),t.if((0,n.not)(s),(()=>{e.error(),t.break()}))}),n.nil)}(s,r))),e.ok(r)}else t.if((0,o.checkMissingProp)(e,r,s)),(0,o.reportMissingProp)(e,s),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:o}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!o.has(e)){const t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(l,t,l.opts.strictRequired)}}function m(){t.forOf("prop",i,(r=>{e.setParams({missingProperty:r}),t.if((0,o.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=i},4018:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(s,i),time:r(c(!0),l),"date-time":r(m(!0),p),"iso-time":r(c(),u),"iso-date-time":r(m(),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return h.test(e)&&y.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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(_.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 g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=b&&e>=v}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":r(/^\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,f),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},t.formatNames=Object.keys(t.fullFormats);const o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=o.exec(e);if(!t)return!1;const r=+t[1],s=+t[2],i=+t[3];return s>=1&&s<=12&&i>=1&&i<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:n[s])}function i(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){const r=a.exec(t);if(!r)return!1;const o=+r[1],n=+r[2],s=+r[3],i=r[4],c="-"===r[5]?-1:1,l=+(r[6]||0),u=+(r[7]||0);if(l>23||u>59||e&&!i)return!1;if(o<=23&&n<=59&&s<60)return!0;const d=n-u*c,m=o-l*c-(d<0?1:0);return(23===m||-1===m)&&(59===d||-1===d)&&s<61}}function l(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();return r&&o?r-o:void 0}function u(e,t){if(!e||!t)return;const r=a.exec(e),o=a.exec(t);return r&&o?(e=r[1]+r[2]+r[3])>(t=o[1]+o[2]+o[3])?1:e<t?-1:0:void 0}const d=/t|\s/i;function m(e){const t=c(e);return function(e){const r=e.split(d);return 2===r.length&&s(r[0])&&t(r[1])}}function p(e,t){if(!e||!t)return;const r=new Date(e).valueOf(),o=new Date(t).valueOf();return r&&o?r-o:void 0}function f(e,t){if(!e||!t)return;const[r,o]=e.split(d),[n,s]=t.split(d),a=i(r,n);return void 0!==a?a||l(o,s):void 0}const h=/\/|:/,y=/^(?:[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,g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,v=-(2**31),b=2**31-1;function w(){return!0}const _=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var o=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return o.KeywordCxt}});var n=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const s=r(3558),i=r(4551),a=r(396),c=r(3835),l=r(9029),u=r(6939),d=r(208),m=r(4227),p=r(3837),f=r(5944),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={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."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,o,n,s,i,a,c,l,u,d,m,p,y,g,v,b,w,_,$,E,O,T,P,S;const j=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===k||void 0===k?1:k||0,x=null!==(o=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==o?o:h,A=null!==(n=e.uriResolver)&&void 0!==n?n:f.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:j)||void 0===i||i,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:j)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:j)&&void 0!==u?u:"log",strictTuples:null!==(m=null!==(d=e.strictTuples)&&void 0!==d?d:j)&&void 0!==m?m:"log",strictRequired:null!==(y=null!==(p=e.strictRequired)&&void 0!==p?p:j)&&void 0!==y&&y,code:e.code?{...e.code,optimize:N,regExp:x}:{optimize:N,regExp:x},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==($=e.schemaId)&&void 0!==$?$:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(T=e.validateFormats)||void 0===T||T,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(S=e.int32range)||void 0===S||S,uriResolver:A}}class _{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,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 o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),$.call(this,v,e,"NOT SUPPORTED"),$.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),O.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let o=p;"id"===r&&(o={...p},o.id=o.$id,delete o.$id),t&&e&&this.addMetaSchema(o,o[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 o=r(t);return"$async"in r||(this.errors=r.errors),o}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 o.call(this,e,t);async function o(e,t){await n.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await o.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({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 l.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(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,o=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,o);return this}let n;if("object"==typeof e){const{schemaId:t}=this.opts;if(n=e[t],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,o,!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 o=this.validate(r,e);if(!o&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return o}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,o=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,o,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=E.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,u.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(N.call(this,r,t),!t)return(0,m.eachItem)(r,(e=>x.call(this,e))),this;R.call(this,t);const o={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,m.eachItem)(r,0===o.type.length?e=>x.call(this,e,o):e=>o.type.forEach((t=>x.call(this,e,o,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 o of t){const t=o.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:o}=t.definition,s=n[e];o&&s&&(n[e]=C(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const o=e[r];t&&!t.test(r)||("string"==typeof o?delete e[r]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[r]))}}_addSchema(e,t,r,o=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:i}=this.opts;if("object"==typeof e)s=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 a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(s||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),n&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),o&&this.validateSchema(e,!0),a}_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):c.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{c.compileSchema.call(this,e)}finally{this.opts=t}}}function $(e,t,r,o="error"){for(const n in e){const s=n;s in t&&this.logger[o](`${r}: option ${n}. ${e[s]}`)}}function E(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function O(){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 T(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(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 S(){const e={...this.opts};for(const t of y)delete e[t];return e}_.ValidationError=s.default,_.MissingRefError=i.default,t.default=_;const j={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){const{RULES:r}=this;if((0,m.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.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 x(e,t,r){var o;const n=null==t?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=n?s.post:s.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?A.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(o=t.implements)||void 0===o||o.forEach((e=>this.addKeyword(e)))}function A(e,t,r){const o=e.rules.findIndex((e=>e.keyword===r));o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,I]}}},4227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const o=r(9029),n=r(1520);function s(e,t=e.schema){const{opts:r,self:o}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=o.RULES.keywords;for(const r in t)n[r]||f(e,`unknown keyword: "${r}"`)}function i(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 c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,i,a,c)=>{const l=void 0===a?i:a instanceof o.Name?(i instanceof o.Name?e(s,i,a):t(s,i,a),a):i instanceof o.Name?(t(s,a,i),i):r(i,a);return c!==o.Name||l instanceof o.Name?l:n(s,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",o._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(o._`${t}${(0,o.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(s(e,t),!i(t,e.self.RULES.all))},t.checkUnknownRules=s,t.schemaHasRules=i,t.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},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return o._`${r}`}return o._`${e}${t}${(0,o.getProperty)(n)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(o._`${r} !== true && ${t} !== undefined`,(()=>{e.if(o._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,o._`${r} || {}`).code(o._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(o._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,o._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({mergeNames:(e,t,r)=>e.if(o._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,o._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(o._`${r} !== true`,(()=>e.assign(r,!0===t||o._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const m={};var p;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)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:m[t.code]||(m[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p||(t.Type=p={})),t.getErrorPath=function(e,t,r){if(e instanceof o.Name){const n=t===p.Num;return r?n?o._`"[" + ${e} + "]"`:o._`"['" + ${e} + "']"`:n?o._`"/" + ${e}`:o._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,o.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4227),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,o.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=n},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?o.operators.GT:o.operators.LT;e.fail$data(o._`Object.keys(${r}).length ${s} ${n}`)}};t.default=n},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const o=r(9029),n=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:i,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:o._`${e.schemaPath}${(0,o.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:o._`${e.schemaPath}${(0,o.getProperty)(t)}${(0,o.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===i||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:i,dataTypes:a,propertyName:c}){if(void 0!==i&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:i,dataPathArr:a,opts:c}=t;u(l.let("data",o._`${t.data}${(0,o.getProperty)(r)}`,!0)),e.errorPath=o.str`${i}${(0,n.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=o._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==i&&(u(i instanceof o.Name?i:l.let("data",i,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:s}){void 0!==o&&(e.compositeRule=o),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(6939);class n extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,o.resolveUrl)(e,t,r),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(e,this.missingRef))}}t.default=n},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match format "${e}"`,params:({schemaCode:e})=>o._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:m}=c;l.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:m.formats,code:l.code.formats}),i=r.const("fDef",o._`${s}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(o._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>r.assign(c,o._`${i}.type || "string"`).assign(u,o._`${i}.validate`)),(()=>r.assign(c,o._`"string"`).assign(u,i))),e.fail$data((0,o.or)(!1===l.strictSchema?o.nil:o._`${a} && !${u}`,function(){const e=d.$async?o._`(${i}.async ? await ${u}(${n}) : ${u}(${n}))`:o._`${u}(${n})`,r=o._`(typeof ${u} == "function" ? ${e} : ${u}.test(${n}))`;return o._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const s=m.formats[i];if(!s)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}m.logger.warn(e())}();if(!0===s)return;const[a,c,p]=function(e){const t=e instanceof RegExp?(0,o.regexpCode)(e):l.code.formats?o._`${l.code.formats}${(0,o.getProperty)(i)}`:void 0,n=r.scopeValue("formats",{key:i,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,n]:[e.type||"string",e.validate,o._`${n}.validate`]}(s);a===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!d.$async)throw new Error("async format in sync schema");return o._`await ${p}(${n})`}return"function"==typeof c?o._`${p}(${n})`:o._`${p}.test(${n})`}())}())}};t.default=n},4834:(e,t,r)=>{"use strict";const{HEX:o}=r(4914),n=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function s(e){if(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(n)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function i(e,t=!1){let r="",n=!0;for(const t of e){if(void 0===o[t])return;"0"!==t&&!0===n&&(n=!1),n||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(l(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},o=[],n=[];let s=!1,a=!1,c=!1;function l(){if(n.length){if(!1===s){const e=i(n);if(void 0===e)return r.error=!0,!1;o.push(e)}n.length=0}return!0}for(let i=0;i<e.length;i++){const u=e[i];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!l())break;s=!0}else n.push(u);else{if(!0===a&&(c=!0),!l())break;if(t++,o.push(":"),t>7){r.error=!0;break}i-1>=0&&":"===e[i-1]&&(a=!0)}}return n.length&&(s?r.zone=n.join(""):c?o.push(n.join("")):o.push(i(n))),r.address=o.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,escapedHost:r,isIPV6:!0}}}function c(e,t){let r="",o=!0;const n=e.length;for(let s=0;s<n;s++){const i=e[s];"0"===i&&o?(s+1<=n&&e[s+1]===t||s+1===n)&&(r+=i,o=!1):(o=i===t,r+=i)}return r}function l(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}const u=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,m=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={recomposeAuthority:function(e){const t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);const o=s(r);if(o.isIPV4)r=o.host;else{const t=a(o.host);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){const t=[];for(;e.length;)if(e.match(u))e=e.replace(u,"");else if(e.match(d))e=e.replace(d,"/");else if(e.match(m))e=e.replace(m,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(p);if(!r)throw new Error("Unexpected dot segment condition");{const o=r[0];e=e.slice(o.length),t.push(o)}}return t.join("")},normalizeIPv4:s,normalizeIPv6:a,stringArrayToHexStripped:i}},4874:(e,t,r)=>{"use strict";const o=r(793);e.exports=d;const n=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},s={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:v,wrapResponseSerializer:v,wrapErrorSerializer:v,req:g,res:g,err:h,errWithCause:h};function i(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function u(e,t){const r={logger:t,parent:e[c]};t[c]=r}function d(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||n;e.browser.write&&(e.browser.asObject=!0);const o=e.serializers||{},s=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,o);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const h=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(h);"function"==typeof r&&g.forEach((function(e){r[e]=r})),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const v=e.level||"info",w=Object.create(r);w.log||(w.log=b),function(e,t,r){const o={};t.forEach((e=>{o[e]=r[e]?r[e]:n[e]||n[l[e]||"log"]||b})),e[a]=o}(w,g,r),u({},w),Object.defineProperty(w,"levelVal",{get:function(){return i(this.level,this)}}),Object.defineProperty(w,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,m(this,_,w,"error"),m(this,_,w,"fatal"),m(this,_,w,"warn"),m(this,_,w,"info"),m(this,_,w,"debug"),m(this,_,w,"trace"),h.forEach((e=>{m(this,_,w,e)}))}});const _={transmit:t,serialize:s,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||b};function $(r,n,i){if(!n)throw new Error("missing bindings for child Pino");i=i||{},s&&n.serializers&&(i.serializers=n.serializers);const a=i.serializers;if(s&&a){var c=Object.assign({},o,a),l=!0===e.browser.serialize?Object.keys(c):s;delete n.serializers,p([n],l,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.bindings=n,c&&(this.serializers=c,this._serialize=l),t&&(this._logEvent=f([].concat(e._logEvent.bindings,n)))}d.prototype=this;const m=new d(this);return u(this,m),m.child=function(...e){return $.call(this,r,...e)},m.level=i.level||this.level,r.onChild(m),m}return w.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},d.levels.values,t),labels:Object.assign({},d.levels.labels,function(e){const t={};return Object.keys(e).forEach((function(r){t[e[r]]=r})),t}(t))}}(e),w.level=v,w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=b,w.serializers=o,w._serialize=s,w._stdErrSerialize=c,w.child=function(...e){return $.call(this,_,...e)},t&&(w._logEvent=f()),w}function m(e,t,r,s){if(Object.defineProperty(e,s,{value:i(e.level,r)>i(s,r)?b:r[a][s],writable:!0,enumerable:!0,configurable:!0}),e[s]===b){if(!t.transmit)return;const o=i(t.transmit.level||e.level,r);if(i(s,r)<o)return}e[s]=function(e,t,r,s){return c=e[a][s],function(){const a=t.timestamp(),l=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===n?n:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];var m=!1;if(t.serialize&&(p(l,this._serialize,this.serializers,this._stdErrSerialize),m=!0),t.asObject||t.formatters?c.call(u,function(e,t,r,n,s){const{level:i,log:a=e=>e}=s.formatters||{},c=r.slice();let l=c[0];const u={};if(n&&(u.time=n),i){const r=i(t,e.levels.values[t]);Object.assign(u,r)}else u.level=e.levels.values[t];let d=1+(0|e._childLevel);if(d<1&&(d=1),null!==l&&"object"==typeof l){for(;d--&&"object"==typeof c[0];)Object.assign(u,c.shift());l=c.length?o(c.shift(),c):void 0}else"string"==typeof l&&(l=o(c.shift(),c));return void 0!==l&&(u[s.messageKey]=l),a(u)}(this,s,l,a,t)):c.apply(u,l),t.transmit){const o=t.transmit.level||e._level,n=i(o,r),c=i(s,r);if(c<n)return;!function(e,t,r,o=!1){const n=t.send,s=t.ts,i=t.methodLevel,a=t.methodValue,c=t.val,l=e._logEvent.bindings;o||p(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=r.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=i,e._logEvent.level.value=a,n(i,e._logEvent,c),e._logEvent=f(l)}(this,{ts:a,methodLevel:s,methodValue:c,transmitLevel:o,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:i(e._level,r)},l,m)}};var c}(e,t,r,s);const l=function(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[c];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==l.length&&(e[s]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(l,e[s]))}function p(e,t,r,o){for(const n in e)if(o&&e[n]instanceof Error)e[n]=d.stdSerializers.err(e[n]);else if("object"==typeof e[n]&&!Array.isArray(e[n])&&t)for(const o in e[n])t.indexOf(o)>-1&&o in r&&(e[n][o]=r[o](e[n][o]))}function f(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}function y(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?w:_}function g(){return{}}function v(e){return e}function b(){}function w(){return!1}function _(){return Date.now()}d.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},d.stdSerializers=s,d.stdTimeFunctions=Object.assign({},{nullTime:w,epochTime:_,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=d,e.exports.pino=d},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5765),n=r(9029),s=r(4227),i=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,o.allSchemaProperties)(r),m=d.filter((e=>(0,s.alwaysValidSchema)(l,r[e])));if(0===d.length||m.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof n.Name||(l.props=(0,i.evaluatedPropsToName)(t,l.props));const{props:h}=l;function y(e){for(const t in p)new RegExp(e).test(t)&&(0,s.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(s=>{t.if(n._`${(0,o.usePattern)(e,r)}.test(${s})`,(()=>{const o=m.includes(r);o||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:i.Type.Str},f),l.opts.unevaluated&&!0!==h?t.assign(n._`${h}[${s}]`,!0):o||l.allErrors||t.if((0,n.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)p&&y(e),l.allErrors?g(e):(t.var(f,!0),g(e),t.if(f))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(494),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,o.validateTuple)(e,"items")};t.default=n},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const o=r(9029),n=r(4227),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>o.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>o._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:o}=t;Array.isArray(o)?i(e,o):(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function i(e,t){const{gen:r,schema:s,data:i,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",o._`${i}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(o._`${l} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(c,s)){const s=r.var("valid",o._`${l} <= ${t.length}`);r.if((0,o.not)(s),(()=>function(s){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:n.Type.Num},s),c.allErrors||r.if((0,o.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=i,t.default=s},5765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const o=r(9029),n=r(4227),s=r(2023),i=r(4227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:o._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return o._`${a(e)}.call(${t}, ${r})`}function l(e,t,r,n){const s=o._`${t}${(0,o.getProperty)(r)} === undefined`;return n?(0,o.or)(s,(0,o.not)(c(e,t,r))):s}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:s}=e;r.if(l(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:o._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,s){return(0,o.or)(...n.map((n=>(0,o.and)(l(e,t,n,r.ownProperties),o._`${s} = ${n}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,n){const s=o._`${t}${(0,o.getProperty)(r)} !== undefined`;return n?o._`${s} && ${c(e,t,r)}`:s},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,n.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:c},l,u,d){const m=d?o._`${e}, ${t}, ${n}${i}`:t,p=[[s.default.instancePath,(0,o.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&p.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const f=o._`${m}, ${r.object(...p)}`;return u!==o.nil?o._`${l}.call(${u}, ${f})`:o._`${l}(${f})`};const d=o._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:o._`${"new RegExp"===s.code?d:(0,i.useFunc)(e,s)}(${r}, ${n})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:i}=e,a=t.name("valid");if(i.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(i){const c=t.const("len",o._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),t.if((0,o.not)(a),i)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,n.alwaysValidSchema)(i,e)))&&!i.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,n)=>{const i=e.subschema({keyword:s,schemaProp:n,compositeRule:!0},c);t.assign(a,o._`${a} || ${c}`),e.mergeValidEvaluated(i,c)||t.if((0,o.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},5844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4227),n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,o.alwaysValidSchema)(n,t))return;const i=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(i)}))}};t.default=n},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=o.operators,s={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},i={message:({keyword:e,schemaCode:t})=>o.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:i,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(o._`${r} ${s[t].fail} ${n} || isNaN(${r})`)}};t.default=a},5944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(8343);o.code='require("ajv/dist/runtime/uri").default',t.default=o},6022:e=>{!function(){"use strict";var t=[,function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.lengthOf=t.keysOf=t.isObject=t.isInfOrNaN=t.isFunction=t.isArguments=t.hasOwn=t.handleError=t.convertMapToObject=t.checkError=void 0,t.isFunction=function(e){return"function"==typeof e},t.isObject=function(e){return"object"===o(e)},t.keysOf=function(e){return Object.keys(e)},t.lengthOf=function(e){return Object.keys(e).length};var n=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=n,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var o,n,s=(n=2,function(e){if(Array.isArray(e))return e}(o=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,s=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(s.push(o.value),!t||s.length!==t);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return s}}(o,n)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(o,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=s[0],a=s[1];return e[i]=a,e}),{})},t.isArguments=function(e){return null!=e&&n(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var s={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=s,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(s.maxStack(e.message))throw new Error("Converting circular structure to JSON");throw e}}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=void 0;for(var r=Object.create(null),o=function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)},n=0;n<64;n++)r[o(n)]=n;var s=function(e){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var t=[],r=0;r<e;r++)t.push(0);return t.$Uint8ArrayPolyfill=!0,t}return new Uint8Array(new ArrayBuffer(e))},i={encode:function(e){if("string"==typeof e){var t=e;e=s(t.length);for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=n}}for(var i=[],a=null,c=null,l=null,u=null,d=0;d<e.length;d++)switch(d%3){case 0:a=e[d]>>2&63,c=(3&e[d])<<4;break;case 1:c|=e[d]>>4&15,l=(15&e[d])<<2;break;case 2:l|=e[d]>>6&3,u=63&e[d],i.push(o(a)),i.push(o(c)),i.push(o(l)),i.push(o(u)),a=null,c=null,l=null,u=null}return null!=a&&(i.push(o(a)),i.push(o(c)),null==l?i.push("="):i.push(o(l)),null==u&&i.push("=")),i.join("")},decode:function(e){var t=Math.floor(3*e.length/4);"="==e.charAt(e.length-1)&&(t--,"="==e.charAt(e.length-2)&&t--);for(var o,n=s(t),i=null,a=null,c=null,l=0,u=0;u<e.length;u++){var d="="===(o=e.charAt(u))?-1:r[o];switch(u%4){case 0:if(d<0)throw new Error("invalid base64 string");i=d<<2;break;case 1:if(d<0)throw new Error("invalid base64 string");i|=d>>4,n[l++]=i,a=(15&d)<<4;break;case 2:d>=0&&(a|=d>>2,n[l++]=a,c=(3&d)<<6);break;case 3:d>=0&&(n[l++]=c|d)}}return n},newBinary:s};t.Base64=i},function(e){e.exports={_noYieldsAllowed:function(e){return e()}}},function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function e(t,n,s,i,a){var c=n[t];switch(r(c)){case"string":return o(c);case"number":return isFinite(c)?String(c):"null";case"boolean":return String(c);case"object":if(!c)return"null";var l,u=i+s,d=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var m=c.length,p=0;p<m;p+=1)d[p]=e(p,c,s,u,a)||"null";return l=0===d.length?"[]":u?"[\n"+u+d.join(",\n"+u)+"\n"+i+"]":"["+d.join(",")+"]"}var f=Object.keys(c);return a&&(f=f.sort()),f.forEach((function(t){(l=e(t,c,s,u,a))&&d.push(o(t)+(u?": ":":")+l)})),l=0===d.length?"{}":u?"{\n"+u+d.join(",\n"+u)+"\n"+i+"}":"{"+d.join(",")+"}"}};t.default=function(e,t){var r=Object.assign({indent:"",canonical:!1},t);if(!0===r.indent)r.indent=" ";else if("number"==typeof r.indent){for(var o="",s=0;s<r.indent;s++)o+=" ";r.indent=o}return n("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,o),s.exports}var n={};!function(){var e=n,t=o(2).Base64,r=o(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var s=o(1),i={};e.EJSON=i;var a=new Map;i.addType=function(e,t){if(a.has(e))throw new Error("Type ".concat(e," already present"));a.set(e,t)};var c=[{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$date")&&1===(0,s.lengthOf)(e)},matchObject:function(e){return e instanceof Date},toJSONValue:function(e){return{$date:e.getTime()}},fromJSONValue:function(e){return new Date(e.$date)}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$regexp")&&(0,s.hasOwn)(e,"$flags")&&2===(0,s.lengthOf)(e)},matchObject:function(e){return e instanceof RegExp},toJSONValue:function(e){return{$regexp:e.source,$flags:e.flags}},fromJSONValue:function(e){return new RegExp(e.$regexp,e.$flags.slice(0,50).replace(/[^gimuy]/g,"").replace(/(.)(?=.*\1)/g,""))}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$InfNaN")&&1===(0,s.lengthOf)(e)},matchObject:s.isInfOrNaN,toJSONValue:function(e){return{$InfNaN:Number.isNaN(e)?0:e===1/0?1:-1}},fromJSONValue:function(e){return e.$InfNaN/0}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$binary")&&1===(0,s.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,s.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$escape")&&1===(0,s.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,s.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,s.keysOf)(e).forEach((function(r){t[r]=i.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,s.keysOf)(e.$escape).forEach((function(r){t[r]=i.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,s.hasOwn)(e,"$type")&&(0,s.hasOwn)(e,"$value")&&2===(0,s.lengthOf)(e)},matchObject:function(e){return i._isCustomType(e)},toJSONValue:function(e){var t=r._noYieldsAllowed((function(){return e.toJSONValue()}));return{$type:e.typeName(),$value:t}},fromJSONValue:function(e){var t=e.$type;if(!a.has(t))throw new Error("Custom EJSON type ".concat(t," is not defined"));var o=a.get(t);return r._noYieldsAllowed((function(){return o(e.$value)}))}}];i._isCustomType=function(e){return e&&(0,s.isFunction)(e.toJSONValue)&&(0,s.isFunction)(e.typeName)&&a.has(e.typeName())},i._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,s.convertMapToObject)(a)},i._getConverters=function(){return c};var l=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},u=function e(t){if(null===t)return null;var r=l(t);return void 0!==r?r:(0,s.isObject)(t)?((0,s.keysOf)(t).forEach((function(r){var o=t[r];if((0,s.isObject)(o)||void 0===o||(0,s.isInfOrNaN)(o)){var n=l(o);n?t[r]=n:e(o)}})),t):t};i._adjustTypesToJSONValue=u,i.toJSONValue=function(e){var t=l(e);if(void 0!==t)return t;var r=e;return(0,s.isObject)(e)&&(r=i.clone(e),u(r)),r};var d=function(e){if((0,s.isObject)(e)&&null!==e){var t=(0,s.keysOf)(e);if(t.length<=2&&t.every((function(e){return"string"==typeof e&&"$"===e.substr(0,1)})))for(var r=0;r<c.length;r++){var o=c[r];if(o.matchJSONValue(e))return o.fromJSONValue(e)}}return e},m=function e(t){if(null===t)return null;var r=d(t);return r!==t?r:(0,s.isObject)(t)?((0,s.keysOf)(t).forEach((function(r){var o=t[r];if((0,s.isObject)(o)){var n=d(o);if(o!==n)return void(t[r]=n);e(o)}})),t):t};i._adjustTypesFromJSONValue=m,i.fromJSONValue=function(e){var t=d(e);return t===e&&(0,s.isObject)(e)&&(t=i.clone(e),m(t)),t},i.stringify=(0,s.handleError)((function(e,t){var r=i.toJSONValue(e);return t&&(t.canonical||t.indent)?o(4)(r,t):JSON.stringify(r)})),i.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return i.fromJSONValue(JSON.parse(e))},i.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},i.equals=function(e,t,r){var o,n=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,s.isObject)(e)||!(0,s.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(i.isBinary(e)&&i.isBinary(t)){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}if((0,s.isFunction)(e.equals))return e.equals(t,r);if((0,s.isFunction)(t.equals))return t.equals(e,r);var a,c=Array.isArray(e),l=Array.isArray(t);if(c!==l)return!1;if(c&&l){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(!i.equals(e[o],t[o],r))return!1;return!0}switch(i._isCustomType(e)+i._isCustomType(t)){case 1:return!1;case 2:return i.equals(i.toJSONValue(e),i.toJSONValue(t))}var u=(0,s.keysOf)(e),d=(0,s.keysOf)(t);return n?(o=0,a=u.every((function(n){return!(o>=d.length||n!==d[o]||!i.equals(e[n],t[d[o]],r)||(o++,0))}))):(o=0,a=u.every((function(n){return!!(0,s.hasOwn)(t,n)&&!!i.equals(e[n],t[n],r)&&(o++,!0)}))),a&&o===d.length},i.clone=function(e){var t;if(!(0,s.isObject)(e))return e;if(null===e)return null;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return e;if(i.isBinary(e)){t=i.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(i.clone):(0,s.isArguments)(e)?Array.from(e).map(i.clone):(0,s.isFunction)(e.clone)?e.clone():i._isCustomType(e)?i.fromJSONValue(i.clone(i.toJSONValue(e)),!0):(t={},(0,s.keysOf)(e).forEach((function(r){t[r]=i.clone(e[r])})),t)},i.newBinary=t.newBinary}(),e.exports=n.EJSON}()},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2128),n=r(7060),s=r(6378),i=r(7532),a=r(9857),c=[o.default,n.default,(0,s.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>o._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,s)=>{let a;(0,n.alwaysValidSchema)(i,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},u),s>0&&t.if(o._`${u} && ${c}`).assign(c,!1).assign(l,o._`[${l}, ${s}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,s),a&&e.mergeEvaluated(a,o.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},6250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(2017);o.code='require("ajv/dist/runtime/equal").default',t.default=o},6378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5457),n=r(5354),s=r(494),i=r(3966),a=r(2661),c=r(3025),l=r(9713),u=r(8660),d=r(117),m=r(5333),p=r(7923),f=r(6505),h=r(6163),y=r(5844),g=r(1239),v=r(4426);t.default=function(e=!1){const t=[p.default,f.default,h.default,y.default,g.default,v.default,l.default,u.default,c.default,d.default,m.default];return e?t.push(n.default,i.default):t.push(o.default,s.default),t.push(a.default),t}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const o=r(3282),n=r(9029),s=n.operators,i={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const d=new o.KeywordCxt(c,u.RULES.all.format.definition,"format");function m(e){return n._`${e}.compare(${r}, ${s}) ${i[a].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),o=t.const("fmt",n._`${r}[${d.schemaCode}]`);e.fail$data((0,n.or)(n._`typeof ${o} != "object"`,n._`${o} instanceof RegExp`,n._`typeof ${o}.compare != "function"`,m(o)))}():function(){const r=d.schema,o=u.formats[r];if(!o||!0===o)return;if("object"!=typeof o||o instanceof RegExp||"function"!=typeof o.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:o,code:l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(r)}`:void 0});e.fail$data(m(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=o},6653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(7652),s=r(3835),i=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>o._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=c.propertyName;if("string"!=typeof m)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 p=t.let("valid",!1),f=t.const("tag",o._`${r}${(0,o.getProperty)(m)}`);function h(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,o.Name),n}t.if(o._`typeof ${f} == "string"`,(()=>function(){const r=function(){var e;const t={},r=n(l);let o=!0;for(let t=0;t<d.length;t++){let l=d[t];if((null==l?void 0:l.$ref)&&!(0,a.schemaHasRulesButRef)(l,u.self.RULES)){const e=l.$ref;if(l=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),l instanceof s.SchemaEnv&&(l=l.schema),void 0===l)throw new i.default(u.opts.uriResolver,u.baseId,e)}const p=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[m];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);o=o&&(r||n(l)),c(p,t)}if(!o)throw new Error(`discriminator: "${m}" must be required`);return t;function n({required:e}){return Array.isArray(e)&&e.includes(m)}function c(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${m}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(o._`${f} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:f,tagName:m}),t.endIf()}()),(()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:f,tagName:m}))),e.ok(p)}};t.default=c},6939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const o=r(4227),n=r(2017),s=r(7106),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!i.has(r)&&("object"==typeof e[r]&&(0,o.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=p(t));const o=e.parse(t);return d(e,o)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const m=/#\/?$/;function p(e){return e?e.replace(m,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,r){return r=p(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:o}=this.opts,i=p(e[r]||t),a={"":i},c=u(o,i,!1),l={},d=new Set;return s(e,{allKeys:!0},((e,t,o,n)=>{if(void 0===n)return;const s=c+t;let i=a[n];function u(t){const r=this.opts.uriResolver.resolve;if(t=p(i?r(i,t):t),d.has(t))throw h(t);d.add(t);let o=this.refs[t];return"string"==typeof o&&(o=this.refs[o]),"object"==typeof o?m(e,o.schema,t):t!==p(s)&&("#"===t[0]?(m(e,l[t],t),l[t]=e):this.refs[t]=s),t}function y(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(i=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=i})),l;function m(e,t,r){if(void 0!==t&&!n(e,t))throw h(r)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,o){function n(r){e.removeListener(t,s),o(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}h(e,t,s,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,n)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,o){var n,s,i,l;if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),i=s[t]),void 0===i)i=s[t]=r,++e._eventsCount;else if("function"==typeof i?i=s[t]=o?[r,i]:[i,r]:o?i.unshift(r):i.push(r),(n=c(e))>0&&i.length>n&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=u.bind(o);return n.listener=r,o.wrapFn=n,n}function m(e,t,r){var o=e._events;if(void 0===o)return[];var n=o[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):f(n,n.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),o=0;o<t;++o)r[o]=e[o];return r}function h(e,t,r,o){if("function"==typeof e.on)o.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(s){o.once&&e.removeEventListener(t,n),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r<l;++r)o(u[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,o,n,s,i;if(a(t),void 0===(o=this._events))return this;if(void 0===(r=o[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){i=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(o[e]=r[0]),void 0!==o.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,o;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,s=Object.keys(r);for(o=0;o<s.length;++o)"removeListener"!==(n=s[o])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5882),n=r(3439),s=r(7307),i=r(422),a=r(4486),c=r(4003),l=r(1163),u=r(617),d=r(7935),m=r(8643),p=[o.default,n.default,s.default,i.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,m.default];t.default=p},7106:e=>{"use strict";var t=e.exports=function(e,t,o){"function"==typeof t&&(o=t,t={}),r(t,"function"==typeof(o=t.cb||o)?o:o.pre||function(){},o.post||function(){},e,"",e)};function r(e,o,n,s,i,a,c,l,u,d){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var m in o(s,i,a,c,l,u,d),s){var p=s[m];if(Array.isArray(p)){if(m in t.arrayKeywords)for(var f=0;f<p.length;f++)r(e,o,n,p[f],i+"/"+m+"/"+f,a,i,m,s,f)}else if(m in t.propsKeywords){if(p&&"object"==typeof p)for(var h in p)r(e,o,n,p[h],i+"/"+m+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,i,m,s,h)}else(m in t.keywords||e.allKeys&&!(m in t.skipKeywords))&&r(e,o,n,p,i+"/"+m,a,i,m,s)}n(s,i,a,c,l,u,d)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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}},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s=r(3853),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return o.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>o._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i,it:a}=e,c="maxLength"===t?o.operators.GT:o.operators.LT,l=!1===a.opts.unicode?o._`${r}.length`:o._`${(0,n.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(o._`${l} ${c} ${i}`)}};t.default=i},7532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=[r(4737).default];t.default=o},7652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},7845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const o=r(1520);class n extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(s||(t.UsedValueState=s={})),t.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class i{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof o.Name?e:this.name(e)}name(e){return new o.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}}}t.Scope=i;class a extends o.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=o._`.${new o.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=o._`\n`;t.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:o.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 o=this.toName(e),{prefix:n}=o,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[n];if(i){const e=i.get(s);if(e)return e}else i=this._values[n]=new Map;i.set(s,o);const a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,o.setValue(t,{property:n,itemIndex:c}),o}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return o._`${e}${t.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(e,r,i={},a){let c=o.nil;for(const l in e){const u=e[l];if(!u)continue;const d=i[l]=i[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,s.Started);let i=r(e);if(i){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=o._`${c}${r} ${e} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(e)))throw new n(e);c=o._`${c}${i}${this.opts._n}`}d.set(e,s.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const o=r(9029),n=r(4227);function s(e,t,r){const{gen:s,compositeRule:i,data:a,opts:c}=e;if(void 0===r)return;const l=o._`${a}${(0,o.getProperty)(t)}`;if(i)return void(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);let u=o._`${l} === undefined`;"empty"===c.useDefaults&&(u=o._`${u} || ${l} === null || ${l} === ""`),s.if(u,o._`${l} = ${(0,o.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:o}=e.schema;if("object"===t&&r)for(const t in r)s(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach(((t,r)=>s(e,r,t.default)))}},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>o(e,t)))}function o(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])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},o){const n=t.RULES.types[o];return n&&!0!==n&&r(e,n)},t.shouldUseGroup=r,t.shouldUseRule=o},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4227),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,o.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=n},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s=r(6250),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>o._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:i,schemaCode:a,schema:c}=e;i||c&&"object"==typeof c?e.fail$data(o._`!${(0,n.useFunc)(t,s.default)}(${r}, ${a})`):e.fail(o._`${c} !== ${r}`)}};t.default=i},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(4018),n=r(6461),s=r(9029),i=new s.Name("fullFormats"),a=new s.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,o.fullFormats,i),e;const[r,s]="fast"===t.mode?[o.fastFormats,a]:[o.fullFormats,i];return l(e,t.formats||o.formatNames,r,s),t.keywords&&(0,n.default)(e),e};function l(e,t,r,o){var n,i;null!==(n=(i=e.opts.code).formats)&&void 0!==n||(i.formats=s._`require("ajv-formats/dist/formats").${o}`);for(const o of t)e.addFormat(o,r[o])}c.get=(e,t="full")=>{const r=("fast"===t?o.fastFormats:o.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},8343:(e,t,r)=>{"use strict";const{normalizeIPv6:o,normalizeIPv4:n,removeDotSegments:s,recomposeAuthority:i,normalizeComponentEncoding:a}=r(4834),c=r(343);function l(e,t,r,o){const n={};return o||(e=p(u(e,r),r),t=p(u(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=s(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=s(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=s(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=s(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 u(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),n=[],a=c[(o.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,o),void 0!==r.path&&(o.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==o.reference&&r.scheme&&n.push(r.scheme,":");const l=i(r);if(void 0!==l&&("suffix"!==o.reference&&n.push("//"),n.push(l),r.path&&"/"!==r.path.charAt(0)&&n.push("/")),void 0!==r.path){let e=r.path;o.absolutePath||a&&a.absolutePath||(e=s(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),n.push(e)}return void 0!==r.query&&n.push("?",r.query),void 0!==r.fragment&&n.push("#",r.fragment),n.join("")}const d=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const r=Object.assign({},t),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const l=e.match(m);if(l){if(s.scheme=l[1],s.userinfo=l[3],s.host=l[4],s.port=parseInt(l[5],10),s.path=l[6]||"",s.query=l[7],s.fragment=l[8],isNaN(s.port)&&(s.port=l[5]),s.host){const e=n(s.host);if(!1===e.isIPV4){const t=o(e.host);s.host=t.host.toLowerCase(),a=t.isIPV6}else s.host=e.host,a=!0}void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||void 0!==s.query||s.path?void 0===s.scheme?s.reference="relative":void 0===s.fragment?s.reference="absolute":s.reference="uri":s.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||s.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&s.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,o=e.length;r<o;++r)if(t=e.charCodeAt(r),t>126||d[t])return!0;return!1}(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(e){s.error=s.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(i&&void 0!==s.scheme&&(s.scheme=unescape(s.scheme)),i&&void 0!==s.host&&(s.host=unescape(s.host)),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),e&&e.parse&&e.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}const f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=u(p(e,t),t):"object"==typeof e&&(e=p(u(e,t),t)),e},resolve:function(e,t,r){const o=Object.assign({scheme:"null"},r);return u(l(p(e,o),p(t,o),o,!0),{...o,skipEscape:!0})},resolveComponents:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=u(a(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=u(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=u(a(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=u(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:p};e.exports=f,e.exports.default=f,e.exports.fastUri=f},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s=r(6250),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>o._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:i,schema:a,schemaCode:c,it:l}=e;if(!i&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const m=()=>null!=d?d:d=(0,n.useFunc)(t,s.default);let p;if(u||i)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",c,(e=>t.if(o._`${m()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);p=(0,o.or)(...a.map(((t,n)=>function(e,t){const n=a[t];return"object"==typeof n&&null!==n?o._`${m()}(${r}, ${e}[${t}])`:o._`${r} === ${n}`}(e,n))))}e.pass(p)}};t.default=i},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(5765),n=r(9029),s=r(2023),i=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>n._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:d,opts:m}=u;if(u.props=!0,"all"!==m.removeAdditional&&(0,i.alwaysValidSchema)(u,r))return;const p=(0,o.allSchemaProperties)(a.properties),f=(0,o.allSchemaProperties)(a.patternProperties);function h(e){t.code(n._`delete ${c}[${e}]`)}function y(o){if("all"===m.removeAdditional||m.removeAdditional&&!1===r)h(o);else{if(!1===r)return e.setParams({additionalProperty:o}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,i.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===m.removeAdditional?(g(o,r,!1),t.if((0,n.not)(r),(()=>{e.reset(),h(o)}))):(g(o,r),d||t.if((0,n.not)(r),(()=>t.break())))}}}function g(t,r,o){const n={keyword:"additionalProperties",dataProp:t,dataPropType:i.Type.Str};!1===o&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}t.forIn("key",c,(r=>{p.length||f.length?t.if(function(r){let s;if(p.length>8){const e=(0,i.schemaRefOrVal)(u,a.properties,"properties");s=(0,o.isOwnProperty)(t,e,r)}else s=p.length?(0,n.or)(...p.map((e=>n._`${r} === ${e}`))):n.nil;return f.length&&(s=(0,n.or)(s,...f.map((t=>n._`${(0,o.usePattern)(e,t)}.test(${r})`)))),(0,n.not)(s)}(r),(()=>y(r))):y(r)})),e.ok(n._`${l} === ${s.default.errors}`)}};t.default=a},8708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const o=r(9029),n=r(4227),s=r(2023);function i(e,t){const r=e.const("err",t);e.if(o._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,o._`[${r}]`)),o._`${s.default.vErrors}.push(${r})`),e.code(o._`${s.default.errors}++`)}function a(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(o._`new ${e.ValidationError}(${t})`):(r.assign(o._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>o.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?o.str`"${e}" keyword must be ${t} ($data)`:o.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,n,s){const{it:c}=e,{gen:u,compositeRule:d,allErrors:m}=c,p=l(e,r,n);(null!=s?s:d||m)?i(u,p):a(c,o._`[${p}]`)},t.reportExtraError=function(e,r=t.keywordError,o){const{it:n}=e,{gen:c,compositeRule:u,allErrors:d}=n;i(c,l(e,r,o)),u||d||a(n,s.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if(o._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(o._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",i,s.default.errors,(i=>{e.const(c,o._`${s.default.vErrors}[${i}]`),e.if(o._`${c}.instancePath === undefined`,(()=>e.assign(o._`${c}.instancePath`,(0,o.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(o._`${c}.schemaPath`,o.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(o._`${c}.schema`,r),e.assign(o._`${c}.data`,n))}))};const c={keyword:new o.Name("keyword"),schemaPath:new o.Name("schemaPath"),params:new o.Name("params"),propertyName:new o.Name("propertyName"),message:new o.Name("message"),schema:new o.Name("schema"),parentSchema:new o.Name("parentSchema")};function l(e,t,r){const{createErrors:n}=e.it;return!1===n?o._`{}`:function(e,t,r={}){const{gen:n,it:i}=e,a=[u(i,r),d(e,r)];return function(e,{params:t,message:r},n){const{keyword:i,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:m,topSchemaRef:p,schemaPath:f}=u;n.push([c.keyword,i],[c.params,"function"==typeof t?t(e):t||o._`{}`]),d.messages&&n.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&n.push([c.schema,l],[c.parentSchema,o._`${p}${f}`],[s.default.data,a]),m&&n.push([c.propertyName,m])}(e,t,a),n.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?o.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,o.strConcat)(s.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let i=s?t:o.str`${t}/${e}`;return r&&(i=o.str`${i}${(0,n.getErrorPath)(r,n.Type.Str)}`),[c.schemaPath,i]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const o=r(8708),n=r(9029),s=r(2023),i={message:"boolean schema is false"};function a(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,o.reportError)(s,i,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:o}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${o}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:o}=e;!1===o?(r.var(t,!1),a(e)):r.var(t,!0)}},9029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const o=r(1520),n=r(7845);var s=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var i=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new o._Code(">"),GTE:new o._Code(">="),LT:new o._Code("<"),LTE:new o._Code("<="),EQ:new o._Code("==="),NEQ:new o._Code("!=="),NOT:new o._Code("!"),OR:new o._Code("||"),AND:new o._Code("&&"),ADD:new o._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof o._CodeOrName?this.rhs.names:{}}}class l 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,t){if(!(this.lhs instanceof o.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,t),this}get names(){return N(this.lhs instanceof o.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,o){super(e,r,o),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class m extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p 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=x(this.code,e,t),this}get names(){return this.code instanceof o._CodeOrName?this.code.names:{}}}class h 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 o=r.length;for(;o--;){const n=r[o];n.optimizeNames(e,t)||(A(e,n.names),r.splice(o,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>k(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class v extends y{}v.kind="else";class b extends y{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 v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(R(e),t instanceof b?[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=x(this.condition,e,t),this}get names(){const e=super.names;return N(e,this.condition),this.else&&k(e,this.else.names),e}}b.kind="if";class w extends y{}w.kind="for";class _ extends w{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=x(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class $ extends w{constructor(e,t,r,o){super(),this.varKind=e,this.name=t,this.from=r,this.to=o}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:o,to:s}=this;return`for(${t} ${r}=${o}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=N(super.names,this.from);return N(e,this.to)}}class E extends w{constructor(e,t,r,o){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=o}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=x(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}}class O extends y{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)}}O.kind="func";class T extends h{render(e){return"return "+super.render(e)}}T.kind="return";class P extends y{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,o;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(o=this.finally)||void 0===o||o.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}}class S extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class j extends y{render(e){return"finally"+super.render(e)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function N(e,t){return t instanceof o._CodeOrName?k(e,t.names):e}function x(e,t,r){return e instanceof o.Name?s(e):(n=e)instanceof o._Code&&n._items.some((e=>e instanceof o.Name&&1===t[e.str]&&void 0!==r[e.str]))?new o._Code(e._items.reduce(((e,t)=>(t instanceof o.Name&&(t=s(t)),t instanceof o._Code?e.push(...t._items):e.push(t),e)),[])):e;var n;function s(e){const o=r[e.str];return void 0===o||1!==t[e.str]?e:(delete t[e.str],o)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:o._`!${D(e)}`}j.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new g]}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,o){const n=this._scope.toName(t);return void 0!==r&&o&&(this._constants[n.str]=r),this._leafNode(new c(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==o.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,o.addCodeArg)(t,n));return t.push("}"),new o._Code(t)}if(e,t,r){if(this._blockNode(new b(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 b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_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,r,o,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const i=this._scope.toName(e);return this._for(new $(s,i,t,r),(()=>o(i)))}forOf(e,t,r,s=n.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=t instanceof o.Name?t:this.var("_arr",t);return this.forRange("_i",0,o._`${e}.length`,(t=>{this.var(i,o._`${e}[${t}]`),r(i)}))}return this._for(new E("of",s,i,t),(()=>r(i)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,o._`Object.keys(${t})`,r);const i=this._scope.toName(e);return this._for(new E("in",s,i,t),(()=>r(i)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new m(e))}return(e){const t=new T;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const o=new P;if(this._blockNode(o),this.code(e),t){const e=this.name("e");this._currNode=o.catch=new S(e),t(e)}return r&&(this._currNode=o.finally=new j,this.code(r)),this._endBlockNode(S,j)}throw(e){return this._leafNode(new p(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,t=o.nil,r,n){return this._blockNode(new O(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(O)}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 b))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}},t.not=R;const I=z(t.operators.AND);t.and=function(...e){return e.reduce(I)};const C=z(t.operators.OR);function z(e){return(t,r)=>t===o.nil?r:r===o.nil?t:o._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof o.Name?e:o._`(${e})`}t.or=function(...e){return e.reduce(C)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(9029),n=r(4227),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>o._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return;const a=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,o.not)(a),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(a)}};t.default=s},9857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.d(o,{default:()=>Ut});var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>me,hasStandardBrowserEnv:()=>fe,hasStandardBrowserWebWorkerEnv:()=>he,navigator:()=>pe,origin:()=>ye});var t=r(7007),n=r(3282),s=r(8182);function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:c}=Object,l=(u=Object.create(null),e=>{const t=a.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const d=e=>(e=e.toLowerCase(),t=>l(t)===e),m=e=>t=>typeof t===e,{isArray:p}=Array,f=m("undefined"),h=d("ArrayBuffer"),y=m("string"),g=m("function"),v=m("number"),b=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==l(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},_=d("Date"),$=d("File"),E=d("Blob"),O=d("FileList"),T=d("URLSearchParams"),[P,S,j,k]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let o,n;if("object"!=typeof e&&(e=[e]),p(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{const n=r?Object.getOwnPropertyNames(e):Object.keys(e),s=n.length;let i;for(o=0;o<s;o++)i=n[o],t.call(null,e[i],i,e)}}function x(e,t){t=t.toLowerCase();const r=Object.keys(e);let o,n=r.length;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,R=e=>!f(e)&&e!==A,I=(C="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>C&&e instanceof C);var C;const z=d("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),L=d("RegExp"),q=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};N(r,((r,n)=>{let s;!1!==(s=t(r,n,e))&&(o[n]=s||r)})),Object.defineProperties(e,o)},M=d("AsyncFunction"),U=(F="function"==typeof setImmediate,V=g(A.postMessage),F?setImmediate:V?(B=`axios@${Math.random()}`,G=[],A.addEventListener("message",(({source:e,data:t})=>{e===A&&t===B&&G.length&&G.shift()()}),!1),e=>{G.push(e),A.postMessage(B,"*")}):e=>setTimeout(e));var F,V,B,G;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(A):"undefined"!=typeof process&&process.nextTick||U,J={isArray:p,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=l(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:y,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:w,isReadableStream:P,isRequest:S,isResponse:j,isHeaders:k,isUndefined:f,isDate:_,isFile:$,isBlob:E,isRegExp:L,isFunction:g,isStream:e=>b(e)&&g(e.pipe),isURLSearchParams:T,isTypedArray:I,isFileList:O,forEach:N,merge:function e(){const{caseless:t}=R(this)&&this||{},r={},o=(o,n)=>{const s=t&&x(r,n)||n;w(r[s])&&w(o)?r[s]=e(r[s],o):w(o)?r[s]=e({},o):p(o)?r[s]=o.slice():r[s]=o};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],o);return r},extend:(e,t,r,{allOwnKeys:o}={})=>(N(t,((t,o)=>{r&&g(t)?e[o]=i(t,r):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,o)=>{let n,s,i;const a={};if(t=t||{},null==e)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)i=n[s],o&&!o(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==r&&c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:d,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return-1!==o&&o===r},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!v(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const o=[];for(;null!==(r=e.exec(t));)o.push(r);return o},isHTMLForm:z,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const o=e[r];g(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},o=e=>{e.forEach((e=>{r[e]=!0}))};return p(e)?o(e):o(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:x,global:A,isContextDefined:R,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,o)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const n=p(e)?[]:{};return N(e,((e,t)=>{const s=r(e,o+1);!f(s)&&(n[t]=s)})),t[o]=void 0,n}}return e};return r(e,0)},isAsyncFn:M,isThenable:e=>e&&(b(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:U,asap:K};function Z(e,t,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}J.inherits(Z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const H=Z.prototype,W={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{W[e]={value:e}})),Object.defineProperties(Z,W),Object.defineProperty(H,"isAxiosError",{value:!0}),Z.from=(e,t,r,o,n,s)=>{const i=Object.create(H);return J.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Z.call(i,e.message,t,r,o,n),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const X=Z;function Y(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,r){return e?e.concat(t).map((function(e,t){return e=Q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const te=J.toFlatObject(J,{},null,(function(e){return/^is[A-Z]/.test(e)})),re=function(e,t,r){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(r=J.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!J.isUndefined(t[e])}))).metaTokens,n=r.visitor||l,s=r.dots,i=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(n))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(!a&&J.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,n){let a=e;if(e&&!n&&"object"==typeof e)if(J.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(Y)}(e)||(J.isFileList(e)||J.endsWith(r,"[]"))&&(a=J.toArray(e)))return r=Q(r),a.forEach((function(e,o){!J.isUndefined(e)&&null!==e&&t.append(!0===i?ee([r],o,s):null===i?r:r+"[]",c(e))})),!1;return!!Y(e)||(t.append(ee(n,r,s),c(e)),!1)}const u=[],d=Object.assign(te,{defaultVisitor:l,convertValue:c,isVisitable:Y});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(r,o){if(!J.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+o.join("."));u.push(r),J.forEach(r,(function(r,s){!0===(!(J.isUndefined(r)||null===r)&&n.call(t,r,J.isString(s)?s.trim():s,o,d))&&e(r,o?o.concat(s):[s])})),u.pop()}}(e),t};function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ne(e,t){this._pairs=[],e&&re(e,this,t)}const se=ne.prototype;se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=ne;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const o=r&&r.encode||ae;J.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let s;if(s=n?n(t,r):J.isURLSearchParams(t)?t.toString():new ie(t,r).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const le=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},me="undefined"!=typeof window&&"undefined"!=typeof document,pe="object"==typeof navigator&&navigator||void 0,fe=me&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=me&&window.location.href||"http://localhost",ge={...e,...de},ve=function(e){function t(e,r,o,n){let s=e[n++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=n>=e.length;return s=!s&&J.isArray(o)?o.length:s,a?(J.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):(o[s]&&J.isObject(o[s])||(o[s]=[]),t(e,r,o[s],n)&&J.isArray(o[s])&&(o[s]=function(e){const t={},r=Object.keys(e);let o;const n=r.length;let s;for(o=0;o<n;o++)s=r[o],t[s]=e[s];return t}(o[s])),!i)}if(J.isFormData(e)&&J.isFunction(e.entries)){const r={};return J.forEachEntry(e,((e,o)=>{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,r,0)})),r}return null},be={transitional:ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",o=r.indexOf("application/json")>-1,n=J.isObject(e);if(n&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return o?JSON.stringify(ve(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,o){return ge.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=J.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||o?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,r=t&&t.forcedJSONParsing,o="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(r&&!this.responseType||o)){const r=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const we=be,_e=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$e=Symbol("internals");function Ee(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:J.isArray(e)?e.map(Oe):String(e)}function Te(e,t,r,o,n){return J.isFunction(o)?o.call(this,t,r):(n&&(t=r),J.isString(t)?J.isString(o)?-1!==t.indexOf(o):J.isRegExp(o)?o.test(t):void 0:void 0)}class Pe{constructor(e){e&&this.set(e)}set(e,t,r){const o=this;function n(e,t,r){const n=Ee(t);if(!n)throw new Error("header name must be a non-empty string");const s=J.findKey(o,n);(!s||void 0===o[s]||!0===r||void 0===r&&!1!==o[s])&&(o[s||t]=Oe(e))}const s=(e,t)=>J.forEach(e,((e,r)=>n(e,r,t)));if(J.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let r,o,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),r=e.substring(0,n).trim().toLowerCase(),o=e.substring(n+1).trim(),!r||t[r]&&_e[r]||("set-cookie"===r?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)})),t})(e),t);else if(J.isHeaders(e))for(const[t,o]of e.entries())n(o,t,r);else null!=e&&n(t,e,r);return this}get(e,t){if(e=Ee(e)){const r=J.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}(e);if(J.isFunction(t))return t.call(this,e,r);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ee(e)){const r=J.findKey(this,e);return!(!r||void 0===this[r]||t&&!Te(0,this[r],r,t))}return!1}delete(e,t){const r=this;let o=!1;function n(e){if(e=Ee(e)){const n=J.findKey(r,e);!n||t&&!Te(0,r[n],n,t)||(delete r[n],o=!0)}}return J.isArray(e)?e.forEach(n):n(e),o}clear(e){const t=Object.keys(this);let r=t.length,o=!1;for(;r--;){const n=t[r];e&&!Te(0,this[n],n,e,!0)||(delete this[n],o=!0)}return o}normalize(e){const t=this,r={};return J.forEach(this,((o,n)=>{const s=J.findKey(r,n);if(s)return t[s]=Oe(o),void delete t[n];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(n):String(n).trim();i!==n&&delete t[n],t[i]=Oe(o),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,((r,o)=>{null!=r&&!1!==r&&(t[o]=e&&J.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[$e]=this[$e]={accessors:{}}).accessors,r=this.prototype;function o(e){const o=Ee(e);t[o]||(function(e,t){const r=J.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+r,{value:function(e,r,n){return this[o].call(this,t,e,r,n)},configurable:!0})}))}(r,e),t[o]=!0)}return J.isArray(e)?e.forEach(o):o(e),this}}Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(Pe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),J.freezeMethods(Pe);const Se=Pe;function je(e,t){const r=this||we,o=t||r,n=Se.from(o.headers);let s=o.data;return J.forEach(e,(function(e){s=e.call(r,s,n.normalize(),t?t.status:void 0)})),n.normalize(),s}function ke(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,r){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,r),this.name="CanceledError"}J.inherits(Ne,X,{__CANCEL__:!0});const xe=Ne;function Ae(e,t,r){const o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(new X("Request failed with status code "+r.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Re=(e,t,r=3)=>{let o=0;const n=function(e,t){e=e||10;const r=new Array(e),o=new Array(e);let n,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=o[i];n||(n=c),r[s]=a,o[s]=c;let u=i,d=0;for(;u!==s;)d+=r[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-n<t)return;const m=l&&c-l;return m?Math.round(1e3*d/m):void 0}}(50,250);return function(e,t){let r,o,n=0,s=1e3/t;const i=(t,s=Date.now())=>{n=s,r=null,o&&(clearTimeout(o),o=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-n;a>=s?i(e,t):(r=e,o||(o=setTimeout((()=>{o=null,i(r)}),s-a)))},()=>r&&i(r)]}((r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-o,c=n(a);o=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),r)},Ie=(e,t)=>{const r=null!=e;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ce=e=>(...t)=>J.asap((()=>e(...t))),ze=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,De=ge.hasStandardBrowserEnv?{write(e,t,r,o,n,s){const i=[e+"="+encodeURIComponent(t)];J.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),J.isString(o)&&i.push("path="+o),J.isString(n)&&i.push("domain="+n),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,r){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const qe=e=>e instanceof Se?{...e}:e;function Me(e,t){t=t||{};const r={};function o(e,t,r,o){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:o},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function n(e,t,r,n){return J.isUndefined(t)?J.isUndefined(e)?void 0:o(void 0,e,0,n):o(e,t,0,n)}function s(e,t){if(!J.isUndefined(t))return o(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(r,n,s){return s in t?o(r,n):s in e?o(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,r)=>n(qe(e),qe(t),0,!0)};return J.forEach(Object.keys(Object.assign({},e,t)),(function(o){const s=c[o]||n,i=s(e[o],t[o],o);J.isUndefined(i)&&s!==a||(r[o]=i)})),r}const Ue=e=>{const t=Me({},e);let r,{data:o,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=Se.from(a),t.url=ce(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),J.isFormData(o))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(n&&J.isFunction(n)&&(n=n(t)),n||!1!==n&&ze(t.url))){const e=s&&i&&De.read(i);e&&a.set(s,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const o=Ue(e);let n=o.data;const s=Se.from(o.headers).normalize();let i,a,c,l,u,{responseType:d,onUploadProgress:m,onDownloadProgress:p}=o;function f(){l&&l(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let h=new XMLHttpRequest;function y(){if(!h)return;const o=Se.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ae((function(e){t(e),f()}),(function(e){r(e),f()}),{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:o,config:e,request:h}),h=null}h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new X("Request aborted",X.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new X("Network Error",X.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const n=o.transitional||ue;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),r(new X(t,n.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,h)),h=null},void 0===n&&s.setContentType(null),"setRequestHeader"in h&&J.forEach(s.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),J.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),d&&"json"!==d&&(h.responseType=o.responseType),p&&([c,u]=Re(p,!0),h.addEventListener("progress",c)),m&&h.upload&&([a,l]=Re(m),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(i=t=>{h&&(r(!t||t.type?new xe(null,e,h):t),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);g&&-1===ge.protocols.indexOf(g)?r(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,e)):h.send(n||null)}))},Ve=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,o=new AbortController;const n=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;o.abort(t instanceof X?t:new xe(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,n(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(n):e.removeEventListener("abort",n)})),e=null)};e.forEach((e=>e.addEventListener("abort",n)));const{signal:a}=o;return a.unsubscribe=()=>J.asap(i),a}},Be=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let o,n=0;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},Ge=(e,t,r,o)=>{const n=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Be(r,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await n.next();if(t)return a(),void e.close();let s=o.byteLength;if(r){let e=i+=s;r(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),n.return())},{highWaterMark:2})},Ke="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Je=Ke&&"function"==typeof ReadableStream,Ze=Ke&&("function"==typeof TextEncoder?(He=new TextEncoder,e=>He.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var He;const We=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=Je&&We((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ye=Je&&We((()=>J.isReadableStream(new Response("").body))),Qe={stream:Ye&&(e=>e.body)};var et;Ke&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=J.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,r)})})));const tt={http:null,xhr:Fe,fetch:Ke&&(async e=>{let{url:t,method:r,data:o,signal:n,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:m}=Ue(e);l=l?(l+"").toLowerCase():"text";let p,f=Ve([n,s&&s.toAbortSignal()],i);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Xe&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await Ze(e)).byteLength:void 0)})(t):r})(u,o))){let e,r=new Request(t,{method:"POST",body:o,duplex:"half"});if(J.isFormData(o)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=Ie(y,Re(Ce(c)));o=Ge(r.body,65536,e,t)}}J.isString(d)||(d=d?"include":"omit");const n="credentials"in Request.prototype;p=new Request(t,{...m,signal:f,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:n?d:void 0});let s=await fetch(p);const i=Ye&&("stream"===l||"response"===l);if(Ye&&(a||i&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=J.toFiniteNumber(s.headers.get("content-length")),[r,o]=a&&Ie(t,Re(Ce(a),!0))||[];s=new Response(Ge(s.body,65536,r,(()=>{o&&o(),h&&h()})),e)}l=l||"text";let g=await Qe[J.findKey(Qe,l)||"text"](s,e);return!i&&h&&h(),await new Promise(((t,r)=>{Ae(t,r,{data:g,headers:Se.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,p),{cause:t.cause||t});throw X.from(t,t&&t.code,e,p)}})};J.forEach(tt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const rt=e=>`- ${e}`,ot=e=>J.isFunction(e)||null===e||!1===e,nt=e=>{e=J.isArray(e)?e:[e];const{length:t}=e;let r,o;const n={};for(let s=0;s<t;s++){let t;if(r=e[s],o=r,!ot(r)&&(o=tt[(t=String(r)).toLowerCase()],void 0===o))throw new X(`Unknown adapter '${t}'`);if(o)break;n[t||"#"+s]=o}if(!o){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return o};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xe(null,e)}function it(e){return st(e),e.headers=Se.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),nt(e.adapter||we.adapter)(e).then((function(t){return st(e),t.data=je.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return ke(t)||(st(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ct={};at.transitional=function(e,t,r){function o(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,s)=>{if(!1===e)throw new X(o(n," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!ct[n]&&(ct[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},at.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const lt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let n=o.length;for(;n-- >0;){const s=o[n],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new X("option "+s+" must be "+r,X.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}},validators:at},ut=lt.validators;class dt{constructor(e){this.defaults=e,this.interceptors={request:new le,response:new le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:n}=t;void 0!==r&<.assertOptions(r,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),null!=o&&(J.isFunction(o)?t.paramsSerializer={serialize:o}:lt.assertOptions(o,{encode:ut.function,serialize:ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),lt.assertOptions(t,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=n&&J.merge(n.common,n[t.method]);n&&J.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=Se.concat(s,n);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=i.length;let m=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{m=e(m)}catch(e){t.call(this,e);break}}try{l=it.call(this,m)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return ce(Le((e=Me(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}J.forEach(["delete","get","head","options"],(function(e){dt.prototype[e]=function(t,r){return this.request(Me(r||{},{method:e,url:t,data:(r||{}).data}))}})),J.forEach(["post","put","patch"],(function(e){function t(t){return function(r,o,n){return this.request(Me(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}dt.prototype[e]=t(),dt.prototype[e+"Form"]=t(!0)}));const mt=dt;class pt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{r.subscribe(e),t=e})).then(e);return o.cancel=function(){r.unsubscribe(t)},o},e((function(e,o,n){r.reason||(r.reason=new xe(e,o,n),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new pt((function(t){e=t})),cancel:e}}}const ft=pt,ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ht).forEach((([e,t])=>{ht[t]=e}));const yt=ht,gt=function e(t){const r=new mt(t),o=i(mt.prototype.request,r);return J.extend(o,mt.prototype,r,{allOwnKeys:!0}),J.extend(o,r,null,{allOwnKeys:!0}),o.create=function(r){return e(Me(t,r))},o}(we);gt.Axios=mt,gt.CanceledError=xe,gt.CancelToken=ft,gt.isCancel=ke,gt.VERSION="1.8.4",gt.toFormData=re,gt.AxiosError=X,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Me,gt.AxiosHeaders=Se,gt.formToJSON=e=>ve(J.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=nt,gt.HttpStatusCode=yt,gt.default=gt;const vt=gt;var bt=r(1111);const wt="axios-retry";function _t(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&bt(e)}const $t=["get","head","options"],Et=$t.concat(["put","delete"]);function Ot(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Tt(e){return!!e.config?.method&&Ot(e)&&-1!==Et.indexOf(e.config.method)}function Pt(e){return _t(e)||Tt(e)}function St(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const jt={retries:3,retryCondition:Pt,retryDelay:function(e=0,t=void 0){return Math.max(0,St(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function kt(e,t,r=!1){const o=function(e,t){return{...jt,...t,...e[wt]}}(e,t||{});return o.retryCount=o.retryCount||0,o.lastRequestTime&&!r||(o.lastRequestTime=Date.now()),e[wt]=o,o}const Nt=(e,t)=>{const r=e.interceptors.request.use((e=>(kt(e,t,!0),e[wt]?.validateResponse&&(e.validateStatus=()=>!1),e))),o=e.interceptors.response.use(null,(async r=>{const{config:o}=r;if(!o)return Promise.reject(r);const n=kt(o,t);return r.response&&n.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:o}=e,n=(e.retryCount||0)<r&&o(t);if("object"==typeof n)try{return!1!==await n}catch(e){return!1}return n}(n,r)?async function(e,t,r,o){t.retryCount+=1;const{retryDelay:n,shouldResetTimeout:s,onRetry:i}=t,a=n(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,o),!s&&o.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,n=o.timeout-e-a;if(n<=0)return Promise.reject(r);o.timeout=n}return o.transformRequest=[e=>e],await i(t.retryCount,r,o),o.signal?.aborted?Promise.resolve(e(o)):new Promise((t=>{const r=()=>{clearTimeout(n),t(e(o))},n=setTimeout((()=>{t(e(o)),o.signal?.removeEventListener&&o.signal.removeEventListener("abort",r)}),a);o.signal?.addEventListener&&o.signal.addEventListener("abort",r,{once:!0})}))}(e,n,r,o):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(n,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:o}};Nt.isNetworkError=_t,Nt.isSafeRequestError=function(e){return!!e.config?.method&&Ot(e)&&-1!==$t.indexOf(e.config.method)},Nt.isIdempotentRequestError=Tt,Nt.isNetworkOrIdempotentRequestError=Pt,Nt.exponentialDelay=function(e=0,t=void 0,r=100){const o=2**e*r,n=Math.max(o,St(t));return n+.2*n*Math.random()},Nt.linearDelay=function(e=100){return(t=0,r=void 0)=>{const o=t*e;return Math.max(o,St(r))}},Nt.isRetryableError=Ot;const xt=Nt;var At=r(6022);class Rt extends Error{}Rt.prototype.name="InvalidTokenError";var It=r(4874);const Ct={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!Ct._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof Ct.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new Ct.ObjectID(this._str)}typeName(){return"oid"}getTimestamp(){return Number.parseInt(this._str.substr(0,8),16)}valueOf(){return this._str}toJSONValue(){return this.valueOf()}toHexString(){return this.valueOf()}}},zt=Ct,Dt={common1:{type:"string"},common2:{format:"email",type:"string"},common3:{type:"boolean"},common4:{default:"@userId",type:"string"},common5:{id:{default:"@userId",type:"string"}},common6:{default:"",type:"string"},common7:{const:"citoyens"},common8:{properties:{value:{type:"boolean"}}},common9:{value:{type:"boolean"}},common10:{},common11:{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{default:"@userId",type:"string"}}}},common12:{properties:{typeElement:{const:"citoyens"}}},common13:{typeElement:{const:"citoyens"}},common14:{properties:{id:{default:"@userId",type:"string"}}},common15:{not:{type:"null"}},common16:{type:"null"},common17:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},common18:{anyOf:[{items:{type:"string"},type:"array"},{enum:[""],type:"string"}]},common19:{items:{type:"string"},type:"array"},common20:{enum:[""],type:"string"},common21:{format:"uri",type:"string"},common22:{properties:{name:{not:{type:"null"}}},required:["name"]},common23:{name:{not:{type:"null"}}},common24:{properties:{url:{not:{type:"null"}}},required:["url"]},common25:{url:{not:{type:"null"}}},common26:{properties:{tags:{not:{type:"null"}}},required:["tags"]},common27:{tags:{not:{type:"null"}}},common28:{properties:{email:{not:{type:"null"}}},required:["email"]},common29:{email:{not:{type:"null"}}},common30:{const:"info",default:"info",type:"string"},common31:{$ref:"#/$defs/sharedFields/email"},common32:{$ref:"#/$defs/sharedFields/name"},common33:{$ref:"#/$defs/sharedFields/tags"},common34:{$ref:"#/$defs/sharedFields/url"},common35:{const:"projects"},common36:{const:"organizations"},common37:{$ref:"#/$defs/socialField"},common38:{minLength:0,type:"string"},common39:{type:["string","number"]},common40:{type:"number"},common41:{const:!0,default:!0,type:"boolean"},common42:{maxLength:100,minLength:3,pattern:"^[a-zA-Z0-9]+$",type:"string"},common43:{properties:{type:{const:"citoyens"}}},common44:{type:{const:"citoyens"}},common45:{additionalProperties:!1,allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},required:["folder","ownerId"],type:"object"},common46:{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}},common47:{properties:{folder:{const:"citoyens"}}},common48:{folder:{const:"citoyens"}},common49:{properties:{ownerId:{default:"@userId"}}},common50:{ownerId:{default:"@userId"}},common51:{default:"@userId"},common52:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},common53:{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}},common54:{properties:{id:{default:"@userId"}}},common55:{id:{default:"@userId"}},common56:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{default:"@userId",type:"string"}}}},common57:{properties:{parentType:{const:"citoyens"}}},common58:{parentType:{const:"citoyens"}},common59:{properties:{parentId:{default:"@userId",type:"string"}}},common60:{parentId:{default:"@userId",type:"string"}},common61:{default:!0,type:"boolean"},common62:{required:["text"]},common63:{required:["mediaImg"]},common64:{required:["mediaFile"]},common65:{additionalProperties:!1,properties:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},required:["countFiles","files"],type:"object"},common66:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},common67:{additionalProperties:!1,properties:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},required:["countImages","images"],type:"object"},common68:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},common69:{additionalProperties:!1,patternProperties:{"^[0-9]+$":{additionalProperties:!1,properties:{count:{type:"number"},id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"}},type:"object"},common70:{"^[0-9]+$":{additionalProperties:!1,properties:{count:{type:"number"},id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"}},common71:{additionalProperties:!1,properties:{count:{type:"number"},id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common72:{count:{type:"number"},id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common73:{default:"public",enum:["public","private","restricted"],type:"string"},common74:{const:"news",default:"news",type:"string"},common75:{additionalProperties:!1,properties:{id:{type:"string"}},required:["id"],type:"object"},common76:{id:{type:"string"}},common77:{default:!1,type:"boolean"},common78:{additionalProperties:!1,properties:{id:{type:"string"},type:{default:"news",enum:["news"],type:"string"}},required:["type","id"],type:"object"},common79:{id:{type:"string"},type:{default:"news",enum:["news"],type:"string"}},common80:{default:"news",enum:["news"],type:"string"},common81:{items:{additionalProperties:!1,properties:{count:{type:"number"},id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},type:"array"},common82:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],type:"string"},common83:{const:!1,default:!1,type:"boolean"},common84:{const:"",default:"",type:"string"},common85:{additionalProperties:!1,properties:{indexMax:{type:"number"},indexMin:{type:"number"}},required:["indexMin","indexMax"],type:"object"},common86:{indexMax:{type:"number"},indexMin:{type:"number"}},common87:{default:0,minimum:0,type:"integer"},common88:{const:["projects"],default:["projects"],items:{enum:["projects"],type:"string"},type:"array"},common89:{enum:["projects"],type:"string"},common90:{$exists:!0},common91:{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},common92:{$exists:{const:!0}},common93:{const:!0},common94:{default:30,type:"integer"},common95:{additionalProperties:!1,allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],properties:{id:{pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},required:["type","id"],type:"object"},common96:{id:{pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},common97:{pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common98:{const:["poi"],default:["poi"],items:{enum:["poi"],type:"string"},type:"array"},common99:{enum:["poi"],type:"string"},common100:{const:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],default:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],items:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},type:"array"},common101:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},common102:{$exists:!1},common103:{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},common104:{$exists:{const:!1}},common105:{const:!1},common106:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common107:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common108:{additionalProperties:!1,properties:{$exists:{default:!1,type:"boolean"}},required:["$exists"],type:"object"},common109:{$exists:{default:!1,type:"boolean"}},common110:{additionalProperties:!1,properties:{$in:{items:{type:"string"},minItems:1,type:"array"}},required:["$in"],type:"object"},common111:{$in:{items:{type:"string"},minItems:1,type:"array"}},common112:{items:{type:"string"},minItems:1,type:"array"},common113:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},required:["id"],type:"object"},common114:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},common115:{pattern:"^[a-f0-9]{24}$",type:"string"},common116:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},required:["id"],type:"object"},common117:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},common118:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common119:{const:["citoyens"],default:["citoyens"],items:{enum:["citoyens"],type:"string"},type:"array"},common120:{enum:["citoyens"],type:"string"},common121:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},type:"array"},common122:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},common123:{not:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common124:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common125:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common126:{"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"}},common127:{not:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common128:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common129:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common130:{properties:{id:{pattern:"^@userId$"}}},common131:{id:{pattern:"^@userId$"}},common132:{pattern:"^@userId$"},common133:{const:["badges"],default:["badges"],items:{enum:["badges"],type:"string"},type:"array"},common134:{enum:["badges"],type:"string"},common135:{const:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common136:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common137:{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"},common138:{$exists:{const:!0,type:"boolean"}},common139:{const:!0,type:"boolean"},common140:{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},common141:{$exists:{const:!1,type:"boolean"}},common142:{const:!1,type:"boolean"},common143:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"}},common144:{indexMax:30,indexMin:0},common145:{additionalProperties:!1,allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},{if:{properties:{parentType:{const:"events"}}},then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},childType:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:{pattern:"^[a-f0-9]{24}$",type:"string"},parentType:{enum:["citoyens","organizations","projects","events"],type:"string"}},required:["childId","childType","parentType","parentId","connectType"],type:"object"},common146:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},common147:{properties:{connectType:{const:"friend",default:"friend"}}},common148:{connectType:{const:"friend",default:"friend"}},common149:{const:"friend",default:"friend"},common150:{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},common151:{properties:{parentType:{const:"organizations"}}},common152:{parentType:{const:"organizations"}},common153:{properties:{connectType:{enum:["admin","member"]}}},common154:{connectType:{enum:["admin","member"]}},common155:{enum:["admin","member"]},common156:{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},common157:{properties:{parentType:{const:"projects"}}},common158:{parentType:{const:"projects"}},common159:{properties:{connectType:{enum:["admin","contributor"]}}},common160:{connectType:{enum:["admin","contributor"]}},common161:{enum:["admin","contributor"]},common162:{if:{properties:{parentType:{const:"events"}}},then:{properties:{connectType:{const:"attendee",default:"attendee"}}}},common163:{properties:{parentType:{const:"events"}}},common164:{parentType:{const:"events"}},common165:{const:"events"},common166:{properties:{connectType:{const:"attendee",default:"attendee"}}},common167:{connectType:{const:"attendee",default:"attendee"}},common168:{const:"attendee",default:"attendee"},common169:{childId:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},childType:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:{pattern:"^[a-f0-9]{24}$",type:"string"},parentType:{enum:["citoyens","organizations","projects","events"],type:"string"}},common170:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},common171:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},common172:{enum:["admin","member","contributor","attendee","friend"],type:"string"},common173:{enum:["citoyens","organizations","projects","events"],type:"string"}},Lt=[{auth:"none",constant:"PERSON_REGISTER",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/person/register",request:{additionalProperties:!1,properties:{app:Dt.common1,email:Dt.common2,isInvitation:Dt.common3,mode:Dt.common1,name:Dt.common1,pendingUserId:Dt.common1,pwd:Dt.common1,username:Dt.common1},required:["name","username","email","pwd"],type:"object"}},{auth:"none",constant:"AUTHENTICATE_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/authenticate",postActions:[{path:"accessToken",type:"setToken"},{path:"refreshToken",type:"setRefreshToken"},{event:"userLoggedIn",payloadPath:"user",type:"emitEvent"}],request:{additionalProperties:!1,properties:{email:Dt.common2,password:Dt.common1},required:["email","password"],type:"object"}},{auth:"none",constant:"REFRESH_TOKEN_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/refreshtoken",request:{additionalProperties:!1,properties:{refreshToken:Dt.common1},required:["refreshToken"],type:"object"}},{auth:"bearer",constant:"ME_INFO_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/me"},{auth:"none",constant:"PASSWORD_RECOVERY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/person/sendemail",request:{additionalProperties:!1,properties:{email:Dt.common2,type:{const:"password",default:"password",type:"string"}},required:["email","type"],type:"object"}},{auth:"bearer",constant:"SERVER_EXCHANGE_TOKEN",contentType:"application/json",method:"POST",path:"/api/cocolight/exchangetoken",request:{additionalProperties:!1,properties:{serverUrl:Dt.common1},required:["serverUrl"],type:"object"}},{auth:"bearer",constant:"CHANGE_PASSWORD",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/person/changepassword",request:{additionalProperties:!1,properties:{mode:{const:"changePassword",default:"changePassword",type:"string"},newPassword:Dt.common1,newPassword2:Dt.common1,oldPassword:Dt.common1,scope:{default:"",type:["string"]},userId:Dt.common4},required:["mode","userId","oldPassword","newPassword","newPassword2"],type:"object"}},{auth:"bearer",constant:"DELETE_ACCOUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/id/{id}/type/citoyens",pathParams:{additionalProperties:!1,properties:Dt.common5,required:["id"],type:"object"},postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:{additionalProperties:!1,properties:{reason:Dt.common6},required:["reason"],type:"object"}},{auth:"bearer",constant:"UPDATE_SETTINGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatesettings",request:{additionalProperties:!1,allOf:[{if:{properties:{typeEntity:Dt.common7}},then:{properties:{idEntity:Dt.common4}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:Dt.common7}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:Dt.common7}},then:Dt.common8},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:Dt.common7}}},then:Dt.common8}],properties:{idEntity:Dt.common1,type:Dt.common1,typeEntity:{default:"citoyens",type:"string"},value:Dt.common10},required:["type","value","typeEntity","idEntity"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_DESCRIPTION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{additionalProperties:!1,allOf:[Dt.common11,{anyOf:[{properties:{description:Dt.common15},required:["description"]},{properties:{shortDescription:Dt.common15},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:Dt.common6,description:Dt.common1,id:Dt.common1,scope:{default:"",type:["string","null"]},shortDescription:Dt.common1,typeElement:Dt.common17},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_INFO",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{sharedFields:{email:Dt.common2,name:Dt.common1,tags:Dt.common18,url:Dt.common21}},allOf:[{if:Dt.common12,then:{additionalProperties:!1,anyOf:[Dt.common22,{properties:{birthDate:Dt.common15},required:["birthDate"]},{properties:{fixe:Dt.common15},required:["fixe"]},{properties:{mobile:Dt.common15},required:["mobile"]},Dt.common24,Dt.common26,Dt.common28],properties:{birthDate:{format:"date",type:"string"},block:Dt.common30,email:Dt.common31,fixe:Dt.common1,id:Dt.common4,mobile:Dt.common1,name:Dt.common32,scope:Dt.common6,tags:Dt.common33,typeElement:Dt.common17,url:Dt.common34}}},{if:{properties:{typeElement:Dt.common35}},then:{additionalProperties:!1,anyOf:[Dt.common22,Dt.common24,Dt.common26,Dt.common28,{properties:{avancement:Dt.common15},required:["avancement"]},{properties:{parent:Dt.common15},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:Dt.common30,email:Dt.common31,id:Dt.common1,name:Dt.common32,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":{additionalProperties:!1,properties:{name:Dt.common1,type:Dt.common1},required:["type","name"],type:"object"}},type:"object"},scope:Dt.common6,tags:Dt.common33,typeElement:Dt.common17,url:Dt.common34}}},{if:{properties:{typeElement:Dt.common36}},then:{additionalProperties:!1,anyOf:[Dt.common22,Dt.common24,Dt.common26,Dt.common28,{properties:{type:Dt.common15},required:["type"]}],properties:{block:Dt.common30,email:Dt.common31,id:Dt.common1,name:Dt.common32,scope:Dt.common6,tags:Dt.common33,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:Dt.common17,url:Dt.common34}}}],properties:{block:Dt.common30,id:Dt.common1,scope:Dt.common6,typeElement:Dt.common17},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SOCIAL",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{socialField:{anyOf:[Dt.common20,Dt.common21]}},allOf:[Dt.common11,{anyOf:[{properties:{gitlab:Dt.common15},required:["gitlab"]},{properties:{github:Dt.common15},required:["github"]},{properties:{twitter:Dt.common15},required:["twitter"]},{properties:{facebook:Dt.common15},required:["facebook"]},{properties:{instagram:Dt.common15},required:["instagram"]},{properties:{diaspora:Dt.common15},required:["diaspora"]},{properties:{mastodon:Dt.common15},required:["mastodon"]},{properties:{telegram:Dt.common15},required:["telegram"]},{properties:{signal:Dt.common15},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:Dt.common37,facebook:Dt.common37,github:Dt.common37,gitlab:Dt.common37,id:Dt.common1,instagram:Dt.common37,mastodon:Dt.common37,scope:Dt.common6,signal:Dt.common37,telegram:Dt.common37,twitter:Dt.common37,typeElement:Dt.common17},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_LOCALITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{allOf:[Dt.common11],properties:{address:{additionalProperties:!1,properties:{"@type":{const:"PostalAddress",type:"string"},addressCountry:Dt.common1,addressLocality:Dt.common1,codeInsee:Dt.common1,level1:Dt.common1,level1Name:Dt.common1,level3:Dt.common38,level3Name:Dt.common38,level4:Dt.common38,level4Name:Dt.common38,localityId:Dt.common1,postalCode:Dt.common1,streetAddress:Dt.common1},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],type:"object"},block:{const:"localities",default:"localities",type:"string"},geo:{additionalProperties:!1,properties:{"@type":{const:"GeoCoordinates",type:"string"},latitude:Dt.common39,longitude:Dt.common39},required:["latitude","longitude"],type:"object"},geoPosition:{additionalProperties:!0,properties:{coordinates:{items:Dt.common40,maxItems:2,minItems:2,type:"array"},float:Dt.common41,type:{const:"Point",type:"string"}},required:["type","coordinates","float"],type:"object"},id:Dt.common1,scope:Dt.common6,typeElement:Dt.common17},required:["block","typeElement","id","address"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{allOf:[Dt.common11],properties:{block:Dt.common30,id:Dt.common1,scope:Dt.common6,slug:Dt.common42,typeElement:Dt.common17},required:["block","typeElement","id","slug"],type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,allOf:[{if:Dt.common43,then:Dt.common14}],properties:{block:Dt.common30,id:Dt.common1,slug:Dt.common42,type:Dt.common17},required:["block","type","id","slug"],type:"object"}},{auth:"bearer",constant:"PROFIL_IMAGE",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",pathParams:Dt.common45,request:{additionalProperties:!1,properties:{profil_avatar:Dt.common10},required:["profil_avatar"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_ABOUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/about/type/{type}/id/{id}/json/true",pathParams:{additionalProperties:!1,allOf:[Dt.common53],properties:{id:Dt.common1,type:Dt.common17},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{tpl:{const:"ficheInfoElement",default:"ficheInfoElement",type:"string"}},required:["tpl"],type:"object"}},{auth:"bearer",constant:"MULTICONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,allOf:[Dt.common56],properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:Dt.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:Dt.common1,parentType:Dt.common17},required:["parentId","parentType","listInvite"],type:"object"}},{auth:"none",constant:"GET_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/{json}",pathParams:{additionalProperties:!1,allOf:[Dt.common53],properties:{id:Dt.common1,isLive:Dt.common61,json:Dt.common61,type:Dt.common17},required:["isLive","type","id","json"],type:"object"},request:{additionalProperties:!1,properties:{dateLimit:{default:0,type:"integer"},indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:Dt.common6},required:["name"],type:"object"}},required:["dateLimit","indexStep"],type:"object"}},{auth:"none",constant:"GET_NEWS_BY_ID",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/getbyids",request:{additionalProperties:!1,properties:{ids:Dt.common19},required:["ids"],type:"object"}},{auth:"bearer",constant:"ADD_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/save",request:{additionalProperties:!1,allOf:[Dt.common56],anyOf:[Dt.common62,Dt.common63,Dt.common64],properties:{json:Dt.common41,markdownActive:Dt.common61,mediaFile:Dt.common65,mediaImg:Dt.common67,mentions:Dt.common69,parentId:Dt.common1,parentType:Dt.common17,scope:Dt.common73,tags:Dt.common18,text:Dt.common1,type:Dt.common74},required:["scope","markdownActive","parentId","parentType","type","json"],type:"object"}},{auth:"bearer",constant:"ADD_IMAGE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",pathParams:Dt.common45,request:{additionalProperties:!1,properties:{newsImage:Dt.common10},required:["newsImage"],type:"object"}},{auth:"bearer",constant:"ADD_FILE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",pathParams:Dt.common45,request:{additionalProperties:!1,properties:{newsFile:Dt.common10},required:["newsFile"],type:"object"}},{auth:"bearer",constant:"DELETE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/delete/id/{id}",pathParams:Dt.common75,request:{additionalProperties:!1,properties:{isLive:Dt.common77},required:["isLive"],type:"object"}},{auth:"bearer",constant:"UPDATE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/update",request:{additionalProperties:!1,allOf:[Dt.common56],anyOf:[Dt.common62,Dt.common63,Dt.common64],properties:{idNews:Dt.common1,markdownActive:Dt.common61,mediaFile:Dt.common65,mediaImg:Dt.common67,mentions:Dt.common69,parentId:Dt.common1,parentType:Dt.common17,scope:Dt.common73,tags:Dt.common18,text:Dt.common1,type:Dt.common74},required:["idNews","scope","markdownActive","parentId","parentType","type"],type:"object"}},{auth:"bearer",constant:"SHARE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,allOf:[{if:{properties:{childType:Dt.common7}},then:{properties:{childId:Dt.common4}}}],properties:{childId:Dt.common1,childType:Dt.common17,comment:Dt.common1,connectType:{const:"share",default:"share",type:"string"},parentId:Dt.common1,parentType:Dt.common74},required:["parentId","parentType","childId","childType","connectType"],type:"object"}},{auth:"none",constant:"GET_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/index/type/{type}/id/{id}/json/true",pathParams:Dt.common78},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:Dt.common6,contextId:Dt.common1,contextType:Dt.common80,mentions:Dt.common81,parentCommentId:Dt.common6,path:Dt.common6,text:Dt.common1},required:["text","contextId","contextType"],type:"object"}},{auth:"bearer",constant:"DELETE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/delete/id/{id}",pathParams:Dt.common75},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:Dt.common1,params:{properties:{mentions:Dt.common81,text:Dt.common1},required:["text"],type:"object"}},required:["id","params"],type:"object"}},{auth:"none",constant:"SEARCH_TAGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/tags/search?q={q}",pathParams:{additionalProperties:!1,properties:{q:Dt.common1},required:["q"],type:"object"}},{auth:"none",constant:"SHOW_VOTE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/action/list/type/{type}/id/{id}/actionType/vote/json/true",pathParams:Dt.common78},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:Dt.common82,type:"array"},fediverse:Dt.common83,filters:Dt.common84,indexMin:{const:0,default:0,type:"number"},indexStep:Dt.common40,initType:Dt.common84,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:Dt.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:Dt.common1,notSourceKey:Dt.common41,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":Dt.common85},type:"object"},searchTags:Dt.common19,searchType:{items:Dt.common82,type:"array"}},required:["name","searchType","countType","indexMin","indexStep","initType","count","notSourceKey","filters","fediverse"],type:"object"}},{auth:"none",constant:"CITY_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{minimum:5,type:"integer"},indexMin:{minimum:0,type:"integer"},locality:Dt.common84,name:Dt.common1,searchBy:{const:"ALL",default:"ALL",type:"string"},searchType:{const:["cities"],default:["cities"],items:{enum:["cities"],type:"string"},type:"array"}},required:["name","locality","searchType"],type:"object"}},{auth:"none",constant:"SUGGESTION_INPUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{default:20,minimum:20,type:"integer"},indexMin:Dt.common87,name:Dt.common1,searchType:{items:{enum:["organizations","projects","poi"],type:"string"},type:"array"}},required:["name","searchType","indexMin","indexMax"],type:"object"}},{auth:"none",constant:"GET_PROJECTS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common88,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":Dt.common90,"parent.@userId":Dt.common90},"links.contributors.@userId":Dt.common90},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91},type:"object"}},required:["$or"],type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common88},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_PROJECTS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:Dt.common95,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common88,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":Dt.common90,"parent.@{pathParams.id}":Dt.common90},"links.contributors.@{pathParams.id}":Dt.common90},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91},type:"object"}},required:["$or"],type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common88},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_POIS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common98,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{"parent.@userId":Dt.common90},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common98},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_POIS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:Dt.common95,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common98,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":Dt.common90},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common98},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_ORGANIZATIONS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common100,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{"links.members.@userId":Dt.common90,"links.members.@userId.isInviting":Dt.common102,"links.members.@userId.toBeValidated":Dt.common102},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":Dt.common103,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":Dt.common103},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common100},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_ORGANIZATIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,allOf:[Dt.common53],properties:{id:Dt.common97,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common100,fediverse:Dt.common83,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":Dt.common90,"links.members.@{pathParams.id}.isInviting":Dt.common102,"links.members.@{pathParams.id}.toBeValidated":Dt.common102},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":Dt.common103,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":Dt.common103},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common100},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_MEMBERS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common106,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":Dt.common91,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":Dt.common108,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":Dt.common110,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":Dt.common103},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common106},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_MEMBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/organizations/id/{id}/canSee/true",pathParams:Dt.common113,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common106,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.memberOf.@{pathParams.id}":Dt.common90,"links.memberOf.@{pathParams.id}.isInviting":Dt.common102,"links.memberOf.@{pathParams.id}.toBeValidated":Dt.common102},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":Dt.common91,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":Dt.common108,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":Dt.common110,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":Dt.common108},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common106},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_FRIENDS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:Dt.common116,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common119,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.friends.@{pathParams.id}":Dt.common90,"links.friends.@{pathParams.id}.isInviting":Dt.common102,"links.friends.@{pathParams.id}.toBeValidated":Dt.common102},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":Dt.common108,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":Dt.common108},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common119},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIPTIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common121,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[Dt.common123],default:{"links.followers.@userId":Dt.common90,"links.followers.@{userId}.isInviting":Dt.common102,"links.followers.@{userId}.toBeValidated":Dt.common102},patternProperties:Dt.common126,type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIPTIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:Dt.common116,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common121,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[Dt.common123],default:{"links.followers.@{pathParams.id}":Dt.common90,"links.followers.@{pathParams.id}.isInviting":Dt.common102,"links.followers.@{pathParams.id}.toBeValidated":Dt.common102},patternProperties:Dt.common126,type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIBERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common119,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[Dt.common127],default:{"links.follows.@userId":Dt.common90,"links.follows.@{userId}.isInviting":Dt.common102,"links.follows.@{userId}.toBeValidated":Dt.common102},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":Dt.common103,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":Dt.common103},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common119},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,allOf:[Dt.common53,{if:{properties:{type:Dt.common36}},then:Dt.common130},{if:{properties:{type:Dt.common35}},then:Dt.common130}],properties:{id:Dt.common97,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common119,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[Dt.common127],default:{"links.follows.@{pathParams.id}":Dt.common90},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common119},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_CONTRIBUTORS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common106,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":Dt.common91,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":Dt.common108,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":Dt.common110,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":Dt.common103},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common106},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_CONTRIBUTORS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/projects/id/{id}/canSee/true",pathParams:Dt.common113,request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common106,fediverse:Dt.common83,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.projects.@{pathParams.id}":Dt.common90,"links.projects.@{pathParams.id}.isInviting":Dt.common102,"links.projects.@{pathParams.id}.toBeValidated":Dt.common102},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":Dt.common91,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":Dt.common91,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":Dt.common108,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":Dt.common110,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":Dt.common108},type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common106},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common133,fediverse:Dt.common83,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common91},type:"object"},isParcours:Dt.common3,"preferences.private":Dt.common83},required:["preferences.private"],type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,searchType:Dt.common133},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES_FILTERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:Dt.common41,countType:Dt.common135,fediverse:Dt.common83,fields:Dt.common133,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common137}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":Dt.common137,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":Dt.common140,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":Dt.common140}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:Dt.common143},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:Dt.common143,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":Dt.common139}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":Dt.common137}}],type:"object"},indexMin:Dt.common87,indexStep:Dt.common94,initType:Dt.common84,locality:Dt.common84,name:Dt.common1,notSourceKey:Dt.common41,ranges:{additionalProperties:!1,default:{Cooperative:Dt.common144,GovernmentOrganization:Dt.common144,Group:Dt.common144,LocalBusiness:Dt.common144,NGO:Dt.common144,citoyens:Dt.common144,projects:Dt.common144},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":Dt.common85},type:"object"},searchType:Dt.common135},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"CONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/connect",request:Dt.common145},{auth:"bearer",constant:"DISCONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/disconnect",request:Dt.common145}];class qt extends Error{constructor(e,t,r){super(e),this.name="ApiClientError",this.status=t,this.details=r}}class Mt extends Error{constructor(e){super(e),this.name="CircuitBreakerError"}}At.addType("oid",(e=>new zt.ObjectID(e)));class Ut extends t.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=Lt,timeout:a=3e4,debug:c=!1,maxRetries:l=0,circuitBreakerThreshold:u=5,circuitBreakerResetTime:d=6e4,fromJSONValue:m=!0}={}){if(super(),!e)throw new qt('Le paramètre "baseURL" est obligatoire.',500);this._baseURL=e,this._refreshToken=r,this._refreshUrl=o,this._endpoints=i,this._debug=c;let p=null;this._fromJSONValue=m,Object.defineProperty(this,"userId",{get:()=>p,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{p=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new n({strict:!1,useDefaults:!0}),s(this._ajv),this._logger=It({transport:{target:"pino-pretty",options:{colorize:!0}},level:c?"debug":"info"}),this._client=vt.create({baseURL:e,timeout:a}),l>0&&(xt(this._client,{retries:l,retryDelay:xt.exponentialDelay,retryCondition:e=>xt.isNetworkError(e)||xt.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${l} max`)),this._breakerThreshold=u,this._breakerResetTime=d,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,t&&this.setToken(t),this._client.interceptors.response.use((e=>e),(async e=>{if(e.response&&401===e.response.status&&this._refreshToken)try{if(await this._refreshAccessToken())return this._client.request(e.config)}catch(e){throw new qt(e.message,401,e)}throw e}))}setToken(e){this._accessToken=e,this._client.defaults.headers.common.Authorization="Bearer "+e;const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait et défini : ${t}`)),this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){this._refreshToken=e;const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait depuis refreshToken : ${t}`)),this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}_getIdFromToken(e){if(!e)return null;try{const t=function(e,t){if("string"!=typeof e)throw new Rt("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,o=e.split(".")[r];if("string"!=typeof o)throw new Rt(`Invalid token specified: missing part #${r+1}`);let n;try{n=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return atob(t)}}(o)}catch(e){throw new Rt(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new Rt(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}(e);return this._logger.log("[ApiClient] Payload décodé :",t),t.id||t.userId||null}catch(e){return this._logger.error("[ApiClient] Erreur lors du décodage du token :",e.message),null}}async _refreshAccessToken(){if(!this._refreshToken)return!1;try{const e=await this._client.post(this._refreshUrl,{refreshToken:this._refreshToken},{headers:{"Content-Type":"application/json"}});return!(!e.data||!e.data.accessToken||(this.setToken(e.data.accessToken),e.data.refreshToken&&this.setRefreshToken(e.data.refreshToken),this.emit("refreshSuccess",e.data),0))}catch(e){return this._logger.error(`[ApiClient] Refresh Error : ${e.message}`),!1}}_checkCircuitBreaker(){return!this._breakerOpen||Date.now()-this._lastBreakerOpenTime>this._breakerResetTime&&(this._breakerOpen=!1,this._breakerErrorCount=0,this._logger.warn("[ApiClient] Circuit breaker réinitialisé"),!0)}_updateCircuitBreakerError(){this._breakerErrorCount+=1,this._logger.warn(`[ApiClient] Erreur #${this._breakerErrorCount} sur ${this._breakerThreshold}`),this._breakerErrorCount>=this._breakerThreshold&&(this._breakerOpen=!0,this._lastBreakerOpenTime=Date.now(),this._logger.error("[ApiClient] Circuit breaker ACTIVÉ - L'API est considérée indisponible"))}_resetCircuitBreakerSuccess(){this._breakerErrorCount=0,this._breakerOpen&&(this._breakerOpen=!1,this._logger.warn("[ApiClient] Circuit breaker refermé suite à un succès"))}static stripNullsInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)null===e[t]||void 0===e[t]?e.splice(t,1):"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||void 0===e[t]?delete e[t]:"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e,t={}){const r={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL,pathParams:e=>{const r=this._getValueByPath(t,e);return null!=r?r:void 0}},o=/@(?:\{([^}]+)\}|([\w.]+))/g,n=e=>"string"!=typeof e?e:e.replace(o,((t,o,n)=>{if(o){if(o.startsWith("pathParams.")){const e=o.substring(11),t=r.pathParams(e);return null!=t?t:`@{${o}}`}{const e=r[o];if("function"==typeof e){const t=e();return null!=t?t:`@{${o}}`}return`@{${o}}`}}if(n){if(n.startsWith("pathParams.")){const e=n.match(/^pathParams\.([^.]+)(.*)$/);if(e){const t=e[1],o=e[2],s=r.pathParams(t);return null!=s?s+o:`@${n}`}return`@${n}`}{const e=r[n];if("function"==typeof e){const t=e();return null!=t?t:`@${n}`}return`@${n}`}}return e})),s=e=>{if((e=>e&&"object"==typeof e&&("function"==typeof e.pipe||"undefined"!=typeof Buffer&&e instanceof Buffer))(e))return e;if(Array.isArray(e))return e.map(s);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[r,o]of Object.entries(e))t[n(r)]=s(o);return t}return"string"==typeof e?n(e):e};return s(e)}_cleanSchemaLeftoverAlias(e){const t=/@\w+/;if(Array.isArray(e))return e.map((e=>this._cleanSchemaLeftoverAlias(e)));if(e&&"object"==typeof e){const r={};for(const o of Object.keys(e)){const n=e[o];if(!t.test(o)){if("default"===o){if("string"==typeof n&&t.test(n))continue;if(n&&"object"==typeof n){const e=this._cleanSchemaLeftoverAlias(n);Object.keys(e).length>0&&(r[o]=e);continue}}"string"==typeof n&&t.test(n)||(r[o]=this._cleanSchemaLeftoverAlias(n))}}return r}return e}async callEndpoint(e,t={},r=!0,o=!0){if(!this._checkCircuitBreaker())throw new Mt("Le circuit breaker est activé, impossible d'appeler l'API");const n=this._endpoints.find((t=>t.constant===e));if(!n)throw new qt(`Endpoint introuvable : ${e}`,404);const{path:s,method:i,contentType:a,auth:c,pathParams:l,request:u,responses:d}=n,m=(i||"GET").toLowerCase(),p=a||"application/json",f={"Content-Type":p};if(this._accessToken)"bearer"===c?f.Authorization=`Bearer ${this._accessToken}`:c&&"none"!==c||f.Authorization||(f.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===c)throw new qt(`Token requis pour l'endpoint sécurisé : ${e}`,401);let h,y=s,g={};if(l){let e=l;"none"===c&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(l));const r=t.pathParams||{},o=this._ajv.compile(e);if(!o(r))throw this.emit("validationError",{stage:"pathParams",errors:o.errors}),new qt("Path parameter validation failed.",400,o.errors);g=this._resolveSpecialValuesInPlace(r),y=y.replace(/\{(\w+)\}/g,((e,t)=>{const r=g[t];if(void 0!==r)return encodeURIComponent(r);throw new qt(`Path param manquant ou non résolu : {${t}}`,400)}))}if(u){let e=u;"none"===c&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(u));const r={...t};delete r.pathParams;const o=Ut.stripNullsInPlace(r),n=this._ajv.compile(e);if(!n(o))throw this.emit("validationError",{stage:"request",errors:n.errors}),new qt("Request validation failed.",400,n.errors);t=this._resolveSpecialValuesInPlace(o,g)}"application/json"===p||"multipart/form-data"===p?h=t:"application/x-www-form-urlencoded"===p&&(h=Ut.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${y}, method=${m}`);try{const e=await this._client.request({url:y,method:m,headers:f,["get"===m?"params":"data"]:h});if(o){const t=e.status.toString(),r=d?.[t];if(r){const o=this._ajv.compile(r);if(!o(e.data))throw this.emit("validationError",{stage:"response",errors:o.errors}),new qt("Response validation failed.",t,o.errors)}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(n.postActions)&&n.postActions.forEach((t=>{const r=t.path?this._getValueByPath(e.data,t.path):null;switch(t.type){case"setToken":this.setToken(r);break;case"setRefreshToken":this.setRefreshToken(r);break;case"resetSession":this.resetSession();break;case"emitEvent":t.event&&(this.emit(t.event,r),this._logger.debug(`[ApiClient] Event émis : ${t.event}`,r));break;case"callMethod":"function"==typeof this[t.method]?(this[t.method](),this._logger.debug(`[ApiClient] Méthode appelée : ${t.method}`)):this._logger.warn(`[ApiClient] Méthode inconnue : ${t.method}`);break;default:this._logger.warn(`[ApiClient] Action inconnue : ${t.type}`)}})),e}catch(e){throw this._updateCircuitBreakerError(),e}}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),delete this._client.defaults.headers.common.Authorization,this._logger.info("[ApiClient] Session utilisateur réinitialisée."),this.emit("sessionReset")}_getValueByPath(e,t){if(t)return t.split(".").reduce(((e,t)=>e&&e[t]),e)}static toURLSearchParams(e,t={}){return this._buildParams(e,new URLSearchParams,t)}static _buildParams(e,t,r={}){if("object"!=typeof e||null===e)throw new TypeError("La donnée doit être un objet non nul.");const{dots:o=!1,indexes:n=!1,metaTokens:s=!0}=r,i=[];function a(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function c(e){return e.endsWith("[]")?e.slice(0,-2):e}function l(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function u(e){return null==e?"":e instanceof Date?e.toISOString():(e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||ArrayBuffer.isView(e),e)}return function e(r,d=[]){null==r||i.includes(r)||(i.push(r),Object.entries(r).forEach((([r,i])=>{void 0!==i&&function(e,r,i){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=s?r:r.slice(0,-2),t.append(l(i,r,o),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,s)=>{if(null!=e){const a=n?l(i.concat(r),s,o):`${l(i,r,o)}[]`;t.append(a,u(e))}})),!1}return!!a(e)||(t.append(l(i,r,o),u(e)),!1)}(i,r.trim(),d)&&e(i,d.concat(c(r)))})),i.pop())}(e),t}_transformData(e){if(e&&"object"==typeof e)if(e.resultGoods?.msg)e=this._normalizeJsonData({msg:e.resultGoods.msg,...e});else if(e.resultErrors?.msg)e=this._normalizeJsonData({msg:e.resultErrors.msg,...e});else if(e.results&&"object"==typeof e.results&&!Array.isArray(e.results))e.results=Object.keys(e.results).map((t=>this._normalizeJsonData({id:t,...e.results[t]})));else if(Array.isArray(e.results))e.results=e.results.map((e=>this._normalizeJsonData(e)));else if(e.news&&Array.isArray(e.news)&&0===e.news.length)e=e.news;else if(e.news&&"object"==typeof e.news&&!Array.isArray(e.news))e=Object.keys(e.news).map((t=>this._normalizeJsonData({id:t,...e.news[t]})));else if(e.notif&&"object"==typeof e.notif&&!Array.isArray(e.notif))e.notif=Object.keys(e.notif).map((t=>this._normalizeJsonData({id:t,...e.notif[t]})));else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens)&&e.organizations&&"object"==typeof e.organizations&&!Array.isArray(e.organizations))e=[...Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]}))),...Object.keys(e.organizations).map((t=>this._normalizeJsonData({id:t,...e.organizations[t]})))];else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens))e=Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]})));else if(e.cities&&"object"==typeof e.cities&&!Array.isArray(e.cities))e=Object.keys(e.cities).map((t=>this._normalizeJsonData({id:t,...e.cities[t]})));else if(e.cities&&Array.isArray(e.cities)&&0===e.cities.length)e=e.cities;else if(e.newComment&&"object"==typeof e.newComment)e.newComment=this._normalizeJsonData({...e.newComment});else if(Array.isArray(e))e=e.map((e=>this._normalizeJsonData(e)));else if(e.map&&"object"==typeof e.map)e.map=this._normalizeJsonData(e.map);else if(e.object&&"object"==typeof e.object)e.object=this._normalizeJsonData(e.object);else if("object"==typeof e&&Object.keys(e).length>0){const t=Object.keys(e).every((e=>/^[0-9a-fA-F]{24}$/.test(e)));e=t?Object.keys(e).map((t=>({id:t,...this._normalizeJsonData(e[t])}))):this._normalizeJsonData(e)}return e}_normalizeJsonData(e){if(!e||"object"!=typeof e)return e;if(e=this._normalizeRecursively(e),e?.mediaImg?.images&&Array.isArray(e.mediaImg.images)&&e.mediaImg.images.length>0&&(e.mediaImg.countImages=e.mediaImg.images.length),e?.mediaFile?.files&&Array.isArray(e.mediaFile.files)&&e.mediaFile.files.length>0&&(e.mediaFile.countFiles=e.mediaFile.files.length),e?.src?.changes&&"object"==typeof e.src.changes&&Object.keys(e.src.changes).length>0&&Object.keys(e.src.changes).forEach((t=>{e.src.changes[t]&&(e.src.changes[t]=this._ensureFullURL(e.src.changes[t]))})),e?.openingHours&&Array.isArray(e.openingHours)&&e.openingHours.length>0&&(e.openingHours=e.openingHours.filter((e=>e.dayOfWeek&&e.hours&&e.hours[0]&&e.hours[0].opens))),e.replies&&"object"==typeof e.replies&&Object.keys(e.replies).length>0&&(e.replies=Object.keys(e.replies).map((t=>this._normalizeJsonData({id:t,...e.replies[t]})))),e?.author&&"object"==typeof e.author&&Object.keys(e.author).length>0&&!("profilThumbImageUrl"in e.author)){const t=Object.keys(e.author)[0];e.author={...e.author[t]}}return e?.timeAgo&&delete e.timeAgo,this._fromJSONValue?At.fromJSONValue(e):e}_ensureFullURL(e){if(!e)return e;if(!(e=e.trim())||/^https?:\/\//i.test(e))return e;let t="/";return t=this._baseURL.endsWith("/")&&e.startsWith("/")||this._baseURL.endsWith("/")||e.startsWith("/")?"":"/",`${this._baseURL}${t}${e}`}_normalizeString(e){return"true"===e||"false"!==e&&e}_normalizeId(e){return e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),e}_normalizeDate(e){return e&&"object"==typeof e&&"number"==typeof e.sec?{$date:1e3*e.sec}:"number"==typeof e?{$date:1e3*e}:e}_normalizeImage(e){return"string"==typeof e&&""!==e.trim()?this._ensureFullURL(e):e}_imageFields=["profilImageUrl","profilThumbImageUrl","profilMediumImageUrl","profilMarkerImageUrl","profilBannerUrl","profilRealBannerUrl","imagePath","imageThumbPath","docPath"];_dateFields=["modified","created","updated","birthDate","lastLoginDate","startDate","endDate","date"];_normalizeRecursively(e){if("string"==typeof e)return this._normalizeString(e);if(Array.isArray(e))return e.map((e=>this._normalizeRecursively(e)));if(null!==e&&"object"==typeof e){const t={};return Object.keys(e).forEach((r=>{let o=this._normalizeRecursively(e[r]);this._dateFields.includes(r)&&(o=this._normalizeDate(o)),this._imageFields.includes(r)&&(o=this._normalizeImage(o)),"content"===r&&o&&"object"==typeof o&&o.image&&(o.image=this._normalizeImage(o.image)),t[r]=o})),this._normalizeId(t)}return e}}})(),o.default})()));
|