@nocobase/plugin-workflow-javascript 2.1.0-alpha.12 → 2.1.0-alpha.14
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/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/isolated-vm/.clang-tidy +13 -0
- package/dist/node_modules/isolated-vm/.dockerignore +9 -0
- package/dist/node_modules/isolated-vm/Dockerfile.alpine +9 -0
- package/dist/node_modules/isolated-vm/Dockerfile.debian +12 -0
- package/dist/node_modules/isolated-vm/LICENSE +13 -0
- package/dist/node_modules/isolated-vm/binding.gyp +120 -0
- package/dist/node_modules/isolated-vm/include.js +3 -0
- package/dist/node_modules/isolated-vm/inspector-example.js +59 -0
- package/dist/node_modules/isolated-vm/isolated-vm.d.ts +820 -0
- package/dist/node_modules/isolated-vm/isolated-vm.js +1 -0
- package/dist/node_modules/isolated-vm/native-example/binding.gyp +23 -0
- package/dist/node_modules/isolated-vm/native-example/example.cc +61 -0
- package/dist/node_modules/isolated-vm/native-example/package.json +13 -0
- package/dist/node_modules/isolated-vm/native-example/usage.js +35 -0
- package/dist/node_modules/isolated-vm/out/isolated_vm.node +0 -0
- package/dist/node_modules/isolated-vm/package.json +1 -0
- package/dist/node_modules/isolated-vm/src/external_copy/error.h +33 -0
- package/dist/node_modules/isolated-vm/src/external_copy/external_copy.cc +509 -0
- package/dist/node_modules/isolated-vm/src/external_copy/external_copy.h +117 -0
- package/dist/node_modules/isolated-vm/src/external_copy/serializer.cc +85 -0
- package/dist/node_modules/isolated-vm/src/external_copy/serializer.h +136 -0
- package/dist/node_modules/isolated-vm/src/external_copy/serializer_nortti.cc +73 -0
- package/dist/node_modules/isolated-vm/src/external_copy/string.cc +124 -0
- package/dist/node_modules/isolated-vm/src/external_copy/string.h +28 -0
- package/dist/node_modules/isolated-vm/src/isolate/allocator.h +32 -0
- package/dist/node_modules/isolated-vm/src/isolate/allocator_nortti.cc +142 -0
- package/dist/node_modules/isolated-vm/src/isolate/class_handle.h +334 -0
- package/dist/node_modules/isolated-vm/src/isolate/cpu_profile_manager.cc +220 -0
- package/dist/node_modules/isolated-vm/src/isolate/cpu_profile_manager.h +100 -0
- package/dist/node_modules/isolated-vm/src/isolate/environment.cc +626 -0
- package/dist/node_modules/isolated-vm/src/isolate/environment.h +381 -0
- package/dist/node_modules/isolated-vm/src/isolate/executor.cc +198 -0
- package/dist/node_modules/isolated-vm/src/isolate/executor.h +183 -0
- package/dist/node_modules/isolated-vm/src/isolate/external.h +64 -0
- package/dist/node_modules/isolated-vm/src/isolate/functor_runners.h +97 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/array.h +145 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/callbacks.h +272 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/error.h +140 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/extract_params.h +145 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/handle_cast.h +257 -0
- package/dist/node_modules/isolated-vm/src/isolate/generic/read_option.h +47 -0
- package/dist/node_modules/isolated-vm/src/isolate/holder.cc +88 -0
- package/dist/node_modules/isolated-vm/src/isolate/holder.h +63 -0
- package/dist/node_modules/isolated-vm/src/isolate/inspector.cc +200 -0
- package/dist/node_modules/isolated-vm/src/isolate/inspector.h +70 -0
- package/dist/node_modules/isolated-vm/src/isolate/node_wrapper.h +15 -0
- package/dist/node_modules/isolated-vm/src/isolate/platform_delegate.cc +22 -0
- package/dist/node_modules/isolated-vm/src/isolate/platform_delegate.h +46 -0
- package/dist/node_modules/isolated-vm/src/isolate/remote_handle.h +164 -0
- package/dist/node_modules/isolated-vm/src/isolate/run_with_timeout.h +171 -0
- package/dist/node_modules/isolated-vm/src/isolate/runnable.h +29 -0
- package/dist/node_modules/isolated-vm/src/isolate/scheduler.cc +191 -0
- package/dist/node_modules/isolated-vm/src/isolate/scheduler.h +165 -0
- package/dist/node_modules/isolated-vm/src/isolate/specific.h +35 -0
- package/dist/node_modules/isolated-vm/src/isolate/stack_trace.cc +219 -0
- package/dist/node_modules/isolated-vm/src/isolate/stack_trace.h +24 -0
- package/dist/node_modules/isolated-vm/src/isolate/strings.h +127 -0
- package/dist/node_modules/isolated-vm/src/isolate/three_phase_task.cc +385 -0
- package/dist/node_modules/isolated-vm/src/isolate/three_phase_task.h +136 -0
- package/dist/node_modules/isolated-vm/src/isolate/transferable.h +15 -0
- package/dist/node_modules/isolated-vm/src/isolate/util.h +45 -0
- package/dist/node_modules/isolated-vm/src/isolate/v8_inspector_wrapper.h +12 -0
- package/dist/node_modules/isolated-vm/src/isolate/v8_version.h +12 -0
- package/dist/node_modules/isolated-vm/src/isolated_vm.h +71 -0
- package/dist/node_modules/isolated-vm/src/lib/covariant.h +50 -0
- package/dist/node_modules/isolated-vm/src/lib/lockable.h +178 -0
- package/dist/node_modules/isolated-vm/src/lib/suspend.h +106 -0
- package/dist/node_modules/isolated-vm/src/lib/thread_pool.cc +98 -0
- package/dist/node_modules/isolated-vm/src/lib/thread_pool.h +45 -0
- package/dist/node_modules/isolated-vm/src/lib/timer.cc +233 -0
- package/dist/node_modules/isolated-vm/src/lib/timer.h +36 -0
- package/dist/node_modules/isolated-vm/src/module/callback.cc +151 -0
- package/dist/node_modules/isolated-vm/src/module/callback.h +64 -0
- package/dist/node_modules/isolated-vm/src/module/context_handle.cc +241 -0
- package/dist/node_modules/isolated-vm/src/module/context_handle.h +35 -0
- package/dist/node_modules/isolated-vm/src/module/evaluation.cc +109 -0
- package/dist/node_modules/isolated-vm/src/module/evaluation.h +99 -0
- package/dist/node_modules/isolated-vm/src/module/external_copy_handle.cc +119 -0
- package/dist/node_modules/isolated-vm/src/module/external_copy_handle.h +64 -0
- package/dist/node_modules/isolated-vm/src/module/isolate.cc +136 -0
- package/dist/node_modules/isolated-vm/src/module/isolate_handle.cc +611 -0
- package/dist/node_modules/isolated-vm/src/module/isolate_handle.h +47 -0
- package/dist/node_modules/isolated-vm/src/module/lib_handle.cc +77 -0
- package/dist/node_modules/isolated-vm/src/module/lib_handle.h +28 -0
- package/dist/node_modules/isolated-vm/src/module/module_handle.cc +475 -0
- package/dist/node_modules/isolated-vm/src/module/module_handle.h +68 -0
- package/dist/node_modules/isolated-vm/src/module/native_module_handle.cc +104 -0
- package/dist/node_modules/isolated-vm/src/module/native_module_handle.h +49 -0
- package/dist/node_modules/isolated-vm/src/module/reference_handle.cc +636 -0
- package/dist/node_modules/isolated-vm/src/module/reference_handle.h +106 -0
- package/dist/node_modules/isolated-vm/src/module/script_handle.cc +107 -0
- package/dist/node_modules/isolated-vm/src/module/script_handle.h +37 -0
- package/dist/node_modules/isolated-vm/src/module/session_handle.cc +173 -0
- package/dist/node_modules/isolated-vm/src/module/session_handle.h +31 -0
- package/dist/node_modules/isolated-vm/src/module/transferable.cc +268 -0
- package/dist/node_modules/isolated-vm/src/module/transferable.h +42 -0
- package/dist/node_modules/isolated-vm/vendor/v8_inspector/nodejs_v18.0.0.h +360 -0
- package/dist/node_modules/isolated-vm/vendor/v8_inspector/nodejs_v18.3.0.h +376 -0
- package/dist/node_modules/isolated-vm/vendor/v8_inspector/nodejs_v20.0.0.h +397 -0
- package/dist/node_modules/isolated-vm/vendor/v8_inspector/nodejs_v22.0.0.h +419 -0
- package/dist/node_modules/joi/dist/joi-browser.min.js +1 -0
- package/dist/node_modules/joi/lib/annotate.js +175 -0
- package/dist/node_modules/joi/lib/base.js +1069 -0
- package/dist/node_modules/joi/lib/cache.js +143 -0
- package/dist/node_modules/joi/lib/common.js +216 -0
- package/dist/node_modules/joi/lib/compile.js +283 -0
- package/dist/node_modules/joi/lib/errors.js +271 -0
- package/dist/node_modules/joi/lib/extend.js +312 -0
- package/dist/node_modules/joi/lib/index.d.ts +2365 -0
- package/dist/node_modules/joi/lib/index.js +1 -0
- package/dist/node_modules/joi/lib/manifest.js +476 -0
- package/dist/node_modules/joi/lib/messages.js +178 -0
- package/dist/node_modules/joi/lib/modify.js +267 -0
- package/dist/node_modules/joi/lib/ref.js +414 -0
- package/dist/node_modules/joi/lib/schemas.js +302 -0
- package/dist/node_modules/joi/lib/state.js +166 -0
- package/dist/node_modules/joi/lib/template.js +463 -0
- package/dist/node_modules/joi/lib/trace.js +346 -0
- package/dist/node_modules/joi/lib/types/alternatives.js +364 -0
- package/dist/node_modules/joi/lib/types/any.js +174 -0
- package/dist/node_modules/joi/lib/types/array.js +809 -0
- package/dist/node_modules/joi/lib/types/binary.js +100 -0
- package/dist/node_modules/joi/lib/types/boolean.js +150 -0
- package/dist/node_modules/joi/lib/types/date.js +233 -0
- package/dist/node_modules/joi/lib/types/function.js +93 -0
- package/dist/node_modules/joi/lib/types/keys.js +1067 -0
- package/dist/node_modules/joi/lib/types/link.js +168 -0
- package/dist/node_modules/joi/lib/types/number.js +363 -0
- package/dist/node_modules/joi/lib/types/object.js +22 -0
- package/dist/node_modules/joi/lib/types/string.js +850 -0
- package/dist/node_modules/joi/lib/types/symbol.js +102 -0
- package/dist/node_modules/joi/lib/validator.js +750 -0
- package/dist/node_modules/joi/lib/values.js +263 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.d.ts +60 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.js +225 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/package.json +30 -0
- package/dist/node_modules/joi/package.json +1 -0
- package/dist/node_modules/winston-transport/package.json +1 -1
- package/dist/server/IsolatedVm.js +75 -0
- package/dist/server/ScriptInstruction.d.ts +8 -0
- package/dist/server/ScriptInstruction.js +23 -1
- package/dist/server/Vm.js +42 -27
- package/package.json +4 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";var e={5545:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(445);const a=r(8891);const o={};e.exports=function(e,t,r={}){s(e&&typeof e==="object","Invalid defaults value: must be an object");s(!t||t===true||typeof t==="object","Invalid source value: must be true, falsy or an object");s(typeof r==="object","Invalid options: must be an object");if(!t){return null}if(r.shallow){return o.applyToDefaultsWithShallow(e,t,r)}const a=n(e);if(t===true){return a}const l=r.nullOverride!==undefined?r.nullOverride:false;return i(a,t,{nullOverride:l,mergeArrays:false})};o.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;s(Array.isArray(l),"Invalid keys");const c=new Map;const u=t===true?null:new Set;for(let r of l){r=Array.isArray(r)?r:r.split(".");const s=a(e,r);if(s&&typeof s==="object"){c.set(s,u&&a(t,r)||s)}else if(u){u.add(r)}}const f=n(e,{},c);if(!u){return f}for(const e of u){o.reachCopy(f,t,e)}const d=r.nullOverride!==undefined?r.nullOverride:false;return i(f,t,{nullOverride:d,mergeArrays:false})};o.reachCopy=function(e,t,r){for(const e of r){if(!(e in t)){return}const r=t[e];if(typeof r!=="object"||r===null){return}t=r}const s=t;let n=e;for(let e=0;e<r.length-1;++e){const t=r[e];if(typeof n[t]!=="object"){n[t]={}}n=n[t]}n[r[r.length-1]]=s}},2718:function(e,t,r){const s=r(5563);const n={};e.exports=function(e,...t){if(e){return}if(t.length===1&&t[0]instanceof Error){throw t[0]}throw new s(t)}},5578:function(e,t,r){const s=r(8891);const n=r(6657);const i=r(417);const a={needsProtoHack:new Set([n.set,n.map,n.weakSet,n.weakMap])};e.exports=a.clone=function(e,t={},r=null){if(typeof e!=="object"||e===null){return e}let s=a.clone;let o=r;if(t.shallow){if(t.shallow!==true){return a.cloneWithShallow(e,t)}s=e=>e}else if(o){const t=o.get(e);if(t){return t}}else{o=new Map}const l=n.getInternalProto(e);if(l===n.buffer){return Buffer&&Buffer.from(e)}if(l===n.date){return new Date(e.getTime())}if(l===n.regex){return new RegExp(e)}const c=a.base(e,l,t);if(c===e){return e}if(o){o.set(e,c)}if(l===n.set){for(const r of e){c.add(s(r,t,o))}}else if(l===n.map){for(const[r,n]of e){c.set(r,s(n,t,o))}}const u=i.keys(e,t);for(const r of u){if(r==="__proto__"){continue}if(l===n.array&&r==="length"){c.length=e.length;continue}const i=Object.getOwnPropertyDescriptor(e,r);if(i){if(i.get||i.set){Object.defineProperty(c,r,i)}else if(i.enumerable){c[r]=s(e[r],t,o)}else{Object.defineProperty(c,r,{enumerable:false,writable:true,configurable:true,value:s(e[r],t,o)})}}else{Object.defineProperty(c,r,{enumerable:true,writable:true,configurable:true,value:s(e[r],t,o)})}}return c};a.cloneWithShallow=function(e,t){const r=t.shallow;t=Object.assign({},t);t.shallow=false;const n=new Map;for(const t of r){const r=s(e,t);if(typeof r==="object"||typeof r==="function"){n.set(r,r)}}return a.clone(e,t,n)};a.base=function(e,t,r){if(r.prototype===false){if(a.needsProtoHack.has(t)){return new t.constructor}return t===n.array?[]:{}}const s=Object.getPrototypeOf(e);if(s&&s.isImmutable){return e}if(t===n.array){const e=[];if(s!==t){Object.setPrototypeOf(e,s)}return e}if(a.needsProtoHack.has(t)){const e=new s.constructor;if(s!==t){Object.setPrototypeOf(e,s)}return e}return Object.create(s)}},5801:function(e,t,r){const s=r(6657);const n={mismatched:null};e.exports=function(e,t,r){r=Object.assign({prototype:true},r);return!!n.isDeepEqual(e,t,r,[])};n.isDeepEqual=function(e,t,r,i){if(e===t){return e!==0||1/e===1/t}const a=typeof e;if(a!==typeof t){return false}if(e===null||t===null){return false}if(a==="function"){if(!r.deepFunction||e.toString()!==t.toString()){return false}}else if(a!=="object"){return e!==e&&t!==t}const o=n.getSharedType(e,t,!!r.prototype);switch(o){case s.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case s.promise:return e===t;case s.regex:return e.toString()===t.toString();case n.mismatched:return false}for(let r=i.length-1;r>=0;--r){if(i[r].isSame(e,t)){return true}}i.push(new n.SeenEntry(e,t));try{return!!n.isDeepEqualObj(o,e,t,r,i)}finally{i.pop()}};n.getSharedType=function(e,t,r){if(r){if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)){return n.mismatched}return s.getInternalProto(e)}const i=s.getInternalProto(e);if(i!==s.getInternalProto(t)){return n.mismatched}return i};n.valueOf=function(e){const t=e.valueOf;if(t===undefined){return e}try{return t.call(e)}catch(e){return e}};n.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};n.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e)){if(!Set.prototype.has.call(t,r)){return false}}return true};n.isDeepEqualObj=function(e,t,r,i,a){const{isDeepEqual:o,valueOf:l,hasOwnEnumerableProperty:c}=n;const{keys:u,getOwnPropertySymbols:f}=Object;if(e===s.array){if(i.part){for(const e of t){for(const t of r){if(o(e,t,i,a)){return true}}}}else{if(t.length!==r.length){return false}for(let e=0;e<t.length;++e){if(!o(t[e],r[e],i,a)){return false}}return true}}else if(e===s.set){if(t.size!==r.size){return false}if(!n.isSetSimpleEqual(t,r)){const e=new Set(Set.prototype.values.call(r));for(const r of Set.prototype.values.call(t)){if(e.delete(r)){continue}let t=false;for(const s of e){if(o(r,s,i,a)){e.delete(s);t=true;break}}if(!t){return false}}}}else if(e===s.map){if(t.size!==r.size){return false}for(const[e,s]of Map.prototype.entries.call(t)){if(s===undefined&&!Map.prototype.has.call(r,e)){return false}if(!o(s,Map.prototype.get.call(r,e),i,a)){return false}}}else if(e===s.error){if(t.name!==r.name||t.message!==r.message){return false}}const d=l(t);const m=l(r);if((t!==d||r!==m)&&!o(d,m,i,a)){return false}const h=u(t);if(!i.part&&h.length!==u(r).length&&!i.skip){return false}let p=0;for(const e of h){if(i.skip&&i.skip.includes(e)){if(r[e]===undefined){++p}continue}if(!c(r,e)){return false}if(!o(t[e],r[e],i,a)){return false}}if(!i.part&&h.length-p!==u(r).length){return false}if(i.symbols!==false){const e=f(t);const s=new Set(f(r));for(const n of e){if(!i.skip||!i.skip.includes(n)){if(c(t,n)){if(!c(r,n)){return false}if(!o(t[n],r[n],i,a)){return false}}else if(c(r,n)){return false}}s.delete(n)}for(const e of s){if(c(r,e)){return false}}}return true};n.SeenEntry=class{constructor(e,t){this.obj=e;this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}},5563:function(e,t,r){const s=r(7577);const n={};e.exports=class extends Error{constructor(e){const r=e.filter((e=>e!=="")).map((e=>typeof e==="string"?e:e instanceof Error?e.message:s(e)));super(r.join(" ")||"Unknown error");if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,t.assert)}}}},4752:function(e){const t={};e.exports=function(e){if(!e){return""}let r="";for(let s=0;s<e.length;++s){const n=e.charCodeAt(s);if(t.isSafe(n)){r+=e[s]}else{r+=t.escapeHtmlChar(n)}}return r};t.escapeHtmlChar=function(e){const r=t.namedHtml.get(e);if(r){return r}if(e>=256){return"&#"+e+";"}const s=e.toString(16).padStart(2,"0");return`&#x${s};`};t.isSafe=function(e){return t.safeCharCodes.has(e)};t.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);t.safeCharCodes=function(){const e=new Set;for(let t=32;t<123;++t){if(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95){e.add(t)}}return e}()},1965:function(e){const t={};e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},2887:function(e){const t={};e.exports=function(){}},445:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(417);const a={};e.exports=a.merge=function(e,t,r){s(e&&typeof e==="object","Invalid target value: must be an object");s(t===null||t===undefined||typeof t==="object","Invalid source value: must be null, undefined, or an object");if(!t){return e}r=Object.assign({nullOverride:true,mergeArrays:true},r);if(Array.isArray(t)){s(Array.isArray(e),"Cannot merge array onto an object");if(!r.mergeArrays){e.length=0}for(let s=0;s<t.length;++s){e.push(n(t[s],{symbols:r.symbols}))}return e}const o=i.keys(t,r);for(let s=0;s<o.length;++s){const i=o[s];if(i==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,i)){continue}const l=t[i];if(l&&typeof l==="object"){if(e[i]===l){continue}if(!e[i]||typeof e[i]!=="object"||Array.isArray(e[i])!==Array.isArray(l)||l instanceof Date||Buffer&&Buffer.isBuffer(l)||l instanceof RegExp){e[i]=n(l,{symbols:r.symbols})}else{a.merge(e[i],l,r)}}else{if(l!==null&&l!==undefined){e[i]=l}else if(r.nullOverride){e[i]=l}}}return e}},8891:function(e,t,r){const s=r(2718);const n={};e.exports=function(e,t,r){if(t===false||t===null||t===undefined){return e}r=r||{};if(typeof r==="string"){r={separator:r}}const i=Array.isArray(t);s(!i||!r.separator,"Separator option is not valid for array-based chain");const a=i?t:t.split(r.separator||".");let o=e;for(let e=0;e<a.length;++e){let i=a[e];const l=r.iterables&&n.iterables(o);if(Array.isArray(o)||l==="set"){const e=Number(i);if(Number.isInteger(e)){i=e<0?o.length+e:e}}if(!o||typeof o==="function"&&r.functions===false||!l&&o[i]===undefined){s(!r.strict||e+1===a.length,"Missing segment",i,"in reach path ",t);s(typeof o==="object"||r.functions===true||typeof o!=="function","Invalid segment",i,"in reach path ",t);o=r.default;break}if(!l){o=o[i]}else if(l==="set"){o=[...o][i]}else{o=o.get(i)}}return o};n.iterables=function(e){if(e instanceof Set){return"set"}if(e instanceof Map){return"map"}}},7577:function(e){const t={};e.exports=function(...e){try{return JSON.stringify(...e)}catch(e){return"[Cannot display object: "+e.message+"]"}}},6657:function(e,t){const r={};t=e.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};r.typeMap=new Map([["[object Error]",t.error],["[object Map]",t.map],["[object Promise]",t.promise],["[object Set]",t.set],["[object WeakMap]",t.weakMap],["[object WeakSet]",t.weakSet]]);t.getInternalProto=function(e){if(Array.isArray(e)){return t.array}if(Buffer&&e instanceof Buffer){return t.buffer}if(e instanceof Date){return t.date}if(e instanceof RegExp){return t.regex}if(e instanceof Error){return t.error}const s=Object.prototype.toString.call(e);return r.typeMap.get(s)||t.generic}},417:function(e,t){const r={};t.keys=function(e,t={}){return t.symbols!==false?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},7425:function(e,t,r){const s=r(7310);const n=r(1594);const i={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:s.URL||URL};t.analyze=function(e,t={}){if(!e){return n.code("DOMAIN_NON_EMPTY_STRING")}if(typeof e!=="string"){throw new Error("Invalid input: domain must be a string")}if(e.length>256){return n.code("DOMAIN_TOO_LONG")}const r=!i.nonAsciiRx.test(e);if(!r){if(t.allowUnicode===false){return n.code("DOMAIN_INVALID_UNICODE_CHARS")}e=e.normalize("NFC")}if(i.domainControlRx.test(e)){return n.code("DOMAIN_INVALID_CHARS")}e=i.punycode(e);if(t.allowFullyQualified&&e[e.length-1]==="."){e=e.slice(0,-1)}const s=t.minDomainSegments||i.minDomainSegments;const a=e.split(".");if(a.length<s){return n.code("DOMAIN_SEGMENTS_COUNT")}if(t.maxDomainSegments){if(a.length>t.maxDomainSegments){return n.code("DOMAIN_SEGMENTS_COUNT_MAX")}}const o=t.tlds;if(o){const e=a[a.length-1].toLowerCase();if(o.deny&&o.deny.has(e)||o.allow&&!o.allow.has(e)){return n.code("DOMAIN_FORBIDDEN_TLDS")}}for(let e=0;e<a.length;++e){const t=a[e];if(!t.length){return n.code("DOMAIN_EMPTY_SEGMENT")}if(t.length>63){return n.code("DOMAIN_LONG_SEGMENT")}if(e<a.length-1){if(!i.domainSegmentRx.test(t)){return n.code("DOMAIN_INVALID_CHARS")}}else{if(!i.tldSegmentRx.test(t)){return n.code("DOMAIN_INVALID_TLDS_CHARS")}}}return null};t.isValid=function(e,r){return!t.analyze(e,r)};i.punycode=function(e){if(e.includes("%")){e=e.replace(/%/g,"%25")}try{return new i.URL(`http://${e}`).host}catch(t){return e}}},3283:function(e,t,r){const s=r(3837);const n=r(7425);const i=r(1594);const a={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(s.TextEncoder||TextEncoder)};t.analyze=function(e,t){return a.email(e,t)};t.isValid=function(e,t){return!a.email(e,t)};a.email=function(e,t={}){if(typeof e!=="string"){throw new Error("Invalid input: email must be a string")}if(!e){return i.code("EMPTY_STRING")}const r=!a.nonAsciiRx.test(e);if(!r){if(t.allowUnicode===false){return i.code("FORBIDDEN_UNICODE")}e=e.normalize("NFC")}const s=e.split("@");if(s.length!==2){return s.length>2?i.code("MULTIPLE_AT_CHAR"):i.code("MISSING_AT_CHAR")}const[o,l]=s;if(!o){return i.code("EMPTY_LOCAL")}if(!t.ignoreLength){if(e.length>254){return i.code("ADDRESS_TOO_LONG")}if(a.encoder.encode(o).length>64){return i.code("LOCAL_TOO_LONG")}}return a.local(o,r)||n.analyze(l,t)};a.local=function(e,t){const r=e.split(".");for(const e of r){if(!e.length){return i.code("EMPTY_LOCAL_SEGMENT")}if(t){if(!a.atextRx.test(e)){return i.code("INVALID_LOCAL_CHARS")}continue}for(const t of e){if(a.atextRx.test(t)){continue}const e=a.binary(t);if(!a.atomRx.test(e)){return i.code("INVALID_LOCAL_CHARS")}}}};a.binary=function(e){return Array.from(a.encoder.encode(e)).map((e=>String.fromCharCode(e))).join("")};a.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/;a.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},1594:function(e,t){t.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"};t.code=function(e){return{code:e,error:t.codes[e]}}},2337:function(e,t,r){const s=r(2718);const n=r(4983);const i={};t.regex=function(e={}){s(e.cidr===undefined||typeof e.cidr==="string","options.cidr must be a string");const t=e.cidr?e.cidr.toLowerCase():"optional";s(["required","optional","forbidden"].includes(t),"options.cidr must be one of required, optional, forbidden");s(e.version===undefined||typeof e.version==="string"||Array.isArray(e.version),"options.version must be a string or an array of string");let r=e.version||["ipv4","ipv6","ipvfuture"];if(!Array.isArray(r)){r=[r]}s(r.length>=1,"options.version must have at least 1 version specified");for(let e=0;e<r.length;++e){s(typeof r[e]==="string","options.version must only contain strings");r[e]=r[e].toLowerCase();s(["ipv4","ipv6","ipvfuture"].includes(r[e]),"options.version contains unknown version "+r[e]+" - must be one of ipv4, ipv6, ipvfuture")}r=Array.from(new Set(r));const i=r.map((e=>{if(t==="forbidden"){return n.ip[e]}const r=`\\/${e==="ipv4"?n.ip.v4Cidr:n.ip.v6Cidr}`;if(t==="required"){return`${n.ip[e]}${r}`}return`${n.ip[e]}(?:${r})?`}));const a=`(?:${i.join("|")})`;const o=new RegExp(`^${a}$`);return{cidr:t,versions:r,regex:o,raw:a}}},3092:function(e){const t={};t.tlds=["AAA","AARP","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"];e.exports=new Set(t.tlds.map((e=>e.toLowerCase())))},4983:function(e,t,r){const s=r(2718);const n=r(1965);const i={};i.generate=function(){const e={};const t="\\dA-Fa-f";const r="["+t+"]";const s="\\w-\\.~";const n="!\\$&'\\(\\)\\*\\+,;=";const i="%"+t;const a=s+i+n+":@";const o="["+a+"]";const l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";e.ipv4address="(?:"+l+"\\.){3}"+l;const c=r+"{1,4}";const u="(?:"+c+":"+c+"|"+e.ipv4address+")";const f="(?:"+c+":){6}"+u;const d="::(?:"+c+":){5}"+u;const m="(?:"+c+")?::(?:"+c+":){4}"+u;const h="(?:(?:"+c+":){0,1}"+c+")?::(?:"+c+":){3}"+u;const p="(?:(?:"+c+":){0,2}"+c+")?::(?:"+c+":){2}"+u;const g="(?:(?:"+c+":){0,3}"+c+")?::"+c+":"+u;const y="(?:(?:"+c+":){0,4}"+c+")?::"+u;const b="(?:(?:"+c+":){0,5}"+c+")?::"+c;const _="(?:(?:"+c+":){0,6}"+c+")?::";e.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])";e.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])";e.ipv6address="(?:"+f+"|"+d+"|"+m+"|"+h+"|"+p+"|"+g+"|"+y+"|"+b+"|"+_+")";e.ipvFuture="v"+r+"+\\.["+s+n+":]+";e.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*";e.schemeRegex=new RegExp(e.scheme);const v="["+s+i+n+":]*";const A="\\[(?:"+e.ipv6address+"|"+e.ipvFuture+")\\]";const E="["+s+i+n+"]{1,255}";const R="(?:"+A+"|"+e.ipv4address+"|"+E+")";const S="\\d*";const O="(?:"+v+"@)?"+R+"(?::"+S+")?";const N="(?:"+v+"@)?("+R+")(?::"+S+")?";const I=o+"*";const w=o+"+";const $="["+s+i+n+"@"+"]+";const T="";const C="(?:\\/"+I+")*";const x="\\/(?:"+w+C+")?";const L=w+C;const D=$+C;const M="(?:\\/\\/\\/"+I+C+")";e.hierPart="(?:"+"(?:\\/\\/"+O+C+")"+"|"+x+"|"+L+"|"+M+")";e.hierPartCapture="(?:"+"(?:\\/\\/"+N+C+")"+"|"+x+"|"+L+")";e.relativeRef="(?:"+"(?:\\/\\/"+O+C+")"+"|"+x+"|"+D+"|"+T+")";e.relativeRefCapture="(?:"+"(?:\\/\\/"+N+C+")"+"|"+x+"|"+D+"|"+T+")";e.query="["+a+"\\/\\?]*(?=#|$)";e.queryWithSquareBrackets="["+a+"\\[\\]\\/\\?]*(?=#|$)";e.fragment="["+a+"\\/\\?]*";return e};i.rfc3986=i.generate();t.ip={v4Cidr:i.rfc3986.ipv4Cidr,v6Cidr:i.rfc3986.ipv6Cidr,ipv4:i.rfc3986.ipv4address,ipv6:i.rfc3986.ipv6address,ipvfuture:i.rfc3986.ipvFuture};i.createRegex=function(e){const t=i.rfc3986;const r=e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query;const a="(?:\\?"+r+")?"+"(?:#"+t.fragment+")?";const o=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly){return i.wrap(o+a)}let l="";if(e.scheme){s(e.scheme instanceof RegExp||typeof e.scheme==="string"||Array.isArray(e.scheme),"scheme must be a RegExp, String, or Array");const r=[].concat(e.scheme);s(r.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let e=0;e<r.length;++e){const a=r[e];s(a instanceof RegExp||typeof a==="string","scheme at position "+e+" must be a RegExp or String");if(a instanceof RegExp){i.push(a.source.toString())}else{s(t.schemeRegex.test(a),"scheme at position "+e+" must be a valid scheme");i.push(n(a))}}l=i.join("|")}const c=l?"(?:"+l+")":t.scheme;const u="(?:"+c+":"+(e.domain?t.hierPartCapture:t.hierPart)+")";const f=e.allowRelative?"(?:"+u+"|"+o+")":u;return i.wrap(f+a,l)};i.wrap=function(e,t){e=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${e}`;return{raw:e,regex:new RegExp(`^${e}$`),scheme:t}};i.uriRegex=i.createRegex({});t.regex=function(e={}){if(e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain){return i.createRegex(e)}return i.uriRegex}},4379:function(e,t){const r={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};t.Parser=class{constructor(e,t={}){if(!t[r.settings]&&t.constants){for(const e in t.constants){const r=t.constants[e];if(r!==null&&!["boolean","number","string"].includes(typeof r)){throw new Error(`Formula constant ${e} contains invalid ${typeof r} value type`)}}}this.settings=t[r.settings]?t:Object.assign({[r.settings]:true,constants:{},functions:{}},t);this.single=null;this._parts=null;this._parse(e)}_parse(e){let s=[];let n="";let i=0;let a=false;const flush=e=>{if(i){throw new Error("Formula missing closing parenthesis")}const o=s.length?s[s.length-1]:null;if(!a&&!n&&!e){return}if(o&&o.type==="reference"&&e===")"){o.type="function";o.value=this._subFormula(n,o.value);n="";return}if(e===")"){const e=new t.Parser(n,this.settings);s.push({type:"segment",value:e})}else if(a){if(a==="]"){s.push({type:"reference",value:n});n="";return}s.push({type:"literal",value:n})}else if(r.operatorCharacters.includes(n)){if(o&&o.type==="operator"&&r.operators.includes(o.value+n)){o.value+=n}else{s.push({type:"operator",value:n})}}else if(n.match(r.numberRx)){s.push({type:"constant",value:parseFloat(n)})}else if(this.settings.constants[n]!==undefined){s.push({type:"constant",value:this.settings.constants[n]})}else{if(!n.match(r.tokenRx)){throw new Error(`Formula contains invalid token: ${n}`)}s.push({type:"reference",value:n})}n=""};for(const t of e){if(a){if(t===a){flush();a=false}else{n+=t}}else if(i){if(t==="("){n+=t;++i}else if(t===")"){--i;if(!i){flush(t)}else{n+=t}}else{n+=t}}else if(t in r.literals){a=r.literals[t]}else if(t==="("){flush();++i}else if(r.operatorCharacters.includes(t)){flush();n=t;flush()}else if(t!==" "){n+=t}else{flush()}}flush();s=s.map(((e,t)=>{if(e.type!=="operator"||e.value!=="-"||t&&s[t-1].type!=="operator"){return e}return{type:"operator",value:"n"}}));let o=false;for(const e of s){if(e.type==="operator"){if(r.operatorsPrefix.includes(e.value)){continue}if(!o){throw new Error("Formula contains an operator in invalid position")}if(!r.operators.includes(e.value)){throw new Error(`Formula contains an unknown operator ${e.value}`)}}else if(o){throw new Error("Formula missing expected operator")}o=!o}if(!o){throw new Error("Formula contains invalid trailing operator")}if(s.length===1&&["reference","literal","constant"].includes(s[0].type)){this.single={type:s[0].type==="reference"?"reference":"value",value:s[0].value}}this._parts=s.map((e=>{if(e.type==="operator"){return r.operatorsPrefix.includes(e.value)?e:e.value}if(e.type!=="reference"){return e.value}if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value)){throw new Error(`Formula contains invalid reference ${e.value}`)}if(this.settings.reference){return this.settings.reference(e.value)}return r.reference(e.value)}))}_subFormula(e,s){const n=this.settings.functions[s];if(typeof n!=="function"){throw new Error(`Formula contains unknown function ${s}`)}let i=[];if(e){let t="";let n=0;let a=false;const flush=()=>{if(!t){throw new Error(`Formula contains function ${s} with invalid arguments ${e}`)}i.push(t);t=""};for(let s=0;s<e.length;++s){const i=e[s];if(a){t+=i;if(i===a){a=false}}else if(i in r.literals&&!n){t+=i;a=r.literals[i]}else if(i===","&&!n){flush()}else{t+=i;if(i==="("){++n}else if(i===")"){--n}}}flush()}i=i.map((e=>new t.Parser(e,this.settings)));return function(e){const t=[];for(const r of i){t.push(r.evaluate(e))}return n.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let s=t.length-2;s>=0;--s){const n=t[s];if(n&&n.type==="operator"){const i=t[s+1];t.splice(s+1,1);const a=r.evaluate(i,e);t[s]=r.single(n.value,a)}}r.operatorsOrder.forEach((s=>{for(let n=1;n<t.length-1;){if(s.includes(t[n])){const s=t[n];const i=r.evaluate(t[n-1],e);const a=r.evaluate(t[n+1],e);t.splice(n,2);const o=r.calculate(s,i,a);t[n-1]=o===0?0:o}else{n+=2}}}));return r.evaluate(t[0],e)}};t.Parser.prototype[r.symbol]=true;r.reference=function(e){return function(t){return t&&t[e]!==undefined?t[e]:null}};r.evaluate=function(e,t){if(e===null){return null}if(typeof e==="function"){return e(t)}if(e[r.symbol]){return e.evaluate(t)}return e};r.single=function(e,t){if(e==="!"){return t?false:true}const r=-t;if(r===0){return 0}return r};r.calculate=function(e,t,s){if(e==="??"){return r.exists(t)?t:s}if(typeof t==="string"||typeof s==="string"){if(e==="+"){t=r.exists(t)?t:"";s=r.exists(s)?s:"";return t+s}}else{switch(e){case"^":return Math.pow(t,s);case"*":return t*s;case"/":return t/s;case"%":return t%s;case"+":return t+s;case"-":return t-s}}switch(e){case"<":return t<s;case"<=":return t<=s;case">":return t>s;case">=":return t>=s;case"==":return t===s;case"!=":return t!==s;case"&&":return t&&s;case"||":return t||s}return null};r.exists=function(e){return e!==null&&e!==undefined}},5604:function(e,t){const r={};t.location=function(e=0){const t=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r={};Error.captureStackTrace(r,this);const s=r.stack[e+1];Error.prepareStackTrace=t;return{filename:s.getFileName(),line:s.getLineNumber()}}},6014:function(e,t,r){const s=r(5578);const n=r(2448);const i={annotations:Symbol("annotations")};t.error=function(e){if(!this._original||typeof this._original!=="object"){return this.details[0].message}const t=e?"":"[31m";const r=e?"":"[41m";const a=e?"":"[0m";const o=s(this._original);for(let e=this.details.length-1;e>=0;--e){const t=e+1;const r=this.details[e];const s=r.path;let a=o;for(let e=0;;++e){const o=s[e];if(n.isSchema(a)){a=a.clone()}if(e+1<s.length&&typeof a[o]!=="string"){a=a[o]}else{const e=a[i.annotations]||{errors:{},missing:{}};a[i.annotations]=e;const s=o||r.context.key;if(a[o]!==undefined){e.errors[s]=e.errors[s]||[];e.errors[s].push(t)}else{e.missing[s]=t}break}}}const l={key:/_\$key\$_([, \d]+)_\$end\$_"/g,missing:/"_\$miss\$_([^|]+)\|(\d+)_\$end\$_": "__missing__"/g,arrayIndex:/\s*"_\$idx\$_([, \d]+)_\$end\$_",?\n(.*)/g,specials:/"\[(NaN|Symbol.*|-?Infinity|function.*|\(.*)]"/g};let c=i.safeStringify(o,2).replace(l.key,((e,r)=>`" ${t}[${r}]${a}`)).replace(l.missing,((e,s,n)=>`${r}"${s}"${a}${t} [${n}]: -- missing --${a}`)).replace(l.arrayIndex,((e,r,s)=>`\n${s} ${t}[${r}]${a}`)).replace(l.specials,((e,t)=>t));c=`${c}\n${t}`;for(let e=0;e<this.details.length;++e){const t=e+1;c=`${c}\n[${t}] ${this.details[e].message}`}c=c+a;return c};i.safeStringify=function(e,t){return JSON.stringify(e,i.serializer(),t)};i.serializer=function(){const e=[];const t=[];const cycleReplacer=(r,s)=>{if(t[0]===s){return"[Circular ~]"}return"[Circular ~."+e.slice(0,t.indexOf(s)).join(".")+"]"};return function(r,s){if(t.length>0){const n=t.indexOf(this);if(~n){t.length=n+1;e.length=n+1;e[n]=r}else{t.push(this);e.push(r)}if(~t.indexOf(s)){s=cycleReplacer.call(this,r,s)}}else{t.push(s)}if(s){const e=s[i.annotations];if(e){if(Array.isArray(s)){const t=[];for(let r=0;r<s.length;++r){if(e.errors[r]){t.push(`_$idx$_${e.errors[r].sort().join(", ")}_$end$_`)}t.push(s[r])}s=t}else{for(const t in e.errors){s[`${t}_$key$_${e.errors[t].sort().join(", ")}_$end$_`]=s[t];s[t]=undefined}for(const t in e.missing){s[`_$miss$_${t}|${e.missing[t]}_$end$_`]="__missing__"}}return s}}if(s===Infinity||s===-Infinity||Number.isNaN(s)||typeof s==="function"||typeof s==="symbol"){return"["+s.toString()+"]"}return s}}},5184:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(5801);const a=r(445);const o=r(3355);const l=r(2448);const c=r(3038);const u=r(9490);const f=r(6680);const d=r(7997);const m=r(6103);const h=r(1290);const p=r(3838);const g=r(3171);const y=r(1804);const b=r(1944);const _={};_.Base=class{constructor(e){this.type=e;this.$_root=null;this._definition={};this._reset()}_reset(){this._ids=new h.Ids;this._preferences=null;this._refs=new p.Manager;this._cache=null;this._valids=null;this._invalids=null;this._flags={};this._rules=[];this._singleRules=new Map;this.$_terms={};this.$_temp={ruleset:null,whens:{}}}describe(){s(typeof d.describe==="function","Manifest functionality disabled");return d.describe(this)}allow(...e){l.verifyFlat(e,"allow");return this._values(e,"_valids")}alter(e){s(e&&typeof e==="object"&&!Array.isArray(e),"Invalid targets argument");s(!this._inRuleset(),"Cannot set alterations inside a ruleset");const t=this.clone();t.$_terms.alterations=t.$_terms.alterations||[];for(const r in e){const n=e[r];s(typeof n==="function","Alteration adjuster for",r,"must be a function");t.$_terms.alterations.push({target:r,adjuster:n})}t.$_temp.ruleset=false;return t}artifact(e){s(e!==undefined,"Artifact cannot be undefined");s(!this._cache,"Cannot set an artifact with a rule cache");return this.$_setFlag("artifact",e)}cast(e){s(e===false||typeof e==="string","Invalid to value");s(e===false||this._definition.cast[e],"Type",this.type,"does not support casting to",e);return this.$_setFlag("cast",e===false?undefined:e)}default(e,t){return this._default("default",e,t)}description(e){s(e&&typeof e==="string","Description must be a non-empty string");return this.$_setFlag("description",e)}empty(e){const t=this.clone();if(e!==undefined){e=t.$_compile(e,{override:false})}return t.$_setFlag("empty",e,{clone:false})}error(e){s(e,"Missing error");s(e instanceof Error||typeof e==="function","Must provide a valid Error object or a function");return this.$_setFlag("error",e)}example(e,t={}){s(e!==undefined,"Missing example");l.assertOptions(t,["override"]);return this._inner("examples",e,{single:true,override:t.override})}external(e,t){if(typeof e==="object"){s(!t,"Cannot combine options with description");t=e.description;e=e.method}s(typeof e==="function","Method must be a function");s(t===undefined||t&&typeof t==="string","Description must be a non-empty string");return this._inner("externals",{method:e,description:t},{single:true})}failover(e,t){return this._default("failover",e,t)}forbidden(){return this.presence("forbidden")}id(e){if(!e){return this.$_setFlag("id",undefined)}s(typeof e==="string","id must be a non-empty string");s(/^[^\.]+$/.test(e),"id cannot contain period character");return this.$_setFlag("id",e)}invalid(...e){return this._values(e,"_invalids")}label(e){s(e&&typeof e==="string","Label name must be a non-empty string");return this.$_setFlag("label",e)}meta(e){s(e!==undefined,"Meta cannot be undefined");return this._inner("metas",e,{single:true})}note(...e){s(e.length,"Missing notes");for(const t of e){s(t&&typeof t==="string","Notes must be non-empty strings")}return this._inner("notes",e)}only(e=true){s(typeof e==="boolean","Invalid mode:",e);return this.$_setFlag("only",e)}optional(){return this.presence("optional")}prefs(e){s(e,"Missing preferences");s(e.context===undefined,"Cannot override context");s(e.externals===undefined,"Cannot override externals");s(e.warnings===undefined,"Cannot override warnings");s(e.debug===undefined,"Cannot override debug");l.checkPreferences(e);const t=this.clone();t._preferences=l.preferences(t._preferences,e);return t}presence(e){s(["optional","required","forbidden"].includes(e),"Unknown presence mode",e);return this.$_setFlag("presence",e)}raw(e=true){return this.$_setFlag("result",e?"raw":undefined)}result(e){s(["raw","strip"].includes(e),"Unknown result mode",e);return this.$_setFlag("result",e)}required(){return this.presence("required")}strict(e){const t=this.clone();const r=e===undefined?false:!e;t._preferences=l.preferences(t._preferences,{convert:r});return t}strip(e=true){return this.$_setFlag("result",e?"strip":undefined)}tag(...e){s(e.length,"Missing tags");for(const t of e){s(t&&typeof t==="string","Tags must be non-empty strings")}return this._inner("tags",e)}unit(e){s(e&&typeof e==="string","Unit name must be a non-empty string");return this.$_setFlag("unit",e)}valid(...e){l.verifyFlat(e,"valid");const t=this.allow(...e);t.$_setFlag("only",!!t._valids,{clone:false});return t}when(e,t){const r=this.clone();if(!r.$_terms.whens){r.$_terms.whens=[]}const n=c.when(r,e,t);if(!["any","link"].includes(r.type)){const e=n.is?[n]:n.switch;for(const t of e){s(!t.then||t.then.type==="any"||t.then.type===r.type,"Cannot combine",r.type,"with",t.then&&t.then.type);s(!t.otherwise||t.otherwise.type==="any"||t.otherwise.type===r.type,"Cannot combine",r.type,"with",t.otherwise&&t.otherwise.type)}}r.$_terms.whens.push(n);return r.$_mutateRebuild()}cache(e){s(!this._inRuleset(),"Cannot set caching inside a ruleset");s(!this._cache,"Cannot override schema cache");s(this._flags.artifact===undefined,"Cannot cache a rule with an artifact");const t=this.clone();t._cache=e||o.provider.provision();t.$_temp.ruleset=false;return t}clone(){const e=Object.create(Object.getPrototypeOf(this));return this._assign(e)}concat(e){s(l.isSchema(e),"Invalid schema object");s(this.type==="any"||e.type==="any"||e.type===this.type,"Cannot merge type",this.type,"with another type:",e.type);s(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset");s(!e._inRuleset(),"Cannot concatenate a schema with open ruleset");let t=this.clone();if(this.type==="any"&&e.type!=="any"){const r=e.clone();for(const e of Object.keys(t)){if(e!=="type"){r[e]=t[e]}}t=r}t._ids.concat(e._ids);t._refs.register(e,p.toSibling);t._preferences=t._preferences?l.preferences(t._preferences,e._preferences):e._preferences;t._valids=b.merge(t._valids,e._valids,e._invalids);t._invalids=b.merge(t._invalids,e._invalids,e._valids);for(const r of e._singleRules.keys()){if(t._singleRules.has(r)){t._rules=t._rules.filter((e=>e.keep||e.name!==r));t._singleRules.delete(r)}}for(const r of e._rules){if(!e._definition.rules[r.method].multi){t._singleRules.set(r.name,r)}t._rules.push(r)}if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty;a(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty;a(t._flags,r)}else{a(t._flags,e._flags)}for(const r in e.$_terms){const s=e.$_terms[r];if(!s){if(!t.$_terms[r]){t.$_terms[r]=s}continue}if(!t.$_terms[r]){t.$_terms[r]=s.slice();continue}t.$_terms[r]=t.$_terms[r].concat(s)}if(this.$_root._tracer){this.$_root._tracer._combine(t,[this,e])}return t.$_mutateRebuild()}extend(e){s(!e.base,"Cannot extend type with another base");return f.type(this,e)}extract(e){e=Array.isArray(e)?e:e.split(".");return this._ids.reach(e)}fork(e,t){s(!this._inRuleset(),"Cannot fork inside a ruleset");let r=this;for(let s of[].concat(e)){s=Array.isArray(s)?s:s.split(".");r=r._ids.fork(s,t,r)}r.$_temp.ruleset=false;return r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers));s(this.$_temp.ruleset!==false,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const r=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;s(r>=0&&r<this._rules.length,"Cannot apply rules to empty ruleset");const i=this.clone();for(let a=r;a<i._rules.length;++a){const r=i._rules[a];const o=n(r);for(const n in e){t.modifiers[n](o,e[n]);s(o.name===r.name,"Cannot change rule name")}i._rules[a]=o;if(i._singleRules.get(o.name)===r){i._singleRules.set(o.name,o)}}i.$_temp.ruleset=false;return i.$_mutateRebuild()}get ruleset(){s(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const e=this.clone();e.$_temp.ruleset=e._rules.length;return e}get $(){return this.ruleset}tailor(e){e=[].concat(e);s(!this._inRuleset(),"Cannot tailor inside a ruleset");let t=this;if(this.$_terms.alterations){for(const{target:r,adjuster:n}of this.$_terms.alterations){if(e.includes(r)){t=n(t);s(l.isSchema(t),"Alteration adjuster for",r,"failed to return a schema object")}}}t=t.$_modify({each:t=>t.tailor(e),ref:false});t.$_temp.ruleset=false;return t.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){if(typeof e==="string"){e={name:e}}s(e&&typeof e==="object","Invalid options");s(e.name&&typeof e.name==="string","Invalid rule name");for(const t in e){s(t[0]!=="_","Cannot set private rule properties")}const t=Object.assign({},e);t._resolve=[];t.method=t.method||t.name;const r=this._definition.rules[t.method];const n=t.args;s(r,"Unknown rule",t.method);const i=this.clone();if(n){s(Object.keys(n).length===1||Object.keys(n).length===this._definition.rules[t.name].args.length,"Invalid rule definition for",this.type,t.name);for(const e in n){let a=n[e];if(r.argsByName){const o=r.argsByName.get(e);if(o.ref&&l.isResolvable(a)){t._resolve.push(e);i.$_mutateRegister(a)}else{if(o.normalize){a=o.normalize(a);n[e]=a}if(o.assert){const t=l.validateArg(a,e,o);s(!t,t,"or reference")}}}if(a===undefined){delete n[e];continue}n[e]=a}}if(!r.multi){i._ruleRemove(t.name,{clone:false});i._singleRules.set(t.name,t)}if(i.$_temp.ruleset===false){i.$_temp.ruleset=null}if(r.priority){i._rules.unshift(t)}else{i._rules.push(t)}return i}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,s,n,i={}){const a=i.flags!==false?this._flags:{};const o=i.messages?m.merge(this._definition.messages,i.messages):this._definition.messages;return new u.Report(e,t,r,a,o,s,n)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){e=Array.isArray(e)?e:e.split(".");return this._ids.labels(e)}$_match(e,t,r,s){r=Object.assign({},r);r.abortEarly=true;r._externals=false;t.snapshot();const n=!y.validate(e,this,t,r,s).errors;t.restore();return n}$_modify(e){l.assertOptions(e,["each","once","ref","schema"]);return h.schema(this,e)||this}$_mutateRebuild(){s(!this._inRuleset(),"Cannot add this rule inside a ruleset");this._refs.reset();this._ids.reset();const each=(e,{source:t,name:r,path:s,key:n})=>{const i=this._definition[t][r]&&this._definition[t][r].register;if(i!==false){this.$_mutateRegister(e,{family:i,key:n})}};this.$_modify({each:each});if(this._definition.rebuild){this._definition.rebuild(this)}this.$_temp.ruleset=false;return this}$_mutateRegister(e,{family:t,key:r}={}){this._refs.register(e,t);this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t,r={}){s(e[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const n=this._definition.flags[e]||{};if(i(t,n.default)){t=undefined}if(i(t,this._flags[e])){return this}const a=r.clone!==false?this.clone():this;if(t!==undefined){a._flags[e]=t;a.$_mutateRegister(t)}else{delete a._flags[e]}if(e[0]!=="_"){a.$_temp.ruleset=false}return a}$_parent(e,...t){return this[e][l.symbols.parent].call(this,...t)}$_validate(e,t,r){return y.validate(e,this,t,r)}_assign(e){e.type=this.type;e.$_root=this.$_root;e.$_temp=Object.assign({},this.$_temp);e.$_temp.whens={};e._ids=this._ids.clone();e._preferences=this._preferences;e._valids=this._valids&&this._valids.clone();e._invalids=this._invalids&&this._invalids.clone();e._rules=this._rules.slice();e._singleRules=n(this._singleRules,{shallow:true});e._refs=this._refs.clone();e._flags=Object.assign({},this._flags);e._cache=null;e.$_terms={};for(const t in this.$_terms){e.$_terms[t]=this.$_terms[t]?this.$_terms[t].slice():null}e.$_super={};for(const t in this.$_super){e.$_super[t]=this._super[t].bind(e)}return e}_bare(){const e=this.clone();e._reset();const t=e._definition.terms;for(const r in t){const s=t[r];e.$_terms[r]=s.init}return e.$_mutateRebuild()}_default(e,t,r={}){l.assertOptions(r,"literal");s(t!==undefined,"Missing",e,"value");s(typeof t==="function"||!r.literal,"Only function value supports literal option");if(typeof t==="function"&&r.literal){t={[l.symbols.literal]:true,literal:t}}const n=this.$_setFlag(e,t);return n}_generate(e,t,r){if(!this.$_terms.whens){return{schema:this}}const s=[];const n=[];for(let i=0;i<this.$_terms.whens.length;++i){const a=this.$_terms.whens[i];if(a.concat){s.push(a.concat);n.push(`${i}.concat`);continue}const o=a.ref?a.ref.resolve(e,t,r):e;const l=a.is?[a]:a.switch;const c=n.length;for(let c=0;c<l.length;++c){const{is:u,then:f,otherwise:d}=l[c];const m=`${i}${a.switch?"."+c:""}`;if(u.$_match(o,t.nest(u,`${m}.is`),r)){if(f){const i=t.localize([...t.path,`${m}.then`],t.ancestors,t.schemas);const{schema:a,id:o}=f._generate(e,i,r);s.push(a);n.push(`${m}.then${o?`(${o})`:""}`);break}}else if(d){const i=t.localize([...t.path,`${m}.otherwise`],t.ancestors,t.schemas);const{schema:a,id:o}=d._generate(e,i,r);s.push(a);n.push(`${m}.otherwise${o?`(${o})`:""}`);break}}if(a.break&&n.length>c){break}}const i=n.join(", ");t.mainstay.tracer.debug(t,"rule","when",i);if(!i){return{schema:this}}if(!t.mainstay.tracer.active&&this.$_temp.whens[i]){return{schema:this.$_temp.whens[i],id:i}}let a=this;if(this._definition.generate){a=this._definition.generate(this,e,t,r)}for(const e of s){a=a.concat(e)}if(this.$_root._tracer){this.$_root._tracer._combine(a,[this,...s])}this.$_temp.whens[i]=a;return{schema:a,id:i}}_inner(e,t,r={}){s(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);const n=this.clone();if(!n.$_terms[e]||r.override){n.$_terms[e]=[]}if(r.single){n.$_terms[e].push(t)}else{n.$_terms[e].push(...t)}n.$_temp.ruleset=false;return n}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==false}_ruleRemove(e,t={}){if(!this._singleRules.has(e)){return this}const r=t.clone!==false?this.clone():this;r._singleRules.delete(e);const s=[];for(let t=0;t<r._rules.length;++t){const n=r._rules[t];if(n.name===e&&!n.keep){if(r._inRuleset()&&t<r.$_temp.ruleset){--r.$_temp.ruleset}continue}s.push(n)}r._rules=s;return r}_values(e,t){l.verifyFlat(e,t.slice(1,-1));const r=this.clone();const n=e[0]===l.symbols.override;if(n){e=e.slice(1)}if(!r[t]&&e.length){r[t]=new b}else if(n){r[t]=e.length?new b:null;r.$_mutateRebuild()}if(!r[t]){return r}if(n){r[t].override()}for(const n of e){s(n!==undefined,"Cannot call allow/valid/invalid with undefined");s(n!==l.symbols.override,"Override must be the first value");const e=t==="_invalids"?"_valids":"_invalids";if(r[e]){r[e].remove(n);if(!r[e].length){s(t==="_valids"||!r._flags.only,"Setting invalid value",n,"leaves schema rejecting all values due to previous valid rule");r[e]=null}}r[t].add(n,r._refs)}return r}};_.Base.prototype[l.symbols.any]={version:l.version,compile:c.compile,root:"$_root"};_.Base.prototype.isImmutable=true;_.Base.prototype.deny=_.Base.prototype.invalid;_.Base.prototype.disallow=_.Base.prototype.invalid;_.Base.prototype.equal=_.Base.prototype.valid;_.Base.prototype.exist=_.Base.prototype.required;_.Base.prototype.not=_.Base.prototype.invalid;_.Base.prototype.options=_.Base.prototype.prefs;_.Base.prototype.preferences=_.Base.prototype.prefs;e.exports=new _.Base},3355:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(2448);const a={max:1e3,supported:new Set(["undefined","boolean","number","string"])};t.provider={provision(e){return new a.Cache(e)}};a.Cache=class{constructor(e={}){i.assertOptions(e,["max"]);s(e.max===undefined||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size");this._max=e.max||a.max;this._map=new Map;this._list=new a.List}get length(){return this._map.size}set(e,t){if(e!==null&&!a.supported.has(typeof e)){return}let r=this._map.get(e);if(r){r.value=t;this._list.first(r);return}r=this._list.unshift({key:e,value:t});this._map.set(e,r);this._compact()}get(e){const t=this._map.get(e);if(t){this._list.first(t);return n(t.value)}}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}};a.List=class{constructor(){this.tail=null;this.head=null}unshift(e){e.next=null;e.prev=this.head;if(this.head){this.head.next=e}this.head=e;if(!this.tail){this.tail=e}return e}first(e){if(e===this.head){return}this._remove(e);this.unshift(e)}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;t.prev=r;if(r){r.next=t}if(e===this.tail){this.tail=t}e.prev=null;e.next=null;return e}}},2448:function(e,t,r){const s=r(2718);const n=r(5563);const i=r(7045);let a;let o;const l={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=i.version;t.defaults={abortEarly:true,allowUnknown:false,artifacts:false,cache:true,context:null,convert:true,dateFormat:"iso",errors:{escapeHtml:false,label:"path",language:null,render:true,stack:false,wrap:{label:'"',array:"[]"}},externals:true,messages:{},nonEnumerables:false,noDefaults:false,presence:"optional",skipFunctions:false,stripUnknown:false,warnings:false};t.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")};t.assertOptions=function(e,t,r="Options"){s(e&&typeof e==="object"&&!Array.isArray(e),"Options must be of type object");const n=Object.keys(e).filter((e=>!t.includes(e)));s(n.length===0,`${r} contain unknown keys: ${n}`)};t.checkPreferences=function(e){o=o||r(5614);const t=o.preferences.validate(e);if(t.error){throw new n([t.error.details[0].message])}};t.compare=function(e,t,r){switch(r){case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}};t["default"]=function(e,t){return e===undefined?t:e};t.isIsoDate=function(e){return l.isoDate.test(e)};t.isNumber=function(e){return typeof e==="number"&&!isNaN(e)};t.isResolvable=function(e){if(!e){return false}return e[t.symbols.ref]||e[t.symbols.template]};t.isSchema=function(e,r={}){const n=e&&e[t.symbols.any];if(!n){return false}s(r.legacy||n.version===t.version,"Cannot mix different versions of joi schemas");return true};t.isValues=function(e){return e[t.symbols.values]};t.limit=function(e){return Number.isSafeInteger(e)&&e>=0};t.preferences=function(e,s){a=a||r(6103);e=e||{};s=s||{};const n=Object.assign({},e,s);if(s.errors&&e.errors){n.errors=Object.assign({},e.errors,s.errors);n.errors.wrap=Object.assign({},e.errors.wrap,s.errors.wrap)}if(s.messages){n.messages=a.compile(s.messages,e.messages)}delete n[t.symbols.prefs];return n};t.tryWithPath=function(e,t,r={}){try{return e()}catch(e){if(e.path!==undefined){e.path=t+"."+e.path}else{e.path=t}if(r.append){e.message=`${e.message} (${e.path})`}throw e}};t.validateArg=function(e,r,{assert:s,message:n}){if(t.isSchema(s)){const t=s.validate(e);if(!t.error){return}return t.error.message}else if(!s(e)){return r?`${r} ${n}`:n}};t.verifyFlat=function(e,t){for(const r of e){s(!Array.isArray(r),"Method no longer accepts array arguments:",t)}}},3038:function(e,t,r){const s=r(2718);const n=r(2448);const i=r(3838);const a={};t.schema=function(e,t,r={}){n.assertOptions(r,["appendPath","override"]);try{return a.schema(e,t,r)}catch(e){if(r.appendPath&&e.path!==undefined){e.message=`${e.message} (${e.path})`}throw e}};a.schema=function(e,t,r){s(t!==undefined,"Invalid undefined schema");if(Array.isArray(t)){s(t.length,"Invalid empty array schema");if(t.length===1){t=t[0]}}const valid=(t,...s)=>{if(r.override!==false){return t.valid(e.override,...s)}return t.valid(...s)};if(a.simple(t)){return valid(e,t)}if(typeof t==="function"){return e.custom(t)}s(typeof t==="object","Invalid schema content:",typeof t);if(n.isResolvable(t)){return valid(e,t)}if(n.isSchema(t)){return t}if(Array.isArray(t)){for(const r of t){if(!a.simple(r)){return e.alternatives().try(...t)}}return valid(e,...t)}if(t instanceof RegExp){return e.string().regex(t)}if(t instanceof Date){return valid(e.date(),t)}s(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");return e.object().keys(t)};t.ref=function(e,t){return i.isRef(e)?e:i.create(e,t)};t.compile=function(e,r,i={}){n.assertOptions(i,["legacy"]);const o=r&&r[n.symbols.any];if(o){s(i.legacy||o.version===n.version,"Cannot mix different versions of joi schemas:",o.version,n.version);return r}if(typeof r!=="object"||!i.legacy){return t.schema(e,r,{appendPath:true})}const l=a.walk(r);if(!l){return t.schema(e,r,{appendPath:true})}return l.compile(l.root,r)};a.walk=function(e){if(typeof e!=="object"){return null}if(Array.isArray(e)){for(const t of e){const e=a.walk(t);if(e){return e}}return null}const t=e[n.symbols.any];if(t){return{root:e[t.root],compile:t.compile}}s(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const t in e){const r=a.walk(e[t]);if(r){return r}}return null};a.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)};t.when=function(e,r,o){if(o===undefined){s(r&&typeof r==="object","Missing options");o=r;r=i.create(".")}if(Array.isArray(o)){o={switch:o}}n.assertOptions(o,["is","not","then","otherwise","switch","break"]);if(n.isSchema(r)){s(o.is===undefined,'"is" can not be used with a schema condition');s(o.not===undefined,'"not" can not be used with a schema condition');s(o.switch===undefined,'"switch" can not be used with a schema condition');return a.condition(e,{is:r,then:o.then,otherwise:o.otherwise,break:o.break})}s(i.isRef(r)||typeof r==="string","Invalid condition:",r);s(o.not===undefined||o.is===undefined,'Cannot combine "is" with "not"');if(o.switch===undefined){let l=o;if(o.not!==undefined){l={is:o.not,then:o.otherwise,otherwise:o.then,break:o.break}}let c=l.is!==undefined?e.$_compile(l.is):e.$_root.invalid(null,false,0,"").required();s(l.then!==undefined||l.otherwise!==undefined,'options must have at least one of "then", "otherwise", or "switch"');s(l.break===undefined||l.then===undefined||l.otherwise===undefined,"Cannot specify then, otherwise, and break all together");if(o.is!==undefined&&!i.isRef(o.is)&&!n.isSchema(o.is)){c=c.required()}return a.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}s(Array.isArray(o.switch),'"switch" must be an array');s(o.is===undefined,'Cannot combine "switch" with "is"');s(o.not===undefined,'Cannot combine "switch" with "not"');s(o.then===undefined,'Cannot combine "switch" with "then"');const l={ref:t.ref(r),switch:[],break:o.break};for(let t=0;t<o.switch.length;++t){const r=o.switch[t];const a=t===o.switch.length-1;n.assertOptions(r,a?["is","then","otherwise"]:["is","then"]);s(r.is!==undefined,'Switch statement missing "is"');s(r.then!==undefined,'Switch statement missing "then"');const c={is:e.$_compile(r.is),then:e.$_compile(r.then)};if(!i.isRef(r.is)&&!n.isSchema(r.is)){c.is=c.is.required()}if(a){s(o.otherwise===undefined||r.otherwise===undefined,'Cannot specify "otherwise" inside and outside a "switch"');const t=o.otherwise!==undefined?o.otherwise:r.otherwise;if(t!==undefined){s(l.break===undefined,"Cannot specify both otherwise and break");c.otherwise=e.$_compile(t)}}l.switch.push(c)}return l};a.condition=function(e,t){for(const r of["then","otherwise"]){if(t[r]===undefined){delete t[r]}else{t[r]=e.$_compile(t[r])}}return t}},9490:function(e,t,r){const s=r(6014);const n=r(2448);const i=r(1396);const a={};t.Report=class{constructor(e,r,s,n,i,a,o){this.code=e;this.flags=n;this.messages=i;this.path=a.path;this.prefs=o;this.state=a;this.value=r;this.message=null;this.template=null;this.local=s||{};this.local.label=t.label(this.flags,this.state,this.prefs,this.messages);if(this.value!==undefined&&!this.local.hasOwnProperty("value")){this.local.value=this.value}if(this.path.length){const e=this.path[this.path.length-1];if(typeof e!=="object"){this.local.key=e}}}_setTemplate(e){this.template=e;if(!this.flags.label&&this.path.length===0){const e=this._template(this.template,"root");if(e){this.local.label=e}}}toString(){if(this.message){return this.message}const e=this.code;if(!this.prefs.errors.render){return this.code}const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);if(t===undefined){return`Error code "${e}" is not defined, your custom type is missing the correct messages definition`}this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]});if(!this.prefs.errors.label){this.message=this.message.replace(/^"" /,"").trim()}return this.message}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}};t.path=function(e){let t="";for(const r of e){if(typeof r==="object"){continue}if(typeof r==="string"){if(t){t+="."}t+=r}else{t+=`[${r}]`}}return t};t.template=function(e,t,r,s,a){if(!t){return}if(i.isTemplate(t)){return r!=="root"?t:null}let o=a.errors.language;if(n.isResolvable(o)){o=o.resolve(e,s,a)}if(o&&t[o]){if(t[o][r]!==undefined){return t[o][r]}if(t[o]["*"]!==undefined){return t[o]["*"]}}if(!t[r]){return t["*"]}return t[r]};t.label=function(e,r,s,n){if(!s.errors.label){return""}if(e.label){return e.label}let i=r.path;if(s.errors.label==="key"&&r.path.length>1){i=r.path.slice(-1)}const a=t.path(i);if(a){return a}return t.template(null,s.messages,"root",r,s)||n&&t.template(null,n,"root",r,s)||"value"};t.process=function(e,r,s){if(!e){return null}const{override:n,message:i,details:a}=t.details(e);if(n){return n}if(s.errors.stack){return new t.ValidationError(i,a,r)}const o=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(i,a,r);Error.stackTraceLimit=o;return l};t.details=function(e,t={}){let r=[];const s=[];for(const n of e){if(n instanceof Error){if(t.override!==false){return{override:n}}const e=n.toString();r.push(e);s.push({message:e,type:"override",context:{error:n}});continue}const e=n.toString();r.push(e);s.push({message:e,path:n.path.filter((e=>typeof e!=="object")),type:n.code,context:n.local})}if(r.length>1){r=[...new Set(r)]}return{message:r.join(". "),details:s}};t.ValidationError=class extends Error{constructor(e,t,r){super(e);this._original=r;this.details=t}static isError(e){return e instanceof t.ValidationError}};t.ValidationError.prototype.isJoi=true;t.ValidationError.prototype.name="ValidationError";t.ValidationError.prototype.annotate=s.error},6680:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(2448);const a=r(6103);const o={};t.type=function(e,t){const r=Object.getPrototypeOf(e);const l=n(r);const c=e._assign(Object.create(l));const u=Object.assign({},t);delete u.base;l._definition=u;const f=r._definition||{};u.messages=a.merge(f.messages,u.messages);u.properties=Object.assign({},f.properties,u.properties);c.type=u.type;u.flags=Object.assign({},f.flags,u.flags);const d=Object.assign({},f.terms);if(u.terms){for(const e in u.terms){const t=u.terms[e];s(c.$_terms[e]===undefined,"Invalid term override for",u.type,e);c.$_terms[e]=t.init;d[e]=t}}u.terms=d;if(!u.args){u.args=f.args}u.prepare=o.prepare(u.prepare,f.prepare);if(u.coerce){if(typeof u.coerce==="function"){u.coerce={method:u.coerce}}if(u.coerce.from&&!Array.isArray(u.coerce.from)){u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)}}}u.coerce=o.coerce(u.coerce,f.coerce);u.validate=o.validate(u.validate,f.validate);const m=Object.assign({},f.rules);if(u.rules){for(const e in u.rules){const t=u.rules[e];s(typeof t==="object","Invalid rule definition for",u.type,e);let r=t.method;if(r===undefined){r=function(){return this.$_addRule(e)}}if(r){s(!l[e],"Rule conflict in",u.type,e);l[e]=r}s(!m[e],"Rule conflict in",u.type,e);m[e]=t;if(t.alias){const e=[].concat(t.alias);for(const r of e){l[r]=t.method}}if(t.args){t.argsByName=new Map;t.args=t.args.map((e=>{if(typeof e==="string"){e={name:e}}s(!t.argsByName.has(e.name),"Duplicated argument name",e.name);if(i.isSchema(e.assert)){e.assert=e.assert.strict().label(e.name)}t.argsByName.set(e.name,e);return e}))}}}u.rules=m;const h=Object.assign({},f.modifiers);if(u.modifiers){for(const e in u.modifiers){s(!l[e],"Rule conflict in",u.type,e);const t=u.modifiers[e];s(typeof t==="function","Invalid modifier definition for",u.type,e);const method=function(t){return this.rule({[e]:t})};l[e]=method;h[e]=t}}u.modifiers=h;if(u.overrides){l._super=r;c.$_super={};for(const e in u.overrides){s(r[e],"Cannot override missing",e);u.overrides[e][i.symbols.parent]=r[e];c.$_super[e]=r[e].bind(c)}Object.assign(l,u.overrides)}u.cast=Object.assign({},f.cast,u.cast);const p=Object.assign({},f.manifest,u.manifest);p.build=o.build(u.manifest&&u.manifest.build,f.manifest&&f.manifest.build);u.manifest=p;u.rebuild=o.rebuild(u.rebuild,f.rebuild);return c};o.build=function(e,t){if(!e||!t){return e||t}return function(r,s){return t(e(r,s),s)}};o.coerce=function(e,t){if(!e||!t){return e||t}return{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,s){let n;if(!t.from||t.from.includes(typeof r)){n=t.method(r,s);if(n){if(n.errors||n.value===undefined){return n}r=n.value}}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,s);if(t){return t}}return n}}};o.prepare=function(e,t){if(!e||!t){return e||t}return function(r,s){const n=e(r,s);if(n){if(n.errors||n.value===undefined){return n}r=n.value}return t(r,s)||n}};o.rebuild=function(e,t){if(!e||!t){return e||t}return function(r){t(r);e(r)}};o.validate=function(e,t){if(!e||!t){return e||t}return function(r,s){const n=t(r,s);if(n){if(n.errors&&(!Array.isArray(n.errors)||n.errors.length)){return n}r=n.value}return e(r,s)||n}}},918:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(3355);const a=r(2448);const o=r(3038);const l=r(9490);const c=r(6680);const u=r(7997);const f=r(3838);const d=r(1396);const m=r(3171);let h;const p={types:{alternatives:r(6867),any:r(9512),array:r(270),boolean:r(7489),date:r(6624),function:r(2269),link:r(9869),number:r(5855),object:r(6878),string:r(2260),symbol:r(971)},aliases:{alt:"alternatives",bool:"boolean",func:"function"}};if(Buffer){p.types.binary=r(4288)}p.root=function(){const e={_types:new Set(Object.keys(p.types))};for(const t of e._types){e[t]=function(...e){s(!e.length||["alternatives","link","object"].includes(t),"The",t,"type does not allow arguments");return p.generate(this,p.types[t],e)}}for(const t of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"]){e[t]=function(...e){return this.any()[t](...e)}}Object.assign(e,p.methods);for(const t in p.aliases){const r=p.aliases[t];e[t]=e[r]}e.x=e.expression;if(m.setup){m.setup(e)}return e};p.methods={ValidationError:l.ValidationError,version:a.version,cache:i.provider,assert(e,t,...r){p.assert(e,t,true,r)},attempt(e,t,...r){return p.assert(e,t,false,r)},build(e){s(typeof u.build==="function","Manifest functionality disabled");return u.build(this,e)},checkPreferences(e){a.checkPreferences(e)},compile(e,t){return o.compile(this,e,t)},defaults(e){s(typeof e==="function","modifier must be a function");const t=Object.assign({},this);for(const r of t._types){const n=e(t[r]());s(a.isSchema(n),"modifier must return a valid schema object");t[r]=function(...e){return p.generate(this,n,e)}}return t},expression(...e){return new d(...e)},extend(...e){a.verifyFlat(e,"extend");h=h||r(5614);s(e.length,"You need to provide at least one extension");this.assert(e,h.extensions);const t=Object.assign({},this);t._types=new Set(t._types);for(let r of e){if(typeof r==="function"){r=r(t)}this.assert(r,h.extension);const e=p.expandExtension(r,t);for(const r of e){s(t[r.type]===undefined||t._types.has(r.type),"Cannot override name",r.type);const e=r.base||this.any();const n=c.type(e,r);t._types.add(r.type);t[r.type]=function(...e){return p.generate(this,n,e)}}}return t},isError:l.ValidationError.isError,isExpression:d.isTemplate,isRef:f.isRef,isSchema:a.isSchema,in(...e){return f.in(...e)},override:a.symbols.override,ref(...e){return f.create(...e)},types(){const e={};for(const t of this._types){e[t]=this[t]()}for(const t in p.aliases){e[t]=this[t]()}return e}};p.assert=function(e,t,r,s){const i=s[0]instanceof Error||typeof s[0]==="string"?s[0]:null;const o=i!==null?s[1]:s[0];const c=t.validate(e,a.preferences({errors:{stack:true}},o||{}));let u=c.error;if(!u){return c.value}if(i instanceof Error){throw i}const f=r&&typeof u.annotate==="function"?u.annotate():u.message;if(u instanceof l.ValidationError===false){u=n(u)}u.message=i?`${i} ${f}`:f;throw u};p.generate=function(e,t,r){s(e,"Must be invoked on a Joi instance.");t.$_root=e;if(!t._definition.args||!r.length){return t}return t._definition.args(t,...r)};p.expandExtension=function(e,t){if(typeof e.type==="string"){return[e]}const r=[];for(const s of t._types){if(e.type.test(s)){const n=Object.assign({},e);n.type=s;n.base=t[s]();r.push(n)}}return r};e.exports=p.root()},7997:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(2448);const a=r(6103);const o=r(3838);const l=r(1396);let c;const u={};t.describe=function(e){const t=e._definition;const r={type:e.type,flags:{},rules:[]};for(const t in e._flags){if(t[0]!=="_"){r.flags[t]=u.describe(e._flags[t])}}if(!Object.keys(r.flags).length){delete r.flags}if(e._preferences){r.preferences=n(e._preferences,{shallow:["messages"]});delete r.preferences[i.symbols.prefs];if(r.preferences.messages){r.preferences.messages=a.decompile(r.preferences.messages)}}if(e._valids){r.allow=e._valids.describe()}if(e._invalids){r.invalid=e._invalids.describe()}for(const s of e._rules){const e=t.rules[s.name];if(e.manifest===false){continue}const n={name:s.name};for(const e in t.modifiers){if(s[e]!==undefined){n[e]=u.describe(s[e])}}if(s.args){n.args={};for(const e in s.args){const t=s.args[e];if(e==="options"&&!Object.keys(t).length){continue}n.args[e]=u.describe(t,{assign:e})}if(!Object.keys(n.args).length){delete n.args}}r.rules.push(n)}if(!r.rules.length){delete r.rules}for(const n in e.$_terms){if(n[0]==="_"){continue}s(!r[n],"Cannot describe schema due to internal name conflict with",n);const a=e.$_terms[n];if(!a){continue}if(a instanceof Map){if(a.size){r[n]=[...a.entries()]}continue}if(i.isValues(a)){r[n]=a.describe();continue}s(t.terms[n],"Term",n,"missing configuration");const o=t.terms[n].manifest;const l=typeof o==="object";if(!a.length&&!l){continue}const c=[];for(const e of a){c.push(u.describe(e))}if(l){const{from:e,to:t}=o.mapped;r[n]={};for(const s of c){r[n][s[t]]=s[e]}continue}if(o==="single"){s(c.length===1,"Term",n,"contains more than one item");r[n]=c[0];continue}r[n]=c}u.validate(e.$_root,r);return r};u.describe=function(e,t={}){if(Array.isArray(e)){return e.map(u.describe)}if(e===i.symbols.deepDefault){return{special:"deep"}}if(typeof e!=="object"||e===null){return e}if(t.assign==="options"){return n(e)}if(Buffer&&Buffer.isBuffer(e)){return{buffer:e.toString("binary")}}if(e instanceof Date){return e.toISOString()}if(e instanceof Error){return e}if(e instanceof RegExp){if(t.assign==="regex"){return e.toString()}return{regex:e.toString()}}if(e[i.symbols.literal]){return{function:e.literal}}if(typeof e.describe==="function"){if(t.assign==="ref"){return e.describe().ref}return e.describe()}const r={};for(const t in e){const s=e[t];if(s===undefined){continue}r[t]=u.describe(s,{assign:t})}return r};t.build=function(e,t){const r=new u.Builder(e);return r.parse(t)};u.Builder=class{constructor(e){this.joi=e}parse(e){u.validate(this.joi,e);let t=this.joi[e.type]()._bare();const r=t._definition;if(e.flags){for(const n in e.flags){const i=r.flags[n]&&r.flags[n].setter||n;s(typeof t[i]==="function","Invalid flag",n,"for type",e.type);t=t[i](this.build(e.flags[n]))}}if(e.preferences){t=t.preferences(this.build(e.preferences))}if(e.allow){t=t.allow(...this.build(e.allow))}if(e.invalid){t=t.invalid(...this.build(e.invalid))}if(e.rules){for(const n of e.rules){s(typeof t[n.name]==="function","Invalid rule",n.name,"for type",e.type);const i=[];if(n.args){const t={};for(const e in n.args){t[e]=this.build(n.args[e],{assign:e})}const a=Object.keys(t);const o=r.rules[n.name].args;if(o){s(a.length<=o.length,"Invalid number of arguments for",e.type,n.name,"(expected up to",o.length,", found",a.length,")");for(const{name:e}of o){i.push(t[e])}}else{s(a.length===1,"Invalid number of arguments for",e.type,n.name,"(expected up to 1, found",a.length,")");i.push(t[a[0]])}}t=t[n.name](...i);const a={};for(const e in r.modifiers){if(n[e]!==undefined){a[e]=this.build(n[e])}}if(Object.keys(a).length){t=t.rule(a)}}}const n={};for(const t in e){if(["allow","flags","invalid","whens","preferences","rules","type"].includes(t)){continue}s(r.terms[t],"Term",t,"missing configuration");const i=r.terms[t].manifest;if(i==="schema"){n[t]=e[t].map((e=>this.parse(e)));continue}if(i==="values"){n[t]=e[t].map((e=>this.build(e)));continue}if(i==="single"){n[t]=this.build(e[t]);continue}if(typeof i==="object"){n[t]={};for(const r in e[t]){const s=e[t][r];n[t][r]=this.parse(s)}continue}n[t]=this.build(e[t])}if(e.whens){n.whens=e.whens.map((e=>this.build(e)))}t=r.manifest.build(t,n);t.$_temp.ruleset=false;return t}build(e,t={}){if(e===null){return null}if(Array.isArray(e)){return e.map((e=>this.build(e)))}if(e instanceof Error){return e}if(t.assign==="options"){return n(e)}if(t.assign==="regex"){return u.regex(e)}if(t.assign==="ref"){return o.build(e)}if(typeof e!=="object"){return e}if(Object.keys(e).length===1){if(e.buffer){s(Buffer,"Buffers are not supported");return Buffer&&Buffer.from(e.buffer,"binary")}if(e.function){return{[i.symbols.literal]:true,literal:e.function}}if(e.override){return i.symbols.override}if(e.ref){return o.build(e.ref)}if(e.regex){return u.regex(e.regex)}if(e.special){s(["deep"].includes(e.special),"Unknown special value",e.special);return i.symbols.deepDefault}if(e.value){return n(e.value)}}if(e.type){return this.parse(e)}if(e.template){return l.build(e)}const r={};for(const t in e){r[t]=this.build(e[t],{assign:t})}return r}};u.regex=function(e){const t=e.lastIndexOf("/");const r=e.slice(1,t);const s=e.slice(t+1);return new RegExp(r,s)};u.validate=function(e,t){c=c||r(5614);e.assert(t,c.description)}},6103:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(1396);const a={};t.compile=function(e,t){if(typeof e==="string"){s(!t,"Cannot set single message string");return new i(e)}if(i.isTemplate(e)){s(!t,"Cannot set single message template");return e}s(typeof e==="object"&&!Array.isArray(e),"Invalid message options");t=t?n(t):{};for(let r in e){const n=e[r];if(r==="root"||i.isTemplate(n)){t[r]=n;continue}if(typeof n==="string"){t[r]=new i(n);continue}s(typeof n==="object"&&!Array.isArray(n),"Invalid message for",r);const a=r;t[a]=t[a]||{};for(r in n){const e=n[r];if(r==="root"||i.isTemplate(e)){t[a][r]=e;continue}s(typeof e==="string","Invalid message for",r,"in",a);t[a][r]=new i(e)}}return t};t.decompile=function(e){const t={};for(let r in e){const s=e[r];if(r==="root"){t.root=s;continue}if(i.isTemplate(s)){t[r]=s.describe({compact:true});continue}const n=r;t[n]={};for(r in s){const e=s[r];if(r==="root"){t[n].root=e;continue}t[n][r]=e.describe({compact:true})}}return t};t.merge=function(e,r){if(!e){return t.compile(r)}if(!r){return e}if(typeof r==="string"){return new i(r)}if(i.isTemplate(r)){return r}const a=n(e);for(let e in r){const t=r[e];if(e==="root"||i.isTemplate(t)){a[e]=t;continue}if(typeof t==="string"){a[e]=new i(t);continue}s(typeof t==="object"&&!Array.isArray(t),"Invalid message for",e);const n=e;a[n]=a[n]||{};for(e in t){const r=t[e];if(e==="root"||i.isTemplate(r)){a[n][e]=r;continue}s(typeof r==="string","Invalid message for",e,"in",n);a[n][e]=new i(r)}}return a}},1290:function(e,t,r){const s=r(2718);const n=r(2448);const i=r(3838);const a={};t.Ids=a.Ids=class{constructor(){this._byId=new Map;this._byKey=new Map;this._schemaChain=false}clone(){const e=new a.Ids;e._byId=new Map(this._byId);e._byKey=new Map(this._byKey);e._schemaChain=this._schemaChain;return e}concat(e){if(e._schemaChain){this._schemaChain=true}for(const[t,r]of e._byId.entries()){s(!this._byKey.has(t),"Schema id conflicts with existing key:",t);this._byId.set(t,r)}for(const[t,r]of e._byKey.entries()){s(!this._byId.has(t),"Schema key conflicts with existing id:",t);this._byKey.set(t,r)}}fork(e,t,r){const i=this._collect(e);i.push({schema:r});const o=i.shift();let l={id:o.id,schema:t(o.schema)};s(n.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const e of i){l={id:e.id,schema:a.fork(e.schema,l.id,l.schema)}}return l.schema}labels(e,t=[]){const r=e[0];const s=this._get(r);if(!s){return[...t,...e].join(".")}const n=e.slice(1);t=[...t,s.schema._flags.label||r];if(!n.length){return t.join(".")}return s.schema._ids.labels(n,t)}reach(e,t=[]){const r=e[0];const n=this._get(r);s(n,"Schema does not contain path",[...t,...e].join("."));const i=e.slice(1);if(!i.length){return n.schema}return n.schema._ids.reach(i,[...t,r])}register(e,{key:t}={}){if(!e||!n.isSchema(e)){return}if(e.$_property("schemaChain")||e._ids._schemaChain){this._schemaChain=true}const r=e._flags.id;if(r){const t=this._byId.get(r);s(!t||t.schema===e,"Cannot add different schemas with the same id:",r);s(!this._byKey.has(r),"Schema id conflicts with existing key:",r);this._byId.set(r,{schema:e,id:r})}if(t){s(!this._byKey.has(t),"Schema already contains key:",t);s(!this._byId.has(t),"Schema key conflicts with existing id:",t);this._byKey.set(t,{schema:e,id:t})}}reset(){this._byId=new Map;this._byKey=new Map;this._schemaChain=false}_collect(e,t=[],r=[]){const n=e[0];const i=this._get(n);s(i,"Schema does not contain path",[...t,...e].join("."));r=[i,...r];const a=e.slice(1);if(!a.length){return r}return i.schema._ids._collect(a,[...t,n],r)}_get(e){return this._byId.get(e)||this._byKey.get(e)}};a.fork=function(e,r,s){const each=(e,{key:t})=>{if(r===(e._flags.id||t)){return s}};const n=t.schema(e,{each:each,ref:false});return n?n.$_mutateRebuild():e};t.schema=function(e,t){let r;for(const s in e._flags){if(s[0]==="_"){continue}const n=a.scan(e._flags[s],{source:"flags",name:s},t);if(n!==undefined){r=r||e.clone();r._flags[s]=n}}for(let s=0;s<e._rules.length;++s){const n=e._rules[s];const i=a.scan(n.args,{source:"rules",name:n.name},t);if(i!==undefined){r=r||e.clone();const t=Object.assign({},n);t.args=i;r._rules[s]=t;const a=r._singleRules.get(n.name);if(a===n){r._singleRules.set(n.name,t)}}}for(const s in e.$_terms){if(s[0]==="_"){continue}const n=a.scan(e.$_terms[s],{source:"terms",name:s},t);if(n!==undefined){r=r||e.clone();r.$_terms[s]=n}}return r};a.scan=function(e,t,r,s,o){const l=s||[];if(e===null||typeof e!=="object"){return}let c;if(Array.isArray(e)){for(let s=0;s<e.length;++s){const n=t.source==="terms"&&t.name==="keys"&&e[s].key;const i=a.scan(e[s],t,r,[s,...l],n);if(i!==undefined){c=c||e.slice();c[s]=i}}return c}if(r.schema!==false&&n.isSchema(e)||r.ref!==false&&i.isRef(e)){const s=r.each(e,{...t,path:l,key:o});if(s===e){return}return s}for(const s in e){if(s[0]==="_"){continue}const n=a.scan(e[s],t,r,[s,...l],o);if(n!==undefined){c=c||Object.assign({},e);c[s]=n}}return c}},3838:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(8891);const a=r(2448);let o;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:false,iterables:null,map:null,separator:".",type:"value"}};t.create=function(e,t={}){s(typeof e==="string","Invalid reference key:",e);a.assertOptions(t,["adjust","ancestor","in","iterables","map","prefix","render","separator"]);s(!t.prefix||typeof t.prefix==="object","options.prefix must be of type object");const r=Object.assign({},l.defaults,t);delete r.prefix;const n=r.separator;const i=l.context(e,n,t.prefix);r.type=i.type;e=i.key;if(r.type==="value"){if(i.root){s(!n||e[0]!==n,"Cannot specify relative path with root prefix");r.ancestor="root";if(!e){e=null}}if(n&&n===e){e=null;r.ancestor=0}else{if(r.ancestor!==undefined){s(!n||!e||e[0]!==n,"Cannot combine prefix with ancestor option")}else{const[t,s]=l.ancestor(e,n);if(s){e=e.slice(s);if(e===""){e=null}}r.ancestor=t}}}r.path=n?e===null?[]:e.split(n):[e];return new l.Ref(r)};t["in"]=function(e,r={}){return t.create(e,{...r,in:true})};t.isRef=function(e){return e?!!e[a.symbols.ref]:false};l.Ref=class{constructor(e){s(typeof e==="object","Invalid reference construction");a.assertOptions(e,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]);s([false,undefined].includes(e.separator)||typeof e.separator==="string"&&e.separator.length===1,"Invalid separator");s(!e.adjust||typeof e.adjust==="function","options.adjust must be a function");s(!e.map||Array.isArray(e.map),"options.map must be an array");s(!e.map||!e.adjust,"Cannot set both map and adjust options");Object.assign(this,l.defaults,e);s(this.type==="value"||this.ancestor===undefined,"Non-value references cannot reference ancestors");if(Array.isArray(this.map)){this.map=new Map(this.map)}this.depth=this.path.length;this.key=this.path.length?this.path.join(this.separator):null;this.root=this.path[0];this.updateDisplay()}resolve(e,t,r,n,i={}){s(!this.in||i.in,"Invalid in() reference usage");if(this.type==="global"){return this._resolve(r.context,t,i)}if(this.type==="local"){return this._resolve(n,t,i)}if(!this.ancestor){return this._resolve(e,t,i)}if(this.ancestor==="root"){return this._resolve(t.ancestors[t.ancestors.length-1],t,i)}s(this.ancestor<=t.ancestors.length,"Invalid reference exceeds the schema root:",this.display);return this._resolve(t.ancestors[this.ancestor-1],t,i)}_resolve(e,t,r){let s;if(this.type==="value"&&t.mainstay.shadow&&r.shadow!==false){s=t.mainstay.shadow.get(this.absolute(t))}if(s===undefined){s=i(e,this.path,{iterables:this.iterables,functions:true})}if(this.adjust){s=this.adjust(s)}if(this.map){const e=this.map.get(s);if(e!==undefined){s=e}}if(t.mainstay){t.mainstay.tracer.resolve(t,this,s)}return s}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const e={path:this.path};if(this.type!=="value"){e.type=this.type}if(this.separator!=="."){e.separator=this.separator}if(this.type==="value"&&this.ancestor!==1){e.ancestor=this.ancestor}if(this.map){e.map=[...this.map]}for(const t of["adjust","iterables","render"]){if(this[t]!==null&&this[t]!==undefined){e[t]=this[t]}}if(this.in!==false){e.in=true}return{ref:e}}updateDisplay(){const e=this.key!==null?this.key:"";if(this.type!=="value"){this.display=`ref:${this.type}:${e}`;return}if(!this.separator){this.display=`ref:${e}`;return}if(!this.ancestor){this.display=`ref:${this.separator}${e}`;return}if(this.ancestor==="root"){this.display=`ref:root:${e}`;return}if(this.ancestor===1){this.display=`ref:${e||".."}`;return}const t=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${t}${e||""}`}};l.Ref.prototype[a.symbols.ref]=true;t.build=function(e){e=Object.assign({},l.defaults,e);if(e.type==="value"&&e.ancestor===undefined){e.ancestor=1}return new l.Ref(e)};l.context=function(e,t,r={}){e=e.trim();if(r){const s=r.global===undefined?"$":r.global;if(s!==t&&e.startsWith(s)){return{key:e.slice(s.length),type:"global"}}const n=r.local===undefined?"#":r.local;if(n!==t&&e.startsWith(n)){return{key:e.slice(n.length),type:"local"}}const i=r.root===undefined?"/":r.root;if(i!==t&&e.startsWith(i)){return{key:e.slice(i.length),type:"value",root:true}}}return{key:e,type:"value"}};l.ancestor=function(e,t){if(!t){return[1,0]}if(e[0]!==t){return[1,0]}if(e[1]!==t){return[0,1]}let r=2;while(e[r]===t){++r}return[r-1,r]};t.toSibling=0;t.toParent=1;t.Manager=class{constructor(){this.refs=[]}register(e,s){if(!e){return}s=s===undefined?t.toParent:s;if(Array.isArray(e)){for(const t of e){this.register(t,s)}return}if(a.isSchema(e)){for(const t of e._refs.refs){if(t.ancestor-s>=0){this.refs.push({ancestor:t.ancestor-s,root:t.root})}}return}if(t.isRef(e)&&e.type==="value"&&e.ancestor-s>=0){this.refs.push({ancestor:e.ancestor-s,root:e.root})}o=o||r(1396);if(o.isTemplate(e)){this.register(e.refs(),s)}}get length(){return this.refs.length}clone(){const e=new t.Manager;e.refs=n(this.refs);return e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},5614:function(e,t,r){const s=r(918);const n={};n.wrap=s.string().min(1).max(2).allow(false);t.preferences=s.object({allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),context:s.object(),convert:s.boolean(),dateFormat:s.valid("date","iso","string","time","utc"),debug:s.boolean(),errors:{escapeHtml:s.boolean(),label:s.valid("path","key",false),language:[s.string(),s.object().ref()],render:s.boolean(),stack:s.boolean(),wrap:{label:n.wrap,array:n.wrap,string:n.wrap}},externals:s.boolean(),messages:s.object(),noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:s.valid("required","optional","forbidden"),skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(true,false),warnings:s.boolean()}).strict();n.nameRx=/^[a-zA-Z0-9]\w*$/;n.rule=s.object({alias:s.array().items(s.string().pattern(n.nameRx)).single(),args:s.array().items(s.string(),s.object({name:s.string().pattern(n.nameRx).required(),ref:s.boolean(),assert:s.alternatives([s.function(),s.object().schema()]).conditional("ref",{is:true,then:s.required()}),normalize:s.function(),message:s.string().when("assert",{is:s.function(),then:s.required()})})),convert:s.boolean(),manifest:s.boolean(),method:s.function().allow(false),multi:s.boolean(),validate:s.function()});t.extension=s.object({type:s.alternatives([s.string(),s.object().regex()]).required(),args:s.function(),cast:s.object().pattern(n.nameRx,s.object({from:s.function().maxArity(1).required(),to:s.function().minArity(1).maxArity(2).required()})),base:s.object().schema().when("type",{is:s.object().regex(),then:s.forbidden()}),coerce:[s.function().maxArity(3),s.object({method:s.function().maxArity(3).required(),from:s.array().items(s.string()).single()})],flags:s.object().pattern(n.nameRx,s.object({setter:s.string(),default:s.any()})),manifest:{build:s.function().arity(2)},messages:[s.object(),s.string()],modifiers:s.object().pattern(n.nameRx,s.function().minArity(1).maxArity(2)),overrides:s.object().pattern(n.nameRx,s.function()),prepare:s.function().maxArity(3),rebuild:s.function().arity(1),rules:s.object().pattern(n.nameRx,n.rule),terms:s.object().pattern(n.nameRx,s.object({init:s.array().allow(null).required(),manifest:s.object().pattern(/.+/,[s.valid("schema","single"),s.object({mapped:s.object({from:s.string().required(),to:s.string().required()}).required()})])})),validate:s.function().maxArity(3)}).strict();t.extensions=s.array().items(s.object(),s.function().arity(1)).strict();n.desc={buffer:s.object({buffer:s.string()}),func:s.object({function:s.function().required(),options:{literal:true}}),override:s.object({override:true}),ref:s.object({ref:s.object({type:s.valid("value","global","local"),path:s.array().required(),separator:s.string().length(1).allow(false),ancestor:s.number().min(0).integer().allow("root"),map:s.array().items(s.array().length(2)).min(1),adjust:s.function(),iterables:s.boolean(),in:s.boolean(),render:s.boolean()}).required()}),regex:s.object({regex:s.string().min(3)}),special:s.object({special:s.valid("deep").required()}),template:s.object({template:s.string().required(),options:s.object()}),value:s.object({value:s.alternatives([s.object(),s.array()]).required()})};n.desc.entity=s.alternatives([s.array().items(s.link("...")),s.boolean(),s.function(),s.number(),s.string(),n.desc.buffer,n.desc.func,n.desc.ref,n.desc.regex,n.desc.special,n.desc.template,n.desc.value,s.link("/")]);n.desc.values=s.array().items(null,s.boolean(),s.function(),s.number().allow(Infinity,-Infinity),s.string().allow(""),s.symbol(),n.desc.buffer,n.desc.func,n.desc.override,n.desc.ref,n.desc.regex,n.desc.template,n.desc.value);n.desc.messages=s.object().pattern(/.+/,[s.string(),n.desc.template,s.object().pattern(/.+/,[s.string(),n.desc.template])]);t.description=s.object({type:s.string().required(),flags:s.object({cast:s.string(),default:s.any(),description:s.string(),empty:s.link("/"),failover:n.desc.entity,id:s.string(),label:s.string(),only:true,presence:["optional","required","forbidden"],result:["raw","strip"],strip:s.boolean(),unit:s.string()}).unknown(),preferences:{allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),convert:s.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:s.boolean(),label:["path","key"],language:[s.string(),n.desc.ref],wrap:{label:n.wrap,array:n.wrap}},externals:s.boolean(),messages:n.desc.messages,noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:["required","optional","forbidden"],skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(true,false),warnings:s.boolean()},allow:n.desc.values,invalid:n.desc.values,rules:s.array().min(1).items({name:s.string().required(),args:s.object().min(1),keep:s.boolean(),message:[s.string(),n.desc.messages],warn:s.boolean()}),keys:s.object().pattern(/.*/,s.link("/")),link:n.desc.ref}).pattern(/^[a-z]\w*$/,s.any())},3634:function(e,t,r){const s=r(5578);const n=r(8891);const i=r(2448);const a={value:Symbol("value")};e.exports=a.State=class{constructor(e,t,r){this.path=e;this.ancestors=t;this.mainstay=r.mainstay;this.schemas=r.schemas;this.debug=null}localize(e,t=null,r=null){const s=new a.State(e,t,this);if(r&&s.schemas){s.schemas=[a.schemas(r),...s.schemas]}return s}nest(e,t){const r=new a.State(this.path,this.ancestors,this);r.schemas=r.schemas&&[a.schemas(e),...r.schemas];r.debug=t;return r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new a.Shadow;this.mainstay.shadow.set(this.path,e,t)}snapshot(){if(this.mainstay.shadow){this._snapshot=s(this.mainstay.shadow.node(this.path))}this.mainstay.snapshot()}restore(){if(this.mainstay.shadow){this.mainstay.shadow.override(this.path,this._snapshot);this._snapshot=undefined}this.mainstay.restore()}commit(){if(this.mainstay.shadow){this.mainstay.shadow.override(this.path,this._snapshot);this._snapshot=undefined}this.mainstay.commit()}};a.schemas=function(e){if(i.isSchema(e)){return{schema:e}}return e};a.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length){return}if(r==="strip"&&typeof e[e.length-1]==="number"){return}this._values=this._values||new Map;let s=this._values;for(let t=0;t<e.length;++t){const r=e[t];let n=s.get(r);if(!n){n=new Map;s.set(r,n)}s=n}s[a.value]=t}get(e){const t=this.node(e);if(t){return t[a.value]}}node(e){if(!this._values){return}return n(this._values,e,{iterables:true})}override(e,t){if(!this._values){return}const r=e.slice(0,-1);const s=e[e.length-1];const i=n(this._values,r,{iterables:true});if(t){i.set(s,t);return}if(i){i.delete(s)}}}},1396:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(4752);const a=r(4379);const o=r(2448);const l=r(9490);const c=r(3838);const u={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=t=u.Template=class{constructor(e,t){s(typeof e==="string","Template source must be a string");s(!e.includes("\0")&&!e.includes(""),"Template source cannot contain reserved control characters");this.source=e;this.rendered=e;this._template=null;if(t){const{functions:e,...r}=t;this._settings=Object.keys(r).length?n(r):undefined;this._functions=e;if(this._functions){s(Object.keys(this._functions).every((e=>typeof e==="string")),"Functions keys must be strings");s(Object.values(this._functions).every((e=>typeof e==="function")),"Functions values must be functions")}}else{this._settings=undefined;this._functions=undefined}this._parse()}_parse(){if(!this.source.includes("{")){return}const e=u.encode(this.source);const t=u.split(e);let r=false;const s=[];const n=t.shift();if(n){s.push(n)}for(const e of t){const t=e[0]!=="{";const n=t?"}":"}}";const i=e.indexOf(n);if(i===-1||e[1]==="{"){s.push(`{${u.decode(e)}`);continue}let a=e.slice(t?0:1,i);const o=a[0]===":";if(o){a=a.slice(1)}const l=this._ref(u.decode(a),{raw:t,wrapped:o});s.push(l);if(typeof l!=="string"){r=true}const c=e.slice(i+n.length);if(c){s.push(u.decode(c))}}if(!r){this.rendered=s.join("");return}this._template=s}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact){return this.source}const t={template:this.source};if(this._settings){t.options=this._settings}if(this._functions){t.functions=this._functions}return t}static build(e){return new u.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:undefined)}isDynamic(){return!!this._template}static isTemplate(e){return e?!!e[o.symbols.template]:false}refs(){if(!this._template){return}const e=[];for(const t of this._template){if(typeof t!=="string"){e.push(...t.refs)}}return e}resolve(e,t,r,s){if(this._template&&this._template.length===1){return this._part(this._template[0],e,t,r,s,{})}return this.render(e,t,r,s)}_part(e,...t){if(e.ref){return e.ref.resolve(...t)}return e.formula.evaluate(t)}render(e,t,r,s,n={}){if(!this.isDynamic()){return this.rendered}const a=[];for(const o of this._template){if(typeof o==="string"){a.push(o)}else{const l=this._part(o,e,t,r,s,n);const c=u.stringify(l,e,t,r,s,n);if(c!==undefined){const e=o.raw||(n.errors&&n.errors.escapeHtml)===false?c:i(c);a.push(u.wrap(e,o.wrapped&&r.errors.wrap.label))}}}return a.join("")}_ref(e,{raw:t,wrapped:r}){const s=[];const reference=e=>{const t=c.create(e,this._settings);s.push(t);return e=>{const r=t.resolve(...e);return r!==undefined?r:null}};try{const t=this._functions?{...u.functions,...this._functions}:u.functions;var n=new a.Parser(e,{reference:reference,functions:t,constants:u.constants})}catch(t){t.message=`Invalid template variable "${e}" fails due to: ${t.message}`;throw t}if(n.single){if(n.single.type==="reference"){const e=s[0];return{ref:e,raw:t,refs:s,wrapped:r||e.type==="local"&&e.key==="label"}}return u.stringify(n.single.value)}return{formula:n,raw:t,refs:s}}toString(){return this.source}};u.Template.prototype[o.symbols.template]=true;u.Template.prototype.isImmutable=true;u.encode=function(e){return e.replace(/\\(\{+)/g,((e,t)=>u.opens.slice(0,t.length))).replace(/\\(\}+)/g,((e,t)=>u.closes.slice(0,t.length)))};u.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")};u.split=function(e){const t=[];let r="";for(let s=0;s<e.length;++s){const n=e[s];if(n==="{"){let n="";while(s+1<e.length&&e[s+1]==="{"){n+="{";++s}t.push(r);r=n}else{r+=n}}t.push(r);return t};u.wrap=function(e,t){if(!t){return e}if(t.length===1){return`${t}${e}${t}`}return`${t[0]}${e}${t[1]}`};u.stringify=function(e,t,r,s,n,i={}){const a=typeof e;const o=s&&s.errors&&s.errors.wrap||{};let l=false;if(c.isRef(e)&&e.render){l=e.in;e=e.resolve(t,r,s,n,{in:e.in,...i})}if(e===null){return"null"}if(a==="string"){return u.wrap(e,i.arrayItems&&o.string)}if(a==="number"||a==="function"||a==="symbol"){return e.toString()}if(a!=="object"){return JSON.stringify(e)}if(e instanceof Date){return u.Template.date(e,s)}if(e instanceof Map){const t=[];for(const[r,s]of e.entries()){t.push(`${r.toString()} -> ${s.toString()}`)}e=t}if(!Array.isArray(e)){return e.toString()}const f=[];for(const a of e){f.push(u.stringify(a,t,r,s,n,{arrayItems:true,...i}))}return u.wrap(f.join(", "),!l&&o.array)};u.constants={true:true,false:false,null:null,second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3};u.functions={if(e,t,r){return e?t:r},length(e){if(typeof e==="string"){return e.length}if(!e||typeof e!=="object"){return null}if(Array.isArray(e)){return e.length}return Object.keys(e).length},msg(e){const[t,r,s,n,i]=this;const a=i.messages;if(!a){return""}const o=l.template(t,a[0],e,r,s)||l.template(t,a[1],e,r,s);if(!o){return""}return o.render(t,r,s,n,i)},number(e){if(typeof e==="number"){return e}if(typeof e==="string"){return parseFloat(e)}if(typeof e==="boolean"){return e?1:0}if(e instanceof Date){return e.getTime()}return null}}},3171:function(e,t,r){const s=r(5801);const n=r(5604);const i=r(9490);const a={codes:{error:1,pass:2,full:3},labels:{0:"never used",1:"always error",2:"always pass"}};t.setup=function(e){const trace=function(){e._tracer=e._tracer||new a.Tracer;return e._tracer};e.trace=trace;e[Symbol.for("@hapi/lab/coverage/initialize")]=trace;e.untrace=()=>{e._tracer=null}};t.location=function(e){return e.$_setFlag("_tracerLocation",n.location(2))};a.Tracer=class{constructor(){this.name="Joi";this._schemas=new Map}_register(e){const t=this._schemas.get(e);if(t){return t.store}const r=new a.Store(e);const{filename:s,line:i}=e._flags._tracerLocation||n.location(5);this._schemas.set(e,{filename:s,line:i,store:r});return r}_combine(e,t){for(const{store:r}of this._schemas.values()){r._combine(e,t)}}report(e){const t=[];for(const{filename:r,line:s,store:n}of this._schemas.values()){if(e&&e!==r){continue}const i=[];const o=[];for(const[e,t]of n._sources.entries()){if(a.sub(t.paths,o)){continue}if(!t.entry){i.push({status:"never reached",paths:[...t.paths]});o.push(...t.paths);continue}for(const r of["valid","invalid"]){const s=e[`_${r}s`];if(!s){continue}const n=new Set(s._values);const a=new Set(s._refs);for(const{value:e,ref:s}of t[r]){n.delete(e);a.delete(s)}if(n.size||a.size){i.push({status:[...n,...[...a].map((e=>e.display))],rule:`${r}s`})}}const r=e._rules.map((e=>e.name));for(const t of["default","failover"]){if(e._flags[t]!==undefined){r.push(t)}}for(const e of r){const r=a.labels[t.rule[e]||0];if(r){const s={rule:e,status:r};if(t.paths.size){s.paths=[...t.paths]}i.push(s)}}}if(i.length){t.push({filename:r,line:s,missing:i,severity:"error",message:`Schema missing tests for ${i.map(a.message).join(", ")}`})}}return t.length?t:null}};a.Store=class{constructor(e){this.active=true;this._sources=new Map;this._combos=new Map;this._scan(e)}debug(e,t,r,s){e.mainstay.debug&&e.mainstay.debug.push({type:t,name:r,result:s,path:e.path})}entry(e,t){a.debug(t,{type:"entry"});this._record(e,(e=>{e.entry=true}))}filter(e,t,r,s){a.debug(t,{type:r,...s});this._record(e,(e=>{e[r].add(s)}))}log(e,t,r,s,n){a.debug(t,{type:r,name:s,result:n==="full"?"pass":n});this._record(e,(e=>{e[r][s]=e[r][s]||0;e[r][s]|=a.codes[n]}))}resolve(e,t,r){if(!e.mainstay.debug){return}const s={type:"resolve",ref:t.display,to:r,path:e.path};e.mainstay.debug.push(s)}value(e,t,r,n,i){if(!e.mainstay.debug||s(r,n)){return}const a={type:"value",by:t,from:r,to:n,path:e.path};if(i){a.name=i}e.mainstay.debug.push(a)}_record(e,t){const r=this._sources.get(e);if(r){t(r);return}const s=this._combos.get(e);for(const e of s){this._record(e,t)}}_scan(e,t){const r=t||[];let s=this._sources.get(e);if(!s){s={paths:new Set,entry:false,rule:{},valid:new Set,invalid:new Set};this._sources.set(e,s)}if(r.length){s.paths.add(r)}const each=(e,t)=>{const s=a.id(e,t);this._scan(e,r.concat(s))};e.$_modify({each:each,ref:false})}_combine(e,t){this._combos.set(e,t)}};a.message=function(e){const t=e.paths?i.path(e.paths[0])+(e.rule?":":""):"";return`${t}${e.rule||""} (${e.status})`};a.id=function(e,{source:t,name:r,path:s,key:n}){if(e._flags.id){return e._flags.id}if(n){return n}r=`@${r}`;if(t==="terms"){return[r,s[Math.min(s.length-1,1)]]}return r};a.sub=function(e,t){for(const r of e){for(const e of t){if(s(r.slice(0,e.length),e)){return true}}}return false};a.debug=function(e,t){if(e.mainstay.debug){t.path=e.debug?[...e.path,e.debug]:e.path;e.mainstay.debug.push(t)}}},6867:function(e,t,r){const s=r(2718);const n=r(445);const i=r(9512);const a=r(2448);const o=r(3038);const l=r(9490);const c=r(3838);const u={};e.exports=i.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:c.toSibling}},args(e,...t){if(t.length===1){if(Array.isArray(t[0])){return e.try(...t[0])}}return e.try(...t)},validate(e,t){const{schema:r,error:s,state:i,prefs:a}=t;if(r._flags.match){const t=[];const o=[];for(let s=0;s<r.$_terms.matches.length;++s){const n=r.$_terms.matches[s];const l=i.nest(n.schema,`match.${s}`);l.snapshot();const c=n.schema.$_validate(e,l,a);if(!c.errors){t.push(c.value);l.commit()}else{o.push(c.errors);l.restore()}}if(t.length===0){const e={details:o.map((e=>l.details(e,{override:false})))};return{errors:s("alternatives.any",e)}}if(r._flags.match==="one"){return t.length===1?{value:t[0]}:{errors:s("alternatives.one")}}if(t.length!==r.$_terms.matches.length){const e={details:o.map((e=>l.details(e,{override:false})))};return{errors:s("alternatives.all",e)}}const isAnyObj=e=>e.$_terms.matches.some((e=>e.schema.type==="object"||e.schema.type==="alternatives"&&isAnyObj(e.schema)));return isAnyObj(r)?{value:t.reduce(((e,t)=>n(e,t,{mergeArrays:false})))}:{value:t[t.length-1]}}const o=[];for(let t=0;t<r.$_terms.matches.length;++t){const s=r.$_terms.matches[t];if(s.schema){const r=i.nest(s.schema,`match.${t}`);r.snapshot();const n=s.schema.$_validate(e,r,a);if(!n.errors){r.commit();return n}r.restore();o.push({schema:s.schema,reports:n.errors});continue}const n=s.ref?s.ref.resolve(e,i,a):e;const l=s.is?[s]:s.switch;for(let r=0;r<l.length;++r){const o=l[r];const{is:c,then:u,otherwise:f}=o;const d=`match.${t}${s.switch?"."+r:""}`;if(!c.$_match(n,i.nest(c,`${d}.is`),a)){if(f){return f.$_validate(e,i.nest(f,`${d}.otherwise`),a)}}else if(u){return u.$_validate(e,i.nest(u,`${d}.then`),a)}}}return u.errors(o,t)},rules:{conditional:{method(e,t){s(!this._flags._endedSwitch,"Unreachable condition");s(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule");s(t.break===undefined,"Cannot use break option with alternatives conditional");const r=this.clone();const n=o.when(r,e,t);const i=n.is?[n]:n.switch;for(const e of i){if(e.then&&e.otherwise){r.$_setFlag("_endedSwitch",true,{clone:false});break}}r.$_terms.matches.push(n);return r.$_mutateRebuild()}},match:{method(e){s(["any","one","all"].includes(e),"Invalid alternatives match mode",e);if(e!=="any"){for(const t of this.$_terms.matches){s(t.schema,"Cannot combine match mode",e,"with conditional rules")}}return this.$_setFlag("match",e)}},try:{method(...e){s(e.length,"Missing alternative schemas");a.verifyFlat(e,"try");s(!this._flags._endedSwitch,"Unreachable condition");const t=this.clone();for(const r of e){t.$_terms.matches.push({schema:t.$_compile(r)})}return t.$_mutateRebuild()}}},overrides:{label(e){const t=this.$_parent("label",e);const each=(t,r)=>r.path[0]!=="is"&&typeof t._flags.label!=="string"?t.label(e):undefined;return t.$_modify({each:each,ref:false})}},rebuild(e){const each=t=>{if(a.isSchema(t)&&t.type==="array"){e.$_setFlag("_arrayItems",true,{clone:false})}};e.$_modify({each:each})},manifest:{build(e,t){if(t.matches){for(const r of t.matches){const{schema:t,ref:s,is:n,not:i,then:a,otherwise:o}=r;if(t){e=e.try(t)}else if(s){e=e.conditional(s,{is:n,then:a,not:i,otherwise:o,switch:r.switch})}else{e=e.conditional(n,{then:a,otherwise:o})}}}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}});u.errors=function(e,{error:t,state:r}){if(!e.length){return{errors:t("alternatives.any")}}if(e.length===1){return{errors:e[0].reports}}const s=new Set;const n=[];for(const{reports:i,schema:a}of e){if(i.length>1){return u.unmatched(e,t)}const o=i[0];if(o instanceof l.Report===false){return u.unmatched(e,t)}if(o.state.path.length!==r.path.length){n.push({type:a.type,report:o});continue}if(o.code==="any.only"){for(const e of o.local.valids){s.add(e)}continue}const[c,f]=o.code.split(".");if(f!=="base"){n.push({type:a.type,report:o})}else if(o.code==="object.base"){s.add(o.local.type)}else{s.add(c)}}if(!n.length){return{errors:t("alternatives.types",{types:[...s]})}}if(n.length===1){return{errors:n[0].report}}return u.unmatched(e,t)};u.unmatched=function(e,t){const r=[];for(const t of e){r.push(...t.reports)}return{errors:t("alternatives.match",l.details(r,{override:false}))}}},9512:function(e,t,r){const s=r(2718);const n=r(5184);const i=r(2448);const a=r(6103);const o={};e.exports=n.extend({type:"any",flags:{only:{default:false}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){s(typeof e==="function","Method must be a function");s(t===undefined||t&&typeof t==="string","Description must be a non-empty string");return this.$_addRule({name:"custom",args:{method:e,description:t}})},validate(e,t,{method:r}){try{return r(e,t)}catch(e){return t.error("any.custom",{error:e})}},args:["method","description"],multi:true},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){s(i.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const t=this.clone();t.$_terms.shared=t.$_terms.shared||[];t.$_terms.shared.push(e);t.$_mutateRegister(e);return t}},warning:{method(e,t){s(e&&typeof e==="string","Invalid warning code");return this.$_addRule({name:"warning",args:{code:e,local:t},warn:true})},validate(e,t,{code:r,local:s}){return t.error(r,s)},args:["code","local"],multi:true}},modifiers:{keep(e,t=true){e.keep=t},message(e,t){e.message=a.compile(t)},warn(e,t=true){e.warn=t}},manifest:{build(e,t){for(const r in t){const s=t[r];if(["examples","externals","metas","notes","tags"].includes(r)){for(const t of s){e=e[r.slice(0,-1)](t)}continue}if(r==="alterations"){const t={};for(const{target:e,adjuster:r}of s){t[e]=r}e=e.alter(t);continue}if(r==="whens"){for(const t of s){const{ref:r,is:s,not:n,then:i,otherwise:a,concat:o}=t;if(o){e=e.concat(o)}else if(r){e=e.when(r,{is:s,not:n,then:i,otherwise:a,switch:t.switch,break:t.break})}else{e=e.when(s,{then:i,otherwise:a,break:t.break})}}continue}if(r==="shared"){for(const t of s){e=e.shared(t)}}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},270:function(e,t,r){const s=r(2718);const n=r(5801);const i=r(8891);const a=r(9512);const o=r(2448);const l=r(3038);const c={};e.exports=a.extend({type:"array",flags:{single:{default:false},sparse:{default:false}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(e,{schema:t,state:r,prefs:s}){if(!Array.isArray(e)){return}const n=t.$_getRule("sort");if(!n){return}return c.sort(t,e,n.args.options,r,s)}},validate(e,{schema:t,error:r}){if(!Array.isArray(e)){if(t._flags.single){const t=[e];t[o.symbols.arraySingle]=true;return{value:t}}return{errors:r("array.base")}}if(!t.$_getRule("items")&&!t.$_terms.externals){return}return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:true});const t=this.$_addRule({name:"has",args:{schema:e}});t.$_mutateRegister(e);return t},validate(e,{state:t,prefs:r,error:s},{schema:n}){const i=[e,...t.ancestors];for(let s=0;s<e.length;++s){const a=t.localize([...t.path,s],i,n);if(n.$_match(e[s],a,r)){return e}}const a=n._flags.label;if(a){return s("array.hasKnown",{patternLabel:a})}return s("array.hasUnknown",null)},multi:true},items:{method(...e){o.verifyFlat(e,"items");const t=this.$_addRule("items");for(let r=0;r<e.length;++r){const s=o.tryWithPath((()=>this.$_compile(e[r])),r,{append:true});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(e,{schema:t,error:r,state:s,prefs:n,errorsArray:i}){const a=t.$_terms._requireds.slice();const l=t.$_terms.ordered.slice();const u=[...t.$_terms._inclusions,...a];const f=!e[o.symbols.arraySingle];delete e[o.symbols.arraySingle];const d=i();let m=e.length;for(let i=0;i<m;++i){const o=e[i];let h=false;let p=false;const g=f?i:new Number(i);const y=[...s.path,g];if(!t._flags.sparse&&o===undefined){d.push(r("array.sparse",{key:g,path:y,pos:i,value:undefined},s.localize(y)));if(n.abortEarly){return d}l.shift();continue}const b=[e,...s.ancestors];for(const e of t.$_terms._exclusions){if(!e.$_match(o,s.localize(y,b,e),n,{presence:"ignore"})){continue}d.push(r("array.excludes",{pos:i,value:o},s.localize(y)));if(n.abortEarly){return d}h=true;l.shift();break}if(h){continue}if(t.$_terms.ordered.length){if(l.length){const a=l.shift();const u=a.$_validate(o,s.localize(y,b,a),n);if(!u.errors){if(a._flags.result==="strip"){c.fastSplice(e,i);--i;--m}else if(!t._flags.sparse&&u.value===undefined){d.push(r("array.sparse",{key:g,path:y,pos:i,value:undefined},s.localize(y)));if(n.abortEarly){return d}continue}else{e[i]=u.value}}else{d.push(...u.errors);if(n.abortEarly){return d}}continue}else if(!t.$_terms.items.length){d.push(r("array.orderedLength",{pos:i,limit:t.$_terms.ordered.length}));if(n.abortEarly){return d}break}}const _=[];let v=a.length;for(let l=0;l<v;++l){const u=s.localize(y,b,a[l]);u.snapshot();const f=a[l].$_validate(o,u,n);_[l]=f;if(!f.errors){u.commit();e[i]=f.value;p=true;c.fastSplice(a,l);--l;--v;if(!t._flags.sparse&&f.value===undefined){d.push(r("array.sparse",{key:g,path:y,pos:i,value:undefined},s.localize(y)));if(n.abortEarly){return d}}break}u.restore()}if(p){continue}const A=n.stripUnknown&&!!n.stripUnknown.arrays||false;v=u.length;for(const l of u){let u;const f=a.indexOf(l);if(f!==-1){u=_[f]}else{const a=s.localize(y,b,l);a.snapshot();u=l.$_validate(o,a,n);if(!u.errors){a.commit();if(l._flags.result==="strip"){c.fastSplice(e,i);--i;--m}else if(!t._flags.sparse&&u.value===undefined){d.push(r("array.sparse",{key:g,path:y,pos:i,value:undefined},s.localize(y)));h=true}else{e[i]=u.value}p=true;break}a.restore()}if(v===1){if(A){c.fastSplice(e,i);--i;--m;p=true;break}d.push(...u.errors);if(n.abortEarly){return d}h=true;break}}if(h){continue}if((t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!p){if(A){c.fastSplice(e,i);--i;--m;continue}d.push(r("array.includes",{pos:i,value:o},s.localize(y)));if(n.abortEarly){return d}}}if(a.length){c.fillMissedErrors(t,d,a,e,s,n)}if(l.length){c.fillOrderedErrors(t,d,l,e,s,n);if(!d.length){c.fillDefault(l,e,s,n)}}return d.length?d:e},priority:true,manifest:false},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate(e,t,{limit:r},{name:s,operator:n,args:i}){if(o.compare(e.length,r,n)){return e}return t.error("array."+s,{limit:i.limit,value:e})},args:[{name:"limit",ref:true,assert:o.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},ordered:{method(...e){o.verifyFlat(e,"ordered");const t=this.$_addRule("items");for(let r=0;r<e.length;++r){const s=o.tryWithPath((()=>this.$_compile(e[r])),r,{append:true});c.validateSingle(s,t);t.$_mutateRegister(s);t.$_terms.ordered.push(s)}return t.$_mutateRebuild()}},single:{method(e){const t=e===undefined?true:!!e;s(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items");return this.$_setFlag("single",t)}},sort:{method(e={}){o.assertOptions(e,["by","order"]);const t={order:e.order||"ascending"};if(e.by){t.by=l.ref(e.by,{ancestor:0});s(!t.by.ancestor,"Cannot sort by ancestor")}return this.$_addRule({name:"sort",args:{options:t}})},validate(e,{error:t,state:r,prefs:s,schema:n},{options:i}){const{value:a,errors:o}=c.sort(n,e,i,r,s);if(o){return o}for(let r=0;r<e.length;++r){if(e[r]!==a[r]){return t("array.sort",{order:i.order,by:i.by?i.by.key:"value"})}}return e},convert:true},sparse:{method(e){const t=e===undefined?true:!!e;if(this._flags.sparse===t){return this}const r=t?this.clone():this.$_addRule("items");return r.$_setFlag("sparse",t,{clone:false})}},unique:{method(e,t={}){s(!e||typeof e==="function"||typeof e==="string","comparator must be a function or a string");o.assertOptions(t,["ignoreUndefined","separator"]);const r={name:"unique",args:{options:t,comparator:e}};if(e){if(typeof e==="string"){const s=o.default(t.separator,".");r.path=s?e.split(s):[e]}else{r.comparator=e}}return this.$_addRule(r)},validate(e,{state:t,error:r,schema:a},{comparator:o,options:l},{comparator:c,path:u}){const f={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map};const d=c||n;const m=l.ignoreUndefined;for(let n=0;n<e.length;++n){const a=u?i(e[n],u):e[n];const l=c?f.custom:f[typeof a];s(l,"Failed to find unique map container for type",typeof a);if(l instanceof Map){const s=l.entries();let i;while(!(i=s.next()).done){if(d(i.value[0],a)){const s=t.localize([...t.path,n],[e,...t.ancestors]);const a={pos:n,value:e[n],dupePos:i.value[1],dupeValue:e[i.value[1]]};if(u){a.path=o}return r("array.unique",a,s)}}l.set(a,n)}else{if((!m||a!==undefined)&&l[a]!==undefined){const s={pos:n,value:e[n],dupePos:l[a],dupeValue:e[l[a]]};if(u){s.path=o}const i=t.localize([...t.path,n],[e,...t.ancestors]);return r("array.unique",s,i)}l[a]=n}}return e},args:["comparator","options"],multi:true}},cast:{set:{from:Array.isArray,to(e,t){return new Set(e)}}},rebuild(e){e.$_terms._inclusions=[];e.$_terms._exclusions=[];e.$_terms._requireds=[];for(const t of e.$_terms.items){c.validateSingle(t,e);if(t._flags.presence==="required"){e.$_terms._requireds.push(t)}else if(t._flags.presence==="forbidden"){e.$_terms._exclusions.push(t)}else{e.$_terms._inclusions.push(t)}}for(const t of e.$_terms.ordered){c.validateSingle(t,e)}},manifest:{build(e,t){if(t.items){e=e.items(...t.items)}if(t.ordered){e=e.ordered(...t.ordered)}return e}},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}});c.fillMissedErrors=function(e,t,r,s,n,i){const a=[];let o=0;for(const e of r){const t=e._flags.label;if(t){a.push(t)}else{++o}}if(a.length){if(o){t.push(e.$_createError("array.includesRequiredBoth",s,{knownMisses:a,unknownMisses:o},n,i))}else{t.push(e.$_createError("array.includesRequiredKnowns",s,{knownMisses:a},n,i))}}else{t.push(e.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:o},n,i))}};c.fillOrderedErrors=function(e,t,r,s,n,i){const a=[];for(const e of r){if(e._flags.presence==="required"){a.push(e)}}if(a.length){c.fillMissedErrors(e,t,a,s,n,i)}};c.fillDefault=function(e,t,r,s){const n=[];let i=true;for(let a=e.length-1;a>=0;--a){const o=e[a];const l=[t,...r.ancestors];const c=o.$_validate(undefined,r.localize(r.path,l,o),s).value;if(i){if(c===undefined){continue}i=false}n.unshift(c)}if(n.length){t.push(...n)}};c.fastSplice=function(e,t){let r=t;while(r<e.length){e[r++]=e[r]}--e.length};c.validateSingle=function(e,t){if(e.type==="array"||e._flags._arrayItems){s(!t._flags.single,"Cannot specify array item with single rule enabled");t.$_setFlag("_arrayItems",true,{clone:false})}};c.sort=function(e,t,r,s,n){const i=r.order==="ascending"?1:-1;const a=-1*i;const o=i;const sort=(l,u)=>{let f=c.compare(l,u,a,o);if(f!==null){return f}if(r.by){l=r.by.resolve(l,s,n);u=r.by.resolve(u,s,n)}f=c.compare(l,u,a,o);if(f!==null){return f}const d=typeof l;if(d!==typeof u){throw e.$_createError("array.sort.mismatching",t,null,s,n)}if(d!=="number"&&d!=="string"){throw e.$_createError("array.sort.unsupported",t,{type:d},s,n)}if(d==="number"){return(l-u)*i}return l<u?a:o};try{return{value:t.slice().sort(sort)}}catch(e){return{errors:e}}};c.compare=function(e,t,r,s){if(e===t){return 0}if(e===undefined){return 1}if(t===undefined){return-1}if(e===null){return s}if(t===null){return r}return null}},4288:function(e,t,r){const s=r(2718);const n=r(9512);const i=r(2448);const a={};e.exports=n.extend({type:"binary",coerce:{from:["string","object"],method(e,{schema:t}){if(typeof e==="string"||e!==null&&e.type==="Buffer"){try{return{value:Buffer.from(e,t._flags.encoding)}}catch(e){}}}},validate(e,{error:t}){if(!Buffer.isBuffer(e)){return{value:e,errors:t("binary.base")}}},rules:{encoding:{method(e){s(Buffer.isEncoding(e),"Invalid encoding:",e);return this.$_setFlag("encoding",e)}},length:{method(e){return this.$_addRule({name:"length",method:"length",args:{limit:e},operator:"="})},validate(e,t,{limit:r},{name:s,operator:n,args:a}){if(i.compare(e.length,r,n)){return e}return t.error("binary."+s,{limit:a.limit,value:e})},args:[{name:"limit",ref:true,assert:i.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}}},cast:{string:{from:e=>Buffer.isBuffer(e),to(e,t){return e.toString()}}},messages:{"binary.base":"{{#label}} must be a buffer or a string","binary.length":"{{#label}} must be {{#limit}} bytes","binary.max":"{{#label}} must be less than or equal to {{#limit}} bytes","binary.min":"{{#label}} must be at least {{#limit}} bytes"}})},7489:function(e,t,r){const s=r(2718);const n=r(9512);const i=r(2448);const a=r(1944);const o={};o.isBool=function(e){return typeof e==="boolean"};e.exports=n.extend({type:"boolean",flags:{sensitive:{default:false}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(e,{schema:t}){if(typeof e==="boolean"){return}if(typeof e==="string"){const r=t._flags.sensitive?e:e.toLowerCase();e=r==="true"?true:r==="false"?false:e}if(typeof e!=="boolean"){e=t.$_terms.truthy&&t.$_terms.truthy.has(e,null,null,!t._flags.sensitive)||(t.$_terms.falsy&&t.$_terms.falsy.has(e,null,null,!t._flags.sensitive)?false:e)}return{value:e}},validate(e,{error:t}){if(typeof e!=="boolean"){return{value:e,errors:t("boolean.base")}}},rules:{truthy:{method(...e){i.verifyFlat(e,"truthy");const t=this.clone();t.$_terms.truthy=t.$_terms.truthy||new a;for(let r=0;r<e.length;++r){const n=e[r];s(n!==undefined,"Cannot call truthy with undefined");t.$_terms.truthy.add(n)}return t}},falsy:{method(...e){i.verifyFlat(e,"falsy");const t=this.clone();t.$_terms.falsy=t.$_terms.falsy||new a;for(let r=0;r<e.length;++r){const n=e[r];s(n!==undefined,"Cannot call falsy with undefined");t.$_terms.falsy.add(n)}return t}},sensitive:{method(e=true){return this.$_setFlag("sensitive",e)}}},cast:{number:{from:o.isBool,to(e,t){return e?1:0}},string:{from:o.isBool,to(e,t){return e?"true":"false"}}},manifest:{build(e,t){if(t.truthy){e=e.truthy(...t.truthy)}if(t.falsy){e=e.falsy(...t.falsy)}return e}},messages:{"boolean.base":"{{#label}} must be a boolean"}})},6624:function(e,t,r){const s=r(2718);const n=r(9512);const i=r(2448);const a=r(1396);const o={};o.isDate=function(e){return e instanceof Date};e.exports=n.extend({type:"date",coerce:{from:["number","string"],method(e,{schema:t}){return{value:o.parse(e,t._flags.format)||e}}},validate(e,{schema:t,error:r,prefs:s}){if(e instanceof Date&&!isNaN(e.getTime())){return}const n=t._flags.format;if(!s.convert||!n||typeof e!=="string"){return{value:e,errors:r("date.base")}}return{value:e,errors:r("date.format",{format:n})}},rules:{compare:{method:false,validate(e,t,{date:r},{name:s,operator:n,args:a}){const o=r==="now"?Date.now():r.getTime();if(i.compare(e.getTime(),o,n)){return e}return t.error("date."+s,{limit:a.date,value:e})},args:[{name:"date",ref:true,normalize:e=>e==="now"?e:o.parse(e),assert:e=>e!==null,message:"must have a valid date format"}]},format:{method(e){s(["iso","javascript","unix"].includes(e),"Unknown date format",e);return this.$_setFlag("format",e)}},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{date:e},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{date:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{date:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{date:e},operator:">="})}},timestamp:{method(e="javascript"){s(["javascript","unix"].includes(e),'"type" must be one of "javascript, unix"');return this.format(e)}}},cast:{number:{from:o.isDate,to(e,t){return e.getTime()}},string:{from:o.isDate,to(e,{prefs:t}){return a.date(e,t)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}});o.parse=function(e,t){if(e instanceof Date){return e}if(typeof e!=="string"&&(isNaN(e)||!isFinite(e))){return null}if(/^\s*$/.test(e)){return null}if(t==="iso"){if(!i.isIsoDate(e)){return null}return o.date(e.toString())}const r=e;if(typeof e==="string"&&/^[+-]?\d+(\.\d+)?$/.test(e)){e=parseFloat(e)}if(t){if(t==="javascript"){return o.date(1*e)}if(t==="unix"){return o.date(1e3*e)}if(typeof r==="string"){return null}}return o.date(e)};o.date=function(e){const t=new Date(e);if(!isNaN(t.getTime())){return t}return null}},2269:function(e,t,r){const s=r(2718);const n=r(9130);const i={};e.exports=n.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(e){s(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer");return this.$_addRule({name:"arity",args:{n:e}})},validate(e,t,{n:r}){if(e.length===r){return e}return t.error("function.arity",{n:r})}},class:{method(){return this.$_addRule("class")},validate(e,t){if(/^\s*class\s/.test(e.toString())){return e}return t.error("function.class",{value:e})}},minArity:{method(e){s(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer");return this.$_addRule({name:"minArity",args:{n:e}})},validate(e,t,{n:r}){if(e.length>=r){return e}return t.error("function.minArity",{n:r})}},maxArity:{method(e){s(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer");return this.$_addRule({name:"maxArity",args:{n:e}})},validate(e,t,{n:r}){if(e.length<=r){return e}return t.error("function.maxArity",{n:r})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},9130:function(e,t,r){const s=r(5545);const n=r(2718);const i=r(5578);const a=r(1846);const o=r(9512);const l=r(2448);const c=r(3038);const u=r(9490);const f=r(3838);const d=r(1396);const m={renameDefaults:{alias:false,multiple:false,override:false}};e.exports=o.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:undefined}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args(e,t){return e.keys(t)},validate(e,{schema:t,error:r,state:s,prefs:n}){if(!e||typeof e!==t.$_property("typeof")||Array.isArray(e)){return{value:e,errors:r("object.base",{type:t.$_property("typeof")})}}if(!t.$_terms.renames&&!t.$_terms.dependencies&&!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.externals){return}e=m.clone(e,n);const i=[];if(t.$_terms.renames&&!m.rename(t,e,s,n,i)){return{value:e,errors:i}}if(!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.dependencies){return{value:e,errors:i}}const a=new Set(Object.keys(e));if(t.$_terms.keys){const r=[e,...s.ancestors];for(const o of t.$_terms.keys){const t=o.key;const l=e[t];a.delete(t);const c=s.localize([...s.path,t],r,o);const u=o.schema.$_validate(l,c,n);if(u.errors){if(n.abortEarly){return{value:e,errors:u.errors}}if(u.value!==undefined){e[t]=u.value}i.push(...u.errors)}else if(o.schema._flags.result==="strip"||u.value===undefined&&l!==undefined){delete e[t]}else if(u.value!==undefined){e[t]=u.value}}}if(a.size||t._flags._hasPatternMatch){const r=m.unknown(t,e,a,i,s,n);if(r){return r}}if(t.$_terms.dependencies){for(const r of t.$_terms.dependencies){if(r.key!==null&&m.isPresent(r.options)(r.key.resolve(e,s,n,null,{shadow:false}))===false){continue}const a=m.dependencies[r.rel](t,r,e,s,n);if(a){const r=t.$_createError(a.code,e,a.context,s,n);if(n.abortEarly){return{value:e,errors:r}}i.push(r)}}}return{value:e,errors:i}},rules:{and:{method(...e){l.verifyFlat(e,"and");return m.dependency(this,"and",null,e)}},append:{method(e){if(e===null||e===undefined||Object.keys(e).length===0){return this}return this.keys(e)}},assert:{method(e,t,r){if(!d.isTemplate(e)){e=c.ref(e)}n(r===undefined||typeof r==="string","Message must be a string");t=this.$_compile(t,{appendPath:true});const s=this.$_addRule({name:"assert",args:{subject:e,schema:t,message:r}});s.$_mutateRegister(e);s.$_mutateRegister(t);return s},validate(e,{error:t,prefs:r,state:s},{subject:n,schema:i,message:a}){const o=n.resolve(e,s,r);const l=f.isRef(n)?n.absolute(s):[];if(i.$_match(o,s.localize(l,[e,...s.ancestors],i),r)){return e}return t("object.assert",{subject:n,message:a})},args:["subject","schema","message"],multi:true},instance:{method(e,t){n(typeof e==="function","constructor must be a function");t=t||e.name;return this.$_addRule({name:"instance",args:{constructor:e,name:t}})},validate(e,t,{constructor:r,name:s}){if(e instanceof r){return e}return t.error("object.instance",{type:s,value:e})},args:["constructor","name"]},keys:{method(e){n(e===undefined||typeof e==="object","Object schema must be a valid object");n(!l.isSchema(e),"Object schema cannot be a joi schema");const t=this.clone();if(!e){t.$_terms.keys=null}else if(!Object.keys(e).length){t.$_terms.keys=new m.Keys}else{t.$_terms.keys=t.$_terms.keys?t.$_terms.keys.filter((t=>!e.hasOwnProperty(t.key))):new m.Keys;for(const r in e){l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}}return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate(e,t,{limit:r},{name:s,operator:n,args:i}){if(l.compare(Object.keys(e).length,r,n)){return e}return t.error("object."+s,{limit:i.limit,value:e})},args:[{name:"limit",ref:true,assert:l.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},nand:{method(...e){l.verifyFlat(e,"nand");return m.dependency(this,"nand",null,e)}},or:{method(...e){l.verifyFlat(e,"or");return m.dependency(this,"or",null,e)}},oxor:{method(...e){return m.dependency(this,"oxor",null,e)}},pattern:{method(e,t,r={}){const s=e instanceof RegExp;if(!s){e=this.$_compile(e,{appendPath:true})}n(t!==undefined,"Invalid rule");l.assertOptions(r,["fallthrough","matches"]);if(s){n(!e.flags.includes("g")&&!e.flags.includes("y"),"pattern should not use global or sticky mode")}t=this.$_compile(t,{appendPath:true});const i=this.clone();i.$_terms.patterns=i.$_terms.patterns||[];const a={[s?"regex":"schema"]:e,rule:t};if(r.matches){a.matches=this.$_compile(r.matches);if(a.matches.type!=="array"){a.matches=a.matches.$_root.array().items(a.matches)}i.$_mutateRegister(a.matches);i.$_setFlag("_hasPatternMatch",true,{clone:false})}if(r.fallthrough){a.fallthrough=true}i.$_terms.patterns.push(a);i.$_mutateRegister(t);return i}},ref:{method(){return this.$_addRule("ref")},validate(e,t){if(f.isRef(e)){return e}return t.error("object.refType",{value:e})}},regex:{method(){return this.$_addRule("regex")},validate(e,t){if(e instanceof RegExp){return e}return t.error("object.regex",{value:e})}},rename:{method(e,t,r={}){n(typeof e==="string"||e instanceof RegExp,"Rename missing the from argument");n(typeof t==="string"||t instanceof d,"Invalid rename to argument");n(t!==e,"Cannot rename key to same name:",e);l.assertOptions(r,["alias","ignoreUndefined","override","multiple"]);const i=this.clone();i.$_terms.renames=i.$_terms.renames||[];for(const t of i.$_terms.renames){n(t.from!==e,"Cannot rename the same key multiple times")}if(t instanceof d){i.$_mutateRegister(t)}i.$_terms.renames.push({from:e,to:t,options:s(m.renameDefaults,r)});return i}},schema:{method(e="any"){return this.$_addRule({name:"schema",args:{type:e}})},validate(e,t,{type:r}){if(l.isSchema(e)&&(r==="any"||e.type===r)){return e}return t.error("object.schema",{type:r})}},unknown:{method(e){return this.$_setFlag("unknown",e!==false)}},with:{method(e,t,r={}){return m.dependency(this,"with",e,t,r)}},without:{method(e,t,r={}){return m.dependency(this,"without",e,t,r)}},xor:{method(...e){l.verifyFlat(e,"xor");return m.dependency(this,"xor",null,e)}}},overrides:{default(e,t){if(e===undefined){e=l.symbols.deepDefault}return this.$_parent("default",e,t)}},rebuild(e){if(e.$_terms.keys){const t=new a.Sorter;for(const r of e.$_terms.keys){l.tryWithPath((()=>t.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key)}e.$_terms.keys=new m.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys){e=e.keys(t.keys)}if(t.dependencies){for(const{rel:r,key:s=null,peers:n,options:i}of t.dependencies){e=m.dependency(e,r,s,n,i)}}if(t.patterns){for(const{regex:r,schema:s,rule:n,fallthrough:i,matches:a}of t.patterns){e=e.pattern(r||s,n,{fallthrough:i,matches:a})}}if(t.renames){for(const{from:r,to:s,options:n}of t.renames){e=e.rename(r,s,n)}}return e}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}});m.clone=function(e,t){if(typeof e==="object"){if(t.nonEnumerables){return i(e,{shallow:true})}const r=Object.create(Object.getPrototypeOf(e));Object.assign(r,e);return r}const clone=function(...t){return e.apply(this,t)};clone.prototype=i(e.prototype);Object.defineProperty(clone,"name",{value:e.name,writable:false});Object.defineProperty(clone,"length",{value:e.length,writable:false});Object.assign(clone,e);return clone};m.dependency=function(e,t,r,s,i){n(r===null||typeof r==="string",t,"key must be a strings");if(!i){i=s.length>1&&typeof s[s.length-1]==="object"?s.pop():{}}l.assertOptions(i,["separator","isPresent"]);s=[].concat(s);const a=l.default(i.separator,".");const o=[];for(const e of s){n(typeof e==="string",t,"peers must be strings");o.push(c.ref(e,{separator:a,ancestor:0,prefix:false}))}if(r!==null){r=c.ref(r,{separator:a,ancestor:0,prefix:false})}const u=e.clone();u.$_terms.dependencies=u.$_terms.dependencies||[];u.$_terms.dependencies.push(new m.Dependency(t,r,o,s,i));return u};m.dependencies={and(e,t,r,s,n){const i=[];const a=[];const o=t.peers.length;const l=m.isPresent(t.options);for(const e of t.peers){if(l(e.resolve(r,s,n,null,{shadow:false}))===false){i.push(e.key)}else{a.push(e.key)}}if(i.length!==o&&a.length!==o){return{code:"object.and",context:{present:a,presentWithLabels:m.keysToLabels(e,a),missing:i,missingWithLabels:m.keysToLabels(e,i)}}}},nand(e,t,r,s,n){const i=[];const a=m.isPresent(t.options);for(const e of t.peers){if(a(e.resolve(r,s,n,null,{shadow:false}))){i.push(e.key)}}if(i.length!==t.peers.length){return}const o=t.paths[0];const l=t.paths.slice(1);return{code:"object.nand",context:{main:o,mainWithLabel:m.keysToLabels(e,o),peers:l,peersWithLabels:m.keysToLabels(e,l)}}},or(e,t,r,s,n){const i=m.isPresent(t.options);for(const e of t.peers){if(i(e.resolve(r,s,n,null,{shadow:false}))){return}}return{code:"object.missing",context:{peers:t.paths,peersWithLabels:m.keysToLabels(e,t.paths)}}},oxor(e,t,r,s,n){const i=[];const a=m.isPresent(t.options);for(const e of t.peers){if(a(e.resolve(r,s,n,null,{shadow:false}))){i.push(e.key)}}if(!i.length||i.length===1){return}const o={peers:t.paths,peersWithLabels:m.keysToLabels(e,t.paths)};o.present=i;o.presentWithLabels=m.keysToLabels(e,i);return{code:"object.oxor",context:o}},with(e,t,r,s,n){const i=m.isPresent(t.options);for(const a of t.peers){if(i(a.resolve(r,s,n,null,{shadow:false}))===false){return{code:"object.with",context:{main:t.key.key,mainWithLabel:m.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:m.keysToLabels(e,a.key)}}}}},without(e,t,r,s,n){const i=m.isPresent(t.options);for(const a of t.peers){if(i(a.resolve(r,s,n,null,{shadow:false}))){return{code:"object.without",context:{main:t.key.key,mainWithLabel:m.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:m.keysToLabels(e,a.key)}}}}},xor(e,t,r,s,n){const i=[];const a=m.isPresent(t.options);for(const e of t.peers){if(a(e.resolve(r,s,n,null,{shadow:false}))){i.push(e.key)}}if(i.length===1){return}const o={peers:t.paths,peersWithLabels:m.keysToLabels(e,t.paths)};if(i.length===0){return{code:"object.missing",context:o}}o.present=i;o.presentWithLabels=m.keysToLabels(e,i);return{code:"object.xor",context:o}}};m.keysToLabels=function(e,t){if(Array.isArray(t)){return t.map((t=>e.$_mapLabels(t)))}return e.$_mapLabels(t)};m.isPresent=function(e){return typeof e.isPresent==="function"?e.isPresent:e=>e!==undefined};m.rename=function(e,t,r,s,n){const i={};for(const a of e.$_terms.renames){const o=[];const l=typeof a.from!=="string";if(!l){if(Object.prototype.hasOwnProperty.call(t,a.from)&&(t[a.from]!==undefined||!a.options.ignoreUndefined)){o.push(a)}}else{for(const e in t){if(t[e]===undefined&&a.options.ignoreUndefined){continue}if(e===a.to){continue}const r=a.from.exec(e);if(!r){continue}o.push({from:e,to:a.to,match:r})}}for(const c of o){const o=c.from;let u=c.to;if(u instanceof d){u=u.render(t,r,s,c.match)}if(o===u){continue}if(!a.options.multiple&&i[u]){n.push(e.$_createError("object.rename.multiple",t,{from:o,to:u,pattern:l},r,s));if(s.abortEarly){return false}}if(Object.prototype.hasOwnProperty.call(t,u)&&!a.options.override&&!i[u]){n.push(e.$_createError("object.rename.override",t,{from:o,to:u,pattern:l},r,s));if(s.abortEarly){return false}}if(t[o]===undefined){delete t[u]}else{t[u]=t[o]}i[u]=true;if(!a.options.alias){delete t[o]}}}return true};m.unknown=function(e,t,r,s,n,i){if(e.$_terms.patterns){let a=false;const o=e.$_terms.patterns.map((e=>{if(e.matches){a=true;return[]}}));const l=[t,...n.ancestors];for(const a of r){const c=t[a];const u=[...n.path,a];for(let f=0;f<e.$_terms.patterns.length;++f){const d=e.$_terms.patterns[f];if(d.regex){const e=d.regex.test(a);n.mainstay.tracer.debug(n,"rule",`pattern.${f}`,e?"pass":"error");if(!e){continue}}else{if(!d.schema.$_match(a,n.nest(d.schema,`pattern.${f}`),i)){continue}}r.delete(a);const m=n.localize(u,l,{schema:d.rule,key:a});const h=d.rule.$_validate(c,m,i);if(h.errors){if(i.abortEarly){return{value:t,errors:h.errors}}s.push(...h.errors)}if(d.matches){o[f].push(a)}t[a]=h.value;if(!d.fallthrough){break}}}if(a){for(let r=0;r<o.length;++r){const a=o[r];if(!a){continue}const c=e.$_terms.patterns[r].matches;const f=n.localize(n.path,l,c);const d=c.$_validate(a,f,i);if(d.errors){const r=u.details(d.errors,{override:false});r.matches=a;const o=e.$_createError("object.pattern.match",t,r,n,i);if(i.abortEarly){return{value:t,errors:o}}s.push(o)}}}}if(!r.size||!e.$_terms.keys&&!e.$_terms.patterns){return}if(i.stripUnknown&&typeof e._flags.unknown==="undefined"||i.skipFunctions){const e=i.stripUnknown?i.stripUnknown===true?true:!!i.stripUnknown.objects:false;for(const s of r){if(e){delete t[s];r.delete(s)}else if(typeof t[s]==="function"){r.delete(s)}}}const a=!l.default(e._flags.unknown,i.allowUnknown);if(a){for(const a of r){const r=n.localize([...n.path,a],[]);const o=e.$_createError("object.unknown",t[a],{child:a},r,i,{flags:false});if(i.abortEarly){return{value:t,errors:o}}s.push(o)}}};m.Dependency=class{constructor(e,t,r,s,n){this.rel=e;this.key=t;this.peers=r;this.paths=s;this.options=n}describe(){const e={rel:this.rel,peers:this.paths};if(this.key!==null){e.key=this.key.key}if(this.peers[0].separator!=="."){e.options={...e.options,separator:this.peers[0].separator}}if(this.options.isPresent){e.options={...e.options,isPresent:this.options.isPresent}}return e}};m.Keys=class extends Array{concat(e){const t=this.slice();const r=new Map;for(let e=0;e<t.length;++e){r.set(t[e].key,e)}for(const s of e){const e=s.key;const n=r.get(e);if(n!==undefined){t[n]={key:e,schema:t[n].schema.concat(s.schema)}}else{t.push(s)}}return t}}},9869:function(e,t,r){const s=r(2718);const n=r(9512);const i=r(2448);const a=r(3038);const o=r(9490);const l={};e.exports=n.extend({type:"link",properties:{schemaChain:true},terms:{link:{init:null,manifest:"single",register:false}},args(e,t){return e.ref(t)},validate(e,{schema:t,state:r,prefs:n}){s(t.$_terms.link,"Uninitialized link schema");const i=l.generate(t,e,r,n);const a=t.$_terms.link[0].ref;return i.$_validate(e,r.nest(i,`link:${a.display}:${i.type}`),n)},generate(e,t,r,s){return l.generate(e,t,r,s)},rules:{ref:{method(e){s(!this.$_terms.link,"Cannot reinitialize schema");e=a.ref(e);s(e.type==="value"||e.type==="local","Invalid reference type:",e.type);s(e.type==="local"||e.ancestor==="root"||e.ancestor>0,"Link cannot reference itself");const t=this.clone();t.$_terms.link=[{ref:e}];return t}},relative:{method(e=true){return this.$_setFlag("relative",e)}}},overrides:{concat(e){s(this.$_terms.link,"Uninitialized link schema");s(i.isSchema(e),"Invalid schema object");s(e.type!=="link","Cannot merge type link with another link");const t=this.clone();if(!t.$_terms.whens){t.$_terms.whens=[]}t.$_terms.whens.push({concat:e});return t.$_mutateRebuild()}},manifest:{build(e,t){s(t.link,"Invalid link description missing link");return e.ref(t.link)}}});l.generate=function(e,t,r,s){let n=r.mainstay.links.get(e);if(n){return n._generate(t,r,s).schema}const i=e.$_terms.link[0].ref;const{perspective:a,path:o}=l.perspective(i,r);l.assert(a,"which is outside of schema boundaries",i,e,r,s);try{n=o.length?a.$_reach(o):a}catch(t){l.assert(false,"to non-existing schema",i,e,r,s)}l.assert(n.type!=="link","which is another link",i,e,r,s);if(!e._flags.relative){r.mainstay.links.set(e,n)}return n._generate(t,r,s).schema};l.perspective=function(e,t){if(e.type==="local"){for(const{schema:r,key:s}of t.schemas){const t=r._flags.id||s;if(t===e.path[0]){return{perspective:r,path:e.path.slice(1)}}if(r.$_terms.shared){for(const t of r.$_terms.shared){if(t._flags.id===e.path[0]){return{perspective:t,path:e.path.slice(1)}}}}}return{perspective:null,path:null}}if(e.ancestor==="root"){return{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}}return{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}};l.assert=function(e,t,r,n,i,a){if(e){return}s(false,`"${o.label(n._flags,i,a)}" contains link reference "${r.display}" ${t}`)}},5855:function(e,t,r){const s=r(2718);const n=r(9512);const i=r(2448);const a={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const t=e.toString();const r=t.indexOf(".");const s=t.indexOf("e");return(r<0?0:(s<0?t.length:s)-r-1)+(s<0?0:Math.max(0,-parseInt(t.slice(s+1))))}};e.exports=n.extend({type:"number",flags:{unsafe:{default:false}},coerce:{from:"string",method(e,{schema:t,error:r}){const s=e.match(a.numberRx);if(!s){return}e=e.trim();const n={value:parseFloat(e)};if(n.value===0){n.value=0}if(!t._flags.unsafe){if(e.match(/e/i)){if(a.extractSignificantDigits(e)!==a.extractSignificantDigits(String(n.value))){n.errors=r("number.unsafe");return n}}else{const t=n.value.toString();if(t.match(/e/i)){return n}if(t!==a.normalizeDecimal(e)){n.errors=r("number.unsafe");return n}}}return n}},validate(e,{schema:t,error:r,prefs:s}){if(e===Infinity||e===-Infinity){return{value:e,errors:r("number.infinity")}}if(!i.isNumber(e)){return{value:e,errors:r("number.base")}}const n={value:e};if(s.convert){const e=t.$_getRule("precision");if(e){const t=Math.pow(10,e.args.limit);n.value=Math.round(n.value*t)/t}}if(n.value===0){n.value=0}if(!t._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)){n.errors=r("number.unsafe")}return n},rules:{compare:{method:false,validate(e,t,{limit:r},{name:s,operator:n,args:a}){if(i.compare(e,r,n)){return e}return t.error("number."+s,{limit:a.limit,value:e})},args:[{name:"limit",ref:true,assert:i.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate(e,t){if(Math.trunc(e)-e===0){return e}return t.error("number.integer")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const t=typeof e==="number"?a.decimalPlaces(e):null;const r=Math.pow(10,t);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:t,pfactor:r}})},validate(e,t,{base:r,baseDecimalPlace:s,pfactor:n},i){const o=a.decimalPlaces(e);if(o>s){return t.error("number.multiple",{multiple:i.args.base,value:e})}return Math.round(n*e)%Math.round(n*r)===0?e:t.error("number.multiple",{multiple:i.args.base,value:e})},args:[{name:"base",ref:true,assert:e=>typeof e==="number"&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:true},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate(e,t){if(Number.isSafeInteger(e)&&e>=0&&e<=65535){return e}return t.error("number.port")}},positive:{method(){return this.sign("positive")}},precision:{method(e){s(Number.isSafeInteger(e),"limit must be an integer");return this.$_addRule({name:"precision",args:{limit:e}})},validate(e,t,{limit:r}){const s=e.toString().match(a.precisionRx);const n=Math.max((s[1]?s[1].length:0)-(s[2]?parseInt(s[2],10):0),0);if(n<=r){return e}return t.error("number.precision",{limit:r,value:e})},convert:true},sign:{method(e){s(["negative","positive"].includes(e),"Invalid sign",e);return this.$_addRule({name:"sign",args:{sign:e}})},validate(e,t,{sign:r}){if(r==="negative"&&e<0||r==="positive"&&e>0){return e}return t.error(`number.${r}`)}},unsafe:{method(e=true){s(typeof e==="boolean","enabled must be a boolean");return this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>typeof e==="number",to(e,t){return e.toString()}}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}});a.extractSignificantDigits=function(e){return e.replace(a.exponentialPartRegex,"").replace(a.dotRegex,"").replace(a.trailingZerosRegex,"").replace(a.leadingSignAndZerosRegex,"")};a.normalizeDecimal=function(e){e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2");if(e.includes(".")&&e.endsWith("0")){e=e.replace(/0+$/,"")}if(e==="-0"){return"0"}return e}},6878:function(e,t,r){const s=r(9130);const n={};e.exports=s.extend({type:"object",cast:{map:{from:e=>e&&typeof e==="object",to(e,t){return new Map(Object.entries(e))}}}})},2260:function(e,t,r){const s=r(2718);const n=r(7425);const i=r(3283);const a=r(2337);const o=r(1965);const l=r(3092);const c=r(4983);const u=r(9512);const f=r(2448);const d={tlds:l instanceof Set?{tlds:{allow:l,deny:null}}:false,base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:a.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([undefined,true,false,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};e.exports=u.extend({type:"string",flags:{insensitive:{default:false},truncate:{default:false}},terms:{replacements:{init:null}},coerce:{from:"string",method(e,{schema:t,state:r,prefs:s}){const n=t.$_getRule("normalize");if(n){e=e.normalize(n.args.form)}const i=t.$_getRule("case");if(i){e=i.args.direction==="upper"?e.toLocaleUpperCase():e.toLocaleLowerCase()}const a=t.$_getRule("trim");if(a&&a.args.enabled){e=e.trim()}if(t.$_terms.replacements){for(const r of t.$_terms.replacements){e=e.replace(r.pattern,r.replacement)}}const o=t.$_getRule("hex");if(o&&o.args.options.byteAligned&&e.length%2!==0){e=`0${e}`}if(t.$_getRule("isoDate")){const t=d.isoDate(e);if(t){e=t}}if(t._flags.truncate){const n=t.$_getRule("max");if(n){let i=n.args.limit;if(f.isResolvable(i)){i=i.resolve(e,r,s);if(!f.limit(i)){return{value:e,errors:t.$_createError("any.ref",i,{ref:n.args.limit,arg:"limit",reason:"must be a positive integer"},r,s)}}}e=e.slice(0,i)}}return{value:e}}},validate(e,{schema:t,error:r}){if(typeof e!=="string"){return{value:e,errors:r("string.base")}}if(e===""){const s=t.$_getRule("min");if(s&&s.args.limit===0){return}return{value:e,errors:r("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate(e,t){if(/^[a-zA-Z0-9]+$/.test(e)){return e}return t.error("string.alphanum")}},base64:{method(e={}){f.assertOptions(e,["paddingRequired","urlSafe"]);e={urlSafe:false,paddingRequired:true,...e};s(typeof e.paddingRequired==="boolean","paddingRequired must be boolean");s(typeof e.urlSafe==="boolean","urlSafe must be boolean");return this.$_addRule({name:"base64",args:{options:e}})},validate(e,t,{options:r}){const s=d.base64Regex[r.paddingRequired][r.urlSafe];if(s.test(e)){return e}return t.error("string.base64")}},case:{method(e){s(["lower","upper"].includes(e),"Invalid case:",e);return this.$_addRule({name:"case",args:{direction:e}})},validate(e,t,{direction:r}){if(r==="lower"&&e===e.toLocaleLowerCase()||r==="upper"&&e===e.toLocaleUpperCase()){return e}return t.error(`string.${r}case`)},convert:true},creditCard:{method(){return this.$_addRule("creditCard")},validate(e,t){let r=e.length;let s=0;let n=1;while(r--){const t=e.charAt(r)*n;s=s+(t-(t>9)*9);n=n^3}if(s>0&&s%10===0){return e}return t.error("string.creditCard")}},dataUri:{method(e={}){f.assertOptions(e,["paddingRequired"]);e={paddingRequired:true,...e};s(typeof e.paddingRequired==="boolean","paddingRequired must be boolean");return this.$_addRule({name:"dataUri",args:{options:e}})},validate(e,t,{options:r}){const s=e.match(d.dataUriRegex);if(s){if(!s[2]){return e}if(s[2]!=="base64"){return e}const t=d.base64Regex[r.paddingRequired].false;if(t.test(s[3])){return e}}return t.error("string.dataUri")}},domain:{method(e){if(e){f.assertOptions(e,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"])}const t=d.addressOptions(e);return this.$_addRule({name:"domain",args:{options:e},address:t})},validate(e,t,r,{address:s}){if(n.isValid(e,s)){return e}return t.error("string.domain")}},email:{method(e={}){f.assertOptions(e,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]);s(e.multiple===undefined||typeof e.multiple==="boolean","multiple option must be an boolean");const t=d.addressOptions(e);const r=new RegExp(`\\s*[${e.separator?o(e.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:e},regex:r,address:t})},validate(e,t,{options:r},{regex:s,address:n}){const a=r.multiple?e.split(s):[e];const o=[];for(const e of a){if(!i.isValid(e,n)){o.push(e)}}if(!o.length){return e}return t.error("string.email",{value:e,invalids:o})}},guid:{alias:"uuid",method(e={}){f.assertOptions(e,["version","separator"]);let t="";if(e.version){const r=[].concat(e.version);s(r.length>=1,"version must have at least 1 valid version specified");const n=new Set;for(let e=0;e<r.length;++e){const i=r[e];s(typeof i==="string","version at position "+e+" must be a string");const a=d.guidVersions[i.toLowerCase()];s(a,"version at position "+e+" must be one of "+Object.keys(d.guidVersions).join(", "));s(!n.has(a),"version at position "+e+" must not be a duplicate");t+=a;n.add(a)}}s(d.guidSeparators.has(e.separator),'separator must be one of true, false, "-", or ":"');const r=e.separator===undefined?"[:-]?":e.separator===true?"[:-]":e.separator===false?"[]?":`\\${e.separator}`;const n=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${r})[0-9A-F]{4}\\2?[${t||"0-9A-F"}][0-9A-F]{3}\\2?[${t?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:e},regex:n})},validate(e,t,r,{regex:s}){const n=s.exec(e);if(!n){return t.error("string.guid")}if(d.guidBrackets[n[1]]!==n[n.length-1]){return t.error("string.guid")}return e}},hex:{method(e={}){f.assertOptions(e,["byteAligned","prefix"]);e={byteAligned:false,prefix:false,...e};s(typeof e.byteAligned==="boolean","byteAligned must be boolean");s(typeof e.prefix==="boolean"||e.prefix==="optional",'prefix must be boolean or "optional"');return this.$_addRule({name:"hex",args:{options:e}})},validate(e,t,{options:r}){const s=r.prefix==="optional"?d.hexRegex.withOptionalPrefix:r.prefix===true?d.hexRegex.withPrefix:d.hexRegex.withoutPrefix;if(!s.test(e)){return t.error("string.hex")}if(r.byteAligned&&e.length%2!==0){return t.error("string.hexAlign")}return e}},hostname:{method(){return this.$_addRule("hostname")},validate(e,t){if(n.isValid(e,{minDomainSegments:1})||d.ipRegex.test(e)){return e}return t.error("string.hostname")}},insensitive:{method(){return this.$_setFlag("insensitive",true)}},ip:{method(e={}){f.assertOptions(e,["cidr","version"]);const{cidr:t,versions:r,regex:s}=a.regex(e);const n=e.version?r:undefined;return this.$_addRule({name:"ip",args:{options:{cidr:t,version:n}},regex:s})},validate(e,t,{options:r},{regex:s}){if(s.test(e)){return e}if(r.version){return t.error("string.ipVersion",{value:e,cidr:r.cidr,version:r.version})}return t.error("string.ip",{value:e,cidr:r.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(e,{error:t}){if(d.isoDate(e)){return e}return t("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate(e,t){if(d.isoDurationRegex.test(e)){return e}return t.error("string.isoDuration")}},length:{method(e,t){return d.length(this,"length",e,"=",t)},validate(e,t,{limit:r,encoding:s},{name:n,operator:i,args:a}){const o=s?Buffer&&Buffer.byteLength(e,s):e.length;if(f.compare(o,r,i)){return e}return t.error("string."+n,{limit:a.limit,value:e,encoding:s})},args:[{name:"limit",ref:true,assert:f.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(e,t){return d.length(this,"max",e,"<=",t)},args:["limit","encoding"]},min:{method(e,t){return d.length(this,"min",e,">=",t)},args:["limit","encoding"]},normalize:{method(e="NFC"){s(d.normalizationForms.includes(e),"normalization form must be one of "+d.normalizationForms.join(", "));return this.$_addRule({name:"normalize",args:{form:e}})},validate(e,{error:t},{form:r}){if(e===e.normalize(r)){return e}return t("string.normalize",{value:e,form:r})},convert:true},pattern:{alias:"regex",method(e,t={}){s(e instanceof RegExp,"regex must be a RegExp");s(!e.flags.includes("g")&&!e.flags.includes("y"),"regex should not use global or sticky mode");if(typeof t==="string"){t={name:t}}f.assertOptions(t,["invert","name"]);const r=["string.pattern",t.invert?".invert":"",t.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:e,options:t},errorCode:r})},validate(e,t,{regex:r,options:s},{errorCode:n}){const i=r.test(e);if(i^s.invert){return e}return t.error(n,{name:s.name,regex:r,value:e})},args:["regex","options"],multi:true},replace:{method(e,t){if(typeof e==="string"){e=new RegExp(o(e),"g")}s(e instanceof RegExp,"pattern must be a RegExp");s(typeof t==="string","replacement must be a String");const r=this.clone();if(!r.$_terms.replacements){r.$_terms.replacements=[]}r.$_terms.replacements.push({pattern:e,replacement:t});return r}},token:{method(){return this.$_addRule("token")},validate(e,t){if(/^\w+$/.test(e)){return e}return t.error("string.token")}},trim:{method(e=true){s(typeof e==="boolean","enabled must be a boolean");return this.$_addRule({name:"trim",args:{enabled:e}})},validate(e,t,{enabled:r}){if(!r||e===e.trim()){return e}return t.error("string.trim")},convert:true},truncate:{method(e=true){s(typeof e==="boolean","enabled must be a boolean");return this.$_setFlag("truncate",e)}},uppercase:{method(){return this.case("upper")}},uri:{method(e={}){f.assertOptions(e,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]);if(e.domain){f.assertOptions(e.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"])}const{regex:t,scheme:r}=c.regex(e);const s=e.domain?d.addressOptions(e.domain):null;return this.$_addRule({name:"uri",args:{options:e},regex:t,domain:s,scheme:r})},validate(e,t,{options:r},{regex:s,domain:i,scheme:a}){if(["http:/","https:/"].includes(e)){return t.error("string.uri")}let o=s.exec(e);if(!o&&t.prefs.convert&&r.encodeUri){const t=encodeURI(e);o=s.exec(t);if(o){e=t}}if(o){const s=o[1]||o[2];if(i&&(!r.allowRelative||s)&&!n.isValid(s,i)){return t.error("string.domain",{value:s})}return e}if(r.relativeOnly){return t.error("string.uriRelativeOnly")}if(r.scheme){return t.error("string.uriCustomScheme",{scheme:a,value:e})}return t.error("string.uri")}}},manifest:{build(e,t){if(t.replacements){for(const{pattern:r,replacement:s}of t.replacements){e=e.replace(r,s)}}return e}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}});d.addressOptions=function(e){if(!e){return d.tlds||e}s(e.minDomainSegments===undefined||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,"minDomainSegments must be a positive integer");s(e.maxDomainSegments===undefined||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,"maxDomainSegments must be a positive integer");if(e.tlds===false){return e}if(e.tlds===true||e.tlds===undefined){s(d.tlds,"Built-in TLD list disabled");return Object.assign({},e,d.tlds)}s(typeof e.tlds==="object","tlds must be true, false, or an object");const t=e.tlds.deny;if(t){if(Array.isArray(t)){e=Object.assign({},e,{tlds:{deny:new Set(t)}})}s(e.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean");s(!e.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists");d.validateTlds(e.tlds.deny,"tlds.deny");return e}const r=e.tlds.allow;if(!r){return e}if(r===true){s(d.tlds,"Built-in TLD list disabled");return Object.assign({},e,d.tlds)}if(Array.isArray(r)){e=Object.assign({},e,{tlds:{allow:new Set(r)}})}s(e.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean");d.validateTlds(e.tlds.allow,"tlds.allow");return e};d.validateTlds=function(e,t){for(const r of e){s(n.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)}};d.isoDate=function(e){if(!f.isIsoDate(e)){return null}if(/.*T.*[+-]\d\d$/.test(e)){e+="00"}const t=new Date(e);if(isNaN(t.getTime())){return null}return t.toISOString()};d.length=function(e,t,r,n,i){s(!i||Buffer&&Buffer.isEncoding(i),"Invalid encoding:",i);return e.$_addRule({name:t,method:"length",args:{limit:r,encoding:i},operator:n})}},971:function(e,t,r){const s=r(2718);const n=r(9512);const i={};i.Map=class extends Map{slice(){return new i.Map(this)}};e.exports=n.extend({type:"symbol",terms:{map:{init:new i.Map}},coerce:{method(e,{schema:t,error:r}){const s=t.$_terms.map.get(e);if(s){e=s}if(!t._flags.only||typeof e==="symbol"){return{value:e}}return{value:e,errors:r("symbol.map",{map:t.$_terms.map})}}},validate(e,{error:t}){if(typeof e!=="symbol"){return{value:e,errors:t("symbol.base")}}},rules:{map:{method(e){if(e&&!e[Symbol.iterator]&&typeof e==="object"){e=Object.entries(e)}s(e&&e[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone();const r=[];for(const n of e){s(n&&n[Symbol.iterator],"Entry must be an iterable");const[e,i]=n;s(typeof e!=="object"&&typeof e!=="function"&&typeof e!=="symbol","Key must not be of type object, function, or Symbol");s(typeof i==="symbol","Value must be a Symbol");t.$_terms.map.set(e,i);r.push(i)}return t.valid(...r)}}},manifest:{build(e,t){if(t.map){e=e.map(t.map)}return e}},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},1804:function(e,t,r){const s=r(2718);const n=r(5578);const i=r(2887);const a=r(8891);const o=r(2448);const l=r(9490);const c=r(3634);const u={result:Symbol("result")};t.entry=function(e,t,r){let n=o.defaults;if(r){s(r.warnings===undefined,"Cannot override warnings preference in synchronous validation");s(r.artifacts===undefined,"Cannot override artifacts preference in synchronous validation");n=o.preferences(o.defaults,r)}const i=u.entry(e,t,n);s(!i.mainstay.externals.length,"Schema with external rules must use validateAsync()");const a={value:i.value};if(i.error){a.error=i.error}if(i.mainstay.warnings.length){a.warning=l.details(i.mainstay.warnings)}if(i.mainstay.debug){a.debug=i.mainstay.debug}if(i.mainstay.artifacts){a.artifacts=i.mainstay.artifacts}return a};t.entryAsync=async function(e,t,r){let s=o.defaults;if(r){s=o.preferences(o.defaults,r)}const n=u.entry(e,t,s);const i=n.mainstay;if(n.error){if(i.debug){n.error.debug=i.debug}throw n.error}if(i.externals.length){let t=n.value;const c=[];for(const n of i.externals){const f=n.state.path;const d=n.schema.type==="link"?i.links.get(n.schema):null;let m=t;let h;let p;const g=f.length?[t]:[];const y=f.length?a(e,f):e;if(f.length){h=f[f.length-1];let e=t;for(const t of f.slice(0,-1)){e=e[t];g.unshift(e)}p=g[0];m=p[h]}try{const createError=(e,t)=>(d||n.schema).$_createError(e,m,t,n.state,s);const e=await n.method(m,{schema:n.schema,linked:d,state:n.state,prefs:r,original:y,error:createError,errorsArray:u.errorsArray,warn:(e,t)=>i.warnings.push((d||n.schema).$_createError(e,m,t,n.state,s)),message:(e,t)=>(d||n.schema).$_createError("external",m,t,n.state,s,{messages:e})});if(e===undefined||e===m){continue}if(e instanceof l.Report){i.tracer.log(n.schema,n.state,"rule","external","error");c.push(e);if(s.abortEarly){break}continue}if(Array.isArray(e)&&e[o.symbols.errors]){i.tracer.log(n.schema,n.state,"rule","external","error");c.push(...e);if(s.abortEarly){break}continue}if(p){i.tracer.value(n.state,"rule",m,e,"external");p[h]=e}else{i.tracer.value(n.state,"rule",t,e,"external");t=e}}catch(e){if(s.errors.label){e.message+=` (${n.label})`}throw e}}n.value=t;if(c.length){n.error=l.process(c,e,s);if(i.debug){n.error.debug=i.debug}throw n.error}}if(!s.warnings&&!s.debug&&!s.artifacts){return n.value}const c={value:n.value};if(i.warnings.length){c.warning=l.details(i.warnings)}if(i.debug){c.debug=i.debug}if(i.artifacts){c.artifacts=i.artifacts}return c};u.Mainstay=class{constructor(e,t,r){this.externals=[];this.warnings=[];this.tracer=e;this.debug=t;this.links=r;this.shadow=null;this.artifacts=null;this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const e=this._snapshots.pop();this.externals=e.externals;this.warnings=e.warnings}commit(){this._snapshots.pop()}};u.entry=function(e,r,s){const{tracer:n,cleanup:i}=u.tracer(r,s);const a=s.debug?[]:null;const o=r._ids._schemaChain?new Map:null;const f=new u.Mainstay(n,a,o);const d=r._ids._schemaChain?[{schema:r}]:null;const m=new c([],[],{mainstay:f,schemas:d});const h=t.validate(e,r,m,s);if(i){r.$_root.untrace()}const p=l.process(h.errors,e,s);return{value:h.value,error:p,mainstay:f}};u.tracer=function(e,t){if(e.$_root._tracer){return{tracer:e.$_root._tracer._register(e)}}if(t.debug){s(e.$_root.trace,"Debug mode not supported");return{tracer:e.$_root.trace()._register(e),cleanup:true}}return{tracer:u.ignore}};t.validate=function(e,t,r,s,n={}){if(t.$_terms.whens){t=t._generate(e,r,s).schema}if(t._preferences){s=u.prefs(t,s)}if(t._cache&&s.cache){const s=t._cache.get(e);r.mainstay.tracer.debug(r,"validate","cached",!!s);if(s){return s}}const createError=(n,i,a)=>t.$_createError(n,e,i,a||r,s);const i={original:e,prefs:s,schema:t,state:r,error:createError,errorsArray:u.errorsArray,warn:(e,t,s)=>r.mainstay.warnings.push(createError(e,t,s)),message:(n,i)=>t.$_createError("custom",e,i,r,s,{messages:n})};r.mainstay.tracer.entry(t,r);const a=t._definition;if(a.prepare&&e!==undefined&&s.convert){const t=a.prepare(e,i);if(t){r.mainstay.tracer.value(r,"prepare",e,t.value);if(t.errors){return u.finalize(t.value,[].concat(t.errors),i)}e=t.value}}if(a.coerce&&e!==undefined&&s.convert&&(!a.coerce.from||a.coerce.from.includes(typeof e))){const t=a.coerce.method(e,i);if(t){r.mainstay.tracer.value(r,"coerced",e,t.value);if(t.errors){return u.finalize(t.value,[].concat(t.errors),i)}e=t.value}}const l=t._flags.empty;if(l&&l.$_match(u.trim(e,t),r.nest(l),o.defaults)){r.mainstay.tracer.value(r,"empty",e,undefined);e=undefined}const c=n.presence||t._flags.presence||(t._flags._endedSwitch?null:s.presence);if(e===undefined){if(c==="forbidden"){return u.finalize(e,null,i)}if(c==="required"){return u.finalize(e,[t.$_createError("any.required",e,null,r,s)],i)}if(c==="optional"){if(t._flags.default!==o.symbols.deepDefault){return u.finalize(e,null,i)}r.mainstay.tracer.value(r,"default",e,{});e={}}}else if(c==="forbidden"){return u.finalize(e,[t.$_createError("any.unknown",e,null,r,s)],i)}const f=[];if(t._valids){const n=t._valids.get(e,r,s,t._flags.insensitive);if(n){if(s.convert){r.mainstay.tracer.value(r,"valids",e,n.value);e=n.value}r.mainstay.tracer.filter(t,r,"valid",n);return u.finalize(e,null,i)}if(t._flags.only){const n=t.$_createError("any.only",e,{valids:t._valids.values({display:true})},r,s);if(s.abortEarly){return u.finalize(e,[n],i)}f.push(n)}}if(t._invalids){const n=t._invalids.get(e,r,s,t._flags.insensitive);if(n){r.mainstay.tracer.filter(t,r,"invalid",n);const a=t.$_createError("any.invalid",e,{invalids:t._invalids.values({display:true})},r,s);if(s.abortEarly){return u.finalize(e,[a],i)}f.push(a)}}if(a.validate){const t=a.validate(e,i);if(t){r.mainstay.tracer.value(r,"base",e,t.value);e=t.value;if(t.errors){if(!Array.isArray(t.errors)){f.push(t.errors);return u.finalize(e,f,i)}if(t.errors.length){f.push(...t.errors);return u.finalize(e,f,i)}}}}if(!t._rules.length){return u.finalize(e,f,i)}return u.rules(e,f,i)};u.rules=function(e,t,r){const{schema:s,state:n,prefs:i}=r;for(const a of s._rules){const l=s._definition.rules[a.method];if(l.convert&&i.convert){n.mainstay.tracer.log(s,n,"rule",a.name,"full");continue}let c;let f=a.args;if(a._resolve.length){f=Object.assign({},f);for(const t of a._resolve){const r=l.argsByName.get(t);const a=f[t].resolve(e,n,i);const u=r.normalize?r.normalize(a):a;const d=o.validateArg(u,null,r);if(d){c=s.$_createError("any.ref",a,{arg:t,ref:f[t],reason:d},n,i);break}f[t]=u}}c=c||l.validate(e,r,f,a);const d=u.rule(c,a);if(d.errors){n.mainstay.tracer.log(s,n,"rule",a.name,"error");if(a.warn){n.mainstay.warnings.push(...d.errors);continue}if(i.abortEarly){return u.finalize(e,d.errors,r)}t.push(...d.errors)}else{n.mainstay.tracer.log(s,n,"rule",a.name,"pass");n.mainstay.tracer.value(n,"rule",e,d.value,a.name);e=d.value}}return u.finalize(e,t,r)};u.rule=function(e,t){if(e instanceof l.Report){u.error(e,t);return{errors:[e],value:null}}if(Array.isArray(e)&&e[o.symbols.errors]){e.forEach((e=>u.error(e,t)));return{errors:e,value:null}}return{errors:null,value:e}};u.error=function(e,t){if(t.message){e._setTemplate(t.message)}return e};u.finalize=function(e,t,r){t=t||[];const{schema:n,state:i,prefs:a}=r;if(t.length){const s=u.default("failover",undefined,t,r);if(s!==undefined){i.mainstay.tracer.value(i,"failover",e,s);e=s;t=[]}}if(t.length&&n._flags.error){if(typeof n._flags.error==="function"){t=n._flags.error(t);if(!Array.isArray(t)){t=[t]}for(const e of t){s(e instanceof Error||e instanceof l.Report,"error() must return an Error object")}}else{t=[n._flags.error]}}if(e===undefined){const s=u.default("default",e,t,r);i.mainstay.tracer.value(i,"default",e,s);e=s}if(n._flags.cast&&e!==undefined){const t=n._definition.cast[n._flags.cast];if(t.from(e)){const s=t.to(e,r);i.mainstay.tracer.value(i,"cast",e,s,n._flags.cast);e=s}}if(n.$_terms.externals&&a.externals&&a._externals!==false){for(const{method:e}of n.$_terms.externals){i.mainstay.externals.push({method:e,schema:n,state:i,label:l.label(n._flags,i,a)})}}const o={value:e,errors:t.length?t:null};if(n._flags.result){o.value=n._flags.result==="strip"?undefined:r.original;i.mainstay.tracer.value(i,n._flags.result,e,o.value);i.shadow(e,n._flags.result)}if(n._cache&&a.cache!==false&&!n._refs.length){n._cache.set(r.original,o)}if(e!==undefined&&!o.errors&&n._flags.artifact!==undefined){i.mainstay.artifacts=i.mainstay.artifacts||new Map;if(!i.mainstay.artifacts.has(n._flags.artifact)){i.mainstay.artifacts.set(n._flags.artifact,[])}i.mainstay.artifacts.get(n._flags.artifact).push(i.path)}return o};u.prefs=function(e,t){const r=t===o.defaults;if(r&&e._preferences[o.symbols.prefs]){return e._preferences[o.symbols.prefs]}t=o.preferences(t,e._preferences);if(r){e._preferences[o.symbols.prefs]=t}return t};u.default=function(e,t,r,s){const{schema:i,state:a,prefs:l}=s;const c=i._flags[e];if(l.noDefaults||c===undefined){return t}a.mainstay.tracer.log(i,a,"rule",e,"full");if(!c){return c}if(typeof c==="function"){const t=c.length?[n(a.ancestors[0]),s]:[];try{return c(...t)}catch(t){r.push(i.$_createError(`any.${e}`,null,{error:t},a,l));return}}if(typeof c!=="object"){return c}if(c[o.symbols.literal]){return c.literal}if(o.isResolvable(c)){return c.resolve(t,a,l)}return n(c)};u.trim=function(e,t){if(typeof e!=="string"){return e}const r=t.$_getRule("trim");if(!r||!r.args.enabled){return e}return e.trim()};u.ignore={active:false,debug:i,entry:i,filter:i,log:i,resolve:i,value:i};u.errorsArray=function(){const e=[];e[o.symbols.errors]=true;return e}},1944:function(e,t,r){const s=r(2718);const n=r(5801);const i=r(2448);const a={};e.exports=a.Values=class{constructor(e,t){this._values=new Set(e);this._refs=new Set(t);this._lowercase=a.lowercases(e);this._override=false}get length(){return this._values.size+this._refs.size}add(e,t){if(i.isResolvable(e)){if(!this._refs.has(e)){this._refs.add(e);if(t){t.register(e)}}return}if(!this.has(e,null,null,false)){this._values.add(e);if(typeof e==="string"){this._lowercase.set(e.toLowerCase(),e)}}}static merge(e,t,r){e=e||new a.Values;if(t){if(t._override){return t.clone()}for(const r of[...t._values,...t._refs]){e.add(r)}}if(r){for(const t of[...r._values,...r._refs]){e.remove(t)}}return e.length?e:null}remove(e){if(i.isResolvable(e)){this._refs.delete(e);return}this._values.delete(e);if(typeof e==="string"){this._lowercase.delete(e.toLowerCase())}}has(e,t,r,s){return!!this.get(e,t,r,s)}get(e,t,r,s){if(!this.length){return false}if(this._values.has(e)){return{value:e}}if(typeof e==="string"&&e&&s){const t=this._lowercase.get(e.toLowerCase());if(t){return{value:t}}}if(!this._refs.size&&typeof e!=="object"){return false}if(typeof e==="object"){for(const t of this._values){if(n(t,e)){return{value:t}}}}if(t){for(const i of this._refs){const a=i.resolve(e,t,r,null,{in:true});if(a===undefined){continue}const o=!i.in||typeof a!=="object"?[a]:Array.isArray(a)?a:Object.keys(a);for(const t of o){if(typeof t!==typeof e){continue}if(s&&e&&typeof e==="string"){if(t.toLowerCase()===e.toLowerCase()){return{value:t,ref:i}}}else{if(n(t,e)){return{value:t,ref:i}}}}}}return false}override(){this._override=true}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs]){if(t!==undefined){e.push(t)}}return e}return Array.from([...this._values,...this._refs])}clone(){const e=new a.Values(this._values,this._refs);e._override=this._override;return e}concat(e){s(!e._override,"Cannot concat override set of values");const t=new a.Values([...this._values,...e._values],[...this._refs,...e._refs]);t._override=this._override;return t}describe(){const e=[];if(this._override){e.push({override:true})}for(const t of this._values.values()){e.push(t&&typeof t==="object"?{value:t}:t)}for(const t of this._refs.values()){e.push(t.describe())}return e}};a.Values.prototype[i.symbols.values]=true;a.Values.prototype.slice=a.Values.prototype.clone;a.lowercases=function(e){const t=new Map;if(e){for(const r of e){if(typeof r==="string"){t.set(r.toLowerCase(),r)}}}return t}},1846:function(e,t,r){const s=r(2718);const n={};t.Sorter=class{constructor(){this._items=[];this.nodes=[]}add(e,t){t=t||{};const r=[].concat(t.before||[]);const n=[].concat(t.after||[]);const i=t.group||"?";const a=t.sort||0;s(!r.includes(i),`Item cannot come before itself: ${i}`);s(!r.includes("?"),"Item cannot come before unassociated items");s(!n.includes(i),`Item cannot come after itself: ${i}`);s(!n.includes("?"),"Item cannot come after unassociated items");if(!Array.isArray(e)){e=[e]}for(const t of e){const e={seq:this._items.length,sort:a,before:r,after:n,group:i,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();s(e,"item",i!=="?"?`added into group ${i}`:"","created a dependencies error")}return this.nodes}merge(e){if(!Array.isArray(e)){e=[e]}for(const t of e){if(t){for(const e of t._items){this._items.push(Object.assign({},e))}}}this._items.sort(n.mergeSort);for(let e=0;e<this._items.length;++e){this._items[e].seq=e}const t=this._sort();s(t,"merge created a dependencies error");return this.nodes}sort(){const e=this._sort();s(e,"sort created a dependencies error");return this.nodes}_sort(){const e={};const t=Object.create(null);const r=Object.create(null);for(const s of this._items){const n=s.seq;const i=s.group;r[i]=r[i]||[];r[i].push(n);e[n]=s.before;for(const e of s.after){t[e]=t[e]||[];t[e].push(n)}}for(const t in e){const s=[];for(const n in e[t]){const i=e[t][n];r[i]=r[i]||[];s.push(...r[i])}e[t]=s}for(const s in t){if(r[s]){for(const n of r[s]){e[n].push(...t[s])}}}const s={};for(const t in e){const r=e[t];for(const e of r){s[e]=s[e]||[];s[e].push(t)}}const n={};const i=[];for(let e=0;e<this._items.length;++e){let t=e;if(s[e]){t=null;for(let e=0;e<this._items.length;++e){if(n[e]===true){continue}if(!s[e]){s[e]=[]}const r=s[e].length;let i=0;for(let t=0;t<r;++t){if(n[s[e][t]]){++i}}if(i===r){t=e;break}}}if(t!==null){n[t]=true;i.push(t)}}if(i.length!==this._items.length){return false}const a={};for(const e of this._items){a[e.seq]=e}this._items=[];this.nodes=[];for(const e of i){const t=a[e];this.nodes.push(t.node);this._items.push(t)}return true}};n.mergeSort=(e,t)=>e.sort===t.sort?0:e.sort<t.sort?-1:1},7310:function(e){e.exports=require("url")},3837:function(e){e.exports=require("util")},7045:function(e){e.exports=JSON.parse('{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause"}')}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var i=true;try{e[r](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(918);module.exports=r})();
|