@communecter/cocolight-api-client 1.0.20 → 1.0.21
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.
- package/dist/cocolight-api-client.browser.js +2 -2
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/package.json +2 -1
- package/src/api/BaseEntity.js +1412 -35
- package/src/api/EndpointApi.js +443 -924
- package/src/api/EndpointApi.types.d.ts +3463 -0
- package/src/api/Organization.js +77 -0
- package/src/api/User.js +22 -45
- package/src/mixin/DraftStateMixin.js +0 -176
- package/src/mixin/EntityMixin.js +0 -428
- package/src/mixin/MutualEntityMixin.js +0 -269
- package/src/mixin/UtilMixin.js +0 -300
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
!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 __webpack_modules__={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2586),o=r(5765),i=r(4227),s=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&&s.default.code(new n.KeywordCxt(l,s.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),l.props));const d=u.filter((e=>!(0,i.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const p=t.name("valid");for(const r of d)m(r)?f(r):(t.if((0,o.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function m(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};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 n=r(396),o=r(7887),i=r(8708),s=r(9029),a=r(4227);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.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:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(l){const o=p(t,n,i.strictNumbers,c.Wrong);r.if(o,(()=>{a.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,a=n.let("dataType",s._`typeof ${o}`),c=n.let("coerced",s._`undefined`);"array"===i.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(p(t,o,i.strictNumbers),(()=>n.assign(c,o))))),n.if(s._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===i.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(c,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(c,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${o} === null
|
|
3
3
|
|| (${a} == "string" && ${o} && ${o} == +${o})`).assign(c,s._`+${o}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${o} === null
|
|
4
4
|
|| (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,s._`+${o}`);case"boolean":return void n.elseIf(s._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf(s._`${o} === "true" || ${o} === 1`).assign(c,!0);case"null":return n.elseIf(s._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(c,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number"
|
|
5
|
-
|| ${a} === "boolean" || ${o} === null`).assign(c,s._`[${o}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(o,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const o=n===c.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===c.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const e in i)o=(0,s.and)(o,d(e,t,r,n));return o}t.checkDataType=d,t.checkDataTypes=p;const m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,m)}t.reportTypeError=f},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,l=c>>1,u=-7,d=r?o-1:0,p=r?-1:1,m=e[t+d];for(d+=p,i=m&(1<<-u)-1,m>>=-u,u+=a;u>0;i=256*i+e[t+d],d+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=p,u-=8);if(0===i)i=1-l;else{if(i===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),i-=l}return(m?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,l=8*i-o-1,u=(1<<l)-1,d=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,f=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+m]=255&a,m+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+m]=255&s,m+=f,s/=256,l-=8);e[r+m-f]|=128*h}},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 o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(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 s={scheme:"http",domainHost:!0,parse:o,serialize:i},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:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},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 o=`${r}:${t.nid||e.nid}`,i=c[o];e.path=void 0,i&&(e=i.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(),o=`${r}:${t.nid||n}`,i=c[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},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},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromStream=t.fromBuffer=t.EndOfStreamError=t.fromFile=void 0;const n=r(1343),o=r(6452);var i=r(1456);Object.defineProperty(t,"fromFile",{enumerable:!0,get:function(){return i.fromFile}});var s=r(6452);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return s.EndOfStreamError}}),Object.defineProperty(t,"fromBuffer",{enumerable:!0,get:function(){return s.fromBuffer}}),t.fromStream=async function(e,t){if(t=t||{},e.path){const r=await n.stat(e.path);t.path=e.path,t.size=r.size}return o.fromStream(e,t)}},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),o=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?o._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${l}.test(${t})`)}};t.default=i},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(9029),o=r(4227),i=r(5765),s={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,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:i}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=o.mergeEvaluated.items(i,r.length,l.items));const u=i.name("valid"),d=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(l,t)||(i.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=s},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),o=r(9029),i=r(4227),s=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{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 p=t.let("valid"),m=l.items?(0,n.getSchemaTypes)(l.items):[];function f(i,s){const a=t.name("item"),c=(0,n.checkDataTypes)(m,a,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(c,o._`continue`),m.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,o._`${l}[${a}]`),e.error(),t.assign(p,!1).break()})).code(o._`${l}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(l)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?f:h)(n,i)))}),o._`${u} === false`),e.ok(p)}};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 o=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var s=new Array(i);s[0]=o(e);for(var a=1;a<i;a++)s[a]=o(r[a]);return s.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",u=0,d=-1,p=e&&e.length||0,m=0;m<p;){if(37===e.charCodeAt(m)&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;d<m&&(l+=e.slice(d,m)),l+=Number(r[u]),d=m+2,m++;break;case 105:if(u>=c)break;if(null==r[u])break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(r[u])),d=m+2,m++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===r[u])break;d<m&&(l+=e.slice(d,m));var f=typeof r[u];if("string"===f){l+="'"+r[u]+"'",d=m+2,m++;break}if("function"===f){l+=r[u].name||"<anonymous>",d=m+2,m++;break}l+=o(r[u]),d=m+2,m++;break;case 115:if(u>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(r[u]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,u--}++u}++m}return-1===d?e:(d<p&&(l+=e.slice(d)),l)}},1027:(e,t,r)=>{"use strict";r.d(t,{GN:()=>o,Ge:()=>i,u3:()=>n});class n{getAccessToken(){throw new Error("getAccessToken() doit être implémenté")}setAccessToken(e){throw new Error("setAccessToken() doit être implémenté")}getRefreshToken(){throw new Error("getRefreshToken() doit être implémenté")}setRefreshToken(e){throw new Error("setRefreshToken() doit être implémenté")}clear(){throw new Error("clear() doit être implémenté")}}class o extends n{constructor(){super(),this._accessToken=null,this._refreshToken=null}getAccessToken(){return this._accessToken}setAccessToken(e){this._accessToken=e}getRefreshToken(){return this._refreshToken}setRefreshToken(e){this._refreshToken=e}clear(){this._accessToken=null,this._refreshToken=null}}class i extends n{constructor(e="cocolight"){super(),this.prefix=e}getAccessToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_accessToken`):null}setAccessToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_accessToken`,e)}getRefreshToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_refreshToken`):null}setRefreshToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_refreshToken`,e)}clear(){"undefined"!=typeof localStorage&&(localStorage.removeItem(`${this.prefix}_accessToken`),localStorage.removeItem(`${this.prefix}_refreshToken`))}}},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),o={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:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),c=s(i,"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,n.not)(u),d("else"));function d(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(i,l),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},1343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readFile=t.writeFileSync=t.writeFile=t.read=t.open=t.close=t.stat=t.createReadStream=t.pathExists=void 0;const n=r(4428);t.pathExists=n.existsSync,t.createReadStream=n.createReadStream,t.stat=async function(e){return new Promise(((t,r)=>{n.stat(e,((e,n)=>{e?r(e):t(n)}))}))},t.close=async function(e){return new Promise(((t,r)=>{n.close(e,(e=>{e?r(e):t()}))}))},t.open=async function(e,t){return new Promise(((r,o)=>{n.open(e,t,((e,t)=>{e?o(e):r(t)}))}))},t.read=async function(e,t,r,o,i){return new Promise(((s,a)=>{n.read(e,t,r,o,i,((e,t,r)=>{e?a(e):s({bytesRead:t,buffer:r})}))}))},t.writeFile=async function(e,t){return new Promise(((r,o)=>{n.writeFile(e,t,(e=>{e?o(e):r()}))}))},t.writeFileSync=function(e,t){n.writeFileSync(e,t)},t.readFile=async function(e){return new Promise(((t,r)=>{n.readFile(e,((e,n)=>{e?r(e):t(n)}))}))}},1456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromFile=t.FileTokenizer=void 0;const n=r(8632),o=r(8705),i=r(1343);class s extends n.AbstractTokenizer{constructor(e,t){super(t),this.fd=e}async readBuffer(e,t){const r=this.normalizeOptions(e,t);this.position=r.position;const n=await i.read(this.fd,e,r.offset,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new o.EndOfStreamError;return n.bytesRead}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=await i.read(this.fd,e,r.offset,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new o.EndOfStreamError;return n.bytesRead}async close(){return i.close(this.fd)}}t.FileTokenizer=s,t.fromFile=async function(e){const t=await i.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await i.open(e,"r");return new s(r,{path:e,size:t.size})}},1510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;const n=r(5523),o=r(8122);var i=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.StreamReader=class{constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",(()=>this.reject(new n.EndOfStreamError))),this.s.once("error",(e=>this.reject(e))),this.s.once("close",(()=>this.reject(new Error("Stream closed"))))}async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,t,r){if(0===r)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new n.EndOfStreamError;let o=r,i=0;for(;this.peekQueue.length>0&&o>0;){const r=this.peekQueue.pop();if(!r)throw new Error("peekData should be defined");const n=Math.min(r.length,o);e.set(r.subarray(0,n),t+i),i+=n,o-=n,n<r.length&&this.peekQueue.push(r.subarray(n))}for(;o>0&&!this.endOfStream;){const r=Math.min(o,1048576),n=await this.readFromStream(e,t+i,r);if(i+=n,n<r)break;o-=n}return i}async readFromStream(e,t,r){const n=this.s.read(r);if(n)return e.set(n,t),n.length;{const n={buffer:e,offset:t,length:r,deferred:new o.Deferred};return this.deferred=n.deferred,this.s.once("readable",(()=>{this.readDeferred(n)})),n.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}}},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 o 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 i(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)c(r,t[n]),r.push(e[++n]);return new o(r)}t._Code=o,t.nil=new o(""),t._=i;const s=new o("+");function a(e,...t){const r=[u(e[0])];let n=0;for(;n<t.length;)r.push(s),c(r,t[n]),r.push(s,u(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){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 o(r)}function c(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?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 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 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 o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},1664:e=>{"use strict";e.exports={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]}},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,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))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),o={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=o},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),o=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8727),o=r(208),i=r(7887),s=r(208),a=r(7870),c=r(3673),l=r(4495),u=r(9029),d=r(2023),p=r(6939),m=r(4227),f=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${y(r,o)}`),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,o),e.code(i)})):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}}={}`}(o)}`,n.$async,(()=>e.code(y(r,o)).code(i)))}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 _(e){return"boolean"!=typeof e.schema}function w(e){(0,m.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${d.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:c,allErrors:l,opts:p,self:f}=e,{RULES:h}=f;function y(m){(0,i.shouldUseGroup)(a,m)&&(m.type?(o.if((0,s.checkDataType)(m.type,c,p.strictNumbers)),T(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):T(e,m),l||o.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(a,h)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{S(e.dataTypes,t)||$(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)S(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"))&&$(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 o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&$(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):o.block((()=>P(e,"$ref",h.all.$ref.definition)))}function T(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){_(e)&&(w(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&v(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,m.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.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),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${o}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{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,m.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",A(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:n,schemaType:o,def:i}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.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:n,it:o}=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,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.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 o={...this.it,...r,items:void 0,props:void 0};return function(e,t){_(e)&&(w(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&v(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.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 i=n.const("_errs",d.default.errors);b(e,i),n.var(t,u._`${i} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=m.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=m.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,u.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,c.funcKeywordCode)(o,r):"macro"in r?(0,c.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(o,r)}t.KeywordCxt=O;const k=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return d.default.rootData;if("/"===e[0]){if(!k.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=d.default.rootData}else{const s=x.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const e of a)e&&(i=u._`${i}${(0,u.getProperty)((0,m.unescapeJsonPointer)(e))}`,s=u._`${s} && ${i}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,data:s,it:a}=e;let c,l;const{minContains:u,maxContains:d}=i;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${p} <= ${l}`),void e.pass(t)}a.items=!0;const m=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(m,!1).break())),1===c?t.assign(m,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0))))}(r)))))}function h(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?h(m,(()=>t.if(m,(()=>t.break())))):0===c?(t.let(m,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(m,!1),f()),e.result(m,(()=>e.reset()))}};t.default=i},2808:e=>{for(var t=Math.floor(16777215*Math.random()),r=u.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,o=(()=>{try{return _Buffer}catch(e){try{return Buffer}catch(e){return null}}})(),i=function(e){return!(null==e||!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))},s=[],a=0;a<256;a++)s[a]=(a<=15?"0":"")+a.toString(16);var c=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(a=0;a<10;)l[48+a]=a++;for(;a<16;)l[55+a]=l[87+a]=a++;function u(e){if(!(this instanceof u))return new u(e);if(e&&(e instanceof u||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null!=e&&"number"!=typeof e){var t=u.isValid(e);if(!t&&null!=e)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(t&&"string"==typeof e&&24===e.length)return u.createFromHexString(e);if(null==e||12!==e.length){if(null!=e&&"function"==typeof e.toHexString)return e;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=e}else this.id=this.generate(e)}e.exports=u,u.default=u,u.createFromTime=function(e){return new u((8===(t=(t=e=parseInt(e,10)%4294967295).toString(16)).length?t:"00000000".substring(t.length,8)+t)+"0000000000000000");var t},u.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",r=0;r<24;)t+=String.fromCharCode(l[e.charCodeAt(r++)]<<4|l[e.charCodeAt(r++)]);return new u(t)},u.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&c.test(e):e instanceof u||(i(e)?u.isValid(e.toString("hex")):!("function"!=typeof e.toHexString||!o||!(e.id instanceof o||"string"==typeof e.id))&&(12===e.id.length||24===e.id.length&&c.test(e.id)))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof u?this.toString()===e.toString():"string"==typeof e&&u.isValid(e)&&12===e.length&&i(this.id)?e===this.id.toString("binary"):"string"==typeof e&&u.isValid(e)&&24===e.length?e.toLowerCase()===this.toHexString():"string"==typeof e&&u.isValid(e)&&12===e.length?e===this.id:!(null==e||!(e instanceof u||e.toHexString))&&e.toHexString()===this.toHexString()},getTimestamp:function(){var e,t=new Date;return e=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var o=r=(r+1)%16777215;return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,t>>16&255,t>>8&255,255&t,n>>8&255,255&n,o>>16&255,o>>8&255,255&o)}};var d=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[d]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),o=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
|
|
5
|
+
|| ${a} === "boolean" || ${o} === null`).assign(c,s._`[${o}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(o,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const o=n===c.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===c.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const e in i)o=(0,s.and)(o,d(e,t,r,n));return o}t.checkDataType=d,t.checkDataTypes=p;const m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,m)}t.reportTypeError=f},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,l=c>>1,u=-7,d=r?o-1:0,p=r?-1:1,m=e[t+d];for(d+=p,i=m&(1<<-u)-1,m>>=-u,u+=a;u>0;i=256*i+e[t+d],d+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=p,u-=8);if(0===i)i=1-l;else{if(i===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),i-=l}return(m?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,l=8*i-o-1,u=(1<<l)-1,d=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,f=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+m]=255&a,m+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+m]=255&s,m+=f,s/=256,l-=8);e[r+m-f]|=128*h}},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 o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(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 s={scheme:"http",domainHost:!0,parse:o,serialize:i},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:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},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 o=`${r}:${t.nid||e.nid}`,i=c[o];e.path=void 0,i&&(e=i.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(),o=`${r}:${t.nid||n}`,i=c[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},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},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromStream=t.fromBuffer=t.EndOfStreamError=t.fromFile=void 0;const n=r(1343),o=r(6452);var i=r(1456);Object.defineProperty(t,"fromFile",{enumerable:!0,get:function(){return i.fromFile}});var s=r(6452);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return s.EndOfStreamError}}),Object.defineProperty(t,"fromBuffer",{enumerable:!0,get:function(){return s.fromBuffer}}),t.fromStream=async function(e,t){if(t=t||{},e.path){const r=await n.stat(e.path);t.path=e.path,t.size=r.size}return o.fromStream(e,t)}},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),o=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?o._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${l}.test(${t})`)}};t.default=i},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(9029),o=r(4227),i=r(5765),s={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,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:i}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=o.mergeEvaluated.items(i,r.length,l.items));const u=i.name("valid"),d=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(l,t)||(i.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=s},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),o=r(9029),i=r(4227),s=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{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 p=t.let("valid"),m=l.items?(0,n.getSchemaTypes)(l.items):[];function f(i,s){const a=t.name("item"),c=(0,n.checkDataTypes)(m,a,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(c,o._`continue`),m.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,o._`${l}[${a}]`),e.error(),t.assign(p,!1).break()})).code(o._`${l}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(l)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?f:h)(n,i)))}),o._`${u} === false`),e.ok(p)}};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 o=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var s=new Array(i);s[0]=o(e);for(var a=1;a<i;a++)s[a]=o(r[a]);return s.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",u=0,d=-1,p=e&&e.length||0,m=0;m<p;){if(37===e.charCodeAt(m)&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;d<m&&(l+=e.slice(d,m)),l+=Number(r[u]),d=m+2,m++;break;case 105:if(u>=c)break;if(null==r[u])break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(r[u])),d=m+2,m++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===r[u])break;d<m&&(l+=e.slice(d,m));var f=typeof r[u];if("string"===f){l+="'"+r[u]+"'",d=m+2,m++;break}if("function"===f){l+=r[u].name||"<anonymous>",d=m+2,m++;break}l+=o(r[u]),d=m+2,m++;break;case 115:if(u>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(r[u]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,u--}++u}++m}return-1===d?e:(d<p&&(l+=e.slice(d)),l)}},1027:(e,t,r)=>{"use strict";r.d(t,{GN:()=>o,Ge:()=>i,u3:()=>n});class n{getAccessToken(){throw new Error("getAccessToken() doit être implémenté")}setAccessToken(e){throw new Error("setAccessToken() doit être implémenté")}getRefreshToken(){throw new Error("getRefreshToken() doit être implémenté")}setRefreshToken(e){throw new Error("setRefreshToken() doit être implémenté")}clear(){throw new Error("clear() doit être implémenté")}}class o extends n{constructor(){super(),this._accessToken=null,this._refreshToken=null}getAccessToken(){return this._accessToken}setAccessToken(e){this._accessToken=e}getRefreshToken(){return this._refreshToken}setRefreshToken(e){this._refreshToken=e}clear(){this._accessToken=null,this._refreshToken=null}}class i extends n{constructor(e="cocolight"){super(),this.prefix=e}getAccessToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_accessToken`):null}setAccessToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_accessToken`,e)}getRefreshToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_refreshToken`):null}setRefreshToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_refreshToken`,e)}clear(){"undefined"!=typeof localStorage&&(localStorage.removeItem(`${this.prefix}_accessToken`),localStorage.removeItem(`${this.prefix}_refreshToken`))}}},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),o={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:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),c=s(i,"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,n.not)(u),d("else"));function d(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(i,l),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},1343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readFile=t.writeFileSync=t.writeFile=t.read=t.open=t.close=t.stat=t.createReadStream=t.pathExists=void 0;const n=r(4428);t.pathExists=n.existsSync,t.createReadStream=n.createReadStream,t.stat=async function(e){return new Promise(((t,r)=>{n.stat(e,((e,n)=>{e?r(e):t(n)}))}))},t.close=async function(e){return new Promise(((t,r)=>{n.close(e,(e=>{e?r(e):t()}))}))},t.open=async function(e,t){return new Promise(((r,o)=>{n.open(e,t,((e,t)=>{e?o(e):r(t)}))}))},t.read=async function(e,t,r,o,i){return new Promise(((s,a)=>{n.read(e,t,r,o,i,((e,t,r)=>{e?a(e):s({bytesRead:t,buffer:r})}))}))},t.writeFile=async function(e,t){return new Promise(((r,o)=>{n.writeFile(e,t,(e=>{e?o(e):r()}))}))},t.writeFileSync=function(e,t){n.writeFileSync(e,t)},t.readFile=async function(e){return new Promise(((t,r)=>{n.readFile(e,((e,n)=>{e?r(e):t(n)}))}))}},1456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromFile=t.FileTokenizer=void 0;const n=r(8632),o=r(8705),i=r(1343);class s extends n.AbstractTokenizer{constructor(e,t){super(t),this.fd=e}async readBuffer(e,t){const r=this.normalizeOptions(e,t);this.position=r.position;const n=await i.read(this.fd,e,r.offset,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new o.EndOfStreamError;return n.bytesRead}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=await i.read(this.fd,e,r.offset,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new o.EndOfStreamError;return n.bytesRead}async close(){return i.close(this.fd)}}t.FileTokenizer=s,t.fromFile=async function(e){const t=await i.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await i.open(e,"r");return new s(r,{path:e,size:t.size})}},1510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;const n=r(5523),o=r(8122);var i=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.StreamReader=class{constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",(()=>this.reject(new n.EndOfStreamError))),this.s.once("error",(e=>this.reject(e))),this.s.once("close",(()=>this.reject(new Error("Stream closed"))))}async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,t,r){if(0===r)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new n.EndOfStreamError;let o=r,i=0;for(;this.peekQueue.length>0&&o>0;){const r=this.peekQueue.pop();if(!r)throw new Error("peekData should be defined");const n=Math.min(r.length,o);e.set(r.subarray(0,n),t+i),i+=n,o-=n,n<r.length&&this.peekQueue.push(r.subarray(n))}for(;o>0&&!this.endOfStream;){const r=Math.min(o,1048576),n=await this.readFromStream(e,t+i,r);if(i+=n,n<r)break;o-=n}return i}async readFromStream(e,t,r){const n=this.s.read(r);if(n)return e.set(n,t),n.length;{const n={buffer:e,offset:t,length:r,deferred:new o.Deferred};return this.deferred=n.deferred,this.s.once("readable",(()=>{this.readDeferred(n)})),n.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}}},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 o 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 i(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)c(r,t[n]),r.push(e[++n]);return new o(r)}t._Code=o,t.nil=new o(""),t._=i;const s=new o("+");function a(e,...t){const r=[u(e[0])];let n=0;for(;n<t.length;)r.push(s),c(r,t[n]),r.push(s,u(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){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 o(r)}function c(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?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 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 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 o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},1664:e=>{"use strict";e.exports={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]}},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,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))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),o={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=o},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),o=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8727),o=r(208),i=r(7887),s=r(208),a=r(7870),c=r(3673),l=r(4495),u=r(9029),d=r(2023),p=r(6939),m=r(4227),f=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${y(r,o)}`),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,o),e.code(i)})):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}}={}`}(o)}`,n.$async,(()=>e.code(y(r,o)).code(i)))}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 w(e){return"boolean"!=typeof e.schema}function _(e){(0,m.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${d.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:c,allErrors:l,opts:p,self:f}=e,{RULES:h}=f;function y(m){(0,i.shouldUseGroup)(a,m)&&(m.type?(o.if((0,s.checkDataType)(m.type,c,p.strictNumbers)),T(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):T(e,m),l||o.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(a,h)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{S(e.dataTypes,t)||$(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)S(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"))&&$(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 o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&$(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):o.block((()=>P(e,"$ref",h.all.$ref.definition)))}function T(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){w(e)&&(_(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&v(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,m.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.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),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${o}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{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,m.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",j(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:n,schemaType:o,def:i}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.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:n,it:o}=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,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.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 o={...this.it,...r,items:void 0,props:void 0};return function(e,t){w(e)&&(_(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&v(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.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 i=n.const("_errs",d.default.errors);b(e,i),n.var(t,u._`${i} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=m.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=m.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,u.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,c.funcKeywordCode)(o,r):"macro"in r?(0,c.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(o,r)}t.KeywordCxt=O;const k=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return d.default.rootData;if("/"===e[0]){if(!k.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=d.default.rootData}else{const s=x.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const e of a)e&&(i=u._`${i}${(0,u.getProperty)((0,m.unescapeJsonPointer)(e))}`,s=u._`${s} && ${i}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=j},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,data:s,it:a}=e;let c,l;const{minContains:u,maxContains:d}=i;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${p} <= ${l}`),void e.pass(t)}a.items=!0;const m=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(m,!1).break())),1===c?t.assign(m,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0))))}(r)))))}function h(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?h(m,(()=>t.if(m,(()=>t.break())))):0===c?(t.let(m,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(m,!1),f()),e.result(m,(()=>e.reset()))}};t.default=i},2808:e=>{for(var t=Math.floor(16777215*Math.random()),r=u.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,o=(()=>{try{return _Buffer}catch(e){try{return Buffer}catch(e){return null}}})(),i=function(e){return!(null==e||!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))},s=[],a=0;a<256;a++)s[a]=(a<=15?"0":"")+a.toString(16);var c=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(a=0;a<10;)l[48+a]=a++;for(;a<16;)l[55+a]=l[87+a]=a++;function u(e){if(!(this instanceof u))return new u(e);if(e&&(e instanceof u||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null!=e&&"number"!=typeof e){var t=u.isValid(e);if(!t&&null!=e)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(t&&"string"==typeof e&&24===e.length)return u.createFromHexString(e);if(null==e||12!==e.length){if(null!=e&&"function"==typeof e.toHexString)return e;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=e}else this.id=this.generate(e)}e.exports=u,u.default=u,u.createFromTime=function(e){return new u((8===(t=(t=e=parseInt(e,10)%4294967295).toString(16)).length?t:"00000000".substring(t.length,8)+t)+"0000000000000000");var t},u.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",r=0;r<24;)t+=String.fromCharCode(l[e.charCodeAt(r++)]<<4|l[e.charCodeAt(r++)]);return new u(t)},u.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&c.test(e):e instanceof u||(i(e)?u.isValid(e.toString("hex")):!("function"!=typeof e.toHexString||!o||!(e.id instanceof o||"string"==typeof e.id))&&(12===e.id.length||24===e.id.length&&c.test(e.id)))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof u?this.toString()===e.toString():"string"==typeof e&&u.isValid(e)&&12===e.length&&i(this.id)?e===this.id.toString("binary"):"string"==typeof e&&u.isValid(e)&&24===e.length?e.toLowerCase()===this.toHexString():"string"==typeof e&&u.isValid(e)&&12===e.length?e===this.id:!(null==e||!(e instanceof u||e.toHexString))&&e.toHexString()===this.toHexString()},getTimestamp:function(){var e,t=new Date;return e=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var o=r=(r+1)%16777215;return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,t>>16&255,t>>8&255,255&t,n>>8&255,255&n,o>>16&255,o>>8&255,255&o)}};var d=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[d]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),o=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
|
|
6
6
|
missingProperty: ${o},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const s={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:o,it:s}=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,i.propertyInData)(r,o,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(u,(()=>{for(const t of l)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,i.checkMissingProp)(e,l,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,o.alwaysValidSchema)(a,t[l])||(r.if((0,i.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},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),o=r(6144),i=r(6653),s=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;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 p=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${c}))`)}};t.default=o},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},3492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferTokenizer=void 0;const n=r(8705),o=r(8632);class i extends o.AbstractTokenizer{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}async readBuffer(e,t){if(t&&t.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),o=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&o<r.length)throw new n.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+o),r.offset),o}async close(){}}t.BufferTokenizer=i},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),o=r(2023),i=r(5765),s=r(8708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.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:o,schema:i,parentSchema:s,it:a}=e,l=t.macro.call(a.self,i,s,a),u=c(r,o,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,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:p,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const h=!m&&t.compile?t.compile.call(f.self,d,p,f):t.validate,y=c(l,u,h),g=l.let("valid");function _(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!m||!1===t.schema);l.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,s,a)}`,t.modifying)}function w(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)_(),t.modifying&&a(e),w((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>_(n._`await `)),(t=>l.assign(g,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${y}.errors`;return l.assign(e,null),_(n.nil),e}();t.modifying&&a(e),w((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.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},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.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),o=r(5765),i=r(9029),s=r(2023),a=r(3835),c=r(4227),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:p,self:m}=o,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return d(e,i._`${r}.validate`,f,f.$async)}();const h=a.resolveRef.call(m,f,s,r);if(void 0===h)throw new n.default(o.opts.uriResolver,s,r);return h instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(h):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(h)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:p}=l,m=p.passContext?s.default.this:i.nil;function f(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function h(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",i._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,i.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",i._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,i.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,o.callValidateCode)(e,t,m)}`),h(t),u||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,m),(()=>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 n=r(9029),o=r(3558),i=r(2023),s=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,s.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=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let m;e.$async&&(m=d.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const h={gen:d,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:m,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 y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);const t=d.toString();y=`${d.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${i.default.self}`,`${i.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 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,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function d(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(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 m(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),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];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),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new l({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=m.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new l({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=d.call(this,i):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[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 o="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&o&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,o))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=f.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new l({schema:r,schemaId:c,root:n,baseId:t}),i.schema!==i.root.schema?i: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}')},3846:(e,t,r)=>{"use strict";const n=r(363),o=r(5707),i={fromFile:async function(e){const t=await n.fromFile(e);try{return await o.fromTokenizer(t)}finally{await t.close()}}};Object.assign(i,o),Object.defineProperty(i,"extensions",{get:()=>o.extensions}),Object.defineProperty(i,"mimeTypes",{get:()=>o.mimeTypes}),e.exports=i},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}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),o=r(4227),i=r(5765),s=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,o.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(4227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,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(o.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),u.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 "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(l,t,l.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=s},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(i,s),time:r(c(!0),l),"date-time":r(p(!0),m),"iso-time":r(c(),u),"iso-date-time":r(p(),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(v.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<=w&&e>=_}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),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,m),"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 n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],i=+t[2],s=+t[3];return i>=1&&i<=12&&s>=1&&s<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[i])}function s(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],o=+r[2],i=+r[3],s=r[4],c="-"===r[5]?-1:1,l=+(r[6]||0),u=+(r[7]||0);if(l>23||u>59||e&&!s)return!1;if(n<=23&&o<=59&&i<60)return!0;const d=o-u*c,p=n-l*c-(d<0?1:0);return(23===p||-1===p)&&(59===d||-1===d)&&i<61}}function l(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 u(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 d=/t|\s/i;function p(e){const t=c(e);return function(e){const r=e.split(d);return 2===r.length&&i(r[0])&&t(r[1])}}function m(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 f(e,t){if(!e||!t)return;const[r,n]=e.split(d),[o,i]=t.split(d),a=s(r,o);return void 0!==a?a||l(n,i):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,_=-(2**31),w=2**31-1;function b(){return!0}const v=/[^\\]\\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 o=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(3558),s=r(4551),a=r(396),c=r(3835),l=r(9029),u=r(6939),d=r(208),p=r(4227),m=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"]),_={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."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,o,i,s,a,c,l,u,d,p,m,y,g,_,w,b,v,E,T,S,$,O,P;const k=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===x||void 0===x?1:x||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,j=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:k)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:k)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:k)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:k)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:k)&&void 0!==y&&y,code:e.code?{...e.code,optimize:A,regExp:I}:{optimize:A,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(_=e.loopEnum)&&void 0!==_?_:200,meta:null===(w=e.meta)||void 0===w||w,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(T=e.addUsedSchema)||void 0===T||T,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===($=e.validateFormats)||void 0===$||$,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:j}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(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 k;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)(),E.call(this,_,e,"NOT SUPPORTED"),E.call(this,w,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=m;"id"===r&&(n={...m},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 o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.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 o.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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=T.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=T.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(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>I.call(this,e))),this;N.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.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 o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=R(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];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)(i||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),o&&!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(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function T(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){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 $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(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 P(){const e={...this.opts};for(const t of y)delete e[t];return e}v.ValidationError=i.default,v.MissingRefError=s.default,t.default=v;const k={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.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?j.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function j(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 N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,C]}}},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),o=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function s(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:o}){return(i,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:o(i,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(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||(i(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,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,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},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(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} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({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=u,t.setEvaluated=d;const p={};var m;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:p[t.code]||(p[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===m.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},4266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiStringType=t.StringType=t.BufferType=t.Uint8ArrayType=t.IgnoreType=t.Float80_LE=t.Float80_BE=t.Float64_LE=t.Float64_BE=t.Float32_LE=t.Float32_BE=t.Float16_LE=t.Float16_BE=t.INT64_BE=t.UINT64_BE=t.INT64_LE=t.UINT64_LE=t.INT32_LE=t.INT32_BE=t.INT24_BE=t.INT24_LE=t.INT16_LE=t.INT16_BE=t.INT8=t.UINT32_BE=t.UINT32_LE=t.UINT24_BE=t.UINT24_LE=t.UINT16_BE=t.UINT16_LE=t.UINT8=void 0;const n=r(251);function o(e){return new DataView(e.buffer,e.byteOffset)}t.UINT8={len:1,get:(e,t)=>o(e).getUint8(t),put:(e,t,r)=>(o(e).setUint8(t,r),t+1)},t.UINT16_LE={len:2,get:(e,t)=>o(e).getUint16(t,!0),put:(e,t,r)=>(o(e).setUint16(t,r,!0),t+2)},t.UINT16_BE={len:2,get:(e,t)=>o(e).getUint16(t),put:(e,t,r)=>(o(e).setUint16(t,r),t+2)},t.UINT24_LE={len:3,get(e,t){const r=o(e);return r.getUint8(t)+(r.getUint16(t+1,!0)<<8)},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.UINT24_BE={len:3,get(e,t){const r=o(e);return(r.getUint16(t)<<8)+r.getUint8(t+2)},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.UINT32_LE={len:4,get:(e,t)=>o(e).getUint32(t,!0),put:(e,t,r)=>(o(e).setUint32(t,r,!0),t+4)},t.UINT32_BE={len:4,get:(e,t)=>o(e).getUint32(t),put:(e,t,r)=>(o(e).setUint32(t,r),t+4)},t.INT8={len:1,get:(e,t)=>o(e).getInt8(t),put:(e,t,r)=>(o(e).setInt8(t,r),t+1)},t.INT16_BE={len:2,get:(e,t)=>o(e).getInt16(t),put:(e,t,r)=>(o(e).setInt16(t,r),t+2)},t.INT16_LE={len:2,get:(e,t)=>o(e).getInt16(t,!0),put:(e,t,r)=>(o(e).setInt16(t,r,!0),t+2)},t.INT24_LE={len:3,get(e,r){const n=t.UINT24_LE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.INT24_BE={len:3,get(e,r){const n=t.UINT24_BE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.INT32_BE={len:4,get:(e,t)=>o(e).getInt32(t),put:(e,t,r)=>(o(e).setInt32(t,r),t+4)},t.INT32_LE={len:4,get:(e,t)=>o(e).getInt32(t,!0),put:(e,t,r)=>(o(e).setInt32(t,r,!0),t+4)},t.UINT64_LE={len:8,get:(e,t)=>o(e).getBigUint64(t,!0),put:(e,t,r)=>(o(e).setBigUint64(t,r,!0),t+8)},t.INT64_LE={len:8,get:(e,t)=>o(e).getBigInt64(t,!0),put:(e,t,r)=>(o(e).setBigInt64(t,r,!0),t+8)},t.UINT64_BE={len:8,get:(e,t)=>o(e).getBigUint64(t),put:(e,t,r)=>(o(e).setBigUint64(t,r),t+8)},t.INT64_BE={len:8,get:(e,t)=>o(e).getBigInt64(t),put:(e,t,r)=>(o(e).setBigInt64(t,r),t+8)},t.Float16_BE={len:2,get(e,t){return n.read(e,t,!1,10,this.len)},put(e,t,r){return n.write(e,r,t,!1,10,this.len),t+this.len}},t.Float16_LE={len:2,get(e,t){return n.read(e,t,!0,10,this.len)},put(e,t,r){return n.write(e,r,t,!0,10,this.len),t+this.len}},t.Float32_BE={len:4,get:(e,t)=>o(e).getFloat32(t),put:(e,t,r)=>(o(e).setFloat32(t,r),t+4)},t.Float32_LE={len:4,get:(e,t)=>o(e).getFloat32(t,!0),put:(e,t,r)=>(o(e).setFloat32(t,r,!0),t+4)},t.Float64_BE={len:8,get:(e,t)=>o(e).getFloat64(t),put:(e,t,r)=>(o(e).setFloat64(t,r),t+8)},t.Float64_LE={len:8,get:(e,t)=>o(e).getFloat64(t,!0),put:(e,t,r)=>(o(e).setFloat64(t,r,!0),t+8)},t.Float80_BE={len:10,get(e,t){return n.read(e,t,!1,63,this.len)},put(e,t,r){return n.write(e,r,t,!1,63,this.len),t+this.len}},t.Float80_LE={len:10,get(e,t){return n.read(e,t,!0,63,this.len)},put(e,t,r){return n.write(e,r,t,!0,63,this.len),t+this.len}},t.IgnoreType=class{constructor(e){this.len=e}get(e,t){}},t.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}},t.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}},t.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class i{constructor(e){this.len=e}static decode(e,t,r){let n="";for(let o=t;o<r;++o)n+=i.codePointToString(i.singleByteDecoder(e[o]));return n}static inRange(e,t,r){return t<=e&&e<=r}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(i.inRange(e,0,127))return e;const t=i.windows1252[e-128];if(null===t)throw Error("invaliding encoding");return t}get(e,t=0){return i.decode(e,t,t+this.len)}}t.AnsiStringType=i,i.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={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=o},4428:()=>{},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),o=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;u(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${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!==s&&(u(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class o extends Error{constructor(e,t,r,o){super(o||`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=o},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,$data:i,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:p}=c;l.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${s}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===i)return;const[a,c,m]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${m}(${o})`}return"function"==typeof c?n._`${m}(${o})`:n._`${m}.test(${o})`}())}())}};t.default=o},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),o=/^(?:(?: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 i(e){if(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(o)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function s(e,t=!1){let r="",o=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===o&&(o=!1),o||(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:""},n=[],o=[];let i=!1,a=!1,c=!1;function l(){if(o.length){if(!1===i){const e=s(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let s=0;s<e.length;s++){const u=e[s];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!l())break;i=!0}else o.push(u);else{if(!0===a&&(c=!0),!l())break;if(t++,n.push(":"),t>7){r.error=!0;break}s-1>=0&&":"===e[s-1]&&(a=!0)}}return o.length&&(i?r.zone=o.join(""):c?n.push(o.join("")):n.push(s(o))),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 o=e.length;for(let i=0;i<o;i++){const s=e[i];"0"===s&&n?(i+1<=o&&e[i+1]===t||i+1===o)&&(r+=s,n=!1):(n=s===t,r+=s)}return r}function l(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const u=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\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=i(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(u))e=e.replace(u,"");else if(e.match(d))e=e.replace(d,"/");else if(e.match(p))e=e.replace(p,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(m);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:i,normalizeIPv6:a,stringArrayToHexStripped:s}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=d;const o=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||{},i={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:_,wrapResponseSerializer:_,wrapErrorSerializer:_,req:g,res:g,err:h,errWithCause:h};function s(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||o;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=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 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 _=e.level||"info",b=Object.create(r);b.log||(b.log=w),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||w})),e[a]=n}(b,g,r),u({},b),Object.defineProperty(b,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(b,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,p(this,v,b,"error"),p(this,v,b,"fatal"),p(this,v,b,"warn"),p(this,v,b,"info"),p(this,v,b,"debug"),p(this,v,b,"trace"),h.forEach((e=>{p(this,v,b,e)}))}});const v={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||w};function E(r,o,s){if(!o)throw new Error("missing bindings for child Pino");s=s||{},i&&o.serializers&&(s.serializers=o.serializers);const a=s.serializers;if(i&&a){var c=Object.assign({},n,a),l=!0===e.browser.serialize?Object.keys(c):i;delete o.serializers,m([o],l,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.bindings=o,c&&(this.serializers=c,this._serialize=l),t&&(this._logEvent=f([].concat(e._logEvent.bindings,o)))}d.prototype=this;const p=new d(this);return u(this,p),p.child=function(...e){return E.call(this,r,...e)},p.level=s.level||this.level,r.onChild(p),p}return b.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),b.level=_,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=w,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,v,...e)},t&&(b._logEvent=f()),b}function p(e,t,r,i){if(Object.defineProperty(e,i,{value:s(e.level,r)>s(i,r)?w:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===w){if(!t.transmit)return;const n=s(t.transmit.level||e.level,r);if(s(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),l=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];var p=!1;if(t.serialize&&(m(l,this._serialize,this.serializers,this._stdErrSerialize),p=!0),t.asObject||t.formatters?c.call(u,function(e,t,r,o,i){const{level:s,log:a=e=>e}=i.formatters||{},c=r.slice();let l=c[0];const u={};if(o&&(u.time=o),s){const r=s(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?n(c.shift(),c):void 0}else"string"==typeof l&&(l=n(c.shift(),c));return void 0!==l&&(u[i.messageKey]=l),a(u)}(this,i,l,a,t)):c.apply(u,l),t.transmit){const n=t.transmit.level||e._level,o=s(n,r),c=s(i,r);if(c<o)return;!function(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,c=t.val,l=e._logEvent.bindings;n||m(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,c),e._logEvent=f(l)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,r)},l,p)}};var c}(e,t,r,i);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[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(l,e[i]))}function m(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=d.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o])&&t)for(const n in e[o])t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}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?b:v}function g(){return{}}function _(e){return e}function w(){}function b(){return!1}function v(){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=i,d.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:v,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 n=r(5765),o=r(9029),i=r(4227),s=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,n.allSchemaProperties)(r),p=d.filter((e=>(0,i.alwaysValidSchema)(l,r[e])));if(0===d.length||p.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const m=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof o.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:h}=l;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==h?t.assign(o._`${h}[${i}]`,!0):n||l.allErrors||t.if((0,o.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)m&&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 n=r(494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),o=r(4227),i={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)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},5523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndOfStreamError=t.defaultMessages=void 0,t.defaultMessages="End-Of-Stream";class r extends Error{constructor(){super(t.defaultMessages)}}t.EndOfStreamError=r},5707:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const Token=__webpack_require__(4266),strtok3=__webpack_require__(6452),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(6760),supported=__webpack_require__(1664),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,o]of t.entries())if(r.mask){if(o!==(r.mask[n]&e[n+r.offset]))return!1}else if(o!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n("PS-Adobe-",{offset:2})&&n(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n("ID3")){await e.ignore(6);const o=await e.readToken(uint32SyncSafeToken);return e.position+o>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(o),fromTokenizer(e))}if(n("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n("FLIF"))return{ext:"flif",mime:"image/flif"};if(n("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(n("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(n("FORM"))return{ext:"aif",mime:"audio/aiff"};if(n("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(r([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(i.filename.startsWith("3D/")&&i.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let s=-1;for(;s<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),s=t.indexOf("504B0304",0,"hex"),await e.ignore(s>=0?s:t.length)}else await e.ignore(i.compressedSize)}}catch(a){if(!(a instanceof strtok3.EndOfStreamError))throw a}return{ext:"zip",mime:"application/zip"}}if(n("OggS")){await e.ignore(28);const c=Buffer.alloc(8);return await e.readBuffer(c),_check(c,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(c,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(c,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(c,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(c,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(c,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(n("ftyp",{offset:4})&&96&t[8]){const l=t.toString("binary",8,12).replace("\0"," ").trim();switch(l){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return l.startsWith("3g")?l.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n("MThd"))return{ext:"mid",mime:"audio/midi"};if(n("wOFF")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(n("wOF2")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(n("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(n("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(n("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(n("%PDF")){await e.ignore(1350);const u=10485760,d=Buffer.alloc(Math.min(u,e.fileInfo.size));return await e.readBuffer(d,{mayBeLess:!0}),d.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([73,73,42,0]))return n("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n("MAC "))return{ext:"ape",mime:"audio/ape"};if(r([26,69,223,163])){async function p(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=Buffer.alloc(n+1);return await e.readBuffer(o),o}async function m(){const e=await p(),t=await p();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function f(t,r){for(;r>0;){const t=await m();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--r}}const h=await m();switch(await f(0,h.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n("MSCF")||n("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(r([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(n("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n("IMPM"))return{ext:"it",mime:"audio/x-it"};if(n("-lh0-",{offset:2})||n("-lh1-",{offset:2})||n("-lh2-",{offset:2})||n("-lh3-",{offset:2})||n("-lh4-",{offset:2})||n("-lh5-",{offset:2})||n("-lh6-",{offset:2})||n("-lh7-",{offset:2})||n("-lzs-",{offset:2})||n("-lz4-",{offset:2})||n("-lz5-",{offset:2})||n("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(r([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(n("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n("solid "))return{ext:"stl",mime:"model/stl"};if(n("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(n("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(r([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const g=await y();if(g.length<0)return;switch(g.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(g.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(r([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r([48,38,178,117,142,102,207,17,166,217])){async function _(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const w=await _();let b=w.size-24;if(_check(w.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const v=Buffer.alloc(16);if(b-=await e.readBuffer(v),_check(v,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(v,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(b)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n("BEGIN:")){if(n("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(n("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([4,0,0,0])&&t.length>=16){const E=t.readUInt32LE(12);if(E>12&&t.length>=E+16)try{const T=t.slice(16,E+16).toString();if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch(S){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(n("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(r([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},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),o=r(4227),i=r(2023),s=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 l(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(l(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(l(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:c},l,u,d){const p=d?n._`${e}, ${t}, ${o}${s}`:t,m=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,c.parentData],[i.default.parentDataProperty,c.parentDataProperty],[i.default.rootData,i.default.rootData]];c.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...m)}`;return u!==n.nil?n._`${l}.call(${u}, ${f})`:n._`${l}(${f})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?d:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.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(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,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),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || 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 o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=o,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,o,i=(o=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,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(n,o)||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,o)||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.")}()),s=i[0],a=i[1];return e[s]=a,e}),{})},t.isArguments=function(e){return null!=e&&o(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var i={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=i,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(i.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)},o=0;o<64;o++)r[n(o)]=o;var i=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))},s={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(o>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=o}}for(var s=[],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],s.push(n(a)),s.push(n(c)),s.push(n(l)),s.push(n(u)),a=null,c=null,l=null,u=null}return null!=a&&(s.push(n(a)),s.push(n(c)),null==l?s.push("="):s.push(n(l)),null==u&&s.push("=")),s.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,o=i(t),s=null,a=null,c=null,l=0,u=0;u<e.length;u++){var d="="===(n=e.charAt(u))?-1:r[n];switch(u%4){case 0:if(d<0)throw new Error("invalid base64 string");s=d<<2;break;case 1:if(d<0)throw new Error("invalid base64 string");s|=d>>4,o[l++]=s,a=(15&d)<<4;break;case 2:d>=0&&(a|=d>>2,o[l++]=a,c=(3&d)<<6);break;case 3:d>=0&&(o[l++]=c|d)}}return o},newBinary:i};t.Base64=s},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 o=function e(t,o,i,s,a){var c=o[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 l,u=s+i,d=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var p=c.length,m=0;m<p;m+=1)d[m]=e(m,c,i,u,a)||"null";return l=0===d.length?"[]":u?"[\n"+u+d.join(",\n"+u)+"\n"+s+"]":"["+d.join(",")+"]"}var f=Object.keys(c);return a&&(f=f.sort()),f.forEach((function(t){(l=e(t,c,i,u,a))&&d.push(n(t)+(u?": ":":")+l)})),l=0===d.length?"{}":u?"{\n"+u+d.join(",\n"+u)+"\n"+s+"}":"{"+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 n="",i=0;i<r.indent;i++)n+=" ";r.indent=n}return o("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var o={};!function(){var e=o,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),s={};e.EJSON=s;var a=new Map;s.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,i.hasOwn)(e,"$date")&&1===(0,i.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,i.hasOwn)(e,"$regexp")&&(0,i.hasOwn)(e,"$flags")&&2===(0,i.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,i.hasOwn)(e,"$InfNaN")&&1===(0,i.lengthOf)(e)},matchObject:i.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,i.hasOwn)(e,"$binary")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,i.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$escape")&&1===(0,i.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,i.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,i.keysOf)(e).forEach((function(r){t[r]=s.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=s.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$type")&&(0,i.hasOwn)(e,"$value")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return s._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)}))}}];s._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},s._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},s._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,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)||void 0===n||(0,i.isInfOrNaN)(n)){var o=l(n);o?t[r]=o:e(n)}})),t):t};s._adjustTypesToJSONValue=u,s.toJSONValue=function(e){var t=l(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=s.clone(e),u(r)),r};var d=function(e){if((0,i.isObject)(e)&&null!==e){var t=(0,i.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},p=function e(t){if(null===t)return null;var r=d(t);return r!==t?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)){var o=d(n);if(n!==o)return void(t[r]=o);e(n)}})),t):t};s._adjustTypesFromJSONValue=p,s.fromJSONValue=function(e){var t=d(e);return t===e&&(0,i.isObject)(e)&&(t=s.clone(e),p(t)),t},s.stringify=(0,i.handleError)((function(e,t){var r=s.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),s.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return s.fromJSONValue(JSON.parse(e))},s.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},s.equals=function(e,t,r){var n,o=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,i.isObject)(e)||!(0,i.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(s.isBinary(e)&&s.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,i.isFunction)(e.equals))return e.equals(t,r);if((0,i.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(n=0;n<e.length;n++)if(!s.equals(e[n],t[n],r))return!1;return!0}switch(s._isCustomType(e)+s._isCustomType(t)){case 1:return!1;case 2:return s.equals(s.toJSONValue(e),s.toJSONValue(t))}var u=(0,i.keysOf)(e),d=(0,i.keysOf)(t);return o?(n=0,a=u.every((function(o){return!(n>=d.length||o!==d[n]||!s.equals(e[o],t[d[n]],r)||(n++,0))}))):(n=0,a=u.every((function(o){return!!(0,i.hasOwn)(t,o)&&!!s.equals(e[o],t[o],r)&&(n++,!0)}))),a&&n===d.length},s.clone=function(e){var t;if(!(0,i.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(s.isBinary(e)){t=s.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(s.clone):(0,i.isArguments)(e)?Array.from(e).map(s.clone):(0,i.isFunction)(e.clone)?e.clone():s._isCustomType(e)?s.fromJSONValue(s.clone(s.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=s.clone(e[r])})),t)},s.newBinary=t.newBinary}(),e.exports=o.EJSON}()},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadStreamTokenizer=void 0;const n=r(8632),o=r(8705);class i extends n.AbstractTokenizer{constructor(e,t){super(t),this.streamReader=new o.StreamReader(e)}async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===r.length)return 0;const i=await this.streamReader.read(e,r.offset,r.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new o.EndOfStreamError;return i}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const o=new Uint8Array(r.length+t);return n=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),e.set(o.subarray(t),r.offset),n-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(e){if(t&&t.mayBeLess&&e instanceof o.EndOfStreamError)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new o.EndOfStreamError}return n}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n<e;){const o=e-n,i=await this.readBuffer(r,{length:Math.min(t,o)});if(i<0)return i;n+=i}return n}}t.ReadStreamTokenizer=i},6092:(e,t,r)=>{"use strict";r.d(t,{Ek:()=>i,SJ:()=>o,YP:()=>s});var n=r(1027);class o extends n.u3{constructor(){super(),this._currentBaseURL=null}use(e){if(!e)throw new Error("baseURL est requis");this._currentBaseURL=e.replace(/\/+$/,"")}_ensureContext(){if(!this._currentBaseURL)throw new Error("baseURL non défini. Appelez use(baseURL)")}getServers(){throw new Error("getServers() doit être implémenté")}exportAll(){throw new Error("exportAll() doit être implémenté")}}class i extends o{constructor(){super(),this._storage=new Map}getAccessToken(){return this._ensureContext(),this._storage.get(this._currentBaseURL)?.accessToken||null}setAccessToken(e){this._ensureContext();const t=this._storage.get(this._currentBaseURL)||{};this._storage.set(this._currentBaseURL,{...t,accessToken:e})}getRefreshToken(){return this._ensureContext(),this._storage.get(this._currentBaseURL)?.refreshToken||null}setRefreshToken(e){this._ensureContext();const t=this._storage.get(this._currentBaseURL)||{};this._storage.set(this._currentBaseURL,{...t,refreshToken:e})}clear(){this._ensureContext(),this._storage.delete(this._currentBaseURL)}getServers(){return[...this._storage.keys()]}exportAll(){return Object.fromEntries(this._storage.entries())}}class s extends o{constructor(e="cocolight"){super(),this.prefix=e}_key(e){return`${this.prefix}_tokens_${e}`}_getData(){this._ensureContext();const e=localStorage.getItem(this._key(this._currentBaseURL));return e?JSON.parse(e):{}}_setData(e){localStorage.setItem(this._key(this._currentBaseURL),JSON.stringify(e))}getAccessToken(){return this._getData().accessToken||null}setAccessToken(e){const t=this._getData();t.accessToken=e,this._setData(t)}getRefreshToken(){return this._getData().refreshToken||null}setRefreshToken(e){const t=this._getData();t.refreshToken=e,this._setData(t)}clear(){localStorage.removeItem(this._key(this._currentBaseURL))}getServers(){return Object.keys(localStorage).filter((e=>e.startsWith(`${this.prefix}_tokens_`))).map((e=>e.replace(`${this.prefix}_tokens_`,"")))}exportAll(){const e={};for(const t of this.getServers()){const r=localStorage.getItem(this._key(t));r&&(e[t]=JSON.parse(r))}return e}}},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),o=r(7060),i=r(6378),s=r(7532),a=r(9857),c=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.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,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${i}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},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),o=r(5354),i=r(494),s=r(3966),a=r(2661),c=r(3025),l=r(9713),u=r(8660),d=r(117),p=r(5333),m=r(7923),f=r(6505),h=r(6163),y=r(5844),g=r(1239),_=r(4426);t.default=function(e=!1){const t=[m.default,f.default,h.default,y.default,g.default,_.default,l.default,u.default,c.default,d.default,p.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},6452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBuffer=t.fromStream=t.EndOfStreamError=void 0;const n=r(6066),o=r(3492);var i=r(8705);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.fromStream=function(e,t){return t=t||{},new n.ReadStreamTokenizer(e,t)},t.fromBuffer=function(e,t){return new o.BufferTokenizer(e,t)}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),o=r(9029),i=o.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:({keyword:e,schemaCode:t})=>o.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const d=new n.KeywordCxt(c,u.RULES.all.format.definition,"format");function p(e){return o._`${e}.compare(${r}, ${i}) ${s[a].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),n=t.const("fmt",o._`${r}[${d.schemaCode}]`);e.fail$data((0,o.or)(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=d.schema,n=u.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 i=t.scopeValue("formats",{key:r,ref:n,code:l.code.formats?o._`${l.code.formats}${(0,o.getProperty)(r)}`:void 0});e.fail$data(p(i))}()},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),o=r(7652),i=r(3835),s=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.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:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const m=t.let("valid",!1),f=t.const("tag",n._`${r}${(0,n.getProperty)(p)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${f} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!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=i.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),l instanceof i.SchemaEnv&&(l=l.schema),void 0===l)throw new s.default(u.opts.uriResolver,u.baseId,e)}const m=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[p];if("object"!=typeof m)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);n=n&&(r||o(l)),c(m,t)}if(!n)throw new Error(`discriminator: "${p}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)m(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)m(r,t)}}function m(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${f} === ${e}`),t.assign(m,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:f,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:f,tagName:p}))),e.ok(m)}};t.default=c},6760:(e,t)=>{"use strict";t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(r))return!1;let n=256;for(let r=t;r<t+148;r++)n+=e[r];for(let r=t+156;r<t+512;r++)n+=e[r];return r===n},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},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),o=r(2017),i=r(7106),s=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++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=m(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function m(e){return e?e.replace(p,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,r){return r=m(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:n}=this.opts,s=m(e[r]||t),a={"":s},c=u(n,s,!1),l={},d=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=c+t;let s=a[o];function u(t){const r=this.opts.uriResolver.resolve;if(t=m(s?r(s,t):t),d.has(t))throw h(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==m(i)&&("#"===t[0]?(p(e,l[t],t),l[t]=e):this.refs[t]=i),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]&&(s=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s})),l;function p(e,t,r){if(void 0!==t&&!o(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,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 o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=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?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var o,i,s,l;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.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 n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]: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}(o):f(o,o.length)}function m(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),n=0;n<t;++n)r[n]=e[n];return r}function h(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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;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(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);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},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},i.prototype.listenerCount=m,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7031:(e,t,r)=>{"use strict";r.d(t,{LD:()=>n,QM:()=>o,Rc:()=>i});class n{async loadQueue(){throw new Error("loadQueue() doit être implémenté")}async saveQueue(e){throw new Error("saveQueue(queue) doit être implémenté")}}class o extends n{constructor(){super(),this._queue=[]}async loadQueue(){return this._queue}async saveQueue(e){this._queue=[...e]}}class i extends n{constructor(e="cocolight-api-offline-queue"){super(),this.key=e}async loadQueue(){try{const e=localStorage.getItem(this.key);return e?JSON.parse(e):[]}catch{return[]}}async saveQueue(e){try{localStorage.setItem(this.key,JSON.stringify(e))}catch(e){console.warn("[Offline] Échec du stockage localStorage",e)}}}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5882),o=r(3439),i=r(7307),s=r(422),a=r(4486),c=r(4003),l=r(1163),u=r(617),d=r(7935),p=r(8643),m=[n.default,o.default,i.default,s.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=m},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,o,i,s,a,c,l,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,s,a,c,l,u,d),i){var m=i[p];if(Array.isArray(m)){if(p in t.arrayKeywords)for(var f=0;f<m.length;f++)r(e,n,o,m[f],s+"/"+p+"/"+f,a,s,p,i,f)}else if(p in t.propsKeywords){if(m&&"object"==typeof m)for(var h in m)r(e,n,o,m[h],s+"/"+p+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,i,h)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,m,s+"/"+p,a,s,p,i)}o(i,s,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 n=r(9029),o=r(4227),i=r(3853),s={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:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},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 o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{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=s;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 s{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:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,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,s={},a){let c=n.nil;for(const l in e){const u=e[l];if(!u)continue;const d=s[l]=s[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);c=n._`${c}${s}${this.opts._n}`}d.set(e,i.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9029),o=r(4227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),i.if(u,n._`${l} = ${(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)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(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 o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},8122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),o=r(6461),i=r(9029),s=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,n.fullFormats,s),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return l(e,t.formats||n.formatNames,r,i),t.keywords&&(0,o.default)(e),e};function l(e,t,r,n){var o,s;null!==(o=(s=e.opts.code).formats)&&void 0!==o||(s.formats=i._`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:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(4834),c=r(343);function l(e,t,r,n){const o={};return n||(e=m(u(e,r),r),t=m(u(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}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:""},n=Object.assign({},t),o=[],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&&o.push(r.scheme,":");const l=s(r);if(void 0!==l&&("suffix"!==n.reference&&o.push("//"),o.push(l),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const d=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const l=e.match(p);if(l){if(i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]),i.host){const e=o(i.host);if(!1===e.isIPV4){const t=n(e.host);i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.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||d[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&void 0!==i.host&&(i.host=unescape(i.host)),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=u(m(e,t),t):"object"==typeof e&&(e=m(u(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return u(l(m(e,n),m(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=u(a(m(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(m(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=u(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:m};e.exports=f,e.exports.default=f,e.exports.fastUri=f},8632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTokenizer=void 0;const n=r(8705);t.AbstractTokenizer=class{constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}async readToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}}},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const p=()=>null!=d?d:d=(0,o.useFunc)(t,i.default);let m;if(u||s)m=t.let("valid"),e.block$data(m,(function(){t.assign(m,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(m,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);m=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(m)}};t.default=s},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(2023),s=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{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:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(u,r))return;const m=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(o._`delete ${c}[${e}]`)}function y(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(g(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),d||t.if((0,o.not)(r),(()=>t.break())))}}}function g(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",c,(r=>{m.length||f.length?t.if(function(r){let i;if(m.length>8){const e=(0,s.schemaRefOrVal)(u,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=m.length?(0,o.or)(...m.map((e=>o._`${r} === ${e}`))):o.nil;return f.length&&(i=(0,o.or)(i,...f.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=a},8705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;var n=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}});var o=r(1510);Object.defineProperty(t,"StreamReader",{enumerable:!0,get:function(){return o.StreamReader}})},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),o=r(4227),i=r(2023);function s(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.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,o,i){const{it:c}=e,{gen:u,compositeRule:d,allErrors:p}=c,m=l(e,r,o);(null!=i?i:d||p)?s(u,m):a(c,n._`[${m}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:c,compositeRule:u,allErrors:d}=o;s(c,l(e,r,n)),u||d||a(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(c,n._`${i.default.vErrors}[${s}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(i.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`,o))}))};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 l(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[u(s,r),d(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:m,schemaPath:f}=u;o.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&o.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&o.push([c.schema,l],[c.parentSchema,n._`${m}${f}`],[i.default.data,a]),p&&o.push([c.propertyName,p])}(e,t,a),o.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[c.schemaPath,s]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),o=r(9029),i=r(2023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,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(i.default.data):(t.assign(o._`${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),o=r(7845);var i=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var s=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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?o.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 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 n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return A(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,n){super(e,r,n),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 p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class m 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=I(this.code,e,t),this}get names(){return this.code instanceof n._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 n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(j(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class _ extends y{}_.kind="else";class w 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 _(e):e}return t?!1===e?t instanceof w?t:t.nodes:this.nodes.length?this:new w(N(e),t instanceof w?[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 A(e,this.condition),this.else&&x(e,this.else.names),e}}w.kind="if";class b extends y{}b.kind="for";class v extends b{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 x(super.names,this.iteration.names)}}class E extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=A(super.names,this.from);return A(e,this.to)}}class T extends b{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 x(super.names,this.iterable.names)}}class S 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)}}S.kind="func";class $ extends h{render(e){return"return "+super.render(e)}}$.kind="return";class O 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,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class P extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class k extends y{render(e){return"finally"+super.render(e)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function A(e,t){return t instanceof n._CodeOrName?x(e,t.names):e}function I(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._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=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}k.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 o.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 o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new c(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.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!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new w(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 w(e))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(w,_)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new E(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=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(s,n._`${e}[${t}]`),r(s)}))}return this._for(new T("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new T("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new $;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new O;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new k,this.code(r)),this._endBlockNode(P,k)}throw(e){return this._leafNode(new m(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,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}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 w))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=N;const C=D(t.operators.AND);t.and=function(...e){return e.reduce(C)};const R=D(t.operators.OR);function D(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,it:s}=e;if((0,o.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",i,(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),s.allErrors||t.break()}))})),e.ok(a)}};t.default=i},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"]}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);__webpack_require__.r(r);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var o=2&t&&e;"object"==typeof o&&!~leafPrototypes.indexOf(o);o=getProto(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(r,n),r},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".cocolight-api-client.browser.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="CocolightApiClient:",__webpack_require__.l=(e,t,r,n)=>{if(inProgress[e])inProgress[e].push(t);else{var o,i;if(void 0!==r)for(var s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var c=s[a];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==dataWebpackPrefix+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.setAttribute("data-webpack",dataWebpackPrefix+r),o.src=e),inProgress[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(u);var n=inProgress[e];if(delete inProgress[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(r))),t)return t(r)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,r)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(i,(r=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,s,a]=r,c=0;if(i.some((t=>0!==e[t]))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);a&&a(__webpack_require__)}for(t&&t(r);c<i.length;c++)o=i[c],__webpack_require__.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunkCocolightApiClient=this.webpackChunkCocolightApiClient||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>Tr});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{ApiAuthenticationError:()=>a,ApiClientError:()=>n,ApiError:()=>r,ApiResponseError:()=>s,ApiValidationError:()=>o,CircuitBreakerError:()=>i});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{hasBrowserEnv:()=>Ue,hasStandardBrowserEnv:()=>Ve,hasStandardBrowserWebWorkerEnv:()=>Ge,navigator:()=>Fe,origin:()=>Ke});class r extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.details=r}}class n extends r{constructor(e,t,r){super(e,t,r),this.name="ApiClientError"}}class o extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiValidationError",this.status=t,this.messages=r,this.details=n}}class i extends r{constructor(e){super(e,503),this.name="CircuitBreakerError"}}class s extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class a extends r{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const c={_createDraftProxy:(e,t={},r={},n=[],i={},s={})=>new Proxy({},{get:(e,n)=>{const o=n in r?r[n]:t[n],s=i[n];return"function"==typeof s?s(o):o},set:(t,i,a)=>{if(!n.includes(i)){const t=`[DraftProxy] Le champ "${i}" n'est pas autorisé.`;if(s.throwOnError)throw new o(t,400,null,{field:i,value:a,allowedFields:n});return e._logger.warn(t),!1}return r[i]=a,!0},deleteProperty:(e,t)=>!!n.includes(t)&&(delete r[t],!0),has:(e,n)=>n in r||n in t,ownKeys:()=>[...new Set([...Object.keys(t),...Object.keys(r)])],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})}),_extractWritableFields(e={},t={},r={defs:{},visited:new Set}){if(!e||"object"!=typeof e)return[];if(e.$id&&r.visited.has(e.$id))return[];e.$id&&r.visited.add(e.$id),r.defs=e.$defs||e.definitions||r.defs;const n=[];if(e.$ref){const o=e.$ref.replace(/^#\/?(\$defs|definitions)\//,""),i=r.defs?.[o];i&&n.push(...this._extractWritableFields(i,t,r))}if(e.allOf&&e.allOf.forEach((e=>n.push(...this._extractWritableFields(e,t,r)))),e.if&&e.then){const o=e.if?.properties;let i=!0;if(o)for(const e in o){const r=o[e]?.const;if(t[e]!==r){i=!1;break}}i&&e.then?n.push(...this._extractWritableFields(e.then,t,r)):!i&&e.else&&n.push(...this._extractWritableFields(e.else,t,r))}return e.properties&&n.push(...Object.entries(e.properties).filter((([e,t])=>!0!==t.readOnly&&void 0===t.const)).map((([e])=>e))),[...new Set(n)]},_buildDraftAndProxy({data:e={},serverData:t=null,constant:n,apiClient:o,transforms:i={},throwOnError:s=!0,removeFields:a=[]}){const c=Array.isArray(n)?n:[n],l={allOf:[],$defs:{}};for(const e of c){const t=o.getRequestSchema(e);if(!t)throw new r(`Unable to find schema for ${e}.`);if(t.$defs)for(const[r,n]of Object.entries(t.$defs))l.$defs[r]?o._logger.warn(`Duplicate $defs key '${r}' from schema '${e}'`):l.$defs[r]=n;l.allOf.push(t)}const u={};let d=this._extractWritableFields(l,e);e.id&&-1===d.indexOf("id")&&d.push("id"),e.slug&&-1===d.indexOf("slug")&&d.push("slug"),d=d.filter((e=>!a.includes(e)));for(const t of d){const r=e[t],n="function"==typeof i[t]?i[t](r,e):r;void 0!==n&&(u[t]=n)}return{draft:u,proxy:this._createDraftProxy(o,t,u,d,i,{throwOnError:s})}},_extractChangedFieldsFromSchema(e,t,r={},n,o=[]){const i=e.getRequestSchema(t);let s=this._extractWritableFields(i,r);const a={},c=n?.()||{};s=s.filter((e=>!o.includes(e)));for(const e of s){if(void 0===r[e])continue;const t=r[e],n=c[e];JSON.stringify(t)!==JSON.stringify(n)&&(a[e]=t)}return Object.keys(a).length>0?a:null}},l={async get(){return this.apiClient.safeCall((async()=>{const e=await this.getPublicProfile();return this._setData(e),e}))},async updateSettings(e={}){return e.idEntity=this.id,e.typeEntity=this.getEntityType(),this.callIsConnected((()=>this.endpointApi.updateSettings(e)))},async updateDescription(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockDescription(e)))},async updateInfo(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockInfo(e)))},async updateSocial(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockSocial(e)))},async updateLocality(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockLocality(e)))},async updateSlug({slug:e}){try{await this.endpointApi.check({type:this.getEntityType(),id:this.id,slug:e})}catch(e){if(e instanceof s)throw new s("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsConnected((()=>this.endpointApi.updateBlockSlug({typeElement:this.getEntityType(),id:this.id,slug:e})))},async updateImageProfil({profil_avatar:e}){e=await this._validateImage(e);const t={pathParams:{folder:this.getEntityType(),ownerId:this.id},profil_avatar:e};return this.callIsConnected((()=>this.endpointApi.profilImage(t)))},async organization(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer une organisation.");return this.entity("organizations",e)},async project(e={}){if(!this.isConnected)throw new r("Vous devez être connecté pour créer un projet.");return this.entity("projects",e)},async poi(e={}){if(!this.isConnected)throw new r("Vous devez être connecté pour créer un POI.");return this.entity("poi",e)},async event(e={}){if(!this.isConnected)throw new r("Vous devez être connecté pour créer un événement.");return this.entity("events",e)},async badge(e={}){if(!this.isConnected)throw new r("Vous devez être connecté pour créer un badge.");return this.entity("badges",e)},async news(e={}){if(!this.isConnected)throw new r("Vous devez être connecté.");return this.entity("news",e)},async getOrganizations(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=r.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:r.count,results:o}},async getProjects(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={$or:{[`links.contributors.${this.id}`]:{$exists:!0},[`parent.${this.id}`]:{$exists:!0}},[`links.contributors.${this.id}`]:{$exists:!0}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getProjectsAdmin(e))):()=>this.endpointApi.getProjectsNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des projets.",500,r.results);const n=r.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:r?.count?.projects??0,results:n}},async getPois(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={[`parent.${this.id}`]:{$exists:!0}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getPoisAdmin(e))):()=>this.endpointApi.getPoisNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des POIs.",500,r.results);const n=r.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:r.count?.poi??0,results:n}},async getSubscribers(e={}){delete e?.pathParams,e.filters={[`links.follows.${this.id}`]:{$exists:!0},[`links.follows.${this.id}.toBeValidated`]:{$exists:!1},[`links.follows.${this.id}.isInviting`]:{$exists:!1}};const t=await this.endpointApi.getSubscribers(e);if(!Array.isArray(t.results))throw new s("Erreur lors de la récupération des abonnés.",500,t.results);const r=t.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:t.count,results:r}},async getBadgesIssuer(e={}){delete e?.pathParams,e.filters=e.filters||{},e.filters.$or={},e.filters.$or[`issuer.${this.id}`]={$exists:!0};const t=await this.endpointApi.getBadges(e);if(!Array.isArray(t.results))throw new s("Erreur lors de la récupération des badges.",500,t.results);const r=t.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:t.count?.badges??0,results:r}},async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new s("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.linkEntity?.(e.collection,e)??e));return this._createFilteredProxy(r)}},u={async resolveId(e){if(!this.id&&this.slug)try{const t=await this.endpointApi.getElementsKey({pathParams:{slug:this.slug}});if(!t?.contextId||t?.contextType!==e)throw new s(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof s?t?.responseData?.contextType!==e?t:new s(`Impossible de récupérer l'identifiant pour le slug ${this.slug}`,t.status,t.responseData):t}return this.id},async getPublicProfile(){return await this.resolveId(this.getEntityType()),this.endpointApi.getElementsAbout({pathParams:{id:this.id,type:this.getEntityType()}})},_getEntityMeta(e){const t=this.constructor,r=this.__entityTag,n={EndpointApi:this.deps.EndpointApi,User:"User"===r?t:this.deps.User,Organization:"Organization"===r?t:this.deps.Organization,Project:"Project"===r?t:this.deps.Project,Event:"Event"===r?t:this.deps.Event,Poi:"Poi"===r?t:this.deps.Poi,Badge:"Badge"===r?t:this.deps.Badge,News:"News"===r?t:this.deps.News};return{citoyens:{entityClass:n.User,deps:n},organizations:{entityClass:n.Organization,deps:n},projects:{entityClass:n.Project,deps:n},events:{entityClass:n.Event,deps:{...n,Badge:void 0}},poi:{entityClass:n.Poi,deps:{...n,Badge:void 0,News:void 0}},news:{entityClass:n.News,deps:{...n}},badges:{entityClass:n.Badge,deps:{EndpointApi:n.EndpointApi,User:n.User,Organization:n.Organization,Project:n.Project}}}[e]||null},linkEntity(e,t){const r=this._getEntityMeta(e);return r?r.entityClass.fromServerData(t,this,r.deps):t},async linkEntityById(e,t,r={}){const n=this._getEntityMeta(e);if(!n)return null;const o=new n.entityClass(this,{id:t},n.deps);return r?.skipGet||await o.get(),o},async linkEntitiesFromServerData(e,t={},r={}){const n=r.key||e,o="function"==typeof r.mapFn?r.mapFn:null,i=e=>!0===e||"true"===e,s=e=>!1===e||"false"===e,a=this.serverData?.[n],c=[];if(a&&"object"==typeof a&&Object.keys(a).length>0)for(const r of Object.keys(a)){const n=a[r],l=Object.entries(t).every((([e,t])=>{const r=n[e];if("function"==typeof t)try{return t(r)}catch(t){return console.warn(`Erreur dans le filtre personnalisé pour ${e}`,t),!1}return t instanceof RegExp?"string"==typeof r&&t.test(r):"string"==typeof t&&"string"==typeof r?r.toLowerCase().includes(t.toLowerCase()):i(t)?i(r):s(t)?s(r):"string"!=typeof r||"string"!=typeof t||isNaN(Date.parse(r))||isNaN(Date.parse(t))?r===t:new Date(r).getTime()===new Date(t).getTime()}));if(l)try{const t=await this.linkEntityById(e,r);t&&(t.meta=n,c.push(o?o(t):t))}catch(t){this._logger?.error?.(`Erreur lors de la récupération de l'entité ${e} (${r}) :`,t)}}return c},entityInstanceData(e,t){const r=this._getEntityMeta(e),n=this.__entityTag,o=this.constructor;return new r.entityClass(this,t,{[n]:o,...r.deps})},async entity(e,t={}){try{const r=this.entityInstanceData(e,t),n={citoyens:["id","slug"],organisations:["id","slug"],projets:["id","slug"],events:["id","slug"],poi:["id","slug"],news:["id"],badges:["id"]}[e];return n&&this._hasAtLeastOne(t,n)&&await r.get(),r}catch(t){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.${e}] Erreur lors de la création d'une instance ${e} :`,t.message),t}}};var d=__webpack_require__(2808),p=__webpack_require__(3846);const{fromBuffer:m}=p,f={async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))},async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous devez ne devez pas être connecté pour faire cette action.");return this.call(e,t)},async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour faire cette action.");return"function"==typeof e?await e():this.call(e,t)},async callIsMe(e,t={}){if(!this.isMe)throw new a("Vous devez être vous-même pour faire cette action.");return"function"==typeof e?await e():await this.callIsConnected(e,t)},async _validateImage(e){return await this._validateUploadInput(e,{allowedMimeTypes:["image/jpeg","image/png","image/jpg"],expectedType:"image"})},async _validateFile(e){return await this._validateUploadInput(e,{allowedMimeTypes:["application/pdf","text/plain","text/csv"],expectedType:"file"})},async _validateUploadInput(e,{allowedMimeTypes:t=[],expectedType:r="any"}){if(!e)throw new o("Le fichier est requis.");const n="undefined"==typeof window&&"undefined"!=typeof process;let i="",s=e;if("undefined"!=typeof File&&e instanceof File){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.")}else if("undefined"!=typeof Blob&&e instanceof Blob){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.");const r=i.split("/")[1]||"bin",n=`${Date.now()}.${r}`;s=new File([e],n,{type:i})}else if(n&&Buffer.isBuffer(e)){const n=await m(e);if(i=n?.mime,!n||!t.includes(i))throw new o("Le type du fichier est invalide.");if("image"===r){const t=n.ext,r=`${Date.now()}.${t}`;s=await this._createReadStreamFromBuffer(e,r,i)}}else{if(!n||!e?.readable||"function"!=typeof e._read)throw new o("Type de fichier non reconnu.");{const r=[],n=await this._passThrough(),a=await this._passThrough(),c=4100;let l=0;e.on("data",(e=>{l<c&&(r.push(e),l+=e.length)})),e.pipe(n).pipe(a),await new Promise((e=>setTimeout(e,10)));const u=Buffer.concat(r),d=await m(u);if(i=d?.mime,!d||!t.includes(i))throw new o("Le type du fichier est invalide.");a.path=`${Date.now()}.${d.ext}`,a.mimeType=i,s=a}}return s},async _createReadStreamFromBuffer(e,t="file.bin",r="application/octet-stream"){const n=await this._bufferToReadable(e);return n.path=t,n.mimeType=r,n},async _bufferToReadable(e){if("undefined"==typeof window){const{bufferToReadable:t}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return t(e)}throw new Error("bufferToReadable ne doit pas être appelé dans le navigateur")},async _passThrough(){if("undefined"==typeof window){const{createPassThrough:e}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return e()}throw new Error("passThrough ne doit pas être appelé dans le navigateur")},_omitProps(e,t){if(!e||"object"!=typeof e)return{};const r={...e};for(const e of t)delete r[e];return r},_pickProps(e,t,r={}){if(!e||"object"!=typeof e)return{};const n={};for(const o of t)if(o in e){const t=e[o];"function"==typeof r[o]?n[o]=r[o](t,e):n[o]=t}return n},_hasAtLeastOne:(e,t=[])=>t.some((t=>t in e&&null!=e[t])),_createFilteredProxy:e=>new Proxy(e,{get:(e,t,r)=>"string"!=typeof t||isNaN(t)?"length"===t?e.filter((e=>!e._isDeleted)).length:"function"==typeof e[t]?(...r)=>e.filter((e=>!e._isDeleted))[t](...r):Reflect.get(e,t,r):e.filter((e=>!e._isDeleted))[t]}),_newId:()=>(new d).toString()};class h{_draftData={};_initialDraftData={};_serverData=null;_calledFromSave=!1;constructor(e,t={},n={},o={}){if(this.__entityTag=o.entityTag||this.constructor.name||"BaseEntity",this.deps=n,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if(!e?.apiClient)throw new r("Parent invalide ou ApiClient manquant.");this.apiClient=e.apiClient,this.parent=e}if("function"==typeof n.EndpointApi)this.endpointApi=new n.EndpointApi(this.apiClient);else{if("object"!=typeof n.EndpointApi)throw new r("deps.EndpointApi doit être une classe ou une instance valide.");this.endpointApi=n.EndpointApi}this._serverData=null;const{draft:i,proxy:s}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this._serverData,constant:this.constructor.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this._initialDraftData=JSON.parse(JSON.stringify(i)),this._draftData=i,this.data=s}get id(){return this._draftData.id||null}_id(e){this._draftData.id=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}get draftData(){return this._draftData}get initialDraftData(){return this._initialDraftData}get serverData(){return this._serverData}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return this.constructor.entityType}_setData(e){this._serverData={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this._serverData,constant:this.constructor.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this._initialDraftData=JSON.parse(JSON.stringify(t)),this._draftData=t,this.data=r}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new r("Non connecté.");this._calledFromSave=!0;try{const e={...this._draftData};return this.id||"function"!=typeof this._add?"function"==typeof this._update&&await this._update(e)?await this.refresh():this._serverData:(await this._add(e),await this.refresh())}finally{this._calledFromSave=!1}}static fromServerData(e,t,r){const n=new this(t,{},r);n._serverData={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n._serverData,constant:this.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n._draftData=o,n.data=i,n}hasChanges(){return JSON.stringify(this._draftData)!==JSON.stringify(this._initialDraftData)}defaultFields={};removeFields=[];transforms={}}Object.assign(h.prototype,c,l,u,f);const y=h;class g extends y{static entityType="badges";static SCHEMA_CONSTANTS=["ADD_BADGES"];static ADD_BLOCKS=new Map([["ADD_BADGES","addBadges"]]);static UPDATE_BLOCKS=new Map([]);defaultFields={};removeFields=[];transforms={};async _add(e){e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of g.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of g.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents n'existe pas dans ${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(){throw new Error(`getNews n'existe pas dans ${this.constructor.name}`)}async getSubscribers(){throw new Error(`getSubscribers n'existe pas dans ${this.constructor.name}`)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`event n'existe pas dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(){throw new Error(`news n'existe pas dans ${this.constructor.name}`)}}const _=class{constructor(e){this.apiClient=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))}async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour effectuer cette action.");return this.call(e,t)}async personRegister(e={}){return this.callNoConnected("PERSON_REGISTER",e)}async authenticateUrl(e={}){return this.callNoConnected("AUTHENTICATE_URL",e)}async refreshTokenUrl(e={}){return this.call("REFRESH_TOKEN_URL",e)}async meInfoUrl(e={}){return this.callIsConnected("ME_INFO_URL",e)}async passwordRecovery(e={}){return this.callNoConnected("PASSWORD_RECOVERY",e)}async serverExchangeToken(e={}){return this.callIsConnected("SERVER_EXCHANGE_TOKEN",e)}async changePassword(e={}){return this.callIsConnected("CHANGE_PASSWORD",e)}async deleteAccount(e={}){return this.callIsConnected("DELETE_ACCOUNT",e)}async updateSettings(e={}){return this.callIsConnected("UPDATE_SETTINGS",e)}async updateBlockDescription(e={}){return this.callIsConnected("UPDATE_BLOCK_DESCRIPTION",e)}async updateBlockInfo(e={}){return this.callIsConnected("UPDATE_BLOCK_INFO",e)}async updateBlockSocial(e={}){return this.callIsConnected("UPDATE_BLOCK_SOCIAL",e)}async updateBlockLocality(e={}){return this.callIsConnected("UPDATE_BLOCK_LOCALITY",e)}async updateBlockSlug(e={}){return this.callIsConnected("UPDATE_BLOCK_SLUG",e)}async check(e={}){return this.callIsConnected("CHECK",e)}async profilImage(e={}){return this.callIsConnected("PROFIL_IMAGE",e)}async getElementsAbout(e={}){return this.call("GET_ELEMENTS_ABOUT",e)}async multiconnect(e={}){return this.callIsConnected("MULTICONNECT",e)}async getNews(e={}){return this.call("GET_NEWS",e)}async getNewsById(e={}){return this.call("GET_NEWS_BY_ID",e)}async addNews(e={}){return this.callIsConnected("ADD_NEWS",e)}async addImageNews(e={}){return this.callIsConnected("ADD_IMAGE_NEWS",e)}async addFileNews(e={}){return this.callIsConnected("ADD_FILE_NEWS",e)}async deleteNews(e={}){return this.callIsConnected("DELETE_NEWS",e)}async updateNews(e={}){return this.callIsConnected("UPDATE_NEWS",e)}async shareNews(e={}){return this.callIsConnected("SHARE_NEWS",e)}async getComments(e={}){return this.call("GET_COMMENTS",e)}async addComments(e={}){return this.callIsConnected("ADD_COMMENTS",e)}async deleteComments(e={}){return this.callIsConnected("DELETE_COMMENTS",e)}async updateComments(e={}){return this.callIsConnected("UPDATE_COMMENTS",e)}async searchTags(e={}){return this.call("SEARCH_TAGS",e)}async showVote(e={}){return this.call("SHOW_VOTE",e)}async globalAutocomplete(e={}){return this.call("GLOBAL_AUTOCOMPLETE",e)}async cityAutocomplete(e={}){return this.call("CITY_AUTOCOMPLETE",e)}async suggestionInput(e={}){return this.call("SUGGESTION_INPUT",e)}async getProjectsNoAdmin(e={}){return this.call("GET_PROJECTS_NO_ADMIN",e)}async getProjectsAdmin(e={}){return this.callIsConnected("GET_PROJECTS_ADMIN",e)}async getPoisNoAdmin(e={}){return this.call("GET_POIS_NO_ADMIN",e)}async getPoisAdmin(e={}){return this.callIsConnected("GET_POIS_ADMIN",e)}async getOrganizationsNoAdmin(e={}){return this.call("GET_ORGANIZATIONS_NO_ADMIN",e)}async getOrganizationsAdmin(e={}){return this.callIsConnected("GET_ORGANIZATIONS_ADMIN",e)}async getMembersNoAdmin(e={}){return this.call("GET_MEMBERS_NO_ADMIN",e)}async getMembersAdmin(e={}){return this.callIsConnected("GET_MEMBERS_ADMIN",e)}async getFriendsAdmin(e={}){return this.callIsConnected("GET_FRIENDS_ADMIN",e)}async getSubscriptions(e={}){return this.call("GET_SUBSCRIPTIONS",e)}async getSubscriptionsAdmin(e={}){return this.callIsConnected("GET_SUBSCRIPTIONS_ADMIN",e)}async getSubscribers(e={}){return this.call("GET_SUBSCRIBERS",e)}async getSubscribersAdmin(e={}){return this.callIsConnected("GET_SUBSCRIBERS_ADMIN",e)}async getContributors(e={}){return this.call("GET_CONTRIBUTORS",e)}async getContributorsAdmin(e={}){return this.callIsConnected("GET_CONTRIBUTORS_ADMIN",e)}async getBadges(e={}){return this.call("GET_BADGES",e)}async getBadgesFilters(e={}){return this.call("GET_BADGES_FILTERS",e)}async connect(e={}){return this.callIsConnected("CONNECT",e)}async disconnect(e={}){return this.callIsConnected("DISCONNECT",e)}async getElementsKey(e={}){return this.call("GET_ELEMENTS_KEY",e)}async getFavoris(e={}){return this.callIsConnected("GET_FAVORIS",e)}async deleteFavoris(e={}){return this.callIsConnected("DELETE_FAVORIS",e)}async addFavoris(e={}){return this.callIsConnected("ADD_FAVORIS",e)}async addOrganization(e={}){return this.callIsConnected("ADD_ORGANIZATION",e)}async addProject(e={}){return this.callIsConnected("ADD_PROJECT",e)}async addPoi(e={}){return this.callIsConnected("ADD_POI",e)}async addEvent(e={}){return this.callIsConnected("ADD_EVENT",e)}async deletePoi(e={}){return this.callIsConnected("DELETE_POI",e)}async deleteEvent(e={}){return this.callIsConnected("DELETE_EVENT",e)}async deleteElement(e={}){return this.callIsConnected("DELETE_ELEMENT",e)}async addImageElement(e={}){return this.callIsConnected("ADD_IMAGE_ELEMENT",e)}async linkValidate(e={}){return this.callIsConnected("LINK_VALIDATE",e)}async searchMemberAutocomplete(e={}){return this.call("SEARCH_MEMBER_AUTOCOMPLETE",e)}async getNotifications(e={}){return this.callIsConnected("GET_NOTIFICATIONS",e)}async getNotificationsCount(e={}){return this.callIsConnected("GET_NOTIFICATIONS_COUNT",e)}async notificationUpdate(e={}){return this.callIsConnected("NOTIFICATION_UPDATE",e)}async removeAllNotifications(e={}){return this.callIsConnected("REMOVE_ALL_NOTIFICATIONS",e)}async markNotificationAsRead(e={}){return this.callIsConnected("MARK_NOTIFICATION_AS_READ",e)}async activitypubSearch(e={}){return this.call("ACTIVITYPUB_SEARCH",e)}async activitypubLink(e={}){return this.callIsConnected("ACTIVITYPUB_LINK",e)}async activitypubGetCommunity(e={}){return this.call("ACTIVITYPUB_GET_COMMUNITY",e)}async getBadge(e={}){return this.call("GET_BADGE",e)}async getEmetteurBadges(e={}){return this.call("GET_EMETTEUR_BADGES",e)}async addBadges(e={}){return this.callIsConnected("ADD_BADGES",e)}async assignBadges(e={}){return this.callIsConnected("ASSIGN_BADGES",e)}async getEvents(e={}){return this.call("GET_EVENTS",e)}async shareEvents(e={}){return this.callIsConnected("SHARE_EVENTS",e)}async inviteEvent(e={}){return this.callIsConnected("INVITE_EVENT",e)}};class w extends y{static entityType="events";static SCHEMA_CONSTANTS=["ADD_EVENT"];static ADD_BLOCKS=new Map([["ADD_EVENT","addEvent"]]);static UPDATE_BLOCKS=new Map([]);defaultFields={};removeFields=["typeElement"];transforms={};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of w.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of w.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents - les sous-events ne sont pas encore implémentés dans ${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`les sous-events ne sont pas encore implémentés dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(e={}){return super.news(e)}}class b extends y{static entityType="news";static SCHEMA_CONSTANTS=["ADD_NEWS"];static ADD_BLOCKS=new Map([["ADD_NEWS","addNews"]]);static UPDATE_BLOCKS=new Map([["ADD_NEWS","updateNews"]]);defaultFields={};removeFields=[];transforms={scope:e=>e?.type,mentions:e=>Array.isArray(e)?e.map((e=>({...e,count:parseInt(e.count)}))):[],mediaImg:e=>{const t=e?.images?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countImages:t.length,images:t}:void 0},mediaFile:e=>{const t=e?.files?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countFiles:t.length,files:t}:void 0}};async get(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");const e=await this.callIsConnected((()=>this.endpointApi.getNewsById({ids:[this.id]})));if(e&&Array.isArray(e)&&1===e.length){const t=e[0];return this._setData(t),this.serverData}throw new r(`Aucune actualité trouvée pour l'ID ${this.id}`)}async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");""===e.text&&(e.text=" "),e.parentId=this.parent.id,e.parentType=this.parent.getEntityType();for(const[t,r]of b.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.object?.id&&(this._draftData.id=e.object.id)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id,""===e?.text&&(e.text=" "),e.parentId=this.parent.id,e.parentType=this.parent.getEntityType(),e.idNews=this.id;let t=!1;const r=await this.callIsConnected((()=>this.endpointApi.updateNews(e)));return r?.object&&(this._serverData={...r.object}),t=!0,!0}async addNews(e={}){return this.callIsConnected((()=>this.endpointApi.addNews(e)))}async updateNews(e={}){return this.callIsConnected((()=>this.endpointApi.updateNews(e)))}async addMention({slug:e,id:t}){try{if(!e&&!t)throw new r("Vous devez fournir un slug ou un id pour ajouter une mention.");const n=await this.entity("citoyens",{id:t,slug:e}),o=n.serverData;if(this._draftData.mentions||(this._draftData.mentions=[]),this._draftData.mentions.find((e=>e.id===o.id)))return this._draftData.mentions=this._draftData.mentions.map((e=>(e.id===o.id&&(e.count+=1),e))),this._draftData.mentions;const i={id:o.id,slug:o.slug,type:n.getEntityType(),name:o.name,value:o.name,count:1};return this._draftData.mentions.push(i),this._draftData.mentions}catch(e){throw this.apiClient._logger.error("Erreur lors de l'ajout de la mention :",e),e}}async addImage(e){e=await this._validateImage(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsImage:e},r=await this.callIsConnected((()=>this.endpointApi.addImageNews(t)));return this._draftData.mediaImg?(this._draftData.mediaImg.countImages=this._draftData.mediaImg.countImages+1,this._draftData.mediaImg.images.push(r.id)):this._draftData.mediaImg={countImages:1,images:[r.id]},r}async addFile(e){e=await this._validateFile(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsFile:e},r=await this.callIsConnected((()=>this.endpointApi.addFileNews(t)));return this._draftData.mediaFile?(this._draftData.mediaFile.countFiles=this._draftData.mediaFile.countFiles+1,this._draftData.mediaFile.files.push(r)):this._draftData.mediaFile={countFiles:1,files:[r]},r}async delete(){if(!this.id)throw new r("Vous devez fournir un id pour supprimer une news.");const e={pathParams:{id:this.id}};await this.callIsConnected((()=>this.endpointApi.deleteNews(e))),this._draftData={},this._serverData=null,this._draftData.id=null,this._isDeleted=!0}}class v extends y{static entityType="organizations";static SCHEMA_CONSTANTS=["ADD_ORGANIZATION","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_ORGANIZATION","addOrganization"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of v.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of v.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addOrganization(e={}){return this.callIsConnected((()=>this.endpointApi.addOrganization(e)))}async getOrganizations(){throw new Error("getOrganizations n'existe pas dans Organization")}async getProjects(e={}){return super.getProjects(e)}async getEvents(){throw new Error("getEvents pas encore implémenté dans Organization")}async getPois(e={}){return super.getPois(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(e={}){return super.project(e)}async poi(e={}){return super.poi(e)}async event(e={}){return super.event(e)}async badge(e={}){return super.badge(e)}async news(e={}){return super.news(e)}}class E extends y{static entityType="poi";static SCHEMA_CONSTANTS=["ADD_POI","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_POI","addPoi"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of E.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of E.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addPoi(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addPoi(e)))}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents n'existe pas dans${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`event n'existe pas dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(e={}){return super.news(e)}}class T extends y{static entityType="projects";static SCHEMA_CONSTANTS=["ADD_PROJECT","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_PROJECT","addProject"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal,parent:e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{type:t?.type??null,name:t?.name??null}]))):null};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of T.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of T.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addProject(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addProject(e)))}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(e={}){return super.getProjects(e)}async getEvents(){throw new Error(`getEvents pas encore implémenté dans ${this.constructor.name}`)}async getPois(e={}){return super.getPois(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(e={}){return super.project(e)}async poi(e={}){return super.poi(e)}async event(e={}){return super.event(e)}async badge(e={}){return super.badge(e)}async news(e={}){return super.news(e)}}class S extends y{static entityType="citoyens";static SCHEMA_CONSTANTS=["UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};constructor(e,t={},n={}){if(!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!t?.id&&!t?.slug)throw new r("Vous devez fournir un id ou un slug pour créer un User.");if(!n.Organization)throw new r("Organization class must be injected.");if(!n.Project)throw new r("Project class must be injected.");if(!n.Event)throw new r("Event class must be injected.");if(!n.Poi)throw new r("Poi class must be injected.");if(!n.Badge)throw new r("Badge class must be injected.");if(!n.News)throw new r("News class must be injected.");super(e,t,n)}get slug(){return this._draftData.slug||null}get isMe(){return this.isConnected&&this.userId===this.id}async get(){return this.apiClient.safeCall((async()=>{if(this.isMe){const e=await this.endpointApi.meInfoUrl();return this._setData(e),e}{const e=await this.getPublicProfile();return this._setData(e),e}}))}async changePassword(e={}){return this.callIsMe((()=>this.endpointApi.changePassword(e)))}async delete(e={}){return this.callIsMe((()=>this.endpointApi.deleteAccount(e)))}async save(){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour sauvegarder.");await super.save()}async _add(){throw new r("Vous ne pouvez pas ajouter un utilisateur par ce moyen.")}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of S.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}static fromServerData(e,t,r){const n=new S(t.apiClient,e,r);n._serverData={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n._serverData,constant:S.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n._draftData=o,n.data=i,n}async updateSettings(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour les paramètres.");await super.updateSettings(e),await this.refresh()}async updateDescription(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour la description.");return super.updateDescription(e)}async updateInfo(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour les informations.");return super.updateInfo(e)}async updateSocial(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour les réseaux sociaux.");return super.updateSocial(e)}async updateLocality(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour la localité.");return super.updateLocality(e)}async updateSlug({slug:e}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour le slug.");return super.updateSlug({slug:e})}async updateImageProfil({profil_avatar:e}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour mettre à jour l'image de profil.");return super.updateImageProfil({profil_avatar:e})}async getOrganizations(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e);this.isMe||e.filters||(e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=r.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:r.count,results:o}}async getProjects(e={}){return super.getProjects(e)}async getPois(e={}){return super.getPois(e)}async getNews(e={}){return super.getNews(e)}async getFriends(e={}){delete e?.pathParams,this.isMe||(e.pathParams={id:this.id});const t=await this.endpointApi.getFriendsAdmin(e);if(!Array.isArray(t.results))throw new s("Erreur lors de la récupération des amis administrables.",500,t);const r=t.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:t?.count?.citoyens??0,results:r}}async getSubscriptions(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getSubscriptionsAdmin(e))):()=>this.endpointApi.getSubscriptions(e);this.isMe||e.filters||(e.filters={[`links.followers.${this.id}`]:{$exists:!0}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des abonnements.",500,r.results);const n=r.results.map((e=>this.linkEntity?.(e.collection,e)??e));return{count:r.count,results:n}}async getSubscribers(e={}){return super.getSubscribers(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getBadges(e={}){return await this.linkEntitiesFromServerData("badges",e)}async organization(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer une organisation.");return super.organization(e)}async project(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer un projet.");return super.project(e)}async news(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer une actualité.");return super.news(e)}async poi(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer un POI.");return super.poi(e)}async event(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer un événement.");return super.event(e)}async badge(e={}){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour créer un badge.");return super.badge(e)}}Object.assign(S.prototype,{});var $=__webpack_require__(7007);const O=(e,t)=>1===t?e:`${e}s`,P=e=>{if(""===e)return"$";const t=e.substring(1).split(/\//).map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~").replace(/\./g,"\\."))).map((e=>/^\d+$/.exec(e)?`[${e}]`:`.${e}`)).join("");return"$"+t},k=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},x=(e,t="and")=>0===e.length?"nothing":1===e.length?e[0]:2===e.length?`${e[0]} ${t} ${e[1]}`:`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`,A={"date-time":"date and time",time:"time",date:"date",email:"email address",hostname:"hostname",ipv4:"IPv4 address",ipv6:"IPv6 address",uri:"URI","uri-reference":"URI Reference","uri-template":"URI-template","json-pointer":"JSON Pointer","relative-json-pointer":"relative JSON Pointer",regex:"regular expression"},I={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class j extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...I,...t},this.pointer=e.instancePath,this.path=P(e.instancePath);const r=(({data:e,keyword:t,message:r,params:n,parentSchema:o,schemaPath:i,instancePath:s},{fieldLabels:a})=>{const c=(({instancePath:e,parentSchema:t},{fieldLabels:r})=>{switch(r){case"js":return""===e?"the root value":`the value at ${P(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${P(e)}`;case"jsonPointer":case"instancePath":return""===e?"the root value":`the value at ${e}`;case"title":return(null==t?void 0:t.title)?t.title:""===e?"the root value":`the value at ${e}`;default:throw new Error(`invalid fieldLabels value: ${r}`)}})({instancePath:s,parentSchema:o},{fieldLabels:a});if(null==o?void 0:o.errorMessage)return`${c} ${o.errorMessage}`;switch(t){case"enum":{const e=n.allowedValues.map(JSON.stringify);return`${c} must be one of: ${x(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=x(t,"or"),o=(e=>{const t=typeof e;switch(t){case"object":return null===e?"null":Array.isArray(e)?"an array":"an object";case"undefined":return"undefined";default:return`${k(t)} ${t}`}})(e);return`${c} must be ${k(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=O("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${O("character",o)}`}case"maxLength":{const t=n.limit,r=O("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${O("character",o)}`}case"pattern":{if(i.endsWith("propertyNames/pattern"))return null;const e=null==o?void 0:o.patternLabel;return e?`${c} must be ${e} but it was not`:`${c} is an invalid string`}case"format":return`${c} must be a valid ${A[n.format]||n.format} string but it was not`;case"multipleOf":return`${c} must be a multiple of ${n.multipleOf}`;case"minimum":return`${c} must be equal to or greater than ${n.limit}`;case"exclusiveMinimum":return`${c} must be greater than ${n.limit}`;case"maximum":return`${c} must be equal to or less than ${n.limit}`;case"exclusiveMaximum":return`${c} must be less than ${n.limit}`;case"additionalProperties":{const e=Object.keys(null==o?void 0:o.properties).join(", ");return`${c} has an unexpected property, ${n.additionalProperty}, which is not in the list of allowed properties (${e})`}case"required":return`${c} is missing the required field '${n.missingProperty}'`;case"propertyNames":return`${c} has an invalid property name ${JSON.stringify(n.propertyName)}`;case"minProperties":return`${c} must have ${n.limit} or more properties but it has ${Object.keys(e).length}`;case"maxProperties":return`${c} must have ${n.limit} or fewer properties but it has ${Object.keys(e).length}`;case"dependencies":{const e=n.property;return`${c} must have property ${n.missingProperty} when ${e} is present`}case"minItems":return`${c} must have ${n.limit} or more items but it has ${e.length}`;case"maxItems":return`${c} must have ${n.limit} or fewer items but it has ${e.length}`;case"uniqueItems":{const{i:e,j:t}=n;return`${c} must be unique but elements ${t} and ${e} are the same`}default:return`${c} ${r}`}})(e,this.options);var n;null!==r?(this.message=`${n=r,"string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1)}.`,this.options.includeOriginalError&&(this.original=e),this.options.includeData&&(this.data=e.data)):this.redundant=!0}toJSON(){const e={path:this.path,pointer:this.pointer,message:this.message};return this.options.includeOriginalError&&(e.original=this.original),this.options.includeData&&(e.data=this.data),e}}class N extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new j(e,t))).filter((e=>!e.redundant)),this.message=this.errors.map((e=>e.message)).join(" ")}toJSON(){return this.errors.map((e=>e.toJSON()))}*[Symbol.iterator](){for(const e of this.errors)yield e}}var C=__webpack_require__(3282),R=__webpack_require__(8182);function D(e,t){return function(){return e.apply(t,arguments)}}const{toString:L}=Object.prototype,{getPrototypeOf:M}=Object,z=(q=Object.create(null),e=>{const t=L.call(e);return q[t]||(q[t]=t.slice(8,-1).toLowerCase())});var q;const B=e=>(e=e.toLowerCase(),t=>z(t)===e),U=e=>t=>typeof t===e,{isArray:F}=Array,V=U("undefined"),G=B("ArrayBuffer"),K=U("string"),J=U("function"),H=U("number"),Z=e=>null!==e&&"object"==typeof e,W=e=>{if("object"!==z(e))return!1;const t=M(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Q=B("Date"),Y=B("File"),X=B("Blob"),ee=B("FileList"),te=B("URLSearchParams"),[re,ne,oe,ie]=["ReadableStream","Request","Response","Headers"].map(B);function se(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),F(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function ae(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,le=e=>!V(e)&&e!==ce,ue=(de="undefined"!=typeof Uint8Array&&M(Uint8Array),e=>de&&e instanceof de);var de;const pe=B("HTMLFormElement"),me=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),fe=B("RegExp"),he=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};se(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ye=B("AsyncFunction"),ge=(_e="function"==typeof setImmediate,we=J(ce.postMessage),_e?setImmediate:we?(be=`axios@${Math.random()}`,ve=[],ce.addEventListener("message",(({source:e,data:t})=>{e===ce&&t===be&&ve.length&&ve.shift()()}),!1),e=>{ve.push(e),ce.postMessage(be,"*")}):e=>setTimeout(e));var _e,we,be,ve;const Ee="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ce):"undefined"!=typeof process&&process.nextTick||ge,Te={isArray:F,isArrayBuffer:G,isBuffer:function(e){return null!==e&&!V(e)&&null!==e.constructor&&!V(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||J(e.append)&&("formdata"===(t=z(e))||"object"===t&&J(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&G(e.buffer),t},isString:K,isNumber:H,isBoolean:e=>!0===e||!1===e,isObject:Z,isPlainObject:W,isReadableStream:re,isRequest:ne,isResponse:oe,isHeaders:ie,isUndefined:V,isDate:Q,isFile:Y,isBlob:X,isRegExp:fe,isFunction:J,isStream:e=>Z(e)&&J(e.pipe),isURLSearchParams:te,isTypedArray:ue,isFileList:ee,forEach:se,merge:function e(){const{caseless:t}=le(this)&&this||{},r={},n=(n,o)=>{const i=t&&ae(r,o)||o;W(r[i])&&W(n)?r[i]=e(r[i],n):W(n)?r[i]=e({},n):F(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&se(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(se(t,((t,n)=>{r&&J(t)?e[n]=D(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 o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&M(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:z,kindOfTest:B,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(!H(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:pe,hasOwnProperty:me,hasOwnProp:me,reduceDescriptors:he,freezeMethods:e=>{he(e,((t,r)=>{if(J(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];J(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:ae,global:ce,isContextDefined:le,isSpecCompliantForm:function(e){return!!(e&&J(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Z(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=F(e)?[]:{};return se(e,((e,t)=>{const i=r(e,n+1);!V(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:ye,isThenable:e=>e&&(Z(e)||J(e))&&J(e.then)&&J(e.catch),setImmediate:ge,asap:Ee};function Se(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}Te.inherits(Se,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:Te.toJSONObject(this.config),code:this.code,status:this.status}}});const $e=Se.prototype,Oe={};["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=>{Oe[e]={value:e}})),Object.defineProperties(Se,Oe),Object.defineProperty($e,"isAxiosError",{value:!0}),Se.from=(e,t,r,n,o,i)=>{const s=Object.create($e);return Te.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Se.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Pe=Se;function ke(e){return Te.isPlainObject(e)||Te.isArray(e)}function xe(e){return Te.endsWith(e,"[]")?e.slice(0,-2):e}function Ae(e,t,r){return e?e.concat(t).map((function(e,t){return e=xe(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Ie=Te.toFlatObject(Te,{},null,(function(e){return/^is[A-Z]/.test(e)})),je=function(e,t,r){if(!Te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Te.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Te.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Te.isSpecCompliantForm(t);if(!Te.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Te.isDate(e))return e.toISOString();if(!a&&Te.isBlob(e))throw new Pe("Blob is not supported. Use a Buffer instead.");return Te.isArrayBuffer(e)||Te.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(Te.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Te.isArray(e)&&function(e){return Te.isArray(e)&&!e.some(ke)}(e)||(Te.isFileList(e)||Te.endsWith(r,"[]"))&&(a=Te.toArray(e)))return r=xe(r),a.forEach((function(e,n){!Te.isUndefined(e)&&null!==e&&t.append(!0===s?Ae([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!ke(e)||(t.append(Ae(o,r,i),c(e)),!1)}const u=[],d=Object.assign(Ie,{defaultVisitor:l,convertValue:c,isVisitable:ke});if(!Te.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Te.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),Te.forEach(r,(function(r,i){!0===(!(Te.isUndefined(r)||null===r)&&o.call(t,r,Te.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),u.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 Ce(e,t){this._pairs=[],e&&je(e,this,t)}const Re=Ce.prototype;Re.append=function(e,t){this._pairs.push([e,t])},Re.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 De=Ce;function Le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Me(e,t,r){if(!t)return e;const n=r&&r.encode||Le;Te.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Te.isURLSearchParams(t)?t.toString():new De(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ze=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){Te.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},qe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:De,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,Ve=Ue&&(!Fe||["ReactNative","NativeScript","NS"].indexOf(Fe.product)<0),Ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ke=Ue&&window.location.href||"http://localhost",Je={...t,...Be},He=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&Te.isArray(n)?n.length:i,a?(Te.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&Te.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&Te.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s)}if(Te.isFormData(e)&&Te.isFunction(e.entries)){const r={};return Te.forEachEntry(e,((e,n)=>{t(function(e){return Te.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},Ze={transitional:qe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Te.isObject(e);if(o&&Te.isHTMLForm(e)&&(e=new FormData(e)),Te.isFormData(e))return n?JSON.stringify(He(e)):e;if(Te.isArrayBuffer(e)||Te.isBuffer(e)||Te.isStream(e)||Te.isFile(e)||Te.isBlob(e)||Te.isReadableStream(e))return e;if(Te.isArrayBufferView(e))return e.buffer;if(Te.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return je(e,new Je.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Je.isNode&&Te.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Te.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return je(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(Te.isString(e))try{return(0,JSON.parse)(e),Te.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ze.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Te.isResponse(e)||Te.isReadableStream(e))return e;if(e&&Te.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 Pe.from(e,Pe.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:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],(e=>{Ze.headers[e]={}}));const We=Ze,Qe=Te.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"]),Ye=Symbol("internals");function Xe(e){return e&&String(e).trim().toLowerCase()}function et(e){return!1===e||null==e?e:Te.isArray(e)?e.map(et):String(e)}function tt(e,t,r,n,o){return Te.isFunction(n)?n.call(this,t,r):(o&&(t=r),Te.isString(t)?Te.isString(n)?-1!==t.indexOf(n):Te.isRegExp(n)?n.test(t):void 0:void 0)}class rt{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Xe(t);if(!o)throw new Error("header name must be a non-empty string");const i=Te.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=et(e))}const i=(e,t)=>Te.forEach(e,((e,r)=>o(e,r,t)));if(Te.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Te.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Qe[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(Te.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Xe(e)){const r=Te.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(Te.isFunction(t))return t.call(this,e,r);if(Te.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Xe(e)){const r=Te.findKey(this,e);return!(!r||void 0===this[r]||t&&!tt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Xe(e)){const o=Te.findKey(r,e);!o||t&&!tt(0,r[o],o,t)||(delete r[o],n=!0)}}return Te.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!tt(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Te.forEach(this,((n,o)=>{const i=Te.findKey(r,o);if(i)return t[i]=et(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=et(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Te.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Te.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[Ye]=this[Ye]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Xe(e);t[n]||(function(e,t){const r=Te.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return Te.isArray(e)?e.forEach(n):n(e),this}}rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(rt.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Te.freezeMethods(rt);const nt=rt;function ot(e,t){const r=this||We,n=t||r,o=nt.from(n.headers);let i=n.data;return Te.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function it(e){return!(!e||!e.__CANCEL__)}function st(e,t,r){Pe.call(this,null==e?"canceled":e,Pe.ERR_CANCELED,t,r),this.name="CanceledError"}Te.inherits(st,Pe,{__CANCEL__:!0});const at=st;function ct(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Pe("Request failed with status code "+r.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const lt=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];o||(o=c),r[i]=a,n[i]=c;let u=s,d=0;for(;u!==i;)d+=r[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),i-a)))},()=>r&&s(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},ut=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},dt=e=>(...t)=>Te.asap((()=>e(...t))),pt=Je.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Je.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Je.origin),Je.navigator&&/(msie|trident)/i.test(Je.navigator.userAgent)):()=>!0,mt=Je.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];Te.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Te.isString(n)&&s.push("path="+n),Te.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 ft(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 ht=e=>e instanceof nt?{...e}:e;function yt(e,t){t=t||{};const r={};function n(e,t,r,n){return Te.isPlainObject(e)&&Te.isPlainObject(t)?Te.merge.call({caseless:n},e,t):Te.isPlainObject(t)?Te.merge({},t):Te.isArray(t)?t.slice():t}function o(e,t,r,o){return Te.isUndefined(t)?Te.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Te.isUndefined(t))return n(void 0,t)}function s(e,t){return Te.isUndefined(t)?Te.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(ht(e),ht(t),0,!0)};return Te.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);Te.isUndefined(s)&&i!==a||(r[n]=s)})),r}const gt=e=>{const t=yt({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=nt.from(a),t.url=Me(ft(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Te.isFormData(n))if(Je.hasStandardBrowserEnv||Je.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(Je.hasStandardBrowserEnv&&(o&&Te.isFunction(o)&&(o=o(t)),o||!1!==o&&pt(t.url))){const e=i&&s&&mt.read(s);e&&a.set(i,e)}return t},_t="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=gt(e);let o=n.data;const i=nt.from(n.headers).normalize();let s,a,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:m}=n;function f(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=nt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());ct((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:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.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 Pe("Request aborted",Pe.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Pe("Network Error",Pe.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||qe;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Pe(t,o.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&Te.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),Te.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),d&&"json"!==d&&(h.responseType=n.responseType),m&&([c,u]=lt(m,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,l]=lt(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new at(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Je.protocols.indexOf(g)?r(new Pe("Unsupported protocol "+g+":",Pe.ERR_BAD_REQUEST,e)):h.send(o||null)}))},wt=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Pe?t:new at(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Pe(`timeout ${t} of ms exceeded`,Pe.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>Te.asap(s),a}},bt=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},vt=(e,t,r,n)=>{const o=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*bt(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Et="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Tt=Et&&"function"==typeof ReadableStream,St=Et&&("function"==typeof TextEncoder?($t=new TextEncoder,e=>$t.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $t;const Ot=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Pt=Tt&&Ot((()=>{let e=!1;const t=new Request(Je.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),kt=Tt&&Ot((()=>Te.isReadableStream(new Response("").body))),xt={stream:kt&&(e=>e.body)};var At;Et&&(At=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!xt[e]&&(xt[e]=Te.isFunction(At[e])?t=>t[e]():(t,r)=>{throw new Pe(`Response type '${e}' is not supported`,Pe.ERR_NOT_SUPPORT,r)})})));const It={http:null,xhr:_t,fetch:Et&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=gt(e);l=l?(l+"").toLowerCase():"text";let m,f=wt([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Pt&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=Te.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Te.isBlob(e))return e.size;if(Te.isSpecCompliantForm(e)){const t=new Request(Je.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Te.isArrayBufferView(e)||Te.isArrayBuffer(e)?e.byteLength:(Te.isURLSearchParams(e)&&(e+=""),Te.isString(e)?(await St(e)).byteLength:void 0)})(t):r})(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Te.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=ut(y,lt(dt(c)));n=vt(r.body,65536,e,t)}}Te.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;m=new Request(t,{...p,signal:f,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let i=await fetch(m);const s=kt&&("stream"===l||"response"===l);if(kt&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Te.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&ut(t,lt(dt(a),!0))||[];i=new Response(vt(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await xt[Te.findKey(xt,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{ct(t,r,{data:g,headers:nt.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:m})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Pe("Network Error",Pe.ERR_NETWORK,e,m),{cause:t.cause||t});throw Pe.from(t,t&&t.code,e,m)}})};Te.forEach(It,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const jt=e=>`- ${e}`,Nt=e=>Te.isFunction(e)||null===e||!1===e,Ct=e=>{e=Te.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Nt(r)&&(n=It[(t=String(r)).toLowerCase()],void 0===n))throw new Pe(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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(jt).join("\n"):" "+jt(e[0]):"as no adapter specified";throw new Pe("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function Rt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new at(null,e)}function Dt(e){return Rt(e),e.headers=nt.from(e.headers),e.data=ot.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ct(e.adapter||We.adapter)(e).then((function(t){return Rt(e),t.data=ot.call(e,e.transformResponse,t),t.headers=nt.from(t.headers),t}),(function(t){return it(t)||(Rt(e),t&&t.response&&(t.response.data=ot.call(e,e.transformResponse,t.response),t.response.headers=nt.from(t.response.headers))),Promise.reject(t)}))}const Lt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Lt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Mt={};Lt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Pe(n(o," has been removed"+(t?" in "+t:"")),Pe.ERR_DEPRECATED);return t&&!Mt[o]&&(Mt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Lt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const zt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Pe("options must be an object",Pe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Pe("option "+i+" must be "+r,Pe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Pe("Unknown option "+i,Pe.ERR_BAD_OPTION)}},validators:Lt},qt=zt.validators;class Bt{constructor(e){this.defaults=e,this.interceptors={request:new ze,response:new ze}}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=yt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&zt.assertOptions(r,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean)},!1),null!=n&&(Te.isFunction(n)?t.paramsSerializer={serialize:n}:zt.assertOptions(n,{encode:qt.function,serialize:qt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),zt.assertOptions(t,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Te.merge(o.common,o[t.method]);o&&Te.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=nt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.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=[Dt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let p=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Dt.call(this,p)}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 Me(ft((e=yt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Te.forEach(["delete","get","head","options"],(function(e){Bt.prototype[e]=function(t,r){return this.request(yt(r||{},{method:e,url:t,data:(r||{}).data}))}})),Te.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(yt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Bt.prototype[e]=t(),Bt.prototype[e+"Form"]=t(!0)}));const Ut=Bt;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,o){r.reason||(r.reason=new at(e,n,o),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 Vt=Ft,Gt={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(Gt).forEach((([e,t])=>{Gt[t]=e}));const Kt=Gt,Jt=function e(t){const r=new Ut(t),n=D(Ut.prototype.request,r);return Te.extend(n,Ut.prototype,r,{allOwnKeys:!0}),Te.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(yt(t,r))},n}(We);Jt.Axios=Ut,Jt.CanceledError=at,Jt.CancelToken=Vt,Jt.isCancel=it,Jt.VERSION="1.8.4",Jt.toFormData=je,Jt.AxiosError=Pe,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return Te.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=yt,Jt.AxiosHeaders=nt,Jt.formToJSON=e=>He(Te.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Ct,Jt.HttpStatusCode=Kt,Jt.default=Jt;const Ht=Jt;var Zt=__webpack_require__(1111);const Wt="axios-retry";function Qt(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&Zt(e)}const Yt=["get","head","options"],Xt=Yt.concat(["put","delete"]);function er(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function tr(e){return!!e.config?.method&&er(e)&&-1!==Xt.indexOf(e.config.method)}function rr(e){return Qt(e)||tr(e)}function nr(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 or={retries:3,retryCondition:rr,retryDelay:function(e=0,t=void 0){return Math.max(0,nr(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function ir(e,t,r=!1){const n=function(e,t){return{...or,...t,...e[Wt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[Wt]=n,n}const sr=(e,t)=>{const r=e.interceptors.request.use((e=>(ir(e,t,!0),e[Wt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const o=ir(n,t);return r.response&&o.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if("object"==typeof o)try{return!1!==await o}catch(e){return!1}return o}(o,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:s}=t,a=o(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),!i&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,o=n.timeout-e-a;if(o<=0)return Promise.reject(r);n.timeout=o}return n.transformRequest=[e=>e],await s(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(o),t(e(n))},o=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,o,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(o,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};sr.isNetworkError=Qt,sr.isSafeRequestError=function(e){return!!e.config?.method&&er(e)&&-1!==Yt.indexOf(e.config.method)},sr.isIdempotentRequestError=tr,sr.isNetworkOrIdempotentRequestError=rr,sr.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,nr(t));return o+.2*o*Math.random()},sr.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,nr(r))}},sr.isRetryableError=er;const ar=sr;var cr=__webpack_require__(6022);class lr extends Error{}lr.prototype.name="InvalidTokenError";var ur=__webpack_require__(4874);const dr={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!dr._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof dr.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new dr.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()}}},pr=dr,mr={common1:{type:"string"},common2:{format:"email",type:"string"},common3:{type:"boolean"},common4:{format:"uri",type:"string"},common5:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common6:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},required:["id"],type:"object"},common7:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},common8:{additionalProperties:!1,properties:{reason:{default:"",type:"string"}},required:["reason"],type:"object"},common9:{reason:{default:"",type:"string"}},common10:{default:"",type:"string"},common11:{pattern:"^[a-f0-9]{24}$",type:"string"},common12:{const:"citoyens"},common13:{properties:{value:{type:"boolean"}}},common14:{value:{type:"boolean"}},common15:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},common16:{},common17:{else:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}}},common18:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},common19:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},common20:{properties:{typeElement:{const:"citoyens"}}},common21:{typeElement:{const:"citoyens"}},common22:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}},common23:{not:{type:"null"}},common24:{type:"null"},common25:{default:"citoyens",enum:["citoyens","projects","organizations","poi"],type:"string"},common26:{anyOf:[{items:{type:"string"},type:"array"},{enum:[""],type:"string"}]},common27:{items:{type:"string"},type:"array"},common28:{enum:[""],type:"string"},common29:{properties:{name:{not:{type:"null"}}},required:["name"]},common30:{name:{not:{type:"null"}}},common31:{properties:{url:{not:{type:"null"}}},required:["url"]},common32:{url:{not:{type:"null"}}},common33:{properties:{tags:{not:{type:"null"}}},required:["tags"]},common34:{tags:{not:{type:"null"}}},common35:{properties:{email:{not:{type:"null"}}},required:["email"]},common36:{email:{not:{type:"null"}}},common37:{const:"info",default:"info",type:"string"},common38:{$ref:"#/$defs/sharedFields/email"},common39:{$ref:"#/$defs/sharedFields/name"},common40:{$ref:"#/$defs/sharedFields/tags"},common41:{default:"citoyens",enum:["citoyens"],type:"string"},common42:{$ref:"#/$defs/sharedFields/url"},common43:{const:"projects"},common44:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type","name"],type:"object"},common45:{name:{type:"string"},type:{type:"string"}},common46:{const:"organizations"},common47:{properties:{type:{not:{type:"null"}}},required:["type"]},common48:{type:{not:{type:"null"}}},common49:{enum:["link","tool","machine","software","rh","Resource material","Financial Ressource","ficheBlanche","geoJson","compostPickup","video","sharedLibrary","recoveryCenter","trash","history","something2See","funPlace","place","artPiece","streetArts","openScene","stand","parking","other"],type:"string"},common50:{enum:["poi"],type:"string"},common51:{$ref:"#/$defs/socialField"},common52:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},common53:{id:{pattern:"^[a-f0-9]{24}$"}},common54:{pattern:"^[a-f0-9]{24}$"},common55:{additionalProperties:!1,properties:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],type:"object"},common56:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},common57:{const:"PostalAddress",type:"string"},common58:{minLength:0,type:"string"},common59:{additionalProperties:!1,properties:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],type:"object"},common60:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},common61:{const:"GeoCoordinates",type:"string"},common62:{type:["string","number"]},common63:{additionalProperties:!0,properties:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},required:["type","coordinates","float"],type:"object"},common64:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},common65:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},common66:{type:"number"},common67:{const:!0,default:!0,type:"boolean"},common68:{const:"Point",type:"string"},common69:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common70:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common71:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"},common72:{maxLength:100,minLength:3,pattern:"^[a-zA-Z0-9]+$",type:"string"},common73:{properties:{type:{const:"citoyens"}}},common74:{type:{const:"citoyens"}},common75:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},common76:{ownerId:{pattern:"^[a-f0-9]{24}$"}},common77:{properties:{folder:{const:"citoyens"}}},common78:{folder:{const:"citoyens"}},common79:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common80:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common81:{properties:{parentId:{pattern:"^[a-f0-9]{24}$"}}},common82:{parentId:{pattern:"^[a-f0-9]{24}$"}},common83:{properties:{parentType:{const:"citoyens"}}},common84:{parentType:{const:"citoyens"}},common85:{properties:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common86:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common87:{default:!0,type:"boolean"},common88:{default:0,type:"integer"},common89:{required:["text"]},common90:{required:["mediaImg"]},common91:{required:["mediaFile"]},common92:{additionalProperties:!1,properties:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},required:["countFiles","files"],type:"object"},common93:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},common94:{additionalProperties:!1,properties:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},required:["countImages","images"],type:"object"},common95:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},common96:{items:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",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"},common97:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common98:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common99:{minimum:1,type:"integer"},common100:{default:"public",enum:["public","private","restricted"],type:"string"},common101:{const:"news",default:"news",type:"string"},common102:{additionalProperties:!1,else:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{folder:{const:"citoyens"}}},properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},required:["folder","ownerId"],then:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common103:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},common104:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},required:["id"],type:"object"},common105:{default:!1,type:"boolean"},common106:{properties:{childId:{pattern:"^[a-f0-9]{24}$"}}},common107:{childId:{pattern:"^[a-f0-9]{24}$"}},common108:{properties:{childType:{const:"citoyens"}}},common109:{childType:{const:"citoyens"}},common110:{const:"share",default:"share",type:"string"},common111:{properties:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common112:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common113:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},required:["type","id"],type:"object"},common114:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},common115:{default:"news",enum:["news"],type:"string"},common116:{items:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",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"},common117:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common118:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common119:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],type:"string"},common120:{const:!1,default:!1,type:"boolean"},common121:{const:"",default:"",type:"string"},common122:{additionalProperties:!1,properties:{indexMax:{type:"number"},indexMin:{type:"number"}},required:["indexMin","indexMax"],type:"object"},common123:{indexMax:{type:"number"},indexMin:{type:"number"}},common124:{default:0,minimum:0,type:"integer"},common125:{const:["projects"],default:["projects"],items:{enum:["projects"],type:"string"},type:"array"},common126:{enum:["projects"],type:"string"},common127:{$exists:!0},common128:{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},common129:{$exists:{const:!0}},common130:{const:!0},common131:{default:30,type:"integer"},common132:{additionalProperties:!1,else:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{type:{const:"citoyens"}}},properties:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},required:["type","id"],then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common133:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},common134:{const:["poi"],default:["poi"],items:{enum:["poi"],type:"string"},type:"array"},common135:{const:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],default:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],items:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},type:"array"},common136:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},common137:{$exists:!1},common138:{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},common139:{$exists:{const:!1}},common140:{const:!1},common141:{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"},common142:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common143:{additionalProperties:!1,properties:{$exists:{default:!1,type:"boolean"}},required:["$exists"],type:"object"},common144:{$exists:{default:!1,type:"boolean"}},common145:{additionalProperties:!1,properties:{$in:{items:{type:"string"},minItems:1,type:"array"}},required:["$in"],type:"object"},common146:{$in:{items:{type:"string"},minItems:1,type:"array"}},common147:{items:{type:"string"},minItems:1,type:"array"},common148:{const:["citoyens"],default:["citoyens"],items:{enum:["citoyens"],type:"string"},type:"array"},common149:{enum:["citoyens"],type:"string"},common150:{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"},common151:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},common152:{not:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common153:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common154:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common155:{"^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"}},common156:{not:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common157:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common158:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common159:{const:["badges"],default:["badges"],items:{enum:["badges"],type:"string"},type:"array"},common160:{enum:["badges"],type:"string"},common161:{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"},common162:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common163:{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"},common164:{$exists:{const:!0,type:"boolean"}},common165:{const:!0,type:"boolean"},common166:{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},common167:{$exists:{const:!1,type:"boolean"}},common168:{const:!1,type:"boolean"},common169:{"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"}},common170:{indexMax:30,indexMin:0},common171:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},common172:{properties:{connectType:{const:"friend",default:"friend"}}},common173:{connectType:{const:"friend",default:"friend"}},common174:{const:"friend",default:"friend"},common175:{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},common176:{properties:{parentType:{const:"organizations"}}},common177:{parentType:{const:"organizations"}},common178:{properties:{connectType:{enum:["admin","member"]}}},common179:{connectType:{enum:["admin","member"]}},common180:{enum:["admin","member"]},common181:{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},common182:{properties:{parentType:{const:"projects"}}},common183:{parentType:{const:"projects"}},common184:{properties:{connectType:{enum:["admin","contributor"]}}},common185:{connectType:{enum:["admin","contributor"]}},common186:{enum:["admin","contributor"]},common187:{properties:{parentType:{const:"events"}}},common188:{parentType:{const:"events"}},common189:{const:"events"},common190:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},common191:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},common192:{enum:["citoyens","organizations","projects","events"],type:"string"},common193:{const:"citoyens",default:"citoyens",type:"string"},common194:{const:"@userId",default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common195:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},required:["isOpenData","isOpenEdition"],type:"object"},common196:{isOpenData:!0,isOpenEdition:!0},common197:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},common198:{additionalProperties:!1,default:{"@userId":{type:"citoyens"}},patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},type:"object"},common199:{"@userId":{type:"citoyens"}},common200:{type:"citoyens"},common201:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},common202:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},common203:{const:"poi",default:"poi",type:"string"},common204:{const:"events",default:"events",type:"string"},common205:{format:"date-time",type:"string"},common206:{pattern:"^([01]\\d|2[0-3]):[0-5]\\d$",type:"string"},common207:{enum:["workshop","competition","concert","contest","conference","debate","exhibition","festival","crowdfunding","fair","course","protest","market","film","getTogether","meeting","spectacle","internship","stand","others"],type:"string"},common208:{type:"integer"},common209:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},common210:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},required:["type","id"],type:"object"},common211:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},common212:{const:"badges",default:"badges",type:"string"},common213:{const:"badge",default:"badge",type:"string"},common214:{patternProperties:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},type:"object"},common215:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},common216:{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"},common217:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},common218:{default:"",enum:["","admin"],type:"string"}},fr=[{auth:"none",constant:"PERSON_REGISTER",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/register",request:{additionalProperties:!1,properties:{app:mr.common1,email:mr.common2,isInvitation:mr.common3,mode:mr.common1,name:mr.common1,pendingUserId:mr.common1,pwd:mr.common1,username:mr.common1},required:["name","username","email","pwd"],type:"object"}},{auth:"none",constant:"AUTHENTICATE_URL",contentType:"application/json",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/api/cocolight/authenticate",postActions:[{path:"accessToken",type:"setToken"},{path:"refreshToken",type:"setRefreshToken"},{event:"userLoggedIn",path:"user",type:"emitEvent"}],request:{additionalProperties:!1,properties:{email:mr.common2,password:mr.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:mr.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",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/sendemail",request:{additionalProperties:!1,properties:{email:mr.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:mr.common4},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:mr.common1,newPassword2:mr.common1,oldPassword:mr.common1,scope:{default:"",type:["string"]},userId:mr.common5},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:mr.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:mr.common8},{auth:"bearer",constant:"UPDATE_SETTINGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatesettings",request:{additionalProperties:!1,allOf:[{else:{properties:{idEntity:mr.common11}},if:{properties:{typeEntity:mr.common12}},then:{properties:{idEntity:mr.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:mr.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:mr.common12}},then:mr.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:mr.common12}}},then:mr.common13}],properties:{idEntity:mr.common1,type:mr.common1,typeEntity:mr.common15,value:mr.common16},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:[mr.common17,{anyOf:[{properties:{description:mr.common23},required:["description"]},{properties:{shortDescription:mr.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:mr.common10,description:mr.common1,id:mr.common1,scope:{default:"",type:["string","null"]},shortDescription:mr.common1,typeElement:mr.common25},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:mr.common2,name:mr.common1,tags:mr.common26,url:mr.common4}},allOf:[{if:mr.common20,then:{additionalProperties:!1,anyOf:[mr.common29,{properties:{birthDate:mr.common23},required:["birthDate"]},{properties:{fixe:mr.common23},required:["fixe"]},{properties:{mobile:mr.common23},required:["mobile"]},mr.common31,mr.common33,mr.common35],properties:{birthDate:{format:"date",type:"string"},block:mr.common37,email:mr.common38,fixe:mr.common1,id:mr.common5,mobile:mr.common1,name:mr.common39,scope:mr.common10,tags:mr.common40,typeElement:mr.common41,url:mr.common42}}},{if:{properties:{typeElement:mr.common43}},then:{additionalProperties:!1,anyOf:[mr.common29,mr.common31,mr.common33,mr.common35,{properties:{avancement:mr.common23},required:["avancement"]},{properties:{parent:mr.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:mr.common37,email:mr.common38,id:mr.common1,name:mr.common39,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":mr.common44},type:"object"},scope:mr.common10,tags:mr.common40,typeElement:{default:"citoyens",enum:["projects"],type:"string"},url:mr.common42}}},{if:{properties:{typeElement:mr.common46}},then:{additionalProperties:!1,anyOf:[mr.common29,mr.common31,mr.common33,mr.common35,mr.common47],properties:{block:mr.common37,email:mr.common38,id:mr.common1,name:mr.common39,scope:mr.common10,tags:mr.common40,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:{enum:["organizations"],type:"string"},url:mr.common42}}},{if:{properties:{typeElement:{const:"poi"}}},then:{additionalProperties:!1,anyOf:[mr.common29,mr.common31,mr.common33,mr.common35,mr.common47,{properties:{urls:mr.common23},required:["urls"]}],properties:{block:mr.common37,email:mr.common38,id:mr.common1,name:mr.common39,scope:mr.common10,tags:mr.common40,type:mr.common49,typeElement:mr.common50,url:mr.common42,urls:mr.common27}}}],properties:{block:mr.common37,id:mr.common1,scope:mr.common10,typeElement:mr.common25},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:[mr.common28,mr.common4]}},allOf:[mr.common17,{anyOf:[{properties:{gitlab:mr.common23},required:["gitlab"]},{properties:{github:mr.common23},required:["github"]},{properties:{twitter:mr.common23},required:["twitter"]},{properties:{facebook:mr.common23},required:["facebook"]},{properties:{instagram:mr.common23},required:["instagram"]},{properties:{diaspora:mr.common23},required:["diaspora"]},{properties:{mastodon:mr.common23},required:["mastodon"]},{properties:{telegram:mr.common23},required:["telegram"]},{properties:{signal:mr.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:mr.common51,facebook:mr.common51,github:mr.common51,gitlab:mr.common51,id:mr.common1,instagram:mr.common51,mastodon:mr.common51,scope:mr.common10,signal:mr.common51,telegram:mr.common51,twitter:mr.common51,typeElement:mr.common15},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:{else:mr.common52,if:mr.common20,properties:{address:mr.common55,block:{const:"localities",default:"localities",type:"string"},geo:mr.common59,geoPosition:mr.common63,id:mr.common1,scope:mr.common10,typeElement:mr.common25},required:["block","typeElement","id","address"],then:mr.common69,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:mr.common52,if:mr.common20,properties:{block:mr.common37,id:mr.common1,scope:mr.common10,slug:mr.common72,typeElement:mr.common25},required:["block","typeElement","id","slug"],then:mr.common69,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:mr.common52,if:mr.common73,properties:{block:mr.common37,id:mr.common1,slug:mr.common72,type:mr.common15},required:["block","type","id","slug"],then:mr.common69,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:{additionalProperties:!1,else:mr.common75,if:mr.common77,properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations","events","poi"],type:"string"},ownerId:mr.common1},required:["folder","ownerId"],then:mr.common79,type:"object"},request:{additionalProperties:!1,properties:{profil_avatar:mr.common16},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,else:mr.common52,if:mr.common73,properties:{id:mr.common1,type:{default:"citoyens",enum:["citoyens","projects","organizations","events","poi","badges"],type:"string"}},required:["type","id"],then:mr.common69,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,else:mr.common81,if:mr.common83,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:mr.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:mr.common1,parentType:mr.common15},required:["parentId","parentType","listInvite"],then:mr.common85,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/true",pathParams:{additionalProperties:!1,else:mr.common52,if:mr.common73,properties:{id:mr.common1,isLive:mr.common87,type:mr.common15},required:["isLive","type","id"],then:mr.common69,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:mr.common88,indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:mr.common10},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:{items:mr.common11,type:"array"}},required:["ids"],type:"object"}},{auth:"bearer",constant:"ADD_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/save",request:{additionalProperties:!1,anyOf:[mr.common89,mr.common90,mr.common91],else:mr.common81,if:mr.common83,properties:{json:mr.common67,markdownActive:mr.common87,mediaFile:mr.common92,mediaImg:mr.common94,mentions:mr.common96,parentId:mr.common1,parentType:mr.common15,scope:mr.common100,tags:mr.common26,text:mr.common1,type:mr.common101},required:["scope","markdownActive","parentId","parentType","type","json"],then:mr.common85,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:mr.common102,request:{additionalProperties:!1,properties:{newsImage:mr.common16},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:mr.common102,request:{additionalProperties:!1,properties:{newsFile:mr.common16},required:["newsFile"],type:"object"}},{auth:"bearer",constant:"DELETE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/delete/id/{id}",pathParams:mr.common104,request:{additionalProperties:!1,properties:{isLive:mr.common105},required:["isLive"],type:"object"}},{auth:"bearer",constant:"UPDATE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/update",request:{additionalProperties:!1,anyOf:[mr.common89,mr.common90,mr.common91],else:mr.common81,if:mr.common83,properties:{idNews:mr.common11,markdownActive:mr.common87,mediaFile:mr.common92,mediaImg:mr.common94,mentions:mr.common96,parentId:mr.common1,parentType:mr.common15,scope:mr.common100,tags:mr.common26,text:mr.common1,type:mr.common101},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:mr.common85,type:"object"}},{auth:"bearer",constant:"SHARE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:mr.common106,if:mr.common108,properties:{childId:mr.common11,childType:mr.common15,comment:mr.common1,connectType:mr.common110,parentId:mr.common11,parentType:mr.common101},required:["parentId","parentType","childId","childType","connectType"],then:mr.common111,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:mr.common113},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:mr.common10,contextId:mr.common11,contextType:mr.common115,mentions:mr.common116,parentCommentId:mr.common11,path:mr.common10,text:mr.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:mr.common104},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:mr.common11,params:{properties:{mentions:mr.common116,text:mr.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:mr.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:mr.common113},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:mr.common67,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:mr.common119,type:"array"},fediverse:mr.common120,filters:mr.common121,indexMin:{const:0,default:0,type:"number"},indexStep:mr.common66,initType:mr.common121,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:mr.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:mr.common1,notSourceKey:mr.common67,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":mr.common122},type:"object"},searchTags:mr.common27,searchType:{items:mr.common119,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:mr.common121,name:mr.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:mr.common124,name:mr.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:mr.common67,countType:mr.common125,fediverse:mr.common120,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":mr.common127,"parent.@userId":mr.common127},"links.contributors.@userId":mr.common127},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128},type:"object"}},required:["$or"],type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common125},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:mr.common132,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common125,fediverse:mr.common120,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":mr.common127,"parent.@{pathParams.id}":mr.common127},"links.contributors.@{pathParams.id}":mr.common127},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128},type:"object"}},required:["$or"],type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common125},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:mr.common67,countType:mr.common134,fediverse:mr.common120,filters:{additionalProperties:!1,default:{"parent.@userId":mr.common127},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common134},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:mr.common132,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common134,fediverse:mr.common120,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":mr.common127},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common134},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:mr.common67,countType:mr.common135,fediverse:mr.common120,filters:{additionalProperties:!1,default:{"links.members.@userId":mr.common127,"links.members.@userId.isInviting":mr.common137,"links.members.@userId.toBeValidated":mr.common137},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":mr.common138,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":mr.common138},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common135},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,else:mr.common52,if:mr.common73,properties:{id:mr.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:mr.common69,type:"object"},request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common135,fediverse:mr.common120,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":mr.common127,"links.members.@{pathParams.id}.isInviting":mr.common137,"links.members.@{pathParams.id}.toBeValidated":mr.common137},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":mr.common138,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":mr.common138},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common135},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:mr.common67,countType:mr.common141,fediverse:mr.common120,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+)$":mr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":mr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":mr.common143,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":mr.common145,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":mr.common138},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common141},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:mr.common104,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common141,fediverse:mr.common120,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}":mr.common127,"links.memberOf.@{pathParams.id}.isInviting":mr.common137,"links.memberOf.@{pathParams.id}.toBeValidated":mr.common137},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":mr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":mr.common143,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":mr.common145,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":mr.common143},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common141},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:mr.common6,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common148,fediverse:mr.common120,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}":mr.common127,"links.friends.@{pathParams.id}.isInviting":mr.common137,"links.friends.@{pathParams.id}.toBeValidated":mr.common137},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":mr.common143,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":mr.common143},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common148},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:mr.common67,countType:mr.common150,fediverse:mr.common120,filters:{additionalProperties:!1,allOf:[mr.common152],default:{"links.followers.@userId":mr.common127,"links.followers.@{userId}.isInviting":mr.common137,"links.followers.@{userId}.toBeValidated":mr.common137},patternProperties:mr.common155,type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common150},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:mr.common6,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common150,fediverse:mr.common120,filters:{additionalProperties:!1,allOf:[mr.common152],default:{"links.followers.@{pathParams.id}":mr.common127,"links.followers.@{pathParams.id}.isInviting":mr.common137,"links.followers.@{pathParams.id}.toBeValidated":mr.common137},patternProperties:mr.common155,type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common150},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:mr.common67,countType:mr.common148,fediverse:mr.common120,filters:{additionalProperties:!1,allOf:[mr.common156],default:{"links.follows.@userId":mr.common127,"links.follows.@{userId}.isInviting":mr.common137,"links.follows.@{userId}.toBeValidated":mr.common137},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":mr.common138,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":mr.common138},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common148},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:[{else:mr.common52,if:mr.common73,then:mr.common69}],properties:{id:mr.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common148,fediverse:mr.common120,filters:{additionalProperties:!1,allOf:[mr.common156],default:{"links.follows.@{pathParams.id}":mr.common127},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common148},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:mr.common67,countType:mr.common141,fediverse:mr.common120,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+)$":mr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":mr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":mr.common143,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":mr.common145,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":mr.common138},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common141},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:mr.common104,request:{additionalProperties:!1,properties:{count:mr.common67,countType:mr.common141,fediverse:mr.common120,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}":mr.common127,"links.projects.@{pathParams.id}.isInviting":mr.common137,"links.projects.@{pathParams.id}.toBeValidated":mr.common137},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":mr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":mr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":mr.common143,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":mr.common145,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":mr.common143},type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common141},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:mr.common67,countType:mr.common159,fediverse:mr.common120,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common128},type:"object"},isParcours:mr.common3,"preferences.private":mr.common120},required:["preferences.private"],type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,searchType:mr.common159},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:mr.common67,countType:mr.common161,fediverse:mr.common120,fields:mr.common159,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common163}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":mr.common163,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":mr.common166,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":mr.common166}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:mr.common169},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:mr.common169,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":mr.common165}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":mr.common163}}],type:"object"},indexMin:mr.common124,indexStep:mr.common131,initType:mr.common121,locality:mr.common121,name:mr.common1,notSourceKey:mr.common67,ranges:{additionalProperties:!1,default:{Cooperative:mr.common170,GovernmentOrganization:mr.common170,Group:mr.common170,LocalBusiness:mr.common170,NGO:mr.common170,citoyens:mr.common170,projects:mr.common170},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":mr.common122},type:"object"},searchType:mr.common161},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:{additionalProperties:!1,allOf:[mr.common171,mr.common175,mr.common181,{if:mr.common187,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:mr.common190,childType:mr.common191,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:mr.common11,parentType:mr.common192},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"bearer",constant:"DISCONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/disconnect",request:{additionalProperties:!1,allOf:[mr.common171,mr.common175,mr.common181,{if:mr.common187,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:mr.common190,childType:mr.common191,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:mr.common11,parentType:mr.common192},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_KEY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/getinfo/key/{slug}",pathParams:{additionalProperties:!1,properties:{slug:{pattern:"^([a-zA-Z0-9-_]+)$",type:"string"}},required:["slug"],type:"object"}},{auth:"bearer",constant:"GET_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/config/type/citoyens/id/{id}/json/true",pathParams:mr.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:mr.common66},type:"object"},request:{additionalProperties:!1,properties:{collection:mr.common193,id:mr.common194,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:mr.common121},required:["id","collection","path","pull","value"],type:"object"}},{auth:"bearer",constant:"ADD_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue",request:{additionalProperties:!1,properties:{arrayForm:mr.common165,collection:mr.common193,id:mr.common194,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:mr.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:mr.common45,required:["name","type"]}},type:"object"},name:mr.common1,tags:mr.common27,url:mr.common1},required:["url","name"],type:"object"}},required:["id","collection","path","arrayForm","value"],type:"object"}},{auth:"bearer",constant:"ADD_ORGANIZATION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:mr.common55,collection:{const:"organizations",default:"organizations",type:"string"},email:mr.common2,geo:mr.common59,geoPosition:mr.common63,id:mr.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:mr.common195,role:{enum:["admin","member"],type:"string"},scope:mr.common121,shortDescription:mr.common1,tags:mr.common27,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:mr.common4},required:["id","collection","key","name","type","role","scope"],type:"object"}},{auth:"bearer",constant:"ADD_PROJECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:mr.common55,collection:{const:"projects",default:"projects",type:"string"},geo:mr.common59,geoPosition:mr.common63,id:mr.common11,key:{const:"project",default:"project",type:"string"},name:mr.common1,parent:mr.common198,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:mr.common87,isOpenData:mr.common105,isOpenEdition:mr.common105},required:["isOpenData","isOpenEdition"],type:"object"},public:mr.common87,scope:mr.common121,shortDescription:mr.common1,tags:mr.common27,url:mr.common4},required:["id","collection","key","parent","name","public","scope"],type:"object"}},{auth:"bearer",constant:"ADD_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:mr.common55,collection:mr.common203,description:mr.common1,geo:mr.common59,geoPosition:mr.common63,id:mr.common11,key:mr.common203,name:mr.common1,parent:mr.common198,scope:mr.common121,tags:mr.common27,type:mr.common49,urls:mr.common27},required:["id","collection","key","parent","type","name"],type:"object"}},{auth:"bearer",constant:"ADD_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,else:{required:["openingHours"]},if:{properties:{recurrency:mr.common140}},properties:{address:mr.common55,collection:mr.common204,email:mr.common2,endDate:mr.common205,geo:mr.common59,geoPosition:mr.common63,id:mr.common11,key:{const:"event",default:"event",type:"string"},name:mr.common1,openingHours:{default:["","","","","","",""],items:{anyOf:[{const:"",type:"string"},{additionalProperties:!1,properties:{dayOfWeek:{enum:["Mo","Tu","We","Th","Fr","Sa","Su"],type:"string"},hours:{default:[],items:{additionalProperties:!1,properties:{closes:mr.common206,opens:mr.common206},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:mr.common198,parent:{additionalProperties:!1,patternProperties:mr.common201,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:mr.common105,isOpenEdition:mr.common105},required:["isOpenData","isOpenEdition"],type:"object"},public:mr.common87,recurrency:mr.common105,scope:mr.common121,shortDescription:mr.common1,startDate:mr.common205,tags:mr.common27,timeZone:mr.common1,type:mr.common207,url:mr.common4},required:["id","collection","key","organizer","type","name","scope"],startBeforeEnd:!0,then:{required:["startDate","endDate"]},type:"object"}},{auth:"bearer",constant:"DELETE_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/poi/id/{id}",pathParams:mr.common104,request:mr.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:mr.common104,request:mr.common8},{auth:"bearer",constant:"DELETE_ELEMENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/{type}/id/{id}",pathParams:{additionalProperties:!1,properties:{id:mr.common11,type:mr.common1},required:["type","id"],type:"object"},request:mr.common8},{auth:"bearer",constant:"ADD_IMAGE_ELEMENT",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/qqfile/docType/image/contentKey/profil",pathParams:{additionalProperties:!1,properties:{folder:{enum:["badges","events"],type:"string"},ownerId:mr.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:mr.common16,qqfilename:mr.common1,qqtotalfilesize:mr.common208,qquuid:mr.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}},{auth:"bearer",constant:"LINK_VALIDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/validate",request:{additionalProperties:!1,properties:{childId:mr.common209,childType:mr.common41,linkOption:{enum:["isInviting","toBeValidated","isAdminPending"],type:"string"},parentId:mr.common11,parentType:mr.common192},required:["childId","childType","parentType","parentId"],type:"object"}},{auth:"none",constant:"SEARCH_MEMBER_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/searchmemberautocomplete",request:{additionalProperties:!1,properties:{search:mr.common1,searchMode:{default:"personOnly",enum:["personOnly","organizationOnly","mixte"],type:"string"}},required:["search","searchMode"],type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:mr.common210,request:{additionalProperties:!1,properties:{indexMin:mr.common88},type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS_COUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:mr.common210,request:{additionalProperties:!1,properties:{refreshTimestamp:mr.common208},type:"object"}},{auth:"bearer",constant:"NOTIFICATION_UPDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/update",request:{additionalProperties:!1,properties:{action:{enum:["seen","read"],type:"string"},all:mr.common67},required:["action","all"],type:"object"}},{auth:"bearer",constant:"REMOVE_ALL_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/removeall"},{auth:"bearer",constant:"MARK_NOTIFICATION_AS_READ",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/marknotificationasread",request:mr.common104},{auth:"none",constant:"ACTIVITYPUB_SEARCH",contentType:"application/x-www-form-urlencoded",method:"GET",params:[mr.common16],path:"/api/activitypub/search?address={address}",pathParams:{additionalProperties:!1,properties:{address:mr.common1},required:["address"],type:"object"}},{auth:"bearer",constant:"ACTIVITYPUB_LINK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/link",request:{additionalProperties:!1,properties:{action:{enum:["undo_follow","accept_invitation","reject_invitation","undo_accept","undo_request_follow","follow","remove_follow","accept_follower","reject_follower","remove_follower","remove_invitation"],type:"string"},actor:{additionalProperties:!1,properties:{id:mr.common1,name:mr.common1,type:{enum:["person"],type:"string"}},required:["id","type","name"],type:"object"},payload:mr.common4},required:["action","payload","actor"],type:"object"}},{auth:"none",constant:"ACTIVITYPUB_GET_COMMUNITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/getcommunity/userId/${userId}/type/${type}/actor/person",pathParams:{additionalProperties:!1,properties:{type:{enum:["follows","followers"],type:"string"},userId:mr.common11},required:["userId","type"],type:"object"}},{auth:"none",constant:"GET_BADGE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/page/type/badges/id/{id}/json/true",pathParams:mr.common104},{auth:"none",constant:"GET_EMETTEUR_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/badge/json/true"},{auth:"bearer",constant:"ADD_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{collection:mr.common212,criteria:{additionalProperties:!1,properties:{narrative:mr.common1},required:["narrative"],type:"object"},description:mr.common1,id:mr.common11,isParcours:mr.common105,issuer:{additionalProperties:!1,patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:mr.common1,type:{enum:["citoyens","organizations","projects"],type:"string"}},required:["type"],type:"object"}},type:"object"},key:mr.common213,name:mr.common1,parent:{additionalProperties:!1,patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:{name:mr.common1,type:mr.common212},required:["type"],type:"object"}},type:"object"},preferences:mr.common195,public:mr.common87,scope:mr.common121,tags:mr.common27},required:["id","collection","key","name","public","scope","issuer","criteria"],type:"object"}},{auth:"bearer",constant:"ASSIGN_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/badges/assign",request:{additionalProperties:!1,properties:{award:{patternProperties:{"^[0-9a-f]{24}$":mr.common44},type:"object"},badgeId:mr.common11,collection:mr.common212,evidences:{items:{additionalProperties:!1,properties:{narative:mr.common1,url:mr.common4},required:["narative"],type:"object"},type:"array"},key:mr.common213,narative:mr.common1,scope:mr.common121},required:["key","collection","badgeId","award"],type:"object"}},{auth:"none",constant:"GET_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/agenda",request:{additionalProperties:!1,properties:{count:mr.common105,countType:{const:["events"],default:["events"],type:"array"},endDateUTC:mr.common205,fediverse:mr.common105,indexMin:mr.common88,indexStep:{default:100,type:"integer"},locality:{patternProperties:{"^[^\\s]+$":{type:"object"}},type:"object"},name:mr.common1,searchType:{const:["events"],default:["events"],items:mr.common1,type:"array"},startDate:mr.common66,startDateUTC:mr.common205,type:mr.common207},required:["searchType","indexMin","indexStep","startDate","startDateUTC","fediverse"],type:"object"}},{auth:"bearer",constant:"SHARE_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:mr.common106,if:mr.common108,properties:{childId:mr.common11,childType:mr.common15,comment:mr.common1,connectType:mr.common110,parentId:mr.common11,parentType:mr.common204},required:["parentId","childId","childType","connectType","parentType"],then:mr.common111,type:"object"}},{auth:"bearer",constant:"INVITE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,else:mr.common81,if:mr.common83,properties:{listInvite:{additionalProperties:!1,minProperties:1,properties:{citoyens:mr.common214,invites:{patternProperties:{"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$":{additionalProperties:!1,properties:{email:mr.common2,isAdmin:mr.common218,msg:mr.common1,name:mr.common1,roles:mr.common27},required:["name","email"],type:"object"}},type:"object"},organizations:mr.common214,projects:mr.common214},type:"object"},parentId:mr.common1,parentType:mr.common15},required:["parentId","parentType","listInvite"],then:mr.common85,type:"object"}}];var hr=__webpack_require__(6092),yr=__webpack_require__(1027);cr.addType("oid",(e=>new pr.ObjectID(e)));class gr extends $.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=fr,timeout:s=3e4,debug:a=!1,maxRetries:c=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:u=6e4,fromJSONValue:d=!0,tokenStorageStrategy:p=null}={}){if(super(),!e)throw new n('Le paramètre "baseURL" est obligatoire.',500);this.__entityTag="ApiClient",this._baseURL=e,this._refreshUrl=o,this._endpoints=i,this._debug=a;let m=null;if(this._offlineClientManager=null,this._fromJSONValue=d,Object.defineProperty(this,"userId",{get:()=>m,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{m=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new C({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),R(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=ur({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=Ht.create({baseURL:e,timeout:s}),c>0&&(ar(this._client,{retries:c,retryDelay:ar.exponentialDelay,retryCondition:e=>ar.isNetworkError(e)||ar.isRetryableError(e),onRetry:(e,t,r)=>{this._logger.warn(`[Retry] Tentative #${e} pour ${r?.url}`),this.emit("retryAttempt",{retryCount:e,url:r?.url})}}),this._logger.info(`[ApiClient] Retry activé : ${c} max`)),this._breakerThreshold=l,this._breakerResetTime=u,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,this._accessToken=null,this._refreshToken=null,p instanceof hr.SJ&&p.use(this._baseURL),this._tokenStorage=p||new yr.GN,"function"!=typeof this._tokenStorage?.getAccessToken||"function"!=typeof this._tokenStorage?.setAccessToken||"function"!=typeof this._tokenStorage?.getRefreshToken||"function"!=typeof this._tokenStorage?.setRefreshToken||"function"!=typeof this._tokenStorage?.clear)throw new Error("[ApiClient] La stratégie de stockage des tokens n’est pas valide. Elle doit implémenter les méthodes requises.");r&&this.setRefreshToken(r),t&&this.setToken(t);const f=this._tokenStorage.getAccessToken();f&&this.setToken(f);const h=this._tokenStorage.getRefreshToken();h&&this.setRefreshToken(h),this._client.interceptors.response.use((e=>e),(async e=>{const t=e.config;if(t._retry)throw this._logger.error("[ApiClient] Requête déjà retentée, échec définitif."),e;if(e.response&&401===e.response.status&&this._refreshToken){t._retry=!0;try{if(this._logger.info("[ApiClient] Tentative de refresh du token..."),await this._refreshAccessToken())return this._logger.info("[ApiClient] Token rafraîchi avec succès."),t.headers.Authorization="Bearer "+this.getToken(),this._logger.info("[ApiClient] Retente la requête originale avec le nouveau token."),this._client.request(t);throw this.resetSession(),new n("Impossible de rafraîchir le token.",401)}catch(e){throw this.resetSession(),new n("Erreur lors du rafraîchissement du token.",401,e)}}throw e}))}setToken(e){this._accessToken=e,this._tokenStorage.setAccessToken(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){if(this._refreshToken=e,this._tokenStorage.setRefreshToken(e),null===this.userId){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}get isConnected(){return!!this._accessToken}_getIdFromToken(e){if(!e)return null;try{const t=function(e,t){if("string"!=typeof e)throw new lr("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new lr(`Invalid token specified: missing part #${r+1}`);let o;try{o=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)}}(n)}catch(e){throw new lr(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new lr(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}(e);return this._logger.debug("[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),null}}async _refreshAccessToken(){if(!this._refreshToken)return!1;const e=Ht.create({baseURL:this._baseURL,timeout:1e4,headers:{"Content-Type":"application/json"}});try{const t=await e.post(this._refreshUrl,{refreshToken:this._refreshToken});return!(!t.data||!t.data.token||(this.setToken(t.data.token),t.data.refreshToken&&this.setRefreshToken(t.data.refreshToken),this.emit("refreshSuccess",t.data),0))}catch(e){return this.emit("refreshFailed",{error:e.message}),this.resetSession(),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é"),this.emit("circuitBreakerReset"),!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"),this.emit("circuitBreakerOpen",{timestamp:this._lastBreakerOpenTime}))}_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]&&gr.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]&&gr.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}},n=/@(?:\{([^}]+)\}|([\w.]+))/g,o=e=>"string"!=typeof e?e:e.replace(n,((t,n,o)=>{if(n){if(n.startsWith("pathParams.")){const e=n.substring(11),t=r.pathParams(e);return null!=t?t:`@{${n}}`}{const e=r[n];if("function"==typeof e){const t=e();return null!=t?t:`@{${n}}`}return`@{${n}}`}}if(o){if(o.startsWith("pathParams.")){const e=o.match(/^pathParams\.([^.]+)(.*)$/);if(e){const t=e[1],n=e[2],i=r.pathParams(t);return null!=i?i+n:`@${o}`}return`@${o}`}{const e=r[o];if("function"==typeof e){const t=e();return null!=t?t:`@${o}`}return`@${o}`}}return e})),i=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(i);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[r,n]of Object.entries(e))t[o(r)]=i(n);return t}return"string"==typeof e?o(e):e};return i(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 o=e[n];if(!t.test(n)){if("default"===n){if("string"==typeof o&&t.test(o))continue;if(o&&"object"==typeof o){const e=this._cleanSchemaLeftoverAlias(o);Object.keys(e).length>0&&(r[n]=e);continue}}"string"==typeof o&&t.test(o)||(r[n]=this._cleanSchemaLeftoverAlias(o))}}return r}return e}async safeCall(e,...t){try{return await e(...t)}catch(e){throw this._logger.error(`[ApiClient.safeCall] Erreur: ${e.message}`),e}}async callEndpoint(e,t={},r=!0,s=!0){const a=this._endpoints.find((t=>t.constant===e));if(!a)throw new n(`Endpoint introuvable : ${e}`,404);const{path:c,method:l,contentType:u,auth:d,pathParams:p,request:m,responses:f}=a,h=(l||"GET").toLowerCase(),y=u||"application/json",g={"Content-Type":y};if(this._accessToken)"bearer"===d?g.Authorization=`Bearer ${this._accessToken}`:d&&"none"!==d||g.Authorization||(g.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===d)throw new n(`Token requis pour l'endpoint sécurisé : ${e}`,401);let _,w=c,b={};if(p){let r=p;"none"===d&&null===this.userId&&(r=this._cleanSchemaLeftoverAlias(p));const i=t.pathParams||{},s=this._ajv.compile(r);if(!s(i)){const t=this._ajvErrorHuman(s.errors);throw this.emit("validationError",{stage:"pathParams",errors:s.errors}),new o(`callEndpoint: ${e} - Path parameter validation failed.`,400,t,s.errors)}b=this._resolveSpecialValuesInPlace(i),w=w.replace(/\{(\w+)\}/g,((e,t)=>{const r=b[t];if(void 0!==r)return encodeURIComponent(r);throw new n(`Path param manquant ou non résolu : {${t}}`,400)}))}if(m){let r=m;"none"===d&&null===this.userId&&(r=this._cleanSchemaLeftoverAlias(m));const n={...t};delete n.pathParams;const i=gr.stripNullsInPlace(n),s=this._ajv.compile(r);if(!s(i)){const t=s.errors?this._ajvErrorHuman(s.errors):[];throw this.emit("validationError",{stage:"request",errors:s.errors}),new o(`callEndpoint: ${e} - Request validation failed.`,400,t,s.errors)}t=this._resolveSpecialValuesInPlace(i,b)}if(this._offlineClientManager?.isOffline()){if("function"==typeof this._offlineClientManager._enqueueOfflineAction)return this._logger.warn(`[ApiClient] Mode dégradé : mise en file de ${e}`),await this._offlineClientManager._enqueueOfflineAction({constant:e,data:t,options:{transformResponseData:r,validateResponseSchema:s}}),this._logger.info(`[ApiClient] Requête ${e} mise en file (offline mode)`),this.emit("queuedOffline",{constant:e,reason:"offlineMode",data:t}),{data:null,offline:!0};throw this._logger.warn("[ApiClient] Mode dégradé actif mais offlineManager non initialisé correctement"),new n("Mode hors-ligne actif, mais gestionnaire offline non disponible.",503)}if(!this._checkCircuitBreaker()){if(!1===this._offlineClientManager?.isOffline?.()&&"function"==typeof this._offlineClientManager._enqueueOfflineAction)return this._logger.warn(`[ApiClient] Circuit breaker actif → mise en file de ${e}`),await this._offlineClientManager._enqueueOfflineAction({constant:e,data:t,options:{transformResponseData:r,validateResponseSchema:s}}),this._logger.info(`[ApiClient] Requête ${e} mise en file (circuit breaker)`),this.emit("queuedOffline",{constant:e,reason:"circuitBreaker",data:t}),{data:null,breaker:!0};throw new i("Le circuit breaker est activé, impossible d'appeler l'API")}"application/json"===y||"multipart/form-data"===y?_=t:"application/x-www-form-urlencoded"===y&&(_=gr.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${w}, method=${h}`);try{const e=await this._client.request({url:w,method:h,headers:g,["get"===h?"params":"data"]:_});if(s){const t=e.status.toString(),r=f?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data)){const e=this._ajvErrorHuman(n.errors);throw this.emit("validationError",{stage:"response",errors:n.errors}),new o("Response validation failed.",t,e,n.errors)}}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(a.postActions)&&a.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(t){throw this._updateCircuitBreakerError(),this._logger.error(`[ApiClient] Erreur lors de l'appel de ${e}: ${t.message}`),t instanceof o?t:new n(`Erreur lors de l'appel de l'API : ${t.message}`,t.response?t.response.status:500,t.response?t.response.data:null)}}_ajvErrorHuman(e){try{return new N(e).errors.map((({message:e})=>e))}catch(t){return this._logger.error("[ApiClient] _ajvErrorHuman",t),e.map((({message:e})=>e))}}checkAndThrowApiResponseError(e){const t=e.data;if(!t||"object"!=typeof t)return e;if("boolean"==typeof t.result&&!1===t.result)throw new s(t.msg||"Erreur inconnue",e.status,t);if(t.resultErrors&&"object"==typeof t.resultErrors&&"boolean"==typeof t.resultErrors.result&&!1===t.resultErrors.result)throw new s(t.resultErrors.msg||"Erreur inconnue",e.status,t);return e}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),this._tokenStorage.clear(),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:o=!1,metaTokens:i=!0}=r,s=[];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||s.includes(r)||(s.push(r),Object.entries(r).forEach((([r,s])=>{void 0!==s&&function(e,r,s){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(l(s,r,n),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,i)=>{if(null!=e){const a=o?l(s.concat(r),i,n):`${l(s,r,n)}[]`;t.append(a,u(e))}})),!1}return!!a(e)||(t.append(l(s,r,n),u(e)),!1)}(s,r.trim(),d)&&e(s,d.concat(c(r)))})),s.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?cr.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","issuedOn"];_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}_startBeforeEndValidate=(e,t)=>{if(!t.startDate||!t.endDate)return!0;const r=new Date(t.startDate)<new Date(t.endDate);return r||(this._startBeforeEndValidate.errors=[{instancePath:"",schemaPath:"#/startBeforeEnd",keyword:"startBeforeEnd",params:{},message:"startDate must be before endDate"}]),r};getRequestSchema(e){const t=this._endpoints.find((t=>t.constant===e));return t?.request||null}getPathSchema(e){return this._endpoints.find((t=>t.constant===e))?.pathParams||null}onEvent(e={}){const t=["retryAttempt","queuedOffline","circuitBreakerOpen","circuitBreakerReset","refreshSuccess","refreshFailed","sessionReset","validationError","offlineModeChanged","userLoggedIn"];for(const r of t)"function"==typeof e[r]&&this.on(r,e[r])}getDeclaredEvents(){const e=new Set;for(const t of this._endpoints)if(Array.isArray(t.postActions))for(const r of t.postActions)"emitEvent"===r.type&&r.event&&e.add(r.event);return Array.from(e)}}class _r{constructor(e){this.client=e instanceof gr?e:new gr(e),this.loggedUser=null}get isConnected(){return this.client.isConnected}get userId(){return this.client.userId}async login(e,t){return this.client.safeCall((async()=>{const r=await this.client.callEndpoint("AUTHENTICATE_URL",{email:e,password:t});return this.loggedUser=new S(this.client,r.data.user,{EndpointApi:_,Organization:v,Project:T,Event:w,Poi:E,Badge:g,News:b}),this.loggedUser}))}async meIsconnected(){if(!this.client.isConnected||!this.client.userId)throw new r("User not connected",401);return this.client._logger.info("UserApi","meIsconnected",this.client.userId),this.loggedUser=new S(this.client,{id:this.client.userId},{EndpointApi:_,Organization:v,Project:T,Event:w,Poi:E,Badge:g,News:b}),this.loggedUser}async register({name:e,username:t,email:r,pwd:n}={}){return this.client.safeCall((async()=>{const o=await this.client.callEndpoint("PERSON_REGISTER",{name:e,username:t,email:r,pwd:n});if(!1===o?.data?.result)throw new s(o.data.msg,o.status,o.data);return o.data}))}async recoverPassword(e){return this.client.safeCall((async()=>{const t=await this.client.callEndpoint("PASSWORD_RECOVERY",{email:e});if(!1===t?.data?.result)throw new s(t.data.msg,t.status,t.data);return t.data}))}}class wr{static async userLogin(e,t,r){const n=wr.userApi(r);return await wr.userApiLogin(n,e,t)}static userApi(e){try{return new _r(e)}catch(e){throw console.error("[Api.userApi] Erreur lors de la création d'un objet utilisateur :",e.message),e}}static async userApiLogin(e,t,o){try{if(!e)throw new r("userApi is not defined");if(!e.client)throw new r("userApi.client is not defined");if(e.client.isConnected){const t=await e.meIsconnected();return new wr(t,e.client)}{if(!t||!o)throw new r("email and password are required");const n=await e.login(t,o);return new wr(n,e.client)}}catch(e){if(e instanceof n&&e?.details?.error)throw new a(e.details.error,e.status,e.details);throw e}}constructor(e,t){this._loggedUser=e,this._client=t}async me(){if(!this._loggedUser)throw new a("Accès refusé : utilisateur non authentifié.");return await this._loggedUser.get(),this._loggedUser}async user(e){try{if(e.id||e.slug){const t=new S(this._client,e,{EndpointApi:_,Organization:v,Project:T,Event:w,Poi:E,Badge:g,News:b});return await t.get(),t}return new S(this._client,e,{EndpointApi:_,Organization:v,Project:T,Event:w,Poi:E,Badge:g,News:b})}catch(e){throw console.error("[Api.user] Erreur lors de la création d'un objet utilisateur public :",e.message),e}}async organization(e){try{const t=new v(this._client,e,{EndpointApi:_,User:S,Project:T,Event:w,Poi:E,Badge:g,News:b});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Organization.");return await t.get(),t}catch(e){throw console.error("[Api.organization] Erreur lors de la création d'un objet organisation :",e.message),e}}async project(e){try{const t=new T(this._client,e,{EndpointApi:_,User:S,Event:w,Poi:E,Badge:g,News:b});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Project.");return await t.get(),t}catch(e){throw console.error("[Api.project] Erreur lors de la création d'un objet projet :",e.message),e}}get client(){return this._client}get endpointApi(){return new _(this._client)}logout(){this.loggedUser=null,this._client.resetSession(),this._client._logger.info("UserApi: User logged out")}}var br=__webpack_require__(7031);class vr{constructor(e){if(!(e&&e instanceof gr))throw new Error("[OfflineClientManager] apiClient doit être une instance de ApiClient");this._clients=new Map,this._client=e}static async attachTo(e,t={}){e._offlineClientManager=new vr(e);const r=await async function(e="auto"){if("memory"===e)return new br.QM;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new br.Rc;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileOfflineStorage:e}=await __webpack_require__.e(394).then(__webpack_require__.bind(__webpack_require__,394));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new br.Rc;{const{FileOfflineStorage:e}=await __webpack_require__.e(394).then(__webpack_require__.bind(__webpack_require__,394));return new e}}}(t?.offlineStorageStrategy||"auto");await e._offlineClientManager._initOfflineQueue(r),t?.disableOfflineMonitoring||e._offlineClientManager.startOfflineMonitoring(t)}async getClient(e){const t=`${e.baseURL}|${e.accessToken}`;if(this._clients.has(t))return this._clients.get(t);const r=new gr({baseURL:e.baseURL,accessToken:e.accessToken,refreshToken:e.refreshToken,debug:this._client._debug});return this._clients.set(t,r),r}async replayAction(e){const t=await this.getClient(e.meta);try{const r=await t.callEndpoint(e.constant,e.data,e.options?.transformResponseData??!0,e.options?.validateResponseSchema??!0);return this._client._logger.info(`[OfflineReplay] Succès ${e.constant} sur ${e.meta.baseURL}`),r}catch(t){throw this._client._logger.error(`[OfflineReplay] Échec ${e.constant}`,t.message),t}}startOfflineMonitoring({interval:e=3e4,disableOfflineMonitoring:t=!1}={}){t||this._monitoringStarted||(this._monitoringStarted=!0,this._offlineMode="undefined"!=typeof window&&"undefined"!=typeof navigator&&!navigator.onLine,"undefined"!=typeof window&&(window.addEventListener("online",(()=>this.setOfflineMode(!1))),window.addEventListener("offline",(()=>this.setOfflineMode(!0)))),this._pingInterval=setInterval((async()=>{const e=this._offlineMode;try{await this._client._client.head("/api/cocolight/infoserver",{timeout:5e3}),e&&this.setOfflineMode(!1)}catch(e){this._client._logger.error("[OfflineMonitor] ping() échoué → passage en offline"),this.setOfflineMode(!0)}}),e))}setOfflineMode(e){this._offlineMode!==e&&(this._offlineMode=e,"function"==typeof this._emit&&this._client.emit("offlineModeChanged",e),this._client._logger.info(`[ApiClient] Mode offline : ${e} (set depuis monitoring)`),e||"function"!=typeof this._replayOfflineQueue||this._replayOfflineQueue())}isOffline(){return!!this._offlineMode}async _enqueueOfflineAction({constant:e,data:t,options:r={}}){const n=this._client.getToken()||this._client.getRefreshToken(),o=this._client._endpoints.find((t=>t.constant===e));if("required"===(o?.authPolicy||("none"===o?.auth?"none":"required"))&&!n)return void this._client._logger.warn(`[Offline] Action ignorée : token requis mais absent (${e})`);const i={constant:e,data:t,options:r,meta:{baseURL:this._client._baseURL,accessToken:this._client.getToken(),refreshToken:this._client.getRefreshToken(),timestamp:Date.now()}};this._offlineQueue.push(i),await this._offlineQueueStorage.saveQueue(this._offlineQueue),this._client._logger.info(`[Offline] Action mise en file : ${e}`)}async _replayOfflineQueue(){const e=[...this._offlineQueue];this._offlineQueue=[],await this._offlineQueueStorage.saveQueue([]);for(const t of e){const e=this._client._endpoints.find((e=>e.constant===t.constant)),r=e?.authPolicy||("none"===e?.auth?"none":"required"),n=t.meta.accessToken||t.meta.refreshToken;if("required"!==r||n)try{await this.replayAction(t)}catch(e){this._client._logger.error("[Offline] Relecture échouée :",e.message),this._offlineQueue.push(t)}else this._client._logger.warn(`[Offline] Rejetée : token requis manquant (${t.constant})`)}await this._offlineQueueStorage.saveQueue(this._offlineQueue)}async _initOfflineQueue(e){this._offlineQueueStorage=e,this._offlineQueue=await e.loadQueue()}}const Er=vr,Tr={ApiClient:gr,Api:wr,error:e,tokenStorageStrategy:{createDefaultTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new yr.GN;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new yr.Ge;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new yr.Ge;{const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}}},TokenStorageStrategy:yr.u3,createDefaultMultiServerTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new hr.Ek;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new hr.YP;throw new Error("localStorage n’est pas disponible dans cet environnement.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("Le stockage fichier n’est pas disponible côté navigateur.");const{MultiServerFileStorageStrategy:e}=await __webpack_require__.e(123).then(__webpack_require__.bind(__webpack_require__,6123));return new e}if("undefined"!=typeof window&&window.localStorage)return new hr.YP;{const{MultiServerFileStorageStrategy:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,6092));return new e}},MultiServerTokenStorageStrategy:hr.SJ},OfflineClientManager:Er}})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
|
|
8
|
+
deps: ${r}}`};const s={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:o,it:s}=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,i.propertyInData)(r,o,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(u,(()=>{for(const t of l)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,i.checkMissingProp)(e,l,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,o.alwaysValidSchema)(a,t[l])||(r.if((0,i.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},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),o=r(6144),i=r(6653),s=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;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 p=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${c}))`)}};t.default=o},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},3492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferTokenizer=void 0;const n=r(8705),o=r(8632);class i extends o.AbstractTokenizer{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}async readBuffer(e,t){if(t&&t.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),o=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&o<r.length)throw new n.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+o),r.offset),o}async close(){}}t.BufferTokenizer=i},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),o=r(2023),i=r(5765),s=r(8708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.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:o,schema:i,parentSchema:s,it:a}=e,l=t.macro.call(a.self,i,s,a),u=c(r,o,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,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:p,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const h=!m&&t.compile?t.compile.call(f.self,d,p,f):t.validate,y=c(l,u,h),g=l.let("valid");function w(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!m||!1===t.schema);l.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,s,a)}`,t.modifying)}function _(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)w(),t.modifying&&a(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>w(n._`await `)),(t=>l.assign(g,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${y}.errors`;return l.assign(e,null),w(n.nil),e}();t.modifying&&a(e),_((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.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},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.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),o=r(5765),i=r(9029),s=r(2023),a=r(3835),c=r(4227),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:p,self:m}=o,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return d(e,i._`${r}.validate`,f,f.$async)}();const h=a.resolveRef.call(m,f,s,r);if(void 0===h)throw new n.default(o.opts.uriResolver,s,r);return h instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(h):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(h)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:p}=l,m=p.passContext?s.default.this:i.nil;function f(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function h(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",i._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,i.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",i._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,i.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,o.callValidateCode)(e,t,m)}`),h(t),u||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,m),(()=>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 n=r(9029),o=r(3558),i=r(2023),s=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,s.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=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let m;e.$async&&(m=d.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const h={gen:d,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:m,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 y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);const t=d.toString();y=`${d.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${i.default.self}`,`${i.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 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,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function d(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(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 m(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),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];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),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new l({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=m.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new l({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=d.call(this,i):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[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 o="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&o&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,o))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=f.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new l({schema:r,schemaId:c,root:n,baseId:t}),i.schema!==i.root.schema?i: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}')},3846:(e,t,r)=>{"use strict";const n=r(363),o=r(5707),i={fromFile:async function(e){const t=await n.fromFile(e);try{return await o.fromTokenizer(t)}finally{await t.close()}}};Object.assign(i,o),Object.defineProperty(i,"extensions",{get:()=>o.extensions}),Object.defineProperty(i,"mimeTypes",{get:()=>o.mimeTypes}),e.exports=i},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}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),o=r(4227),i=r(5765),s=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,o.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(4227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,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(o.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),u.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 "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(l,t,l.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=s},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(i,s),time:r(c(!0),l),"date-time":r(p(!0),m),"iso-time":r(c(),u),"iso-date-time":r(p(),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(v.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<=_&&e>=w}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),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,m),"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 n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],i=+t[2],s=+t[3];return i>=1&&i<=12&&s>=1&&s<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[i])}function s(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],o=+r[2],i=+r[3],s=r[4],c="-"===r[5]?-1:1,l=+(r[6]||0),u=+(r[7]||0);if(l>23||u>59||e&&!s)return!1;if(n<=23&&o<=59&&i<60)return!0;const d=o-u*c,p=n-l*c-(d<0?1:0);return(23===p||-1===p)&&(59===d||-1===d)&&i<61}}function l(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 u(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 d=/t|\s/i;function p(e){const t=c(e);return function(e){const r=e.split(d);return 2===r.length&&i(r[0])&&t(r[1])}}function m(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 f(e,t){if(!e||!t)return;const[r,n]=e.split(d),[o,i]=t.split(d),a=s(r,o);return void 0!==a?a||l(n,i):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,w=-(2**31),_=2**31-1;function b(){return!0}const v=/[^\\]\\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 o=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(3558),s=r(4551),a=r(396),c=r(3835),l=r(9029),u=r(6939),d=r(208),p=r(4227),m=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"]),w={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."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,o,i,s,a,c,l,u,d,p,m,y,g,w,_,b,v,E,T,S,$,O,P;const k=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===x||void 0===x?1:x||0,A=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,I=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:k)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:k)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:k)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:k)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:k)&&void 0!==y&&y,code:e.code?{...e.code,optimize:j,regExp:A}:{optimize:j,regExp:A},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(w=e.loopEnum)&&void 0!==w?w:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(T=e.addUsedSchema)||void 0===T||T,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===($=e.validateFormats)||void 0===$||$,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:I}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(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 k;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)(),E.call(this,w,e,"NOT SUPPORTED"),E.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=m;"id"===r&&(n={...m},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 o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.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 o.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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=T.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=T.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(j.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>A.call(this,e))),this;N.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>A.call(this,e,n):e=>n.type.forEach((t=>A.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=R(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];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)(i||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),o&&!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(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function T(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){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 $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(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 P(){const e={...this.opts};for(const t of y)delete e[t];return e}v.ValidationError=i.default,v.MissingRefError=s.default,t.default=v;const k={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function A(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.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?I.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function I(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 N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,C]}}},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),o=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function s(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:o}){return(i,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:o(i,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(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||(i(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,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,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},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(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} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({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=u,t.setEvaluated=d;const p={};var m;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:p[t.code]||(p[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===m.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},4266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiStringType=t.StringType=t.BufferType=t.Uint8ArrayType=t.IgnoreType=t.Float80_LE=t.Float80_BE=t.Float64_LE=t.Float64_BE=t.Float32_LE=t.Float32_BE=t.Float16_LE=t.Float16_BE=t.INT64_BE=t.UINT64_BE=t.INT64_LE=t.UINT64_LE=t.INT32_LE=t.INT32_BE=t.INT24_BE=t.INT24_LE=t.INT16_LE=t.INT16_BE=t.INT8=t.UINT32_BE=t.UINT32_LE=t.UINT24_BE=t.UINT24_LE=t.UINT16_BE=t.UINT16_LE=t.UINT8=void 0;const n=r(251);function o(e){return new DataView(e.buffer,e.byteOffset)}t.UINT8={len:1,get:(e,t)=>o(e).getUint8(t),put:(e,t,r)=>(o(e).setUint8(t,r),t+1)},t.UINT16_LE={len:2,get:(e,t)=>o(e).getUint16(t,!0),put:(e,t,r)=>(o(e).setUint16(t,r,!0),t+2)},t.UINT16_BE={len:2,get:(e,t)=>o(e).getUint16(t),put:(e,t,r)=>(o(e).setUint16(t,r),t+2)},t.UINT24_LE={len:3,get(e,t){const r=o(e);return r.getUint8(t)+(r.getUint16(t+1,!0)<<8)},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.UINT24_BE={len:3,get(e,t){const r=o(e);return(r.getUint16(t)<<8)+r.getUint8(t+2)},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.UINT32_LE={len:4,get:(e,t)=>o(e).getUint32(t,!0),put:(e,t,r)=>(o(e).setUint32(t,r,!0),t+4)},t.UINT32_BE={len:4,get:(e,t)=>o(e).getUint32(t),put:(e,t,r)=>(o(e).setUint32(t,r),t+4)},t.INT8={len:1,get:(e,t)=>o(e).getInt8(t),put:(e,t,r)=>(o(e).setInt8(t,r),t+1)},t.INT16_BE={len:2,get:(e,t)=>o(e).getInt16(t),put:(e,t,r)=>(o(e).setInt16(t,r),t+2)},t.INT16_LE={len:2,get:(e,t)=>o(e).getInt16(t,!0),put:(e,t,r)=>(o(e).setInt16(t,r,!0),t+2)},t.INT24_LE={len:3,get(e,r){const n=t.UINT24_LE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.INT24_BE={len:3,get(e,r){const n=t.UINT24_BE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.INT32_BE={len:4,get:(e,t)=>o(e).getInt32(t),put:(e,t,r)=>(o(e).setInt32(t,r),t+4)},t.INT32_LE={len:4,get:(e,t)=>o(e).getInt32(t,!0),put:(e,t,r)=>(o(e).setInt32(t,r,!0),t+4)},t.UINT64_LE={len:8,get:(e,t)=>o(e).getBigUint64(t,!0),put:(e,t,r)=>(o(e).setBigUint64(t,r,!0),t+8)},t.INT64_LE={len:8,get:(e,t)=>o(e).getBigInt64(t,!0),put:(e,t,r)=>(o(e).setBigInt64(t,r,!0),t+8)},t.UINT64_BE={len:8,get:(e,t)=>o(e).getBigUint64(t),put:(e,t,r)=>(o(e).setBigUint64(t,r),t+8)},t.INT64_BE={len:8,get:(e,t)=>o(e).getBigInt64(t),put:(e,t,r)=>(o(e).setBigInt64(t,r),t+8)},t.Float16_BE={len:2,get(e,t){return n.read(e,t,!1,10,this.len)},put(e,t,r){return n.write(e,r,t,!1,10,this.len),t+this.len}},t.Float16_LE={len:2,get(e,t){return n.read(e,t,!0,10,this.len)},put(e,t,r){return n.write(e,r,t,!0,10,this.len),t+this.len}},t.Float32_BE={len:4,get:(e,t)=>o(e).getFloat32(t),put:(e,t,r)=>(o(e).setFloat32(t,r),t+4)},t.Float32_LE={len:4,get:(e,t)=>o(e).getFloat32(t,!0),put:(e,t,r)=>(o(e).setFloat32(t,r,!0),t+4)},t.Float64_BE={len:8,get:(e,t)=>o(e).getFloat64(t),put:(e,t,r)=>(o(e).setFloat64(t,r),t+8)},t.Float64_LE={len:8,get:(e,t)=>o(e).getFloat64(t,!0),put:(e,t,r)=>(o(e).setFloat64(t,r,!0),t+8)},t.Float80_BE={len:10,get(e,t){return n.read(e,t,!1,63,this.len)},put(e,t,r){return n.write(e,r,t,!1,63,this.len),t+this.len}},t.Float80_LE={len:10,get(e,t){return n.read(e,t,!0,63,this.len)},put(e,t,r){return n.write(e,r,t,!0,63,this.len),t+this.len}},t.IgnoreType=class{constructor(e){this.len=e}get(e,t){}},t.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}},t.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}},t.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class i{constructor(e){this.len=e}static decode(e,t,r){let n="";for(let o=t;o<r;++o)n+=i.codePointToString(i.singleByteDecoder(e[o]));return n}static inRange(e,t,r){return t<=e&&e<=r}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(i.inRange(e,0,127))return e;const t=i.windows1252[e-128];if(null===t)throw Error("invaliding encoding");return t}get(e,t=0){return i.decode(e,t,t+this.len)}}t.AnsiStringType=i,i.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={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=o},4428:()=>{},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),o=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;u(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${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!==s&&(u(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class o extends Error{constructor(e,t,r,o){super(o||`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=o},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,$data:i,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:p}=c;l.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${s}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===i)return;const[a,c,m]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${m}(${o})`}return"function"==typeof c?n._`${m}(${o})`:n._`${m}.test(${o})`}())}())}};t.default=o},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),o=/^(?:(?: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 i(e){if(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(o)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function s(e,t=!1){let r="",o=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===o&&(o=!1),o||(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:""},n=[],o=[];let i=!1,a=!1,c=!1;function l(){if(o.length){if(!1===i){const e=s(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let s=0;s<e.length;s++){const u=e[s];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!l())break;i=!0}else o.push(u);else{if(!0===a&&(c=!0),!l())break;if(t++,n.push(":"),t>7){r.error=!0;break}s-1>=0&&":"===e[s-1]&&(a=!0)}}return o.length&&(i?r.zone=o.join(""):c?n.push(o.join("")):n.push(s(o))),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 o=e.length;for(let i=0;i<o;i++){const s=e[i];"0"===s&&n?(i+1<=o&&e[i+1]===t||i+1===o)&&(r+=s,n=!1):(n=s===t,r+=s)}return r}function l(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const u=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\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=i(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(u))e=e.replace(u,"");else if(e.match(d))e=e.replace(d,"/");else if(e.match(p))e=e.replace(p,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(m);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:i,normalizeIPv6:a,stringArrayToHexStripped:s}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=d;const o=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||{},i={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:w,wrapResponseSerializer:w,wrapErrorSerializer:w,req:g,res:g,err:h,errWithCause:h};function s(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||o;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=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 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 w=e.level||"info",b=Object.create(r);b.log||(b.log=_),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||_})),e[a]=n}(b,g,r),u({},b),Object.defineProperty(b,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(b,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,p(this,v,b,"error"),p(this,v,b,"fatal"),p(this,v,b,"warn"),p(this,v,b,"info"),p(this,v,b,"debug"),p(this,v,b,"trace"),h.forEach((e=>{p(this,v,b,e)}))}});const v={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||_};function E(r,o,s){if(!o)throw new Error("missing bindings for child Pino");s=s||{},i&&o.serializers&&(s.serializers=o.serializers);const a=s.serializers;if(i&&a){var c=Object.assign({},n,a),l=!0===e.browser.serialize?Object.keys(c):i;delete o.serializers,m([o],l,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.bindings=o,c&&(this.serializers=c,this._serialize=l),t&&(this._logEvent=f([].concat(e._logEvent.bindings,o)))}d.prototype=this;const p=new d(this);return u(this,p),p.child=function(...e){return E.call(this,r,...e)},p.level=s.level||this.level,r.onChild(p),p}return b.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),b.level=w,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=_,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,v,...e)},t&&(b._logEvent=f()),b}function p(e,t,r,i){if(Object.defineProperty(e,i,{value:s(e.level,r)>s(i,r)?_:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===_){if(!t.transmit)return;const n=s(t.transmit.level||e.level,r);if(s(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),l=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];var p=!1;if(t.serialize&&(m(l,this._serialize,this.serializers,this._stdErrSerialize),p=!0),t.asObject||t.formatters?c.call(u,function(e,t,r,o,i){const{level:s,log:a=e=>e}=i.formatters||{},c=r.slice();let l=c[0];const u={};if(o&&(u.time=o),s){const r=s(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?n(c.shift(),c):void 0}else"string"==typeof l&&(l=n(c.shift(),c));return void 0!==l&&(u[i.messageKey]=l),a(u)}(this,i,l,a,t)):c.apply(u,l),t.transmit){const n=t.transmit.level||e._level,o=s(n,r),c=s(i,r);if(c<o)return;!function(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,c=t.val,l=e._logEvent.bindings;n||m(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,c),e._logEvent=f(l)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,r)},l,p)}};var c}(e,t,r,i);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[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(l,e[i]))}function m(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=d.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o])&&t)for(const n in e[o])t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}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?b:v}function g(){return{}}function w(e){return e}function _(){}function b(){return!1}function v(){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=i,d.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:v,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 n=r(5765),o=r(9029),i=r(4227),s=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,n.allSchemaProperties)(r),p=d.filter((e=>(0,i.alwaysValidSchema)(l,r[e])));if(0===d.length||p.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const m=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof o.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:h}=l;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==h?t.assign(o._`${h}[${i}]`,!0):n||l.allErrors||t.if((0,o.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)m&&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 n=r(494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),o=r(4227),i={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)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},5523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndOfStreamError=t.defaultMessages=void 0,t.defaultMessages="End-Of-Stream";class r extends Error{constructor(){super(t.defaultMessages)}}t.EndOfStreamError=r},5707:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const Token=__webpack_require__(4266),strtok3=__webpack_require__(6452),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(6760),supported=__webpack_require__(1664),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,o]of t.entries())if(r.mask){if(o!==(r.mask[n]&e[n+r.offset]))return!1}else if(o!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n("PS-Adobe-",{offset:2})&&n(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n("ID3")){await e.ignore(6);const o=await e.readToken(uint32SyncSafeToken);return e.position+o>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(o),fromTokenizer(e))}if(n("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n("FLIF"))return{ext:"flif",mime:"image/flif"};if(n("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(n("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(n("FORM"))return{ext:"aif",mime:"audio/aiff"};if(n("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(r([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(i.filename.startsWith("3D/")&&i.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let s=-1;for(;s<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),s=t.indexOf("504B0304",0,"hex"),await e.ignore(s>=0?s:t.length)}else await e.ignore(i.compressedSize)}}catch(a){if(!(a instanceof strtok3.EndOfStreamError))throw a}return{ext:"zip",mime:"application/zip"}}if(n("OggS")){await e.ignore(28);const c=Buffer.alloc(8);return await e.readBuffer(c),_check(c,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(c,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(c,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(c,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(c,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(c,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(n("ftyp",{offset:4})&&96&t[8]){const l=t.toString("binary",8,12).replace("\0"," ").trim();switch(l){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return l.startsWith("3g")?l.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n("MThd"))return{ext:"mid",mime:"audio/midi"};if(n("wOFF")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(n("wOF2")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(n("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(n("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(n("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(n("%PDF")){await e.ignore(1350);const u=10485760,d=Buffer.alloc(Math.min(u,e.fileInfo.size));return await e.readBuffer(d,{mayBeLess:!0}),d.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([73,73,42,0]))return n("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n("MAC "))return{ext:"ape",mime:"audio/ape"};if(r([26,69,223,163])){async function p(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=Buffer.alloc(n+1);return await e.readBuffer(o),o}async function m(){const e=await p(),t=await p();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function f(t,r){for(;r>0;){const t=await m();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--r}}const h=await m();switch(await f(0,h.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n("MSCF")||n("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(r([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(n("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n("IMPM"))return{ext:"it",mime:"audio/x-it"};if(n("-lh0-",{offset:2})||n("-lh1-",{offset:2})||n("-lh2-",{offset:2})||n("-lh3-",{offset:2})||n("-lh4-",{offset:2})||n("-lh5-",{offset:2})||n("-lh6-",{offset:2})||n("-lh7-",{offset:2})||n("-lzs-",{offset:2})||n("-lz4-",{offset:2})||n("-lz5-",{offset:2})||n("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(r([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(n("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n("solid "))return{ext:"stl",mime:"model/stl"};if(n("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(n("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(r([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const g=await y();if(g.length<0)return;switch(g.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(g.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(r([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r([48,38,178,117,142,102,207,17,166,217])){async function w(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const _=await w();let b=_.size-24;if(_check(_.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const v=Buffer.alloc(16);if(b-=await e.readBuffer(v),_check(v,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(v,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(b)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n("BEGIN:")){if(n("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(n("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([4,0,0,0])&&t.length>=16){const E=t.readUInt32LE(12);if(E>12&&t.length>=E+16)try{const T=t.slice(16,E+16).toString();if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch(S){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(n("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(r([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},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),o=r(4227),i=r(2023),s=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 l(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(l(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(l(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:c},l,u,d){const p=d?n._`${e}, ${t}, ${o}${s}`:t,m=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,c.parentData],[i.default.parentDataProperty,c.parentDataProperty],[i.default.rootData,i.default.rootData]];c.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...m)}`;return u!==n.nil?n._`${l}.call(${u}, ${f})`:n._`${l}(${f})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?d:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.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(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,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),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || 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 o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=o,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,o,i=(o=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,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(n,o)||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,o)||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.")}()),s=i[0],a=i[1];return e[s]=a,e}),{})},t.isArguments=function(e){return null!=e&&o(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var i={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=i,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(i.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)},o=0;o<64;o++)r[n(o)]=o;var i=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))},s={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(o>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=o}}for(var s=[],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],s.push(n(a)),s.push(n(c)),s.push(n(l)),s.push(n(u)),a=null,c=null,l=null,u=null}return null!=a&&(s.push(n(a)),s.push(n(c)),null==l?s.push("="):s.push(n(l)),null==u&&s.push("=")),s.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,o=i(t),s=null,a=null,c=null,l=0,u=0;u<e.length;u++){var d="="===(n=e.charAt(u))?-1:r[n];switch(u%4){case 0:if(d<0)throw new Error("invalid base64 string");s=d<<2;break;case 1:if(d<0)throw new Error("invalid base64 string");s|=d>>4,o[l++]=s,a=(15&d)<<4;break;case 2:d>=0&&(a|=d>>2,o[l++]=a,c=(3&d)<<6);break;case 3:d>=0&&(o[l++]=c|d)}}return o},newBinary:i};t.Base64=s},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 o=function e(t,o,i,s,a){var c=o[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 l,u=s+i,d=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var p=c.length,m=0;m<p;m+=1)d[m]=e(m,c,i,u,a)||"null";return l=0===d.length?"[]":u?"[\n"+u+d.join(",\n"+u)+"\n"+s+"]":"["+d.join(",")+"]"}var f=Object.keys(c);return a&&(f=f.sort()),f.forEach((function(t){(l=e(t,c,i,u,a))&&d.push(n(t)+(u?": ":":")+l)})),l=0===d.length?"{}":u?"{\n"+u+d.join(",\n"+u)+"\n"+s+"}":"{"+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 n="",i=0;i<r.indent;i++)n+=" ";r.indent=n}return o("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var o={};!function(){var e=o,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),s={};e.EJSON=s;var a=new Map;s.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,i.hasOwn)(e,"$date")&&1===(0,i.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,i.hasOwn)(e,"$regexp")&&(0,i.hasOwn)(e,"$flags")&&2===(0,i.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,i.hasOwn)(e,"$InfNaN")&&1===(0,i.lengthOf)(e)},matchObject:i.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,i.hasOwn)(e,"$binary")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,i.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$escape")&&1===(0,i.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,i.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,i.keysOf)(e).forEach((function(r){t[r]=s.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=s.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$type")&&(0,i.hasOwn)(e,"$value")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return s._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)}))}}];s._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},s._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},s._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,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)||void 0===n||(0,i.isInfOrNaN)(n)){var o=l(n);o?t[r]=o:e(n)}})),t):t};s._adjustTypesToJSONValue=u,s.toJSONValue=function(e){var t=l(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=s.clone(e),u(r)),r};var d=function(e){if((0,i.isObject)(e)&&null!==e){var t=(0,i.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},p=function e(t){if(null===t)return null;var r=d(t);return r!==t?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)){var o=d(n);if(n!==o)return void(t[r]=o);e(n)}})),t):t};s._adjustTypesFromJSONValue=p,s.fromJSONValue=function(e){var t=d(e);return t===e&&(0,i.isObject)(e)&&(t=s.clone(e),p(t)),t},s.stringify=(0,i.handleError)((function(e,t){var r=s.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),s.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return s.fromJSONValue(JSON.parse(e))},s.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},s.equals=function(e,t,r){var n,o=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,i.isObject)(e)||!(0,i.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(s.isBinary(e)&&s.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,i.isFunction)(e.equals))return e.equals(t,r);if((0,i.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(n=0;n<e.length;n++)if(!s.equals(e[n],t[n],r))return!1;return!0}switch(s._isCustomType(e)+s._isCustomType(t)){case 1:return!1;case 2:return s.equals(s.toJSONValue(e),s.toJSONValue(t))}var u=(0,i.keysOf)(e),d=(0,i.keysOf)(t);return o?(n=0,a=u.every((function(o){return!(n>=d.length||o!==d[n]||!s.equals(e[o],t[d[n]],r)||(n++,0))}))):(n=0,a=u.every((function(o){return!!(0,i.hasOwn)(t,o)&&!!s.equals(e[o],t[o],r)&&(n++,!0)}))),a&&n===d.length},s.clone=function(e){var t;if(!(0,i.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(s.isBinary(e)){t=s.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(s.clone):(0,i.isArguments)(e)?Array.from(e).map(s.clone):(0,i.isFunction)(e.clone)?e.clone():s._isCustomType(e)?s.fromJSONValue(s.clone(s.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=s.clone(e[r])})),t)},s.newBinary=t.newBinary}(),e.exports=o.EJSON}()},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadStreamTokenizer=void 0;const n=r(8632),o=r(8705);class i extends n.AbstractTokenizer{constructor(e,t){super(t),this.streamReader=new o.StreamReader(e)}async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===r.length)return 0;const i=await this.streamReader.read(e,r.offset,r.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new o.EndOfStreamError;return i}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const o=new Uint8Array(r.length+t);return n=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),e.set(o.subarray(t),r.offset),n-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(e){if(t&&t.mayBeLess&&e instanceof o.EndOfStreamError)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new o.EndOfStreamError}return n}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n<e;){const o=e-n,i=await this.readBuffer(r,{length:Math.min(t,o)});if(i<0)return i;n+=i}return n}}t.ReadStreamTokenizer=i},6092:(e,t,r)=>{"use strict";r.d(t,{Ek:()=>i,SJ:()=>o,YP:()=>s});var n=r(1027);class o extends n.u3{constructor(){super(),this._currentBaseURL=null}use(e){if(!e)throw new Error("baseURL est requis");this._currentBaseURL=e.replace(/\/+$/,"")}_ensureContext(){if(!this._currentBaseURL)throw new Error("baseURL non défini. Appelez use(baseURL)")}getServers(){throw new Error("getServers() doit être implémenté")}exportAll(){throw new Error("exportAll() doit être implémenté")}}class i extends o{constructor(){super(),this._storage=new Map}getAccessToken(){return this._ensureContext(),this._storage.get(this._currentBaseURL)?.accessToken||null}setAccessToken(e){this._ensureContext();const t=this._storage.get(this._currentBaseURL)||{};this._storage.set(this._currentBaseURL,{...t,accessToken:e})}getRefreshToken(){return this._ensureContext(),this._storage.get(this._currentBaseURL)?.refreshToken||null}setRefreshToken(e){this._ensureContext();const t=this._storage.get(this._currentBaseURL)||{};this._storage.set(this._currentBaseURL,{...t,refreshToken:e})}clear(){this._ensureContext(),this._storage.delete(this._currentBaseURL)}getServers(){return[...this._storage.keys()]}exportAll(){return Object.fromEntries(this._storage.entries())}}class s extends o{constructor(e="cocolight"){super(),this.prefix=e}_key(e){return`${this.prefix}_tokens_${e}`}_getData(){this._ensureContext();const e=localStorage.getItem(this._key(this._currentBaseURL));return e?JSON.parse(e):{}}_setData(e){localStorage.setItem(this._key(this._currentBaseURL),JSON.stringify(e))}getAccessToken(){return this._getData().accessToken||null}setAccessToken(e){const t=this._getData();t.accessToken=e,this._setData(t)}getRefreshToken(){return this._getData().refreshToken||null}setRefreshToken(e){const t=this._getData();t.refreshToken=e,this._setData(t)}clear(){localStorage.removeItem(this._key(this._currentBaseURL))}getServers(){return Object.keys(localStorage).filter((e=>e.startsWith(`${this.prefix}_tokens_`))).map((e=>e.replace(`${this.prefix}_tokens_`,"")))}exportAll(){const e={};for(const t of this.getServers()){const r=localStorage.getItem(this._key(t));r&&(e[t]=JSON.parse(r))}return e}}},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),o=r(7060),i=r(6378),s=r(7532),a=r(9857),c=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.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,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${i}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},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),o=r(5354),i=r(494),s=r(3966),a=r(2661),c=r(3025),l=r(9713),u=r(8660),d=r(117),p=r(5333),m=r(7923),f=r(6505),h=r(6163),y=r(5844),g=r(1239),w=r(4426);t.default=function(e=!1){const t=[m.default,f.default,h.default,y.default,g.default,w.default,l.default,u.default,c.default,d.default,p.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},6452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBuffer=t.fromStream=t.EndOfStreamError=void 0;const n=r(6066),o=r(3492);var i=r(8705);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.fromStream=function(e,t){return t=t||{},new n.ReadStreamTokenizer(e,t)},t.fromBuffer=function(e,t){return new o.BufferTokenizer(e,t)}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),o=r(9029),i=o.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:({keyword:e,schemaCode:t})=>o.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const d=new n.KeywordCxt(c,u.RULES.all.format.definition,"format");function p(e){return o._`${e}.compare(${r}, ${i}) ${s[a].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),n=t.const("fmt",o._`${r}[${d.schemaCode}]`);e.fail$data((0,o.or)(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=d.schema,n=u.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 i=t.scopeValue("formats",{key:r,ref:n,code:l.code.formats?o._`${l.code.formats}${(0,o.getProperty)(r)}`:void 0});e.fail$data(p(i))}()},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),o=r(7652),i=r(3835),s=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.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:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const m=t.let("valid",!1),f=t.const("tag",n._`${r}${(0,n.getProperty)(p)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${f} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!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=i.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),l instanceof i.SchemaEnv&&(l=l.schema),void 0===l)throw new s.default(u.opts.uriResolver,u.baseId,e)}const m=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[p];if("object"!=typeof m)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);n=n&&(r||o(l)),c(m,t)}if(!n)throw new Error(`discriminator: "${p}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)m(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)m(r,t)}}function m(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${f} === ${e}`),t.assign(m,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:f,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:f,tagName:p}))),e.ok(m)}};t.default=c},6760:(e,t)=>{"use strict";t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(r))return!1;let n=256;for(let r=t;r<t+148;r++)n+=e[r];for(let r=t+156;r<t+512;r++)n+=e[r];return r===n},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},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),o=r(2017),i=r(7106),s=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++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=m(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function m(e){return e?e.replace(p,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,r){return r=m(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:n}=this.opts,s=m(e[r]||t),a={"":s},c=u(n,s,!1),l={},d=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=c+t;let s=a[o];function u(t){const r=this.opts.uriResolver.resolve;if(t=m(s?r(s,t):t),d.has(t))throw h(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==m(i)&&("#"===t[0]?(p(e,l[t],t),l[t]=e):this.refs[t]=i),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]&&(s=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s})),l;function p(e,t,r){if(void 0!==t&&!o(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,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 o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=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?i.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var o,i,s,l;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.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 n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]: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}(o):f(o,o.length)}function m(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),n=0;n<t;++n)r[n]=e[n];return r}function h(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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;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(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);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},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},i.prototype.listenerCount=m,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7031:(e,t,r)=>{"use strict";r.d(t,{LD:()=>n,QM:()=>o,Rc:()=>i});class n{async loadQueue(){throw new Error("loadQueue() doit être implémenté")}async saveQueue(e){throw new Error("saveQueue(queue) doit être implémenté")}}class o extends n{constructor(){super(),this._queue=[]}async loadQueue(){return this._queue}async saveQueue(e){this._queue=[...e]}}class i extends n{constructor(e="cocolight-api-offline-queue"){super(),this.key=e}async loadQueue(){try{const e=localStorage.getItem(this.key);return e?JSON.parse(e):[]}catch{return[]}}async saveQueue(e){try{localStorage.setItem(this.key,JSON.stringify(e))}catch(e){console.warn("[Offline] Échec du stockage localStorage",e)}}}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5882),o=r(3439),i=r(7307),s=r(422),a=r(4486),c=r(4003),l=r(1163),u=r(617),d=r(7935),p=r(8643),m=[n.default,o.default,i.default,s.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=m},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,o,i,s,a,c,l,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,s,a,c,l,u,d),i){var m=i[p];if(Array.isArray(m)){if(p in t.arrayKeywords)for(var f=0;f<m.length;f++)r(e,n,o,m[f],s+"/"+p+"/"+f,a,s,p,i,f)}else if(p in t.propsKeywords){if(m&&"object"==typeof m)for(var h in m)r(e,n,o,m[h],s+"/"+p+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,i,h)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,m,s+"/"+p,a,s,p,i)}o(i,s,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 n=r(9029),o=r(4227),i=r(3853),s={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:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},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 o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{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=s;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 s{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:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,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,s={},a){let c=n.nil;for(const l in e){const u=e[l];if(!u)continue;const d=s[l]=s[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);c=n._`${c}${s}${this.opts._n}`}d.set(e,i.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9029),o=r(4227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),i.if(u,n._`${l} = ${(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)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(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 o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},8122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),o=r(6461),i=r(9029),s=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,n.fullFormats,s),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return l(e,t.formats||n.formatNames,r,i),t.keywords&&(0,o.default)(e),e};function l(e,t,r,n){var o,s;null!==(o=(s=e.opts.code).formats)&&void 0!==o||(s.formats=i._`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:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(4834),c=r(343);function l(e,t,r,n){const o={};return n||(e=m(u(e,r),r),t=m(u(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}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:""},n=Object.assign({},t),o=[],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&&o.push(r.scheme,":");const l=s(r);if(void 0!==l&&("suffix"!==n.reference&&o.push("//"),o.push(l),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const d=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const l=e.match(p);if(l){if(i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]),i.host){const e=o(i.host);if(!1===e.isIPV4){const t=n(e.host);i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.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||d[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&void 0!==i.host&&(i.host=unescape(i.host)),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=u(m(e,t),t):"object"==typeof e&&(e=m(u(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return u(l(m(e,n),m(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=u(a(m(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(m(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=u(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:m};e.exports=f,e.exports.default=f,e.exports.fastUri=f},8632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTokenizer=void 0;const n=r(8705);t.AbstractTokenizer=class{constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}async readToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}}},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const p=()=>null!=d?d:d=(0,o.useFunc)(t,i.default);let m;if(u||s)m=t.let("valid"),e.block$data(m,(function(){t.assign(m,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(m,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);m=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(m)}};t.default=s},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(2023),s=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{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:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(u,r))return;const m=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(o._`delete ${c}[${e}]`)}function y(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(g(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),d||t.if((0,o.not)(r),(()=>t.break())))}}}function g(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",c,(r=>{m.length||f.length?t.if(function(r){let i;if(m.length>8){const e=(0,s.schemaRefOrVal)(u,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=m.length?(0,o.or)(...m.map((e=>o._`${r} === ${e}`))):o.nil;return f.length&&(i=(0,o.or)(i,...f.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=a},8705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;var n=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}});var o=r(1510);Object.defineProperty(t,"StreamReader",{enumerable:!0,get:function(){return o.StreamReader}})},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),o=r(4227),i=r(2023);function s(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.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,o,i){const{it:c}=e,{gen:u,compositeRule:d,allErrors:p}=c,m=l(e,r,o);(null!=i?i:d||p)?s(u,m):a(c,n._`[${m}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:c,compositeRule:u,allErrors:d}=o;s(c,l(e,r,n)),u||d||a(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(c,n._`${i.default.vErrors}[${s}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(i.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`,o))}))};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 l(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[u(s,r),d(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:m,schemaPath:f}=u;o.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&o.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&o.push([c.schema,l],[c.parentSchema,n._`${m}${f}`],[i.default.data,a]),p&&o.push([c.propertyName,p])}(e,t,a),o.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[c.schemaPath,s]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),o=r(9029),i=r(2023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,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(i.default.data):(t.assign(o._`${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),o=r(7845);var i=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var s=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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?o.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=A(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._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 n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=A(this.rhs,e,t),this}get names(){return j(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,n){super(e,r,n),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 p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class m 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=A(this.code,e,t),this}get names(){return this.code instanceof n._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 n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(I(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class w extends y{}w.kind="else";class _ 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 w(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(N(e),t instanceof _?[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=A(this.condition,e,t),this}get names(){const e=super.names;return j(e,this.condition),this.else&&x(e,this.else.names),e}}_.kind="if";class b extends y{}b.kind="for";class v extends b{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=A(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class E extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=j(super.names,this.from);return j(e,this.to)}}class T extends b{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=A(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class S 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)}}S.kind="func";class $ extends h{render(e){return"return "+super.render(e)}}$.kind="return";class O 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,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class P extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class k extends y{render(e){return"finally"+super.render(e)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function j(e,t){return t instanceof n._CodeOrName?x(e,t.names):e}function A(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._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=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function I(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}k.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 o.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 o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new c(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.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!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new _(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 _(e))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(_,w)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new E(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=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(s,n._`${e}[${t}]`),r(s)}))}return this._for(new T("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new T("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new $;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new O;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new k,this.code(r)),this._endBlockNode(P,k)}throw(e){return this._leafNode(new m(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,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}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 _))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=N;const C=D(t.operators.AND);t.and=function(...e){return e.reduce(C)};const R=D(t.operators.OR);function D(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i={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:i,it:s}=e;if((0,o.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",i,(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),s.allErrors||t.break()}))})),e.ok(a)}};t.default=i},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"]}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);__webpack_require__.r(r);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var o=2&t&&e;"object"==typeof o&&!~leafPrototypes.indexOf(o);o=getProto(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(r,n),r},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".cocolight-api-client.browser.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="CocolightApiClient:",__webpack_require__.l=(e,t,r,n)=>{if(inProgress[e])inProgress[e].push(t);else{var o,i;if(void 0!==r)for(var s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var c=s[a];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==dataWebpackPrefix+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.setAttribute("data-webpack",dataWebpackPrefix+r),o.src=e),inProgress[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(u);var n=inProgress[e];if(delete inProgress[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(r))),t)return t(r)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,r)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(i,(r=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,s,a]=r,c=0;if(i.some((t=>0!==e[t]))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);a&&a(__webpack_require__)}for(t&&t(r);c<i.length;c++)o=i[c],__webpack_require__.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunkCocolightApiClient=this.webpackChunkCocolightApiClient||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>wr});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{ApiAuthenticationError:()=>l,ApiClientError:()=>i,ApiError:()=>o,ApiResponseError:()=>c,ApiValidationError:()=>s,CircuitBreakerError:()=>a});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{hasBrowserEnv:()=>Le,hasStandardBrowserEnv:()=>ze,hasStandardBrowserWebWorkerEnv:()=>qe,navigator:()=>Me,origin:()=>Be});var r=__webpack_require__(2808),n=__webpack_require__(3846);class o extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.details=r}}class i extends o{constructor(e,t,r){super(e,t,r),this.name="ApiClientError"}}class s extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiValidationError",this.status=t,this.messages=r,this.details=n}}class a extends o{constructor(e){super(e,503),this.name="CircuitBreakerError"}}class c extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class l extends o{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const{fromBuffer:u}=n,d=class{_draftData={};_initialDraftData={};_serverData=null;_calledFromSave=!1;constructor(e,t={},r={},n={}){if(this.__entityTag=n.entityTag||this.constructor.name||"BaseEntity",this.deps=r,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if(!e?.apiClient)throw new o("Parent invalide ou ApiClient manquant.");this.apiClient=e.apiClient,this.parent=e}if("function"==typeof r.EndpointApi)this.endpointApi=new r.EndpointApi(this.apiClient);else{if("object"!=typeof r.EndpointApi)throw new o("deps.EndpointApi doit être une classe ou une instance valide.");this.endpointApi=r.EndpointApi}this._serverData=null;const{draft:i,proxy:s}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this._serverData,constant:this.constructor.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this._initialDraftData=JSON.parse(JSON.stringify(i)),this._draftData=i,this.data=s}get id(){return this._draftData.id||null}_id(e){this._draftData.id=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}get draftData(){return this._draftData}get initialDraftData(){return this._initialDraftData}get serverData(){return this._serverData}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return this.constructor.entityType}hasChanges(){return JSON.stringify(this._draftData)!==JSON.stringify(this._initialDraftData)}async refresh(){if(!this.id)throw new o("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new o("Non connecté.");this._calledFromSave=!0;try{const e={...this._draftData};return this.id||"function"!=typeof this._add?"function"==typeof this._update&&await this._update(e)?await this.refresh():this._serverData:(await this._add(e),await this.refresh())}finally{this._calledFromSave=!1}}static fromServerData(e,t,r){const n=new this(t,{},r);n._serverData={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n._serverData,constant:this.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n._draftData=o,n.data=i,n}_setData(e){this._serverData={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this._serverData,constant:this.constructor.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this._initialDraftData=JSON.parse(JSON.stringify(t)),this._draftData=t,this.data=r}defaultFields={};removeFields=[];transforms={};async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))}async callNoConnected(e,t={}){if(this.isConnected)throw new l("Vous devez ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new l("Vous devez être connecté pour faire cette action.");return"function"==typeof e?await e():this.call(e,t)}async callIsMe(e,t={}){if(!this.isMe)throw new l("Vous devez être vous-même pour faire cette action.");return"function"==typeof e?await e():await this.callIsConnected(e,t)}async _validateImage(e){return await this._validateUploadInput(e,{allowedMimeTypes:["image/jpeg","image/png","image/jpg"],expectedType:"image"})}async _validateFile(e){return await this._validateUploadInput(e,{allowedMimeTypes:["application/pdf","text/plain","text/csv"],expectedType:"file"})}async _validateUploadInput(e,{allowedMimeTypes:t=[],expectedType:r="any"}){if(!e)throw new s("Le fichier est requis.");const n="undefined"==typeof window&&"undefined"!=typeof process;let o="",i=e;if("undefined"!=typeof File&&e instanceof File){if(o=e.type,!t.includes(o))throw new s("Le type du fichier est invalide.")}else if("undefined"!=typeof Blob&&e instanceof Blob){if(o=e.type,!t.includes(o))throw new s("Le type du fichier est invalide.");const r=o.split("/")[1]||"bin",n=`${Date.now()}.${r}`;i=new File([e],n,{type:o})}else if(n&&Buffer.isBuffer(e)){const n=await u(e);if(o=n?.mime,!n||!t.includes(o))throw new s("Le type du fichier est invalide.");if("image"===r){const t=n.ext,r=`${Date.now()}.${t}`;i=await this._createReadStreamFromBuffer(e,r,o)}}else{if(!n||!e?.readable||"function"!=typeof e._read)throw new s("Type de fichier non reconnu.");{const r=[],n=await this._passThrough(),a=await this._passThrough(),c=4100;let l=0;e.on("data",(e=>{l<c&&(r.push(e),l+=e.length)})),e.pipe(n).pipe(a),await new Promise((e=>setTimeout(e,10)));const d=Buffer.concat(r),p=await u(d);if(o=p?.mime,!p||!t.includes(o))throw new s("Le type du fichier est invalide.");a.path=`${Date.now()}.${p.ext}`,a.mimeType=o,i=a}}return i}async _createReadStreamFromBuffer(e,t="file.bin",r="application/octet-stream"){const n=await this._bufferToReadable(e);return n.path=t,n.mimeType=r,n}async _bufferToReadable(e){if("undefined"==typeof window){const{bufferToReadable:t}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return t(e)}throw new Error("bufferToReadable ne doit pas être appelé dans le navigateur")}async _passThrough(){if("undefined"==typeof window){const{createPassThrough:e}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return e()}throw new Error("passThrough ne doit pas être appelé dans le navigateur")}_omitProps(e,t){if(!e||"object"!=typeof e)return{};const r={...e};for(const e of t)delete r[e];return r}_pickProps(e,t,r={}){if(!e||"object"!=typeof e)return{};const n={};for(const o of t)if(o in e){const t=e[o];"function"==typeof r[o]?n[o]=r[o](t,e):n[o]=t}return n}_hasAtLeastOne(e,t=[]){return t.some((t=>t in e&&null!=e[t]))}_createFilteredProxy(e){return new Proxy(e,{get:(e,t,r)=>"string"!=typeof t||isNaN(t)?"length"===t?e.filter((e=>!e._isDeleted)).length:"function"==typeof e[t]?(...r)=>e.filter((e=>!e._isDeleted))[t](...r):Reflect.get(e,t,r):e.filter((e=>!e._isDeleted))[t]})}_newId(){return(new r).toString()}_createDraftProxy(e,t={},r={},n=[],o={},i={}){return new Proxy({},{get:(e,n)=>{const i=n in r?r[n]:t[n],s=o[n];return"function"==typeof s?s(i):i},set:(t,o,a)=>{if(!n.includes(o)){const t=`[DraftProxy] Le champ "${o}" n'est pas autorisé.`;if(i.throwOnError)throw new s(t,400,null,{field:o,value:a,allowedFields:n});return e._logger.warn(t),!1}return r[o]=a,!0},deleteProperty:(e,t)=>!!n.includes(t)&&(delete r[t],!0),has:(e,n)=>n in r||n in t,ownKeys:()=>[...new Set([...Object.keys(t),...Object.keys(r)])],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})})}_extractWritableFields(e={},t={},r={defs:{},visited:new Set}){if(!e||"object"!=typeof e)return[];if(e.$id&&r.visited.has(e.$id))return[];e.$id&&r.visited.add(e.$id),r.defs=e.$defs||e.definitions||r.defs;const n=[];if(e.$ref){const o=e.$ref.replace(/^#\/?(\$defs|definitions)\//,""),i=r.defs?.[o];i&&n.push(...this._extractWritableFields(i,t,r))}if(e.allOf&&e.allOf.forEach((e=>n.push(...this._extractWritableFields(e,t,r)))),e.if&&e.then){const o=e.if?.properties;let i=!0;if(o)for(const e in o){const r=o[e]?.const;if(t[e]!==r){i=!1;break}}i&&e.then?n.push(...this._extractWritableFields(e.then,t,r)):!i&&e.else&&n.push(...this._extractWritableFields(e.else,t,r))}return e.properties&&n.push(...Object.entries(e.properties).filter((([e,t])=>!0!==t.readOnly&&void 0===t.const)).map((([e])=>e))),[...new Set(n)]}_buildDraftAndProxy({data:e={},serverData:t=null,constant:r,apiClient:n,transforms:i={},throwOnError:s=!0,removeFields:a=[]}){const c=Array.isArray(r)?r:[r],l={allOf:[],$defs:{}};for(const e of c){const t=n.getRequestSchema(e);if(!t)throw new o(`Unable to find schema for ${e}.`);if(t.$defs)for(const[r,o]of Object.entries(t.$defs))l.$defs[r]?n._logger.warn(`Duplicate $defs key '${r}' from schema '${e}'`):l.$defs[r]=o;l.allOf.push(t)}const u={};let d=this._extractWritableFields(l,e);e.id&&-1===d.indexOf("id")&&d.push("id"),e.slug&&-1===d.indexOf("slug")&&d.push("slug"),d=d.filter((e=>!a.includes(e)));for(const t of d){const r=e[t],n="function"==typeof i[t]?i[t](r,e):r;void 0!==n&&(u[t]=n)}return{draft:u,proxy:this._createDraftProxy(n,t,u,d,i,{throwOnError:s})}}_extractChangedFieldsFromSchema(e,t,r={},n,o=[]){const i=e.getRequestSchema(t);let s=this._extractWritableFields(i,r);const a={},c=n?.()||{};s=s.filter((e=>!o.includes(e)));for(const e of s){if(void 0===r[e])continue;const t=r[e],n=c[e];JSON.stringify(t)!==JSON.stringify(n)&&(a[e]=t)}return Object.keys(a).length>0?a:null}async _resolveId(e){if(!this.id&&this.slug)try{const t=await this.endpointApi.getElementsKey({pathParams:{slug:this.slug}});if(!t?.contextId||t?.contextType!==e)throw new c(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof c?t?.responseData?.contextType!==e?t:new c(`Impossible de récupérer l'identifiant pour le slug ${this.slug}`,t.status,t.responseData):t}return this.id}async _getPublicProfile(){return await this._resolveId(this.getEntityType()),this.endpointApi.getElementsAbout({pathParams:{id:this.id,type:this.getEntityType()}})}_getEntityMeta(e){const t=this.constructor,r=this.__entityTag,n={EndpointApi:this.deps.EndpointApi,User:"User"===r?t:this.deps.User,Organization:"Organization"===r?t:this.deps.Organization,Project:"Project"===r?t:this.deps.Project,Event:"Event"===r?t:this.deps.Event,Poi:"Poi"===r?t:this.deps.Poi,Badge:"Badge"===r?t:this.deps.Badge,News:"News"===r?t:this.deps.News};return{citoyens:{entityClass:n.User,deps:n},organizations:{entityClass:n.Organization,deps:n},projects:{entityClass:n.Project,deps:n},events:{entityClass:n.Event,deps:{...n,Badge:void 0}},poi:{entityClass:n.Poi,deps:{...n,Badge:void 0,News:void 0}},news:{entityClass:n.News,deps:{...n}},badges:{entityClass:n.Badge,deps:{EndpointApi:n.EndpointApi,User:n.User,Organization:n.Organization,Project:n.Project}}}[e]||null}_linkEntity(e,t){const r=this._getEntityMeta(e);return r?r.entityClass.fromServerData(t,this,r.deps):t}async _linkEntityById(e,t,r={}){const n=this._getEntityMeta(e);if(!n)return null;const o=new n.entityClass(this,{id:t},n.deps);return r?.skipGet||await o.get(),o}_linkEntities(e){return e.map((e=>this._linkEntity?.(e.collection,e)??e))}async linkEntitiesFromServerData(e,t={},r={}){const n=r.key||e,o="function"==typeof r.mapFn?r.mapFn:null,i=e=>!0===e||"true"===e,s=e=>!1===e||"false"===e,a=this.serverData?.[n],c=[];if(a&&"object"==typeof a&&Object.keys(a).length>0)for(const r of Object.keys(a)){const n=a[r],l=Object.entries(t).every((([e,t])=>{const r=n[e];if("function"==typeof t)try{return t(r)}catch(t){return console.warn(`Erreur dans le filtre personnalisé pour ${e}`,t),!1}return t instanceof RegExp?"string"==typeof r&&t.test(r):"string"==typeof t&&"string"==typeof r?r.toLowerCase().includes(t.toLowerCase()):i(t)?i(r):s(t)?s(r):"string"!=typeof r||"string"!=typeof t||isNaN(Date.parse(r))||isNaN(Date.parse(t))?r===t:new Date(r).getTime()===new Date(t).getTime()}));if(l)try{const t=await this._linkEntityById(e,r);t&&(t.meta=n,c.push(o?o(t):t))}catch(t){this._logger?.error?.(`Erreur lors de la récupération de l'entité ${e} (${r}) :`,t)}}return c}_entityInstanceData(e,t){const r=this._getEntityMeta(e),n=this.__entityTag,o=this.constructor;return new r.entityClass(this,t,{[n]:o,...r.deps})}async entity(e,t={}){try{const r=this._entityInstanceData(e,t),n={citoyens:["id","slug"],organisations:["id","slug"],projets:["id","slug"],events:["id","slug"],poi:["id","slug"],news:["id"],badges:["id"]}[e];return n&&this._hasAtLeastOne(t,n)&&await r.get(),r}catch(t){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.${e}] Erreur lors de la création d'une instance ${e} :`,t.message),t}}async get(){return this.apiClient.safeCall((async()=>{const e=await this._getPublicProfile();return this._setData(e),e}))}async updateSettings(e={}){return e.idEntity=this.id,e.typeEntity=this.getEntityType(),this.callIsConnected((()=>this.endpointApi.updateSettings(e)))}async updateDescription(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockDescription(e)))}async updateInfo(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockInfo(e)))}async updateSocial(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockSocial(e)))}async updateLocality(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockLocality(e)))}async updateSlug({slug:e}){try{await this.endpointApi.check({type:this.getEntityType(),id:this.id,slug:e})}catch(e){if(e instanceof c)throw new c("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsConnected((()=>this.endpointApi.updateBlockSlug({typeElement:this.getEntityType(),id:this.id,slug:e})))}async updateImageProfil({profil_avatar:e}){e=await this._validateImage(e);const t={pathParams:{folder:this.getEntityType(),ownerId:this.id},profil_avatar:e};return this.callIsConnected((()=>this.endpointApi.profilImage(t)))}async organization(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer une organisation.");return this.entity("organizations",e)}async project(e={}){if(!this.isConnected)throw new o("Vous devez être connecté pour créer un projet.");return this.entity("projects",e)}async poi(e={}){if(!this.isConnected)throw new o("Vous devez être connecté pour créer un POI.");return this.entity("poi",e)}async event(e={}){if(!this.isConnected)throw new o("Vous devez être connecté pour créer un événement.");return this.entity("events",e)}async badge(e={}){if(!this.isConnected)throw new o("Vous devez être connecté pour créer un badge.");return this.entity("badges",e)}async news(e={}){if(!this.isConnected)throw new o("Vous devez être connecté.");return this.entity("news",e)}async getOrganizations(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new c("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=this._linkEntities(r.results);return{count:r.count,results:o}}async getProjects(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={$or:{[`links.contributors.${this.id}`]:{$exists:!0},[`parent.${this.id}`]:{$exists:!0}},[`links.contributors.${this.id}`]:{$exists:!0}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getProjectsAdmin(e))):()=>this.endpointApi.getProjectsNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new c("Erreur lors de la récupération des projets.",500,r.results);const n=this._linkEntities(r.results);return{count:r?.count?.projects??0,results:n}}async getPois(e={}){this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters={[`parent.${this.id}`]:{$exists:!0}});const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getPoisAdmin(e))):()=>this.endpointApi.getPoisNoAdmin(e),r=await t();if(!Array.isArray(r.results))throw new c("Erreur lors de la récupération des POIs.",500,r.results);const n=this._linkEntities(r.results);return{count:r.count?.poi??0,results:n}}async getSubscribers(e={}){delete e?.pathParams,e.filters={[`links.follows.${this.id}`]:{$exists:!0},[`links.follows.${this.id}.toBeValidated`]:{$exists:!1},[`links.follows.${this.id}.isInviting`]:{$exists:!1}};const t=await this.endpointApi.getSubscribers(e);if(!Array.isArray(t.results))throw new c("Erreur lors de la récupération des abonnés.",500,t.results);const r=this._linkEntities(t.results);return{count:t.count,results:r}}async getBadgesIssuer(e={}){delete e?.pathParams,e.filters=e.filters||{},e.filters.$or={},e.filters.$or[`issuer.${this.id}`]={$exists:!0};const t=await this.endpointApi.getBadges(e);if(!Array.isArray(t.results))throw new c("Erreur lors de la récupération des badges.",500,t.results);const r=this._linkEntities(t.results);return{count:t.count?.badges??0,results:r}}async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new c("Erreur lors de la récupération des actualités.",500,t);const r=this._linkEntities(t);return this._createFilteredProxy(r)}};class p extends d{static entityType="badges";static SCHEMA_CONSTANTS=["ADD_BADGES"];static ADD_BLOCKS=new Map([["ADD_BADGES","addBadges"]]);static UPDATE_BLOCKS=new Map([]);defaultFields={};removeFields=[];transforms={};async _add(e){e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of p.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of p.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents n'existe pas dans ${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(){throw new Error(`getNews n'existe pas dans ${this.constructor.name}`)}async getSubscribers(){throw new Error(`getSubscribers n'existe pas dans ${this.constructor.name}`)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`event n'existe pas dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(){throw new Error(`news n'existe pas dans ${this.constructor.name}`)}}const m=class{constructor(e){this.apiClient=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))}async callNoConnected(e,t={}){if(this.isConnected)throw new l("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new l("Vous devez être connecté pour effectuer cette action.");return this.call(e,t)}async personRegister(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callNoConnected("PERSON_REGISTER",e)}async authenticateUrl(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callNoConnected("AUTHENTICATE_URL",e)}async refreshTokenUrl(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("REFRESH_TOKEN_URL",e)}async meInfoUrl(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ME_INFO_URL",e)}async passwordRecovery(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callNoConnected("PASSWORD_RECOVERY",e)}async serverExchangeToken(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("SERVER_EXCHANGE_TOKEN",e)}async changePassword(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("CHANGE_PASSWORD",e)}async deleteAccount(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_ACCOUNT",e)}async updateSettings(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_SETTINGS",e)}async updateBlockDescription(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_BLOCK_DESCRIPTION",e)}async updateBlockInfo(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_BLOCK_INFO",e)}async updateBlockSocial(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_BLOCK_SOCIAL",e)}async updateBlockLocality(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_BLOCK_LOCALITY",e)}async updateBlockSlug(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_BLOCK_SLUG",e)}async check(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("CHECK",e)}async profilImage(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("PROFIL_IMAGE",e)}async getElementsAbout(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_ELEMENTS_ABOUT",e)}async multiconnect(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("MULTICONNECT",e)}async getNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_NEWS",e)}async getNewsById(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_NEWS_BY_ID",e)}async addNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_NEWS",e)}async addImageNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_IMAGE_NEWS",e)}async addFileNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_FILE_NEWS",e)}async deleteNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_NEWS",e)}async updateNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_NEWS",e)}async shareNews(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("SHARE_NEWS",e)}async getComments(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_COMMENTS",e)}async addComments(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_COMMENTS",e)}async deleteComments(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_COMMENTS",e)}async updateComments(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("UPDATE_COMMENTS",e)}async searchTags(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("SEARCH_TAGS",e)}async showVote(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("SHOW_VOTE",e)}async globalAutocomplete(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GLOBAL_AUTOCOMPLETE",e)}async cityAutocomplete(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("CITY_AUTOCOMPLETE",e)}async suggestionInput(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("SUGGESTION_INPUT",e)}async getProjectsNoAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_PROJECTS_NO_ADMIN",e)}async getProjectsAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_PROJECTS_ADMIN",e)}async getPoisNoAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_POIS_NO_ADMIN",e)}async getPoisAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_POIS_ADMIN",e)}async getOrganizationsNoAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_ORGANIZATIONS_NO_ADMIN",e)}async getOrganizationsAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_ORGANIZATIONS_ADMIN",e)}async getMembersNoAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_MEMBERS_NO_ADMIN",e)}async getMembersAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_MEMBERS_ADMIN",e)}async getFriendsAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_FRIENDS_ADMIN",e)}async getSubscriptions(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_SUBSCRIPTIONS",e)}async getSubscriptionsAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_SUBSCRIPTIONS_ADMIN",e)}async getSubscribers(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_SUBSCRIBERS",e)}async getSubscribersAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_SUBSCRIBERS_ADMIN",e)}async getContributors(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_CONTRIBUTORS",e)}async getContributorsAdmin(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_CONTRIBUTORS_ADMIN",e)}async getBadges(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_BADGES",e)}async getBadgesFilters(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_BADGES_FILTERS",e)}async connect(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("CONNECT",e)}async disconnect(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DISCONNECT",e)}async getElementsKey(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_ELEMENTS_KEY",e)}async getFavoris(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_FAVORIS",e)}async deleteFavoris(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_FAVORIS",e)}async addFavoris(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_FAVORIS",e)}async addOrganization(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_ORGANIZATION",e)}async addProject(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_PROJECT",e)}async addPoi(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_POI",e)}async addEvent(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_EVENT",e)}async deletePoi(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_POI",e)}async deleteEvent(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_EVENT",e)}async deleteElement(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("DELETE_ELEMENT",e)}async addImageElement(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_IMAGE_ELEMENT",e)}async linkValidate(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("LINK_VALIDATE",e)}async searchMemberAutocomplete(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("SEARCH_MEMBER_AUTOCOMPLETE",e)}async getNotifications(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_NOTIFICATIONS",e)}async getNotificationsCount(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("GET_NOTIFICATIONS_COUNT",e)}async notificationUpdate(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("NOTIFICATION_UPDATE",e)}async removeAllNotifications(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("REMOVE_ALL_NOTIFICATIONS",e)}async markNotificationAsRead(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("MARK_NOTIFICATION_AS_READ",e)}async activitypubSearch(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("ACTIVITYPUB_SEARCH",e)}async activitypubLink(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ACTIVITYPUB_LINK",e)}async activitypubGetCommunity(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("ACTIVITYPUB_GET_COMMUNITY",e)}async getBadge(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_BADGE",e)}async getEmetteurBadges(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_EMETTEUR_BADGES",e)}async addBadges(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ADD_BADGES",e)}async assignBadges(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("ASSIGN_BADGES",e)}async getEvents(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.call("GET_EVENTS",e)}async shareEvents(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("SHARE_EVENTS",e)}async inviteEvent(e){if(!e||"object"!=typeof e)throw new TypeError("Le paramètre data doit être un objet.");return this.callIsConnected("INVITE_EVENT",e)}};class f extends d{static entityType="events";static SCHEMA_CONSTANTS=["ADD_EVENT"];static ADD_BLOCKS=new Map([["ADD_EVENT","addEvent"]]);static UPDATE_BLOCKS=new Map([]);defaultFields={};removeFields=["typeElement"];transforms={};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of f.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of f.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents - les sous-events ne sont pas encore implémentés dans ${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`les sous-events ne sont pas encore implémentés dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(e={}){return super.news(e)}}class h extends d{static entityType="news";static SCHEMA_CONSTANTS=["ADD_NEWS"];static ADD_BLOCKS=new Map([["ADD_NEWS","addNews"]]);static UPDATE_BLOCKS=new Map([["ADD_NEWS","updateNews"]]);defaultFields={};removeFields=[];transforms={scope:e=>e?.type,mentions:e=>Array.isArray(e)?e.map((e=>({...e,count:parseInt(e.count)}))):[],mediaImg:e=>{const t=e?.images?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countImages:t.length,images:t}:void 0},mediaFile:e=>{const t=e?.files?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countFiles:t.length,files:t}:void 0}};async get(){if(!this.id)throw new o("Impossible de rafraîchir sans ID.");const e=await this.callIsConnected((()=>this.endpointApi.getNewsById({ids:[this.id]})));if(e&&Array.isArray(e)&&1===e.length){const t=e[0];return this._setData(t),this.serverData}throw new o(`Aucune actualité trouvée pour l'ID ${this.id}`)}async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");""===e.text&&(e.text=" "),e.parentId=this.parent.id,e.parentType=this.parent.getEntityType();for(const[t,r]of h.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.object?.id&&(this._draftData.id=e.object.id)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id,""===e?.text&&(e.text=" "),e.parentId=this.parent.id,e.parentType=this.parent.getEntityType(),e.idNews=this.id;let t=!1;const r=await this.callIsConnected((()=>this.endpointApi.updateNews(e)));return r?.object&&(this._serverData={...r.object}),t=!0,!0}async addNews(e={}){return this.callIsConnected((()=>this.endpointApi.addNews(e)))}async updateNews(e={}){return this.callIsConnected((()=>this.endpointApi.updateNews(e)))}async addMention({slug:e,id:t}){try{if(!e&&!t)throw new o("Vous devez fournir un slug ou un id pour ajouter une mention.");const r=await this.entity("citoyens",{id:t,slug:e}),n=r.serverData;if(this._draftData.mentions||(this._draftData.mentions=[]),this._draftData.mentions.find((e=>e.id===n.id)))return this._draftData.mentions=this._draftData.mentions.map((e=>(e.id===n.id&&(e.count+=1),e))),this._draftData.mentions;const i={id:n.id,slug:n.slug,type:r.getEntityType(),name:n.name,value:n.name,count:1};return this._draftData.mentions.push(i),this._draftData.mentions}catch(e){throw this.apiClient._logger.error("Erreur lors de l'ajout de la mention :",e),e}}async addImage(e){e=await this._validateImage(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsImage:e},r=await this.callIsConnected((()=>this.endpointApi.addImageNews(t)));return this._draftData.mediaImg?(this._draftData.mediaImg.countImages=this._draftData.mediaImg.countImages+1,this._draftData.mediaImg.images.push(r.id)):this._draftData.mediaImg={countImages:1,images:[r.id]},r}async addFile(e){e=await this._validateFile(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsFile:e},r=await this.callIsConnected((()=>this.endpointApi.addFileNews(t)));return this._draftData.mediaFile?(this._draftData.mediaFile.countFiles=this._draftData.mediaFile.countFiles+1,this._draftData.mediaFile.files.push(r)):this._draftData.mediaFile={countFiles:1,files:[r]},r}async delete(){if(!this.id)throw new o("Vous devez fournir un id pour supprimer une news.");const e={pathParams:{id:this.id}};await this.callIsConnected((()=>this.endpointApi.deleteNews(e))),this._draftData={},this._serverData=null,this._draftData.id=null,this._isDeleted=!0}}class y extends d{static entityType="organizations";static SCHEMA_CONSTANTS=["ADD_ORGANIZATION","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_ORGANIZATION","addOrganization"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of y.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of y.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addOrganization(e={}){return this.callIsConnected((()=>this.endpointApi.addOrganization(e)))}async getOrganizations(){throw new Error("getOrganizations n'existe pas dans Organization")}async getProjects(e={}){return super.getProjects(e)}async getEvents(){throw new Error("getEvents pas encore implémenté dans Organization")}async getPois(e={}){return super.getPois(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async getMembers(e={},t={}){const{isAdmin:r,isInviting:n,roles:o=[]}=t;this.isMe?e.pathParams={type:this.getEntityType(),id:this.id}:(delete e?.pathParams,e.filters=this._buildMemberFilters(this.id,{isAdmin:r,isInviting:n,roles:o}));const i=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getMembersAdmin(e))):()=>this.endpointApi.getMembersNoAdmin(e),s=await i();if(!Array.isArray(s.results))throw new c("Erreur lors de la récupération des membres",500,s.results);const a=this._linkEntities(s.results);return{count:s.count?.poi??0,results:a}}_buildMemberFilters(e,{isAdmin:t,isInviting:r,roles:n}){if(void 0!==t&&"boolean"!=typeof t)throw new TypeError("isAdmin doit être un booléen.");if(void 0!==r&&"boolean"!=typeof r)throw new TypeError("isInviting doit être un booléen.");if(!Array.isArray(n))throw new TypeError("roles doit être un tableau de chaînes.");const o={[`links.memberOf.${e}`]:{$exists:!0},[`links.memberOf.${e}.toBeValidated`]:{$exists:!1}};return!0!==r&&!1!==r||(o[`links.memberOf.${e}.isInviting`]={$exists:r}),!0===t&&(o[`links.memberOf.${e}.isAdmin`]={$exists:!0}),Array.isArray(n)&&n.length>0&&(o[`links.memberOf.${e}.roles`]={$in:n}),o}async project(e={}){return super.project(e)}async poi(e={}){return super.poi(e)}async event(e={}){return super.event(e)}async badge(e={}){return super.badge(e)}async news(e={}){return super.news(e)}}class g extends d{static entityType="poi";static SCHEMA_CONSTANTS=["ADD_POI","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_POI","addPoi"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of g.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of g.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addPoi(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addPoi(e)))}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(){throw new Error(`getProjects n'existe pas dans ${this.constructor.name}`)}async getEvents(){throw new Error(`getEvents n'existe pas dans${this.constructor.name}`)}async getPois(){throw new Error(`getPois n'existe pas dans ${this.constructor.name}`)}async getBadgesIssuer(){throw new Error(`getBadgesIssuer n'existe pas dans ${this.constructor.name}`)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(){throw new Error(`project n'existe pas dans ${this.constructor.name}`)}async poi(){throw new Error(`poi n'existe pas dans ${this.constructor.name}`)}async event(){throw new Error(`event n'existe pas dans ${this.constructor.name}`)}async badge(){throw new Error(`badge n'existe pas dans ${this.constructor.name}`)}async news(e={}){return super.news(e)}}class w extends d{static entityType="projects";static SCHEMA_CONSTANTS=["ADD_PROJECT","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_PROJECT","addProject"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal,parent:e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{type:t?.type??null,name:t?.name??null}]))):null};async _add(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _add, utilisez save");e.id=this._newId?.(),e.slug&&delete e.slug;for(const[t,r]of w.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this._draftData.id=e.map.id,this._draftData.slug=e.map.slug)}}}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of w.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async addProject(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addProject(e)))}async getOrganizations(){throw new Error(`getOrganizations n'existe pas dans ${this.constructor.name}`)}async getProjects(e={}){return super.getProjects(e)}async getEvents(){throw new Error(`getEvents pas encore implémenté dans ${this.constructor.name}`)}async getPois(e={}){return super.getPois(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getNews(e={}){return super.getNews(e)}async getSubscribers(e={}){return super.getSubscribers(e)}async project(e={}){return super.project(e)}async poi(e={}){return super.poi(e)}async event(e={}){return super.event(e)}async badge(e={}){return super.badge(e)}async news(e={}){return super.news(e)}}class _ extends d{static entityType="citoyens";static SCHEMA_CONSTANTS=["UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};constructor(e,t={},r={}){if(!r.EndpointApi)throw new o("EndpointApi class must be injected to avoid circular dependency.");if(!t?.id&&!t?.slug)throw new o("Vous devez fournir un id ou un slug pour créer un User.");if(!r.Organization)throw new o("Organization class must be injected.");if(!r.Project)throw new o("Project class must be injected.");if(!r.Event)throw new o("Event class must be injected.");if(!r.Poi)throw new o("Poi class must be injected.");if(!r.Badge)throw new o("Badge class must be injected.");if(!r.News)throw new o("News class must be injected.");super(e,t,r)}get slug(){return this._draftData.slug||null}get isMe(){return this.isConnected&&this.userId===this.id}async get(){return this.apiClient.safeCall((async()=>{if(this.isMe){const e=await this.endpointApi.meInfoUrl();return this._setData(e),e}{const e=await this._getPublicProfile();return this._setData(e),e}}))}async changePassword(e={}){return this.callIsMe((()=>this.endpointApi.changePassword(e)))}async delete(e={}){return this.callIsMe((()=>this.endpointApi.deleteAccount(e)))}async save(){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour sauvegarder.");await super.save()}async _add(){throw new o("Vous ne pouvez pas ajouter un utilisateur par ce moyen.")}async _update(e){if(!this._calledFromSave)throw new Error("utilisation invalide de _update, utilisez save");e.id&&delete e.id;let t=!1;for(const[r,n]of _.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}static fromServerData(e,t,r){const n=new _(t.apiClient,e,r);n._serverData={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n._serverData,constant:_.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n._draftData=o,n.data=i,n}async updateSettings(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour les paramètres.");await super.updateSettings(e),await this.refresh()}async updateDescription(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour la description.");return super.updateDescription(e)}async updateInfo(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour les informations.");return super.updateInfo(e)}async updateSocial(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour les réseaux sociaux.");return super.updateSocial(e)}async updateLocality(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour la localité.");return super.updateLocality(e)}async updateSlug({slug:e}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour le slug.");return super.updateSlug({slug:e})}async updateImageProfil({profil_avatar:e}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour mettre à jour l'image de profil.");return super.updateImageProfil({profil_avatar:e})}async getOrganizations(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e);this.isMe||e.filters||(e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const r=await t();if(!Array.isArray(r.results))throw new c("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=this._linkEntities(r.results);return{count:r.count,results:o}}async getProjects(e={}){return super.getProjects(e)}async getPois(e={}){return super.getPois(e)}async getNews(e={}){return super.getNews(e)}async getFriends(e={}){delete e?.pathParams,this.isMe||(e.pathParams={id:this.id});const t=await this.endpointApi.getFriendsAdmin(e);if(!Array.isArray(t.results))throw new c("Erreur lors de la récupération des amis administrables.",500,t);const r=this._linkEntities(t.results);return{count:t?.count?.citoyens??0,results:r}}async getSubscriptions(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getSubscriptionsAdmin(e))):()=>this.endpointApi.getSubscriptions(e);this.isMe||e.filters||(e.filters={[`links.followers.${this.id}`]:{$exists:!0}});const r=await t();if(!Array.isArray(r.results))throw new c("Erreur lors de la récupération des abonnements.",500,r.results);const n=this._linkEntities(r.results);return{count:r.count,results:n}}async getSubscribers(e={}){return super.getSubscribers(e)}async getBadgesIssuer(e={}){return super.getBadgesIssuer(e)}async getBadges(e={}){return await this.linkEntitiesFromServerData("badges",e)}async organization(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer une organisation.");return super.organization(e)}async project(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer un projet.");return super.project(e)}async news(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer une actualité.");return super.news(e)}async poi(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer un POI.");return super.poi(e)}async event(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer un événement.");return super.event(e)}async badge(e={}){if(!this.isMe)throw new o("Vous devez être connecté et être l'utilisateur pour créer un badge.");return super.badge(e)}}Object.assign(_.prototype,{});var b=__webpack_require__(7007);const v=(e,t)=>1===t?e:`${e}s`,E=e=>{if(""===e)return"$";const t=e.substring(1).split(/\//).map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~").replace(/\./g,"\\."))).map((e=>/^\d+$/.exec(e)?`[${e}]`:`.${e}`)).join("");return"$"+t},T=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},S=(e,t="and")=>0===e.length?"nothing":1===e.length?e[0]:2===e.length?`${e[0]} ${t} ${e[1]}`:`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`,$={"date-time":"date and time",time:"time",date:"date",email:"email address",hostname:"hostname",ipv4:"IPv4 address",ipv6:"IPv6 address",uri:"URI","uri-reference":"URI Reference","uri-template":"URI-template","json-pointer":"JSON Pointer","relative-json-pointer":"relative JSON Pointer",regex:"regular expression"},O={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class P extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...O,...t},this.pointer=e.instancePath,this.path=E(e.instancePath);const r=(({data:e,keyword:t,message:r,params:n,parentSchema:o,schemaPath:i,instancePath:s},{fieldLabels:a})=>{const c=(({instancePath:e,parentSchema:t},{fieldLabels:r})=>{switch(r){case"js":return""===e?"the root value":`the value at ${E(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${E(e)}`;case"jsonPointer":case"instancePath":return""===e?"the root value":`the value at ${e}`;case"title":return(null==t?void 0:t.title)?t.title:""===e?"the root value":`the value at ${e}`;default:throw new Error(`invalid fieldLabels value: ${r}`)}})({instancePath:s,parentSchema:o},{fieldLabels:a});if(null==o?void 0:o.errorMessage)return`${c} ${o.errorMessage}`;switch(t){case"enum":{const e=n.allowedValues.map(JSON.stringify);return`${c} must be one of: ${S(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=S(t,"or"),o=(e=>{const t=typeof e;switch(t){case"object":return null===e?"null":Array.isArray(e)?"an array":"an object";case"undefined":return"undefined";default:return`${T(t)} ${t}`}})(e);return`${c} must be ${T(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=v("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${v("character",o)}`}case"maxLength":{const t=n.limit,r=v("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${v("character",o)}`}case"pattern":{if(i.endsWith("propertyNames/pattern"))return null;const e=null==o?void 0:o.patternLabel;return e?`${c} must be ${e} but it was not`:`${c} is an invalid string`}case"format":return`${c} must be a valid ${$[n.format]||n.format} string but it was not`;case"multipleOf":return`${c} must be a multiple of ${n.multipleOf}`;case"minimum":return`${c} must be equal to or greater than ${n.limit}`;case"exclusiveMinimum":return`${c} must be greater than ${n.limit}`;case"maximum":return`${c} must be equal to or less than ${n.limit}`;case"exclusiveMaximum":return`${c} must be less than ${n.limit}`;case"additionalProperties":{const e=Object.keys(null==o?void 0:o.properties).join(", ");return`${c} has an unexpected property, ${n.additionalProperty}, which is not in the list of allowed properties (${e})`}case"required":return`${c} is missing the required field '${n.missingProperty}'`;case"propertyNames":return`${c} has an invalid property name ${JSON.stringify(n.propertyName)}`;case"minProperties":return`${c} must have ${n.limit} or more properties but it has ${Object.keys(e).length}`;case"maxProperties":return`${c} must have ${n.limit} or fewer properties but it has ${Object.keys(e).length}`;case"dependencies":{const e=n.property;return`${c} must have property ${n.missingProperty} when ${e} is present`}case"minItems":return`${c} must have ${n.limit} or more items but it has ${e.length}`;case"maxItems":return`${c} must have ${n.limit} or fewer items but it has ${e.length}`;case"uniqueItems":{const{i:e,j:t}=n;return`${c} must be unique but elements ${t} and ${e} are the same`}default:return`${c} ${r}`}})(e,this.options);var n;null!==r?(this.message=`${n=r,"string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1)}.`,this.options.includeOriginalError&&(this.original=e),this.options.includeData&&(this.data=e.data)):this.redundant=!0}toJSON(){const e={path:this.path,pointer:this.pointer,message:this.message};return this.options.includeOriginalError&&(e.original=this.original),this.options.includeData&&(e.data=this.data),e}}class k extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new P(e,t))).filter((e=>!e.redundant)),this.message=this.errors.map((e=>e.message)).join(" ")}toJSON(){return this.errors.map((e=>e.toJSON()))}*[Symbol.iterator](){for(const e of this.errors)yield e}}var x=__webpack_require__(3282),j=__webpack_require__(8182);function A(e,t){return function(){return e.apply(t,arguments)}}const{toString:I}=Object.prototype,{getPrototypeOf:N}=Object,C=(R=Object.create(null),e=>{const t=I.call(e);return R[t]||(R[t]=t.slice(8,-1).toLowerCase())});var R;const D=e=>(e=e.toLowerCase(),t=>C(t)===e),L=e=>t=>typeof t===e,{isArray:M}=Array,z=L("undefined"),q=D("ArrayBuffer"),B=L("string"),U=L("function"),F=L("number"),V=e=>null!==e&&"object"==typeof e,G=e=>{if("object"!==C(e))return!1;const t=N(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},K=D("Date"),J=D("File"),H=D("Blob"),Z=D("FileList"),W=D("URLSearchParams"),[Q,Y,X,ee]=["ReadableStream","Request","Response","Headers"].map(D);function te(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),M(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function re(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,oe=e=>!z(e)&&e!==ne,ie=(se="undefined"!=typeof Uint8Array&&N(Uint8Array),e=>se&&e instanceof se);var se;const ae=D("HTMLFormElement"),ce=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),le=D("RegExp"),ue=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};te(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},de=D("AsyncFunction"),pe=(me="function"==typeof setImmediate,fe=U(ne.postMessage),me?setImmediate:fe?(he=`axios@${Math.random()}`,ye=[],ne.addEventListener("message",(({source:e,data:t})=>{e===ne&&t===he&&ye.length&&ye.shift()()}),!1),e=>{ye.push(e),ne.postMessage(he,"*")}):e=>setTimeout(e));var me,fe,he,ye;const ge="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ne):"undefined"!=typeof process&&process.nextTick||pe,we={isArray:M,isArrayBuffer:q,isBuffer:function(e){return null!==e&&!z(e)&&null!==e.constructor&&!z(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||U(e.append)&&("formdata"===(t=C(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&q(e.buffer),t},isString:B,isNumber:F,isBoolean:e=>!0===e||!1===e,isObject:V,isPlainObject:G,isReadableStream:Q,isRequest:Y,isResponse:X,isHeaders:ee,isUndefined:z,isDate:K,isFile:J,isBlob:H,isRegExp:le,isFunction:U,isStream:e=>V(e)&&U(e.pipe),isURLSearchParams:W,isTypedArray:ie,isFileList:Z,forEach:te,merge:function e(){const{caseless:t}=oe(this)&&this||{},r={},n=(n,o)=>{const i=t&&re(r,o)||o;G(r[i])&&G(n)?r[i]=e(r[i],n):G(n)?r[i]=e({},n):M(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&te(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(te(t,((t,n)=>{r&&U(t)?e[n]=A(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 o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&N(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:C,kindOfTest:D,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(M(e))return e;let t=e.length;if(!F(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:ae,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:ue,freezeMethods:e=>{ue(e,((t,r)=>{if(U(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];U(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 M(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:re,global:ne,isContextDefined:oe,isSpecCompliantForm:function(e){return!!(e&&U(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 o=M(e)?[]:{};return te(e,((e,t)=>{const i=r(e,n+1);!z(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:de,isThenable:e=>e&&(V(e)||U(e))&&U(e.then)&&U(e.catch),setImmediate:pe,asap:ge};function _e(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}we.inherits(_e,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:we.toJSONObject(this.config),code:this.code,status:this.status}}});const be=_e.prototype,ve={};["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=>{ve[e]={value:e}})),Object.defineProperties(_e,ve),Object.defineProperty(be,"isAxiosError",{value:!0}),_e.from=(e,t,r,n,o,i)=>{const s=Object.create(be);return we.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),_e.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Ee=_e;function Te(e){return we.isPlainObject(e)||we.isArray(e)}function Se(e){return we.endsWith(e,"[]")?e.slice(0,-2):e}function $e(e,t,r){return e?e.concat(t).map((function(e,t){return e=Se(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Oe=we.toFlatObject(we,{},null,(function(e){return/^is[A-Z]/.test(e)})),Pe=function(e,t,r){if(!we.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=we.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!we.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&we.isSpecCompliantForm(t);if(!we.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(we.isDate(e))return e.toISOString();if(!a&&we.isBlob(e))throw new Ee("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(e)||we.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(we.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(we.isArray(e)&&function(e){return we.isArray(e)&&!e.some(Te)}(e)||(we.isFileList(e)||we.endsWith(r,"[]"))&&(a=we.toArray(e)))return r=Se(r),a.forEach((function(e,n){!we.isUndefined(e)&&null!==e&&t.append(!0===s?$e([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!Te(e)||(t.append($e(o,r,i),c(e)),!1)}const u=[],d=Object.assign(Oe,{defaultVisitor:l,convertValue:c,isVisitable:Te});if(!we.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!we.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),we.forEach(r,(function(r,i){!0===(!(we.isUndefined(r)||null===r)&&o.call(t,r,we.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),u.pop()}}(e),t};function ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function xe(e,t){this._pairs=[],e&&Pe(e,this,t)}const je=xe.prototype;je.append=function(e,t){this._pairs.push([e,t])},je.toString=function(e){const t=e?function(t){return e.call(this,t,ke)}:ke;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ae=xe;function Ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(e,t,r){if(!t)return e;const n=r&&r.encode||Ie;we.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):we.isURLSearchParams(t)?t.toString():new Ae(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Ce=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){we.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},De={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Le="undefined"!=typeof window&&"undefined"!=typeof document,Me="object"==typeof navigator&&navigator||void 0,ze=Le&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),qe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=Le&&window.location.href||"http://localhost",Ue={...t,...De},Fe=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&we.isArray(n)?n.length:i,a?(we.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&we.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&we.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s)}if(we.isFormData(e)&&we.isFunction(e.entries)){const r={};return we.forEachEntry(e,((e,n)=>{t(function(e){return we.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},Ve={transitional:Re,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=we.isObject(e);if(o&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return n?JSON.stringify(Fe(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Pe(e,new Ue.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Ue.isNode&&we.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(we.isString(e))try{return(0,JSON.parse)(e),we.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(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.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 Ee.from(e,Ee.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:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],(e=>{Ve.headers[e]={}}));const Ge=Ve,Ke=we.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"]),Je=Symbol("internals");function He(e){return e&&String(e).trim().toLowerCase()}function Ze(e){return!1===e||null==e?e:we.isArray(e)?e.map(Ze):String(e)}function We(e,t,r,n,o){return we.isFunction(n)?n.call(this,t,r):(o&&(t=r),we.isString(t)?we.isString(n)?-1!==t.indexOf(n):we.isRegExp(n)?n.test(t):void 0:void 0)}class Qe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=He(t);if(!o)throw new Error("header name must be a non-empty string");const i=we.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Ze(e))}const i=(e,t)=>we.forEach(e,((e,r)=>o(e,r,t)));if(we.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(we.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Ke[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(we.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=He(e)){const r=we.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(we.isFunction(t))return t.call(this,e,r);if(we.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=He(e)){const r=we.findKey(this,e);return!(!r||void 0===this[r]||t&&!We(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=He(e)){const o=we.findKey(r,e);!o||t&&!We(0,r[o],o,t)||(delete r[o],n=!0)}}return we.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!We(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return we.forEach(this,((n,o)=>{const i=we.findKey(r,o);if(i)return t[i]=Ze(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Ze(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return we.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&we.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[Je]=this[Je]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=He(e);t[n]||(function(e,t){const r=we.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return we.isArray(e)?e.forEach(n):n(e),this}}Qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),we.reduceDescriptors(Qe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),we.freezeMethods(Qe);const Ye=Qe;function Xe(e,t){const r=this||Ge,n=t||r,o=Ye.from(n.headers);let i=n.data;return we.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function et(e){return!(!e||!e.__CANCEL__)}function tt(e,t,r){Ee.call(this,null==e?"canceled":e,Ee.ERR_CANCELED,t,r),this.name="CanceledError"}we.inherits(tt,Ee,{__CANCEL__:!0});const rt=tt;function nt(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Ee("Request failed with status code "+r.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const ot=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];o||(o=c),r[i]=a,n[i]=c;let u=s,d=0;for(;u!==i;)d+=r[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),i-a)))},()=>r&&s(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},it=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},st=e=>(...t)=>we.asap((()=>e(...t))),at=Ue.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ue.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,ct=Ue.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];we.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),we.isString(n)&&s.push("path="+n),we.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 lt(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 ut=e=>e instanceof Ye?{...e}:e;function dt(e,t){t=t||{};const r={};function n(e,t,r,n){return we.isPlainObject(e)&&we.isPlainObject(t)?we.merge.call({caseless:n},e,t):we.isPlainObject(t)?we.merge({},t):we.isArray(t)?t.slice():t}function o(e,t,r,o){return we.isUndefined(t)?we.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!we.isUndefined(t))return n(void 0,t)}function s(e,t){return we.isUndefined(t)?we.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(ut(e),ut(t),0,!0)};return we.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);we.isUndefined(s)&&i!==a||(r[n]=s)})),r}const pt=e=>{const t=dt({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Ye.from(a),t.url=Ne(lt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),we.isFormData(n))if(Ue.hasStandardBrowserEnv||Ue.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(Ue.hasStandardBrowserEnv&&(o&&we.isFunction(o)&&(o=o(t)),o||!1!==o&&at(t.url))){const e=i&&s&&ct.read(s);e&&a.set(i,e)}return t},mt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=pt(e);let o=n.data;const i=Ye.from(n.headers).normalize();let s,a,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:m}=n;function f(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=Ye.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());nt((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:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.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 Ee("Request aborted",Ee.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Ee("Network Error",Ee.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Re;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Ee(t,o.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&we.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),we.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),d&&"json"!==d&&(h.responseType=n.responseType),m&&([c,u]=ot(m,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,l]=ot(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new rt(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Ue.protocols.indexOf(g)?r(new Ee("Unsupported protocol "+g+":",Ee.ERR_BAD_REQUEST,e)):h.send(o||null)}))},ft=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Ee?t:new rt(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Ee(`timeout ${t} of ms exceeded`,Ee.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>we.asap(s),a}},ht=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},yt=(e,t,r,n)=>{const o=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*ht(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},gt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,wt=gt&&"function"==typeof ReadableStream,_t=gt&&("function"==typeof TextEncoder?(bt=new TextEncoder,e=>bt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var bt;const vt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Et=wt&&vt((()=>{let e=!1;const t=new Request(Ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Tt=wt&&vt((()=>we.isReadableStream(new Response("").body))),St={stream:Tt&&(e=>e.body)};var $t;gt&&($t=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!St[e]&&(St[e]=we.isFunction($t[e])?t=>t[e]():(t,r)=>{throw new Ee(`Response type '${e}' is not supported`,Ee.ERR_NOT_SUPPORT,r)})})));const Ot={http:null,xhr:mt,fetch:gt&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=pt(e);l=l?(l+"").toLowerCase():"text";let m,f=ft([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Et&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=we.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(we.isBlob(e))return e.size;if(we.isSpecCompliantForm(e)){const t=new Request(Ue.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return we.isArrayBufferView(e)||we.isArrayBuffer(e)?e.byteLength:(we.isURLSearchParams(e)&&(e+=""),we.isString(e)?(await _t(e)).byteLength:void 0)})(t):r})(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(we.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=it(y,ot(st(c)));n=yt(r.body,65536,e,t)}}we.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;m=new Request(t,{...p,signal:f,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let i=await fetch(m);const s=Tt&&("stream"===l||"response"===l);if(Tt&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=we.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&it(t,ot(st(a),!0))||[];i=new Response(yt(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await St[we.findKey(St,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{nt(t,r,{data:g,headers:Ye.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:m})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,e,m),{cause:t.cause||t});throw Ee.from(t,t&&t.code,e,m)}})};we.forEach(Ot,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Pt=e=>`- ${e}`,kt=e=>we.isFunction(e)||null===e||!1===e,xt=e=>{e=we.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!kt(r)&&(n=Ot[(t=String(r)).toLowerCase()],void 0===n))throw new Ee(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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(Pt).join("\n"):" "+Pt(e[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function jt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function At(e){return jt(e),e.headers=Ye.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xt(e.adapter||Ge.adapter)(e).then((function(t){return jt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t}),(function(t){return et(t)||(jt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)}))}const It={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{It[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Nt={};It.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Ee(n(o," has been removed"+(t?" in "+t:"")),Ee.ERR_DEPRECATED);return t&&!Nt[o]&&(Nt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},It.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Ct={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Ee("option "+i+" must be "+r,Ee.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Ee("Unknown option "+i,Ee.ERR_BAD_OPTION)}},validators:It},Rt=Ct.validators;class Dt{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}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=dt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Ct.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),null!=n&&(we.isFunction(n)?t.paramsSerializer={serialize:n}:Ct.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ct.assertOptions(t,{baseUrl:Rt.spelling("baseURL"),withXsrfToken:Rt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&we.merge(o.common,o[t.method]);o&&we.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ye.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.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=[At.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let p=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=At.call(this,p)}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 Ne(lt((e=dt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],(function(e){Dt.prototype[e]=function(t,r){return this.request(dt(r||{},{method:e,url:t,data:(r||{}).data}))}})),we.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(dt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Dt.prototype[e]=t(),Dt.prototype[e+"Form"]=t(!0)}));const Lt=Dt;class Mt{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,o){r.reason||(r.reason=new rt(e,n,o),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 Mt((function(t){e=t})),cancel:e}}}const zt=Mt,qt={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(qt).forEach((([e,t])=>{qt[t]=e}));const Bt=qt,Ut=function e(t){const r=new Lt(t),n=A(Lt.prototype.request,r);return we.extend(n,Lt.prototype,r,{allOwnKeys:!0}),we.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(dt(t,r))},n}(Ge);Ut.Axios=Lt,Ut.CanceledError=rt,Ut.CancelToken=zt,Ut.isCancel=et,Ut.VERSION="1.8.4",Ut.toFormData=Pe,Ut.AxiosError=Ee,Ut.Cancel=Ut.CanceledError,Ut.all=function(e){return Promise.all(e)},Ut.spread=function(e){return function(t){return e.apply(null,t)}},Ut.isAxiosError=function(e){return we.isObject(e)&&!0===e.isAxiosError},Ut.mergeConfig=dt,Ut.AxiosHeaders=Ye,Ut.formToJSON=e=>Fe(we.isHTMLForm(e)?new FormData(e):e),Ut.getAdapter=xt,Ut.HttpStatusCode=Bt,Ut.default=Ut;const Ft=Ut;var Vt=__webpack_require__(1111);const Gt="axios-retry";function Kt(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&Vt(e)}const Jt=["get","head","options"],Ht=Jt.concat(["put","delete"]);function Zt(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Wt(e){return!!e.config?.method&&Zt(e)&&-1!==Ht.indexOf(e.config.method)}function Qt(e){return Kt(e)||Wt(e)}function Yt(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 Xt={retries:3,retryCondition:Qt,retryDelay:function(e=0,t=void 0){return Math.max(0,Yt(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function er(e,t,r=!1){const n=function(e,t){return{...Xt,...t,...e[Gt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[Gt]=n,n}const tr=(e,t)=>{const r=e.interceptors.request.use((e=>(er(e,t,!0),e[Gt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const o=er(n,t);return r.response&&o.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if("object"==typeof o)try{return!1!==await o}catch(e){return!1}return o}(o,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:s}=t,a=o(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),!i&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,o=n.timeout-e-a;if(o<=0)return Promise.reject(r);n.timeout=o}return n.transformRequest=[e=>e],await s(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(o),t(e(n))},o=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,o,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(o,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};tr.isNetworkError=Kt,tr.isSafeRequestError=function(e){return!!e.config?.method&&Zt(e)&&-1!==Jt.indexOf(e.config.method)},tr.isIdempotentRequestError=Wt,tr.isNetworkOrIdempotentRequestError=Qt,tr.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,Yt(t));return o+.2*o*Math.random()},tr.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,Yt(r))}},tr.isRetryableError=Zt;const rr=tr;var nr=__webpack_require__(6022);class or extends Error{}or.prototype.name="InvalidTokenError";var ir=__webpack_require__(4874);const sr={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!sr._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof sr.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new sr.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()}}},ar=sr,cr={common1:{type:"string"},common2:{format:"email",type:"string"},common3:{type:"boolean"},common4:{format:"uri",type:"string"},common5:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common6:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},required:["id"],type:"object"},common7:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},common8:{additionalProperties:!1,properties:{reason:{default:"",type:"string"}},required:["reason"],type:"object"},common9:{reason:{default:"",type:"string"}},common10:{default:"",type:"string"},common11:{pattern:"^[a-f0-9]{24}$",type:"string"},common12:{const:"citoyens"},common13:{properties:{value:{type:"boolean"}}},common14:{value:{type:"boolean"}},common15:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},common16:{},common17:{else:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}}},common18:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},common19:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},common20:{properties:{typeElement:{const:"citoyens"}}},common21:{typeElement:{const:"citoyens"}},common22:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}},common23:{not:{type:"null"}},common24:{type:"null"},common25:{default:"citoyens",enum:["citoyens","projects","organizations","poi"],type:"string"},common26:{anyOf:[{items:{type:"string"},type:"array"},{enum:[""],type:"string"}]},common27:{items:{type:"string"},type:"array"},common28:{enum:[""],type:"string"},common29:{properties:{name:{not:{type:"null"}}},required:["name"]},common30:{name:{not:{type:"null"}}},common31:{properties:{url:{not:{type:"null"}}},required:["url"]},common32:{url:{not:{type:"null"}}},common33:{properties:{tags:{not:{type:"null"}}},required:["tags"]},common34:{tags:{not:{type:"null"}}},common35:{properties:{email:{not:{type:"null"}}},required:["email"]},common36:{email:{not:{type:"null"}}},common37:{const:"info",default:"info",type:"string"},common38:{$ref:"#/$defs/sharedFields/email"},common39:{$ref:"#/$defs/sharedFields/name"},common40:{$ref:"#/$defs/sharedFields/tags"},common41:{default:"citoyens",enum:["citoyens"],type:"string"},common42:{$ref:"#/$defs/sharedFields/url"},common43:{const:"projects"},common44:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type","name"],type:"object"},common45:{name:{type:"string"},type:{type:"string"}},common46:{const:"organizations"},common47:{properties:{type:{not:{type:"null"}}},required:["type"]},common48:{type:{not:{type:"null"}}},common49:{enum:["link","tool","machine","software","rh","Resource material","Financial Ressource","ficheBlanche","geoJson","compostPickup","video","sharedLibrary","recoveryCenter","trash","history","something2See","funPlace","place","artPiece","streetArts","openScene","stand","parking","other"],type:"string"},common50:{enum:["poi"],type:"string"},common51:{$ref:"#/$defs/socialField"},common52:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},common53:{id:{pattern:"^[a-f0-9]{24}$"}},common54:{pattern:"^[a-f0-9]{24}$"},common55:{additionalProperties:!1,properties:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],type:"object"},common56:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},common57:{const:"PostalAddress",type:"string"},common58:{minLength:0,type:"string"},common59:{additionalProperties:!1,properties:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],type:"object"},common60:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},common61:{const:"GeoCoordinates",type:"string"},common62:{type:["string","number"]},common63:{additionalProperties:!0,properties:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},required:["type","coordinates","float"],type:"object"},common64:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},common65:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},common66:{type:"number"},common67:{const:!0,default:!0,type:"boolean"},common68:{const:"Point",type:"string"},common69:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common70:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common71:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"},common72:{maxLength:100,minLength:3,pattern:"^[a-zA-Z0-9]+$",type:"string"},common73:{properties:{type:{const:"citoyens"}}},common74:{type:{const:"citoyens"}},common75:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},common76:{ownerId:{pattern:"^[a-f0-9]{24}$"}},common77:{properties:{folder:{const:"citoyens"}}},common78:{folder:{const:"citoyens"}},common79:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common80:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common81:{properties:{parentId:{pattern:"^[a-f0-9]{24}$"}}},common82:{parentId:{pattern:"^[a-f0-9]{24}$"}},common83:{properties:{parentType:{const:"citoyens"}}},common84:{parentType:{const:"citoyens"}},common85:{properties:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common86:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common87:{default:!0,type:"boolean"},common88:{default:0,type:"integer"},common89:{required:["text"]},common90:{required:["mediaImg"]},common91:{required:["mediaFile"]},common92:{additionalProperties:!1,properties:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},required:["countFiles","files"],type:"object"},common93:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},common94:{additionalProperties:!1,properties:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},required:["countImages","images"],type:"object"},common95:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},common96:{items:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",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"},common97:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common98:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common99:{minimum:1,type:"integer"},common100:{default:"public",enum:["public","private","restricted"],type:"string"},common101:{const:"news",default:"news",type:"string"},common102:{additionalProperties:!1,else:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{folder:{const:"citoyens"}}},properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},required:["folder","ownerId"],then:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common103:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},common104:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},required:["id"],type:"object"},common105:{default:!1,type:"boolean"},common106:{properties:{childId:{pattern:"^[a-f0-9]{24}$"}}},common107:{childId:{pattern:"^[a-f0-9]{24}$"}},common108:{properties:{childType:{const:"citoyens"}}},common109:{childType:{const:"citoyens"}},common110:{const:"share",default:"share",type:"string"},common111:{properties:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common112:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common113:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},required:["type","id"],type:"object"},common114:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},common115:{default:"news",enum:["news"],type:"string"},common116:{items:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",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"},common117:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common118:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common119:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],type:"string"},common120:{const:!1,default:!1,type:"boolean"},common121:{const:"",default:"",type:"string"},common122:{additionalProperties:!1,properties:{indexMax:{type:"number"},indexMin:{type:"number"}},required:["indexMin","indexMax"],type:"object"},common123:{indexMax:{type:"number"},indexMin:{type:"number"}},common124:{default:0,minimum:0,type:"integer"},common125:{const:["projects"],default:["projects"],items:{enum:["projects"],type:"string"},type:"array"},common126:{enum:["projects"],type:"string"},common127:{$exists:!0},common128:{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},common129:{$exists:{const:!0}},common130:{const:!0},common131:{default:30,type:"integer"},common132:{additionalProperties:!1,else:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{type:{const:"citoyens"}}},properties:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},required:["type","id"],then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common133:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},common134:{const:["poi"],default:["poi"],items:{enum:["poi"],type:"string"},type:"array"},common135:{const:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],default:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],items:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},type:"array"},common136:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},common137:{$exists:!1},common138:{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},common139:{$exists:{const:!1}},common140:{const:!1},common141:{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"},common142:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common143:{additionalProperties:!1,properties:{$exists:{default:!1,type:"boolean"}},required:["$exists"],type:"object"},common144:{$exists:{default:!1,type:"boolean"}},common145:{additionalProperties:!1,properties:{$in:{items:{type:"string"},minItems:1,type:"array"}},required:["$in"],type:"object"},common146:{$in:{items:{type:"string"},minItems:1,type:"array"}},common147:{items:{type:"string"},minItems:1,type:"array"},common148:{const:["citoyens"],default:["citoyens"],items:{enum:["citoyens"],type:"string"},type:"array"},common149:{enum:["citoyens"],type:"string"},common150:{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"},common151:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},common152:{not:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common153:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common154:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common155:{"^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"}},common156:{not:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common157:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common158:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common159:{const:["badges"],default:["badges"],items:{enum:["badges"],type:"string"},type:"array"},common160:{enum:["badges"],type:"string"},common161:{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"},common162:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common163:{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"},common164:{$exists:{const:!0,type:"boolean"}},common165:{const:!0,type:"boolean"},common166:{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},common167:{$exists:{const:!1,type:"boolean"}},common168:{const:!1,type:"boolean"},common169:{"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"}},common170:{indexMax:30,indexMin:0},common171:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},common172:{properties:{connectType:{const:"friend",default:"friend"}}},common173:{connectType:{const:"friend",default:"friend"}},common174:{const:"friend",default:"friend"},common175:{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},common176:{properties:{parentType:{const:"organizations"}}},common177:{parentType:{const:"organizations"}},common178:{properties:{connectType:{enum:["admin","member"]}}},common179:{connectType:{enum:["admin","member"]}},common180:{enum:["admin","member"]},common181:{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},common182:{properties:{parentType:{const:"projects"}}},common183:{parentType:{const:"projects"}},common184:{properties:{connectType:{enum:["admin","contributor"]}}},common185:{connectType:{enum:["admin","contributor"]}},common186:{enum:["admin","contributor"]},common187:{properties:{parentType:{const:"events"}}},common188:{parentType:{const:"events"}},common189:{const:"events"},common190:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},common191:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},common192:{enum:["citoyens","organizations","projects","events"],type:"string"},common193:{const:"citoyens",default:"citoyens",type:"string"},common194:{const:"@userId",default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common195:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},required:["isOpenData","isOpenEdition"],type:"object"},common196:{isOpenData:!0,isOpenEdition:!0},common197:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},common198:{additionalProperties:!1,default:{"@userId":{type:"citoyens"}},patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},type:"object"},common199:{"@userId":{type:"citoyens"}},common200:{type:"citoyens"},common201:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},common202:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},common203:{const:"poi",default:"poi",type:"string"},common204:{const:"events",default:"events",type:"string"},common205:{format:"date-time",type:"string"},common206:{pattern:"^([01]\\d|2[0-3]):[0-5]\\d$",type:"string"},common207:{enum:["workshop","competition","concert","contest","conference","debate","exhibition","festival","crowdfunding","fair","course","protest","market","film","getTogether","meeting","spectacle","internship","stand","others"],type:"string"},common208:{type:"integer"},common209:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},common210:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},required:["type","id"],type:"object"},common211:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},common212:{const:"badges",default:"badges",type:"string"},common213:{const:"badge",default:"badge",type:"string"},common214:{patternProperties:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},type:"object"},common215:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},common216:{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"},common217:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},common218:{default:"",enum:["","admin"],type:"string"}},lr=[{auth:"none",constant:"PERSON_REGISTER",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/register",request:{additionalProperties:!1,properties:{app:cr.common1,email:cr.common2,isInvitation:cr.common3,mode:cr.common1,name:cr.common1,pendingUserId:cr.common1,pwd:cr.common1,username:cr.common1},required:["name","username","email","pwd"],type:"object"}},{auth:"none",constant:"AUTHENTICATE_URL",contentType:"application/json",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/api/cocolight/authenticate",postActions:[{path:"accessToken",type:"setToken"},{path:"refreshToken",type:"setRefreshToken"},{event:"userLoggedIn",path:"user",type:"emitEvent"}],request:{additionalProperties:!1,properties:{email:cr.common2,password:cr.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:cr.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",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/sendemail",request:{additionalProperties:!1,properties:{email:cr.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:cr.common4},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:cr.common1,newPassword2:cr.common1,oldPassword:cr.common1,scope:{default:"",type:["string"]},userId:cr.common5},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:cr.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:cr.common8},{auth:"bearer",constant:"UPDATE_SETTINGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatesettings",request:{additionalProperties:!1,allOf:[{else:{properties:{idEntity:cr.common11}},if:{properties:{typeEntity:cr.common12}},then:{properties:{idEntity:cr.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:cr.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:cr.common12}},then:cr.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:cr.common12}}},then:cr.common13}],properties:{idEntity:cr.common1,type:cr.common1,typeEntity:cr.common15,value:cr.common16},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:[cr.common17,{anyOf:[{properties:{description:cr.common23},required:["description"]},{properties:{shortDescription:cr.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:cr.common10,description:cr.common1,id:cr.common1,scope:{default:"",type:["string","null"]},shortDescription:cr.common1,typeElement:cr.common25},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:cr.common2,name:cr.common1,tags:cr.common26,url:cr.common4}},allOf:[{if:cr.common20,then:{additionalProperties:!1,anyOf:[cr.common29,{properties:{birthDate:cr.common23},required:["birthDate"]},{properties:{fixe:cr.common23},required:["fixe"]},{properties:{mobile:cr.common23},required:["mobile"]},cr.common31,cr.common33,cr.common35],properties:{birthDate:{format:"date",type:"string"},block:cr.common37,email:cr.common38,fixe:cr.common1,id:cr.common5,mobile:cr.common1,name:cr.common39,scope:cr.common10,tags:cr.common40,typeElement:cr.common41,url:cr.common42}}},{if:{properties:{typeElement:cr.common43}},then:{additionalProperties:!1,anyOf:[cr.common29,cr.common31,cr.common33,cr.common35,{properties:{avancement:cr.common23},required:["avancement"]},{properties:{parent:cr.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:cr.common37,email:cr.common38,id:cr.common1,name:cr.common39,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":cr.common44},type:"object"},scope:cr.common10,tags:cr.common40,typeElement:{default:"citoyens",enum:["projects"],type:"string"},url:cr.common42}}},{if:{properties:{typeElement:cr.common46}},then:{additionalProperties:!1,anyOf:[cr.common29,cr.common31,cr.common33,cr.common35,cr.common47],properties:{block:cr.common37,email:cr.common38,id:cr.common1,name:cr.common39,scope:cr.common10,tags:cr.common40,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:{enum:["organizations"],type:"string"},url:cr.common42}}},{if:{properties:{typeElement:{const:"poi"}}},then:{additionalProperties:!1,anyOf:[cr.common29,cr.common31,cr.common33,cr.common35,cr.common47,{properties:{urls:cr.common23},required:["urls"]}],properties:{block:cr.common37,email:cr.common38,id:cr.common1,name:cr.common39,scope:cr.common10,tags:cr.common40,type:cr.common49,typeElement:cr.common50,url:cr.common42,urls:cr.common27}}}],properties:{block:cr.common37,id:cr.common1,scope:cr.common10,typeElement:cr.common25},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:[cr.common28,cr.common4]}},allOf:[cr.common17,{anyOf:[{properties:{gitlab:cr.common23},required:["gitlab"]},{properties:{github:cr.common23},required:["github"]},{properties:{twitter:cr.common23},required:["twitter"]},{properties:{facebook:cr.common23},required:["facebook"]},{properties:{instagram:cr.common23},required:["instagram"]},{properties:{diaspora:cr.common23},required:["diaspora"]},{properties:{mastodon:cr.common23},required:["mastodon"]},{properties:{telegram:cr.common23},required:["telegram"]},{properties:{signal:cr.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:cr.common51,facebook:cr.common51,github:cr.common51,gitlab:cr.common51,id:cr.common1,instagram:cr.common51,mastodon:cr.common51,scope:cr.common10,signal:cr.common51,telegram:cr.common51,twitter:cr.common51,typeElement:cr.common15},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:{else:cr.common52,if:cr.common20,properties:{address:cr.common55,block:{const:"localities",default:"localities",type:"string"},geo:cr.common59,geoPosition:cr.common63,id:cr.common1,scope:cr.common10,typeElement:cr.common25},required:["block","typeElement","id","address"],then:cr.common69,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:cr.common52,if:cr.common20,properties:{block:cr.common37,id:cr.common1,scope:cr.common10,slug:cr.common72,typeElement:cr.common25},required:["block","typeElement","id","slug"],then:cr.common69,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:cr.common52,if:cr.common73,properties:{block:cr.common37,id:cr.common1,slug:cr.common72,type:cr.common15},required:["block","type","id","slug"],then:cr.common69,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:{additionalProperties:!1,else:cr.common75,if:cr.common77,properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations","events","poi"],type:"string"},ownerId:cr.common1},required:["folder","ownerId"],then:cr.common79,type:"object"},request:{additionalProperties:!1,properties:{profil_avatar:cr.common16},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,else:cr.common52,if:cr.common73,properties:{id:cr.common1,type:{default:"citoyens",enum:["citoyens","projects","organizations","events","poi","badges"],type:"string"}},required:["type","id"],then:cr.common69,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,else:cr.common81,if:cr.common83,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:cr.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:cr.common1,parentType:cr.common15},required:["parentId","parentType","listInvite"],then:cr.common85,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/true",pathParams:{additionalProperties:!1,else:cr.common52,if:cr.common73,properties:{id:cr.common1,isLive:cr.common87,type:cr.common15},required:["isLive","type","id"],then:cr.common69,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:cr.common88,indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:cr.common10},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:{items:cr.common11,type:"array"}},required:["ids"],type:"object"}},{auth:"bearer",constant:"ADD_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/save",request:{additionalProperties:!1,anyOf:[cr.common89,cr.common90,cr.common91],else:cr.common81,if:cr.common83,properties:{json:cr.common67,markdownActive:cr.common87,mediaFile:cr.common92,mediaImg:cr.common94,mentions:cr.common96,parentId:cr.common1,parentType:cr.common15,scope:cr.common100,tags:cr.common26,text:cr.common1,type:cr.common101},required:["scope","markdownActive","parentId","parentType","type","json"],then:cr.common85,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:cr.common102,request:{additionalProperties:!1,properties:{newsImage:cr.common16},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:cr.common102,request:{additionalProperties:!1,properties:{newsFile:cr.common16},required:["newsFile"],type:"object"}},{auth:"bearer",constant:"DELETE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/delete/id/{id}",pathParams:cr.common104,request:{additionalProperties:!1,properties:{isLive:cr.common105},required:["isLive"],type:"object"}},{auth:"bearer",constant:"UPDATE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/update",request:{additionalProperties:!1,anyOf:[cr.common89,cr.common90,cr.common91],else:cr.common81,if:cr.common83,properties:{idNews:cr.common11,markdownActive:cr.common87,mediaFile:cr.common92,mediaImg:cr.common94,mentions:cr.common96,parentId:cr.common1,parentType:cr.common15,scope:cr.common100,tags:cr.common26,text:cr.common1,type:cr.common101},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:cr.common85,type:"object"}},{auth:"bearer",constant:"SHARE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:cr.common106,if:cr.common108,properties:{childId:cr.common11,childType:cr.common15,comment:cr.common1,connectType:cr.common110,parentId:cr.common11,parentType:cr.common101},required:["parentId","parentType","childId","childType","connectType"],then:cr.common111,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:cr.common113},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:cr.common10,contextId:cr.common11,contextType:cr.common115,mentions:cr.common116,parentCommentId:cr.common11,path:cr.common10,text:cr.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:cr.common104},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:cr.common11,params:{properties:{mentions:cr.common116,text:cr.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:cr.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:cr.common113},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common67,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:cr.common119,type:"array"},fediverse:cr.common120,filters:cr.common121,indexMin:{const:0,default:0,type:"number"},indexStep:cr.common66,initType:cr.common121,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:cr.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:cr.common1,notSourceKey:cr.common67,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":cr.common122},type:"object"},searchTags:cr.common27,searchType:{items:cr.common119,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:cr.common121,name:cr.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:cr.common124,name:cr.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:cr.common67,countType:cr.common125,fediverse:cr.common120,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":cr.common127,"parent.@userId":cr.common127},"links.contributors.@userId":cr.common127},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128},type:"object"}},required:["$or"],type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common125},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:cr.common132,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common125,fediverse:cr.common120,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":cr.common127,"parent.@{pathParams.id}":cr.common127},"links.contributors.@{pathParams.id}":cr.common127},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128},type:"object"}},required:["$or"],type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common125},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:cr.common67,countType:cr.common134,fediverse:cr.common120,filters:{additionalProperties:!1,default:{"parent.@userId":cr.common127},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common134},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:cr.common132,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common134,fediverse:cr.common120,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":cr.common127},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common134},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:cr.common67,countType:cr.common135,fediverse:cr.common120,filters:{additionalProperties:!1,default:{"links.members.@userId":cr.common127,"links.members.@userId.isInviting":cr.common137,"links.members.@userId.toBeValidated":cr.common137},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common138,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common138},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common135},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,else:cr.common52,if:cr.common73,properties:{id:cr.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:cr.common69,type:"object"},request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common135,fediverse:cr.common120,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":cr.common127,"links.members.@{pathParams.id}.isInviting":cr.common137,"links.members.@{pathParams.id}.toBeValidated":cr.common137},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common138,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common138},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common135},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:cr.common67,countType:cr.common141,fediverse:cr.common120,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+)$":cr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":cr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common143,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":cr.common145,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common138},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common141},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:cr.common104,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common141,fediverse:cr.common120,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}":cr.common127,"links.memberOf.@{pathParams.id}.isInviting":cr.common137,"links.memberOf.@{pathParams.id}.toBeValidated":cr.common137},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":cr.common128,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common143,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":cr.common145,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common143},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common141},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:cr.common6,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common148,fediverse:cr.common120,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}":cr.common127,"links.friends.@{pathParams.id}.isInviting":cr.common137,"links.friends.@{pathParams.id}.toBeValidated":cr.common137},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common143,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common143},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common148},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:cr.common67,countType:cr.common150,fediverse:cr.common120,filters:{additionalProperties:!1,allOf:[cr.common152],default:{"links.followers.@userId":cr.common127,"links.followers.@{userId}.isInviting":cr.common137,"links.followers.@{userId}.toBeValidated":cr.common137},patternProperties:cr.common155,type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common150},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:cr.common6,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common150,fediverse:cr.common120,filters:{additionalProperties:!1,allOf:[cr.common152],default:{"links.followers.@{pathParams.id}":cr.common127,"links.followers.@{pathParams.id}.isInviting":cr.common137,"links.followers.@{pathParams.id}.toBeValidated":cr.common137},patternProperties:cr.common155,type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common150},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:cr.common67,countType:cr.common148,fediverse:cr.common120,filters:{additionalProperties:!1,allOf:[cr.common156],default:{"links.follows.@userId":cr.common127,"links.follows.@{userId}.isInviting":cr.common137,"links.follows.@{userId}.toBeValidated":cr.common137},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common138,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common138},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common148},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:[{else:cr.common52,if:cr.common73,then:cr.common69}],properties:{id:cr.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common148,fediverse:cr.common120,filters:{additionalProperties:!1,allOf:[cr.common156],default:{"links.follows.@{pathParams.id}":cr.common127},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common148},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:cr.common67,countType:cr.common141,fediverse:cr.common120,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+)$":cr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":cr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common143,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":cr.common145,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common138},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common141},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:cr.common104,request:{additionalProperties:!1,properties:{count:cr.common67,countType:cr.common141,fediverse:cr.common120,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}":cr.common127,"links.projects.@{pathParams.id}.isInviting":cr.common137,"links.projects.@{pathParams.id}.toBeValidated":cr.common137},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":cr.common128,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common143,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":cr.common145,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common143},type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common141},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:cr.common67,countType:cr.common159,fediverse:cr.common120,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common128},type:"object"},isParcours:cr.common3,"preferences.private":cr.common120},required:["preferences.private"],type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,searchType:cr.common159},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:cr.common67,countType:cr.common161,fediverse:cr.common120,fields:cr.common159,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common163}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common163,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":cr.common166,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":cr.common166}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:cr.common169},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:cr.common169,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":cr.common165}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":cr.common163}}],type:"object"},indexMin:cr.common124,indexStep:cr.common131,initType:cr.common121,locality:cr.common121,name:cr.common1,notSourceKey:cr.common67,ranges:{additionalProperties:!1,default:{Cooperative:cr.common170,GovernmentOrganization:cr.common170,Group:cr.common170,LocalBusiness:cr.common170,NGO:cr.common170,citoyens:cr.common170,projects:cr.common170},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":cr.common122},type:"object"},searchType:cr.common161},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:{additionalProperties:!1,allOf:[cr.common171,cr.common175,cr.common181,{if:cr.common187,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:cr.common190,childType:cr.common191,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:cr.common11,parentType:cr.common192},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"bearer",constant:"DISCONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/disconnect",request:{additionalProperties:!1,allOf:[cr.common171,cr.common175,cr.common181,{if:cr.common187,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:cr.common190,childType:cr.common191,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:cr.common11,parentType:cr.common192},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_KEY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/getinfo/key/{slug}",pathParams:{additionalProperties:!1,properties:{slug:{pattern:"^([a-zA-Z0-9-_]+)$",type:"string"}},required:["slug"],type:"object"}},{auth:"bearer",constant:"GET_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/config/type/citoyens/id/{id}/json/true",pathParams:cr.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:cr.common66},type:"object"},request:{additionalProperties:!1,properties:{collection:cr.common193,id:cr.common194,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:cr.common121},required:["id","collection","path","pull","value"],type:"object"}},{auth:"bearer",constant:"ADD_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue",request:{additionalProperties:!1,properties:{arrayForm:cr.common165,collection:cr.common193,id:cr.common194,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:cr.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:cr.common45,required:["name","type"]}},type:"object"},name:cr.common1,tags:cr.common27,url:cr.common1},required:["url","name"],type:"object"}},required:["id","collection","path","arrayForm","value"],type:"object"}},{auth:"bearer",constant:"ADD_ORGANIZATION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common55,collection:{const:"organizations",default:"organizations",type:"string"},email:cr.common2,geo:cr.common59,geoPosition:cr.common63,id:cr.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:cr.common195,role:{enum:["admin","member"],type:"string"},scope:cr.common121,shortDescription:cr.common1,tags:cr.common27,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:cr.common4},required:["id","collection","key","name","type","role","scope"],type:"object"}},{auth:"bearer",constant:"ADD_PROJECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common55,collection:{const:"projects",default:"projects",type:"string"},geo:cr.common59,geoPosition:cr.common63,id:cr.common11,key:{const:"project",default:"project",type:"string"},name:cr.common1,parent:cr.common198,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:cr.common87,isOpenData:cr.common105,isOpenEdition:cr.common105},required:["isOpenData","isOpenEdition"],type:"object"},public:cr.common87,scope:cr.common121,shortDescription:cr.common1,tags:cr.common27,url:cr.common4},required:["id","collection","key","parent","name","public","scope"],type:"object"}},{auth:"bearer",constant:"ADD_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common55,collection:cr.common203,description:cr.common1,geo:cr.common59,geoPosition:cr.common63,id:cr.common11,key:cr.common203,name:cr.common1,parent:cr.common198,scope:cr.common121,tags:cr.common27,type:cr.common49,urls:cr.common27},required:["id","collection","key","parent","type","name"],type:"object"}},{auth:"bearer",constant:"ADD_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,else:{required:["openingHours"]},if:{properties:{recurrency:cr.common140}},properties:{address:cr.common55,collection:cr.common204,email:cr.common2,endDate:cr.common205,geo:cr.common59,geoPosition:cr.common63,id:cr.common11,key:{const:"event",default:"event",type:"string"},name:cr.common1,openingHours:{default:["","","","","","",""],items:{anyOf:[{const:"",type:"string"},{additionalProperties:!1,properties:{dayOfWeek:{enum:["Mo","Tu","We","Th","Fr","Sa","Su"],type:"string"},hours:{default:[],items:{additionalProperties:!1,properties:{closes:cr.common206,opens:cr.common206},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:cr.common198,parent:{additionalProperties:!1,patternProperties:cr.common201,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:cr.common105,isOpenEdition:cr.common105},required:["isOpenData","isOpenEdition"],type:"object"},public:cr.common87,recurrency:cr.common105,scope:cr.common121,shortDescription:cr.common1,startDate:cr.common205,tags:cr.common27,timeZone:cr.common1,type:cr.common207,url:cr.common4},required:["id","collection","key","organizer","type","name","scope"],startBeforeEnd:!0,then:{required:["startDate","endDate"]},type:"object"}},{auth:"bearer",constant:"DELETE_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/poi/id/{id}",pathParams:cr.common104,request:cr.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:cr.common104,request:cr.common8},{auth:"bearer",constant:"DELETE_ELEMENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/{type}/id/{id}",pathParams:{additionalProperties:!1,properties:{id:cr.common11,type:cr.common1},required:["type","id"],type:"object"},request:cr.common8},{auth:"bearer",constant:"ADD_IMAGE_ELEMENT",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/qqfile/docType/image/contentKey/profil",pathParams:{additionalProperties:!1,properties:{folder:{enum:["badges","events"],type:"string"},ownerId:cr.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:cr.common16,qqfilename:cr.common1,qqtotalfilesize:cr.common208,qquuid:cr.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}},{auth:"bearer",constant:"LINK_VALIDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/validate",request:{additionalProperties:!1,properties:{childId:cr.common209,childType:cr.common41,linkOption:{enum:["isInviting","toBeValidated","isAdminPending"],type:"string"},parentId:cr.common11,parentType:cr.common192},required:["childId","childType","parentType","parentId"],type:"object"}},{auth:"none",constant:"SEARCH_MEMBER_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/searchmemberautocomplete",request:{additionalProperties:!1,properties:{search:cr.common1,searchMode:{default:"personOnly",enum:["personOnly","organizationOnly","mixte"],type:"string"}},required:["search","searchMode"],type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:cr.common210,request:{additionalProperties:!1,properties:{indexMin:cr.common88},type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS_COUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:cr.common210,request:{additionalProperties:!1,properties:{refreshTimestamp:cr.common208},type:"object"}},{auth:"bearer",constant:"NOTIFICATION_UPDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/update",request:{additionalProperties:!1,properties:{action:{enum:["seen","read"],type:"string"},all:cr.common67},required:["action","all"],type:"object"}},{auth:"bearer",constant:"REMOVE_ALL_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/removeall"},{auth:"bearer",constant:"MARK_NOTIFICATION_AS_READ",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/marknotificationasread",request:cr.common104},{auth:"none",constant:"ACTIVITYPUB_SEARCH",contentType:"application/x-www-form-urlencoded",method:"GET",params:[cr.common16],path:"/api/activitypub/search?address={address}",pathParams:{additionalProperties:!1,properties:{address:cr.common1},required:["address"],type:"object"}},{auth:"bearer",constant:"ACTIVITYPUB_LINK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/link",request:{additionalProperties:!1,properties:{action:{enum:["undo_follow","accept_invitation","reject_invitation","undo_accept","undo_request_follow","follow","remove_follow","accept_follower","reject_follower","remove_follower","remove_invitation"],type:"string"},actor:{additionalProperties:!1,properties:{id:cr.common1,name:cr.common1,type:{enum:["person"],type:"string"}},required:["id","type","name"],type:"object"},payload:cr.common4},required:["action","payload","actor"],type:"object"}},{auth:"none",constant:"ACTIVITYPUB_GET_COMMUNITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/getcommunity/userId/${userId}/type/${type}/actor/person",pathParams:{additionalProperties:!1,properties:{type:{enum:["follows","followers"],type:"string"},userId:cr.common11},required:["userId","type"],type:"object"}},{auth:"none",constant:"GET_BADGE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/page/type/badges/id/{id}/json/true",pathParams:cr.common104},{auth:"none",constant:"GET_EMETTEUR_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/badge/json/true"},{auth:"bearer",constant:"ADD_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{collection:cr.common212,criteria:{additionalProperties:!1,properties:{narrative:cr.common1},required:["narrative"],type:"object"},description:cr.common1,id:cr.common11,isParcours:cr.common105,issuer:{additionalProperties:!1,patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:cr.common1,type:{enum:["citoyens","organizations","projects"],type:"string"}},required:["type"],type:"object"}},type:"object"},key:cr.common213,name:cr.common1,parent:{additionalProperties:!1,patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:{name:cr.common1,type:cr.common212},required:["type"],type:"object"}},type:"object"},preferences:cr.common195,public:cr.common87,scope:cr.common121,tags:cr.common27},required:["id","collection","key","name","public","scope","issuer","criteria"],type:"object"}},{auth:"bearer",constant:"ASSIGN_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/badges/assign",request:{additionalProperties:!1,properties:{award:{patternProperties:{"^[0-9a-f]{24}$":cr.common44},type:"object"},badgeId:cr.common11,collection:cr.common212,evidences:{items:{additionalProperties:!1,properties:{narative:cr.common1,url:cr.common4},required:["narative"],type:"object"},type:"array"},key:cr.common213,narative:cr.common1,scope:cr.common121},required:["key","collection","badgeId","award"],type:"object"}},{auth:"none",constant:"GET_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/agenda",request:{additionalProperties:!1,properties:{count:cr.common105,countType:{const:["events"],default:["events"],type:"array"},endDateUTC:cr.common205,fediverse:cr.common105,indexMin:cr.common88,indexStep:{default:100,type:"integer"},locality:{patternProperties:{"^[^\\s]+$":{type:"object"}},type:"object"},name:cr.common1,searchType:{const:["events"],default:["events"],items:cr.common1,type:"array"},startDate:cr.common66,startDateUTC:cr.common205,type:cr.common207},required:["searchType","indexMin","indexStep","startDate","startDateUTC","fediverse"],type:"object"}},{auth:"bearer",constant:"SHARE_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:cr.common106,if:cr.common108,properties:{childId:cr.common11,childType:cr.common15,comment:cr.common1,connectType:cr.common110,parentId:cr.common11,parentType:cr.common204},required:["parentId","childId","childType","connectType","parentType"],then:cr.common111,type:"object"}},{auth:"bearer",constant:"INVITE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,else:cr.common81,if:cr.common83,properties:{listInvite:{additionalProperties:!1,minProperties:1,properties:{citoyens:cr.common214,invites:{patternProperties:{"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$":{additionalProperties:!1,properties:{email:cr.common2,isAdmin:cr.common218,msg:cr.common1,name:cr.common1,roles:cr.common27},required:["name","email"],type:"object"}},type:"object"},organizations:cr.common214,projects:cr.common214},type:"object"},parentId:cr.common1,parentType:cr.common15},required:["parentId","parentType","listInvite"],then:cr.common85,type:"object"}}];var ur=__webpack_require__(6092),dr=__webpack_require__(1027);nr.addType("oid",(e=>new ar.ObjectID(e)));class pr extends b.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:n="/api/cocolight/refreshtoken",endpoints:o=lr,timeout:s=3e4,debug:a=!1,maxRetries:c=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:u=6e4,fromJSONValue:d=!0,tokenStorageStrategy:p=null}={}){if(super(),!e)throw new i('Le paramètre "baseURL" est obligatoire.',500);this.__entityTag="ApiClient",this._baseURL=e,this._refreshUrl=n,this._endpoints=o,this._debug=a;let m=null;if(this._offlineClientManager=null,this._fromJSONValue=d,Object.defineProperty(this,"userId",{get:()=>m,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{m=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new x({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),j(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=ir({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=Ft.create({baseURL:e,timeout:s}),c>0&&(rr(this._client,{retries:c,retryDelay:rr.exponentialDelay,retryCondition:e=>rr.isNetworkError(e)||rr.isRetryableError(e),onRetry:(e,t,r)=>{this._logger.warn(`[Retry] Tentative #${e} pour ${r?.url}`),this.emit("retryAttempt",{retryCount:e,url:r?.url})}}),this._logger.info(`[ApiClient] Retry activé : ${c} max`)),this._breakerThreshold=l,this._breakerResetTime=u,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,this._accessToken=null,this._refreshToken=null,p instanceof ur.SJ&&p.use(this._baseURL),this._tokenStorage=p||new dr.GN,"function"!=typeof this._tokenStorage?.getAccessToken||"function"!=typeof this._tokenStorage?.setAccessToken||"function"!=typeof this._tokenStorage?.getRefreshToken||"function"!=typeof this._tokenStorage?.setRefreshToken||"function"!=typeof this._tokenStorage?.clear)throw new Error("[ApiClient] La stratégie de stockage des tokens n’est pas valide. Elle doit implémenter les méthodes requises.");r&&this.setRefreshToken(r),t&&this.setToken(t);const f=this._tokenStorage.getAccessToken();f&&this.setToken(f);const h=this._tokenStorage.getRefreshToken();h&&this.setRefreshToken(h),this._client.interceptors.response.use((e=>e),(async e=>{const t=e.config;if(t._retry)throw this._logger.error("[ApiClient] Requête déjà retentée, échec définitif."),e;if(e.response&&401===e.response.status&&this._refreshToken){t._retry=!0;try{if(this._logger.info("[ApiClient] Tentative de refresh du token..."),await this._refreshAccessToken())return this._logger.info("[ApiClient] Token rafraîchi avec succès."),t.headers.Authorization="Bearer "+this.getToken(),this._logger.info("[ApiClient] Retente la requête originale avec le nouveau token."),this._client.request(t);throw this.resetSession(),new i("Impossible de rafraîchir le token.",401)}catch(e){throw this.resetSession(),new i("Erreur lors du rafraîchissement du token.",401,e)}}throw e}))}setToken(e){this._accessToken=e,this._tokenStorage.setAccessToken(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){if(this._refreshToken=e,this._tokenStorage.setRefreshToken(e),null===this.userId){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}get isConnected(){return!!this._accessToken}_getIdFromToken(e){if(!e)return null;try{const t=function(e,t){if("string"!=typeof e)throw new or("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new or(`Invalid token specified: missing part #${r+1}`);let o;try{o=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)}}(n)}catch(e){throw new or(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new or(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}(e);return this._logger.debug("[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),null}}async _refreshAccessToken(){if(!this._refreshToken)return!1;const e=Ft.create({baseURL:this._baseURL,timeout:1e4,headers:{"Content-Type":"application/json"}});try{const t=await e.post(this._refreshUrl,{refreshToken:this._refreshToken});return!(!t.data||!t.data.token||(this.setToken(t.data.token),t.data.refreshToken&&this.setRefreshToken(t.data.refreshToken),this.emit("refreshSuccess",t.data),0))}catch(e){return this.emit("refreshFailed",{error:e.message}),this.resetSession(),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é"),this.emit("circuitBreakerReset"),!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"),this.emit("circuitBreakerOpen",{timestamp:this._lastBreakerOpenTime}))}_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]&&pr.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]&&pr.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}},n=/@(?:\{([^}]+)\}|([\w.]+))/g,o=e=>"string"!=typeof e?e:e.replace(n,((t,n,o)=>{if(n){if(n.startsWith("pathParams.")){const e=n.substring(11),t=r.pathParams(e);return null!=t?t:`@{${n}}`}{const e=r[n];if("function"==typeof e){const t=e();return null!=t?t:`@{${n}}`}return`@{${n}}`}}if(o){if(o.startsWith("pathParams.")){const e=o.match(/^pathParams\.([^.]+)(.*)$/);if(e){const t=e[1],n=e[2],i=r.pathParams(t);return null!=i?i+n:`@${o}`}return`@${o}`}{const e=r[o];if("function"==typeof e){const t=e();return null!=t?t:`@${o}`}return`@${o}`}}return e})),i=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(i);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[r,n]of Object.entries(e))t[o(r)]=i(n);return t}return"string"==typeof e?o(e):e};return i(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 o=e[n];if(!t.test(n)){if("default"===n){if("string"==typeof o&&t.test(o))continue;if(o&&"object"==typeof o){const e=this._cleanSchemaLeftoverAlias(o);Object.keys(e).length>0&&(r[n]=e);continue}}"string"==typeof o&&t.test(o)||(r[n]=this._cleanSchemaLeftoverAlias(o))}}return r}return e}async safeCall(e,...t){try{return await e(...t)}catch(e){throw this._logger.error(`[ApiClient.safeCall] Erreur: ${e.message}`),e}}async callEndpoint(e,t={},r=!0,n=!0){const o=this._endpoints.find((t=>t.constant===e));if(!o)throw new i(`Endpoint introuvable : ${e}`,404);const{path:c,method:l,contentType:u,auth:d,pathParams:p,request:m,responses:f}=o,h=(l||"GET").toLowerCase(),y=u||"application/json",g={"Content-Type":y};if(this._accessToken)"bearer"===d?g.Authorization=`Bearer ${this._accessToken}`:d&&"none"!==d||g.Authorization||(g.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===d)throw new i(`Token requis pour l'endpoint sécurisé : ${e}`,401);let w,_=c,b={};if(p){let r=p;"none"===d&&null===this.userId&&(r=this._cleanSchemaLeftoverAlias(p));const n=t.pathParams||{},o=this._ajv.compile(r);if(!o(n)){const t=this._ajvErrorHuman(o.errors);throw this.emit("validationError",{stage:"pathParams",errors:o.errors}),new s(`callEndpoint: ${e} - Path parameter validation failed.`,400,t,o.errors)}b=this._resolveSpecialValuesInPlace(n),_=_.replace(/\{(\w+)\}/g,((e,t)=>{const r=b[t];if(void 0!==r)return encodeURIComponent(r);throw new i(`Path param manquant ou non résolu : {${t}}`,400)}))}if(m){let r=m;"none"===d&&null===this.userId&&(r=this._cleanSchemaLeftoverAlias(m));const n={...t};delete n.pathParams;const o=pr.stripNullsInPlace(n),i=this._ajv.compile(r);if(!i(o)){const t=i.errors?this._ajvErrorHuman(i.errors):[];throw this.emit("validationError",{stage:"request",errors:i.errors}),new s(`callEndpoint: ${e} - Request validation failed.`,400,t,i.errors)}t=this._resolveSpecialValuesInPlace(o,b)}if(this._offlineClientManager?.isOffline()){if("function"==typeof this._offlineClientManager._enqueueOfflineAction)return this._logger.warn(`[ApiClient] Mode dégradé : mise en file de ${e}`),await this._offlineClientManager._enqueueOfflineAction({constant:e,data:t,options:{transformResponseData:r,validateResponseSchema:n}}),this._logger.info(`[ApiClient] Requête ${e} mise en file (offline mode)`),this.emit("queuedOffline",{constant:e,reason:"offlineMode",data:t}),{data:null,offline:!0};throw this._logger.warn("[ApiClient] Mode dégradé actif mais offlineManager non initialisé correctement"),new i("Mode hors-ligne actif, mais gestionnaire offline non disponible.",503)}if(!this._checkCircuitBreaker()){if(!1===this._offlineClientManager?.isOffline?.()&&"function"==typeof this._offlineClientManager._enqueueOfflineAction)return this._logger.warn(`[ApiClient] Circuit breaker actif → mise en file de ${e}`),await this._offlineClientManager._enqueueOfflineAction({constant:e,data:t,options:{transformResponseData:r,validateResponseSchema:n}}),this._logger.info(`[ApiClient] Requête ${e} mise en file (circuit breaker)`),this.emit("queuedOffline",{constant:e,reason:"circuitBreaker",data:t}),{data:null,breaker:!0};throw new a("Le circuit breaker est activé, impossible d'appeler l'API")}"application/json"===y||"multipart/form-data"===y?w=t:"application/x-www-form-urlencoded"===y&&(w=pr.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${_}, method=${h}`);try{const e=await this._client.request({url:_,method:h,headers:g,["get"===h?"params":"data"]:w});if(n){const t=e.status.toString(),r=f?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data)){const e=this._ajvErrorHuman(n.errors);throw this.emit("validationError",{stage:"response",errors:n.errors}),new s("Response validation failed.",t,e,n.errors)}}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(o.postActions)&&o.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(t){throw this._updateCircuitBreakerError(),this._logger.error(`[ApiClient] Erreur lors de l'appel de ${e}: ${t.message}`),t instanceof s?t:new i(`Erreur lors de l'appel de l'API : ${t.message}`,t.response?t.response.status:500,t.response?t.response.data:null)}}_ajvErrorHuman(e){try{return new k(e).errors.map((({message:e})=>e))}catch(t){return this._logger.error("[ApiClient] _ajvErrorHuman",t),e.map((({message:e})=>e))}}checkAndThrowApiResponseError(e){const t=e.data;if(!t||"object"!=typeof t)return e;if("boolean"==typeof t.result&&!1===t.result)throw new c(t.msg||"Erreur inconnue",e.status,t);if(t.resultErrors&&"object"==typeof t.resultErrors&&"boolean"==typeof t.resultErrors.result&&!1===t.resultErrors.result)throw new c(t.resultErrors.msg||"Erreur inconnue",e.status,t);return e}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),this._tokenStorage.clear(),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:o=!1,metaTokens:i=!0}=r,s=[];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||s.includes(r)||(s.push(r),Object.entries(r).forEach((([r,s])=>{void 0!==s&&function(e,r,s){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(l(s,r,n),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,i)=>{if(null!=e){const a=o?l(s.concat(r),i,n):`${l(s,r,n)}[]`;t.append(a,u(e))}})),!1}return!!a(e)||(t.append(l(s,r,n),u(e)),!1)}(s,r.trim(),d)&&e(s,d.concat(c(r)))})),s.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?nr.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","issuedOn"];_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}_startBeforeEndValidate=(e,t)=>{if(!t.startDate||!t.endDate)return!0;const r=new Date(t.startDate)<new Date(t.endDate);return r||(this._startBeforeEndValidate.errors=[{instancePath:"",schemaPath:"#/startBeforeEnd",keyword:"startBeforeEnd",params:{},message:"startDate must be before endDate"}]),r};getRequestSchema(e){const t=this._endpoints.find((t=>t.constant===e));return t?.request||null}getPathSchema(e){return this._endpoints.find((t=>t.constant===e))?.pathParams||null}onEvent(e={}){const t=["retryAttempt","queuedOffline","circuitBreakerOpen","circuitBreakerReset","refreshSuccess","refreshFailed","sessionReset","validationError","offlineModeChanged","userLoggedIn"];for(const r of t)"function"==typeof e[r]&&this.on(r,e[r])}getDeclaredEvents(){const e=new Set;for(const t of this._endpoints)if(Array.isArray(t.postActions))for(const r of t.postActions)"emitEvent"===r.type&&r.event&&e.add(r.event);return Array.from(e)}}class mr{constructor(e){this.client=e instanceof pr?e:new pr(e),this.loggedUser=null}get isConnected(){return this.client.isConnected}get userId(){return this.client.userId}async login(e,t){return this.client.safeCall((async()=>{const r=await this.client.callEndpoint("AUTHENTICATE_URL",{email:e,password:t});return this.loggedUser=new _(this.client,r.data.user,{EndpointApi:m,Organization:y,Project:w,Event:f,Poi:g,Badge:p,News:h}),this.loggedUser}))}async meIsconnected(){if(!this.client.isConnected||!this.client.userId)throw new o("User not connected",401);return this.client._logger.info("UserApi","meIsconnected",this.client.userId),this.loggedUser=new _(this.client,{id:this.client.userId},{EndpointApi:m,Organization:y,Project:w,Event:f,Poi:g,Badge:p,News:h}),this.loggedUser}async register({name:e,username:t,email:r,pwd:n}={}){return this.client.safeCall((async()=>{const o=await this.client.callEndpoint("PERSON_REGISTER",{name:e,username:t,email:r,pwd:n});if(!1===o?.data?.result)throw new c(o.data.msg,o.status,o.data);return o.data}))}async recoverPassword(e){return this.client.safeCall((async()=>{const t=await this.client.callEndpoint("PASSWORD_RECOVERY",{email:e});if(!1===t?.data?.result)throw new c(t.data.msg,t.status,t.data);return t.data}))}}class fr{static async userLogin(e,t,r){const n=fr.userApi(r);return await fr.userApiLogin(n,e,t)}static userApi(e){try{return new mr(e)}catch(e){throw console.error("[Api.userApi] Erreur lors de la création d'un objet utilisateur :",e.message),e}}static async userApiLogin(e,t,r){try{if(!e)throw new o("userApi is not defined");if(!e.client)throw new o("userApi.client is not defined");if(e.client.isConnected){const t=await e.meIsconnected();return new fr(t,e.client)}{if(!t||!r)throw new o("email and password are required");const n=await e.login(t,r);return new fr(n,e.client)}}catch(e){if(e instanceof i&&e?.details?.error)throw new l(e.details.error,e.status,e.details);throw e}}constructor(e,t){this._loggedUser=e,this._client=t}async me(){if(!this._loggedUser)throw new l("Accès refusé : utilisateur non authentifié.");return await this._loggedUser.get(),this._loggedUser}async user(e){try{if(e.id||e.slug){const t=new _(this._client,e,{EndpointApi:m,Organization:y,Project:w,Event:f,Poi:g,Badge:p,News:h});return await t.get(),t}return new _(this._client,e,{EndpointApi:m,Organization:y,Project:w,Event:f,Poi:g,Badge:p,News:h})}catch(e){throw console.error("[Api.user] Erreur lors de la création d'un objet utilisateur public :",e.message),e}}async organization(e){try{const t=new y(this._client,e,{EndpointApi:m,User:_,Project:w,Event:f,Poi:g,Badge:p,News:h});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Organization.");return await t.get(),t}catch(e){throw console.error("[Api.organization] Erreur lors de la création d'un objet organisation :",e.message),e}}async project(e){try{const t=new w(this._client,e,{EndpointApi:m,User:_,Event:f,Poi:g,Badge:p,News:h});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Project.");return await t.get(),t}catch(e){throw console.error("[Api.project] Erreur lors de la création d'un objet projet :",e.message),e}}get client(){return this._client}get endpointApi(){return new m(this._client)}logout(){this.loggedUser=null,this._client.resetSession(),this._client._logger.info("UserApi: User logged out")}}var hr=__webpack_require__(7031);class yr{constructor(e){if(!(e&&e instanceof pr))throw new Error("[OfflineClientManager] apiClient doit être une instance de ApiClient");this._clients=new Map,this._client=e}static async attachTo(e,t={}){e._offlineClientManager=new yr(e);const r=await async function(e="auto"){if("memory"===e)return new hr.QM;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new hr.Rc;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileOfflineStorage:e}=await __webpack_require__.e(394).then(__webpack_require__.bind(__webpack_require__,394));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new hr.Rc;{const{FileOfflineStorage:e}=await __webpack_require__.e(394).then(__webpack_require__.bind(__webpack_require__,394));return new e}}}(t?.offlineStorageStrategy||"auto");await e._offlineClientManager._initOfflineQueue(r),t?.disableOfflineMonitoring||e._offlineClientManager.startOfflineMonitoring(t)}async getClient(e){const t=`${e.baseURL}|${e.accessToken}`;if(this._clients.has(t))return this._clients.get(t);const r=new pr({baseURL:e.baseURL,accessToken:e.accessToken,refreshToken:e.refreshToken,debug:this._client._debug});return this._clients.set(t,r),r}async replayAction(e){const t=await this.getClient(e.meta);try{const r=await t.callEndpoint(e.constant,e.data,e.options?.transformResponseData??!0,e.options?.validateResponseSchema??!0);return this._client._logger.info(`[OfflineReplay] Succès ${e.constant} sur ${e.meta.baseURL}`),r}catch(t){throw this._client._logger.error(`[OfflineReplay] Échec ${e.constant}`,t.message),t}}startOfflineMonitoring({interval:e=3e4,disableOfflineMonitoring:t=!1}={}){t||this._monitoringStarted||(this._monitoringStarted=!0,this._offlineMode="undefined"!=typeof window&&"undefined"!=typeof navigator&&!navigator.onLine,"undefined"!=typeof window&&(window.addEventListener("online",(()=>this.setOfflineMode(!1))),window.addEventListener("offline",(()=>this.setOfflineMode(!0)))),this._pingInterval=setInterval((async()=>{const e=this._offlineMode;try{await this._client._client.head("/api/cocolight/infoserver",{timeout:5e3}),e&&this.setOfflineMode(!1)}catch(e){this._client._logger.error("[OfflineMonitor] ping() échoué → passage en offline"),this.setOfflineMode(!0)}}),e))}setOfflineMode(e){this._offlineMode!==e&&(this._offlineMode=e,"function"==typeof this._emit&&this._client.emit("offlineModeChanged",e),this._client._logger.info(`[ApiClient] Mode offline : ${e} (set depuis monitoring)`),e||"function"!=typeof this._replayOfflineQueue||this._replayOfflineQueue())}isOffline(){return!!this._offlineMode}async _enqueueOfflineAction({constant:e,data:t,options:r={}}){const n=this._client.getToken()||this._client.getRefreshToken(),o=this._client._endpoints.find((t=>t.constant===e));if("required"===(o?.authPolicy||("none"===o?.auth?"none":"required"))&&!n)return void this._client._logger.warn(`[Offline] Action ignorée : token requis mais absent (${e})`);const i={constant:e,data:t,options:r,meta:{baseURL:this._client._baseURL,accessToken:this._client.getToken(),refreshToken:this._client.getRefreshToken(),timestamp:Date.now()}};this._offlineQueue.push(i),await this._offlineQueueStorage.saveQueue(this._offlineQueue),this._client._logger.info(`[Offline] Action mise en file : ${e}`)}async _replayOfflineQueue(){const e=[...this._offlineQueue];this._offlineQueue=[],await this._offlineQueueStorage.saveQueue([]);for(const t of e){const e=this._client._endpoints.find((e=>e.constant===t.constant)),r=e?.authPolicy||("none"===e?.auth?"none":"required"),n=t.meta.accessToken||t.meta.refreshToken;if("required"!==r||n)try{await this.replayAction(t)}catch(e){this._client._logger.error("[Offline] Relecture échouée :",e.message),this._offlineQueue.push(t)}else this._client._logger.warn(`[Offline] Rejetée : token requis manquant (${t.constant})`)}await this._offlineQueueStorage.saveQueue(this._offlineQueue)}async _initOfflineQueue(e){this._offlineQueueStorage=e,this._offlineQueue=await e.loadQueue()}}const gr=yr,wr={ApiClient:pr,Api:fr,error:e,tokenStorageStrategy:{createDefaultTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new dr.GN;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new dr.Ge;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new dr.Ge;{const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}}},TokenStorageStrategy:dr.u3,createDefaultMultiServerTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new ur.Ek;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new ur.YP;throw new Error("localStorage n’est pas disponible dans cet environnement.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("Le stockage fichier n’est pas disponible côté navigateur.");const{MultiServerFileStorageStrategy:e}=await __webpack_require__.e(123).then(__webpack_require__.bind(__webpack_require__,6123));return new e}if("undefined"!=typeof window&&window.localStorage)return new ur.YP;{const{MultiServerFileStorageStrategy:e}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,6092));return new e}},MultiServerTokenStorageStrategy:ur.SJ},OfflineClientManager:gr}})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
|