PageSourceSearch

https://stroseoflimabrooklyn.org/build/_route-DVYMX2zv.js

js stroseoflimabrooklyn.org collected 2026-09-27 04:31:50 UTC 197,817 bytes, 16 lines download raw bytes

1import{j as h,d as E,ak as es,aN as ts,ay as jo,g as sn,r as ge,bc as Po,y as To,aj as Ae,an as Io}from"./index-yjs0jCN1.js";import{s as rs,y as Ao,_ as ns,z as _a}from"./form-M3P2QDd6.js";import{M as Ro,I as Oo,K as as,P as Ar,L as Co,m as ss,a6 as No,u as ko,Q as xo}from"./pagebuilder_section-nn2rM2Nn.js";import{c as $e}from"./index-Cll4-HYu.js";import{f as os}from"./index-DhA4GXGS.js";import"./inspect-D9zWrUpL.js";import"./gql-BXUds3tn.js";import"./ApolloContext-MQGfuinR.js";import"./Helmet-D7EguiNG.js";import"./index-CYkanOlq.js";const Do={label:{type:"string",description:"A label for the field",t:{label:"Label"},view:{placeholder:"Label"}},helpText:{type:"string",description:"Visible help text for the field",t:{label:"Help Text"},view:{placeholder:"Help Text"}}},Mo={heading:{type:"string",description:"A heading for a static element"},paragraph:{type:"string",description:"A paragraph for a static element"},divider:{type:"boolean",description:"Add a divider for a static element"},spacer:{type:"boolean",description:"Add a space for a  static element"}},on=["string","number","boolean","multiplechoice","image","text_area","file_upload"],Fo=[...on,"static_element"],Vo={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",title:"Fieldset Editor",description:"A fieldset editor schema",t:{label:"Fieldset Editor"},properties:{fields:{type:"array",description:"A list of fields for a fieldset",widget:"FieldsetList",t:{label:"Custom Fields"},items:{description:"Items on a single field",type:"object",required:[],properties:{__id:{type:"string",description:"A unique identifier for the field",hidden:!0,format:"uuid"},type:{type:"string",description:"The type of field",enum:Fo,widget:"select",default:"string",t:{label:"Type",enum:{string:"Text",boolean:"Switch",multiplechoice:"Multiple Choice",text_area:"Multi-line Text",static_element:"Static Element"}}}},allOf:[{if:{properties:{type:{enum:on}}},then:{properties:Do}},{if:{properties:{type:{const:"multiplechoice"}}},then:{properties:{enum:{type:"array",defaultItemValue:"",t:{label:"Choices"},items:{type:"string",view:{label:!1,placeholder:"Option"},t:{label:"Option"}}}}}},{if:{properties:{type:{const:"static_element"}}},then:{properties:Mo}}]}}}},zo=({children:e})=>e,is={$schema:"https://json-schema.org/draft/2019-09/schema",type:"string",widget:"text_area",properties:{maxLength:{type:"number"},value:{type:"string"},view:{type:"object",properties:{size:{type:"string"},placeholder:{type:"string"},rows:{type:"number"},helpText:{type:"string"}}}}},cs={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"static_element",properties:{heading:{type:"string"},paragraph:{type:"string"},divider:{type:"boolean"},spacer:{type:"boolean"}}},ls={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"file_upload",properties:{"@id":{type:["string","number"]},url:{type:"string"}}},ds=e=>e?!!on.includes(e.type):!1,qo=e=>e.type==="static_element",Uo={required:[],fields:[]};function Lo(e=Uo){const t={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",additionalProperties:!1,required:[],properties:{},$defs:{image:rs,text_area:is,static_element:cs,file_upload:ls}};for(const r of e.fields){if(ds(r)){const{__id:n,type:a="string",label:s,helpText:o,...c}=r;a==="multiplechoice"?t.properties[n]={type:"string",widget:"select",t:{label:s,helpText:o},...c}:a==="image"?t.properties[n]={$ref:"#/$defs/image",mode:"id",type:"image",t:{label:s,helpText:o},view:{size:!1,aspectRatio:"16 / 9"},...c}:a==="file_upload"?t.properties[n]={$ref:"#/$defs/file_upload",mode:"id",type:"file_upload",t:{label:s,helpText:o},...c}:a==="text_area"?t.properties[n]={$ref:"#/$defs/text_area",type:"string",widget:"text_area",t:{label:s,helpText:o},view:{rows:6},...c}:t.properties[n]={type:a,t:{label:s,helpText:o},...c}}if(qo(r)){const{__id:n,heading:a,paragraph:s,divider:o,spacer:c}=r;t.properties[n]={$ref:"#/$defs/static_element",type:"static_element",widget:"static_element",heading:a,paragraph:s,divider:o,spacer:c}}}return t.required=e.required,t}function Ho(e={type:"object"}){const t={required:[],fields:[]};return"type"in e&&e.type==="object"&&"properties"in e&&(t.required=e.required||[],t.fields=Object.entries(e.properties).map(([r,n])=>{const{type:a="string",t:s,$ref:o,...c}=n;let i=a;if(i==="string"&&n.enum)i="multiplechoice";else if(o==="#/$defs/image")i="image";else if(o==="#/$defs/text_area")i="text_area";else if(o==="#/$defs/file_upload")i="file_upload";else if(o==="#/$defs/static_element")return{__id:r,type:"static_element",...c};return{__id:r,type:i,label:s==null?void 0:s.label,helpText:s==null?void 0:s.helpText,...c}})),t}const Ko=({schema:e,required:t,onChange:r,storeKeys:n,notAddable:a,listSize:s,listRequired:o,t:c})=>{if(s>=e.get("maxItems",1/0)||a||e.get("readOnly"))return null;const l=c(n.last(),{relative:"add_item",fallback:"Add new field"},e);return!e.get("readOnly")&&!a?h.jsx(E.HStack,{children:h.jsx(E.Button,{wide:!0,size:"small",onPress:()=>{r({storeKeys:n,scopes:["value","internal"],type:"list-item-add",itemValue:Ro({__id:Oo.Utils.uuid()}),schema:e,required:t})},iconBefore:E.AddIcon,appearance:"outline",css:{justifyContent:"flex-start",padding:"$5 $6"},children:l})}):null};function us({value:e}){return e?h.jsx(E.Text,{size:"caption1",children:e}):null}function Bo({properties:e,property:t,ownKeys:r}){var o;const{t:n}=as(),{valueSchemas:a}=Ao(Co([t]),e.get(t),n),s=(o=e.get(t))==null?void 0:o.get("default");return h.jsx(Ar,{showValidity:!1,schema:e,parentSchema:e,storeKeys:r.push(t),schemaKeys:r.push(t),WidgetOverride:({value:c})=>{var i;return h.jsx(us,{value:(i=a==null?void 0:a.find(({value:l})=>l===(c||s)))==null?void 0:i.text})},t:n})}function ba({properties:e,property:t,ownKeys:r}){var s;const{t:n}=as();if((s=e.get(t))!=null&&s.get("enum"))return h.jsx(Bo,{properties:e,property:t,ownKeys:r,t:n});const a=n(r.get(-2),void 0,e.get(t));return h.jsx(Ar,{showValidity:!1,schema:e,parentSchema:e,storeKeys:r.push(t),schemaKeys:r.push(t),WidgetOverride:({value:o})=>h.jsx(us,{value:o||a}),t:n})}const Go=E.styled("div",{backgroundColor:"$navy",color:"$white",padding:"$4 $3",alignSelf:"stretch",display:"flex",alignItems:"center",justifyContent:"center",aspectRatio:"3 / 2",borderRadius:"$1",height:"$8",variants:{type:{string:{backgroundColor:"$jade"},number:{backgroundColor:"$yellow"},boolean:{backgroundColor:"$red"},multiplechoice:{backgroundColor:"$steel"},image:{backgroundColor:"$purple"},text_area:{backgroundColor:"$jade"},static_element:{backgroundColor:"$coral"},file_upload:{backgroundColor:"$rose"}}}}),Wo={number:h.jsx(E.SinglelinetextTypeIcon,{}),string:h.jsx(E.SinglelinetextTypeIcon,{}),boolean:h.jsx(E.BooleanTypeIcon,{}),multiplechoice:h.jsx(E.MultiplechoiceTypeIcon,{}),image:h.jsx(E.ImageTypeIcon,{}),text_area:h.jsx(E.MultilinetextTypeIcon,{}),static_element:h.jsx(E.DocumentPlusIcon,{}),file_upload:h.jsx(E.FileAddIcon,{}),default:h.jsx(E.QuestionCircleIcon,{})};function Jo({properties:e,property:t,ownKeys:r}){return h.jsx(Ar,{showValidity:!1,schema:e,parentSchema:e,schemaKeys:r.push(t),storeKeys:r.push(t),WidgetOverride:({value:n="string"})=>{const a=Wo[n];return h.jsx(Go,{type:n,children:a})}})}const Yo=E.styled($e.motion.div,E.Card,{cursor:"grab","&:active":{cursor:"grabbing"},variants:{isDisabled:{true:{pointerEvents:"none"}}}}),Zo={expanded:{width:"105%",boxShadow:E.theme.shadows[2].computedValue},collapsed:{width:"100%",boxShadow:E.theme.shadows[1].computedValue}},Qo={expanded:{height:E.theme.sizes[12].computedValue,paddingInline:E.theme.space[4].computedValue,paddingBottom:E.theme.space[3].computedValue,paddingTop:E.theme.space[6].computedValue},collapsed:{height:E.theme.sizes[10].computedValue,paddingInline:E.theme.space[1].computedValue,paddingBlock:E.theme.space[1].computedValue}},Xo=({id:e,fieldValue:t,t:r,listRequired:n,onChange:a,index:s,listSize:o,schema:c,storeKeys:i,schemaKeys:l,showValidity:d,notDeletable:u})=>{const y=i.push(s),b=c.get("items"),_=c.get("readOnly");u||(u=o<=c.get("minItems",0));const[j,w]=es(!1);return ts("Escape",()=>w(!1)),h.jsx(E.VStack,{align:"center",children:h.jsx($e.MotionConfig,{transition:{type:"tween"},children:h.jsxs(Yo,{border:!0,css:{width:"100%",boxShadow:"$1"},variants:Zo,initial:"collapsed",animate:j?"expanded":"collapsed",isDisabled:_,children:[h.jsxs(E.HStack,{as:$e.motion.div,space:"none",align:"center",variants:Qo,initial:"collapsed",animate:j?"expanded":"collapsed",children:[h.jsxs(E.HStack,{space:"small",align:"center",children:[h.jsx(Jo,{properties:b.get("properties"),property:"type",ownKeys:y}),h.jsx(E.Spacer,{size:"0"}),h.jsx(ba,{properties:b.get("properties"),property:"label",ownKeys:y}),h.jsx(E.Separator,{orientation:"vertical",css:{height:"$6"}}),h.jsx(ba,{properties:b.get("properties"),property:"type",ownKeys:y})]}),h.jsx(E.Spacer,{css:{width:"auto",flexGrow:"1"}}),h.jsx(E.Button,{name:`fieldset_item_${s}`,onPress:w,...!j&&{css:{size:"$7"},appearance:"minimal"},children:j?"Save":h.jsx(E.PencilIcon,{})})]}),h.jsx($e.AnimatePresence,{initial:!1,children:j&&h.jsxs(E.VStack,{as:$e.motion.div,initial:"collapsed",animate:"expanded",exit:"collapsed",css:{gap:0},variants:{expanded:{height:"auto",opacity:1},collapsed:{height:0,overflow:"hidden",opacity:0}
1},children:[h.jsx(E.VStack,{wrap:!1,css:{padding:"$4"},children:h.jsx(Ar,{showValidity:d,schema:b,parentSchema:c,storeKeys:y,schemaKeys:l==null?void 0:l.push("items"),t:r})}),h.jsx(E.Separator,{}),h.jsxs(E.HStack,{style:{padding:"8px 24px 16px"},align:"center",children:[ds(t)&&h.jsx(E.Switch,{label:"Required",labelPlacement:"start",space:"large",selected:n,onChange:g=>{a({storeKeys:y.pop().pop(),scopes:["value"],type:"update",updater:({value:S})=>{const R=S.toJS();return{value:No({...R,required:g?new Set([...R.required,e]):R.required.filter(k=>k!==e)})}},schema:c,required:n})}}),h.jsx(E.Spacer,{css:{width:"auto",flexGrow:"1"}}),!_&&!u?h.jsx(E.Button,{size:"large",css:{svg:{width:"$4"}},onPress:()=>a({storeKeys:i,scopes:["value","internal"],type:"list-item-delete",index:s,schema:c,required:n}),appearance:"minimal",icon:E.TrashIcon}):null]})]})})]})})})},ei=ss(Xo);function ti({storeKeys:e,schemaKeys:t,schema:r,listSize:n,listItemIds:a,itemValues:s,onChange:o,showValidity:c,errors:i,required:l,requiredItems:d,t:u}){var S;const y=r.get("notSortable"),b=r.get("notAddable"),_=r.get("notDeletable"),j=$e.useMotionValue(null),w=((S=e==null?void 0:e.last())==null?void 0:S.toString())??"",g=`${u(w,void 0,r)} ${r.has("maxItems")?`(${n}/${r.get("maxItems")})`:""}`;return h.jsxs(E.Fieldset,{label:g,children:[h.jsx($e.LayoutGroup,{children:h.jsx($e.Reorder.Group,{axis:"y",values:a,onReorder:R=>{const N=j.get();if(!N)return;const k=a.indexOf(N),G=R.indexOf(N);o({storeKeys:e,scopes:["value","internal"],type:"list-item-move",fromIndex:k,toIndex:G,schema:r,required:l})},as:"div",children:h.jsx(E.VStack,{space:"small",children:a.map((R,N)=>h.jsx($e.Reorder.Item,{value:R,onDragStart:()=>j.set(R),as:"div",children:h.jsx(ei,{fieldValue:s[R],id:R,index:N,listSize:n,storeKeys:e,schemaKeys:t,schema:r,onChange:o,listRequired:d.includes(R),showValidity:c,t:u},R||N)},R))})})}),h.jsx(Ko,{schema:r,required:l,storeKeys:e,onChange:o,errors:i,showValidity:c,notAddable:b,notSortable:y,notDeletable:_,listSize:n,t:u})]})}const ri=ss(ti);function fs(e){const{store:t}=ko(),{value:r}=(t==null?void 0:t.extractValues(e.storeKeys))||{},{required:n}=t.valuesToJS(),a=(r==null?void 0:r.map(o=>o==null?void 0:o.get("__id")).toArray())??[],s=((r==null?void 0:r.toJS())??[]).reduce((o,c)=>{const{__id:i,...l}=c;return{...o,[i]:{...l,__id:i}}},{});return h.jsx(ri,{...e,listItemIds:a,requiredItems:n,itemValues:s,listSize:(r==null?void 0:r.size)||0})}fs.displayName="FieldsetList";function ni({initialSchema:e,onChangeEnd:t}){const r=Ho(e);return h.jsx(ns,{css:{width:"100%"},schema:Vo,initialValues:r,onChangeEnd:n=>{t==null||t(Lo(n))},widgets:{GroupRenderer:zo,custom:{FieldsetList:fs}}})}function ai({schema:e,initialSchemaValues:t,onChangeEnd:r}){return h.jsx(E.DefaultVariantProvider,{value:{label:{appearance:"group"}},children:h.jsx(E.HStack,{children:h.jsx(ns,{schema:e,initialValues:t,onChangeEnd:r})})})}var Gr={exports:{}},cn={},Me={},Dt={},cr={},B={},or={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(S){if(super(),!e.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((R,N)=>`${R}${N}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((R,N)=>(N instanceof r&&(R[N.str]=(R[N.str]||0)+1),R),{})}}e._Code=n,e.nil=new n("");function a(g,...S){const R=[g[0]];let N=0;for(;N<S.length;)c(R,S[N]),R.push(g[++N]);return new n(R)}e._=a;const s=new n("+");function o(g,...S){const R=[b(g[0])];let N=0;for(;N<S.length;)R.push(s),c(R,S[N]),R.push(s,b(g[++N]));return i(R),new n(R)}e.str=o;
1function c(g,S){S instanceof n?g.push(...S._items):S instanceof r?g.push(S):g.push(u(S))}e.addCodeArg=c;function i(g){let S=1;for(;S<g.length-1;){if(g[S]===s){const R=l(g[S-1],g[S+1]);if(R!==void 0){g.splice(S-1,3,R);continue}g[S++]="+"}S++}}function l(g,S){if(S==='""')return g;if(g==='""')return S;if(typeof g=="string")return S instanceof r||g[g.length-1]!=='"'?void 0:typeof S!="string"?`${g.slice(0,-1)}${S}"`:S[0]==='"'?g.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(g instanceof r))return`"${g}${S.slice(1)}`}function d(g,S){return S.emptyStr()?g:g.emptyStr()?S:o`${g}${S}`}e.strConcat=d;function u(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:b(Array.isArray(g)?g.join(","):g)}function y(g){return new n(b(g))}e.stringify=y;function b(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function _(g){return typeof g=="string"&&e.IDENTIFIER.test(g)?new n(`.${g}`):a`[${g}]`}e.getProperty=_;function j(g){if(typeof g=="string"&&e.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}e.getEsmExportName=j;function w(g){return new n(g.toString())}e.regexpCode=w})(or);var Wr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=or;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:l,parent:d}={}){this._names={},this._prefixes=l,this._parent=d}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const d=this._names[l]||this._nameGroup(l);return`${l}${d.index++}`}_nameGroup(l){var d,u;if(!((u=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||u===void 0)&&u.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=a;class s extends t.Name{constructor(l,d){super(d),this.prefix=l}setValue(l,{property:d,itemIndex:u}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(d)}[${u}]`}}e.ValueScopeName=s;const o=(0,t._)`\n`;class c extends a{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?o:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,d){var u;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(l),{prefix:b}=y,_=(u=d.key)!==null&&u!==void 0?u:d.ref;let j=this._values[b];if(j){const S=j.get(_);if(S)return S}else j=this._values[b]=new Map;j.set(_,y);const w=this._scope[b]||(this._scope[b]=[]),g=w.length;return w[g]=d.ref,y.setValue(d,{property:b,itemIndex:g}),y}getValue(l,d){const u=this._values[l];if(u)return u.get(d)}scopeRefs(l,d=this._values){return this._reduceValues(d,u=>{if(u.scopePath===void 0)throw new Error(`CodeGen: name "${u}" has no value`);return(0,t._)`${l}${u.scopePath}`})}scopeCode(l=this._values,d,u){return this._reduceValues(l,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},d,u)}_reduceValues(l,d,u={},y){let b=t.nil;for(const _ in l){const j=l[_];if(!j)continue;const w=u[_]=u[_]||new Map;j.forEach(g=>{if(w.has(g))return;w.set(g,n.Started);let S=d(g);if(S){const R=this.opts.es5?e.varKinds.var:e.varKinds.const;b=(0,t._)`${b}${R} ${g} = ${S};${this.opts._n}`}else if(S=y==null?void 0:y(g))b=(0,t._)`${b}${S}${this.opts._n}`;else throw new r(g);w.set(g,n.Completed)})}return b}}e.ValueScope=c})(Wr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=or,r=Wr;var n=or;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var a=Wr;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(f,$){return this}}class o extends s{constructor(f,$,O){super(),this.varKind=f,this.name=$,this.rhs=O}render({es5:f,_n:$}){const O=f?r.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${O} ${this.name}${M};`+$}optimizeNames(f,$){if(f[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,f,$)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(f,$,O){super(),this.lhs=f,this.rhs=$,this.sideEffects=O}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,$){if(!(this.lhs instanceof t.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,f,$),this}get names(){const f=this.lhs instanceof t.Name?{}:{...this.lhs.names};return te(f,this.rhs)}}class i extends c{constructor(f,$,O,M){super(f,O,M),this.op=$}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class l extends s{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class d extends s{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class u extends s{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class y extends s{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}
1optimizeNames(f,$){return this.code=K(this.code,f,$),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class b extends s{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce(($,O)=>$+O.render(f),"")}optimizeNodes(){const{nodes:f}=this;let $=f.length;for(;$--;){const O=f[$].optimizeNodes();Array.isArray(O)?f.splice($,1,...O):O?f[$]=O:f.splice($,1)}return f.length>0?this:void 0}optimizeNames(f,$){const{nodes:O}=this;let M=O.length;for(;M--;){const F=O[M];F.optimizeNames(f,$)||(he(f,F.names),O.splice(M,1))}return O.length>0?this:void 0}get names(){return this.nodes.reduce((f,$)=>L(f,$.names),{})}}class _ extends b{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class j extends b{}class w extends _{}w.kind="else";class g extends _{constructor(f,$){super($),this.condition=f}render(f){let $=`if(${this.condition})`+super.render(f);return this.else&&($+="else "+this.else.render(f)),$}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let $=this.else;if($){const O=$.optimizeNodes();$=this.else=Array.isArray(O)?new w(O):O}if($)return f===!1?$ instanceof g?$:$.nodes:this.nodes.length?this:new g(Ce(f),$ instanceof g?[$]:$.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,$){var O;if(this.else=(O=this.else)===null||O===void 0?void 0:O.optimizeNames(f,$),!!(super.optimizeNames(f,$)||this.else))return this.condition=K(this.condition,f,$),this}get names(){const f=super.names;return te(f,this.condition),this.else&&L(f,this.else.names),f}}g.kind="if";class S extends _{}S.kind="for";class R extends S{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,$){if(super.optimizeNames(f,$))return this.iteration=K(this.iteration,f,$),this}get names(){return L(super.names,this.iteration.names)}}class N extends S{constructor(f,$,O,M){super(),this.varKind=f,this.name=$,this.from=O,this.to=M}render(f){const $=f.es5?r.varKinds.var:this.varKind,{name:O,from:M,to:F}=this;return`for(${$} ${O}=${M}; ${O}<${F}; ${O}++)`+super.render(f)}get names(){const f=te(super.names,this.from);return te(f,this.to)}}class k extends S{constructor(f,$,O,M){super(),this.loop=f,this.varKind=$,this.name=O,this.iterable=M}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,$){if(super.optimizeNames(f,$))return this.iterable=K(this.iterable,f,$),this}get names(){return L(super.names,this.iterable.names)}}class G extends _{constructor(f,$,O){super(),this.name=f,this.args=$,this.async=O}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}G.kind="func";class ne extends b{render(f){return"return "+super.render(f)}}ne.kind="return";class je extends _{render(f){let $="try"+super.render(f);return this.catch&&($+=this.catch.render(f)),this.finally&&($+=this.finally.render(f)),$}optimizeNodes(){var f,$;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(f,$){var O,M;return super.optimizeNames(f,$),(O=this.catch)===null||O===void 0||O.optimizeNames(f,$),(M=this.finally)===null||M===void 0||M.optimizeNames(f,$),this}get names(){const f=super.names;return this.catch&&L(f,this.catch.names),this.finally&&L(f,this.finally.names),f}}class Oe extends _{constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}Oe.kind="catch";class Fe extends _{render(f){return"finally"+super.render(f)}}Fe.kind="finally";class q{constructor(f,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?`
2`:""},this._extScope=f,this._scope=new r.Scope({parent:f}),this._nodes=[new j]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,$){const O=this._extScope.value(f,$);return(this._values[O.prefix]||(this._values[O.prefix]=new Set)).add(O),O}getScopeValue(f,$){return this._extScope.getValue(f,$)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,$,O,M){const F=this._scope.toName($);return O!==void 0&&M&&(this._constants[F.str]=O),this._leafNode(new o(f,F,O)),F}const(f,$,O){return this._def(r.varKinds.const,f,$,O)}let(f,$,O){return this._def(r.varKinds.let,f,$,O)}var(f,$,O){return this._def(r.varKinds.var,f,$,O)}assign(f,$,O){return this._leafNode(new c(f,$,O))}add(f,$){return this._leafNode(new i(f,e.operators.ADD,$))}code(f){return typeof f=="function"?f():f!==t.nil&&this._leafNode(new y(f)),this}object(...f){const $=["{"];for(const[O,M]of f)$.length>1&&$.push(","),$.push(O),(O!==M||this.opts.es5)&&($.push(":"),(0,t.addCodeArg)($,M));return $.push("}"),new t._Code($)}
2if(f,$,O){if(this._blockNode(new g(f)),$&&O)this.code($).else().code(O).endIf();else if($)this.code($).endIf();else if(O)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new g(f))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(g,w)}_for(f,$){return this._blockNode(f),$&&this.code($).endFor(),this}for(f,$){return this._for(new R(f),$)}forRange(f,$,O,M,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const Z=this._scope.toName(f);return this._for(new N(F,Z,$,O),()=>M(Z))}forOf(f,$,O,M=r.varKinds.const){const F=this._scope.toName(f);if(this.opts.es5){const Z=$ instanceof t.Name?$:this.var("_arr",$);return this.forRange("_i",0,(0,t._)`${Z}.length`,X=>{this.var(F,(0,t._)`${Z}[${X}]`),O(F)})}return this._for(new k("of",M,F,$),()=>O(F))}forIn(f,$,O,M=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,t._)`Object.keys(${$})`,O);const F=this._scope.toName(f);return this._for(new k("in",M,F,$),()=>O(F))}endFor(){return this._endBlockNode(S)}label(f){return this._leafNode(new l(f))}break(f){return this._leafNode(new d(f))}return(f){const $=new ne;if(this._blockNode($),this.code(f),$.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ne)}try(f,$,O){if(!$&&!O)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new je;if(this._blockNode(M),this.code(f),$){const F=this.name("e");this._currNode=M.catch=new Oe(F),$(F)}return O&&(this._currNode=M.finally=new Fe,this.code(O)),this._endBlockNode(Oe,Fe)}throw(f){return this._leafNode(new u(f))}block(f,$){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock($),this}endBlock(f){const $=this._blockStarts.pop();if($===void 0)throw new Error("CodeGen: not in self-balancing block");const O=this._nodes.length-$;if(O<0||f!==void 0&&O!==f)throw new Error(`CodeGen: wrong number of nodes: ${O} vs ${f} expected`);return this._nodes.length=$,this}func(f,$=t.nil,O,M){return this._blockNode(new G(f,$,O)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(G)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,$){const O=this._currNode;if(O instanceof f||$&&O instanceof $)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${$?`${f.kind}/${$.kind}`:f.kind}"`)}_elseNode(f){const $=this._currNode;if(!($ instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=$.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const $=this._nodes;$[$.length-1]=f}}e.CodeGen=q;function L(T,f){for(const $ in f)T[$]=(T[$]||0)+(f[$]||0);return T}function te(T,f){return f instanceof t._CodeOrName?L(T,f.names):T}function K(T,f,$){if(T instanceof t.Name)return O(T);if(!M(T))return T;return new t._Code(T._items.reduce((F,Z)=>(Z instanceof t.Name&&(Z=O(Z)),Z instanceof t._Code?F.push(...Z._items):F.push(Z),F),[]));function O(F){const Z=$[F.str];return Z===void 0||f[F.str]!==1?F:(delete f[F.str],Z)}function M(F){return F instanceof t._Code&&F._items.some(Z=>Z instanceof t.Name&&f[Z.str]===1&&$[Z.str]!==void 0)}}function he(T,f){for(const $ in f)T[$]=(T[$]||0)-(f[$]||0)}function Ce(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${C(T)}`}e.not=Ce;const Ne=P(e.operators.AND);function ct(...T){return T.reduce(Ne)}e.and=ct;const Ze=P(e.operators.OR);function x(...T){return T.reduce(Ze)}e.or=x;function P(T){return(f,$)=>f===t.nil?$:$===t.nil?f:(0,t._)`${C(f)} ${T} ${C($)}`}function C(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(B);var D={};Object.defineProperty(D,"__esModule",{value:!0});D.checkStrictMode=D.getErrorPath=D.Type=D.useFunc=D.setEvaluated=D.evaluatedPropsToName=D.mergeEvaluated=D.eachItem=D.unescapeJsonPointer=D.escapeJsonPointer=D.escapeFragment=D.unescapeFragment=D.schemaRefOrVal=D.schemaHasRulesButRef=D.schemaHasRules=D.checkUnknownRules=D.alwaysValidSchema=D.toHash=void 0;const re=B,si=or;function oi(e){const t={};for(const r of e)t[r]=!0;return t}D.toHash=oi;function ii(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ps(e,t),!ms(t,e.self.RULES.all))}D.alwaysValidSchema=ii;function ps(e,t=e.schema){const{opts:r,self:n}=e;
2if(!r.strictSchema||typeof t=="boolean")return;const a=n.RULES.keywords;for(const s in t)a[s]||gs(e,`unknown keyword: "${s}"`)}D.checkUnknownRules=ps;function ms(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}D.schemaHasRules=ms;function ci(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}D.schemaHasRulesButRef=ci;function li({topSchemaRef:e,schemaPath:t},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,re._)`${r}`}return(0,re._)`${e}${t}${(0,re.getProperty)(n)}`}D.schemaRefOrVal=li;function di(e){return hs(decodeURIComponent(e))}D.unescapeFragment=di;function ui(e){return encodeURIComponent(ln(e))}D.escapeFragment=ui;function ln(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}D.escapeJsonPointer=ln;function hs(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}D.unescapeJsonPointer=hs;function fi(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}D.eachItem=fi;function wa({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(a,s,o,c)=>{const i=o===void 0?s:o instanceof re.Name?(s instanceof re.Name?e(a,s,o):t(a,s,o),o):s instanceof re.Name?(t(a,o,s),s):r(s,o);return c===re.Name&&!(i instanceof re.Name)?n(a,i):i}}D.mergeEvaluated={props:wa({mergeNames:(e,t,r)=>e.if((0,re._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,re._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,re._)`${r} || {}`).code((0,re._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,re._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,re._)`${r} || {}`),dn(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:ys}),items:wa({mergeNames:(e,t,r)=>e.if((0,re._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,re._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,re._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,re._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function ys(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,re._)`{}`);return t!==void 0&&dn(e,r,t),r}D.evaluatedPropsToName=ys;function dn(e,t,r){Object.keys(r).forEach(n=>e.assign((0,re._)`${t}${(0,re.getProperty)(n)}`,!0))}D.setEvaluated=dn;const Sa={};function pi(e,t){return e.scopeValue("func",{ref:t,code:Sa[t.code]||(Sa[t.code]=new si._Code(t.code))})}D.useFunc=pi;var Jr;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Jr||(D.Type=Jr={}));function mi(e,t,r){if(e instanceof re.Name){const n=t===Jr.Num;return r?n?(0,re._)`"[" + ${e} + "]"`:(0,re._)`"['" + ${e} + "']"`:n?(0,re._)`"/" + ${e}`:(0,re._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,re.getProperty)(e).toString():"/"+ln(e)}D.getErrorPath=mi;function gs(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}D.checkStrictMode=gs;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});const we=B,hi={data:new we.Name("data"),valCxt:new we.Name("valCxt"),instancePath:new we.Name("instancePath"),parentData:new we.Name("parentData"),parentDataProperty:new we.Name("parentDataProperty"),rootData:new we.Name("rootData"),dynamicAnchors:new we.Name("dynamicAnchors"),vErrors:new we.Name("vErrors"),errors:new we.Name("errors"),this:new we.Name("this"),self:new we.Name("self"),scope:new we.Name("scope"),json:new we.Name("json"),jsonPos:new we.Name("jsonPos"),jsonLen:new we.Name("jsonLen"),jsonPart:new we.Name("jsonPart")};Re.default=hi;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=B,r=D,n=Re;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:g})=>g?(0,t.str)`"${w}" keyword must be ${g} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function a(w,g=e.keywordError,S,R){const{it:N}=w,{gen:k,compositeRule:G,allErrors:ne}=N,je=u(w,g,S);R??(G||ne)?i(k,je):l(N,(0,t._)`[${je}]`)}e.reportError=a;function s(w,g=e.keywordError,S){const{it:R}=w,{gen:N,compositeRule:k,allErrors:G}=R,ne=u(w,g,S);i(N,ne),k||G||l(R,n.default.vErrors)}e.reportExtraError=s;function o(w,g){w.assign(n.default.errors,g),w.if((0,t._)`${n.default.vErrors} !== null`,()=>w.if(g,()=>w.assign((0,t._)`${n.default.vErrors}.length`,g),()=>w.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function c({gen:w,keyword:g,schemaValue:S,data:R,errsCount:N,it:k}){if(N===void 0)throw new Error("ajv implementation error");const G=w.name("err");w.forRange("i",N,n.default.errors,ne=>{w.const(G,(0,t._)`${n.default.vErrors}[${ne}]`),w.if((0,t._)`${G}.instancePath === undefined`,()=>w.assign((0,t._)`${G}.instancePath`,(0,t.strConcat)(n.default.instancePath,k.errorPath))),w.assign((0,t._)`${G}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${g}`),k.opts.verbose&&(w.assign((0,t._)`${G}.schema`,S),w.assign((0,t._)`${G}.data`,R))})}e.extendErrors=c;function i(w,g){const S=w.const("err",g);w.if((0,t._)`${n.default.vErrors} === null`,()=>w.assign(n.default.vErrors,(0,t._)`[${S}]`),(0,t._)`${n.default.vErrors}.push(${S})`),w.code((0,t._)`${n.default.errors}++`)}function l(w,g){const{gen:S,validateName:R,schemaEnv:N}=w;N.$async?S.throw((0,t._)`new ${w.ValidationError}(${g})`):(S.assign((0,t._)`${R}.errors`,g),S.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function u(w,g,S){const{createErrors:R}=w.it;return R===!1?(0,t._)`{}`:y(w,g,S)}function y(w,g,S={}){const{gen:R,it:N}=w,k=[b(N,S),_(w,S)];return j(w,g,k),R.object(...k)}function b({errorPath:w},{instancePath:g}){const S=g?(0,t.str)`${w}${(0,r.getErrorPath)(g,r.Type.Str)}`:w;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,S)]}function _({keyword:w,it:{errSchemaPath:g}},{schemaPath:S,parentSchema:R}){let N=R?g:(0,t.str)`${g}/${w}`;return S&&(N=(0,t.str)`${N}${(0,r.getErrorPath)(S,r.Type.Str)}`),[d.schemaPath,N]}function j(w,{params:g,message:S},R){const{keyword:N,data:k,schemaValue:G,it:ne}=w,{opts:je,propertyName:Oe,topSchemaRef:Fe,schemaPath:q}=ne;R.push([d.keyword,N],[d.params,typeof g=="function"?g(w):g||(0,t._)`{}`]),je.messages&&R.push([d.message,typeof S=="function"?S(w):S]),je.verbose&&R.push([d.schema,G],[d.parentSchema,(0,t._)`${Fe}${q}`],[n.default.data,k]),Oe&&R.push([d.propertyName,Oe])}})(cr);
2Object.defineProperty(Dt,"__esModule",{value:!0});Dt.boolOrEmptySchema=Dt.topBoolOrEmptySchema=void 0;const yi=cr,gi=B,$i=Re,vi={message:"boolean schema is false"};function _i(e){const{gen:t,schema:r,validateName:n}=e;r===!1?$s(e,!1):typeof r=="object"&&r.$async===!0?t.return($i.default.data):(t.assign((0,gi._)`${n}.errors`,null),t.return(!0))}Dt.topBoolOrEmptySchema=_i;function bi(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),$s(e)):r.var(t,!0)}Dt.boolOrEmptySchema=bi;function $s(e,t){const{gen:r,data:n}=e,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,yi.reportError)(a,vi,void 0,t)}var ye={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});vt.getRules=vt.isJSONType=void 0;const wi=["string","number","integer","boolean","null","object","array"],Si=new Set(wi);function Ei(e){return typeof e=="string"&&Si.has(e)}vt.isJSONType=Ei;function ji(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}vt.getRules=ji;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.shouldUseRule=Xe.shouldUseGroup=Xe.schemaHasRulesForType=void 0;function Pi({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&vs(e,n)}Xe.schemaHasRulesForType=Pi;function vs(e,t){return t.rules.some(r=>_s(e,r))}Xe.shouldUseGroup=vs;function _s(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))}Xe.shouldUseRule=_s;Object.defineProperty(ye,"__esModule",{value:!0});ye.reportTypeError=ye.checkDataTypes=ye.checkDataType=ye.coerceAndCheckDataType=ye.getJSONTypes=ye.getSchemaTypes=ye.DataType=void 0;const Ti=vt,Ii=Xe,Ai=cr,J=B,bs=D;var kt;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(kt||(ye.DataType=kt={}));function Ri(e){const t=ws(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}ye.getSchemaTypes=Ri;function ws(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(Ti.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ye.getJSONTypes=ws;function Oi(e,t){const{gen:r,data:n,opts:a}=e,s=Ci(t,a.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,Ii.schemaHasRulesForType)(e,t[0]));if(o){const c=un(t,n,a.strictNumbers,kt.Wrong);r.if(c,()=>{s.length?Ni(e,t,s):fn(e)})}return o}ye.coerceAndCheckDataType=Oi;const Ss=new Set(["string","number","integer","boolean","null"]);function Ci(e,t){return t?e.filter(r=>Ss.has(r)||t==="array"&&r==="array"):[]}function Ni(e,t,r){const{gen:n,data:a,opts:s}=e,o=n.let("dataType",(0,J._)`typeof ${a}`),c=n.let("coerced",(0,J._)`undefined`);s.coerceTypes==="array"&&n.if((0,J._)`${o} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,J._)`${a}[0]`).assign(o,(0,J._)`typeof ${a}`).if(un(t,a,s.strictNumbers),()=>n.assign(c,a))),n.if((0,J._)`${c} !== undefined`);for(const l of r)(Ss.has(l)||l==="array"&&s.coerceTypes==="array")&&i(l);n.else(),fn(e),n.endIf(),n.if((0,J._)`${c} !== undefined`,()=>{n.assign(a,c),ki(e,c)});function i(l){switch(l){case"string":n.elseIf((0,J._)`${o} == "number" || ${o} == "boolean"`).assign(c,(0,J._)`"" + ${a}`).elseIf((0,J._)`${a} === null`).assign(c,(0,J._)`""`);return;case"number":n.elseIf((0,J._)`${o} == "boolean" || ${a} === null
3              || (${o} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,J._)`+${a}`);return;case"integer":n.elseIf((0,J._)`${o} === "boolean" || ${a} === null
4              || (${o} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,J._)`+${a}`);return;case"boolean":n.elseIf((0,J._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,J._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case"null":n.elseIf((0,J._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(c,null);return;case"array":n.elseIf((0,J._)`${o} === "string" || ${o} === "number"
5              || ${o} === "boolean" || ${a} === null`).assign(c,(0,J._)`[${a}]`)}}}function ki({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,J._)`${t} !== undefined`,()=>e.assign((0,J._)`${t}[${r}]`,n))}function Yr(e,t,r,n=kt.Correct){const a=n===kt.Correct?J.operators.EQ:J.operators.NEQ;let s;switch(e){case"null":return(0,J._)`${t} ${a} null`;case"array":s=(0,J._)`Array.isArray(${t})`;break;case"object":s=(0,J._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,J._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,J._)`typeof ${t} ${a} ${e}`}return n===kt.Correct?s:(0,J.not)(s);function o(c=J.nil){return(0,J.and)((0,J._)`typeof ${t} == "number"`,c,r?(0,J._)`isFinite(${t})`:J.nil)}}ye.checkDataType=Yr;function un(e,t,r,n){if(e.length===1)return Yr(e[0],t,r,n);let a;const s=(0,bs.toHash)(e);if(s.array&&s.object){const o=(0,J._)`typeof ${t} != "object"`;a=s.null?o:(0,J._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else a=J.nil;s.number&&delete s.integer;for(const o in s)a=(0,J.and)(a,Yr(o,t,r,n));return a}ye.checkDataTypes=un;const xi={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,J._)`{type: ${e}}`:(0,J._)`{type: ${t}}`};function fn(e){const t=Di(e);(0,Ai.reportError)(t,xi)}ye.reportTypeError=fn;function Di(e){const{gen:t,data:r,schema:n}=e,a=(0,bs.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:e}}var Rr={};
5Object.defineProperty(Rr,"__esModule",{value:!0});Rr.assignDefaults=void 0;const Ot=B,Mi=D;function Fi(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const a in r)Ea(e,a,r[a].default);else t==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Ea(e,s,a.default))}Rr.assignDefaults=Fi;function Ea(e,t,r){const{gen:n,compositeRule:a,data:s,opts:o}=e;if(r===void 0)return;const c=(0,Ot._)`${s}${(0,Ot.getProperty)(t)}`;if(a){(0,Mi.checkStrictMode)(e,`default is ignored for: ${c}`);return}let i=(0,Ot._)`${c} === undefined`;o.useDefaults==="empty"&&(i=(0,Ot._)`${i} || ${c} === null || ${c} === ""`),n.if(i,(0,Ot._)`${c} = ${(0,Ot.stringify)(r)}`)}var Ye={},Y={};Object.defineProperty(Y,"__esModule",{value:!0});Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const oe=B,pn=D,nt=Re,Vi=D;function zi(e,t){const{gen:r,data:n,it:a}=e;r.if(hn(r,n,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,oe._)`${t}`},!0),e.error()})}Y.checkReportMissingProp=zi;function qi({gen:e,data:t,it:{opts:r}},n,a){return(0,oe.or)(...n.map(s=>(0,oe.and)(hn(e,t,s,r.ownProperties),(0,oe._)`${a} = ${s}`)))}Y.checkMissingProp=qi;function Ui(e,t){e.setParams({missingProperty:t},!0),e.error()}Y.reportMissingProp=Ui;function Es(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,oe._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=Es;function mn(e,t,r){return(0,oe._)`${Es(e)}.call(${t}, ${r})`}Y.isOwnProperty=mn;function Li(e,t,r,n){const a=(0,oe._)`${t}${(0,oe.getProperty)(r)} !== undefined`;return n?(0,oe._)`${a} && ${mn(e,t,r)}`:a}Y.propertyInData=Li;function hn(e,t,r,n){const a=(0,oe._)`${t}${(0,oe.getProperty)(r)} === undefined`;return n?(0,oe.or)(a,(0,oe.not)(mn(e,t,r))):a}Y.noPropertyInData=hn;function js(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Y.allSchemaProperties=js;function Hi(e,t){return js(t).filter(r=>!(0,pn.alwaysValidSchema)(e,t[r]))}Y.schemaProperties=Hi;function Ki({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:s},it:o},c,i,l){const d=l?(0,oe._)`${e}, ${t}, ${n}${a}`:t,u=[[nt.default.instancePath,(0,oe.strConcat)(nt.default.instancePath,s)],[nt.default.parentData,o.parentData],[nt.default.parentDataProperty,o.parentDataProperty],[nt.default.rootData,nt.default.rootData]];o.opts.dynamicRef&&u.push([nt.default.dynamicAnchors,nt.default.dynamicAnchors]);const y=(0,oe._)`${d}, ${r.object(...u)}`;return i!==oe.nil?(0,oe._)`${c}.call(${i}, ${y})`:(0,oe._)`${c}(${y})`}Y.callValidateCode=Ki;const Bi=(0,oe._)`new RegExp`;function Gi({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:a}=t.code,s=a(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,oe._)`${a.code==="new RegExp"?Bi:(0,Vi.useFunc)(e,a)}(${r}, ${n})`})}Y.usePattern=Gi;function Wi(e){const{gen:t,data:r,keyword:n,it:a}=e,s=t.name("valid");if(a.allErrors){const c=t.let("valid",!0);return o(()=>t.assign(c,!1)),c}return t.var(s,!0),o(()=>t.break()),s;function o(c){const i=t.const("len",(0,oe._)`${r}.length`);t.forRange("i",0,i,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:pn.Type.Num},s),t.if((0,oe.not)(s),c)})}}Y.validateArray=Wi;function Ji(e){const{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(i=>(0,pn.alwaysValidSchema)(a,i))&&!a.opts.unevaluated)return;const o=t.let("valid",!1),c=t.name("_valid");t.block(()=>r.forEach((i,l)=>{const d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},c);t.assign(o,(0,oe._)`${o} || ${c}`),e.mergeValidEvaluated(d,c)||t.if((0,oe.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Y.validateUnion=Ji;Object.defineProperty(Ye,"__esModule",{value:!0});Ye.validateKeywordUsage=Ye.validSchemaType=Ye.funcKeywordCode=Ye.macroKeywordCode=void 0;const Se=B,mt=Re,Yi=Y,Zi=cr;function Qi(e,t){const{gen:r,keyword:n,schema:a,parentSchema:s,it:o}=e,c=t.macro.call(o.self,a,s,o),i=Ps(r,n,c);o.opts.validateSchema!==!1&&o.self.validateSchema(c,!0);const l=r.name("valid");e.subschema({schema:c,schemaPath:Se.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:i,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}Ye.macroKeywordCode=Qi;function Xi(e,t){var r;const{gen:n,keyword:a,schema:s,parentSchema:o,$data:c,it:i}=e;tc(i,t);const l=!c&&t.compile?t.compile.call(i.self,s,o,i):t.validate,d=Ps(n,a,l),u=n.let("valid");e.block$data(u,y),e.ok((r=t.valid)!==null&&r!==void 0?r:u);function y(){if(t.errors===!1)j(),t.modifying&&ja(e),w(()=>e.error());else{const g=t.async?b():_();t.modifying&&ja(e),w(()=>ec(e,g))}}function b(){const g=n.let("ruleErrs",null);return n.try(()=>j((0,Se._)`await `),S=>n.assign(u,!1).if((0,Se._)`${S} instanceof ${i.ValidationError}`,()=>n.assign(g,(0,Se._)`${S}.errors`),()=>n.throw(S))),g}function _(){const g=(0,Se._)`${d}.errors`;return n.assign(g,null),j(Se.nil),g}function j(g=t.async?(0,Se._)`await `:Se.nil){const S=i.opts.passContext?mt.default.this:mt.default.self,R=!("compile"in t&&!c||t.schema===!1);n.assign(u,(0,Se._)`${g}${(0,Yi.callValidateCode)(e,d,S,R)}`,t.modifying)}function w(g){var S;n.if((0,Se.not)((S=t.valid)!==null&&S!==void 0?S:u),g)}}Ye.funcKeywordCode=Xi;function ja(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Se._)`${n.parentData}[${n.parentDataProperty}]`))}function ec(e,t){const{gen:r}=e;r.if((0,Se._)`Array.isArray(${t})`,()=>{r.assign(mt.default.vErrors,(0,Se._)`${mt.default.vErrors} === null ? ${t} : ${mt.default.vErrors}.concat(${t})`).assign(mt.default.errors,(0,Se._)`${mt.default.vErrors}.length`),(0,Zi.extendErrors)(e)},()=>e.error())}
5function tc({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Ps(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Se.stringify)(r)})}function rc(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")}Ye.validSchemaType=rc;function nc({schema:e,opts:t,self:r,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");const o=a.dependencies;if(o!=null&&o.some(c=>!Object.prototype.hasOwnProperty.call(e,c)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[s])){const i=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(i);else throw new Error(i)}}Ye.validateKeywordUsage=nc;var it={};Object.defineProperty(it,"__esModule",{value:!0});it.extendSubschemaMode=it.extendSubschemaData=it.getSubschema=void 0;const Je=B,Ts=D;function ac(e,{keyword:t,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const c=e.schema[t];return r===void 0?{schema:c,schemaPath:(0,Je._)`${e.schemaPath}${(0,Je.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:c[r],schemaPath:(0,Je._)`${e.schemaPath}${(0,Je.getProperty)(t)}${(0,Je.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Ts.escapeFragment)(r)}`}}if(n!==void 0){if(a===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}it.getSubschema=ac;function sc(e,t,{dataProp:r,dataPropType:n,data:a,dataTypes:s,propertyName:o}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(r!==void 0){const{errorPath:l,dataPathArr:d,opts:u}=t,y=c.let("data",(0,Je._)`${t.data}${(0,Je.getProperty)(r)}`,!0);i(y),e.errorPath=(0,Je.str)`${l}${(0,Ts.getErrorPath)(r,n,u.jsPropertySyntax)}`,e.parentDataProperty=(0,Je._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(a!==void 0){const l=a instanceof Je.Name?a:c.let("data",a,!0);i(l),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function i(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}it.extendSubschemaData=sc;function oc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(e.compositeRule=n),a!==void 0&&(e.createErrors=a),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}it.extendSubschemaMode=oc;var be={},Is={exports:{}},ot=Is.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};_r(t,n,a,e,"",e)};ot.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ot.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ot.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ot.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 _r(e,t,r,n,a,s,o,c,i,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,a,s,o,c,i,l);for(var d in n){var u=n[d];if(Array.isArray(u)){if(d in ot.arrayKeywords)for(var y=0;y<u.length;y++)_r(e,t,r,u[y],a+"/"+d+"/"+y,s,a,d,n,y)}else if(d in ot.propsKeywords){if(u&&typeof u=="object")for(var b in u)_r(e,t,r,u[b],a+"/"+d+"/"+ic(b),s,a,d,n,b)}else(d in ot.keywords||e.allKeys&&!(d in ot.skipKeywords))&&_r(e,t,r,u,a+"/"+d,s,a,d,n)}r(n,a,s,o,c,i,l)}}function ic(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var cc=Is.exports;
5Object.defineProperty(be,"__esModule",{value:!0});be.getSchemaRefs=be.resolveUrl=be.normalizeId=be._getFullPath=be.getFullPath=be.inlineRef=void 0;const lc=D,dc=os,uc=cc,fc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Zr(e):t?As(e)<=t:!1}be.inlineRef=pc;const mc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zr(e){for(const t in e){if(mc.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Zr)||typeof r=="object"&&Zr(r))return!0}return!1}function As(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!fc.has(r)&&(typeof e[r]=="object"&&(0,lc.eachItem)(e[r],n=>t+=As(n)),t===1/0))return 1/0}return t}function Rs(e,t="",r){r!==!1&&(t=xt(t));const n=e.parse(t);return Os(e,n)}be.getFullPath=Rs;function Os(e,t){return e.serialize(t).split("#")[0]+"#"}be._getFullPath=Os;const hc=/#\/?$/;function xt(e){return e?e.replace(hc,""):""}be.normalizeId=xt;function yc(e,t,r){return r=xt(r),e.resolve(t,r)}be.resolveUrl=yc;const gc=/^[a-z_][-a-z0-9._]*$/i;function $c(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,a=xt(e[r]||t),s={"":a},o=Rs(n,a,!1),c={},i=new Set;return uc(e,{allKeys:!0},(u,y,b,_)=>{if(_===void 0)return;const j=o+y;let w=s[_];typeof u[r]=="string"&&(w=g.call(this,u[r])),S.call(this,u.$anchor),S.call(this,u.$dynamicAnchor),s[y]=w;function g(R){const N=this.opts.uriResolver.resolve;if(R=xt(w?N(w,R):R),i.has(R))throw d(R);i.add(R);let k=this.refs[R];return typeof k=="string"&&(k=this.refs[k]),typeof k=="object"?l(u,k.schema,R):R!==xt(j)&&(R[0]==="#"?(l(u,c[R],R),c[R]=u):this.refs[R]=j),R}function S(R){if(typeof R=="string"){if(!gc.test(R))throw new Error(`invalid anchor "${R}"`);g.call(this,`#${R}`)}}}),c;function l(u,y,b){if(y!==void 0&&!dc(u,y))throw d(b)}function d(u){return new Error(`reference "${u}" resolves to more than one schema`)}}be.getSchemaRefs=$c;Object.defineProperty(Me,"__esModule",{value:!0});Me.getData=Me.KeywordCxt=Me.validateFunctionCode=void 0;const Cs=Dt,Pa=ye,yn=Xe,Er=ye,vc=Rr,tr=Ye,zr=it,V=B,H=Re,_c=be,et=D,Qt=cr;function bc(e){if(xs(e)&&(Ds(e),ks(e))){Ec(e);return}Ns(e,()=>(0,Cs.topBoolOrEmptySchema)(e))}Me.validateFunctionCode=bc;function Ns({gen:e,validateName:t,schema:r,schemaEnv:n,opts:a},s){a.code.es5?e.func(t,(0,V._)`${H.default.data}, ${H.default.valCxt}`,n.$async,()=>{e.code((0,V._)`"use strict"; ${Ta(r,a)}`),Sc(e,a),e.code(s)}):e.func(t,(0,V._)`${H.default.data}, ${wc(a)}`,n.$async,()=>e.code(Ta(r,a)).code(s))}function wc(e){return(0,V._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,V._)`, ${H.default.dynamicAnchors}={}`:V.nil}}={}`}function Sc(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,V._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,V._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,V._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,V._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,V._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,V._)`""`),e.var(H.default.parentData,(0,V._)`undefined`),e.var(H.default.parentDataProperty,(0,V._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,V._)`{}`)})}function Ec(e){const{schema:t,opts:r,gen:n}=e;Ns(e,()=>{r.$comment&&t.$comment&&Fs(e),Ac(e),n.let(H.default.vErrors,null),n.let(H.default.errors,0),r.unevaluated&&jc(e),Ms(e),Cc(e)})}function jc(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function Ta(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function Pc(e,t){if(xs(e)&&(Ds(e),ks(e))){Tc(e,t);return}(0,Cs.boolOrEmptySchema)(e,t)}function ks({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function xs(e){return typeof e.schema!="boolean"}function Tc(e,t){const{schema:r,gen:n,opts:a}=e;a.$comment&&r.$comment&&Fs(e),Rc(e),Oc(e);const s=n.const("_errs",H.default.errors);Ms(e,s),n.var(t,(0,V._)`${s} === ${H.default.errors}`)}function Ds(e){(0,et.checkUnknownRules)(e),Ic(e)}function Ms(e,t){if(e.opts.jtd)return Ia(e,[],!1,t);const r=(0,Pa.getSchemaTypes)(e.schema),n=(0,Pa.coerceAndCheckDataType)(e,r);Ia(e,r,!n,t)}
5function Ic(e){const{schema:t,errSchemaPath:r,opts:n,self:a}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,et.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ac(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,et.checkStrictMode)(e,"default is ignored in the schema root")}function Rc(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,_c.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Oc(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Fs({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:a}){const s=r.$comment;if(a.$comment===!0)e.code((0,V._)`${H.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){const o=(0,V.str)`${n}/$comment`,c=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${H.default.self}.opts.$comment(${s}, ${o}, ${c}.schema)`)}}function Cc(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=e;r.$async?t.if((0,V._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,V._)`new ${a}(${H.default.vErrors})`)):(t.assign((0,V._)`${n}.errors`,H.default.vErrors),s.unevaluated&&Nc(e),t.return((0,V._)`${H.default.errors} === 0`))}function Nc({gen:e,evaluated:t,props:r,items:n}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),n instanceof V.Name&&e.assign((0,V._)`${t}.items`,n)}function Ia(e,t,r,n){const{gen:a,schema:s,data:o,allErrors:c,opts:i,self:l}=e,{RULES:d}=l;if(s.$ref&&(i.ignoreKeywordsWithRef||!(0,et.schemaHasRulesButRef)(s,d))){a.block(()=>qs(e,"$ref",d.all.$ref.definition));return}i.jtd||kc(e,t),a.block(()=>{for(const y of d.rules)u(y);u(d.post)});function u(y){(0,yn.shouldUseGroup)(s,y)&&(y.type?(a.if((0,Er.checkDataType)(y.type,o,i.strictNumbers)),Aa(e,y),t.length===1&&t[0]===y.type&&r&&(a.else(),(0,Er.reportTypeError)(e)),a.endIf()):Aa(e,y),c||a.if((0,V._)`${H.default.errors} === ${n||0}`))}}function Aa(e,t){const{gen:r,schema:n,opts:{useDefaults:a}}=e;a&&(0,vc.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,yn.shouldUseRule)(n,s)&&qs(e,s.keyword,s.definition,t.type)})}function kc(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xc(e,t),e.opts.allowUnionTypes||Dc(e,t),Mc(e,e.dataTypes))}function xc(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Vs(e.dataTypes,r)||gn(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Vc(e,t)}}function Dc(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&gn(e,"use allowUnionTypes to allow union type keyword")}function Mc(e,t){const r=e.self.RULES.all;for(const n in r){const a=r[n];if(typeof a=="object"&&(0,yn.shouldUseRule)(e.schema,a)){const{type:s}=a.definition;s.length&&!s.some(o=>Fc(t,o))&&gn(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function Fc(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Vs(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Vc(e,t){const r=[];for(const n of e.dataTypes)Vs(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function gn(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,et.checkStrictMode)(e,t,e.opts.strictTypes)}class zs{constructor(t,r,n){if((0,tr.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,et.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",Us(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,tr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",H.default.errors))}result(t,r,n){this.failResult((0,V.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,V.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);const{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.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?Qt.reportExtraError:Qt.reportError)(this,this.def.error,r)}$dataError(){(0,Qt.reportError)(this,this.def.$dataError||Qt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Qt.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=V.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;const{gen:n,schemaCode:a,schemaType:s,def:o}=this;n.if((0,V.or)((0,V._)`${a} === undefined`,r)),t!==V.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:a,it:s}=this;return(0,V.or)(o(),c());function o(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");const i=Array.isArray(n)?n:[n];return(0,V._)`${(0,Er.checkDataTypes)(i,r,s.opts.strictNumbers,Er.DataType.Wrong)}`}return V.nil}function c(){if(a.validateSchema){const i=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,V._)`!${i}(${r})`}return V.nil}}subschema(t,r){const n=(0,zr.getSubschema)(this.it,t);(0,zr.extendSubschemaData)(n,this.it,t),(0,zr.extendSubschemaMode)(n,t);const a={...this.it,...n,items:void 0,props:void 0};return Pc(a,r),a}mergeEvaluated(t,r){const{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=et.mergeEvaluated.props(a,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=et.mergeEvaluated.items(a,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(t,V.Name)),!0}}Me.KeywordCxt=zs;function qs(e,t,r,n){const a=new zs(e,r,t);"code"in r?r.code(a,n):a.$data&&r.validate?(0,tr.funcKeywordCode)(a,r):"macro"in r?(0,tr.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,tr.funcKeywordCode)(a,r)}const zc=/^\/(?:[^~]|~0|~1)*$/,qc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Us(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let a,s;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!zc.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,s=H.default.rootData}else{const l=qc.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+l[1];if(a=l[2],a==="#"){if(d>=t)throw new Error(i("property/index",d));return n[t-d]}if(d>t)throw new Error(i("data",d));if(s=r[t-d],!a)return s}let o=s;const c=a.split("/");for(const l of c)l&&(s=(0,V._)`${s}${(0,V.getProperty)((0,et.unescapeJsonPointer)(l))}`,o=(0,V._)`${o} && ${s}`);return o;function i(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Me.getData=Us;var Ft={};
5Object.defineProperty(Ft,"__esModule",{value:!0});class Uc extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Ft.default=Uc;var _t={};Object.defineProperty(_t,"__esModule",{value:!0});const qr=be;class Lc extends Error{constructor(t,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,qr.resolveUrl)(t,r,n),this.missingSchema=(0,qr.normalizeId)((0,qr.getFullPath)(t,this.missingRef))}}_t.default=Lc;var Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.resolveSchema=Ee.getCompilingSchema=Ee.resolveRef=Ee.compileSchema=Ee.SchemaEnv=void 0;const Ve=B,Hc=Ft,pt=Re,qe=be,Ra=D,Kc=Me;class Or{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,qe.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={}}}Ee.SchemaEnv=Or;function $n(e){const t=Ls.call(this,e);if(t)return t;const r=(0,qe.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,o=new Ve.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s});let c;e.$async&&(c=o.scopeValue("Error",{ref:Hc.default,code:(0,Ve._)`require("ajv/dist/runtime/validation_error").default`}));const i=o.scopeName("validate");e.validateName=i;const l={gen:o,allErrors:this.opts.allErrors,data:pt.default.data,parentData:pt.default.parentData,parentDataProperty:pt.default.parentDataProperty,dataNames:[pt.default.data],dataPathArr:[Ve.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ve.stringify)(e.schema)}:{ref:e.schema}),validateName:i,ValidationError:c,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Ve.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ve._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,Kc.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);const u=o.toString();d=`${o.scopeRefs(pt.default.scope)}return ${u}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const b=new Function(`${pt.default.self}`,`${pt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(i,{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:i,validateCode:u,scopeValues:o._values}),this.opts.unevaluated){const{props:_,items:j}=l;b.evaluated={props:_ instanceof Ve.Name?void 0:_,items:j instanceof Ve.Name?void 0:j,dynamicProps:_ instanceof Ve.Name,dynamicItems:j instanceof Ve.Name},b.source&&(b.source.evaluated=(0,Ve.stringify)(b.evaluated))}return e.validate=b,e}catch(u){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),u}finally{this._compilations.delete(e)}}Ee.compileSchema=$n;function Bc(e,t,r){var n;r=(0,qe.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let s=Jc.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:c}=this.opts;o&&(s=new Or({schema:o,schemaId:c,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Gc.call(this,s)}Ee.resolveRef=Bc;function Gc(e){return(0,qe.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:$n.call(this,e)}function Ls(e){for(const t of this._compilations)if(Wc(t,e))return t}Ee.getCompilingSchema=Ls;function Wc(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Jc(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Cr.call(this,e,t)}function Cr(e,t){const r=this.opts.uriResolver.parse(t),n=(0,qe._getFullPath)(this.opts.uriResolver,r);let a=(0,qe.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===a)return Ur.call(this,r,e);const s=(0,qe.normalizeId)(n),o=this.refs[s]||this.schemas[s];
5if(typeof o=="string"){const c=Cr.call(this,e,o);return typeof(c==null?void 0:c.schema)!="object"?void 0:Ur.call(this,r,c)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||$n.call(this,o),s===(0,qe.normalizeId)(t)){const{schema:c}=o,{schemaId:i}=this.opts,l=c[i];return l&&(a=(0,qe.resolveUrl)(this.opts.uriResolver,a,l)),new Or({schema:c,schemaId:i,root:e,baseId:a})}return Ur.call(this,r,o)}}Ee.resolveSchema=Cr;const Yc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ur(e,{baseId:t,schema:r,root:n}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const c of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const i=r[(0,Ra.unescapeFragment)(c)];if(i===void 0)return;r=i;const l=typeof r=="object"&&r[this.opts.schemaId];!Yc.has(c)&&l&&(t=(0,qe.resolveUrl)(this.opts.uriResolver,t,l))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Ra.schemaHasRulesButRef)(r,this.RULES)){const c=(0,qe.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Cr.call(this,n,c)}const{schemaId:o}=this.opts;if(s=s||new Or({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const Zc="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qc="Meta-schema for $data reference (JSON AnySchema extension proposal)",Xc="object",el=["$data"],tl={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},rl=!1,nl={$id:Zc,description:Qc,type:Xc,required:el,properties:tl,additionalProperties:rl};var vn={},Qr={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(jo,function(r){function n(){for(var m=arguments.length,p=Array(m),v=0;v<m;v++)p[v]=arguments[v];if(p.length>1){p[0]=p[0].slice(0,-1);for(var A=p.length-1,I=1;I<A;++I)p[I]=p[I].slice(1,-1);return p[A]=p[A].slice(1),p.join("")}else return p[0]}function a(m){return"(?:"+m+")"}function s(m){return m===void 0?"undefined":m===null?"null":Object.prototype.toString.call(m).split(" ").pop().split("]").shift().toLowerCase()}function o(m){return m.toUpperCase()}function c(m){return m!=null?m instanceof Array?m:typeof m.length!="number"||m.split||m.setInterval||m.call?[m]:Array.prototype.slice.call(m):[]}function i(m,p){var v=m;if(p)for(var A in p)v[A]=p[A];return v}function l(m){var p="[A-Za-z]",v="[0-9]",A=n(v,"[A-Fa-f]"),I=a(a("%[EFef]"+A+"%"+A+A+"%"+A+A)+"|"+a("%[89A-Fa-f]"+A+"%"+A+A)+"|"+a("%"+A+A)),z="[\\:\\/\\?\\#\\[\\]\\@]",U="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ee=n(z,U),se=m?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ue=m?"[\\uE000-\\uF8FF]":"[]",Q=n(p,v,"[\\-\\.\\_\\~]",se);a(p+n(p,v,"[\\+\\-\\.]")+"*"),a(a(I+"|"+n(Q,U,"[\\:]"))+"*");var ae=a(a("25[0-5]")+"|"+a("2[0-4]"+v)+"|"+a("1"+v+v)+"|"+a("0?[1-9]"+v)+"|0?0?"+v),fe=a(ae+"\\."+ae+"\\."+ae+"\\."+ae),W=a(A+"{1,4}"),ce=a(a(W+"\\:"+W)+"|"+fe),me=a(a(W+"\\:")+"{6}"+ce),le=a("\\:\\:"+a(W+"\\:")+"{5}"+ce),rt=a(a(W)+"?\\:\\:"+a(W+"\\:")+"{4}"+ce),Be=a(a(a(W+"\\:")+"{0,1}"+W)+"?\\:\\:"+a(W+"\\:")+"{3}"+ce),Ge=a(a(a(W+"\\:")+"{0,2}"+W)+"?\\:\\:"+a(W+"\\:")+"{2}"+ce),Rt=a(a(a(W+"\\:")+"{0,3}"+W)+"?\\:\\:"+W+"\\:"+ce),ut=a(a(a(W+"\\:")+"{0,4}"+W)+"?\\:\\:"+ce),xe=a(a(a(W+"\\:")+"{0,5}"+W)+"?\\:\\:"+W),We=a(a(a(W+"\\:")+"{0,6}"+W)+"?\\:\\:"),ft=a([me,le,rt,Be,Ge,Rt,ut,xe,We].join("|")),Qe=a(a(Q+"|"+I)+"+");a("[vV]"+A+"+\\."+n(Q,U,"[\\:]")+"+"),a(a(I+"|"+n(Q,U))+"*");var Yt=a(I+"|"+n(Q,U,"[\\:\\@]"));return a(a(I+"|"+n(Q,U,"[\\@]"))+"+"),a(a(Yt+"|"+n("[\\/\\?]",ue))+"*"),{NOT_SCHEME:new RegExp(n("[^]",p,v,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Q,U),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Q,U),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Q,U),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Q,U),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Q,U,"[\\:\\@\\/\\?]",ue),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Q,U,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Q,U),"g"),UNRESERVED:new RegExp(Q,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Q,ee),"g"),PCT_ENCODED:new RegExp(I,"g"),IPV4ADDRESS:new RegExp("^("+fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ft+")"+a(a("\\%25|\\%(?!"+A+"{2})")+"("+Qe+")")+"?\\]?$")}}var d=l(!1),u=l(!0),y=function(){function m(p,v){var A=[],I=!0,z=!1,U=void 0;try{for(var ee=p[Symbol.iterator](),se;
vendor: 14,367 bytes, line 5
5!(I=(se=ee.next()).done)&&(A.push(se.value),!(v&&A.length===v));I=!0);}catch(ue){z=!0,U=ue}finally{try{!I&&ee.return&&ee.return()}finally{if(z)throw U}}return A}return function(p,v){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return m(p,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(m){if(Array.isArray(m)){for(var p=0,v=Array(m.length);p<m.length;p++)v[p]=m[p];return v}else return Array.from(m)},_=2147483647,j=36,w=1,g=26,S=38,R=700,N=72,k=128,G="-",ne=/^xn--/,je=/[^\0-\x7E]/,Oe=/[\x2E\u3002\uFF0E\uFF61]/g,Fe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=j-w,L=Math.floor,te=String.fromCharCode;function K(m){throw new RangeError(Fe[m])}function he(m,p){for(var v=[],A=m.length;A--;)v[A]=p(m[A]);return v}function Ce(m,p){var v=m.split("@"),A="";v.length>1&&(A=v[0]+"@",m=v[1]),m=m.replace(Oe,".");var I=m.split("."),z=he(I,p).join(".");return A+z}function Ne(m){for(var p=[],v=0,A=m.length;v<A;){var I=m.charCodeAt(v++);if(I>=55296&&I<=56319&&v<A){var z=m.charCodeAt(v++);(z&64512)==56320?p.push(((I&1023)<<10)+(z&1023)+65536):(p.push(I),v--)}else p.push(I)}return p}var ct=function(p){return String.fromCodePoint.apply(String,b(p))},Ze=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:j},x=function(p,v){return p+22+75*(p<26)-((v!=0)<<5)},P=function(p,v,A){var I=0;for(p=A?L(p/R):p>>1,p+=L(p/v);p>q*g>>1;I+=j)p=L(p/q);return L(I+(q+1)*p/(p+S))},C=function(p){var v=[],A=p.length,I=0,z=k,U=N,ee=p.lastIndexOf(G);ee<0&&(ee=0);for(var se=0;se<ee;++se)p.charCodeAt(se)>=128&&K("not-basic"),v.push(p.charCodeAt(se));for(var ue=ee>0?ee+1:0;ue<A;){for(var Q=I,ae=1,fe=j;;fe+=j){ue>=A&&K("invalid-input");var W=Ze(p.charCodeAt(ue++));(W>=j||W>L((_-I)/ae))&&K("overflow"),I+=W*ae;var ce=fe<=U?w:fe>=U+g?g:fe-U;if(W<ce)break;var me=j-ce;ae>L(_/me)&&K("overflow"),ae*=me}var le=v.length+1;U=P(I-Q,le,Q==0),L(I/le)>_-z&&K("overflow"),z+=L(I/le),I%=le,v.splice(I++,0,z)}return String.fromCodePoint.apply(String,v)},T=function(p){var v=[];p=Ne(p);var A=p.length,I=k,z=0,U=N,ee=!0,se=!1,ue=void 0;try{for(var Q=p[Symbol.iterator](),ae;!(ee=(ae=Q.next()).done);ee=!0){var fe=ae.value;fe<128&&v.push(te(fe))}}catch(Zt){se=!0,ue=Zt}finally{try{!ee&&Q.return&&Q.return()}finally{if(se)throw ue}}var W=v.length,ce=W;for(W&&v.push(G);ce<A;){var me=_,le=!0,rt=!1,Be=void 0;try{for(var Ge=p[Symbol.iterator](),Rt;!(le=(Rt=Ge.next()).done);le=!0){var ut=Rt.value;ut>=I&&ut<me&&(me=ut)}}catch(Zt){rt=!0,Be=Zt}finally{try{!le&&Ge.return&&Ge.return()}finally{if(rt)throw Be}}var xe=ce+1;me-I>L((_-z)/xe)&&K("overflow"),z+=(me-I)*xe,I=me;var We=!0,ft=!1,Qe=void 0;try{for(var Yt=p[Symbol.iterator](),ya;!(We=(ya=Yt.next()).done);We=!0){var ga=ya.value;if(ga<I&&++z>_&&K("overflow"),ga==I){for(var ur=z,fr=j;;fr+=j){var pr=fr<=U?w:fr>=U+g?g:fr-U;if(ur<pr)break;var $a=ur-pr,va=j-pr;v.push(te(x(pr+$a%va,0))),ur=L($a/va)}v.push(te(x(ur,0))),U=P(z,xe,ce==W),z=0,++ce}}}catch(Zt){ft=!0,Qe=Zt}finally{try{!We&&Yt.return&&Yt.return()}finally{if(ft)throw Qe}}++z,++I}return v.join("")},f=function(p){return Ce(p,function(v){return ne.test(v)?C(v.slice(4).toLowerCase()):v})},$=function(p){return Ce(p,function(v){return je.test(v)?"xn--"+T(v):v})},O={version:"2.1.0",ucs2:{decode:Ne,encode:ct},decode:C,encode:T,toASCII:$,toUnicode:f},M={};function F(m){var p=m.charCodeAt(0),v=void 0;return p<16?v="%0"+p.toString(16).toUpperCase():p<128?v="%"+p.toString(16).toUpperCase():p<2048?v="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():v="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),v}function Z(m){for(var p="",v=0,A=m.length;v<A;){var I=parseInt(m.substr(v+1,2),16);if(I<128)p+=String.fromCharCode(I),v+=3;else if(I>=194&&I<224){if(A-v>=6){var z=parseInt(m.substr(v+4,2),16);p+=String.fromCharCode((I&31)<<6|z&63)}else p+=m.substr(v,6);v+=6}else if(I>=224){if(A-v>=9){var U=parseInt(m.substr(v+4,2),16),ee=parseInt(m.substr(v+7,2),16);p+=String.fromCharCode((I&15)<<12|(U&63)<<6|ee&63)}else p+=m.substr(v,9);v+=9}else p+=m.substr(v,3),v+=3}return p}function X(m,p){function v(A){var I=Z(A);return I.match(p.UNRESERVED)?I:A}return m.scheme&&(m.scheme=String(m.scheme).replace(p.PCT_ENCODED,v).toLowerCase().replace(p.NOT_SCHEME,"")),m.userinfo!==void 0&&(m.userinfo=String(m.userinfo).replace(p.PCT_ENCODED,v).replace(p.NOT_USERINFO,F).replace(p.PCT_ENCODED,o)),m.host!==void 0&&(m.host=String(m.host).replace(p.PCT_ENCODED,v).toLowerCase().replace(p.NOT_HOST,F).replace(p.PCT_ENCODED,o)),m.path!==void 0&&(m.path=String(m.path).replace(p.PCT_ENCODED,v).replace(m.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,F).replace(p.PCT_ENCODED,o)),m.query!==void 0&&(m.query=String(m.query).replace(p.PCT_ENCODED,v).replace(p.NOT_QUERY,F).replace(p.PCT_ENCODED,o)),m.fragment!==void 0&&(m.fragment=String(m.fragment).replace(p.PCT_ENCODED,v).replace(p.NOT_FRAGMENT,F).replace(p.PCT_ENCODED,o)),m}function de(m){return m.replace(/^0*(.*)/,"$1")||"0"}function Le(m,p){var v=m.match(p.IPV4ADDRESS)||[],A=y(v,2),I=A[1];return I?I.split(".").map(de).join("."):m}function Et(m,p){var v=m.match(p.IPV6ADDRESS)||[],A=y(v,3),I=A[1],z=A[2];if(I){for(var U=I.toLowerCase().split("::").reverse(),ee=y(U,2),se=ee[0],ue=ee[1],Q=ue?ue.split(":").map(de):[],ae=se.split(":").map(de),fe=p.IPV4ADDRESS.test(ae[ae.length-1]),W=fe?7:8,ce=ae.length-W,me=Array(W),le=0;le<W;++le)me[le]=Q[le]||ae[ce+le]||"";fe&&(me[W-1]=Le(me[W-1],p));var rt=me.reduce(function(xe,We,ft){if(!We||We==="0"){var Qe=xe[xe.length-1];Qe&&Qe.index+Qe.length===ft?Qe.length++:xe.push({index:ft,length:1})}return xe},[]),Be=rt.sort(function(xe,We){return We.length-xe.length})[0],Ge=void 0;if(Be&&Be.length>1){var Rt=me.slice(0,Be.index),ut=me.slice(Be.index+Be.length);Ge=Rt.join(":")+"::"+ut.join(":")}else Ge=me.join(":");return z&&(Ge+="%"+z),Ge}else return m}var Lt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Ht="".match(/(){0}/)[1]===void 0;function Ie(m){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v={},A=p.iri!==!1?u:d;p.reference==="suffix"&&(m=(p.scheme?p.scheme+":":"")+"//"+m);var I=m.match(Lt);if(I){Ht?(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5])):(v.scheme=I[1]||void 0,v.userinfo=m.indexOf("@")!==-1?I[3]:void 0,v.host=m.indexOf("//")!==-1?I[4]:void 0,v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=m.indexOf("?")!==-1?I[7]:void 0,v.fragment=m.indexOf("#")!==-1?I[8]:void 0,isNaN(v.port)&&(v.port=m.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?I[4]:void 0)),v.host&&(v.host=Et(Le(v.host,A),A)),v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&!v.path&&v.query===void 0?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==v.reference&&(v.error=v.error||"URI is not a "+p.reference+" reference.");var z=M[(p.scheme||v.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!z||!z.unicodeSupport)){if(v.host&&(p.domainHost||z&&z.domainHost))try{v.host=O.toASCII(v.host.replace(A.PCT_ENCODED,Z).toLowerCase())}catch(U){v.error=v.error||"Host's domain name can not be converted to ASCII via punycode: "+U}X(v,d)}else X(v,A);z&&z.parse&&z.parse(v,p)}else v.error=v.error||"URI can not be parsed.";return v}function Kt(m,p){var v=p.iri!==!1?u:d,A=[];return m.userinfo!==void 0&&(A.push(m.userinfo),A.push("@")),m.host!==void 0&&A.push(Et(Le(String(m.host),v),v).replace(v.IPV6ADDRESS,function(I,z,U){return"["+z+(U?"%25"+U:"")+"]"})),(typeof m.port=="number"||typeof m.port=="string")&&(A.push(":"),A.push(String(m.port))),A.length?A.join(""):void 0}var jt=/^\.\.?\//,Pt=/^\/\.(\/|$)/,Tt=/^\/\.\.(\/|$)/,Bt=/^\/?(?:.|\n)*?(?=\/|$)/;function He(m){for(var p=[];m.length;)if(m.match(jt))m=m.replace(jt,"");else if(m.match(Pt))m=m.replace(Pt,"/");else if(m.match(Tt))m=m.replace(Tt,"/"),p.pop();else if(m==="."||m==="..")m="";else{var v=m.match(Bt);if(v){var A=v[0];m=m.slice(A.length),p.push(A)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function Pe(m){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=p.iri?u:d,A=[],I=M[(p.scheme||m.scheme||"").toLowerCase()];if(I&&I.serialize&&I.serialize(m,p),m.host&&!v.IPV6ADDRESS.test(m.host)){if(p.domainHost||I&&I.domainHost)try{m.host=p.iri?O.toUnicode(m.host):O.toASCII(m.host.replace(v.PCT_ENCODED,Z).toLowerCase())}catch(ee){m.error=m.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+ee}}X(m,v),p.reference!=="suffix"&&m.scheme&&(A.push(m.scheme),A.push(":"));var z=Kt(m,p);if(z!==void 0&&(p.reference!=="suffix"&&A.push("//"),A.push(z),m.path&&m.path.charAt(0)!=="/"&&A.push("/")),m.path!==void 0){var U=m.path;!p.absolutePath&&(!I||!I.absolutePath)&&(U=He(U)),z===void 0&&(U=U.replace(/^\/\//,"/%2F")),A.push(U)}return m.query!==void 0&&(A.push("?"),A.push(m.query)),m.fragment!==void 0&&(A.push("#"),A.push(m.fragment)),A.join("")}function It(m,p){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=arguments[3],I={};return A||(m=Ie(Pe(m,v),v),p=Ie(Pe(p,v),v)),v=v||{},!v.tolerant&&p.scheme?(I.scheme=p.scheme,I.userinfo=p.userinfo,I.host=p.host,I.port=p.port,I.path=He(p.path||""),I.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(I.userinfo=p.userinfo,I.host=p.host,I.port=p.port,I.path=He(p.path||""),I.query=p.query):(p.path?(p.path.charAt(0)==="/"?I.path=He(p.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?I.path="/"+p.path:m.path?I.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+p.path:I.path=p.path,I.path=He(I.path)),I.query=p.query):(I.path=m.path,p.query!==void 0?I.query=p.query:I.query=m.query),I.userinfo=m.userinfo,I.host=m.host,I.port=m.port),I.scheme=m.scheme),I.fragment=p.fragment,I}function Gt(m,p,v){var A=i({scheme:"null"},v);return Pe(It(Ie(m,A),Ie(p,A),A,!0),A)}function lt(m,p){return typeof m=="string"?m=Pe(Ie(m,p),p):s(m)==="object"&&(m=Ie(Pe(m,p),p)),m}function Wt(m,p,v){return typeof m=="string"?m=Pe(Ie(m,v),v):s(m)==="object"&&(m=Pe(m,v)),typeof p=="string"?p=Pe(Ie(p,v),v):s(p)==="object"&&(p=Pe(p,v)),m===p}function dr(m,p){return m&&m.toString().replace(!p||!p.iri?d.ESCAPE:u.ESCAPE,F)}function ke(m,p){return m&&m.toString().replace(!p||!p.iri?d.PCT_ENCODED:u.PCT_ENCODED,Z)}var dt={scheme:"http",domainHost:!0,parse:function(p,v){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,v){var A=String(p.scheme).toLowerCase()==="https";return(p.port===(A?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},ca={scheme:"https",domainHost:dt.domainHost,parse:dt.parse,serialize:dt.serialize};function la(m){return typeof m.secure=="boolean"?m.secure:String(m.scheme).toLowerCase()==="wss"}var Jt={scheme:"ws",domainHost:!0,parse:function(p,v){var A=p;return A.secure=la(A),A.resourceName=(A.path||"/")+(A.query?"?"+A.query:""),A.path=void 0,A.query=void 0,A},serialize:function(p,v){if((p.port===(la(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var A=p.resourceName.split("?"),I=y(A,2),z=I[0],U=I[1];p.path=z&&z!=="/"?z:void 0,p.query=U,p.resourceName=void 0}return p.fragment=void 0,p}},da={scheme:"wss",domainHost:Jt.domainHost,parse:Jt.parse,serialize:Jt.serialize},mo={},ua="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ke="[0-9A-Fa-f]",ho=a(a("%[EFef]"+Ke+"%"+Ke+Ke+"%"+Ke+Ke)+"|"+a("%[89A-Fa-f]"+Ke+"%"+Ke+Ke)+"|"+a("%"+Ke+Ke)),yo="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",go="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",$o=n(go,'[\\"\\\\]'),vo="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",_o=new RegExp(ua,"g"),At=new RegExp(ho,"g"),bo=new RegExp(n("[^]",yo,"[\\.]",'[\\"]',$o),"g"),fa=new RegExp(n("[^]",ua,vo),"g"),wo=fa;function Vr(m){var p=Z(m);return p.match(_o)?p:m}var pa={scheme:"mailto",parse:function(p,v){var A=p,I=A.to=A.path?A.path.split(","):[];if(A.path=void 0,A.query){for(var z=!1,U={},ee=A.query.split("&"),se=0,ue=ee.length;se<ue;++se){var Q=ee[se].split("=");switch(Q[0]){case"to":for(var ae=Q[1].split(","),fe=0,W=ae.length;fe<W;++fe)I.push(ae[fe]);break;case"subject":A.subject=ke(Q[1],v);break;case"body":A.body=ke(Q[1],v);break;default:z=!0,U[ke(Q[0],v)]=ke(Q[1],v);break}}z&&(A.headers=U)}A.query=void 0;for(var ce=0,me=I.length;ce<me;++ce){var le=I[ce].split("@");if(le[0]=ke(le[0]),v.unicodeSupport)le[1]=ke(le[1],v).toLowerCase();else try{le[1]=O.toASCII(ke(le[1],v).toLowerCase())}catch(rt){A.error=A.error||"Email address's domain name can not be converted to ASCII via punycode: "+rt}I[ce]=le.join("@")}return A},serialize:function(p,v){var A=p,I=c(p.to);if(I){for(var z=0,U=I.length;z<U;++z){var ee=String(I[z]),se=ee.lastIndexOf("@"),ue=ee.slice(0,se).replace(At,Vr).replace(At,o).replace(bo,F),Q=ee.slice(se+1);try{Q=v.iri?O.toUnicode(Q):O.toASCII(ke(Q,v).toLowerCase())}catch(ce){A.error=A.error||"Email address's domain name can not be converted to "+(v.iri?"Unicode":"ASCII")+" via punycode: "+ce}I[z]=ue+"@"+Q}A.path=I.join(",")}var ae=p.headers=p.headers||{};p.subject&&(ae.subject=p.subject),p.body&&(ae.body=p.body);var fe=[];for(var W in ae)ae[W]!==mo[W]&&fe.push(W.replace(At,Vr).replace(At,o).replace(fa,F)+"="+ae[W].replace(At,Vr).replace(At,o).replace(wo,F));return fe.length&&(A.query=fe.join("&")),A}},So=/^([^\:]+)\:(.*)/,ma={scheme:"urn",parse:function(p,v){var A=p.path&&p.path.match(So),I=p;if(A){var z=v.scheme||I.scheme||"urn",U=A[1].toLowerCase(),ee=A[2],se=z+":"+(v.nid||U),ue=M[se];I.nid=U,I.nss=ee,I.path=void 0,ue&&(I=ue.parse(I,v))}else I.error=I.error||"URN can not be parsed.";return I},serialize:function(p,v){var A=v.scheme||p.scheme||"urn",I=p.nid,z=A+":"+(v.nid||I),U=M[z];U&&(p=U.serialize(p,v));var ee=p,se=p.nss;return ee.path=(I||v.nid)+":"+se,ee}},Eo=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ha={scheme:"urn:uuid",parse:function(p,v){var A=p;return A.uuid=A.nss,A.nss=void 0,!v.tolerant&&(!A.uuid||!A.uuid.match(Eo))&&(A.error=A.error||"UUID is not val
5id."),A},serialize:function(p,v){var A=p;return A.nss=(p.uuid||"").toLowerCase(),A}};M[dt.scheme]=dt,M[ca.scheme]=ca,M[Jt.scheme]=Jt,M[da.scheme]=da,M[pa.scheme]=pa,M[ma.scheme]=ma,M[ha.scheme]=ha,r.SCHEMES=M,r.pctEncChar=F,r.pctDecChars=Z,r.parse=Ie,r.removeDotSegments=He,r.serialize=Pe,r.resolveComponents=It,r.resolve=Gt,r.normalize=lt,r.equal=Wt,r.escapeComponent=dr,r.unescapeComponent=ke,Object.defineProperty(r,"__esModule",{value:!0})})})(Qr,Qr.exports);var al=Qr.exports;Object.defineProperty(vn,"__esModule",{value:!0});const Hs=al;Hs.code='require("ajv/dist/runtime/uri").default';vn.default=Hs;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Me;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Ft,a=_t,s=vt,o=Ee,c=B,i=be,l=ye,d=D,u=nl,y=vn,b=(x,P)=>new RegExp(x,P);b.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],j=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated 
5ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function R(x){var P,C,T,f,$,O,M,F,Z,X,de,Le,Et,Lt,Ht,Ie,Kt,jt,Pt,Tt,Bt,He,Pe,It,Gt;const lt=x.strict,Wt=(P=x.code)===null||P===void 0?void 0:P.optimize,dr=Wt===!0||Wt===void 0?1:Wt||0,ke=(T=(C=x.code)===null||C===void 0?void 0:C.regExp)!==null&&T!==void 0?T:b,dt=(f=x.uriResolver)!==null&&f!==void 0?f:y.default;return{strictSchema:(O=($=x.strictSchema)!==null&&$!==void 0?$:lt)!==null&&O!==void 0?O:!0,strictNumbers:(F=(M=x.strictNumbers)!==null&&M!==void 0?M:lt)!==null&&F!==void 0?F:!0,strictTypes:(X=(Z=x.strictTypes)!==null&&Z!==void 0?Z:lt)!==null&&X!==void 0?X:"log",strictTuples:(Le=(de=x.strictTuples)!==null&&de!==void 0?de:lt)!==null&&Le!==void 0?Le:"log",strictRequired:(Lt=(Et=x.strictRequired)!==null&&Et!==void 0?Et:lt)!==null&&Lt!==void 0?Lt:!1,code:x.code?{...x.code,optimize:dr,regExp:ke}:{optimize:dr,regExp:ke},loopRequired:(Ht=x.loopRequired)!==null&&Ht!==void 0?Ht:S,loopEnum:(Ie=x.loopEnum)!==null&&Ie!==void 0?Ie:S,meta:(Kt=x.meta)!==null&&Kt!==void 0?Kt:!0,messages:(jt=x.messages)!==null&&jt!==void 0?jt:!0,inlineRefs:(Pt=x.inlineRefs)!==null&&Pt!==void 0?Pt:!0,schemaId:(Tt=x.schemaId)!==null&&Tt!==void 0?Tt:"$id",addUsedSchema:(Bt=x.addUsedSchema)!==null&&Bt!==void 0?Bt:!0,validateSchema:(He=x.validateSchema)!==null&&He!==void 0?He:!0,validateFormats:(Pe=x.validateFormats)!==null&&Pe!==void 0?Pe:!0,unicodeRegExp:(It=x.unicodeRegExp)!==null&&It!==void 0?It:!0,int32range:(Gt=x.int32range)!==null&&Gt!==void 0?Gt:!0,uriResolver:dt}}class N{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...R(P)};const{es5:C,lines:T}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:j,es5:C,lines:T}),this.logger=L(P.logger);const f=P.validateFormats;P.validateFormats=!1,this.RULES=(0,s.getRules)(),k.call(this,w,P,"NOT SUPPORTED"),k.call(this,g,P,"DEPRECATED","warn"),this._metaOpts=Fe.call(this),P.formats&&je.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&Oe.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),ne.call(this),P.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:C,schemaId:T}=this.opts;let f=u;T==="id"&&(f={...u},f.id=f.$id,delete f.$id),C&&P&&this.addMetaSchema(f,f[T],!1)}defaultMeta(){const{meta:P,schemaId:C}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[C]||P:void 0}validate(P,C){let T;if(typeof P=="string"){if(T=this.getSchema(P),!T)throw new Error(`no schema with key or ref "${P}"`)}else T=this.compile(P);const f=T(C);return"$async"in T||(this.errors=T.errors),f}compile(P,C){const T=this._addSchema(P,C);return T.validate||this._compileSchemaEnv(T)}compileAsync(P,C){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return f.call(this,P,C);async function f(X,de){await $.call(this,X.$schema);const Le=this._addSchema(X,de);return Le.validate||O.call(this,Le)}async function $(X){X&&!this.getSchema(X)&&await f.call(this,{$ref:X},!0)}async function O(X){try{return this._compileSchemaEnv(X)}catch(de){if(!(de instanceof a.default))throw de;return M.call(this,de),await F.call(this,de.missingSchema),O.call(this,X)}}function M({missingSchema:X,missingRef:de}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${de} cannot be resolved`)}async function F(X){const de=await Z.call(this,X);this.refs[X]||await $.call(this,de.$schema),this.refs[X]||this.addSchema(de,X,C)}async function Z(X){const de=this._loading[X];if(de)return de;try{return await(this._loading[X]=T(X))}finally{delete this._loading[X]}}}addSchema(P,C,T,f=this.opts.validateSchema){if(Array.isArray(P)){for(const O of P)this.addSchema(O,void 0,T,f);return this}let $;if(typeof P=="object"){const{schemaId:O}=this.opts;if($=P[O],$!==void 0&&typeof $!="string")throw new Error(`schema ${O} must be string`)}return C=(0,i.normalizeId)(C||$),this._checkUnique(C),this.schemas[C]=this._addSchema(P,T,C,f,!0),this}addMetaSchema(P,C,T=this.opts.validateSchema){return this.addSchema(P,C,!0,T),this}
5validateSchema(P,C){if(typeof P=="boolean")return!0;let T;if(T=P.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(T,P);if(!f&&C){const $="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error($);else throw new Error($)}return f}getSchema(P){let C;for(;typeof(C=G.call(this,P))=="string";)P=C;if(C===void 0){const{schemaId:T}=this.opts,f=new o.SchemaEnv({schema:{},schemaId:T});if(C=o.resolveSchema.call(this,f,P),!C)return;this.refs[P]=C}return C.validate||this._compileSchemaEnv(C)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const C=G.call(this,P);return typeof C=="object"&&this._cache.delete(C.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const C=P;this._cache.delete(C);let T=P[this.opts.schemaId];return T&&(T=(0,i.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const C of P)this.addKeyword(C);return this}addKeyword(P,C){let T;if(typeof P=="string")T=P,typeof C=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),C.keyword=T);else if(typeof P=="object"&&C===void 0){if(C=P,T=C.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,T,C),!C)return(0,d.eachItem)(T,$=>he.call(this,$)),this;Ne.call(this,C);const f={...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)};return(0,d.eachItem)(T,f.type.length===0?$=>he.call(this,$,f):$=>f.type.forEach(O=>he.call(this,$,f,O))),this}getKeyword(P){const C=this.RULES.all[P];return typeof C=="object"?C.definition:!!C}removeKeyword(P){const{RULES:C}=this;delete C.keywords[P],delete C.all[P];for(const T of C.rules){const f=T.rules.findIndex($=>$.keyword===P);f>=0&&T.rules.splice(f,1)}return this}addFormat(P,C){return typeof C=="string"&&(C=new RegExp(C)),this.formats[P]=C,this}errorsText(P=this.errors,{separator:C=", ",dataVar:T="data"}={}){return!P||P.length===0?"No errors":P.map(f=>`${T}${f.instancePath} ${f.message}`).reduce((f,$)=>f+C+$)}$dataMetaSchema(P,C){const T=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const f of C){const $=f.split("/").slice(1);let O=P;for(const M of $)O=O[M];for(const M in T){const F=T[M];if(typeof F!="object")continue;const{$data:Z}=F.definition,X=O[M];Z&&X&&(O[M]=Ze(X))}}return P}_removeAllSchemas(P,C){for(const T in P){const f=P[T];(!C||C.test(T))&&(typeof f=="string"?delete P[T]:f&&!f.meta&&(this._cache.delete(f.schema),delete P[T]))}}_addSchema(P,C,T,f=this.opts.validateSchema,$=this.opts.addUsedSchema){let O;const{schemaId:M}=this.opts;if(typeof P=="object")O=P[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(P);if(F!==void 0)return F;T=(0,i.normalizeId)(O||T);const Z=i.getSchemaRefs.call(this,P,T);return F=new o.SchemaEnv({schema:P,schemaId:M,meta:C,baseId:T,localRefs:Z}),this._cache.set(F.schema,F),$&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=F),f&&this.validateSchema(P,!0),F}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):o.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const C=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,P)}finally{this.opts=C}}}N.ValidationError=n.default,N.MissingRefError=a.default,e.default=N;function k(x,P,C,T="error"){for(const f in x){const $=f;$ in P&&this.logger[T](`${C}: option ${f}. ${x[$]}`)}}function G(x){return x=(0,i.normalizeId)(x),this.schemas[x]||this.refs[x]}function ne(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const P in x)this.addSchema(x[P],P)}function je(){for(const x in this.opts.formats){const P=this.opts.formats[x];P&&this.addFormat(x,P)}}function Oe(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in x){const C=x[P];C.keyword||(C.keyword=P),this.addKeyword(C)}}function Fe(){const x={...this.opts};for(const P of _)delete x[P];return x}const q={log(){},warn(){},error(){}};function L(x){if(x===!1)return q;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}const te=/^[a-z_$][a-z0-9_$:-]*$/i;function K(x,P){const{RULES:C}=this;if((0,d.eachItem)(x,T=>{if(C.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!te.test(T))throw new Error(`Keyword ${T}
5 has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function he(x,P,C){var T;const f=P==null?void 0:P.post;if(C&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:$}=this;let O=f?$.post:$.rules.find(({type:F})=>F===C);if(O||(O={type:C,rules:[]},$.rules.push(O)),$.keywords[x]=!0,!P)return;const M={keyword:x,definition:{...P,type:(0,l.getJSONTypes)(P.type),schemaType:(0,l.getJSONTypes)(P.schemaType)}};P.before?Ce.call(this,O,M,P.before):O.rules.push(M),$.all[x]=M,(T=P.implements)===null||T===void 0||T.forEach(F=>this.addKeyword(F))}function Ce(x,P,C){const T=x.rules.findIndex(f=>f.keyword===C);T>=0?x.rules.splice(T,0,P):(x.rules.push(P),this.logger.warn(`rule ${C} is not defined`))}function Ne(x){let{metaSchema:P}=x;P!==void 0&&(x.$data&&this.opts.$data&&(P=Ze(P)),x.validateSchema=this.compile(P,!0))}const ct={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ze(x){return{anyOf:[x,ct]}}})(cn);var Nr={},_n={},bn={};Object.defineProperty(bn,"__esModule",{value:!0});const sl={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bn.default=sl;var tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.callRef=tt.getValidate=void 0;const ol=_t,Oa=Y,Te=B,Ct=Re,Ca=Ee,mr=D,il={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:a,schemaEnv:s,validateName:o,opts:c,self:i}=n,{root:l}=s;if((r==="#"||r==="#/")&&a===l.baseId)return u();const d=Ca.resolveRef.call(i,l,a,r);if(d===void 0)throw new ol.default(n.opts.uriResolver,a,r);if(d instanceof Ca.SchemaEnv)return y(d);return b(d);function u(){if(s===l)return br(e,o,s,s.$async);const _=t.scopeValue("root",{ref:l});return br(e,(0,Te._)`${_}.validate`,l,l.$async)}function y(_){const j=Ks(e,_);br(e,j,_,_.$async)}function b(_){const j=t.scopeValue("schema",c.code.source===!0?{ref:_,code:(0,Te.stringify)(_)}:{ref:_}),w=t.name("valid"),g=e.subschema({schema:_,dataTypes:[],schemaPath:Te.nil,topSchemaRef:j,errSchemaPath:r},w);e.mergeEvaluated(g),e.ok(w)}}};function Ks(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Te._)`${r.scopeValue("wrapper",{ref:t})}.validate`}tt.getValidate=Ks;function br(e,t,r,n){const{gen:a,it:s}=e,{allErrors:o,schemaEnv:c,opts:i}=s,l=i.passContext?Ct.default.this:Te.nil;n?d():u();function d(){if(!c.$async)throw new Error("async schema referenced by sync schema");const _=a.let("valid");a.try(()=>{a.code((0,Te._)`await ${(0,Oa.callValidateCode)(e,t,l)}`),b(t),o||a.assign(_,!0)},j=>{a.if((0,Te._)`!(${j} instanceof ${s.ValidationError})`,()=>a.throw(j)),y(j),o||a.assign(_,!1)}),e.ok(_)}function u(){e.result((0,Oa.callValidateCode)(e,t,l),()=>b(t),()=>y(t))}function y(_){const j=(0,Te._)`${_}.errors`;a.assign(Ct.default.vErrors,(0,Te._)`${Ct.default.vErrors} === null ? ${j} : ${Ct.default.vErrors}.concat(${j})`),a.assign(Ct.default.errors,(0,Te._)`${Ct.default.vErrors}.length`)}function b(_){var j;if(!s.opts.unevaluated)return;const w=(j=r==null?void 0:r.validate)===null||j===void 0?void 0:j.evaluated;if(s.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(s.props=mr.mergeEvaluated.props(a,w.props,s.props));else{const g=a.var("props",(0,Te._)`${_}.evaluated.props`);s.props=mr.mergeEvaluated.props(a,g,s.props,Te.Name)}if(s.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(s.items=mr.mergeEvaluated.items(a,w.items,s.items));else{const g=a.var("items",(0,Te._)`${_}.evaluated.items`);s.items=mr.mergeEvaluated.items(a,g,s.items,Te.Name)}}}tt.callRef=br;tt.default=il;Object.defineProperty(_n,"__esModule",{value:!0});const cl=bn,ll=tt,dl=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cl.default,ll.default];_n.default=dl;var wn={},Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});const jr=B,at=jr.operators,Pr={maximum:{okStr:"<=",ok:at.LTE,fail:at.GT},minimum:{okStr:">=",ok:at.GTE,fail:at.LT},exclusiveMaximum:{okStr:"<",ok:at.LT,fail:at.GTE},exclusiveMinimum:{okStr:">",ok:at.GT,fail:at.LTE}},ul={message:({keyword:e,schemaCode:t})=>(0,jr.str)`must be ${Pr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,jr._)`{comparison: ${Pr[e].okStr}, limit: ${t}}`},fl={keyword:Object.keys(Pr),type:"number",schemaType:"number",$data:!0,error:ul,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,jr._)`${r} ${Pr[t].fail} ${n} || isNaN(${r})`)}};Sn.default=fl;var En={};Object.defineProperty(En,"__esModule",{value:!0});const rr=B,pl={message:({schemaCode:e})=>(0,rr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,rr._)`{multipleOf: ${e}}`},ml={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:pl,code(e){const{gen:t,data:r,schemaCode:n,it:a}=e,s=a.opts.multipleOfPrecision,o=t.let("res"),c=s?(0,rr._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,rr._)`${o} !== parseInt(${o})`;e.fail$data((0,rr._)`(${n} === 0 || (${o} = ${r}/${n}, ${c}))`)}};En.default=ml;var jn={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});function Bs(e){const t=e.length;let r=0,n=0,a;for(;n<t;)r++,a=e.charCodeAt(n++),a>=55296&&a<=56319&&n<t&&(a=e.charCodeAt(n),(a&64512)===56320&&n++);return r}Pn.default=Bs;
5Bs.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(jn,"__esModule",{value:!0});const ht=B,hl=D,yl=Pn,gl={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,ht.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ht._)`{limit: ${e}}`},$l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:gl,code(e){const{keyword:t,data:r,schemaCode:n,it:a}=e,s=t==="maxLength"?ht.operators.GT:ht.operators.LT,o=a.opts.unicode===!1?(0,ht._)`${r}.length`:(0,ht._)`${(0,hl.useFunc)(e.gen,yl.default)}(${r})`;e.fail$data((0,ht._)`${o} ${s} ${n}`)}};jn.default=$l;var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});const vl=Y,Tr=B,_l={message:({schemaCode:e})=>(0,Tr.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Tr._)`{pattern: ${e}}`},bl={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:_l,code(e){const{data:t,$data:r,schema:n,schemaCode:a,it:s}=e,o=s.opts.unicodeRegExp?"u":"",c=r?(0,Tr._)`(new RegExp(${a}, ${o}))`:(0,vl.usePattern)(e,n);e.fail$data((0,Tr._)`!${c}.test(${t})`)}};Tn.default=bl;var In={};Object.defineProperty(In,"__esModule",{value:!0});const nr=B,wl={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,nr.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,nr._)`{limit: ${e}}`},Sl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wl,code(e){const{keyword:t,data:r,schemaCode:n}=e,a=t==="maxProperties"?nr.operators.GT:nr.operators.LT;e.fail$data((0,nr._)`Object.keys(${r}).length ${a} ${n}`)}};In.default=Sl;var An={};Object.defineProperty(An,"__esModule",{value:!0});const Xt=Y,ar=B,El=D,jl={message:({params:{missingProperty:e}})=>(0,ar.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ar._)`{missingProperty: ${e}}`},Pl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:jl,code(e){const{gen:t,schema:r,schemaCode:n,data:a,$data:s,it:o}=e,{opts:c}=o;if(!s&&r.length===0)return;const i=r.length>=c.loopRequired;if(o.allErrors?l():d(),c.strictRequired){const b=e.parentSchema.properties,{definedProperties:_}=e.it;for(const j of r)if((b==null?void 0:b[j])===void 0&&!_.has(j)){const w=o.schemaEnv.baseId+o.errSchemaPath,g=`required property "${j}" is not defined at "${w}" (strictRequired)`;(0,El.checkStrictMode)(o,g,o.opts.strictRequired)}}function l(){if(i||s)e.block$data(ar.nil,u);else for(const b of r)(0,Xt.checkReportMissingProp)(e,b)}function d(){const b=t.let("missing");if(i||s){const _=t.let("valid",!0);e.block$data(_,()=>y(b,_)),e.ok(_)}else t.if((0,Xt.checkMissingProp)(e,r,b)),(0,Xt.reportMissingProp)(e,b),t.else()}function u(){t.forOf("prop",n,b=>{e.setParams({missingProperty:b}),t.if((0,Xt.noPropertyInData)(t,a,b,c.ownProperties),()=>e.error())})}function y(b,_){e.setParams({missingProperty:b}),t.forOf(b,n,()=>{t.assign(_,(0,Xt.propertyInData)(t,a,b,c.ownProperties)),t.if((0,ar.not)(_),()=>{e.error(),t.break()})},ar.nil)}}};An.default=Pl;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const sr=B,Tl={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,sr.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,sr._)`{limit: ${e}}`},Il={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Tl,code(e){const{keyword:t,data:r,schemaCode:n}=e,a=t==="maxItems"?sr.operators.GT:sr.operators.LT;e.fail$data((0,sr._)`${r}.length ${a} ${n}`)}};Rn.default=Il;var On={},lr={};Object.defineProperty(lr,"__esModule",{value:!0});const Gs=os;Gs.code='require("ajv/dist/runtime/equal").default';lr.default=Gs;Object.defineProperty(On,"__esModule",{value:!0});const Lr=ye,_e=B,Al=D,Rl=lr,Ol={message:({params:{i:e,j:t}})=>(0,_e.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,_e._)`{i: ${e}, j: ${t}}`},Cl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ol,code(e){const{gen:t,data:r,$data:n,schema:a,parentSchema:s,schemaCode:o,it:c}=e;if(!n&&!a)return;const i=t.let("valid"),l=s.items?(0,Lr.getSchemaTypes)(s.items):[];e.block$data(i,d,(0,_e._)`${o} === false`),e.ok(i);function d(){const _=t.let("i",(0,_e._)`${r}.length`),j=t.let("j");e.setParams({i:_,j}),t.assign(i,!0),t.if((0,_e._)`${_} > 1`,()=>(u()?y:b)(_,j))}function u(){return l.length>0&&!l.some(_=>_==="object"||_==="array")}function y(_,j){const w=t.name("item"),g=(0,Lr.checkDataTypes)(l,w,c.opts.strictNumbers,Lr.DataType.Wrong),S=t.const("indices",(0,_e._)`{}`);t.for((0,_e._)`;${_}--;`,()=>{t.let(w,(0,_e._)`${r}[${_}]`),t.if(g,(0,_e._)`continue`),l.length>1&&t.if((0,_e._)`typeof ${w} == "string"`,(0,_e._)`${w} += "_"`),t.if((0,_e._)`typeof ${S}[${w}] == "number"`,()=>{t.assign(j,(0,_e._)`${S}[${w}]`),e.error(),t.assign(i,!1).break()}).code((0,_e._)`${S}[${w}] = ${_}`)})}function b(_,j){const w=(0,Al.useFunc)(t,Rl.default),g=t.name("outer");t.label(g).for((0,_e._)`;${_}--;`,()=>t.for((0,_e._)`${j} = ${_}; ${j}--;`,()=>t.if((0,_e._)`${w}(${r}[${_}], ${r}[${j}])`,()=>{e.error(),t.assign(i,!1).break(g)})))}}};On.default=Cl;var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});const Xr=B,Nl=D,kl=lr,xl={message:"must be equal to constant",params:({schemaCode:e})=>(0,Xr._)`{allowedValue: ${e}}`},Dl={keyword:"const",$data:!0,error:xl,code(e){const{gen:t,data:r,$data:n,schemaCode:a,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Xr._)`!${(0,Nl.useFunc)(t,kl.default)}(${r}, ${a})`):e.fail((0,Xr._)`${s} !== ${r}`)}};Cn.default=Dl;var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});const er=B,Ml=D,Fl=lr,Vl={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,er._)`{allowedValues: ${e}}`},zl={keyword:"enum",schemaType:"array",$data:!0,error:Vl,code(e){const{gen:t,data:r,$data:n,schema:a,schemaCode:s,it:o}=e;if(!n&&a.length===0)throw new Error("enum must have non-empty array");const c=a.length>=o.opts.loopEnum;let i;const l=()=>i??(i=(0,Ml.useFunc)(t,Fl.default));let d;if(c||n)d=t.let("valid"),e.block$data(d,u);else{if(!Array.isArray(a))throw new Error("ajv implementation error");const b=t.const("vSchema",s);d=(0,er.or)(...a.map((_,j)=>y(b,j)))}e.pass(d);function u(){t.assign(d,!1),t.forOf("v",s,b=>t.if((0,er._)`${l()}(${r}, ${b})`,()=>t.assign(d,!0).break()))}function y(b,_){const j=a[_];return typeof j=="object"&&j!==null?(0,er._)`${l()}(${r}, ${b}[${_}])`:(0,er._)`${r} === ${j}`}}};Nn.default=zl;Object.defineProperty(wn,"__esModule",{value:!0});const ql=Sn,Ul=En,Ll=jn,Hl=Tn,Kl=In,Bl=An,Gl=Rn,Wl=On,Jl=Cn,Yl=Nn,Zl=[ql.default,Ul.default,Ll.default,Hl.default,Kl.default,Bl.default,Gl.default,Wl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Jl.default,Yl.default];wn.default=Zl;var kn={},Vt={};
5Object.defineProperty(Vt,"__esModule",{value:!0});Vt.validateAdditionalItems=void 0;const yt=B,en=D,Ql={message:({params:{len:e}})=>(0,yt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,yt._)`{limit: ${e}}`},Xl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ql,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,en.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ws(e,n)}};function Ws(e,t){const{gen:r,schema:n,data:a,keyword:s,it:o}=e;o.items=!0;const c=r.const("len",(0,yt._)`${a}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,yt._)`${c} <= ${t.length}`);else if(typeof n=="object"&&!(0,en.alwaysValidSchema)(o,n)){const l=r.var("valid",(0,yt._)`${c} <= ${t.length}`);r.if((0,yt.not)(l),()=>i(l)),e.ok(l)}function i(l){r.forRange("i",t.length,c,d=>{e.subschema({keyword:s,dataProp:d,dataPropType:en.Type.Num},l),o.allErrors||r.if((0,yt.not)(l),()=>r.break())})}}Vt.validateAdditionalItems=Ws;Vt.default=Xl;var xn={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.validateTuple=void 0;const Na=B,wr=D,ed=Y,td={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return Js(e,"additionalItems",t);r.items=!0,!(0,wr.alwaysValidSchema)(r,t)&&e.ok((0,ed.validateArray)(e))}};function Js(e,t,r=e.schema){const{gen:n,parentSchema:a,data:s,keyword:o,it:c}=e;d(a),c.opts.unevaluated&&r.length&&c.items!==!0&&(c.items=wr.mergeEvaluated.items(n,r.length,c.items));const i=n.name("valid"),l=n.const("len",(0,Na._)`${s}.length`);r.forEach((u,y)=>{(0,wr.alwaysValidSchema)(c,u)||(n.if((0,Na._)`${l} > ${y}`,()=>e.subschema({keyword:o,schemaProp:y,dataProp:y},i)),e.ok(i))});function d(u){const{opts:y,errSchemaPath:b}=c,_=r.length,j=_===u.minItems&&(_===u.maxItems||u[t]===!1);if(y.strictTuples&&!j){const w=`"${o}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${b}"`;(0,wr.checkStrictMode)(c,w,y.strictTuples)}}}zt.validateTuple=Js;zt.default=td;Object.defineProperty(xn,"__esModule",{value:!0});const rd=zt,nd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,rd.validateTuple)(e,"items")};xn.default=nd;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const ka=B,ad=D,sd=Y,od=Vt,id={message:({params:{len:e}})=>(0,ka.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ka._)`{limit: ${e}}`},cd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:id,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,!(0,ad.alwaysValidSchema)(n,t)&&(a?(0,od.validateAdditionalItems)(e,a):e.ok((0,sd.validateArray)(e)))}};Dn.default=cd;var Mn={};Object.defineProperty(Mn,"__esModule",{value:!0});const De=B,hr=D,ld={message:({params:{min:e,max:t}})=>t===void 0?(0,De.str)`must contain at least ${e} valid item(s)`:(0,De.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,De._)`{minContains: ${e}}`:(0,De._)`{minContains: ${e}, maxContains: ${t}}`},dd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:ld,code(e){const{gen:t,schema:r,parentSchema:n,data:a,it:s}=e;let o,c;const{minContains:i,maxContains:l}=n;s.opts.next?(o=i===void 0?1:i,c=l):o=1;const d=t.const("len",(0,De._)`${a}.length`);if(e.setParams({min:o,max:c}),c===void 0&&o===0){(0,hr.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&o>c){(0,hr.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,hr.alwaysValidSchema)(s,r)){let j=(0,De._)`${d} >= ${o}`;c!==void 0&&(j=(0,De._)`${j} && ${d} <= ${c}`),e.pass(j);return}s.items=!0;const u=t.name("valid");c===void 0&&o===1?b(u,()=>t.if(u,()=>t.break())):o===0?(t.let(u,!0),c!==void 0&&t.if((0,De._)`${a}.length > 0`,y)):(t.let(u,!1),y()),e.result(u,()=>e.reset());function y(){const j=t.name("_valid"),w=t.let("count",0);b(j,()=>t.if(j,()=>_(w)))}function b(j,w){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:hr.Type.Num,compositeRule:!0},j),w()})}function _(j){t.code((0,De._)`${j}++`),c===void 0?t.if((0,De._)`${j} >= ${o}`,()=>t.assign(u,!0).break()):(t.if((0,De._)`${j} > ${c}`,()=>t.assign(u,!1).break()),o===1?t.assign(u,!0):t.if((0,De._)`${j} >= ${o}`,()=>t.assign(u,!0)))}}};Mn.default=dd;var kr={};
5(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=B,r=D,n=Y;e.error={message:({params:{property:i,depsCount:l,deps:d}})=>{const u=l===1?"property":"properties";return(0,t.str)`must have ${u} ${d} when property ${i} is present`},params:({params:{property:i,depsCount:l,deps:d,missingProperty:u}})=>(0,t._)`{property: ${i},
6    missingProperty: ${u},
7    depsCount: ${l},
8    deps: ${d}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[l,d]=s(i);o(i,l),c(i,d)}};function s({schema:i}){const l={},d={};for(const u in i){if(u==="__proto__")continue;const y=Array.isArray(i[u])?l:d;y[u]=i[u]}return[l,d]}function o(i,l=i.schema){const{gen:d,data:u,it:y}=i;if(Object.keys(l).length===0)return;const b=d.let("missing");for(const _ in l){const j=l[_];if(j.length===0)continue;const w=(0,n.propertyInData)(d,u,_,y.opts.ownProperties);i.setParams({property:_,depsCount:j.length,deps:j.join(", ")}),y.allErrors?d.if(w,()=>{for(const g of j)(0,n.checkReportMissingProp)(i,g)}):(d.if((0,t._)`${w} && (${(0,n.checkMissingProp)(i,j,b)})`),(0,n.reportMissingProp)(i,b),d.else())}}e.validatePropertyDeps=o;function c(i,l=i.schema){const{gen:d,data:u,keyword:y,it:b}=i,_=d.name("valid");for(const j in l)(0,r.alwaysValidSchema)(b,l[j])||(d.if((0,n.propertyInData)(d,u,j,b.opts.ownProperties),()=>{const w=i.subschema({keyword:y,schemaProp:j},_);i.mergeValidEvaluated(w,_)},()=>d.var(_,!0)),i.ok(_))}e.validateSchemaDeps=c,e.default=a})(kr);var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Ys=B,ud=D,fd={message:"property name must be valid",params:({params:e})=>(0,Ys._)`{propertyName: ${e.propertyName}}`},pd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:fd,code(e){const{gen:t,schema:r,data:n,it:a}=e;if((0,ud.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,Ys.not)(s),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(s)}};Fn.default=pd;var xr={};Object.defineProperty(xr,"__esModule",{value:!0});const yr=Y,ze=B,md=Re,gr=D,hd={message:"must NOT have additional properties",params:({params:e})=>(0,ze._)`{additionalProperty: ${e.additionalProperty}}`},yd={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:hd,code(e){const{gen:t,schema:r,parentSchema:n,data:a,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:c,opts:i}=o;if(o.props=!0,i.removeAdditional!=="all"&&(0,gr.alwaysValidSchema)(o,r))return;const l=(0,yr.allSchemaProperties)(n.properties),d=(0,yr.allSchemaProperties)(n.patternProperties);u(),e.ok((0,ze._)`${s} === ${md.default.errors}`);function u(){t.forIn("key",a,w=>{!l.length&&!d.length?_(w):t.if(y(w),()=>_(w))})}function y(w){let g;if(l.length>8){const S=(0,gr.schemaRefOrVal)(o,n.properties,"properties");g=(0,yr.isOwnProperty)(t,S,w)}else l.length?g=(0,ze.or)(...l.map(S=>(0,ze._)`${w} === ${S}`)):g=ze.nil;return d.length&&(g=(0,ze.or)(g,...d.map(S=>(0,ze._)`${(0,yr.usePattern)(e,S)}.test(${w})`))),(0,ze.not)(g)}function b(w){t.code((0,ze._)`delete ${a}[${w}]`)}function _(w){if(i.removeAdditional==="all"||i.removeAdditional&&r===!1){b(w);return}if(r===!1){e.setParams({additionalProperty:w}),e.error(),c||t.break();return}if(typeof r=="object"&&!(0,gr.alwaysValidSchema)(o,r)){const g=t.name("valid");i.removeAdditional==="failing"?(j(w,g,!1),t.if((0,ze.not)(g),()=>{e.reset(),b(w)})):(j(w,g),c||t.if((0,ze.not)(g),()=>t.break()))}}function j(w,g,S){const R={keyword:"additionalProperties",dataProp:w,dataPropType:gr.Type.Str};S===!1&&Object.assign(R,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(R,g)}}};xr.default=yd;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const gd=Me,xa=Y,Hr=D,Da=xr,$d={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:a,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Da.default.code(new gd.KeywordCxt(s,Da.default,"additionalProperties"));const o=(0,xa.allSchemaProperties)(r);for(const u of o)s.definedProperties.add(u);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=Hr.mergeEvaluated.props(t,(0,Hr.toHash)(o),s.props));const c=o.filter(u=>!(0,Hr.alwaysValidSchema)(s,r[u]));if(c.length===0)return;const i=t.name("valid");for(const u of c)l(u)?d(u):(t.if((0,xa.propertyInData)(t,a,u,s.opts.ownProperties)),d(u),s.allErrors||t.else().var(i,!0),t.endIf()),e.it.definedProperties.add(u),e.ok(i);function l(u){return s.opts.useDefaults&&!s.compositeRule&&r[u].default!==void 0}function d(u){e.subschema({keyword:"properties",schemaProp:u,dataProp:u},i)}}};Vn.default=$d;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});const Ma=Y,$r=B,Fa=D,Va=D,vd={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:a,it:s}=e,{opts:o}=s,c=(0,Ma.allSchemaProperties)(r),i=c.filter(j=>(0,Fa.alwaysValidSchema)(s,r[j]));if(c.length===0||i.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;const l=o.strictSchema&&!o.allowMatchingProperties&&a.properties,d=t.name("valid");s.props!==!0&&!(s.props instanceof $r.Name)&&(s.props=(0,Va.evaluatedPropsToName)(t,s.props));const{props:u}=s;y();function y(){for(const j of c)l&&b(j),s.allErrors?_(j):(t.var(d,!0),_(j),t.if(d))}function b(j){for(const w in l)new RegExp(j).test(w)&&(0,Fa.checkStrictMode)(s,`property ${w} matches pattern ${j} (use allowMatchingProperties)`)}function _(j){t.forIn("key",n,w=>{t.if((0,$r._)`${(0,Ma.usePattern)(e,j)}.test(${w})`,()=>{const g=i.includes(j);g||e.subschema({keyword:"patternProperties",schemaProp:j,dataProp:w,dataPropType:Va.Type.Str},d),s.opts.unevaluated&&u!==!0?t.assign((0,$r._)`${u}[${w}]`,!0):!g&&!s.allErrors&&t.if((0,$r.not)(d),()=>t.break())})})}}};zn.default=vd;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});const _d=D,bd={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,_d.alwaysValidSchema)(n,r)){e.fail();return}const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};qn.default=bd;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const wd=Y,Sd={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:wd.validateUnion,error:{message:"must match a schema in anyOf"}};Un.default=Sd;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const Sr=B,Ed=D,jd={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Sr._)`{passingSchemas: ${e.passing}}`},Pd={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:jd,code(e){const{gen:t,schema:r,parentSchema:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");
8if(a.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),c=t.let("passing",null),i=t.name("_valid");e.setParams({passing:c}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){s.forEach((d,u)=>{let y;(0,Ed.alwaysValidSchema)(a,d)?t.var(i,!0):y=e.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},i),u>0&&t.if((0,Sr._)`${i} && ${o}`).assign(o,!1).assign(c,(0,Sr._)`[${c}, ${u}]`).else(),t.if(i,()=>{t.assign(o,!0),t.assign(c,u),y&&e.mergeEvaluated(y,Sr.Name)})})}}};Ln.default=Pd;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Td=D,Id={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const a=t.name("valid");r.forEach((s,o)=>{if((0,Td.alwaysValidSchema)(n,s))return;const c=e.subschema({keyword:"allOf",schemaProp:o},a);e.ok(a),e.mergeEvaluated(c)})}};Hn.default=Id;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const Ir=B,Zs=D,Ad={message:({params:e})=>(0,Ir.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ir._)`{failingKeyword: ${e.ifClause}}`},Rd={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ad,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Zs.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const a=za(n,"then"),s=za(n,"else");if(!a&&!s)return;const o=t.let("valid",!0),c=t.name("_valid");if(i(),e.reset(),a&&s){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(c,l("then",d),l("else",d))}else a?t.if(c,l("then")):t.if((0,Ir.not)(c),l("else"));e.pass(o,()=>e.error(!0));function i(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);e.mergeEvaluated(d)}function l(d,u){return()=>{const y=e.subschema({keyword:d},c);t.assign(o,c),e.mergeValidEvaluated(y,o),u?t.assign(u,(0,Ir._)`${d}`):e.setParams({ifClause:d})}}}};function za(e,t){const r=e.schema[t];return r!==void 0&&!(0,Zs.alwaysValidSchema)(e,r)}Kn.default=Rd;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const Od=D,Cd={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Od.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Bn.default=Cd;Object.defineProperty(kn,"__esModule",{value:!0});const Nd=Vt,kd=xn,xd=zt,Dd=Dn,Md=Mn,Fd=kr,Vd=Fn,zd=xr,qd=Vn,Ud=zn,Ld=qn,Hd=Un,Kd=Ln,Bd=Hn,Gd=Kn,Wd=Bn;function Jd(e=!1){const t=[Ld.default,Hd.default,Kd.default,Bd.default,Gd.default,Wd.default,Vd.default,zd.default,Fd.default,qd.default,Ud.default];return e?t.push(kd.default,Dd.default):t.push(Nd.default,xd.default),t.push(Md.default),t}kn.default=Jd;var Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});const pe=B,Yd={message:({schemaCode:e})=>(0,pe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,pe._)`{format: ${e}}`},Zd={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Yd,code(e,t){const{gen:r,data:n,$data:a,schema:s,schemaCode:o,it:c}=e,{opts:i,errSchemaPath:l,schemaEnv:d,self:u}=c;if(!i.validateFormats)return;a?y():b();function y(){const _=r.scopeValue("formats",{ref:u.formats,code:i.code.formats}),j=r.const("fDef",(0,pe._)`${_}[${o}]`),w=r.let("fType"),g=r.let("format");r.if((0,pe._)`typeof ${j} == "object" && !(${j} instanceof RegExp)`,()=>r.assign(w,(0,pe._)`${j}.type || "string"`).assign(g,(0,pe._)`${j}.validate`),()=>r.assign(w,(0,pe._)`"string"`).assign(g,j)),e.fail$data((0,pe.or)(S(),R()));function S(){return i.strictSchema===!1?pe.nil:(0,pe._)`${o} && !${g}`}function R(){const N=d.$async?(0,pe._)`(${j}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,pe._)`${g}(${n})`,k=(0,pe._)`(typeof ${g} == "function" ? ${N} : ${g}.test(${n}))`;return(0,pe._)`${g} && ${g} !== true && ${w} === ${t} && !${k}`}}function b(){const _=u.formats[s];if(!_){S();return}if(_===!0)return;const[j,w,g]=R(_);j===t&&e.pass(N());function S(){if(i.strictSchema===!1){u.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function R(k){const G=k instanceof RegExp?(0,pe.regexpCode)(k):i.code.formats?(0,pe._)`${i.code.formats}
8${(0,pe.getProperty)(s)}`:void 0,ne=r.scopeValue("formats",{key:s,ref:k,code:G});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,pe._)`${ne}.validate`]:["string",k,ne]}function N(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!d.$async)throw new Error("async format in sync schema");return(0,pe._)`await ${g}(${n})`}return typeof w=="function"?(0,pe._)`${g}(${n})`:(0,pe._)`${g}.test(${n})`}}}};Wn.default=Zd;Object.defineProperty(Gn,"__esModule",{value:!0});const Qd=Wn,Xd=[Qd.default];Gn.default=Xd;var Mt={};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.contentVocabulary=Mt.metadataVocabulary=void 0;Mt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Mt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Nr,"__esModule",{value:!0});const eu=_n,tu=wn,ru=kn,nu=Gn,qa=Mt,au=[eu.default,tu.default,(0,ru.default)(),nu.default,qa.metadataVocabulary,qa.contentVocabulary];Nr.default=au;var Jn={},qt={};Object.defineProperty(qt,"__esModule",{value:!0});qt.dynamicAnchor=void 0;const Kr=B,su=Re,Ua=Ee,ou=tt,iu={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Qs(e,e.schema)};function Qs(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;const a=(0,Kr._)`${su.default.dynamicAnchors}${(0,Kr.getProperty)(t)}`,s=n.errSchemaPath==="#"?n.validateName:cu(e);r.if((0,Kr._)`!${a}`,()=>r.assign(a,s))}qt.dynamicAnchor=Qs;function cu(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:o,meta:c}=t.root,{schemaId:i}=n.opts,l=new Ua.SchemaEnv({schema:r,schemaId:i,root:a,baseId:s,localRefs:o,meta:c});return Ua.compileSchema.call(n,l),(0,ou.getValidate)(e,l)}qt.default=iu;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.dynamicRef=void 0;const La=B,lu=Re,Ha=tt,du={keyword:"$dynamicRef",schemaType:"string",code:e=>Xs(e,e.schema)};function Xs(e,t){const{gen:r,keyword:n,it:a}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const s=t.slice(1);if(a.allErrors)o();else{const i=r.let("valid",!1);o(i),e.ok(i)}function o(i){if(a.schemaEnv.root.dynamicAnchors[s]){const l=r.let("_v",(0,La._)`${lu.default.dynamicAnchors}${(0,La.getProperty)(s)}`);r.if(l,c(l,i),c(a.validateName,i))}
8else c(a.validateName,i)()}function c(i,l){return l?()=>r.block(()=>{(0,Ha.callRef)(e,i),r.let(l,!0)}):()=>(0,Ha.callRef)(e,i)}}Ut.dynamicRef=Xs;Ut.default=du;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const uu=qt,fu=D,pu={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,uu.dynamicAnchor)(e,""):(0,fu.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Yn.default=pu;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const mu=Ut,hu={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,mu.dynamicRef)(e,e.schema)};Zn.default=hu;Object.defineProperty(Jn,"__esModule",{value:!0});const yu=qt,gu=Ut,$u=Yn,vu=Zn,_u=[yu.default,gu.default,$u.default,vu.default];Jn.default=_u;var Qn={},Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Ka=kr,bu={keyword:"dependentRequired",type:"object",schemaType:"object",error:Ka.error,code:e=>(0,Ka.validatePropertyDeps)(e)};Xn.default=bu;var ea={};Object.defineProperty(ea,"__esModule",{value:!0});const wu=kr,Su={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,wu.validateSchemaDeps)(e)};ea.default=Su;var ta={};Object.defineProperty(ta,"__esModule",{value:!0});const Eu=D,ju={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,Eu.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};ta.default=ju;Object.defineProperty(Qn,"__esModule",{value:!0});const Pu=Xn,Tu=ea,Iu=ta,Au=[Pu.default,Tu.default,Iu.default];Qn.default=Au;var ra={},na={};Object.defineProperty(na,"__esModule",{value:!0});const st=B,Ba=D,Ru=Re,Ou={message:"must NOT have unevaluated properties",params:({params:e})=>(0,st._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},Cu={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:Ou,code(e){const{gen:t,schema:r,data:n,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:o,props:c}=s;c instanceof st.Name?t.if((0,st._)`${c} !== true`,()=>t.forIn("key",n,u=>t.if(l(c,u),()=>i(u)))):c!==!0&&t.forIn("key",n,u=>c===void 0?i(u):t.if(d(c,u),()=>i(u))),s.props=!0,e.ok((0,st._)`${a} === ${Ru.default.errors}`);function i(u){if(r===!1){e.setParams({unevaluatedProperty:u}),e.error(),o||t.break();return}if(!(0,Ba.alwaysValidSchema)(s,r)){const y=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:u,dataPropType:Ba.Type.Str},y),o||t.if((0,st.not)(y),()=>t.break())}}function l(u,y){return(0,st._)`!${u} || !${u}[${y}]`}function d(u,y){const b=[];for(const _ in u)u[_]===!0&&b.push((0,st._)`${y} !== ${_}`);return(0,st.and)(...b)}}};na.default=Cu;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const gt=B,Ga=D,Nu={message:({params:{len:e}})=>(0,gt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,gt._)`{limit: ${e}}`},ku={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:Nu,code(e){const{gen:t,schema:r,data:n,it:a}=e,s=a.items||0;if(s===!0)return;const o=t.const("len",(0,gt._)`${n}.length`);if(r===!1)e.setParams({len:s}),e.fail((0,gt._)`${o} > ${s}`);else if(typeof r=="object"&&!(0,Ga.alwaysValidSchema)(a,r)){const i=t.var("valid",(0,gt._)`${o} <= ${s}`);t.if((0,gt.not)(i),()=>c(i,s)),e.ok(i)}a.items=!0;function c(i,l){t.forRange("i",l,o,d=>{e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:Ga.Type.Num},i),a.allErrors||t.if((0,gt.not)(i),()=>t.break())})}}};aa.default=ku;Object.defineProperty(ra,"__esModule",{value:!0});const xu=na,Du=aa,Mu=[xu.default,Du.default];ra.default=Mu;var Dr={},Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.DiscrError=void 0;var Wa;(function(e){e.Tag="tag",e.Mapping="mapping"})(Wa||(Mr.DiscrError=Wa={}));Object.defineProperty(Dr,"__esModule",{value:!0});const Nt=B,tn=Mr,Ja=Ee,Fu=_t,Vu=D,zu={message:({params:{discrError:e,tagName:t}})=>e===tn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Nt._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},qu={keyword:"discriminator",type:"object",schemaType:"object",error:zu,code(e){const{gen:t,data:r,schema:n,parentSchema:a,it:s}=e,{oneOf:o}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const i=t.let("valid",!1),l=t.const("tag",(0,Nt._)`${r}${(0,Nt.getProperty)(c)}`);t.if((0,Nt._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:tn.DiscrError.Tag,tag:l,tagName:c})),e.ok(i);function d(){const b=y();t.if(!1);for(const _ in b)t.elseIf((0,Nt._)`${l} === ${_}`),t.assign(i,u(b[_]));t.else(),e.error(!1,{discrError:tn.DiscrError.Mapping,tag:l,tagName:c}),t.endIf()}function u(b){const _=t.name("valid"),j=e.subschema({keyword:"oneOf",schemaProp:b},_);return e.mergeEvaluated(j,Nt.Name),_}function y(){var b;const _={},j=g(a);let w=!0;for(let N=0;N<o.length;N++){let k=o[N];if(k!=null&&k.$ref&&!(0,Vu.schemaHasRulesButRef)(k,s.self.RULES)){const ne=k.$ref;if(k=Ja.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,ne),k instanceof Ja.SchemaEnv&&(k=k.schema),k===void 0)throw new Fu.default(s.opts.uriResolver,s.baseId,ne)}const G=(b=k==null?void 0:k.properties)===null||b===void 0?void 0:b[c];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);
8w=w&&(j||g(k)),S(G,N)}if(!w)throw new Error(`discriminator: "${c}" must be required`);return _;function g({required:N}){return Array.isArray(N)&&N.includes(c)}function S(N,k){if(N.const)R(N.const,k);else if(N.enum)for(const G of N.enum)R(G,k);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function R(N,k){if(typeof N!="string"||N in _)throw new Error(`discriminator: "${c}" values must be unique strings`);_[N]=k}}}};Dr.default=qu;var sa={};const Uu="https://json-schema.org/draft/2019-09/schema",Lu="https://json-schema.org/draft/2019-09/schema",Hu={"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},Ku=!0,Bu="Core and Validation specifications meta-schema",Gu=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],Wu=["object","boolean"],Ju={definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}},Yu={$schema:Uu,$id:Lu,$vocabulary:Hu,$recursiveAnchor:Ku,title:Bu,allOf:Gu,type:Wu,properties:Ju},Zu="https://json-schema.org/draft/2019-09/schema",Qu="https://json-schema.org/draft/2019-09/meta/applicator",Xu={"https://json-schema.org/draft/2019-09/vocab/applicator":!0},ef=!0,tf="Applicator vocabulary meta-schema",rf=["object","boolean"],nf={additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},af={schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}},sf={$schema:Zu,$id:Qu,$vocabulary:Xu,$recursiveAnchor:ef,title:tf,type:rf,properties:nf,$defs:af},of="https://json-schema.org/draft/2019-09/schema",cf="https://json-schema.org/draft/2019-09/meta/content",lf={"https://json-schema.org/draft/2019-09/vocab/content":!0},df=!0,uf="Content vocabulary meta-schema",ff=["object","boolean"],pf={contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}},mf={$schema:of,$id:cf,$vocabulary:lf,$recursiveAnchor:df,title:uf,type:ff,properties:pf},hf="https://json-schema.org/draft/2019-09/schema",yf="https://json-schema.org/draft/2019-09/meta/core",gf={"https://json-schema.org/draft/2019-09/vocab/core":!0},$f=!0,vf="Core vocabulary meta-schema",_f=["object","boolean"],bf={$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}},wf={$schema:hf,$id:yf,$vocabulary:gf,$recursiveAnchor:$f,title:vf,type:_f,properties:bf},Sf="https://json-schema.org/draft/2019-09/schema",Ef="https://json-schema.org/draft/2019-09/meta/format",jf={"https://json-schema.org/draft/2019-09/vocab/format":!0},Pf=!0,Tf="Format vocabulary meta-schema",If=["object","boolean"],Af={format:{type:"string"}},Rf={$schema:Sf,$id:Ef,$vocabulary:jf,$recursiveAnchor:Pf,title:Tf,type:If,properties:Af},Of="https://json-schema.org/draft/2019-09/schema",Cf="https://json-schema.org/draft/2019-09/meta/meta-data",Nf={"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},kf=!0,xf="Meta-data vocabulary meta-schema",Df=["object","boolean"],Mf={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Ff={$schema:Of,$id:Cf,$vocabulary:Nf,$recursiveAnchor:kf,title:xf,type:Df,properties:Mf},Vf="https://json-schema.org/draft/2019-09/schema",zf="https://json-schema.org/draft/2019-09/meta/validation",qf={"https://json-schema.org/draft/2019-09/vocab/validation":!0},Uf=!0,Lf="Validation vocabulary meta-schema",Hf=["object","boolean"],Kf={multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}
8,const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},Bf={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Gf={$schema:Vf,$id:zf,$vocabulary:qf,$recursiveAnchor:Uf,title:Lf,type:Hf,properties:Kf,$defs:Bf};Object.defineProperty(sa,"__esModule",{value:!0});const Wf=Yu,Jf=sf,Yf=mf,Zf=wf,Qf=Rf,Xf=Ff,ep=Gf,tp=["/properties"];function rp(e){return[Wf,Jf,Yf,Zf,t(this,Qf),Xf,t(this,ep)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,tp):n}}sa.default=rp;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2019=void 0;const r=cn,n=Nr,a=Jn,s=Qn,o=ra,c=Dr,i=sa,l="https://json-schema.org/draft/2019-09/schema";class d extends r.default{constructor(w={}){super({...w,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(a.default),n.default.forEach(w=>this.addVocabulary(w)),this.addVocabulary(s.default),this.addVocabulary(o.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:w,meta:g}=this.opts;g&&(i.default.call(this,w),this.refs["http://json-schema.org/schema"]=l)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv2019=d,e.exports=t=d,e.exports.Ajv2019=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var u=Me;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var y=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var b=Ft;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return b.default}});var _=_t;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(Gr,Gr.exports);var np=Gr.exports;const ap=sn(np);var rn={exports:{}},eo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(q,L){return{validate:q,compare:L}}e.fullFormats={date:t(s,o),time:t(i(!0),l),"date-time":t(y(!0),b),"iso-time":t(i(),d),"iso-date-time":t(y(),_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Fe,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:R,int32:{type:"number",validate:G},int64:{type:"number",validate:ne},float:{type:"number",validate:je},double:{type:"number",validate:je},password:!0,binary:!0}
8,e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\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,b),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(q){return q%4===0&&(q%100!==0||q%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(q){const L=n.exec(q);if(!L)return!1;const te=+L[1],K=+L[2],he=+L[3];return K>=1&&K<=12&&he>=1&&he<=(K===2&&r(te)?29:a[K])}function o(q,L){if(q&&L)return q>L?1:q<L?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function i(q){return function(te){const K=c.exec(te);if(!K)return!1;const he=+K[1],Ce=+K[2],Ne=+K[3],ct=K[4],Ze=K[5]==="-"?-1:1,x=+(K[6]||0),P=+(K[7]||0);if(x>23||P>59||q&&!ct)return!1;if(he<=23&&Ce<=59&&Ne<60)return!0;const C=Ce-P*Ze,T=he-x*Ze-(C<0?1:0);return(T===23||T===-1)&&(C===59||C===-1)&&Ne<61}}function l(q,L){if(!(q&&L))return;const te=new Date("2020-01-01T"+q).valueOf(),K=new Date("2020-01-01T"+L).valueOf();if(te&&K)return te-K}function d(q,L){if(!(q&&L))return;const te=c.exec(q),K=c.exec(L);if(te&&K)return q=te[1]+te[2]+te[3],L=K[1]+K[2]+K[3],q>L?1:q<L?-1:0}const u=/t|\s/i;function y(q){const L=i(q);return function(K){const he=K.split(u);return he.length===2&&s(he[0])&&L(he[1])}}function b(q,L){if(!(q&&L))return;const te=new Date(q).valueOf(),K=new Date(L).valueOf();if(te&&K)return te-K}function _(q,L){if(!(q&&L))return;const[te,K]=q.split(u),[he,Ce]=L.split(u),Ne=o(te,he);if(Ne!==void 0)return Ne||l(K,Ce)}const j=/\/|:/,w=/^(?:[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 g(q){return j.test(q)&&w.test(q)}const S=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function R(q){return S.lastIndex=0,S.test(q)}const N=-(2**31),k=2**31-1;function G(q){return Number.isInteger(q)&&q<=k&&q>=N}function ne(q){return Number.isInteger(q)}function je(){return!0}const Oe=/[^\\]\\Z/;function Fe(q){if(Oe.test(q))return!1;try{return new RegExp(q),!0}catch{return!1}}})(eo);var to={},nn={exports:{}};const sp="http://json-schema.org/draft-07/schema#",op="http://json-schema.org/draft-07/schema#",ip="Core schema meta-schema",cp={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:[]}},lp=["object","boolean"],dp={$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:"#"}
8,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:"#"}},up={$schema:sp,$id:op,title:ip,definitions:cp,type:lp,properties:dp,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=cn,n=Nr,a=Dr,s=up,o=["/properties"],c="http://json-schema.org/draft-07/schema";class i extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(_,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=i,e.exports=t=i,e.exports.Ajv=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var l=Me;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var u=Ft;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var y=_t;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}
8)(nn,nn.exports);var fp=nn.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=fp,r=B,n=r.operators,a={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:c,schemaCode:i})=>(0,r.str)`should be ${a[c].okStr} ${i}`,params:({keyword:c,schemaCode:i})=>(0,r._)`{comparison: ${a[c].okStr}, limit: ${i}}`};e.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:i,data:l,schemaCode:d,keyword:u,it:y}=c,{opts:b,self:_}=y;if(!b.validateFormats)return;const j=new t.KeywordCxt(y,_.RULES.all.format.definition,"format");j.$data?w():g();function w(){const R=i.scopeValue("formats",{ref:_.formats,code:b.code.formats}),N=i.const("fmt",(0,r._)`${R}[${j.schemaCode}]`);c.fail$data((0,r.or)((0,r._)`typeof ${N} != "object"`,(0,r._)`${N} instanceof RegExp`,(0,r._)`typeof ${N}.compare != "function"`,S(N)))}function g(){const R=j.schema,N=_.formats[R];if(!N||N===!0)return;if(typeof N!="object"||N instanceof RegExp||typeof N.compare!="function")throw new Error(`"${u}": format "${R}" does not define "compare" function`);const k=i.scopeValue("formats",{key:R,ref:N,code:b.code.formats?(0,r._)`${b.code.formats}${(0,r.getProperty)(R)}`:void 0});c.fail$data(S(k))}function S(R){return(0,r._)`${R}.compare(${l}, ${d}) ${a[u].fail} 0`}},dependencies:["format"]};const o=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=o})(to);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=eo,n=to,a=B,s=new a.Name("fullFormats"),o=new a.Name("fastFormats"),c=(l,d={keywords:!0})=>{if(Array.isArray(d))return i(l,d,r.fullFormats,s),l;const[u,y]=d.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,s],b=d.formats||r.formatNames;return i(l,b,u,y),d.keywords&&(0,n.default)(l),l};c.get=(l,d="full")=>{const y=(d==="fast"?r.fastFormats:r.fullFormats)[l];if(!y)throw new Error(`Unknown format "${l}"`);return y};function i(l,d,u,y){var b,_;(b=(_=l.opts.code).formats)!==null&&b!==void 0||(_.formats=(0,a._)`require("ajv-formats/dist/formats").${y}`);for(const j of d)l.addFormat(j,u[j])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(rn,rn.exports);var pp=rn.exports;const mp=sn(pp);var hp={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ya=e=>{let t;const r=new Set,n=(d,u)=>{const y=typeof d=="function"?d(t):d;if(!Object.is(y,t)){const b=t;t=u??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(_=>_(t,b))}},a=()=>t,i={setState:n,getState:a,getInitialState:()=>l,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(hp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},l=t=e(n,a,i);return i},ro=e=>e?Ya(e):Ya;var no={exports:{}},ao={};/**
9 * @license React
10 * use-sync-external-store-shim/with-selector.production.min.js
11 *
12 * Copyright (c) Facebook, Inc. and its affiliates.
13 *
14 * This source code is licensed under the MIT license found in the
15 * LICENSE file in the root directory of this source tree.
16 */var Fr=ge,yp=Po;function gp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $p=typeof Object.is=="function"?Object.is:gp,vp=yp.useSyncExternalStore,_p=Fr.useRef,bp=Fr.useEffect,wp=Fr.useMemo,Sp=Fr.useDebugValue;ao.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var s=_p(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=wp(function(){function i(b){if(!l){if(l=!0,d=b,b=n(b),a!==void 0&&o.hasValue){var _=o.value;if(a(_,b))return u=_}return u=b}if(_=u,$p(d,b))return _;var j=n(b);return a!==void 0&&a(_,j)?_:(d=b,u=j)}var l=!1,d,u,y=r===void 0?null:r;return[function(){return i(t())},y===null?void 0:function(){return i(y())}]},[t,r,n,a]);var c=vp(e,s[0],s[1]);return bp(function(){o.hasValue=!0,o.value=c},[c]),Sp(c),c};no.exports=ao;var Ep=no.exports;const jp=sn(Ep);var Pp={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Tp}=To,{useSyncExternalStoreWithSelector:Ip}=jp;let Za=!1;const Ap=e=>e;function so(e,t=Ap,r){(Pp?"production":void 0)!=="production"&&r&&!Za&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Za=!0);const n=Ip(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Tp(n),n}const Rp=(e,t)=>{const r={...e};return ro(n=>({schema:t,formData:r,validationErrors:[],errors:[],setFormData:(a,s)=>n(o=>{const c={...o.formData};
16return Object.entries(s).forEach(([i,l])=>{c[i]=l}),{formData:c}}),setValidationErrors:a=>n({validationErrors:a}),setErrors:a=>n({errors:a})}))},oo=ge.createContext(null),Op=({initialData:e={},schema:t,children:r})=>{const n=ge.useRef();return n.current||(n.current=Rp(e,t)),h.jsx(oo.Provider,{value:n.current,children:r})},$t=e=>{const t=ge.useContext(oo);if(!t)throw new Error("useFormContext must be used within a FormProvider");return so(t,e)},bt=(e=[],t=null)=>{const r=$t(o=>o.formData),n=$t(o=>o.setFormData);return{valueAtPath:e.length>0?e.reduce((o,c)=>o[c]??t,r):r,setValueAtPath:o=>{n(e,o)}}},wt=e=>{const t=$t(i=>i.validationErrors),r=$t(i=>i.setValidationErrors),n=$t(i=>i.errors),a=$t(i=>i.setErrors),s=()=>{const i={};return t==null||t.forEach(l=>{const d=l.instancePath?`/${(l.instancePath||"").split("/").slice(1).join("/")}`:"/",u=l.keyword==="required"?`${d==="/"?"":d}/${l.params.missingProperty}`:d;i[u]=i[u]||[],i[u].push(l)}),i},o=i=>{const l=s(),d=`/${i.join("/")}`;return l[d]||[]},c=i=>{const l=`/${i.join("/")}`,d=t==null?void 0:t.filter(u=>{const y=u.instancePath?`/${(u.instancePath||"").split("/").slice(1).join("/")}`:"/";return(u.keyword==="required"?`${y==="/"?"":y}/${u.params.missingProperty}`:y)!==l});r(d??[])};return{validationErrors:t,validationErrorsAtPath:o(e),removeErrorAtPath:c,setValidationErrors:r,errors:n??[],setErrors:a}},Cp=(e,t)=>{const r={...e};function n(a,s,o){const c=JSON.parse(JSON.stringify(a));return s.reduce((i,l)=>{if(Array.isArray(i)&&Array.isArray(o))return o.forEach(d=>{const u=i.find(y=>y.__id===d.__id);u&&(u[l]=d[l])}),i;if(Array.isArray(i)){const d=i.find(u=>u.__id===o.__id);return d&&(d[l]=o[l]),d}else return l===s[s.length-1]?(i[l]=o,i):i[l]},c),c}return ro(a=>({schema:t,formData:r,errors:null,setFormData:(s,o)=>a(c=>{const i={...c.formData};return{formData:n(i,s,o)}}),setErrors:s=>a({errors:s})}))},io=ge.createContext(null),Np=({initialData:e={fields:[]},schema:t,children:r})=>{const n=ge.useRef();return n.current||(n.current=Cp(e,t)),h.jsx(io.Provider,{value:n.current,children:r})};var ve=[];for(var Br=0;Br<256;++Br)ve.push((Br+256).toString(16).slice(1));function kp(e,t=0){return(ve[e[t+0]]+ve[e[t+1]]+ve[e[t+2]]+ve[e[t+3]]+"-"+ve[e[t+4]]+ve[e[t+5]]+"-"+ve[e[t+6]]+ve[e[t+7]]+"-"+ve[e[t+8]]+ve[e[t+9]]+"-"+ve[e[t+10]]+ve[e[t+11]]+ve[e[t+12]]+ve[e[t+13]]+ve[e[t+14]]+ve[e[t+15]]).toLowerCase()}var vr,xp=new Uint8Array(16);function Dp(){if(!vr&&(vr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vr(xp)}var Mp=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Qa={randomUUID:Mp};function co(e,t,r){if(Qa.randomUUID&&!t&&!e)return Qa.randomUUID();e=e||{};var n=e.random||(e.rng||Dp)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return kp(n)}const Fp=()=>({__id:co(),fieldType:"string",value:"",label:"",helpText:"",isRequired:!1}),Vp=(e,t)=>{if(typeof e!="boolean"&&e.$ref){const r=e.$ref.replace("#/definitions/","").split("/");let n=t;for(const a of r)if(n=n[a],!n)throw new Error(`Could not resolve reference: ${e.$ref}`);return n}return e},zp=(e,t)=>{if(typeof e!="boolean"&&e.$ref){const r=e.$ref.replace("#/definitions/","").split("/");let n=t;for(const a of r)if(n=n[a],!n)throw new Error(`Could not resolve reference: ${e.$ref}`);return n}return e},qp=e=>"fieldType"in e&&e.fieldType!=="static_element"&&"value"in e&&"label"in e,Up=e=>"fieldType"in e&&e.fieldType==="static_element"&&(typeof(e==null?void 0:e.heading)<"u"||typeof(e==null?void 0:e.paragraph)<"u"||typeof(e==null?void 0:e.spacer)<"u"||typeof(e==null?void 0:e.divider)<"u"),Lp=e=>{var t,r,n,a,s,o,c,i,l,d;return e&&typeof e=="object"&&e.type==="object"&&e.properties&&typeof e.properties=="object"&&((r=(t=e.properties)==null?void 0:t.component)==null?void 0:r.const)==="static_element"&&(typeof((a=(n=e.properties)==null?void 0:n.divider)==null?void 0:a.const)=="boolean"||typeof((o=(s=e.properties)==null?void 0:s.heading)==null?void 0:o.const)=="str
16ing"||typeof((i=(c=e.properties)==null?void 0:c.paragraph)==null?void 0:i.const)=="string"||typeof((d=(l=e.properties)==null?void 0:l.spacer)==null?void 0:d.const)=="boolean")},Hp=e=>{var t;return typeof e>"u"||(e==null?void 0:e.type)!=="object"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field))},Kp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="boolean")},Bp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="string"&&typeof e.properties.component!="boolean"&&e.properties.component.const==="select"&&typeof e.properties.options=="object"&&e.properties.options.type==="array")},Gp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="string")},Wp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="string"&&typeof e.properties.component!="boolean"&&e.properties.component.const==="text_area")},Jp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="string"&&typeof e.properties.component!="boolean"&&e.properties.component.const==="image")},Yp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="string"&&typeof e.properties.component!="boolean"&&e.properties.component.const==="file_upload")},Zp=e=>{var t,r;return typeof e>"u"?!1:!!(e!=null&&e.properties&&((t=e.properties)!=null&&t.field)&&typeof e.properties.field!="boolean"&&((r=e.properties.field)==null?void 0:r.type)==="number")},Qp=e=>typeof e>"u"?e:e.charAt(0).toUpperCase()+e.slice(1),St=({validationErrors:e})=>e.map(t=>{switch(t.keyword){case"required":return{id:t.keyword,text:"Required field"};case"type":return{id:t.keyword,text:Qp(t.message)}}return{id:"general",text:t==null?void 0:t.message}}),an={string:"Text",number:"Number",boolean:"Switch",multiplechoice:"Multiple Choice",image:"Image Upload",text_area:"Multi-line Text",file_upload:"File Upload",static_element:"Static Element"},Xp=["string","number","boolean","multiplechoice","image","text_area","file_upload","static_element"],em=e=>{const{formatMessage:t}=e;return{$schema:"https://json-schema.org/draft/2019-09/schema",title:"Fieldset Editor",description:"A fieldset editor schema",type:"object",properties:{fields:{type:"array",description:"A list of custom fields",default:[],items:{type:"object",properties:{__id:{type:"string",description:"A unique identifier for the field",format:"uuid",$comment:"ui:uuid"},fieldType:{type:"string",title:t({id:"custom_fields.field_editor_form_type_label",defaultMessage:"Type"}),enum:Xp,default:"string",$comment:"ui:select"},label:{type:"string",title:t({id:"custom_fields.field_editor_form_label_label",defaultMessage:"Label"}),description:"A label for the field",default:"",$comment:"ui:text"},helpText:{type:"string",title:t({id:"custom_fields.field_editor_form_help_text_label",defaultMessage:"Help Text"}),description:"Visible help text for the field",default:"",$comment:"ui:text"},isRequired:{type:"boolean",title:t({id:"custom_fields.field_editor_form_required_button",defaultMessage:"Required"}),description:"Whether the field is required",oneOf:[{title:"Yes",const:!0},{title:"No",const:!1}],default:{title:"No",const:!1}}},required:["__id","fieldType"]}}}}},tm=(e,t,r)=>{const n=t[t.length-1];return Array.isArray(e)?e.find(s=>s.__id===r)[n]:e},rm=e=>{const t={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",additionalProperties:{type:"string",pattern:"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",$comment:"Defines the UUID properties for each form field"},required:[],properties:{}};return e.fields.forEach(r=>{var i;const n=r.__id,a=r.fieldType,s=r.label,o=r.helpText;if(r.isRequired&&t.required.push(n),a==="boolean")t.properties[n]={type:"object",properties:{field:{type:"boolean",title:s,description:o,default:!1},component:{const:"switch"}}};
16else if(a==="string")t.properties[n]={type:"object",properties:{field:{type:"string",title:s,description:o},component:{const:"text"}}};else if(a==="text_area")t.properties[n]={type:"object",properties:{field:{type:"string",title:s,description:o},component:{const:"text_area"}}};else if(a==="number")t.properties[n]={type:"object",properties:{field:{type:"number",title:s,description:o},component:{const:"number"}}};else if(a==="multiplechoice")t.properties[n]={type:"object",properties:{field:{type:"string",title:s,description:o},options:{type:"array",items:[{enum:((i=r==null?void 0:r.options)==null?void 0:i.map(l=>l))??[]}]},component:{const:"select"}}};else if(a==="image")t.properties[n]={type:"object",properties:{field:{type:"string",title:s,description:o},component:{const:"image"}}};else if(a==="file_upload")t.properties[n]={type:"object",properties:{field:{type:"string",title:s,description:o},component:{const:"file_upload"}}};else if(a==="static_element"&&Up(r)){const{heading:l="",paragraph:d="",divider:u=!1,spacer:y=!1}=r;t.properties[n]={type:"object",properties:{heading:{const:l},paragraph:{const:d},divider:{const:u},spacer:{const:y},component:{const:"static_element"}}}}}),t},nm=(e,t)=>{switch(delete t.options,delete t.heading,delete t.paragraph,delete t.divider,delete t.spacer,e){case"multiplechoice":return t.options={type:"array",title:"Choices",items:{type:"string"},default:[],$comment:"ui:multiplechoice"},t;case"static_element":return delete t.label,delete t.helpText,delete t.isRequired,t.heading={type:"string",title:"Heading",description:"Heading for a static element",default:"",$comment:"ui:text"},t.paragraph={type:"string",title:"Paragraph",description:"Paragraph for a static element",default:"",$comment:"ui:text"},t.divider={type:"boolean",title:"Divider",description:"Add a divider for a static element",default:{title:"No",const:!1},oneOf:[{title:"Yes",const:!0},{title:"No",const:!1}],$comment:"ui:switch"},t.spacer={type:"boolean",title:"Spacer",description:"Add a spacer for a static element",default:{title:"No",const:!1},oneOf:[{title:"Yes",const:!0},{title:"No",const:!1}],$comment:"ui:switch"},t;default:return t.label={type:"string",title:"Label",description:"A label for the field",default:"",$comment:"ui:text"},t.helpText={type:"string",title:"Help Text",description:"Visible help text for the field",default:"",$comment:"ui:text"},t.isRequired={type:"boolean",title:"Required",description:"Whether the field is required",oneOf:[{title:"Yes",const:!0},{title:"No",const:!1}],default:{title:"No",const:!1}},t}},ie=(e,t)=>`${e.toLowerCase().replace(/'/g,"").replace(/[^a-zA-Z0-9\s-]/g,"").replace(/[\s-]+/g,"_")}.${t.toLowerCase().replace(/'/g,"").replace(/[^a-zA-Z0-9\s-]/g,"").replace(/[\s-]+/g,"_")}`,ir=e=>{const t=ge.useContext(io);if(!t)throw new Error("useFormContext must be used within a FormProvider");return so(t,e)},Ue=(e,t=null)=>{const r=ir(i=>i.formData),n=ir(i=>i.setFormData),a=e.reduce((i,l)=>Array.isArray(i)?i.map(d=>({...d,__id:d==null?void 0:d.__id,...l in d&&{[l]:d[l]}})):i==null?void 0:i[l],r)??t,s=i=>{n(e,i)};return{valueAtPath:a,getValueById:i=>tm(a,e,i),setValueAtPath:s,setValueAtId:(i,{key:l,value:d})=>{if(Array.isArray(a)){let u=[...a].find(y=>y.__id===i);u&&u.__id===i&&(u={...u,[l]:d},s([u]))}}}},oa=e=>{const t=ir(n=>n.errors);return(n=>{const a={};t==null||t.forEach(c=>{const i=c.instancePath?`/${(c.instancePath||"").split("/").slice(1).join("/")}`:"/",l=c.keyword==="required"?`${i==="/"?"":i}/${c.params.missingProperty}`:i;a[l]=a[l]||[],a[l].push(c)});const s=`/${n.join("/")}`;return a[s]||[]})(e)},lo=(e,t,r,n=null)=>{const{valueAtPath:a,setValueAtPath:s}=Ue(e,n),o=oa(e);return{valueAtPath:a,errorsAtPath:o,moveItem:(u,y)=>{if(!Array.isArray(a))return;const b=[...a],_=b[u];b.splice(u,1),b.splice(y,0,_),s(b)},removeItem:u=>{if(Array.isArray(a)){const y=[...a].filter(b=>b.__id!==u);s(y)}},updateItem:(u,y)=>{const b=[...a].map(_=>_.__id===u?{..._,...y}:_);s(b)},addItem:()=>{const u=Fp(),y=[...a,u];return s(y),y}}},am=({schema:e})=>{var c,i,l,d,u,y,b,_;const{formatMessage:t}=Ae(),r=(i=(c=e.properties)==null?void 0:c.heading)==null?void 0:i.const,n=(d=(l=e.properties)==null?void 0:l.paragraph)==null?void 0:d.const,a=((y=(u=e.properties)==null?void 0:u.divi
16der)==null?void 0:y.const)??!1,s=((_=(b=e.properties)==null?void 0:b.spacer)==null?void 0:_.const)??!1;return!r&&!n&&!a&&s?h.jsx(E.Spacer,{size:"$8"}):h.jsxs(h.Fragment,{children:[r&&h.jsx(E.Heading,{css:{...s&&!n&&!a&&{marginBottom:40}},children:t({id:ie("static_element",r),defaultMessage:r})}),n&&h.jsx(E.Paragraph,{size:"caption1",css:{...s&&!a&&{marginBottom:40}},children:t({id:ie("static_element",n),defaultMessage:n})}),a&&h.jsx(E.Separator,{css:{...s&&{marginBottom:40}}})]})},uo=({id:e,schema:t,path:r,definitions:n,required:a})=>{if(t=zp(t,n),typeof t=="boolean"||typeof(t==null?void 0:t.type)>"u")return null;const s={id:e,path:r,definitions:n,required:a};if(Hp(t))switch(t.properties.component.const){case"switch":if(Kp(t))return h.jsx(fm,{schema:t,...s});case"text":if(Gp(t))return h.jsx(_m,{schema:t,...s});case"select":if(Bp(t))return h.jsx(ym,{schema:t,...s});case"text_area":if(Wp(t))return h.jsx(bm,{schema:t,...s});case"number":if(Zp(t))return h.jsx(pm,{schema:t,...s});case"image":if(Jp(t))return h.jsx(wm,{schema:t,...s});case"file_upload":if(Yp(t))return h.jsx(Sm,{schema:t,...s})}return Lp(t)?h.jsx(am,{schema:t,...s}):h.jsx(hm,{schema:t,...s})},fo=ge.forwardRef((e,t)=>{const{onSubmit:r,onError:n}=e,{schema:a,formData:s,setValidationErrors:o}=$t(i=>i),c=i=>{i.preventDefault();const l=ia.compile(a);l(s)?(o([]),r(s)):(o(l.errors??[]),n(l.errors??[],s))};return h.jsx("form",{ref:t,onSubmit:c,style:{width:"100%"},children:h.jsx(E.VStack,{space:"medium",children:Object.entries(a.properties).map(([i,l])=>h.jsx(uo,{id:i,schema:l,required:a.required,path:[i],definitions:a.definitions??{}},i))})})});fo.displayName="FormComponent";const po=({id:e,schema:t,path:r,definitions:n,fieldValues:a})=>{if(t=Vp(t,n),typeof t=="boolean")return null;const s={id:e,path:r,definitions:n,fieldValues:a};if(t.type==="object")return h.jsx(mm,{schema:t,...s});switch(t.$comment){case"ui:text":return h.jsx($m,{schema:t,...s});case"ui:uuid":return h.jsx(gm,{schema:t,...s});case"ui:select":return h.jsx(vm,{schema:t,...s});case"ui:switch":return h.jsx(um,{schema:t,...s});case"ui:multiplechoice":return h.jsx(Em,{schema:t,...s});default:return null}},sm=E.styled("div",{backgroundColor:"$navy",color:"$white",padding:"$4 $3",alignSelf:"stretch",display:"flex",alignItems:"center",justifyContent:"center",aspectRatio:"3 / 2",borderRadius:"$1",height:"$8",variants:{type:{string:{backgroundColor:"$jade"},number:{backgroundColor:"$yellow"},boolean:{backgroundColor:"$red"},multiplechoice:{backgroundColor:"$steel"},image:{backgroundColor:"$purple"},text_area:{backgroundColor:"$jade"},static_element:{backgroundColor:"$coral"},file_upload:{backgroundColor:"$rose"}}}}),Xa={number:h.jsx(E.SinglelinetextTypeIcon,{}),string:h.jsx(E.SinglelinetextTypeIcon,{}),boolean:h.jsx(E.BooleanTypeIcon,{}),multiplechoice:h.jsx(E.MultiplechoiceTypeIcon,{}),image:h.jsx(E.ImageTypeIcon,{}),text_area:h.jsx(E.MultilinetextTypeIcon,{}),static_element:h.jsx(E.DocumentPlusIcon,{}),file_upload:h.jsx(E.FileAddIcon,{}),default:h.jsx(E.QuestionCircleIcon,{})};function om({type:e}){const t=Xa[e]??Xa.default;return h.jsx(sm,{type:e,children:t})}const im=E.styled($e.motion.div,E.Card,{cursor:"grab","&:active":{cursor:"grabbing"},variants:{isDisabled:{true:{pointerEvents:"none"}}}}),cm={expanded:{width:"105%",boxShadow:E.theme.shadows[2].computedValue},collapsed:{width:"100%",boxShadow:E.theme.shadows[1].computedValue}},lm={expanded:{height:E.theme.sizes[12].computedValue,paddingInline:E.theme.space[4].computedValue,paddingBottom:E.theme.space[3].computedValue,paddingTop:E.theme.space[6].computedValue},collapsed:{height:E.theme.sizes[10].computedValue,paddingInline:E.theme.space[1].computedValue,paddingBlock:E.theme.space[1].computedValue}},dm=({fieldValues:e,onSubmit:t,onError:r})=>{var R,N;const{__id:n,fieldType:a,label:s,isRequired:o}=e,{formatMessage:c}=Ae(),{schema:i,formData:l,setErrors:d}=ir(k=>k),{setValueAtId:u}=Ue(["fields","isRequired"]),{removeItem:y}=lo(["fields"],i,i.definitions),[b,_]=es(!1);ts("Escape",()=>_(!1));const j=k=>{k==null||k.preventDefault();const G=ia.compile(i);G(l)?(d(null),t(l)):(d(G.errors??null),r(G.errors??[],l))},w=()=>{_(),j()},S=`form-editor-${ge.useRef(co()).current}`;return h.jsx("form",{id:S,onSubmit:j,children:h.jsx(E.VStack,{align:"center",children:h.jsx($e.MotionConfig,{transition:{type:"tween"},children:h.jsxs(im,{border:!0,css:{width:"100%",boxShadow:"$1"},variants:cm,initial:"collapsed",animate:b?"expanded":"collapsed",children:[h.jsxs(E.HStack,{as:$e.motion.div,space:"none",align:"center",variants:lm,initial:"collapsed",animate:b?"expanded":"collapsed",children:[h.jsxs(E.HStack,{space:"small",align:"center",children:[h.jsx(om,{type:a}),h.jsx(E.Spacer,{size:"0"}),h.jsx(E.Text,{size:"caption1",children:s!==""?s:c({id:"custom_fields.field_editor_field_type_label_default",defaultMessage:"Fields"})}),h.jsx(E.Separator,{orientation:"vertical",css:{height:"$6"}}),h.jsx(E.Text,{size:"caption1",children:an[a]?c({id:`custom_fields.field_editor_label_${a}`,defaultMessage:an[a]}):a})]}),h.jsx(E.Spacer,{css:{width:"auto",flexGrow:"1"}}),b?h.jsx(E.Button,{onPress:w,type:"submit",form:S,children:c({id:"custom_fields.field_editor_form_save_button",defaultMessage:"Save"})}):h.jsx(E.Button,{css:{size:"$7"},onPress:_,appearance:"minimal",icon:E.PencilIcon,type:"button"})]}),h.jsx($e.AnimatePresence,{initial:!1,children:b&&h.jsxs(E.VStack,{as:$e.motion.div,initial:"collapsed",animate:"expanded",exit:"collapsed",css:{gap:0},variants:{expanded:{height:"auto",opacity:1},collapsed:{height:0,overflow:"hidden",opacity:0}
16},children:[h.jsx(E.VStack,{wrap:!1,css:{padding:"$4"},children:h.jsx(po,{id:e.__id,fieldValues:e,schema:(N=(R=i.properties)==null?void 0:R.fields)==null?void 0:N.items,path:["fields"],definitions:i.definitions||{}})}),h.jsx(E.Separator,{}),h.jsxs(E.HStack,{style:{padding:"8px 24px 16px"},align:"center",children:[qp(e)&&h.jsx(E.Switch,{label:c({id:"custom_fields.field_editor_form_required_button",defaultMessage:"Required"}),labelPlacement:"start",space:"large",selected:o,onChange:k=>{u(n,{key:"isRequired",value:k})}}),h.jsx(E.Spacer,{css:{width:"auto",flexGrow:"1"}}),h.jsx(E.Button,{size:"large",css:{svg:{width:"$4"}},onPress:()=>{y(e.__id),w()},appearance:"minimal",icon:E.TrashIcon})]})]})})]})})})})},um=({id:e,schema:t,path:r})=>{const{getValueById:n,setValueAtId:a}=Ue(r,!1),s=r[r.length-1],o=n(e);if(!t.oneOf)return null;const c=i=>{a(e,{key:s,value:i})};return h.jsx(E.FieldWrapper,{space:"none",css:{width:"100%"},children:h.jsx(E.Switch,{justify:"between",labelPlacement:"start",selected:o||!1,defaultSelected:typeof t.default=="boolean"?t.default:!1,name:t.title,label:t.title,onChange:c})})},fm=({id:e,schema:t,path:r})=>{var b;const{formatMessage:n}=Ae(),{valueAtPath:a,setValueAtPath:s}=bt(r),{validationErrorsAtPath:o,removeErrorAtPath:c}=wt(r),i=typeof(a==null?void 0:a.field)=="boolean"?a.field:typeof t.default=="boolean"?t.default:!1,l=t.properties.field,d=_=>{c(r),s({[e]:{field:_}})},u=()=>{c(r)},y=St({validationErrors:o});return h.jsx(E.FieldWrapper,{space:"none",css:{width:"100%"},children:h.jsxs(E.VStack,{space:"small",children:[h.jsx(E.Switch,{justify:"between",labelPlacement:"start",selected:i,name:e,label:n({id:ie("form_field_label",l.title),defaultMessage:l.title}),helpText:n({id:ie("form_field_help_text",l.description),defaultMessage:l.description}),onChange:d,onBlur:u}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:y.length&&((b=y[0])!=null&&b.text)?n({id:ie("form_field_error",y[0].text),defaultMessage:y[0].text}):null})]})})},pm=({id:e,schema:t,path:r})=>{var b;const{formatMessage:n}=Ae(),{valueAtPath:a,setValueAtPath:s}=bt(r),{validationErrorsAtPath:o,removeErrorAtPath:c}=wt(r),i=_=>{c(r),s({[e]:{field:_}})},l=a==null?void 0:a.field,d=t.properties.field,u=()=>{c(r)},y=St({validationErrors:o});return h.jsxs(E.VStack,{space:"small",children:[h.jsx(E.LabelDescriptionWrapper,{children:h.jsx(E.Label,{size:"regular",appearance:"group",children:n({id:ie("form_field_label",d.title),defaultMessage:d.title})})}),h.jsx(E.NumberInput,{value:l??"",size:"regular","aria-label":n({id:ie("form_field_label",d.title),defaultMessage:d.title}),helpText:n({id:ie("form_field_help_text",d.description),defaultMessage:d.description}),onChange:i,onBlur:u}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:y.length&&((b=y[0])!=null&&b.text)?n({id:ie("form_field_error",y[0].text),defaultMessage:y[0].text}):null})]})},mm=({id:e,schema:t,path:r,definitions:n,fieldValues:a})=>{if(!t.properties)return null;const s=nm(a.fieldType,t.properties);return h.jsx(E.VStack,{space:"medium",children:Object.keys(s).map(o=>o==="isRequired"?null:h.jsx(po,{fieldValues:a,id:e,schema:s[o],path:[...r,o],definitions:n},o))})},hm=({id:e,schema:t,definitions:r,required:n})=>h.jsx("div",{children:t.properties&&Object.keys(t.properties).map(a=>{var s;return h.jsx(uo,{id:e,required:n,schema:(s=t.properties)==null?void 0:s[a],path:[a],definitions:r},a)})}),ym=({id:e,schema:t,path:r})=>{var j;const{formatMessage:n}=Ae(),{valueAtPath:a,setValueAtPath:s}=bt(r),{validationErrorsAtPath:o,removeErrorAtPath:c}=wt(r),l=[...t.properties.options.items.filter(w=>Array.isArray(w.enum)).map(w=>w.enum)].flat(),d=a==null?void 0:a.field,u=t.properties.field,y=w=>{c(r),s({[e]:{field:w}})},b=()=>{c(r)},_=St({validationErrors:o});return h.jsxs(E.FieldWrapper,{children:[h.jsx(E.LabelDescriptionWrapper,{children:h.jsx(E.Label,{size:"regular",appearance:"group",children:n({id:ie("form_field_label",u.title),defaultMessage:u.title})})}),h.jsx(E.VStack,{space:"small",children:h.jsx(E.Select,{size:"regular","aria-label":n({id:ie("form_field_label",u.title),defaultMessage:u.title}),placeholder:n({id:"form_field_placeholder.select_an_option",defaultMessage:"Select an Option"}),items:l.map(w=>({id:w,label:w}))??[],value:d,onSelectionChange:w=>{y(String(w))},invalid:_.length>0,onBlur:b})}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:_.length&&((j=_[0])!=null&&j.text)?n({id:ie("form_field_error",_[0].text),defaultMessage:_[0].text}):null})]})},gm=({id:e})=>h.jsx("input",{type:"hidden",value:e}),$m=({id:e,schema:t,path:r})=>{const{getValueById:n,setValueAtId:a}=Ue(r),s=oa(r),o=r[r.length-1],c=n(e);return h.jsxs("div",{children:[h.jsx(E.TextInput,{value:c??"",errorMessage:null,placeholder:"",size:"regular",maxLength:t==null?void 0:t.maxLength,"aria-label":t.title,label:t.title,onChange:i=>{a(e,{key:o,value:i})}}),s&&s.map((i,l)=>h.jsx("div",{children:i.message},l))]})},vm=({id:e,schema:t,path:r})=>{var i;const{getValueById:n,setValueAtId:a}=Ue(r,""),s=oa(r),o=r[r.length-1],c=n(e);return h.jsxs("div",{children:[h.jsx(E.Select,{size:"regular",label:t.title,"aria-label":t.title,items:((i=t==null?void 0:t.enum)==null?void 0:i.map(l=>({id:l,label:an[l]??l})))??[],value:c??(t==null?void 0:t.default),defaultValue:"string",onSelectionChange:l=>{a(e,{key:o,value:l})}}),s&&s.map((l,d)=>h.jsx("div",{children:l.message},d))]})},_m=({id:e,schema:t,path:r})=>{var y;const{formatMessage:n}=Ae(),{valueAtPath:a,setValueAtPath:s}=bt(r),{validationErrorsAtPath:o,removeErrorAtPath:c}=wt(r),i=St({validationErrors:o}),l=b=>{c(r),s({[e]:{field:b}}
16)},d=a==null?void 0:a.field,u=t.properties.field;return h.jsxs(E.VStack,{space:"small",children:[h.jsx(E.TextInput,{value:d??"",helpText:n({id:ie("form_field_help_text",u.description),defaultMessage:u.description}),size:"regular","aria-label":n({id:ie("form_field_label",u.title),defaultMessage:u.title}),label:n({id:ie("form_field_label",u.title),defaultMessage:u.title}),onChange:l}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:i.length&&((y=i[0])!=null&&y.text)?n({id:ie("form_field_error",i[0].text),defaultMessage:i[0].text}):null})]})},bm=({id:e,schema:t,path:r})=>{var b;const{formatMessage:n}=Ae(),{valueAtPath:a,setValueAtPath:s}=bt(r),{validationErrorsAtPath:o,removeErrorAtPath:c}=wt(r),i=St({validationErrors:o}),l=a==null?void 0:a.field,d=t.properties.field,u=_=>{c(r),s({[e]:{field:typeof _!="string"?_.target.value:_}})},y=()=>{c(r)};return h.jsxs(E.FieldWrapper,{children:[h.jsx(E.LabelDescriptionWrapper,{children:h.jsx(E.Label,{size:"regular",appearance:"group",children:n({id:ie("form_field_label",d.title),defaultMessage:d.title})})}),h.jsxs(E.VStack,{space:"small",children:[h.jsx(E.TextArea,{value:l??"",helpText:n({id:ie("form_field_help_text",d.description),defaultMessage:d.description}),size:"regular",labelProps:{appearance:"group"},rows:6,onChange:u,onBlur:y}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:i.length&&((b=i[0])!=null&&b.text)?n({id:ie("form_field_error",i[0].text),defaultMessage:i[0].text}):null})]})]})},wm=({id:e,schema:t,path:r})=>{var g;const{formatMessage:n}=Ae(),a=E.useToaster(),{valueAtPath:s,setValueAtPath:o}=bt(r),[c,i]=ge.useState([]),{validationErrorsAtPath:l,removeErrorAtPath:d}=wt(r),u=St({validationErrors:l}),y=s==null?void 0:s.field,b=t.properties.field;function _(){o({[e]:{field:""}})}function j(S){o({[e]:{field:S}})}ge.useEffect(()=>{const S=async R=>{const N=xo(R,"600x");if(N){const G=await(await fetch(N)).blob(),ne=new File([G],"filename",{type:G.type});i([ne])}};(y==null?void 0:y.trim())!==""&&S(y)},[y]);const w=async S=>{d(r);const R=S==null?void 0:S[0];if(!R){_();return}const N=new FormData;N.append("image[image]",R,R.name);try{const k=await fetch("/admin/images",{method:"POST",body:N}).then(G=>G.json());j(k.image_id)}catch(k){a.add({intent:"danger",title:"Error uploading image."}),console.error(k)}};return h.jsxs(E.FieldWrapper,{children:[h.jsx(E.LabelDescriptionWrapper,{children:h.jsx(E.Label,{size:"regular",appearance:"group",children:n({id:ie("form_field_label",b.title),defaultMessage:b.title})})}),h.jsx(E.ImageUpload,{allowEditing:!0,allowfocusEditing:!0,css:{aspectRatio:"16 / 9"},initialFiles:c,onChange:w},e),h.jsx(E.FieldErrorAndHelpText,{errorMessage:u.length&&((g=u[0])!=null&&g.text)?n({id:ie("form_field_error",u[0].text),defaultMessage:u[0].text}):null,helpText:n({id:ie("form_field_help_text",b.description),defaultMessage:b.description})})]})},Sm=({id:e,schema:t,path:r})=>{var g;const{formatMessage:n}=Ae(),a=E.useToaster(),{valueAtPath:s,setValueAtPath:o}=bt(r),[c,i]=ge.useState([]),{validationErrorsAtPath:l,removeErrorAtPath:d}=wt(r),u=St({validationErrors:l}),y=s==null?void 0:s.field,b=t.properties.field;function _(){o({[e]:{field:""}})}function j(S){o({[e]:{field:S}})}ge.useEffect(()=>{async function S(){fetch(`/admin/resources/${y}`).then(R=>R.blob()).then(R=>{const N=new File([R],(R==null?void 0:R.name)??"",{type:R.type});i([N])}).catch(R=>console.error(R))}(y==null?void 0:y.trim())!==""&&S()},[]);const w=async S=>{if(d(r),!((S==null?void 0:S.length)>0)){_();return}const N=new FormData;N.append("resource[file][]",S[0],S[0].name);try{const k=await fetch("/admin/resources",{method:"POST",body:N}).then(G=>G.json());j(k.file_id)}catch(k){a.add({intent:"danger",title:"Error uploading file."}),console.error(k)}};return h.jsxs(E.FieldWrapper,{children:[h.jsx(E.LabelDescriptionWrapper,{children:h.jsx(E.Label,{size:"regular",appearance:"group",children:n({id:ie("form_field_label",b.title),defaultMessage:b.title})})}),h.jsx(E.FileUpload,{accept:_a.allowed_types,onChange:w,initialFiles:c,maxSize:_a.max_size}),h.jsx(E.FieldErrorAndHelpText,{errorMessage:u.length&&((g=u[0])!=null&&g.text)?n({id:ie("form_field_error",u[0].text),defaultMessage:u[0].text}):null,helpText:n({id:ie("form_field_help_text",b.description),defaultMessage:b.description})})]})},Em=({id:e,path:t})=>{const{getValueById:r}=Ue(t),n=r(e)??[],a=(n==null?void 0:n.length)??0;return h.jsxs(E.Fieldset,{label:"Choices",children:[Array(a).fill(null).map((s,o)=>h.jsx(jm,{id:e,path:t,index:o,listSize:a},s||o)),h.jsx(Im,{id:e,path:t,listSize:a})]})},jm=({space:e="small",...t})=>{const{id:r,path:n,index:a,listSize:s}=t,{getValueById:o,setValueAtId:c}=Ue(n),i=n[n.length-1],l=o(r)??[];return h.jsxs(h.Fragment,{children:[h.jsxs(E.VStack,{space:e,wrap:!1,children:[h.jsx(E.VStack,{css:{flexGrow:2},children:h.jsx(E.HStack,{children:h.jsx(E.TextInput,{value:l[a]??"",errorMessage:null,placeholder:"",size:"regular",onChange:d=>{const u=[...l];u[a]=d,c(r,{key:i,value:u})}})})}),h.jsxs(E.HStack,{children:[h.jsx(Pm,{...t}),h.jsx(E.Spacer,{css:{marginLeft:"auto"}}),h.jsx(Tm,{...t})]})]}),a<s-1?h.jsx(E.HStack,{children:h.jsx(E.Separator,{css:{width:"100%"}})},"b"):null]})},Pm=({id:e,path:t,index:r,listSize:n})=>{const{getValueById:a,setValueAtId:s}=Ue(t),o=t[t.length-1],c=a(e)??[],i=()=>{const d=[...c];if(r<n-1){const u=d[r];d[r]=d[r+1],d[r+1]=u,s(e,{key:o,value:d})}},l=()=>{const d=[...c];if(r>0){const u=d[r];d[r]=d[r-1],d[r-1]=u,s(e,{key:o,value:d})}};return h.jsxs(h.Fragment,{children:[h.jsx(E.Button,{size:"small",appearance:"minimal",onPress:l,icon:E.ArrowUpIcon}),h.jsx(Io.VisuallyHidden,{children:r+1}),h.jsx(E.Button,{size:"small",appearance:"minimal",onPress:i,icon:E.ArrowDownIcon})]})},Tm=({id:e,path:t,index:r})=>{const{formatMessage:n}=Ae(),{getValueById:a,setValueAtId:s}=Ue(t),o=t[t.length-1],c=a(e)??[],i=()=>{const l=c.filter((d,u)=>u!==r);s(e,{key:o,value:l})};return h.jsx(E.Tooltip,{content:n({id:"custom_fields.field_editor_multiple_choice_remove_option",defaultMessage:"Remove option"}),children:h.jsx(E.Button,{onPress:i,intent:"danger",size:"small",appearance:"minimal",round:!0,icon:E.TrashIcon})})},Im=({id:e,path:t})=>{const{formatMessage:r}=Ae(),{getValueById:n,setValueAtId:a}=Ue(t),s=t[t.length-1],o=n(e)??[],c=()=>{const i=o.concat("");a(e,{key:s,value:i})};return h.jsx(E.Tooltip,{content:r({id:"custom_fields.field_editor_multiple_choice_add_option",defaultMessage:"Add option"}),children:h.jsx(E.Button,{size:"small",onPress:c,iconBefore:E.AddIcon,round:!0,appearance:"outline",children:r({id:"custom_fields.field_editor_multiple_choice_add_option_button",defaultMessage:"Add"})})})}
16,ia=new ap({allErrors:!0,verbose:!0});mp(ia);function Am({onChangeEnd:e,initialData:t}){const r=Ae(),n=em(r);return h.jsx(Np,{schema:n,initialData:t,children:h.jsx(Rm,{schema:n,onSubmit:e})})}function Rm({schema:e,onSubmit:t}){const{valueAtPath:r}=Ue(["fields"]),{formData:n}=ir(u=>u),{formatMessage:a}=Ae(),{addItem:s,moveItem:o}=lo(["fields"],e,e.definitions),c=$e.useMotionValue(null),i=()=>{s(),l(n)},l=u=>{const y=rm(u),b={};u.fields.forEach(_=>{b[_.__id]={field:_.value}}),t(y,b)},d=r.map(u=>u.__id);return h.jsxs(E.Fieldset,{label:a({id:"custom_fields.form_title",defaultMessage:"Custom Fields"}),css:{width:"100%"},children:[h.jsx($e.LayoutGroup,{children:h.jsx($e.Reorder.Group,{axis:"y",values:d,onReorder:u=>{const y=c.get();if(!y)return;const b=d.indexOf(y),_=u.indexOf(y);o(b,_)},as:"div",children:h.jsx(E.VStack,{space:"small",children:d.length>0?d.map(u=>h.jsx($e.Reorder.Item,{value:u,onDragStart:()=>{c.set(u)},as:"div",children:h.jsx(dm,{fieldValues:r.find(y=>y.__id===u),onSubmit:l,onError:y=>console.error("Form errors:",y)},u)},u)):h.jsx("p",{children:a({id:"custom_fields.empty_custom_fields",defaultMessage:"Need at least 1 custom field"})})})})}),h.jsx(E.HStack,{children:h.jsx(E.Button,{wide:!0,size:"small",onPress:i,iconBefore:E.AddIcon,appearance:"outline",css:{justifyContent:"flex-start",padding:"$5 $6"},children:a({id:"custom_fields.add_new_fields",defaultMessage:"Add new fields"})})})]})}function Om({ref:e,schema:t,onChangeEnd:r,values:n}){return h.jsx(Op,{schema:t,initialData:n,children:h.jsx(fo,{ref:e,onSubmit:r,onError:()=>{}})})}const Cm={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",properties:{"dee3f5fd-601f-4d31-a518-d3b1638b7322":{type:"string",t:{label:"Employee ID",helpText:"Employee Badge Number"}},"45a179d5-bf05-4c16-b9ac-d4a084af9e30":{type:"boolean",t:{label:"Married",helpText:"Is this person married?"}},"1a09a361-022e-4515-9a5e-2608cbc829b0":{type:"string",widget:"select",t:{label:"Fave color",helpText:"Used for wrapping gifts"},enum:["Red","Blue","Gold"]},"62074569-3260-4694-b7f2-71872843cbc5":{type:"number",t:{label:"Age",helpText:"Age at the time of hire, obviously the best way to store this data"}},"2917b371-9ba3-4c46-b5f1-ab6f0d38b248":{$ref:"#/$defs/image",mode:"id",type:"image",t:{label:"Profile Photo",helpText:"Hello gorgeous!"},view:{size:!1,aspectRatio:"16 / 9"}},"1a09a361-022e-4515-9a5e-2608cbc829b2":{$ref:"#/$defs/text_area",type:"string",widget:"text_area",t:{label:"Favourite quote",helpText:"Literally anything"},view:{rows:6}},"1a09a361-022e-4515-9a5e-2608cbc829b3":{$ref:"#/$defs/static_element",type:"static_element",widget:"static_element",heading:"",paragraph:"",divider:!1,spacer:!1},"2917b371-9ba3-4c46-b5f1-ab6f0d38b249":{$ref:"#/$defs/file_upload",mode:"id",type:"file_upload",t:{label:"Upload a file",helpText:"Max size 10mb"}}},$defs:{image:rs,text_area:is,static_element:cs,file_upload:ls}},Nm={fields:[{__id:"1a09a361-022e-4515-9a5e-2608cbc829b0",fieldType:"boolean",value:!0,label:"Married",helpText:"(Optional)",isRequired:!1},{__id:"2bf8afc7-99ee-4c8d-9b0b-5a3b8918d58a",fieldType:"number",value:"",label:"Number",helpText:"this is a number",isRequired:!0},{__id:"7b9fa697-7838-495d-9dc6-6b21f1f1eec0",fieldType:"boolean",value:"",label:"Switch label",helpText:"This is a switch",isRequired:!1},{__id:"2ad17956-b523-4749-8af2-80f287afb70c",fieldType:"multiplechoice",value:"",options:["1","2","3"],label:"Multiple label",helpText:"This is a multiple choice",isRequired:!0},{__id:"1b20f7eb-5795-4da3-ac72-69d38166560d",fieldType:"image",value:"",label:"Image label",helpText:"This is an image upload",isRequired:!1},{__id:"6ccb5d47-fe33-4053-a6fa-5aeed8047c6e",fieldType:"text_area",value:"",label:"Text area label",helpText:"This is a text area",isRequired:!1},{__id:"b9306c92-e069-459b-9ec9-69d3d903f5c1",fieldType:"file_upload",value:"",label:"File label",helpText:"This is a file upload",isRequired:!1},{__id:"d2f87224-75d5-4ac2-9025-bc23b14efe5a",fieldType:"static_element",value:"",label:"",helpText:"",isRequired:!1,heading:"heading",paragraph:"paragraph",divider:!0,spacer:!0}]},km={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",additionalProperties:{type:"string",pattern:"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",$comment:"Defines the UUID properties for each form field"},required:["1a09a361-022e-4515-9a5e-2608cbc829b0","2bf8afc7-99ee-4c8d-9b0b-5a3b8918d58a","7b9fa697-7838-495d-9dc6-6b21f1f1eec0","2ad17956-b523-4749-8af2-80f287afb70c","1b20f7eb-5795-4da3-ac72-69d38166560d","6ccb5d47-fe33-4053-a6fa-5aeed8047c6e","b9306c92-e069-459b-9ec9-69d3d903f5c1"],properties:{"1a09a361-022e-4515-9a5e-2608cbc829b0":{type:"object",properties:{field:{type:"boolean",title:"Married",description:"(Optional)",default:!1},component:{const:"switch"}}},"2bf8afc7-99ee-4c8d-9b0b-5a3b8918d58a":{type:"object",properties:{field:{type:"number",title:"Number",description:"this is a number"},component:{const:"number"}}},"7b9fa697-7838-495d-9dc6-6b21f1f1eec0":{type:"object",properties:{field:{type:"boolean",title:"Switch label",description:"This is a switch",default:!1},component:{const:"switch"}}},"2ad17956-b523-4749-8af2-80f287afb70c":{type:"object",properties:{field:{type:"string",title:"Multiple label",description:"This is a multiple choice"},options:{type:"array",items:[{enum:["1","2","3"]}]},component:{const:"select"}}},"1b20f7eb-5795-4da3-ac72-69d38166560d":{type:"object",properties:{field:{type:"string",title:"Image label",description:"This is an image upload"},component:{const:"image"}}},"6ccb5d47-fe33-4053-a6fa-5aeed8047c6e":{type:"object",properties:{field:{type:"string",title:"Text area label",description:"This is a text area"},component:{const:"text_area"}}},"b9306c92-e069-459b-9ec9-69d3d903f5c1":{type:"object",properties:{field:{type:"string",title:"File label",description:"This is a file upload"},component:{const:"file_upload"}}},"d2f87224-75d5-4ac2-9025-bc23b14efe5a":{type:"object",properties:{heading:{const:"heading"},paragraph:{const:"paragraph"},divider:{const:!0},spacer:{const:!0},component:{const:"static_element"}}}}},xm={};function Bm(){const[e,t]=ge.useState(Cm),[r,n]=ge.useState({}),[a,s]=ge.useState(km),[o,c]=ge.useState(xm),i=ge.useRef(null),l=()=>{i.current&&i.current.submit()};return h.jsxs(E.VStack,{children:[h.jsxs(E.HStack,{css:{marginInline:"auto",paddingBlock:"$5",maxWidth:"min(calc(100% - $space$8), 900px)",width:"100%"},children:[h.jsx(Am,{initialData:Nm,onChangeEnd:(d,u)=>{s(d),c(u)}}),h.jsxs(E.VStack,{children:[h.jsx(Om,{ref:i,values:o,schema:a,onChangeEnd:()=>{}}),h.jsx("button",{type:"submit",onClick:l,children:"Submit"})]})]}),h.jsxs(E.HStack,{css:{marginInline:"auto",paddingBlock:"$5",maxWidth:"min(calc(100% - $space$8), 900px)"},children:[h.jsx(ni,{initialSchema:e,onChangeEnd:t}),h.jsx(ai,{schema:e,initialSchemaValues:r,onChangeEnd:n}
16)]})]})}export{Bm as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.