@mappedin/react-sdk 6.0.1-beta.52 → 6.0.1-beta.53
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/lib/esm/GLTFExporter-W4OR66GG.js +1 -0
- package/lib/esm/GLTFLoader-CWW4SC4X.js +1 -0
- package/lib/esm/browser-6HMQAV4T.js +1 -0
- package/lib/esm/chunk-2LTL6ZVN.js +1 -0
- package/lib/esm/chunk-5SHMBNLX.js +1 -0
- package/lib/esm/chunk-6X6EHSZ7.js +1 -0
- package/lib/esm/chunk-B7NHRA7S.js +1 -0
- package/lib/esm/chunk-L6SCRGG4.js +1 -0
- package/lib/esm/chunk-PEDEW3M6.js +1 -0
- package/lib/esm/chunk-WVB6PZOJ.js +1 -0
- package/lib/esm/chunk-YGXQDTMT.js +1 -0
- package/lib/esm/dist-NFOUUHU5.js +1 -0
- package/lib/esm/index.d.ts +580 -468
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-DPNZIY36.js +1 -0
- package/lib/esm/internal-A2RG32A3.js +1 -0
- package/lib/esm/outdoor-context-v4-FKKIRNTV.js +1 -0
- package/lib/esm/roboto-regular-3HSVPIGX.js +1 -0
- package/lib/esm/text3d-ZRYODT3I.js +1 -0
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-JCFGXXW5.js +0 -1
- package/lib/esm/GLTFLoader-GIMAVLLC.js +0 -1
- package/lib/esm/browser-FQUMJJAZ.js +0 -1
- package/lib/esm/chunk-6FBLH5OZ.js +0 -1
- package/lib/esm/chunk-C7Z2BO6A.js +0 -1
- package/lib/esm/chunk-ESMYGLKP.js +0 -1
- package/lib/esm/chunk-G6JMXRIH.js +0 -1
- package/lib/esm/chunk-I5JALQAT.js +0 -1
- package/lib/esm/chunk-TOAWRDBC.js +0 -1
- package/lib/esm/chunk-WHD5UHOT.js +0 -1
- package/lib/esm/dist-CQQ2UWYH.js +0 -1
- package/lib/esm/inspector-QLDKCE66.js +0 -1
- package/lib/esm/internal-CBTUOG7Q.js +0 -1
- package/lib/esm/outdoor-context-v4-EIE6B6TE.js +0 -1
- package/lib/esm/text3d-NII2JXSR.js +0 -1
package/lib/esm/dist-CQQ2UWYH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v1}from"./chunk-I5JALQAT.js";import{a as S,b as Y,c as o,d as ma,e as Yo,f as G,g as go,h as mu,i as H,j as He,k as Io,l as rs,n as h,o as bh,p as C,q as c}from"./chunk-ESMYGLKP.js";var cs=G(Me=>{"use strict";c();Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var Xu=class Xu{};o(Xu,"_CodeOrName");var ss=Xu;Me._CodeOrName=ss;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Qu=class Qu extends ss{constructor(t){if(super(),!Me.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};o(Qu,"Name");var xo=Qu;Me.Name=xo;var ep=class ep extends ss{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>"".concat(r).concat(n),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof xo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};o(ep,"_Code");var br=ep;Me._Code=br;Me.nil=new br("");function Eh(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Yu(r,t[n]),r.push(e[++n]);return new br(r)}o(Eh,"_");Me._=Eh;var Ju=new br("+");function Th(e,...t){let r=[as(e[0])],n=0;for(;n<t.length;)r.push(Ju),Yu(r,t[n]),r.push(Ju,as(e[++n]));return z1(r),new br(r)}o(Th,"str");Me.str=Th;function Yu(e,t){t instanceof br?e.push(...t._items):t instanceof xo?e.push(t):e.push(V1(t))}o(Yu,"addCodeArg");Me.addCodeArg=Yu;function z1(e){let t=1;for(;t<e.length-1;){if(e[t]===Ju){let r=G1(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}o(z1,"optimize");function G1(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof xo||e[e.length-1]!=='"'?void 0:typeof t!="string"?"".concat(e.slice(0,-1)).concat(t,'"'):t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof xo))return'"'.concat(e).concat(t.slice(1))}o(G1,"mergeExprItems");var Fh;function B1(e,t){return t.emptyStr()?e:e.emptyStr()?t:Th(Fh||(Fh=h(["","",""])),e,t)}o(B1,"strConcat");Me.strConcat=B1;function V1(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:as(Array.isArray(e)?e.join(","):e)}o(V1,"interpolate");function W1(e){return new br(as(e))}o(W1,"stringify");Me.stringify=W1;function as(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o(as,"safeStringify");Me.safeStringify=as;var Sh;function H1(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new br(".".concat(e)):Eh(Sh||(Sh=h(["[","]"])),e)}o(H1,"getProperty");Me.getProperty=H1;function Z1(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new br("".concat(e));throw new Error("CodeGen: invalid export name: ".concat(e,", use explicit $id name mapping"))}o(Z1,"getEsmExportName");Me.getEsmExportName=Z1;function J1(e){return new br(e.toString())}o(J1,"regexpCode");Me.regexpCode=J1});var ap=G(ir=>{"use strict";c();Object.defineProperty(ir,"__esModule",{value:!0});ir.ValueScope=ir.ValueScopeName=ir.Scope=ir.varKinds=ir.UsedValueState=void 0;var or=cs(),np=class np extends Error{constructor(t){super('CodeGen: "code" for '.concat(t," not defined")),this.value=t.value}};o(np,"ValueError");var tp=np,Va;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Va||(ir.UsedValueState=Va={}));ir.varKinds={const:new or.Name("const"),let:new or.Name("let"),var:new or.Name("var")};var op=class op{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof or.Name?t:this.name(t)}name(t){return new or.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return"".concat(t).concat(r.index++)}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error('CodeGen: prefix "'.concat(t,'" is not allowed in this scope'));return this._names[t]={prefix:t,index:0}}};o(op,"Scope");var Wa=op;ir.Scope=Wa;var vh,ip=class ip extends or.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,or._)(vh||(vh=h([".","[","]"])),new or.Name(r),n)}};o(ip,"ValueScopeName");var Ha=ip;ir.ValueScopeName=Ha;var Ah,Y1=(0,or._)(Ah||(Ah=h(["\n"],["\\n"]))),jh,kh,_h,sp=class sp extends Wa{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts=Y(S({},t),{_n:t.lines?Y1:or.nil})}get(){return this._scope}name(t){return new Ha(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,f=this._values[s];if(f){let l=f.get(a);if(l)return l}else f=this._values[s]=new Map;f.set(a,i);let p=this._scope[s]||(this._scope[s]=[]),d=p.length;return p[d]=r.ref,i.setValue(r,{property:s,itemIndex:d}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error('CodeGen: name "'.concat(n,'" has no value'));return(0,or._)(jh||(jh=h(["","",""])),t,n.scopePath)})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error('CodeGen: name "'.concat(i,'" has no value'));return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=or.nil;for(let a in t){let f=t[a];if(!f)continue;let p=n[a]=n[a]||new Map;f.forEach(d=>{if(p.has(d))return;p.set(d,Va.Started);let l=r(d);if(l){let m=this.opts.es5?ir.varKinds.var:ir.varKinds.const;s=(0,or._)(kh||(kh=h(["",""," "," = ",";",""])),s,m,d,l,this.opts._n)}else if(l=i==null?void 0:i(d))s=(0,or._)(_h||(_h=h(["","","",""])),s,l,this.opts._n);else throw new tp(d);p.set(d,Va.Completed)})}return s}};o(sp,"ValueScope");var rp=sp;ir.ValueScope=rp});var me=G(ye=>{"use strict";c();Object.defineProperty(ye,"__esModule",{value:!0});ye.or=ye.and=ye.not=ye.CodeGen=ye.operators=ye.varKinds=ye.ValueScopeName=ye.ValueScope=ye.Scope=ye.Name=ye.regexpCode=ye.stringify=ye.getProperty=ye.nil=ye.strConcat=ye.str=ye._=void 0;var we=cs(),Dr=ap(),Yn=cs();Object.defineProperty(ye,"_",{enumerable:!0,get:o(function(){return Yn._},"get")});Object.defineProperty(ye,"str",{enumerable:!0,get:o(function(){return Yn.str},"get")});Object.defineProperty(ye,"strConcat",{enumerable:!0,get:o(function(){return Yn.strConcat},"get")});Object.defineProperty(ye,"nil",{enumerable:!0,get:o(function(){return Yn.nil},"get")});Object.defineProperty(ye,"getProperty",{enumerable:!0,get:o(function(){return Yn.getProperty},"get")});Object.defineProperty(ye,"stringify",{enumerable:!0,get:o(function(){return Yn.stringify},"get")});Object.defineProperty(ye,"regexpCode",{enumerable:!0,get:o(function(){return Yn.regexpCode},"get")});Object.defineProperty(ye,"Name",{enumerable:!0,get:o(function(){return Yn.Name},"get")});var Xa=ap();Object.defineProperty(ye,"Scope",{enumerable:!0,get:o(function(){return Xa.Scope},"get")});Object.defineProperty(ye,"ValueScope",{enumerable:!0,get:o(function(){return Xa.ValueScope},"get")});Object.defineProperty(ye,"ValueScopeName",{enumerable:!0,get:o(function(){return Xa.ValueScopeName},"get")});Object.defineProperty(ye,"varKinds",{enumerable:!0,get:o(function(){return Xa.varKinds},"get")});ye.operators={GT:new we._Code(">"),GTE:new we._Code(">="),LT:new we._Code("<"),LTE:new we._Code("<="),EQ:new we._Code("==="),NEQ:new we._Code("!=="),NOT:new we._Code("!"),OR:new we._Code("||"),AND:new we._Code("&&"),ADD:new we._Code("+")};var bp=class bp{optimizeNodes(){return this}optimizeNames(t,r){return this}};o(bp,"Node");var Sn=bp,$p=class $p extends Sn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Dr.varKinds.var:this.varKind,i=this.rhs===void 0?"":" = ".concat(this.rhs);return"".concat(n," ").concat(this.name).concat(i,";")+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=ei(this.rhs,t,r)),this}get names(){return this.rhs instanceof we._CodeOrName?this.rhs.names:{}}};o($p,"Def");var cp=$p,wp=class wp extends Sn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return"".concat(this.lhs," = ").concat(this.rhs,";")+t}optimizeNames(t,r){if(!(this.lhs instanceof we.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=ei(this.rhs,t,r),this}get names(){let t=this.lhs instanceof we.Name?{}:S({},this.lhs.names);return Ya(t,this.rhs)}};o(wp,"Assign");var Za=wp,Pp=class Pp extends Za{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}};o(Pp,"AssignOp");var fp=Pp,Op=class Op extends Sn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return"".concat(this.label,":")+t}};o(Op,"Label");var up=Op,Fp=class Fp extends Sn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){let r=this.label?" ".concat(this.label):"";return"break".concat(r,";")+t}};o(Fp,"Break");var pp=Fp,Sp=class Sp extends Sn{constructor(t){super(),this.error=t}render({_n:t}){return"throw ".concat(this.error,";")+t}get names(){return this.error.names}};o(Sp,"Throw");var lp=Sp,Ep=class Ep extends Sn{constructor(t){super(),this.code=t}render({_n:t}){return"".concat(this.code,";")+t}optimizeNodes(){return"".concat(this.code)?this:void 0}optimizeNames(t,r){return this.code=ei(this.code,t,r),this}get names(){return this.code instanceof we._CodeOrName?this.code.names:{}}};o(Ep,"AnyCode");var dp=Ep,Tp=class Tp extends Sn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(X1(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>wo(t,r.names),{})}};o(Tp,"ParentNode");var fs=Tp,vp=class vp extends fs{render(t){return"{"+t._n+super.render(t)+"}"+t._n}};o(vp,"BlockNode");var En=vp,Ap=class Ap extends fs{};o(Ap,"Root");var mp=Ap,jp=class jp extends En{};o(jp,"Else");var Qo=jp;Qo.kind="else";var Xo=class Xo extends En{constructor(t,r){super(r),this.condition=t}render(t){let r="if(".concat(this.condition,")")+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Qo(n):n}if(r)return t===!1?r instanceof Xo?r:r.nodes:this.nodes.length?this:new Xo(Dh(t),r instanceof Xo?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ei(this.condition,t,r),this}get names(){let t=super.names;return Ya(t,this.condition),this.else&&wo(t,this.else.names),t}};o(Xo,"If");var bo=Xo;bo.kind="if";var kp=class kp extends En{};o(kp,"For");var $o=kp;$o.kind="for";var _p=class _p extends $o{constructor(t){super(),this.iteration=t}render(t){return"for(".concat(this.iteration,")")+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=ei(this.iteration,t,r),this}get names(){return wo(super.names,this.iteration.names)}};o(_p,"ForLoop");var yp=_p,Np=class Np extends $o{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Dr.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return"for(".concat(r," ").concat(n,"=").concat(i,"; ").concat(n,"<").concat(s,"; ").concat(n,"++)")+super.render(t)}get names(){let t=Ya(super.names,this.from);return Ya(t,this.to)}};o(Np,"ForRange");var hp=Np,Rp=class Rp extends $o{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=ei(this.iterable,t,r),this}get names(){return wo(super.names,this.iterable.names)}};o(Rp,"ForIter");var Ja=Rp,Cp=class Cp extends En{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){let r=this.async?"async ":"";return"".concat(r,"function ").concat(this.name,"(").concat(this.args,")")+super.render(t)}};o(Cp,"Func");var us=Cp;us.kind="func";var Mp=class Mp extends fs{render(t){return"return "+super.render(t)}};o(Mp,"Return");var ps=Mp;ps.kind="return";var Lp=class Lp extends En{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&wo(t,this.catch.names),this.finally&&wo(t,this.finally.names),t}};o(Lp,"Try");var gp=Lp,Up=class Up extends En{constructor(t){super(),this.error=t}render(t){return"catch(".concat(this.error,")")+super.render(t)}};o(Up,"Catch");var ls=Up;ls.kind="catch";var Dp=class Dp extends En{render(t){return"finally"+super.render(t)}};o(Dp,"Finally");var ds=Dp;ds.kind="finally";var Nh,Rh,Ch,qp=class qp{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Y(S({},r),{_n:r.lines?"\n":""}),this._extScope=t,this._scope=new Dr.Scope({parent:t}),this._nodes=[new mp]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new cp(t,s,n)),s}const(t,r,n){return this._def(Dr.varKinds.const,t,r,n)}let(t,r,n){return this._def(Dr.varKinds.let,t,r,n)}var(t,r,n){return this._def(Dr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Za(t,r,n))}add(t,r){return this._leafNode(new fp(t,ye.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==we.nil&&this._leafNode(new dp(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,we.addCodeArg)(r,i));return r.push("}"),new we._Code(r)}if(t,r,n){if(this._blockNode(new bo(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new bo(t))}else(){return this._elseNode(new Qo)}endIf(){return this._endBlockNode(bo,Qo)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new yp(t),r)}forRange(t,r,n,i,s=this.opts.es5?Dr.varKinds.var:Dr.varKinds.let){let a=this._scope.toName(t);return this._for(new hp(s,a,r,n),()=>i(a))}forOf(t,r,n,i=Dr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let a=r instanceof we.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,we._)(Nh||(Nh=h(["",".length"])),a),f=>{this.var(s,(0,we._)(Rh||(Rh=h(["","[","]"])),a,f)),n(s)})}return this._for(new Ja("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?Dr.varKinds.var:Dr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,we._)(Ch||(Ch=h(["Object.keys(",")"])),r),n);let s=this._scope.toName(t);return this._for(new Ja("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode($o)}label(t){return this._leafNode(new up(t))}break(t){return this._leafNode(new pp(t))}return(t){let r=new ps;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ps)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gp;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new ls(s),r(s)}return n&&(this._currNode=i.finally=new ds,this.code(n)),this._endBlockNode(ls,ds)}throw(t){return this._leafNode(new lp(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error("CodeGen: wrong number of nodes: ".concat(n," vs ").concat(t," expected"));return this._nodes.length=r,this}func(t,r=we.nil,n,i){return this._blockNode(new us(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(us)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(r?"".concat(t.kind,"/").concat(r.kind):t.kind,'"'))}_elseNode(t){let r=this._currNode;if(!(r instanceof bo))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};o(qp,"CodeGen");var Ip=qp;ye.CodeGen=Ip;function wo(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}o(wo,"addNames");function Ya(e,t){return t instanceof we._CodeOrName?wo(e,t.names):e}o(Ya,"addExprNames");function ei(e,t,r){if(e instanceof we.Name)return n(e);if(!i(e))return e;return new we._Code(e._items.reduce((s,a)=>(a instanceof we.Name&&(a=n(a)),a instanceof we._Code?s.push(...a._items):s.push(a),s),[]));function n(s){let a=r[s.str];return a===void 0||t[s.str]!==1?s:(delete t[s.str],a)}function i(s){return s instanceof we._Code&&s._items.some(a=>a instanceof we.Name&&t[a.str]===1&&r[a.str]!==void 0)}}o(ei,"optimizeExpr");function X1(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}o(X1,"subtractNames");var Mh;function Dh(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,we._)(Mh||(Mh=h(["!",""])),xp(e))}o(Dh,"not");ye.not=Dh;var Q1=qh(ye.operators.AND);function ev(...e){return e.reduce(Q1)}o(ev,"and");ye.and=ev;var tv=qh(ye.operators.OR);function rv(...e){return e.reduce(tv)}o(rv,"or");ye.or=rv;var Lh;function qh(e){return(t,r)=>t===we.nil?r:r===we.nil?t:(0,we._)(Lh||(Lh=h([""," "," ",""])),xp(t),e,xp(r))}o(qh,"mappend");var Uh;function xp(e){return e instanceof we.Name?e:(0,we._)(Uh||(Uh=h(["(",")"])),e)}o(xp,"par")});var Le=G(ge=>{"use strict";c();Object.defineProperty(ge,"__esModule",{value:!0});ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;var Xe=me(),nv=cs();function ov(e){let t={};for(let r of e)t[r]=!0;return t}o(ov,"toHash");ge.toHash=ov;function iv(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(cg(e,t),!fg(t,e.self.RULES.all))}o(iv,"alwaysValidSchema");ge.alwaysValidSchema=iv;function cg(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||lg(e,'unknown keyword: "'.concat(s,'"'))}o(cg,"checkUnknownRules");ge.checkUnknownRules=cg;function fg(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}o(fg,"schemaHasRules");ge.schemaHasRules=fg;function sv(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}o(sv,"schemaHasRulesButRef");ge.schemaHasRulesButRef=sv;var Gh,Bh;function av({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Xe._)(Gh||(Gh=h(["",""])),r)}return(0,Xe._)(Bh||(Bh=h(["","","",""])),e,t,(0,Xe.getProperty)(n))}o(av,"schemaRefOrVal");ge.schemaRefOrVal=av;function cv(e){return ug(decodeURIComponent(e))}o(cv,"unescapeFragment");ge.unescapeFragment=cv;function fv(e){return encodeURIComponent(zp(e))}o(fv,"escapeFragment");ge.escapeFragment=fv;function zp(e){return typeof e=="number"?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")}o(zp,"escapeJsonPointer");ge.escapeJsonPointer=zp;function ug(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}o(ug,"unescapeJsonPointer");ge.unescapeJsonPointer=ug;function uv(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}o(uv,"eachItem");ge.eachItem=uv;function Kh({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,a,f)=>{let p=a===void 0?s:a instanceof Xe.Name?(s instanceof Xe.Name?e(i,s,a):t(i,s,a),a):s instanceof Xe.Name?(t(i,a,s),s):r(s,a);return f===Xe.Name&&!(p instanceof Xe.Name)?n(i,p):p}}o(Kh,"makeMergeEvaluated");var Vh,Wh,Hh,Zh,Jh,Yh,Xh,Qh,eg,tg;ge.mergeEvaluated={props:Kh({mergeNames:o((e,t,r)=>e.if((0,Xe._)(Vh||(Vh=h([""," !== true && "," !== undefined"])),r,t),()=>{e.if((0,Xe._)(Wh||(Wh=h([""," === true"])),t),()=>e.assign(r,!0),()=>e.assign(r,(0,Xe._)(Hh||(Hh=h([""," || {}"])),r)).code((0,Xe._)(Zh||(Zh=h(["Object.assign(",", ",")"])),r,t)))}),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,Xe._)(Jh||(Jh=h([""," !== true"])),r),()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Xe._)(Yh||(Yh=h([""," || {}"])),r)),Gp(e,r,t))}),"mergeToName"),mergeValues:o((e,t)=>e===!0?!0:S(S({},e),t),"mergeValues"),resultToName:pg}),items:Kh({mergeNames:o((e,t,r)=>e.if((0,Xe._)(Xh||(Xh=h([""," !== true && "," !== undefined"])),r,t),()=>e.assign(r,(0,Xe._)(Qh||(Qh=h([""," === true ? true : "," > "," ? "," : ",""])),t,r,t,r,t))),"mergeNames"),mergeToName:o((e,t,r)=>e.if((0,Xe._)(eg||(eg=h([""," !== true"])),r),()=>e.assign(r,t===!0?!0:(0,Xe._)(tg||(tg=h([""," > "," ? "," : ",""])),r,t,r,t))),"mergeToName"),mergeValues:o((e,t)=>e===!0?!0:Math.max(e,t),"mergeValues"),resultToName:o((e,t)=>e.var("items",t),"resultToName")})};var rg;function pg(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Xe._)(rg||(rg=h(["{}"]))));return t!==void 0&&Gp(e,r,t),r}o(pg,"evaluatedPropsToName");ge.evaluatedPropsToName=pg;var ng;function Gp(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Xe._)(ng||(ng=h(["","",""])),t,(0,Xe.getProperty)(n)),!0))}o(Gp,"setEvaluated");ge.setEvaluated=Gp;var zh={};function pv(e,t){return e.scopeValue("func",{ref:t,code:zh[t.code]||(zh[t.code]=new nv._Code(t.code))})}o(pv,"useFunc");ge.useFunc=pv;var Kp;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Kp||(ge.Type=Kp={}));var og,ig,sg,ag;function lv(e,t,r){if(e instanceof Xe.Name){let n=t===Kp.Num;return r?n?(0,Xe._)(og||(og=h(['"[" + ',' + "]"'])),e):(0,Xe._)(ig||(ig=h(['"[\'" + ',' + "\']"'])),e):n?(0,Xe._)(sg||(sg=h(['"/" + ',""])),e):(0,Xe._)(ag||(ag=h(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),e)}return r?(0,Xe.getProperty)(e).toString():"/"+zp(e)}o(lv,"getErrorPath");ge.getErrorPath=lv;function lg(e,t,r=e.opts.strictSchema){if(r){if(t="strict mode: ".concat(t),r===!0)throw new Error(t);e.self.logger.warn(t)}}o(lg,"checkStrictMode");ge.checkStrictMode=lg});var Tn=G(Bp=>{"use strict";c();Object.defineProperty(Bp,"__esModule",{value:!0});var Dt=me(),dv={data:new Dt.Name("data"),valCxt:new Dt.Name("valCxt"),instancePath:new Dt.Name("instancePath"),parentData:new Dt.Name("parentData"),parentDataProperty:new Dt.Name("parentDataProperty"),rootData:new Dt.Name("rootData"),dynamicAnchors:new Dt.Name("dynamicAnchors"),vErrors:new Dt.Name("vErrors"),errors:new Dt.Name("errors"),this:new Dt.Name("this"),self:new Dt.Name("self"),scope:new Dt.Name("scope"),json:new Dt.Name("json"),jsonPos:new Dt.Name("jsonPos"),jsonLen:new Dt.Name("jsonLen"),jsonPart:new Dt.Name("jsonPart")};Bp.default=dv});var ms=G(qt=>{"use strict";c();Object.defineProperty(qt,"__esModule",{value:!0});qt.extendErrors=qt.resetErrorsCount=qt.reportExtraError=qt.reportError=qt.keyword$DataError=qt.keywordError=void 0;var ve=me(),Qa=Le(),Yt=Tn(),dg;qt.keywordError={message:o(({keyword:e})=>(0,ve.str)(dg||(dg=h(['must pass "','" keyword validation'])),e),"message")};var mg,yg;qt.keyword$DataError={message:o(({keyword:e,schemaType:t})=>t?(0,ve.str)(mg||(mg=h(['"','" keyword must be '," ($data)"])),e,t):(0,ve.str)(yg||(yg=h(['"','" keyword is invalid ($data)'])),e),"message")};var hg;function mv(e,t=qt.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:a,allErrors:f}=i,p=Dg(e,t,r);(n!=null?n:a||f)?Lg(s,p):Ug(i,(0,ve._)(hg||(hg=h(["[","]"])),p))}o(mv,"reportError");qt.reportError=mv;function yv(e,t=qt.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:a}=n,f=Dg(e,t,r);Lg(i,f),s||a||Ug(n,Yt.default.vErrors)}o(yv,"reportExtraError");qt.reportExtraError=yv;var gg,Ig;function hv(e,t){e.assign(Yt.default.errors,t),e.if((0,ve._)(gg||(gg=h([""," !== null"])),Yt.default.vErrors),()=>e.if(t,()=>e.assign((0,ve._)(Ig||(Ig=h(["",".length"])),Yt.default.vErrors),t),()=>e.assign(Yt.default.vErrors,null)))}o(hv,"resetErrorsCount");qt.resetErrorsCount=hv;var xg,bg,$g,wg,Pg,Og,Fg;function gv({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Yt.default.errors,f=>{e.const(a,(0,ve._)(xg||(xg=h(["","[","]"])),Yt.default.vErrors,f)),e.if((0,ve._)(bg||(bg=h(["",".instancePath === undefined"])),a),()=>e.assign((0,ve._)($g||($g=h(["",".instancePath"])),a),(0,ve.strConcat)(Yt.default.instancePath,s.errorPath))),e.assign((0,ve._)(wg||(wg=h(["",".schemaPath"])),a),(0,ve.str)(Pg||(Pg=h(["","/",""])),s.errSchemaPath,t)),s.opts.verbose&&(e.assign((0,ve._)(Og||(Og=h(["",".schema"])),a),r),e.assign((0,ve._)(Fg||(Fg=h(["",".data"])),a),n))})}o(gv,"extendErrors");qt.extendErrors=gv;var Sg,Eg,Tg,vg;function Lg(e,t){let r=e.const("err",t);e.if((0,ve._)(Sg||(Sg=h([""," === null"])),Yt.default.vErrors),()=>e.assign(Yt.default.vErrors,(0,ve._)(Eg||(Eg=h(["[","]"])),r)),(0,ve._)(Tg||(Tg=h(["",".push(",")"])),Yt.default.vErrors,r)),e.code((0,ve._)(vg||(vg=h(["","++"])),Yt.default.errors))}o(Lg,"addError");var Ag,jg;function Ug(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ve._)(Ag||(Ag=h(["new ","(",")"])),e.ValidationError,t)):(r.assign((0,ve._)(jg||(jg=h(["",".errors"])),n),t),r.return(!1))}o(Ug,"returnErrors");var Po={keyword:new ve.Name("keyword"),schemaPath:new ve.Name("schemaPath"),params:new ve.Name("params"),propertyName:new ve.Name("propertyName"),message:new ve.Name("message"),schema:new ve.Name("schema"),parentSchema:new ve.Name("parentSchema")},kg;function Dg(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ve._)(kg||(kg=h(["{}"]))):Iv(e,t,r)}o(Dg,"errorObjectCode");function Iv(e,t,r={}){let{gen:n,it:i}=e,s=[xv(i,r),bv(e,r)];return $v(e,t,s),n.object(...s)}o(Iv,"errorObject");var _g;function xv({errorPath:e},{instancePath:t}){let r=t?(0,ve.str)(_g||(_g=h(["","",""])),e,(0,Qa.getErrorPath)(t,Qa.Type.Str)):e;return[Yt.default.instancePath,(0,ve.strConcat)(Yt.default.instancePath,r)]}o(xv,"errorInstancePath");var Ng,Rg;function bv({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ve.str)(Ng||(Ng=h(["","/",""])),t,e);return r&&(i=(0,ve.str)(Rg||(Rg=h(["","",""])),i,(0,Qa.getErrorPath)(r,Qa.Type.Str))),[Po.schemaPath,i]}o(bv,"errorSchemaPath");var Cg,Mg;function $v(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:a,it:f}=e,{opts:p,propertyName:d,topSchemaRef:l,schemaPath:m}=f;n.push([Po.keyword,i],[Po.params,typeof t=="function"?t(e):t||(0,ve._)(Cg||(Cg=h(["{}"])))]),p.messages&&n.push([Po.message,typeof r=="function"?r(e):r]),p.verbose&&n.push([Po.schema,a],[Po.parentSchema,(0,ve._)(Mg||(Mg=h(["","",""])),l,m)],[Yt.default.data,s]),d&&n.push([Po.propertyName,d])}o($v,"extraErrorProps")});var zg=G(ti=>{"use strict";c();Object.defineProperty(ti,"__esModule",{value:!0});ti.boolOrEmptySchema=ti.topBoolOrEmptySchema=void 0;var wv=ms(),Pv=me(),Ov=Tn(),Fv={message:"boolean schema is false"},qg;function Sv(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Kg(e,!1):typeof r=="object"&&r.$async===!0?t.return(Ov.default.data):(t.assign((0,Pv._)(qg||(qg=h(["",".errors"])),n),null),t.return(!0))}o(Sv,"topBoolOrEmptySchema");ti.topBoolOrEmptySchema=Sv;function Ev(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Kg(e)):r.var(t,!0)}o(Ev,"boolOrEmptySchema");ti.boolOrEmptySchema=Ev;function Kg(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,wv.reportError)(i,Fv,void 0,t)}o(Kg,"falseSchemaError")});var Vp=G(ri=>{"use strict";c();Object.defineProperty(ri,"__esModule",{value:!0});ri.getRules=ri.isJSONType=void 0;var Tv=["string","number","integer","boolean","null","object","array"],vv=new Set(Tv);function Av(e){return typeof e=="string"&&vv.has(e)}o(Av,"isJSONType");ri.isJSONType=Av;function jv(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Y(S({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}o(jv,"getRules");ri.getRules=jv});var Wp=G(Xn=>{"use strict";c();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.shouldUseRule=Xn.shouldUseGroup=Xn.schemaHasRulesForType=void 0;function kv({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Gg(e,n)}o(kv,"schemaHasRulesForType");Xn.schemaHasRulesForType=kv;function Gg(e,t){return t.rules.some(r=>Bg(e,r))}o(Gg,"shouldUseGroup");Xn.shouldUseGroup=Gg;function Bg(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}o(Bg,"shouldUseRule");Xn.shouldUseRule=Bg});var ys=G(Kt=>{"use strict";c();Object.defineProperty(Kt,"__esModule",{value:!0});Kt.reportTypeError=Kt.checkDataTypes=Kt.checkDataType=Kt.coerceAndCheckDataType=Kt.getJSONTypes=Kt.getSchemaTypes=Kt.DataType=void 0;var _v=Vp(),Nv=Wp(),Rv=ms(),de=me(),FI=Le(),ni;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ni||(Kt.DataType=ni={}));function Cv(e){let t=SI(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}o(Cv,"getSchemaTypes");Kt.getSchemaTypes=Cv;function SI(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(_v.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}o(SI,"getJSONTypes");Kt.getJSONTypes=SI;function Mv(e,t){let{gen:r,data:n,opts:i}=e,s=Lv(t,i.coerceTypes),a=t.length>0&&!(s.length===0&&t.length===1&&(0,Nv.schemaHasRulesForType)(e,t[0]));if(a){let f=Zp(t,n,i.strictNumbers,ni.Wrong);r.if(f,()=>{s.length?Uv(e,t,s):Jp(e)})}return a}o(Mv,"coerceAndCheckDataType");Kt.coerceAndCheckDataType=Mv;var EI=new Set(["string","number","integer","boolean","null"]);function Lv(e,t){return t?e.filter(r=>EI.has(r)||t==="array"&&r==="array"):[]}o(Lv,"coerceToTypes");var Vg,Wg,Hg,Zg,Jg,Yg,Xg,Qg,eI,tI,rI,nI,oI,iI,sI,aI,cI,fI,uI,pI;function Uv(e,t,r){let{gen:n,data:i,opts:s}=e,a=n.let("dataType",(0,de._)(Vg||(Vg=h(["typeof ",""])),i)),f=n.let("coerced",(0,de._)(Wg||(Wg=h(["undefined"]))));s.coerceTypes==="array"&&n.if((0,de._)(Hg||(Hg=h([""," == 'object' && Array.isArray(",") && ",".length == 1"])),a,i,i),()=>n.assign(i,(0,de._)(Zg||(Zg=h(["","[0]"])),i)).assign(a,(0,de._)(Jg||(Jg=h(["typeof ",""])),i)).if(Zp(t,i,s.strictNumbers),()=>n.assign(f,i))),n.if((0,de._)(Yg||(Yg=h([""," !== undefined"])),f));for(let d of r)(EI.has(d)||d==="array"&&s.coerceTypes==="array")&&p(d);n.else(),Jp(e),n.endIf(),n.if((0,de._)(Xg||(Xg=h([""," !== undefined"])),f),()=>{n.assign(i,f),Dv(e,f)});function p(d){switch(d){case"string":n.elseIf((0,de._)(Qg||(Qg=h(["",' == "number" || ',' == "boolean"'])),a,a)).assign(f,(0,de._)(eI||(eI=h(['"" + ',""])),i)).elseIf((0,de._)(tI||(tI=h([""," === null"])),i)).assign(f,(0,de._)(rI||(rI=h(['""']))));return;case"number":n.elseIf((0,de._)(nI||(nI=h(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),a,i,a,i,i,i)).assign(f,(0,de._)(oI||(oI=h(["+",""])),i));return;case"integer":n.elseIf((0,de._)(iI||(iI=h(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),a,i,a,i,i,i,i)).assign(f,(0,de._)(sI||(sI=h(["+",""])),i));return;case"boolean":n.elseIf((0,de._)(aI||(aI=h(["",' === "false" || '," === 0 || "," === null"])),i,i,i)).assign(f,!1).elseIf((0,de._)(cI||(cI=h(["",' === "true" || '," === 1"])),i,i)).assign(f,!0);return;case"null":n.elseIf((0,de._)(fI||(fI=h(["",' === "" || '," === 0 || "," === false"])),i,i,i)),n.assign(f,null);return;case"array":n.elseIf((0,de._)(uI||(uI=h(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),a,a,a,i)).assign(f,(0,de._)(pI||(pI=h(["[","]"])),i))}}o(p,"coerceSpecificType")}o(Uv,"coerceData");var lI,dI;function Dv({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,de._)(lI||(lI=h([""," !== undefined"])),t),()=>e.assign((0,de._)(dI||(dI=h(["","[","]"])),t,r),n))}o(Dv,"assignParentData");var mI,yI,hI,gI,II,xI,bI;function Hp(e,t,r,n=ni.Correct){let i=n===ni.Correct?de.operators.EQ:de.operators.NEQ,s;switch(e){case"null":return(0,de._)(mI||(mI=h([""," "," null"])),t,i);case"array":s=(0,de._)(yI||(yI=h(["Array.isArray(",")"])),t);break;case"object":s=(0,de._)(hI||(hI=h([""," && typeof ",' == "object" && !Array.isArray(',")"])),t,t,t);break;case"integer":s=a((0,de._)(gI||(gI=h(["!("," % 1) && !isNaN(",")"])),t,t));break;case"number":s=a();break;default:return(0,de._)(II||(II=h(["typeof "," "," ",""])),t,i,e)}return n===ni.Correct?s:(0,de.not)(s);function a(f=de.nil){return(0,de.and)((0,de._)(xI||(xI=h(["typeof ",' == "number"'])),t),f,r?(0,de._)(bI||(bI=h(["isFinite(",")"])),t):de.nil)}}o(Hp,"checkDataType");Kt.checkDataType=Hp;var $I,wI;function Zp(e,t,r,n){if(e.length===1)return Hp(e[0],t,r,n);let i,s=(0,FI.toHash)(e);if(s.array&&s.object){let a=(0,de._)($I||($I=h(["typeof ",' != "object"'])),t);i=s.null?a:(0,de._)(wI||(wI=h(["!"," || ",""])),t,a),delete s.null,delete s.array,delete s.object}else i=de.nil;s.number&&delete s.integer;for(let a in s)i=(0,de.and)(i,Hp(a,t,r,n));return i}o(Zp,"checkDataTypes");Kt.checkDataTypes=Zp;var PI,OI,qv={message:o(({schema:e})=>"must be ".concat(e),"message"),params:o(({schema:e,schemaValue:t})=>typeof e=="string"?(0,de._)(PI||(PI=h(["{type: ","}"])),e):(0,de._)(OI||(OI=h(["{type: ","}"])),t),"params")};function Jp(e){let t=Kv(e);(0,Rv.reportError)(t,qv)}o(Jp,"reportTypeError");Kt.reportTypeError=Jp;function Kv(e){let{gen:t,data:r,schema:n}=e,i=(0,FI.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}o(Kv,"getTypeErrorContext")});var _I=G(ec=>{"use strict";c();Object.defineProperty(ec,"__esModule",{value:!0});ec.assignDefaults=void 0;var oi=me(),zv=Le();function Gv(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)TI(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>TI(e,s,i.default))}o(Gv,"assignDefaults");ec.assignDefaults=Gv;var vI,AI,jI,kI;function TI(e,t,r){let{gen:n,compositeRule:i,data:s,opts:a}=e;if(r===void 0)return;let f=(0,oi._)(vI||(vI=h(["","",""])),s,(0,oi.getProperty)(t));if(i){(0,zv.checkStrictMode)(e,"default is ignored for: ".concat(f));return}let p=(0,oi._)(AI||(AI=h([""," === undefined"])),f);a.useDefaults==="empty"&&(p=(0,oi._)(jI||(jI=h([""," || "," === null || ",' === ""'])),p,f,f)),n.if(p,(0,oi._)(kI||(kI=h([""," = ",""])),f,(0,oi.stringify)(r)))}o(TI,"assignDefault")});var $r=G(Ze=>{"use strict";c();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.validateUnion=Ze.validateArray=Ze.usePattern=Ze.callValidateCode=Ze.schemaProperties=Ze.allSchemaProperties=Ze.noPropertyInData=Ze.propertyInData=Ze.isOwnProperty=Ze.hasPropFunc=Ze.reportMissingProp=Ze.checkMissingProp=Ze.checkReportMissingProp=void 0;var nt=me(),Yp=Le(),Qn=Tn(),Bv=Le(),NI;function Vv(e,t){let{gen:r,data:n,it:i}=e;r.if(Qp(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,nt._)(NI||(NI=h(["",""])),t)},!0),e.error()})}o(Vv,"checkReportMissingProp");Ze.checkReportMissingProp=Vv;var RI;function Wv({gen:e,data:t,it:{opts:r}},n,i){return(0,nt.or)(...n.map(s=>(0,nt.and)(Qp(e,t,s,r.ownProperties),(0,nt._)(RI||(RI=h([""," = ",""])),i,s))))}o(Wv,"checkMissingProp");Ze.checkMissingProp=Wv;function Hv(e,t){e.setParams({missingProperty:t},!0),e.error()}o(Hv,"reportMissingProp");Ze.reportMissingProp=Hv;var CI;function ZI(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,nt._)(CI||(CI=h(["Object.prototype.hasOwnProperty"])))})}o(ZI,"hasPropFunc");Ze.hasPropFunc=ZI;var MI;function Xp(e,t,r){return(0,nt._)(MI||(MI=h(["",".call(",", ",")"])),ZI(e),t,r)}o(Xp,"isOwnProperty");Ze.isOwnProperty=Xp;var LI,UI;function Zv(e,t,r,n){let i=(0,nt._)(LI||(LI=h(["",""," !== undefined"])),t,(0,nt.getProperty)(r));return n?(0,nt._)(UI||(UI=h([""," && ",""])),i,Xp(e,t,r)):i}o(Zv,"propertyInData");Ze.propertyInData=Zv;var DI;function Qp(e,t,r,n){let i=(0,nt._)(DI||(DI=h(["",""," === undefined"])),t,(0,nt.getProperty)(r));return n?(0,nt.or)(i,(0,nt.not)(Xp(e,t,r))):i}o(Qp,"noPropertyInData");Ze.noPropertyInData=Qp;function JI(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}o(JI,"allSchemaProperties");Ze.allSchemaProperties=JI;function Jv(e,t){return JI(t).filter(r=>!(0,Yp.alwaysValidSchema)(e,t[r]))}o(Jv,"schemaProperties");Ze.schemaProperties=Jv;var qI,KI,zI,GI;function Yv({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:a},f,p,d){let l=d?(0,nt._)(qI||(qI=h(["",", ",", ","",""])),e,t,n,i):t,m=[[Qn.default.instancePath,(0,nt.strConcat)(Qn.default.instancePath,s)],[Qn.default.parentData,a.parentData],[Qn.default.parentDataProperty,a.parentDataProperty],[Qn.default.rootData,Qn.default.rootData]];a.opts.dynamicRef&&m.push([Qn.default.dynamicAnchors,Qn.default.dynamicAnchors]);let g=(0,nt._)(KI||(KI=h(["",", ",""])),l,r.object(...m));return p!==nt.nil?(0,nt._)(zI||(zI=h(["",".call(",", ",")"])),f,p,g):(0,nt._)(GI||(GI=h(["","(",")"])),f,g)}o(Yv,"callValidateCode");Ze.callValidateCode=Yv;var BI,Xv=(0,nt._)(BI||(BI=h(["new RegExp"]))),VI;function Qv({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,nt._)(VI||(VI=h(["","(",", ",")"])),i.code==="new RegExp"?Xv:(0,Bv.useFunc)(e,i),r,n)})}o(Qv,"usePattern");Ze.usePattern=Qv;var WI;function eA(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let f=t.let("valid",!0);return a(()=>t.assign(f,!1)),f}return t.var(s,!0),a(()=>t.break()),s;function a(f){let p=t.const("len",(0,nt._)(WI||(WI=h(["",".length"])),r));t.forRange("i",0,p,d=>{e.subschema({keyword:n,dataProp:d,dataPropType:Yp.Type.Num},s),t.if((0,nt.not)(s),f)})}o(a,"validateItems")}o(eA,"validateArray");Ze.validateArray=eA;var HI;function tA(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,Yp.alwaysValidSchema)(i,p))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),f=t.name("_valid");t.block(()=>r.forEach((p,d)=>{let l=e.subschema({keyword:n,schemaProp:d,compositeRule:!0},f);t.assign(a,(0,nt._)(HI||(HI=h([""," || ",""])),a,f)),e.mergeValidEvaluated(l,f)||t.if((0,nt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}o(tA,"validateUnion");Ze.validateUnion=tA});var fx=G(rn=>{"use strict";c();Object.defineProperty(rn,"__esModule",{value:!0});rn.validateKeywordUsage=rn.validSchemaType=rn.funcKeywordCode=rn.macroKeywordCode=void 0;var Xt=me(),Oo=Tn(),rA=$r(),nA=ms();function oA(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:a}=e,f=t.macro.call(a.self,i,s,a),p=cx(r,n,f);a.opts.validateSchema!==!1&&a.self.validateSchema(f,!0);let d=r.name("valid");e.subschema({schema:f,schemaPath:Xt.nil,errSchemaPath:"".concat(a.errSchemaPath,"/").concat(n),topSchemaRef:p,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}o(oA,"macroKeywordCode");rn.macroKeywordCode=oA;var XI,QI,ex,tx,rx,nx;function iA(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:a,$data:f,it:p}=e;aA(p,t);let d=!f&&t.compile?t.compile.call(p.self,s,a,p):t.validate,l=cx(n,i,d),m=n.let("valid");e.block$data(m,g),e.ok((r=t.valid)!==null&&r!==void 0?r:m);function g(){if(t.errors===!1)F(),t.modifying&&YI(e),w(()=>e.error());else{let O=t.async?b():P();t.modifying&&YI(e),w(()=>sA(e,O))}}o(g,"validateKeyword");function b(){let O=n.let("ruleErrs",null);return n.try(()=>F((0,Xt._)(XI||(XI=h(["await "])))),N=>n.assign(m,!1).if((0,Xt._)(QI||(QI=h([""," instanceof ",""])),N,p.ValidationError),()=>n.assign(O,(0,Xt._)(ex||(ex=h(["",".errors"])),N)),()=>n.throw(N))),O}o(b,"validateAsync");function P(){let O=(0,Xt._)(tx||(tx=h(["",".errors"])),l);return n.assign(O,null),F(Xt.nil),O}o(P,"validateSync");function F(O=t.async?(0,Xt._)(rx||(rx=h(["await "]))):Xt.nil){let N=p.opts.passContext?Oo.default.this:Oo.default.self,A=!("compile"in t&&!f||t.schema===!1);n.assign(m,(0,Xt._)(nx||(nx=h(["","",""])),O,(0,rA.callValidateCode)(e,l,N,A)),t.modifying)}o(F,"assignValid");function w(O){var N;n.if((0,Xt.not)((N=t.valid)!==null&&N!==void 0?N:m),O)}o(w,"reportErrs")}o(iA,"funcKeywordCode");rn.funcKeywordCode=iA;var ox;function YI(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Xt._)(ox||(ox=h(["","[","]"])),n.parentData,n.parentDataProperty)))}o(YI,"modifyData");var ix,sx,ax;function sA(e,t){let{gen:r}=e;r.if((0,Xt._)(ix||(ix=h(["Array.isArray(",")"])),t),()=>{r.assign(Oo.default.vErrors,(0,Xt._)(sx||(sx=h([""," === null ? "," : ",".concat(",")"])),Oo.default.vErrors,t,Oo.default.vErrors,t)).assign(Oo.default.errors,(0,Xt._)(ax||(ax=h(["",".length"])),Oo.default.vErrors)),(0,nA.extendErrors)(e)},()=>e.error())}o(sA,"addErrs");function aA({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}o(aA,"checkAsyncKeyword");function cx(e,t,r){if(r===void 0)throw new Error('keyword "'.concat(t,'" failed to compile'));return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Xt.stringify)(r)})}o(cx,"useKeyword");function cA(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}o(cA,"validSchemaType");rn.validSchemaType=cA;function fA({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(f=>!Object.prototype.hasOwnProperty.call(e,f)))throw new Error("parent schema must have dependencies of ".concat(s,": ").concat(a.join(",")));if(i.validateSchema&&!i.validateSchema(e[s])){let p='keyword "'.concat(s,'" value is invalid at path "').concat(n,'": ')+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}o(fA,"validateKeywordUsage");rn.validateKeywordUsage=fA});var hx=G(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});eo.extendSubschemaMode=eo.extendSubschemaData=eo.getSubschema=void 0;var nn=me(),yx=Le(),ux,px;function uA(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let f=e.schema[t];return r===void 0?{schema:f,schemaPath:(0,nn._)(ux||(ux=h(["","",""])),e.schemaPath,(0,nn.getProperty)(t)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t)}:{schema:f[r],schemaPath:(0,nn._)(px||(px=h(["","","",""])),e.schemaPath,(0,nn.getProperty)(t),(0,nn.getProperty)(r)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t,"/").concat((0,yx.escapeFragment)(r))}}if(n!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}o(uA,"getSubschema");eo.getSubschema=uA;var lx,dx,mx;function pA(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:f}=t;if(r!==void 0){let{errorPath:d,dataPathArr:l,opts:m}=t,g=f.let("data",(0,nn._)(lx||(lx=h(["","",""])),t.data,(0,nn.getProperty)(r)),!0);p(g),e.errorPath=(0,nn.str)(dx||(dx=h(["","",""])),d,(0,yx.getErrorPath)(r,n,m.jsPropertySyntax)),e.parentDataProperty=(0,nn._)(mx||(mx=h(["",""])),r),e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let d=i instanceof nn.Name?i:f.let("data",i,!0);p(d),a!==void 0&&(e.propertyName=a)}s&&(e.dataTypes=s);function p(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}o(p,"dataContextProps")}o(pA,"extendSubschemaData");eo.extendSubschemaData=pA;function lA(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}o(lA,"extendSubschemaMode");eo.extendSubschemaMode=lA});var el=G((Y4,gx)=>{"use strict";c();gx.exports=o(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var xx=G((ez,Ix)=>{"use strict";c();var to=Ix.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};tc(t,n,i,e,"",e)};to.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};to.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};to.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};to.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function tc(e,t,r,n,i,s,a,f,p,d){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,a,f,p,d);for(var l in n){var m=n[l];if(Array.isArray(m)){if(l in to.arrayKeywords)for(var g=0;g<m.length;g++)tc(e,t,r,m[g],i+"/"+l+"/"+g,s,i,l,n,g)}else if(l in to.propsKeywords){if(m&&typeof m=="object")for(var b in m)tc(e,t,r,m[b],i+"/"+l+"/"+dA(b),s,i,l,n,b)}else(l in to.keywords||e.allKeys&&!(l in to.skipKeywords))&&tc(e,t,r,m,i+"/"+l,s,i,l,n)}r(n,i,s,a,f,p,d)}}o(tc,"_traverse");function dA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(dA,"escapeJsonPtr")});var hs=G(sr=>{"use strict";c();Object.defineProperty(sr,"__esModule",{value:!0});sr.getSchemaRefs=sr.resolveUrl=sr.normalizeId=sr._getFullPath=sr.getFullPath=sr.inlineRef=void 0;var mA=Le(),yA=el(),hA=xx(),gA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function IA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!tl(e):t?bx(e)<=t:!1}o(IA,"inlineRef");sr.inlineRef=IA;var xA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function tl(e){for(let t in e){if(xA.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(tl)||typeof r=="object"&&tl(r))return!0}return!1}o(tl,"hasRef");function bx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!gA.has(r)&&(typeof e[r]=="object"&&(0,mA.eachItem)(e[r],n=>t+=bx(n)),t===1/0))return 1/0}return t}o(bx,"countKeys");function $x(e,t="",r){r!==!1&&(t=ii(t));let n=e.parse(t);return wx(e,n)}o($x,"getFullPath");sr.getFullPath=$x;function wx(e,t){return e.serialize(t).split("#")[0]+"#"}o(wx,"_getFullPath");sr._getFullPath=wx;var bA=/#\/?$/;function ii(e){return e?e.replace(bA,""):""}o(ii,"normalizeId");sr.normalizeId=ii;function $A(e,t,r){return r=ii(r),e.resolve(t,r)}o($A,"resolveUrl");sr.resolveUrl=$A;var wA=/^[a-z_][-a-z0-9._]*$/i;function PA(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=ii(e[r]||t),s={"":i},a=$x(n,i,!1),f={},p=new Set;return hA(e,{allKeys:!0},(m,g,b,P)=>{if(P===void 0)return;let F=a+g,w=s[P];typeof m[r]=="string"&&(w=O.call(this,m[r])),N.call(this,m.$anchor),N.call(this,m.$dynamicAnchor),s[g]=w;function O(A){let k=this.opts.uriResolver.resolve;if(A=ii(w?k(w,A):A),p.has(A))throw l(A);p.add(A);let R=this.refs[A];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?d(m,R.schema,A):A!==ii(F)&&(A[0]==="#"?(d(m,f[A],A),f[A]=m):this.refs[A]=F),A}o(O,"addRef");function N(A){if(typeof A=="string"){if(!wA.test(A))throw new Error('invalid anchor "'.concat(A,'"'));O.call(this,"#".concat(A))}}o(N,"addAnchor")}),f;function d(m,g,b){if(g!==void 0&&!yA(m,g))throw l(b)}o(d,"checkAmbiguosRef");function l(m){return new Error('reference "'.concat(m,'" resolves to more than one schema'))}o(l,"ambiguos")}o(PA,"getSchemaRefs");sr.getSchemaRefs=PA});var xs=G(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});ro.getData=ro.KeywordCxt=ro.validateFunctionCode=void 0;var lb=zg(),Px=ys(),nl=Wp(),rc=ys(),OA=_I(),Is=fx(),rl=hx(),Q=me(),fe=Tn(),FA=hs(),vn=Le(),gs=ms();function SA(e){if(yb(e)&&(hb(e),mb(e))){vA(e);return}db(e,()=>(0,lb.topBoolOrEmptySchema)(e))}o(SA,"validateFunctionCode");ro.validateFunctionCode=SA;var Ex,Tx,vx;function db({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,Q._)(Ex||(Ex=h(["",", ",""])),fe.default.data,fe.default.valCxt),n.$async,()=>{e.code((0,Q._)(Tx||(Tx=h(['"use strict"; ',""])),Ox(r,i))),TA(e,i),e.code(s)}):e.func(t,(0,Q._)(vx||(vx=h(["",", ",""])),fe.default.data,EA(i)),n.$async,()=>e.code(Ox(r,i)).code(s))}o(db,"validateFunction");var Ax,jx;function EA(e){return(0,Q._)(jx||(jx=h(["{",'="", ',", ",", ","=","","}={}"])),fe.default.instancePath,fe.default.parentData,fe.default.parentDataProperty,fe.default.rootData,fe.default.data,e.dynamicRef?(0,Q._)(Ax||(Ax=h([", ","={}"])),fe.default.dynamicAnchors):Q.nil)}o(EA,"destructureValCxt");var kx,_x,Nx,Rx,Cx,Mx,Lx,Ux,Dx;function TA(e,t){e.if(fe.default.valCxt,()=>{e.var(fe.default.instancePath,(0,Q._)(kx||(kx=h(["",".",""])),fe.default.valCxt,fe.default.instancePath)),e.var(fe.default.parentData,(0,Q._)(_x||(_x=h(["",".",""])),fe.default.valCxt,fe.default.parentData)),e.var(fe.default.parentDataProperty,(0,Q._)(Nx||(Nx=h(["",".",""])),fe.default.valCxt,fe.default.parentDataProperty)),e.var(fe.default.rootData,(0,Q._)(Rx||(Rx=h(["",".",""])),fe.default.valCxt,fe.default.rootData)),t.dynamicRef&&e.var(fe.default.dynamicAnchors,(0,Q._)(Cx||(Cx=h(["",".",""])),fe.default.valCxt,fe.default.dynamicAnchors))},()=>{e.var(fe.default.instancePath,(0,Q._)(Mx||(Mx=h(['""'])))),e.var(fe.default.parentData,(0,Q._)(Lx||(Lx=h(["undefined"])))),e.var(fe.default.parentDataProperty,(0,Q._)(Ux||(Ux=h(["undefined"])))),e.var(fe.default.rootData,fe.default.data),t.dynamicRef&&e.var(fe.default.dynamicAnchors,(0,Q._)(Dx||(Dx=h(["{}"]))))})}o(TA,"destructureValCxtES5");function vA(e){let{schema:t,opts:r,gen:n}=e;db(e,()=>{r.$comment&&t.$comment&&Ib(e),NA(e),n.let(fe.default.vErrors,null),n.let(fe.default.errors,0),r.unevaluated&&AA(e),gb(e),MA(e)})}o(vA,"topSchemaObjCode");var qx,Kx,zx,Gx,Bx,Vx,Wx;function AA(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Q._)(qx||(qx=h(["",".evaluated"])),r)),t.if((0,Q._)(Kx||(Kx=h(["",".dynamicProps"])),e.evaluated),()=>t.assign((0,Q._)(zx||(zx=h(["",".props"])),e.evaluated),(0,Q._)(Gx||(Gx=h(["undefined"]))))),t.if((0,Q._)(Bx||(Bx=h(["",".dynamicItems"])),e.evaluated),()=>t.assign((0,Q._)(Vx||(Vx=h(["",".items"])),e.evaluated),(0,Q._)(Wx||(Wx=h(["undefined"])))))}o(AA,"resetEvaluated");var Hx;function Ox(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Q._)(Hx||(Hx=h(["/*# sourceURL="," */"])),r):Q.nil}o(Ox,"funcSourceUrl");function jA(e,t){if(yb(e)&&(hb(e),mb(e))){kA(e,t);return}(0,lb.boolOrEmptySchema)(e,t)}o(jA,"subschemaCode");function mb({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}o(mb,"schemaCxtHasRules");function yb(e){return typeof e.schema!="boolean"}o(yb,"isSchemaObj");var Zx;function kA(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Ib(e),RA(e),CA(e);let s=n.const("_errs",fe.default.errors);gb(e,s),n.var(t,(0,Q._)(Zx||(Zx=h([""," === ",""])),s,fe.default.errors))}o(kA,"subSchemaObjCode");function hb(e){(0,vn.checkUnknownRules)(e),_A(e)}o(hb,"checkKeywords");function gb(e,t){if(e.opts.jtd)return Fx(e,[],!1,t);let r=(0,Px.getSchemaTypes)(e.schema),n=(0,Px.coerceAndCheckDataType)(e,r);Fx(e,r,!n,t)}o(gb,"typeAndKeywords");function _A(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,vn.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(r,'"'))}o(_A,"checkRefsAndKeywords");function NA(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,vn.checkStrictMode)(e,"default is ignored in the schema root")}o(NA,"checkNoDefault");function RA(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,FA.resolveUrl)(e.opts.uriResolver,e.baseId,t))}o(RA,"updateContext");function CA(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}o(CA,"checkAsyncSchema");var Jx,Yx,Xx;function Ib({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,Q._)(Jx||(Jx=h(["",".logger.log(",")"])),fe.default.self,s));else if(typeof i.$comment=="function"){let a=(0,Q.str)(Yx||(Yx=h(["","/$comment"])),n),f=e.scopeValue("root",{ref:t.root});e.code((0,Q._)(Xx||(Xx=h(["",".opts.$comment(",", ",", ",".schema)"])),fe.default.self,s,a,f))}}o(Ib,"commentKeyword");var Qx,eb,tb,rb;function MA(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,Q._)(Qx||(Qx=h([""," === 0"])),fe.default.errors),()=>t.return(fe.default.data),()=>t.throw((0,Q._)(eb||(eb=h(["new ","(",")"])),i,fe.default.vErrors))):(t.assign((0,Q._)(tb||(tb=h(["",".errors"])),n),fe.default.vErrors),s.unevaluated&&LA(e),t.return((0,Q._)(rb||(rb=h([""," === 0"])),fe.default.errors)))}o(MA,"returnResults");var nb,ob;function LA({gen:e,evaluated:t,props:r,items:n}){r instanceof Q.Name&&e.assign((0,Q._)(nb||(nb=h(["",".props"])),t),r),n instanceof Q.Name&&e.assign((0,Q._)(ob||(ob=h(["",".items"])),t),n)}o(LA,"assignEvaluated");var ib;function Fx(e,t,r,n){let{gen:i,schema:s,data:a,allErrors:f,opts:p,self:d}=e,{RULES:l}=d;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,vn.schemaHasRulesButRef)(s,l))){i.block(()=>bb(e,"$ref",l.all.$ref.definition));return}p.jtd||UA(e,t),i.block(()=>{for(let g of l.rules)m(g);m(l.post)});function m(g){(0,nl.shouldUseGroup)(s,g)&&(g.type?(i.if((0,rc.checkDataType)(g.type,a,p.strictNumbers)),Sx(e,g),t.length===1&&t[0]===g.type&&r&&(i.else(),(0,rc.reportTypeError)(e)),i.endIf()):Sx(e,g),f||i.if((0,Q._)(ib||(ib=h([""," === ",""])),fe.default.errors,n||0)))}o(m,"groupKeywords")}o(Fx,"schemaKeywords");function Sx(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,OA.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,nl.shouldUseRule)(n,s)&&bb(e,s.keyword,s.definition,t.type)})}o(Sx,"iterateKeywords");function UA(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(DA(e,t),e.opts.allowUnionTypes||qA(e,t),KA(e,e.dataTypes))}o(UA,"checkStrictTypes");function DA(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{xb(e.dataTypes,r)||ol(e,'type "'.concat(r,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))}),GA(e,t)}}o(DA,"checkContextTypes");function qA(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ol(e,"use allowUnionTypes to allow union type keyword")}o(qA,"checkMultipleTypes");function KA(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,nl.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(a=>zA(t,a))&&ol(e,'missing type "'.concat(s.join(","),'" for keyword "').concat(n,'"'))}}}o(KA,"checkKeywordTypes");function zA(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}o(zA,"hasApplicableType");function xb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}o(xb,"includesType");function GA(e,t){let r=[];for(let n of e.dataTypes)xb(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}o(GA,"narrowSchemaTypes");function ol(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(r,'" (strictTypes)'),(0,vn.checkStrictMode)(e,t,e.opts.strictTypes)}o(ol,"strictTypesError");var sb,ab,cb,fb,il=class il{constructor(t,r,n){if((0,Is.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,vn.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",$b(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Is.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error("".concat(n," value must be ").concat(JSON.stringify(r.schemaType)));("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",fe.default.errors))}result(t,r,n){this.failResult((0,Q.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Q.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Q._)(sb||(sb=h([""," !== undefined && (",")"])),r,(0,Q.or)(this.invalid$data(),t)))}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?gs.reportExtraError:gs.reportError)(this,this.def.error,r)}$dataError(){(0,gs.reportError)(this,this.def.$dataError||gs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,gs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Q.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Q.nil,r=Q.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:a}=this;n.if((0,Q.or)((0,Q._)(ab||(ab=h([""," === undefined"])),i),r)),t!==Q.nil&&n.assign(t,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Q.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,Q.or)(a(),f());function a(){if(n.length){if(!(r instanceof Q.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,Q._)(cb||(cb=h(["",""])),(0,rc.checkDataTypes)(p,r,s.opts.strictNumbers,rc.DataType.Wrong))}return Q.nil}function f(){if(i.validateSchema){let p=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Q._)(fb||(fb=h(["!","(",")"])),p,r)}return Q.nil}}subschema(t,r){let n=(0,rl.getSubschema)(this.it,t);(0,rl.extendSubschemaData)(n,this.it,t),(0,rl.extendSubschemaMode)(n,t);let i=Y(S(S({},this.it),n),{items:void 0,props:void 0});return jA(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=vn.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=vn.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,Q.Name)),!0}};o(il,"KeywordCxt");var nc=il;ro.KeywordCxt=nc;function bb(e,t,r,n){let i=new nc(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Is.funcKeywordCode)(i,r):"macro"in r?(0,Is.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Is.funcKeywordCode)(i,r)}o(bb,"keywordCode");var BA=/^\/(?:[^~]|~0|~1)*$/,VA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/,ub,pb;function $b(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return fe.default.rootData;if(e[0]==="/"){if(!BA.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));i=e,s=fe.default.rootData}else{let d=VA.exec(e);if(!d)throw new Error("Invalid JSON-pointer: ".concat(e));let l=+d[1];if(i=d[2],i==="#"){if(l>=t)throw new Error(p("property/index",l));return n[t-l]}if(l>t)throw new Error(p("data",l));if(s=r[t-l],!i)return s}let a=s,f=i.split("/");for(let d of f)d&&(s=(0,Q._)(ub||(ub=h(["","",""])),s,(0,Q.getProperty)((0,vn.unescapeJsonPointer)(d))),a=(0,Q._)(pb||(pb=h([""," && ",""])),a,s));return a;function p(d,l){return"Cannot access ".concat(d," ").concat(l," levels up, current level is ").concat(t)}}o($b,"getData");ro.getData=$b});var oc=G(al=>{"use strict";c();Object.defineProperty(al,"__esModule",{value:!0});var cl=class cl extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};o(cl,"ValidationError");var sl=cl;al.default=sl});var bs=G(pl=>{"use strict";c();Object.defineProperty(pl,"__esModule",{value:!0});var fl=hs(),ll=class ll extends Error{constructor(t,r,n,i){super(i||"can't resolve reference ".concat(n," from id ").concat(r)),this.missingRef=(0,fl.resolveUrl)(t,r,n),this.missingSchema=(0,fl.normalizeId)((0,fl.getFullPath)(t,this.missingRef))}};o(ll,"MissingRefError");var ul=ll;pl.default=ul});var sc=G(wr=>{"use strict";c();Object.defineProperty(wr,"__esModule",{value:!0});wr.resolveSchema=wr.getCompilingSchema=wr.resolveRef=wr.compileSchema=wr.SchemaEnv=void 0;var qr=me(),WA=oc(),Fo=Tn(),Kr=hs(),wb=Le(),HA=xs(),yl=class yl{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Kr.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};o(yl,"SchemaEnv");var si=yl;wr.SchemaEnv=si;var Pb,Ob;function ml(e){let t=Fb.call(this,e);if(t)return t;let r=(0,Kr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new qr.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),f;e.$async&&(f=a.scopeValue("Error",{ref:WA.default,code:(0,qr._)(Pb||(Pb=h(['require("ajv/dist/runtime/validation_error").default'])))}));let p=a.scopeName("validate");e.validateName=p;let d={gen:a,allErrors:this.opts.allErrors,data:Fo.default.data,parentData:Fo.default.parentData,parentDataProperty:Fo.default.parentDataProperty,dataNames:[Fo.default.data],dataPathArr:[qr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,qr.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:qr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qr._)(Ob||(Ob=h(['""']))),opts:this.opts,self:this},l;try{this._compilations.add(e),(0,HA.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);let m=a.toString();l="".concat(a.scopeRefs(Fo.default.scope),"return ").concat(m),this.opts.code.process&&(l=this.opts.code.process(l,e));let b=new Function("".concat(Fo.default.self),"".concat(Fo.default.scope),l)(this,this.scope.get());if(this.scope.value(p,{ref:b}),b.errors=null,b.schema=e.schema,b.schemaEnv=e,e.$async&&(b.$async=!0),this.opts.code.source===!0&&(b.source={validateName:p,validateCode:m,scopeValues:a._values}),this.opts.unevaluated){let{props:P,items:F}=d;b.evaluated={props:P instanceof qr.Name?void 0:P,items:F instanceof qr.Name?void 0:F,dynamicProps:P instanceof qr.Name,dynamicItems:F instanceof qr.Name},b.source&&(b.source.evaluated=(0,qr.stringify)(b.evaluated))}return e.validate=b,e}catch(m){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),m}finally{this._compilations.delete(e)}}o(ml,"compileSchema");wr.compileSchema=ml;function ZA(e,t,r){var n;r=(0,Kr.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=XA.call(this,e,r);if(s===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:f}=this.opts;a&&(s=new si({schema:a,schemaId:f,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=JA.call(this,s)}o(ZA,"resolveRef");wr.resolveRef=ZA;function JA(e){return(0,Kr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ml.call(this,e)}o(JA,"inlineOrCompile");function Fb(e){for(let t of this._compilations)if(YA(t,e))return t}o(Fb,"getCompilingSchema");wr.getCompilingSchema=Fb;function YA(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}o(YA,"sameSchemaEnv");function XA(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ic.call(this,e,t)}o(XA,"resolve");function ic(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Kr._getFullPath)(this.opts.uriResolver,r),i=(0,Kr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return dl.call(this,r,e);let s=(0,Kr.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){let f=ic.call(this,e,a);return typeof(f==null?void 0:f.schema)!="object"?void 0:dl.call(this,r,f)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ml.call(this,a),s===(0,Kr.normalizeId)(t)){let{schema:f}=a,{schemaId:p}=this.opts,d=f[p];return d&&(i=(0,Kr.resolveUrl)(this.opts.uriResolver,i,d)),new si({schema:f,schemaId:p,root:e,baseId:i})}return dl.call(this,r,a)}}o(ic,"resolveSchema");wr.resolveSchema=ic;var QA=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function dl(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let f of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,wb.unescapeFragment)(f)];if(p===void 0)return;r=p;let d=typeof r=="object"&&r[this.opts.schemaId];!QA.has(f)&&d&&(t=(0,Kr.resolveUrl)(this.opts.uriResolver,t,d))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,wb.schemaHasRulesButRef)(r,this.RULES)){let f=(0,Kr.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=ic.call(this,n,f)}let{schemaId:a}=this.opts;if(s=s||new si({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema)return s}o(dl,"getJsonPointer")});var Sb=G((Iz,ej)=>{ej.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Tb=G((xz,Eb)=>{"use strict";c();var tj={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Eb.exports={HEX:tj}});var Cb=G(($z,Rb)=>{"use strict";c();var{HEX:rj}=Tb(),nj=new RegExp("^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$","u");function kb(e){if(Nb(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(nj)||[],[r]=t;return r?{host:ij(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}o(kb,"normalizeIPv4");function hl(e,t=!1){let r="",n=!0;for(let i of e){if(rj[i]===void 0)return;i!=="0"&&n===!0&&(n=!1),n||(r+=i)}return t&&r.length===0&&(r="0"),r}o(hl,"stringArrayToHexStripped");function oj(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,a=!1,f=!1;function p(){if(i.length){if(s===!1){let d=hl(i);if(d!==void 0)n.push(d);else return r.error=!0,!1}i.length=0}return!0}o(p,"consume");for(let d=0;d<e.length;d++){let l=e[d];if(!(l==="["||l==="]"))if(l===":"){if(a===!0&&(f=!0),!p())break;if(t++,n.push(":"),t>7){r.error=!0;break}d-1>=0&&e[d-1]===":"&&(a=!0);continue}else if(l==="%"){if(!p())break;s=!0}else{i.push(l);continue}}return i.length&&(s?r.zone=i.join(""):f?n.push(i.join("")):n.push(hl(i))),r.address=n.join(""),r}o(oj,"getIPV6");function _b(e){if(Nb(e,":")<2)return{host:e,isIPV6:!1};let t=oj(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}o(_b,"normalizeIPv6");function ij(e,t){let r="",n=!0,i=e.length;for(let s=0;s<i;s++){let a=e[s];a==="0"&&n?(s+1<=i&&e[s+1]===t||s+1===i)&&(r+=a,n=!1):(a===t?n=!0:n=!1,r+=a)}return r}o(ij,"stripLeadingZeros");function Nb(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}o(Nb,"findToken");var vb=new RegExp("^\\.\\.?\\/","u"),Ab=new RegExp("^\\/\\.(?:\\/|$)","u"),jb=new RegExp("^\\/\\.\\.(?:\\/|$)","u"),sj=new RegExp("^\\/?(?:.|\\n)*?(?=\\/|$)","u");function aj(e){let t=[];for(;e.length;)if(e.match(vb))e=e.replace(vb,"");else if(e.match(Ab))e=e.replace(Ab,"/");else if(e.match(jb))e=e.replace(jb,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(sj);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}o(aj,"removeDotSegments");function cj(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}o(cj,"normalizeComponentEncoding");function fj(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=kb(r);if(n.isIPV4)r=n.host;else{let i=_b(n.host);i.isIPV6===!0?r="[".concat(i.escapedHost,"]"):r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}o(fj,"recomposeAuthority");Rb.exports={recomposeAuthority:fj,normalizeComponentEncoding:cj,removeDotSegments:aj,normalizeIPv4:kb,normalizeIPv6:_b,stringArrayToHexStripped:hl}});var Kb=G((Oz,qb)=>{"use strict";c();var uj=new RegExp("^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$","iu"),pj=new RegExp("([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)","iu");function Mb(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}o(Mb,"isSecure");function Lb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}o(Lb,"httpParse");function Ub(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}o(Ub,"httpSerialize");function lj(e){return e.secure=Mb(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}o(lj,"wsParse");function dj(e){if((e.port===(Mb(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}o(dj,"wsSerialize");function mj(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(pj);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i="".concat(n,":").concat(t.nid||e.nid),s=gl[i];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}o(mj,"urnParse");function yj(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i="".concat(r,":").concat(t.nid||n),s=gl[i];s&&(e=s.serialize(e,t));let a=e,f=e.nss;return a.path="".concat(n||t.nid,":").concat(f),t.skipEscape=!0,a}o(yj,"urnSerialize");function hj(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!uj.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}o(hj,"urnuuidParse");function gj(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}o(gj,"urnuuidSerialize");var Db={scheme:"http",domainHost:!0,parse:Lb,serialize:Ub},Ij={scheme:"https",domainHost:Db.domainHost,parse:Lb,serialize:Ub},ac={scheme:"ws",domainHost:!0,parse:lj,serialize:dj},xj={scheme:"wss",domainHost:ac.domainHost,parse:ac.parse,serialize:ac.serialize},bj={scheme:"urn",parse:mj,serialize:yj,skipNormalize:!0},$j={scheme:"urn:uuid",parse:hj,serialize:gj,skipNormalize:!0},gl={http:Db,https:Ij,ws:ac,wss:xj,urn:bj,"urn:uuid":$j};qb.exports=gl});var Gb=G((Ez,fc)=>{"use strict";c();var{normalizeIPv6:wj,normalizeIPv4:Pj,removeDotSegments:$s,recomposeAuthority:Oj,normalizeComponentEncoding:cc}=Cb(),Il=Kb();function Fj(e,t){return typeof e=="string"?e=on(An(e,t),t):typeof e=="object"&&(e=An(on(e,t),t)),e}o(Fj,"normalize");function Sj(e,t,r){let n=Object.assign({scheme:"null"},r),i=zb(An(e,n),An(t,n),n,!0);return on(i,Y(S({},n),{skipEscape:!0}))}o(Sj,"resolve");function zb(e,t,r,n){let i={};return n||(e=An(on(e,r),r),t=An(on(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=$s(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=$s(t.path||""),i.query=t.query):(t.path?(t.path.charAt(0)==="/"?i.path=$s(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=$s(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}o(zb,"resolveComponents");function Ej(e,t,r){return typeof e=="string"?(e=unescape(e),e=on(cc(An(e,r),!0),Y(S({},r),{skipEscape:!0}))):typeof e=="object"&&(e=on(cc(e,!0),Y(S({},r),{skipEscape:!0}))),typeof t=="string"?(t=unescape(t),t=on(cc(An(t,r),!0),Y(S({},r),{skipEscape:!0}))):typeof t=="object"&&(t=on(cc(t,!0),Y(S({},r),{skipEscape:!0}))),e.toLowerCase()===t.toLowerCase()}o(Ej,"equal");function on(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=Il[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=Oj(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path.charAt(0)!=="/"&&i.push("/")),r.path!==void 0){let f=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(f=$s(f)),a===void 0&&(f=f.replace(new RegExp("^\\/\\/","u"),"/%2F")),i.push(f)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}o(on,"serialize");var Tj=Array.from({length:127},(e,t)=>new RegExp("[^!\"$&'()*+,\\-.;=_`a-z{}~]","u").test(String.fromCharCode(t)));function vj(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||Tj[t])return!0;return!1}o(vj,"nonSimpleDomain");var Aj=new RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?","u");function An(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let a=e.match(Aj);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host){let p=Pj(n.host);if(p.isIPV4===!1){let d=wj(p.host);n.host=d.host.toLowerCase(),s=d.isIPV6}else n.host=p.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let f=Il[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&n.host&&(r.domainHost||f&&f.domainHost)&&s===!1&&vj(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!f||f&&!f.skipNormalize)&&(i&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),i&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),f&&f.parse&&f.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}o(An,"parse");var xl={SCHEMES:Il,normalize:Fj,resolve:Sj,resolveComponents:zb,equal:Ej,serialize:on,parse:An};fc.exports=xl;fc.exports.default=xl;fc.exports.fastUri=xl});var Vb=G(bl=>{"use strict";c();Object.defineProperty(bl,"__esModule",{value:!0});var Bb=Gb();Bb.code='require("ajv/dist/runtime/uri").default';bl.default=Bb});var e0=G(kt=>{"use strict";c();Object.defineProperty(kt,"__esModule",{value:!0});kt.CodeGen=kt.Name=kt.nil=kt.stringify=kt.str=kt._=kt.KeywordCxt=void 0;var jj=xs();Object.defineProperty(kt,"KeywordCxt",{enumerable:!0,get:o(function(){return jj.KeywordCxt},"get")});var ai=me();Object.defineProperty(kt,"_",{enumerable:!0,get:o(function(){return ai._},"get")});Object.defineProperty(kt,"str",{enumerable:!0,get:o(function(){return ai.str},"get")});Object.defineProperty(kt,"stringify",{enumerable:!0,get:o(function(){return ai.stringify},"get")});Object.defineProperty(kt,"nil",{enumerable:!0,get:o(function(){return ai.nil},"get")});Object.defineProperty(kt,"Name",{enumerable:!0,get:o(function(){return ai.Name},"get")});Object.defineProperty(kt,"CodeGen",{enumerable:!0,get:o(function(){return ai.CodeGen},"get")});var kj=oc(),Yb=bs(),_j=Vp(),ws=sc(),Nj=me(),Ps=hs(),uc=ys(),wl=Le(),Wb=Sb(),Rj=Vb(),Xb=o((e,t)=>new RegExp(e,t),"defaultRegExp");Xb.code="new RegExp";var Cj=["removeAdditional","useDefaults","coerceTypes"],Mj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Lj={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Uj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Hb=200;function Dj(e){var t,r,n,i,s,a,f,p,d,l,m,g,b,P,F,w,O,N,A,k,R,V,J,D,U;let ae=e.strict,se=(t=e.code)===null||t===void 0?void 0:t.optimize,M=se===!0||se===void 0?1:se||0,le=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Xb,ce=(i=e.uriResolver)!==null&&i!==void 0?i:Rj.default;return{strictSchema:(a=(s=e.strictSchema)!==null&&s!==void 0?s:ae)!==null&&a!==void 0?a:!0,strictNumbers:(p=(f=e.strictNumbers)!==null&&f!==void 0?f:ae)!==null&&p!==void 0?p:!0,strictTypes:(l=(d=e.strictTypes)!==null&&d!==void 0?d:ae)!==null&&l!==void 0?l:"log",strictTuples:(g=(m=e.strictTuples)!==null&&m!==void 0?m:ae)!==null&&g!==void 0?g:"log",strictRequired:(P=(b=e.strictRequired)!==null&&b!==void 0?b:ae)!==null&&P!==void 0?P:!1,code:e.code?Y(S({},e.code),{optimize:M,regExp:le}):{optimize:M,regExp:le},loopRequired:(F=e.loopRequired)!==null&&F!==void 0?F:Hb,loopEnum:(w=e.loopEnum)!==null&&w!==void 0?w:Hb,meta:(O=e.meta)!==null&&O!==void 0?O:!0,messages:(N=e.messages)!==null&&N!==void 0?N:!0,inlineRefs:(A=e.inlineRefs)!==null&&A!==void 0?A:!0,schemaId:(k=e.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(R=e.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(V=e.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(J=e.validateFormats)!==null&&J!==void 0?J:!0,unicodeRegExp:(D=e.unicodeRegExp)!==null&&D!==void 0?D:!0,int32range:(U=e.int32range)!==null&&U!==void 0?U:!0,uriResolver:ce}}o(Dj,"requiredOptions");var Pl=class Pl{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=S(S({},t),Dj(t));let{es5:r,lines:n}=this.opts.code;this.scope=new Nj.ValueScope({scope:{},prefixes:Mj,es5:r,lines:n}),this.logger=Vj(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,_j.getRules)(),Zb.call(this,Lj,t,"NOT SUPPORTED"),Zb.call(this,Uj,t,"DEPRECATED","warn"),this._metaOpts=Gj.call(this),t.formats&&Kj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&zj.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),qj.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Wb;n==="id"&&(i=S({},Wb),i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error('no schema with key or ref "'.concat(t,'"'))}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(l,m){await s.call(this,l.$schema);let g=this._addSchema(l,m);return g.validate||a.call(this,g)}async function s(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(m){if(!(m instanceof Yb.default))throw m;return f.call(this,m),await p.call(this,m.missingSchema),a.call(this,l)}}function f({missingSchema:l,missingRef:m}){if(this.refs[l])throw new Error("AnySchema ".concat(l," is loaded but ").concat(m," cannot be resolved"))}async function p(l){let m=await d.call(this,l);this.refs[l]||await s.call(this,m.$schema),this.refs[l]||this.addSchema(m,l,r)}async function d(l){let m=this._loading[l];if(m)return m;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let s;if(typeof t=="object"){let{schemaId:a}=this.opts;if(s=t[a],s!==void 0&&typeof s!="string")throw new Error("schema ".concat(a," must be string"))}return r=(0,Ps.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;for(;typeof(r=Jb.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new ws.SchemaEnv({schema:{},schemaId:n});if(r=ws.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Jb.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Ps.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Hj.call(this,n,r),!r)return(0,wl.eachItem)(n,s=>$l.call(this,s)),this;Jj.call(this,r);let i=Y(S({},r),{type:(0,uc.getJSONTypes)(r.type),schemaType:(0,uc.getJSONTypes)(r.schemaType)});return(0,wl.eachItem)(n,i.type.length===0?s=>$l.call(this,s,i):s=>i.type.forEach(a=>$l.call(this,s,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>"".concat(n).concat(i.instancePath," ").concat(i.message)).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let s=i.split("/").slice(1),a=t;for(let f of s)a=a[f];for(let f in n){let p=n[f];if(typeof p!="object")continue;let{$data:d}=p.definition,l=a[f];d&&l&&(a[f]=Qb(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let a,{schemaId:f}=this.opts;if(typeof t=="object")a=t[f];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let p=this._cache.get(t);if(p!==void 0)return p;n=(0,Ps.normalizeId)(a||n);let d=Ps.getSchemaRefs.call(this,t,n);return p=new ws.SchemaEnv({schema:t,schemaId:f,meta:r,baseId:n,localRefs:d}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),i&&this.validateSchema(t,!0),p}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error('schema with key or id "'.concat(t,'" already exists'))}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):ws.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{ws.compileSchema.call(this,t)}finally{this.opts=r}}};o(Pl,"Ajv");var Os=Pl;Os.ValidationError=kj.default;Os.MissingRefError=Yb.default;kt.default=Os;function Zb(e,t,r,n="error"){for(let i in e){let s=i;s in t&&this.logger[n]("".concat(r,": option ").concat(i,". ").concat(e[s]))}}o(Zb,"checkOptions");function Jb(e){return e=(0,Ps.normalizeId)(e),this.schemas[e]||this.refs[e]}o(Jb,"getSchEnv");function qj(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}o(qj,"addInitialSchemas");function Kj(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}o(Kj,"addInitialFormats");function zj(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}o(zj,"addInitialKeywords");function Gj(){let e=S({},this.opts);for(let t of Cj)delete e[t];return e}o(Gj,"getMetaSchemaOptions");var Bj={log(){},warn(){},error(){}};function Vj(e){if(e===!1)return Bj;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}o(Vj,"getLogger");var Wj=/^[a-z_$][a-z0-9_$:-]*$/i;function Hj(e,t){let{RULES:r}=this;if((0,wl.eachItem)(e,n=>{if(r.keywords[n])throw new Error("Keyword ".concat(n," is already defined"));if(!Wj.test(n))throw new Error("Keyword ".concat(n," has invalid name"))}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}o(Hj,"checkKeyword");function $l(e,t,r){var n;let i=t==null?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,a=i?s.post:s.rules.find(({type:p})=>p===r);if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;let f={keyword:e,definition:Y(S({},t),{type:(0,uc.getJSONTypes)(t.type),schemaType:(0,uc.getJSONTypes)(t.schemaType)})};t.before?Zj.call(this,a,f,t.before):a.rules.push(f),s.all[e]=f,(n=t.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}o($l,"addRule");function Zj(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn("rule ".concat(r," is not defined")))}o(Zj,"addBeforeRule");function Jj(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Qb(t)),e.validateSchema=this.compile(t,!0))}o(Jj,"keywordMetaschema");var Yj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Qb(e){return{anyOf:[e,Yj]}}o(Qb,"schemaOrData")});var t0=G(Ol=>{"use strict";c();Object.defineProperty(Ol,"__esModule",{value:!0});var Xj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ol.default=Xj});var m0=G(So=>{"use strict";c();Object.defineProperty(So,"__esModule",{value:!0});So.callRef=So.getValidate=void 0;var Qj=bs(),r0=$r(),ar=me(),ci=Tn(),n0=sc(),pc=Le(),o0,ek={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:a,opts:f,self:p}=n,{root:d}=s;if((r==="#"||r==="#/")&&i===d.baseId)return m();let l=n0.resolveRef.call(p,d,i,r);if(l===void 0)throw new Qj.default(n.opts.uriResolver,i,r);if(l instanceof n0.SchemaEnv)return g(l);return b(l);function m(){if(s===d)return lc(e,a,s,s.$async);let P=t.scopeValue("root",{ref:d});return lc(e,(0,ar._)(o0||(o0=h(["",".validate"])),P),d,d.$async)}function g(P){let F=d0(e,P);lc(e,F,P,P.$async)}function b(P){let F=t.scopeValue("schema",f.code.source===!0?{ref:P,code:(0,ar.stringify)(P)}:{ref:P}),w=t.name("valid"),O=e.subschema({schema:P,dataTypes:[],schemaPath:ar.nil,topSchemaRef:F,errSchemaPath:r},w);e.mergeEvaluated(O),e.ok(w)}}},i0;function d0(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,ar._)(i0||(i0=h(["",".validate"])),r.scopeValue("wrapper",{ref:t}))}o(d0,"getValidate");So.getValidate=d0;var s0,a0,c0,f0,u0,p0,l0;function lc(e,t,r,n){let{gen:i,it:s}=e,{allErrors:a,schemaEnv:f,opts:p}=s,d=p.passContext?ci.default.this:ar.nil;n?l():m();function l(){if(!f.$async)throw new Error("async schema referenced by sync schema");let P=i.let("valid");i.try(()=>{i.code((0,ar._)(s0||(s0=h(["await ",""])),(0,r0.callValidateCode)(e,t,d))),b(t),a||i.assign(P,!0)},F=>{i.if((0,ar._)(a0||(a0=h(["!("," instanceof ",")"])),F,s.ValidationError),()=>i.throw(F)),g(F),a||i.assign(P,!1)}),e.ok(P)}o(l,"callAsyncRef");function m(){e.result((0,r0.callValidateCode)(e,t,d),()=>b(t),()=>g(t))}o(m,"callSyncRef");function g(P){let F=(0,ar._)(c0||(c0=h(["",".errors"])),P);i.assign(ci.default.vErrors,(0,ar._)(f0||(f0=h([""," === null ? "," : ",".concat(",")"])),ci.default.vErrors,F,ci.default.vErrors,F)),i.assign(ci.default.errors,(0,ar._)(u0||(u0=h(["",".length"])),ci.default.vErrors))}o(g,"addErrorsFrom");function b(P){var F;if(!s.opts.unevaluated)return;let w=(F=r==null?void 0:r.validate)===null||F===void 0?void 0:F.evaluated;if(s.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(s.props=pc.mergeEvaluated.props(i,w.props,s.props));else{let O=i.var("props",(0,ar._)(p0||(p0=h(["",".evaluated.props"])),P));s.props=pc.mergeEvaluated.props(i,O,s.props,ar.Name)}if(s.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(s.items=pc.mergeEvaluated.items(i,w.items,s.items));else{let O=i.var("items",(0,ar._)(l0||(l0=h(["",".evaluated.items"])),P));s.items=pc.mergeEvaluated.items(i,O,s.items,ar.Name)}}o(b,"addEvaluatedFrom")}o(lc,"callRef");So.callRef=lc;So.default=ek});var y0=G(Fl=>{"use strict";c();Object.defineProperty(Fl,"__esModule",{value:!0});var tk=t0(),rk=m0(),nk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",tk.default,rk.default];Fl.default=nk});var x0=G(Sl=>{"use strict";c();Object.defineProperty(Sl,"__esModule",{value:!0});var dc=me(),no=dc.operators,mc={maximum:{okStr:"<=",ok:no.LTE,fail:no.GT},minimum:{okStr:">=",ok:no.GTE,fail:no.LT},exclusiveMaximum:{okStr:"<",ok:no.LT,fail:no.GTE},exclusiveMinimum:{okStr:">",ok:no.GT,fail:no.LTE}},h0,g0,ok={message:o(({keyword:e,schemaCode:t})=>(0,dc.str)(h0||(h0=h(["must be "," ",""])),mc[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>(0,dc._)(g0||(g0=h(["{comparison: ",", limit: ","}"])),mc[e].okStr,t),"params")},I0,ik={keyword:Object.keys(mc),type:"number",schemaType:"number",$data:!0,error:ok,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,dc._)(I0||(I0=h([""," "," "," || isNaN(",")"])),r,mc[t].fail,n,r))}};Sl.default=ik});var F0=G(El=>{"use strict";c();Object.defineProperty(El,"__esModule",{value:!0});var Fs=me(),b0,$0,sk={message:o(({schemaCode:e})=>(0,Fs.str)(b0||(b0=h(["must be multiple of ",""])),e),"message"),params:o(({schemaCode:e})=>(0,Fs._)($0||($0=h(["{multipleOf: ","}"])),e),"params")},w0,P0,O0,ak={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:sk,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),f=s?(0,Fs._)(w0||(w0=h(["Math.abs(Math.round(",") - ",") > 1e-",""])),a,a,s):(0,Fs._)(P0||(P0=h([""," !== parseInt(",")"])),a,a);e.fail$data((0,Fs._)(O0||(O0=h(["("," === 0 || ("," = ","/",", ","))"])),n,a,r,n,f))}};El.default=ak});var E0=G(Tl=>{"use strict";c();Object.defineProperty(Tl,"__esModule",{value:!0});function S0(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}o(S0,"ucs2length");Tl.default=S0;S0.code='require("ajv/dist/runtime/ucs2length").default'});var _0=G(vl=>{"use strict";c();Object.defineProperty(vl,"__esModule",{value:!0});var Eo=me(),ck=Le(),fk=E0(),T0,v0,uk={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Eo.str)(T0||(T0=h(["must NOT have "," than "," characters"])),r,t)},params:o(({schemaCode:e})=>(0,Eo._)(v0||(v0=h(["{limit: ","}"])),e),"params")},A0,j0,k0,pk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uk,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Eo.operators.GT:Eo.operators.LT,a=i.opts.unicode===!1?(0,Eo._)(A0||(A0=h(["",".length"])),r):(0,Eo._)(j0||(j0=h(["","(",")"])),(0,ck.useFunc)(e.gen,fk.default),r);e.fail$data((0,Eo._)(k0||(k0=h([""," "," ",""])),a,s,n))}};vl.default=pk});var L0=G(Al=>{"use strict";c();Object.defineProperty(Al,"__esModule",{value:!0});var lk=$r(),yc=me(),N0,R0,dk={message:o(({schemaCode:e})=>(0,yc.str)(N0||(N0=h(['must match pattern "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,yc._)(R0||(R0=h(["{pattern: ","}"])),e),"params")},C0,M0,mk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dk,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",f=r?(0,yc._)(C0||(C0=h(["(new RegExp(",", ","))"])),i,a):(0,lk.usePattern)(e,n);e.fail$data((0,yc._)(M0||(M0=h(["!",".test(",")"])),f,t))}};Al.default=mk});var K0=G(jl=>{"use strict";c();Object.defineProperty(jl,"__esModule",{value:!0});var Ss=me(),U0,D0,yk={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ss.str)(U0||(U0=h(["must NOT have "," than "," properties"])),r,t)},params:o(({schemaCode:e})=>(0,Ss._)(D0||(D0=h(["{limit: ","}"])),e),"params")},q0,hk={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:yk,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ss.operators.GT:Ss.operators.LT;e.fail$data((0,Ss._)(q0||(q0=h(["Object.keys(",").length "," ",""])),r,i,n))}};jl.default=hk});var B0=G(kl=>{"use strict";c();Object.defineProperty(kl,"__esModule",{value:!0});var Es=$r(),Ts=me(),gk=Le(),z0,G0,Ik={message:o(({params:{missingProperty:e}})=>(0,Ts.str)(z0||(z0=h(["must have required property '","'"])),e),"message"),params:o(({params:{missingProperty:e}})=>(0,Ts._)(G0||(G0=h(["{missingProperty: ","}"])),e),"params")},xk={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Ik,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:a}=e,{opts:f}=a;if(!s&&r.length===0)return;let p=r.length>=f.loopRequired;if(a.allErrors?d():l(),f.strictRequired){let b=e.parentSchema.properties,{definedProperties:P}=e.it;for(let F of r)if((b==null?void 0:b[F])===void 0&&!P.has(F)){let w=a.schemaEnv.baseId+a.errSchemaPath,O='required property "'.concat(F,'" is not defined at "').concat(w,'" (strictRequired)');(0,gk.checkStrictMode)(a,O,a.opts.strictRequired)}}function d(){if(p||s)e.block$data(Ts.nil,m);else for(let b of r)(0,Es.checkReportMissingProp)(e,b)}o(d,"allErrorsMode");function l(){let b=t.let("missing");if(p||s){let P=t.let("valid",!0);e.block$data(P,()=>g(b,P)),e.ok(P)}else t.if((0,Es.checkMissingProp)(e,r,b)),(0,Es.reportMissingProp)(e,b),t.else()}o(l,"exitOnErrorMode");function m(){t.forOf("prop",n,b=>{e.setParams({missingProperty:b}),t.if((0,Es.noPropertyInData)(t,i,b,f.ownProperties),()=>e.error())})}o(m,"loopAllRequired");function g(b,P){e.setParams({missingProperty:b}),t.forOf(b,n,()=>{t.assign(P,(0,Es.propertyInData)(t,i,b,f.ownProperties)),t.if((0,Ts.not)(P),()=>{e.error(),t.break()})},Ts.nil)}o(g,"loopUntilMissing")}};kl.default=xk});var Z0=G(_l=>{"use strict";c();Object.defineProperty(_l,"__esModule",{value:!0});var vs=me(),V0,W0,bk={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,vs.str)(V0||(V0=h(["must NOT have "," than "," items"])),r,t)},params:o(({schemaCode:e})=>(0,vs._)(W0||(W0=h(["{limit: ","}"])),e),"params")},H0,$k={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:bk,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?vs.operators.GT:vs.operators.LT;e.fail$data((0,vs._)(H0||(H0=h(["",".length "," ",""])),r,i,n))}};_l.default=$k});var hc=G(Nl=>{"use strict";c();Object.defineProperty(Nl,"__esModule",{value:!0});var J0=el();J0.code='require("ajv/dist/runtime/equal").default';Nl.default=J0});var m$=G(Cl=>{"use strict";c();Object.defineProperty(Cl,"__esModule",{value:!0});var Rl=ys(),_t=me(),wk=Le(),Pk=hc(),Y0,X0,Ok={message:o(({params:{i:e,j:t}})=>(0,_t.str)(Y0||(Y0=h(["must NOT have duplicate items (items ## "," and "," are identical)"])),t,e),"message"),params:o(({params:{i:e,j:t}})=>(0,_t._)(X0||(X0=h(["{i: ",", j: ","}"])),e,t),"params")},Q0,e$,t$,r$,n$,o$,i$,s$,a$,c$,f$,u$,p$,l$,d$,Fk={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ok,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:f}=e;if(!n&&!i)return;let p=t.let("valid"),d=s.items?(0,Rl.getSchemaTypes)(s.items):[];e.block$data(p,l,(0,_t._)(Q0||(Q0=h([""," === false"])),a)),e.ok(p);function l(){let P=t.let("i",(0,_t._)(e$||(e$=h(["",".length"])),r)),F=t.let("j");e.setParams({i:P,j:F}),t.assign(p,!0),t.if((0,_t._)(t$||(t$=h([""," > 1"])),P),()=>(m()?g:b)(P,F))}o(l,"validateUniqueItems");function m(){return d.length>0&&!d.some(P=>P==="object"||P==="array")}o(m,"canOptimize");function g(P,F){let w=t.name("item"),O=(0,Rl.checkDataTypes)(d,w,f.opts.strictNumbers,Rl.DataType.Wrong),N=t.const("indices",(0,_t._)(r$||(r$=h(["{}"]))));t.for((0,_t._)(n$||(n$=h([";","--;"])),P),()=>{t.let(w,(0,_t._)(o$||(o$=h(["","[","]"])),r,P)),t.if(O,(0,_t._)(i$||(i$=h(["continue"])))),d.length>1&&t.if((0,_t._)(s$||(s$=h(["typeof ",' == "string"'])),w),(0,_t._)(a$||(a$=h(["",' += "_"'])),w)),t.if((0,_t._)(c$||(c$=h(["typeof ","[",'] == "number"'])),N,w),()=>{t.assign(F,(0,_t._)(f$||(f$=h(["","[","]"])),N,w)),e.error(),t.assign(p,!1).break()}).code((0,_t._)(u$||(u$=h(["","[","] = ",""])),N,w,P))})}o(g,"loopN");function b(P,F){let w=(0,wk.useFunc)(t,Pk.default),O=t.name("outer");t.label(O).for((0,_t._)(p$||(p$=h([";","--;"])),P),()=>t.for((0,_t._)(l$||(l$=h([""," = ","; ","--;"])),F,P,F),()=>t.if((0,_t._)(d$||(d$=h(["","(","[","], ","[","])"])),w,r,P,r,F),()=>{e.error(),t.assign(p,!1).break(O)})))}o(b,"loopN2")}};Cl.default=Fk});var I$=G(Ll=>{"use strict";c();Object.defineProperty(Ll,"__esModule",{value:!0});var Ml=me(),Sk=Le(),Ek=hc(),y$,Tk={message:"must be equal to constant",params:o(({schemaCode:e})=>(0,Ml._)(y$||(y$=h(["{allowedValue: ","}"])),e),"params")},h$,g$,vk={keyword:"const",$data:!0,error:Tk,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Ml._)(h$||(h$=h(["!","(",", ",")"])),(0,Sk.useFunc)(t,Ek.default),r,i)):e.fail((0,Ml._)(g$||(g$=h([""," !== ",""])),s,r))}};Ll.default=vk});var P$=G(Ul=>{"use strict";c();Object.defineProperty(Ul,"__esModule",{value:!0});var As=me(),Ak=Le(),jk=hc(),x$,kk={message:"must be equal to one of the allowed values",params:o(({schemaCode:e})=>(0,As._)(x$||(x$=h(["{allowedValues: ","}"])),e),"params")},b$,$$,w$,_k={keyword:"enum",schemaType:"array",$data:!0,error:kk,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let f=i.length>=a.opts.loopEnum,p,d=o(()=>p!=null?p:p=(0,Ak.useFunc)(t,jk.default),"getEql"),l;if(f||n)l=t.let("valid"),e.block$data(l,m);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let b=t.const("vSchema",s);l=(0,As.or)(...i.map((P,F)=>g(b,F)))}e.pass(l);function m(){t.assign(l,!1),t.forOf("v",s,b=>t.if((0,As._)(b$||(b$=h(["","(",", ",")"])),d(),r,b),()=>t.assign(l,!0).break()))}o(m,"loopEnum");function g(b,P){let F=i[P];return typeof F=="object"&&F!==null?(0,As._)($$||($$=h(["","(",", ","[","])"])),d(),r,b,P):(0,As._)(w$||(w$=h([""," === ",""])),r,F)}o(g,"equalCode")}};Ul.default=_k});var O$=G(Dl=>{"use strict";c();Object.defineProperty(Dl,"__esModule",{value:!0});var Nk=x0(),Rk=F0(),Ck=_0(),Mk=L0(),Lk=K0(),Uk=B0(),Dk=Z0(),qk=m$(),Kk=I$(),zk=P$(),Gk=[Nk.default,Rk.default,Ck.default,Mk.default,Lk.default,Uk.default,Dk.default,qk.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Kk.default,zk.default];Dl.default=Gk});var Kl=G(js=>{"use strict";c();Object.defineProperty(js,"__esModule",{value:!0});js.validateAdditionalItems=void 0;var To=me(),ql=Le(),F$,S$,Bk={message:o(({params:{len:e}})=>(0,To.str)(F$||(F$=h(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,To._)(S$||(S$=h(["{limit: ","}"])),e),"params")},Vk={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Bk,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,ql.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}A$(e,n)}},E$,T$,v$;function A$(e,t){let{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;let f=r.const("len",(0,To._)(E$||(E$=h(["",".length"])),i));if(n===!1)e.setParams({len:t.length}),e.pass((0,To._)(T$||(T$=h([""," <= ",""])),f,t.length));else if(typeof n=="object"&&!(0,ql.alwaysValidSchema)(a,n)){let d=r.var("valid",(0,To._)(v$||(v$=h([""," <= ",""])),f,t.length));r.if((0,To.not)(d),()=>p(d)),e.ok(d)}function p(d){r.forRange("i",t.length,f,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:ql.Type.Num},d),a.allErrors||r.if((0,To.not)(d),()=>r.break())})}o(p,"validateItems")}o(A$,"validateAdditionalItems");js.validateAdditionalItems=A$;js.default=Vk});var zl=G(ks=>{"use strict";c();Object.defineProperty(ks,"__esModule",{value:!0});ks.validateTuple=void 0;var j$=me(),gc=Le(),Wk=$r(),Hk={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return N$(e,"additionalItems",t);r.items=!0,!(0,gc.alwaysValidSchema)(r,t)&&e.ok((0,Wk.validateArray)(e))}},k$,_$;function N$(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:a,it:f}=e;l(i),f.opts.unevaluated&&r.length&&f.items!==!0&&(f.items=gc.mergeEvaluated.items(n,r.length,f.items));let p=n.name("valid"),d=n.const("len",(0,j$._)(k$||(k$=h(["",".length"])),s));r.forEach((m,g)=>{(0,gc.alwaysValidSchema)(f,m)||(n.if((0,j$._)(_$||(_$=h([""," > ",""])),d,g),()=>e.subschema({keyword:a,schemaProp:g,dataProp:g},p)),e.ok(p))});function l(m){let{opts:g,errSchemaPath:b}=f,P=r.length,F=P===m.minItems&&(P===m.maxItems||m[t]===!1);if(g.strictTuples&&!F){let w='"'.concat(a,'" is ').concat(P,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(b,'"');(0,gc.checkStrictMode)(f,w,g.strictTuples)}}o(l,"checkStrictTuple")}o(N$,"validateTuple");ks.validateTuple=N$;ks.default=Hk});var R$=G(Gl=>{"use strict";c();Object.defineProperty(Gl,"__esModule",{value:!0});var Zk=zl(),Jk={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o(e=>(0,Zk.validateTuple)(e,"items"),"code")};Gl.default=Jk});var U$=G(Bl=>{"use strict";c();Object.defineProperty(Bl,"__esModule",{value:!0});var C$=me(),Yk=Le(),Xk=$r(),Qk=Kl(),M$,L$,e_={message:o(({params:{len:e}})=>(0,C$.str)(M$||(M$=h(["must NOT have more than "," items"])),e),"message"),params:o(({params:{len:e}})=>(0,C$._)(L$||(L$=h(["{limit: ","}"])),e),"params")},t_={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:e_,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,Yk.alwaysValidSchema)(n,t)&&(i?(0,Qk.validateAdditionalItems)(e,i):e.ok((0,Xk.validateArray)(e)))}};Bl.default=t_});var X$=G(Vl=>{"use strict";c();Object.defineProperty(Vl,"__esModule",{value:!0});var Pr=me(),Ic=Le(),D$,q$,K$,z$,r_={message:o(({params:{min:e,max:t}})=>t===void 0?(0,Pr.str)(D$||(D$=h(["must contain at least "," valid item(s)"])),e):(0,Pr.str)(q$||(q$=h(["must contain at least "," and no more than "," valid item(s)"])),e,t),"message"),params:o(({params:{min:e,max:t}})=>t===void 0?(0,Pr._)(K$||(K$=h(["{minContains: ","}"])),e):(0,Pr._)(z$||(z$=h(["{minContains: ",", maxContains: ","}"])),e,t),"params")},G$,B$,V$,W$,H$,Z$,J$,Y$,n_={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:r_,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,a,f,{minContains:p,maxContains:d}=n;s.opts.next?(a=p===void 0?1:p,f=d):a=1;let l=t.const("len",(0,Pr._)(G$||(G$=h(["",".length"])),i));if(e.setParams({min:a,max:f}),f===void 0&&a===0){(0,Ic.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&a>f){(0,Ic.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Ic.alwaysValidSchema)(s,r)){let F=(0,Pr._)(B$||(B$=h([""," >= ",""])),l,a);f!==void 0&&(F=(0,Pr._)(V$||(V$=h([""," && "," <= ",""])),F,l,f)),e.pass(F);return}s.items=!0;let m=t.name("valid");f===void 0&&a===1?b(m,()=>t.if(m,()=>t.break())):a===0?(t.let(m,!0),f!==void 0&&t.if((0,Pr._)(W$||(W$=h(["",".length > 0"])),i),g)):(t.let(m,!1),g()),e.result(m,()=>e.reset());function g(){let F=t.name("_valid"),w=t.let("count",0);b(F,()=>t.if(F,()=>P(w)))}o(g,"validateItemsWithCount");function b(F,w){t.forRange("i",0,l,O=>{e.subschema({keyword:"contains",dataProp:O,dataPropType:Ic.Type.Num,compositeRule:!0},F),w()})}o(b,"validateItems");function P(F){t.code((0,Pr._)(H$||(H$=h(["","++"])),F)),f===void 0?t.if((0,Pr._)(Z$||(Z$=h([""," >= ",""])),F,a),()=>t.assign(m,!0).break()):(t.if((0,Pr._)(J$||(J$=h([""," > ",""])),F,f),()=>t.assign(m,!1).break()),a===1?t.assign(m,!0):t.if((0,Pr._)(Y$||(Y$=h([""," >= ",""])),F,a),()=>t.assign(m,!0)))}o(P,"checkLimits")}};Vl.default=n_});var ow=G(sn=>{"use strict";c();Object.defineProperty(sn,"__esModule",{value:!0});sn.validateSchemaDeps=sn.validatePropertyDeps=sn.error=void 0;var Wl=me(),o_=Le(),_s=$r(),Q$,ew;sn.error={message:o(({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Wl.str)(Q$||(Q$=h(["must have "," "," when property "," is present"])),n,r,e)},"message"),params:o(({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Wl._)(ew||(ew=h(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),e,n,t,r),"params")};var i_={keyword:"dependencies",type:"object",schemaType:"object",error:sn.error,code(e){let[t,r]=s_(e);rw(e,t),nw(e,r)}};function s_({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}o(s_,"splitDependencies");var tw;function rw(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let a in t){let f=t[a];if(f.length===0)continue;let p=(0,_s.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:f.length,deps:f.join(", ")}),i.allErrors?r.if(p,()=>{for(let d of f)(0,_s.checkReportMissingProp)(e,d)}):(r.if((0,Wl._)(tw||(tw=h([""," && (",")"])),p,(0,_s.checkMissingProp)(e,f,s))),(0,_s.reportMissingProp)(e,s),r.else())}}o(rw,"validatePropertyDeps");sn.validatePropertyDeps=rw;function nw(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,a=r.name("valid");for(let f in t)(0,o_.alwaysValidSchema)(s,t[f])||(r.if((0,_s.propertyInData)(r,n,f,s.opts.ownProperties),()=>{let p=e.subschema({keyword:i,schemaProp:f},a);e.mergeValidEvaluated(p,a)},()=>r.var(a,!0)),e.ok(a))}o(nw,"validateSchemaDeps");sn.validateSchemaDeps=nw;sn.default=i_});var aw=G(Hl=>{"use strict";c();Object.defineProperty(Hl,"__esModule",{value:!0});var sw=me(),a_=Le(),iw,c_={message:"property name must be valid",params:o(({params:e})=>(0,sw._)(iw||(iw=h(["{propertyName: ","}"])),e.propertyName),"params")},f_={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:c_,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,a_.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),t.if((0,sw.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};Hl.default=f_});var Jl=G(Zl=>{"use strict";c();Object.defineProperty(Zl,"__esModule",{value:!0});var xc=$r(),zr=me(),u_=Tn(),bc=Le(),cw,p_={message:"must NOT have additional properties",params:o(({params:e})=>(0,zr._)(cw||(cw=h(["{additionalProperty: ","}"])),e.additionalProperty),"params")},fw,uw,pw,lw,l_={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:p_,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:f,opts:p}=a;if(a.props=!0,p.removeAdditional!=="all"&&(0,bc.alwaysValidSchema)(a,r))return;let d=(0,xc.allSchemaProperties)(n.properties),l=(0,xc.allSchemaProperties)(n.patternProperties);m(),e.ok((0,zr._)(fw||(fw=h([""," === ",""])),s,u_.default.errors));function m(){t.forIn("key",i,w=>{!d.length&&!l.length?P(w):t.if(g(w),()=>P(w))})}o(m,"checkAdditionalProperties");function g(w){let O;if(d.length>8){let N=(0,bc.schemaRefOrVal)(a,n.properties,"properties");O=(0,xc.isOwnProperty)(t,N,w)}else d.length?O=(0,zr.or)(...d.map(N=>(0,zr._)(uw||(uw=h([""," === ",""])),w,N))):O=zr.nil;return l.length&&(O=(0,zr.or)(O,...l.map(N=>(0,zr._)(pw||(pw=h(["",".test(",")"])),(0,xc.usePattern)(e,N),w)))),(0,zr.not)(O)}o(g,"isAdditional");function b(w){t.code((0,zr._)(lw||(lw=h(["delete ","[","]"])),i,w))}o(b,"deleteAdditional");function P(w){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){b(w);return}if(r===!1){e.setParams({additionalProperty:w}),e.error(),f||t.break();return}if(typeof r=="object"&&!(0,bc.alwaysValidSchema)(a,r)){let O=t.name("valid");p.removeAdditional==="failing"?(F(w,O,!1),t.if((0,zr.not)(O),()=>{e.reset(),b(w)})):(F(w,O),f||t.if((0,zr.not)(O),()=>t.break()))}}o(P,"additionalPropertyCode");function F(w,O,N){let A={keyword:"additionalProperties",dataProp:w,dataPropType:bc.Type.Str};N===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(A,O)}o(F,"applyAdditionalSchema")}};Zl.default=l_});var yw=G(Xl=>{"use strict";c();Object.defineProperty(Xl,"__esModule",{value:!0});var d_=xs(),dw=$r(),Yl=Le(),mw=Jl(),m_={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&mw.default.code(new d_.KeywordCxt(s,mw.default,"additionalProperties"));let a=(0,dw.allSchemaProperties)(r);for(let m of a)s.definedProperties.add(m);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=Yl.mergeEvaluated.props(t,(0,Yl.toHash)(a),s.props));let f=a.filter(m=>!(0,Yl.alwaysValidSchema)(s,r[m]));if(f.length===0)return;let p=t.name("valid");for(let m of f)d(m)?l(m):(t.if((0,dw.propertyInData)(t,i,m,s.opts.ownProperties)),l(m),s.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(m),e.ok(p);function d(m){return s.opts.useDefaults&&!s.compositeRule&&r[m].default!==void 0}o(d,"hasDefault");function l(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},p)}o(l,"applyPropertySchema")}};Xl.default=m_});var $w=G(Ql=>{"use strict";c();Object.defineProperty(Ql,"__esModule",{value:!0});var hw=$r(),$c=me(),gw=Le(),Iw=Le(),xw,bw,y_={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,f=(0,hw.allSchemaProperties)(r),p=f.filter(F=>(0,gw.alwaysValidSchema)(s,r[F]));if(f.length===0||p.length===f.length&&(!s.opts.unevaluated||s.props===!0))return;let d=a.strictSchema&&!a.allowMatchingProperties&&i.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof $c.Name)&&(s.props=(0,Iw.evaluatedPropsToName)(t,s.props));let{props:m}=s;g();function g(){for(let F of f)d&&b(F),s.allErrors?P(F):(t.var(l,!0),P(F),t.if(l))}o(g,"validatePatternProperties");function b(F){for(let w in d)new RegExp(F).test(w)&&(0,gw.checkStrictMode)(s,"property ".concat(w," matches pattern ").concat(F," (use allowMatchingProperties)"))}o(b,"checkMatchingProperties");function P(F){t.forIn("key",n,w=>{t.if((0,$c._)(xw||(xw=h(["",".test(",")"])),(0,hw.usePattern)(e,F),w),()=>{let O=p.includes(F);O||e.subschema({keyword:"patternProperties",schemaProp:F,dataProp:w,dataPropType:Iw.Type.Str},l),s.opts.unevaluated&&m!==!0?t.assign((0,$c._)(bw||(bw=h(["","[","]"])),m,w),!0):!O&&!s.allErrors&&t.if((0,$c.not)(l),()=>t.break())})})}o(P,"validateProperties")}};Ql.default=y_});var ww=G(ed=>{"use strict";c();Object.defineProperty(ed,"__esModule",{value:!0});var h_=Le(),g_={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,h_.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ed.default=g_});var Pw=G(td=>{"use strict";c();Object.defineProperty(td,"__esModule",{value:!0});var I_=$r(),x_={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:I_.validateUnion,error:{message:"must match a schema in anyOf"}};td.default=x_});var Ew=G(rd=>{"use strict";c();Object.defineProperty(rd,"__esModule",{value:!0});var wc=me(),b_=Le(),Ow,$_={message:"must match exactly one schema in oneOf",params:o(({params:e})=>(0,wc._)(Ow||(Ow=h(["{passingSchemas: ","}"])),e.passing),"params")},Fw,Sw,w_={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$_,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,a=t.let("valid",!1),f=t.let("passing",null),p=t.name("_valid");e.setParams({passing:f}),t.block(d),e.result(a,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((l,m)=>{let g;(0,b_.alwaysValidSchema)(i,l)?t.var(p,!0):g=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},p),m>0&&t.if((0,wc._)(Fw||(Fw=h([""," && ",""])),p,a)).assign(a,!1).assign(f,(0,wc._)(Sw||(Sw=h(["[",", ","]"])),f,m)).else(),t.if(p,()=>{t.assign(a,!0),t.assign(f,m),g&&e.mergeEvaluated(g,wc.Name)})})}o(d,"validateOneOf")}};rd.default=w_});var Tw=G(nd=>{"use strict";c();Object.defineProperty(nd,"__esModule",{value:!0});var P_=Le(),O_={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((s,a)=>{if((0,P_.alwaysValidSchema)(n,s))return;let f=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(f)})}};nd.default=O_});var Nw=G(od=>{"use strict";c();Object.defineProperty(od,"__esModule",{value:!0});var Pc=me(),_w=Le(),Aw,jw,F_={message:o(({params:e})=>(0,Pc.str)(Aw||(Aw=h(['must match "','" schema'])),e.ifClause),"message"),params:o(({params:e})=>(0,Pc._)(jw||(jw=h(["{failingKeyword: ","}"])),e.ifClause),"params")},kw,S_={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:F_,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,_w.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=vw(n,"then"),s=vw(n,"else");if(!i&&!s)return;let a=t.let("valid",!0),f=t.name("_valid");if(p(),e.reset(),i&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(f,d("then",l),d("else",l))}else i?t.if(f,d("then")):t.if((0,Pc.not)(f),d("else"));e.pass(a,()=>e.error(!0));function p(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);e.mergeEvaluated(l)}o(p,"validateIf");function d(l,m){return()=>{let g=e.subschema({keyword:l},f);t.assign(a,f),e.mergeValidEvaluated(g,a),m?t.assign(m,(0,Pc._)(kw||(kw=h(["",""])),l)):e.setParams({ifClause:l})}}o(d,"validateClause")}};function vw(e,t){let r=e.schema[t];return r!==void 0&&!(0,_w.alwaysValidSchema)(e,r)}o(vw,"hasSchema");od.default=S_});var Rw=G(id=>{"use strict";c();Object.defineProperty(id,"__esModule",{value:!0});var E_=Le(),T_={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,E_.checkStrictMode)(r,'"'.concat(e,'" without "if" is ignored'))}};id.default=T_});var Cw=G(sd=>{"use strict";c();Object.defineProperty(sd,"__esModule",{value:!0});var v_=Kl(),A_=R$(),j_=zl(),k_=U$(),__=X$(),N_=ow(),R_=aw(),C_=Jl(),M_=yw(),L_=$w(),U_=ww(),D_=Pw(),q_=Ew(),K_=Tw(),z_=Nw(),G_=Rw();function B_(e=!1){let t=[U_.default,D_.default,q_.default,K_.default,z_.default,G_.default,R_.default,C_.default,N_.default,M_.default,L_.default];return e?t.push(A_.default,k_.default):t.push(v_.default,j_.default),t.push(__.default),t}o(B_,"getApplicator");sd.default=B_});var eP=G(ad=>{"use strict";c();Object.defineProperty(ad,"__esModule",{value:!0});var gt=me(),Mw,Lw,V_={message:o(({schemaCode:e})=>(0,gt.str)(Mw||(Mw=h(['must match format "','"'])),e),"message"),params:o(({schemaCode:e})=>(0,gt._)(Lw||(Lw=h(["{format: ","}"])),e),"params")},Uw,Dw,qw,Kw,zw,Gw,Bw,Vw,Ww,Hw,Zw,Jw,Yw,Xw,Qw,W_={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:V_,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:f}=e,{opts:p,errSchemaPath:d,schemaEnv:l,self:m}=f;if(!p.validateFormats)return;i?g():b();function g(){let P=r.scopeValue("formats",{ref:m.formats,code:p.code.formats}),F=r.const("fDef",(0,gt._)(Uw||(Uw=h(["","[","]"])),P,a)),w=r.let("fType"),O=r.let("format");r.if((0,gt._)(Dw||(Dw=h(["typeof ",' == "object" && !('," instanceof RegExp)"])),F,F),()=>r.assign(w,(0,gt._)(qw||(qw=h(["",'.type || "string"'])),F)).assign(O,(0,gt._)(Kw||(Kw=h(["",".validate"])),F)),()=>r.assign(w,(0,gt._)(zw||(zw=h(['"string"'])))).assign(O,F)),e.fail$data((0,gt.or)(N(),A()));function N(){return p.strictSchema===!1?gt.nil:(0,gt._)(Gw||(Gw=h([""," && !",""])),a,O)}o(N,"unknownFmt");function A(){let k=l.$async?(0,gt._)(Bw||(Bw=h(["(",".async ? await ","(",") : ","(","))"])),F,O,n,O,n):(0,gt._)(Vw||(Vw=h(["","(",")"])),O,n),R=(0,gt._)(Ww||(Ww=h(["(typeof ",' == "function" ? '," : ",".test(","))"])),O,k,O,n);return(0,gt._)(Hw||(Hw=h([""," && "," !== true && "," === "," && !",""])),O,O,w,t,R)}o(A,"invalidFmt")}o(g,"validate$DataFormat");function b(){let P=m.formats[s];if(!P){N();return}if(P===!0)return;let[F,w,O]=A(P);F===t&&e.pass(k());function N(){if(p.strictSchema===!1){m.logger.warn(R());return}throw new Error(R());function R(){return'unknown format "'.concat(s,'" ignored in schema at path "').concat(d,'"')}}o(N,"unknownFormat");function A(R){let V=R instanceof RegExp?(0,gt.regexpCode)(R):p.code.formats?(0,gt._)(Zw||(Zw=h(["","",""])),p.code.formats,(0,gt.getProperty)(s)):void 0,J=r.scopeValue("formats",{key:s,ref:R,code:V});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,gt._)(Jw||(Jw=h(["",".validate"])),J)]:["string",R,J]}o(A,"getFormat");function k(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!l.$async)throw new Error("async format in sync schema");return(0,gt._)(Yw||(Yw=h(["await ","(",")"])),O,n)}return typeof w=="function"?(0,gt._)(Xw||(Xw=h(["","(",")"])),O,n):(0,gt._)(Qw||(Qw=h(["",".test(",")"])),O,n)}o(k,"validCondition")}o(b,"validateFormat")}};ad.default=W_});var tP=G(cd=>{"use strict";c();Object.defineProperty(cd,"__esModule",{value:!0});var H_=eP(),Z_=[H_.default];cd.default=Z_});var rP=G(fi=>{"use strict";c();Object.defineProperty(fi,"__esModule",{value:!0});fi.contentVocabulary=fi.metadataVocabulary=void 0;fi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];fi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var oP=G(fd=>{"use strict";c();Object.defineProperty(fd,"__esModule",{value:!0});var J_=y0(),Y_=O$(),X_=Cw(),Q_=tP(),nP=rP(),eN=[J_.default,Y_.default,(0,X_.default)(),Q_.default,nP.metadataVocabulary,nP.contentVocabulary];fd.default=eN});var sP=G(Oc=>{"use strict";c();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.DiscrError=void 0;var iP;(function(e){e.Tag="tag",e.Mapping="mapping"})(iP||(Oc.DiscrError=iP={}))});var lP=G(pd=>{"use strict";c();Object.defineProperty(pd,"__esModule",{value:!0});var ui=me(),ud=sP(),aP=sc(),tN=bs(),rN=Le(),cP,nN={message:o(({params:{discrError:e,tagName:t}})=>e===ud.DiscrError.Tag?'tag "'.concat(t,'" must be string'):'value of tag "'.concat(t,'" must be in oneOf'),"message"),params:o(({params:{discrError:e,tag:t,tagName:r}})=>(0,ui._)(cP||(cP=h(["{error: ",", tag: ",", tagValue: ","}"])),e,r,t),"params")},fP,uP,pP,oN={keyword:"discriminator",type:"object",schemaType:"object",error:nN,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let f=n.propertyName;if(typeof f!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let p=t.let("valid",!1),d=t.const("tag",(0,ui._)(fP||(fP=h(["","",""])),r,(0,ui.getProperty)(f)));t.if((0,ui._)(uP||(uP=h(["typeof ",' == "string"'])),d),()=>l(),()=>e.error(!1,{discrError:ud.DiscrError.Tag,tag:d,tagName:f})),e.ok(p);function l(){let b=g();t.if(!1);for(let P in b)t.elseIf((0,ui._)(pP||(pP=h([""," === ",""])),d,P)),t.assign(p,m(b[P]));t.else(),e.error(!1,{discrError:ud.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}o(l,"validateMapping");function m(b){let P=t.name("valid"),F=e.subschema({keyword:"oneOf",schemaProp:b},P);return e.mergeEvaluated(F,ui.Name),P}o(m,"applyTagSchema");function g(){var b;let P={},F=O(i),w=!0;for(let k=0;k<a.length;k++){let R=a[k];if(R!=null&&R.$ref&&!(0,rN.schemaHasRulesButRef)(R,s.self.RULES)){let J=R.$ref;if(R=aP.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,J),R instanceof aP.SchemaEnv&&(R=R.schema),R===void 0)throw new tN.default(s.opts.uriResolver,s.baseId,J)}let V=(b=R==null?void 0:R.properties)===null||b===void 0?void 0:b[f];if(typeof V!="object")throw new Error('discriminator: oneOf subschemas (or referenced schemas) must have "properties/'.concat(f,'"'));w=w&&(F||O(R)),N(V,k)}if(!w)throw new Error('discriminator: "'.concat(f,'" must be required'));return P;function O({required:k}){return Array.isArray(k)&&k.includes(f)}function N(k,R){if(k.const)A(k.const,R);else if(k.enum)for(let V of k.enum)A(V,R);else throw new Error('discriminator: "properties/'.concat(f,'" must have "const" or "enum"'))}function A(k,R){if(typeof k!="string"||k in P)throw new Error('discriminator: "'.concat(f,'" values must be unique strings'));P[k]=R}}o(g,"getMapping")}};pd.default=oN});var dP=G((k5,iN)=>{iN.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var md=G((ot,ld)=>{"use strict";c();Object.defineProperty(ot,"__esModule",{value:!0});ot.MissingRefError=ot.ValidationError=ot.CodeGen=ot.Name=ot.nil=ot.stringify=ot.str=ot._=ot.KeywordCxt=ot.Ajv=void 0;var sN=e0(),aN=oP(),cN=lP(),mP=dP(),fN=["/properties"],Fc="http://json-schema.org/draft-07/schema",dd=class dd extends sN.default{_addVocabularies(){super._addVocabularies(),aN.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(cN.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(mP,fN):mP;this.addMetaSchema(t,Fc,!1),this.refs["http://json-schema.org/schema"]=Fc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Fc)?Fc:void 0)}};o(dd,"Ajv");var pi=dd;ot.Ajv=pi;ld.exports=ot=pi;ld.exports.Ajv=pi;Object.defineProperty(ot,"__esModule",{value:!0});ot.default=pi;var uN=xs();Object.defineProperty(ot,"KeywordCxt",{enumerable:!0,get:o(function(){return uN.KeywordCxt},"get")});var li=me();Object.defineProperty(ot,"_",{enumerable:!0,get:o(function(){return li._},"get")});Object.defineProperty(ot,"str",{enumerable:!0,get:o(function(){return li.str},"get")});Object.defineProperty(ot,"stringify",{enumerable:!0,get:o(function(){return li.stringify},"get")});Object.defineProperty(ot,"nil",{enumerable:!0,get:o(function(){return li.nil},"get")});Object.defineProperty(ot,"Name",{enumerable:!0,get:o(function(){return li.Name},"get")});Object.defineProperty(ot,"CodeGen",{enumerable:!0,get:o(function(){return li.CodeGen},"get")});var pN=oc();Object.defineProperty(ot,"ValidationError",{enumerable:!0,get:o(function(){return pN.default},"get")});var lN=bs();Object.defineProperty(ot,"MissingRefError",{enumerable:!0,get:o(function(){return lN.default},"get")})});var bP=G(an=>{"use strict";c();Object.defineProperty(an,"__esModule",{value:!0});an.formatNames=an.fastFormats=an.fullFormats=void 0;function di(e,t){return{validate:e,compare:t}}o(di,"fmtDef");an.fullFormats={date:di(gP,gd),time:di(IP,Id),"date-time":di(hN,xP),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:xN,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:new RegExp("^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$","iu"),email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:SN,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:bN,int32:{type:"number",validate:PN},int64:{type:"number",validate:ON},float:{type:"number",validate:hP},double:{type:"number",validate:hP},password:!0,binary:!0};an.fastFormats=Y(S({},an.fullFormats),{date:di(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,gd),time:di(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Id),"date-time":di(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,xP),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});an.formatNames=Object.keys(an.fullFormats);function dN(e){return e%4===0&&(e%100!==0||e%400===0)}o(dN,"isLeapYear");var mN=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,yN=[0,31,28,31,30,31,30,31,31,30,31,30,31];function gP(e){let t=mN.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&dN(r)?29:yN[n])}o(gP,"date");function gd(e,t){if(e&&t)return e>t?1:e<t?-1:0}o(gd,"compareDate");var yd=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function IP(e,t){let r=yd.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],s=+r[3],a=r[5];return(n<=23&&i<=59&&s<=59||n===23&&i===59&&s===60)&&(!t||a!=="")}o(IP,"time");function Id(e,t){if(!(e&&t))return;let r=yd.exec(e),n=yd.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}o(Id,"compareTime");var hd=/t|\s/i;function hN(e){let t=e.split(hd);return t.length===2&&gP(t[0])&&IP(t[1],!0)}o(hN,"date_time");function xP(e,t){if(!(e&&t))return;let[r,n]=e.split(hd),[i,s]=t.split(hd),a=gd(r,i);if(a!==void 0)return a||Id(n,s)}o(xP,"compareDateTime");var gN=/\/|:/,IN=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function xN(e){return gN.test(e)&&IN.test(e)}o(xN,"uri");var yP=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function bN(e){return yP.lastIndex=0,yP.test(e)}o(bN,"byte");var $N=-(2**31),wN=2**31-1;function PN(e){return Number.isInteger(e)&&e<=wN&&e>=$N}o(PN,"validateInt32");function ON(e){return Number.isInteger(e)}o(ON,"validateInt64");function hP(){return!0}o(hP,"validateNumber");var FN=/[^\\]\\Z/;function SN(e){if(FN.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}o(SN,"regex")});var vP=G(mi=>{"use strict";c();Object.defineProperty(mi,"__esModule",{value:!0});mi.formatLimitDefinition=void 0;var EN=md(),Gr=me(),oo=Gr.operators,Sc={formatMaximum:{okStr:"<=",ok:oo.LTE,fail:oo.GT},formatMinimum:{okStr:">=",ok:oo.GTE,fail:oo.LT},formatExclusiveMaximum:{okStr:"<",ok:oo.LT,fail:oo.GTE},formatExclusiveMinimum:{okStr:">",ok:oo.GT,fail:oo.LTE}},$P,wP,TN={message:o(({keyword:e,schemaCode:t})=>Gr.str($P||($P=h(["should be "," ",""])),Sc[e].okStr,t),"message"),params:o(({keyword:e,schemaCode:t})=>Gr._(wP||(wP=h(["{comparison: ",", limit: ","}"])),Sc[e].okStr,t),"params")},PP,OP,FP,SP,EP,TP;mi.formatLimitDefinition={keyword:Object.keys(Sc),type:"string",schemaType:"string",$data:!0,error:TN,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:a,self:f}=s;if(!a.validateFormats)return;let p=new EN.KeywordCxt(s,f.RULES.all.format.definition,"format");p.$data?d():l();function d(){let g=t.scopeValue("formats",{ref:f.formats,code:a.code.formats}),b=t.const("fmt",Gr._(PP||(PP=h(["","[","]"])),g,p.schemaCode));e.fail$data(Gr.or(Gr._(OP||(OP=h(["typeof ",' != "object"'])),b),Gr._(FP||(FP=h([""," instanceof RegExp"])),b),Gr._(SP||(SP=h(["typeof ",'.compare != "function"'])),b),m(b)))}o(d,"validate$DataFormat");function l(){let g=p.schema,b=f.formats[g];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error('"'.concat(i,'": format "').concat(g,'" does not define "compare" function'));let P=t.scopeValue("formats",{key:g,ref:b,code:a.code.formats?Gr._(EP||(EP=h(["","",""])),a.code.formats,Gr.getProperty(g)):void 0});e.fail$data(m(P))}o(l,"validateFormat");function m(g){return Gr._(TP||(TP=h(["",".compare(",", ",") "," 0"])),g,r,n,Sc[i].fail)}o(m,"compareCode")},dependencies:["format"]};var vN=o(e=>(e.addKeyword(mi.formatLimitDefinition),e),"formatLimitPlugin");mi.default=vN});var NP=G((Ns,_P)=>{"use strict";c();Object.defineProperty(Ns,"__esModule",{value:!0});var yi=bP(),AN=vP(),xd=me(),AP=new xd.Name("fullFormats"),jN=new xd.Name("fastFormats"),bd=o((e,t={keywords:!0})=>{if(Array.isArray(t))return jP(e,t,yi.fullFormats,AP),e;let[r,n]=t.mode==="fast"?[yi.fastFormats,jN]:[yi.fullFormats,AP],i=t.formats||yi.formatNames;return jP(e,i,r,n),t.keywords&&AN.default(e),e},"formatsPlugin");bd.get=(e,t="full")=>{let n=(t==="fast"?yi.fastFormats:yi.fullFormats)[e];if(!n)throw new Error('Unknown format "'.concat(e,'"'));return n};var kP;function jP(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=xd._(kP||(kP=h(['require("ajv-formats/dist/formats").',""])),n));for(let a of t)e.addFormat(a,r[a])}o(jP,"addFormats");_P.exports=Ns=bd;Object.defineProperty(Ns,"__esModule",{value:!0});Ns.default=bd});var b1=G((tIe,Ih)=>{"use strict";c();var lu=v1();lu.default&&(lu=lu.default);Ih.exports=x1;Ih.exports.default=x1;function x1(e,t,r){t=t||1;for(var n,i,s,a,f=0;f<e[0].length;f++){var p=e[0][f];(!f||p[0]<n)&&(n=p[0]),(!f||p[1]<i)&&(i=p[1]),(!f||p[0]>s)&&(s=p[0]),(!f||p[1]>a)&&(a=p[1])}var d=s-n,l=a-i,m=Math.min(d,l),g=m/2;if(m===0){var b=[n,i];return b.distance=0,b}for(var P=new lu(void 0,R3),F=n;F<s;F+=m)for(var w=i;w<a;w+=m)P.push(new ho(F+g,w+g,g,e));var O=M3(e),N=new ho(n+d/2,i+l/2,0,e);N.d>O.d&&(O=N);for(var A=P.length;P.length;){var k=P.pop();k.d>O.d&&(O=k,r&&console.log("found best %d after %d probes",Math.round(1e4*k.d)/1e4,A)),!(k.max-O.d<=t)&&(g=k.h/2,P.push(new ho(k.x-g,k.y-g,g,e)),P.push(new ho(k.x+g,k.y-g,g,e)),P.push(new ho(k.x-g,k.y+g,g,e)),P.push(new ho(k.x+g,k.y+g,g,e)),A+=4)}r&&(console.log("num probes: "+A),console.log("best distance: "+O.d));var R=[O.x,O.y];return R.distance=O.d,R}o(x1,"polylabel");function R3(e,t){return t.max-e.max}o(R3,"compareMax");function ho(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=C3(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(ho,"Cell");function C3(e,t,r){for(var n=!1,i=1/0,s=0;s<r.length;s++)for(var a=r[s],f=0,p=a.length,d=p-1;f<p;d=f++){var l=a[f],m=a[d];l[1]>t!=m[1]>t&&e<(m[0]-l[0])*(t-l[1])/(m[1]-l[1])+l[0]&&(n=!n),i=Math.min(i,L3(e,t,l,m))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(C3,"pointToPolygonDist");function M3(e){for(var t=0,r=0,n=0,i=e[0],s=0,a=i.length,f=a-1;s<a;f=s++){var p=i[s],d=i[f],l=p[0]*d[1]-d[0]*p[1];r+=(p[0]+d[0])*l,n+=(p[1]+d[1])*l,t+=l*3}return t===0?new ho(i[0][0],i[0][1],0,e):new ho(r/t,n/t,0,e)}o(M3,"getCentroidCell");function L3(e,t,r,n){var i=r[0],s=r[1],a=n[0]-i,f=n[1]-s;if(a!==0||f!==0){var p=((e-i)*a+(t-s)*f)/(a*a+f*f);p>1?(i=n[0],s=n[1]):p>0&&(i+=a*p,s+=f*p)}return a=e-i,f=t-s,a*a+f*f}o(L3,"getSegDistSq")});c();c();c();var yu=class yu extends Error{constructor(t){super(t),this.name="IntegrityError"}};o(yu,"IntegrityError");var $t=yu,hu=class hu extends $t{constructor(r,n){super("Floor stack '".concat(r.id,"' contains floor '").concat(n,"' which is not listed in floor.geojson / map.geojson"));H(this,"floorStack");H(this,"floorId");this.floorStack=r,this.floorId=n}};o(hu,"FloorStackUnknownMapError");var ya=hu,gu=class gu extends $t{constructor(r){super("A space collection references floor '".concat(r,"' which does not exist"));H(this,"floorId");this.floorId=r}};o(gu,"SpaceCollectionUnknownMapError");var ha=gu,Iu=class Iu extends $t{constructor(r,n){super("Space '".concat(r.id,"' references a destination node '").concat(n,"' which does not exist"));H(this,"space");H(this,"nodeId");this.space=r,this.nodeId=n}};o(Iu,"SpaceUnknownNodeError");var ga=Iu,xu=class xu extends $t{constructor(r){super("An obstruction collection references floor '".concat(r,"' which does not exist"));H(this,"floorId");this.floorId=r}};o(xu,"ObstructionCollectionUnknownMapError");var Ia=xu,bu=class bu extends $t{constructor(r,n,i){super("Obstruction '".concat(r.id,"' references an entrance '").concat(i,"' which does not exist on floor '").concat(n,"'"));H(this,"obstruction");H(this,"floorId");H(this,"entranceId");this.obstruction=r,this.floorId=n,this.entranceId=i}};o(bu,"ObstructionUnknownEntranceError");var xa=bu,$u=class $u extends $t{constructor(r,n){super("Connection '".concat(r.id,"' references a node '").concat(n,"' which does not exist"));H(this,"connection");H(this,"nodeId");this.connection=r,this.nodeId=n}};o($u,"ConnectionUnknownNodeError");var ba=$u,wu=class wu extends $t{constructor(r){var i;let n=(i=r.floor)!=null?i:r.map;super("Node '".concat(r.id,"' claims to be on floor '").concat(n,"' which does not exist"));H(this,"node");H(this,"floorId");this.node=r,this.floorId=n}};o(wu,"NodeUnknownFloorError");var $a=wu,Pu=class Pu extends $t{constructor(r,n){super("Node '".concat(r.id,"' references a space '").concat(n,"' (on floor '").concat(r.map,"') which does not exist"));H(this,"node");H(this,"spaceId");this.node=r,this.spaceId=n}};o(Pu,"NodeUnknownSpaceError");var wa=Pu,Ou=class Ou extends $t{constructor(r,n){super("Node '".concat(r.id,"' has a neighbor node '").concat(n,"' which does not exist"));H(this,"node");H(this,"neighborId");this.node=r,this.neighborId=n}};o(Ou,"NodeUnknownNeighborError");var Pa=Ou,Fu=class Fu extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," polygon ").concat(i," which does not exist."));H(this,"styleId");H(this,"polygonKind");H(this,"polygonId");this.styleId=r,this.polygonKind=n,this.polygonId=i}};o(Fu,"StyleUnknownPolygonError");var Oa=Fu,Su=class Su extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," line string ").concat(i," which does not exist."));H(this,"styleId");H(this,"lineStringKind");H(this,"lineStringId");this.styleId=r,this.lineStringKind=n,this.lineStringId=i}};o(Su,"StyleUnknownLineStringError");var Fa=Su,Eu=class Eu extends $t{constructor(r,n,i){super("Style ".concat(r," references a ").concat(n," point ").concat(i," which does not exist."));H(this,"styleId");H(this,"pointKind");H(this,"pointId");this.styleId=r,this.pointKind=n,this.pointId=i}};o(Eu,"StyleUnknownPointError");var Sa=Eu,Tu=class Tu extends $t{constructor(r){super("Style ".concat(r," does not appear to be a valid polygon or line string style."));H(this,"styleId");this.styleId=r}};o(Tu,"InvalidStyleError");var Ea=Tu,vu=class vu extends $t{constructor(r,n){super("An image for space polygon ".concat(r," is defined, but this polygon does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(vu,"AnchoredImageUnknownSpaceError");var Ta=vu,Au=class Au extends $t{constructor(r,n){super("Text for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Au,"AnchoredFloorTextUnknownSpaceError");var va=Au,ju=class ju extends $t{constructor(r,n){super("Text for obstruction ".concat(r," is defined, but this obstruction does not exist on floor ").concat(n,"."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(ju,"AnchoredFloorTextUnknownObstructionError");var Aa=ju,ku=class ku extends $t{constructor(r,n){super("An image for obstruction polygon ".concat(r," is defined, but this polygon does not exist on floor ").concat(n,", or does not have allowed geometry."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(ku,"AnchoredImageUnknownObstructionError");var ja=ku,_u=class _u extends Error{constructor(r,n){super("A text area for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(_u,"TextAreaUnknownSpaceError");var ka=_u,Nu=class Nu extends Error{constructor(r,n){super("A layer with space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Nu,"EnterpriseLayerUnknownSpaceError");var _a=Nu,Ru=class Ru extends Error{constructor(r,n){super("An enterprise style references a space ".concat(r," which does not exist on floor ").concat(n,"."));H(this,"geometryId");H(this,"floorId");this.geometryId=r,this.floorId=n}};o(Ru,"EnterpriseStyleGeometryAnchorsUnknownSpaceError");var Na=Ru,Cu=class Cu extends Error{constructor(r,n){super("A texture for space ".concat(r," is defined, but this space does not exist on floor ").concat(n,"."));H(this,"spaceId");H(this,"floorId");this.spaceId=r,this.floorId=n}};o(Cu,"EnterpriseTextureUnknownSpaceError");var Ra=Cu,Mu=class Mu extends Error{constructor(r,n){super("A text area for obstruction ".concat(r," is defined, but this obstruction does not exist on floor ").concat(n,"."));H(this,"obstructionId");H(this,"floorId");this.obstructionId=r,this.floorId=n}};o(Mu,"TextAreaUnknownObstructionError");var Ca=Mu,Lu=class Lu extends Error{constructor(t){super("Enterprise location '".concat(t,"' does not exist.")),this.name="EnterpriseUnknownLocationError"}};o(Lu,"EnterpriseUnknownLocationError");var ns=Lu,Uu=class Uu extends Error{constructor(t){super("Enterprise location references unknown map '".concat(t,"'.")),this.name="EnterpriseUnknownMapError"}};o(Uu,"EnterpriseUnknownMapError");var os=Uu,Du=class Du extends Error{constructor(t,r,n){super("Enterprise location '".concat(t,"' references unknown space '").concat(r,"' on map '").concat(n,"'.")),this.name="EnterpriseLocationUnknownSpaceError"}};o(Du,"EnterpriseLocationUnknownSpaceError");var Ma=Du,qu=class qu extends Error{constructor(t){super("Enterprise category '".concat(t,"' does not exist.")),this.name="EnterpriseUnknownCategoryError"}};o(qu,"EnterpriseUnknownCategoryError");var La=qu,Ku=class Ku extends Error{constructor(t,r,n,i){super("Enterprise location '".concat(t,"' has an item '").concat(r,"' that references maps '").concat(n,"', but it is actually on '").concat(i,"'.")),this.name="EnterpriseInconsistentMapError"}};o(Ku,"EnterpriseInconsistentMapError");var Ua=Ku,zu=class zu extends Error{constructor(t){super("Cyclical reference detected in category hierarchy starting from category '".concat(t,"'")),this.name="EnterpriseCyclicalCategoryReferenceError"}};o(zu,"EnterpriseCyclicalCategoryReferenceError");var Da=zu,Gu=class Gu extends Error{constructor(t){super("Invalid timezone '".concat(t,"'")),this.name="EnterpriseInvalidTimeZoneError"}};o(Gu,"EnterpriseInvalidTimeZoneError");var qa=Gu,Bu=class Bu extends Error{constructor(t){super("An facade references floor stack '".concat(t,"' which does not exist")),this.name="FacadeUnknownFloorStackError"}};o(Bu,"FacadeUnknownFloorStackError");var Ka=Bu,Vu=class Vu extends Error{constructor(t,r){super("Facade '".concat(t,"' references floor '").concat(r,"' which does not exist")),this.name="FacadeUnknownFloorError"}};o(Vu,"FacadeUnknownFloorError");var za=Vu,Wu=class Wu extends Error{constructor(t,r,n){super("Facade '".concat(t,"' references space '").concat(r,"' (on floor '").concat(n,"') which does not exist")),this.name="FacadeUnknownSpaceError"}};o(Wu,"FacadeUnknownSpaceError");var Ga=Wu,Hu=class Hu extends $t{constructor(t){super("Duplicate tileset key found: ".concat(t)),this.name="DuplicateTilesetKeyError"}};o(Hu,"DuplicateTilesetKeyError");var Ba=Hu;c();var $h=o(e=>"polygons"in e,"isPolygonStyle"),wh=o(e=>"width"in e&&"lineStrings"in e,"isLineStringStyle"),Ph=o(e=>"points"in e,"isPointStyle");var Zu=o(e=>"anchorId"in e.properties||"geometryId"in e.properties,"isAnchoredImageOrTextLabelFeature");var is=o(e=>e["floor.geojson"]!=null?new Set(e["floor.geojson"].features.map(t=>t.properties.id)):new Set(e["map.geojson"].map(t=>t.id)),"availableFloorIds"),A1=o(e=>e["floorstack.json"]!=null?new Set(e["floorstack.json"].map(t=>t.id)):new Set(e["mapstack.geojson"].map(t=>t.id)),"availableFloorStackIds"),j1=o(e=>{var n,i;let t=is(e),r=(i=(n=e["floorstack.json"])!=null?n:e["mapstack.json"])!=null?i:e["mapstack.geojson"];for(let s of r)for(let a of s.maps)if(!t.has(a))throw new ya(s,a);return!0},"validateMapStacks"),k1=o(e=>{let t=is(e),r=new Set(e["node.geojson"].features.map(n=>n.properties.id));for(let[n,i]of Object.entries(e.space)){if(!t.has(n))throw new ha(n);if(i){for(let s of i.features)for(let a of s.properties.destinationNodes)if(!r.has(a))throw new ga(s.properties,a)}}return!0},"validateSpaces"),_1=o(e=>{let t=is(e),r=Object.entries(e.entrance).reduce((n,[i,s])=>(n[i]=new Set((s?s.features:[]).map(a=>a.properties.id)),n),{});for(let[n,i]of Object.entries(e.obstruction)){if(!t.has(n))throw new Ia(n);if(i)for(let s of i.features)for(let a of s.properties.entrances){let f=r[n];if(!f||!f.has(a))throw new xa(s.properties,n,a)}}return!0},"validateObstructions"),N1=o(e=>{let t=new Set(e["node.geojson"].features.map(r=>r.properties.id));for(let r of e["connection.json"])for(let n of r.nodes)if(!t.has(n))throw new ba(r,n);return!0},"validateConnections"),R1=o(e=>{var i,s;let t=is(e),r=Object.entries(e.space).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).map(d=>d.properties.id)),a),{}),n=new Set(e["node.geojson"].features.map(a=>a.properties.id));for(let a of e["node.geojson"].features){let f=(i=a.properties.floor)!=null?i:a.properties.map;if(!t.has(f))throw new $a(a.properties);for(let p of a.properties.space)if(!((s=r[f])!=null&&s.has(p)))throw new wa(a.properties,p);for(let p of a.properties.neighbors)if(!n.has(p.id))throw new Pa(a.properties,p.id)}return!0},"validateNodes"),C1=o(e=>{if(!e.facade)return!0;let t=A1(e),r=is(e),n=Object.entries(e.space).reduce((i,[s,a])=>(i[s]=new Set((a?a.features:[]).map(f=>f.properties.id)),i),{});for(let[i,s]of Object.entries(e.facade)){if(!t.has(i))throw new Ka(i);if(s)for(let{floorId:a,spaceId:f}of s.spaces){if(!r.has(a))throw new za(s.id,a);let p=n[a];if(!(p!=null&&p.has(f)))throw new Ga(s.id,f,a)}}return!0},"validateFacades"),M1=o(e=>{if(!e["styles.json"])return!0;let t={},r={},n={};Object.values(e.space).forEach(i=>{i==null||i.features.forEach(s=>{s.geometry.type==="Polygon"?t[s.properties.id]="space":s.geometry.type==="LineString"?r[s.properties.id]="space":s.geometry.type==="Point"&&(n[s.properties.id]="space")})}),Object.values(e.obstruction).forEach(i=>{i==null||i.features.forEach(s=>{s.geometry.type==="Polygon"?t[s.properties.id]="obstruction":s.geometry.type==="LineString"&&(r[s.properties.id]="obstruction")})}),Object.values(e.entrance).forEach(i=>{i==null||i.features.forEach(s=>{r[s.properties.id]="entrance"})});for(let[i,s]of Object.entries(e["styles.json"]))if(s)if($h(s))for(let a of s.polygons){let f=a.startsWith("s_")?"space":a.startsWith("o_")?"obstruction":"unknown";if(!t[a])throw new Oa(i,f,a)}else if(wh(s))for(let a of s.lineStrings){let f=a.startsWith("s_")?"space":a.startsWith("o_")?"obstruction":a.startsWith("e_")?"entrance":"unknown";if(!r[a])throw new Fa(i,f,a)}else if(Ph(s)){for(let a of s.points)if(!n[a])throw new Sa(i,"space",a)}else throw new Ea(i);return!0},"validateStyles"),L1=o(e=>{var i,s,a;let t=(i=e==null?void 0:e.enterprise)==null?void 0:i.floorText;if(!t)return!0;let r=Object.entries(e.space).reduce((f,[p,d])=>(f[p]=new Set((d?d.features:[]).map(l=>l.properties.id)),f),{}),n=Object.entries(e.obstruction).reduce((f,[p,d])=>(f[p]=new Set((d?d.features:[]).filter(l=>l.geometry.type==="Polygon").map(l=>l.properties.id)),f),{});for(let[f,p]of Object.entries(t))if(p){for(let d of p.features)if(Zu(d)){let l=d.properties.geometryId;if(l.startsWith("o_")&&!((s=n[f])!=null&&s.has(l)))throw new Aa(l,f);if(l.startsWith("s_")&&!((a=r[f])!=null&&a.has(l)))throw new va(l,f)}}return!0},"validateFloorText"),U1=o(e=>{var i,s;let t=e.floorImages;if(!t)return!0;let r=Object.entries(e.space).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).map(d=>d.properties.id)),a),{}),n=Object.entries(e.obstruction).reduce((a,[f,p])=>(a[f]=new Set((p?p.features:[]).filter(d=>d.geometry.type==="Polygon").map(d=>d.properties.id)),a),{});for(let[a,f]of Object.entries(t))if(f){for(let p of f.features)if(Zu(p)){let d=p.properties.anchorId;if(d.startsWith("o_")&&!((i=n[a])!=null&&i.has(d)))throw new ja(d,a);if(d.startsWith("s_")&&!((s=r[a])!=null&&s.has(d)))throw new Ta(d,a)}}return!0},"validateFloorImages"),D1=o(e=>{var n,i;if(!e.textAreas)return!0;let t=Object.entries(e.space).reduce((s,[a,f])=>(s[a]=new Set((f?f.features:[]).map(p=>p.properties.id)),s),{}),r=Object.entries(e.obstruction).reduce((s,[a,f])=>(s[a]=new Set((f?f.features:[]).map(p=>p.properties.id)),s),{});for(let[s,a]of Object.entries(e.textAreas))if(a)for(let f of a.features)if("anchorId"in f.properties){let p=f.properties.anchorId;if(p.startsWith("s_")){if(!((n=t[s])!=null&&n.has(p)))throw new ka(p,s)}else if(p.startsWith("o_")){if(!((i=r[s])!=null&&i.has(p)))throw new Ca(p,s)}else throw new Error("Invalid text area anchor ID: ".concat(p))}else if("verticalOffset"in f.properties){if(f.properties.verticalOffset<0)throw new Error("Invalid vertical offset for floating text area: ".concat(f.properties.verticalOffset))}else throw new Error("Invalid text area properties: ".concat(JSON.stringify(f.properties)));return!0},"validateTextAreas"),q1=o(e=>{var p,d,l,m,g,b,P,F;if(!e.enterprise)return!0;let t=e.enterprise;if(t.venue.tzid)try{new Intl.DateTimeFormat("en",{timeZone:t.venue.tzid})}catch(w){throw new qa(t.venue.tzid)}let r=new Set(t.locations.map(w=>w.id));if(t.venue.topLocations){for(let w of t.venue.topLocations)if(!r.has(w))throw new ns(w)}let n=new Set((p=e["floor.geojson"])==null?void 0:p.features.map(w=>w.properties.id));if(t.venue.defaultFloor&&!n.has(t.venue.defaultFloor))throw new os(t.venue.defaultFloor);let i={};for(let[w,O]of Object.entries((d=e.space)!=null?d:{}))i[w]=new Set(O==null?void 0:O.features.map(N=>N.properties.id));for(let w of t.locations)for(let O of(l=w.spaces)!=null?l:[]){let{floor:N,id:A}=O;if(!n.has(N))throw new os(N);if(!((m=i[N])!=null&&m.has(A))){let k=Array.from(n.values()).map(R=>{var V;return(V=i[R])!=null&&V.has(A)?R:null}).find(R=>R!==null);throw k!=null?new Ua(w.id,A,N,k):new Ma(w.id,A,N)}}for(let w of t.layers)for(let{spaceId:O,floorId:N}of w.spaces)if(!((g=i[N])!=null&&g.has(O)))throw new _a(O,N);for(let[w,O]of Object.entries(t.enterpriseStyles||{}))for(let{geometryId:N,floorId:A}of O.geometryAnchors)if(!((b=i[A])!=null&&b.has(N)))throw new Na(N,A);for(let w of(P=t.textures)!=null?P:[])for(let O of w.geometryAnchors)if(!((F=i[O.floorId])!=null&&F.has(O.geometryId)))throw new Ra(O.geometryId,O.floorId);let s=new Set(t.categories.map(w=>w.id)),a={};for(let w of t.categories)a[w.id]=new Set(w.children);let f=o((w,O=new Set)=>{if(O.has(w))throw new Da(w);O.add(w);for(let N of a[w]||[])f(N,new Set(O));O.delete(w)},"checkCyclicalReferences");for(let w of t.categories){f(w.id);for(let O of w.children)if(!s.has(O))throw new La(O);for(let O of w.locations)if(!r.has(O))throw new ns(O)}return!0},"validateEnterprise"),K1=o(e=>{if(!e["tileset.json"])return!0;let t=new Set,r=e["tileset.json"];if(t.add(r.default.key),r.others)for(let n of r.others){if(t.has(n.key))throw new Ba(n.key);t.add(n.key)}return!0},"validateTilesets"),Oh=o(e=>j1(e)&&k1(e)&&_1(e)&&N1(e)&&R1(e)&&C1(e)&&M1(e)&&U1(e)&&D1(e)&&L1(e)&&q1(e)&&K1(e),"verifyMvfIntegrity");c();var CP=mu(md(),1),MP=mu(NP(),1);c();var kN=o(e=>{var r;let t=e;return((r=t==null?void 0:t.allOf)==null?void 0:r.length)===2},"isPotentiallyBadSchema");function Ec(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(Ec);let t=S({},e);for(let[r,n]of Object.entries(t))if(typeof n=="object"&&n!==null){let i=Ec(n);if(kN(i)){let s=i.allOf.findIndex(f=>f.type==="array"),a=i.allOf.findIndex(f=>f.type==="object");if(s!==-1&&a!==-1){t[r]=Y(S({},i),{allOf:[i.allOf[s]]});continue}}t[r]=i}return t}o(Ec,"cleanupInvalidArrayAllOf");var RP={$ref:"#/definitions/ParsedMVF",$schema:"http://json-schema.org/draft-07/schema#",definitions:{AnchoredFloorTextProperties:{additionalProperties:!1,properties:{align:{default:"center",description:"Horizontal alignment of multi-line text.",enum:["left","center","right"],type:"string"},color:{default:"black",description:"The color of the text in CSS format (e.g. `#000000`, `rgb(0, 0, 0)`, `black`).",type:"string"},fontFamily:{default:"Droid Sans",description:"The font family of the text.",type:"string"},fontSize:{default:12,description:"The em-height (multiplier of the font's height) at which to render the font, in meters. The font height is the distance between the ascender (highest point, height of an A) and descender (lowest point, bottom of a g) of the font. For example, if the font-size is 12, the space for a single character will be 12 meters high.",type:"number"},geometryId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this text belongs. It will be displayed on top of it."},rotation:{description:"Rotation in degrees, about the center of the text. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},text:{description:"The text to display. Newline characters are supported.",type:"string"},visible:{default:!0,description:"Whether the text is visible.",type:"boolean"}},required:["align","color","fontFamily","fontSize","geometryId","rotation","text","visible"],type:"object"},AnchoredImageProperties:{additionalProperties:!1,properties:{anchorId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this image belongs. It will be displayed on top of it."},height:{description:"The height of the image when represented on the map, in meters.",minimum:0,type:"number"},path:{description:"The path to the image. This will be a remote URL.",type:"string"},rotation:{description:"Rotation in degrees, about the center of the image. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},width:{description:"The width of the image when represented on the map, in meters.",minimum:0,type:"number"}},required:["anchorId","height","path","rotation","width"],type:"object"},AnchoredTextAreaProperties:{additionalProperties:!1,properties:{align:{$ref:"#/definitions/TextAreaAlignment",description:"The alignment of the text within the label. 'Near' means the text will be aligned up against the position. Typically in the SDK the text will be rotated to always be upright, so either the start or end of the text will be up against the position. 'Center' means it will be centered in the middle of the area."},anchorId:{anyOf:[{$ref:"#/definitions/SpaceId"},{$ref:"#/definitions/ObstructionId"}],description:"The geometry to which this text area belongs. It will be displayed on top of it."},maxHeight:{description:"The maximum height of the label, in meters. Half the height will be above the feature's position, half below.",exclusiveMinimum:0,type:"number"},maxWidth:{description:"The maximum width of the label, in meters. The left edge will start at the feature's position and extend in the rotation direction.",exclusiveMinimum:0,type:"number"},rotation:{description:"Rotation in degrees relative to north, about the position of the label. North is 0, east is 90.",maximum:360,minimum:0,type:"number"}},required:["align","anchorId","maxHeight","maxWidth","rotation"],type:"object"},AnnotationCollection:{additionalProperties:!1,properties:{features:{items:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/AnnotationProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},AnnotationId:{pattern:"^a_[A-Za-z0-9_-]{8,}$",type:"string"},AnnotationProperties:{additionalProperties:!1,properties:{externalId:{type:"string"},id:{$ref:"#/definitions/AnnotationId"},symbolId:{type:"string"}},required:["id","symbolId"],type:"object"},Area:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Polygon"},properties:{$ref:"#/definitions/AreaProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},AreaCollection:{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Area"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},AreaId:{pattern:"^ar_[A-Za-z0-9_-]{8,}$",type:"string"},AreaProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this area."},destinationNodes:{description:"A list of node IDs which can be used to navigate to this area.",items:{$ref:"#/definitions/NodeId"},type:"array"},details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/AreaId"}},required:["id"],type:"object"},Category:{additionalProperties:!1,properties:{icon:{description:"The category's icon",format:"uri",type:"string"},id:{$ref:"#/definitions/CategoryId"},name:{type:"string"},parent:{$ref:"#/definitions/CategoryId"}},required:["id","name","icon"],type:"object"},CategoryId:{description:"A category ID",pattern:"^cat_[A-Za-z0-9_-]{8,}$",type:"string"},Connection:{additionalProperties:!1,properties:{accessible:{type:"boolean"},details:{additionalProperties:!1,properties:{name:{type:"string"}},type:"object"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},id:{$ref:"#/definitions/ConnectionId"},metadata:{$ref:"#/definitions/Metadata"},nodes:{description:"A list of node IDs corresponding to nodes that are a part of this connection.",items:{$ref:"#/definitions/NodeId"},type:"array"},type:{type:"string"}},required:["id","type","nodes","externalId"],type:"object"},ConnectionId:{pattern:"^c_[A-Za-z0-9_-]{8,}$",type:"string"},Connections:{items:{$ref:"#/definitions/Connection"},type:"array"},Day:{enum:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],type:"string"},DayOrPublicHoliday:{anyOf:[{$ref:"#/definitions/Day"},{const:"PublicHolidays",type:"string"}]},Details:{additionalProperties:!1,description:"Additional information about a given entity.",properties:{description:{type:"string"},images:{items:{$ref:"#/definitions/Image"},type:"array"},links:{items:{$ref:"#/definitions/Hyperlink"},type:"array"},name:{type:"string"}},type:"object"},EnterpriseCategory:{additionalProperties:!1,properties:{children:{items:{$ref:"#/definitions/EnterpriseCategoryId"},type:"array"},color:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},icon:{description:"The category's icon",format:"uri",type:"string"},iconFromDefaultList:{type:["string","null"]},id:{$ref:"#/definitions/EnterpriseCategoryId"},locations:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"},name:{type:"string"},picture:{description:"The category's picture",format:"uri",type:"string"},sortOrder:{type:"number"}},required:["children","externalId","id","locations","name","sortOrder"],type:"object"},EnterpriseCategoryId:{description:"An ID for an enterprise category",pattern:"^ec_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseCategoryPriority:{additionalProperties:{items:{$ref:"#/definitions/EnterpriseCategoryId"},type:"array"},description:"The ordered list of category ids that this location belongs to The order here determines the priority of the categories, with the first category being the highest priority for determining application logic like icon and color preference.",propertyNames:{description:"An ID for an enterprise location",pattern:"^el_[A-Za-z0-9_-]{8,}$"},type:"object"},EnterpriseCollection:{additionalProperties:!1,properties:{categories:{items:{$ref:"#/definitions/EnterpriseCategory"},type:"array"},categoryPriorities:{$ref:"#/definitions/EnterpriseCategoryPriority"},enterpriseStyles:{$ref:"#/definitions/EnterpriseStyles"},floorText:{$ref:"#/definitions/EnterpriseFloorText"},layers:{items:{$ref:"#/definitions/EnterpriseLayer"},type:"array"},locationInstances:{items:{$ref:"#/definitions/EnterpriseLocationInstance"},type:"array"},locations:{items:{$ref:"#/definitions/EnterpriseLocation"},type:"array"},textures:{items:{$ref:"#/definitions/EnterpriseTexture"},type:"array"},venue:{$ref:"#/definitions/EnterpriseVenue"}},required:["locations","categories","venue","locationInstances","layers"],type:"object"},EnterpriseFloorText:{additionalProperties:{anyOf:[{$ref:"#/definitions/FloorTextFeatureCollection"},{not:{}}]},description:"The text to display on a map, split into feature collection per floor.",type:"object"},EnterpriseLayer:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/EnterpriseLayerId"},name:{type:"string"},spaces:{items:{$ref:"#/definitions/EnterpriseLayerSpace"},minItems:1,type:"array"}},required:["id","name","spaces"],type:"object"},EnterpriseLayerId:{pattern:"^ely_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseLayerSpace:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},spaceId:{$ref:"#/definitions/SpaceId"}},required:["floorId","spaceId"],type:"object"},EnterpriseLocation:{additionalProperties:!1,properties:{amenity:{description:"The location's amenity type. Only set if the location is an amenity",type:"string"},description:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},gallery:{description:"The location's image gallery",items:{additionalProperties:!1,properties:{caption:{type:["string","null"]},embeddedUrl:{description:"The URL to link from the image",format:"uri",type:["string","null"]},image:{type:"string"}},required:["image"],type:"object"},type:"array"},hidden:{description:"Whether to show the location in applications",type:"boolean"},id:{$ref:"#/definitions/EnterpriseLocationId"},links:{description:"Web links for the location",items:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},nodes:{deprecated:"Use `spaces` instead. A location's nodes that are not attached to a polygon will be in the spaces array as a point space. Nodes that are attached to one of it's polygons will be destinationNodes on that polygon's space",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},operationHours:{items:{$ref:"#/definitions/OperationHours"},type:"array"},phone:{additionalProperties:!1,properties:{extension:{type:"string"},number:{type:"string"}},required:["number"],type:"object"},picture:{description:"The picture of the location",format:"uri",type:"string"},polygons:{deprecated:"Use `spaces` instead. All of a location's polygons will be in the spaces array.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/SpaceId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},shortName:{type:"string"},showFloatingLabelWhenImagePresent:{description:"Whether to show the flat label when an image is present",type:"boolean"},showLogo:{description:"Whether to show the logo of the location",type:"boolean"},siblingGroups:{description:"Locations that are related to this location in some manner (described by the label)",items:{$ref:"#/definitions/SiblingGroup"},type:"array"},social:{additionalProperties:!1,description:"The location's social media links",properties:{facebook:{type:"string"},instagram:{type:"string"},twitter:{type:"string"},website:{type:"string"}},type:"object"},sortOrder:{type:"number"},spaces:{description:"The places that this location is anchored to in the physical world. These are either Polygon or Point spaces. A location can be attached to many spaces, and a space can be attached to many locations.\n\nIf there are different properties for the location on those spaces, they will show up in the location's {@link EnterpriseLocation.instances instances } property",items:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},type:"array"},states:{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set",items:{$ref:"#/definitions/LocationState"},type:"array"},tags:{items:{type:"string"},type:"array"},type:{type:"string"}},required:["externalId","id","name","nodes","polygons","sortOrder","spaces","type"],type:"object"},EnterpriseLocationId:{description:"An ID for an enterprise location",pattern:"^el_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseLocationInstance:{additionalProperties:!1,description:"A locationInstance is a particular instace of an Enterprise Location that has some properties different from the parent. Eg, it may have different hours, or a slightly different name.\n\nA LocationInstance:\n- MUST have a parent, referring to an Enterprise Location.\n- MUST have a unique ID, for localization to work.\n- SHOULD have AT LEAST ONE polygon or node to anchor it in space.\n- SHOULD have AT LEAST ONE other Enterprise Location property set.\n\nIt is otherwise a Partial<EnterpriseLocation>\n\nUsage examples:\n- A locationInstance for a location with a different externalId so a customer can identify them individually.\n- A locationInstance with different operationHours, that might indicate different hours for that particular entrace.",properties:{amenity:{description:"The location's amenity type. Only set if the location is an amenity",type:"string"},description:{type:"string"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},gallery:{description:"The location's image gallery",items:{additionalProperties:!1,properties:{caption:{type:["string","null"]},embeddedUrl:{description:"The URL to link from the image",format:"uri",type:["string","null"]},image:{type:"string"}},required:["image"],type:"object"},type:"array"},hidden:{description:"Whether to show the location in applications",type:"boolean"},id:{$ref:"#/definitions/EnterpriseLocationInstanceId"},links:{description:"Web links for the location",items:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},nodes:{deprecated:"Use `spaces` instead. A location's nodes that are not attached to a polygon will be in the spaces array as a point space. Nodes that are attached to one of it's polygons will be destinationNodes on that polygon's space",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},operationHours:{items:{$ref:"#/definitions/OperationHours"},type:"array"},parent:{$ref:"#/definitions/EnterpriseLocationId"},phone:{additionalProperties:!1,properties:{extension:{type:"string"},number:{type:"string"}},required:["number"],type:"object"},picture:{description:"The picture of the location",format:"uri",type:"string"},polygons:{deprecated:"Use `spaces` instead. All of a location's polygons will be in the spaces array.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/SpaceId"},map:{$ref:"#/definitions/FloorId"}},required:["map","id"],type:"object"},type:"array"},shortName:{type:"string"},showFloatingLabelWhenImagePresent:{description:"Whether to show the flat label when an image is present",type:"boolean"},showLogo:{description:"Whether to show the logo of the location",type:"boolean"},siblingGroups:{description:"Locations that are related to this location in some manner (described by the label)",items:{$ref:"#/definitions/SiblingGroup"},type:"array"},social:{additionalProperties:!1,description:"The location's social media links",properties:{facebook:{type:"string"},instagram:{type:"string"},twitter:{type:"string"},website:{type:"string"}},type:"object"},sortOrder:{type:"number"},spaces:{description:"The places that this location is anchored to in the physical world. These are either Polygon or Point spaces. A location can be attached to many spaces, and a space can be attached to many locations.\n\nIf there are different properties for the location on those spaces, they will show up in the location's {@link EnterpriseLocation.instances instances } property",items:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},type:"array"},states:{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set",items:{$ref:"#/definitions/LocationState"},type:"array"},tags:{items:{type:"string"},type:"array"},type:{type:"string"}},required:["id","parent"],type:"object"},EnterpriseLocationInstanceId:{description:"An ID for an enterprise location instance",pattern:"^eli_[A-Za-z0-9_-]{8,}$",type:"string"},EnterpriseStyles:{additionalProperties:{additionalProperties:!1,properties:{edgeOffset:{type:"number"},geometryAnchors:{items:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},geometryId:{$ref:"#/definitions/SpaceId"}},required:["geometryId","floorId"],type:"object"},type:"array"}},required:["geometryAnchors"],type:"object"},type:"object"},EnterpriseTexture:{additionalProperties:!1,properties:{bounds:{description:"Coordinates of the texture's bounding box in format: [minLon, minLat, maxLon, maxLat].",items:{type:"number"},maxItems:4,minItems:4,type:"array"},face:{$ref:"#/definitions/EnterpriseTextureFace",description:"Face of the polygon that the texture will be applied to.\n\n'top' means that the texture will be applied to the upward-pointing face of the polygon.\n\n'side' means that the texture will be applied to every side face of the polygon."},geometryAnchors:{description:"Anchors for the texture on the geometry of the polygon.",items:{$ref:"#/definitions/EnterpriseTextureGeometryAnchor"},minItems:1,type:"array"},offset:{$ref:"#/definitions/EnterpriseTextureUV",description:"Controls the starting position of the texture on the surface. The u value shifts the texture horizontally and v shifts vertically."},path:{description:"Path to the texture image. Must be either a PNG or JPG format.",type:"string"},repeat:{$ref:"#/definitions/EnterpriseTextureUV",description:"Controls how many times the texture repeats across the surface. The u value controls horizontal repetition and v controls vertical repetition."},rotation:{description:"Rotation of the texture in degrees clockwise.\n\nFor top textures this is relative to north. North is 0, east is 90.\n\nFor side textures this is relative to the upward direction, with 0 degrees being upright.",maximum:360,minimum:0,type:"number"},surface:{$ref:"#/definitions/EnterpriseTextureSurface",description:"Surface of the polygon that the texture will be applied to.\n\n'inside' means that the texture will only be applied to the interior surface of the polygon.\n\n'outside' means that the texture will only be applied to the exterior surface of the polygon.\n\n'both' means that the texture will be applied to both interior and exterior surfaces of the polygon."}},required:["repeat","offset","rotation","path","face","surface","bounds","geometryAnchors"],type:"object"},EnterpriseTextureFace:{enum:["top","side"],type:"string"},EnterpriseTextureGeometryAnchor:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},geometryId:{$ref:"#/definitions/SpaceId"}},required:["geometryId","floorId"],type:"object"},EnterpriseTextureSurface:{enum:["inside","outside","both"],type:"string"},EnterpriseTextureUV:{additionalProperties:!1,properties:{u:{type:"number"},v:{type:"number"}},required:["u","v"],type:"object"},EnterpriseVenue:{additionalProperties:!1,properties:{countrycode:{description:"The ISO 3166-1 alpha-2 country code of the venue, if known\n\nEg. `US` or `GB`",type:"string"},coverImage:{description:"The venue's cover image",format:"uri",type:"string"},defaultFloor:{$ref:"#/definitions/FloorId",description:"The venue's default floor"},defaultLanguage:{$ref:"#/definitions/Language"},defaultMap:{$ref:"#/definitions/FloorId",deprecated:"Use `defaultFloor` instead"},externalId:{type:"string"},extra:{additionalProperties:{},type:"object"},icon:{description:"The venue's icon",format:"uri",type:"string"},languages:{items:{$ref:"#/definitions/Language"},type:"array"},logo:{description:"The venue's logo",format:"uri",type:"string"},mappedinWebUrl:{description:"The base URL for Mappedin Web for this venue\n\nBetter name?",type:"string"},name:{type:"string"},operationHours:{description:"When this venue is open.",items:{$ref:"#/definitions/OperationHours"},type:"array"},slug:{type:"string"},topLocations:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"},tzid:{description:"The venue's timezone, from the IANA Time Zone Database. Should be in the format of `America/New_York`",pattern:"^[A-Za-z0-9\\/_-]+$",type:"string"}},required:["defaultLanguage","externalId","languages","name","slug"],type:"object"},EntranceCollection:{$ref:"#/definitions/FeatureCollection%3CLineString%2CEntranceProperties%3E"},EntranceId:{pattern:"^e_[A-Za-z0-9_-]{8,}$",type:"string"},EntranceProperties:{additionalProperties:!1,properties:{details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/EntranceId"},isExterior:{type:"boolean"},metadata:{$ref:"#/definitions/Metadata"},node:{$ref:"#/definitions/NodeId"}},required:["id","externalId"],type:"object"},Facade:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/FacadeId"},spaces:{items:{$ref:"#/definitions/FacadeSpace"},minItems:1,type:"array"}},required:["id","spaces"],type:"object"},FacadeId:{pattern:"^fc_[A-Za-z0-9_-]{8,}$",type:"string"},FacadeSpace:{additionalProperties:!1,properties:{floorId:{$ref:"#/definitions/FloorId"},spaceId:{$ref:"#/definitions/SpaceId"}},required:["floorId","spaceId"],type:"object"},"Feature<(Polygon|LineString),ObstructionProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/LineString"}]},properties:{$ref:"#/definitions/ObstructionProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<(Polygon|LineString|Point),SpaceProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/LineString"},{$ref:"#/definitions/Point"}]},properties:{$ref:"#/definitions/SpaceProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<(Polygon|MultiPolygon|null),FloorProperties>":{additionalProperties:!1,properties:{geometry:{anyOf:[{$ref:"#/definitions/Polygon"},{$ref:"#/definitions/MultiPolygon"},{type:"null"}]},properties:{$ref:"#/definitions/FloorProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<LineString,EntranceProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/LineString"},properties:{$ref:"#/definitions/EntranceProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,FloorImageProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/FloorImageProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,FloorTextProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/FloorTextProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,NodeProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/NodeProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Point,TextAreaProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/TextAreaProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"Feature<Polygon,FloorStackFootprintProperties>":{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Polygon"},properties:{$ref:"#/definitions/FloorStackFootprintProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},"FeatureCollection<(Polygon|LineString),ObstructionProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CLineString)%2CObstructionProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<(Polygon|LineString|Point),SpaceProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CLineString%7CPoint)%2CSpaceProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<(Polygon|MultiPolygon|null),FloorProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3C(Polygon%7CMultiPolygon%7Cnull)%2CFloorProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<LineString,EntranceProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CLineString%2CEntranceProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,FloorImageProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CFloorImageProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,FloorTextProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CFloorTextProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,NodeProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CNodeProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Point,TextAreaProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPoint%2CTextAreaProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},"FeatureCollection<Polygon,FloorStackFootprintProperties>":{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/Feature%3CPolygon%2CFloorStackFootprintProperties%3E"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},FeatureCollectionType:{const:"FeatureCollection",description:"The type field used for a collection of GeoJSON features.",type:"string"},FeatureType:{const:"Feature",description:"The type field used for individual GeoJSON features.",type:"string"},FloatingFloorTextProperties:{additionalProperties:!1,properties:{align:{default:"center",description:"Horizontal alignment of multi-line text.",enum:["left","center","right"],type:"string"},color:{default:"black",description:"The color of the text in CSS format (e.g. `#000000`, `rgb(0, 0, 0)`, `black`).",type:"string"},fontFamily:{default:"Droid Sans",description:"The font family of the text.",type:"string"},fontSize:{default:12,description:"The em-height (multiplier of the font's height) at which to render the font, in meters. The font height is the distance between the ascender (highest point, height of an A) and descender (lowest point, bottom of a g) of the font. For example, if the font-size is 12, the space for a single character will be 12 meters high.",type:"number"},rotation:{description:"Rotation in degrees, about the center of the text. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},text:{description:"The text to display. Newline characters are supported.",type:"string"},verticalOffset:{description:"The vertical offset of the text, in meters.",type:"number"},visible:{default:!0,description:"Whether the text is visible.",type:"boolean"}},required:["align","color","fontFamily","fontSize","rotation","text","verticalOffset","visible"],type:"object"},FloatingImageProperties:{additionalProperties:!1,properties:{height:{description:"The height of the image when represented on the map, in meters.",minimum:0,type:"number"},path:{description:"The path to the image. This will be a remote URL.",type:"string"},rotation:{description:"Rotation in degrees, about the center of the image. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},verticalOffset:{description:"How high to position the image, in meters, relative to the ground plane.",minimum:0,type:"number"},width:{description:"The width of the image when represented on the map, in meters.",minimum:0,type:"number"}},required:["height","path","rotation","verticalOffset","width"],type:"object"},FloatingTextAreaProperties:{additionalProperties:!1,properties:{align:{$ref:"#/definitions/TextAreaAlignment",description:"The alignment of the text within the label. 'Near' means the text will be aligned up against the position. Typically in the SDK the text will be rotated to always be upright, so either the start or end of the text will be up against the position. 'Center' means it will be centered in the middle of the area."},maxHeight:{description:"The maximum height of the label, in meters. Half the height will be above the feature's position, half below.",exclusiveMinimum:0,type:"number"},maxWidth:{description:"The maximum width of the label, in meters. The left edge will start at the feature's position and extend in the rotation direction.",exclusiveMinimum:0,type:"number"},rotation:{description:"Rotation in degrees relative to north, about the position of the label. North is 0, east is 90.",maximum:360,minimum:0,type:"number"},verticalOffset:{description:"How high to position the text area, in meters, relative to the ground plane.",minimum:0,type:"number"}},required:["align","maxHeight","maxWidth","rotation","verticalOffset"],type:"object"},FloorCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CMultiPolygon%7Cnull)%2CFloorProperties%3E"},FloorId:{description:"The m_ prefix is deprecated, from when floors were previously called maps. Use f_ as the prefix instead.",pattern:"^[mf]_[A-Za-z0-9_-]{8,}$",type:"string"},FloorImageFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CFloorImageProperties%3E",description:"A collection of images to be displayed on a map. They are either attached to a polygon or are floating in space."},FloorImageProperties:{anyOf:[{$ref:"#/definitions/AnchoredImageProperties"},{$ref:"#/definitions/FloatingImageProperties"}]},FloorProperties:{additionalProperties:!1,properties:{elevation:{description:"The elevation of this map relative to other maps in the stack. Must be an integer.",type:"integer"},externalId:{description:"Use of this property as the name of the map is deprecated. Use the name property instead.",type:"string"},id:{$ref:"#/definitions/FloorId"},metadata:{$ref:"#/definitions/Metadata"},name:{type:"string"},shortName:{description:"A short name for the map, if it exists. Usually one or two characters (eg, 3, F1, L, etc.) For display in very small spaces, like a floor selector dropdown. Might line up with what is shown on elevator buttons in the physical world.",type:"string"},subtitle:{description:'A subtitle for the map, for display in larger spaces, usually beneath the full name. Provides additional context for what is actually on the map, if the name is not clear. For example, if the full name is "Level 1", the subtitle might be "Arrivals and Baggage Claim".\n\nShould be no more than a few words.',type:"string"}},required:["id","externalId","elevation"],type:"object"},FloorStack:{additionalProperties:!1,properties:{defaultFloor:{$ref:"#/definitions/FloorId",description:"The default floor to use when a floor is not specified."},externalId:{type:"string"},floors:{description:"A list of floor IDs that belong to this floor stack.",items:{$ref:"#/definitions/FloorId"},type:"array"},footprint:{$ref:"#/definitions/FeatureCollection%3CPolygon%2CFloorStackFootprintProperties%3E",description:"Provides a footprint for the map stack based on the geometry of the maps it contains. This is useful for rendering a map stack without loading all of its maps."},id:{$ref:"#/definitions/FloorStackId"},maps:{deprecated:"Use `floors` instead.",description:"A list of floor IDs that belong to this floor stack.",items:{$ref:"#/definitions/FloorId"},type:"array"},metadata:{$ref:"#/definitions/Metadata"},name:{type:"string"},shortName:{description:"A short name for the map stack, if it exists. For display in small spaces, like a floor selector dropdown.",type:"string"},type:{description:"The type of MapStack, e.g. Building, Outdoor. Defaults to Building.",enum:["Building","Outdoor"],type:"string"}},required:["id","externalId","name","maps"],type:"object"},FloorStackFootprintProperties:{additionalProperties:{not:{}},type:"object"},FloorStackId:{description:"The mg_ prefix is deprecated, from when floor stacks were previously called map groups. Use fs_ as the prefix instead.",pattern:"^fs_[A-Za-z0-9_-]{8,}$",type:"string"},FloorStacks:{items:{$ref:"#/definitions/FloorStack"},type:"array"},FloorTextFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CFloorTextProperties%3E",description:"A collection of text to be displayed on a map. They are either attached to a space or are floating."},FloorTextProperties:{anyOf:[{$ref:"#/definitions/AnchoredFloorTextProperties"},{$ref:"#/definitions/FloatingFloorTextProperties"}]},Hyperlink:{additionalProperties:!1,properties:{displayName:{type:"string"},url:{type:"string"}},required:["url"],type:"object"},Image:{additionalProperties:!1,properties:{altText:{type:"string"},url:{type:"string"}},required:["url"],type:"object"},Language:{additionalProperties:!1,properties:{code:{type:"string"},name:{type:"string"}},required:["name","code"],type:"object"},Latitude:{description:"A WGS 84-compatible latitude coordinate value.",maximum:90,minimum:-90,type:"number"},LineString:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON LineString geometry.",properties:{coordinates:{items:{$ref:"#/definitions/Position"},minItems:2,type:"array"},type:{const:"LineString",type:"string"}},required:["coordinates","type"],type:"object"},LineStringStyle:{additionalProperties:!1,properties:{altitude:{description:'How far off the "ground" the objects belonging to this layer should be drawn, in meters.',minimum:0,type:"number"},color:{description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},height:{description:"The height of the objects belonging to this layer, in meters.",minimum:0,type:"number"},lineStrings:{description:"The line strings which this style applies to.",items:{anyOf:[{$ref:"#/definitions/EntranceId"},{$ref:"#/definitions/ObstructionId"},{$ref:"#/definitions/SpaceId"}]},type:"array"},opacity:{maximum:1,minimum:0,type:"number"},width:{description:"The thickness of the line when rendered, in meters, measured from the center to the edge.",exclusiveMinimum:0,type:"number"}},required:["altitude","color","height","lineStrings","opacity","width"],type:"object"},LocalPosition:{description:"A position for a local coordinate system, measured in metres.",items:{type:"number"},maxItems:2,minItems:2,type:"array"},Location:{additionalProperties:!1,properties:{annotations:{items:{$ref:"#/definitions/LocationAnnotationMapping"},type:"array"},areas:{items:{$ref:"#/definitions/LocationAreaMapping"},type:"array"},categories:{items:{$ref:"#/definitions/CategoryId"},type:"array"},connections:{items:{$ref:"#/definitions/ConnectionId"},type:"array"},description:{type:"string"},entrances:{items:{$ref:"#/definitions/LocationEntranceMapping"},type:"array"},externalId:{type:"string"},icon:{description:"The location's icon, one of picture/category/logo",format:"uri",type:"string"},id:{$ref:"#/definitions/LocationId"},links:{description:"Web links for the location",items:{$ref:"#/definitions/LocationLink"},type:"array"},logo:{description:"The location's logo",format:"uri",type:"string"},name:{type:"string"},obstructions:{items:{$ref:"#/definitions/LocationObstructionMapping"},type:"array"},openingHoursSpecification:{description:"The location's opening hours",items:{$ref:"#/definitions/OpeningHoursSpecification"},type:"array"},phone:{type:"string"},pictures:{description:"The location's pictures",items:{$ref:"#/definitions/LocationPicture"},type:"array"},social:{description:"The location's social media links.",items:{$ref:"#/definitions/LocationSocial"},type:"array"},spaces:{items:{$ref:"#/definitions/LocationSpaceMapping"},type:"array"},website:{$ref:"#/definitions/LocationLink",description:"The location's website"}},required:["id","name","categories","spaces","obstructions","entrances","connections","annotations","areas","social","pictures","links","openingHoursSpecification"],type:"object"},LocationAnnotationMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/AnnotationId"}},required:["floor","id"],type:"object"},LocationAreaMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/AreaId"}},required:["floor","id"],type:"object"},LocationEntranceMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/EntranceId"}},required:["floor","id"],type:"object"},LocationId:{description:"An ID for a location",pattern:"^loc_[A-Za-z0-9_-]{8,}$",type:"string"},LocationLink:{additionalProperties:!1,properties:{label:{type:"string"},url:{description:"The URL of the link",format:"uri",type:"string"}},required:["label","url"],type:"object"},LocationObstructionMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/ObstructionId"}},required:["floor","id"],type:"object"},LocationPicture:{additionalProperties:!1,description:"The location's pictures Single-field object, because it's plausible we might add captions or comments in the future",properties:{url:{format:"uri",type:"string"}},type:"object"},LocationSocial:{additionalProperties:!1,properties:{name:{description:"The name of the social media platform.",type:"string"},url:{description:"The URL of the social media profile",format:"uri",type:"string"}},required:["name","url"],type:"object"},LocationSpaceMapping:{additionalProperties:!1,properties:{floor:{$ref:"#/definitions/FloorId"},id:{$ref:"#/definitions/SpaceId"}},required:["floor","id"],type:"object"},LocationState:{additionalProperties:!1,description:"The state of a location. Start and end dates are optional.",properties:{end:{description:"The start date of the state",format:"date",type:"string"},start:{description:"The start date of the state",format:"date",type:"string"},type:{description:"The type of the location state. Technically not limited, but should be one of the following:\n- closed-temporarily\n- new\n- pop-up\n- coming-soon\n- relocated",type:"string"}},required:["type"],type:"object"},Longitude:{description:"A WGS 84-compatible longitude coordinate value.",maximum:180,minimum:-180,type:"number"},ManifestCollection:{additionalProperties:!1,properties:{features:{items:{$ref:"#/definitions/ManifestFeature"},maxItems:1,minItems:1,type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},ManifestFeature:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/Point"},properties:{$ref:"#/definitions/ManifestProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},ManifestFile:{additionalProperties:!1,properties:{name:{type:"string"},type:{const:"file",type:"string"}},required:["type","name"],type:"object"},ManifestFolder:{additionalProperties:!1,properties:{children:{items:{$ref:"#/definitions/ManifestFile"},minItems:1,type:"array"},name:{type:"string"},type:{const:"folder",type:"string"}},required:["type","name","children"],type:"object"},ManifestProperties:{additionalProperties:!1,properties:{folder_struct:{items:{anyOf:[{$ref:"#/definitions/ManifestFolder"},{$ref:"#/definitions/ManifestFile"}]},type:"array"},language:{description:"The RFC 5646 language tag of the MVF. https://datatracker.ietf.org/doc/html/rfc5646",examples:["en-US"],type:"string"},map:{description:"The identifier of the map that this MVF is for.",type:"string"},name:{type:"string"},naturalBearing:{description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"',maximum:360,minimum:0,type:"number"},org_id:{type:"string"},time:{description:"An ISO 8601 date-time string, including timezone offset.",format:"date-time",type:"string"},tzid:{description:"The map's timezone, from the IANA Time Zone Database. Should be in the format of `America/New_York`",examples:["America/New_York"],pattern:"^[A-Za-z0-9_-]+\\/[A-Za-z0-9_-]+$",type:"string"},version:{const:"2.0.0",type:"string"}},required:["name","folder_struct","version","time"],type:"object"},Maps:{deprecated:"This is only present on `map.geojson` which is deprecated. Use\nthe collection on `floor.geojson` instead.",items:{$ref:"#/definitions/FloorProperties"},type:"array"},Material:{additionalProperties:!1,description:"The color and/or texture that should be applied to an instance of a Shape.\n\nIf both a color and a texture are provided, the color will be applied to the texture via a multiply operation. If neither are provided, the shape will be white.",properties:{color:{description:"The color of this mateial as a hex code.",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},texture:{$ref:"#/definitions/Texture"}},type:"object"},Metadata:{additionalProperties:{},description:"Can be any extra metadata that is not part of the main MVF spec. Presence of any key or value is not guaranteed. Values are expected to be JSON-serializable.",type:"object"},ModelInstance:{additionalProperties:!1,description:"An instance of a 3D model.",properties:{altitude:{description:"The distance above ground, in metres, where this Decoration's origin point should be placed.",type:"number"},path:{description:"The path to this asset, relative to the MVF's models folder. Supports GLTF and OBJ.",minLength:1,type:"string"},position:{$ref:"#/definitions/Position",description:"The long/lat point that the Decoration's origin point correponds to."},rotation:{$ref:"#/definitions/Vector3",description:"The rotation, in Euler angles in XYZ order, that will be applied to this Decoration."},scale:{$ref:"#/definitions/Vector3",description:"The X, Y and Z scale that will be applied to this Decoration."}},required:["altitude","path","position","rotation","scale"],type:"object"},ModelInstanceCollection:{additionalProperties:{$ref:"#/definitions/ModelInstance"},description:"A map of model instances, where keys are valid polygon or obstruction IDs. Replaces the specified polygon.",type:"object"},MultiPolygon:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry.",properties:{coordinates:{items:{items:{items:{$ref:"#/definitions/Position"},type:"array"},type:"array"},type:"array"},type:{const:"MultiPolygon",type:"string"}},required:["coordinates","type"],type:"object"},NodeCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CNodeProperties%3E"},NodeId:{pattern:"^n_[A-Za-z0-9_-]{8,}$",type:"string"},NodeProperties:{additionalProperties:!1,properties:{externalId:{type:"string"},floor:{$ref:"#/definitions/FloorId",description:"The ID of the floor this node is found on."},id:{$ref:"#/definitions/NodeId"},map:{$ref:"#/definitions/FloorId",deprecated:"use `floor` instead.",description:"The ID of the floor this node is found on."},neighbors:{description:"A list of nodes that can be navigated to from this node.",items:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/NodeId"},weight:{description:"The cost of navigating to this node.",minimum:0,type:"number"}},required:["id","weight"],type:"object"},type:"array"},preventSmoothing:{description:"Flag that may optionally indicate that a node is part of a custom path network rather than auto generated and should not be removed during smoothing/simplifcation.",type:"boolean"},space:{description:"The IDs of any spaces this node may be contained within.",items:{$ref:"#/definitions/SpaceId"},type:"array"}},required:["id","externalId","map","space","neighbors"],type:"object"},ObstructionCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CLineString)%2CObstructionProperties%3E"},ObstructionId:{pattern:"^o_[A-Za-z0-9_-]{8,}$",type:"string"},ObstructionProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this obstruction, if it is a polygon. This is undefined for line strings as this can be trivially derived."},details:{$ref:"#/definitions/Details"},entrances:{description:"A list of entrance IDs corresponding to entrances that can be used to navigate through this obstruction.",items:{$ref:"#/definitions/EntranceId"},type:"array"},externalId:{type:"string"},footprintComponent:{description:"Indicates whether this obstruction is considered part of the footprint of the building it is a part of. For example, an exterior wall would be considered part of the building footprint.",type:"boolean"},id:{$ref:"#/definitions/ObstructionId"},kind:{type:"string"},metadata:{$ref:"#/definitions/Metadata"}},required:["id","externalId","entrances"],type:"object"},OpeningHoursSpecification:{additionalProperties:!1,description:"We (almost) follow this schema (http://schema.org/OpeningHoursSpecification) The only difference is that we (like Google: https://developers.google.com/search/docs/data-types/local-businesses) accept dayOfWeek as an array as well as an individual day.\n\nBehavioral notes:\n- if the \"opens\" property is not present, the location is closed, and the closes property is ignored (Schema.org style)\n- if opens/closes are both set to 00:00, the location is closed (Google style)\n- If special hours do not specifiy certain weekdays being open, those weekdays are closed.\n- Not specifying dayOfWeek is equivalent to specifying every day of the week.\n- we will omit the '@type' property when producing MVFs. But we won't reject 3rd party MVFs that include it.",properties:{"@type":{const:"OpeningHoursSpecification",default:"OpeningHoursSpecification",description:"The type of opening hours",type:"string"},closes:{$ref:"#/definitions/Time",description:"The time the opening hours end"},dayOfWeek:{anyOf:[{$ref:"#/definitions/DayOrPublicHoliday"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},maxItems:1,minItems:1,type:"array"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},type:"array"}],description:"The days of the week the opening hours apply to"},opens:{$ref:"#/definitions/Time",description:"The time the opening hours start"},validFrom:{description:"The date the opening hours start, in ISO 8601 format",format:"date-time",type:"string"},validThrough:{description:"The date the opening hours end, in ISO 8601 format",format:"date-time",type:"string"}},type:"object"},OperationHours:{additionalProperties:!1,description:"We (almost) follow this schema (http://schema.org/OpeningHoursSpecification) The only difference is that we (like Google: https://developers.google.com/search/docs/data-types/local-businesses) accept dayOfWeek as an array as well as an individual day.",properties:{"@type":{const:"OpeningHoursSpecification",default:"OpeningHoursSpecification",description:"The type of operation hours",type:"string"},closes:{$ref:"#/definitions/Time",description:"The time the operation hours end"},dayOfWeek:{anyOf:[{$ref:"#/definitions/DayOrPublicHoliday"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},maxItems:1,minItems:1,type:"array"},{items:{$ref:"#/definitions/DayOrPublicHoliday"},type:"array"}],description:"The days of the week the operation hours apply to"},opens:{$ref:"#/definitions/Time",description:"The time the operation hours start"},validFrom:{description:"The date the operation hours start, in ISO 8601 format",format:"date-time",type:"string"},validThrough:{description:"The date the operation hours end, in ISO 8601 format",format:"date-time",type:"string"}},type:"object"},ParsedMVF:{additionalProperties:!1,properties:{annotation:{additionalProperties:{anyOf:[{$ref:"#/definitions/AnnotationCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},area:{additionalProperties:{anyOf:[{$ref:"#/definitions/AreaCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"category.json":{items:{$ref:"#/definitions/Category"},type:"array"},"connection.json":{$ref:"#/definitions/Connections"},enterprise:{$ref:"#/definitions/EnterpriseCollection"},entrance:{additionalProperties:{anyOf:[{$ref:"#/definitions/EntranceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},facade:{additionalProperties:{anyOf:[{$ref:"#/definitions/Facade"},{not:{}}]},propertyNames:{pattern:"^fs_[A-Za-z0-9_-]{8,}$"},type:"object"},"floor.geojson":{$ref:"#/definitions/FloorCollection"},floorImages:{additionalProperties:{anyOf:[{$ref:"#/definitions/FloorImageFeatureCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"floorstack.json":{$ref:"#/definitions/FloorStacks"},"location.json":{items:{$ref:"#/definitions/Location"},type:"array"},"manifest.geojson":{$ref:"#/definitions/ManifestCollection"},"map.geojson":{$ref:"#/definitions/Maps",deprecated:"Use `floor.geojson` instead."},"mapstack.geojson":{$ref:"#/definitions/FloorStacks",deprecated:"Use `floorstack.json` instead."},"mapstack.json":{$ref:"#/definitions/FloorStacks",deprecated:"Use `floorstack.json` instead."},modelInstances:{additionalProperties:{anyOf:[{$ref:"#/definitions/ModelInstanceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"node.geojson":{$ref:"#/definitions/NodeCollection"},obstruction:{additionalProperties:{anyOf:[{$ref:"#/definitions/ObstructionCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},shapeInstances:{additionalProperties:{anyOf:[{$ref:"#/definitions/ShapeInstanceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"shapes.json":{$ref:"#/definitions/ShapeCollection"},space:{additionalProperties:{anyOf:[{$ref:"#/definitions/SpaceCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"styles.json":{$ref:"#/definitions/StyleCollection"},textAreas:{additionalProperties:{anyOf:[{$ref:"#/definitions/TextAreaFeatureCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"},"tileset.json":{$ref:"#/definitions/TilesetCollection"},window:{additionalProperties:{anyOf:[{$ref:"#/definitions/WindowCollection"},{not:{}}]},propertyNames:{pattern:"^[mf]_[A-Za-z0-9_-]{8,}$"},type:"object"}},required:["manifest.geojson","mapstack.geojson","map.geojson","space","obstruction","connection.json","node.geojson","entrance"],type:"object"},Point:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON Point geometry.",properties:{coordinates:{$ref:"#/definitions/Position"},type:{const:"Point",type:"string"}},required:["coordinates","type"],type:"object"},PointStyle:{additionalProperties:!1,properties:{points:{description:"The points which this style applies to.",items:{$ref:"#/definitions/SpaceId"},type:"array"},showImage:{description:"Whether or not the first image attached to the space or obstruction should be displayed on the point.",type:"boolean"}},required:["points"],type:"object"},Polygon:{additionalProperties:!1,description:"An RFC-7946 compatible GeoJSON Polygon geometry.",properties:{coordinates:{items:{items:{$ref:"#/definitions/Position"},type:"array"},type:"array"},type:{const:"Polygon",type:"string"}},required:["coordinates","type"],type:"object"},PolygonStyle:{additionalProperties:!1,properties:{altitude:{description:'How far off the "ground" the objects belonging to this layer should be drawn, in meters.',minimum:0,type:"number"},color:{description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB",pattern:"^#[0-9a-fA-F]{6}$",type:"string"},height:{description:"The height of the objects belonging to this layer, in meters.",minimum:0,type:"number"},opacity:{maximum:1,minimum:0,type:"number"},polygons:{description:"The polygons which this style applies to.",items:{anyOf:[{$ref:"#/definitions/ObstructionId"},{$ref:"#/definitions/SpaceId"}]},type:"array"},showImage:{description:"Whether or not the first image attached to the space or obstruction should be displayed on the polygon.",type:"boolean"}},required:["altitude","color","height","opacity","polygons"],type:"object"},Position:{description:"A valid WGS 84 position consisting of a longitude coodinate, followed by a latitude coordinate.",items:[{$ref:"#/definitions/Longitude"},{$ref:"#/definitions/Latitude"}],maxItems:2,minItems:2,type:"array"},Ring:{description:"A simple shape for part of a complex polygon",items:{$ref:"#/definitions/LocalPosition"},minItems:3,type:"array"},Shape:{description:"A 3D object made from extruded 2D polygons, that can be rendered to the map as a ShapeInstance.",items:{$ref:"#/definitions/ShapeComponent"},minItems:1,type:"array"},ShapeCollection:{additionalProperties:{$ref:"#/definitions/Shape"},description:"A group of Shapes, without any information as to how they will be placed in a scene.",propertyNames:{pattern:"^sh_[A-Za-z0-9_-]{8,}$"},type:"object"},ShapeComponent:{additionalProperties:!1,description:"A single extruded 2D polygon.",properties:{altitude:{description:"In metres.",type:"number"},geometry:{description:"Can contain holes, like GeoJSON.",items:{$ref:"#/definitions/Ring"},minItems:1,type:"array"},height:{description:"In metres.",exclusiveMinimum:0,type:"number"}},required:["geometry","altitude","height"],type:"object"},ShapeId:{pattern:"^sh_[A-Za-z0-9_-]{8,}$",type:"string"},ShapeInstance:{additionalProperties:!1,description:"An instance of a Shape.",properties:{altitude:{description:"The distance above ground, in metres, where this Decoration's origin point should be placed.",type:"number"},id:{$ref:"#/definitions/ShapeId",description:"The identifier of the Shape to be placed."},material:{$ref:"#/definitions/Material",description:"The color and/or texture to apply to this shape instance."},position:{$ref:"#/definitions/Position",description:"The long/lat point that the Decoration's origin point correponds to."},rotation:{$ref:"#/definitions/Vector3",description:"The rotation, in Euler angles in XYZ order, that will be applied to this Decoration."},scale:{$ref:"#/definitions/Vector3",description:"The X, Y and Z scale that will be applied to this Decoration."}},required:["altitude","id","material","position","rotation","scale"],type:"object"},ShapeInstanceCollection:{additionalProperties:{$ref:"#/definitions/ShapeInstance"},description:"A map of shape instances, where keys are valid polygon or obstruction IDs. Replaces the specified polygon.",type:"object"},SiblingGroup:{additionalProperties:!1,properties:{label:{type:"string"},siblings:{items:{$ref:"#/definitions/EnterpriseLocationId"},type:"array"}},required:["label","siblings"],type:"object"},SpaceCollection:{$ref:"#/definitions/FeatureCollection%3C(Polygon%7CLineString%7CPoint)%2CSpaceProperties%3E"},SpaceId:{pattern:"^s_[A-Za-z0-9_-]{8,}$",type:"string"},SpaceProperties:{additionalProperties:!1,properties:{center:{$ref:"#/definitions/Position",description:"The center of mass of this space, if it is a polygon. This is undefined for line string and point spaces as these can be trivially derived."},destinationNodes:{description:"A list of node IDs which can be used to navigate to this space.",items:{$ref:"#/definitions/NodeId"},type:"array"},details:{$ref:"#/definitions/Details"},externalId:{type:"string"},id:{$ref:"#/definitions/SpaceId"},kind:{type:"string"},metadata:{$ref:"#/definitions/Metadata"},tags:{description:"A list of tags that may apply to categorize the space, e.g. Void",items:{type:"string"},type:"array"}},required:["id","externalId","destinationNodes"],type:"object"},StyleCollection:{additionalProperties:{anyOf:[{$ref:"#/definitions/PolygonStyle"},{$ref:"#/definitions/LineStringStyle"},{$ref:"#/definitions/PointStyle"},{not:{}}]},description:"A map of layer styles, where keys represent the group IDs of each style.",type:"object"},TextAreaAlignment:{enum:["near","center"],type:"string"},TextAreaFeatureCollection:{$ref:"#/definitions/FeatureCollection%3CPoint%2CTextAreaProperties%3E",description:"A collection of text areas to be displayed on a map. They are either attached to a polygon or are floating in space."},TextAreaProperties:{anyOf:[{$ref:"#/definitions/AnchoredTextAreaProperties"},{$ref:"#/definitions/FloatingTextAreaProperties"}]},Texture:{additionalProperties:!1,description:"A reference to an image texture and how it should be applied to a Component.",properties:{path:{description:"The path to this asset, relative to the MVF's images folder.",minLength:1,type:"string"},repeat:{$ref:"#/definitions/TextureRepeat"}},required:["path"],type:"object"},TextureRepeat:{additionalProperties:!1,description:"How a texture should be placed on a Component.",properties:{u:{type:"number"},v:{type:"number"}},required:["u","v"],type:"object"},TilesetCollection:{additionalProperties:!1,description:"Collection of tileset styles",properties:{default:{$ref:"#/definitions/TilesetStyle",description:"Default tileset style that should be used"},others:{description:"Additional tileset styles that can be used",items:{$ref:"#/definitions/TilesetStyle"},type:"array"}},required:["default"],type:"object"},TilesetStyle:{additionalProperties:!1,description:"A tileset style definition",properties:{key:{description:"Unique identifier for this tileset style",minLength:1,type:"string"},name:{description:"Display name for this tileset style",minLength:1,type:"string"},url:{description:"URL to the tileset style definition. This should be a JSON file matching the MapLibre style specification.",format:"uri",type:"string"}},required:["key","name","url"],type:"object"},Time:{description:"A time in the format of HH:MM:SS",pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",type:"string"},Vector3:{description:"A three-number tuple.",items:{type:"number"},maxItems:3,minItems:3,type:"array"},WindowCollection:{additionalProperties:!1,properties:{features:{items:{additionalProperties:!1,properties:{geometry:{$ref:"#/definitions/LineString"},properties:{$ref:"#/definitions/WindowProperties"},type:{$ref:"#/definitions/FeatureType"}},required:["type","geometry","properties"],type:"object"},type:"array"},type:{$ref:"#/definitions/FeatureCollectionType"}},required:["type","features"],type:"object"},WindowId:{pattern:"^w_[A-Za-z0-9_-]{8,}$",type:"string"},WindowProperties:{additionalProperties:!1,properties:{id:{$ref:"#/definitions/WindowId"}},required:["id"],type:"object"}}};var Tc=MP.default.default(new CP.default.default).compile(Ec(RP)),LP=o(e=>Tc(e),"validateMvf"),NN=o(e=>{var t,r;return Tc(e),(r=(t=Tc.errors)==null?void 0:t.map(n=>{let i=Tc.schema.$ref,s=n.instancePath,a=n.message;return"".concat(i).concat(s,": ").concat(a)}))!=null?r:[]},"getMvfValidationErrors");c();c();c();c();c();c();c();c();c();c();c();c();c();var f8="PublicHolidays";c();c();c();c();var RN=o(e=>{if(e==="space"||e==="obstruction"||e==="entrance")return{}},"defaultEntry"),CN=/\.json|\.geojson$/,vc=o((e,t,r)=>{let n=e[t];if(typeof n!="object"||Object.keys(n).length===0)return RN(t);let i={};for(let[s,a]of Object.entries(n)){let f=s.replace(CN,"");i[f]=JSON.parse(r(a))}return i},"rawFolderToParsed"),MN=["floorstack.json","styles.json","shapes.json","mapstack.json","floor.geojson","tileset.json","location.json","category.json"],LN=MN,UN=["annotation","textAreas","enterprise","floorImages","shapeInstances","modelInstances","window","area","facade"],DN=UN,qN=o(e=>{let t=new TextDecoder("utf-8"),r=t.decode.bind(t),n={"manifest.geojson":JSON.parse(r(e["manifest.geojson"])),"mapstack.geojson":JSON.parse(r(e["mapstack.geojson"])),"map.geojson":JSON.parse(r(e["map.geojson"])),"node.geojson":JSON.parse(r(e["node.geojson"])),"connection.json":JSON.parse(r(e["connection.json"])),space:vc(e,"space",r),obstruction:vc(e,"obstruction",r),entrance:vc(e,"entrance",r)};for(let i of LN)e[i]&&(n[i]=JSON.parse(r(e[i])));for(let i of DN)e[i]&&(n[i]=vc(e,i,r));return n},"rawToParsedMVF");c();c();c();c();c();c();var Pe={};go(Pe,{HasPropertyKey:()=>KN,IsArray:()=>zt,IsAsyncIterator:()=>$d,IsBigInt:()=>Rs,IsBoolean:()=>io,IsDate:()=>vo,IsFunction:()=>wd,IsIterator:()=>Pd,IsNull:()=>Od,IsNumber:()=>Br,IsObject:()=>Je,IsRegExp:()=>Cs,IsString:()=>et,IsSymbol:()=>Fd,IsUint8Array:()=>jn,IsUndefined:()=>ut});c();function KN(e,t){return t in e}o(KN,"HasPropertyKey");function $d(e){return Je(e)&&!zt(e)&&!jn(e)&&Symbol.asyncIterator in e}o($d,"IsAsyncIterator");function zt(e){return Array.isArray(e)}o(zt,"IsArray");function Rs(e){return typeof e=="bigint"}o(Rs,"IsBigInt");function io(e){return typeof e=="boolean"}o(io,"IsBoolean");function vo(e){return e instanceof globalThis.Date}o(vo,"IsDate");function wd(e){return typeof e=="function"}o(wd,"IsFunction");function Pd(e){return Je(e)&&!zt(e)&&!jn(e)&&Symbol.iterator in e}o(Pd,"IsIterator");function Od(e){return e===null}o(Od,"IsNull");function Br(e){return typeof e=="number"}o(Br,"IsNumber");function Je(e){return typeof e=="object"&&e!==null}o(Je,"IsObject");function Cs(e){return e instanceof globalThis.RegExp}o(Cs,"IsRegExp");function et(e){return typeof e=="string"}o(et,"IsString");function Fd(e){return typeof e=="symbol"}o(Fd,"IsSymbol");function jn(e){return e instanceof globalThis.Uint8Array}o(jn,"IsUint8Array");function ut(e){return e===void 0}o(ut,"IsUndefined");function zN(e){return e.map(t=>Ac(t))}o(zN,"ArrayType");function GN(e){return new Date(e.getTime())}o(GN,"DateType");function BN(e){return new Uint8Array(e)}o(BN,"Uint8ArrayType");function VN(e){return new RegExp(e.source,e.flags)}o(VN,"RegExpType");function WN(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ac(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ac(e[r]);return t}o(WN,"ObjectType");function Ac(e){return zt(e)?zN(e):vo(e)?GN(e):jn(e)?BN(e):Cs(e)?VN(e):Je(e)?WN(e):e}o(Ac,"Visit");function it(e){return Ac(e)}o(it,"Clone");function UP(e){return e.map(t=>Ms(t))}o(UP,"CloneRest");function Ms(e,t){return t===void 0?it(e):it(S(S({},t),e))}o(Ms,"CloneType");c();c();c();function jc(e){return pe(e)&&Symbol.asyncIterator in e}o(jc,"IsAsyncIterator");function kc(e){return pe(e)&&Symbol.iterator in e}o(kc,"IsIterator");function Sd(e){return pe(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(Sd,"IsStandardObject");function _c(e){return e instanceof Promise}o(_c,"IsPromise");function Qt(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(Qt,"IsDate");function DP(e){return e instanceof globalThis.Map}o(DP,"IsMap");function qP(e){return e instanceof globalThis.Set}o(qP,"IsSet");function Or(e){return ArrayBuffer.isView(e)}o(Or,"IsTypedArray");function hi(e){return e instanceof globalThis.Uint8Array}o(hi,"IsUint8Array");function oe(e,t){return t in e}o(oe,"HasPropertyKey");function pe(e){return e!==null&&typeof e=="object"}o(pe,"IsObject");function ue(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ue,"IsArray");function pt(e){return e===void 0}o(pt,"IsUndefined");function kn(e){return e===null}o(kn,"IsNull");function cn(e){return typeof e=="boolean"}o(cn,"IsBoolean");function re(e){return typeof e=="number"}o(re,"IsNumber");function Nc(e){return Number.isInteger(e)}o(Nc,"IsInteger");function Nt(e){return typeof e=="bigint"}o(Nt,"IsBigInt");function Oe(e){return typeof e=="string"}o(Oe,"IsString");function so(e){return typeof e=="function"}o(so,"IsFunction");function _n(e){return typeof e=="symbol"}o(_n,"IsSymbol");function Rt(e){return Nt(e)||cn(e)||kn(e)||re(e)||Oe(e)||_n(e)||pt(e)}o(Rt,"IsValueType");var ze;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(a,f){return e.ExactOptionalPropertyTypes?f in a:a[f]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){let f=pe(a);return e.AllowArrayObject?f:f&&!ue(a)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return r(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return e.AllowNaN?re(a):Number.isFinite(a)}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){let f=pt(a);return e.AllowNullVoid?f||a===null:f}o(s,"IsVoidLike"),e.IsVoidLike=s})(ze||(ze={}));c();function HN(e){return globalThis.Object.freeze(e).map(t=>Ls(t))}o(HN,"ImmutableArray");function ZN(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ls(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ls(e[r]);return globalThis.Object.freeze(t)}o(ZN,"ImmutableObject");function Ls(e){return zt(e)?HN(e):vo(e)?e:jn(e)?e:Cs(e)?e:Je(e)?ZN(e):e}o(Ls,"Immutable");function j(e,t){let r=t!==void 0?S(S({},t),e):e;switch(ze.InstanceMode){case"freeze":return Ls(r);case"clone":return it(r);default:return r}}o(j,"CreateType");c();var Ed=class Ed extends Error{constructor(t){super(t)}};o(Ed,"TypeBoxError");var ne=Ed;c();c();c();var st=Symbol.for("TypeBox.Transform"),Nn=Symbol.for("TypeBox.Readonly"),er=Symbol.for("TypeBox.Optional"),Fr=Symbol.for("TypeBox.Hint"),E=Symbol.for("TypeBox.Kind");function KP(e){return Je(e)&&e[Nn]==="Readonly"}o(KP,"IsReadonly");function fn(e){return Je(e)&&e[er]==="Optional"}o(fn,"IsOptional");function Td(e){return Ae(e,"Any")}o(Td,"IsAny");function Rn(e){return Ae(e,"Array")}o(Rn,"IsArray");function Us(e){return Ae(e,"AsyncIterator")}o(Us,"IsAsyncIterator");function vd(e){return Ae(e,"BigInt")}o(vd,"IsBigInt");function Ad(e){return Ae(e,"Boolean")}o(Ad,"IsBoolean");function Ds(e){return Ae(e,"Constructor")}o(Ds,"IsConstructor");function JN(e){return Ae(e,"Date")}o(JN,"IsDate");function qs(e){return Ae(e,"Function")}o(qs,"IsFunction");function Ao(e){return Ae(e,"Integer")}o(Ao,"IsInteger");function It(e){return Ae(e,"Intersect")}o(It,"IsIntersect");function Ks(e){return Ae(e,"Iterator")}o(Ks,"IsIterator");function Ae(e,t){return Je(e)&&E in e&&e[E]===t}o(Ae,"IsKindOf");function Cn(e){return Ae(e,"Literal")}o(Cn,"IsLiteral");function dr(e){return Ae(e,"MappedKey")}o(dr,"IsMappedKey");function at(e){return Ae(e,"MappedResult")}o(at,"IsMappedResult");function ao(e){return Ae(e,"Never")}o(ao,"IsNever");function YN(e){return Ae(e,"Not")}o(YN,"IsNot");function XN(e){return Ae(e,"Null")}o(XN,"IsNull");function jo(e){return Ae(e,"Number")}o(jo,"IsNumber");function Et(e){return Ae(e,"Object")}o(Et,"IsObject");function ko(e){return Ae(e,"Promise")}o(ko,"IsPromise");function jd(e){return Ae(e,"Record")}o(jd,"IsRecord");function kd(e){return Ae(e,"Ref")}o(kd,"IsRef");function _d(e){return Ae(e,"RegExp")}o(_d,"IsRegExp");function zs(e){return Ae(e,"String")}o(zs,"IsString");function QN(e){return Ae(e,"Symbol")}o(QN,"IsSymbol");function mr(e){return Ae(e,"TemplateLiteral")}o(mr,"IsTemplateLiteral");function eR(e){return Ae(e,"This")}o(eR,"IsThis");function gi(e){return Je(e)&&st in e}o(gi,"IsTransform");function Vr(e){return Ae(e,"Tuple")}o(Vr,"IsTuple");function tR(e){return Ae(e,"Undefined")}o(tR,"IsUndefined");function Ue(e){return Ae(e,"Union")}o(Ue,"IsUnion");function rR(e){return Ae(e,"Uint8Array")}o(rR,"IsUint8Array");function nR(e){return Ae(e,"Unknown")}o(nR,"IsUnknown");function oR(e){return Ae(e,"Unsafe")}o(oR,"IsUnsafe");function iR(e){return Ae(e,"Void")}o(iR,"IsVoid");function co(e){return Je(e)&&E in e&&et(e[E])}o(co,"IsKind");function Wr(e){return Td(e)||Rn(e)||Ad(e)||vd(e)||Us(e)||Ds(e)||JN(e)||qs(e)||Ao(e)||It(e)||Ks(e)||Cn(e)||dr(e)||at(e)||ao(e)||YN(e)||XN(e)||jo(e)||Et(e)||ko(e)||jd(e)||kd(e)||_d(e)||zs(e)||QN(e)||mr(e)||eR(e)||Vr(e)||tR(e)||Ue(e)||rR(e)||nR(e)||oR(e)||iR(e)||co(e)}o(Wr,"IsSchema");var x={};go(x,{IsAny:()=>VP,IsArray:()=>WP,IsAsyncIterator:()=>HP,IsBigInt:()=>ZP,IsBoolean:()=>JP,IsConstructor:()=>YP,IsDate:()=>XP,IsFunction:()=>QP,IsInteger:()=>eO,IsIntersect:()=>tO,IsIterator:()=>rO,IsKind:()=>SO,IsKindOf:()=>Se,IsLiteral:()=>Bs,IsLiteralBoolean:()=>pR,IsLiteralNumber:()=>oO,IsLiteralString:()=>nO,IsLiteralValue:()=>iO,IsMappedKey:()=>sO,IsMappedResult:()=>aO,IsNever:()=>cO,IsNot:()=>fO,IsNull:()=>uO,IsNumber:()=>pO,IsObject:()=>lO,IsOptional:()=>uR,IsPromise:()=>dO,IsProperties:()=>Md,IsReadonly:()=>fR,IsRecord:()=>mO,IsRecursive:()=>lR,IsRef:()=>yO,IsRegExp:()=>hO,IsSchema:()=>Fe,IsString:()=>gO,IsSymbol:()=>IO,IsTemplateLiteral:()=>xO,IsThis:()=>bO,IsTransform:()=>tt,IsTuple:()=>$O,IsUint8Array:()=>wO,IsUndefined:()=>Ii,IsUnion:()=>Ld,IsUnionLiteral:()=>dR,IsUnknown:()=>PO,IsUnsafe:()=>OO,IsVoid:()=>FO,TypeGuardUnknownTypeError:()=>Nd});c();var Ud=class Ud extends ne{};o(Ud,"TypeGuardUnknownTypeError");var Nd=Ud,sR=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function zP(e){try{return new RegExp(e),!0}catch(t){return!1}}o(zP,"IsPattern");function Rd(e){if(!et(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(Rd,"IsControlCharacterFree");function GP(e){return Cd(e)||Fe(e)}o(GP,"IsAdditionalProperties");function Gs(e){return ut(e)||Rs(e)}o(Gs,"IsOptionalBigInt");function Qe(e){return ut(e)||Br(e)}o(Qe,"IsOptionalNumber");function Cd(e){return ut(e)||io(e)}o(Cd,"IsOptionalBoolean");function Ge(e){return ut(e)||et(e)}o(Ge,"IsOptionalString");function aR(e){return ut(e)||et(e)&&Rd(e)&&zP(e)}o(aR,"IsOptionalPattern");function cR(e){return ut(e)||et(e)&&Rd(e)}o(cR,"IsOptionalFormat");function BP(e){return ut(e)||Fe(e)}o(BP,"IsOptionalSchema");function fR(e){return Je(e)&&e[Nn]==="Readonly"}o(fR,"IsReadonly");function uR(e){return Je(e)&&e[er]==="Optional"}o(uR,"IsOptional");function VP(e){return Se(e,"Any")&&Ge(e.$id)}o(VP,"IsAny");function WP(e){return Se(e,"Array")&&e.type==="array"&&Ge(e.$id)&&Fe(e.items)&&Qe(e.minItems)&&Qe(e.maxItems)&&Cd(e.uniqueItems)&&BP(e.contains)&&Qe(e.minContains)&&Qe(e.maxContains)}o(WP,"IsArray");function HP(e){return Se(e,"AsyncIterator")&&e.type==="AsyncIterator"&&Ge(e.$id)&&Fe(e.items)}o(HP,"IsAsyncIterator");function ZP(e){return Se(e,"BigInt")&&e.type==="bigint"&&Ge(e.$id)&&Gs(e.exclusiveMaximum)&&Gs(e.exclusiveMinimum)&&Gs(e.maximum)&&Gs(e.minimum)&&Gs(e.multipleOf)}o(ZP,"IsBigInt");function JP(e){return Se(e,"Boolean")&&e.type==="boolean"&&Ge(e.$id)}o(JP,"IsBoolean");function YP(e){return Se(e,"Constructor")&&e.type==="Constructor"&&Ge(e.$id)&&zt(e.parameters)&&e.parameters.every(t=>Fe(t))&&Fe(e.returns)}o(YP,"IsConstructor");function XP(e){return Se(e,"Date")&&e.type==="Date"&&Ge(e.$id)&&Qe(e.exclusiveMaximumTimestamp)&&Qe(e.exclusiveMinimumTimestamp)&&Qe(e.maximumTimestamp)&&Qe(e.minimumTimestamp)&&Qe(e.multipleOfTimestamp)}o(XP,"IsDate");function QP(e){return Se(e,"Function")&&e.type==="Function"&&Ge(e.$id)&&zt(e.parameters)&&e.parameters.every(t=>Fe(t))&&Fe(e.returns)}o(QP,"IsFunction");function eO(e){return Se(e,"Integer")&&e.type==="integer"&&Ge(e.$id)&&Qe(e.exclusiveMaximum)&&Qe(e.exclusiveMinimum)&&Qe(e.maximum)&&Qe(e.minimum)&&Qe(e.multipleOf)}o(eO,"IsInteger");function Md(e){return Je(e)&&Object.entries(e).every(([t,r])=>Rd(t)&&Fe(r))}o(Md,"IsProperties");function tO(e){return Se(e,"Intersect")&&!(et(e.type)&&e.type!=="object")&&zt(e.allOf)&&e.allOf.every(t=>Fe(t)&&!tt(t))&&Ge(e.type)&&(Cd(e.unevaluatedProperties)||BP(e.unevaluatedProperties))&&Ge(e.$id)}o(tO,"IsIntersect");function rO(e){return Se(e,"Iterator")&&e.type==="Iterator"&&Ge(e.$id)&&Fe(e.items)}o(rO,"IsIterator");function Se(e,t){return Je(e)&&E in e&&e[E]===t}o(Se,"IsKindOf");function nO(e){return Bs(e)&&et(e.const)}o(nO,"IsLiteralString");function oO(e){return Bs(e)&&Br(e.const)}o(oO,"IsLiteralNumber");function pR(e){return Bs(e)&&io(e.const)}o(pR,"IsLiteralBoolean");function Bs(e){return Se(e,"Literal")&&Ge(e.$id)&&iO(e.const)}o(Bs,"IsLiteral");function iO(e){return io(e)||Br(e)||et(e)}o(iO,"IsLiteralValue");function sO(e){return Se(e,"MappedKey")&&zt(e.keys)&&e.keys.every(t=>Br(t)||et(t))}o(sO,"IsMappedKey");function aO(e){return Se(e,"MappedResult")&&Md(e.properties)}o(aO,"IsMappedResult");function cO(e){return Se(e,"Never")&&Je(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(cO,"IsNever");function fO(e){return Se(e,"Not")&&Fe(e.not)}o(fO,"IsNot");function uO(e){return Se(e,"Null")&&e.type==="null"&&Ge(e.$id)}o(uO,"IsNull");function pO(e){return Se(e,"Number")&&e.type==="number"&&Ge(e.$id)&&Qe(e.exclusiveMaximum)&&Qe(e.exclusiveMinimum)&&Qe(e.maximum)&&Qe(e.minimum)&&Qe(e.multipleOf)}o(pO,"IsNumber");function lO(e){return Se(e,"Object")&&e.type==="object"&&Ge(e.$id)&&Md(e.properties)&&GP(e.additionalProperties)&&Qe(e.minProperties)&&Qe(e.maxProperties)}o(lO,"IsObject");function dO(e){return Se(e,"Promise")&&e.type==="Promise"&&Ge(e.$id)&&Fe(e.item)}o(dO,"IsPromise");function mO(e){return Se(e,"Record")&&e.type==="object"&&Ge(e.$id)&&GP(e.additionalProperties)&&Je(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&zP(r[0])&&Je(t.patternProperties)&&Fe(t.patternProperties[r[0]])})(e)}o(mO,"IsRecord");function lR(e){return Je(e)&&Fr in e&&e[Fr]==="Recursive"}o(lR,"IsRecursive");function yO(e){return Se(e,"Ref")&&Ge(e.$id)&&et(e.$ref)}o(yO,"IsRef");function hO(e){return Se(e,"RegExp")&&Ge(e.$id)&&et(e.source)&&et(e.flags)&&Qe(e.maxLength)&&Qe(e.minLength)}o(hO,"IsRegExp");function gO(e){return Se(e,"String")&&e.type==="string"&&Ge(e.$id)&&Qe(e.minLength)&&Qe(e.maxLength)&&aR(e.pattern)&&cR(e.format)}o(gO,"IsString");function IO(e){return Se(e,"Symbol")&&e.type==="symbol"&&Ge(e.$id)}o(IO,"IsSymbol");function xO(e){return Se(e,"TemplateLiteral")&&e.type==="string"&&et(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(xO,"IsTemplateLiteral");function bO(e){return Se(e,"This")&&Ge(e.$id)&&et(e.$ref)}o(bO,"IsThis");function tt(e){return Je(e)&&st in e}o(tt,"IsTransform");function $O(e){return Se(e,"Tuple")&&e.type==="array"&&Ge(e.$id)&&Br(e.minItems)&&Br(e.maxItems)&&e.minItems===e.maxItems&&(ut(e.items)&&ut(e.additionalItems)&&e.minItems===0||zt(e.items)&&e.items.every(t=>Fe(t)))}o($O,"IsTuple");function Ii(e){return Se(e,"Undefined")&&e.type==="undefined"&&Ge(e.$id)}o(Ii,"IsUndefined");function dR(e){return Ld(e)&&e.anyOf.every(t=>nO(t)||oO(t))}o(dR,"IsUnionLiteral");function Ld(e){return Se(e,"Union")&&Ge(e.$id)&&Je(e)&&zt(e.anyOf)&&e.anyOf.every(t=>Fe(t))}o(Ld,"IsUnion");function wO(e){return Se(e,"Uint8Array")&&e.type==="Uint8Array"&&Ge(e.$id)&&Qe(e.minByteLength)&&Qe(e.maxByteLength)}o(wO,"IsUint8Array");function PO(e){return Se(e,"Unknown")&&Ge(e.$id)}o(PO,"IsUnknown");function OO(e){return Se(e,"Unsafe")}o(OO,"IsUnsafe");function FO(e){return Se(e,"Void")&&e.type==="void"&&Ge(e.$id)}o(FO,"IsVoid");function SO(e){return Je(e)&&E in e&&et(e[E])&&!sR.includes(e[E])}o(SO,"IsKind");function Fe(e){return Je(e)&&(VP(e)||WP(e)||JP(e)||ZP(e)||HP(e)||YP(e)||XP(e)||QP(e)||eO(e)||tO(e)||rO(e)||Bs(e)||sO(e)||aO(e)||cO(e)||fO(e)||uO(e)||pO(e)||lO(e)||dO(e)||mO(e)||yO(e)||hO(e)||gO(e)||IO(e)||xO(e)||bO(e)||$O(e)||Ii(e)||Ld(e)||wO(e)||PO(e)||OO(e)||FO(e)||SO(e))}o(Fe,"IsSchema");c();var Dd="(true|false)",Vs="(0|[1-9][0-9]*)",qd="(.*)",mR="(?!.*)",IB="^".concat(Dd,"$"),Mn="^".concat(Vs,"$"),Ln="^".concat(qd,"$"),EO="^".concat(mR,"$");c();var tr={};go(tr,{Clear:()=>hR,Delete:()=>gR,Entries:()=>yR,Get:()=>bR,Has:()=>IR,Set:()=>xR});c();var xi=new Map;function yR(){return new Map(xi)}o(yR,"Entries");function hR(){return xi.clear()}o(hR,"Clear");function gR(e){return xi.delete(e)}o(gR,"Delete");function IR(e){return xi.has(e)}o(IR,"Has");function xR(e,t){xi.set(e,t)}o(xR,"Set");function bR(e){return xi.get(e)}o(bR,"Get");var Tt={};go(Tt,{Clear:()=>wR,Delete:()=>PR,Entries:()=>$R,Get:()=>SR,Has:()=>OR,Set:()=>FR});c();var bi=new Map;function $R(){return new Map(bi)}o($R,"Entries");function wR(){return bi.clear()}o(wR,"Clear");function PR(e){return bi.delete(e)}o(PR,"Delete");function OR(e){return bi.has(e)}o(OR,"Has");function FR(e,t){bi.set(e,t)}o(FR,"Set");function SR(e){return bi.get(e)}o(SR,"Get");c();function TO(e,t){return e.includes(t)}o(TO,"SetIncludes");function vO(e){return[...new Set(e)]}o(vO,"SetDistinct");function ER(e,t){return e.filter(r=>t.includes(r))}o(ER,"SetIntersect");function TR(e,t){return e.reduce((r,n)=>ER(r,n),t)}o(TR,"SetIntersectManyResolve");function AO(e){return e.length===1?e[0]:e.length>1?TR(e.slice(1),e[0]):[]}o(AO,"SetIntersectMany");function jO(e){let t=[];for(let r of e)t.push(...r);return t}o(jO,"SetUnionMany");c();function fo(e){return j({[E]:"Any"},e)}o(fo,"Any");c();function Rc(e,t){return j({[E]:"Array",type:"array",items:e},t)}o(Rc,"Array");c();function Cc(e,t){return j({[E]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(Cc,"AsyncIterator");c();c();c();function vR(e,t){let i=e,{[t]:r}=i;return Yo(i,[ma(t)])}o(vR,"DiscardKey");function mt(e,t){return t.reduce((r,n)=>vR(r,n),e)}o(mt,"Discard");c();function Be(e){return j({[E]:"Never",not:{}},e)}o(Be,"Never");c();c();function je(e){return j({[E]:"MappedResult",properties:e})}o(je,"MappedResult");c();c();function Mc(e,t,r){return j({[E]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(Mc,"Constructor");c();function uo(e,t,r){return j({[E]:"Function",type:"Function",parameters:e,returns:t},r)}o(uo,"Function");c();c();c();c();function Ws(e,t){return j({[E]:"Union",anyOf:e},t)}o(Ws,"UnionCreate");function AR(e){return e.some(t=>fn(t))}o(AR,"IsUnionOptional");function kO(e){return e.map(t=>fn(t)?jR(t):t)}o(kO,"RemoveOptionalFromRest");function jR(e){return mt(e,[er])}o(jR,"RemoveOptionalFromType");function kR(e,t){return AR(e)?cr(Ws(kO(e),t)):Ws(kO(e),t)}o(kR,"ResolveUnion");function un(e,t){return e.length===0?Be(t):e.length===1?j(e[0],t):kR(e,t)}o(un,"UnionEvaluated");c();function Ve(e,t){return e.length===0?Be(t):e.length===1?j(e[0],t):Ws(e,t)}o(Ve,"Union");c();c();c();var zd=class zd extends ne{};o(zd,"TemplateLiteralParserError");var Lc=zd;function _R(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(_R,"Unescape");function Kd(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(Kd,"IsNonEscaped");function Un(e,t){return Kd(e,t,"(")}o(Un,"IsOpenParen");function Hs(e,t){return Kd(e,t,")")}o(Hs,"IsCloseParen");function _O(e,t){return Kd(e,t,"|")}o(_O,"IsSeparator");function NR(e){if(!(Un(e,0)&&Hs(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(Un(e,r)&&(t+=1),Hs(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(NR,"IsGroup");function RR(e){return e.slice(1,e.length-1)}o(RR,"InGroup");function CR(e){let t=0;for(let r=0;r<e.length;r++)if(Un(e,r)&&(t+=1),Hs(e,r)&&(t-=1),_O(e,r)&&t===0)return!0;return!1}o(CR,"IsPrecedenceOr");function MR(e){for(let t=0;t<e.length;t++)if(Un(e,t))return!0;return!1}o(MR,"IsPrecedenceAnd");function LR(e){let[t,r]=[0,0],n=[];for(let s=0;s<e.length;s++)if(Un(e,s)&&(t+=1),Hs(e,s)&&(t-=1),_O(e,s)&&t===0){let a=e.slice(r,s);a.length>0&&n.push($i(a)),r=s+1}let i=e.slice(r);return i.length>0&&n.push($i(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(LR,"Or");function UR(e){function t(i,s){if(!Un(i,s))throw new Lc("TemplateLiteralParser: Index must point to open parens");let a=0;for(let f=s;f<i.length;f++)if(Un(i,f)&&(a+=1),Hs(i,f)&&(a-=1),a===0)return[s,f];throw new Lc("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,s){for(let a=s;a<i.length;a++)if(Un(i,a))return[s,a];return[s,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(Un(e,i)){let[s,a]=t(e,i),f=e.slice(s,a+1);n.push($i(f)),i=a}else{let[s,a]=r(e,i),f=e.slice(s,a);f.length>0&&n.push($i(f)),i=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(UR,"And");function $i(e){return NR(e)?$i(RR(e)):CR(e)?LR(e):MR(e)?UR(e):{type:"const",const:_R(e)}}o($i,"TemplateLiteralParse");function wi(e){return $i(e.slice(1,e.length-1))}o(wi,"TemplateLiteralParseExact");var Bd=class Bd extends ne{};o(Bd,"TemplateLiteralFiniteError");var Gd=Bd;function DR(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}o(DR,"IsNumberExpression");function qR(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}o(qR,"IsBooleanExpression");function KR(e){return e.type==="const"&&e.const===".*"}o(KR,"IsStringExpression");function _o(e){return DR(e)||KR(e)?!1:qR(e)?!0:e.type==="and"?e.expr.every(t=>_o(t)):e.type==="or"?e.expr.every(t=>_o(t)):e.type==="const"?!0:(()=>{throw new Gd("Unknown expression type")})()}o(_o,"IsTemplateLiteralExpressionFinite");function Uc(e){let t=wi(e.pattern);return _o(t)}o(Uc,"IsTemplateLiteralFinite");c();var Wd=class Wd extends ne{};o(Wd,"TemplateLiteralGenerateError");var Vd=Wd;function*NO(e){if(e.length===1)return yield*C(e[0]);for(let t of e[0])for(let r of NO(e.slice(1)))yield"".concat(t).concat(r)}o(NO,"GenerateReduce");function*zR(e){return yield*C(NO(e.expr.map(t=>[...Zs(t)])))}o(zR,"GenerateAnd");function*GR(e){for(let t of e.expr)yield*C(Zs(t))}o(GR,"GenerateOr");function*BR(e){return yield e.const}o(BR,"GenerateConst");function*Zs(e){return e.type==="and"?yield*C(zR(e)):e.type==="or"?yield*C(GR(e)):e.type==="const"?yield*C(BR(e)):(()=>{throw new Vd("Unknown expression")})()}o(Zs,"TemplateLiteralExpressionGenerate");function Pi(e){let t=wi(e.pattern);return _o(t)?[...Zs(t)]:[]}o(Pi,"TemplateLiteralGenerate");c();c();function De(e,t){return j({[E]:"Literal",const:e,type:typeof e},t)}o(De,"Literal");c();function Dc(e){return j({[E]:"Boolean",type:"boolean"},e)}o(Dc,"Boolean");c();function Oi(e){return j({[E]:"BigInt",type:"bigint"},e)}o(Oi,"BigInt");c();function pn(e){return j({[E]:"Number",type:"number"},e)}o(pn,"Number");c();function Sr(e){return j({[E]:"String",type:"string"},e)}o(Sr,"String");function*VR(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield Dc():t==="number"?yield pn():t==="bigint"?yield Oi():t==="string"?yield Sr():yield(()=>{let r=t.split("|").map(n=>De(n.trim()));return r.length===0?Be():r.length===1?r[0]:un(r)})()}o(VR,"FromUnion");function*WR(e){if(e[1]!=="{"){let t=De("$"),r=Hd(e.slice(1));return yield*C([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=VR(e.slice(2,t)),n=Hd(e.slice(t+1));return yield*C([...r,...n])}yield De(e)}o(WR,"FromTerminal");function*Hd(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=De(e.slice(0,t)),n=WR(e.slice(t));return yield*C([r,...n])}yield De(e)}o(Hd,"FromSyntax");function RO(e){return[...Hd(e)]}o(RO,"TemplateLiteralSyntax");c();var Yd=class Yd extends ne{};o(Yd,"TemplateLiteralPatternError");var Zd=Yd;function HR(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(HR,"Escape");function CO(e,t){return mr(e)?e.pattern.slice(1,e.pattern.length-1):Ue(e)?"(".concat(e.anyOf.map(r=>CO(r,t)).join("|"),")"):jo(e)?"".concat(t).concat(Vs):Ao(e)?"".concat(t).concat(Vs):vd(e)?"".concat(t).concat(Vs):zs(e)?"".concat(t).concat(qd):Cn(e)?"".concat(t).concat(HR(e.const.toString())):Ad(e)?"".concat(t).concat(Dd):(()=>{throw new Zd("Unexpected Kind '".concat(e[E],"'"))})()}o(CO,"Visit");function Jd(e){return"^".concat(e.map(t=>CO(t,"")).join(""),"$")}o(Jd,"TemplateLiteralPattern");c();function No(e){let r=Pi(e).map(n=>De(n));return un(r)}o(No,"TemplateLiteralToUnion");c();function qc(e,t){let r=et(e)?Jd(RO(e)):Jd(e);return j({[E]:"TemplateLiteral",type:"string",pattern:r},t)}o(qc,"TemplateLiteral");function ZR(e){return Pi(e).map(r=>r.toString())}o(ZR,"FromTemplateLiteral");function JR(e){let t=[];for(let r of e)t.push(...fr(r));return t}o(JR,"FromUnion");function YR(e){return[e.toString()]}o(YR,"FromLiteral");function fr(e){return[...new Set(mr(e)?ZR(e):Ue(e)?JR(e.anyOf):Cn(e)?YR(e.const):jo(e)?["[number]"]:Ao(e)?["[number]"]:[])]}o(fr,"IndexPropertyKeys");c();function XR(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Fi(e,fr(t[i]),r);return n}o(XR,"FromProperties");function QR(e,t,r){return XR(e,t.properties,r)}o(QR,"FromMappedResult");function MO(e,t,r){let n=QR(e,t,r);return je(n)}o(MO,"IndexFromMappedResult");function UO(e,t){return e.map(r=>DO(r,t))}o(UO,"FromRest");function eC(e){return e.filter(t=>!ao(t))}o(eC,"FromIntersectRest");function tC(e,t){return Kc(eC(UO(e,t)))}o(tC,"FromIntersect");function rC(e){return e.some(t=>ao(t))?[]:e}o(rC,"FromUnionRest");function nC(e,t){return un(rC(UO(e,t)))}o(nC,"FromUnion");function oC(e,t){return t in e?e[t]:t==="[number]"?un(e):Be()}o(oC,"FromTuple");function iC(e,t){return t==="[number]"?e:Be()}o(iC,"FromArray");function sC(e,t){return t in e?e[t]:Be()}o(sC,"FromProperty");function DO(e,t){var r;return It(e)?tC(e.allOf,t):Ue(e)?nC(e.anyOf,t):Vr(e)?oC((r=e.items)!=null?r:[],t):Rn(e)?iC(e.items,t):Et(e)?sC(e.properties,t):Be()}o(DO,"IndexFromPropertyKey");function Js(e,t){return t.map(r=>DO(e,r))}o(Js,"IndexFromPropertyKeys");function LO(e,t){return un(Js(e,t))}o(LO,"FromSchema");function Fi(e,t,r){return at(t)?MO(e,t,r):dr(t)?qO(e,t,r):j(Wr(t)?LO(e,fr(t)):LO(e,t),r)}o(Fi,"Index");function aC(e,t,r){return{[t]:Fi(e,[t],it(r))}}o(aC,"MappedIndexPropertyKey");function cC(e,t,r){return t.reduce((n,i)=>S(S({},n),aC(e,i,r)),{})}o(cC,"MappedIndexPropertyKeys");function fC(e,t,r){return cC(e,t.keys,r)}o(fC,"MappedIndexProperties");function qO(e,t,r){let n=fC(e,t,r);return je(n)}o(qO,"IndexFromMappedKey");c();function zc(e,t){return j({[E]:"Iterator",type:"Iterator",items:e},t)}o(zc,"Iterator");c();function uC(e){let t=[];for(let r in e)fn(e[r])||t.push(r);return t}o(uC,"RequiredKeys");function pC(e,t){let r=uC(e),n=r.length>0?{[E]:"Object",type:"object",properties:e,required:r}:{[E]:"Object",type:"object",properties:e};return j(n,t)}o(pC,"_Object");var Ye=pC;c();function Gc(e,t){return j({[E]:"Promise",type:"Promise",item:e},t)}o(Gc,"Promise");c();c();function lC(e){return j(mt(e,[Nn]))}o(lC,"RemoveReadonly");function dC(e){return j(Y(S({},e),{[Nn]:"Readonly"}))}o(dC,"AddReadonly");function mC(e,t){return t===!1?lC(e):dC(e)}o(mC,"ReadonlyWithFlag");function Er(e,t){let r=t!=null?t:!0;return at(e)?KO(e,r):mC(e,r)}o(Er,"Readonly");function yC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Er(e[n],t);return r}o(yC,"FromProperties");function hC(e,t){return yC(e.properties,t)}o(hC,"FromMappedResult");function KO(e,t){let r=hC(e,t);return je(r)}o(KO,"ReadonlyFromMappedResult");c();function ln(e,t){return j(e.length>0?{[E]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[E]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(ln,"Tuple");function zO(e,t){return e in t?Tr(e,t[e]):je(t)}o(zO,"FromMappedResult");function gC(e){return{[e]:De(e)}}o(gC,"MappedKeyToKnownMappedResultProperties");function IC(e){let t={};for(let r of e)t[r]=De(r);return t}o(IC,"MappedKeyToUnknownMappedResultProperties");function xC(e,t){return TO(t,e)?gC(e):IC(t)}o(xC,"MappedKeyToMappedResultProperties");function bC(e,t){let r=xC(e,t);return zO(e,r)}o(bC,"FromMappedKey");function Ys(e,t){return t.map(r=>Tr(e,r))}o(Ys,"FromRest");function $C(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=Tr(e,t[n]);return r}o($C,"FromProperties");function Tr(e,t){var n;let r=S({},t);return fn(t)?cr(Tr(e,mt(t,[er]))):KP(t)?Er(Tr(e,mt(t,[Nn]))):at(t)?zO(e,t.properties):dr(t)?bC(e,t.keys):Ds(t)?Mc(Ys(e,t.parameters),Tr(e,t.returns),r):qs(t)?uo(Ys(e,t.parameters),Tr(e,t.returns),r):Us(t)?Cc(Tr(e,t.items),r):Ks(t)?zc(Tr(e,t.items),r):It(t)?ur(Ys(e,t.allOf),r):Ue(t)?Ve(Ys(e,t.anyOf),r):Vr(t)?ln(Ys(e,(n=t.items)!=null?n:[]),r):Et(t)?Ye($C(e,t.properties),r):Rn(t)?Rc(Tr(e,t.items),r):ko(t)?Gc(Tr(e,t.item),r):t}o(Tr,"FromSchemaType");function wC(e,t){let r={};for(let n of e)r[n]=Tr(n,t);return r}o(wC,"MappedFunctionReturnType");function GO(e,t,r){let n=Wr(e)?fr(e):e,i=t({[E]:"MappedKey",keys:n}),s=wC(n,i);return Ye(s,r)}o(GO,"Mapped");c();function PC(e){return j(mt(e,[er]))}o(PC,"RemoveOptional");function OC(e){return j(Y(S({},e),{[er]:"Optional"}))}o(OC,"AddOptional");function FC(e,t){return t===!1?PC(e):OC(e)}o(FC,"OptionalWithFlag");function cr(e,t){let r=t!=null?t:!0;return at(e)?BO(e,r):FC(e,r)}o(cr,"Optional");function SC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=cr(e[n],t);return r}o(SC,"FromProperties");function EC(e,t){return SC(e.properties,t)}o(EC,"FromMappedResult");function BO(e,t){let r=EC(e,t);return je(r)}o(BO,"OptionalFromMappedResult");c();function Xs(e,t={}){let r=e.every(i=>Et(i)),n=Wr(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return j(t.unevaluatedProperties===!1||Wr(t.unevaluatedProperties)||r?Y(S({},n),{[E]:"Intersect",type:"object",allOf:e}):Y(S({},n),{[E]:"Intersect",allOf:e}),t)}o(Xs,"IntersectCreate");function TC(e){return e.every(t=>fn(t))}o(TC,"IsIntersectOptional");function vC(e){return mt(e,[er])}o(vC,"RemoveOptionalFromType");function VO(e){return e.map(t=>fn(t)?vC(t):t)}o(VO,"RemoveOptionalFromRest");function AC(e,t){return TC(e)?cr(Xs(VO(e),t)):Xs(VO(e),t)}o(AC,"ResolveIntersect");function Kc(e,t={}){if(e.length===0)return Be(t);if(e.length===1)return j(e[0],t);if(e.some(r=>gi(r)))throw new Error("Cannot intersect transform types");return AC(e,t)}o(Kc,"IntersectEvaluated");c();function ur(e,t){if(e.length===0)return Be(t);if(e.length===1)return j(e[0],t);if(e.some(r=>gi(r)))throw new Error("Cannot intersect transform types");return Xs(e,t)}o(ur,"Intersect");function WO(e){return e.map(t=>Xd(t))}o(WO,"FromRest");function jC(e){return ur(WO(e))}o(jC,"FromIntersect");function kC(e){return Ve(WO(e))}o(kC,"FromUnion");function _C(e){return Xd(e)}o(_C,"FromPromise");function Xd(e){return It(e)?jC(e.allOf):Ue(e)?kC(e.anyOf):ko(e)?_C(e.item):e}o(Xd,"AwaitedResolve");function HO(e,t){return j(Xd(e),t)}o(HO,"Awaited");c();c();c();c();function ZO(e){let t=[];for(let r of e)t.push(At(r));return t}o(ZO,"FromRest");function NC(e){let t=ZO(e);return jO(t)}o(NC,"FromIntersect");function RC(e){let t=ZO(e);return AO(t)}o(RC,"FromUnion");function CC(e){return e.map((t,r)=>r.toString())}o(CC,"FromTuple");function MC(e){return["[number]"]}o(MC,"FromArray");function LC(e){return globalThis.Object.getOwnPropertyNames(e)}o(LC,"FromProperties");function UC(e){return Qd?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(UC,"FromPatternProperties");function At(e){var t;return It(e)?NC(e.allOf):Ue(e)?RC(e.anyOf):Vr(e)?CC((t=e.items)!=null?t:[]):Rn(e)?MC(e.items):Et(e)?LC(e.properties):jd(e)?UC(e.patternProperties):[]}o(At,"KeyOfPropertyKeys");var Qd=!1;function Dn(e){Qd=!0;let t=At(e);Qd=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(Dn,"KeyOfPattern");function DC(e){return e.map(t=>t==="[number]"?pn():De(t))}o(DC,"KeyOfPropertyKeysToRest");function Bc(e,t){if(at(e))return JO(e,t);{let r=At(e),n=DC(r),i=un(n);return j(i,t)}}o(Bc,"KeyOf");function qC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Bc(e[n],it(t));return r}o(qC,"FromProperties");function KC(e,t){return qC(e.properties,t)}o(KC,"FromMappedResult");function JO(e,t){let r=KC(e,t);return je(r)}o(JO,"KeyOfFromMappedResult");c();function po(e){let t=At(e),r=Js(e,t);return t.map((n,i)=>[t[i],r[i]])}o(po,"KeyOfPropertyEntries");function zC(e){let t=[];for(let r of e)t.push(...At(r));return vO(t)}o(zC,"CompositeKeys");function GC(e){return e.filter(t=>!ao(t))}o(GC,"FilterNever");function BC(e,t){let r=[];for(let n of e)r.push(...Js(n,[t]));return GC(r)}o(BC,"CompositeProperty");function VC(e,t){let r={};for(let n of t)r[n]=Kc(BC(e,n));return r}o(VC,"CompositeProperties");function YO(e,t){let r=zC(e),n=VC(e,r);return Ye(n,t)}o(YO,"Composite");c();c();function Vc(e){return j({[E]:"Date",type:"Date"},e)}o(Vc,"Date");c();function Wc(e){return j({[E]:"Null",type:"null"},e)}o(Wc,"Null");c();function Hc(e){return j({[E]:"Symbol",type:"symbol"},e)}o(Hc,"Symbol");c();function Zc(e){return j({[E]:"Undefined",type:"undefined"},e)}o(Zc,"Undefined");c();function Jc(e){return j({[E]:"Uint8Array",type:"Uint8Array"},e)}o(Jc,"Uint8Array");c();function qn(e){return j({[E]:"Unknown"},e)}o(qn,"Unknown");function WC(e){return e.map(t=>em(t,!1))}o(WC,"FromArray");function HC(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Er(em(e[r],!1));return t}o(HC,"FromProperties");function Yc(e,t){return t===!0?e:Er(e)}o(Yc,"ConditionalReadonly");function em(e,t){return $d(e)?Yc(fo(),t):Pd(e)?Yc(fo(),t):zt(e)?Er(ln(WC(e))):jn(e)?Jc():vo(e)?Vc():Je(e)?Yc(Ye(HC(e)),t):wd(e)?Yc(uo([],qn()),t):ut(e)?Zc():Od(e)?Wc():Fd(e)?Hc():Rs(e)?Oi():Br(e)?De(e):io(e)?De(e):et(e)?De(e):Ye({})}o(em,"FromValue");function XO(e,t){return j(em(e,!0),t)}o(XO,"Const");c();function QO(e,t){return ln(e.parameters,t)}o(QO,"ConstructorParameters");c();function Qs(e,t){return e.map(r=>Hr(r,t))}o(Qs,"FromRest");function ZC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Hr(e[n],t);return r}o(ZC,"FromProperties");function JC(e,t){return e.parameters=Qs(e.parameters,t),e.returns=Hr(e.returns,t),e}o(JC,"FromConstructor");function YC(e,t){return e.parameters=Qs(e.parameters,t),e.returns=Hr(e.returns,t),e}o(YC,"FromFunction");function XC(e,t){return e.allOf=Qs(e.allOf,t),e}o(XC,"FromIntersect");function QC(e,t){return e.anyOf=Qs(e.anyOf,t),e}o(QC,"FromUnion");function eM(e,t){return ut(e.items)||(e.items=Qs(e.items,t)),e}o(eM,"FromTuple");function tM(e,t){return e.items=Hr(e.items,t),e}o(tM,"FromArray");function rM(e,t){return e.properties=ZC(e.properties,t),e}o(rM,"FromObject");function nM(e,t){return e.item=Hr(e.item,t),e}o(nM,"FromPromise");function oM(e,t){return e.items=Hr(e.items,t),e}o(oM,"FromAsyncIterator");function iM(e,t){return e.items=Hr(e.items,t),e}o(iM,"FromIterator");function sM(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=mt(r,["$id"]);return Hr(n,t)}o(sM,"FromRef");function aM(e,t){return Ds(e)?JC(e,t):qs(e)?YC(e,t):It(e)?XC(e,t):Ue(e)?QC(e,t):Vr(e)?eM(e,t):Rn(e)?tM(e,t):Et(e)?rM(e,t):ko(e)?nM(e,t):Us(e)?oM(e,t):Ks(e)?iM(e,t):kd(e)?sM(e,t):e}o(aM,"DerefResolve");function Hr(e,t){return aM(Ms(e),UP(t))}o(Hr,"Deref");c();function eF(e,t){if(ut(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(s=>isNaN(s)).map(s=>e[s]),i=[...new Set(r)].map(s=>De(s));return Ve(i,Y(S({},t),{[Fr]:"Enum"}))}o(eF,"Enum");c();c();c();var am=class am extends ne{};o(am,"ExtendsResolverError");var rm=am,v;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(v||(v={}));function vr(e){return e===v.False?e:v.True}o(vr,"IntoBooleanResult");function Si(e){throw new rm(e)}o(Si,"Throw");function wt(e){return x.IsNever(e)||x.IsIntersect(e)||x.IsUnion(e)||x.IsUnknown(e)||x.IsAny(e)}o(wt,"IsStructuralRight");function Pt(e,t){return x.IsNever(t)?aF(e,t):x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsUnknown(t)?pF(e,t):x.IsAny(t)?im(e,t):Si("StructuralRight")}o(Pt,"StructuralRight");function im(e,t){return v.True}o(im,"FromAnyRight");function cM(e,t){return x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)&&t.anyOf.some(r=>x.IsAny(r)||x.IsUnknown(r))?v.True:x.IsUnion(t)?v.Union:x.IsUnknown(t)||x.IsAny(t)?v.True:v.Union}o(cM,"FromAny");function fM(e,t){return x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:x.IsNever(e)?v.True:v.False}o(fM,"FromArrayRight");function uM(e,t){return x.IsObject(t)&&Qc(t)?v.True:wt(t)?Pt(e,t):x.IsArray(t)?vr(We(e.items,t.items)):v.False}o(uM,"FromArray");function pM(e,t){return wt(t)?Pt(e,t):x.IsAsyncIterator(t)?vr(We(e.items,t.items)):v.False}o(pM,"FromAsyncIterator");function lM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsBigInt(t)?v.True:v.False}o(lM,"FromBigInt");function iF(e,t){return x.IsLiteralBoolean(e)||x.IsBoolean(e)?v.True:v.False}o(iF,"FromBooleanRight");function dM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsBoolean(t)?v.True:v.False}o(dM,"FromBoolean");function mM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsConstructor(t)?e.parameters.length>t.parameters.length?v.False:e.parameters.every((r,n)=>vr(We(t.parameters[n],r))===v.True)?vr(We(e.returns,t.returns)):v.False:v.False}o(mM,"FromConstructor");function yM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsDate(t)?v.True:v.False}o(yM,"FromDate");function hM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsFunction(t)?e.parameters.length>t.parameters.length?v.False:e.parameters.every((r,n)=>vr(We(t.parameters[n],r))===v.True)?vr(We(e.returns,t.returns)):v.False:v.False}o(hM,"FromFunction");function sF(e,t){return x.IsLiteral(e)&&Pe.IsNumber(e.const)||x.IsNumber(e)||x.IsInteger(e)?v.True:v.False}o(sF,"FromIntegerRight");function gM(e,t){return x.IsInteger(t)||x.IsNumber(t)?v.True:wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):v.False}o(gM,"FromInteger");function Xc(e,t){return t.allOf.every(r=>We(e,r)===v.True)?v.True:v.False}o(Xc,"FromIntersectRight");function IM(e,t){return e.allOf.some(r=>We(r,t)===v.True)?v.True:v.False}o(IM,"FromIntersect");function xM(e,t){return wt(t)?Pt(e,t):x.IsIterator(t)?vr(We(e.items,t.items)):v.False}o(xM,"FromIterator");function bM(e,t){return x.IsLiteral(t)&&t.const===e.const?v.True:wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsString(t)?uF(e,t):x.IsNumber(t)?cF(e,t):x.IsInteger(t)?sF(e,t):x.IsBoolean(t)?iF(e,t):v.False}o(bM,"FromLiteral");function aF(e,t){return v.False}o(aF,"FromNeverRight");function $M(e,t){return v.True}o($M,"FromNever");function tF(e){let[t,r]=[e,0];for(;x.IsNot(t);)t=t.not,r+=1;return r%2===0?t:qn()}o(tF,"UnwrapTNot");function wM(e,t){return x.IsNot(e)?We(tF(e),t):x.IsNot(t)?We(e,tF(t)):Si("Invalid fallthrough for Not")}o(wM,"FromNot");function PM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsNull(t)?v.True:v.False}o(PM,"FromNull");function cF(e,t){return x.IsLiteralNumber(e)||x.IsNumber(e)||x.IsInteger(e)?v.True:v.False}o(cF,"FromNumberRight");function OM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsInteger(t)||x.IsNumber(t)?v.True:v.False}o(OM,"FromNumber");function pr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(pr,"IsObjectPropertyCount");function rF(e){return Qc(e)}o(rF,"IsObjectStringLike");function nF(e){return pr(e,0)||pr(e,1)&&"description"in e.properties&&x.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(x.IsString(e.properties.description.anyOf[0])&&x.IsUndefined(e.properties.description.anyOf[1])||x.IsString(e.properties.description.anyOf[1])&&x.IsUndefined(e.properties.description.anyOf[0]))}o(nF,"IsObjectSymbolLike");function tm(e){return pr(e,0)}o(tm,"IsObjectNumberLike");function oF(e){return pr(e,0)}o(oF,"IsObjectBooleanLike");function FM(e){return pr(e,0)}o(FM,"IsObjectBigIntLike");function SM(e){return pr(e,0)}o(SM,"IsObjectDateLike");function EM(e){return Qc(e)}o(EM,"IsObjectUint8ArrayLike");function TM(e){let t=pn();return pr(e,0)||pr(e,1)&&"length"in e.properties&&vr(We(e.properties.length,t))===v.True}o(TM,"IsObjectFunctionLike");function vM(e){return pr(e,0)}o(vM,"IsObjectConstructorLike");function Qc(e){let t=pn();return pr(e,0)||pr(e,1)&&"length"in e.properties&&vr(We(e.properties.length,t))===v.True}o(Qc,"IsObjectArrayLike");function AM(e){let t=uo([fo()],fo());return pr(e,0)||pr(e,1)&&"then"in e.properties&&vr(We(e.properties.then,t))===v.True}o(AM,"IsObjectPromiseLike");function fF(e,t){return We(e,t)===v.False||x.IsOptional(e)&&!x.IsOptional(t)?v.False:v.True}o(fF,"Property");function Gt(e,t){return x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:x.IsNever(e)||x.IsLiteralString(e)&&rF(t)||x.IsLiteralNumber(e)&&tm(t)||x.IsLiteralBoolean(e)&&oF(t)||x.IsSymbol(e)&&nF(t)||x.IsBigInt(e)&&FM(t)||x.IsString(e)&&rF(t)||x.IsSymbol(e)&&nF(t)||x.IsNumber(e)&&tm(t)||x.IsInteger(e)&&tm(t)||x.IsBoolean(e)&&oF(t)||x.IsUint8Array(e)&&EM(t)||x.IsDate(e)&&SM(t)||x.IsConstructor(e)&&vM(t)||x.IsFunction(e)&&TM(t)?v.True:x.IsRecord(e)&&x.IsString(nm(e))?t[Fr]==="Record"?v.True:v.False:x.IsRecord(e)&&x.IsNumber(nm(e))?pr(t,0)?v.True:v.False:v.False}o(Gt,"FromObjectRight");function jM(e,t){return wt(t)?Pt(e,t):x.IsRecord(t)?Ar(e,t):x.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!x.IsOptional(t.properties[r]))return v.False;if(x.IsOptional(t.properties[r]))return v.True;if(fF(e.properties[r],t.properties[r])===v.False)return v.False}return v.True})():v.False}o(jM,"FromObject");function kM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)&&AM(t)?v.True:x.IsPromise(t)?vr(We(e.item,t.item)):v.False}o(kM,"FromPromise");function nm(e){return Mn in e.patternProperties?pn():Ln in e.patternProperties?Sr():Si("Unknown record key pattern")}o(nm,"RecordKey");function om(e){return Mn in e.patternProperties?e.patternProperties[Mn]:Ln in e.patternProperties?e.patternProperties[Ln]:Si("Unable to get record value schema")}o(om,"RecordValue");function Ar(e,t){let[r,n]=[nm(t),om(t)];return x.IsLiteralString(e)&&x.IsNumber(r)&&vr(We(e,n))===v.True?v.True:x.IsUint8Array(e)&&x.IsNumber(r)||x.IsString(e)&&x.IsNumber(r)||x.IsArray(e)&&x.IsNumber(r)?We(e,n):x.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(fF(n,e.properties[i])===v.False)return v.False;return v.True})():v.False}o(Ar,"FromRecordRight");function _M(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?We(om(e),om(t)):v.False}o(_M,"FromRecord");function NM(e,t){let r=x.IsRegExp(e)?Sr():e,n=x.IsRegExp(t)?Sr():t;return We(r,n)}o(NM,"FromRegExp");function uF(e,t){return x.IsLiteral(e)&&Pe.IsString(e.const)||x.IsString(e)?v.True:v.False}o(uF,"FromStringRight");function RM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsString(t)?v.True:v.False}o(RM,"FromString");function CM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsSymbol(t)?v.True:v.False}o(CM,"FromSymbol");function MM(e,t){return x.IsTemplateLiteral(e)?We(No(e),t):x.IsTemplateLiteral(t)?We(e,No(t)):Si("Invalid fallthrough for TemplateLiteral")}o(MM,"FromTemplateLiteral");function LM(e,t){return x.IsArray(t)&&e.items!==void 0&&e.items.every(r=>We(r,t.items)===v.True)}o(LM,"IsArrayOfTuple");function UM(e,t){return x.IsNever(e)?v.True:x.IsUnknown(e)?v.False:x.IsAny(e)?v.Union:v.False}o(UM,"FromTupleRight");function DM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)&&Qc(t)||x.IsArray(t)&&LM(e,t)?v.True:x.IsTuple(t)?Pe.IsUndefined(e.items)&&!Pe.IsUndefined(t.items)||!Pe.IsUndefined(e.items)&&Pe.IsUndefined(t.items)?v.False:Pe.IsUndefined(e.items)&&!Pe.IsUndefined(t.items)||e.items.every((r,n)=>We(r,t.items[n])===v.True)?v.True:v.False:v.False}o(DM,"FromTuple");function qM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsUint8Array(t)?v.True:v.False}o(qM,"FromUint8Array");function KM(e,t){return wt(t)?Pt(e,t):x.IsObject(t)?Gt(e,t):x.IsRecord(t)?Ar(e,t):x.IsVoid(t)?BM(e,t):x.IsUndefined(t)?v.True:v.False}o(KM,"FromUndefined");function sm(e,t){return t.anyOf.some(r=>We(e,r)===v.True)?v.True:v.False}o(sm,"FromUnionRight");function zM(e,t){return e.anyOf.every(r=>We(r,t)===v.True)?v.True:v.False}o(zM,"FromUnion");function pF(e,t){return v.True}o(pF,"FromUnknownRight");function GM(e,t){return x.IsNever(t)?aF(e,t):x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsAny(t)?im(e,t):x.IsString(t)?uF(e,t):x.IsNumber(t)?cF(e,t):x.IsInteger(t)?sF(e,t):x.IsBoolean(t)?iF(e,t):x.IsArray(t)?fM(e,t):x.IsTuple(t)?UM(e,t):x.IsObject(t)?Gt(e,t):x.IsUnknown(t)?v.True:v.False}o(GM,"FromUnknown");function BM(e,t){return x.IsUndefined(e)||x.IsUndefined(e)?v.True:v.False}o(BM,"FromVoidRight");function VM(e,t){return x.IsIntersect(t)?Xc(e,t):x.IsUnion(t)?sm(e,t):x.IsUnknown(t)?pF(e,t):x.IsAny(t)?im(e,t):x.IsObject(t)?Gt(e,t):x.IsVoid(t)?v.True:v.False}o(VM,"FromVoid");function We(e,t){return x.IsTemplateLiteral(e)||x.IsTemplateLiteral(t)?MM(e,t):x.IsRegExp(e)||x.IsRegExp(t)?NM(e,t):x.IsNot(e)||x.IsNot(t)?wM(e,t):x.IsAny(e)?cM(e,t):x.IsArray(e)?uM(e,t):x.IsBigInt(e)?lM(e,t):x.IsBoolean(e)?dM(e,t):x.IsAsyncIterator(e)?pM(e,t):x.IsConstructor(e)?mM(e,t):x.IsDate(e)?yM(e,t):x.IsFunction(e)?hM(e,t):x.IsInteger(e)?gM(e,t):x.IsIntersect(e)?IM(e,t):x.IsIterator(e)?xM(e,t):x.IsLiteral(e)?bM(e,t):x.IsNever(e)?$M(e,t):x.IsNull(e)?PM(e,t):x.IsNumber(e)?OM(e,t):x.IsObject(e)?jM(e,t):x.IsRecord(e)?_M(e,t):x.IsString(e)?RM(e,t):x.IsSymbol(e)?CM(e,t):x.IsTuple(e)?DM(e,t):x.IsPromise(e)?kM(e,t):x.IsUint8Array(e)?qM(e,t):x.IsUndefined(e)?KM(e,t):x.IsUnion(e)?zM(e,t):x.IsUnknown(e)?GM(e,t):x.IsVoid(e)?VM(e,t):Si("Unknown left type operand '".concat(e[E],"'"))}o(We,"Visit");function lo(e,t){return We(e,t)}o(lo,"ExtendsCheck");c();c();c();function WM(e,t,r,n,i){let s={};for(let a of globalThis.Object.getOwnPropertyNames(e))s[a]=Ei(e[a],t,r,n,it(i));return s}o(WM,"FromProperties");function HM(e,t,r,n,i){return WM(e.properties,t,r,n,i)}o(HM,"FromMappedResult");function lF(e,t,r,n,i){let s=HM(e,t,r,n,i);return je(s)}o(lF,"ExtendsFromMappedResult");function ZM(e,t,r,n){let i=lo(e,t);return i===v.Union?Ve([r,n]):i===v.True?r:n}o(ZM,"ExtendsResolve");function Ei(e,t,r,n,i){return at(e)?lF(e,t,r,n,i):dr(e)?j(dF(e,t,r,n,i)):j(ZM(e,t,r,n),i)}o(Ei,"Extends");function JM(e,t,r,n,i){return{[e]:Ei(De(e),t,r,n,it(i))}}o(JM,"FromPropertyKey");function YM(e,t,r,n,i){return e.reduce((s,a)=>S(S({},s),JM(a,t,r,n,i)),{})}o(YM,"FromPropertyKeys");function XM(e,t,r,n,i){return YM(e.keys,t,r,n,i)}o(XM,"FromMappedKey");function dF(e,t,r,n,i){let s=XM(e,t,r,n,i);return je(s)}o(dF,"ExtendsFromMappedKey");c();function QM(e){return e.allOf.every(t=>Kn(t))}o(QM,"Intersect");function eL(e){return e.anyOf.some(t=>Kn(t))}o(eL,"Union");function tL(e){return!Kn(e.not)}o(tL,"Not");function Kn(e){return e[E]==="Intersect"?QM(e):e[E]==="Union"?eL(e):e[E]==="Not"?tL(e):e[E]==="Undefined"}o(Kn,"ExtendsUndefinedCheck");c();function mF(e,t){return Ti(No(e),t)}o(mF,"ExcludeFromTemplateLiteral");function rL(e,t){let r=e.filter(n=>lo(n,t)===v.False);return r.length===1?r[0]:Ve(r)}o(rL,"ExcludeRest");function Ti(e,t,r={}){return mr(e)?j(mF(e,t),r):at(e)?j(yF(e,t),r):j(Ue(e)?rL(e.anyOf,t):lo(e,t)!==v.False?Be():e,r)}o(Ti,"Exclude");function nL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ti(e[n],t);return r}o(nL,"FromProperties");function oL(e,t){return nL(e.properties,t)}o(oL,"FromMappedResult");function yF(e,t){let r=oL(e,t);return je(r)}o(yF,"ExcludeFromMappedResult");c();c();c();function hF(e,t){return vi(No(e),t)}o(hF,"ExtractFromTemplateLiteral");function iL(e,t){let r=e.filter(n=>lo(n,t)!==v.False);return r.length===1?r[0]:Ve(r)}o(iL,"ExtractRest");function vi(e,t,r){return mr(e)?j(hF(e,t),r):at(e)?j(gF(e,t),r):j(Ue(e)?iL(e.anyOf,t):lo(e,t)!==v.False?e:Be(),r)}o(vi,"Extract");function sL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=vi(e[n],t);return r}o(sL,"FromProperties");function aL(e,t){return sL(e.properties,t)}o(aL,"FromMappedResult");function gF(e,t){let r=aL(e,t);return je(r)}o(gF,"ExtractFromMappedResult");c();function IF(e,t){return j(e.returns,t)}o(IF,"InstanceType");c();function xF(e){return j({[E]:"Integer",type:"integer"},e)}o(xF,"Integer");c();c();c();function cL(e,t,r){return{[e]:Zr(De(e),t,it(r))}}o(cL,"MappedIntrinsicPropertyKey");function fL(e,t,r){return e.reduce((i,s)=>S(S({},i),cL(s,t,r)),{})}o(fL,"MappedIntrinsicPropertyKeys");function uL(e,t,r){return fL(e.keys,t,r)}o(uL,"MappedIntrinsicProperties");function bF(e,t,r){let n=uL(e,t,r);return je(n)}o(bF,"IntrinsicFromMappedKey");function pL(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(pL,"ApplyUncapitalize");function lL(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(lL,"ApplyCapitalize");function dL(e){return e.toUpperCase()}o(dL,"ApplyUppercase");function mL(e){return e.toLowerCase()}o(mL,"ApplyLowercase");function yL(e,t,r){let n=wi(e.pattern);if(!_o(n))return Y(S({},e),{pattern:$F(e.pattern,t)});let a=[...Zs(n)].map(d=>De(d)),f=wF(a,t),p=Ve(f);return qc([p],r)}o(yL,"FromTemplateLiteral");function $F(e,t){return typeof e=="string"?t==="Uncapitalize"?pL(e):t==="Capitalize"?lL(e):t==="Uppercase"?dL(e):t==="Lowercase"?mL(e):e:e.toString()}o($F,"FromLiteralValue");function wF(e,t){return e.map(r=>Zr(r,t))}o(wF,"FromRest");function Zr(e,t,r={}){return dr(e)?bF(e,t,r):mr(e)?yL(e,t,r):Ue(e)?Ve(wF(e.anyOf,t),r):Cn(e)?De($F(e.const,t),r):j(e,r)}o(Zr,"Intrinsic");function PF(e,t={}){return Zr(e,"Capitalize",t)}o(PF,"Capitalize");c();function OF(e,t={}){return Zr(e,"Lowercase",t)}o(OF,"Lowercase");c();function FF(e,t={}){return Zr(e,"Uncapitalize",t)}o(FF,"Uncapitalize");c();function SF(e,t={}){return Zr(e,"Uppercase",t)}o(SF,"Uppercase");c();function EF(e,t){return j({[E]:"Not",not:e},t)}o(EF,"Not");c();c();c();function hL(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ai(e[i],t,it(r));return n}o(hL,"FromProperties");function gL(e,t,r){return hL(e.properties,t,r)}o(gL,"FromMappedResult");function TF(e,t,r){let n=gL(e,t,r);return je(n)}o(TF,"OmitFromMappedResult");function IL(e,t){return e.map(r=>cm(r,t))}o(IL,"FromIntersect");function xL(e,t){return e.map(r=>cm(r,t))}o(xL,"FromUnion");function bL(e,t){let i=e,{[t]:r}=i;return Yo(i,[ma(t)])}o(bL,"FromProperty");function $L(e,t){return t.reduce((r,n)=>bL(r,n),e)}o($L,"FromProperties");function wL(e,t){let r=mt(e,[st,"$id","required","properties"]),n=$L(e.properties,t);return Ye(n,r)}o(wL,"FromObject");function cm(e,t){return It(e)?ur(IL(e.allOf,t)):Ue(e)?Ve(xL(e.anyOf,t)):Et(e)?wL(e,t):Ye({})}o(cm,"OmitResolve");function Ai(e,t,r){if(dr(t))return vF(e,t,r);if(at(e))return TF(e,t,r);let n=Wr(t)?fr(t):t;return j(S(S({},cm(e,n)),r))}o(Ai,"Omit");function PL(e,t,r){return{[t]:Ai(e,[t],it(r))}}o(PL,"FromPropertyKey");function OL(e,t,r){return t.reduce((n,i)=>S(S({},n),PL(e,i,r)),{})}o(OL,"FromPropertyKeys");function FL(e,t,r){return OL(e,t.keys,r)}o(FL,"FromMappedKey");function vF(e,t,r){let n=FL(e,t,r);return je(n)}o(vF,"OmitFromMappedKey");c();function AF(e,t){return ln(e.parameters,t)}o(AF,"Parameters");c();c();function jF(e){return e.map(t=>kF(t))}o(jF,"FromRest");function SL(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=cr(e[r]);return t}o(SL,"FromProperties");function EL(e){let t=mt(e,[st,"$id","required","properties"]),r=SL(e.properties);return Ye(r,t)}o(EL,"FromObject");function kF(e){return It(e)?ur(jF(e.allOf)):Ue(e)?Ve(jF(e.anyOf)):Et(e)?EL(e):Ye({})}o(kF,"PartialResolve");function ef(e,t){return at(e)?_F(e,t):j(S(S({},kF(e)),t))}o(ef,"Partial");function TL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=ef(e[n],it(t));return r}o(TL,"FromProperties");function vL(e,t){return TL(e.properties,t)}o(vL,"FromMappedResult");function _F(e,t){let r=vL(e,t);return je(r)}o(_F,"PartialFromMappedResult");c();c();c();function AL(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=ji(e[i],t,it(r));return n}o(AL,"FromProperties");function jL(e,t,r){return AL(e.properties,t,r)}o(jL,"FromMappedResult");function NF(e,t,r){let n=jL(e,t,r);return je(n)}o(NF,"PickFromMappedResult");function kL(e,t){return e.map(r=>fm(r,t))}o(kL,"FromIntersect");function _L(e,t){return e.map(r=>fm(r,t))}o(_L,"FromUnion");function NL(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(NL,"FromProperties");function RL(e,t){let r=mt(e,[st,"$id","required","properties"]),n=NL(e.properties,t);return Ye(n,r)}o(RL,"FromObject");function fm(e,t){return It(e)?ur(kL(e.allOf,t)):Ue(e)?Ve(_L(e.anyOf,t)):Et(e)?RL(e,t):Ye({})}o(fm,"PickResolve");function ji(e,t,r){if(dr(t))return RF(e,t,r);if(at(e))return NF(e,t,r);let n=Wr(t)?fr(t):t;return j(S(S({},fm(e,n)),r))}o(ji,"Pick");function CL(e,t,r){return{[t]:ji(e,[t],it(r))}}o(CL,"FromPropertyKey");function ML(e,t,r){return t.reduce((n,i)=>S(S({},n),CL(e,i,r)),{})}o(ML,"FromPropertyKeys");function LL(e,t,r){return ML(e,t.keys,r)}o(LL,"FromMappedKey");function RF(e,t,r){let n=LL(e,t,r);return je(n)}o(RF,"PickFromMappedKey");c();function CF(e){return Er(cr(e))}o(CF,"ReadonlyOptional");c();function Ro(e,t,r){return j({[E]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Ro,"RecordCreateFromPattern");function um(e,t,r){let n={};for(let i of e)n[i]=t;return Ye(n,Y(S({},r),{[Fr]:"Record"}))}o(um,"RecordCreateFromKeys");function UL(e,t,r){return Uc(e)?um(fr(e),t,r):Ro(e.pattern,t,r)}o(UL,"FromTemplateLiteralKey");function DL(e,t,r){return um(fr(Ve(e)),t,r)}o(DL,"FromUnionKey");function qL(e,t,r){return um([e.toString()],t,r)}o(qL,"FromLiteralKey");function KL(e,t,r){return Ro(e.source,t,r)}o(KL,"FromRegExpKey");function zL(e,t,r){let n=ut(e.pattern)?Ln:e.pattern;return Ro(n,t,r)}o(zL,"FromStringKey");function GL(e,t,r){return Ro(Ln,t,r)}o(GL,"FromAnyKey");function BL(e,t,r){return Ro(EO,t,r)}o(BL,"FromNeverKey");function VL(e,t,r){return Ro(Mn,t,r)}o(VL,"FromIntegerKey");function WL(e,t,r){return Ro(Mn,t,r)}o(WL,"FromNumberKey");function MF(e,t,r={}){return Ue(e)?DL(e.anyOf,t,r):mr(e)?UL(e,t,r):Cn(e)?qL(e.const,t,r):Ao(e)?VL(e,t,r):jo(e)?WL(e,t,r):_d(e)?KL(e,t,r):zs(e)?zL(e,t,r):Td(e)?GL(e,t,r):ao(e)?BL(e,t,r):Be(r)}o(MF,"Record");c();var HL=0;function LF(e,t={}){ut(t.$id)&&(t.$id="T".concat(HL++));let r=Ms(e({[E]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,j(S({[Fr]:"Recursive"},r),t)}o(LF,"Recursive");c();function UF(e,t){if(et(e))return j({[E]:"Ref",$ref:e},t);if(ut(e.$id))throw new Error("Reference target type must specify an $id");return j({[E]:"Ref",$ref:e.$id},t)}o(UF,"Ref");c();function DF(e,t){let r=et(e)?new globalThis.RegExp(e):e;return j({[E]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(DF,"RegExp");c();c();function qF(e){return e.map(t=>KF(t))}o(qF,"FromRest");function ZL(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=mt(e[r],[er]);return t}o(ZL,"FromProperties");function JL(e){let t=mt(e,[st,"$id","required","properties"]),r=ZL(e.properties);return Ye(r,t)}o(JL,"FromObject");function KF(e){return It(e)?ur(qF(e.allOf)):Ue(e)?Ve(qF(e.anyOf)):Et(e)?JL(e):Ye({})}o(KF,"RequiredResolve");function tf(e,t){return at(e)?zF(e,t):j(S(S({},KF(e)),t))}o(tf,"Required");function YL(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=tf(e[n],t);return r}o(YL,"FromProperties");function XL(e,t){return YL(e.properties,t)}o(XL,"FromMappedResult");function zF(e,t){let r=XL(e,t);return je(r)}o(zF,"RequiredFromMappedResult");c();function QL(e){var t;return It(e)?e.allOf:Ue(e)?e.anyOf:Vr(e)?(t=e.items)!=null?t:[]:[]}o(QL,"RestResolve");function GF(e){return QL(e)}o(GF,"Rest");c();function BF(e,t){return j(e.returns,t)}o(BF,"ReturnType");c();function VF(e){return JSON.parse(JSON.stringify(e))}o(VF,"Strict");c();var dm=class dm{constructor(t){this.schema=t}Decode(t){return new lm(this.schema,t)}};o(dm,"TransformDecodeBuilder");var pm=dm,mm=class mm{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let s={Encode:o(a=>r[st].Encode(t(a)),"Encode"),Decode:o(a=>this.decode(r[st].Decode(a)),"Decode")};return Y(S({},r),{[st]:s})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return Y(S({},r),{[st]:n})}Encode(t){return gi(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(mm,"TransformEncodeBuilder");var lm=mm;function WF(e){return new pm(e)}o(WF,"Transform");c();function rf(e={}){var t;return j({[E]:(t=e[E])!=null?t:"Unsafe"},e)}o(rf,"Unsafe");c();function HF(e){return j({[E]:"Void",type:"void"},e)}o(HF,"Void");c();var ym={};go(ym,{Any:()=>fo,Array:()=>Rc,AsyncIterator:()=>Cc,Awaited:()=>HO,BigInt:()=>Oi,Boolean:()=>Dc,Capitalize:()=>PF,Composite:()=>YO,Const:()=>XO,Constructor:()=>Mc,ConstructorParameters:()=>QO,Date:()=>Vc,Deref:()=>Hr,Enum:()=>eF,Exclude:()=>Ti,Extends:()=>Ei,Extract:()=>vi,Function:()=>uo,Index:()=>Fi,InstanceType:()=>IF,Integer:()=>xF,Intersect:()=>ur,Iterator:()=>zc,KeyOf:()=>Bc,Literal:()=>De,Lowercase:()=>OF,Mapped:()=>GO,Never:()=>Be,Not:()=>EF,Null:()=>Wc,Number:()=>pn,Object:()=>Ye,Omit:()=>Ai,Optional:()=>cr,Parameters:()=>AF,Partial:()=>ef,Pick:()=>ji,Promise:()=>Gc,Readonly:()=>Er,ReadonlyOptional:()=>CF,Record:()=>MF,Recursive:()=>LF,Ref:()=>UF,RegExp:()=>DF,Required:()=>tf,Rest:()=>GF,ReturnType:()=>BF,Strict:()=>VF,String:()=>Sr,Symbol:()=>Hc,TemplateLiteral:()=>qc,Transform:()=>WF,Tuple:()=>ln,Uint8Array:()=>Jc,Uncapitalize:()=>FF,Undefined:()=>Zc,Union:()=>Ve,Unknown:()=>qn,Unsafe:()=>rf,Uppercase:()=>SF,Void:()=>HF});c();var u=ym;var ct=o((e,t)=>u.Unsafe(u.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]{8,}$")})),"Ident"),Bt=ct("g","GeometryId"),ke=ct("f","FloorId"),hm=[Bt,ke];c();c();var ea=u.Object({externalId:u.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:u.String({description:"The name of the entity."}),shortName:u.String({description:"A short name for the entity."}),description:u.String({description:"A description of the entity."}),icon:u.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),gm=u.Partial(ea,{$id:"Details",description:"Additional information about a given entity."}),Jr=u.Object({details:u.Optional(u.Ref(gm))},{$id:"WithDetails"}),Co=o(e=>{let t=[...e].sort(),r=u.Pick(ea,e),n=u.Omit(ea,e);return u.Object({details:u.Intersect([r,u.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),Im=[ea,gm];c();c();var xm=u.Record(u.String(),u.Unknown(),{$id:"Extra"}),Yr=u.Object({extra:u.Optional(u.Ref(xm))}),bm=[xm];c();c();var ki=u.Object({geometryId:u.Ref(Bt),floorId:u.Ref(ke)},{$id:"GeometryAnchor"}),e2=u.Object({geometryAnchor:u.Ref(ki)}),Mo=o((e,t)=>u.Object({geometryAnchors:u.Array(u.Ref(ki),e)},t),"WithGeometryAnchors"),$m=[ki];c();c();c();c();c();var _i=u.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Ni=u.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Lo=u.Tuple([u.Ref(_i),u.Ref(Ni)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),Vt=u.Object({type:u.Literal("Point"),coordinates:u.Ref(Lo)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),nf=u.Object({type:u.Literal("MultiPoint"),coordinates:u.Array(u.Ref(Lo))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),of=u.Object({type:u.Literal("LineString"),coordinates:u.Array(u.Ref(Lo),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),sf=u.Object({type:u.Literal("MultiLineString"),coordinates:u.Array(u.Array(u.Ref(Lo),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),ZF=u.Array(u.Ref(Lo),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),wm=u.Array(u.Ref(ZF),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Ri=u.Object({type:u.Literal("Polygon"),coordinates:u.Ref(wm)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ci=u.Object({type:u.Literal("MultiPolygon"),coordinates:u.Array(u.Ref(wm))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Ct=o((e,t,r)=>u.Object({type:u.Literal("Feature"),geometry:e,properties:t},r),"Feature"),rr=o((e,t,r)=>u.Object({type:u.Literal("FeatureCollection"),features:u.Array(e,r)},t),"FeatureCollection"),Pm=[_i,Ni,Lo,Vt,nf,of,sf,ZF,wm,Ri,Ci];var JF=u.Intersect([u.Object({id:u.Ref(ke),elevation:u.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:u.Optional(u.String({description:"The subtitle of the floor."}))}),Jr],{$id:"FloorProperties"}),YF=Ct(u.Union([u.Ref(Ri),u.Ref(Ci),u.Null()]),u.Ref(JF),{$id:"FloorFeature"}),XF=rr(u.Ref(YF),{$id:"FloorCollection"}),t2=u.Object({floors:u.Ref(XF)}),QF={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),schema:t2,references:[JF,YF,XF]};c();c();c();var Om=class Om{constructor(t){H(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(Om,"OptionIterator");var af=Om,Fm=class Fm{constructor(t){H(this,"_tag","Some");H(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return eS(t(this.value))}mapAsync(t){return t(this.value).then(r=>eS(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:mo()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?mo():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return B(this.value)}okOrElse(t){return B(this.value)}iter(){return new af(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Mi([this.value,t.value]):mo()}zipWith(t,r){return t.isSome()?Mi(r(this.value,t.value)):mo()}get[Symbol.toStringTag](){return"Some"}};o(Fm,"Some");var cf=Fm,Sm=class Sm{constructor(){H(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return W(t)}okOrElse(t){return W(t())}iter(){return new af(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(Sm,"None");var ff=Sm,Mi=o(e=>new cf(e),"some"),mo=o(()=>new ff,"none"),eS=o(e=>e instanceof cf||e instanceof ff?e:e==null?mo():Mi(e),"option");var vm=class vm{constructor(t){H(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(vm,"ResultIterator");var uf=vm,Am=class Am{constructor(t){H(this,"_tag","Ok");H(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Mi(this.value)}err(){return mo()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return B(t(this.value))}async mapAsync(t){return t(this.value).then(B)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new uf(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(Am,"Ok");var Em=Am,pf=class pf{constructor(t){H(this,"_tag","Err");H(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return mo()}err(){return Mi(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new uf(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new pf(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(pf,"Err");var Tm=pf,B=o(e=>new Em(e),"ok"),W=o(e=>new Tm(e),"err");c();var dn;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError"})(dn||(dn={}));var r2=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),zn=o(e=>{let t=r2(e);return o(n=>{let i=t.get(n);return i==null?W({kind:dn.UnknownFloorError,properties:{floorId:n}}):B(i)},"floorLookup")},"createFloorLookup");c();c();c();c();var yt=o(e=>u.Unsafe(e),"PartialRecord");c();var Ee=o(e=>Object.keys(e),"typedKeys");c();var tS=o(e=>{if(e.floors==null)return W({kind:dn.FloorMissingError,properties:null});if(e.geometry==null)return W({kind:dn.GeometryMissingError,properties:null});let t=zn(e);for(let r of Ee(e.geometry)){let n=t(r);if(n.isErr())return n}return B(!0)},"validateGeometry");var rS=u.Intersect([u.Object({id:u.Ref(Bt)}),Jr],{$id:"GeometryProperties"}),nS=Ct(u.Union([u.Ref(Vt),u.Ref(nf),u.Ref(of),u.Ref(sf),u.Ref(Ri),u.Ref(Ci)]),u.Ref(rS),{$id:"GeometryFeature"}),oS=rr(u.Ref(nS),{$id:"GeometryCollection"}),n2=u.Object({geometry:yt(u.Record(ke,u.Ref(oS),{additionalProperties:!1}))},{$id:"GeometrySchema"}),o2=/^geometry\/(.*)\.geojson$/,iS={name:"core:geometry",schema:n2,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Ee(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(o2))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[rS,nS,oS],integrityCheck:tS};c();c();var _e=o(e=>Object.entries(e),"typedEntries");var i2=o(e=>{var r;let t=new Map;for(let[n,i]of _e((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(s=>[s.properties.id,s])));return t},"createLookupMap"),vt=o(e=>{let t=i2(e);return o((n,i)=>{let s=t.get(n);if(s==null)return W({kind:dn.UnknownFloorError,properties:{floorId:n}});let a=s.get(i);return a==null?W({kind:dn.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):B(a)},"geometryLookup")},"createGeometryLookup");c();var jm=u.Object({type:u.Literal("file"),name:u.String({description:"The name of the file."})},{$id:"ManifestFile"}),sS=u.Recursive(e=>u.Object({type:u.Literal("folder"),name:u.String({description:"The name of the folder."}),children:u.Array(u.Union([e,u.Ref(jm)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),aS=u.Object({name:u.String({description:"The name of the map."}),version:u.Literal("3.0.0",{description:"The version of the manifest."}),orgId:u.Optional(u.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:u.Optional(u.String({description:"The identifier of the map that this MVF is for."})),contents:u.Array(u.Union([u.Ref(sS),u.Ref(jm)]),{minItems:1,description:"The contents of the MVF bundle."}),time:u.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:u.Optional(u.Unsafe(u.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:u.Optional(u.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:u.Optional(u.Ref(ke,{description:"The default floor ID of the map."})),language:u.Optional(u.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),cS=rr(Ct(Vt,u.Ref(aS)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),s2=u.Object({manifest:u.Ref(cS)}),fS={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:s2,references:[jm,sS,aS,cS]};var jr=u.Object({geometryId:u.Ref(Bt)},{$id:"WithGeometryId"}),lf=u.Object({geometryIds:u.Array(u.Ref(Bt))},{$id:"WithGeometryIds"}),km=[jr,lf];c();c();var uS=o((e,t)=>u.Unsafe(u.Transform(u.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),lr=o((e,t)=>{let r=uS(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(s=>[s,s])));return{schema:r,values:n,record:i}},"SafeStringEnum");c();c();c();var ta;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(ta||(ta={}));var pS=o(e=>{var n;if(e.annotations==null)return B(!0);let t=vt(e),r=new Set(Ee((n=e.annotationSymbols)!=null?n:{}));for(let i of Ee(e.annotations)){let s=e.annotations[i];if(s!=null)for(let a of s){if(!r.has(a.symbolKey))return W({kind:ta.AnnotationUnknownSymbolError,properties:{annotationId:a.id,symbolKey:a.symbolKey}});let f=t(i,a.geometryId);if(f.isErr())return f;if(f.value.geometry.type!=="Point")return W({kind:ta.AnnotationNonPointGeometryError,properties:{annotationId:a.id,floorId:i,geometryId:a.geometryId}})}}return B(!0)},"validateAnnotations");var lS=ct("a","AnnotationId"),_m=u.Intersect([jr,u.Object({id:u.Ref(lS,{description:"The unique identifier for the annotation."}),externalId:u.Optional(u.String({description:"The external identifier for the annotation."})),symbolKey:u.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),dS=u.Object({url:u.String({format:"uri",description:"The URL for the symbol."}),name:u.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),a2=u.Object({annotations:yt(u.Record(ke,u.Array(u.Ref(_m)),{additionalProperties:!1})),annotationSymbols:yt(u.Record(u.Index(_m,["symbolKey"]),u.Ref(dS)))},{$id:"AnnotationsSchema"}),c2=/^annotations\/(.*)\.json$/,mS={name:"ext:mvf-annotations",schema:a2,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Ee(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(c2))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[lS,_m,dS],integrityCheck:pS};c();c();c();c();c();c();c();c();var Rm=class Rm extends ne{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(Rm,"TypeSystemDuplicateTypeKind");var Nm=Rm,Cm=class Cm extends ne{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(Cm,"TypeSystemDuplicateFormat");var ra=Cm,df;(function(e){function t(n,i){if(Tt.Has(n))throw new Nm(n);return Tt.Set(n,i),(s={})=>rf(Y(S({},s),{[E]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(tr.Has(n))throw new ra(n);return tr.Set(n,i),n}o(r,"Format"),e.Format=r})(df||(df={}));c();c();c();function f2(e){switch(e.errorType){case T.ArrayContains:return"Expected array to contain at least one matching value";case T.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case T.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case T.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case T.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case T.ArrayUniqueItems:return"Expected array elements to be unique";case T.Array:return"Expected array";case T.AsyncIterator:return"Expected AsyncIterator";case T.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case T.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case T.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case T.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case T.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case T.BigInt:return"Expected bigint";case T.Boolean:return"Expected boolean";case T.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case T.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case T.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case T.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case T.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case T.Date:return"Expected Date";case T.Function:return"Expected function";case T.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case T.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case T.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case T.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case T.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case T.Integer:return"Expected integer";case T.IntersectUnevaluatedProperties:return"Unexpected property";case T.Intersect:return"Expected all values to match";case T.Iterator:return"Expected Iterator";case T.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case T.Never:return"Never";case T.Not:return"Value should not match";case T.Null:return"Expected null";case T.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case T.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case T.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case T.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case T.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case T.Number:return"Expected number";case T.Object:return"Expected object";case T.ObjectAdditionalProperties:return"Unexpected property";case T.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case T.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case T.ObjectRequiredProperty:return"Expected required property";case T.Promise:return"Expected Promise";case T.RegExp:return"Expected string to match regular expression";case T.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case T.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case T.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case T.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case T.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case T.String:return"Expected string";case T.Symbol:return"Expected symbol";case T.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case T.Tuple:return"Expected tuple";case T.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case T.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case T.Uint8Array:return"Expected Uint8Array";case T.Undefined:return"Expected undefined";case T.Union:return"Expected union value";case T.Void:return"Expected void";case T.Kind:return"Expected kind '".concat(e.schema[E],"'");default:return"Unknown error type"}}o(f2,"DefaultErrorFunction");var u2=f2;function yS(){return u2}o(yS,"GetErrorFunction");c();var Lm=class Lm extends ne{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(Lm,"TypeDereferenceError");var Mm=Lm;function p2(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new Mm(e);return Ne(r,t)}o(p2,"Resolve");function kr(e,t){return!Oe(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(kr,"Pushref");function Ne(e,t){return e[E]==="This"||e[E]==="Ref"?p2(e,t):e}o(Ne,"Deref");c();var Dm=class Dm extends ne{constructor(t){super("Unable to hash value"),this.value=t}};o(Dm,"ValueHashError");var Um=Dm,yr;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(yr||(yr={}));var Li=BigInt("14695981039346656037"),[l2,d2]=[BigInt("1099511628211"),BigInt("18446744073709551616")],m2=Array.from({length:256}).map((e,t)=>BigInt(t)),hS=new Float64Array(1),gS=new DataView(hS.buffer),IS=new Uint8Array(hS.buffer);function*y2(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(y2,"NumberToBytes");function h2(e){Wt(yr.Array);for(let t of e)Ui(t)}o(h2,"ArrayType");function g2(e){Wt(yr.Boolean),Wt(e?1:0)}o(g2,"BooleanType");function I2(e){Wt(yr.BigInt),gS.setBigInt64(0,e);for(let t of IS)Wt(t)}o(I2,"BigIntType");function x2(e){Wt(yr.Date),Ui(e.getTime())}o(x2,"DateType");function b2(e){Wt(yr.Null)}o(b2,"NullType");function $2(e){Wt(yr.Number),gS.setFloat64(0,e);for(let t of IS)Wt(t)}o($2,"NumberType");function w2(e){Wt(yr.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Ui(t),Ui(e[t])}o(w2,"ObjectType");function P2(e){Wt(yr.String);for(let t=0;t<e.length;t++)for(let r of y2(e.charCodeAt(t)))Wt(r)}o(P2,"StringType");function O2(e){Wt(yr.Symbol),Ui(e.description)}o(O2,"SymbolType");function F2(e){Wt(yr.Uint8Array);for(let t=0;t<e.length;t++)Wt(e[t])}o(F2,"Uint8ArrayType");function S2(e){return Wt(yr.Undefined)}o(S2,"UndefinedType");function Ui(e){if(ue(e))return h2(e);if(cn(e))return g2(e);if(Nt(e))return I2(e);if(Qt(e))return x2(e);if(kn(e))return b2(e);if(re(e))return $2(e);if(pe(e))return w2(e);if(Oe(e))return P2(e);if(_n(e))return O2(e);if(hi(e))return F2(e);if(pt(e))return S2(e);throw new Um(e)}o(Ui,"Visit");function Wt(e){Li=Li^m2[e],Li=Li*l2%d2}o(Wt,"FNV1A64");function yo(e){return Li=BigInt("14695981039346656037"),Ui(e),Li}o(yo,"Hash");c();var Km=class Km extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(Km,"ValueCheckUnknownTypeError");var qm=Km;function E2(e){return e[E]==="Any"||e[E]==="Unknown"}o(E2,"IsAnyOrUnknown");function be(e){return e!==void 0}o(be,"IsDefined");function T2(e,t,r){return!0}o(T2,"FromAny");function v2(e,t,r){if(!ue(r)||be(e.minItems)&&!(r.length>=e.minItems)||be(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(s=>Mt(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let a of r){let f=yo(a);if(s.has(f))return!1;s.add(f)}return!0}())return!1;if(!(be(e.contains)||re(e.minContains)||re(e.maxContains)))return!0;let n=be(e.contains)?e.contains:Be(),i=r.reduce((s,a)=>Mt(n,t,a)?s+1:s,0);return!(i===0||re(e.minContains)&&i<e.minContains||re(e.maxContains)&&i>e.maxContains)}o(v2,"FromArray");function A2(e,t,r){return jc(r)}o(A2,"FromAsyncIterator");function j2(e,t,r){return!(!Nt(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.minimum)&&!(r>=e.minimum)||be(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(j2,"FromBigInt");function k2(e,t,r){return cn(r)}o(k2,"FromBoolean");function _2(e,t,r){return Mt(e.returns,t,r.prototype)}o(_2,"FromConstructor");function N2(e,t,r){return!(!Qt(r)||be(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||be(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||be(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||be(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||be(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(N2,"FromDate");function R2(e,t,r){return so(r)}o(R2,"FromFunction");function C2(e,t,r){return!(!Nc(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.minimum)&&!(r>=e.minimum)||be(e.multipleOf)&&r%e.multipleOf!==0)}o(C2,"FromInteger");function M2(e,t,r){let n=e.allOf.every(i=>Mt(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(Dn(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a));return n&&s}else if(Fe(e.unevaluatedProperties)){let i=new RegExp(Dn(e)),s=Object.getOwnPropertyNames(r).every(a=>i.test(a)||Mt(e.unevaluatedProperties,t,r[a]));return n&&s}else return n}o(M2,"FromIntersect");function L2(e,t,r){return kc(r)}o(L2,"FromIterator");function U2(e,t,r){return r===e.const}o(U2,"FromLiteral");function D2(e,t,r){return!1}o(D2,"FromNever");function q2(e,t,r){return!Mt(e.not,t,r)}o(q2,"FromNot");function K2(e,t,r){return kn(r)}o(K2,"FromNull");function z2(e,t,r){return!(!ze.IsNumberLike(r)||be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||be(e.minimum)&&!(r>=e.minimum)||be(e.maximum)&&!(r<=e.maximum)||be(e.multipleOf)&&r%e.multipleOf!==0)}o(z2,"FromNumber");function G2(e,t,r){if(!ze.IsObjectLike(r)||be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let s=e.properties[i];if(e.required&&e.required.includes(i)){if(!Mt(s,t,r[i])||(Kn(s)||E2(s))&&!(i in r))return!1}else if(ze.IsExactOptionalProperty(r,i)&&!Mt(s,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(s=>n.includes(s))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||Mt(e.additionalProperties,t,r[s])):!0}o(G2,"FromObject");function B2(e,t,r){return _c(r)}o(B2,"FromPromise");function V2(e,t,r){if(!ze.IsRecordLike(r)||be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],s=new RegExp(n),a=Object.entries(r).every(([d,l])=>s.test(d)?Mt(i,t,l):!0),f=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,l])=>s.test(d)?!0:Mt(e.additionalProperties,t,l)):!0,p=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return a&&f&&p}o(V2,"FromRecord");function W2(e,t,r){return Mt(Ne(e,t),t,r)}o(W2,"FromRef");function H2(e,t,r){let n=new RegExp(e.source,e.flags);return be(e.minLength)&&!(r.length>=e.minLength)||be(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(H2,"FromRegExp");function Z2(e,t,r){return!Oe(r)||be(e.minLength)&&!(r.length>=e.minLength)||be(e.maxLength)&&!(r.length<=e.maxLength)||be(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:be(e.format)?tr.Has(e.format)?tr.Get(e.format)(r):!1:!0}o(Z2,"FromString");function J2(e,t,r){return _n(r)}o(J2,"FromSymbol");function Y2(e,t,r){return Oe(r)&&new RegExp(e.pattern).test(r)}o(Y2,"FromTemplateLiteral");function X2(e,t,r){return Mt(Ne(e,t),t,r)}o(X2,"FromThis");function Q2(e,t,r){if(!ue(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!Mt(e.items[n],t,r[n]))return!1;return!0}o(Q2,"FromTuple");function eU(e,t,r){return pt(r)}o(eU,"FromUndefined");function tU(e,t,r){return e.anyOf.some(n=>Mt(n,t,r))}o(tU,"FromUnion");function rU(e,t,r){return!(!hi(r)||be(e.maxByteLength)&&!(r.length<=e.maxByteLength)||be(e.minByteLength)&&!(r.length>=e.minByteLength))}o(rU,"FromUint8Array");function nU(e,t,r){return!0}o(nU,"FromUnknown");function oU(e,t,r){return ze.IsVoidLike(r)}o(oU,"FromVoid");function iU(e,t,r){return Tt.Has(e[E])?Tt.Get(e[E])(e,r):!1}o(iU,"FromKind");function Mt(e,t,r){let n=be(e.$id)?[...t,e]:t,i=e;switch(i[E]){case"Any":return T2(i,n,r);case"Array":return v2(i,n,r);case"AsyncIterator":return A2(i,n,r);case"BigInt":return j2(i,n,r);case"Boolean":return k2(i,n,r);case"Constructor":return _2(i,n,r);case"Date":return N2(i,n,r);case"Function":return R2(i,n,r);case"Integer":return C2(i,n,r);case"Intersect":return M2(i,n,r);case"Iterator":return L2(i,n,r);case"Literal":return U2(i,n,r);case"Never":return D2(i,n,r);case"Not":return q2(i,n,r);case"Null":return K2(i,n,r);case"Number":return z2(i,n,r);case"Object":return G2(i,n,r);case"Promise":return B2(i,n,r);case"Record":return V2(i,n,r);case"Ref":return W2(i,n,r);case"RegExp":return H2(i,n,r);case"String":return Z2(i,n,r);case"Symbol":return J2(i,n,r);case"TemplateLiteral":return Y2(i,n,r);case"This":return X2(i,n,r);case"Tuple":return Q2(i,n,r);case"Undefined":return eU(i,n,r);case"Union":return tU(i,n,r);case"Uint8Array":return rU(i,n,r);case"Unknown":return nU(i,n,r);case"Void":return oU(i,n,r);default:if(!Tt.Has(i[E]))throw new qm(i);return iU(i,n,r)}}o(Mt,"Visit");function he(...e){return e.length===3?Mt(e[0],e[1],e[2]):Mt(e[0],[],e[1])}o(he,"Check");var T;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(T||(T={}));var Gm=class Gm extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(Gm,"ValueErrorsUnknownTypeError");var zm=Gm;function Gn(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Gn,"EscapeKey");function $e(e){return e!==void 0}o($e,"IsDefined");var Bm=class Bm{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(Bm,"ValueErrorIterator");var _r=Bm;function z(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:yS()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(z,"Create");function*sU(e,t,r,n){}o(sU,"FromAny");function*aU(e,t,r,n){if(!ue(n))return yield z(T.Array,e,r,n);$e(e.minItems)&&!(n.length>=e.minItems)&&(yield z(T.ArrayMinItems,e,r,n)),$e(e.maxItems)&&!(n.length<=e.maxItems)&&(yield z(T.ArrayMaxItems,e,r,n));for(let a=0;a<n.length;a++)yield*C(Lt(e.items,t,"".concat(r,"/").concat(a),n[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let f of n){let p=yo(f);if(a.has(p))return!1;a.add(p)}return!0}()&&(yield z(T.ArrayUniqueItems,e,r,n)),!($e(e.contains)||$e(e.minContains)||$e(e.maxContains)))return;let i=$e(e.contains)?e.contains:Be(),s=n.reduce((a,f,p)=>Lt(i,t,"".concat(r).concat(p),f).next().done===!0?a+1:a,0);s===0&&(yield z(T.ArrayContains,e,r,n)),re(e.minContains)&&s<e.minContains&&(yield z(T.ArrayMinContains,e,r,n)),re(e.maxContains)&&s>e.maxContains&&(yield z(T.ArrayMaxContains,e,r,n))}o(aU,"FromArray");function*cU(e,t,r,n){jc(n)||(yield z(T.AsyncIterator,e,r,n))}o(cU,"FromAsyncIterator");function*fU(e,t,r,n){if(!Nt(n))return yield z(T.BigInt,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.BigIntExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.BigIntExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.BigIntMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.BigIntMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield z(T.BigIntMultipleOf,e,r,n))}o(fU,"FromBigInt");function*uU(e,t,r,n){cn(n)||(yield z(T.Boolean,e,r,n))}o(uU,"FromBoolean");function*pU(e,t,r,n){yield*C(Lt(e.returns,t,r,n.prototype))}o(pU,"FromConstructor");function*lU(e,t,r,n){if(!Qt(n))return yield z(T.Date,e,r,n);$e(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield z(T.DateExclusiveMaximumTimestamp,e,r,n)),$e(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield z(T.DateExclusiveMinimumTimestamp,e,r,n)),$e(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield z(T.DateMaximumTimestamp,e,r,n)),$e(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield z(T.DateMinimumTimestamp,e,r,n)),$e(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield z(T.DateMultipleOfTimestamp,e,r,n))}o(lU,"FromDate");function*dU(e,t,r,n){so(n)||(yield z(T.Function,e,r,n))}o(dU,"FromFunction");function*mU(e,t,r,n){if(!Nc(n))return yield z(T.Integer,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.IntegerExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.IntegerExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.IntegerMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.IntegerMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==0&&(yield z(T.IntegerMultipleOf,e,r,n))}o(mU,"FromInteger");function*yU(e,t,r,n){let i=!1;for(let s of e.allOf)for(let a of Lt(s,t,r,n))i=!0,yield a;if(i)return yield z(T.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let s=new RegExp(Dn(e));for(let a of Object.getOwnPropertyNames(n))s.test(a)||(yield z(T.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let s=new RegExp(Dn(e));for(let a of Object.getOwnPropertyNames(n))if(!s.test(a)){let f=Lt(e.unevaluatedProperties,t,"".concat(r,"/").concat(a),n[a]).next();f.done||(yield f.value)}}}o(yU,"FromIntersect");function*hU(e,t,r,n){kc(n)||(yield z(T.Iterator,e,r,n))}o(hU,"FromIterator");function*gU(e,t,r,n){n!==e.const&&(yield z(T.Literal,e,r,n))}o(gU,"FromLiteral");function*IU(e,t,r,n){yield z(T.Never,e,r,n)}o(IU,"FromNever");function*xU(e,t,r,n){Lt(e.not,t,r,n).next().done===!0&&(yield z(T.Not,e,r,n))}o(xU,"FromNot");function*bU(e,t,r,n){kn(n)||(yield z(T.Null,e,r,n))}o(bU,"FromNull");function*$U(e,t,r,n){if(!ze.IsNumberLike(n))return yield z(T.Number,e,r,n);$e(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield z(T.NumberExclusiveMaximum,e,r,n)),$e(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield z(T.NumberExclusiveMinimum,e,r,n)),$e(e.maximum)&&!(n<=e.maximum)&&(yield z(T.NumberMaximum,e,r,n)),$e(e.minimum)&&!(n>=e.minimum)&&(yield z(T.NumberMinimum,e,r,n)),$e(e.multipleOf)&&n%e.multipleOf!==0&&(yield z(T.NumberMultipleOf,e,r,n))}o($U,"FromNumber");function*wU(e,t,r,n){if(!ze.IsObjectLike(n))return yield z(T.Object,e,r,n);$e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield z(T.ObjectMinProperties,e,r,n)),$e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield z(T.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let f of i)a.includes(f)||(yield z(T.ObjectRequiredProperty,e.properties[f],"".concat(r,"/").concat(Gn(f)),void 0));if(e.additionalProperties===!1)for(let f of a)s.includes(f)||(yield z(T.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Gn(f)),n[f]));if(typeof e.additionalProperties=="object")for(let f of a)s.includes(f)||(yield*C(Lt(e.additionalProperties,t,"".concat(r,"/").concat(Gn(f)),n[f])));for(let f of s){let p=e.properties[f];e.required&&e.required.includes(f)?(yield*C(Lt(p,t,"".concat(r,"/").concat(Gn(f)),n[f])),Kn(e)&&!(f in n)&&(yield z(T.ObjectRequiredProperty,p,"".concat(r,"/").concat(Gn(f)),void 0))):ze.IsExactOptionalProperty(n,f)&&(yield*C(Lt(p,t,"".concat(r,"/").concat(Gn(f)),n[f])))}}o(wU,"FromObject");function*PU(e,t,r,n){_c(n)||(yield z(T.Promise,e,r,n))}o(PU,"FromPromise");function*OU(e,t,r,n){if(!ze.IsRecordLike(n))return yield z(T.Object,e,r,n);$e(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield z(T.ObjectMinProperties,e,r,n)),$e(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield z(T.ObjectMaxProperties,e,r,n));let[i,s]=Object.entries(e.patternProperties)[0],a=new RegExp(i);for(let[f,p]of Object.entries(n))a.test(f)&&(yield*C(Lt(s,t,"".concat(r,"/").concat(Gn(f)),p)));if(typeof e.additionalProperties=="object")for(let[f,p]of Object.entries(n))a.test(f)||(yield*C(Lt(e.additionalProperties,t,"".concat(r,"/").concat(Gn(f)),p)));if(e.additionalProperties===!1){for(let[f,p]of Object.entries(n))if(!a.test(f))return yield z(T.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Gn(f)),p)}}o(OU,"FromRecord");function*FU(e,t,r,n){yield*C(Lt(Ne(e,t),t,r,n))}o(FU,"FromRef");function*SU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);if($e(e.minLength)&&!(n.length>=e.minLength)&&(yield z(T.StringMinLength,e,r,n)),$e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield z(T.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield z(T.RegExp,e,r,n)}o(SU,"FromRegExp");function*EU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);$e(e.minLength)&&!(n.length>=e.minLength)&&(yield z(T.StringMinLength,e,r,n)),$e(e.maxLength)&&!(n.length<=e.maxLength)&&(yield z(T.StringMaxLength,e,r,n)),Oe(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield z(T.StringPattern,e,r,n))),Oe(e.format)&&(tr.Has(e.format)?tr.Get(e.format)(n)||(yield z(T.StringFormat,e,r,n)):yield z(T.StringFormatUnknown,e,r,n))}o(EU,"FromString");function*TU(e,t,r,n){_n(n)||(yield z(T.Symbol,e,r,n))}o(TU,"FromSymbol");function*vU(e,t,r,n){if(!Oe(n))return yield z(T.String,e,r,n);new RegExp(e.pattern).test(n)||(yield z(T.StringPattern,e,r,n))}o(vU,"FromTemplateLiteral");function*AU(e,t,r,n){yield*C(Lt(Ne(e,t),t,r,n))}o(AU,"FromThis");function*jU(e,t,r,n){if(!ue(n))return yield z(T.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield z(T.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield z(T.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*C(Lt(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(jU,"FromTuple");function*kU(e,t,r,n){pt(n)||(yield z(T.Undefined,e,r,n))}o(kU,"FromUndefined");function*_U(e,t,r,n){if(he(e,t,n))return;let i=e.anyOf.map(s=>new _r(Lt(s,t,r,n)));yield z(T.Union,e,r,n,i)}o(_U,"FromUnion");function*NU(e,t,r,n){if(!hi(n))return yield z(T.Uint8Array,e,r,n);$e(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield z(T.Uint8ArrayMaxByteLength,e,r,n)),$e(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield z(T.Uint8ArrayMinByteLength,e,r,n))}o(NU,"FromUint8Array");function*RU(e,t,r,n){}o(RU,"FromUnknown");function*CU(e,t,r,n){ze.IsVoidLike(n)||(yield z(T.Void,e,r,n))}o(CU,"FromVoid");function*MU(e,t,r,n){Tt.Get(e[E])(e,n)||(yield z(T.Kind,e,r,n))}o(MU,"FromKind");function*Lt(e,t,r,n){let i=$e(e.$id)?[...t,e]:t,s=e;switch(s[E]){case"Any":return yield*C(sU(s,i,r,n));case"Array":return yield*C(aU(s,i,r,n));case"AsyncIterator":return yield*C(cU(s,i,r,n));case"BigInt":return yield*C(fU(s,i,r,n));case"Boolean":return yield*C(uU(s,i,r,n));case"Constructor":return yield*C(pU(s,i,r,n));case"Date":return yield*C(lU(s,i,r,n));case"Function":return yield*C(dU(s,i,r,n));case"Integer":return yield*C(mU(s,i,r,n));case"Intersect":return yield*C(yU(s,i,r,n));case"Iterator":return yield*C(hU(s,i,r,n));case"Literal":return yield*C(gU(s,i,r,n));case"Never":return yield*C(IU(s,i,r,n));case"Not":return yield*C(xU(s,i,r,n));case"Null":return yield*C(bU(s,i,r,n));case"Number":return yield*C($U(s,i,r,n));case"Object":return yield*C(wU(s,i,r,n));case"Promise":return yield*C(PU(s,i,r,n));case"Record":return yield*C(OU(s,i,r,n));case"Ref":return yield*C(FU(s,i,r,n));case"RegExp":return yield*C(SU(s,i,r,n));case"String":return yield*C(EU(s,i,r,n));case"Symbol":return yield*C(TU(s,i,r,n));case"TemplateLiteral":return yield*C(vU(s,i,r,n));case"This":return yield*C(AU(s,i,r,n));case"Tuple":return yield*C(jU(s,i,r,n));case"Undefined":return yield*C(kU(s,i,r,n));case"Union":return yield*C(_U(s,i,r,n));case"Uint8Array":return yield*C(NU(s,i,r,n));case"Unknown":return yield*C(RU(s,i,r,n));case"Void":return yield*C(CU(s,i,r,n));default:if(!Tt.Has(s[E]))throw new zm(e);return yield*C(MU(s,i,r,n))}}o(Lt,"Visit");function mn(...e){let t=e.length===3?Lt(e[0],e[1],"",e[2]):Lt(e[0],[],"",e[1]);return new _r(t)}o(mn,"Errors");c();var LU=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},bS=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Vm,mf,$S,Hm=class Hm extends ne{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),Vm.add(this),mf.set(this,void 0),LU(this,mf,t,"f"),this.error=r}Errors(){return new _r(bS(this,Vm,"m",$S).call(this))}};o(Hm,"AssertError");var Wm=Hm;mf=new WeakMap,Vm=new WeakSet,$S=o(function*(){this.error&&(yield this.error),yield*C(bS(this,mf,"f"))},"_AssertError_Iterator");function xS(e,t,r){if(!he(e,t,r))throw new Wm(mn(e,t,r))}o(xS,"AssertValue");function yf(...e){return e.length===3?xS(e[0],e[1],e[2]):xS(e[0],[],e[1])}o(yf,"Assert");c();c();c();function UU(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Re(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Re(e[r]);return t}o(UU,"FromObject");function DU(e){return e.map(t=>Re(t))}o(DU,"FromArray");function qU(e){return e.slice()}o(qU,"FromTypedArray");function KU(e){return new Map(Re([...e.entries()]))}o(KU,"FromMap");function zU(e){return new Set(Re([...e.entries()]))}o(zU,"FromSet");function GU(e){return new Date(e.toISOString())}o(GU,"FromDate");function Re(e){if(ue(e))return DU(e);if(Qt(e))return GU(e);if(Or(e))return qU(e);if(DP(e))return KU(e);if(qP(e))return zU(e);if(pe(e))return UU(e);if(Rt(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Re,"Clone");var Zm=class Zm extends ne{constructor(t,r){super(r),this.schema=t}};o(Zm,"ValueCreateError");var hr=Zm;function Ce(e){return so(e)?e():Re(e)}o(Ce,"FromDefault");function BU(e,t){return oe(e,"default")?Ce(e.default):{}}o(BU,"FromAny");function VU(e,t){if(e.uniqueItems===!0&&!oe(e,"default"))throw new hr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!oe(e,"default"))throw new hr(e,"Array with the contains constraint requires a default value");return"default"in e?Ce(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>gr(e.items,t)):[]}o(VU,"FromArray");function WU(e,t){return oe(e,"default")?Ce(e.default):function(){return bh(this,null,function*(){})}()}o(WU,"FromAsyncIterator");function HU(e,t){return oe(e,"default")?Ce(e.default):BigInt(0)}o(HU,"FromBigInt");function ZU(e,t){return oe(e,"default")?Ce(e.default):!1}o(ZU,"FromBoolean");function JU(e,t){if(oe(e,"default"))return Ce(e.default);{let r=gr(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let s=this;s[n]=i}}}:class{}}}o(JU,"FromConstructor");function YU(e,t){return oe(e,"default")?Ce(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(YU,"FromDate");function XU(e,t){return oe(e,"default")?Ce(e.default):()=>gr(e.returns,t)}o(XU,"FromFunction");function QU(e,t){return oe(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(QU,"FromInteger");function eD(e,t){if(oe(e,"default"))return Ce(e.default);{let r=e.allOf.reduce((n,i)=>{let s=gr(i,t);return typeof s=="object"?S(S({},n),s):s},{});if(!he(e,t,r))throw new hr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(eD,"FromIntersect");function tD(e,t){return oe(e,"default")?Ce(e.default):function*(){}()}o(tD,"FromIterator");function rD(e,t){return oe(e,"default")?Ce(e.default):e.const}o(rD,"FromLiteral");function nD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"Never types cannot be created. Consider using a default value.")}o(nD,"FromNever");function oD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"Not types must have a default value")}o(oD,"FromNot");function iD(e,t){return oe(e,"default")?Ce(e.default):null}o(iD,"FromNull");function sD(e,t){return oe(e,"default")?Ce(e.default):e.minimum!==void 0?e.minimum:0}o(sD,"FromNumber");function aD(e,t){if(oe(e,"default"))return Ce(e.default);{let r=new Set(e.required),n={};for(let[i,s]of Object.entries(e.properties))r.has(i)&&(n[i]=gr(s,t));return n}}o(aD,"FromObject");function cD(e,t){return oe(e,"default")?Ce(e.default):Promise.resolve(gr(e.item,t))}o(cD,"FromPromise");function fD(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(oe(e,"default"))return Ce(e.default);if(r===Ln||r===Mn)return{};{let i=r.slice(1,r.length-1).split("|"),s={};for(let a of i)s[a]=gr(n,t);return s}}o(fD,"FromRecord");function uD(e,t){return oe(e,"default")?Ce(e.default):gr(Ne(e,t),t)}o(uD,"FromRef");function pD(e,t){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"RegExp types cannot be created. Consider using a default value.")}o(pD,"FromRegExp");function lD(e,t){if(e.pattern!==void 0){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(oe(e,"default"))return Ce(e.default);throw new hr(e,"String types with formats must specify a default value")}else return oe(e,"default")?Ce(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(lD,"FromString");function dD(e,t){return oe(e,"default")?Ce(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(dD,"FromSymbol");function mD(e,t){if(oe(e,"default"))return Ce(e.default);if(!Uc(e))throw new hr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Pi(e)[0]}o(mD,"FromTemplateLiteral");function yD(e,t){if(wS++>PD)throw new hr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return oe(e,"default")?Ce(e.default):gr(Ne(e,t),t)}o(yD,"FromThis");function hD(e,t){return oe(e,"default")?Ce(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>gr(e.items[n],t))}o(hD,"FromTuple");function gD(e,t){if(oe(e,"default"))return Ce(e.default)}o(gD,"FromUndefined");function ID(e,t){if(oe(e,"default"))return Ce(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return gr(e.anyOf[0],t)}o(ID,"FromUnion");function xD(e,t){return oe(e,"default")?Ce(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(xD,"FromUint8Array");function bD(e,t){return oe(e,"default")?Ce(e.default):{}}o(bD,"FromUnknown");function $D(e,t){if(oe(e,"default"))return Ce(e.default)}o($D,"FromVoid");function wD(e,t){if(oe(e,"default"))return Ce(e.default);throw new Error("User defined types must specify a default value")}o(wD,"FromKind");function gr(e,t){let r=kr(e,t),n=e;switch(n[E]){case"Any":return BU(n,r);case"Array":return VU(n,r);case"AsyncIterator":return WU(n,r);case"BigInt":return HU(n,r);case"Boolean":return ZU(n,r);case"Constructor":return JU(n,r);case"Date":return YU(n,r);case"Function":return XU(n,r);case"Integer":return QU(n,r);case"Intersect":return eD(n,r);case"Iterator":return tD(n,r);case"Literal":return rD(n,r);case"Never":return nD(n,r);case"Not":return oD(n,r);case"Null":return iD(n,r);case"Number":return sD(n,r);case"Object":return aD(n,r);case"Promise":return cD(n,r);case"Record":return fD(n,r);case"Ref":return uD(n,r);case"RegExp":return pD(n,r);case"String":return lD(n,r);case"Symbol":return dD(n,r);case"TemplateLiteral":return mD(n,r);case"This":return yD(n,r);case"Tuple":return hD(n,r);case"Undefined":return gD(n,r);case"Union":return ID(n,r);case"Uint8Array":return xD(n,r);case"Unknown":return bD(n,r);case"Void":return $D(n,r);default:if(!Tt.Has(n[E]))throw new hr(n,"Unknown type");return wD(n,r)}}o(gr,"Visit");var PD=512,wS=0;function Nr(...e){return wS=0,e.length===2?gr(e[0],e[1]):gr(e[0],[])}o(Nr,"Create");var Ym=class Ym extends ne{constructor(t,r){super(r),this.schema=t}};o(Ym,"ValueCastError");var hf=Ym;function OD(e,t,r){if(e[E]==="Object"&&typeof r=="object"&&!kn(r)){let n=e,i=Object.getOwnPropertyNames(r),s=Object.entries(n.properties),[a,f]=[1/s.length,s.length];return s.reduce((p,[d,l])=>{let m=l[E]==="Literal"&&l.const===r[d]?f:0,g=he(l,t,r[d])?a:0,b=i.includes(d)?a:0;return p+(m+g+b)},0)}else return he(e,t,r)?1:0}o(OD,"ScoreUnion");function FD(e,t,r){let n=e.anyOf.map(a=>Ne(a,t)),[i,s]=[n[0],0];for(let a of n){let f=OD(a,t,r);f>s&&(i=a,s=f)}return i}o(FD,"SelectUnion");function SD(e,t,r){if("default"in e)return typeof r=="function"?e.default:Re(e.default);{let n=FD(e,t,r);return Jm(n,t,r)}}o(SD,"CastUnion");function ED(e,t,r){return he(e,t,r)?Re(r):Nr(e,t)}o(ED,"DefaultClone");function TD(e,t,r){return he(e,t,r)?r:Nr(e,t)}o(TD,"Default");function vD(e,t,r){if(he(e,t,r))return Re(r);let n=ue(r)?Re(r):Nr(e,t),i=re(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(re(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(p=>yn(e.items,t,p));if(e.uniqueItems!==!0)return a;let f=[...new Set(a)];if(!he(e,t,f))throw new hf(e,"Array cast produced invalid data due to uniqueItems constraint");return f}o(vD,"FromArray");function AD(e,t,r){if(he(e,t,r))return Nr(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[s,a]of Object.entries(e.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(i.prototype[s]=yn(a,t,r.prototype[s]));return i}o(AD,"FromConstructor");function jD(e,t,r){let n=Nr(e,t),i=pe(n)&&pe(r)?S(S({},n),r):r;return he(e,t,i)?i:Nr(e,t)}o(jD,"FromIntersect");function kD(e,t,r){throw new hf(e,"Never types cannot be cast")}o(kD,"FromNever");function _D(e,t,r){if(he(e,t,r))return r;if(r===null||typeof r!="object")return Nr(e,t);let n=new Set(e.required||[]),i={};for(let[s,a]of Object.entries(e.properties))!n.has(s)&&r[s]===void 0||(i[s]=yn(a,t,r[s]));if(typeof e.additionalProperties=="object"){let s=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(r))s.includes(a)||(i[a]=yn(e.additionalProperties,t,r[a]))}return i}o(_D,"FromObject");function ND(e,t,r){if(he(e,t,r))return Re(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return Nr(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],s={};for(let[a,f]of Object.entries(r))s[a]=yn(i,t,f);return s}o(ND,"FromRecord");function RD(e,t,r){return yn(Ne(e,t),t,r)}o(RD,"FromRef");function CD(e,t,r){return yn(Ne(e,t),t,r)}o(CD,"FromThis");function MD(e,t,r){return he(e,t,r)?Re(r):ue(r)?e.items===void 0?[]:e.items.map((n,i)=>yn(n,t,r[i])):Nr(e,t)}o(MD,"FromTuple");function LD(e,t,r){return he(e,t,r)?Re(r):SD(e,t,r)}o(LD,"FromUnion");function yn(e,t,r){let n=Oe(e.$id)?[...t,e]:t,i=e;switch(e[E]){case"Array":return vD(i,n,r);case"Constructor":return AD(i,n,r);case"Intersect":return jD(i,n,r);case"Never":return kD(i,n,r);case"Object":return _D(i,n,r);case"Record":return ND(i,n,r);case"Ref":return RD(i,n,r);case"This":return CD(i,n,r);case"Tuple":return MD(i,n,r);case"Union":return LD(i,n,r);case"Date":case"Symbol":case"Uint8Array":return ED(e,t,r);default:return TD(i,n,r)}}o(yn,"Visit");function Jm(...e){return e.length===3?yn(e[0],e[1],e[2]):yn(e[0],[],e[1])}o(Jm,"Cast");c();function UD(e){return co(e)&&e[E]!=="Unsafe"}o(UD,"IsCheckable");function DD(e,t,r){return ue(r)?r.map(n=>Ir(e.items,t,n)):r}o(DD,"FromArray");function qD(e,t,r){let n=e.unevaluatedProperties,s=e.allOf.map(f=>Ir(f,t,Re(r))).reduce((f,p)=>pe(p)?S(S({},f),p):p,{});if(!pe(r)||!pe(s)||!co(n))return s;let a=At(e);for(let f of Object.getOwnPropertyNames(r))a.includes(f)||he(n,t,r[f])&&(s[f]=Ir(n,t,r[f]));return s}o(qD,"FromIntersect");function KD(e,t,r){if(!pe(r)||ue(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(oe(e.properties,i)){r[i]=Ir(e.properties[i],t,r[i]);continue}if(co(n)&&he(n,t,r[i])){r[i]=Ir(n,t,r[i]);continue}delete r[i]}return r}o(KD,"FromObject");function zD(e,t,r){if(!pe(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[s,a]=Object.entries(e.patternProperties)[0],f=new RegExp(s);for(let p of i){if(f.test(p)){r[p]=Ir(a,t,r[p]);continue}if(co(n)&&he(n,t,r[p])){r[p]=Ir(n,t,r[p]);continue}delete r[p]}return r}o(zD,"FromRecord");function GD(e,t,r){return Ir(Ne(e,t),t,r)}o(GD,"FromRef");function BD(e,t,r){return Ir(Ne(e,t),t,r)}o(BD,"FromThis");function VD(e,t,r){if(!ue(r))return r;if(pt(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Ir(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(VD,"FromTuple");function WD(e,t,r){for(let n of e.anyOf)if(UD(n)&&he(n,t,r))return Ir(n,t,r);return r}o(WD,"FromUnion");function Ir(e,t,r){let n=Oe(e.$id)?[...t,e]:t,i=e;switch(i[E]){case"Array":return DD(i,n,r);case"Intersect":return qD(i,n,r);case"Object":return KD(i,n,r);case"Record":return zD(i,n,r);case"Ref":return GD(i,n,r);case"This":return BD(i,n,r);case"Tuple":return VD(i,n,r);case"Union":return WD(i,n,r);default:return r}}o(Ir,"Visit");function gf(...e){return e.length===3?Ir(e[0],e[1],e[2]):Ir(e[0],[],e[1])}o(gf,"Clean");c();function If(e){return Oe(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(If,"IsStringNumeric");function HD(e){return Nt(e)||cn(e)||re(e)}o(HD,"IsValueToString");function na(e){return e===!0||re(e)&&e===1||Nt(e)&&e===BigInt("1")||Oe(e)&&(e.toLowerCase()==="true"||e==="1")}o(na,"IsValueTrue");function oa(e){return e===!1||re(e)&&(e===0||Object.is(e,-0))||Nt(e)&&e===BigInt("0")||Oe(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(oa,"IsValueFalse");function ZD(e){return Oe(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(ZD,"IsTimeStringWithTimeZone");function JD(e){return Oe(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(JD,"IsTimeStringWithoutTimeZone");function YD(e){return Oe(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(YD,"IsDateTimeStringWithTimeZone");function XD(e){return Oe(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(XD,"IsDateTimeStringWithoutTimeZone");function QD(e){return Oe(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(QD,"IsDateString");function eq(e,t){let r=OS(e);return r===t?r:e}o(eq,"TryConvertLiteralString");function tq(e,t){let r=FS(e);return r===t?r:e}o(tq,"TryConvertLiteralNumber");function rq(e,t){let r=PS(e);return r===t?r:e}o(rq,"TryConvertLiteralBoolean");function nq(e,t){return Oe(e.const)?eq(t,e.const):re(e.const)?tq(t,e.const):cn(e.const)?rq(t,e.const):t}o(nq,"TryConvertLiteral");function PS(e){return na(e)?!0:oa(e)?!1:e}o(PS,"TryConvertBoolean");function oq(e){let t=o(r=>r.split(".")[0],"truncateInteger");return If(e)?BigInt(t(e)):re(e)?BigInt(Math.trunc(e)):oa(e)?BigInt(0):na(e)?BigInt(1):e}o(oq,"TryConvertBigInt");function OS(e){return HD(e)?e.toString():_n(e)&&e.description!==void 0?e.description.toString():e}o(OS,"TryConvertString");function FS(e){return If(e)?parseFloat(e):na(e)?1:oa(e)?0:e}o(FS,"TryConvertNumber");function iq(e){return If(e)?parseInt(e):re(e)?e|0:na(e)?1:oa(e)?0:e}o(iq,"TryConvertInteger");function sq(e){return Oe(e)&&e.toLowerCase()==="null"?null:e}o(sq,"TryConvertNull");function aq(e){return Oe(e)&&e==="undefined"?void 0:e}o(aq,"TryConvertUndefined");function cq(e){return Qt(e)?e:re(e)?new Date(e):na(e)?new Date(1):oa(e)?new Date(0):If(e)?new Date(parseInt(e)):JD(e)?new Date("1970-01-01T".concat(e,".000Z")):ZD(e)?new Date("1970-01-01T".concat(e)):XD(e)?new Date("".concat(e,".000Z")):YD(e)?new Date(e):QD(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(cq,"TryConvertDate");function fq(e,t,r){return(ue(r)?r:[r]).map(i=>hn(e.items,t,i))}o(fq,"FromArray");function uq(e,t,r){return oq(r)}o(uq,"FromBigInt");function pq(e,t,r){return PS(r)}o(pq,"FromBoolean");function lq(e,t,r){return cq(r)}o(lq,"FromDate");function dq(e,t,r){return iq(r)}o(dq,"FromInteger");function mq(e,t,r){return e.allOf.reduce((n,i)=>hn(i,t,n),r)}o(mq,"FromIntersect");function yq(e,t,r){return nq(e,r)}o(yq,"FromLiteral");function hq(e,t,r){return sq(r)}o(hq,"FromNull");function gq(e,t,r){return FS(r)}o(gq,"FromNumber");function Iq(e,t,r){if(!pe(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))oe(r,n)&&(r[n]=hn(e.properties[n],t,r[n]));return r}o(Iq,"FromObject");function xq(e,t,r){if(!pe(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=e.patternProperties[i];for(let[a,f]of Object.entries(r))r[a]=hn(s,t,f);return r}o(xq,"FromRecord");function bq(e,t,r){return hn(Ne(e,t),t,r)}o(bq,"FromRef");function $q(e,t,r){return OS(r)}o($q,"FromString");function wq(e,t,r){return Oe(r)||re(r)?Symbol(r):r}o(wq,"FromSymbol");function Pq(e,t,r){return hn(Ne(e,t),t,r)}o(Pq,"FromThis");function Oq(e,t,r){return ue(r)&&!pt(e.items)?r.map((i,s)=>s<e.items.length?hn(e.items[s],t,i):i):r}o(Oq,"FromTuple");function Fq(e,t,r){return aq(r)}o(Fq,"FromUndefined");function Sq(e,t,r){for(let n of e.anyOf){let i=hn(n,t,Re(r));if(he(n,t,i))return i}return r}o(Sq,"FromUnion");function hn(e,t,r){let n=kr(e,t),i=e;switch(e[E]){case"Array":return fq(i,n,r);case"BigInt":return uq(i,n,r);case"Boolean":return pq(i,n,r);case"Date":return lq(i,n,r);case"Integer":return dq(i,n,r);case"Intersect":return mq(i,n,r);case"Literal":return yq(i,n,r);case"Null":return hq(i,n,r);case"Number":return gq(i,n,r);case"Object":return Iq(i,n,r);case"Record":return xq(i,n,r);case"Ref":return bq(i,n,r);case"String":return $q(i,n,r);case"Symbol":return wq(i,n,r);case"This":return Pq(i,n,r);case"Tuple":return Oq(i,n,r);case"Undefined":return Fq(i,n,r);case"Union":return Sq(i,n,r);default:return r}}o(hn,"Visit");function xf(...e){return e.length===3?hn(e[0],e[1],e[2]):hn(e[0],[],e[1])}o(xf,"Convert");c();c();var Xm=class Xm extends ne{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(Xm,"TransformDecodeCheckError");var Di=Xm,Qm=class Qm extends ne{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Qm,"TransformDecodeError");var Uo=Qm;function lt(e,t,r){try{return tt(e)?e[st].Decode(r):r}catch(n){throw new Uo(e,t,r,n)}}o(lt,"Default");function Eq(e,t,r,n){return ue(n)?lt(e,r,n.map((i,s)=>gn(e.items,t,"".concat(r,"/").concat(s),i))):lt(e,r,n)}o(Eq,"FromArray");function Tq(e,t,r,n){if(!pe(n)||Rt(n))return lt(e,r,n);let i=po(e),s=i.map(l=>l[0]),a=S({},n);for(let[l,m]of i)l in a&&(a[l]=gn(m,t,"".concat(r,"/").concat(l),a[l]));if(!tt(e.unevaluatedProperties))return lt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.unevaluatedProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=lt(p,"".concat(r,"/").concat(l),d[l]));return lt(e,r,d)}o(Tq,"FromIntersect");function vq(e,t,r,n){return lt(e,r,gn(e.not,t,r,n))}o(vq,"FromNot");function Aq(e,t,r,n){if(!pe(n))return lt(e,r,n);let i=At(e),s=S({},n);for(let d of i)oe(s,d)&&(pt(s[d])&&(!Ii(e.properties[d])||ze.IsExactOptionalProperty(s,d))||(s[d]=gn(e.properties[d],t,"".concat(r,"/").concat(d),s[d])));if(!Fe(e.additionalProperties))return lt(e,r,s);let a=Object.getOwnPropertyNames(s),f=e.additionalProperties,p=S({},s);for(let d of a)i.includes(d)||(p[d]=lt(f,"".concat(r,"/").concat(d),p[d]));return lt(e,r,p)}o(Aq,"FromObject");function jq(e,t,r,n){if(!pe(n))return lt(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(i),a=S({},n);for(let l of Object.getOwnPropertyNames(n))s.test(l)&&(a[l]=gn(e.patternProperties[i],t,"".concat(r,"/").concat(l),a[l]));if(!Fe(e.additionalProperties))return lt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.test(l)||(d[l]=lt(p,"".concat(r,"/").concat(l),d[l]));return lt(e,r,d)}o(jq,"FromRecord");function kq(e,t,r,n){let i=Ne(e,t);return lt(e,r,gn(i,t,r,n))}o(kq,"FromRef");function _q(e,t,r,n){let i=Ne(e,t);return lt(e,r,gn(i,t,r,n))}o(_q,"FromThis");function Nq(e,t,r,n){return ue(n)&&ue(e.items)?lt(e,r,e.items.map((i,s)=>gn(i,t,"".concat(r,"/").concat(s),n[s]))):lt(e,r,n)}o(Nq,"FromTuple");function Rq(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=gn(i,t,r,n);return lt(e,r,s)}return lt(e,r,n)}o(Rq,"FromUnion");function gn(e,t,r,n){let i=kr(e,t),s=e;switch(e[E]){case"Array":return Eq(s,i,r,n);case"Intersect":return Tq(s,i,r,n);case"Not":return vq(s,i,r,n);case"Object":return Aq(s,i,r,n);case"Record":return jq(s,i,r,n);case"Ref":return kq(s,i,r,n);case"Symbol":return lt(s,r,n);case"This":return _q(s,i,r,n);case"Tuple":return Nq(s,i,r,n);case"Union":return Rq(s,i,r,n);default:return lt(s,r,n)}}o(gn,"Visit");function qi(e,t,r){return gn(e,t,"",r)}o(qi,"TransformDecode");c();var ey=class ey extends ne{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(ey,"TransformEncodeCheckError");var Ki=ey,ty=class ty extends ne{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(ty,"TransformEncodeError");var Do=ty;function Ht(e,t,r){try{return tt(e)?e[st].Encode(r):r}catch(n){throw new Do(e,t,r,n)}}o(Ht,"Default");function Cq(e,t,r,n){let i=Ht(e,r,n);return ue(i)?i.map((s,a)=>In(e.items,t,"".concat(r,"/").concat(a),s)):i}o(Cq,"FromArray");function Mq(e,t,r,n){let i=Ht(e,r,n);if(!pe(n)||Rt(n))return i;let s=po(e),a=s.map(m=>m[0]),f=S({},i);for(let[m,g]of s)m in f&&(f[m]=In(g,t,"".concat(r,"/").concat(m),f[m]));if(!tt(e.unevaluatedProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.unevaluatedProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=Ht(d,"".concat(r,"/").concat(m),l[m]));return l}o(Mq,"FromIntersect");function Lq(e,t,r,n){return Ht(e.not,r,Ht(e,r,n))}o(Lq,"FromNot");function Uq(e,t,r,n){let i=Ht(e,r,n);if(!pe(i))return i;let s=At(e),a=S({},i);for(let l of s)oe(a,l)&&(pt(a[l])&&(!Ii(e.properties[l])||ze.IsExactOptionalProperty(a,l))||(a[l]=In(e.properties[l],t,"".concat(r,"/").concat(l),a[l])));if(!Fe(e.additionalProperties))return a;let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=Ht(p,"".concat(r,"/").concat(l),d[l]));return d}o(Uq,"FromObject");function Dq(e,t,r,n){let i=Ht(e,r,n);if(!pe(n))return i;let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),f=S({},i);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(f[m]=In(e.patternProperties[s],t,"".concat(r,"/").concat(m),f[m]));if(!Fe(e.additionalProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.test(m)||(l[m]=Ht(d,"".concat(r,"/").concat(m),l[m]));return l}o(Dq,"FromRecord");function qq(e,t,r,n){let i=Ne(e,t),s=In(i,t,r,n);return Ht(e,r,s)}o(qq,"FromRef");function Kq(e,t,r,n){let i=Ne(e,t),s=In(i,t,r,n);return Ht(e,r,s)}o(Kq,"FromThis");function zq(e,t,r,n){let i=Ht(e,r,n);return ue(e.items)?e.items.map((s,a)=>In(s,t,"".concat(r,"/").concat(a),i[a])):[]}o(zq,"FromTuple");function Gq(e,t,r,n){for(let i of e.anyOf){if(!he(i,t,n))continue;let s=In(i,t,r,n);return Ht(e,r,s)}for(let i of e.anyOf){let s=In(i,t,r,n);if(he(e,t,s))return Ht(e,r,s)}return Ht(e,r,n)}o(Gq,"FromUnion");function In(e,t,r,n){let i=kr(e,t),s=e;switch(e[E]){case"Array":return Cq(s,i,r,n);case"Intersect":return Mq(s,i,r,n);case"Not":return Lq(s,i,r,n);case"Object":return Uq(s,i,r,n);case"Record":return Dq(s,i,r,n);case"Ref":return qq(s,i,r,n);case"This":return Kq(s,i,r,n);case"Tuple":return zq(s,i,r,n);case"Union":return Gq(s,i,r,n);default:return Ht(s,r,n)}}o(In,"Visit");function bf(e,t,r){return In(e,t,"",r)}o(bf,"TransformEncode");c();function Bq(e,t){return tt(e)||jt(e.items,t)}o(Bq,"FromArray");function Vq(e,t){return tt(e)||jt(e.items,t)}o(Vq,"FromAsyncIterator");function Wq(e,t){return tt(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(Wq,"FromConstructor");function Hq(e,t){return tt(e)||jt(e.returns,t)||e.parameters.some(r=>jt(r,t))}o(Hq,"FromFunction");function Zq(e,t){return tt(e)||tt(e.unevaluatedProperties)||e.allOf.some(r=>jt(r,t))}o(Zq,"FromIntersect");function Jq(e,t){return tt(e)||jt(e.items,t)}o(Jq,"FromIterator");function Yq(e,t){return tt(e)||jt(e.not,t)}o(Yq,"FromNot");function Xq(e,t){return tt(e)||Object.values(e.properties).some(r=>jt(r,t))||Fe(e.additionalProperties)&&jt(e.additionalProperties,t)}o(Xq,"FromObject");function Qq(e,t){return tt(e)||jt(e.item,t)}o(Qq,"FromPromise");function e9(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return tt(e)||jt(n,t)||Fe(e.additionalProperties)&&tt(e.additionalProperties)}o(e9,"FromRecord");function t9(e,t){return tt(e)?!0:jt(Ne(e,t),t)}o(t9,"FromRef");function r9(e,t){return tt(e)?!0:jt(Ne(e,t),t)}o(r9,"FromThis");function n9(e,t){return tt(e)||!pt(e.items)&&e.items.some(r=>jt(r,t))}o(n9,"FromTuple");function o9(e,t){return tt(e)||e.anyOf.some(r=>jt(r,t))}o(o9,"FromUnion");function jt(e,t){let r=kr(e,t),n=e;if(e.$id&&ry.has(e.$id))return!1;switch(e.$id&&ry.add(e.$id),e[E]){case"Array":return Bq(n,r);case"AsyncIterator":return Vq(n,r);case"Constructor":return Wq(n,r);case"Function":return Hq(n,r);case"Intersect":return Zq(n,r);case"Iterator":return Jq(n,r);case"Not":return Yq(n,r);case"Object":return Xq(n,r);case"Promise":return Qq(n,r);case"Record":return e9(n,r);case"Ref":return t9(n,r);case"This":return r9(n,r);case"Tuple":return n9(n,r);case"Union":return o9(n,r);default:return tt(e)}}o(jt,"Visit");var ry=new Set;function xn(e,t){return ry.clear(),jt(e,t)}o(xn,"HasTransform");function SS(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!he(t,r,n))throw new Di(t,n,mn(t,r,n).First());return xn(t,r)?qi(t,r,n):n}o(SS,"Decode");c();function Bn(e,t){let r=oe(e,"default")?e.default:void 0,n=so(r)?r():Re(r);return pt(t)?n:pe(t)&&pe(n)?Object.assign(n,t):t}o(Bn,"ValueOrDefault");function ny(e){return co(e)&&"default"in e}o(ny,"HasDefaultProperty");function i9(e,t,r){let n=Bn(e,r);if(!ue(n))return n;for(let i=0;i<n.length;i++)n[i]=xr(e.items,t,n[i]);return n}o(i9,"FromArray");function s9(e,t,r){return Qt(r)?r:Bn(e,r)}o(s9,"FromDate");function a9(e,t,r){let n=Bn(e,r);return e.allOf.reduce((i,s)=>{let a=xr(s,t,n);return pe(a)?S(S({},i),a):a},{})}o(a9,"FromIntersect");function c9(e,t,r){let n=Bn(e,r);if(!pe(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let s of i){let a=xr(e.properties[s],t,n[s]);pt(a)||(n[s]=xr(e.properties[s],t,n[s]))}if(!ny(e.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))i.includes(s)||(n[s]=xr(e.additionalProperties,t,n[s]));return n}o(c9,"FromObject");function f9(e,t,r){let n=Bn(e,r);if(!pe(n))return n;let i=e.additionalProperties,[s,a]=Object.entries(e.patternProperties)[0],f=new RegExp(s);for(let p of Object.getOwnPropertyNames(n))f.test(p)&&ny(a)&&(n[p]=xr(a,t,n[p]));if(!ny(i))return n;for(let p of Object.getOwnPropertyNames(n))f.test(p)||(n[p]=xr(i,t,n[p]));return n}o(f9,"FromRecord");function u9(e,t,r){return xr(Ne(e,t),t,Bn(e,r))}o(u9,"FromRef");function p9(e,t,r){return xr(Ne(e,t),t,r)}o(p9,"FromThis");function l9(e,t,r){let n=Bn(e,r);if(!ue(n)||pt(e.items))return n;let[i,s]=[e.items,Math.max(e.items.length,n.length)];for(let a=0;a<s;a++)a<i.length&&(n[a]=xr(i[a],t,n[a]));return n}o(l9,"FromTuple");function d9(e,t,r){let n=Bn(e,r);for(let i of e.anyOf){let s=xr(i,t,Re(n));if(he(i,t,s))return s}return n}o(d9,"FromUnion");function xr(e,t,r){let n=kr(e,t),i=e;switch(i[E]){case"Array":return i9(i,n,r);case"Date":return s9(i,n,r);case"Intersect":return a9(i,n,r);case"Object":return c9(i,n,r);case"Record":return f9(i,n,r);case"Ref":return u9(i,n,r);case"This":return p9(i,n,r);case"Tuple":return l9(i,n,r);case"Union":return d9(i,n,r);default:return Bn(i,r)}}o(xr,"Visit");function $f(...e){return e.length===3?xr(e[0],e[1],e[2]):xr(e[0],[],e[1])}o($f,"Default");c();c();var Rr={};go(Rr,{Delete:()=>y9,Format:()=>ia,Get:()=>g9,Has:()=>h9,Set:()=>m9,ValuePointerRootDeleteError:()=>Pf,ValuePointerRootSetError:()=>wf});c();var oy=class oy extends ne{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(oy,"ValuePointerRootSetError");var wf=oy,iy=class iy extends ne{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(iy,"ValuePointerRootDeleteError");var Pf=iy;function ES(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(ES,"Escape");function*ia(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield ES(e.slice(t,r))),t=n+1):r=n;yield ES(e.slice(t))}o(ia,"Format");function m9(e,t,r){if(t==="")throw new wf(e,t,r);let[n,i,s]=[null,e,""];for(let a of ia(t))i[a]===void 0&&(i[a]={}),n=i,i=i[a],s=a;n[s]=r}o(m9,"Set");function y9(e,t){if(t==="")throw new Pf(e,t);let[r,n,i]=[null,e,""];for(let s of ia(t)){if(n[s]===void 0||n[s]===null)return;r=n,n=n[s],i=s}if(Array.isArray(r)){let s=parseInt(i);r.splice(s,1)}else delete r[i]}o(y9,"Delete");function h9(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let s of ia(t)){if(n[s]===void 0)return!1;r=n,n=n[s],i=s}return Object.getOwnPropertyNames(r).includes(i)}o(h9,"Has");function g9(e,t){if(t==="")return e;let r=e;for(let n of ia(t)){if(r[n]===void 0)return;r=r[n]}return r}o(g9,"Get");c();function I9(e,t){if(!pe(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>qo(e[i],t[i]))}o(I9,"ObjectType");function x9(e,t){return Qt(t)&&e.getTime()===t.getTime()}o(x9,"DateType");function b9(e,t){return!ue(t)||e.length!==t.length?!1:e.every((r,n)=>qo(r,t[n]))}o(b9,"ArrayType");function $9(e,t){return!Or(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>qo(r,t[n]))}o($9,"TypedArrayType");function w9(e,t){return e===t}o(w9,"ValueType");function qo(e,t){if(Qt(e))return x9(e,t);if(Or(e))return $9(e,t);if(ue(e))return b9(e,t);if(pe(e))return I9(e,t);if(Rt(e))return w9(e,t);throw new Error("ValueEquals: Unable to compare value")}o(qo,"Equal");var P9=Ye({type:De("insert"),path:Sr(),value:qn()}),O9=Ye({type:De("update"),path:Sr(),value:qn()}),F9=Ye({type:De("delete"),path:Sr()}),vS=Ve([P9,O9,F9]),sy=class sy extends ne{constructor(t,r){super(r),this.value=t}};o(sy,"ValueDiffError");var Of=sy;function Ff(e,t){return{type:"update",path:e,value:t}}o(Ff,"CreateUpdate");function AS(e,t){return{type:"insert",path:e,value:t}}o(AS,"CreateInsert");function jS(e){return{type:"delete",path:e}}o(jS,"CreateDelete");function TS(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new Of(e,"Cannot diff objects with symbols")}o(TS,"AssertDiffable");function*S9(e,t,r){if(TS(t),TS(r),!Sd(r))return yield Ff(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let s of i)oe(t,s)||(yield AS("".concat(e,"/").concat(s),r[s]));for(let s of n)oe(r,s)&&(qo(t,r)||(yield*C(Sf("".concat(e,"/").concat(s),t[s],r[s]))));for(let s of n)oe(r,s)||(yield jS("".concat(e,"/").concat(s)))}o(S9,"ObjectType");function*E9(e,t,r){if(!ue(r))return yield Ff(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*C(Sf("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield AS("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield jS("".concat(e,"/").concat(n)))}o(E9,"ArrayType");function*T9(e,t,r){if(!Or(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield Ff(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*C(Sf("".concat(e,"/").concat(n),t[n],r[n]))}o(T9,"TypedArrayType");function*v9(e,t,r){t!==r&&(yield Ff(e,r))}o(v9,"ValueType");function*Sf(e,t,r){if(Sd(t))return yield*C(S9(e,t,r));if(ue(t))return yield*C(E9(e,t,r));if(Or(t))return yield*C(T9(e,t,r));if(Rt(t))return yield*C(v9(e,t,r));throw new Of(t,"Unable to diff value")}o(Sf,"Visit");function kS(e,t){return[...Sf("",e,t)]}o(kS,"Diff");function A9(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(A9,"IsRootUpdate");function j9(e){return e.length===0}o(j9,"IsIdentity");function _S(e,t){if(A9(t))return Re(t[0].value);if(j9(t))return Re(e);let r=Re(e);for(let n of t)switch(n.type){case"insert":{Rr.Set(r,n.path,n.value);break}case"update":{Rr.Set(r,n.path,n.value);break}case"delete":{Rr.Delete(r,n.path);break}}return r}o(_S,"Patch");c();function NS(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=xn(t,r)?bf(t,r,n):n;if(!he(t,r,i))throw new Ki(t,i,mn(t,r,i).First());return i}o(NS,"Encode");c();var cy=class cy extends ne{constructor(t){super(t)}};o(cy,"ValueMutateError");var Ef=cy;function k9(e,t,r,n){if(!pe(r))Rr.Set(e,t,Re(n));else{let i=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let a of i)s.includes(a)||delete r[a];for(let a of s)i.includes(a)||(r[a]=null);for(let a of s)ay(e,"".concat(t,"/").concat(a),r[a],n[a])}}o(k9,"ObjectType");function _9(e,t,r,n){if(!ue(r))Rr.Set(e,t,Re(n));else{for(let i=0;i<n.length;i++)ay(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(_9,"ArrayType");function N9(e,t,r,n){if(Or(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else Rr.Set(e,t,Re(n))}o(N9,"TypedArrayType");function R9(e,t,r,n){r!==n&&Rr.Set(e,t,n)}o(R9,"ValueType");function ay(e,t,r,n){if(ue(n))return _9(e,t,r,n);if(Or(n))return N9(e,t,r,n);if(pe(n))return k9(e,t,r,n);if(Rt(n))return R9(e,t,r,n)}o(ay,"Visit");function RS(e){return Or(e)||Rt(e)}o(RS,"IsNonMutableValue");function C9(e,t){return pe(e)&&ue(t)||ue(e)&&pe(t)}o(C9,"IsMismatchedValue");function CS(e,t){if(RS(e)||RS(t))throw new Ef("Only object and array types can be mutated at the root level");if(C9(e,t))throw new Ef("Cannot assign due type mismatch of assignable values");ay(e,"",e,t)}o(CS,"Mutate");c();var M9=[(e,t,r)=>Re(r),(e,t,r)=>$f(e,t,r),(e,t,r)=>gf(e,t,r),(e,t,r)=>xf(e,t,r),(e,t,r)=>(yf(e,t,r),r),(e,t,r)=>xn(e,t)?qi(e,t,r):r];function MS(e,t,r){return M9.reduce((n,i)=>i(e,t,n),r)}o(MS,"ParseValue");function LS(...e){return e.length===3?MS(e[0],e[1],e[2]):MS(e[0],[],e[1])}o(LS,"Parse");c();var Vn={};go(Vn,{Assert:()=>yf,Cast:()=>Jm,Check:()=>he,Clean:()=>gf,Clone:()=>Re,Convert:()=>xf,Create:()=>Nr,Decode:()=>SS,Default:()=>$f,Diff:()=>kS,Edit:()=>vS,Encode:()=>NS,Equal:()=>qo,Errors:()=>mn,Hash:()=>yo,Mutate:()=>CS,Parse:()=>LS,Patch:()=>_S,ValueErrorIterator:()=>_r});c();c();var uy=class uy extends ne{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));H(this,"schema");this.schema=r}};o(uy,"TypeDereferenceError");var fy=uy;function L9(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new fy(e);return Ko(r,t)}o(L9,"Resolve");function Tf(e,t){return!Pe.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(Tf,"Pushref");function Ko(e,t){return e[E]==="This"||e[E]==="Ref"?L9(e,t):e}o(Ko,"Deref");c();function U9(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=xn(t,r);return e.set(t,i),i}o(U9,"HasTransformCached");function vf(){let e=new WeakMap;return{HasTransform:o((t,r)=>U9(e,t,r),"HasTransform")}}o(vf,"CreateTransformCache");function dt(e,t,r){try{return x.IsTransform(e)?e[st].Decode(r):r}catch(n){throw new Uo(e,t,r,n)}}o(dt,"Default");function D9(e,t,r,n,i){return Pe.IsArray(n)?dt(e,r,n.map((s,a)=>bn(e.items,t,"".concat(r,"/").concat(a),s,i))):dt(e,r,n)}o(D9,"FromArray");function q9(e,t,r,n,i){if(!Pe.IsObject(n)||Rt(n))return dt(e,r,n);let s=po(e),a=s.map(m=>m[0]),f=S({},n);for(let[m,g]of s)m in f&&(f[m]=bn(g,t,"".concat(r,"/").concat(m),f[m],i));if(!x.IsTransform(e.unevaluatedProperties))return dt(e,r,f);let p=Object.getOwnPropertyNames(f),d=e.unevaluatedProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=dt(d,"".concat(r,"/").concat(m),l[m]));return dt(e,r,l)}o(q9,"FromIntersect");function K9(e,t,r,n,i){return dt(e,r,bn(e.not,t,r,n,i))}o(K9,"FromNot");function z9(e,t,r,n,i){if(!Pe.IsObject(n))return dt(e,r,n);let s=At(e),a=S({},n);for(let l of s)Pe.HasPropertyKey(a,l)&&(Pe.IsUndefined(a[l])&&(!x.IsUndefined(e.properties[l])||ze.IsExactOptionalProperty(a,l))||(a[l]=bn(e.properties[l],t,"".concat(r,"/").concat(l),a[l],i)));if(!x.IsSchema(e.additionalProperties))return dt(e,r,a);let f=Object.getOwnPropertyNames(a),p=e.additionalProperties,d=S({},a);for(let l of f)s.includes(l)||(d[l]=dt(p,"".concat(r,"/").concat(l),d[l]));return dt(e,r,d)}o(z9,"FromObject");function G9(e,t,r,n,i){if(!Pe.IsObject(n))return dt(e,r,n);let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),f=S({},n);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(f[m]=bn(e.patternProperties[s],t,"".concat(r,"/").concat(m),f[m],i));if(!x.IsSchema(e.additionalProperties))return dt(e,r,f);let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.test(m)||(l[m]=dt(d,"".concat(r,"/").concat(m),l[m]));return dt(e,r,l)}o(G9,"FromRecord");function B9(e,t,r,n,i){let s=Ko(e,t);return dt(e,r,bn(s,t,r,n,i))}o(B9,"FromRef");function V9(e,t,r,n,i){let s=Ko(e,t);return dt(e,r,bn(s,t,r,n,i))}o(V9,"FromThis");function W9(e,t,r,n,i){return Pe.IsArray(n)&&Pe.IsArray(e.items)?dt(e,r,e.items.map((s,a)=>bn(s,t,"".concat(r,"/").concat(a),n[a],i))):dt(e,r,n)}o(W9,"FromTuple");function H9(e,t,r,n,i){for(let s of e.anyOf){if(!Vn.Check(s,t,n))continue;let a=bn(s,t,r,n,i);return dt(e,r,a)}return dt(e,r,n)}o(H9,"FromUnion");function bn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=Tf(e,t),a=e;switch(e[E]){case"Array":return D9(a,s,r,n,i);case"Intersect":return q9(a,s,r,n,i);case"Not":return K9(a,s,r,n,i);case"Object":return z9(a,s,r,n,i);case"Record":return G9(a,s,r,n,i);case"Ref":return B9(a,s,r,n,i);case"Symbol":return dt(a,r,n);case"This":return V9(a,s,r,n,i);case"Tuple":return W9(a,s,r,n,i);case"Union":return H9(a,s,r,n,i);default:return dt(a,r,n)}}o(bn,"Visit");function US(e,t,r){let n=vf();return bn(e,t,"",r,n)}o(US,"FastTransformDecode");c();function Zt(e,t,r){try{return x.IsTransform(e)?e[st].Encode(r):r}catch(n){throw new Do(e,t,r,n)}}o(Zt,"Default");function Z9(e,t,r,n,i){let s=Zt(e,r,n);return Pe.IsArray(s)?s.map((a,f)=>$n(e.items,t,"".concat(r,"/").concat(f),a,i)):s}o(Z9,"FromArray");function J9(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(n)||Rt(n))return s;let a=po(e),f=a.map(g=>g[0]),p=S({},s);for(let[g,b]of a)g in p&&(p[g]=$n(b,t,"".concat(r,"/").concat(g),p[g],i));if(!x.IsTransform(e.unevaluatedProperties))return p;let d=Object.getOwnPropertyNames(p),l=e.unevaluatedProperties,m=S({},p);for(let g of d)f.includes(g)||(m[g]=Zt(l,"".concat(r,"/").concat(g),m[g]));return m}o(J9,"FromIntersect");function Y9(e,t,r,n){return Zt(e.not,r,Zt(e,r,n))}o(Y9,"FromNot");function X9(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(s))return s;let a=At(e),f=S({},s);for(let m of a)Pe.HasPropertyKey(f,m)&&(Pe.IsUndefined(f[m])&&(!x.IsUndefined(e.properties[m])||ze.IsExactOptionalProperty(f,m))||(f[m]=$n(e.properties[m],t,"".concat(r,"/").concat(m),f[m],i)));if(!x.IsSchema(e.additionalProperties))return f;let p=Object.getOwnPropertyNames(f),d=e.additionalProperties,l=S({},f);for(let m of p)a.includes(m)||(l[m]=Zt(d,"".concat(r,"/").concat(m),l[m]));return l}o(X9,"FromObject");function Q9(e,t,r,n,i){let s=Zt(e,r,n);if(!Pe.IsObject(n))return s;let a=Object.getOwnPropertyNames(e.patternProperties)[0],f=new RegExp(a),p=S({},s);for(let g of Object.getOwnPropertyNames(n))f.test(g)&&(p[g]=$n(e.patternProperties[a],t,"".concat(r,"/").concat(g),p[g],i));if(!x.IsSchema(e.additionalProperties))return p;let d=Object.getOwnPropertyNames(p),l=e.additionalProperties,m=S({},p);for(let g of d)f.test(g)||(m[g]=Zt(l,"".concat(r,"/").concat(g),m[g]));return m}o(Q9,"FromRecord");function eK(e,t,r,n,i){let s=Ko(e,t),a=$n(s,t,r,n,i);return Zt(e,r,a)}o(eK,"FromRef");function tK(e,t,r,n,i){let s=Ko(e,t),a=$n(s,t,r,n,i);return Zt(e,r,a)}o(tK,"FromThis");function rK(e,t,r,n,i){let s=Zt(e,r,n);return Pe.IsArray(e.items)?e.items.map((a,f)=>$n(a,t,"".concat(r,"/").concat(f),s[f],i)):[]}o(rK,"FromTuple");function nK(e,t,r,n,i){for(let s of e.anyOf){if(!Vn.Check(s,t,n))continue;let a=$n(s,t,r,n,i);return Zt(e,r,a)}for(let s of e.anyOf){let a=$n(s,t,r,n,i);if(Vn.Check(e,t,a))return Zt(e,r,a)}return Zt(e,r,n)}o(nK,"FromUnion");function $n(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let s=Tf(e,t),a=e;switch(e[E]){case"Array":return Z9(a,s,r,n,i);case"Intersect":return J9(a,s,r,n,i);case"Not":return Y9(a,s,r,n);case"Object":return X9(a,s,r,n,i);case"Record":return Q9(a,s,r,n,i);case"Ref":return eK(a,s,r,n,i);case"This":return tK(a,s,r,n,i);case"Tuple":return rK(a,s,r,n,i);case"Union":return nK(a,s,r,n,i);default:return Zt(a,r,n)}}o($n,"Visit");function DS(e,t,r){let n=vf();return $n(e,t,"",r,n)}o(DS,"FastTransformEncode");c();var yy=class yy{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=xn(t,r)}Code(){return this.code}Errors(t){return mn(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new Di(this.schema,t,this.Errors(t).First());return this.hasTransform?qi(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?bf(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Ki(this.schema,t,this.Errors(t).First());return r}};o(yy,"TypeCheck");var py=yy,Wn;(function(e){function t(s){return s===36}o(t,"DollarSign"),e.DollarSign=t;function r(s){return s===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(s){return s>=48&&s<=57}o(i,"IsNumeric"),e.IsNumeric=i})(Wn||(Wn={}));var Af;(function(e){function t(s){return s.length===0?!1:Wn.IsNumeric(s.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(s){if(t(s))return!1;for(let a=0;a<s.length;a++){let f=s.charCodeAt(a);if(!(Wn.IsAlpha(f)||Wn.IsNumeric(f)||Wn.DollarSign(f)||Wn.IsUnderscore(f)))return!1}return!0}o(r,"IsAccessor");function n(s){return s.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(s,a){return r(a)?"".concat(s,".").concat(a):"".concat(s,"['").concat(n(a),"']")}o(i,"Encode"),e.Encode=i})(Af||(Af={}));var ly;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let s=r.charCodeAt(i);Wn.IsNumeric(s)||Wn.IsAlpha(s)?n.push(r.charAt(i)):n.push("_".concat(s,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(ly||(ly={}));var dy;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(dy||(dy={}));var hy=class hy extends ne{constructor(t){super("Unknown type"),this.schema=t}};o(hy,"TypeCompilerUnknownTypeError");var my=hy,gy=class gy extends ne{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(gy,"TypeCompilerTypeGuardError");var jf=gy,zo;(function(e){function t(a,f,p){return ze.ExactOptionalPropertyTypes?"('".concat(f,"' in ").concat(a," ? ").concat(p," : true)"):"(".concat(Af.Encode(a,f)," !== undefined ? ").concat(p," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(a){return ze.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(a){return ze.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(a){return ze.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function s(a){return ze.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}o(s,"IsVoidLike"),e.IsVoidLike=s})(zo||(zo={}));var kf;(function(e){function t(I){return I[E]==="Any"||I[E]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(I,_,$){yield"true"}o(r,"FromAny");function*n(I,_,$){yield"Array.isArray(".concat($,")");let[K,L]=[ht("value","any"),ht("acc","number")];re(I.maxItems)&&(yield"".concat($,".length <= ").concat(I.maxItems)),re(I.minItems)&&(yield"".concat($,".length >= ").concat(I.minItems));let q=xt(I.items,_,"value");if(yield"".concat($,".every((").concat(K,") => ").concat(q,")"),Fe(I.contains)||re(I.minContains)||re(I.maxContains)){let ie=Fe(I.contains)?I.contains:Be(),Jt=xt(ie,_,"value"),Fn=re(I.minContains)?["(count >= ".concat(I.minContains,")")]:[],Ur=re(I.maxContains)?["(count <= ".concat(I.maxContains,")")]:[],tn="const count = value.reduce((".concat(L,", ").concat(K,") => ").concat(Jt," ? acc + 1 : acc, 0)"),da=["(count > 0)",...Fn,...Ur].join(" && ");yield"((".concat(K,") => { ").concat(tn,"; return ").concat(da,"})(").concat($,")")}if(I.uniqueItems===!0){let Jt="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(K,") => { ").concat(Jt," )(").concat($,")")}}o(n,"FromArray");function*i(I,_,$){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat($,")")}o(i,"FromAsyncIterator");function*s(I,_,$){yield"(typeof ".concat($," === 'bigint')"),Nt(I.exclusiveMaximum)&&(yield"".concat($," < BigInt(").concat(I.exclusiveMaximum,")")),Nt(I.exclusiveMinimum)&&(yield"".concat($," > BigInt(").concat(I.exclusiveMinimum,")")),Nt(I.maximum)&&(yield"".concat($," <= BigInt(").concat(I.maximum,")")),Nt(I.minimum)&&(yield"".concat($," >= BigInt(").concat(I.minimum,")")),Nt(I.multipleOf)&&(yield"(".concat($," % BigInt(").concat(I.multipleOf,")) === 0"))}o(s,"FromBigInt");function*a(I,_,$){yield"(typeof ".concat($," === 'boolean')")}o(a,"FromBoolean");function*f(I,_,$){yield*C(ft(I.returns,_,"".concat($,".prototype")))}o(f,"FromConstructor");function*p(I,_,$){yield"(".concat($," instanceof Date) && Number.isFinite(").concat($,".getTime())"),re(I.exclusiveMaximumTimestamp)&&(yield"".concat($,".getTime() < ").concat(I.exclusiveMaximumTimestamp)),re(I.exclusiveMinimumTimestamp)&&(yield"".concat($,".getTime() > ").concat(I.exclusiveMinimumTimestamp)),re(I.maximumTimestamp)&&(yield"".concat($,".getTime() <= ").concat(I.maximumTimestamp)),re(I.minimumTimestamp)&&(yield"".concat($,".getTime() >= ").concat(I.minimumTimestamp)),re(I.multipleOfTimestamp)&&(yield"(".concat($,".getTime() % ").concat(I.multipleOfTimestamp,") === 0"))}o(p,"FromDate");function*d(I,_,$){yield"(typeof ".concat($," === 'function')")}o(d,"FromFunction");function*l(I,_,$){yield"Number.isInteger(".concat($,")"),re(I.exclusiveMaximum)&&(yield"".concat($," < ").concat(I.exclusiveMaximum)),re(I.exclusiveMinimum)&&(yield"".concat($," > ").concat(I.exclusiveMinimum)),re(I.maximum)&&(yield"".concat($," <= ").concat(I.maximum)),re(I.minimum)&&(yield"".concat($," >= ").concat(I.minimum)),re(I.multipleOf)&&(yield"(".concat($," % ").concat(I.multipleOf,") === 0"))}o(l,"FromInteger");function*m(I,_,$){let K=I.allOf.map(L=>xt(L,_,$)).join(" && ");if(I.unevaluatedProperties===!1){let L=Ft("".concat(new RegExp(Dn(I)),";")),q="Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".test(key))");yield"(".concat(K," && ").concat(q,")")}else if(Fe(I.unevaluatedProperties)){let L=Ft("".concat(new RegExp(Dn(I)),";")),q="Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".test(key) || ").concat(xt(I.unevaluatedProperties,_,"".concat($,"[key]")),")");yield"(".concat(K," && ").concat(q,")")}else yield"(".concat(K,")")}o(m,"FromIntersect");function*g(I,_,$){yield"(typeof value === 'object' && Symbol.iterator in ".concat($,")")}o(g,"FromIterator");function*b(I,_,$){typeof I.const=="number"||typeof I.const=="boolean"?yield"(".concat($," === ").concat(I.const,")"):yield"(".concat($," === '").concat(dy.Escape(I.const),"')")}o(b,"FromLiteral");function*P(I,_,$){yield"false"}o(P,"FromNever");function*F(I,_,$){let K=xt(I.not,_,$);yield"(!".concat(K,")")}o(F,"FromNot");function*w(I,_,$){yield"(".concat($," === null)")}o(w,"FromNull");function*O(I,_,$){yield zo.IsNumberLike($),re(I.exclusiveMaximum)&&(yield"".concat($," < ").concat(I.exclusiveMaximum)),re(I.exclusiveMinimum)&&(yield"".concat($," > ").concat(I.exclusiveMinimum)),re(I.maximum)&&(yield"".concat($," <= ").concat(I.maximum)),re(I.minimum)&&(yield"".concat($," >= ").concat(I.minimum)),re(I.multipleOf)&&(yield"(".concat($," % ").concat(I.multipleOf,") === 0"))}o(O,"FromNumber");function*N(I,_,$){yield zo.IsObjectLike($),re(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length >= ").concat(I.minProperties)),re(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length <= ").concat(I.maxProperties));let K=Object.getOwnPropertyNames(I.properties);for(let L of K){let q=Af.Encode($,L),ie=I.properties[L];if(I.required&&I.required.includes(L))yield*C(ft(ie,_,q)),(Kn(ie)||t(ie))&&(yield"('".concat(L,"' in ").concat($,")"));else{let Jt=xt(ie,_,q);yield zo.IsExactOptionalProperty($,L,Jt)}}if(I.additionalProperties===!1)if(I.required&&I.required.length===K.length)yield"Object.getOwnPropertyNames(".concat($,").length === ").concat(K.length);else{let L="[".concat(K.map(q=>"'".concat(q,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat($,").every(key => ").concat(L,".includes(key))")}if(typeof I.additionalProperties=="object"){let L=xt(I.additionalProperties,_,"".concat($,"[key]")),q="[".concat(K.map(ie=>"'".concat(ie,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat($,").every(key => ").concat(q,".includes(key) || ").concat(L,"))")}}o(N,"FromObject");function*A(I,_,$){yield"(typeof value === 'object' && typeof ".concat($,".then === 'function')")}o(A,"FromPromise");function*k(I,_,$){yield zo.IsRecordLike($),re(I.minProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length >= ").concat(I.minProperties)),re(I.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat($,").length <= ").concat(I.maxProperties));let[K,L]=Object.entries(I.patternProperties)[0],q=Ft("".concat(new RegExp(K))),ie=xt(L,_,"value"),Jt=Fe(I.additionalProperties)?xt(I.additionalProperties,_,$):I.additionalProperties===!1?"false":"true",Fn="(".concat(q,".test(key) ? ").concat(ie," : ").concat(Jt,")");yield"(Object.entries(".concat($,").every(([key, value]) => ").concat(Fn,"))")}o(k,"FromRecord");function*R(I,_,$){let K=Ne(I,_);if(xe.functions.has(I.$ref))return yield"".concat(bt(I.$ref),"(").concat($,")");yield*C(ft(K,_,$))}o(R,"FromRef");function*V(I,_,$){let K=Ft("".concat(new RegExp(I.source,I.flags),";"));yield"(typeof ".concat($," === 'string')"),re(I.maxLength)&&(yield"".concat($,".length <= ").concat(I.maxLength)),re(I.minLength)&&(yield"".concat($,".length >= ").concat(I.minLength)),yield"".concat(K,".test(").concat($,")")}o(V,"FromRegExp");function*J(I,_,$){if(yield"(typeof ".concat($," === 'string')"),re(I.maxLength)&&(yield"".concat($,".length <= ").concat(I.maxLength)),re(I.minLength)&&(yield"".concat($,".length >= ").concat(I.minLength)),I.pattern!==void 0){let K=Ft("".concat(new RegExp(I.pattern),";"));yield"".concat(K,".test(").concat($,")")}I.format!==void 0&&(yield"format('".concat(I.format,"', ").concat($,")"))}o(J,"FromString");function*D(I,_,$){yield"(typeof ".concat($," === 'symbol')")}o(D,"FromSymbol");function*U(I,_,$){yield"(typeof ".concat($," === 'string')");let K=Ft("".concat(new RegExp(I.pattern),";"));yield"".concat(K,".test(").concat($,")")}o(U,"FromTemplateLiteral");function*ae(I,_,$){yield"".concat(bt(I.$ref),"(").concat($,")")}o(ae,"FromThis");function*se(I,_,$){if(yield"Array.isArray(".concat($,")"),I.items===void 0)return yield"".concat($,".length === 0");yield"(".concat($,".length === ").concat(I.maxItems,")");for(let K=0;K<I.items.length;K++){let L=xt(I.items[K],_,"".concat($,"[").concat(K,"]"));yield"".concat(L)}}o(se,"FromTuple");function*M(I,_,$){yield"".concat($," === undefined")}o(M,"FromUndefined");function*le(I,_,$){let K=I.anyOf.map(L=>xt(L,_,$));yield"(".concat(K.join(" || "),")")}o(le,"FromUnion");function*ce(I,_,$){yield"".concat($," instanceof Uint8Array"),re(I.maxByteLength)&&(yield"(".concat($,".length <= ").concat(I.maxByteLength,")")),re(I.minByteLength)&&(yield"(".concat($,".length >= ").concat(I.minByteLength,")"))}o(ce,"FromUint8Array");function*Te(I,_,$){yield"true"}o(Te,"FromUnknown");function*Ie(I,_,$){yield zo.IsVoidLike($)}o(Ie,"FromVoid");function*Ke(I,_,$){let K=xe.instances.size;xe.instances.set(K,I),yield"kind('".concat(I[E],"', ").concat(K,", ").concat($,")")}o(Ke,"FromKind");function*ft(I,_,$,K=!0){let L=Oe(I.$id)?[..._,I]:_,q=I;if(K&&Oe(I.$id)){let ie=bt(I.$id);if(xe.functions.has(ie))return yield"".concat(ie,"(").concat($,")");{let Jt=St(ie,I,_,"value",!1);return xe.functions.set(ie,Jt),yield"".concat(ie,"(").concat($,")")}}switch(q[E]){case"Any":return yield*C(r(q,L,$));case"Array":return yield*C(n(q,L,$));case"AsyncIterator":return yield*C(i(q,L,$));case"BigInt":return yield*C(s(q,L,$));case"Boolean":return yield*C(a(q,L,$));case"Constructor":return yield*C(f(q,L,$));case"Date":return yield*C(p(q,L,$));case"Function":return yield*C(d(q,L,$));case"Integer":return yield*C(l(q,L,$));case"Intersect":return yield*C(m(q,L,$));case"Iterator":return yield*C(g(q,L,$));case"Literal":return yield*C(b(q,L,$));case"Never":return yield*C(P(q,L,$));case"Not":return yield*C(F(q,L,$));case"Null":return yield*C(w(q,L,$));case"Number":return yield*C(O(q,L,$));case"Object":return yield*C(N(q,L,$));case"Promise":return yield*C(A(q,L,$));case"Record":return yield*C(k(q,L,$));case"Ref":return yield*C(R(q,L,$));case"RegExp":return yield*C(V(q,L,$));case"String":return yield*C(J(q,L,$));case"Symbol":return yield*C(D(q,L,$));case"TemplateLiteral":return yield*C(U(q,L,$));case"This":return yield*C(ae(q,L,$));case"Tuple":return yield*C(se(q,L,$));case"Undefined":return yield*C(M(q,L,$));case"Union":return yield*C(le(q,L,$));case"Uint8Array":return yield*C(ce(q,L,$));case"Unknown":return yield*C(Te(q,L,$));case"Void":return yield*C(Ie(q,L,$));default:if(!Tt.Has(q[E]))throw new my(I);return yield*C(Ke(q,L,$))}}o(ft,"Visit");let xe={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function xt(I,_,$,K=!0){return"(".concat([...ft(I,_,$,K)].join(" && "),")")}o(xt,"CreateExpression");function bt(I){return"check_".concat(ly.Encode(I))}o(bt,"CreateFunctionName");function Ft(I){let _="local_".concat(xe.variables.size);return xe.variables.set(_,"const ".concat(_," = ").concat(I)),_}o(Ft,"CreateVariable");function St(I,_,$,K,L=!0){let[q,ie]=["\n",tn=>"".padStart(tn," ")],Jt=ht("value","any"),Fn=X("boolean"),Ur=[...ft(_,$,K,L)].map(tn=>"".concat(ie(4)).concat(tn)).join(" &&".concat(q));return"function ".concat(I,"(").concat(Jt,")").concat(Fn," {").concat(q).concat(ie(2),"return (").concat(q).concat(Ur).concat(q).concat(ie(2),")\n}")}o(St,"CreateFunction");function ht(I,_){let $=xe.language==="typescript"?": ".concat(_):"";return"".concat(I).concat($)}o(ht,"CreateParameter");function X(I){return xe.language==="typescript"?": ".concat(I):""}o(X,"CreateReturns");function ee(I,_,$){let K=St("check",I,_,"value"),L=ht("value","any"),q=X("boolean"),ie=[...xe.functions.values()],Jt=[...xe.variables.values()],Fn=Oe(I.$id)?"return function check(".concat(L,")").concat(q," {\n return ").concat(bt(I.$id),"(value)\n}"):"return ".concat(K);return[...Jt,...ie,Fn].join("\n")}o(ee,"Build");function Z(...I){let _={language:"javascript"},[$,K,L]=I.length===2&&ue(I[1])?[I[0],I[1],_]:I.length===2&&!ue(I[1])?[I[0],[],I[1]]:I.length===3?[I[0],I[1],I[2]]:I.length===1?[I[0],[],_]:[null,[],_];if(xe.language=L.language,xe.variables.clear(),xe.functions.clear(),xe.instances.clear(),!Fe($))throw new jf($);for(let q of K)if(!Fe(q))throw new jf(q);return ee($,K,L)}o(Z,"Code"),e.Code=Z;function te(I,_=[]){let $=Z(I,_,{language:"javascript"}),K=globalThis.Function("kind","format","hash",$),L=new Map(xe.instances);function q(Ur,tn,da){if(!Tt.Has(Ur)||!L.has(tn))return!1;let E1=Tt.Get(Ur),T1=L.get(tn);return E1(T1,da)}o(q,"typeRegistryFunction");function ie(Ur,tn){return tr.Has(Ur)?tr.Get(Ur)(tn):!1}o(ie,"formatRegistryFunction");function Jt(Ur){return yo(Ur)}o(Jt,"hashFunction");let Fn=K(q,ie,Jt);return new py(I,_,Fn,$)}o(te,"Compile"),e.Compile=te})(kf||(kf={}));c();c();var qS={},oK=o(function(e,t,r,n,i){var s=new Worker(qS[t]||(qS[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var f=a.data,p=f.$e$;if(p){var d=new Error(p[0]);d.code=p[1],d.stack=p[2],i(d,null)}else i(null,f)},s.postMessage(r,n),s},"wk"),rt=Uint8Array,nr=Uint16Array,ca=Int32Array,Vi=new rt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Wi=new rt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),sa=new rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),BS=o(function(e,t){for(var r=new nr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ca(r[30]),n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},"freb"),VS=BS(Vi,2),Oy=VS.b,Mf=VS.r;Oy[28]=258,Mf[258]=28;var WS=BS(Wi,0),HS=WS.b,xy=WS.r,aa=new nr(32768);for(qe=0;qe<32768;++qe)Hn=(qe&43690)>>1|(qe&21845)<<1,Hn=(Hn&52428)>>2|(Hn&13107)<<2,Hn=(Hn&61680)>>4|(Hn&3855)<<4,aa[qe]=((Hn&65280)>>8|(Hn&255)<<8)>>1;var Hn,qe,Mr=o(function(e,t,r){for(var n=e.length,i=0,s=new nr(t);i<n;++i)e[i]&&++s[e[i]-1];var a=new nr(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;var f;if(r){f=new nr(1<<t);var p=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],l=t-e[i],m=a[e[i]-1]++<<l,g=m|(1<<l)-1;m<=g;++m)f[aa[m]>>p]=d}else for(f=new nr(n),i=0;i<n;++i)e[i]&&(f[i]=aa[a[e[i]-1]++]>>15-e[i]);return f},"hMap"),Zn=new rt(288);for(qe=0;qe<144;++qe)Zn[qe]=8;var qe;for(qe=144;qe<256;++qe)Zn[qe]=9;var qe;for(qe=256;qe<280;++qe)Zn[qe]=7;var qe;for(qe=280;qe<288;++qe)Zn[qe]=8;var qe,Bi=new rt(32);for(qe=0;qe<32;++qe)Bi[qe]=5;var qe,ZS=Mr(Zn,9,0),JS=Mr(Zn,9,1),YS=Mr(Bi,5,0),XS=Mr(Bi,5,1),Nf=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),Cr=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Rf=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),fa=o(function(e){return(e+7)/8|0},"shft"),Go=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new rt(e.subarray(t,r))},"slc"),qf={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},QS=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ot=o(function(e,t,r){var n=new Error(t||QS[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Ot),!r)throw n;return n},"err"),eE=o(function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new rt(0);var a=!r,f=a||t.i!=2,p=t.i;a&&(r=new rt(i*3));var d=o(function($){var K=r.length;if($>K){var L=new rt(Math.max(K*2,$));L.set(r),r=L}},"cbuf"),l=t.f||0,m=t.p||0,g=t.b||0,b=t.l,P=t.d,F=t.m,w=t.n,O=i*8;do{if(!b){l=Cr(e,m,1);var N=Cr(e,m+1,3);if(m+=3,N)if(N==1)b=JS,P=XS,F=9,w=5;else if(N==2){var V=Cr(e,m,31)+257,J=Cr(e,m+10,15)+4,D=V+Cr(e,m+5,31)+1;m+=14;for(var U=new rt(D),ae=new rt(19),se=0;se<J;++se)ae[sa[se]]=Cr(e,m+se*3,7);m+=J*3;for(var M=Nf(ae),le=(1<<M)-1,ce=Mr(ae,M,1),se=0;se<D;){var Te=ce[Cr(e,m,le)];m+=Te&15;var A=Te>>4;if(A<16)U[se++]=A;else{var Ie=0,Ke=0;for(A==16?(Ke=3+Cr(e,m,3),m+=2,Ie=U[se-1]):A==17?(Ke=3+Cr(e,m,7),m+=3):A==18&&(Ke=11+Cr(e,m,127),m+=7);Ke--;)U[se++]=Ie}}var ft=U.subarray(0,V),xe=U.subarray(V);F=Nf(ft),w=Nf(xe),b=Mr(ft,F,1),P=Mr(xe,w,1)}else Ot(1);else{var A=fa(m)+4,k=e[A-4]|e[A-3]<<8,R=A+k;if(R>i){p&&Ot(0);break}f&&d(g+k),r.set(e.subarray(A,R),g),t.b=g+=k,t.p=m=R*8,t.f=l;continue}if(m>O){p&&Ot(0);break}}f&&d(g+131072);for(var xt=(1<<F)-1,bt=(1<<w)-1,Ft=m;;Ft=m){var Ie=b[Rf(e,m)&xt],St=Ie>>4;if(m+=Ie&15,m>O){p&&Ot(0);break}if(Ie||Ot(2),St<256)r[g++]=St;else if(St==256){Ft=m,b=null;break}else{var ht=St-254;if(St>264){var se=St-257,X=Vi[se];ht=Cr(e,m,(1<<X)-1)+Oy[se],m+=X}var ee=P[Rf(e,m)&bt],Z=ee>>4;ee||Ot(3),m+=ee&15;var xe=HS[Z];if(Z>3){var X=Wi[Z];xe+=Rf(e,m)&(1<<X)-1,m+=X}if(m>O){p&&Ot(0);break}f&&d(g+131072);var te=g+ht;if(g<xe){var I=s-xe,_=Math.min(xe,te);for(I+g<0&&Ot(3);g<_;++g)r[g]=n[I+g]}for(;g<te;++g)r[g]=r[g-xe]}}t.l=b,t.p=Ft,t.b=g,t.f=l,b&&(l=1,t.m=F,t.d=P,t.n=w)}while(!l);return g!=r.length&&a?Go(r,0,g):r.subarray(0,g)},"inflt"),wn=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),zi=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),Cf=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:Sy,l:0};if(i==1){var a=new rt(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(R,V){return R.f-V.f}),r.push({s:-1,f:25001});var f=r[0],p=r[1],d=0,l=1,m=2;for(r[0]={s:-1,f:f.f+p.f,l:f,r:p};l!=i-1;)f=r[r[d].f<r[m].f?d++:m++],p=r[d!=l&&r[d].f<r[m].f?d++:m++],r[l++]={s:-1,f:f.f+p.f,l:f,r:p};for(var g=s[0].s,n=1;n<i;++n)s[n].s>g&&(g=s[n].s);var b=new nr(g+1),P=Lf(r[l-1],b,0);if(P>t){var n=0,F=0,w=P-t,O=1<<w;for(s.sort(function(V,J){return b[J.s]-b[V.s]||V.f-J.f});n<i;++n){var N=s[n].s;if(b[N]>t)F+=O-(1<<P-b[N]),b[N]=t;else break}for(F>>=w;F>0;){var A=s[n].s;b[A]<t?F-=1<<t-b[A]++-1:++n}for(;n>=0&&F;--n){var k=s[n].s;b[k]==t&&(--b[k],++F)}P=t}return{t:new rt(b),l:P}},"hTree"),Lf=o(function(e,t,r){return e.s==-1?Math.max(Lf(e.l,t,r+1),Lf(e.r,t,r+1)):t[e.s]=r},"ln"),by=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new nr(++t),n=0,i=e[0],s=1,a=o(function(p){r[n++]=p},"w"),f=1;f<=t;++f)if(e[f]==i&&f!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[f]}return{c:r.subarray(0,n),n:t}},"lc"),Gi=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),Fy=o(function(e,t,r){var n=r.length,i=fa(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=r[s];return(i+4+n)*8},"wfblk"),$y=o(function(e,t,r,n,i,s,a,f,p,d,l){wn(t,l++,r),++i[256];for(var m=Cf(i,15),g=m.t,b=m.l,P=Cf(s,15),F=P.t,w=P.l,O=by(g),N=O.c,A=O.n,k=by(F),R=k.c,V=k.n,J=new nr(19),D=0;D<N.length;++D)++J[N[D]&31];for(var D=0;D<R.length;++D)++J[R[D]&31];for(var U=Cf(J,7),ae=U.t,se=U.l,M=19;M>4&&!ae[sa[M-1]];--M);var le=d+5<<3,ce=Gi(i,Zn)+Gi(s,Bi)+a,Te=Gi(i,g)+Gi(s,F)+a+14+3*M+Gi(J,ae)+2*J[16]+3*J[17]+7*J[18];if(p>=0&&le<=ce&&le<=Te)return Fy(t,l,e.subarray(p,p+d));var Ie,Ke,ft,xe;if(wn(t,l,1+(Te<ce)),l+=2,Te<ce){Ie=Mr(g,b,0),Ke=g,ft=Mr(F,w,0),xe=F;var xt=Mr(ae,se,0);wn(t,l,A-257),wn(t,l+5,V-1),wn(t,l+10,M-4),l+=14;for(var D=0;D<M;++D)wn(t,l+3*D,ae[sa[D]]);l+=3*M;for(var bt=[N,R],Ft=0;Ft<2;++Ft)for(var St=bt[Ft],D=0;D<St.length;++D){var ht=St[D]&31;wn(t,l,xt[ht]),l+=ae[ht],ht>15&&(wn(t,l,St[D]>>5&127),l+=St[D]>>12)}}else Ie=ZS,Ke=Zn,ft=YS,xe=Bi;for(var D=0;D<f;++D){var X=n[D];if(X>255){var ht=X>>18&31;zi(t,l,Ie[ht+257]),l+=Ke[ht+257],ht>7&&(wn(t,l,X>>23&31),l+=Vi[ht]);var ee=X&31;zi(t,l,ft[ee]),l+=xe[ee],ee>3&&(zi(t,l,X>>5&8191),l+=Wi[ee])}else zi(t,l,Ie[X]),l+=Ke[X]}return zi(t,l,Ie[256]),l+Ke[256]},"wblk"),tE=new ca([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sy=new rt(0),rE=o(function(e,t,r,n,i,s){var a=s.z||e.length,f=new rt(n+a+5*(1+Math.ceil(a/7e3))+i),p=f.subarray(n,f.length-i),d=s.l,l=(s.r||0)&7;if(t){l&&(p[0]=s.r>>3);for(var m=tE[t-1],g=m>>13,b=m&8191,P=(1<<r)-1,F=s.p||new nr(32768),w=s.h||new nr(P+1),O=Math.ceil(r/3),N=2*O,A=o(function(q){return(e[q]^e[q+1]<<O^e[q+2]<<N)&P},"hsh"),k=new ca(25e3),R=new nr(288),V=new nr(32),J=0,D=0,U=s.i||0,ae=0,se=s.w||0,M=0;U+2<a;++U){var le=A(U),ce=U&32767,Te=w[le];if(F[ce]=Te,w[le]=ce,se<=U){var Ie=a-U;if((J>7e3||ae>24576)&&(Ie>423||!d)){l=$y(e,p,0,k,R,V,D,ae,M,U-M,l),ae=J=D=0,M=U;for(var Ke=0;Ke<286;++Ke)R[Ke]=0;for(var Ke=0;Ke<30;++Ke)V[Ke]=0}var ft=2,xe=0,xt=b,bt=ce-Te&32767;if(Ie>2&&le==A(U-bt))for(var Ft=Math.min(g,Ie)-1,St=Math.min(32767,U),ht=Math.min(258,Ie);bt<=St&&--xt&&ce!=Te;){if(e[U+ft]==e[U+ft-bt]){for(var X=0;X<ht&&e[U+X]==e[U+X-bt];++X);if(X>ft){if(ft=X,xe=bt,X>Ft)break;for(var ee=Math.min(bt,X-2),Z=0,Ke=0;Ke<ee;++Ke){var te=U-bt+Ke&32767,I=F[te],_=te-I&32767;_>Z&&(Z=_,Te=te)}}}ce=Te,Te=F[ce],bt+=ce-Te&32767}if(xe){k[ae++]=268435456|Mf[ft]<<18|xy[xe];var $=Mf[ft]&31,K=xy[xe]&31;D+=Vi[$]+Wi[K],++R[257+$],++V[K],se=U+ft,++J}else k[ae++]=e[U],++R[e[U]]}}for(U=Math.max(U,se);U<a;++U)k[ae++]=e[U],++R[e[U]];l=$y(e,p,d,k,R,V,D,ae,M,U-M,l),d||(s.r=l&7|p[l/8|0]<<3,l-=7,s.h=w,s.p=F,s.i=U,s.w=se)}else{for(var U=s.w||0;U<a+d;U+=65535){var L=U+65535;L>=a&&(p[l/8|0]=d,L=a),l=Fy(p,l+1,e.subarray(U,L))}s.i=a}return Go(f,0,n+fa(l)+i)},"dflt"),iK=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),sK=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=iK[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var nE=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new rt(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return rE(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),Ey=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),KS=o(function(e,t,r){for(var n=e(),i=e.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var f=n[a],p=s[a];if(typeof f=="function"){t+=";"+p+"=";var d=f.toString();if(f.prototype)if(d.indexOf("[native code]")!=-1){var l=d.indexOf(" ",8)+1;t+=d.slice(l,d.indexOf("(",l))}else{t+=d;for(var m in f.prototype)t+=";"+p+".prototype."+m+"="+f.prototype[m].toString()}else t+=d}else r[p]=f}return t},"wcln"),_f=[],aK=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),cK=o(function(e,t,r,n){if(!_f[r]){for(var i="",s={},a=e.length-1,f=0;f<a;++f)i=KS(e[f],i,s);_f[r]={c:KS(e[a],i,s),e:s}}var p=Ey({},_f[r].e);return oK(_f[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,p,aK(p),n)},"wrkr"),fK=o(function(){return[rt,nr,ca,Vi,Wi,sa,Oy,HS,JS,XS,aa,QS,Mr,Nf,Cr,Rf,fa,Go,Ot,eE,vy,Kf,oE]},"bInflt"),uK=o(function(){return[rt,nr,ca,Vi,Wi,sa,Mf,xy,ZS,Zn,YS,Bi,aa,tE,Sy,Mr,wn,zi,Cf,Lf,by,Gi,Fy,$y,fa,Go,rE,nE,Ty,Kf]},"bDflt");var Kf=o(function(e){return postMessage(e,[e.buffer])},"pbf"),oE=o(function(e){return e&&{out:e.size&&new rt(e.size),dictionary:e.dictionary}},"gopt"),iE=o(function(e,t,r,n,i,s){var a=cK(r,n,i,function(f,p){a.terminate(),s(f,p)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},"cbify");var Pn=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),Xr=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),Iy=o(function(e,t){return Xr(e,t)+Xr(e,t+4)*4294967296},"b8"),Ut=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function pK(e,t,r){return r||(r=t,t={}),typeof r!="function"&&Ot(7),iE(e,t,[uK],function(n){return Kf(Ty(n.data[0],n.data[1]))},0,r)}o(pK,"deflate");function Ty(e,t){return nE(e,t||{},0,0)}o(Ty,"deflateSync");function lK(e,t,r){return r||(r=t,t={}),typeof r!="function"&&Ot(7),iE(e,t,[fK],function(n){return Kf(vy(n.data[0],oE(n.data[1])))},1,r)}o(lK,"inflate");function vy(e,t){return eE(e,{i:2},t&&t.out,t&&t.dictionary)}o(vy,"inflateSync");var sE=o(function(e,t,r,n){for(var i in e){var s=e[i],a=t+i,f=n;Array.isArray(s)&&(f=Ey(n,s[1]),s=s[0]),s instanceof rt?r[a]=[s,f]:(r[a+="/"]=[new rt(0),f],sE(s,a,r,n))}},"fltn"),zS=typeof TextEncoder<"u"&&new TextEncoder,wy=typeof TextDecoder<"u"&&new TextDecoder,dK=0;try{wy.decode(Sy,{stream:!0}),dK=1}catch(e){}var mK=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:Go(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function Uf(e,t){if(t){for(var r=new rt(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(zS)return zS.encode(e);for(var i=e.length,s=new rt(e.length+(e.length>>1)),a=0,f=o(function(l){s[a++]=l},"w"),n=0;n<i;++n){if(a+5>s.length){var p=new rt(a+8+(i-n<<1));p.set(s),s=p}var d=e.charCodeAt(n);d<128||t?f(d):d<2048?(f(192|d>>6),f(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,f(240|d>>18),f(128|d>>12&63),f(128|d>>6&63),f(128|d&63)):(f(224|d>>12),f(128|d>>6&63),f(128|d&63))}return Go(s,0,a)}o(Uf,"strToU8");function Ay(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(wy)return wy.decode(e);var i=mK(e),s=i.s,r=i.r;return r.length&&Ot(8),s}}o(Ay,"strFromU8");var yK=o(function(e,t){return t+30+Pn(e,t+26)+Pn(e,t+28)},"slzh"),hK=o(function(e,t,r){var n=Pn(e,t+28),i=Ay(e.subarray(t+46,t+46+n),!(Pn(e,t+8)&2048)),s=t+46+n,a=Xr(e,t+20),f=r&&a==4294967295?gK(e,s):[a,Xr(e,t+24),Xr(e,t+42)],p=f[0],d=f[1],l=f[2];return[Pn(e,t+10),p,d,i,s+Pn(e,t+30)+Pn(e,t+32),l]},"zh"),gK=o(function(e,t){for(;Pn(e,t)!=1;t+=4+Pn(e,t+2));return[Iy(e,t+12),Iy(e,t+4),Iy(e,t+20)]},"z64e"),Py=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&Ot(9),t+=n+4}return t},"exfl"),GS=o(function(e,t,r,n,i,s,a,f){var p=n.length,d=r.extra,l=f&&f.length,m=Py(d);Ut(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(s<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var g=new Date(r.mtime==null?Date.now():r.mtime),b=g.getFullYear()-1980;if((b<0||b>119)&&Ot(10),Ut(e,t,b<<25|g.getMonth()+1<<21|g.getDate()<<16|g.getHours()<<11|g.getMinutes()<<5|g.getSeconds()>>1),t+=4,s!=-1&&(Ut(e,t,r.crc),Ut(e,t+4,s<0?-s-2:s),Ut(e,t+8,r.size)),Ut(e,t+12,p),Ut(e,t+14,m),t+=16,a!=null&&(Ut(e,t,l),Ut(e,t+6,r.attrs),Ut(e,t+10,a),t+=14),e.set(n,t),t+=p,m)for(var P in d){var F=d[P],w=F.length;Ut(e,t,+P),Ut(e,t+2,w),e.set(F,t+4),t+=4+w}return l&&(e.set(f,t),t+=l),t},"wzh"),IK=o(function(e,t,r,n,i){Ut(e,t,101010256),Ut(e,t+8,r),Ut(e,t+10,r),Ut(e,t+12,n),Ut(e,t+16,i)},"wzf");function aE(e,t,r){r||(r=t,t={}),typeof r!="function"&&Ot(7);var n={};sE(e,"",n,t);var i=Object.keys(n),s=i.length,a=0,f=0,p=s,d=new Array(s),l=[],m=o(function(){for(var w=0;w<l.length;++w)l[w]()},"tAll"),g=o(function(w,O){Df(function(){r(w,O)})},"cbd");Df(function(){g=r});var b=o(function(){var w=new rt(f+22),O=a,N=f-a;f=0;for(var A=0;A<p;++A){var k=d[A];try{var R=k.c.length;GS(w,f,k,k.f,k.u,R);var V=30+k.f.length+Py(k.extra),J=f+V;w.set(k.c,J),GS(w,a,k,k.f,k.u,R,f,k.m),a+=16+V+(k.m?k.m.length:0),f=J+R}catch(D){return g(D,null)}}IK(w,a,d.length,N,O),g(null,w)},"cbf");s||b();for(var P=o(function(w){var O=i[w],N=n[O],A=N[0],k=N[1],R=sK(),V=A.length;R.p(A);var J=Uf(O),D=J.length,U=k.comment,ae=U&&Uf(U),se=ae&&ae.length,M=Py(k.extra),le=k.level==0?0:8,ce=o(function(Te,Ie){if(Te)m(),g(Te,null);else{var Ke=Ie.length;d[w]=Ey(k,{size:V,crc:R.d(),c:Ie,f:J,m:ae,u:D!=O.length||ae&&U.length!=se,compression:le}),a+=30+D+M+Ke,f+=76+2*(D+M)+(se||0)+Ke,--s||b()}},"cbl");if(D>65535&&ce(Ot(11,0,1),null),!le)ce(null,A);else if(V<16e4)try{ce(null,Ty(A,k))}catch(Te){ce(Te,null)}else l.push(pK(A,k,ce))},"_loop_1"),F=0;F<p;++F)P(F);return m}o(aE,"zip");var Df=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function cE(e,t,r){r||(r=t,t={}),typeof r!="function"&&Ot(7);var n=[],i=o(function(){for(var w=0;w<n.length;++w)n[w]()},"tAll"),s={},a=o(function(w,O){Df(function(){r(w,O)})},"cbd");Df(function(){a=r});for(var f=e.length-22;Xr(e,f)!=101010256;--f)if(!f||e.length-f>65558)return a(Ot(13,0,1),null),i;var p=Pn(e,f+8);if(p){var d=p,l=Xr(e,f+16),m=l==4294967295||d==65535;if(m){var g=Xr(e,f-12);m=Xr(e,g)==101075792,m&&(d=p=Xr(e,g+32),l=Xr(e,g+48))}for(var b=t&&t.filter,P=o(function(w){var O=hK(e,l,m),N=O[0],A=O[1],k=O[2],R=O[3],V=O[4],J=O[5],D=yK(e,J);l=V;var U=o(function(se,M){se?(i(),a(se,null)):(M&&(s[R]=M),--p||a(null,s))},"cbl");if(!b||b({name:R,size:A,originalSize:k,compression:N}))if(!N)U(null,Go(e,D,D+A));else if(N==8){var ae=e.subarray(D,D+A);if(k<524288||A>.8*k)try{U(null,vy(ae,{out:new rt(k)}))}catch(se){U(se,null)}else n.push(lK(ae,{size:k},U))}else U(Ot(14,"unknown compression type "+N,1),null);else U(null,null)},"_loop_3"),F=0;F<d;++F)P(F)}else a(null,{});return i}o(cE,"unzip");c();var xK=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),bK=o(e=>e!=null,"notNull"),zf=o((e,t,r=0)=>{var n;if(x.IsNull(e))return"null";if(x.IsUndefined(e))return"undefined";if(x.IsString(e))return"<string>";if(x.IsNumber(e))return"<number>";if(x.IsBoolean(e))return"<boolean>";if(x.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(x.IsRef(e)){let i=t.find(s=>s.$id===e.$ref);return i==null?e.$ref:zf(i,t,r)}if(x.IsArray(e))return"".concat(zf(e.items,t,r+1),"[]");if(x.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let s="".concat(e.anyOf.map(a=>zf(a,t,r+1)).filter(bK).join(" | "));return r>0?"(".concat(s,")"):s}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),$K=o((e,t,r)=>{var s;let n=t.message;x.IsUnion(t.schema)&&(n="Expected one of: ".concat(zf(t.schema,r)));let i="#/definitions/".concat(e).concat((s=xK(t.path))!=null?s:"");return"".concat(i,": ").concat(n)},"errorHandler"),Gf=o((e,t,r)=>{let n=t.First();if(n!=null)return $K(e,n,r)},"shortError");var Hi;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Hi||(Hi={}));var ky=class ky extends Error{constructor(r,n){super(n);H(this,"name");H(this,"kind");this.name="CompressError",this.kind=r}};o(ky,"CompressError");var Zi=ky,wK=o(e=>new Zi(Hi.Archive,e.message),"flateErrorIntoCompressError"),PK=o(e=>{let t=Object.values(qf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),OK=o((e,t,r)=>{var n;return new Zi(Hi.Validate,(n=Gf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),FK=o(e=>new Zi(Hi.Encode,e.message),"encodeErrorIntoCompressError"),SK=o(e=>new Zi(Hi.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),jy=o((e,t,r)=>t instanceof Do?FK(t):t instanceof _r?OK(e,t,r):PK(t)?wK(t):SK(t),"intoCompressError");c();var Ji;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(Ji||(Ji={}));var Ny=class Ny extends Error{constructor(r,n){super(n);H(this,"name");H(this,"kind");this.name="DecompressError",this.kind=r}};o(Ny,"DecompressError");var Yi=Ny,EK=o(e=>new Yi(Ji.Unarchive,e.message),"flateErrorIntoDecompressError"),TK=o(e=>{let t=Object.values(qf);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),vK=o((e,t,r)=>{var n;return new Yi(Ji.Validate,(n=Gf(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),AK=o(e=>new Yi(Ji.Decode,e.message),"decodeErrorIntoDecompressError"),jK=o(e=>new Yi(Ji.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),_y=o((e,t,r)=>t instanceof Uo?AK(t):t instanceof _r?vK(e,t,r):TK(t)?EK(t):jK(t),"intoDecompressError");c();c();c();var kK=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,_K=[0,31,28,31,30,31,30,31,31,30,31,30,31],NK=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),Bf=o(e=>{let t=kK.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&NK(r)?29:_K[n])},"date");c();var RK=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Vf=o(e=>{let t=RK.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],s=t[4],a=t[5]==="-"?-1:1,f=+(t[6]||0),p=+(t[7]||0);if(f>23||p>59||!s)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-p*a,l=r-f*a-(d<0?1:0);return(l===23||l===-1)&&(d===59||d===-1)&&i<61},"time");var CK=/t|\s/i,fE=o(e=>{let t=e.split(CK);return t.length===2&&Bf(t[0])&&Vf(t[1])},"dateTime");c();var MK=/\/|:/,LK=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,uE=o(e=>MK.test(e)&&LK.test(e),"uri");var UK=[["date",Bf],["time",Vf],["date-time",fE],["uri",uE]],pE=o(()=>{for(let[e,t]of UK)try{df.Format(e,t)}catch(r){if(r instanceof ra)continue;throw r}},"registerFormats");c();c();c();var lE=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var Wf=o(e=>(...t)=>{try{return B(e(...t))}catch(r){return W(lE(r))}},"safeFn");var DK=Wf((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Uf(JSON.stringify(i.contents));return r}),Ry=o(async(e,t,r)=>DK(e,t).andThenAsync(n=>new Promise(i=>{aE(n,Y(S({},r),{consume:!0}),(s,a)=>{i(s?W(s):B(a))})})),"compress");c();c();function Hf(e,t,r=[]){let n=S({},e);for(let[i,s]of Object.entries(t))if(s!==void 0)if(i in n){let a=i;if(Array.isArray(s)&&s.length>0){let f=qK(s[0],r);if(f){let p=n[a];if(!Array.isArray(p))throw new Error("Expected array at ".concat(i,", got ").concat(typeof p));let d=new Map(s.map(g=>[dE(g,f),g])),m=p.map(g=>{let b=d.get(dE(g,f));return b?Hf(g,b,r):g});n[a]=m}else n[a]=s}else{let f=n[a];typeof f=="object"&&f!==null&&typeof s=="object"&&s!==null?Object.keys(s).length===0?n[a]=s:n[a]=Hf(f,s,r):n[i]=s}}else n[i]=s;return n}o(Hf,"deepMergeOn");function qK(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,s]of Object.entries(n)){let a=r(s);if(a)return[i,...a]}return null}return o(r,"search"),r(e)}o(qK,"findIdentifierKey");function dE(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(dE,"getValueByKeyPath");var KK=o(e=>e,"identity"),zK=o(e=>JSON.parse(Ay(e)),"jsonDecode"),GK=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,KK)!==void 0),"isFileExpected"),BK=Wf((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let s of t){let a=s.fromBundle(n,i,zK);if(a){r=Hf(r,a,[]);break}}}return r}),Cy=o(async(e,t)=>new Promise(r=>cE(e,{filter:o(n=>GK(n,t),"filter")},(n,i)=>{r(n?W(n):B(i))})).then(r=>r.andThen(n=>BK(n,t))),"decompress");c();var VK=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),WK=o(e=>{if(e.length<2)return!1;let t=e.filter(VK);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),Zf=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&WK(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Zf(r)])):Array.isArray(e)?e.map(Zf):e,"fixDuplicateAllOf");c();var Jf=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?Y(S({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Jf(r)])):Array.isArray(e)?e.map(Jf):e,"prefixReferences");var Xi;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(Xi||(Xi={}));var HK=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),ZK=o((...e)=>{let t=new Map;for(let r of HK(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return W({kind:Xi.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return B(t)},"computeReferenceMap"),Lr,Bo,Jn,Qr,Xf=class Xf{constructor(t,r,n,i){Io(this,Lr);Io(this,Bo);Io(this,Jn,[]);Io(this,Qr);rs(this,Lr,t),rs(this,Bo,r),rs(this,Jn,n),rs(this,Qr,i),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(t,r="CoreMVF"){let n=u.Composite(t.extensions.map(s=>s.schema),{$id:r});if(!x.IsSchema(n))return W({kind:Xi.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:n});let i=ZK(Pm.values(),hm.values(),Im.values(),bm.values(),$m.values(),km.values(),t.extensions.flatMap(s=>{var a;return(a=s.references)!=null?a:[]}).values());if(!i.isOk())return i;try{pE();let s=kf.Compile(n,[...i.value.values()]);return B(new Xf(n,s,t.extensions,i.value))}catch(s){return s instanceof ne?W({kind:Xi.TypeboxError,message:s.message,original:s}):W({kind:Xi.UnknownError,message:"An unknown error occurred while compiling the schema",original:s})}}is(t){return He(this,Bo).Check(t)}parse(t){return He(this,Bo).Check(t)?B(t):W(He(this,Bo).Errors(t))}decode(t){try{return B(US(He(this,Lr),[...He(this,Qr).values()],t))}catch(r){return W(r)}}encode(t){try{return B(DS(He(this,Lr),[...He(this,Qr).values()],t))}catch(r){return W(r)}}verify(t){for(let r of He(this,Jn))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return W(n.error)}return B(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([He(this,Lr),...He(this,Qr).values()])),r=Zf(Jf({$id:"#/definitions/".concat((n=He(this,Lr).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>Ry(r,He(this,Jn))).then(r=>r.mapErr(n=>{var i;return jy((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>Ry(r,He(this,Jn))).then(r=>r.mapErr(n=>{var i;return jy((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async decompress(t){return Cy(t,He(this,Jn)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return _y((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}async decompressUnsafe(t){return Cy(t,He(this,Jn)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return _y((i=He(this,Lr).$id)!=null?i:"CoreMVF",n,[...He(this,Qr).values()])}))}};Lr=new WeakMap,Bo=new WeakMap,Jn=new WeakMap,Qr=new WeakMap,o(Xf,"MVFParser");var Yf=Xf;var Qi,My=class My{constructor(){Io(this,Qi,[]);this.extend=this.extend.bind(this)}extend(t){return He(this,Qi).push(t),this}extendOptional(t){let r=Y(S({},t),{schema:u.Partial(t.schema)});return He(this,Qi).push(r),this}build(){return Yf.create(this)}get extensions(){return He(this,Qi)}};Qi=new WeakMap,o(My,"MVFParserBuilder");var Qf=My;var mE=o(()=>new Qf().extend(QF).extend(iS).extend(fS),"createParser");var Vo=ct("lcat","LocationCategoryId"),Ly=u.Intersect([u.Object({id:u.Ref(Vo),parent:u.Optional(u.Ref(Vo))}),Co(["name"]),Yr],{$id:"LocationCategory"}),yE=[Vo,Ly];c();c();var Wo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Wo||(Wo={}));var hE=o(e=>{var i,s,a,f,p,d,l,m,g;if(e.locationCategories==null&&e.locations==null)return B(!0);let t=new Set((s=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?s:[]);for(let b of(a=e.locationCategories)!=null?a:[])if(b.parent!=null&&!t.has(b.parent))return W({kind:Wo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=vt(e);for(let b of(f=e.locations)!=null?f:[]){for(let P of b.categories)if(!t.has(P))return W({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:P}});for(let P of b.geometryAnchors){let F=r(P.floorId,P.geometryId);if(F.isErr())return F}}let n=new Set((d=(p=e.locations)==null?void 0:p.map(b=>b.id))!=null?d:[]);for(let b of(l=e.locationInstances)!=null?l:[]){if(!n.has(b.parentId))return W({kind:Wo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let P of(m=b.categories)!=null?m:[])if(!t.has(P))return W({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:P}});for(let P of(g=b.geometryAnchors)!=null?g:[]){let F=r(P.floorId,P.geometryId);if(F.isErr())return F}}return B(!0)},"validateLocations");c();var Ho=ct("loc","LocationId"),eu=ct("loci","LocationInstanceId"),gE=u.Object({name:u.String(),url:u.String({format:"uri"})},{$id:"LocationSocial"}),IE=u.Object({url:u.String({format:"uri"})},{$id:"LocationImage"}),Uy=u.Object({label:u.String(),url:u.String({format:"uri"})},{$id:"LocationLink"}),Dy=u.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),xE=u.Union([u.Literal("Sunday"),u.Literal("Monday"),u.Literal("Tuesday"),u.Literal("Wednesday"),u.Literal("Thursday"),u.Literal("Friday"),u.Literal("Saturday")],{$id:"OpeningHoursDay"}),JK="PublicHolidays",qy=u.Union([xE,u.Literal(JK)],{$id:"OpeningHoursDayOrPublicHoliday"}),tu=u.Object({"@type":u.Optional(u.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:u.Optional(u.Ref(Dy,{description:"The time the opening hours start"})),closes:u.Optional(u.Ref(Dy,{description:"The time the opening hours end"})),dayOfWeek:u.Optional(u.Union([u.Ref(qy),u.Array(u.Ref(qy))],{description:"The days of the week the opening hours apply to"})),validFrom:u.Optional(u.String({format:"date-time",description:"The date the opening hours start, in ISO 8601 format"})),validTo:u.Optional(u.String({format:"date-time",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),ru=u.Intersect([u.Object({id:u.Ref(Ho),categories:u.Array(u.Ref(Vo)),logo:u.Optional(u.String({format:"uri"})),phone:u.Optional(u.String()),social:u.Array(u.Ref(gE)),images:u.Array(u.Ref(IE)),links:u.Array(u.Ref(Uy)),website:u.Optional(u.Ref(Uy)),openingHours:u.Optional(u.Array(u.Ref(tu)))}),Co(["name"]),Mo(),Yr],{$id:"Location"}),Ky=u.Intersect([u.Object({id:u.Ref(eu),parentId:u.Ref(Ho)}),u.Partial(u.Omit(ru,["id","parentId"]))],{$id:"LocationInstance"}),nu=[Ho,eu,gE,IE,Uy,Dy,xE,qy,tu,ru,Ky];var YK=u.Object({locations:u.Array(u.Ref(ru)),locationCategories:u.Array(u.Ref(Ly)),locationInstances:u.Optional(u.Array(u.Ref(Ky)))},{$id:"LocationsExtensionSchema"}),bE="locations.json",$E="location-categories.json",wE="location-instances.json",PE={name:"ext:locations",schema:YK,intoBundle:o(function*(e){e.locations!=null&&(yield{path:bE,contents:e.locations}),e.locationCategories!=null&&(yield{path:$E,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:wE,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===bE)return{locations:r(t)};if(e===$E)return{locationCategories:r(t)};if(e===wE)return{locationInstances:r(t)}},"fromBundle"),references:[...yE,...nu],integrityCheck:hE};c();c();var On;(function(e){e.UnknownEnterpriseLocationError="UnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling"})(On||(On={}));var OE=o(e=>{var p,d,l,m,g,b,P,F,w,O,N,A,k,R,V,J,D,U,ae,se;if(e.enterprise==null)return B(!0);let t=e.enterprise,r=new Set((d=(p=e.locationCategories)==null?void 0:p.map(M=>M.id))!=null?d:[]);for(let M of(l=t.categories)!=null?l:[])if(!r.has(M.categoryId))return W({kind:On.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:M.id,locationCategoryId:M.categoryId}});let n=new Set((g=(m=e.locations)==null?void 0:m.map(M=>M.id))!=null?g:[]);for(let M of(b=t.locations)!=null?b:[]){if(!n.has(M.locationId))return W({kind:On.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:M.id,locationId:M.locationId}});for(let le of(P=M.siblingGroups)!=null?P:[])for(let ce of(F=le.siblings)!=null?F:[])if(!n.has(ce))return W({kind:On.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:M.id,siblingLocationId:ce,label:le.label}})}let i=new Set((O=(w=e.enterprise.locations)==null?void 0:w.map(M=>M.id))!=null?O:[]);if(((N=t.venue)==null?void 0:N.topLocations)!=null){for(let M of t.venue.topLocations)if(!i.has(M))return W({kind:On.UnknownEnterpriseLocationError,properties:{enterpriseLocationId:M}})}let s=new Set((k=(A=e.locationInstances)==null?void 0:A.map(M=>M.id))!=null?k:[]);for(let M of(R=t.locationInstances)!=null?R:[]){if(!i.has(M.parentId))return W({kind:On.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:M.id,enterpriseLocationId:M.parentId}});if(!s.has(M.locationInstanceId))return W({kind:On.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:M.id,locationInstanceId:M.locationInstanceId}});for(let le of(V=M.siblingGroups)!=null?V:[])for(let ce of(J=le.siblings)!=null?J:[])if(!n.has(ce))return W({kind:On.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:M.id,siblingLocationId:ce,label:le.label}})}let a=zn(e),f=vt(e);for(let[M,le]of _e((D=t.floorText)!=null?D:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le.features){if(!("geometryId"in Te.properties))continue;let Ie=f(M,Te.properties.geometryId);if(Ie.isErr())return Ie}}for(let[M,le]of _e((U=t.textures)!=null?U:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le){let Ie=f(M,Te.geometryId);if(Ie.isErr())return Ie}}for(let[M,le]of _e((ae=t.layers)!=null?ae:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of Ee(le!=null?le:{})){let Ie=f(M,Te);if(Ie.isErr())return Ie}}for(let[M,le]of _e((se=t.textAreas)!=null?se:{})){let ce=a(M);if(ce.isErr())return ce;for(let Te of le.features)if("geometryId"in Te.properties){let Ie=f(M,Te.properties.geometryId);if(Ie.isErr())return Ie}}return B(!0)},"validateCMS");c();c();var Zo=ct("el","EnterpriseLocationId"),zy=ct("ec","EnterpriseCategoryId"),Gy=ct("eli","EnterpriseLocationInstanceId"),By=ct("ev","EnterpriseVenueId"),Vy=ct("eft","EnterpriseFloorTextId"),FE=[Zo,zy,Gy,By,Vy];var SE=u.Object({id:u.Ref(zy),categoryId:u.Ref(Vo),color:u.Optional(u.String()),sortOrder:u.Number(),iconFromDefaultList:u.Optional(u.Union([u.String(),u.Null()])),picture:u.Optional(u.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),Wy=u.Object({categories:u.Optional(u.Array(u.Ref(SE)))},{$id:"EnterpriseCategoriesSchema"}),EE=[SE,Wy];c();var TE=lr(["left","center","right"]),XK=TE.schema,rde=TE.values,Hy=u.Object({id:u.Ref(Vy),text:u.String(),visible:u.Boolean({default:!0}),fontSize:u.Number({default:12,minimum:1}),fontFamily:u.String({default:"Droid Sans"}),color:u.String({default:"black"}),rotation:u.Number({minimum:0,maximum:360}),align:XK},{$id:"FloorTextCommonProperties"}),Zy=u.Intersect([u.Ref(Hy),jr],{$id:"AnchoredFloorTextProperties"}),Jy=u.Intersect([u.Ref(Hy),u.Object({verticalOffset:u.Number()})],{$id:"FloatingFloorTextProperties"}),vE=u.Union([u.Ref(Zy),u.Ref(Jy)],{$id:"FloorTextProperties"}),AE=Ct(Vt,u.Ref(vE),{$id:"FloorTextFeature"}),QK=Ct(Vt,u.Ref(Zy),{$id:"AnchoredFloorTextFeature"}),e3=Ct(Vt,u.Ref(Jy),{$id:"FloatingFloorTextFeature"}),jE=rr(u.Ref(AE),{$id:"EnterpriseFloorTextFeatureCollection"}),kE=u.Record(ke,u.Ref(jE),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Yy=u.Object({floorText:u.Optional(u.Ref(kE))},{$id:"EnterpriseFloorTextSchema"}),_E=[Hy,Zy,Jy,vE,AE,QK,e3,jE,kE,Yy];c();var NE=yt(u.Record(Bt,u.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),RE=yt(u.Record(ke,u.Ref(NE),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Xy=u.Object({layers:u.Optional(u.Ref(RE))},{$id:"EnterpriseLayersSchema"}),CE=[NE,RE,Xy];c();c();c();var Qy=lr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),t3=Qy.schema,dde=Qy.values,mde=Qy.record,eh=u.Object({type:t3,start:u.Optional(u.String({format:"date",description:"The start date of the state"})),end:u.Optional(u.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),th=u.Object({label:u.String(),siblings:u.Array(u.Ref(Ho))},{$id:"SiblingGroup"}),ou=u.Object({name:u.String(),code:u.String()},{$id:"Language"}),ME=[eh,th,ou];var iu=u.Object({id:u.Ref(Zo),locationId:u.Ref(Ho),type:u.String(),sortOrder:u.Number(),tags:u.Optional(u.Array(u.String())),picture:u.Optional(u.String({format:"uri",description:"The picture of the location"})),states:u.Optional(u.Array(u.Ref(eh),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:u.Optional(u.Array(u.Ref(th))),gallery:u.Optional(u.Array(u.Object({caption:u.Optional(u.String()),image:u.String({format:"uri"}),embeddedUrl:u.Optional(u.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:u.Optional(u.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:u.Optional(u.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:u.Optional(u.Boolean({description:"Whether to show the logo of the location"}))},{$id:"EnterpriseLocation"}),rh=u.Object({locations:u.Optional(u.Array(u.Ref(iu)))},{$id:"EnterpriseLocationsSchema"}),LE=[iu,rh];var UE=u.Intersect([u.Object({id:u.Ref(Gy),parentId:u.Ref(Zo),locationInstanceId:u.Ref(eu)}),u.Partial(u.Omit(iu,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),nh=u.Object({locationInstances:u.Optional(u.Array(u.Ref(UE)))},{$id:"EnterpriseLocationInstancesSchema"}),DE=[UE,nh];c();var oh=lr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),qE=oh.schema,_de=oh.values,Nde=oh.record,ih=u.Object({maxWidth:u.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:u.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:u.Ref(qE),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),KE=u.Intersect([u.Ref(ih),jr],{$id:"EnterpriseAnchoredTextAreaProperties"}),zE=u.Intersect([u.Ref(ih),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),GE=u.Union([KE,zE],{$id:"EnterpriseTextAreaProperties"}),BE=Ct(u.Ref(Vt),GE,{$id:"EnterpriseTextAreaFeature"}),VE=rr(u.Ref(BE),{$id:"EnterpriseTextAreaCollection"}),WE=u.Record(ke,u.Ref(VE),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),HE=u.Object({textAreas:u.Optional(u.Ref(WE))},{$id:"EnterpriseTextAreasSchema"}),ZE=[qE,ih,KE,zE,GE,BE,VE,WE];c();var sh=u.Object({u:u.Number(),v:u.Number()},{$id:"EnterpriseTextureUV"}),ah=lr(["top","side"],{$id:"EnterpriseTextureFace"}),JE=ah.schema,Ude=ah.values,Dde=ah.record,ch=lr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),YE=ch.schema,qde=ch.values,Kde=ch.record,XE=u.Tuple([_i,Ni,_i,Ni],{$id:"EnterpriseTextureBounds"}),QE=u.Intersect([u.Object({repeat:u.Ref(sh),offset:u.Ref(sh),rotation:u.Number({minimum:0,maximum:360}),path:u.String({format:"uri"}),face:u.Ref(JE),surface:u.Ref(YE),bounds:u.Ref(XE)},{$id:"EnterpriseTextureProperties"}),jr],{$id:"EnterpriseTexture"}),eT=u.Array(u.Ref(QE),{$id:"EnterpriseTextures"}),tT=u.Record(ke,u.Ref(eT),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),fh=u.Object({textures:u.Optional(u.Ref(tT))},{$id:"EnterpriseTexturesSchema"}),rT=[QE,eT,fh,sh,JE,YE,XE,tT];c();var nT=u.Intersect([u.Object({id:u.Ref(By),slug:u.String(),defaultLanguage:u.Ref(ou),languages:u.Array(u.Ref(ou)),countrycode:u.Optional(u.String()),logo:u.Optional(u.String({format:"uri"})),mappedinWebUrl:u.Optional(u.String({format:"uri"})),topLocations:u.Optional(u.Array(u.Ref(Zo))),operationHours:u.Optional(u.Array(u.Ref(tu))),coverImage:u.Optional(u.String({format:"uri"}))}),Co(["name"]),Yr],{$id:"EnterpriseVenue"}),uh=u.Object({venue:u.Optional(u.Ref(nT))},{$id:"EnterpriseVenueSchema"}),oT=[nT,uh];var sT=u.Intersect([uh,rh,nh,Wy,fh,Yy,Xy,HE],{$id:"EnterpriseProperties"}),iT=u.Object({enterprise:u.Optional(u.Ref(sT))},{$id:"CMSExtensionSchema"}),r3=/^enterprise\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,aT={name:"ext:cms",schema:iT,intoBundle:o(function*(e){var r,n,i,s,a,f;if(e.enterprise==null)return;let t=e.enterprise;for(let p of Ee(t))switch(p){case"floorText":for(let d of Ee((r=t.floorText)!=null?r:{}))yield{path:"enterprise/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of Ee((i=t.textures)!=null?i:{}))yield{path:"enterprise/textures/".concat(d,".json"),contents:((s=t.textures)!=null?s:{})[d]};continue;case"textAreas":for(let d of Ee((a=t.textAreas)!=null?a:{}))yield{path:"enterprise/textAreas/".concat(d,".geojson"),contents:((f=t.textAreas)!=null?f:{})[d]};continue;default:yield{path:"enterprise/".concat(p,".json"),contents:t[p]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(r3);if(!n)return;let[,i,s]=n,a=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{enterprise:{[i]:{[s]:a}}};default:return{enterprise:{[s]:a}}}},"fromBundle"),references:[sT,iT,...oT,...LE,...DE,...EE,...rT,...CE,..._E,...ZE,...FE,...ME,...nu],integrityCheck:OE};c();c();c();c();var en;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(en||(en={}));var cT=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return B(!0);let r=Object.entries(t).map(([s,a])=>S({key:s},a)).sort((s,a)=>s.index!==a.index?s.index-a.index:s.bit-a.bit),n=0,i=-1;for(let s of r){if(s.bit===i)return W({kind:en.NavigationFlagDuplicateBit,properties:{index:s.index,bit:s.bit,path:"navigationFlags.".concat(s.key)}});if(s.index!=n){if(i!=31)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(s.index!=n+1||s.bit!=0)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=s.index,i=0}else{if(s.bit!==i+1)return W({kind:en.NavigationFlagMissingDeclaration,properties:{index:s.index,bit:i+1,path:"navigationFlags"}});i=s.bit}}return B(!0)},"validateNavigationFlags");c();function es(e,t){return t&&(e.flags[t.index]&1<<t.bit)!==0}o(es,"hasFlag");c();var fT=2**32-1,ua=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),ts=o((e,t,r)=>{if(t.index==-1&&e.length===0)return B(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return W({kind:en.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let s=e[i];if(i<t.index){if(s>fT)return W({kind:en.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:fT,path:r}});continue}else if(s>t.flag)return W({kind:en.NavigationFlagValueTooBig,properties:{index:i,flagValue:s,expectedMaxFlagValue:t.flag,path:r}})}return B(!0)},"validateFlags");var n3=u.Object({index:u.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:u.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),uT=u.Intersect([n3,Jr],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'}),ph={accessible:"accessible",outdoors:"outdoors"},pT=u.Record(u.String(),uT,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),o3=u.Object({navigationFlags:u.Ref(pT)},{$id:"NavigationFlagsSchema"}),su=u.Array(u.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),lh=u.Object({flags:u.Ref(su)},{$id:"WithFlags"}),Jo=u.Intersect([ki,lh],{$id:"FlaggedGeometryAnchor"}),i3=u.Object({geometryAnchor:Jo},{$id:"WithFlaggedGeometryAnchor"}),s3=u.Object({geometryAnchors:u.Array(Jo)},{$id:"WithFlaggedGeometryAnchors"}),lT={name:"ext:mvf-navigation-flags",schema:o3,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[uT,pT,su,Jo,i3,s3],integrityCheck:cT};c();var dT=o(e=>{if(e.connections==null)return B(!0);let t=vt(e),r=ua(e);for(let[n,i]of e.connections.entries()){for(let[s,a]of i.entrances.entries()){let f=t(a.floorId,a.geometryId);if(f.isErr())return f;let p=ts(a.flags,r,"connections[".concat(n,"].entrances[").concat(s,"]"));if(p.isErr())return p}for(let[s,a]of i.exits.entries()){let f=t(a.floorId,a.geometryId);if(f.isErr())return f;let p=ts(a.flags,r,"connections[".concat(n,"].exits[").concat(s,"]"));if(p.isErr())return p}}return B(!0)},"validateConnections");var yT=ct("c","ConnectionId"),{schema:a3,values:Zme,record:c3}=lr(["elevator","escalator","travelator","stairs","door","ramp"],{$id:"ConnectionType"}),hT=a3;var dh=c3,gT=u.Intersect([u.Object({id:u.Ref(yT,{description:"The unique identifier for the connection."}),entrances:u.Array(u.Ref(Jo)),exits:u.Array(u.Ref(Jo)),entryCost:u.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:u.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:u.Ref(hT,{description:"The type of connection."})}),Jr,Yr],{$id:"ConnectionsProperties"}),IT=u.Array(u.Ref(gT),{$id:"ConnectionsCollection"}),f3=u.Object({connections:u.Ref(IT)},{$id:"ConnectionsExtensionSchema"}),mT="connections.json",xT={name:"ext:connections",schema:f3,intoBundle:o(function*(e){e.connections!=null&&(yield{path:mT,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===mT)return{connections:r(t)}},"fromBundle"),references:[gT,IT,hT,yT,Jo,su],integrityCheck:dT};c();c();var bT=o(e=>{if(e.defaultStyle==null)return B(!0);let t=vt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return B(!0)},"validateDefaultStyle");var $T=u.Intersect([Mo(),Yr,u.Object({altitude:u.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:u.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:u.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:u.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:u.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:u.Optional(u.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),wT=u.Record(u.String(),u.Ref($T),{$id:"DefaultStyleCollection",additionalProperties:!1}),u3=u.Object({defaultStyle:u.Ref(wT)},{$id:"DefaultStyleSchema"}),PT={name:"ext:mvf-default-style",schema:u3,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[$T,wT],integrityCheck:bT};c();c();c();c();var au;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(au||(au={}));var OT=o(e=>{if(e.floorStacks==null)return B(!0);let t=zn(e);for(let r of e.floorStacks){for(let n of r.floors){let i=t(n);if(i.isErr())return i}if(r.defaultFloor!=null&&!r.floors.includes(r.defaultFloor))return W({kind:au.InvalidDefaultFloorError,properties:{floorStackId:r.id,floorId:r.defaultFloor}})}return B(!0)},"validateFloorStacks");var cu=ct("fs","FloorStackId"),ST=u.Intersect([u.Object({id:u.Ref(cu,{description:"The unique identifier for the floor stack."}),floors:u.Array(u.Ref(ke),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:u.Optional(u.Ref(ke,{description:"The default floor for the floor stack."}))}),Jr],{$id:"FloorStacksProperties"}),ET=u.Array(u.Ref(ST),{$id:"FloorStackCollection"}),p3=u.Object({floorStacks:u.Ref(ET)},{$id:"FloorStackExtensionSchema"}),FT="floor-stacks.json",TT={name:"ext:floor-stacks",schema:p3,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:FT,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===FT)return{floorStacks:r(t)}},"fromBundle"),references:[cu,ST,ET],integrityCheck:OT};c();c();var pa;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(pa||(pa={}));var vT=o(e=>{if(e.facade==null)return B(!0);if(e.floorStacks==null)return W({kind:pa.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(n=>n.id)),r=vt(e);for(let[n,i]of _e(e.facade))if(i!=null){if(!t.has(n))return W({kind:pa.UnknownFloorStackError,properties:{floorStackId:n}});for(let s of i.geometryAnchors){let a=r(s.floorId,s.geometryId);if(a.isErr())return a}}return B(!0)},"validateFacade");var AT=ct("fc","FacadeId"),jT=u.Intersect([u.Object({id:u.Ref(AT)}),Mo({minItems:1})],{$id:"FacadeProperties"}),l3=u.Object({facade:yt(u.Record(cu,u.Ref(jT),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),d3=/^facade\/(.*)\.json$/,kT={name:"ext:facade",schema:l3,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Ee(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(d3))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[AT,jT],integrityCheck:vT};c();c();var _T=o(e=>{if(e.floorImages==null)return B(!0);let t=vt(e);for(let[r,n]of _e(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let s=i.properties.geometryId,a=t(r,s);if(a.isErr())return a}return B(!0)},"validateFloorImages");var mh=u.Object({path:u.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:u.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:u.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),NT=u.Intersect([u.Ref(mh),jr],{$id:"AnchoredFloorImageProperties"}),RT=u.Intersect([u.Ref(mh),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),CT=u.Union([NT,RT],{$id:"FloorImageProperties"}),MT=Ct(u.Ref(Vt),CT,{$id:"FloorImageFeature"}),LT=rr(u.Ref(MT),{$id:"FloorImageCollection"}),m3=u.Object({floorImages:yt(u.Record(ke,u.Ref(LT),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),y3=/^floorImages\/(.*)\.geojson$/,UT={name:"ext:floor-images",schema:m3,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Ee(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(y3))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[mh,NT,RT,CT,MT,LT],integrityCheck:_T};c();c();var DT=o(e=>{if(e.kinds==null)return B(!0);let t=vt(e);for(let[r,n]of _e(e.kinds))if(n!=null)for(let i of Ee(n)){let s=t(r,i);if(s.isErr())return s}return B(!0)},"validateKinds");var{values:yhe,schema:h3,record:hhe}=lr(["room","hallway","wall","desk","poi","area","window"],{$id:"Kind"}),qT=h3;var KT=yt(u.Record(Bt,u.Ref(qT),{additionalProperties:!1,$id:"GeometryKinds"})),g3=u.Object({kinds:yt(u.Record(ke,u.Ref(KT),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),I3=/^kinds\/(.*)\.json$/,zT={name:"ext:kinds",schema:g3,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Ee(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(I3))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[qT,KT],integrityCheck:DT};c();c();c();var fu;(function(e){e.UnknownNeighbor="UnknownNeighbor"})(fu||(fu={}));var GT=o(e=>{if(e.nodes==null)return B(!0);let t=vt(e),r=ua(e);for(let[n,i]of _e(e.nodes)){if(i==null)continue;let s=new Set(i.features.map(a=>a.properties.id));for(let[a,f]of i.features.entries()){for(let p of f.properties.geometryIds){let d=t(n,p);if(d.isErr())return d}for(let[p,d]of f.properties.neighbors.entries()){if(!s.has(d.id))return W({kind:fu.UnknownNeighbor,properties:{floorId:n,nodeId:f.properties.id,neighborId:d.id}});let l=ts(d.flags,r,'nodes["'.concat(n,'"].features[').concat(a,"].properties.neighbors[").concat(p,"]"));if(l.isErr())return l}}}return B(!0)},"validateNodes");var yh=ct("n","NodeId"),BT=u.Intersect([u.Object({id:u.Ref(yh,{description:"The unique identifier for the node."}),extraCost:u.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),lh],{$id:"NodeNeighbor"}),VT=u.Intersect([u.Object({id:u.Ref(yh,{description:"The unique identifier for the node."}),neighbors:u.Array(u.Ref(BT),{description:"The neighbors of the node."})}),lf],{$id:"NodeProperties"}),WT=Ct(u.Ref(Vt),VT,{$id:"NodeFeature"}),HT=rr(u.Ref(WT),{$id:"NodeCollection"}),x3=u.Object({nodes:yt(u.Record(ke,u.Ref(HT),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),b3=/^nodes\/(.*)\.json$/,ZT={name:"ext:nodes",schema:x3,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Ee(e.nodes))yield{path:"nodes/".concat(t,".json"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(b3))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[yh,BT,VT,WT,HT],integrityCheck:GT};c();c();c();var uu;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(uu||(uu={}));var JT=o(e=>{if(e.outdoors==null)return B(!0);let t=zn(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return W({kind:uu.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return B(!0)},"validateOutdoors");var XT=u.Object({floors:u.Array(u.Ref(ke),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),$3=u.Object({outdoors:u.Ref(XT)},{$id:"OutdoorsExtensionSchema"}),YT="outdoors.json",QT={name:"ext:outdoors",schema:$3,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:YT,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===YT)return{outdoors:r(t)}},"fromBundle"),references:[XT],integrityCheck:JT};c();c();c();var pu;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(pu||(pu={}));var e1=o(e=>{if(e.tileset==null)return B(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return W({kind:pu.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return B(!0)},"validateTilesets");var hh=u.Object({key:u.String({minLength:1,description:"Unique identifier for the tileset style."}),name:u.String({minLength:1,description:"Display name of the tileset style."}),url:u.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),t1=u.Object({default:u.Ref(hh,{description:"The default tileset style, which should be used."}),others:u.Optional(u.Array(u.Ref(hh,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),w3=u.Object({tileset:u.Ref(t1)},{$id:"TilesetExtensionSchema"}),r1={name:"ext:mvf-tileset",schema:w3,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[hh,t1],integrityCheck:e1};c();var n1=u.Object({},{$id:"WalkableProperties"}),o1=u.Object({},{$id:"NonWalkableProperties"}),i1=yt(u.Record(Bt,u.Ref(n1),{$id:"WalkableGeometries",additionalProperties:!1})),s1=yt(u.Record(Bt,u.Ref(o1),{$id:"NonWalkableGeometries",additionalProperties:!1})),P3=u.Object({walkable:yt(u.Record(ke,u.Ref(i1),{additionalProperties:!1})),nonwalkable:yt(u.Record(ke,u.Ref(s1),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),O3=/^walkable\/(.*)\.json$/,F3=/^nonwalkable\/(.*)\.json$/,a1={name:"ext:mvf-traversability",schema:P3,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Ee(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Ee(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var s,a;let n=(s=e.match(O3))==null?void 0:s[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(a=e.match(F3))==null?void 0:a[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[n1,o1,i1,s1]};c();c();function c1(e){return e.replace(/^g_/,"s_")}o(c1,"toSpaceId");function S3(e){return e.replace(/^g_/,"o_")}o(S3,"toObstructionId");function E3(e){return e.replace(/^g_/,"w_")}o(E3,"toWindowId");function T3(e){return e.replace(/^g_/,"ar_")}o(T3,"convertAreaId");function v3(e,t,r){switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":{let n=[],i=0,s=e.geometry.type.replace("Multi","");for(let a of e.geometry.coordinates)n.push(Y(S({},e),{geometry:{type:s,coordinates:a},properties:Y(S({},e.properties),{id:"".concat(t,"-").concat(i++),kind:r})}));return n}default:return[Y(S({},e),{properties:Y(S({},e.properties),{id:t,kind:r})})]}}o(v3,"splitMultiPartGeometryFeatureWithNewId");function la(e,t,r,n){let i=new Map;for(let{feature:s,floorId:a}of e){let f=s.properties.id,p=n.get(f);if(t.has(f)){let d=v3(s,r(f),p),l=d.map(g=>g.properties.id),m=l.map(g=>({geometryId:g,floorId:a}));i.set(f,{ids:l,features:d,anchors:m})}}return i}o(la,"mapGeometryToOtherIds");function f1(e){var p,d,l;let t={space:new Map,obstruction:new Map,area:new Map,window:new Map};if(!e.geometry)return t;let r=new Map(Object.values((p=e.kinds)!=null?p:{}).filter(m=>m!==void 0).flatMap(_e)),n=_e(e.geometry).flatMap(([m,g])=>{var b;return((b=g==null?void 0:g.features)!=null?b:[]).map(P=>({feature:P,floorId:m}))}).flat(),i=new Set(Object.values((d=e.walkable)!=null?d:{}).filter(m=>m!==void 0).flatMap(Ee)),s=new Set(Object.values((l=e.nonwalkable)!=null?l:{}).filter(m=>m!==void 0).flatMap(Ee)),a=new Set(Array.from(r.entries()).filter(([m,g])=>g==="area").map(([m])=>m)),f=new Set(Array.from(r.entries()).filter(([m,g])=>g==="window").map(([m])=>m));return i.size>0&&(t.space=la(n,i,c1,r)),s.size>0&&(t.obstruction=la(n,s,S3,r)),a.size>0&&(t.area=la(n,a,T3,r)),f.size>0&&(t.window=la(n,f,E3,r)),i.size===0&&s.size===0&&a.size===0&&(t.space=la(n,new Set(n.map(m=>m.feature.properties.id)),c1,r)),t}o(f1,"createGeometryMaps");function u1(e){let t=A3(e),r=f1(e),n=j3(e);return{geometryMaps:r,nodesByGeometryId:t,geometryFeatureById:n}}o(u1,"buildBuilderOptions");function A3(e){var r,n,i;let t=new Map;for(let s of Object.values((r=e.nodes)!=null?r:{}))for(let a of(n=s==null?void 0:s.features)!=null?n:[])if(a.properties.geometryIds.length>0)for(let f of a.properties.geometryIds){let p=(i=t.get(f))!=null?i:[];p.push(a.properties.id),t.set(f,p)}return t}o(A3,"buildNodesByGeometryId");function j3(e){var r,n;let t=new Map;for(let i of Object.values((r=e.geometry)!=null?r:{}))for(let s of(n=i==null?void 0:i.features)!=null?n:[])t.set(s.properties.id,s);return t}o(j3,"buildGeometryFeatureById");c();function p1(e,t){if(!e.annotations||!e.annotationSymbols||!e.geometry)return{};let r={};for(let[n,i]of _e(e.annotations)){if(!i||i.length===0||!e.geometry[n]||e.geometry[n].features.length===0)continue;let s=new Map(e.geometry[n].features.map(f=>[f.properties.id,f])),a={type:"FeatureCollection",features:[]};for(let f of i){let p=s.get(f.geometryId);if(!p||p.geometry.type!=="Point")continue;let d={id:f.id,externalId:f.externalId,symbolId:f.symbolKey};a.features.push({type:"Feature",geometry:p.geometry,properties:d})}r[n]=a}return{annotation:r}}o(p1,"buildAnnotations");c();function l1(e,{nodesByGeometryId:t}){var a,f,p,d,l,m,g;let r={"connection.json":[],entrance:{}},n=(a=e.navigationFlags)==null?void 0:a[ph.accessible],i=(f=e.navigationFlags)==null?void 0:f[ph.outdoors],s=new Map(Object.values((p=e.geometry)!=null?p:{}).flatMap(b=>{var P;return(P=b==null?void 0:b.features)!=null?P:[]}).map(b=>[b.properties.id,b]));for(let b of(d=e.connections)!=null?d:[]){if(gh(b,s)){let O=k3(b,s,t,i);for(let[N,A]of O)r.entrance[N]||(r.entrance[N]={type:"FeatureCollection",features:[]}),r.entrance[N].features.push(A);continue}let P=n!=null&&b.entrances.every(O=>es(O,n))&&b.exits.every(O=>es(O,n)),F=Array.from(new Set([...b.entrances.map(O=>t.get(O.geometryId)),...b.exits.map(O=>t.get(O.geometryId))].flat().filter(O=>O!=null))),w={id:b.id,externalId:(m=(l=b.details)==null?void 0:l.externalId)!=null?m:"",type:b.type,accessible:P,nodes:F};(g=b.details)!=null&&g.name&&(w.details={name:b.details.name}),b.extra&&(w.extra=b.extra),r["connection.json"].push(w)}return r}o(l1,"buildConnections");function gh(e,t){return e.type==dh.door&&e.entrances.every(r=>{let n=t.get(r.geometryId);return(n==null?void 0:n.geometry.type)==="LineString"})}o(gh,"isLineDoor");function k3(e,t,r,n){var s,a;if(e.type!==dh.door)return[];let i=[];for(let f of e.entrances){let p=t.get(f.geometryId);if((p==null?void 0:p.geometry.type)==="LineString"){let d={type:"Feature",geometry:p.geometry,properties:{id:e.id,externalId:(a=(s=e.details)==null?void 0:s.externalId)!=null?a:"",isExterior:_3(e,n)}},l=e.details;l&&(d.properties.details={name:l.name,description:l.description},l.icon&&(d.properties.details.images=[{url:l.icon,altText:"".concat(l.name," icon")}]));let m=r.get(f.geometryId);m&&m.length>0&&(d.properties.node=m[0]),i.push([f.floorId,d])}}return i}o(k3,"buildEntranceFeaturesFromConnection");function _3(e,t){return e.entrances.some(r=>es(r,t))||e.exits.some(r=>es(r,t))}o(_3,"isExterior");c();function m1(e,{geometryMaps:t,nodesByGeometryId:r}){var N,A,k,R,V,J,D,U,ae,se,M,le,ce,Te,Ie,Ke,ft,xe,xt,bt,Ft,St,ht;if(!e.enterprise)return{};let n={categories:[],locations:[],locationInstances:[],layers:[],venue:{slug:"",name:"",externalId:"",defaultLanguage:{name:"",code:""},languages:[]}},i=(N=e.manifest)==null?void 0:N.features[0];if(i&&(n.venue.defaultFloor=i.properties.defaultFloor,n.venue.tzid=i.properties.tzid,n.venue.name=i.properties.name),e.enterprise.venue){let X=e.enterprise.venue;n.venue=Y(S({},n.venue),{slug:X.slug,name:(A=X.details.name)!=null?A:n.venue.name,externalId:(k=X.details.externalId)!=null?k:"",defaultLanguage:X.defaultLanguage,languages:X.languages,countrycode:X.countrycode,coverImage:X.coverImage,logo:X.logo,icon:X.details.icon,extra:X.extra,mappedinWebUrl:X.mappedinWebUrl,operationHours:X.operationHours,topLocations:X.topLocations})}let s=new Map,a=new Map,f=e.locations,p=e.enterprise.locations;if(f&&p){let X=new Map(f.map(ee=>[ee.id,ee]));for(let ee of p){let Z=X.get(ee.locationId);if(Z){let te=Z.details,I={id:ee.id,name:te.name,externalId:(R=te.externalId)!=null?R:"",type:ee.type,sortOrder:ee.sortOrder,amenity:ee.amenity,description:te.description,extra:Z.extra,links:Z.links,operationHours:Z.openingHours,gallery:ee.gallery,logo:Z.logo,shortName:te.shortName,picture:ee.picture,showFloatingLabelWhenImagePresent:ee.showFloatingLabelWhenImagePresent,showLogo:ee.showLogo,siblingGroups:ee.siblingGroups,states:ee.states,tags:ee.tags,spaces:[],nodes:[],polygons:[]};Z.phone&&(I.phone={number:Z.phone});let _=d1(Z.social);Z.website&&(_.website=Z.website.url),I.social=_;for(let $ of Z.geometryAnchors){let K=t.space.get($.geometryId);if(K){let q=new Set(K.features.filter(ie=>ie.geometry.type==="Polygon").map(ie=>ie.properties.id));for(let ie of K.anchors)I.spaces.push({floor:ie.floorId,id:ie.geometryId}),q.has(ie.geometryId)&&I.polygons.push({map:ie.floorId,id:ie.geometryId})}let L=r.get($.geometryId);for(let q of L!=null?L:[])I.nodes.push({map:$.floorId,id:q})}n.locations.push(I);for(let $ of Z.categories)s.set($,[...(V=s.get($))!=null?V:[],ee.id]);a.set(ee.id,Z.categories)}}}let d=e.enterprise.locationInstances,l=e.locationInstances;if(d&&l){let X=new Map(l.map(Z=>[Z.id,Z])),ee=[];for(let Z of d){let te=X.get(Z.locationInstanceId);if(te){let I={id:Z.id,parent:Z.parentId,name:(J=te.details)==null?void 0:J.name,externalId:(D=te.details)==null?void 0:D.externalId,type:Z.type,sortOrder:Z.sortOrder,amenity:Z.amenity,description:(U=te.details)==null?void 0:U.description,extra:te.extra,links:te.links,operationHours:te.openingHours,gallery:Z.gallery,picture:Z.picture,showFloatingLabelWhenImagePresent:Z.showFloatingLabelWhenImagePresent,showLogo:Z.showLogo,siblingGroups:Z.siblingGroups,states:Z.states,tags:Z.tags,logo:te.logo,shortName:(ae=te.details)==null?void 0:ae.shortName};te.phone&&(I.phone={number:te.phone});let _=d1((se=te.social)!=null?se:[]);if(te.website&&(_.website=te.website.url),Object.keys(_).length>0&&(I.social=_),(M=te.geometryAnchors)!=null&&M.length){let $=te.geometryAnchors.flatMap(K=>{var L,q;return(q=(L=t.space.get(K.geometryId))==null?void 0:L.anchors)!=null?q:[]});$.length>0&&(I.spaces=$.map(K=>({floor:K.floorId,id:K.geometryId})))}if(te.geometryAnchors){I.spaces=[],I.polygons=[],I.nodes=[];for(let $ of te.geometryAnchors){let K=t.space.get($.geometryId);if(K){let q=new Set(K.features.filter(ie=>ie.geometry.type==="Polygon").map(ie=>ie.properties.id));for(let ie of K.anchors)I.spaces.push({floor:ie.floorId,id:ie.geometryId}),q.has(ie.geometryId)&&I.polygons.push({map:ie.floorId,id:ie.geometryId})}let L=r.get($.geometryId);for(let q of L!=null?L:[])I.nodes.push({map:$.floorId,id:q})}}ee.push(I)}}ee.length>0&&(n.locationInstances=ee)}let m=e.locationCategories,g=e.enterprise.categories;if(m&&g){let X=[],ee=new Map(m.map(_=>[_.id,_])),Z=new Map(g.map(_=>[_.categoryId,_.id])),te=new Map;for(let _ of m){let $=Z.get(_.parent);if($){let K=(le=te.get($))!=null?le:[];K.push(_.id),te.set($,K)}}for(let _ of g){let $=ee.get(_.categoryId);if($){let L=((ce=te.get(_.id))!=null?ce:[]).map(ie=>Z.get(ie)).filter(ie=>ie!==void 0),q={id:_.id,name:$.details.name,externalId:(Te=$.details.externalId)!=null?Te:"",sortOrder:_.sortOrder,children:L,locations:(Ie=s.get(_.categoryId))!=null?Ie:[],icon:$.details.icon,picture:_.picture,color:_.color,extra:$.extra,iconFromDefaultList:_.iconFromDefaultList};X.push(q)}}n.categories=X;let I={};for(let[_,$]of a.entries())I[_]=$.map(K=>Z.get(K)).filter(K=>K!==void 0);n.categoryPriorities=I}let b={};for(let[X,ee]of Object.entries((Ke=e.defaultStyle)!=null?Ke:{}))if(ee.buffer>0){let Z=ee.geometryAnchors.flatMap(te=>{var I,_;return(_=(I=t.space.get(te.geometryId))==null?void 0:I.anchors)!=null?_:[]});b[X]={edgeOffset:ee.buffer,geometryAnchors:Z}}Object.keys(b).length>0&&(n.enterpriseStyles=b);let P=new Map;for(let X of Object.values((ft=e.enterprise.layers)!=null?ft:{}))if(X)for(let[ee,Z]of _e(X)){if(typeof Z!="string")continue;let te=(xe=P.get(Z))!=null?xe:{name:Z,id:"ely_".concat(Z),spaces:[]};te.spaces.push(...(bt=(xt=t.space.get(ee))==null?void 0:xt.anchors.map(I=>({floorId:I.floorId,spaceId:I.geometryId})))!=null?bt:[]),P.set(Z,te)}P.size>0&&(n.layers=Array.from(P.values()));let F=[];for(let X of Object.values((Ft=e.enterprise.textures)!=null?Ft:{}))for(let ee of X){let Z=(St=t.space.get(ee.geometryId))==null?void 0:St.anchors;!Z||Z.length<1||ee.face==="unknown"||ee.surface==="unknown"||F.push({repeat:ee.repeat,offset:ee.offset,rotation:ee.rotation,path:ee.path,face:ee.face,surface:ee.surface,bounds:ee.bounds,geometryAnchors:Z})}F.length>0&&(n.textures=F);let w={};for(let[X,ee]of Object.entries((ht=e.enterprise.floorText)!=null?ht:{})){let Z={type:"FeatureCollection",features:[]};for(let te of ee.features){if(te.properties.align==="unknown")continue;let I={align:te.properties.align,color:te.properties.color,fontFamily:te.properties.fontFamily,fontSize:te.properties.fontSize,rotation:te.properties.rotation,text:te.properties.text,visible:te.properties.visible};"geometryId"in te.properties?I.geometryId=te.properties.geometryId:I.verticalOffset=te.properties.verticalOffset,Z.features.push({type:"Feature",geometry:te.geometry,properties:I})}Z.features.length>0&&(w[X]=Z)}Object.keys(w).length>0&&(n.floorText=w);let O={enterprise:n};if(e.enterprise.textAreas){let X={};for(let[ee,Z]of _e(e.enterprise.textAreas)){let te={type:"FeatureCollection",features:[]};for(let I of Z.features){if(I.properties.align==="unknown")continue;let _={align:I.properties.align,maxWidth:I.properties.maxWidth,maxHeight:I.properties.maxHeight,rotation:I.properties.rotation};"geometryId"in I.properties?_.anchorId=I.properties.geometryId:_.verticalOffset=I.properties.verticalOffset;let $={type:"Feature",geometry:I.geometry,properties:_};te.features.push($)}X[ee]=te}O.textAreas=X}return O}o(m1,"buildEnterprise");var N3=["facebook","instagram","twitter"];function d1(e){let t={};for(let{name:r,url:n}of e){let i=r.toLowerCase();N3.includes(i)&&(t[i]=n)}return t}o(d1,"convertSocials");c();function y1(e,{geometryMaps:t}){if(!e.facade)return{};let r={},n={};for(let[i,s]of _e(e.facade))s&&(n[i]={id:s.id,spaces:s.geometryAnchors.flatMap(({floorId:a,geometryId:f})=>{var p;return(p=t.space.get(f))==null?void 0:p.ids.map(d=>({floorId:a,spaceId:d}))}).filter(a=>a!==void 0)});return Object.keys(n).length>0&&(r.facade=n),r}o(y1,"buildFacade");c();function h1(e,t={}){var i,s,a,f,p,d,l,m,g,b,P,F;let r={type:"FeatureCollection",features:[]},n=[];for(let w of e.floors.features)n.push({id:w.properties.id.replace(/^f_/,"m_"),externalId:(s=(i=w.properties.details)==null?void 0:i.externalId)!=null?s:"",elevation:w.properties.elevation,name:(f=(a=w.properties.details)==null?void 0:a.name)!=null?f:"",shortName:(d=(p=w.properties.details)==null?void 0:p.shortName)!=null?d:"",subtitle:w.properties.subtitle}),r.features.push({type:"Feature",geometry:w.geometry,properties:{id:w.properties.id,externalId:(m=(l=w.properties.details)==null?void 0:l.externalId)!=null?m:"",elevation:w.properties.elevation,name:(b=(g=w.properties.details)==null?void 0:g.name)!=null?b:"",shortName:(F=(P=w.properties.details)==null?void 0:P.shortName)!=null?F:"",subtitle:w.properties.subtitle}});return{"floor.geojson":r,"map.geojson":n}}o(h1,"buildFloors");c();function g1(e,{geometryMaps:t}){var i,s,f,p,d;let r={},n={};for(let[l,m]of _e((i=e.floorImages)!=null?i:{})){let g={features:[],type:"FeatureCollection"};for(let b of(s=m==null?void 0:m.features)!=null?s:[])if("verticalOffset"in b.properties)g.features.push(b);else{let a=b.properties,{geometryId:P}=a,F=Yo(a,["geometryId"]),w=(d=(f=t.space.get(P))==null?void 0:f.ids[0])!=null?d:(p=t.obstruction.get(P))==null?void 0:p.ids[0];if(!w)continue;let O={geometry:b.geometry,properties:Y(S({},F),{anchorId:w}),type:b.type};g.features.push(O)}n[l]=g}return Object.keys(n).length>0&&(r.floorImages=n),r}o(g1,"buildFloorImages");c();function I1(e,t={}){var i,s,a,f,p,d,l;let r=[];for(let m of(i=e==null?void 0:e.floorStacks)!=null?i:[]){let g={id:m.id,floors:m.floors,maps:m.floors,externalId:(a=(s=m.details)==null?void 0:s.externalId)!=null?a:"",name:(p=(f=m.details)==null?void 0:f.name)!=null?p:"",shortName:(l=(d=m.details)==null?void 0:d.shortName)!=null?l:"",type:"Building"};m.defaultFloor&&(g.defaultFloor=m.defaultFloor),r.push(g)}if(e.outdoors){let m={id:"outdoors",floors:e.outdoors.floors,maps:e.outdoors.floors,type:"Outdoor",name:"Outdoors",externalId:"outdoors"};r.push(m)}return{"floorstack.json":r,"mapstack.geojson":r}}o(I1,"buildFloorStacks");c();c();var $1=mu(b1(),1);var U3=o(e=>{let t=e.geometry.coordinates[0],r=0;for(let n=0;n<t.length-1;n++)r+=t[n][0]*t[n+1][1]-t[n+1][0]*t[n][1];return Math.abs(r/2)},"calculateArea"),D3=o((e,t)=>{let[r,n]=e,i=t.geometry.coordinates[0],s=!1;for(let a=0,f=i.length-1;a<i.length;f=a++){let[p,d]=i[a],[l,m]=i[f];d>n!=m>n&&r<(l-p)*(n-d)/(m-d)+p&&(s=!s)}return s},"pointInPolygon"),q3=o(e=>{let t=e.geometry.coordinates[0],r=0,n=0;for(let i=0;i<t.length-1;i++)r+=t[i][0],n+=t[i][1];return{geometry:{coordinates:[r/(t.length-1),n/(t.length-1)]}}},"calculateCenterOfMass"),K3=o(e=>{let t=U3(e),r=Number.isFinite(t)?Math.max(t,1):1;return Math.sqrt(r)*1e-6},"estimatePrecision"),du=o(e=>{try{let r=q3(e).geometry.coordinates;if(!D3(r,e)){let i=(0,$1.default)(e.geometry.coordinates,K3(e));return B([i[0],i[1]])}return B(r)}catch(t){return W(new Error("Unable to calculate center of polygon"))}},"labelCenter");function xh(e){var t;return((t=e==null?void 0:e.geometry)==null?void 0:t.type)==="Polygon"}o(xh,"isPolygonFeature");function w1(e,{geometryMaps:t,nodesByGeometryId:r}){var d,l,m,g,b,P,F,w,O;let n=W3(e.defaultStyle),i={},s={},a={},f={};for(let N of Ee(e.geometry)){let A=e.geometry[N];if(!A)continue;let k=[],R=[],V=[],J=[];for(let D of A.features){let U=D.properties.id,ae=n.has(U),se=(d=r.get(U))!=null?d:[];for(let M of(m=(l=t.space.get(U))==null?void 0:l.features)!=null?m:[])k.push(z3(M,se));for(let M of(b=(g=t.obstruction.get(U))==null?void 0:g.features)!=null?b:[])R.push(G3(M,ae));for(let M of(F=(P=t.area.get(U))==null?void 0:P.features)!=null?F:[])V.push(B3(M,se));for(let M of(O=(w=t.window.get(U))==null?void 0:w.features)!=null?O:[])J.push(V3(M))}k.length>0&&(i[N]={type:"FeatureCollection",features:k.filter(D=>D!==null)}),R.length>0&&(s[N]={type:"FeatureCollection",features:R.filter(D=>D!==null)}),V.length>0&&(a[N]={type:"FeatureCollection",features:V.filter(D=>D!==null)}),J.length>0&&(f[N]={type:"FeatureCollection",features:J.filter(D=>D!==null)})}let p={space:i,obstruction:s};return Object.keys(a).length>0&&(p.area=a),Object.keys(f).length>0&&(p.window=f),p}o(w1,"buildGeometry");function z3(e,t){var n,i;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":return null}let r={type:"Feature",geometry:e.geometry,properties:{destinationNodes:t,id:e.properties.id,externalId:(i=(n=e.properties.details)==null?void 0:n.externalId)!=null?i:"",kind:e.properties.kind}};return e.properties.details&&(r.properties.details={name:e.properties.details.name,description:e.properties.details.description,images:e.properties.details.icon?[{url:e.properties.details.icon,altText:e.properties.details.name?"".concat(e.properties.details.name," icon"):"icon"}]:void 0}),xh(r)&&(r.properties.center=du(r).unwrapOr(void 0)),r}o(z3,"buildSpace");function G3(e,t){var i,s;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"Point":return null}let r=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:r.id,externalId:(s=(i=r.details)==null?void 0:i.externalId)!=null?s:"",entrances:[],kind:r.kind,footprintComponent:t}};return xh(n)&&(n.properties.center=du(n).unwrapOr(void 0)),r.details&&(n.properties.details={name:r.details.name,description:r.details.description,images:r.details.icon?[{url:r.details.icon,altText:r.details.name?"".concat(r.details.name," icon"):"icon"}]:void 0}),n}o(G3,"buildObstruction");function B3(e,t){var i,s;if(e.geometry.type!=="Polygon")return null;let r=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:r.id,externalId:(s=(i=r.details)==null?void 0:i.externalId)!=null?s:"",destinationNodes:t}};return xh(n)&&(n.properties.center=du(n).unwrapOr(void 0)),r.details&&(n.properties.details={name:r.details.name,description:r.details.description,images:r.details.icon?[{url:r.details.icon,altText:r.details.name?"".concat(r.details.name," icon"):"icon"}]:void 0}),n}o(B3,"buildArea");function V3(e){return e.geometry.type!=="LineString"?null:{type:"Feature",geometry:e.geometry,properties:{id:e.properties.id}}}o(V3,"buildWindow");function W3(e){var n,i,s,a;let t=[...(i=(n=e==null?void 0:e.ExteriorWalls)==null?void 0:n.geometryAnchors)!=null?i:[],...(a=(s=e==null?void 0:e.Walls)==null?void 0:s.geometryAnchors)!=null?a:[]];return new Set(t.map(f=>f.geometryId))}o(W3,"calculateFootprintGeometry");c();function P1(e,{geometryMaps:t,geometryFeatureById:r}){var i,s,a,f,p,d,l,m,g,b,P,F,w;if(!e.locationCategories&&!e.locations)return{};let n={};if((i=e.locationCategories)!=null&&i.length){let O=[];for(let N of e.locationCategories){let A={id:N.id,name:N.details.name,icon:(s=N.details.icon)!=null?s:""};N.parent&&(A.parent=N.parent),O.push(A)}n["category.json"]=O}if((a=e.locations)!=null&&a.length){let O=H3(e,{geometryFeatureById:r}),N=[];for(let A of e.locations){let k={id:A.id,name:A.details.name,categories:A.categories,spaces:[],obstructions:[],areas:[],annotations:[],connections:[],entrances:[],links:A.links,openingHoursSpecification:(f=A.openingHours)!=null?f:[],pictures:A.images,social:A.social,description:A.details.description,externalId:A.details.externalId,icon:A.details.icon,logo:A.logo,phone:A.phone,website:A.website};N.push(k);for(let{geometryId:R,floorId:V}of A.geometryAnchors)k.spaces.push(...(d=(p=t.space.get(R))==null?void 0:p.ids.map(J=>({id:J,floor:V})))!=null?d:[]),k.obstructions.push(...(m=(l=t.obstruction.get(R))==null?void 0:l.ids.map(J=>({id:J,floor:V})))!=null?m:[]),k.areas.push(...(b=(g=t.area.get(R))==null?void 0:g.ids.map(J=>({id:J,floor:V})))!=null?b:[]),k.entrances.push(...(P=O.entrancesByGeometryId.get(R))!=null?P:[]),k.connections.push(...(F=O.connectionsByGeometryId.get(R))!=null?F:[]),k.annotations.push(...(w=O.annotationsByGeometryId.get(R))!=null?w:[])}n["location.json"]=N}return n}o(P1,"buildLocations");function H3(e,{geometryFeatureById:t}){var n,i,s;let r={annotationsByGeometryId:new Map,connectionsByGeometryId:new Map,entrancesByGeometryId:new Map};if(e.annotations)for(let[a,f]of _e(e.annotations))for(let p of f!=null?f:[]){let d=p.geometryId,l=p.id,m=(n=r.annotationsByGeometryId.get(d))!=null?n:[];m.push({floor:a,id:l}),r.annotationsByGeometryId.set(d,m)}if(e.connections)for(let a of e.connections){let f=gh(a,t),p=Array.from(new Map([...a.entrances,...a.exits].map(d=>["".concat(d.geometryId,"_").concat(d.floorId),d])).values());for(let d of p){let l=d.geometryId;if(f){let m=(i=r.entrancesByGeometryId.get(l))!=null?i:[];m.push({floor:d.floorId,id:a.id}),r.entrancesByGeometryId.set(l,m)}else{let m=(s=r.connectionsByGeometryId.get(l))!=null?s:[];m.push(a.id),r.connectionsByGeometryId.set(l,m)}}}return r}o(H3,"buildLocationAttachmentMaps");c();function O1(e,t){let r={features:[],type:"FeatureCollection"},n={"manifest.geojson":r},i=e.manifest;if(i.features.length>0){let s=i.features[0],a=s.properties,f={type:"Feature",geometry:s.geometry,properties:{folder_struct:[],version:"2.0.0",time:a.time,name:a.name,naturalBearing:a.naturalBearing,tzid:a.tzid,map:a.mapId,org_id:a.orgId,language:a.language}};r.features.push(f)}return n}o(O1,"buildManifest");c();function F1(e,{geometryMaps:t}){var f,p,d,l,m,g,b,P,F,w,O,N,A,k,R;let r={"node.geojson":{type:"FeatureCollection",features:[]}},n=r["node.geojson"].features,i=new Map;for(let V of(p=(f=e.floors)==null?void 0:f.features)!=null?p:[])i.set(V.properties.id,V.properties.elevation);let s=new Map;for(let V of Object.values((d=e.nodes)!=null?d:{}))for(let J of(l=V==null?void 0:V.features)!=null?l:[])for(let D of J.properties.geometryIds)s.set(D,[...(m=s.get(D))!=null?m:[],J.properties.id]);let a=new Map;for(let V of(g=e.connections)!=null?g:[]){let J=V.exits.map(D=>{var U;return Y(S({},D),{nodes:(U=s.get(D.geometryId))!=null?U:[]})});for(let D of V.entrances){let U=(b=s.get(D.geometryId))!=null?b:[];for(let ae of U)for(let se of J){let M=Math.abs(((P=i.get(D.floorId))!=null?P:0)-((F=i.get(se.floorId))!=null?F:0))*V.floorCostMultiplier,le=(w=a.get(ae))!=null?w:[];le.push(...se.nodes.map(ce=>({id:ce,weight:M+V.entryCost}))),a.set(ae,le)}}}for(let[V,J]of _e((O=e.nodes)!=null?O:{}))for(let D of(N=J==null?void 0:J.features)!=null?N:[]){let U=(A=t.space.get(D.properties.geometryIds[0]))==null?void 0:A.features[0],ae=(U==null?void 0:U.geometry.type)==="Point"&&((k=U==null?void 0:U.properties.details)!=null&&k.externalId)?U.properties.details.externalId:"",se={type:"Feature",geometry:D.geometry,properties:{id:D.properties.id,floor:V,space:D.properties.geometryIds.map(M=>{var le;return(le=t.space.get(M))==null?void 0:le.ids}).flat().filter(M=>M!==void 0),neighbors:[...D.properties.neighbors.map(M=>({id:M.id,weight:M.extraCost})),...(R=a.get(D.properties.id))!=null?R:[]],map:V,externalId:ae}};n.push(se)}return r}o(F1,"buildNodes");c();function Z3(e,t){var n;let r={};for(let i of e){let s=t.get(i);s&&((n=r[s])!=null||(r[s]=[]),r[s].push(i))}return r}o(Z3,"groupGeometryByType");function S1(e,{geometryMaps:t}){var a,f,p;if(!e.defaultStyle)return{};let r={},n={};r["styles.json"]=n;let i=[...Array.from(t.space.values()).map(d=>d.features),...Array.from(t.obstruction.values()).map(d=>d.features)],s=new Map(i.flatMap(d=>d.map(l=>[l.properties.id,l.geometry.type])));for(let[d,l]of _e(e.defaultStyle)){let m=Z3(l.geometryAnchors.flatMap(g=>{var b,P,F,w;return[...(P=(b=t.space.get(g.geometryId))==null?void 0:b.ids)!=null?P:[],...(w=(F=t.obstruction.get(g.geometryId))==null?void 0:F.ids)!=null?w:[]]}),s);if(m.Point&&m.Point.length>0){let g={points:Array.from(m.Point.values()),showImage:((a=l.extra)==null?void 0:a.showImage)!==void 0?((f=l.extra)==null?void 0:f.showImage)===!0:l.opacity!==0};n["".concat(d,".Point")]=g}if(m.LineString&&m.LineString.length>0){let g={lineStrings:Array.from(m.LineString.values()),altitude:l.altitude,color:l.color,height:l.height,opacity:l.opacity,width:l.buffer};n["".concat(d,".LineString")]=g}if(m.Polygon&&m.Polygon.length>0){let g={polygons:Array.from(m.Polygon.values()),altitude:l.altitude,color:l.color,height:l.height,opacity:l.opacity};((p=l.extra)==null?void 0:p.showImage)!==void 0&&(g.showImage=l.extra.showImage===!0),n["".concat(d,".Polygon")]=g}}return r}o(S1,"buildStyles");var J3=mE().extendOptional(lT).extendOptional(ZT).extendOptional(xT).extendOptional(zT).extendOptional(a1).extendOptional(PT).extendOptional(TT).extendOptional(QT).extendOptional(r1).extendOptional(UT).extendOptional(kT).extendOptional(mS).extendOptional(PE).extendOptional(aT).build().expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");function Y3(e){let t=u1(e),r=h1(e,t),n=w1(e,t),i=F1(e,t),s=l1(e,t),a=S1(e,t),f=I1(e,t),p=g1(e,t),d=y1(e,t),l=p1(e,t),m=P1(e,t),g=m1(e,t),b=O1(e,t);return S(S(S(S(S(S(Y(S(S(S(S(S(S({},r),n),i),s),a),f),{"tileset.json":e.tileset}),p),d),l),m),g),b)}o(Y3,"convertUnzippedStandardMVFv3ToParsedMVFv2");async function X3(e){let t=await J3.decompress(e);return t.isOk()?B(Y3(t.value)):W(t.error)}o(X3,"extractAndConvertMVFv3");var fxe=o(e=>{try{return LP(e)?Oh(e):!1}catch(t){return!1}},"check");export{Aa as AnchoredFloorTextUnknownObstructionError,va as AnchoredFloorTextUnknownSpaceError,ja as AnchoredImageUnknownObstructionError,Ta as AnchoredImageUnknownSpaceError,ba as ConnectionUnknownNodeError,Ba as DuplicateTilesetKeyError,Da as EnterpriseCyclicalCategoryReferenceError,Ua as EnterpriseInconsistentMapError,qa as EnterpriseInvalidTimeZoneError,_a as EnterpriseLayerUnknownSpaceError,Ma as EnterpriseLocationUnknownSpaceError,Na as EnterpriseStyleGeometryAnchorsUnknownSpaceError,Ra as EnterpriseTextureUnknownSpaceError,La as EnterpriseUnknownCategoryError,ns as EnterpriseUnknownLocationError,os as EnterpriseUnknownMapError,za as FacadeUnknownFloorError,Ka as FacadeUnknownFloorStackError,Ga as FacadeUnknownSpaceError,ya as FloorStackUnknownMapError,$t as IntegrityError,Ea as InvalidStyleError,$a as NodeUnknownFloorError,Pa as NodeUnknownNeighborError,wa as NodeUnknownSpaceError,Ia as ObstructionCollectionUnknownMapError,xa as ObstructionUnknownEntranceError,f8 as PUBLIC_HOLIDAYS,ha as SpaceCollectionUnknownMapError,ga as SpaceUnknownNodeError,Fa as StyleUnknownLineStringError,Sa as StyleUnknownPointError,Oa as StyleUnknownPolygonError,Ca as TextAreaUnknownObstructionError,ka as TextAreaUnknownSpaceError,fxe as check,X3 as extractAndConvertMVFv3,NN as getMvfValidationErrors,qN as rawToParsedMVF,LP as validateMvf,Oh as verifyMvfIntegrity};
|