@zuplo/editor 1.0.18282379434-dev → 1.0.18282606817-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var yne=Object.defineProperty;var z6=e=>{throw TypeError(e)};var wne=(e,t,n)=>t in e?yne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var et=(e,t,n)=>wne(e,typeof t!="symbol"?t+"":t,n),NS=(e,t,n)=>t.has(e)||z6("Cannot "+n);var G=(e,t,n)=>(NS(e,t,"read from private field"),n?n.call(e):t.get(e)),Je=(e,t,n)=>t.has(e)?z6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fe=(e,t,n,r)=>(NS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(NS(e,t,"access private method"),n);var jy=(e,t,n,r)=>({set _(i){Fe(e,t,i,n)},get _(){return G(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="952623a5-c71d-48ec-933f-22f02c9f1cc6",e._sentryDebugIdIdentifier="sentry-dbid-952623a5-c71d-48ec-933f-22f02c9f1cc6")}catch{}})();function bne(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xne=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};xne.SENTRY_RELEASE={id:"8dc2a9bc1c80b3c60d4f20a23086ef539b73052b"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function hl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var AS={exports:{}},Cm={},jS={exports:{}},Qt={};/**
1
+ var yne=Object.defineProperty;var z6=e=>{throw TypeError(e)};var wne=(e,t,n)=>t in e?yne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var et=(e,t,n)=>wne(e,typeof t!="symbol"?t+"":t,n),NS=(e,t,n)=>t.has(e)||z6("Cannot "+n);var G=(e,t,n)=>(NS(e,t,"read from private field"),n?n.call(e):t.get(e)),Je=(e,t,n)=>t.has(e)?z6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fe=(e,t,n,r)=>(NS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(NS(e,t,"access private method"),n);var jy=(e,t,n,r)=>({set _(i){Fe(e,t,i,n)},get _(){return G(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ead0416f-be55-470e-a8af-1e3cca189617",e._sentryDebugIdIdentifier="sentry-dbid-ead0416f-be55-470e-a8af-1e3cca189617")}catch{}})();function bne(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xne=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};xne.SENTRY_RELEASE={id:"5e31d520b6d03297638565dd48473a739ae0ad49"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function hl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var AS={exports:{}},Cm={},jS={exports:{}},Qt={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -2070,5 +2070,5 @@ export function runtimeInit(runtime: RuntimeExtensions) {
2070
2070
  || ${D} === "boolean" || ${T} === null`).assign(z,(0,i._)`[${T}]`)}}}function v({gen:S,parentData:$,parentDataProperty:P},C){S.if((0,i._)`${$} !== undefined`,()=>S.assign((0,i._)`${$}[${P}]`,C))}function _(S,$,P,C=s.Correct){const T=C===s.Correct?i.operators.EQ:i.operators.NEQ;let A;switch(S){case"null":return(0,i._)`${$} ${T} null`;case"array":A=(0,i._)`Array.isArray(${$})`;break;case"object":A=(0,i._)`${$} && typeof ${$} == "object" && !Array.isArray(${$})`;break;case"integer":A=D((0,i._)`!(${$} % 1) && !isNaN(${$})`);break;case"number":A=D();break;default:return(0,i._)`typeof ${$} ${T} ${S}`}return C===s.Correct?A:(0,i.not)(A);function D(z=i.nil){return(0,i.and)((0,i._)`typeof ${$} == "number"`,z,P?(0,i._)`isFinite(${$})`:i.nil)}}e.checkDataType=_;function y(S,$,P,C){if(S.length===1)return _(S[0],$,P,C);let T;const A=(0,o.toHash)(S);if(A.array&&A.object){const D=(0,i._)`typeof ${$} != "object"`;T=A.null?D:(0,i._)`!${$} || ${D}`,delete A.null,delete A.array,delete A.object}else T=i.nil;A.number&&delete A.integer;for(const D in A)T=(0,i.and)(T,_(D,$,P,C));return T}e.checkDataTypes=y;const w={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:$})=>typeof S=="string"?(0,i._)`{type: ${S}}`:(0,i._)`{type: ${$}}`};function b(S){const $=x(S);(0,r.reportError)($,w)}e.reportTypeError=b;function x(S){const{gen:$,data:P,schema:C}=S,T=(0,o.schemaRefOrVal)(S,C,"type");return{gen:$,keyword:"type",data:P,schema:C.type,schemaCode:T,schemaValue:T,parentSchema:C,params:{},it:S}}}(_R)),_R}var Xm={},F7;function X3e(){if(F7)return Xm;F7=1,Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.assignDefaults=void 0;const e=Vt(),t=on();function n(i,o){const{properties:s,items:a}=i.schema;if(o==="object"&&s)for(const l in s)r(i,l,s[l].default);else o==="array"&&Array.isArray(a)&&a.forEach((l,c)=>r(i,c,l.default))}Xm.assignDefaults=n;function r(i,o,s){const{gen:a,compositeRule:l,data:c,opts:u}=i;if(s===void 0)return;const f=(0,e._)`${c}${(0,e.getProperty)(o)}`;if(l){(0,t.checkStrictMode)(i,`default is ignored for: ${f}`);return}let m=(0,e._)`${f} === undefined`;u.useDefaults==="empty"&&(m=(0,e._)`${m} || ${f} === null || ${f} === ""`),a.if(m,(0,e._)`${f} = ${(0,e.stringify)(s)}`)}return Xm}var vs={},Tn={},V7;function Vs(){if(V7)return Tn;V7=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.validateUnion=Tn.validateArray=Tn.usePattern=Tn.callValidateCode=Tn.schemaProperties=Tn.allSchemaProperties=Tn.noPropertyInData=Tn.propertyInData=Tn.isOwnProperty=Tn.hasPropFunc=Tn.reportMissingProp=Tn.checkMissingProp=Tn.checkReportMissingProp=void 0;const e=Vt(),t=on(),n=Fs(),r=on();function i(x,S){const{gen:$,data:P,it:C}=x;$.if(u($,P,S,C.opts.ownProperties),()=>{x.setParams({missingProperty:(0,e._)`${S}`},!0),x.error()})}Tn.checkReportMissingProp=i;function o({gen:x,data:S,it:{opts:$}},P,C){return(0,e.or)(...P.map(T=>(0,e.and)(u(x,S,T,$.ownProperties),(0,e._)`${C} = ${T}`)))}Tn.checkMissingProp=o;function s(x,S){x.setParams({missingProperty:S},!0),x.error()}Tn.reportMissingProp=s;function a(x){return x.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Tn.hasPropFunc=a;function l(x,S,$){return(0,e._)`${a(x)}.call(${S}, ${$})`}Tn.isOwnProperty=l;function c(x,S,$,P){const C=(0,e._)`${S}${(0,e.getProperty)($)} !== undefined`;return P?(0,e._)`${C} && ${l(x,S,$)}`:C}Tn.propertyInData=c;function u(x,S,$,P){const C=(0,e._)`${S}${(0,e.getProperty)($)} === undefined`;return P?(0,e.or)(C,(0,e.not)(l(x,S,$))):C}Tn.noPropertyInData=u;function f(x){return x?Object.keys(x).filter(S=>S!=="__proto__"):[]}Tn.allSchemaProperties=f;function m(x,S){return f(S).filter($=>!(0,t.alwaysValidSchema)(x,S[$]))}Tn.schemaProperties=m;function v({schemaCode:x,data:S,it:{gen:$,topSchemaRef:P,schemaPath:C,errorPath:T},it:A},D,z,K){const B=K?(0,e._)`${x}, ${S}, ${P}${C}`:S,te=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,T)],[n.default.parentData,A.parentData],[n.default.parentDataProperty,A.parentDataProperty],[n.default.rootData,n.default.rootData]];A.opts.dynamicRef&&te.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${B}, ${$.object(...te)}`;return z!==e.nil?(0,e._)`${D}.call(${z}, ${J})`:(0,e._)`${D}(${J})`}Tn.callValidateCode=v;const _=(0,e._)`new RegExp`;function y({gen:x,it:{opts:S}},$){const P=S.unicodeRegExp?"u":"",{regExp:C}=S.code,T=C($,P);return x.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${C.code==="new RegExp"?_:(0,r.useFunc)(x,C)}(${$}, ${P})`})}Tn.usePattern=y;function w(x){const{gen:S,data:$,keyword:P,it:C}=x,T=S.name("valid");if(C.allErrors){const D=S.let("valid",!0);return A(()=>S.assign(D,!1)),D}return S.var(T,!0),A(()=>S.break()),T;function A(D){const z=S.const("len",(0,e._)`${$}.length`);S.forRange("i",0,z,K=>{x.subschema({keyword:P,dataProp:K,dataPropType:t.Type.Num},T),S.if((0,e.not)(T),D)})}}Tn.validateArray=w;function b(x){const{gen:S,schema:$,keyword:P,it:C}=x;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(z=>(0,t.alwaysValidSchema)(C,z))&&!C.opts.unevaluated)return;const A=S.let("valid",!1),D=S.name("_valid");S.block(()=>$.forEach((z,K)=>{const B=x.subschema({keyword:P,schemaProp:K,compositeRule:!0},D);S.assign(A,(0,e._)`${A} || ${D}`),x.mergeValidEvaluated(B,D)||S.if((0,e.not)(A))})),x.result(A,()=>x.reset(),()=>x.error(!0))}return Tn.validateUnion=b,Tn}var z7;function Q3e(){if(z7)return vs;z7=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.validateKeywordUsage=vs.validSchemaType=vs.funcKeywordCode=vs.macroKeywordCode=void 0;const e=Vt(),t=Fs(),n=Vs(),r=U2();function i(m,v){const{gen:_,keyword:y,schema:w,parentSchema:b,it:x}=m,S=v.macro.call(x.self,w,b,x),$=c(_,y,S);x.opts.validateSchema!==!1&&x.self.validateSchema(S,!0);const P=_.name("valid");m.subschema({schema:S,schemaPath:e.nil,errSchemaPath:`${x.errSchemaPath}/${y}`,topSchemaRef:$,compositeRule:!0},P),m.pass(P,()=>m.error(!0))}vs.macroKeywordCode=i;function o(m,v){var _;const{gen:y,keyword:w,schema:b,parentSchema:x,$data:S,it:$}=m;l($,v);const P=!S&&v.compile?v.compile.call($.self,b,x,$):v.validate,C=c(y,w,P),T=y.let("valid");m.block$data(T,A),m.ok((_=v.valid)!==null&&_!==void 0?_:T);function A(){if(v.errors===!1)K(),v.modifying&&s(m),B(()=>m.error());else{const te=v.async?D():z();v.modifying&&s(m),B(()=>a(m,te))}}function D(){const te=y.let("ruleErrs",null);return y.try(()=>K((0,e._)`await `),J=>y.assign(T,!1).if((0,e._)`${J} instanceof ${$.ValidationError}`,()=>y.assign(te,(0,e._)`${J}.errors`),()=>y.throw(J))),te}function z(){const te=(0,e._)`${C}.errors`;return y.assign(te,null),K(e.nil),te}function K(te=v.async?(0,e._)`await `:e.nil){const J=$.opts.passContext?t.default.this:t.default.self,oe=!("compile"in v&&!S||v.schema===!1);y.assign(T,(0,e._)`${te}${(0,n.callValidateCode)(m,C,J,oe)}`,v.modifying)}function B(te){var J;y.if((0,e.not)((J=v.valid)!==null&&J!==void 0?J:T),te)}}vs.funcKeywordCode=o;function s(m){const{gen:v,data:_,it:y}=m;v.if(y.parentData,()=>v.assign(_,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function a(m,v){const{gen:_}=m;_.if((0,e._)`Array.isArray(${v})`,()=>{_.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(m)},()=>m.error())}function l({schemaEnv:m},v){if(v.async&&!m.$async)throw new Error("async keyword in sync schema")}function c(m,v,_){if(_===void 0)throw new Error(`keyword "${v}" failed to compile`);return m.scopeValue("keyword",typeof _=="function"?{ref:_}:{ref:_,code:(0,e.stringify)(_)})}function u(m,v,_=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||_&&typeof m>"u")}vs.validSchemaType=u;function f({schema:m,opts:v,self:_,errSchemaPath:y},w,b){if(Array.isArray(w.keyword)?!w.keyword.includes(b):w.keyword!==b)throw new Error("ajv implementation error");const x=w.dependencies;if(x!=null&&x.some(S=>!Object.prototype.hasOwnProperty.call(m,S)))throw new Error(`parent schema must have dependencies of ${b}: ${x.join(",")}`);if(w.validateSchema&&!w.validateSchema(m[b])){const $=`keyword "${b}" value is invalid at path "${y}": `+_.errorsText(w.validateSchema.errors);if(v.validateSchema==="log")_.logger.error($);else throw new Error($)}}return vs.validateKeywordUsage=f,vs}var Va={},U7;function J3e(){if(U7)return Va;U7=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.extendSubschemaMode=Va.extendSubschemaData=Va.getSubschema=void 0;const e=Vt(),t=on();function n(o,{keyword:s,schemaProp:a,schema:l,schemaPath:c,errSchemaPath:u,topSchemaRef:f}){if(s!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const m=o.schema[s];return a===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:m[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(l!==void 0){if(c===void 0||u===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:f,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Va.getSubschema=n;function r(o,s,{dataProp:a,dataPropType:l,data:c,dataTypes:u,propertyName:f}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=s;if(a!==void 0){const{errorPath:_,dataPathArr:y,opts:w}=s,b=m.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);v(b),o.errorPath=(0,e.str)`${_}${(0,t.getErrorPath)(a,l,w.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...y,o.parentDataProperty]}if(c!==void 0){const _=c instanceof e.Name?c:m.let("data",c,!0);v(_),f!==void 0&&(o.propertyName=f)}u&&(o.dataTypes=u);function v(_){o.data=_,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,_]}}Va.extendSubschemaData=r;function i(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:l,createErrors:c,allErrors:u}){l!==void 0&&(o.compositeRule=l),c!==void 0&&(o.createErrors=c),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return Va.extendSubschemaMode=i,Va}var Ri={},q7;function q2(){if(q7)return Ri;q7=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.getSchemaRefs=Ri.resolveUrl=Ri.normalizeId=Ri._getFullPath=Ri.getFullPath=Ri.inlineRef=void 0;const e=on(),t=B_(),n=tG(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(y,w=!0){return typeof y=="boolean"?!0:w===!0?!s(y):w?a(y)<=w:!1}Ri.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(y){for(const w in y){if(o.has(w))return!0;const b=y[w];if(Array.isArray(b)&&b.some(s)||typeof b=="object"&&s(b))return!0}return!1}function a(y){let w=0;for(const b in y){if(b==="$ref")return 1/0;if(w++,!r.has(b)&&(typeof y[b]=="object"&&(0,e.eachItem)(y[b],x=>w+=a(x)),w===1/0))return 1/0}return w}function l(y,w="",b){b!==!1&&(w=f(w));const x=y.parse(w);return c(y,x)}Ri.getFullPath=l;function c(y,w){return y.serialize(w).split("#")[0]+"#"}Ri._getFullPath=c;const u=/#\/?$/;function f(y){return y?y.replace(u,""):""}Ri.normalizeId=f;function m(y,w,b){return b=f(b),y.resolve(w,b)}Ri.resolveUrl=m;const v=/^[a-z_][-a-z0-9._]*$/i;function _(y,w){if(typeof y=="boolean")return{};const{schemaId:b,uriResolver:x}=this.opts,S=f(y[b]||w),$={"":S},P=l(x,S,!1),C={},T=new Set;return n(y,{allKeys:!0},(z,K,B,te)=>{if(te===void 0)return;const J=P+K;let oe=$[te];typeof z[b]=="string"&&(oe=fe.call(this,z[b])),ye.call(this,z.$anchor),ye.call(this,z.$dynamicAnchor),$[K]=oe;function fe(ae){const ue=this.opts.uriResolver.resolve;if(ae=f(oe?ue(oe,ae):ae),T.has(ae))throw D(ae);T.add(ae);let Q=this.refs[ae];return typeof Q=="string"&&(Q=this.refs[Q]),typeof Q=="object"?A(z,Q.schema,ae):ae!==f(J)&&(ae[0]==="#"?(A(z,C[ae],ae),C[ae]=z):this.refs[ae]=J),ae}function ye(ae){if(typeof ae=="string"){if(!v.test(ae))throw new Error(`invalid anchor "${ae}"`);fe.call(this,`#${ae}`)}}}),C;function A(z,K,B){if(K!==void 0&&!t(z,K))throw D(B)}function D(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return Ri.getSchemaRefs=_,Ri}var H7;function $v(){if(H7)return La;H7=1,Object.defineProperty(La,"__esModule",{value:!0}),La.getData=La.KeywordCxt=La.validateFunctionCode=void 0;const e=Y3e(),t=r_(),n=Eee(),r=r_(),i=X3e(),o=Q3e(),s=J3e(),a=Vt(),l=Fs(),c=q2(),u=on(),f=U2();function m(H){if(P(H)&&(T(H),$(H))){w(H);return}v(H,()=>(0,e.topBoolOrEmptySchema)(H))}La.validateFunctionCode=m;function v({gen:H,validateName:W,schema:re,schemaEnv:pe,opts:Se},Oe){Se.code.es5?H.func(W,(0,a._)`${l.default.data}, ${l.default.valCxt}`,pe.$async,()=>{H.code((0,a._)`"use strict"; ${x(re,Se)}`),y(H,Se),H.code(Oe)}):H.func(W,(0,a._)`${l.default.data}, ${_(Se)}`,pe.$async,()=>H.code(x(re,Se)).code(Oe))}function _(H){return(0,a._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${H.dynamicRef?(0,a._)`, ${l.default.dynamicAnchors}={}`:a.nil}}={}`}function y(H,W){H.if(l.default.valCxt,()=>{H.var(l.default.instancePath,(0,a._)`${l.default.valCxt}.${l.default.instancePath}`),H.var(l.default.parentData,(0,a._)`${l.default.valCxt}.${l.default.parentData}`),H.var(l.default.parentDataProperty,(0,a._)`${l.default.valCxt}.${l.default.parentDataProperty}`),H.var(l.default.rootData,(0,a._)`${l.default.valCxt}.${l.default.rootData}`),W.dynamicRef&&H.var(l.default.dynamicAnchors,(0,a._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{H.var(l.default.instancePath,(0,a._)`""`),H.var(l.default.parentData,(0,a._)`undefined`),H.var(l.default.parentDataProperty,(0,a._)`undefined`),H.var(l.default.rootData,l.default.data),W.dynamicRef&&H.var(l.default.dynamicAnchors,(0,a._)`{}`)})}function w(H){const{schema:W,opts:re,gen:pe}=H;v(H,()=>{re.$comment&&W.$comment&&te(H),z(H),pe.let(l.default.vErrors,null),pe.let(l.default.errors,0),re.unevaluated&&b(H),A(H),J(H)})}function b(H){const{gen:W,validateName:re}=H;H.evaluated=W.const("evaluated",(0,a._)`${re}.evaluated`),W.if((0,a._)`${H.evaluated}.dynamicProps`,()=>W.assign((0,a._)`${H.evaluated}.props`,(0,a._)`undefined`)),W.if((0,a._)`${H.evaluated}.dynamicItems`,()=>W.assign((0,a._)`${H.evaluated}.items`,(0,a._)`undefined`))}function x(H,W){const re=typeof H=="object"&&H[W.schemaId];return re&&(W.code.source||W.code.process)?(0,a._)`/*# sourceURL=${re} */`:a.nil}function S(H,W){if(P(H)&&(T(H),$(H))){C(H,W);return}(0,e.boolOrEmptySchema)(H,W)}function $({schema:H,self:W}){if(typeof H=="boolean")return!H;for(const re in H)if(W.RULES.all[re])return!0;return!1}function P(H){return typeof H.schema!="boolean"}function C(H,W){const{schema:re,gen:pe,opts:Se}=H;Se.$comment&&re.$comment&&te(H),K(H),B(H);const Oe=pe.const("_errs",l.default.errors);A(H,Oe),pe.var(W,(0,a._)`${Oe} === ${l.default.errors}`)}function T(H){(0,u.checkUnknownRules)(H),D(H)}function A(H,W){if(H.opts.jtd)return fe(H,[],!1,W);const re=(0,t.getSchemaTypes)(H.schema),pe=(0,t.coerceAndCheckDataType)(H,re);fe(H,re,!pe,W)}function D(H){const{schema:W,errSchemaPath:re,opts:pe,self:Se}=H;W.$ref&&pe.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(W,Se.RULES)&&Se.logger.warn(`$ref: keywords ignored in schema at path "${re}"`)}function z(H){const{schema:W,opts:re}=H;W.default!==void 0&&re.useDefaults&&re.strictSchema&&(0,u.checkStrictMode)(H,"default is ignored in the schema root")}function K(H){const W=H.schema[H.opts.schemaId];W&&(H.baseId=(0,c.resolveUrl)(H.opts.uriResolver,H.baseId,W))}function B(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function te({gen:H,schemaEnv:W,schema:re,errSchemaPath:pe,opts:Se}){const Oe=re.$comment;if(Se.$comment===!0)H.code((0,a._)`${l.default.self}.logger.log(${Oe})`);else if(typeof Se.$comment=="function"){const rt=(0,a.str)`${pe}/$comment`,yt=H.scopeValue("root",{ref:W.root});H.code((0,a._)`${l.default.self}.opts.$comment(${Oe}, ${rt}, ${yt}.schema)`)}}function J(H){const{gen:W,schemaEnv:re,validateName:pe,ValidationError:Se,opts:Oe}=H;re.$async?W.if((0,a._)`${l.default.errors} === 0`,()=>W.return(l.default.data),()=>W.throw((0,a._)`new ${Se}(${l.default.vErrors})`)):(W.assign((0,a._)`${pe}.errors`,l.default.vErrors),Oe.unevaluated&&oe(H),W.return((0,a._)`${l.default.errors} === 0`))}function oe({gen:H,evaluated:W,props:re,items:pe}){re instanceof a.Name&&H.assign((0,a._)`${W}.props`,re),pe instanceof a.Name&&H.assign((0,a._)`${W}.items`,pe)}function fe(H,W,re,pe){const{gen:Se,schema:Oe,data:rt,allErrors:yt,opts:ut,self:Pt}=H,{RULES:Et}=Pt;if(Oe.$ref&&(ut.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(Oe,Et))){Se.block(()=>Z(H,"$ref",Et.all.$ref.definition));return}ut.jtd||ae(H,W),Se.block(()=>{for(const ct of Et.rules)kt(ct);kt(Et.post)});function kt(ct){(0,n.shouldUseGroup)(Oe,ct)&&(ct.type?(Se.if((0,r.checkDataType)(ct.type,rt,ut.strictNumbers)),ye(H,ct),W.length===1&&W[0]===ct.type&&re&&(Se.else(),(0,r.reportTypeError)(H)),Se.endIf()):ye(H,ct),yt||Se.if((0,a._)`${l.default.errors} === ${pe||0}`))}}function ye(H,W){const{gen:re,schema:pe,opts:{useDefaults:Se}}=H;Se&&(0,i.assignDefaults)(H,W.type),re.block(()=>{for(const Oe of W.rules)(0,n.shouldUseRule)(pe,Oe)&&Z(H,Oe.keyword,Oe.definition,W.type)})}function ae(H,W){H.schemaEnv.meta||!H.opts.strictTypes||(ue(H,W),H.opts.allowUnionTypes||Q(H,W),k(H,H.dataTypes))}function ue(H,W){if(W.length){if(!H.dataTypes.length){H.dataTypes=W;return}W.forEach(re=>{F(H.dataTypes,re)||I(H,`type "${re}" not allowed by context "${H.dataTypes.join(",")}"`)}),N(H,W)}}function Q(H,W){W.length>1&&!(W.length===2&&W.includes("null"))&&I(H,"use allowUnionTypes to allow union type keyword")}function k(H,W){const re=H.self.RULES.all;for(const pe in re){const Se=re[pe];if(typeof Se=="object"&&(0,n.shouldUseRule)(H.schema,Se)){const{type:Oe}=Se.definition;Oe.length&&!Oe.some(rt=>L(W,rt))&&I(H,`missing type "${Oe.join(",")}" for keyword "${pe}"`)}}}function L(H,W){return H.includes(W)||W==="number"&&H.includes("integer")}function F(H,W){return H.includes(W)||W==="integer"&&H.includes("number")}function N(H,W){const re=[];for(const pe of H.dataTypes)F(W,pe)?re.push(pe):W.includes("integer")&&pe==="number"&&re.push("integer");H.dataTypes=re}function I(H,W){const re=H.schemaEnv.baseId+H.errSchemaPath;W+=` at "${re}" (strictTypes)`,(0,u.checkStrictMode)(H,W,H.opts.strictTypes)}class q{constructor(W,re,pe){if((0,o.validateKeywordUsage)(W,re,pe),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=pe,this.data=W.data,this.schema=W.schema[pe],this.$data=re.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(W,this.schema,pe,this.$data),this.schemaType=re.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=re,this.$data)this.schemaCode=W.gen.const("vSchema",ce(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,re.schemaType,re.allowUndefined))throw new Error(`${pe} value must be ${JSON.stringify(re.schemaType)}`);("code"in re?re.trackErrors:re.errors!==!1)&&(this.errsCount=W.gen.const("_errs",l.default.errors))}result(W,re,pe){this.failResult((0,a.not)(W),re,pe)}failResult(W,re,pe){this.gen.if(W),pe?pe():this.error(),re?(this.gen.else(),re(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,re){this.failResult((0,a.not)(W),void 0,re)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:re}=this;this.fail((0,a._)`${re} !== undefined && (${(0,a.or)(this.invalid$data(),W)})`)}error(W,re,pe){if(re){this.setParams(re),this._error(W,pe),this.setParams({});return}this._error(W,pe)}_error(W,re){(W?f.reportExtraError:f.reportError)(this,this.def.error,re)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,re){re?Object.assign(this.params,W):this.params=W}block$data(W,re,pe=a.nil){this.gen.block(()=>{this.check$data(W,pe),re()})}check$data(W=a.nil,re=a.nil){if(!this.$data)return;const{gen:pe,schemaCode:Se,schemaType:Oe,def:rt}=this;pe.if((0,a.or)((0,a._)`${Se} === undefined`,re)),W!==a.nil&&pe.assign(W,!0),(Oe.length||rt.validateSchema)&&(pe.elseIf(this.invalid$data()),this.$dataError(),W!==a.nil&&pe.assign(W,!1)),pe.else()}invalid$data(){const{gen:W,schemaCode:re,schemaType:pe,def:Se,it:Oe}=this;return(0,a.or)(rt(),yt());function rt(){if(pe.length){if(!(re instanceof a.Name))throw new Error("ajv implementation error");const ut=Array.isArray(pe)?pe:[pe];return(0,a._)`${(0,r.checkDataTypes)(ut,re,Oe.opts.strictNumbers,r.DataType.Wrong)}`}return a.nil}function yt(){if(Se.validateSchema){const ut=W.scopeValue("validate$data",{ref:Se.validateSchema});return(0,a._)`!${ut}(${re})`}return a.nil}}subschema(W,re){const pe=(0,s.getSubschema)(this.it,W);(0,s.extendSubschemaData)(pe,this.it,W),(0,s.extendSubschemaMode)(pe,W);const Se={...this.it,...pe,items:void 0,props:void 0};return S(Se,re),Se}mergeEvaluated(W,re){const{it:pe,gen:Se}=this;pe.opts.unevaluated&&(pe.props!==!0&&W.props!==void 0&&(pe.props=u.mergeEvaluated.props(Se,W.props,pe.props,re)),pe.items!==!0&&W.items!==void 0&&(pe.items=u.mergeEvaluated.items(Se,W.items,pe.items,re)))}mergeValidEvaluated(W,re){const{it:pe,gen:Se}=this;if(pe.opts.unevaluated&&(pe.props!==!0||pe.items!==!0))return Se.if(re,()=>this.mergeEvaluated(W,a.Name)),!0}}La.KeywordCxt=q;function Z(H,W,re,pe){const Se=new q(H,re,W);"code"in re?re.code(Se,pe):Se.$data&&re.validate?(0,o.funcKeywordCode)(Se,re):"macro"in re?(0,o.macroKeywordCode)(Se,re):(re.compile||re.validate)&&(0,o.funcKeywordCode)(Se,re)}const ne=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ce(H,{dataLevel:W,dataNames:re,dataPathArr:pe}){let Se,Oe;if(H==="")return l.default.rootData;if(H[0]==="/"){if(!ne.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);Se=H,Oe=l.default.rootData}else{const Pt=de.exec(H);if(!Pt)throw new Error(`Invalid JSON-pointer: ${H}`);const Et=+Pt[1];if(Se=Pt[2],Se==="#"){if(Et>=W)throw new Error(ut("property/index",Et));return pe[W-Et]}if(Et>W)throw new Error(ut("data",Et));if(Oe=re[W-Et],!Se)return Oe}let rt=Oe;const yt=Se.split("/");for(const Pt of yt)Pt&&(Oe=(0,a._)`${Oe}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Pt))}`,rt=(0,a._)`${rt} && ${Oe}`);return rt;function ut(Pt,Et){return`Cannot access ${Pt} ${Et} levels up, current level is ${W}`}}return La.getData=ce,La}var bw={},B7;function H2(){if(B7)return bw;B7=1,Object.defineProperty(bw,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return bw.default=e,bw}var xw={},W7;function B2(){if(W7)return xw;W7=1,Object.defineProperty(xw,"__esModule",{value:!0});const e=q2();class t extends Error{constructor(r,i,o,s){super(s||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,e.resolveUrl)(r,i,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return xw.default=t,xw}var bo={},G7;function W2(){if(G7)return bo;G7=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.resolveSchema=bo.getCompilingSchema=bo.resolveRef=bo.compileSchema=bo.SchemaEnv=void 0;const e=Vt(),t=H2(),n=Fs(),r=q2(),i=on(),o=$v();class s{constructor(b){var x;this.refs={},this.dynamicAnchors={};let S;typeof b.schema=="object"&&(S=b.schema),this.schema=b.schema,this.schemaId=b.schemaId,this.root=b.root||this,this.baseId=(x=b.baseId)!==null&&x!==void 0?x:(0,r.normalizeId)(S==null?void 0:S[b.schemaId||"$id"]),this.schemaPath=b.schemaPath,this.localRefs=b.localRefs,this.meta=b.meta,this.$async=S==null?void 0:S.$async,this.refs={}}}bo.SchemaEnv=s;function a(w){const b=u.call(this,w);if(b)return b;const x=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:S,lines:$}=this.opts.code,{ownProperties:P}=this.opts,C=new e.CodeGen(this.scope,{es5:S,lines:$,ownProperties:P});let T;w.$async&&(T=C.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const A=C.scopeName("validate");w.validateName=A;const D={gen:C,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:C.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:A,ValidationError:T,schema:w.schema,schemaEnv:w,rootId:x,baseId:w.baseId||x,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(w),(0,o.validateFunctionCode)(D),C.optimize(this.opts.code.optimize);const K=C.toString();z=`${C.scopeRefs(n.default.scope)}return ${K}`,this.opts.code.process&&(z=this.opts.code.process(z,w));const te=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(A,{ref:te}),te.errors=null,te.schema=w.schema,te.schemaEnv=w,w.$async&&(te.$async=!0),this.opts.code.source===!0&&(te.source={validateName:A,validateCode:K,scopeValues:C._values}),this.opts.unevaluated){const{props:J,items:oe}=D;te.evaluated={props:J instanceof e.Name?void 0:J,items:oe instanceof e.Name?void 0:oe,dynamicProps:J instanceof e.Name,dynamicItems:oe instanceof e.Name},te.source&&(te.source.evaluated=(0,e.stringify)(te.evaluated))}return w.validate=te,w}catch(K){throw delete w.validate,delete w.validateName,z&&this.logger.error("Error compiling schema, function code:",z),K}finally{this._compilations.delete(w)}}bo.compileSchema=a;function l(w,b,x){var S;x=(0,r.resolveUrl)(this.opts.uriResolver,b,x);const $=w.refs[x];if($)return $;let P=m.call(this,w,x);if(P===void 0){const C=(S=w.localRefs)===null||S===void 0?void 0:S[x],{schemaId:T}=this.opts;C&&(P=new s({schema:C,schemaId:T,root:w,baseId:b}))}if(P!==void 0)return w.refs[x]=c.call(this,P)}bo.resolveRef=l;function c(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:a.call(this,w)}function u(w){for(const b of this._compilations)if(f(b,w))return b}bo.getCompilingSchema=u;function f(w,b){return w.schema===b.schema&&w.root===b.root&&w.baseId===b.baseId}function m(w,b){let x;for(;typeof(x=this.refs[b])=="string";)b=x;return x||this.schemas[b]||v.call(this,w,b)}function v(w,b){const x=this.opts.uriResolver.parse(b),S=(0,r._getFullPath)(this.opts.uriResolver,x);let $=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&S===$)return y.call(this,x,w);const P=(0,r.normalizeId)(S),C=this.refs[P]||this.schemas[P];if(typeof C=="string"){const T=v.call(this,w,C);return typeof(T==null?void 0:T.schema)!="object"?void 0:y.call(this,x,T)}if(typeof(C==null?void 0:C.schema)=="object"){if(C.validate||a.call(this,C),P===(0,r.normalizeId)(b)){const{schema:T}=C,{schemaId:A}=this.opts,D=T[A];return D&&($=(0,r.resolveUrl)(this.opts.uriResolver,$,D)),new s({schema:T,schemaId:A,root:w,baseId:$})}return y.call(this,x,C)}}bo.resolveSchema=v;const _=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(w,{baseId:b,schema:x,root:S}){var $;if((($=w.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const T of w.fragment.slice(1).split("/")){if(typeof x=="boolean")return;const A=x[(0,i.unescapeFragment)(T)];if(A===void 0)return;x=A;const D=typeof x=="object"&&x[this.opts.schemaId];!_.has(T)&&D&&(b=(0,r.resolveUrl)(this.opts.uriResolver,b,D))}let P;if(typeof x!="boolean"&&x.$ref&&!(0,i.schemaHasRulesButRef)(x,this.RULES)){const T=(0,r.resolveUrl)(this.opts.uriResolver,b,x.$ref);P=v.call(this,S,T)}const{schemaId:C}=this.opts;if(P=P||new s({schema:x,schemaId:C,root:S,baseId:b}),P.schema!==P.root.schema)return P}return bo}const eDe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tDe="Meta-schema for $data reference (JSON AnySchema extension proposal)",nDe="object",rDe=["$data"],iDe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},oDe=!1,sDe={$id:eDe,description:tDe,type:nDe,required:rDe,properties:iDe,additionalProperties:oDe};var _w={},x0={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */var aDe=x0.exports,K7;function lDe(){return K7||(K7=1,function(e,t){(function(n,r){r(t)})(aDe,function(n){function r(){for(var se=arguments.length,ee=Array(se),le=0;le<se;le++)ee[le]=arguments[le];if(ee.length>1){ee[0]=ee[0].slice(0,-1);for(var we=ee.length-1,be=1;be<we;++be)ee[be]=ee[be].slice(1,-1);return ee[we]=ee[we].slice(1),ee.join("")}else return ee[0]}function i(se){return"(?:"+se+")"}function o(se){return se===void 0?"undefined":se===null?"null":Object.prototype.toString.call(se).split(" ").pop().split("]").shift().toLowerCase()}function s(se){return se.toUpperCase()}function a(se){return se!=null?se instanceof Array?se:typeof se.length!="number"||se.split||se.setInterval||se.call?[se]:Array.prototype.slice.call(se):[]}function l(se,ee){var le=se;if(ee)for(var we in ee)le[we]=ee[we];return le}function c(se){var ee="[A-Za-z]",le="[0-9]",we=r(le,"[A-Fa-f]"),be=i(i("%[EFef]"+we+"%"+we+we+"%"+we+we)+"|"+i("%[89A-Fa-f]"+we+"%"+we+we)+"|"+i("%"+we+we)),ke="[\\:\\/\\?\\#\\[\\]\\@]",ze="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",X=r(ke,ze),me=se?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ee=se?"[\\uE000-\\uF8FF]":"[]",Pe=r(ee,le,"[\\-\\.\\_\\~]",me);i(ee+r(ee,le,"[\\+\\-\\.]")+"*"),i(i(be+"|"+r(Pe,ze,"[\\:]"))+"*");var Ve=i(i("25[0-5]")+"|"+i("2[0-4]"+le)+"|"+i("1"+le+le)+"|"+i("0?[1-9]"+le)+"|0?0?"+le),st=i(Ve+"\\."+Ve+"\\."+Ve+"\\."+Ve),Ue=i(we+"{1,4}"),Ne=i(i(Ue+"\\:"+Ue)+"|"+st),Ke=i(i(Ue+"\\:")+"{6}"+Ne),at=i("\\:\\:"+i(Ue+"\\:")+"{5}"+Ne),Tt=i(i(Ue)+"?\\:\\:"+i(Ue+"\\:")+"{4}"+Ne),hn=i(i(i(Ue+"\\:")+"{0,1}"+Ue)+"?\\:\\:"+i(Ue+"\\:")+"{3}"+Ne),jn=i(i(i(Ue+"\\:")+"{0,2}"+Ue)+"?\\:\\:"+i(Ue+"\\:")+"{2}"+Ne),pr=i(i(i(Ue+"\\:")+"{0,3}"+Ue)+"?\\:\\:"+Ue+"\\:"+Ne),Nt=i(i(i(Ue+"\\:")+"{0,4}"+Ue)+"?\\:\\:"+Ne),tn=i(i(i(Ue+"\\:")+"{0,5}"+Ue)+"?\\:\\:"+Ue),dn=i(i(i(Ue+"\\:")+"{0,6}"+Ue)+"?\\:\\:"),kn=i([Ke,at,Tt,hn,jn,pr,Nt,tn,dn].join("|")),pt=i(i(Pe+"|"+be)+"+");i("[vV]"+we+"+\\."+r(Pe,ze,"[\\:]")+"+"),i(i(be+"|"+r(Pe,ze))+"*");var wn=i(be+"|"+r(Pe,ze,"[\\:\\@]"));return i(i(be+"|"+r(Pe,ze,"[\\@]"))+"+"),i(i(wn+"|"+r("[\\/\\?]",Ee))+"*"),{NOT_SCHEME:new RegExp(r("[^]",ee,le,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",Pe,ze),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",Pe,ze),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",Pe,ze),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",Pe,ze),"g"),NOT_QUERY:new RegExp(r("[^\\%]",Pe,ze,"[\\:\\@\\/\\?]",Ee),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",Pe,ze,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",Pe,ze),"g"),UNRESERVED:new RegExp(Pe,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",Pe,X),"g"),PCT_ENCODED:new RegExp(be,"g"),IPV4ADDRESS:new RegExp("^("+st+")$"),IPV6ADDRESS:new RegExp("^\\[?("+kn+")"+i(i("\\%25|\\%(?!"+we+"{2})")+"("+pt+")")+"?\\]?$")}}var u=c(!1),f=c(!0),m=function(){function se(ee,le){var we=[],be=!0,ke=!1,ze=void 0;try{for(var X=ee[Symbol.iterator](),me;!(be=(me=X.next()).done)&&(we.push(me.value),!(le&&we.length===le));be=!0);}catch(Ee){ke=!0,ze=Ee}finally{try{!be&&X.return&&X.return()}finally{if(ke)throw ze}}return we}return function(ee,le){if(Array.isArray(ee))return ee;if(Symbol.iterator in Object(ee))return se(ee,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),v=function(se){if(Array.isArray(se)){for(var ee=0,le=Array(se.length);ee<se.length;ee++)le[ee]=se[ee];return le}else return Array.from(se)},_=2147483647,y=36,w=1,b=26,x=38,S=700,$=72,P=128,C="-",T=/^xn--/,A=/[^\0-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},K=y-w,B=Math.floor,te=String.fromCharCode;function J(se){throw new RangeError(z[se])}function oe(se,ee){for(var le=[],we=se.length;we--;)le[we]=ee(se[we]);return le}function fe(se,ee){var le=se.split("@"),we="";le.length>1&&(we=le[0]+"@",se=le[1]),se=se.replace(D,".");var be=se.split("."),ke=oe(be,ee).join(".");return we+ke}function ye(se){for(var ee=[],le=0,we=se.length;le<we;){var be=se.charCodeAt(le++);if(be>=55296&&be<=56319&&le<we){var ke=se.charCodeAt(le++);(ke&64512)==56320?ee.push(((be&1023)<<10)+(ke&1023)+65536):(ee.push(be),le--)}else ee.push(be)}return ee}var ae=function(ee){return String.fromCodePoint.apply(String,v(ee))},ue=function(ee){return ee-48<10?ee-22:ee-65<26?ee-65:ee-97<26?ee-97:y},Q=function(ee,le){return ee+22+75*(ee<26)-((le!=0)<<5)},k=function(ee,le,we){var be=0;for(ee=we?B(ee/S):ee>>1,ee+=B(ee/le);ee>K*b>>1;be+=y)ee=B(ee/K);return B(be+(K+1)*ee/(ee+x))},L=function(ee){var le=[],we=ee.length,be=0,ke=P,ze=$,X=ee.lastIndexOf(C);X<0&&(X=0);for(var me=0;me<X;++me)ee.charCodeAt(me)>=128&&J("not-basic"),le.push(ee.charCodeAt(me));for(var Ee=X>0?X+1:0;Ee<we;){for(var Pe=be,Ve=1,st=y;;st+=y){Ee>=we&&J("invalid-input");var Ue=ue(ee.charCodeAt(Ee++));(Ue>=y||Ue>B((_-be)/Ve))&&J("overflow"),be+=Ue*Ve;var Ne=st<=ze?w:st>=ze+b?b:st-ze;if(Ue<Ne)break;var Ke=y-Ne;Ve>B(_/Ke)&&J("overflow"),Ve*=Ke}var at=le.length+1;ze=k(be-Pe,at,Pe==0),B(be/at)>_-ke&&J("overflow"),ke+=B(be/at),be%=at,le.splice(be++,0,ke)}return String.fromCodePoint.apply(String,le)},F=function(ee){var le=[];ee=ye(ee);var we=ee.length,be=P,ke=0,ze=$,X=!0,me=!1,Ee=void 0;try{for(var Pe=ee[Symbol.iterator](),Ve;!(X=(Ve=Pe.next()).done);X=!0){var st=Ve.value;st<128&&le.push(te(st))}}catch(po){me=!0,Ee=po}finally{try{!X&&Pe.return&&Pe.return()}finally{if(me)throw Ee}}var Ue=le.length,Ne=Ue;for(Ue&&le.push(C);Ne<we;){var Ke=_,at=!0,Tt=!1,hn=void 0;try{for(var jn=ee[Symbol.iterator](),pr;!(at=(pr=jn.next()).done);at=!0){var Nt=pr.value;Nt>=be&&Nt<Ke&&(Ke=Nt)}}catch(po){Tt=!0,hn=po}finally{try{!at&&jn.return&&jn.return()}finally{if(Tt)throw hn}}var tn=Ne+1;Ke-be>B((_-ke)/tn)&&J("overflow"),ke+=(Ke-be)*tn,be=Ke;var dn=!0,kn=!1,pt=void 0;try{for(var wn=ee[Symbol.iterator](),pn;!(dn=(pn=wn.next()).done);dn=!0){var _i=pn.value;if(_i<be&&++ke>_&&J("overflow"),_i==be){for(var Jr=ke,br=y;;br+=y){var In=br<=ze?w:br>=ze+b?b:br-ze;if(Jr<In)break;var Ei=Jr-In,Tr=y-In;le.push(te(Q(In+Ei%Tr,0))),Jr=B(Ei/Tr)}le.push(te(Q(Jr,0))),ze=k(ke,tn,Ne==Ue),ke=0,++Ne}}}catch(po){kn=!0,pt=po}finally{try{!dn&&wn.return&&wn.return()}finally{if(kn)throw pt}}++ke,++be}return le.join("")},N=function(ee){return fe(ee,function(le){return T.test(le)?L(le.slice(4).toLowerCase()):le})},I=function(ee){return fe(ee,function(le){return A.test(le)?"xn--"+F(le):le})},q={version:"2.1.0",ucs2:{decode:ye,encode:ae},decode:L,encode:F,toASCII:I,toUnicode:N},Z={};function ne(se){var ee=se.charCodeAt(0),le=void 0;return ee<16?le="%0"+ee.toString(16).toUpperCase():ee<128?le="%"+ee.toString(16).toUpperCase():ee<2048?le="%"+(ee>>6|192).toString(16).toUpperCase()+"%"+(ee&63|128).toString(16).toUpperCase():le="%"+(ee>>12|224).toString(16).toUpperCase()+"%"+(ee>>6&63|128).toString(16).toUpperCase()+"%"+(ee&63|128).toString(16).toUpperCase(),le}function de(se){for(var ee="",le=0,we=se.length;le<we;){var be=parseInt(se.substr(le+1,2),16);if(be<128)ee+=String.fromCharCode(be),le+=3;else if(be>=194&&be<224){if(we-le>=6){var ke=parseInt(se.substr(le+4,2),16);ee+=String.fromCharCode((be&31)<<6|ke&63)}else ee+=se.substr(le,6);le+=6}else if(be>=224){if(we-le>=9){var ze=parseInt(se.substr(le+4,2),16),X=parseInt(se.substr(le+7,2),16);ee+=String.fromCharCode((be&15)<<12|(ze&63)<<6|X&63)}else ee+=se.substr(le,9);le+=9}else ee+=se.substr(le,3),le+=3}return ee}function ce(se,ee){function le(we){var be=de(we);return be.match(ee.UNRESERVED)?be:we}return se.scheme&&(se.scheme=String(se.scheme).replace(ee.PCT_ENCODED,le).toLowerCase().replace(ee.NOT_SCHEME,"")),se.userinfo!==void 0&&(se.userinfo=String(se.userinfo).replace(ee.PCT_ENCODED,le).replace(ee.NOT_USERINFO,ne).replace(ee.PCT_ENCODED,s)),se.host!==void 0&&(se.host=String(se.host).replace(ee.PCT_ENCODED,le).toLowerCase().replace(ee.NOT_HOST,ne).replace(ee.PCT_ENCODED,s)),se.path!==void 0&&(se.path=String(se.path).replace(ee.PCT_ENCODED,le).replace(se.scheme?ee.NOT_PATH:ee.NOT_PATH_NOSCHEME,ne).replace(ee.PCT_ENCODED,s)),se.query!==void 0&&(se.query=String(se.query).replace(ee.PCT_ENCODED,le).replace(ee.NOT_QUERY,ne).replace(ee.PCT_ENCODED,s)),se.fragment!==void 0&&(se.fragment=String(se.fragment).replace(ee.PCT_ENCODED,le).replace(ee.NOT_FRAGMENT,ne).replace(ee.PCT_ENCODED,s)),se}function H(se){return se.replace(/^0*(.*)/,"$1")||"0"}function W(se,ee){var le=se.match(ee.IPV4ADDRESS)||[],we=m(le,2),be=we[1];return be?be.split(".").map(H).join("."):se}function re(se,ee){var le=se.match(ee.IPV6ADDRESS)||[],we=m(le,3),be=we[1],ke=we[2];if(be){for(var ze=be.toLowerCase().split("::").reverse(),X=m(ze,2),me=X[0],Ee=X[1],Pe=Ee?Ee.split(":").map(H):[],Ve=me.split(":").map(H),st=ee.IPV4ADDRESS.test(Ve[Ve.length-1]),Ue=st?7:8,Ne=Ve.length-Ue,Ke=Array(Ue),at=0;at<Ue;++at)Ke[at]=Pe[at]||Ve[Ne+at]||"";st&&(Ke[Ue-1]=W(Ke[Ue-1],ee));var Tt=Ke.reduce(function(tn,dn,kn){if(!dn||dn==="0"){var pt=tn[tn.length-1];pt&&pt.index+pt.length===kn?pt.length++:tn.push({index:kn,length:1})}return tn},[]),hn=Tt.sort(function(tn,dn){return dn.length-tn.length})[0],jn=void 0;if(hn&&hn.length>1){var pr=Ke.slice(0,hn.index),Nt=Ke.slice(hn.index+hn.length);jn=pr.join(":")+"::"+Nt.join(":")}else jn=Ke.join(":");return ke&&(jn+="%"+ke),jn}else return se}var pe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Se="".match(/(){0}/)[1]===void 0;function Oe(se){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le={},we=ee.iri!==!1?f:u;ee.reference==="suffix"&&(se=(ee.scheme?ee.scheme+":":"")+"//"+se);var be=se.match(pe);if(be){Se?(le.scheme=be[1],le.userinfo=be[3],le.host=be[4],le.port=parseInt(be[5],10),le.path=be[6]||"",le.query=be[7],le.fragment=be[8],isNaN(le.port)&&(le.port=be[5])):(le.scheme=be[1]||void 0,le.userinfo=se.indexOf("@")!==-1?be[3]:void 0,le.host=se.indexOf("//")!==-1?be[4]:void 0,le.port=parseInt(be[5],10),le.path=be[6]||"",le.query=se.indexOf("?")!==-1?be[7]:void 0,le.fragment=se.indexOf("#")!==-1?be[8]:void 0,isNaN(le.port)&&(le.port=se.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?be[4]:void 0)),le.host&&(le.host=re(W(le.host,we),we)),le.scheme===void 0&&le.userinfo===void 0&&le.host===void 0&&le.port===void 0&&!le.path&&le.query===void 0?le.reference="same-document":le.scheme===void 0?le.reference="relative":le.fragment===void 0?le.reference="absolute":le.reference="uri",ee.reference&&ee.reference!=="suffix"&&ee.reference!==le.reference&&(le.error=le.error||"URI is not a "+ee.reference+" reference.");var ke=Z[(ee.scheme||le.scheme||"").toLowerCase()];if(!ee.unicodeSupport&&(!ke||!ke.unicodeSupport)){if(le.host&&(ee.domainHost||ke&&ke.domainHost))try{le.host=q.toASCII(le.host.replace(we.PCT_ENCODED,de).toLowerCase())}catch(ze){le.error=le.error||"Host's domain name can not be converted to ASCII via punycode: "+ze}ce(le,u)}else ce(le,we);ke&&ke.parse&&ke.parse(le,ee)}else le.error=le.error||"URI can not be parsed.";return le}function rt(se,ee){var le=ee.iri!==!1?f:u,we=[];return se.userinfo!==void 0&&(we.push(se.userinfo),we.push("@")),se.host!==void 0&&we.push(re(W(String(se.host),le),le).replace(le.IPV6ADDRESS,function(be,ke,ze){return"["+ke+(ze?"%25"+ze:"")+"]"})),(typeof se.port=="number"||typeof se.port=="string")&&(we.push(":"),we.push(String(se.port))),we.length?we.join(""):void 0}var yt=/^\.\.?\//,ut=/^\/\.(\/|$)/,Pt=/^\/\.\.(\/|$)/,Et=/^\/?(?:.|\n)*?(?=\/|$)/;function kt(se){for(var ee=[];se.length;)if(se.match(yt))se=se.replace(yt,"");else if(se.match(ut))se=se.replace(ut,"/");else if(se.match(Pt))se=se.replace(Pt,"/"),ee.pop();else if(se==="."||se==="..")se="";else{var le=se.match(Et);if(le){var we=le[0];se=se.slice(we.length),ee.push(we)}else throw new Error("Unexpected dot segment condition")}return ee.join("")}function ct(se){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=ee.iri?f:u,we=[],be=Z[(ee.scheme||se.scheme||"").toLowerCase()];if(be&&be.serialize&&be.serialize(se,ee),se.host&&!le.IPV6ADDRESS.test(se.host)){if(ee.domainHost||be&&be.domainHost)try{se.host=ee.iri?q.toUnicode(se.host):q.toASCII(se.host.replace(le.PCT_ENCODED,de).toLowerCase())}catch(X){se.error=se.error||"Host's domain name can not be converted to "+(ee.iri?"Unicode":"ASCII")+" via punycode: "+X}}ce(se,le),ee.reference!=="suffix"&&se.scheme&&(we.push(se.scheme),we.push(":"));var ke=rt(se,ee);if(ke!==void 0&&(ee.reference!=="suffix"&&we.push("//"),we.push(ke),se.path&&se.path.charAt(0)!=="/"&&we.push("/")),se.path!==void 0){var ze=se.path;!ee.absolutePath&&(!be||!be.absolutePath)&&(ze=kt(ze)),ke===void 0&&(ze=ze.replace(/^\/\//,"/%2F")),we.push(ze)}return se.query!==void 0&&(we.push("?"),we.push(se.query)),se.fragment!==void 0&&(we.push("#"),we.push(se.fragment)),we.join("")}function Bt(se,ee){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},we=arguments[3],be={};return we||(se=Oe(ct(se,le),le),ee=Oe(ct(ee,le),le)),le=le||{},!le.tolerant&&ee.scheme?(be.scheme=ee.scheme,be.userinfo=ee.userinfo,be.host=ee.host,be.port=ee.port,be.path=kt(ee.path||""),be.query=ee.query):(ee.userinfo!==void 0||ee.host!==void 0||ee.port!==void 0?(be.userinfo=ee.userinfo,be.host=ee.host,be.port=ee.port,be.path=kt(ee.path||""),be.query=ee.query):(ee.path?(ee.path.charAt(0)==="/"?be.path=kt(ee.path):((se.userinfo!==void 0||se.host!==void 0||se.port!==void 0)&&!se.path?be.path="/"+ee.path:se.path?be.path=se.path.slice(0,se.path.lastIndexOf("/")+1)+ee.path:be.path=ee.path,be.path=kt(be.path)),be.query=ee.query):(be.path=se.path,ee.query!==void 0?be.query=ee.query:be.query=se.query),be.userinfo=se.userinfo,be.host=se.host,be.port=se.port),be.scheme=se.scheme),be.fragment=ee.fragment,be}function ht(se,ee,le){var we=l({scheme:"null"},le);return ct(Bt(Oe(se,we),Oe(ee,we),we,!0),we)}function Jt(se,ee){return typeof se=="string"?se=ct(Oe(se,ee),ee):o(se)==="object"&&(se=Oe(ct(se,ee),ee)),se}function Kt(se,ee,le){return typeof se=="string"?se=ct(Oe(se,le),le):o(se)==="object"&&(se=ct(se,le)),typeof ee=="string"?ee=ct(Oe(ee,le),le):o(ee)==="object"&&(ee=ct(ee,le)),se===ee}function Xt(se,ee){return se&&se.toString().replace(!ee||!ee.iri?u.ESCAPE:f.ESCAPE,ne)}function en(se,ee){return se&&se.toString().replace(!ee||!ee.iri?u.PCT_ENCODED:f.PCT_ENCODED,de)}var Pn={scheme:"http",domainHost:!0,parse:function(ee,le){return ee.host||(ee.error=ee.error||"HTTP URIs must have a host."),ee},serialize:function(ee,le){var we=String(ee.scheme).toLowerCase()==="https";return(ee.port===(we?443:80)||ee.port==="")&&(ee.port=void 0),ee.path||(ee.path="/"),ee}},sn={scheme:"https",domainHost:Pn.domainHost,parse:Pn.parse,serialize:Pn.serialize};function Le(se){return typeof se.secure=="boolean"?se.secure:String(se.scheme).toLowerCase()==="wss"}var Qr={scheme:"ws",domainHost:!0,parse:function(ee,le){var we=ee;return we.secure=Le(we),we.resourceName=(we.path||"/")+(we.query?"?"+we.query:""),we.path=void 0,we.query=void 0,we},serialize:function(ee,le){if((ee.port===(Le(ee)?443:80)||ee.port==="")&&(ee.port=void 0),typeof ee.secure=="boolean"&&(ee.scheme=ee.secure?"wss":"ws",ee.secure=void 0),ee.resourceName){var we=ee.resourceName.split("?"),be=m(we,2),ke=be[0],ze=be[1];ee.path=ke&&ke!=="/"?ke:void 0,ee.query=ze,ee.resourceName=void 0}return ee.fragment=void 0,ee}},Vi={scheme:"wss",domainHost:Qr.domainHost,parse:Qr.parse,serialize:Qr.serialize},ss={},zi="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Kn="[0-9A-Fa-f]",ho=i(i("%[EFef]"+Kn+"%"+Kn+Kn+"%"+Kn+Kn)+"|"+i("%[89A-Fa-f]"+Kn+"%"+Kn+Kn)+"|"+i("%"+Kn+Kn)),bi="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Rr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",xi=r(Rr,'[\\"\\\\]'),un="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Zn=new RegExp(zi,"g"),yn=new RegExp(ho,"g"),hr=new RegExp(r("[^]",bi,"[\\.]",'[\\"]',xi),"g"),Yn=new RegExp(r("[^]",zi,un),"g"),Xn=Yn;function ve(se){var ee=de(se);return ee.match(Zn)?ee:se}var $e={scheme:"mailto",parse:function(ee,le){var we=ee,be=we.to=we.path?we.path.split(","):[];if(we.path=void 0,we.query){for(var ke=!1,ze={},X=we.query.split("&"),me=0,Ee=X.length;me<Ee;++me){var Pe=X[me].split("=");switch(Pe[0]){case"to":for(var Ve=Pe[1].split(","),st=0,Ue=Ve.length;st<Ue;++st)be.push(Ve[st]);break;case"subject":we.subject=en(Pe[1],le);break;case"body":we.body=en(Pe[1],le);break;default:ke=!0,ze[en(Pe[0],le)]=en(Pe[1],le);break}}ke&&(we.headers=ze)}we.query=void 0;for(var Ne=0,Ke=be.length;Ne<Ke;++Ne){var at=be[Ne].split("@");if(at[0]=en(at[0]),le.unicodeSupport)at[1]=en(at[1],le).toLowerCase();else try{at[1]=q.toASCII(en(at[1],le).toLowerCase())}catch(Tt){we.error=we.error||"Email address's domain name can not be converted to ASCII via punycode: "+Tt}be[Ne]=at.join("@")}return we},serialize:function(ee,le){var we=ee,be=a(ee.to);if(be){for(var ke=0,ze=be.length;ke<ze;++ke){var X=String(be[ke]),me=X.lastIndexOf("@"),Ee=X.slice(0,me).replace(yn,ve).replace(yn,s).replace(hr,ne),Pe=X.slice(me+1);try{Pe=le.iri?q.toUnicode(Pe):q.toASCII(en(Pe,le).toLowerCase())}catch(Ne){we.error=we.error||"Email address's domain name can not be converted to "+(le.iri?"Unicode":"ASCII")+" via punycode: "+Ne}be[ke]=Ee+"@"+Pe}we.path=be.join(",")}var Ve=ee.headers=ee.headers||{};ee.subject&&(Ve.subject=ee.subject),ee.body&&(Ve.body=ee.body);var st=[];for(var Ue in Ve)Ve[Ue]!==ss[Ue]&&st.push(Ue.replace(yn,ve).replace(yn,s).replace(Yn,ne)+"="+Ve[Ue].replace(yn,ve).replace(yn,s).replace(Xn,ne));return st.length&&(we.query=st.join("&")),we}},Ce=/^([^\:]+)\:(.*)/,De={scheme:"urn",parse:function(ee,le){var we=ee.path&&ee.path.match(Ce),be=ee;if(we){var ke=le.scheme||be.scheme||"urn",ze=we[1].toLowerCase(),X=we[2],me=ke+":"+(le.nid||ze),Ee=Z[me];be.nid=ze,be.nss=X,be.path=void 0,Ee&&(be=Ee.parse(be,le))}else be.error=be.error||"URN can not be parsed.";return be},serialize:function(ee,le){var we=le.scheme||ee.scheme||"urn",be=ee.nid,ke=we+":"+(le.nid||be),ze=Z[ke];ze&&(ee=ze.serialize(ee,le));var X=ee,me=ee.nss;return X.path=(be||le.nid)+":"+me,X}},Be=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,tt={scheme:"urn:uuid",parse:function(ee,le){var we=ee;return we.uuid=we.nss,we.nss=void 0,!le.tolerant&&(!we.uuid||!we.uuid.match(Be))&&(we.error=we.error||"UUID is not valid."),we},serialize:function(ee,le){var we=ee;return we.nss=(ee.uuid||"").toLowerCase(),we}};Z[Pn.scheme]=Pn,Z[sn.scheme]=sn,Z[Qr.scheme]=Qr,Z[Vi.scheme]=Vi,Z[$e.scheme]=$e,Z[De.scheme]=De,Z[tt.scheme]=tt,n.SCHEMES=Z,n.pctEncChar=ne,n.pctDecChars=de,n.parse=Oe,n.removeDotSegments=kt,n.serialize=ct,n.resolveComponents=Bt,n.resolve=ht,n.normalize=Jt,n.equal=Kt,n.escapeComponent=Xt,n.unescapeComponent=en,Object.defineProperty(n,"__esModule",{value:!0})})}(x0,x0.exports)),x0.exports}var Z7;function cDe(){if(Z7)return _w;Z7=1,Object.defineProperty(_w,"__esModule",{value:!0});const e=lDe();return e.code='require("ajv/dist/runtime/uri").default',_w.default=e,_w}var Y7;function See(){return Y7||(Y7=1,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=$v();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Vt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=H2(),i=B2(),o=_ee(),s=W2(),a=Vt(),l=q2(),c=r_(),u=on(),f=sDe,m=cDe(),v=(Q,k)=>new RegExp(Q,k);v.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function S(Q){var k,L,F,N,I,q,Z,ne,de,ce,H,W,re,pe,Se,Oe,rt,yt,ut,Pt,Et,kt,ct,Bt,ht;const Jt=Q.strict,Kt=(k=Q.code)===null||k===void 0?void 0:k.optimize,Xt=Kt===!0||Kt===void 0?1:Kt||0,en=(F=(L=Q.code)===null||L===void 0?void 0:L.regExp)!==null&&F!==void 0?F:v,Pn=(N=Q.uriResolver)!==null&&N!==void 0?N:m.default;return{strictSchema:(q=(I=Q.strictSchema)!==null&&I!==void 0?I:Jt)!==null&&q!==void 0?q:!0,strictNumbers:(ne=(Z=Q.strictNumbers)!==null&&Z!==void 0?Z:Jt)!==null&&ne!==void 0?ne:!0,strictTypes:(ce=(de=Q.strictTypes)!==null&&de!==void 0?de:Jt)!==null&&ce!==void 0?ce:"log",strictTuples:(W=(H=Q.strictTuples)!==null&&H!==void 0?H:Jt)!==null&&W!==void 0?W:"log",strictRequired:(pe=(re=Q.strictRequired)!==null&&re!==void 0?re:Jt)!==null&&pe!==void 0?pe:!1,code:Q.code?{...Q.code,optimize:Xt,regExp:en}:{optimize:Xt,regExp:en},loopRequired:(Se=Q.loopRequired)!==null&&Se!==void 0?Se:x,loopEnum:(Oe=Q.loopEnum)!==null&&Oe!==void 0?Oe:x,meta:(rt=Q.meta)!==null&&rt!==void 0?rt:!0,messages:(yt=Q.messages)!==null&&yt!==void 0?yt:!0,inlineRefs:(ut=Q.inlineRefs)!==null&&ut!==void 0?ut:!0,schemaId:(Pt=Q.schemaId)!==null&&Pt!==void 0?Pt:"$id",addUsedSchema:(Et=Q.addUsedSchema)!==null&&Et!==void 0?Et:!0,validateSchema:(kt=Q.validateSchema)!==null&&kt!==void 0?kt:!0,validateFormats:(ct=Q.validateFormats)!==null&&ct!==void 0?ct:!0,unicodeRegExp:(Bt=Q.unicodeRegExp)!==null&&Bt!==void 0?Bt:!0,int32range:(ht=Q.int32range)!==null&&ht!==void 0?ht:!0,uriResolver:Pn}}class ${constructor(k={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...S(k)};const{es5:L,lines:F}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:L,lines:F}),this.logger=B(k.logger);const N=k.validateFormats;k.validateFormats=!1,this.RULES=(0,o.getRules)(),P.call(this,w,k,"NOT SUPPORTED"),P.call(this,b,k,"DEPRECATED","warn"),this._metaOpts=z.call(this),k.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&D.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),T.call(this),k.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:k,meta:L,schemaId:F}=this.opts;let N=f;F==="id"&&(N={...f},N.id=N.$id,delete N.$id),L&&k&&this.addMetaSchema(N,N[F],!1)}defaultMeta(){const{meta:k,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[L]||k:void 0}validate(k,L){let F;if(typeof k=="string"){if(F=this.getSchema(k),!F)throw new Error(`no schema with key or ref "${k}"`)}else F=this.compile(k);const N=F(L);return"$async"in F||(this.errors=F.errors),N}compile(k,L){const F=this._addSchema(k,L);return F.validate||this._compileSchemaEnv(F)}compileAsync(k,L){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:F}=this.opts;return N.call(this,k,L);async function N(ce,H){await I.call(this,ce.$schema);const W=this._addSchema(ce,H);return W.validate||q.call(this,W)}async function I(ce){ce&&!this.getSchema(ce)&&await N.call(this,{$ref:ce},!0)}async function q(ce){try{return this._compileSchemaEnv(ce)}catch(H){if(!(H instanceof i.default))throw H;return Z.call(this,H),await ne.call(this,H.missingSchema),q.call(this,ce)}}function Z({missingSchema:ce,missingRef:H}){if(this.refs[ce])throw new Error(`AnySchema ${ce} is loaded but ${H} cannot be resolved`)}async function ne(ce){const H=await de.call(this,ce);this.refs[ce]||await I.call(this,H.$schema),this.refs[ce]||this.addSchema(H,ce,L)}async function de(ce){const H=this._loading[ce];if(H)return H;try{return await(this._loading[ce]=F(ce))}finally{delete this._loading[ce]}}}addSchema(k,L,F,N=this.opts.validateSchema){if(Array.isArray(k)){for(const q of k)this.addSchema(q,void 0,F,N);return this}let I;if(typeof k=="object"){const{schemaId:q}=this.opts;if(I=k[q],I!==void 0&&typeof I!="string")throw new Error(`schema ${q} must be string`)}return L=(0,l.normalizeId)(L||I),this._checkUnique(L),this.schemas[L]=this._addSchema(k,F,L,N,!0),this}addMetaSchema(k,L,F=this.opts.validateSchema){return this.addSchema(k,L,!0,F),this}validateSchema(k,L){if(typeof k=="boolean")return!0;let F;if(F=k.$schema,F!==void 0&&typeof F!="string")throw new Error("$schema must be a string");if(F=F||this.opts.defaultMeta||this.defaultMeta(),!F)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(F,k);if(!N&&L){const I="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(I);else throw new Error(I)}return N}getSchema(k){let L;for(;typeof(L=C.call(this,k))=="string";)k=L;if(L===void 0){const{schemaId:F}=this.opts,N=new s.SchemaEnv({schema:{},schemaId:F});if(L=s.resolveSchema.call(this,N,k),!L)return;this.refs[k]=L}return L.validate||this._compileSchemaEnv(L)}removeSchema(k){if(k instanceof RegExp)return this._removeAllSchemas(this.schemas,k),this._removeAllSchemas(this.refs,k),this;switch(typeof k){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=C.call(this,k);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[k],delete this.refs[k],this}case"object":{const L=k;this._cache.delete(L);let F=k[this.opts.schemaId];return F&&(F=(0,l.normalizeId)(F),delete this.schemas[F],delete this.refs[F]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(const L of k)this.addKeyword(L);return this}addKeyword(k,L){let F;if(typeof k=="string")F=k,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=F);else if(typeof k=="object"&&L===void 0){if(L=k,F=L.keyword,Array.isArray(F)&&!F.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,F,L),!L)return(0,u.eachItem)(F,I=>oe.call(this,I)),this;ye.call(this,L);const N={...L,type:(0,c.getJSONTypes)(L.type),schemaType:(0,c.getJSONTypes)(L.schemaType)};return(0,u.eachItem)(F,N.type.length===0?I=>oe.call(this,I,N):I=>N.type.forEach(q=>oe.call(this,I,N,q))),this}getKeyword(k){const L=this.RULES.all[k];return typeof L=="object"?L.definition:!!L}removeKeyword(k){const{RULES:L}=this;delete L.keywords[k],delete L.all[k];for(const F of L.rules){const N=F.rules.findIndex(I=>I.keyword===k);N>=0&&F.rules.splice(N,1)}return this}addFormat(k,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[k]=L,this}errorsText(k=this.errors,{separator:L=", ",dataVar:F="data"}={}){return!k||k.length===0?"No errors":k.map(N=>`${F}${N.instancePath} ${N.message}`).reduce((N,I)=>N+L+I)}$dataMetaSchema(k,L){const F=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(const N of L){const I=N.split("/").slice(1);let q=k;for(const Z of I)q=q[Z];for(const Z in F){const ne=F[Z];if(typeof ne!="object")continue;const{$data:de}=ne.definition,ce=q[Z];de&&ce&&(q[Z]=ue(ce))}}return k}_removeAllSchemas(k,L){for(const F in k){const N=k[F];(!L||L.test(F))&&(typeof N=="string"?delete k[F]:N&&!N.meta&&(this._cache.delete(N.schema),delete k[F]))}}_addSchema(k,L,F,N=this.opts.validateSchema,I=this.opts.addUsedSchema){let q;const{schemaId:Z}=this.opts;if(typeof k=="object")q=k[Z];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof k!="boolean")throw new Error("schema must be object or boolean")}let ne=this._cache.get(k);if(ne!==void 0)return ne;F=(0,l.normalizeId)(q||F);const de=l.getSchemaRefs.call(this,k,F);return ne=new s.SchemaEnv({schema:k,schemaId:Z,meta:L,baseId:F,localRefs:de}),this._cache.set(ne.schema,ne),I&&!F.startsWith("#")&&(F&&this._checkUnique(F),this.refs[F]=ne),N&&this.validateSchema(k,!0),ne}_checkUnique(k){if(this.schemas[k]||this.refs[k])throw new Error(`schema with key or id "${k}" already exists`)}_compileSchemaEnv(k){if(k.meta?this._compileMetaSchema(k):s.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){const L=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,k)}finally{this.opts=L}}}e.default=$,$.ValidationError=r.default,$.MissingRefError=i.default;function P(Q,k,L,F="error"){for(const N in Q){const I=N;I in k&&this.logger[F](`${L}: option ${N}. ${Q[I]}`)}}function C(Q){return Q=(0,l.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function T(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const k in Q)this.addSchema(Q[k],k)}function A(){for(const Q in this.opts.formats){const k=this.opts.formats[Q];k&&this.addFormat(Q,k)}}function D(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const k in Q){const L=Q[k];L.keyword||(L.keyword=k),this.addKeyword(L)}}function z(){const Q={...this.opts};for(const k of _)delete Q[k];return Q}const K={log(){},warn(){},error(){}};function B(Q){if(Q===!1)return K;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const te=/^[a-z_$][a-z0-9_$:-]*$/i;function J(Q,k){const{RULES:L}=this;if((0,u.eachItem)(Q,F=>{if(L.keywords[F])throw new Error(`Keyword ${F} is already defined`);if(!te.test(F))throw new Error(`Keyword ${F} has invalid name`)}),!!k&&k.$data&&!("code"in k||"validate"in k))throw new Error('$data keyword must have "code" or "validate" function')}function oe(Q,k,L){var F;const N=k==null?void 0:k.post;if(L&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:I}=this;let q=N?I.post:I.rules.find(({type:ne})=>ne===L);if(q||(q={type:L,rules:[]},I.rules.push(q)),I.keywords[Q]=!0,!k)return;const Z={keyword:Q,definition:{...k,type:(0,c.getJSONTypes)(k.type),schemaType:(0,c.getJSONTypes)(k.schemaType)}};k.before?fe.call(this,q,Z,k.before):q.rules.push(Z),I.all[Q]=Z,(F=k.implements)===null||F===void 0||F.forEach(ne=>this.addKeyword(ne))}function fe(Q,k,L){const F=Q.rules.findIndex(N=>N.keyword===L);F>=0?Q.rules.splice(F,0,k):(Q.rules.push(k),this.logger.warn(`rule ${L} is not defined`))}function ye(Q){let{metaSchema:k}=Q;k!==void 0&&(Q.$data&&this.opts.$data&&(k=ue(k)),Q.validateSchema=this.compile(k,!0))}const ae={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ue(Q){return{anyOf:[Q,ae]}}}(gR)),gR}var Ew={},Sw={},$w={},X7;function uDe(){if(X7)return $w;X7=1,Object.defineProperty($w,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return $w.default=e,$w}var Hl={},Q7;function Nk(){if(Q7)return Hl;Q7=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.callRef=Hl.getValidate=void 0;const e=B2(),t=Vs(),n=Vt(),r=Fs(),i=W2(),o=on(),s={keyword:"$ref",schemaType:"string",code(c){const{gen:u,schema:f,it:m}=c,{baseId:v,schemaEnv:_,validateName:y,opts:w,self:b}=m,{root:x}=_;if((f==="#"||f==="#/")&&v===x.baseId)return $();const S=i.resolveRef.call(b,x,v,f);if(S===void 0)throw new e.default(m.opts.uriResolver,v,f);if(S instanceof i.SchemaEnv)return P(S);return C(S);function $(){if(_===x)return l(c,y,_,_.$async);const T=u.scopeValue("root",{ref:x});return l(c,(0,n._)`${T}.validate`,x,x.$async)}function P(T){const A=a(c,T);l(c,A,T,T.$async)}function C(T){const A=u.scopeValue("schema",w.code.source===!0?{ref:T,code:(0,n.stringify)(T)}:{ref:T}),D=u.name("valid"),z=c.subschema({schema:T,dataTypes:[],schemaPath:n.nil,topSchemaRef:A,errSchemaPath:f},D);c.mergeEvaluated(z),c.ok(D)}}};function a(c,u){const{gen:f}=c;return u.validate?f.scopeValue("validate",{ref:u.validate}):(0,n._)`${f.scopeValue("wrapper",{ref:u})}.validate`}Hl.getValidate=a;function l(c,u,f,m){const{gen:v,it:_}=c,{allErrors:y,schemaEnv:w,opts:b}=_,x=b.passContext?r.default.this:n.nil;m?S():$();function S(){if(!w.$async)throw new Error("async schema referenced by sync schema");const T=v.let("valid");v.try(()=>{v.code((0,n._)`await ${(0,t.callValidateCode)(c,u,x)}`),C(u),y||v.assign(T,!0)},A=>{v.if((0,n._)`!(${A} instanceof ${_.ValidationError})`,()=>v.throw(A)),P(A),y||v.assign(T,!1)}),c.ok(T)}function $(){c.result((0,t.callValidateCode)(c,u,x),()=>C(u),()=>P(u))}function P(T){const A=(0,n._)`${T}.errors`;v.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${A} : ${r.default.vErrors}.concat(${A})`),v.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function C(T){var A;if(!_.opts.unevaluated)return;const D=(A=f==null?void 0:f.validate)===null||A===void 0?void 0:A.evaluated;if(_.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(_.props=o.mergeEvaluated.props(v,D.props,_.props));else{const z=v.var("props",(0,n._)`${T}.evaluated.props`);_.props=o.mergeEvaluated.props(v,z,_.props,n.Name)}if(_.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(_.items=o.mergeEvaluated.items(v,D.items,_.items));else{const z=v.var("items",(0,n._)`${T}.evaluated.items`);_.items=o.mergeEvaluated.items(v,z,_.items,n.Name)}}}return Hl.callRef=l,Hl.default=s,Hl}var J7;function $ee(){if(J7)return Sw;J7=1,Object.defineProperty(Sw,"__esModule",{value:!0});const e=uDe(),t=Nk(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Sw.default=n,Sw}var Cw={},Pw={},eV;function dDe(){if(eV)return Pw;eV=1,Object.defineProperty(Pw,"__esModule",{value:!0});const e=Vt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${n[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${n[o].okStr}, limit: ${s}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(o){const{keyword:s,data:a,schemaCode:l}=o;o.fail$data((0,e._)`${a} ${n[s].fail} ${l} || isNaN(${a})`)}};return Pw.default=i,Pw}var Rw={},tV;function fDe(){if(tV)return Rw;tV=1,Object.defineProperty(Rw,"__esModule",{value:!0});const e=Vt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:i,data:o,schemaCode:s,it:a}=r,l=a.opts.multipleOfPrecision,c=i.let("res"),u=l?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${l}`:(0,e._)`${c} !== parseInt(${c})`;r.fail$data((0,e._)`(${s} === 0 || (${c} = ${o}/${s}, ${u}))`)}};return Rw.default=n,Rw}var Tw={},Nw={},nV;function hDe(){if(nV)return Nw;nV=1,Object.defineProperty(Nw,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,i=0,o;for(;i<n;)r++,o=t.charCodeAt(i++),o>=55296&&o<=56319&&i<n&&(o=t.charCodeAt(i),(o&64512)===56320&&i++);return r}return Nw.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Nw}var rV;function pDe(){if(rV)return Tw;rV=1,Object.defineProperty(Tw,"__esModule",{value:!0});const e=Vt(),t=on(),n=hDe(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:l,it:c}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,f=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,n.default)}(${a})`;o.fail$data((0,e._)`${f} ${u} ${l}`)}};return Tw.default=i,Tw}var Aw={},iV;function mDe(){if(iV)return Aw;iV=1,Object.defineProperty(Aw,"__esModule",{value:!0});const e=Vs(),t=Vt(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:o,$data:s,schema:a,schemaCode:l,it:c}=i,u=c.opts.unicodeRegExp?"u":"",f=s?(0,t._)`(new RegExp(${l}, ${u}))`:(0,e.usePattern)(i,a);i.fail$data((0,t._)`!${f}.test(${o})`)}};return Aw.default=r,Aw}var jw={},oV;function gDe(){if(oV)return jw;oV=1,Object.defineProperty(jw,"__esModule",{value:!0});const e=Vt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const o=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:o,schemaCode:s}=r,a=i==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return jw.default=n,jw}var Ow={},sV;function vDe(){if(sV)return Ow;sV=1,Object.defineProperty(Ow,"__esModule",{value:!0});const e=Vs(),t=Vt(),n=on(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:l,data:c,$data:u,it:f}=o,{opts:m}=f;if(!u&&a.length===0)return;const v=a.length>=m.loopRequired;if(f.allErrors?_():y(),m.strictRequired){const x=o.parentSchema.properties,{definedProperties:S}=o.it;for(const $ of a)if((x==null?void 0:x[$])===void 0&&!S.has($)){const P=f.schemaEnv.baseId+f.errSchemaPath,C=`required property "${$}" is not defined at "${P}" (strictRequired)`;(0,n.checkStrictMode)(f,C,f.opts.strictRequired)}}function _(){if(v||u)o.block$data(t.nil,w);else for(const x of a)(0,e.checkReportMissingProp)(o,x)}function y(){const x=s.let("missing");if(v||u){const S=s.let("valid",!0);o.block$data(S,()=>b(x,S)),o.ok(S)}else s.if((0,e.checkMissingProp)(o,a,x)),(0,e.reportMissingProp)(o,x),s.else()}function w(){s.forOf("prop",l,x=>{o.setParams({missingProperty:x}),s.if((0,e.noPropertyInData)(s,c,x,m.ownProperties),()=>o.error())})}function b(x,S){o.setParams({missingProperty:x}),s.forOf(x,l,()=>{s.assign(S,(0,e.propertyInData)(s,c,x,m.ownProperties)),s.if((0,t.not)(S),()=>{o.error(),s.break()})},t.nil)}}};return Ow.default=i,Ow}var kw={},aV;function yDe(){if(aV)return kw;aV=1,Object.defineProperty(kw,"__esModule",{value:!0});const e=Vt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const o=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:o,schemaCode:s}=r,a=i==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return kw.default=n,kw}var Iw={},Mw={},lV;function Ak(){if(lV)return Mw;lV=1,Object.defineProperty(Mw,"__esModule",{value:!0});const e=B_();return e.code='require("ajv/dist/runtime/equal").default',Mw.default=e,Mw}var cV;function wDe(){if(cV)return Iw;cV=1,Object.defineProperty(Iw,"__esModule",{value:!0});const e=r_(),t=Vt(),n=on(),r=Ak(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:l,$data:c,schema:u,parentSchema:f,schemaCode:m,it:v}=s;if(!c&&!u)return;const _=a.let("valid"),y=f.items?(0,e.getSchemaTypes)(f.items):[];s.block$data(_,w,(0,t._)`${m} === false`),s.ok(_);function w(){const $=a.let("i",(0,t._)`${l}.length`),P=a.let("j");s.setParams({i:$,j:P}),a.assign(_,!0),a.if((0,t._)`${$} > 1`,()=>(b()?x:S)($,P))}function b(){return y.length>0&&!y.some($=>$==="object"||$==="array")}function x($,P){const C=a.name("item"),T=(0,e.checkDataTypes)(y,C,v.opts.strictNumbers,e.DataType.Wrong),A=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${$}--;`,()=>{a.let(C,(0,t._)`${l}[${$}]`),a.if(T,(0,t._)`continue`),y.length>1&&a.if((0,t._)`typeof ${C} == "string"`,(0,t._)`${C} += "_"`),a.if((0,t._)`typeof ${A}[${C}] == "number"`,()=>{a.assign(P,(0,t._)`${A}[${C}]`),s.error(),a.assign(_,!1).break()}).code((0,t._)`${A}[${C}] = ${$}`)})}function S($,P){const C=(0,n.useFunc)(a,r.default),T=a.name("outer");a.label(T).for((0,t._)`;${$}--;`,()=>a.for((0,t._)`${P} = ${$}; ${P}--;`,()=>a.if((0,t._)`${C}(${l}[${$}], ${l}[${P}])`,()=>{s.error(),a.assign(_,!1).break(T)})))}}};return Iw.default=o,Iw}var Dw={},uV;function bDe(){if(uV)return Dw;uV=1,Object.defineProperty(Dw,"__esModule",{value:!0});const e=Vt(),t=on(),n=Ak(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:l,schemaCode:c,schema:u}=o;l||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,n.default)}(${a}, ${c})`):o.fail((0,e._)`${u} !== ${a}`)}};return Dw.default=i,Dw}var Lw={},dV;function xDe(){if(dV)return Lw;dV=1,Object.defineProperty(Lw,"__esModule",{value:!0});const e=Vt(),t=on(),n=Ak(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:l,schema:c,schemaCode:u,it:f}=o;if(!l&&c.length===0)throw new Error("enum must have non-empty array");const m=c.length>=f.opts.loopEnum;let v;const _=()=>v??(v=(0,t.useFunc)(s,n.default));let y;if(m||l)y=s.let("valid"),o.block$data(y,w);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const x=s.const("vSchema",u);y=(0,e.or)(...c.map((S,$)=>b(x,$)))}o.pass(y);function w(){s.assign(y,!1),s.forOf("v",u,x=>s.if((0,e._)`${_()}(${a}, ${x})`,()=>s.assign(y,!0).break()))}function b(x,S){const $=c[S];return typeof $=="object"&&$!==null?(0,e._)`${_()}(${a}, ${x}[${S}])`:(0,e._)`${a} === ${$}`}}};return Lw.default=i,Lw}var fV;function Cee(){if(fV)return Cw;fV=1,Object.defineProperty(Cw,"__esModule",{value:!0});const e=dDe(),t=fDe(),n=pDe(),r=mDe(),i=gDe(),o=vDe(),s=yDe(),a=wDe(),l=bDe(),c=xDe(),u=[e.default,t.default,n.default,r.default,i.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return Cw.default=u,Cw}var Fw={},qf={},hV;function Pee(){if(hV)return qf;hV=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.validateAdditionalItems=void 0;const e=Vt(),t=on(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:l}=s;if(!Array.isArray(l)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,l)}};function i(o,s){const{gen:a,schema:l,data:c,keyword:u,it:f}=o;f.items=!0;const m=a.const("len",(0,e._)`${c}.length`);if(l===!1)o.setParams({len:s.length}),o.pass((0,e._)`${m} <= ${s.length}`);else if(typeof l=="object"&&!(0,t.alwaysValidSchema)(f,l)){const _=a.var("valid",(0,e._)`${m} <= ${s.length}`);a.if((0,e.not)(_),()=>v(_)),o.ok(_)}function v(_){a.forRange("i",s.length,m,y=>{o.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},_),f.allErrors||a.if((0,e.not)(_),()=>a.break())})}}return qf.validateAdditionalItems=i,qf.default=r,qf}var Vw={},Hf={},pV;function Ree(){if(pV)return Hf;pV=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.validateTuple=void 0;const e=Vt(),t=on(),n=Vs(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return i(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,n.validateArray)(o))}};function i(o,s,a=o.schema){const{gen:l,parentSchema:c,data:u,keyword:f,it:m}=o;y(c),m.opts.unevaluated&&a.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(l,a.length,m.items));const v=l.name("valid"),_=l.const("len",(0,e._)`${u}.length`);a.forEach((w,b)=>{(0,t.alwaysValidSchema)(m,w)||(l.if((0,e._)`${_} > ${b}`,()=>o.subschema({keyword:f,schemaProp:b,dataProp:b},v)),o.ok(v))});function y(w){const{opts:b,errSchemaPath:x}=m,S=a.length,$=S===w.minItems&&(S===w.maxItems||w[s]===!1);if(b.strictTuples&&!$){const P=`"${f}" is ${S}-tuple, but minItems or maxItems/${s} are not specified or different at path "${x}"`;(0,t.checkStrictMode)(m,P,b.strictTuples)}}}return Hf.validateTuple=i,Hf.default=r,Hf}var mV;function _De(){if(mV)return Vw;mV=1,Object.defineProperty(Vw,"__esModule",{value:!0});const e=Ree(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Vw.default=t,Vw}var zw={},gV;function EDe(){if(gV)return zw;gV=1,Object.defineProperty(zw,"__esModule",{value:!0});const e=Vt(),t=on(),n=Vs(),r=Pee(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:l,it:c}=s,{prefixItems:u}=l;c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&(u?(0,r.validateAdditionalItems)(s,u):s.ok((0,n.validateArray)(s)))}};return zw.default=o,zw}var Uw={},vV;function SDe(){if(vV)return Uw;vV=1,Object.defineProperty(Uw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:s,parentSchema:a,data:l,it:c}=i;let u,f;const{minContains:m,maxContains:v}=a;c.opts.next?(u=m===void 0?1:m,f=v):u=1;const _=o.const("len",(0,e._)`${l}.length`);if(i.setParams({min:u,max:f}),f===void 0&&u===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&u>f){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(c,s)){let S=(0,e._)`${_} >= ${u}`;f!==void 0&&(S=(0,e._)`${S} && ${_} <= ${f}`),i.pass(S);return}c.items=!0;const y=o.name("valid");f===void 0&&u===1?b(y,()=>o.if(y,()=>o.break())):u===0?(o.let(y,!0),f!==void 0&&o.if((0,e._)`${l}.length > 0`,w)):(o.let(y,!1),w()),i.result(y,()=>i.reset());function w(){const S=o.name("_valid"),$=o.let("count",0);b(S,()=>o.if(S,()=>x($)))}function b(S,$){o.forRange("i",0,_,P=>{i.subschema({keyword:"contains",dataProp:P,dataPropType:t.Type.Num,compositeRule:!0},S),$()})}function x(S){o.code((0,e._)`${S}++`),f===void 0?o.if((0,e._)`${S} >= ${u}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${S} > ${f}`,()=>o.assign(y,!1).break()),u===1?o.assign(y,!0):o.if((0,e._)`${S} >= ${u}`,()=>o.assign(y,!0)))}}};return Uw.default=r,Uw}var ER={},yV;function jk(){return yV||(yV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Vt(),n=on(),r=Vs();e.error={message:({params:{property:l,depsCount:c,deps:u}})=>{const f=c===1?"property":"properties";return(0,t.str)`must have ${f} ${u} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:u,missingProperty:f}})=>(0,t._)`{property: ${l},
2071
2071
  missingProperty: ${f},
2072
2072
  depsCount: ${c},
2073
- deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=o(l);s(l,c),a(l,u)}};function o({schema:l}){const c={},u={};for(const f in l){if(f==="__proto__")continue;const m=Array.isArray(l[f])?c:u;m[f]=l[f]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:f,it:m}=l;if(Object.keys(c).length===0)return;const v=u.let("missing");for(const _ in c){const y=c[_];if(y.length===0)continue;const w=(0,r.propertyInData)(u,f,_,m.opts.ownProperties);l.setParams({property:_,depsCount:y.length,deps:y.join(", ")}),m.allErrors?u.if(w,()=>{for(const b of y)(0,r.checkReportMissingProp)(l,b)}):(u.if((0,t._)`${w} && (${(0,r.checkMissingProp)(l,y,v)})`),(0,r.reportMissingProp)(l,v),u.else())}}e.validatePropertyDeps=s;function a(l,c=l.schema){const{gen:u,data:f,keyword:m,it:v}=l,_=u.name("valid");for(const y in c)(0,n.alwaysValidSchema)(v,c[y])||(u.if((0,r.propertyInData)(u,f,y,v.opts.ownProperties),()=>{const w=l.subschema({keyword:m,schemaProp:y},_);l.mergeValidEvaluated(w,_)},()=>u.var(_,!0)),l.ok(_))}e.validateSchemaDeps=a,e.default=i}(ER)),ER}var qw={},wV;function $De(){if(wV)return qw;wV=1,Object.defineProperty(qw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:s,data:a,it:l}=i;if((0,t.alwaysValidSchema)(l,s))return;const c=o.name("valid");o.forIn("key",a,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},c),o.if((0,e.not)(c),()=>{i.error(!0),l.allErrors||o.break()})}),i.ok(c)}};return qw.default=r,qw}var Hw={},bV;function Tee(){if(bV)return Hw;bV=1,Object.defineProperty(Hw,"__esModule",{value:!0});const e=Vs(),t=Vt(),n=Fs(),r=on(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:l,parentSchema:c,data:u,errsCount:f,it:m}=s;if(!f)throw new Error("ajv implementation error");const{allErrors:v,opts:_}=m;if(m.props=!0,_.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(m,l))return;const y=(0,e.allSchemaProperties)(c.properties),w=(0,e.allSchemaProperties)(c.patternProperties);b(),s.ok((0,t._)`${f} === ${n.default.errors}`);function b(){a.forIn("key",u,C=>{!y.length&&!w.length?$(C):a.if(x(C),()=>$(C))})}function x(C){let T;if(y.length>8){const A=(0,r.schemaRefOrVal)(m,c.properties,"properties");T=(0,e.isOwnProperty)(a,A,C)}else y.length?T=(0,t.or)(...y.map(A=>(0,t._)`${C} === ${A}`)):T=t.nil;return w.length&&(T=(0,t.or)(T,...w.map(A=>(0,t._)`${(0,e.usePattern)(s,A)}.test(${C})`))),(0,t.not)(T)}function S(C){a.code((0,t._)`delete ${u}[${C}]`)}function $(C){if(_.removeAdditional==="all"||_.removeAdditional&&l===!1){S(C);return}if(l===!1){s.setParams({additionalProperty:C}),s.error(),v||a.break();return}if(typeof l=="object"&&!(0,r.alwaysValidSchema)(m,l)){const T=a.name("valid");_.removeAdditional==="failing"?(P(C,T,!1),a.if((0,t.not)(T),()=>{s.reset(),S(C)})):(P(C,T),v||a.if((0,t.not)(T),()=>a.break()))}}function P(C,T,A){const D={keyword:"additionalProperties",dataProp:C,dataPropType:r.Type.Str};A===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(D,T)}}};return Hw.default=o,Hw}var Bw={},xV;function CDe(){if(xV)return Bw;xV=1,Object.defineProperty(Bw,"__esModule",{value:!0});const e=$v(),t=Vs(),n=on(),r=Tee(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:l,data:c,it:u}=o;u.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(u,r.default,"additionalProperties"));const f=(0,t.allSchemaProperties)(a);for(const w of f)u.definedProperties.add(w);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=n.mergeEvaluated.props(s,(0,n.toHash)(f),u.props));const m=f.filter(w=>!(0,n.alwaysValidSchema)(u,a[w]));if(m.length===0)return;const v=s.name("valid");for(const w of m)_(w)?y(w):(s.if((0,t.propertyInData)(s,c,w,u.opts.ownProperties)),y(w),u.allErrors||s.else().var(v,!0),s.endIf()),o.it.definedProperties.add(w),o.ok(v);function _(w){return u.opts.useDefaults&&!u.compositeRule&&a[w].default!==void 0}function y(w){o.subschema({keyword:"properties",schemaProp:w,dataProp:w},v)}}};return Bw.default=i,Bw}var Ww={},_V;function PDe(){if(_V)return Ww;_V=1,Object.defineProperty(Ww,"__esModule",{value:!0});const e=Vs(),t=Vt(),n=on(),r=on(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:l,parentSchema:c,it:u}=o,{opts:f}=u,m=(0,e.allSchemaProperties)(a),v=m.filter($=>(0,n.alwaysValidSchema)(u,a[$]));if(m.length===0||v.length===m.length&&(!u.opts.unevaluated||u.props===!0))return;const _=f.strictSchema&&!f.allowMatchingProperties&&c.properties,y=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,r.evaluatedPropsToName)(s,u.props));const{props:w}=u;b();function b(){for(const $ of m)_&&x($),u.allErrors?S($):(s.var(y,!0),S($),s.if(y))}function x($){for(const P in _)new RegExp($).test(P)&&(0,n.checkStrictMode)(u,`property ${P} matches pattern ${$} (use allowMatchingProperties)`)}function S($){s.forIn("key",l,P=>{s.if((0,t._)`${(0,e.usePattern)(o,$)}.test(${P})`,()=>{const C=v.includes($);C||o.subschema({keyword:"patternProperties",schemaProp:$,dataProp:P,dataPropType:r.Type.Str},y),u.opts.unevaluated&&w!==!0?s.assign((0,t._)`${w}[${P}]`,!0):!C&&!u.allErrors&&s.if((0,t.not)(y),()=>s.break())})})}}};return Ww.default=i,Ww}var Gw={},EV;function RDe(){if(EV)return Gw;EV=1,Object.defineProperty(Gw,"__esModule",{value:!0});const e=on(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:o}=n;if((0,e.alwaysValidSchema)(o,i)){n.fail();return}const s=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),n.failResult(s,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Gw.default=t,Gw}var Kw={},SV;function TDe(){if(SV)return Kw;SV=1,Object.defineProperty(Kw,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Vs().validateUnion,error:{message:"must match a schema in anyOf"}};return Kw.default=t,Kw}var Zw={},$V;function NDe(){if($V)return Zw;$V=1,Object.defineProperty(Zw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:s,parentSchema:a,it:l}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(l.opts.discriminator&&a.discriminator)return;const c=s,u=o.let("valid",!1),f=o.let("passing",null),m=o.name("_valid");i.setParams({passing:f}),o.block(v),i.result(u,()=>i.reset(),()=>i.error(!0));function v(){c.forEach((_,y)=>{let w;(0,t.alwaysValidSchema)(l,_)?o.var(m,!0):w=i.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},m),y>0&&o.if((0,e._)`${m} && ${u}`).assign(u,!1).assign(f,(0,e._)`[${f}, ${y}]`).else(),o.if(m,()=>{o.assign(u,!0),o.assign(f,y),w&&i.mergeEvaluated(w,e.Name)})})}}};return Zw.default=r,Zw}var Yw={},CV;function ADe(){if(CV)return Yw;CV=1,Object.defineProperty(Yw,"__esModule",{value:!0});const e=on(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:o}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=r.name("valid");i.forEach((a,l)=>{if((0,e.alwaysValidSchema)(o,a))return;const c=n.subschema({keyword:"allOf",schemaProp:l},s);n.ok(s),n.mergeEvaluated(c)})}};return Yw.default=t,Yw}var Xw={},PV;function jDe(){if(PV)return Xw;PV=1,Object.defineProperty(Xw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:l}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const c=i(l,"then"),u=i(l,"else");if(!c&&!u)return;const f=s.let("valid",!0),m=s.name("_valid");if(v(),o.reset(),c&&u){const y=s.let("ifClause");o.setParams({ifClause:y}),s.if(m,_("then",y),_("else",y))}else c?s.if(m,_("then")):s.if((0,e.not)(m),_("else"));o.pass(f,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);o.mergeEvaluated(y)}function _(y,w){return()=>{const b=o.subschema({keyword:y},m);s.assign(f,m),o.mergeValidEvaluated(b,f),w?s.assign(w,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function i(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Xw.default=r,Xw}var Qw={},RV;function ODe(){if(RV)return Qw;RV=1,Object.defineProperty(Qw,"__esModule",{value:!0});const e=on(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return Qw.default=t,Qw}var TV;function Nee(){if(TV)return Fw;TV=1,Object.defineProperty(Fw,"__esModule",{value:!0});const e=Pee(),t=_De(),n=Ree(),r=EDe(),i=SDe(),o=jk(),s=$De(),a=Tee(),l=CDe(),c=PDe(),u=RDe(),f=TDe(),m=NDe(),v=ADe(),_=jDe(),y=ODe();function w(b=!1){const x=[u.default,f.default,m.default,v.default,_.default,y.default,s.default,a.default,o.default,l.default,c.default];return b?x.push(t.default,r.default):x.push(e.default,n.default),x.push(i.default),x}return Fw.default=w,Fw}var Jw={},eb={},NV;function kDe(){if(NV)return eb;NV=1,Object.defineProperty(eb,"__esModule",{value:!0});const e=Vt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,i){const{gen:o,data:s,$data:a,schema:l,schemaCode:c,it:u}=r,{opts:f,errSchemaPath:m,schemaEnv:v,self:_}=u;if(!f.validateFormats)return;a?y():w();function y(){const b=o.scopeValue("formats",{ref:_.formats,code:f.code.formats}),x=o.const("fDef",(0,e._)`${b}[${c}]`),S=o.let("fType"),$=o.let("format");o.if((0,e._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>o.assign(S,(0,e._)`${x}.type || "string"`).assign($,(0,e._)`${x}.validate`),()=>o.assign(S,(0,e._)`"string"`).assign($,x)),r.fail$data((0,e.or)(P(),C()));function P(){return f.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function C(){const T=v.$async?(0,e._)`(${x}.async ? await ${$}(${s}) : ${$}(${s}))`:(0,e._)`${$}(${s})`,A=(0,e._)`(typeof ${$} == "function" ? ${T} : ${$}.test(${s}))`;return(0,e._)`${$} && ${$} !== true && ${S} === ${i} && !${A}`}}function w(){const b=_.formats[l];if(!b){P();return}if(b===!0)return;const[x,S,$]=C(b);x===i&&r.pass(T());function P(){if(f.strictSchema===!1){_.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${l}" ignored in schema at path "${m}"`}}function C(A){const D=A instanceof RegExp?(0,e.regexpCode)(A):f.code.formats?(0,e._)`${f.code.formats}${(0,e.getProperty)(l)}`:void 0,z=o.scopeValue("formats",{key:l,ref:A,code:D});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,e._)`${z}.validate`]:["string",A,z]}function T(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${s})`}return typeof S=="function"?(0,e._)`${$}(${s})`:(0,e._)`${$}.test(${s})`}}}};return eb.default=n,eb}var AV;function Aee(){if(AV)return Jw;AV=1,Object.defineProperty(Jw,"__esModule",{value:!0});const t=[kDe().default];return Jw.default=t,Jw}var Vu={},jV;function jee(){return jV||(jV=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.contentVocabulary=Vu.metadataVocabulary=void 0,Vu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vu}var OV;function IDe(){if(OV)return Ew;OV=1,Object.defineProperty(Ew,"__esModule",{value:!0});const e=$ee(),t=Cee(),n=Nee(),r=Aee(),i=jee(),o=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return Ew.default=o,Ew}var tb={},SR={},kV;function MDe(){return kV||(kV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))}(SR)),SR}var IV;function Oee(){if(IV)return tb;IV=1,Object.defineProperty(tb,"__esModule",{value:!0});const e=Vt(),t=MDe(),n=W2(),r=on(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:a}})=>s===t.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:s,tag:a,tagName:l}})=>(0,e._)`{error: ${s}, tag: ${l}, tagValue: ${a}}`},code(s){const{gen:a,data:l,schema:c,parentSchema:u,it:f}=s,{oneOf:m}=u;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const v=c.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const _=a.let("valid",!1),y=a.const("tag",(0,e._)`${l}${(0,e.getProperty)(v)}`);a.if((0,e._)`typeof ${y} == "string"`,()=>w(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:y,tagName:v})),s.ok(_);function w(){const S=x();a.if(!1);for(const $ in S)a.elseIf((0,e._)`${y} === ${$}`),a.assign(_,b(S[$]));a.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:y,tagName:v}),a.endIf()}function b(S){const $=a.name("valid"),P=s.subschema({keyword:"oneOf",schemaProp:S},$);return s.mergeEvaluated(P,e.Name),$}function x(){var S;const $={},P=T(u);let C=!0;for(let z=0;z<m.length;z++){let K=m[z];K!=null&&K.$ref&&!(0,r.schemaHasRulesButRef)(K,f.self.RULES)&&(K=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,K==null?void 0:K.$ref),K instanceof n.SchemaEnv&&(K=K.schema));const B=(S=K==null?void 0:K.properties)===null||S===void 0?void 0:S[v];if(typeof B!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);C=C&&(P||T(K)),A(B,z)}if(!C)throw new Error(`discriminator: "${v}" must be required`);return $;function T({required:z}){return Array.isArray(z)&&z.includes(v)}function A(z,K){if(z.const)D(z.const,K);else if(z.enum)for(const B of z.enum)D(B,K);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function D(z,K){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${v}" values must be unique strings`);$[z]=K}}}};return tb.default=o,tb}const DDe="http://json-schema.org/draft-07/schema#",LDe="http://json-schema.org/draft-07/schema#",FDe="Core schema meta-schema",VDe={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:[]}},zDe=["object","boolean"],UDe={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},qDe={$schema:DDe,$id:LDe,title:FDe,definitions:VDe,type:zDe,properties:UDe,default:!0};var MV;function HDe(){return MV||(MV=1,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=void 0;const n=See(),r=IDe(),i=Oee(),o=qDe,s=["/properties"],a="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(_,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=$v();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=Vt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=H2();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var m=B2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(yw,yw.exports)),yw.exports}var DV;function BDe(){return DV||(DV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=HDe(),n=Vt(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(a){const{gen:l,data:c,schemaCode:u,keyword:f,it:m}=a,{opts:v,self:_}=m;if(!v.validateFormats)return;const y=new t.KeywordCxt(m,_.RULES.all.format.definition,"format");y.$data?w():b();function w(){const S=l.scopeValue("formats",{ref:_.formats,code:v.code.formats}),$=l.const("fmt",n._`${S}[${y.schemaCode}]`);a.fail$data(n.or(n._`typeof ${$} != "object"`,n._`${$} instanceof RegExp`,n._`typeof ${$}.compare != "function"`,x($)))}function b(){const S=y.schema,$=_.formats[S];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${f}": format "${S}" does not define "compare" function`);const P=l.scopeValue("formats",{key:S,ref:$,code:v.code.formats?n._`${v.code.formats}${n.getProperty(S)}`:void 0});a.fail$data(x(P))}function x(S){return n._`${S}.compare(${c}, ${u}) ${i[f].fail} 0`}},dependencies:["format"]};const s=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=s}(mR)),mR}var LV;function WDe(){return LV||(LV=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Z3e(),r=BDe(),i=Vt(),o=new i.Name("fullFormats"),s=new i.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return l(c,u,n.fullFormats,o),c;const[f,m]=u.mode==="fast"?[n.fastFormats,s]:[n.fullFormats,o],v=u.formats||n.formatNames;return l(c,v,f,m),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const m=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!m)throw new Error(`Unknown format "${c}"`);return m};function l(c,u,f,m){var v,_;(v=(_=c.opts.code).formats)!==null&&v!==void 0||(_.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const y of u)c.addFormat(y,f[y])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(vw,vw.exports)),vw.exports}var nb={exports:{}},rb={},ib={},Bf={},FV;function kee(){if(FV)return Bf;FV=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.dynamicAnchor=void 0;const e=Vt(),t=Fs(),n=W2(),r=Nk(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>o(a,a.schema)};function o(a,l){const{gen:c,it:u}=a;u.schemaEnv.root.dynamicAnchors[l]=!0;const f=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`,m=u.errSchemaPath==="#"?u.validateName:s(a);c.if((0,e._)`!${f}`,()=>c.assign(f,m))}Bf.dynamicAnchor=o;function s(a){const{schemaEnv:l,schema:c,self:u}=a.it,{root:f,baseId:m,localRefs:v,meta:_}=l.root,{schemaId:y}=u.opts,w=new n.SchemaEnv({schema:c,schemaId:y,root:f,baseId:m,localRefs:v,meta:_});return n.compileSchema.call(u,w),(0,r.getValidate)(a,w)}return Bf.default=i,Bf}var Wf={},VV;function Iee(){if(VV)return Wf;VV=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.dynamicRef=void 0;const e=Vt(),t=Fs(),n=Nk(),r={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,s){const{gen:a,keyword:l,it:c}=o;if(s[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);const u=s.slice(1);if(c.allErrors)f();else{const v=a.let("valid",!1);f(v),o.ok(v)}function f(v){if(c.schemaEnv.root.dynamicAnchors[u]){const _=a.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);a.if(_,m(_,v),m(c.validateName,v))}else m(c.validateName,v)()}function m(v,_){return _?()=>a.block(()=>{(0,n.callRef)(o,v),a.let(_,!0)}):()=>(0,n.callRef)(o,v)}}return Wf.dynamicRef=i,Wf.default=r,Wf}var ob={},zV;function GDe(){if(zV)return ob;zV=1,Object.defineProperty(ob,"__esModule",{value:!0});const e=kee(),t=on(),n={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return ob.default=n,ob}var sb={},UV;function KDe(){if(UV)return sb;UV=1,Object.defineProperty(sb,"__esModule",{value:!0});const e=Iee(),t={keyword:"$recursiveRef",schemaType:"string",code:n=>(0,e.dynamicRef)(n,n.schema)};return sb.default=t,sb}var qV;function ZDe(){if(qV)return ib;qV=1,Object.defineProperty(ib,"__esModule",{value:!0});const e=kee(),t=Iee(),n=GDe(),r=KDe(),i=[e.default,t.default,n.default,r.default];return ib.default=i,ib}var ab={},lb={},HV;function YDe(){if(HV)return lb;HV=1,Object.defineProperty(lb,"__esModule",{value:!0});const e=jk(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:n=>(0,e.validatePropertyDeps)(n)};return lb.default=t,lb}var cb={},BV;function XDe(){if(BV)return cb;BV=1,Object.defineProperty(cb,"__esModule",{value:!0});const e=jk(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:n=>(0,e.validateSchemaDeps)(n)};return cb.default=t,cb}var ub={},WV;function QDe(){if(WV)return ub;WV=1,Object.defineProperty(ub,"__esModule",{value:!0});const e=on(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:n,parentSchema:r,it:i}){r.contains===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "contains" is ignored`)}};return ub.default=t,ub}var GV;function JDe(){if(GV)return ab;GV=1,Object.defineProperty(ab,"__esModule",{value:!0});const e=YDe(),t=XDe(),n=QDe(),r=[e.default,t.default,n.default];return ab.default=r,ab}var db={},fb={},KV;function e5e(){if(KV)return fb;KV=1,Object.defineProperty(fb,"__esModule",{value:!0});const e=Vt(),t=on(),n=Fs(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:s,schema:a,data:l,errsCount:c,it:u}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:f,props:m}=u;m instanceof e.Name?s.if((0,e._)`${m} !== true`,()=>s.forIn("key",l,w=>s.if(_(m,w),()=>v(w)))):m!==!0&&s.forIn("key",l,w=>m===void 0?v(w):s.if(y(m,w),()=>v(w))),u.props=!0,o.ok((0,e._)`${c} === ${n.default.errors}`);function v(w){if(a===!1){o.setParams({unevaluatedProperty:w}),o.error(),f||s.break();return}if(!(0,t.alwaysValidSchema)(u,a)){const b=s.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:w,dataPropType:t.Type.Str},b),f||s.if((0,e.not)(b),()=>s.break())}}function _(w,b){return(0,e._)`!${w} || !${w}[${b}]`}function y(w,b){const x=[];for(const S in w)w[S]===!0&&x.push((0,e._)`${b} !== ${S}`);return(0,e.and)(...x)}}};return fb.default=i,fb}var hb={},ZV;function t5e(){if(ZV)return hb;ZV=1,Object.defineProperty(hb,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:o,schema:s,data:a,it:l}=i,c=l.items||0;if(c===!0)return;const u=o.const("len",(0,e._)`${a}.length`);if(s===!1)i.setParams({len:c}),i.fail((0,e._)`${u} > ${c}`);else if(typeof s=="object"&&!(0,t.alwaysValidSchema)(l,s)){const m=o.var("valid",(0,e._)`${u} <= ${c}`);o.if((0,e.not)(m),()=>f(m,c)),i.ok(m)}l.items=!0;function f(m,v){o.forRange("i",v,u,_=>{i.subschema({keyword:"unevaluatedItems",dataProp:_,dataPropType:t.Type.Num},m),l.allErrors||o.if((0,e.not)(m),()=>o.break())})}}};return hb.default=r,hb}var YV;function n5e(){if(YV)return db;YV=1,Object.defineProperty(db,"__esModule",{value:!0});const e=e5e(),t=t5e(),n=[e.default,t.default];return db.default=n,db}var XV;function r5e(){if(XV)return rb;XV=1,Object.defineProperty(rb,"__esModule",{value:!0});const e=$ee(),t=Cee(),n=Nee(),r=ZDe(),i=JDe(),o=n5e(),s=Aee(),a=jee(),l=[r.default,e.default,t.default,(0,n.default)(!0),s.default,a.metadataVocabulary,a.contentVocabulary,i.default,o.default];return rb.default=l,rb}var pb={};const i5e="https://json-schema.org/draft/2020-12/schema",o5e="https://json-schema.org/draft/2020-12/schema",s5e={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},a5e="meta",l5e="Core and Validation specifications meta-schema",c5e=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],u5e=["object","boolean"],d5e="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",f5e={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},h5e={$schema:i5e,$id:o5e,$vocabulary:s5e,$dynamicAnchor:a5e,title:l5e,allOf:c5e,type:u5e,$comment:d5e,properties:f5e},p5e="https://json-schema.org/draft/2020-12/schema",m5e="https://json-schema.org/draft/2020-12/meta/applicator",g5e={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},v5e="meta",y5e="Applicator vocabulary meta-schema",w5e=["object","boolean"],b5e={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},x5e={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},_5e={$schema:p5e,$id:m5e,$vocabulary:g5e,$dynamicAnchor:v5e,title:y5e,type:w5e,properties:b5e,$defs:x5e},E5e="https://json-schema.org/draft/2020-12/schema",S5e="https://json-schema.org/draft/2020-12/meta/unevaluated",$5e={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},C5e="meta",P5e="Unevaluated applicator vocabulary meta-schema",R5e=["object","boolean"],T5e={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},N5e={$schema:E5e,$id:S5e,$vocabulary:$5e,$dynamicAnchor:C5e,title:P5e,type:R5e,properties:T5e},A5e="https://json-schema.org/draft/2020-12/schema",j5e="https://json-schema.org/draft/2020-12/meta/content",O5e={"https://json-schema.org/draft/2020-12/vocab/content":!0},k5e="meta",I5e="Content vocabulary meta-schema",M5e=["object","boolean"],D5e={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},L5e={$schema:A5e,$id:j5e,$vocabulary:O5e,$dynamicAnchor:k5e,title:I5e,type:M5e,properties:D5e},F5e="https://json-schema.org/draft/2020-12/schema",V5e="https://json-schema.org/draft/2020-12/meta/core",z5e={"https://json-schema.org/draft/2020-12/vocab/core":!0},U5e="meta",q5e="Core vocabulary meta-schema",H5e=["object","boolean"],B5e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},W5e={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},G5e={$schema:F5e,$id:V5e,$vocabulary:z5e,$dynamicAnchor:U5e,title:q5e,type:H5e,properties:B5e,$defs:W5e},K5e="https://json-schema.org/draft/2020-12/schema",Z5e="https://json-schema.org/draft/2020-12/meta/format-annotation",Y5e={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},X5e="meta",Q5e="Format vocabulary meta-schema for annotation results",J5e=["object","boolean"],eLe={format:{type:"string"}},tLe={$schema:K5e,$id:Z5e,$vocabulary:Y5e,$dynamicAnchor:X5e,title:Q5e,type:J5e,properties:eLe},nLe="https://json-schema.org/draft/2020-12/schema",rLe="https://json-schema.org/draft/2020-12/meta/meta-data",iLe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},oLe="meta",sLe="Meta-data vocabulary meta-schema",aLe=["object","boolean"],lLe={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}},cLe={$schema:nLe,$id:rLe,$vocabulary:iLe,$dynamicAnchor:oLe,title:sLe,type:aLe,properties:lLe},uLe="https://json-schema.org/draft/2020-12/schema",dLe="https://json-schema.org/draft/2020-12/meta/validation",fLe={"https://json-schema.org/draft/2020-12/vocab/validation":!0},hLe="meta",pLe="Validation vocabulary meta-schema",mLe=["object","boolean"],gLe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},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"}}},vLe={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:[]}},yLe={$schema:uLe,$id:dLe,$vocabulary:fLe,$dynamicAnchor:hLe,title:pLe,type:mLe,properties:gLe,$defs:vLe};var QV;function wLe(){if(QV)return pb;QV=1,Object.defineProperty(pb,"__esModule",{value:!0});const e=h5e,t=_5e,n=N5e,r=L5e,i=G5e,o=tLe,s=cLe,a=yLe,l=["/properties"];function c(u){return[e,t,n,r,i,f(this,o),s,f(this,a)].forEach(m=>this.addMetaSchema(m,void 0,!1)),this;function f(m,v){return u?m.$dataMetaSchema(v,l):v}}return pb.default=c,pb}var JV;function bLe(){return JV||(JV=1,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=void 0;const n=See(),r=r5e(),i=Oee(),o=wLe(),s="https://json-schema.org/draft/2020-12/schema";class a extends n.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:_}=this.opts;_&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=$v();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Vt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var u=H2();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=B2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(nb,nb.exports)),nb.exports}var ez;function xLe(){var i;if(ez)return Du;ez=1;var e=Du&&Du.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Du,"__esModule",{value:!0}),Du.JsonValidator=void 0;const t=e(WDe()),n=e(bLe()),o=class o{constructor(){et(this,"ajv");this.ajv=new n.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,t.default)(this.ajv,{mode:"fast"})}static get instance(){return G(o,i)}addSchema(a,l){this.ajv.addSchema(a,l)}compile(a){const l=this.ajv.compile(a);return u=>({isValid:l(u),errors:this.toSimpleErrors(l.errors,u),warnings:[]})}toSimpleErrors(a,l){const c=[];return a==null||a.forEach(u=>{u.keyword==="enum"&&u.params.allowedValues&&Array.isArray(u.params.allowedValues)&&(u.message+=`; ${u.params.allowedValues.join(", ")}`),u.instancePath&&(u.instancePath=u.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let f={details:{}};const m=u.instancePath.split("/");if(m.length>2){const _=m[1],y=m[2]?parseInt(m[2]):0,w=m[3],b=isNaN(y)?void 0:l[_][y][w];f={details:{property:_,index:y,field:w,fieldValue:b}}}if(u.keyword==="required"&&u.params.missingProperty&&u.instancePath&&(u.message=`A 'path' is missing required property '${u.params.missingProperty}'`),u.keyword==="additionalProperties"&&u.params.additionalProperty&&u.instancePath&&(u.message=`A 'path' should NOT include property '${u.params.additionalProperty}'`),u.keyword==="type"&&u.params.type&&u.instancePath){const _=u.instancePath.split("/"),y=_[_.length-1];u.message=`Value of property '${y}' must be '${u.params.type}'`}const v=Object.assign(u,f);c.push(v)}),c}};i=new WeakMap,Je(o,i,new o);let r=o;return Du.JsonValidator=r,Du}var $R,tz;function _Le(){var kt,ct,Bt,ht,Jt,Kt,Xt,en,Pn,sn,Le,Or,Mee,XN,_0,zb,Uo,QN,Dee,Ub,Lee,Fee,qb,Jf,Gu,Vee,zee,Uee,qee,Xs,Hee,tt,se,ee,le,we,be,ke,ze;if(tz)return $R;tz=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(X,me)=>{for(var Ee in me)e(X,Ee,{get:me[Ee],enumerable:!0})},o=(X,me,Ee,Pe)=>{if(me&&typeof me=="object"||typeof me=="function")for(let Ve of n(me))!r.call(X,Ve)&&Ve!==Ee&&e(X,Ve,{get:()=>me[Ve],enumerable:!(Pe=t(me,Ve))||Pe.enumerable});return X},s=X=>o(e({},"__esModule",{value:!0}),X),a={};i(a,{URLPattern:()=>Et}),$R=s(a);var l=class{constructor(X,me,Ee,Pe,Ve,st){et(this,"type",3);et(this,"name","");et(this,"prefix","");et(this,"value","");et(this,"suffix","");et(this,"modifier",3);this.type=X,this.name=me,this.prefix=Ee,this.value=Pe,this.suffix=Ve,this.modifier=st}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},c=/[$_\p{ID_Start}]/u,u=/[$_\u200C\u200D\p{ID_Continue}]/u,f=".*";function m(X,me){return/^[\x00-\x7F]*$/.test(X)}function v(X,me=!1){let Ee=[],Pe=0;for(;Pe<X.length;){let Ve=X[Pe],st=function(Ue){if(!me)throw new TypeError(Ue);Ee.push({type:"INVALID_CHAR",index:Pe,value:X[Pe++]})};if(Ve==="*"){Ee.push({type:"ASTERISK",index:Pe,value:X[Pe++]});continue}if(Ve==="+"||Ve==="?"){Ee.push({type:"OTHER_MODIFIER",index:Pe,value:X[Pe++]});continue}if(Ve==="\\"){Ee.push({type:"ESCAPED_CHAR",index:Pe++,value:X[Pe++]});continue}if(Ve==="{"){Ee.push({type:"OPEN",index:Pe,value:X[Pe++]});continue}if(Ve==="}"){Ee.push({type:"CLOSE",index:Pe,value:X[Pe++]});continue}if(Ve===":"){let Ue="",Ne=Pe+1;for(;Ne<X.length;){let Ke=X.substr(Ne,1);if(Ne===Pe+1&&c.test(Ke)||Ne!==Pe+1&&u.test(Ke)){Ue+=X[Ne++];continue}break}if(!Ue){st(`Missing parameter name at ${Pe}`);continue}Ee.push({type:"NAME",index:Pe,value:Ue}),Pe=Ne;continue}if(Ve==="("){let Ue=1,Ne="",Ke=Pe+1,at=!1;if(X[Ke]==="?"){st(`Pattern cannot start with "?" at ${Ke}`);continue}for(;Ke<X.length;){if(!m(X[Ke])){st(`Invalid character '${X[Ke]}' at ${Ke}.`),at=!0;break}if(X[Ke]==="\\"){Ne+=X[Ke++]+X[Ke++];continue}if(X[Ke]===")"){if(Ue--,Ue===0){Ke++;break}}else if(X[Ke]==="("&&(Ue++,X[Ke+1]!=="?")){st(`Capturing groups are not allowed at ${Ke}`),at=!0;break}Ne+=X[Ke++]}if(at)continue;if(Ue){st(`Unbalanced pattern at ${Pe}`);continue}if(!Ne){st(`Missing pattern at ${Pe}`);continue}Ee.push({type:"REGEX",index:Pe,value:Ne}),Pe=Ke;continue}Ee.push({type:"CHAR",index:Pe,value:X[Pe++]})}return Ee.push({type:"END",index:Pe,value:""}),Ee}function _(X,me={}){let Ee=v(X);me.delimiter??(me.delimiter="/#?"),me.prefixes??(me.prefixes="./");let Pe=`[^${y(me.delimiter)}]+?`,Ve=[],st=0,Ue=0,Ne=new Set,Ke=pt=>{if(Ue<Ee.length&&Ee[Ue].type===pt)return Ee[Ue++].value},at=()=>Ke("OTHER_MODIFIER")??Ke("ASTERISK"),Tt=pt=>{let wn=Ke(pt);if(wn!==void 0)return wn;let{type:pn,index:_i}=Ee[Ue];throw new TypeError(`Unexpected ${pn} at ${_i}, expected ${pt}`)},hn=()=>{let pt="",wn;for(;wn=Ke("CHAR")??Ke("ESCAPED_CHAR");)pt+=wn;return pt},jn=pt=>pt,pr=me.encodePart||jn,Nt="",tn=pt=>{Nt+=pt},dn=()=>{Nt.length&&(Ve.push(new l(3,"","",pr(Nt),"",3)),Nt="")},kn=(pt,wn,pn,_i,Jr)=>{let br=3;switch(Jr){case"?":br=1;break;case"*":br=0;break;case"+":br=2;break}if(!wn&&!pn&&br===3){tn(pt);return}if(dn(),!wn&&!pn){if(!pt)return;Ve.push(new l(3,"","",pr(pt),"",br));return}let In;pn?pn==="*"?In=f:In=pn:In=Pe;let Ei=2;In===Pe?(Ei=1,In=""):In===f&&(Ei=0,In="");let Tr;if(wn?Tr=wn:pn&&(Tr=st++),Ne.has(Tr))throw new TypeError(`Duplicate name '${Tr}'.`);Ne.add(Tr),Ve.push(new l(Ei,Tr,pr(pt),In,pr(_i),br))};for(;Ue<Ee.length;){let pt=Ke("CHAR"),wn=Ke("NAME"),pn=Ke("REGEX");if(!wn&&!pn&&(pn=Ke("ASTERISK")),wn||pn){let Jr=pt??"";me.prefixes.indexOf(Jr)===-1&&(tn(Jr),Jr=""),dn();let br=at();kn(Jr,wn,pn,"",br);continue}let _i=pt??Ke("ESCAPED_CHAR");if(_i){tn(_i);continue}if(Ke("OPEN")){let Jr=hn(),br=Ke("NAME"),In=Ke("REGEX");!br&&!In&&(In=Ke("ASTERISK"));let Ei=hn();Tt("CLOSE");let Tr=at();kn(Jr,br,In,Ei,Tr);continue}dn(),Tt("END")}return Ve}function y(X){return X.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function w(X){return X&&X.ignoreCase?"ui":"u"}function b(X,me,Ee){return S(_(X,Ee),me,Ee)}function x(X){switch(X){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function S(X,me,Ee={}){Ee.delimiter??(Ee.delimiter="/#?"),Ee.prefixes??(Ee.prefixes="./"),Ee.sensitive??(Ee.sensitive=!1),Ee.strict??(Ee.strict=!1),Ee.end??(Ee.end=!0),Ee.start??(Ee.start=!0),Ee.endsWith="";let Pe=Ee.start?"^":"";for(let Ne of X){if(Ne.type===3){Ne.modifier===3?Pe+=y(Ne.value):Pe+=`(?:${y(Ne.value)})${x(Ne.modifier)}`;continue}me&&me.push(Ne.name);let Ke=`[^${y(Ee.delimiter)}]+?`,at=Ne.value;if(Ne.type===1?at=Ke:Ne.type===0&&(at=f),!Ne.prefix.length&&!Ne.suffix.length){Ne.modifier===3||Ne.modifier===1?Pe+=`(${at})${x(Ne.modifier)}`:Pe+=`((?:${at})${x(Ne.modifier)})`;continue}if(Ne.modifier===3||Ne.modifier===1){Pe+=`(?:${y(Ne.prefix)}(${at})${y(Ne.suffix)})`,Pe+=x(Ne.modifier);continue}Pe+=`(?:${y(Ne.prefix)}`,Pe+=`((?:${at})(?:`,Pe+=y(Ne.suffix),Pe+=y(Ne.prefix),Pe+=`(?:${at}))*)${y(Ne.suffix)})`,Ne.modifier===0&&(Pe+="?")}let Ve=`[${y(Ee.endsWith)}]|$`,st=`[${y(Ee.delimiter)}]`;if(Ee.end)return Ee.strict||(Pe+=`${st}?`),Ee.endsWith.length?Pe+=`(?=${Ve})`:Pe+="$",new RegExp(Pe,w(Ee));Ee.strict||(Pe+=`(?:${st}(?=${Ve}))?`);let Ue=!1;if(X.length){let Ne=X[X.length-1];Ne.type===3&&Ne.modifier===3&&(Ue=Ee.delimiter.indexOf(Ne)>-1)}return Ue||(Pe+=`(?=${st}|${Ve})`),new RegExp(Pe,w(Ee))}var $={delimiter:"",prefixes:"",sensitive:!0,strict:!0},P={delimiter:".",prefixes:"",sensitive:!0,strict:!0},C={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function T(X,me){return X.length?X[0]==="/"?!0:!me||X.length<2?!1:(X[0]=="\\"||X[0]=="{")&&X[1]=="/":!1}function A(X,me){return X.startsWith(me)?X.substring(me.length,X.length):X}function D(X,me){return X.endsWith(me)?X.substr(0,X.length-me.length):X}function z(X){return!X||X.length<2?!1:X[0]==="["||(X[0]==="\\"||X[0]==="{")&&X[1]==="["}var K=["ftp","file","http","https","ws","wss"];function B(X){if(!X)return!0;for(let me of K)if(X.test(me))return!0;return!1}function te(X,me){if(X=A(X,"#"),me||X==="")return X;let Ee=new URL("https://example.com");return Ee.hash=X,Ee.hash?Ee.hash.substring(1,Ee.hash.length):""}function J(X,me){if(X=A(X,"?"),me||X==="")return X;let Ee=new URL("https://example.com");return Ee.search=X,Ee.search?Ee.search.substring(1,Ee.search.length):""}function oe(X,me){return me||X===""?X:z(X)?q(X):I(X)}function fe(X,me){if(me||X==="")return X;let Ee=new URL("https://example.com");return Ee.password=X,Ee.password}function ye(X,me){if(me||X==="")return X;let Ee=new URL("https://example.com");return Ee.username=X,Ee.username}function ae(X,me,Ee){if(Ee||X==="")return X;if(me&&!K.includes(me))return new URL(`${me}:${X}`).pathname;let Pe=X[0]=="/";return X=new URL(Pe?X:"/-"+X,"https://example.com").pathname,Pe||(X=X.substring(2,X.length)),X}function ue(X,me,Ee){return k(me)===X&&(X=""),Ee||X===""?X:Z(X)}function Q(X,me){return X=D(X,":"),me||X===""?X:L(X)}function k(X){switch(X){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function L(X){if(X==="")return X;if(/^[-+.A-Za-z0-9]*$/.test(X))return X.toLowerCase();throw new TypeError(`Invalid protocol '${X}'.`)}function F(X){if(X==="")return X;let me=new URL("https://example.com");return me.username=X,me.username}function N(X){if(X==="")return X;let me=new URL("https://example.com");return me.password=X,me.password}function I(X){if(X==="")return X;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(X))throw new TypeError(`Invalid hostname '${X}'`);let me=new URL("https://example.com");return me.hostname=X,me.hostname}function q(X){if(X==="")return X;if(/[^0-9a-fA-F[\]:]/g.test(X))throw new TypeError(`Invalid IPv6 hostname '${X}'`);return X.toLowerCase()}function Z(X){if(X===""||/^[0-9]*$/.test(X)&&parseInt(X)<=65535)return X;throw new TypeError(`Invalid port '${X}'.`)}function ne(X){if(X==="")return X;let me=new URL("https://example.com");return me.pathname=X[0]!=="/"?"/-"+X:X,X[0]!=="/"?me.pathname.substring(2,me.pathname.length):me.pathname}function de(X){return X===""?X:new URL(`data:${X}`).pathname}function ce(X){if(X==="")return X;let me=new URL("https://example.com");return me.search=X,me.search.substring(1,me.search.length)}function H(X){if(X==="")return X;let me=new URL("https://example.com");return me.hash=X,me.hash.substring(1,me.hash.length)}var W=(tt=class{constructor(X){Je(this,Le);Je(this,kt);Je(this,ct,[]);Je(this,Bt,{});Je(this,ht,0);Je(this,Jt,1);Je(this,Kt,0);Je(this,Xt,0);Je(this,en,0);Je(this,Pn,0);Je(this,sn,!1);Fe(this,kt,X)}get result(){return G(this,Bt)}parse(){for(Fe(this,ct,v(G(this,kt),!0));G(this,ht)<G(this,ct).length;Fe(this,ht,G(this,ht)+G(this,Jt))){if(Fe(this,Jt,1),G(this,ct)[G(this,ht)].type==="END"){if(G(this,Xt)===0){Me(this,Le,XN).call(this),Me(this,Le,Gu).call(this)?Me(this,Le,Or).call(this,9,1):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Or).call(this,7,0);continue}else if(G(this,Xt)===2){Me(this,Le,_0).call(this,5);continue}Me(this,Le,Or).call(this,10,0);break}if(G(this,en)>0)if(Me(this,Le,zee).call(this))Fe(this,en,G(this,en)-1);else continue;if(Me(this,Le,Vee).call(this)){Fe(this,en,G(this,en)+1);continue}switch(G(this,Xt)){case 0:Me(this,Le,QN).call(this)&&Me(this,Le,_0).call(this,1);break;case 1:if(Me(this,Le,QN).call(this)){Me(this,Le,Hee).call(this);let X=7,me=1;Me(this,Le,Dee).call(this)?(X=2,me=3):G(this,sn)&&(X=2),Me(this,Le,Or).call(this,X,me)}break;case 2:Me(this,Le,Ub).call(this)?Me(this,Le,_0).call(this,3):(Me(this,Le,qb).call(this)||Me(this,Le,Jf).call(this)||Me(this,Le,Gu).call(this))&&Me(this,Le,_0).call(this,5);break;case 3:Me(this,Le,Lee).call(this)?Me(this,Le,Or).call(this,4,1):Me(this,Le,Ub).call(this)&&Me(this,Le,Or).call(this,5,1);break;case 4:Me(this,Le,Ub).call(this)&&Me(this,Le,Or).call(this,5,1);break;case 5:Me(this,Le,Uee).call(this)?Fe(this,Pn,G(this,Pn)+1):Me(this,Le,qee).call(this)&&Fe(this,Pn,G(this,Pn)-1),Me(this,Le,Fee).call(this)&&!G(this,Pn)?Me(this,Le,Or).call(this,6,1):Me(this,Le,qb).call(this)?Me(this,Le,Or).call(this,7,0):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 6:Me(this,Le,qb).call(this)?Me(this,Le,Or).call(this,7,0):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 7:Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 8:Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break}}G(this,Bt).hostname!==void 0&&G(this,Bt).port===void 0&&(G(this,Bt).port="")}},kt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,ht=new WeakMap,Jt=new WeakMap,Kt=new WeakMap,Xt=new WeakMap,en=new WeakMap,Pn=new WeakMap,sn=new WeakMap,Le=new WeakSet,Or=function(X,me){var Ee,Pe,Ve;switch(G(this,Xt)){case 0:break;case 1:G(this,Bt).protocol=Me(this,Le,Xs).call(this);break;case 2:break;case 3:G(this,Bt).username=Me(this,Le,Xs).call(this);break;case 4:G(this,Bt).password=Me(this,Le,Xs).call(this);break;case 5:G(this,Bt).hostname=Me(this,Le,Xs).call(this);break;case 6:G(this,Bt).port=Me(this,Le,Xs).call(this);break;case 7:G(this,Bt).pathname=Me(this,Le,Xs).call(this);break;case 8:G(this,Bt).search=Me(this,Le,Xs).call(this);break;case 9:G(this,Bt).hash=Me(this,Le,Xs).call(this);break}G(this,Xt)!==0&&X!==10&&([1,2,3,4].includes(G(this,Xt))&&[6,7,8,9].includes(X)&&((Ee=G(this,Bt)).hostname??(Ee.hostname="")),[1,2,3,4,5,6].includes(G(this,Xt))&&[8,9].includes(X)&&((Pe=G(this,Bt)).pathname??(Pe.pathname=G(this,sn)?"/":"")),[1,2,3,4,5,6,7].includes(G(this,Xt))&&X===9&&((Ve=G(this,Bt)).search??(Ve.search=""))),Me(this,Le,Mee).call(this,X,me)},Mee=function(X,me){Fe(this,Xt,X),Fe(this,Kt,G(this,ht)+me),Fe(this,ht,G(this,ht)+me),Fe(this,Jt,0)},XN=function(){Fe(this,ht,G(this,Kt)),Fe(this,Jt,0)},_0=function(X){Me(this,Le,XN).call(this),Fe(this,Xt,X)},zb=function(X){return X<0&&(X=G(this,ct).length-X),X<G(this,ct).length?G(this,ct)[X]:G(this,ct)[G(this,ct).length-1]},Uo=function(X,me){let Ee=Me(this,Le,zb).call(this,X);return Ee.value===me&&(Ee.type==="CHAR"||Ee.type==="ESCAPED_CHAR"||Ee.type==="INVALID_CHAR")},QN=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},Dee=function(){return Me(this,Le,Uo).call(this,G(this,ht)+1,"/")&&Me(this,Le,Uo).call(this,G(this,ht)+2,"/")},Ub=function(){return Me(this,Le,Uo).call(this,G(this,ht),"@")},Lee=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},Fee=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},qb=function(){return Me(this,Le,Uo).call(this,G(this,ht),"/")},Jf=function(){if(Me(this,Le,Uo).call(this,G(this,ht),"?"))return!0;if(G(this,ct)[G(this,ht)].value!=="?")return!1;let X=Me(this,Le,zb).call(this,G(this,ht)-1);return X.type!=="NAME"&&X.type!=="REGEX"&&X.type!=="CLOSE"&&X.type!=="ASTERISK"},Gu=function(){return Me(this,Le,Uo).call(this,G(this,ht),"#")},Vee=function(){return G(this,ct)[G(this,ht)].type=="OPEN"},zee=function(){return G(this,ct)[G(this,ht)].type=="CLOSE"},Uee=function(){return Me(this,Le,Uo).call(this,G(this,ht),"[")},qee=function(){return Me(this,Le,Uo).call(this,G(this,ht),"]")},Xs=function(){let X=G(this,ct)[G(this,ht)],me=Me(this,Le,zb).call(this,G(this,Kt)).index;return G(this,kt).substring(me,X.index)},Hee=function(){let X={};Object.assign(X,$),X.encodePart=L;let me=b(Me(this,Le,Xs).call(this),void 0,X);Fe(this,sn,B(me))},tt),re=["protocol","username","password","hostname","port","pathname","search","hash"],pe="*";function Se(X,me){if(typeof X!="string")throw new TypeError("parameter 1 is not of type 'string'.");let Ee=new URL(X,me);return{protocol:Ee.protocol.substring(0,Ee.protocol.length-1),username:Ee.username,password:Ee.password,hostname:Ee.hostname,port:Ee.port,pathname:Ee.pathname,search:Ee.search!==""?Ee.search.substring(1,Ee.search.length):void 0,hash:Ee.hash!==""?Ee.hash.substring(1,Ee.hash.length):void 0}}function Oe(X,me){return me?yt(X):X}function rt(X,me,Ee){let Pe;if(typeof me.baseURL=="string")try{Pe=new URL(me.baseURL),me.protocol===void 0&&(X.protocol=Oe(Pe.protocol.substring(0,Pe.protocol.length-1),Ee)),!Ee&&me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.username===void 0&&(X.username=Oe(Pe.username,Ee)),!Ee&&me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.username===void 0&&me.password===void 0&&(X.password=Oe(Pe.password,Ee)),me.protocol===void 0&&me.hostname===void 0&&(X.hostname=Oe(Pe.hostname,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&(X.port=Oe(Pe.port,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&(X.pathname=Oe(Pe.pathname,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&me.search===void 0&&(X.search=Oe(Pe.search.substring(1,Pe.search.length),Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&me.search===void 0&&me.hash===void 0&&(X.hash=Oe(Pe.hash.substring(1,Pe.hash.length),Ee))}catch{throw new TypeError(`invalid baseURL '${me.baseURL}'.`)}if(typeof me.protocol=="string"&&(X.protocol=Q(me.protocol,Ee)),typeof me.username=="string"&&(X.username=ye(me.username,Ee)),typeof me.password=="string"&&(X.password=fe(me.password,Ee)),typeof me.hostname=="string"&&(X.hostname=oe(me.hostname,Ee)),typeof me.port=="string"&&(X.port=ue(me.port,X.protocol,Ee)),typeof me.pathname=="string"){if(X.pathname=me.pathname,Pe&&!T(X.pathname,Ee)){let Ve=Pe.pathname.lastIndexOf("/");Ve>=0&&(X.pathname=Oe(Pe.pathname.substring(0,Ve+1),Ee)+X.pathname)}X.pathname=ae(X.pathname,X.protocol,Ee)}return typeof me.search=="string"&&(X.search=J(me.search,Ee)),typeof me.hash=="string"&&(X.hash=te(me.hash,Ee)),X}function yt(X){return X.replace(/([+*?:{}()\\])/g,"\\$1")}function ut(X){return X.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Pt(X,me){me.delimiter??(me.delimiter="/#?"),me.prefixes??(me.prefixes="./"),me.sensitive??(me.sensitive=!1),me.strict??(me.strict=!1),me.end??(me.end=!0),me.start??(me.start=!0),me.endsWith="";let Ee=".*",Pe=`[^${ut(me.delimiter)}]+?`,Ve=/[$_\u200C\u200D\p{ID_Continue}]/u,st="";for(let Ue=0;Ue<X.length;++Ue){let Ne=X[Ue];if(Ne.type===3){if(Ne.modifier===3){st+=yt(Ne.value);continue}st+=`{${yt(Ne.value)}}${x(Ne.modifier)}`;continue}let Ke=Ne.hasCustomName(),at=!!Ne.suffix.length||!!Ne.prefix.length&&(Ne.prefix.length!==1||!me.prefixes.includes(Ne.prefix)),Tt=Ue>0?X[Ue-1]:null,hn=Ue<X.length-1?X[Ue+1]:null;if(!at&&Ke&&Ne.type===1&&Ne.modifier===3&&hn&&!hn.prefix.length&&!hn.suffix.length)if(hn.type===3){let jn=hn.value.length>0?hn.value[0]:"";at=Ve.test(jn)}else at=!hn.hasCustomName();if(!at&&!Ne.prefix.length&&Tt&&Tt.type===3){let jn=Tt.value[Tt.value.length-1];at=me.prefixes.includes(jn)}at&&(st+="{"),st+=yt(Ne.prefix),Ke&&(st+=`:${Ne.name}`),Ne.type===2?st+=`(${Ne.value})`:Ne.type===1?Ke||(st+=`(${Pe})`):Ne.type===0&&(!Ke&&(!Tt||Tt.type===3||Tt.modifier!==3||at||Ne.prefix!=="")?st+="*":st+=`(${Ee})`),Ne.type===1&&Ke&&Ne.suffix.length&&Ve.test(Ne.suffix[0])&&(st+="\\"),st+=yt(Ne.suffix),at&&(st+="}"),Ne.modifier!==3&&(st+=x(Ne.modifier))}return st}var Et=(ze=class{constructor(X={},me,Ee){Je(this,se);Je(this,ee,{});Je(this,le,{});Je(this,we,{});Je(this,be,{});Je(this,ke,!1);try{let Pe;if(typeof me=="string"?Pe=me:Ee=me,typeof X=="string"){let Ne=new W(X);if(Ne.parse(),X=Ne.result,Pe===void 0&&typeof X.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");X.baseURL=Pe}else{if(!X||typeof X!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(Pe)throw new TypeError("parameter 1 is not of type 'string'.")}typeof Ee>"u"&&(Ee={ignoreCase:!1});let Ve={ignoreCase:Ee.ignoreCase===!0};Fe(this,se,rt({pathname:pe,protocol:pe,username:pe,password:pe,hostname:pe,port:pe,search:pe,hash:pe},X,!0)),k(G(this,se).protocol)===G(this,se).port&&(G(this,se).port="");let Ue;for(Ue of re){if(!(Ue in G(this,se)))continue;let Ne={},Ke=G(this,se)[Ue];switch(G(this,le)[Ue]=[],Ue){case"protocol":Object.assign(Ne,$),Ne.encodePart=L;break;case"username":Object.assign(Ne,$),Ne.encodePart=F;break;case"password":Object.assign(Ne,$),Ne.encodePart=N;break;case"hostname":Object.assign(Ne,P),z(Ke)?Ne.encodePart=q:Ne.encodePart=I;break;case"port":Object.assign(Ne,$),Ne.encodePart=Z;break;case"pathname":B(G(this,ee).protocol)?(Object.assign(Ne,C,Ve),Ne.encodePart=ne):(Object.assign(Ne,$,Ve),Ne.encodePart=de);break;case"search":Object.assign(Ne,$,Ve),Ne.encodePart=ce;break;case"hash":Object.assign(Ne,$,Ve),Ne.encodePart=H;break}try{G(this,be)[Ue]=_(Ke,Ne),G(this,ee)[Ue]=S(G(this,be)[Ue],G(this,le)[Ue],Ne),G(this,we)[Ue]=Pt(G(this,be)[Ue],Ne),Fe(this,ke,G(this,ke)||G(this,be)[Ue].some(at=>at.type===2))}catch{throw new TypeError(`invalid ${Ue} pattern '${G(this,se)[Ue]}'.`)}}}catch(Pe){throw new TypeError(`Failed to construct 'URLPattern': ${Pe.message}`)}}test(X={},me){let Ee={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof X!="string"&&me)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof X>"u")return!1;try{typeof X=="object"?Ee=rt(Ee,X,!1):Ee=rt(Ee,Se(X,me),!1)}catch{return!1}let Pe;for(Pe of re)if(!G(this,ee)[Pe].exec(Ee[Pe]))return!1;return!0}exec(X={},me){let Ee={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof X!="string"&&me)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof X>"u")return;try{typeof X=="object"?Ee=rt(Ee,X,!1):Ee=rt(Ee,Se(X,me),!1)}catch{return null}let Pe={};me?Pe.inputs=[X,me]:Pe.inputs=[X];let Ve;for(Ve of re){let st=G(this,ee)[Ve].exec(Ee[Ve]);if(!st)return null;let Ue={};for(let[Ne,Ke]of G(this,le)[Ve].entries())if(typeof Ke=="string"||typeof Ke=="number"){let at=st[Ne+1];Ue[Ke]=at}Pe[Ve]={input:Ee[Ve]??"",groups:Ue}}return Pe}static compareComponent(X,me,Ee){let Pe=(Ne,Ke)=>{for(let at of["type","modifier","prefix","value","suffix"]){if(Ne[at]<Ke[at])return-1;if(Ne[at]!==Ke[at])return 1}return 0},Ve=new l(3,"","","","",3),st=new l(0,"","","","",3),Ue=(Ne,Ke)=>{let at=0;for(;at<Math.min(Ne.length,Ke.length);++at){let Tt=Pe(Ne[at],Ke[at]);if(Tt)return Tt}return Ne.length===Ke.length?0:Pe(Ne[at]??Ve,Ke[at]??Ve)};return!G(me,we)[X]&&!G(Ee,we)[X]?0:G(me,we)[X]&&!G(Ee,we)[X]?Ue(G(me,be)[X],[st]):!G(me,we)[X]&&G(Ee,we)[X]?Ue([st],G(Ee,be)[X]):Ue(G(me,be)[X],G(Ee,be)[X])}get protocol(){return G(this,we).protocol}get username(){return G(this,we).username}get password(){return G(this,we).password}get hostname(){return G(this,we).hostname}get port(){return G(this,we).port}get pathname(){return G(this,we).pathname}get search(){return G(this,we).search}get hash(){return G(this,we).hash}get hasRegExpGroups(){return G(this,ke)}},se=new WeakMap,ee=new WeakMap,le=new WeakMap,we=new WeakMap,be=new WeakMap,ke=new WeakMap,ze);return $R}var CR,nz;function ELe(){if(nz)return CR;nz=1;const{URLPattern:e}=_Le();return CR={URLPattern:e},globalThis.URLPattern||(globalThis.URLPattern=e),CR}var rz;function SLe(){if(rz)return gs;rz=1;var e=gs&&gs.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(gs,"__esModule",{value:!0}),gs.processJsonErrorObjectLegacy=gs.RouteValidator=gs.RouteValidationResult=void 0;const t=e(K3e),n=xLe(),r=globalThis;r.URLPattern||ELe();const i=r.URLPattern;class o{constructor(){et(this,"generalErrors",[]);et(this,"routeErrors",[]);et(this,"versionErrors",[]);et(this,"policyErrors",[]);et(this,"corsPolicyErrors",[])}get isValid(){return this.errors===0}get errors(){return this.generalErrors.length+this.routeErrors.length+this.versionErrors.length+this.policyErrors.length+this.corsPolicyErrors.length}}gs.RouteValidationResult=o;class s{constructor(){et(this,"validator");this.validator=n.JsonValidator.instance.compile(t.default)}validate(_){var P;const y=new o,w=this.validator(_);if(!w.isValid){const C=w.errors.map(A=>m(A)),T={routes:y.routeErrors,versions:y.versionErrors,policies:y.policyErrors};C.forEach(A=>{(T[A.property]??y.generalErrors).push(A.entry)})}if(!y.isValid)return y;const b=_;b.routes.forEach((C,T)=>{try{new i({pathname:"/"+C.path})}catch(A){y.routeErrors.push({index:T,field:"path",message:`The path '${C.path}' is invalid on route ${T+1} '${C.operationId} (${C.summary??C.label})' (${A.message})`})}}),b.versions.forEach((C,T)=>{try{new i({pathname:"/"+C.pathPrefix})}catch(A){y.versionErrors.push({index:T,field:"pathPrefix",message:`The pathPrefix '${C.pathPrefix}' is invalid on version ${T+1} '${C.name}' (${A.message})`})}}),this.duplicateChecks(b,y);const x=b.versions.map(C=>C.name);if(b.routes.forEach((C,T)=>{x.includes(C.version)||y.routeErrors.push({message:`No version named '${C.version}' found in the versions section (specified on route ${T+1} '${C.operationId} (${C.summary??C.label})')`,index:T,field:"version"})}),b.policies){const C=b.policies.map(T=>T.name);b.routes.forEach((T,A)=>{var D,z;(z=(D=T.policies)==null?void 0:D.inbound)==null||z.forEach(K=>{C.includes(K)||y.routeErrors.push({message:`No policy named '${K}' found in the policies section (specified on route ${A+1} '${T.operationId}')`,index:A,field:"policies.inbound"})})})}const S=["none","anything-goes"];b.corsPolicies&&b.corsPolicies.forEach((C,T)=>{S.includes(C.name)&&y.corsPolicyErrors.push({message:`Invalid CORS policy name '${C.name}' - 'none' and 'anything-goes' are reserved.`,index:T,field:"name"})});const $=((P=b.corsPolicies)==null?void 0:P.map(C=>C.name))??[];return b.routes.forEach((C,T)=>{C.corsPolicy&&!S.includes(C.corsPolicy)&&!$.includes(C.corsPolicy)&&y.routeErrors.push({message:`The route entry at position ${T} in *.oas.json has invalid corsPolicy with value '${C.corsPolicy}' not found in the corsPolicies section.`,index:T,field:"corsPolicy"})}),y}duplicateChecks(_,y){l(_.routes.filter($=>$.operationId).map($=>$.operationId)).forEach($=>{y.routeErrors.push({index:$.dupeIndex,field:"operationId",message:a("route","operationId",_.routes[$.dupeIndex].operationId,$.dupeIndex,$.originalIndex)})}),l(_.versions.map($=>$.name)).forEach($=>{y.versionErrors.push({index:$.dupeIndex,field:"name",message:a("version","name",_.versions[$.dupeIndex].name,$.dupeIndex,$.originalIndex)})}),l(_.versions.map($=>$.pathPrefix)).forEach($=>{y.versionErrors.push({index:$.dupeIndex,field:"pathPrefix",message:a("version","pathPrefix",_.versions[$.dupeIndex].pathPrefix,$.dupeIndex,$.originalIndex)})});const{policies:S}=_;S&&l(S.map(P=>P.name)).forEach(P=>{y.policyErrors.push({index:P.dupeIndex,field:"name",message:a("policy","name",S[P.dupeIndex].name,P.dupeIndex,P.originalIndex)})})}}gs.RouteValidator=s;const a=(v,_,y,w,b)=>`${_} '${y}' in ${v} ${w+1} is a duplicate of ${v} ${b+1}`,l=v=>{const _=[];for(let y=0;y<v.length;y++){const w=v[y],b=v.indexOf(w);b!==y&&_.push({dupeIndex:y,originalIndex:b})}return _},c={'must match pattern "^[0-9a-z-]+$"':"Value must be alphanumeric or dash '-' only",'must match pattern "^\\$import\\([^ )]*?\\)$"':"Value must be of form '$import(./path/to/module)"},u={'must match pattern "^[0-9a-z-]+$"':"Make sure the value uses only lowercase letters, numbers and dashes ('-').",'must match pattern "^\\$import\\([^ )]*?\\)$"':"Value must be of form '$import(./path/to/module)"},f={routes:"route",versions:"version",policies:"policy"};function m(v){var D,z,K,B,te;const _=v.message,y=((D=v.details)==null?void 0:D.property)??"",w=((z=v.details)==null?void 0:z.index)??0,b=(K=v.details)==null?void 0:K.field,x=v.keyword,S=v.params,$=v.instancePath,P=c[_]??_;let C,T;if(x==="unevaluatedProperties"){const J=S.unevaluatedProperty;C=`Unrecognized property '${J}' detected in '${b}' at position ${w+1} in *.oas.json. Property location: ${$}.`,J==="examples"&&b==="responses"&&(C=`Invalid property 'examples' detected in '${b}' at position ${w+1} in *.oas.json. Response examples are only accepted through the JSON Schema 'examples' keyword within the 'schema' property.`)}else b&&y?(C=`The ${f[y]} entry at position ${w+1} in *.oas.json has invalid ${b} with value '${(B=v.details)==null?void 0:B.fieldValue}' (${P})`,T={field:b,fieldValue:((te=v.details)==null?void 0:te.fieldValue)??"",property:y,instancePath:$,suggestion:u[_]??""}):y?C=`The ${f[y]} entry at position ${w+1} in *.oas.json is invalid (${P})`:x==="additionalProperties"?C=`The *.oas.json configuration contains invalid property '${S.additionalProperty}'`:C=`The *.oas.json configuration is invalid (${P})`;return{property:y,entry:{message:C,index:w,field:b,details:T}}}return gs.processJsonErrorObjectLegacy=m,gs}var iz;function $Le(){return iz||(iz=1,function(e){var t=Mu&&Mu.__createBinding||(Object.create?function(a,l,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(a,u,f)}:function(a,l,c,u){u===void 0&&(u=c),a[u]=l[c]}),n=Mu&&Mu.__exportStar||function(a,l){for(var c in a)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&t(l,a,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.processJsonErrorObjectLegacy=e.RouteValidationResult=e.isValidProjectName=e.MAX_PRETTY_BRANCH_LENGTH=e.MAX_HASH_LENGTH=e.processJsonErrorObject=e.DeploymentLogState=void 0;var r=j3e();Object.defineProperty(e,"DeploymentLogState",{enumerable:!0,get:function(){return r.DeploymentLogState}}),n(O3e(),e),n(k3e(),e),n(I3e(),e);var i=M3e();Object.defineProperty(e,"processJsonErrorObject",{enumerable:!0,get:function(){return i.processJsonErrorObject}});var o=L3e();Object.defineProperty(e,"MAX_HASH_LENGTH",{enumerable:!0,get:function(){return o.MAX_HASH_LENGTH}}),Object.defineProperty(e,"MAX_PRETTY_BRANCH_LENGTH",{enumerable:!0,get:function(){return o.MAX_PRETTY_BRANCH_LENGTH}}),Object.defineProperty(e,"isValidProjectName",{enumerable:!0,get:function(){return o.isValidProjectName}});var s=SLe();Object.defineProperty(e,"RouteValidationResult",{enumerable:!0,get:function(){return s.RouteValidationResult}}),Object.defineProperty(e,"processJsonErrorObjectLegacy",{enumerable:!0,get:function(){return s.processJsonErrorObjectLegacy}})}(Mu)),Mu}var CLe=$Le();const PLe=(e,t)=>CLe.processJsonErrorObject(e,t).entry.message,RLe=({fileName:e,validationErrors:t,onNavigateToFileTab:n})=>p.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[p.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[p.jsx(gl,{className:"h-6 w-auto mr-1"}),p.jsxs("span",{children:[e," file does not conform to schema"]})]}),p.jsx("ul",{className:"mt-5 list-inside list-disc",children:t.map(r=>p.jsx("li",{children:PLe(r,e)},`${r.message}-${r.instancePath}`))}),p.jsxs("p",{children:[p.jsx("button",{type:"button",className:"text-zuplo-pink hover:underline",onClick:()=>{n()},children:"Edit file directly"})," ","to correct the issue."]})]}),TLe=({message:e})=>p.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[p.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[p.jsx(gl,{className:"h-6 w-auto mr-1"}),p.jsx("span",{children:"JSON Parse Error"})]}),p.jsx("p",{children:e}),p.jsx("p",{children:"Edit the file directly to correct the issue."})]}),NLe=({onNavigateToPoliciesFileTab:e,children:t})=>{const n=Mp(),r=nv(),[i,o]=g.useState(),s=Tk();return g.useEffect(()=>{if(!(r!=null&&r.content)||!s.data){o(void 0);return}try{const a=JSON.parse(r.content),l=x_e.compile(JSON.parse(s.data));o(l(a))}catch(a){io(a,l=>l.setTag("additional context","Encountered failure when validating policies.json")),o(void 0)}},[s.data]),n.parseError?p.jsx(TLe,{message:n.parseError.toString()}):!i||s.isLoading?p.jsx("div",{className:"p-6",children:p.jsx(DZ,{message:"Validating policies.json"})}):i.isValid?t:p.jsx(RLe,{fileName:"policies.json",validationErrors:i.errors,onNavigateToFileTab:e})},ALe={"Policy List":"policy-list-tab-opened","policies.json":"policies.json-tab-opened"};function jLe(){const{logEvent:e}=vn(),t=Tk(),n=[{content:p.jsx(NLe,{onNavigateToPoliciesFileTab:()=>s("policies.json"),children:p.jsx(A3e,{})}),name:"Policy List",testId:"policies-list-tab"},{content:p.jsx("div",{className:"pt-2 h-full",children:p.jsx(ph,{jsonSchemas:[{fileMatch:["policies.json"],schema:{...JSON.parse(t.data??"{}")},uri:"https://zuplo.com/policies.json"}]})}),name:"policies.json",testId:"policies-json-tab"}],r=a=>e(ALe[a.name]),{currentTab:i,onSelectTab:o,setTab:s}=fk(n,r);return p.jsx(ree,{children:p.jsx("div",{className:"h-full",children:p.jsx(SO,{tabs:n,currentTab:i,onSelectTab:o})})})}const OLe="/docs",kLe=(e=!1)=>{const{account:t,project:n}=VIe(["account","project"]),[r,i]=g.useState(),o=UIe(t,n);return g.useEffect(()=>{var a,l,c,u;const s=(e?(a=o.data)==null?void 0:a.find(f=>f.environmentType===nd.WORKING_COPY):void 0)??((l=o.data)==null?void 0:l.find(f=>f.environmentType===nd.PRODUCTION))??((c=o.data)==null?void 0:c.sort((f,m)=>new Date(f.updatedOn).getTime()-new Date(m.updatedOn).getTime()).find(f=>f.environmentType===nd.PREVIEW))??((u=o.data)==null?void 0:u.find(f=>f.environmentType===nd.WORKING_COPY));i(s)},[o.data,e]),r},ILe=()=>{var a;const e=kLe(),t=k2e(e==null?void 0:e.name,iEe),n=e?dp(e):void 0,r=e?dp(e,"dev-portal"):void 0,i=g.useMemo(()=>{var l;try{return(l=t.data)!=null&&l.content?JSON.parse(t.data.content):void 0}catch{return}},[(a=t.data)==null?void 0:a.content]),o=i?(i==null?void 0:i.sitePathname)??OLe:"",s=r?new URL(o,r).toString():void 0;return{deploymentUrl:n==null?void 0:n.replace(/\/$/,""),deploymentDevPortalUrl:s==null?void 0:s.replace(/\/$/,"")}},MLe=()=>{var o,s;const e=Vr(),t=q2e(),n=oO(),i=(s=(o=qIe(e.account.name,e.project.name,e.environment.name).data)==null?void 0:o.at(-1))==null?void 0:s.stages.find(a=>a.stage==="api"&&a.status==="in-progress");return{isPending:t.isPending,isSuccess:t.isSuccess,saveAndDeploy:g.useCallback(async()=>{i||t.mutateAsync({environmentName:e.environment.name,accountName:e.account.name,projectName:e.project.name,files:n}).catch(a=>{if(!(a instanceof Error&&"status"in a&&a.status===409))throw a})},[t,n,i,e.environment.name,e.account.name,e.project.name])}},DLe=e=>new Promise(t=>setTimeout(t,e));function LLe({open:e,editors:t,onSelect:n,onCancel:r}){const[i,o]=g.useState(null),s=()=>{i&&n(i)};return p.jsx(wp,{open:e,onOpenChange:a=>!a&&r(),children:p.jsxs(Lc,{className:"sm:max-w-md",children:[p.jsxs(Xh,{children:[p.jsx(Fc,{children:"Choose Your Editor"}),p.jsx(kd,{children:"Select which editor you'd like to use for opening files. This preference will be saved for future use."})]}),p.jsx("div",{className:"space-y-2 py-4",children:t.map(a=>p.jsx("button",{type:"button",className:`w-full text-left px-4 py-3 rounded-md border transition-colors ${i===a.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,onClick:()=>o(a.id),children:p.jsx("div",{className:"font-medium",children:a.name})},a.id))}),p.jsxs(Od,{children:[p.jsx(ot,{variant:"ghost",onClick:r,children:"Cancel"}),p.jsx(ot,{variant:"default",onClick:s,disabled:!i,children:"Save Preference"})]})]})})}const mb="/api/v1/editor";function FLe(){const[e]=qd(),[t,n]=g.useState(null),[r,i]=g.useState(null),[o,s]=g.useState([]),[a,l]=g.useState(!1),[c,u]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const y=await(await fetch(`${mb}/list`)).json();s(y.editors);const b=await(await fetch(`${mb}/detect`)).json();b.editor&&b.name&&(n(b.editor),i(b.name))}catch(_){Nn.error("Failed to load editor preference:",_)}finally{u(!1)}})()},[]);const f=g.useCallback(async v=>{try{if((await fetch(`${mb}/preference`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({editor:v})})).ok){const y=o.find(w=>w.id===v);y&&(n(v),i(y.name)),l(!1)}}catch(_){Nn.error("Failed to save editor preference:",_)}},[o]),m=g.useCallback(async()=>{const v=e.get("path");if(!v){Nn.warn("No file path in URL");return}if(!t){l(!0);return}try{const _=await fetch(`${mb}/open`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:v})});if(!_.ok){const w=await _.json();Nn.error("Failed to open file in editor:",w.message);return}const y=await _.json();y.url&&(window.location.href=y.url)}catch(_){Nn.error("Failed to open file in editor:",_)}},[e,t]);return{hasEditor:!!t,editorName:r,isLoading:c,showPreferenceDialog:a,setShowPreferenceDialog:l,availableEditors:o,savePreference:f,openInEditor:m}}const VLe=()=>{const{saveAndDeploy:e,isPending:t}=MLe(),[n,r]=g.useState(null),i=$n(l=>{let c=0;for(const u of l.projectTreeNodes){const f=u.path?l.filesByPath[u.path]:void 0;f&&f.saveState===zt.modified&&c++}return c}),o=g.useRef(null),s=l=>{r(l),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(null)},1600)},a=hg(e);return g.useEffect(()=>{const l=async c=>{try{if(c.code===JIe&&(c.metaKey||c.ctrlKey)){c.preventDefault();const u=document.activeElement;if(u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement){const f=u.selectionEnd;u.blur(),u.focus(),(u instanceof HTMLInputElement&&u.type!=="checkbox"||u instanceof HTMLTextAreaElement)&&u.setSelectionRange(f,f),await DLe(100)}if(i===0){s("No unsaved changes");return}await a.current()}}catch(u){Nn.error("Error saving files:",u),r("Error saving files")}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[i,a]),{showTooltip:n,isSaving:t,unsavedChangesCount:i,saveAll:e}},zLe=()=>{const{showTooltip:e,saveAll:t,isSaving:n,unsavedChangesCount:r}=VLe(),{hasEditor:i,editorName:o,isLoading:s,showPreferenceDialog:a,setShowPreferenceDialog:l,availableEditors:c,savePreference:u,openInEditor:f}=FLe();return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"sticky bottom-0 h-12 border-t bg-neutral-50 items-center flex px-2 gap-x-2",children:[p.jsx(mN,{open:!!e,content:e??"",children:p.jsx(ot,{variant:r>0||n?"default":"ghost",size:"xs","data-test":"save",disabled:n,onClick:async()=>{await t()},children:p.jsxs(Ug,{className:"flex items-center gap-1 text-xs relative",loading:n,children:["Save",p.jsx("span",{className:r>0?"text-white":"text-gray-400",children:"[⌘+S]"})]})})}),!s&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-6 w-px bg-gray-300"}),p.jsx(mN,{content:i?`Open in ${o}`:"Choose editor to open files",children:p.jsxs(ot,{variant:"ghost",size:"xs",onClick:f,className:"flex items-center gap-1",children:[p.jsx(Vq,{size:14}),p.jsx("span",{className:"text-xs",children:"Open in Editor"})]})})]})]}),p.jsx(LLe,{open:a,editors:c,onSelect:u,onCancel:()=>l(!1)})]})};function ULe(){const{editStrategies:e}=Rk(),[t]=qd(),n=t.get("path");return p.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsxs(bfe,{direction:"horizontal",autoSaveId:"local-editor-file-tree",children:[p.jsx(rM,{minSize:10,defaultSize:20,className:"bg-neutral-50",children:p.jsx(oCe,{directoryStrategies:e})}),p.jsx(xfe,{}),p.jsx(rM,{minSize:70,children:n?p.jsx(qLe,{}):p.jsx(Bee,{})})]})}),p.jsx(zLe,{})]})}const qLe=()=>{const[e]=qd(),t=e.get("path"),n=Vr();if(!t)return p.jsx(Bee,{});const r=t.toLowerCase();return r.includes(".oas.json")?p.jsx(T3e,{ape:n}):r==="/config/policies.json"?p.jsx(jLe,{}):r.endsWith(".ts")?p.jsx(ph,{maxHeightVh:100}):r.endsWith(".css")?p.jsx(ph,{maxHeightVh:100}):r.startsWith("/schemas")&&r.endsWith(".json")?p.jsx(ph,{jsonSchemas:[_fe]}):p.jsx(ph,{})},Bee=()=>p.jsxs("div",{className:"flex flex-col h-full items-center justify-center",children:[p.jsx("h2",{className:"text-2xl font-semibold",children:"Local Route Editor"}),p.jsx("p",{className:"text-gray-600 mt-2",children:"Select a file from the tree to edit"})]}),HLe="You have modified files that are not saved. If you leave before saving you will lose your changes.",Wee=()=>{const e=pl(),t=Vr(["environment"]),n=oO(),{strategies:r}=Rk(),i=U2e(Object.values(r),t.environment.name),[o,s]=g.useState(null),a=$n(b=>b.setProjectTreeNodes),l=$n(b=>b.addFile),c=$n(b=>b.resetStore),{logEvent:u}=vn(),f=P3e({enabled:!1}),m=bee({enabled:!1}),v=xee({enabled:!1}),_=Tk({enabled:!1}),y=Xd({enabled:!1}),w=_p(async b=>{if(!e)return;performance.mark("totalTimeStart");const x=`${b.account.name}-${b.project.name}-${b.environment.name}`,S={"project-name":b.project.name};if(o&&o!==x&&e.editor.getModels().length>0){performance.mark("cleanMonacoStart"),c(),e.editor.getModels().forEach(A=>A.dispose());try{S.cleanMonaco=Math.trunc(performance.measure("cleanMonacoTimer","cleanMonacoStart").duration)}catch{S.cleanMonaco=-1}}performance.mark("fileTreeStart");const P=await i();e.editor.getModels().forEach(A=>A.dispose());try{S.fileTreeLoader=Math.trunc(performance.measure("fileTreeTimer","fileTreeStart").duration)}catch{S.fileTreeLoader=-1}performance.mark("loadingFilesStart");const C=P.filter(A=>A.type===pa.File),T=P.filter(A=>A.type===pa.Directory);await Promise.allSettled(C.map(async A=>{try{const D=await rd(b.environment.name,A.path);l({...A,...D,saveState:zt.unmodified});const z=e.Uri.file(D.path),K=e.editor.getModel(z);K?K.setValue(D.content??""):e.editor.createModel(D.content??"",void 0,z)}catch{l({...A,saveState:zt.error})}})),T.forEach(A=>{l({...A,saveState:zt.unmodified})});try{S.loadingFiles=Math.trunc(performance.measure("loadingFilesTimer","loadingFilesStart").duration)}catch{S.loadingFiles=-1}await Promise.allSettled([f.refetch(),m.refetch(),v.refetch(),_.refetch(),y.refetch()]),s(x),a(P);try{S.totalTime=Math.trunc(performance.measure("totalTime","totalTimeStart").duration)}catch{S.totalTime=-1}u("project-loaded",S);try{performance.clearMarks()}catch(A){io(A)}});return{unsavedFiles:n,monaco:e,reloadFiles:w}};function BLe(){const{unsavedFiles:e}=Wee(),{isAuthenticated:t}=hp();return g.useEffect(()=>{if(e.length===0||!t)return;function n(r){return r.preventDefault(),r.returnValue=HLe,r}return window.addEventListener("beforeunload",n,{capture:!0}),()=>{window.removeEventListener("beforeunload",n,{capture:!0})}},[e,t]),null}const WLe="modulepreload",GLe=function(e,t){return new URL(e,t).href},oz={},KLe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const a=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=s(n.map(u=>{if(u=GLe(u,r),u in oz)return;oz[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!r)for(let y=a.length-1;y>=0;y--){const w=a[y];if(w.href===u&&(!f||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const _=document.createElement("link");if(_.rel=f?"stylesheet":WLe,f||(_.as="script"),_.crossOrigin="",_.href=u,c&&_.setAttribute("nonce",c),document.head.appendChild(_),f)return new Promise((y,w)=>{_.addEventListener("load",y),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},Ok=Symbol.for("RemoteUi::Retain"),kk=Symbol.for("RemoteUi::Release"),i_=Symbol.for("RemoteUi::RetainedBy");class Gee{constructor(){this.memoryManaged=new Set}add(t){this.memoryManaged.add(t),t[i_].add(this),t[Ok]()}release(){for(const t of this.memoryManaged)t[i_].delete(this),t[kk]();this.memoryManaged.clear()}}function ZLe(e){return!!(e&&e[Ok]&&e[kk])}function sz(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}const gb="_@f";function YLe(e){const t=new Map,n=new Map,r=new Map;return{encode:i,decode:o,async call(s,a){const l=new Gee,c=n.get(s);if(c==null)throw new Error("You attempted to call a function that was already released.");try{const u=ZLe(c)?[l,...c[i_]]:[l];return await c(...o(a,u))}finally{l.release()}},release(s){const a=n.get(s);a&&(n.delete(s),t.delete(a))},terminate(){t.clear(),n.clear(),r.clear()}};function i(s,a=new Map){if(s==null)return[s];const l=a.get(s);if(l)return l;if(typeof s=="object"){if(Array.isArray(s)){a.set(s,[void 0]);const u=[],m=[s.map(v=>{const[_,y=[]]=i(v,a);return u.push(...y),_}),u];return a.set(s,m),m}if(sz(s)){a.set(s,[void 0]);const u=[],m=[Object.keys(s).reduce((v,_)=>{const[y,w=[]]=i(s[_],a);return u.push(...w),{...v,[_]:y}},{}),u];return a.set(s,m),m}}if(typeof s=="function"){if(t.has(s)){const m=t.get(s),v=[{[gb]:m}];return a.set(s,v),v}const u=e.uuid();t.set(s,u),n.set(u,s);const f=[{[gb]:u}];return a.set(s,f),f}const c=[s];return a.set(s,c),c}function o(s,a){if(typeof s=="object"){if(s==null)return s;if(Array.isArray(s))return s.map(l=>o(l,a));if(gb in s){const l=s[gb];if(r.has(l))return r.get(l);let c=0,u=!1;const f=()=>{c-=1,c===0&&(u=!0,r.delete(l),e.release(l))},m=()=>{c+=1},v=new Set(a),_=(...y)=>{if(u)throw new Error("You attempted to call a function that was already released.");if(!r.has(l))throw new Error("You attempted to call a function that was already revoked.");return e.call(l,y)};Object.defineProperties(_,{[kk]:{value:f,writable:!1},[Ok]:{value:m,writable:!1},[i_]:{value:v,writable:!1}});for(const y of v)y.add(_);return r.set(l,_),_}if(sz(s))return Object.keys(s).reduce((l,c)=>({...l,[c]:o(s[c],a)}),{})}return s}}const az=0,PR=1,lz=2,cz=3,uz=5,RR=6;function XLe(e,{uuid:t=QLe,createEncoder:n=YLe,callable:r}={}){let i=!1,o=e;const s=new Map,a=new Map,l=JLe(m,r),c=n({uuid:t,release(y){u(cz,[y])},call(y,w,b){const x=t(),S=v(x,b),[$,P]=c.encode(w);return u(uz,[x,y,$],P),S}});return o.addEventListener("message",f),{call:l,replace(y){const w=o;o=y,w.removeEventListener("message",f),y.addEventListener("message",f)},expose(y){for(const w of Object.keys(y)){const b=y[w];typeof b=="function"?s.set(w,b):s.delete(w)}},callable(...y){if(r!=null)for(const w of y)Object.defineProperty(l,w,{value:m(w),writable:!1,configurable:!0,enumerable:!0})},terminate(){u(lz,void 0),_(),o.terminate&&o.terminate()}};function u(y,w,b){i||o.postMessage(w?[y,w]:[y],b)}async function f(y){const{data:w}=y;if(!(w==null||!Array.isArray(w)))switch(w[0]){case lz:{_();break}case az:{const b=new Gee,[x,S,$]=w[1],P=s.get(S);try{if(P==null)throw new Error(`No '${S}' method is exposed on this endpoint`);const[C,T]=c.encode(await P(...c.decode($,[b])));u(PR,[x,void 0,C],T)}catch(C){const{name:T,message:A,stack:D}=C;throw u(PR,[x,{name:T,message:A,stack:D}]),C}finally{b.release()}break}case PR:{const[b]=w[1];a.get(b)(...w[1]),a.delete(b);break}case cz:{const[b]=w[1];c.release(b);break}case RR:{const[b]=w[1];a.get(b)(...w[1]),a.delete(b);break}case uz:{const[b,x,S]=w[1];try{const $=await c.call(x,S),[P,C]=c.encode($);u(RR,[b,void 0,P],C)}catch($){const{name:P,message:C,stack:T}=$;throw u(RR,[b,{name:P,message:C,stack:T}]),$}break}}}function m(y){return(...w)=>{if(i)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if(typeof y!="string"&&typeof y!="number")return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${y.toString()}`));const b=t(),x=v(b),[S,$]=c.encode(w);return u(az,[b,y,S],$),x}}function v(y,w){return new Promise((b,x)=>{a.set(y,(S,$,P)=>{if($==null)b(P&&c.decode(P,w));else{const C=new Error;Object.assign(C,$),x(C)}})})}function _(){var y;i=!0,s.clear(),a.clear(),(y=c.terminate)===null||y===void 0||y.call(c),o.removeEventListener("message",f)}}function QLe(){return`${vb()}-${vb()}-${vb()}-${vb()}`}function vb(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function JLe(e,t){let n;if(t==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const r=new Map;n=new Proxy({},{get(i,o){if(r.has(o))return r.get(o);const s=e(o);return r.set(o,s),s}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}function eFe(e){return typeof window>"u"||typeof e!="string"?void 0:new URL(e,window.location.href)}function tFe(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const Ik=new WeakMap;function nFe(e){const t=eFe(e);function n({createMessenger:r=tFe,...i}={}){if(t){const o=XLe(r(t),i),{call:s}=o;return Ik.set(s,o),s}if(typeof e=="function")return new Proxy({},{get(o,s){return async(...a)=>(await e())[s](...a)}});if(typeof window>"u")return new Proxy({},{get(o,s){return()=>{throw new Error("You can’t call a method on a worker on the server.")}}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function rFe(e){const t=iFe(e);return t==null||t.terminate(),Ik.delete(e),t!=null}function iFe(e){return Ik.get(e)}function oFe(e){const[t]=g.useState(e);return g.useRef(t)}function sFe(e,...t){const{current:n}=oFe(()=>e(...t));return g.useEffect(()=>()=>{rFe(n)},[n]),n}function Kee({open:e,filePath:t,localContent:n,remoteContent:r,onResolve:i,onCancel:o}){const[s,a]=g.useState("local"),l=c=>c.endsWith(".ts")?"typescript":c.endsWith(".js")?"javascript":c.endsWith(".json")?"json":c.endsWith(".css")?"css":c.endsWith(".html")?"html":"plaintext";return p.jsx(Mj,{open:e,onOpenChange:c=>{c||o()},children:p.jsxs(Dj,{children:[p.jsx(Hg,{className:"fixed inset-0 z-50 bg-black/50"}),p.jsxs(Bg,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-7xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg sm:rounded-lg max-h-[90vh]",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx(Wg,{className:"text-lg font-semibold",children:"File Conflict Detected"}),p.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[p.jsx("span",{className:"font-mono font-semibold",children:t})," has been modified both locally and on disk"]})]}),p.jsx(I_,{className:"rounded-sm opacity-70 hover:opacity-100",children:p.jsx(vl,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[p.jsxs("div",{className:"grid grid-cols-2 pr-[30px]",children:[p.jsxs("div",{className:`flex flex-col py-3 cursor-pointer transition-all border-t-4 border-x ${s==="local"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,style:{paddingLeft:"26px",paddingRight:"24px"},onClick:()=>a("local"),children:[p.jsx("div",{className:"font-semibold text-sm",children:"Browser Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Current editor content"})]}),p.jsxs("div",{className:`flex flex-col px-6 py-3 cursor-pointer transition-all border-t-4 border-x ${s==="remote"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,onClick:()=>a("remote"),children:[p.jsx("div",{className:"font-semibold text-sm",children:"Disk Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"File on disk"})]})]}),p.jsx("div",{className:"border border-t-0 overflow-hidden shadow-sm flex-1",style:{minHeight:"55vh"},children:p.jsx($re,{original:n,modified:r,language:l(t),theme:"vs",options:{readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,wordWrap:"on"}})}),p.jsxs("div",{className:"flex justify-between items-center pt-2",children:[p.jsx("p",{className:"text-sm text-gray-600",children:s==="local"?p.jsx(p.Fragment,{children:"Browser version will be saved to disk"}):p.jsx(p.Fragment,{children:"Disk version will replace browser content"})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(ot,{variant:"ghost",onClick:o,children:"Cancel"}),p.jsxs(ot,{variant:"default",onClick:()=>i(s),children:["Apply ",s==="local"?"Browser":"Disk"," ","Version"]})]})]})]})]})]})})}const aFe=nFe(()=>KLe(()=>import("./local-worker-CfP0n5rz.js"),[],import.meta.url)),lFe=()=>{const e=pl(),t=sFe(aFe),n=g.useRef(null),[r,i]=g.useState(null);g.useEffect(()=>{e&&t.ready().catch(a=>{Nn.warn("Failed to load local types:",a)})},[t,e]),g.useEffect(()=>{if(!e)return;const a=new EventSource("/api/changes");return n.current=a,a.addEventListener("change",async l=>{try{const c=JSON.parse(l.data),u=c.filePath.startsWith("/")?c.filePath:`/${c.filePath}`,f=$n.getState().filesByPath,m=$n.getState().updateFile,v=f[u];if(!v){Nn.info(`File ${u} changed but not loaded in editor`);return}if(v.saveState===zt.modified||v.saveState===zt.new){Nn.warn(`File ${u} changed on disk but has unsaved changes. Showing conflict dialog.`);const b=await rd("local",u);i({filePath:u,localContent:v.content??"",remoteContent:b.content??""});return}Nn.info(`Reloading ${u} from disk...`);const _=await rd("local",u),y=e.Uri.file(u),w=e.editor.getModel(y);w&&_.content!==void 0&&(w.setValue(_.content),Nn.info(`Updated Monaco model for ${u}`)),m({...v,content:_.content,saveState:zt.unmodified,lastModified:_.lastModified}),Nn.info(`Successfully reloaded ${u}`)}catch(c){Nn.error("Error handling file change event:",c)}}),a.addEventListener("init",()=>{Nn.info("SSE connection established")}),a.onerror=l=>{a.readyState===EventSource.CLOSED?Nn.debug("SSE connection closed"):Nn.warn("SSE connection error:",l)},()=>{a.close(),n.current=null,Nn.info("SSE connection closed")}},[e]);const o=async a=>{if(!r||!e)return;const l=$n.getState().filesByPath,c=$n.getState().updateFile,u=l[r.filePath];if(!u){i(null);return}const f=await rd("local",r.filePath),m=a==="local"?r.localContent:r.remoteContent,v=e.Uri.file(r.filePath),_=e.editor.getModel(v);_&&_.setValue(m),c({...u,content:m,saveState:a==="local"?zt.modified:zt.unmodified,lastModified:f.lastModified}),Nn.info(`Conflict resolved for ${r.filePath} using ${a} version`),i(null)},s=async()=>{if(!r)return;const a=$n.getState().filesByPath,l=$n.getState().updateFile,c=a[r.filePath];if(c){const u=await rd("local",r.filePath);l({...c,lastModified:u.lastModified}),Nn.info(`Conflict dialog canceled for ${r.filePath}, updated lastModified timestamp`)}i(null)};return p.jsx(p.Fragment,{children:r&&p.jsx(Kee,{open:!0,filePath:r.filePath,localContent:r.localContent,remoteContent:r.remoteContent,onResolve:o,onCancel:s})})};function cFe(){const[e,t]=g.useState(null),n=$n(a=>a.updateFile),r=$n(a=>a.filesByPath),i=$n(a=>a.saveConflictPath),o=$n(a=>a.clearSaveConflict);g.useEffect(()=>{if(i){Nn.info(`Save conflict detected for ${i}`);const a=r[i];a?rd("local",i).then(l=>{t({filePath:i,localContent:a.content??"",remoteContent:l.content??"",remoteLastModified:l.lastModified})}).catch(l=>{Nn.error("Error fetching file for conflict dialog:",l)}):Nn.warn(`No file model found for ${i}`),o()}},[i,r,o]);const s=async a=>{if(!e)return;const l=r[e.filePath];if(l){if(a==="remote")n({...l,content:e.remoteContent,lastModified:e.remoteLastModified,saveState:zt.unmodified}),Nn.info(`Using disk version for ${e.filePath}, canceling save`);else{Nn.info(`User chose local version for ${e.filePath}, saving to disk`);try{const c={path:l.path,content:l.content};await A_e("local",c,{forceSave:!0});const u=await rd("local",e.filePath);n({...l,lastModified:u.lastModified,saveState:zt.unmodified}),Nn.info(`Successfully saved local version for ${e.filePath}`)}catch(c){Nn.error(`Error saving local version for ${e.filePath}:`,c),n({...l,saveState:zt.modified})}}t(null)}};return e?p.jsx(Kee,{open:!0,filePath:e.filePath,localContent:e.localContent,remoteContent:e.remoteContent,onResolve:s,onCancel:()=>{t(null)}}):null}function uFe(){const e=Vr(),{monaco:t,reloadFiles:n}=Wee(),r=hg(n.execute),i=hg(e),o=e.environment.name;return JA({queryKey:["reloadFiles",o],queryFn:async()=>(await r.current(i.current),!0),refetchOnWindowFocus:!1,enabled:!!t&&!!o}),p.jsxs(p.Fragment,{children:[p.jsx(lFe,{}),p.jsx(cFe,{}),p.jsx(BLe,{}),p.jsx(hA,{})]})}const dFe=({count:e})=>!e||e===0?null:p.jsx("span",{className:"absolute top-1 right-0 h-2 w-2 rounded-full bg-blue-400"}),dz=({children:e,to:t,badgeCount:n,end:r})=>p.jsx(rU,{end:r,to:t,className:({isActive:i,isPending:o})=>We("font-medium relative items-center px-2 py-1 rounded-md text-gray-900 text-sm transition-colors","rounded-md hover:text-zuplo-600",i&&"text-zuplo-700",o&&"text-zuplo-700 animate-pulse"),children:({isActive:i})=>p.jsxs(p.Fragment,{children:[i&&p.jsx(p0.div,{layoutId:"local-navigation-item-background",transition:{type:"spring",bounce:.1,duration:.4},className:"absolute inset-0 rounded-md -z-10 bg-zuplo-100"}),e,p.jsx(dFe,{count:n})]})}),fFe=()=>p.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),hFe=()=>{const e=Vr(),[t,n]=g.useState(!1),r=dp(e.environment),{copyToClipboard:i,state:o}=O2(r??"");return p.jsxs(Cc,{open:t,onOpenChange:n,children:[p.jsx(Pc,{asChild:!0,children:p.jsxs(ot,{variant:"white",size:"sm",className:"gap-2 flex justify-between h-8 mt-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(lde,{size:16}),"Deployment URLs"]}),p.jsx(w_,{size:16})]})}),p.jsx(rl,{className:"divide-y p-0",align:"end",children:r?p.jsxs("div",{className:"p-4",children:[p.jsx("div",{className:"font-medium text-lg",children:"Local Development"}),p.jsx("div",{className:"h-2"}),p.jsxs("div",{children:[p.jsx("div",{className:"uppercase text-muted-foreground font-semibold text-xs",children:"Gateway"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(fFe,{}),p.jsx("div",{className:"text-sm max-w-52 truncate break-all",children:p.jsx(Di,{href:r,target:"_blank",variant:"ghost",rel:"noopener noreferrer",className:"hover:underline",children:r})}),p.jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded-md transition-colors",onClick:()=>{i(),n(!1)},children:o==="copied"?p.jsx(oo,{size:16,className:"text-green-500"}):p.jsx(b_,{size:16})})]})]})]}):p.jsxs("div",{className:"w-60 p-5 text-center",children:[p.jsx("div",{className:"text-2xl font-medium",children:"🙈"}),p.jsx("div",{className:"text-md mt-4",children:"Deployment URL not configured. Make sure your local gateway is running."})]})})]})},pFe=()=>p.jsxs("div",{className:"flex flex-row justify-between w-full border-b border-gray-200 bg-white px-4 pb-3 pt-2",children:[p.jsxs("nav",{"aria-label":"Sidebar",className:"flex gap-2 items-center mt-2",children:[p.jsx(dz,{end:!0,to:"/dev/project/local",children:"Project"}),p.jsx(dz,{to:"/dev/project/local/edit",children:"Code"})]}),p.jsx(hFe,{})]}),mFe=()=>p.jsxs("div",{className:"h-screen flex flex-col",children:[p.jsx(pFe,{}),p.jsx(g.Suspense,{fallback:null,children:p.jsx(hA,{})})]});function il(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function gFe(e,t=[]){let n=[];function r(o,s){const a=g.createContext(s),l=n.length;n=[...n,s];const c=f=>{var b;const{scope:m,children:v,..._}=f,y=((b=m==null?void 0:m[e])==null?void 0:b[l])||a,w=g.useMemo(()=>_,Object.values(_));return p.jsx(y.Provider,{value:w,children:v})};c.displayName=o+"Provider";function u(f,m){var y;const v=((y=m==null?void 0:m[e])==null?void 0:y[l])||a,_=g.useContext(v);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,u]}const i=()=>{const o=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,vFe(i,...t)]}function vFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Zee(e,t=[]){let n=[];function r(o,s){const a=g.createContext(s),l=n.length;n=[...n,s];function c(f){const{scope:m,children:v,..._}=f,y=(m==null?void 0:m[e][l])||a,w=g.useMemo(()=>_,Object.values(_));return p.jsx(y.Provider,{value:w,children:v})}function u(f,m){const v=(m==null?void 0:m[e][l])||a,_=g.useContext(v);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,yFe(i,...t)]}function yFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function wFe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yee(...e){return t=>e.forEach(n=>wFe(n,t))}function o_(...e){return g.useCallback(Yee(...e),e)}var s_=g.forwardRef((e,t)=>{const{children:n,...r}=e,i=g.Children.toArray(n),o=i.find(xFe);if(o){const s=o.props.children,a=i.map(l=>l===o?g.Children.count(s)>1?g.Children.only(null):g.isValidElement(s)?s.props.children:null:l);return p.jsx(JN,{...r,ref:t,children:g.isValidElement(s)?g.cloneElement(s,void 0,a):null})}return p.jsx(JN,{...r,ref:t,children:n})});s_.displayName="Slot";var JN=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const i=EFe(n);return g.cloneElement(n,{..._Fe(r,n.props),ref:t?Yee(t,i):i})}return g.Children.count(n)>1?g.Children.only(null):null});JN.displayName="SlotClone";var bFe=({children:e})=>p.jsx(p.Fragment,{children:e});function xFe(e){return g.isValidElement(e)&&e.type===bFe}function _Fe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function EFe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function SFe(e){const t=e+"CollectionProvider",[n,r]=Zee(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:_,children:y}=v,w=Ze.useRef(null),b=Ze.useRef(new Map).current;return p.jsx(i,{scope:_,itemMap:b,collectionRef:w,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Ze.forwardRef((v,_)=>{const{scope:y,children:w}=v,b=o(a,y),x=o_(_,b.collectionRef);return p.jsx(s_,{ref:x,children:w})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=Ze.forwardRef((v,_)=>{const{scope:y,children:w,...b}=v,x=Ze.useRef(null),S=o_(_,x),$=o(c,y);return Ze.useEffect(()=>($.itemMap.set(x,{ref:x,...b}),()=>void $.itemMap.delete(x))),p.jsx(s_,{[u]:"",ref:S,children:w})});f.displayName=c;function m(v){const _=o(e+"CollectionConsumer",v);return Ze.useCallback(()=>{const w=_.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(_.itemMap.values()).sort(($,P)=>b.indexOf($.ref.current)-b.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},m,r]}var eA=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},$Fe=fa.useId||(()=>{}),CFe=0;function Xee(e){const[t,n]=g.useState($Fe());return eA(()=>{n(r=>r??String(CFe++))},[e]),e||(t?`radix-${t}`:"")}var PFe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Dp=PFe.reduce((e,t)=>{const n=g.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?s_:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mk(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=RFe({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Mk(n),l=g.useCallback(c=>{if(o){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else i(c)},[o,e,i,a]);return[s,l]}function RFe({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,i=g.useRef(r),o=Mk(t);return g.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var TFe=g.createContext(void 0);function Jee(e){const t=g.useContext(TFe);return e||t||"ltr"}var TR="rovingFocusGroup.onEntryFocus",NFe={bubbles:!1,cancelable:!0},G2="RovingFocusGroup",[tA,ete,AFe]=SFe(G2),[jFe,tte]=Zee(G2,[AFe]),[OFe,kFe]=jFe(G2),nte=g.forwardRef((e,t)=>p.jsx(tA.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(tA.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(IFe,{...e,ref:t})})}));nte.displayName=G2;var IFe=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,m=g.useRef(null),v=o_(t,m),_=Jee(o),[y=null,w]=Qee({prop:s,defaultProp:a,onChange:l}),[b,x]=g.useState(!1),S=Mk(c),$=ete(n),P=g.useRef(!1),[C,T]=g.useState(0);return g.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(TR,S),()=>A.removeEventListener(TR,S)},[S]),p.jsx(OFe,{scope:n,orientation:r,dir:_,loop:i,currentTabStopId:y,onItemFocus:g.useCallback(A=>w(A),[w]),onItemShiftTab:g.useCallback(()=>x(!0),[]),onFocusableItemAdd:g.useCallback(()=>T(A=>A+1),[]),onFocusableItemRemove:g.useCallback(()=>T(A=>A-1),[]),children:p.jsx(Dp.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:il(e.onMouseDown,()=>{P.current=!0}),onFocus:il(e.onFocus,A=>{const D=!P.current;if(A.target===A.currentTarget&&D&&!b){const z=new CustomEvent(TR,NFe);if(A.currentTarget.dispatchEvent(z),!z.defaultPrevented){const K=$().filter(fe=>fe.focusable),B=K.find(fe=>fe.active),te=K.find(fe=>fe.id===y),oe=[B,te,...K].filter(Boolean).map(fe=>fe.ref.current);ote(oe,u)}}P.current=!1}),onBlur:il(e.onBlur,()=>x(!1))})})}),rte="RovingFocusGroupItem",ite=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=Xee(),l=o||a,c=kFe(rte,n),u=c.currentTabStopId===l,f=ete(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=c;return g.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),p.jsx(tA.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:p.jsx(Dp.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:il(e.onMouseDown,_=>{r?c.onItemFocus(l):_.preventDefault()}),onFocus:il(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:il(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){c.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=LFe(_,c.orientation,c.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let b=f().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const x=b.indexOf(_.currentTarget);b=c.loop?FFe(b,x+1):b.slice(x+1)}setTimeout(()=>ote(b))}})})})});ite.displayName=rte;var MFe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DFe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LFe(e,t,n){const r=DFe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return MFe[r]}function ote(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VFe=nte,zFe=ite;function UFe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var ste=e=>{const{present:t,children:n}=e,r=qFe(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=o_(r.ref,HFe(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:o}):null};ste.displayName="Presence";function qFe(e){const[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),o=g.useRef("none"),s=e?"mounted":"unmounted",[a,l]=UFe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=yb(r.current);o.current=a==="mounted"?c:"none"},[a]),eA(()=>{const c=r.current,u=i.current;if(u!==e){const m=o.current,v=yb(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),eA(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=v=>{const y=yb(r.current).includes(v.animationName);if(v.target===t&&y&&(l("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=yb(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function yb(e){return(e==null?void 0:e.animationName)||"none"}function HFe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dk="Tabs",[BFe,B9e]=gFe(Dk,[tte]),ate=tte(),[WFe,Lk]=BFe(Dk),lte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Jee(a),[f,m]=Qee({prop:r,onChange:i,defaultProp:o});return p.jsx(WFe,{scope:n,baseId:Xee(),value:f,onValueChange:m,orientation:s,dir:u,activationMode:l,children:p.jsx(Dp.div,{dir:u,"data-orientation":s,...c,ref:t})})});lte.displayName=Dk;var cte="TabsList",ute=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Lk(cte,n),s=ate(n);return p.jsx(VFe,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:p.jsx(Dp.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});ute.displayName=cte;var dte="TabsTrigger",fte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=Lk(dte,n),a=ate(n),l=mte(s.baseId,r),c=gte(s.baseId,r),u=r===s.value;return p.jsx(zFe,{asChild:!0,...a,focusable:!i,active:u,children:p.jsx(Dp.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:il(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:il(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:il(e.onFocus,()=>{const f=s.activationMode!=="manual";!u&&!i&&f&&s.onValueChange(r)})})})});fte.displayName=dte;var hte="TabsContent",pte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=Lk(hte,n),l=mte(a.baseId,r),c=gte(a.baseId,r),u=r===a.value,f=g.useRef(u);return g.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(ste,{present:i||u,children:({present:m})=>p.jsx(Dp.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&o})})});pte.displayName=hte;function mte(e,t){return`${e}-trigger-${t}`}function gte(e,t){return`${e}-content-${t}`}var GFe=lte,KFe=ute,ZFe=fte,YFe=pte;const fz=[{label:"MCP",value:"mcp",items:[{title:"Installing the MCP Inspector",description:"Set up the MCP Inspector locally and start testing your MCP server with ease.",icon:iQ,link:{href:"https://zuplo.com/docs/handlers/mcp-server#mcp-inspector",text:"Get Started"}},{title:"MCP Quickstart",description:"Learn how to start using Model Context Protocol to pass context into any model call.",icon:lQ,link:{href:"https://zuplo.com/docs/articles/mcp-quickstart",text:"Get Started"}},{title:"Using OAuth with MCP",description:"Authenticate users securely by integrating OAuth flows into your Model Context Protocol setup.",icon:aQ,link:{href:"https://zuplo.com/docs/articles/configuring-auth0-for-mcp-auth",text:"Get Started"}}]},{label:"Rate Limiting",value:"rate-limiting",items:[{title:"Adding Rate Limiting",description:"Control traffic and protect your APIs by setting up flexible, customizable rate limits.",icon:nQ,link:{href:"https://zuplo.com/docs/articles/step-2-add-rate-limiting",text:"Get Started"}},{title:"Complex Rate Limiting",description:"Implement advanced rules to rate limit by user, IP, plan, or custom logic.",icon:rQ,link:{href:"https://zuplo.com/docs/policies/complex-rate-limit-inbound",text:"Get Started"}},{title:"Dynamic Rate Limits",description:"Set rate limits that adapt in real-time based on headers, tokens, or user context.",icon:sQ,link:{href:"https://zuplo.com/examples/dynamic-rate-limits",text:"Get Started"}}]},{label:"Authentication",value:"authentication",items:[{title:"Using API Keys",description:"Authenticate and manage access to your APIs with simple, secure API key workflows.",icon:uQ,link:{href:"https://zuplo.com/docs/policies/api-key-inbound",text:"Get Started"}},{title:"Using Auth0",description:"Connect your APIs to Auth0 for streamlined authentication and powerful identity management.",icon:dQ,link:{href:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound",text:"Get Started"}},{title:"Using Okta",description:"Integrate Okta with your APIs to enable secure, enterprise-grade authentication and authorization.",icon:oQ,link:{href:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound",text:"Get Started"}}]},{label:"Dev Portal",value:"dev-portal",items:[{title:"Setup your API Reference",description:"Instantly generate an interactive reference by importing your OpenAPI spec—no manual work needed.",icon:eQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/configuration/api-reference",text:"Get Started"}},{title:"Adding Authentication",description:"Guide users through secure API access by adding auth flows to your developer portal.",icon:cQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication",text:"Get Started"}},{title:"Creating API Catalogs",description:"Organize your APIs into searchable, user-friendly catalogs for easier discovery and onboarding.",icon:tQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/guides/using-multiple-apis",text:"Get Started"}}]}],XFe=()=>p.jsxs(GFe,{defaultValue:"mcp",className:"flex flex-col my-8",children:[p.jsx(KFe,{className:"flex gap-8 border-b border-gray-200 mb-8 ml-1",children:fz.map(e=>p.jsx(ZFe,{value:e.value,className:"relative py-2 text-sm font-medium text-gray-600 hover:text-gray-900 data-[state=active]:text-gray-900 border-b-2 border-transparent data-[state=active]:border-black transition-colors",children:e.label},e.value))}),fz.map(e=>p.jsx(YFe,{value:e.value,className:"grid grid-cols-3 gap-4",children:e.items.map(t=>p.jsxs($r,{className:"flex flex-col gap-2 text-muted-foreground text-gray-700 ",children:[p.jsxs(_d,{className:"flex gap-2",children:[p.jsx(t.icon,{size:24,weight:"duotone",className:"[&_[opacity='0.2']]:fill-pink-500"}),p.jsx(Ac,{className:"gap-x-2 text-lg font-semibold",children:t.title})]}),p.jsx($h,{className:"text-md",children:t.description}),p.jsx(N2,{className:"flex-1 items-end border-0 mb-4",children:p.jsx(ot,{variant:"white",asChild:!0,size:"sm",className:"w-full",children:p.jsx(Di,{href:t.link.href,variant:"ghost",children:t.link.text})})})]},t.title))},e.value))]}),QFe=({title:e,url:t,className:n})=>{const{copyToClipboard:r,state:i}=O2(t??"",{showValue:!1});return p.jsxs($r,{className:We("col-span-full md:col-span-5 py-2 px-4 flex items-center text-sm gap-x-2",n),children:[p.jsx("div",{className:"bg-green-600 rounded-full w-4 h-4 p-0.5",children:p.jsx(oo,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold",children:e}),p.jsx("div",{className:"flex-1",children:t?p.jsx(Di,{href:t,className:"ml-2 font-medium line-clamp-1 break-all",children:t}):p.jsx(pi,{className:"ml-2 h-4 w-8/12"})}),p.jsx(ot,{variant:"secondary",size:"xs",onClick:r,children:p.jsxs(Ug,{loading:i==="copied",alternative:p.jsx(oo,{size:12,className:"text-green-600",strokeWidth:3}),className:"flex",children:[p.jsx(b_,{size:16,className:"mr-2",strokeWidth:1.5}),"Copy URL"]})})]})},JFe="/static/img/hero-CA-QKTbm.svg",e9e=()=>{const{deploymentDevPortalUrl:e}=ILe();return p.jsxs($r,{className:"col-span-full md:col-span-3 py-2 px-4 flex items-center text-sm gap-x-2",children:[p.jsx("div",{className:We(" rounded-full w-4 h-4 p-0.5",e?"bg-green-500":"bg-gray-500"),children:e?p.jsx(oo,{className:"text-white",size:12}):p.jsx(Fq,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold flex-1 line-clamp-1 break-all",children:"Developer Portal"}),p.jsx(ot,{variant:"secondary",size:"xs",asChild:!0,title:e?"":"Not available",disabled:!e,children:p.jsxs(Di,{href:e,variant:"ghost",children:[p.jsx(Dg,{size:16,strokeWidth:1.5,className:"mr-2"}),"Open Portal"]})})]})},t9e=()=>{const{account:e,project:t}=Vr(["account","project"]),{logEvent:n}=vn();return p.jsxs("div",{className:"flex flex-col space-y-4",children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Support"}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(G8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Talk to an API expert"}),p.jsx(Sh,{className:"text-md",children:"Get a free technical consultation with one of our API experts."})]}),p.jsx(ot,{onClick:()=>{n("getting-started-book-a-meeting-clicked",{account:e.name}),window.open(B8,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Di,{href:B8,variant:"ghost",children:[p.jsx(fue,{className:"mr-2",size:16}),"Book a Meeting"]})})]})}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(W8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Feeling Stuck?"}),p.jsx(Sh,{className:"text-md",children:"Check out our various support options to get help with your API"})]}),p.jsx(ot,{size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Mg,{to:B0(ag.Support,{account:e.name}),children:[p.jsx(W8,{className:"h-4 w-4 mr-2 mb-0.5"}),"Get Help"]})})]})}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(G8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Join the Zuplo API Community"}),p.jsx(Sh,{className:"text-md",children:"Come chat with fellow Zuplo users and the Zuplo team in our Discord channel."})]}),p.jsx(ot,{onClick:()=>{n("getting-started-join-discord-clicked",{account:e.name,project:t.name}),window.open(vT,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Di,{href:vT,variant:"ghost",children:[p.jsx($de,{className:"mr-2",size:16}),"Join Us"]})})]})})]})},n9e=()=>p.jsxs("div",{children:[p.jsxs(_d,{children:[p.jsx(Ac,{className:"text-base",children:"Welcome to your Gateway"}),p.jsx(Sh,{className:"text-base",children:"You can get started by configuring your routes and setting up policies in our visual Route Designer."})]}),p.jsxs(N2,{className:"border-0 gap-2 py-6",children:[p.jsx(ot,{asChild:!0,size:"sm",className:"gap-2 px-8",variant:"outline-primary",children:p.jsxs(Mg,{to:"/dev/project/local/edit",children:[p.jsx(yT,{size:16}),"Start Building"]})}),p.jsx(ot,{className:"gap-x-2 px-8",variant:"secondary",size:"sm",asChild:!0,children:p.jsxs(Di,{variant:"ghost",href:"https://zuplo.com/docs/articles/step-1-setup-basic-gateway",children:[p.jsx(Dg,{size:16})," Quickstart"]})})]})]}),r9e=()=>{const{project:e,environment:t}=Vr(),n=dp(t);return p.jsx("div",{className:"bg-neutral-50 h-full overflow-y-auto",children:p.jsxs("div",{className:"pt-4 max-w-6xl pb-16 m-auto px-5 flex flex-col gap-4",children:[p.jsx("h1",{className:"text-2xl font-semibold",children:e.name}),p.jsxs("div",{className:"grid grid-cols-8 gap-3",children:[p.jsx(QFe,{title:"Gateway",url:n}),p.jsx(e9e,{})]}),p.jsxs($r,{className:"relative grid md:grid-cols-2 overflow-hidden min-h-[220px]",children:[p.jsx(n9e,{}),p.jsx("img",{src:JFe,alt:e.name,className:"self-end w-full hidden md:block object-cover object-left h-full"})]}),p.jsx(XFe,{}),p.jsx(t9e,{})]})})},i9e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAGWElEQVR4nO2dy4oeVRSFo4gXUBEnJqMEzESciIPMvIGCQxUzc6JkojhylKFvEB/Dl7CjCQYj0Yhi1BBFHPkGDiu9/C1S/nTnr+o+q9beZ68PNjR0d11OfVVn17nVicEYAifUB2D6xGIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLF2uazv4bhwi/D8Op39+LU1WF46qtN4Ofp7/C3+B/zP2qL9fnfw/D2jxtZHvhivzSOGdgGtoVtYtuFqScWnjCtRJorGvZZjBpiXdqvqs5eW0em+0mGYyjyJOtbrIu/b/IilUyHBY7pUt95WZ9ioep5aE8v0K7AMXZaTfYlFqqZiE+oOU+wzqrIPsT6859hePFbvSDHDZwDzqUD8ouFOz1DtTc3cC4dPL1yi4UGSrUIrEBbWGJyioXqImMutTTQBpa0aswnFgr6scv6i75W4FwTypVLLOQeykZOVSTMu/KIVVWqMXDuieTKIVZ1qRLKFV8s5BeW6l6gWkyQc8UWq1qiPjcSJPSxxarQpHDUQFNEYOKK9UrHjZ+t4q24jagxxUKCqr5oWSJoMh9PLOQOPfX9sSNoMh9PrBeu6y9WtkCZBSOWWK4Cjx7BqsRYYvkt8OiBsgtEHLE+uKW/ONkDZRiEOGIpEvYH9+PRy+vEGueDMgxCDLEwm0Zxh5/5ehg+/WO9uHhnM/yYKVqQ2T8xxFLlVmuLNY3Xvuf0gQbJtfRi4Q5TSKUWC/H+rU113Pq8Arwh6sV69lpdsRDv/tT+yYUyFaMXSzkkJoJYiLONby6UqRitWOomhihiIalvfYPhhUiIVqyTVy3WGKcal8VJ7bAarVjqkaGRxHqp8TAhcXWoEytCv2AksZDEtz4/4duhTiwMUlOLhYZKyMWKN39YJlfr8xMOBNSJVaHD+fEv50vFuNGEjaU6sdQXfY14/eZ8sZ7/pv3+hXmWxYogFYLVf6i6vJK9fvyb/sJHkuqj27xjQVkL0Ij18g39xUc8d30Yzt1YFs9caSsVArkY6xzf0STwGrFOC/sHjyPAGzfbb/Mc+SY7rek3rClWFKl2bdNiLUQpViWpyomlmjdYTSrEI3uSS1xHrIpSIUTj4GuIVVUqi2WpaFGqKlwrea8uFaJU8r6GWJbKYjUPNDpGkOq9n7VSlROL2aWDoSKtpXr6yvKunyjf9inVpcPshP7w11xVFTtKdUL/u2dCIT65YGAdAiM81ReeHarLK9szYyIFJiTMleo8YaJotBAuEqITizH1CxMS5or1BHGoSpQQTgHrazLFkmoQEjInUqy1dNH9ouRkCsb0r/MLnljsgFxqsUpO/wKtc5yl0616FqvshFXQOs/CNHW1UFHEKj3FvvWiIFhrSi1UFLFKLwoCWleHUabNK8Uqv4wRaL3wGgo1QhKvFMsLrw2ct8MIcinF8lKR/8FYxwFyoSO4mlhe3HYCczluNFRCsE9u1xDLy3FvscZw5Yf31vtgAGM15F2BL68GIY5Y6vVIewh/8uQQKqyZxYogudVILLEiLB+ZNQK8CU6JJRbwhzCXB76fHYx4YvnTvcvCn+5dgKvE+RGsChyJKRaIsKpy9BAO5NtFXLGA+ssVkUM8LGYXscVC7oBGP/VFjBYok4B51ZTYYgEUYO+zaZZE0GR9m/hiASSolmtTBkGT9W1yiAWqy5VIKpBHLFBVLlR/iaQCucQC1RL6BIn6QeQTC6CgKzRF4BwTSgVyijXScyNq4MbPOeQWCyD36KlvMWE+dRD5xQKoLnoYFYFRCkmrvm36EGsEd3rGwYI45g6eUlP6EmsEQ3QzVI944ws0nLglfYo1ghkrEZ9gOKYgs2lY9C3WCKoZzA5WNq5i3ziGzqq8w6gh1hTMYUT70BqSYR/Yl3iBDgX1xJqCpwfai1qJhrwO28I2izyZDqO2WAeB3AdPGLz6jwFZkBch8PP0d/jbzvOlo2CxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQuAuHQWblXH1mCgAAAABJRU5ErkJggg==";function o9e(){const[e,t]=g.useState(!1);return g.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="initial"}),[]),p.jsxs("div",{className:"flex flex-row justify-center h-full w-full relative items-center",children:[p.jsx("img",{src:i9e,className:We("size-20",e&&"hidden")}),p.jsx("img",{src:"/zuplo.apng",className:We("h-20 w-20",!e&&"hidden"),onLoad:()=>t(!0)})]})}const s9e=g.createContext(null);function a9e(e,t){const n=new Set(e.requirements),r={...e.timestamps};switch(t.type){case"add":return n.add(t.id),r[t.id]=Date.now(),{requirements:[...n],timestamps:r};case"remove":return n.delete(t.id),delete r[t.id],{requirements:[...n],timestamps:r};default:throw new Error}}const l9e=({children:e})=>{const[t,n]=g.useReducer(a9e,{requirements:[],timestamps:{}}),r=g.useRef(null),i=g.useRef(new Set),o=g.useCallback(a=>n({type:"add",id:a}),[]),s=g.useCallback(a=>n({type:"remove",id:a}),[]);return g.useEffect(()=>(t.requirements.length>0?r.current=setInterval(()=>{const a=Date.now(),l=2e3;t.requirements.forEach(c=>{const u=t.timestamps[c];u&&a-u>l&&(i.current.has(c)||(console.warn(`🐌 Slow loading detected: "${c}" has been loading for ${Math.round((a-u)/1e3)} seconds`),i.current.add(c)))})},2e3):(r.current&&(clearInterval(r.current),r.current=null),i.current.clear()),()=>{r.current&&clearInterval(r.current)}),[t.requirements,t.timestamps]),p.jsxs(s9e.Provider,{value:{add:o,remove:s},children:[t.requirements.length>0&&p.jsx(o9e,{}),e]})},vte=({slots:e={}}={})=>{const t=new Map(Object.entries(e).map(([r,i])=>[r,[{id:r,content:i,type:"replace",sequence:0}]])),n=[];return rO()((r,i)=>({items:t,sequences:new Map,getItems:o=>i().items.get(o)??n,setSlot:(o,s,a,l)=>r(c=>{if(a==null)return c;const u=new Map(c.items),f=new Map(c.sequences),v=(u.get(s)??[]).filter(b=>b.id!==o),y=(f.get(s)??0)+1;f.set(s,y);const w={id:o,content:a,type:l,sequence:l==="prepend"?-y:y};if(l==="replace"){const b=v.filter(x=>x.type!=="replace");u.set(s,[...b,w])}else u.set(s,[...v,w]);return{items:u,sequences:f}}),clearSlot:(o,s)=>r(a=>{const l=new Map(a.items),c=new Map(a.sequences),f=(l.get(s)??[]).filter(m=>m.id!==o);return f.length===0?(l.delete(s),c.delete(s)):l.set(s,f),{items:l,sequences:c}})}))},c9e=g.createContext(vte()),u9e=({children:e,slots:t})=>{const n=g.useRef(vte({slots:t})).current;return p.jsx(c9e.Provider,{value:n,children:e})},d9e={email:"local@example.com",name:"Local Developer",userId:"local-user-id",asUser:void 0},f9e=({children:e})=>p.jsx(tO.Provider,{value:d9e,children:e}),h9e=new Gfe({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}}),p9e=({children:e})=>p.jsx(p.Fragment,{children:e}),hz=e=>({account:{id:"local",name:"local",label:"Local Development",createdOn:new Date().toISOString(),isSharingEnabled:!1,isMfaEnforced:!1,isSsoAutoJoinEnabled:!1,requireSsoAuth:!1,plan:"FREE_V1",supportPin:void 0,logoUrl:null,entitlements:{customDomains:0,aliasDomains:!1,devPortalZuploBranding:!0,egressGbPerMonth:100,kvStoreEnabled:!0,numberOfApiKeys:100,numberOfProjects:10,numberOfUsers:5,requestsPerMonth:1e6,advancedAnalyticsEnabled:!1,premiumSupport:!1,emergencyPhoneSupport:!1,rbacEnabled:!1,mfaEnforcement:!1,enterpriseSingleSignOn:!1,auditLogsEnabled:!1},customDomainsInUse:0,tenantId:null},project:{sourceControlProvider:"GITHUB",accountName:"local",name:"local-project",productType:"standard",createdOn:new Date().toISOString(),sourceRepoUrl:null,defaultBranch:null,hasWorkingCopy:!0,hasCurrentUserWorkingCopy:!0,deployedEnvironmentCount:0,isProjectMember:!0,id:"local-project-id",type:"managed-edge"},environment:{name:"local",label:"local",urlParameter:"local",createdOn:Date.now(),accountName:"local",projectName:"local-project",state:"STARTED",message:null,branchName:null,environmentType:nd.WORKING_COPY,customDomain:void 0,updatedOn:Date.now(),deploymentVersion:e}});function m9e({children:e}){const[t,n]=g.useState(()=>hz());return g.useEffect(()=>{(async()=>{try{const o=await(await Z_("/deployments/local")).json();n(hz(o.deploymentVersion))}catch(i){Nn.error("Failed to fetch deployment info:",i)}})()},[]),p.jsx(f9e,{children:p.jsx(Kfe,{client:h9e,children:p.jsx(u9e,{children:p.jsx(l9e,{children:p.jsx(X$e,{children:p.jsx(p9e,{children:p.jsx(YW.Provider,{value:t,children:p.jsx(X2e,{children:e})})})})})})})})}const g9e=()=>p.jsx(m9e,{children:p.jsx(hA,{})}),v9e=Pse(Moe),y9e=v9e(foe(p.jsxs(zu,{path:"/",element:p.jsx(g9e,{}),errorElement:p.jsx(Bde,{id:"root"}),children:[p.jsx(zu,{path:"/:account/:project/:environment",element:p.jsx(uFe,{}),children:p.jsxs(zu,{element:p.jsx(mFe,{}),children:[p.jsx(zu,{index:!0,element:p.jsx(r9e,{})}),p.jsx(zu,{path:"edit",element:p.jsx(ULe,{})})]})}),p.jsx(zu,{path:"*",element:p.jsx(Wde,{})})]})));Vh.config({paths:{vs:"/monaco/min/vs"}});window.getAccessTokenSilently=async()=>"local-dev-token";window.addEventListener("unhandledrejection",e=>{var t;((t=e.reason)==null?void 0:t.type)==="cancelation"&&e.preventDefault()});Mre.createRoot(document.getElementById("root")).render(p.jsx(g.StrictMode,{children:p.jsx(g.Suspense,{fallback:null,children:p.jsx(loe,{router:y9e})})}));export{Nn as l};
2074
- //# sourceMappingURL=main-KuPTzIza.js.map
2073
+ deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=o(l);s(l,c),a(l,u)}};function o({schema:l}){const c={},u={};for(const f in l){if(f==="__proto__")continue;const m=Array.isArray(l[f])?c:u;m[f]=l[f]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:f,it:m}=l;if(Object.keys(c).length===0)return;const v=u.let("missing");for(const _ in c){const y=c[_];if(y.length===0)continue;const w=(0,r.propertyInData)(u,f,_,m.opts.ownProperties);l.setParams({property:_,depsCount:y.length,deps:y.join(", ")}),m.allErrors?u.if(w,()=>{for(const b of y)(0,r.checkReportMissingProp)(l,b)}):(u.if((0,t._)`${w} && (${(0,r.checkMissingProp)(l,y,v)})`),(0,r.reportMissingProp)(l,v),u.else())}}e.validatePropertyDeps=s;function a(l,c=l.schema){const{gen:u,data:f,keyword:m,it:v}=l,_=u.name("valid");for(const y in c)(0,n.alwaysValidSchema)(v,c[y])||(u.if((0,r.propertyInData)(u,f,y,v.opts.ownProperties),()=>{const w=l.subschema({keyword:m,schemaProp:y},_);l.mergeValidEvaluated(w,_)},()=>u.var(_,!0)),l.ok(_))}e.validateSchemaDeps=a,e.default=i}(ER)),ER}var qw={},wV;function $De(){if(wV)return qw;wV=1,Object.defineProperty(qw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:s,data:a,it:l}=i;if((0,t.alwaysValidSchema)(l,s))return;const c=o.name("valid");o.forIn("key",a,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},c),o.if((0,e.not)(c),()=>{i.error(!0),l.allErrors||o.break()})}),i.ok(c)}};return qw.default=r,qw}var Hw={},bV;function Tee(){if(bV)return Hw;bV=1,Object.defineProperty(Hw,"__esModule",{value:!0});const e=Vs(),t=Vt(),n=Fs(),r=on(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:l,parentSchema:c,data:u,errsCount:f,it:m}=s;if(!f)throw new Error("ajv implementation error");const{allErrors:v,opts:_}=m;if(m.props=!0,_.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(m,l))return;const y=(0,e.allSchemaProperties)(c.properties),w=(0,e.allSchemaProperties)(c.patternProperties);b(),s.ok((0,t._)`${f} === ${n.default.errors}`);function b(){a.forIn("key",u,C=>{!y.length&&!w.length?$(C):a.if(x(C),()=>$(C))})}function x(C){let T;if(y.length>8){const A=(0,r.schemaRefOrVal)(m,c.properties,"properties");T=(0,e.isOwnProperty)(a,A,C)}else y.length?T=(0,t.or)(...y.map(A=>(0,t._)`${C} === ${A}`)):T=t.nil;return w.length&&(T=(0,t.or)(T,...w.map(A=>(0,t._)`${(0,e.usePattern)(s,A)}.test(${C})`))),(0,t.not)(T)}function S(C){a.code((0,t._)`delete ${u}[${C}]`)}function $(C){if(_.removeAdditional==="all"||_.removeAdditional&&l===!1){S(C);return}if(l===!1){s.setParams({additionalProperty:C}),s.error(),v||a.break();return}if(typeof l=="object"&&!(0,r.alwaysValidSchema)(m,l)){const T=a.name("valid");_.removeAdditional==="failing"?(P(C,T,!1),a.if((0,t.not)(T),()=>{s.reset(),S(C)})):(P(C,T),v||a.if((0,t.not)(T),()=>a.break()))}}function P(C,T,A){const D={keyword:"additionalProperties",dataProp:C,dataPropType:r.Type.Str};A===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(D,T)}}};return Hw.default=o,Hw}var Bw={},xV;function CDe(){if(xV)return Bw;xV=1,Object.defineProperty(Bw,"__esModule",{value:!0});const e=$v(),t=Vs(),n=on(),r=Tee(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:l,data:c,it:u}=o;u.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(u,r.default,"additionalProperties"));const f=(0,t.allSchemaProperties)(a);for(const w of f)u.definedProperties.add(w);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=n.mergeEvaluated.props(s,(0,n.toHash)(f),u.props));const m=f.filter(w=>!(0,n.alwaysValidSchema)(u,a[w]));if(m.length===0)return;const v=s.name("valid");for(const w of m)_(w)?y(w):(s.if((0,t.propertyInData)(s,c,w,u.opts.ownProperties)),y(w),u.allErrors||s.else().var(v,!0),s.endIf()),o.it.definedProperties.add(w),o.ok(v);function _(w){return u.opts.useDefaults&&!u.compositeRule&&a[w].default!==void 0}function y(w){o.subschema({keyword:"properties",schemaProp:w,dataProp:w},v)}}};return Bw.default=i,Bw}var Ww={},_V;function PDe(){if(_V)return Ww;_V=1,Object.defineProperty(Ww,"__esModule",{value:!0});const e=Vs(),t=Vt(),n=on(),r=on(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:l,parentSchema:c,it:u}=o,{opts:f}=u,m=(0,e.allSchemaProperties)(a),v=m.filter($=>(0,n.alwaysValidSchema)(u,a[$]));if(m.length===0||v.length===m.length&&(!u.opts.unevaluated||u.props===!0))return;const _=f.strictSchema&&!f.allowMatchingProperties&&c.properties,y=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,r.evaluatedPropsToName)(s,u.props));const{props:w}=u;b();function b(){for(const $ of m)_&&x($),u.allErrors?S($):(s.var(y,!0),S($),s.if(y))}function x($){for(const P in _)new RegExp($).test(P)&&(0,n.checkStrictMode)(u,`property ${P} matches pattern ${$} (use allowMatchingProperties)`)}function S($){s.forIn("key",l,P=>{s.if((0,t._)`${(0,e.usePattern)(o,$)}.test(${P})`,()=>{const C=v.includes($);C||o.subschema({keyword:"patternProperties",schemaProp:$,dataProp:P,dataPropType:r.Type.Str},y),u.opts.unevaluated&&w!==!0?s.assign((0,t._)`${w}[${P}]`,!0):!C&&!u.allErrors&&s.if((0,t.not)(y),()=>s.break())})})}}};return Ww.default=i,Ww}var Gw={},EV;function RDe(){if(EV)return Gw;EV=1,Object.defineProperty(Gw,"__esModule",{value:!0});const e=on(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:o}=n;if((0,e.alwaysValidSchema)(o,i)){n.fail();return}const s=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),n.failResult(s,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Gw.default=t,Gw}var Kw={},SV;function TDe(){if(SV)return Kw;SV=1,Object.defineProperty(Kw,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Vs().validateUnion,error:{message:"must match a schema in anyOf"}};return Kw.default=t,Kw}var Zw={},$V;function NDe(){if($V)return Zw;$V=1,Object.defineProperty(Zw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:s,parentSchema:a,it:l}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(l.opts.discriminator&&a.discriminator)return;const c=s,u=o.let("valid",!1),f=o.let("passing",null),m=o.name("_valid");i.setParams({passing:f}),o.block(v),i.result(u,()=>i.reset(),()=>i.error(!0));function v(){c.forEach((_,y)=>{let w;(0,t.alwaysValidSchema)(l,_)?o.var(m,!0):w=i.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},m),y>0&&o.if((0,e._)`${m} && ${u}`).assign(u,!1).assign(f,(0,e._)`[${f}, ${y}]`).else(),o.if(m,()=>{o.assign(u,!0),o.assign(f,y),w&&i.mergeEvaluated(w,e.Name)})})}}};return Zw.default=r,Zw}var Yw={},CV;function ADe(){if(CV)return Yw;CV=1,Object.defineProperty(Yw,"__esModule",{value:!0});const e=on(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:o}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=r.name("valid");i.forEach((a,l)=>{if((0,e.alwaysValidSchema)(o,a))return;const c=n.subschema({keyword:"allOf",schemaProp:l},s);n.ok(s),n.mergeEvaluated(c)})}};return Yw.default=t,Yw}var Xw={},PV;function jDe(){if(PV)return Xw;PV=1,Object.defineProperty(Xw,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:l}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const c=i(l,"then"),u=i(l,"else");if(!c&&!u)return;const f=s.let("valid",!0),m=s.name("_valid");if(v(),o.reset(),c&&u){const y=s.let("ifClause");o.setParams({ifClause:y}),s.if(m,_("then",y),_("else",y))}else c?s.if(m,_("then")):s.if((0,e.not)(m),_("else"));o.pass(f,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);o.mergeEvaluated(y)}function _(y,w){return()=>{const b=o.subschema({keyword:y},m);s.assign(f,m),o.mergeValidEvaluated(b,f),w?s.assign(w,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function i(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Xw.default=r,Xw}var Qw={},RV;function ODe(){if(RV)return Qw;RV=1,Object.defineProperty(Qw,"__esModule",{value:!0});const e=on(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return Qw.default=t,Qw}var TV;function Nee(){if(TV)return Fw;TV=1,Object.defineProperty(Fw,"__esModule",{value:!0});const e=Pee(),t=_De(),n=Ree(),r=EDe(),i=SDe(),o=jk(),s=$De(),a=Tee(),l=CDe(),c=PDe(),u=RDe(),f=TDe(),m=NDe(),v=ADe(),_=jDe(),y=ODe();function w(b=!1){const x=[u.default,f.default,m.default,v.default,_.default,y.default,s.default,a.default,o.default,l.default,c.default];return b?x.push(t.default,r.default):x.push(e.default,n.default),x.push(i.default),x}return Fw.default=w,Fw}var Jw={},eb={},NV;function kDe(){if(NV)return eb;NV=1,Object.defineProperty(eb,"__esModule",{value:!0});const e=Vt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,i){const{gen:o,data:s,$data:a,schema:l,schemaCode:c,it:u}=r,{opts:f,errSchemaPath:m,schemaEnv:v,self:_}=u;if(!f.validateFormats)return;a?y():w();function y(){const b=o.scopeValue("formats",{ref:_.formats,code:f.code.formats}),x=o.const("fDef",(0,e._)`${b}[${c}]`),S=o.let("fType"),$=o.let("format");o.if((0,e._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>o.assign(S,(0,e._)`${x}.type || "string"`).assign($,(0,e._)`${x}.validate`),()=>o.assign(S,(0,e._)`"string"`).assign($,x)),r.fail$data((0,e.or)(P(),C()));function P(){return f.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function C(){const T=v.$async?(0,e._)`(${x}.async ? await ${$}(${s}) : ${$}(${s}))`:(0,e._)`${$}(${s})`,A=(0,e._)`(typeof ${$} == "function" ? ${T} : ${$}.test(${s}))`;return(0,e._)`${$} && ${$} !== true && ${S} === ${i} && !${A}`}}function w(){const b=_.formats[l];if(!b){P();return}if(b===!0)return;const[x,S,$]=C(b);x===i&&r.pass(T());function P(){if(f.strictSchema===!1){_.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${l}" ignored in schema at path "${m}"`}}function C(A){const D=A instanceof RegExp?(0,e.regexpCode)(A):f.code.formats?(0,e._)`${f.code.formats}${(0,e.getProperty)(l)}`:void 0,z=o.scopeValue("formats",{key:l,ref:A,code:D});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,e._)`${z}.validate`]:["string",A,z]}function T(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${s})`}return typeof S=="function"?(0,e._)`${$}(${s})`:(0,e._)`${$}.test(${s})`}}}};return eb.default=n,eb}var AV;function Aee(){if(AV)return Jw;AV=1,Object.defineProperty(Jw,"__esModule",{value:!0});const t=[kDe().default];return Jw.default=t,Jw}var Vu={},jV;function jee(){return jV||(jV=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.contentVocabulary=Vu.metadataVocabulary=void 0,Vu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vu}var OV;function IDe(){if(OV)return Ew;OV=1,Object.defineProperty(Ew,"__esModule",{value:!0});const e=$ee(),t=Cee(),n=Nee(),r=Aee(),i=jee(),o=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return Ew.default=o,Ew}var tb={},SR={},kV;function MDe(){return kV||(kV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))}(SR)),SR}var IV;function Oee(){if(IV)return tb;IV=1,Object.defineProperty(tb,"__esModule",{value:!0});const e=Vt(),t=MDe(),n=W2(),r=on(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:a}})=>s===t.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:s,tag:a,tagName:l}})=>(0,e._)`{error: ${s}, tag: ${l}, tagValue: ${a}}`},code(s){const{gen:a,data:l,schema:c,parentSchema:u,it:f}=s,{oneOf:m}=u;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const v=c.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const _=a.let("valid",!1),y=a.const("tag",(0,e._)`${l}${(0,e.getProperty)(v)}`);a.if((0,e._)`typeof ${y} == "string"`,()=>w(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:y,tagName:v})),s.ok(_);function w(){const S=x();a.if(!1);for(const $ in S)a.elseIf((0,e._)`${y} === ${$}`),a.assign(_,b(S[$]));a.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:y,tagName:v}),a.endIf()}function b(S){const $=a.name("valid"),P=s.subschema({keyword:"oneOf",schemaProp:S},$);return s.mergeEvaluated(P,e.Name),$}function x(){var S;const $={},P=T(u);let C=!0;for(let z=0;z<m.length;z++){let K=m[z];K!=null&&K.$ref&&!(0,r.schemaHasRulesButRef)(K,f.self.RULES)&&(K=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,K==null?void 0:K.$ref),K instanceof n.SchemaEnv&&(K=K.schema));const B=(S=K==null?void 0:K.properties)===null||S===void 0?void 0:S[v];if(typeof B!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);C=C&&(P||T(K)),A(B,z)}if(!C)throw new Error(`discriminator: "${v}" must be required`);return $;function T({required:z}){return Array.isArray(z)&&z.includes(v)}function A(z,K){if(z.const)D(z.const,K);else if(z.enum)for(const B of z.enum)D(B,K);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function D(z,K){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${v}" values must be unique strings`);$[z]=K}}}};return tb.default=o,tb}const DDe="http://json-schema.org/draft-07/schema#",LDe="http://json-schema.org/draft-07/schema#",FDe="Core schema meta-schema",VDe={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:[]}},zDe=["object","boolean"],UDe={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},qDe={$schema:DDe,$id:LDe,title:FDe,definitions:VDe,type:zDe,properties:UDe,default:!0};var MV;function HDe(){return MV||(MV=1,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=void 0;const n=See(),r=IDe(),i=Oee(),o=qDe,s=["/properties"],a="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(_,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=$v();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=Vt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=H2();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var m=B2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(yw,yw.exports)),yw.exports}var DV;function BDe(){return DV||(DV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=HDe(),n=Vt(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},o={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(a){const{gen:l,data:c,schemaCode:u,keyword:f,it:m}=a,{opts:v,self:_}=m;if(!v.validateFormats)return;const y=new t.KeywordCxt(m,_.RULES.all.format.definition,"format");y.$data?w():b();function w(){const S=l.scopeValue("formats",{ref:_.formats,code:v.code.formats}),$=l.const("fmt",n._`${S}[${y.schemaCode}]`);a.fail$data(n.or(n._`typeof ${$} != "object"`,n._`${$} instanceof RegExp`,n._`typeof ${$}.compare != "function"`,x($)))}function b(){const S=y.schema,$=_.formats[S];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${f}": format "${S}" does not define "compare" function`);const P=l.scopeValue("formats",{key:S,ref:$,code:v.code.formats?n._`${v.code.formats}${n.getProperty(S)}`:void 0});a.fail$data(x(P))}function x(S){return n._`${S}.compare(${c}, ${u}) ${i[f].fail} 0`}},dependencies:["format"]};const s=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=s}(mR)),mR}var LV;function WDe(){return LV||(LV=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Z3e(),r=BDe(),i=Vt(),o=new i.Name("fullFormats"),s=new i.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return l(c,u,n.fullFormats,o),c;const[f,m]=u.mode==="fast"?[n.fastFormats,s]:[n.fullFormats,o],v=u.formats||n.formatNames;return l(c,v,f,m),u.keywords&&r.default(c),c};a.get=(c,u="full")=>{const m=(u==="fast"?n.fastFormats:n.fullFormats)[c];if(!m)throw new Error(`Unknown format "${c}"`);return m};function l(c,u,f,m){var v,_;(v=(_=c.opts.code).formats)!==null&&v!==void 0||(_.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const y of u)c.addFormat(y,f[y])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(vw,vw.exports)),vw.exports}var nb={exports:{}},rb={},ib={},Bf={},FV;function kee(){if(FV)return Bf;FV=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.dynamicAnchor=void 0;const e=Vt(),t=Fs(),n=W2(),r=Nk(),i={keyword:"$dynamicAnchor",schemaType:"string",code:a=>o(a,a.schema)};function o(a,l){const{gen:c,it:u}=a;u.schemaEnv.root.dynamicAnchors[l]=!0;const f=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`,m=u.errSchemaPath==="#"?u.validateName:s(a);c.if((0,e._)`!${f}`,()=>c.assign(f,m))}Bf.dynamicAnchor=o;function s(a){const{schemaEnv:l,schema:c,self:u}=a.it,{root:f,baseId:m,localRefs:v,meta:_}=l.root,{schemaId:y}=u.opts,w=new n.SchemaEnv({schema:c,schemaId:y,root:f,baseId:m,localRefs:v,meta:_});return n.compileSchema.call(u,w),(0,r.getValidate)(a,w)}return Bf.default=i,Bf}var Wf={},VV;function Iee(){if(VV)return Wf;VV=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.dynamicRef=void 0;const e=Vt(),t=Fs(),n=Nk(),r={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,s){const{gen:a,keyword:l,it:c}=o;if(s[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);const u=s.slice(1);if(c.allErrors)f();else{const v=a.let("valid",!1);f(v),o.ok(v)}function f(v){if(c.schemaEnv.root.dynamicAnchors[u]){const _=a.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);a.if(_,m(_,v),m(c.validateName,v))}else m(c.validateName,v)()}function m(v,_){return _?()=>a.block(()=>{(0,n.callRef)(o,v),a.let(_,!0)}):()=>(0,n.callRef)(o,v)}}return Wf.dynamicRef=i,Wf.default=r,Wf}var ob={},zV;function GDe(){if(zV)return ob;zV=1,Object.defineProperty(ob,"__esModule",{value:!0});const e=kee(),t=on(),n={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return ob.default=n,ob}var sb={},UV;function KDe(){if(UV)return sb;UV=1,Object.defineProperty(sb,"__esModule",{value:!0});const e=Iee(),t={keyword:"$recursiveRef",schemaType:"string",code:n=>(0,e.dynamicRef)(n,n.schema)};return sb.default=t,sb}var qV;function ZDe(){if(qV)return ib;qV=1,Object.defineProperty(ib,"__esModule",{value:!0});const e=kee(),t=Iee(),n=GDe(),r=KDe(),i=[e.default,t.default,n.default,r.default];return ib.default=i,ib}var ab={},lb={},HV;function YDe(){if(HV)return lb;HV=1,Object.defineProperty(lb,"__esModule",{value:!0});const e=jk(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:n=>(0,e.validatePropertyDeps)(n)};return lb.default=t,lb}var cb={},BV;function XDe(){if(BV)return cb;BV=1,Object.defineProperty(cb,"__esModule",{value:!0});const e=jk(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:n=>(0,e.validateSchemaDeps)(n)};return cb.default=t,cb}var ub={},WV;function QDe(){if(WV)return ub;WV=1,Object.defineProperty(ub,"__esModule",{value:!0});const e=on(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:n,parentSchema:r,it:i}){r.contains===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "contains" is ignored`)}};return ub.default=t,ub}var GV;function JDe(){if(GV)return ab;GV=1,Object.defineProperty(ab,"__esModule",{value:!0});const e=YDe(),t=XDe(),n=QDe(),r=[e.default,t.default,n.default];return ab.default=r,ab}var db={},fb={},KV;function e5e(){if(KV)return fb;KV=1,Object.defineProperty(fb,"__esModule",{value:!0});const e=Vt(),t=on(),n=Fs(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:s,schema:a,data:l,errsCount:c,it:u}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:f,props:m}=u;m instanceof e.Name?s.if((0,e._)`${m} !== true`,()=>s.forIn("key",l,w=>s.if(_(m,w),()=>v(w)))):m!==!0&&s.forIn("key",l,w=>m===void 0?v(w):s.if(y(m,w),()=>v(w))),u.props=!0,o.ok((0,e._)`${c} === ${n.default.errors}`);function v(w){if(a===!1){o.setParams({unevaluatedProperty:w}),o.error(),f||s.break();return}if(!(0,t.alwaysValidSchema)(u,a)){const b=s.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:w,dataPropType:t.Type.Str},b),f||s.if((0,e.not)(b),()=>s.break())}}function _(w,b){return(0,e._)`!${w} || !${w}[${b}]`}function y(w,b){const x=[];for(const S in w)w[S]===!0&&x.push((0,e._)`${b} !== ${S}`);return(0,e.and)(...x)}}};return fb.default=i,fb}var hb={},ZV;function t5e(){if(ZV)return hb;ZV=1,Object.defineProperty(hb,"__esModule",{value:!0});const e=Vt(),t=on(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:o,schema:s,data:a,it:l}=i,c=l.items||0;if(c===!0)return;const u=o.const("len",(0,e._)`${a}.length`);if(s===!1)i.setParams({len:c}),i.fail((0,e._)`${u} > ${c}`);else if(typeof s=="object"&&!(0,t.alwaysValidSchema)(l,s)){const m=o.var("valid",(0,e._)`${u} <= ${c}`);o.if((0,e.not)(m),()=>f(m,c)),i.ok(m)}l.items=!0;function f(m,v){o.forRange("i",v,u,_=>{i.subschema({keyword:"unevaluatedItems",dataProp:_,dataPropType:t.Type.Num},m),l.allErrors||o.if((0,e.not)(m),()=>o.break())})}}};return hb.default=r,hb}var YV;function n5e(){if(YV)return db;YV=1,Object.defineProperty(db,"__esModule",{value:!0});const e=e5e(),t=t5e(),n=[e.default,t.default];return db.default=n,db}var XV;function r5e(){if(XV)return rb;XV=1,Object.defineProperty(rb,"__esModule",{value:!0});const e=$ee(),t=Cee(),n=Nee(),r=ZDe(),i=JDe(),o=n5e(),s=Aee(),a=jee(),l=[r.default,e.default,t.default,(0,n.default)(!0),s.default,a.metadataVocabulary,a.contentVocabulary,i.default,o.default];return rb.default=l,rb}var pb={};const i5e="https://json-schema.org/draft/2020-12/schema",o5e="https://json-schema.org/draft/2020-12/schema",s5e={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},a5e="meta",l5e="Core and Validation specifications meta-schema",c5e=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],u5e=["object","boolean"],d5e="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",f5e={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},h5e={$schema:i5e,$id:o5e,$vocabulary:s5e,$dynamicAnchor:a5e,title:l5e,allOf:c5e,type:u5e,$comment:d5e,properties:f5e},p5e="https://json-schema.org/draft/2020-12/schema",m5e="https://json-schema.org/draft/2020-12/meta/applicator",g5e={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},v5e="meta",y5e="Applicator vocabulary meta-schema",w5e=["object","boolean"],b5e={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},x5e={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},_5e={$schema:p5e,$id:m5e,$vocabulary:g5e,$dynamicAnchor:v5e,title:y5e,type:w5e,properties:b5e,$defs:x5e},E5e="https://json-schema.org/draft/2020-12/schema",S5e="https://json-schema.org/draft/2020-12/meta/unevaluated",$5e={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},C5e="meta",P5e="Unevaluated applicator vocabulary meta-schema",R5e=["object","boolean"],T5e={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},N5e={$schema:E5e,$id:S5e,$vocabulary:$5e,$dynamicAnchor:C5e,title:P5e,type:R5e,properties:T5e},A5e="https://json-schema.org/draft/2020-12/schema",j5e="https://json-schema.org/draft/2020-12/meta/content",O5e={"https://json-schema.org/draft/2020-12/vocab/content":!0},k5e="meta",I5e="Content vocabulary meta-schema",M5e=["object","boolean"],D5e={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},L5e={$schema:A5e,$id:j5e,$vocabulary:O5e,$dynamicAnchor:k5e,title:I5e,type:M5e,properties:D5e},F5e="https://json-schema.org/draft/2020-12/schema",V5e="https://json-schema.org/draft/2020-12/meta/core",z5e={"https://json-schema.org/draft/2020-12/vocab/core":!0},U5e="meta",q5e="Core vocabulary meta-schema",H5e=["object","boolean"],B5e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},W5e={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},G5e={$schema:F5e,$id:V5e,$vocabulary:z5e,$dynamicAnchor:U5e,title:q5e,type:H5e,properties:B5e,$defs:W5e},K5e="https://json-schema.org/draft/2020-12/schema",Z5e="https://json-schema.org/draft/2020-12/meta/format-annotation",Y5e={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},X5e="meta",Q5e="Format vocabulary meta-schema for annotation results",J5e=["object","boolean"],eLe={format:{type:"string"}},tLe={$schema:K5e,$id:Z5e,$vocabulary:Y5e,$dynamicAnchor:X5e,title:Q5e,type:J5e,properties:eLe},nLe="https://json-schema.org/draft/2020-12/schema",rLe="https://json-schema.org/draft/2020-12/meta/meta-data",iLe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},oLe="meta",sLe="Meta-data vocabulary meta-schema",aLe=["object","boolean"],lLe={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}},cLe={$schema:nLe,$id:rLe,$vocabulary:iLe,$dynamicAnchor:oLe,title:sLe,type:aLe,properties:lLe},uLe="https://json-schema.org/draft/2020-12/schema",dLe="https://json-schema.org/draft/2020-12/meta/validation",fLe={"https://json-schema.org/draft/2020-12/vocab/validation":!0},hLe="meta",pLe="Validation vocabulary meta-schema",mLe=["object","boolean"],gLe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},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"}}},vLe={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:[]}},yLe={$schema:uLe,$id:dLe,$vocabulary:fLe,$dynamicAnchor:hLe,title:pLe,type:mLe,properties:gLe,$defs:vLe};var QV;function wLe(){if(QV)return pb;QV=1,Object.defineProperty(pb,"__esModule",{value:!0});const e=h5e,t=_5e,n=N5e,r=L5e,i=G5e,o=tLe,s=cLe,a=yLe,l=["/properties"];function c(u){return[e,t,n,r,i,f(this,o),s,f(this,a)].forEach(m=>this.addMetaSchema(m,void 0,!1)),this;function f(m,v){return u?m.$dataMetaSchema(v,l):v}}return pb.default=c,pb}var JV;function bLe(){return JV||(JV=1,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=void 0;const n=See(),r=r5e(),i=Oee(),o=wLe(),s="https://json-schema.org/draft/2020-12/schema";class a extends n.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:_}=this.opts;_&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=$v();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Vt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var u=H2();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=B2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(nb,nb.exports)),nb.exports}var ez;function xLe(){var i;if(ez)return Du;ez=1;var e=Du&&Du.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Du,"__esModule",{value:!0}),Du.JsonValidator=void 0;const t=e(WDe()),n=e(bLe()),o=class o{constructor(){et(this,"ajv");this.ajv=new n.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,t.default)(this.ajv,{mode:"fast"})}static get instance(){return G(o,i)}addSchema(a,l){this.ajv.addSchema(a,l)}compile(a){const l=this.ajv.compile(a);return u=>({isValid:l(u),errors:this.toSimpleErrors(l.errors,u),warnings:[]})}toSimpleErrors(a,l){const c=[];return a==null||a.forEach(u=>{u.keyword==="enum"&&u.params.allowedValues&&Array.isArray(u.params.allowedValues)&&(u.message+=`; ${u.params.allowedValues.join(", ")}`),u.instancePath&&(u.instancePath=u.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let f={details:{}};const m=u.instancePath.split("/");if(m.length>2){const _=m[1],y=m[2]?parseInt(m[2]):0,w=m[3],b=isNaN(y)?void 0:l[_][y][w];f={details:{property:_,index:y,field:w,fieldValue:b}}}if(u.keyword==="required"&&u.params.missingProperty&&u.instancePath&&(u.message=`A 'path' is missing required property '${u.params.missingProperty}'`),u.keyword==="additionalProperties"&&u.params.additionalProperty&&u.instancePath&&(u.message=`A 'path' should NOT include property '${u.params.additionalProperty}'`),u.keyword==="type"&&u.params.type&&u.instancePath){const _=u.instancePath.split("/"),y=_[_.length-1];u.message=`Value of property '${y}' must be '${u.params.type}'`}const v=Object.assign(u,f);c.push(v)}),c}};i=new WeakMap,Je(o,i,new o);let r=o;return Du.JsonValidator=r,Du}var $R,tz;function _Le(){var kt,ct,Bt,ht,Jt,Kt,Xt,en,Pn,sn,Le,Or,Mee,XN,_0,zb,Uo,QN,Dee,Ub,Lee,Fee,qb,Jf,Gu,Vee,zee,Uee,qee,Xs,Hee,tt,se,ee,le,we,be,ke,ze;if(tz)return $R;tz=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(X,me)=>{for(var Ee in me)e(X,Ee,{get:me[Ee],enumerable:!0})},o=(X,me,Ee,Pe)=>{if(me&&typeof me=="object"||typeof me=="function")for(let Ve of n(me))!r.call(X,Ve)&&Ve!==Ee&&e(X,Ve,{get:()=>me[Ve],enumerable:!(Pe=t(me,Ve))||Pe.enumerable});return X},s=X=>o(e({},"__esModule",{value:!0}),X),a={};i(a,{URLPattern:()=>Et}),$R=s(a);var l=class{constructor(X,me,Ee,Pe,Ve,st){et(this,"type",3);et(this,"name","");et(this,"prefix","");et(this,"value","");et(this,"suffix","");et(this,"modifier",3);this.type=X,this.name=me,this.prefix=Ee,this.value=Pe,this.suffix=Ve,this.modifier=st}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},c=/[$_\p{ID_Start}]/u,u=/[$_\u200C\u200D\p{ID_Continue}]/u,f=".*";function m(X,me){return/^[\x00-\x7F]*$/.test(X)}function v(X,me=!1){let Ee=[],Pe=0;for(;Pe<X.length;){let Ve=X[Pe],st=function(Ue){if(!me)throw new TypeError(Ue);Ee.push({type:"INVALID_CHAR",index:Pe,value:X[Pe++]})};if(Ve==="*"){Ee.push({type:"ASTERISK",index:Pe,value:X[Pe++]});continue}if(Ve==="+"||Ve==="?"){Ee.push({type:"OTHER_MODIFIER",index:Pe,value:X[Pe++]});continue}if(Ve==="\\"){Ee.push({type:"ESCAPED_CHAR",index:Pe++,value:X[Pe++]});continue}if(Ve==="{"){Ee.push({type:"OPEN",index:Pe,value:X[Pe++]});continue}if(Ve==="}"){Ee.push({type:"CLOSE",index:Pe,value:X[Pe++]});continue}if(Ve===":"){let Ue="",Ne=Pe+1;for(;Ne<X.length;){let Ke=X.substr(Ne,1);if(Ne===Pe+1&&c.test(Ke)||Ne!==Pe+1&&u.test(Ke)){Ue+=X[Ne++];continue}break}if(!Ue){st(`Missing parameter name at ${Pe}`);continue}Ee.push({type:"NAME",index:Pe,value:Ue}),Pe=Ne;continue}if(Ve==="("){let Ue=1,Ne="",Ke=Pe+1,at=!1;if(X[Ke]==="?"){st(`Pattern cannot start with "?" at ${Ke}`);continue}for(;Ke<X.length;){if(!m(X[Ke])){st(`Invalid character '${X[Ke]}' at ${Ke}.`),at=!0;break}if(X[Ke]==="\\"){Ne+=X[Ke++]+X[Ke++];continue}if(X[Ke]===")"){if(Ue--,Ue===0){Ke++;break}}else if(X[Ke]==="("&&(Ue++,X[Ke+1]!=="?")){st(`Capturing groups are not allowed at ${Ke}`),at=!0;break}Ne+=X[Ke++]}if(at)continue;if(Ue){st(`Unbalanced pattern at ${Pe}`);continue}if(!Ne){st(`Missing pattern at ${Pe}`);continue}Ee.push({type:"REGEX",index:Pe,value:Ne}),Pe=Ke;continue}Ee.push({type:"CHAR",index:Pe,value:X[Pe++]})}return Ee.push({type:"END",index:Pe,value:""}),Ee}function _(X,me={}){let Ee=v(X);me.delimiter??(me.delimiter="/#?"),me.prefixes??(me.prefixes="./");let Pe=`[^${y(me.delimiter)}]+?`,Ve=[],st=0,Ue=0,Ne=new Set,Ke=pt=>{if(Ue<Ee.length&&Ee[Ue].type===pt)return Ee[Ue++].value},at=()=>Ke("OTHER_MODIFIER")??Ke("ASTERISK"),Tt=pt=>{let wn=Ke(pt);if(wn!==void 0)return wn;let{type:pn,index:_i}=Ee[Ue];throw new TypeError(`Unexpected ${pn} at ${_i}, expected ${pt}`)},hn=()=>{let pt="",wn;for(;wn=Ke("CHAR")??Ke("ESCAPED_CHAR");)pt+=wn;return pt},jn=pt=>pt,pr=me.encodePart||jn,Nt="",tn=pt=>{Nt+=pt},dn=()=>{Nt.length&&(Ve.push(new l(3,"","",pr(Nt),"",3)),Nt="")},kn=(pt,wn,pn,_i,Jr)=>{let br=3;switch(Jr){case"?":br=1;break;case"*":br=0;break;case"+":br=2;break}if(!wn&&!pn&&br===3){tn(pt);return}if(dn(),!wn&&!pn){if(!pt)return;Ve.push(new l(3,"","",pr(pt),"",br));return}let In;pn?pn==="*"?In=f:In=pn:In=Pe;let Ei=2;In===Pe?(Ei=1,In=""):In===f&&(Ei=0,In="");let Tr;if(wn?Tr=wn:pn&&(Tr=st++),Ne.has(Tr))throw new TypeError(`Duplicate name '${Tr}'.`);Ne.add(Tr),Ve.push(new l(Ei,Tr,pr(pt),In,pr(_i),br))};for(;Ue<Ee.length;){let pt=Ke("CHAR"),wn=Ke("NAME"),pn=Ke("REGEX");if(!wn&&!pn&&(pn=Ke("ASTERISK")),wn||pn){let Jr=pt??"";me.prefixes.indexOf(Jr)===-1&&(tn(Jr),Jr=""),dn();let br=at();kn(Jr,wn,pn,"",br);continue}let _i=pt??Ke("ESCAPED_CHAR");if(_i){tn(_i);continue}if(Ke("OPEN")){let Jr=hn(),br=Ke("NAME"),In=Ke("REGEX");!br&&!In&&(In=Ke("ASTERISK"));let Ei=hn();Tt("CLOSE");let Tr=at();kn(Jr,br,In,Ei,Tr);continue}dn(),Tt("END")}return Ve}function y(X){return X.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function w(X){return X&&X.ignoreCase?"ui":"u"}function b(X,me,Ee){return S(_(X,Ee),me,Ee)}function x(X){switch(X){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function S(X,me,Ee={}){Ee.delimiter??(Ee.delimiter="/#?"),Ee.prefixes??(Ee.prefixes="./"),Ee.sensitive??(Ee.sensitive=!1),Ee.strict??(Ee.strict=!1),Ee.end??(Ee.end=!0),Ee.start??(Ee.start=!0),Ee.endsWith="";let Pe=Ee.start?"^":"";for(let Ne of X){if(Ne.type===3){Ne.modifier===3?Pe+=y(Ne.value):Pe+=`(?:${y(Ne.value)})${x(Ne.modifier)}`;continue}me&&me.push(Ne.name);let Ke=`[^${y(Ee.delimiter)}]+?`,at=Ne.value;if(Ne.type===1?at=Ke:Ne.type===0&&(at=f),!Ne.prefix.length&&!Ne.suffix.length){Ne.modifier===3||Ne.modifier===1?Pe+=`(${at})${x(Ne.modifier)}`:Pe+=`((?:${at})${x(Ne.modifier)})`;continue}if(Ne.modifier===3||Ne.modifier===1){Pe+=`(?:${y(Ne.prefix)}(${at})${y(Ne.suffix)})`,Pe+=x(Ne.modifier);continue}Pe+=`(?:${y(Ne.prefix)}`,Pe+=`((?:${at})(?:`,Pe+=y(Ne.suffix),Pe+=y(Ne.prefix),Pe+=`(?:${at}))*)${y(Ne.suffix)})`,Ne.modifier===0&&(Pe+="?")}let Ve=`[${y(Ee.endsWith)}]|$`,st=`[${y(Ee.delimiter)}]`;if(Ee.end)return Ee.strict||(Pe+=`${st}?`),Ee.endsWith.length?Pe+=`(?=${Ve})`:Pe+="$",new RegExp(Pe,w(Ee));Ee.strict||(Pe+=`(?:${st}(?=${Ve}))?`);let Ue=!1;if(X.length){let Ne=X[X.length-1];Ne.type===3&&Ne.modifier===3&&(Ue=Ee.delimiter.indexOf(Ne)>-1)}return Ue||(Pe+=`(?=${st}|${Ve})`),new RegExp(Pe,w(Ee))}var $={delimiter:"",prefixes:"",sensitive:!0,strict:!0},P={delimiter:".",prefixes:"",sensitive:!0,strict:!0},C={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function T(X,me){return X.length?X[0]==="/"?!0:!me||X.length<2?!1:(X[0]=="\\"||X[0]=="{")&&X[1]=="/":!1}function A(X,me){return X.startsWith(me)?X.substring(me.length,X.length):X}function D(X,me){return X.endsWith(me)?X.substr(0,X.length-me.length):X}function z(X){return!X||X.length<2?!1:X[0]==="["||(X[0]==="\\"||X[0]==="{")&&X[1]==="["}var K=["ftp","file","http","https","ws","wss"];function B(X){if(!X)return!0;for(let me of K)if(X.test(me))return!0;return!1}function te(X,me){if(X=A(X,"#"),me||X==="")return X;let Ee=new URL("https://example.com");return Ee.hash=X,Ee.hash?Ee.hash.substring(1,Ee.hash.length):""}function J(X,me){if(X=A(X,"?"),me||X==="")return X;let Ee=new URL("https://example.com");return Ee.search=X,Ee.search?Ee.search.substring(1,Ee.search.length):""}function oe(X,me){return me||X===""?X:z(X)?q(X):I(X)}function fe(X,me){if(me||X==="")return X;let Ee=new URL("https://example.com");return Ee.password=X,Ee.password}function ye(X,me){if(me||X==="")return X;let Ee=new URL("https://example.com");return Ee.username=X,Ee.username}function ae(X,me,Ee){if(Ee||X==="")return X;if(me&&!K.includes(me))return new URL(`${me}:${X}`).pathname;let Pe=X[0]=="/";return X=new URL(Pe?X:"/-"+X,"https://example.com").pathname,Pe||(X=X.substring(2,X.length)),X}function ue(X,me,Ee){return k(me)===X&&(X=""),Ee||X===""?X:Z(X)}function Q(X,me){return X=D(X,":"),me||X===""?X:L(X)}function k(X){switch(X){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function L(X){if(X==="")return X;if(/^[-+.A-Za-z0-9]*$/.test(X))return X.toLowerCase();throw new TypeError(`Invalid protocol '${X}'.`)}function F(X){if(X==="")return X;let me=new URL("https://example.com");return me.username=X,me.username}function N(X){if(X==="")return X;let me=new URL("https://example.com");return me.password=X,me.password}function I(X){if(X==="")return X;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(X))throw new TypeError(`Invalid hostname '${X}'`);let me=new URL("https://example.com");return me.hostname=X,me.hostname}function q(X){if(X==="")return X;if(/[^0-9a-fA-F[\]:]/g.test(X))throw new TypeError(`Invalid IPv6 hostname '${X}'`);return X.toLowerCase()}function Z(X){if(X===""||/^[0-9]*$/.test(X)&&parseInt(X)<=65535)return X;throw new TypeError(`Invalid port '${X}'.`)}function ne(X){if(X==="")return X;let me=new URL("https://example.com");return me.pathname=X[0]!=="/"?"/-"+X:X,X[0]!=="/"?me.pathname.substring(2,me.pathname.length):me.pathname}function de(X){return X===""?X:new URL(`data:${X}`).pathname}function ce(X){if(X==="")return X;let me=new URL("https://example.com");return me.search=X,me.search.substring(1,me.search.length)}function H(X){if(X==="")return X;let me=new URL("https://example.com");return me.hash=X,me.hash.substring(1,me.hash.length)}var W=(tt=class{constructor(X){Je(this,Le);Je(this,kt);Je(this,ct,[]);Je(this,Bt,{});Je(this,ht,0);Je(this,Jt,1);Je(this,Kt,0);Je(this,Xt,0);Je(this,en,0);Je(this,Pn,0);Je(this,sn,!1);Fe(this,kt,X)}get result(){return G(this,Bt)}parse(){for(Fe(this,ct,v(G(this,kt),!0));G(this,ht)<G(this,ct).length;Fe(this,ht,G(this,ht)+G(this,Jt))){if(Fe(this,Jt,1),G(this,ct)[G(this,ht)].type==="END"){if(G(this,Xt)===0){Me(this,Le,XN).call(this),Me(this,Le,Gu).call(this)?Me(this,Le,Or).call(this,9,1):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Or).call(this,7,0);continue}else if(G(this,Xt)===2){Me(this,Le,_0).call(this,5);continue}Me(this,Le,Or).call(this,10,0);break}if(G(this,en)>0)if(Me(this,Le,zee).call(this))Fe(this,en,G(this,en)-1);else continue;if(Me(this,Le,Vee).call(this)){Fe(this,en,G(this,en)+1);continue}switch(G(this,Xt)){case 0:Me(this,Le,QN).call(this)&&Me(this,Le,_0).call(this,1);break;case 1:if(Me(this,Le,QN).call(this)){Me(this,Le,Hee).call(this);let X=7,me=1;Me(this,Le,Dee).call(this)?(X=2,me=3):G(this,sn)&&(X=2),Me(this,Le,Or).call(this,X,me)}break;case 2:Me(this,Le,Ub).call(this)?Me(this,Le,_0).call(this,3):(Me(this,Le,qb).call(this)||Me(this,Le,Jf).call(this)||Me(this,Le,Gu).call(this))&&Me(this,Le,_0).call(this,5);break;case 3:Me(this,Le,Lee).call(this)?Me(this,Le,Or).call(this,4,1):Me(this,Le,Ub).call(this)&&Me(this,Le,Or).call(this,5,1);break;case 4:Me(this,Le,Ub).call(this)&&Me(this,Le,Or).call(this,5,1);break;case 5:Me(this,Le,Uee).call(this)?Fe(this,Pn,G(this,Pn)+1):Me(this,Le,qee).call(this)&&Fe(this,Pn,G(this,Pn)-1),Me(this,Le,Fee).call(this)&&!G(this,Pn)?Me(this,Le,Or).call(this,6,1):Me(this,Le,qb).call(this)?Me(this,Le,Or).call(this,7,0):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 6:Me(this,Le,qb).call(this)?Me(this,Le,Or).call(this,7,0):Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 7:Me(this,Le,Jf).call(this)?Me(this,Le,Or).call(this,8,1):Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break;case 8:Me(this,Le,Gu).call(this)&&Me(this,Le,Or).call(this,9,1);break}}G(this,Bt).hostname!==void 0&&G(this,Bt).port===void 0&&(G(this,Bt).port="")}},kt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,ht=new WeakMap,Jt=new WeakMap,Kt=new WeakMap,Xt=new WeakMap,en=new WeakMap,Pn=new WeakMap,sn=new WeakMap,Le=new WeakSet,Or=function(X,me){var Ee,Pe,Ve;switch(G(this,Xt)){case 0:break;case 1:G(this,Bt).protocol=Me(this,Le,Xs).call(this);break;case 2:break;case 3:G(this,Bt).username=Me(this,Le,Xs).call(this);break;case 4:G(this,Bt).password=Me(this,Le,Xs).call(this);break;case 5:G(this,Bt).hostname=Me(this,Le,Xs).call(this);break;case 6:G(this,Bt).port=Me(this,Le,Xs).call(this);break;case 7:G(this,Bt).pathname=Me(this,Le,Xs).call(this);break;case 8:G(this,Bt).search=Me(this,Le,Xs).call(this);break;case 9:G(this,Bt).hash=Me(this,Le,Xs).call(this);break}G(this,Xt)!==0&&X!==10&&([1,2,3,4].includes(G(this,Xt))&&[6,7,8,9].includes(X)&&((Ee=G(this,Bt)).hostname??(Ee.hostname="")),[1,2,3,4,5,6].includes(G(this,Xt))&&[8,9].includes(X)&&((Pe=G(this,Bt)).pathname??(Pe.pathname=G(this,sn)?"/":"")),[1,2,3,4,5,6,7].includes(G(this,Xt))&&X===9&&((Ve=G(this,Bt)).search??(Ve.search=""))),Me(this,Le,Mee).call(this,X,me)},Mee=function(X,me){Fe(this,Xt,X),Fe(this,Kt,G(this,ht)+me),Fe(this,ht,G(this,ht)+me),Fe(this,Jt,0)},XN=function(){Fe(this,ht,G(this,Kt)),Fe(this,Jt,0)},_0=function(X){Me(this,Le,XN).call(this),Fe(this,Xt,X)},zb=function(X){return X<0&&(X=G(this,ct).length-X),X<G(this,ct).length?G(this,ct)[X]:G(this,ct)[G(this,ct).length-1]},Uo=function(X,me){let Ee=Me(this,Le,zb).call(this,X);return Ee.value===me&&(Ee.type==="CHAR"||Ee.type==="ESCAPED_CHAR"||Ee.type==="INVALID_CHAR")},QN=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},Dee=function(){return Me(this,Le,Uo).call(this,G(this,ht)+1,"/")&&Me(this,Le,Uo).call(this,G(this,ht)+2,"/")},Ub=function(){return Me(this,Le,Uo).call(this,G(this,ht),"@")},Lee=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},Fee=function(){return Me(this,Le,Uo).call(this,G(this,ht),":")},qb=function(){return Me(this,Le,Uo).call(this,G(this,ht),"/")},Jf=function(){if(Me(this,Le,Uo).call(this,G(this,ht),"?"))return!0;if(G(this,ct)[G(this,ht)].value!=="?")return!1;let X=Me(this,Le,zb).call(this,G(this,ht)-1);return X.type!=="NAME"&&X.type!=="REGEX"&&X.type!=="CLOSE"&&X.type!=="ASTERISK"},Gu=function(){return Me(this,Le,Uo).call(this,G(this,ht),"#")},Vee=function(){return G(this,ct)[G(this,ht)].type=="OPEN"},zee=function(){return G(this,ct)[G(this,ht)].type=="CLOSE"},Uee=function(){return Me(this,Le,Uo).call(this,G(this,ht),"[")},qee=function(){return Me(this,Le,Uo).call(this,G(this,ht),"]")},Xs=function(){let X=G(this,ct)[G(this,ht)],me=Me(this,Le,zb).call(this,G(this,Kt)).index;return G(this,kt).substring(me,X.index)},Hee=function(){let X={};Object.assign(X,$),X.encodePart=L;let me=b(Me(this,Le,Xs).call(this),void 0,X);Fe(this,sn,B(me))},tt),re=["protocol","username","password","hostname","port","pathname","search","hash"],pe="*";function Se(X,me){if(typeof X!="string")throw new TypeError("parameter 1 is not of type 'string'.");let Ee=new URL(X,me);return{protocol:Ee.protocol.substring(0,Ee.protocol.length-1),username:Ee.username,password:Ee.password,hostname:Ee.hostname,port:Ee.port,pathname:Ee.pathname,search:Ee.search!==""?Ee.search.substring(1,Ee.search.length):void 0,hash:Ee.hash!==""?Ee.hash.substring(1,Ee.hash.length):void 0}}function Oe(X,me){return me?yt(X):X}function rt(X,me,Ee){let Pe;if(typeof me.baseURL=="string")try{Pe=new URL(me.baseURL),me.protocol===void 0&&(X.protocol=Oe(Pe.protocol.substring(0,Pe.protocol.length-1),Ee)),!Ee&&me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.username===void 0&&(X.username=Oe(Pe.username,Ee)),!Ee&&me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.username===void 0&&me.password===void 0&&(X.password=Oe(Pe.password,Ee)),me.protocol===void 0&&me.hostname===void 0&&(X.hostname=Oe(Pe.hostname,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&(X.port=Oe(Pe.port,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&(X.pathname=Oe(Pe.pathname,Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&me.search===void 0&&(X.search=Oe(Pe.search.substring(1,Pe.search.length),Ee)),me.protocol===void 0&&me.hostname===void 0&&me.port===void 0&&me.pathname===void 0&&me.search===void 0&&me.hash===void 0&&(X.hash=Oe(Pe.hash.substring(1,Pe.hash.length),Ee))}catch{throw new TypeError(`invalid baseURL '${me.baseURL}'.`)}if(typeof me.protocol=="string"&&(X.protocol=Q(me.protocol,Ee)),typeof me.username=="string"&&(X.username=ye(me.username,Ee)),typeof me.password=="string"&&(X.password=fe(me.password,Ee)),typeof me.hostname=="string"&&(X.hostname=oe(me.hostname,Ee)),typeof me.port=="string"&&(X.port=ue(me.port,X.protocol,Ee)),typeof me.pathname=="string"){if(X.pathname=me.pathname,Pe&&!T(X.pathname,Ee)){let Ve=Pe.pathname.lastIndexOf("/");Ve>=0&&(X.pathname=Oe(Pe.pathname.substring(0,Ve+1),Ee)+X.pathname)}X.pathname=ae(X.pathname,X.protocol,Ee)}return typeof me.search=="string"&&(X.search=J(me.search,Ee)),typeof me.hash=="string"&&(X.hash=te(me.hash,Ee)),X}function yt(X){return X.replace(/([+*?:{}()\\])/g,"\\$1")}function ut(X){return X.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Pt(X,me){me.delimiter??(me.delimiter="/#?"),me.prefixes??(me.prefixes="./"),me.sensitive??(me.sensitive=!1),me.strict??(me.strict=!1),me.end??(me.end=!0),me.start??(me.start=!0),me.endsWith="";let Ee=".*",Pe=`[^${ut(me.delimiter)}]+?`,Ve=/[$_\u200C\u200D\p{ID_Continue}]/u,st="";for(let Ue=0;Ue<X.length;++Ue){let Ne=X[Ue];if(Ne.type===3){if(Ne.modifier===3){st+=yt(Ne.value);continue}st+=`{${yt(Ne.value)}}${x(Ne.modifier)}`;continue}let Ke=Ne.hasCustomName(),at=!!Ne.suffix.length||!!Ne.prefix.length&&(Ne.prefix.length!==1||!me.prefixes.includes(Ne.prefix)),Tt=Ue>0?X[Ue-1]:null,hn=Ue<X.length-1?X[Ue+1]:null;if(!at&&Ke&&Ne.type===1&&Ne.modifier===3&&hn&&!hn.prefix.length&&!hn.suffix.length)if(hn.type===3){let jn=hn.value.length>0?hn.value[0]:"";at=Ve.test(jn)}else at=!hn.hasCustomName();if(!at&&!Ne.prefix.length&&Tt&&Tt.type===3){let jn=Tt.value[Tt.value.length-1];at=me.prefixes.includes(jn)}at&&(st+="{"),st+=yt(Ne.prefix),Ke&&(st+=`:${Ne.name}`),Ne.type===2?st+=`(${Ne.value})`:Ne.type===1?Ke||(st+=`(${Pe})`):Ne.type===0&&(!Ke&&(!Tt||Tt.type===3||Tt.modifier!==3||at||Ne.prefix!=="")?st+="*":st+=`(${Ee})`),Ne.type===1&&Ke&&Ne.suffix.length&&Ve.test(Ne.suffix[0])&&(st+="\\"),st+=yt(Ne.suffix),at&&(st+="}"),Ne.modifier!==3&&(st+=x(Ne.modifier))}return st}var Et=(ze=class{constructor(X={},me,Ee){Je(this,se);Je(this,ee,{});Je(this,le,{});Je(this,we,{});Je(this,be,{});Je(this,ke,!1);try{let Pe;if(typeof me=="string"?Pe=me:Ee=me,typeof X=="string"){let Ne=new W(X);if(Ne.parse(),X=Ne.result,Pe===void 0&&typeof X.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");X.baseURL=Pe}else{if(!X||typeof X!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(Pe)throw new TypeError("parameter 1 is not of type 'string'.")}typeof Ee>"u"&&(Ee={ignoreCase:!1});let Ve={ignoreCase:Ee.ignoreCase===!0};Fe(this,se,rt({pathname:pe,protocol:pe,username:pe,password:pe,hostname:pe,port:pe,search:pe,hash:pe},X,!0)),k(G(this,se).protocol)===G(this,se).port&&(G(this,se).port="");let Ue;for(Ue of re){if(!(Ue in G(this,se)))continue;let Ne={},Ke=G(this,se)[Ue];switch(G(this,le)[Ue]=[],Ue){case"protocol":Object.assign(Ne,$),Ne.encodePart=L;break;case"username":Object.assign(Ne,$),Ne.encodePart=F;break;case"password":Object.assign(Ne,$),Ne.encodePart=N;break;case"hostname":Object.assign(Ne,P),z(Ke)?Ne.encodePart=q:Ne.encodePart=I;break;case"port":Object.assign(Ne,$),Ne.encodePart=Z;break;case"pathname":B(G(this,ee).protocol)?(Object.assign(Ne,C,Ve),Ne.encodePart=ne):(Object.assign(Ne,$,Ve),Ne.encodePart=de);break;case"search":Object.assign(Ne,$,Ve),Ne.encodePart=ce;break;case"hash":Object.assign(Ne,$,Ve),Ne.encodePart=H;break}try{G(this,be)[Ue]=_(Ke,Ne),G(this,ee)[Ue]=S(G(this,be)[Ue],G(this,le)[Ue],Ne),G(this,we)[Ue]=Pt(G(this,be)[Ue],Ne),Fe(this,ke,G(this,ke)||G(this,be)[Ue].some(at=>at.type===2))}catch{throw new TypeError(`invalid ${Ue} pattern '${G(this,se)[Ue]}'.`)}}}catch(Pe){throw new TypeError(`Failed to construct 'URLPattern': ${Pe.message}`)}}test(X={},me){let Ee={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof X!="string"&&me)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof X>"u")return!1;try{typeof X=="object"?Ee=rt(Ee,X,!1):Ee=rt(Ee,Se(X,me),!1)}catch{return!1}let Pe;for(Pe of re)if(!G(this,ee)[Pe].exec(Ee[Pe]))return!1;return!0}exec(X={},me){let Ee={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof X!="string"&&me)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof X>"u")return;try{typeof X=="object"?Ee=rt(Ee,X,!1):Ee=rt(Ee,Se(X,me),!1)}catch{return null}let Pe={};me?Pe.inputs=[X,me]:Pe.inputs=[X];let Ve;for(Ve of re){let st=G(this,ee)[Ve].exec(Ee[Ve]);if(!st)return null;let Ue={};for(let[Ne,Ke]of G(this,le)[Ve].entries())if(typeof Ke=="string"||typeof Ke=="number"){let at=st[Ne+1];Ue[Ke]=at}Pe[Ve]={input:Ee[Ve]??"",groups:Ue}}return Pe}static compareComponent(X,me,Ee){let Pe=(Ne,Ke)=>{for(let at of["type","modifier","prefix","value","suffix"]){if(Ne[at]<Ke[at])return-1;if(Ne[at]!==Ke[at])return 1}return 0},Ve=new l(3,"","","","",3),st=new l(0,"","","","",3),Ue=(Ne,Ke)=>{let at=0;for(;at<Math.min(Ne.length,Ke.length);++at){let Tt=Pe(Ne[at],Ke[at]);if(Tt)return Tt}return Ne.length===Ke.length?0:Pe(Ne[at]??Ve,Ke[at]??Ve)};return!G(me,we)[X]&&!G(Ee,we)[X]?0:G(me,we)[X]&&!G(Ee,we)[X]?Ue(G(me,be)[X],[st]):!G(me,we)[X]&&G(Ee,we)[X]?Ue([st],G(Ee,be)[X]):Ue(G(me,be)[X],G(Ee,be)[X])}get protocol(){return G(this,we).protocol}get username(){return G(this,we).username}get password(){return G(this,we).password}get hostname(){return G(this,we).hostname}get port(){return G(this,we).port}get pathname(){return G(this,we).pathname}get search(){return G(this,we).search}get hash(){return G(this,we).hash}get hasRegExpGroups(){return G(this,ke)}},se=new WeakMap,ee=new WeakMap,le=new WeakMap,we=new WeakMap,be=new WeakMap,ke=new WeakMap,ze);return $R}var CR,nz;function ELe(){if(nz)return CR;nz=1;const{URLPattern:e}=_Le();return CR={URLPattern:e},globalThis.URLPattern||(globalThis.URLPattern=e),CR}var rz;function SLe(){if(rz)return gs;rz=1;var e=gs&&gs.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(gs,"__esModule",{value:!0}),gs.processJsonErrorObjectLegacy=gs.RouteValidator=gs.RouteValidationResult=void 0;const t=e(K3e),n=xLe(),r=globalThis;r.URLPattern||ELe();const i=r.URLPattern;class o{constructor(){et(this,"generalErrors",[]);et(this,"routeErrors",[]);et(this,"versionErrors",[]);et(this,"policyErrors",[]);et(this,"corsPolicyErrors",[])}get isValid(){return this.errors===0}get errors(){return this.generalErrors.length+this.routeErrors.length+this.versionErrors.length+this.policyErrors.length+this.corsPolicyErrors.length}}gs.RouteValidationResult=o;class s{constructor(){et(this,"validator");this.validator=n.JsonValidator.instance.compile(t.default)}validate(_){var P;const y=new o,w=this.validator(_);if(!w.isValid){const C=w.errors.map(A=>m(A)),T={routes:y.routeErrors,versions:y.versionErrors,policies:y.policyErrors};C.forEach(A=>{(T[A.property]??y.generalErrors).push(A.entry)})}if(!y.isValid)return y;const b=_;b.routes.forEach((C,T)=>{try{new i({pathname:"/"+C.path})}catch(A){y.routeErrors.push({index:T,field:"path",message:`The path '${C.path}' is invalid on route ${T+1} '${C.operationId} (${C.summary??C.label})' (${A.message})`})}}),b.versions.forEach((C,T)=>{try{new i({pathname:"/"+C.pathPrefix})}catch(A){y.versionErrors.push({index:T,field:"pathPrefix",message:`The pathPrefix '${C.pathPrefix}' is invalid on version ${T+1} '${C.name}' (${A.message})`})}}),this.duplicateChecks(b,y);const x=b.versions.map(C=>C.name);if(b.routes.forEach((C,T)=>{x.includes(C.version)||y.routeErrors.push({message:`No version named '${C.version}' found in the versions section (specified on route ${T+1} '${C.operationId} (${C.summary??C.label})')`,index:T,field:"version"})}),b.policies){const C=b.policies.map(T=>T.name);b.routes.forEach((T,A)=>{var D,z;(z=(D=T.policies)==null?void 0:D.inbound)==null||z.forEach(K=>{C.includes(K)||y.routeErrors.push({message:`No policy named '${K}' found in the policies section (specified on route ${A+1} '${T.operationId}')`,index:A,field:"policies.inbound"})})})}const S=["none","anything-goes"];b.corsPolicies&&b.corsPolicies.forEach((C,T)=>{S.includes(C.name)&&y.corsPolicyErrors.push({message:`Invalid CORS policy name '${C.name}' - 'none' and 'anything-goes' are reserved.`,index:T,field:"name"})});const $=((P=b.corsPolicies)==null?void 0:P.map(C=>C.name))??[];return b.routes.forEach((C,T)=>{C.corsPolicy&&!S.includes(C.corsPolicy)&&!$.includes(C.corsPolicy)&&y.routeErrors.push({message:`The route entry at position ${T} in *.oas.json has invalid corsPolicy with value '${C.corsPolicy}' not found in the corsPolicies section.`,index:T,field:"corsPolicy"})}),y}duplicateChecks(_,y){l(_.routes.filter($=>$.operationId).map($=>$.operationId)).forEach($=>{y.routeErrors.push({index:$.dupeIndex,field:"operationId",message:a("route","operationId",_.routes[$.dupeIndex].operationId,$.dupeIndex,$.originalIndex)})}),l(_.versions.map($=>$.name)).forEach($=>{y.versionErrors.push({index:$.dupeIndex,field:"name",message:a("version","name",_.versions[$.dupeIndex].name,$.dupeIndex,$.originalIndex)})}),l(_.versions.map($=>$.pathPrefix)).forEach($=>{y.versionErrors.push({index:$.dupeIndex,field:"pathPrefix",message:a("version","pathPrefix",_.versions[$.dupeIndex].pathPrefix,$.dupeIndex,$.originalIndex)})});const{policies:S}=_;S&&l(S.map(P=>P.name)).forEach(P=>{y.policyErrors.push({index:P.dupeIndex,field:"name",message:a("policy","name",S[P.dupeIndex].name,P.dupeIndex,P.originalIndex)})})}}gs.RouteValidator=s;const a=(v,_,y,w,b)=>`${_} '${y}' in ${v} ${w+1} is a duplicate of ${v} ${b+1}`,l=v=>{const _=[];for(let y=0;y<v.length;y++){const w=v[y],b=v.indexOf(w);b!==y&&_.push({dupeIndex:y,originalIndex:b})}return _},c={'must match pattern "^[0-9a-z-]+$"':"Value must be alphanumeric or dash '-' only",'must match pattern "^\\$import\\([^ )]*?\\)$"':"Value must be of form '$import(./path/to/module)"},u={'must match pattern "^[0-9a-z-]+$"':"Make sure the value uses only lowercase letters, numbers and dashes ('-').",'must match pattern "^\\$import\\([^ )]*?\\)$"':"Value must be of form '$import(./path/to/module)"},f={routes:"route",versions:"version",policies:"policy"};function m(v){var D,z,K,B,te;const _=v.message,y=((D=v.details)==null?void 0:D.property)??"",w=((z=v.details)==null?void 0:z.index)??0,b=(K=v.details)==null?void 0:K.field,x=v.keyword,S=v.params,$=v.instancePath,P=c[_]??_;let C,T;if(x==="unevaluatedProperties"){const J=S.unevaluatedProperty;C=`Unrecognized property '${J}' detected in '${b}' at position ${w+1} in *.oas.json. Property location: ${$}.`,J==="examples"&&b==="responses"&&(C=`Invalid property 'examples' detected in '${b}' at position ${w+1} in *.oas.json. Response examples are only accepted through the JSON Schema 'examples' keyword within the 'schema' property.`)}else b&&y?(C=`The ${f[y]} entry at position ${w+1} in *.oas.json has invalid ${b} with value '${(B=v.details)==null?void 0:B.fieldValue}' (${P})`,T={field:b,fieldValue:((te=v.details)==null?void 0:te.fieldValue)??"",property:y,instancePath:$,suggestion:u[_]??""}):y?C=`The ${f[y]} entry at position ${w+1} in *.oas.json is invalid (${P})`:x==="additionalProperties"?C=`The *.oas.json configuration contains invalid property '${S.additionalProperty}'`:C=`The *.oas.json configuration is invalid (${P})`;return{property:y,entry:{message:C,index:w,field:b,details:T}}}return gs.processJsonErrorObjectLegacy=m,gs}var iz;function $Le(){return iz||(iz=1,function(e){var t=Mu&&Mu.__createBinding||(Object.create?function(a,l,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(a,u,f)}:function(a,l,c,u){u===void 0&&(u=c),a[u]=l[c]}),n=Mu&&Mu.__exportStar||function(a,l){for(var c in a)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&t(l,a,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.processJsonErrorObjectLegacy=e.RouteValidationResult=e.isValidProjectName=e.MAX_PRETTY_BRANCH_LENGTH=e.MAX_HASH_LENGTH=e.processJsonErrorObject=e.DeploymentLogState=void 0;var r=j3e();Object.defineProperty(e,"DeploymentLogState",{enumerable:!0,get:function(){return r.DeploymentLogState}}),n(O3e(),e),n(k3e(),e),n(I3e(),e);var i=M3e();Object.defineProperty(e,"processJsonErrorObject",{enumerable:!0,get:function(){return i.processJsonErrorObject}});var o=L3e();Object.defineProperty(e,"MAX_HASH_LENGTH",{enumerable:!0,get:function(){return o.MAX_HASH_LENGTH}}),Object.defineProperty(e,"MAX_PRETTY_BRANCH_LENGTH",{enumerable:!0,get:function(){return o.MAX_PRETTY_BRANCH_LENGTH}}),Object.defineProperty(e,"isValidProjectName",{enumerable:!0,get:function(){return o.isValidProjectName}});var s=SLe();Object.defineProperty(e,"RouteValidationResult",{enumerable:!0,get:function(){return s.RouteValidationResult}}),Object.defineProperty(e,"processJsonErrorObjectLegacy",{enumerable:!0,get:function(){return s.processJsonErrorObjectLegacy}})}(Mu)),Mu}var CLe=$Le();const PLe=(e,t)=>CLe.processJsonErrorObject(e,t).entry.message,RLe=({fileName:e,validationErrors:t,onNavigateToFileTab:n})=>p.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[p.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[p.jsx(gl,{className:"h-6 w-auto mr-1"}),p.jsxs("span",{children:[e," file does not conform to schema"]})]}),p.jsx("ul",{className:"mt-5 list-inside list-disc",children:t.map(r=>p.jsx("li",{children:PLe(r,e)},`${r.message}-${r.instancePath}`))}),p.jsxs("p",{children:[p.jsx("button",{type:"button",className:"text-zuplo-pink hover:underline",onClick:()=>{n()},children:"Edit file directly"})," ","to correct the issue."]})]}),TLe=({message:e})=>p.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[p.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[p.jsx(gl,{className:"h-6 w-auto mr-1"}),p.jsx("span",{children:"JSON Parse Error"})]}),p.jsx("p",{children:e}),p.jsx("p",{children:"Edit the file directly to correct the issue."})]}),NLe=({onNavigateToPoliciesFileTab:e,children:t})=>{const n=Mp(),r=nv(),[i,o]=g.useState(),s=Tk();return g.useEffect(()=>{if(!(r!=null&&r.content)||!s.data){o(void 0);return}try{const a=JSON.parse(r.content),l=x_e.compile(JSON.parse(s.data));o(l(a))}catch(a){io(a,l=>l.setTag("additional context","Encountered failure when validating policies.json")),o(void 0)}},[s.data]),n.parseError?p.jsx(TLe,{message:n.parseError.toString()}):!i||s.isLoading?p.jsx("div",{className:"p-6",children:p.jsx(DZ,{message:"Validating policies.json"})}):i.isValid?t:p.jsx(RLe,{fileName:"policies.json",validationErrors:i.errors,onNavigateToFileTab:e})},ALe={"Policy List":"policy-list-tab-opened","policies.json":"policies.json-tab-opened"};function jLe(){const{logEvent:e}=vn(),t=Tk(),n=[{content:p.jsx(NLe,{onNavigateToPoliciesFileTab:()=>s("policies.json"),children:p.jsx(A3e,{})}),name:"Policy List",testId:"policies-list-tab"},{content:p.jsx("div",{className:"pt-2 h-full",children:p.jsx(ph,{jsonSchemas:[{fileMatch:["policies.json"],schema:{...JSON.parse(t.data??"{}")},uri:"https://zuplo.com/policies.json"}]})}),name:"policies.json",testId:"policies-json-tab"}],r=a=>e(ALe[a.name]),{currentTab:i,onSelectTab:o,setTab:s}=fk(n,r);return p.jsx(ree,{children:p.jsx("div",{className:"h-full",children:p.jsx(SO,{tabs:n,currentTab:i,onSelectTab:o})})})}const OLe="/docs",kLe=(e=!1)=>{const{account:t,project:n}=VIe(["account","project"]),[r,i]=g.useState(),o=UIe(t,n);return g.useEffect(()=>{var a,l,c,u;const s=(e?(a=o.data)==null?void 0:a.find(f=>f.environmentType===nd.WORKING_COPY):void 0)??((l=o.data)==null?void 0:l.find(f=>f.environmentType===nd.PRODUCTION))??((c=o.data)==null?void 0:c.sort((f,m)=>new Date(f.updatedOn).getTime()-new Date(m.updatedOn).getTime()).find(f=>f.environmentType===nd.PREVIEW))??((u=o.data)==null?void 0:u.find(f=>f.environmentType===nd.WORKING_COPY));i(s)},[o.data,e]),r},ILe=()=>{var a;const e=kLe(),t=k2e(e==null?void 0:e.name,iEe),n=e?dp(e):void 0,r=e?dp(e,"dev-portal"):void 0,i=g.useMemo(()=>{var l;try{return(l=t.data)!=null&&l.content?JSON.parse(t.data.content):void 0}catch{return}},[(a=t.data)==null?void 0:a.content]),o=i?(i==null?void 0:i.sitePathname)??OLe:"",s=r?new URL(o,r).toString():void 0;return{deploymentUrl:n==null?void 0:n.replace(/\/$/,""),deploymentDevPortalUrl:s==null?void 0:s.replace(/\/$/,"")}},MLe=()=>{var o,s;const e=Vr(),t=q2e(),n=oO(),i=(s=(o=qIe(e.account.name,e.project.name,e.environment.name).data)==null?void 0:o.at(-1))==null?void 0:s.stages.find(a=>a.stage==="api"&&a.status==="in-progress");return{isPending:t.isPending,isSuccess:t.isSuccess,saveAndDeploy:g.useCallback(async()=>{i||t.mutateAsync({environmentName:e.environment.name,accountName:e.account.name,projectName:e.project.name,files:n}).catch(a=>{if(!(a instanceof Error&&"status"in a&&a.status===409))throw a})},[t,n,i,e.environment.name,e.account.name,e.project.name])}},DLe=e=>new Promise(t=>setTimeout(t,e));function LLe({open:e,editors:t,onSelect:n,onCancel:r}){const[i,o]=g.useState(null),s=()=>{i&&n(i)};return p.jsx(wp,{open:e,onOpenChange:a=>!a&&r(),children:p.jsxs(Lc,{className:"sm:max-w-md",children:[p.jsxs(Xh,{children:[p.jsx(Fc,{children:"Choose Your Editor"}),p.jsx(kd,{children:"Select which editor you'd like to use for opening files. This preference will be saved for future use."})]}),p.jsx("div",{className:"space-y-2 py-4",children:t.map(a=>p.jsx("button",{type:"button",className:`w-full text-left px-4 py-3 rounded-md border transition-colors ${i===a.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,onClick:()=>o(a.id),children:p.jsx("div",{className:"font-medium",children:a.name})},a.id))}),p.jsxs(Od,{children:[p.jsx(ot,{variant:"ghost",onClick:r,children:"Cancel"}),p.jsx(ot,{variant:"default",onClick:s,disabled:!i,children:"Save Preference"})]})]})})}const mb="/api/v1/editor";function FLe(){const[e]=qd(),[t,n]=g.useState(null),[r,i]=g.useState(null),[o,s]=g.useState([]),[a,l]=g.useState(!1),[c,u]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const y=await(await fetch(`${mb}/list`)).json();s(y.editors);const b=await(await fetch(`${mb}/detect`)).json();b.editor&&b.name&&(n(b.editor),i(b.name))}catch(_){Nn.error("Failed to load editor preference:",_)}finally{u(!1)}})()},[]);const f=g.useCallback(async v=>{try{if((await fetch(`${mb}/preference`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({editor:v})})).ok){const y=o.find(w=>w.id===v);y&&(n(v),i(y.name)),l(!1)}}catch(_){Nn.error("Failed to save editor preference:",_)}},[o]),m=g.useCallback(async()=>{const v=e.get("path");if(!v){Nn.warn("No file path in URL");return}if(!t){l(!0);return}try{const _=await fetch(`${mb}/open`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:v})});if(!_.ok){const w=await _.json();Nn.error("Failed to open file in editor:",w.message);return}const y=await _.json();y.url&&(window.location.href=y.url)}catch(_){Nn.error("Failed to open file in editor:",_)}},[e,t]);return{hasEditor:!!t,editorName:r,isLoading:c,showPreferenceDialog:a,setShowPreferenceDialog:l,availableEditors:o,savePreference:f,openInEditor:m}}const VLe=()=>{const{saveAndDeploy:e,isPending:t}=MLe(),[n,r]=g.useState(null),i=$n(l=>{let c=0;for(const u of l.projectTreeNodes){const f=u.path?l.filesByPath[u.path]:void 0;f&&f.saveState===zt.modified&&c++}return c}),o=g.useRef(null),s=l=>{r(l),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(null)},1600)},a=hg(e);return g.useEffect(()=>{const l=async c=>{try{if(c.code===JIe&&(c.metaKey||c.ctrlKey)){c.preventDefault();const u=document.activeElement;if(u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement){const f=u.selectionEnd;u.blur(),u.focus(),(u instanceof HTMLInputElement&&u.type!=="checkbox"||u instanceof HTMLTextAreaElement)&&u.setSelectionRange(f,f),await DLe(100)}if(i===0){s("No unsaved changes");return}await a.current()}}catch(u){Nn.error("Error saving files:",u),r("Error saving files")}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[i,a]),{showTooltip:n,isSaving:t,unsavedChangesCount:i,saveAll:e}},zLe=()=>{const{showTooltip:e,saveAll:t,isSaving:n,unsavedChangesCount:r}=VLe(),{hasEditor:i,editorName:o,isLoading:s,showPreferenceDialog:a,setShowPreferenceDialog:l,availableEditors:c,savePreference:u,openInEditor:f}=FLe();return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"sticky bottom-0 h-12 border-t bg-neutral-50 items-center flex px-2 gap-x-2",children:[p.jsx(mN,{open:!!e,content:e??"",children:p.jsx(ot,{variant:r>0||n?"default":"ghost",size:"xs","data-test":"save",disabled:n,onClick:async()=>{await t()},children:p.jsxs(Ug,{className:"flex items-center gap-1 text-xs relative",loading:n,children:["Save",p.jsx("span",{className:r>0?"text-white":"text-gray-400",children:"[⌘+S]"})]})})}),!s&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-6 w-px bg-gray-300"}),p.jsx(mN,{content:i?`Open in ${o}`:"Choose editor to open files",children:p.jsxs(ot,{variant:"ghost",size:"xs",onClick:f,className:"flex items-center gap-1",children:[p.jsx(Vq,{size:14}),p.jsx("span",{className:"text-xs",children:"Open in Editor"})]})})]})]}),p.jsx(LLe,{open:a,editors:c,onSelect:u,onCancel:()=>l(!1)})]})};function ULe(){const{editStrategies:e}=Rk(),[t]=qd(),n=t.get("path");return p.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsxs(bfe,{direction:"horizontal",autoSaveId:"local-editor-file-tree",children:[p.jsx(rM,{minSize:10,defaultSize:20,className:"bg-neutral-50",children:p.jsx(oCe,{directoryStrategies:e})}),p.jsx(xfe,{}),p.jsx(rM,{minSize:70,children:n?p.jsx(qLe,{}):p.jsx(Bee,{})})]})}),p.jsx(zLe,{})]})}const qLe=()=>{const[e]=qd(),t=e.get("path"),n=Vr();if(!t)return p.jsx(Bee,{});const r=t.toLowerCase();return r.includes(".oas.json")?p.jsx(T3e,{ape:n}):r==="/config/policies.json"?p.jsx(jLe,{}):r.endsWith(".ts")?p.jsx(ph,{maxHeightVh:100}):r.endsWith(".css")?p.jsx(ph,{maxHeightVh:100}):r.startsWith("/schemas")&&r.endsWith(".json")?p.jsx(ph,{jsonSchemas:[_fe]}):p.jsx(ph,{})},Bee=()=>p.jsxs("div",{className:"flex flex-col h-full items-center justify-center",children:[p.jsx("h2",{className:"text-2xl font-semibold",children:"Local Route Editor"}),p.jsx("p",{className:"text-gray-600 mt-2",children:"Select a file from the tree to edit"})]}),HLe="You have modified files that are not saved. If you leave before saving you will lose your changes.",Wee=()=>{const e=pl(),t=Vr(["environment"]),n=oO(),{strategies:r}=Rk(),i=U2e(Object.values(r),t.environment.name),[o,s]=g.useState(null),a=$n(b=>b.setProjectTreeNodes),l=$n(b=>b.addFile),c=$n(b=>b.resetStore),{logEvent:u}=vn(),f=P3e({enabled:!1}),m=bee({enabled:!1}),v=xee({enabled:!1}),_=Tk({enabled:!1}),y=Xd({enabled:!1}),w=_p(async b=>{if(!e)return;performance.mark("totalTimeStart");const x=`${b.account.name}-${b.project.name}-${b.environment.name}`,S={"project-name":b.project.name};if(o&&o!==x&&e.editor.getModels().length>0){performance.mark("cleanMonacoStart"),c(),e.editor.getModels().forEach(A=>A.dispose());try{S.cleanMonaco=Math.trunc(performance.measure("cleanMonacoTimer","cleanMonacoStart").duration)}catch{S.cleanMonaco=-1}}performance.mark("fileTreeStart");const P=await i();e.editor.getModels().forEach(A=>A.dispose());try{S.fileTreeLoader=Math.trunc(performance.measure("fileTreeTimer","fileTreeStart").duration)}catch{S.fileTreeLoader=-1}performance.mark("loadingFilesStart");const C=P.filter(A=>A.type===pa.File),T=P.filter(A=>A.type===pa.Directory);await Promise.allSettled(C.map(async A=>{try{const D=await rd(b.environment.name,A.path);l({...A,...D,saveState:zt.unmodified});const z=e.Uri.file(D.path),K=e.editor.getModel(z);K?K.setValue(D.content??""):e.editor.createModel(D.content??"",void 0,z)}catch{l({...A,saveState:zt.error})}})),T.forEach(A=>{l({...A,saveState:zt.unmodified})});try{S.loadingFiles=Math.trunc(performance.measure("loadingFilesTimer","loadingFilesStart").duration)}catch{S.loadingFiles=-1}await Promise.allSettled([f.refetch(),m.refetch(),v.refetch(),_.refetch(),y.refetch()]),s(x),a(P);try{S.totalTime=Math.trunc(performance.measure("totalTime","totalTimeStart").duration)}catch{S.totalTime=-1}u("project-loaded",S);try{performance.clearMarks()}catch(A){io(A)}});return{unsavedFiles:n,monaco:e,reloadFiles:w}};function BLe(){const{unsavedFiles:e}=Wee(),{isAuthenticated:t}=hp();return g.useEffect(()=>{if(e.length===0||!t)return;function n(r){return r.preventDefault(),r.returnValue=HLe,r}return window.addEventListener("beforeunload",n,{capture:!0}),()=>{window.removeEventListener("beforeunload",n,{capture:!0})}},[e,t]),null}const WLe="modulepreload",GLe=function(e,t){return new URL(e,t).href},oz={},KLe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const a=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=s(n.map(u=>{if(u=GLe(u,r),u in oz)return;oz[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!r)for(let y=a.length-1;y>=0;y--){const w=a[y];if(w.href===u&&(!f||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const _=document.createElement("link");if(_.rel=f?"stylesheet":WLe,f||(_.as="script"),_.crossOrigin="",_.href=u,c&&_.setAttribute("nonce",c),document.head.appendChild(_),f)return new Promise((y,w)=>{_.addEventListener("load",y),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},Ok=Symbol.for("RemoteUi::Retain"),kk=Symbol.for("RemoteUi::Release"),i_=Symbol.for("RemoteUi::RetainedBy");class Gee{constructor(){this.memoryManaged=new Set}add(t){this.memoryManaged.add(t),t[i_].add(this),t[Ok]()}release(){for(const t of this.memoryManaged)t[i_].delete(this),t[kk]();this.memoryManaged.clear()}}function ZLe(e){return!!(e&&e[Ok]&&e[kk])}function sz(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}const gb="_@f";function YLe(e){const t=new Map,n=new Map,r=new Map;return{encode:i,decode:o,async call(s,a){const l=new Gee,c=n.get(s);if(c==null)throw new Error("You attempted to call a function that was already released.");try{const u=ZLe(c)?[l,...c[i_]]:[l];return await c(...o(a,u))}finally{l.release()}},release(s){const a=n.get(s);a&&(n.delete(s),t.delete(a))},terminate(){t.clear(),n.clear(),r.clear()}};function i(s,a=new Map){if(s==null)return[s];const l=a.get(s);if(l)return l;if(typeof s=="object"){if(Array.isArray(s)){a.set(s,[void 0]);const u=[],m=[s.map(v=>{const[_,y=[]]=i(v,a);return u.push(...y),_}),u];return a.set(s,m),m}if(sz(s)){a.set(s,[void 0]);const u=[],m=[Object.keys(s).reduce((v,_)=>{const[y,w=[]]=i(s[_],a);return u.push(...w),{...v,[_]:y}},{}),u];return a.set(s,m),m}}if(typeof s=="function"){if(t.has(s)){const m=t.get(s),v=[{[gb]:m}];return a.set(s,v),v}const u=e.uuid();t.set(s,u),n.set(u,s);const f=[{[gb]:u}];return a.set(s,f),f}const c=[s];return a.set(s,c),c}function o(s,a){if(typeof s=="object"){if(s==null)return s;if(Array.isArray(s))return s.map(l=>o(l,a));if(gb in s){const l=s[gb];if(r.has(l))return r.get(l);let c=0,u=!1;const f=()=>{c-=1,c===0&&(u=!0,r.delete(l),e.release(l))},m=()=>{c+=1},v=new Set(a),_=(...y)=>{if(u)throw new Error("You attempted to call a function that was already released.");if(!r.has(l))throw new Error("You attempted to call a function that was already revoked.");return e.call(l,y)};Object.defineProperties(_,{[kk]:{value:f,writable:!1},[Ok]:{value:m,writable:!1},[i_]:{value:v,writable:!1}});for(const y of v)y.add(_);return r.set(l,_),_}if(sz(s))return Object.keys(s).reduce((l,c)=>({...l,[c]:o(s[c],a)}),{})}return s}}const az=0,PR=1,lz=2,cz=3,uz=5,RR=6;function XLe(e,{uuid:t=QLe,createEncoder:n=YLe,callable:r}={}){let i=!1,o=e;const s=new Map,a=new Map,l=JLe(m,r),c=n({uuid:t,release(y){u(cz,[y])},call(y,w,b){const x=t(),S=v(x,b),[$,P]=c.encode(w);return u(uz,[x,y,$],P),S}});return o.addEventListener("message",f),{call:l,replace(y){const w=o;o=y,w.removeEventListener("message",f),y.addEventListener("message",f)},expose(y){for(const w of Object.keys(y)){const b=y[w];typeof b=="function"?s.set(w,b):s.delete(w)}},callable(...y){if(r!=null)for(const w of y)Object.defineProperty(l,w,{value:m(w),writable:!1,configurable:!0,enumerable:!0})},terminate(){u(lz,void 0),_(),o.terminate&&o.terminate()}};function u(y,w,b){i||o.postMessage(w?[y,w]:[y],b)}async function f(y){const{data:w}=y;if(!(w==null||!Array.isArray(w)))switch(w[0]){case lz:{_();break}case az:{const b=new Gee,[x,S,$]=w[1],P=s.get(S);try{if(P==null)throw new Error(`No '${S}' method is exposed on this endpoint`);const[C,T]=c.encode(await P(...c.decode($,[b])));u(PR,[x,void 0,C],T)}catch(C){const{name:T,message:A,stack:D}=C;throw u(PR,[x,{name:T,message:A,stack:D}]),C}finally{b.release()}break}case PR:{const[b]=w[1];a.get(b)(...w[1]),a.delete(b);break}case cz:{const[b]=w[1];c.release(b);break}case RR:{const[b]=w[1];a.get(b)(...w[1]),a.delete(b);break}case uz:{const[b,x,S]=w[1];try{const $=await c.call(x,S),[P,C]=c.encode($);u(RR,[b,void 0,P],C)}catch($){const{name:P,message:C,stack:T}=$;throw u(RR,[b,{name:P,message:C,stack:T}]),$}break}}}function m(y){return(...w)=>{if(i)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if(typeof y!="string"&&typeof y!="number")return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${y.toString()}`));const b=t(),x=v(b),[S,$]=c.encode(w);return u(az,[b,y,S],$),x}}function v(y,w){return new Promise((b,x)=>{a.set(y,(S,$,P)=>{if($==null)b(P&&c.decode(P,w));else{const C=new Error;Object.assign(C,$),x(C)}})})}function _(){var y;i=!0,s.clear(),a.clear(),(y=c.terminate)===null||y===void 0||y.call(c),o.removeEventListener("message",f)}}function QLe(){return`${vb()}-${vb()}-${vb()}-${vb()}`}function vb(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function JLe(e,t){let n;if(t==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const r=new Map;n=new Proxy({},{get(i,o){if(r.has(o))return r.get(o);const s=e(o);return r.set(o,s),s}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}function eFe(e){return typeof window>"u"||typeof e!="string"?void 0:new URL(e,window.location.href)}function tFe(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const Ik=new WeakMap;function nFe(e){const t=eFe(e);function n({createMessenger:r=tFe,...i}={}){if(t){const o=XLe(r(t),i),{call:s}=o;return Ik.set(s,o),s}if(typeof e=="function")return new Proxy({},{get(o,s){return async(...a)=>(await e())[s](...a)}});if(typeof window>"u")return new Proxy({},{get(o,s){return()=>{throw new Error("You can’t call a method on a worker on the server.")}}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function rFe(e){const t=iFe(e);return t==null||t.terminate(),Ik.delete(e),t!=null}function iFe(e){return Ik.get(e)}function oFe(e){const[t]=g.useState(e);return g.useRef(t)}function sFe(e,...t){const{current:n}=oFe(()=>e(...t));return g.useEffect(()=>()=>{rFe(n)},[n]),n}function Kee({open:e,filePath:t,localContent:n,remoteContent:r,onResolve:i,onCancel:o}){const[s,a]=g.useState("local"),l=c=>c.endsWith(".ts")?"typescript":c.endsWith(".js")?"javascript":c.endsWith(".json")?"json":c.endsWith(".css")?"css":c.endsWith(".html")?"html":"plaintext";return p.jsx(Mj,{open:e,onOpenChange:c=>{c||o()},children:p.jsxs(Dj,{children:[p.jsx(Hg,{className:"fixed inset-0 z-50 bg-black/50"}),p.jsxs(Bg,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-7xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg sm:rounded-lg max-h-[90vh]",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx(Wg,{className:"text-lg font-semibold",children:"File Conflict Detected"}),p.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[p.jsx("span",{className:"font-mono font-semibold",children:t})," has been modified both locally and on disk"]})]}),p.jsx(I_,{className:"rounded-sm opacity-70 hover:opacity-100",children:p.jsx(vl,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[p.jsxs("div",{className:"grid grid-cols-2 pr-[30px]",children:[p.jsxs("div",{className:`flex flex-col py-3 cursor-pointer transition-all border-t-4 border-x ${s==="local"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,style:{paddingLeft:"26px",paddingRight:"24px"},onClick:()=>a("local"),children:[p.jsx("div",{className:"font-semibold text-sm",children:"Browser Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Current editor content"})]}),p.jsxs("div",{className:`flex flex-col px-6 py-3 cursor-pointer transition-all border-t-4 border-x ${s==="remote"?"border-t-pink-500 border-x-pink-200 bg-pink-50":"border-t-gray-200 border-x-gray-200 bg-gray-50 hover:bg-gray-100"}`,onClick:()=>a("remote"),children:[p.jsx("div",{className:"font-semibold text-sm",children:"Disk Version"}),p.jsx("div",{className:"text-xs text-gray-500",children:"File on disk"})]})]}),p.jsx("div",{className:"border border-t-0 overflow-hidden shadow-sm flex-1",style:{minHeight:"55vh"},children:p.jsx($re,{original:n,modified:r,language:l(t),theme:"vs",options:{readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,wordWrap:"on"}})}),p.jsxs("div",{className:"flex justify-between items-center pt-2",children:[p.jsx("p",{className:"text-sm text-gray-600",children:s==="local"?p.jsx(p.Fragment,{children:"Browser version will be saved to disk"}):p.jsx(p.Fragment,{children:"Disk version will replace browser content"})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(ot,{variant:"ghost",onClick:o,children:"Cancel"}),p.jsxs(ot,{variant:"default",onClick:()=>i(s),children:["Apply ",s==="local"?"Browser":"Disk"," ","Version"]})]})]})]})]})]})})}const aFe=nFe(()=>KLe(()=>import("./local-worker-BVQSFGzz.js"),[],import.meta.url)),lFe=()=>{const e=pl(),t=sFe(aFe),n=g.useRef(null),[r,i]=g.useState(null);g.useEffect(()=>{e&&t.ready().catch(a=>{Nn.warn("Failed to load local types:",a)})},[t,e]),g.useEffect(()=>{if(!e)return;const a=new EventSource("/api/changes");return n.current=a,a.addEventListener("change",async l=>{try{const c=JSON.parse(l.data),u=c.filePath.startsWith("/")?c.filePath:`/${c.filePath}`,f=$n.getState().filesByPath,m=$n.getState().updateFile,v=f[u];if(!v){Nn.info(`File ${u} changed but not loaded in editor`);return}if(v.saveState===zt.modified||v.saveState===zt.new){Nn.warn(`File ${u} changed on disk but has unsaved changes. Showing conflict dialog.`);const b=await rd("local",u);i({filePath:u,localContent:v.content??"",remoteContent:b.content??""});return}Nn.info(`Reloading ${u} from disk...`);const _=await rd("local",u),y=e.Uri.file(u),w=e.editor.getModel(y);w&&_.content!==void 0&&(w.setValue(_.content),Nn.info(`Updated Monaco model for ${u}`)),m({...v,content:_.content,saveState:zt.unmodified,lastModified:_.lastModified}),Nn.info(`Successfully reloaded ${u}`)}catch(c){Nn.error("Error handling file change event:",c)}}),a.addEventListener("init",()=>{Nn.info("SSE connection established")}),a.onerror=l=>{a.readyState===EventSource.CLOSED?Nn.debug("SSE connection closed"):Nn.warn("SSE connection error:",l)},()=>{a.close(),n.current=null,Nn.info("SSE connection closed")}},[e]);const o=async a=>{if(!r||!e)return;const l=$n.getState().filesByPath,c=$n.getState().updateFile,u=l[r.filePath];if(!u){i(null);return}const f=await rd("local",r.filePath),m=a==="local"?r.localContent:r.remoteContent,v=e.Uri.file(r.filePath),_=e.editor.getModel(v);_&&_.setValue(m),c({...u,content:m,saveState:a==="local"?zt.modified:zt.unmodified,lastModified:f.lastModified}),Nn.info(`Conflict resolved for ${r.filePath} using ${a} version`),i(null)},s=async()=>{if(!r)return;const a=$n.getState().filesByPath,l=$n.getState().updateFile,c=a[r.filePath];if(c){const u=await rd("local",r.filePath);l({...c,lastModified:u.lastModified}),Nn.info(`Conflict dialog canceled for ${r.filePath}, updated lastModified timestamp`)}i(null)};return p.jsx(p.Fragment,{children:r&&p.jsx(Kee,{open:!0,filePath:r.filePath,localContent:r.localContent,remoteContent:r.remoteContent,onResolve:o,onCancel:s})})};function cFe(){const[e,t]=g.useState(null),n=$n(a=>a.updateFile),r=$n(a=>a.filesByPath),i=$n(a=>a.saveConflictPath),o=$n(a=>a.clearSaveConflict);g.useEffect(()=>{if(i){Nn.info(`Save conflict detected for ${i}`);const a=r[i];a?rd("local",i).then(l=>{t({filePath:i,localContent:a.content??"",remoteContent:l.content??"",remoteLastModified:l.lastModified})}).catch(l=>{Nn.error("Error fetching file for conflict dialog:",l)}):Nn.warn(`No file model found for ${i}`),o()}},[i,r,o]);const s=async a=>{if(!e)return;const l=r[e.filePath];if(l){if(a==="remote")n({...l,content:e.remoteContent,lastModified:e.remoteLastModified,saveState:zt.unmodified}),Nn.info(`Using disk version for ${e.filePath}, canceling save`);else{Nn.info(`User chose local version for ${e.filePath}, saving to disk`);try{const c={path:l.path,content:l.content};await A_e("local",c,{forceSave:!0});const u=await rd("local",e.filePath);n({...l,lastModified:u.lastModified,saveState:zt.unmodified}),Nn.info(`Successfully saved local version for ${e.filePath}`)}catch(c){Nn.error(`Error saving local version for ${e.filePath}:`,c),n({...l,saveState:zt.modified})}}t(null)}};return e?p.jsx(Kee,{open:!0,filePath:e.filePath,localContent:e.localContent,remoteContent:e.remoteContent,onResolve:s,onCancel:()=>{t(null)}}):null}function uFe(){const e=Vr(),{monaco:t,reloadFiles:n}=Wee(),r=hg(n.execute),i=hg(e),o=e.environment.name;return JA({queryKey:["reloadFiles",o],queryFn:async()=>(await r.current(i.current),!0),refetchOnWindowFocus:!1,enabled:!!t&&!!o}),p.jsxs(p.Fragment,{children:[p.jsx(lFe,{}),p.jsx(cFe,{}),p.jsx(BLe,{}),p.jsx(hA,{})]})}const dFe=({count:e})=>!e||e===0?null:p.jsx("span",{className:"absolute top-1 right-0 h-2 w-2 rounded-full bg-blue-400"}),dz=({children:e,to:t,badgeCount:n,end:r})=>p.jsx(rU,{end:r,to:t,className:({isActive:i,isPending:o})=>We("font-medium relative items-center px-2 py-1 rounded-md text-gray-900 text-sm transition-colors","rounded-md hover:text-zuplo-600",i&&"text-zuplo-700",o&&"text-zuplo-700 animate-pulse"),children:({isActive:i})=>p.jsxs(p.Fragment,{children:[i&&p.jsx(p0.div,{layoutId:"local-navigation-item-background",transition:{type:"spring",bounce:.1,duration:.4},className:"absolute inset-0 rounded-md -z-10 bg-zuplo-100"}),e,p.jsx(dFe,{count:n})]})}),fFe=()=>p.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),hFe=()=>{const e=Vr(),[t,n]=g.useState(!1),r=dp(e.environment),{copyToClipboard:i,state:o}=O2(r??"");return p.jsxs(Cc,{open:t,onOpenChange:n,children:[p.jsx(Pc,{asChild:!0,children:p.jsxs(ot,{variant:"white",size:"sm",className:"gap-2 flex justify-between h-8 mt-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(lde,{size:16}),"Deployment URLs"]}),p.jsx(w_,{size:16})]})}),p.jsx(rl,{className:"divide-y p-0",align:"end",children:r?p.jsxs("div",{className:"p-4",children:[p.jsx("div",{className:"font-medium text-lg",children:"Local Development"}),p.jsx("div",{className:"h-2"}),p.jsxs("div",{children:[p.jsx("div",{className:"uppercase text-muted-foreground font-semibold text-xs",children:"Gateway"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(fFe,{}),p.jsx("div",{className:"text-sm max-w-52 truncate break-all",children:p.jsx(Di,{href:r,target:"_blank",variant:"ghost",rel:"noopener noreferrer",className:"hover:underline",children:r})}),p.jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded-md transition-colors",onClick:()=>{i(),n(!1)},children:o==="copied"?p.jsx(oo,{size:16,className:"text-green-500"}):p.jsx(b_,{size:16})})]})]})]}):p.jsxs("div",{className:"w-60 p-5 text-center",children:[p.jsx("div",{className:"text-2xl font-medium",children:"🙈"}),p.jsx("div",{className:"text-md mt-4",children:"Deployment URL not configured. Make sure your local gateway is running."})]})})]})},pFe=()=>p.jsxs("div",{className:"flex flex-row justify-between w-full border-b border-gray-200 bg-white px-4 pb-3 pt-2",children:[p.jsxs("nav",{"aria-label":"Sidebar",className:"flex gap-2 items-center mt-2",children:[p.jsx(dz,{end:!0,to:"/dev/project/local",children:"Project"}),p.jsx(dz,{to:"/dev/project/local/edit",children:"Code"})]}),p.jsx(hFe,{})]}),mFe=()=>p.jsxs("div",{className:"h-screen flex flex-col",children:[p.jsx(pFe,{}),p.jsx(g.Suspense,{fallback:null,children:p.jsx(hA,{})})]});function il(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function gFe(e,t=[]){let n=[];function r(o,s){const a=g.createContext(s),l=n.length;n=[...n,s];const c=f=>{var b;const{scope:m,children:v,..._}=f,y=((b=m==null?void 0:m[e])==null?void 0:b[l])||a,w=g.useMemo(()=>_,Object.values(_));return p.jsx(y.Provider,{value:w,children:v})};c.displayName=o+"Provider";function u(f,m){var y;const v=((y=m==null?void 0:m[e])==null?void 0:y[l])||a,_=g.useContext(v);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,u]}const i=()=>{const o=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,vFe(i,...t)]}function vFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Zee(e,t=[]){let n=[];function r(o,s){const a=g.createContext(s),l=n.length;n=[...n,s];function c(f){const{scope:m,children:v,..._}=f,y=(m==null?void 0:m[e][l])||a,w=g.useMemo(()=>_,Object.values(_));return p.jsx(y.Provider,{value:w,children:v})}function u(f,m){const v=(m==null?void 0:m[e][l])||a,_=g.useContext(v);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,yFe(i,...t)]}function yFe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function wFe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yee(...e){return t=>e.forEach(n=>wFe(n,t))}function o_(...e){return g.useCallback(Yee(...e),e)}var s_=g.forwardRef((e,t)=>{const{children:n,...r}=e,i=g.Children.toArray(n),o=i.find(xFe);if(o){const s=o.props.children,a=i.map(l=>l===o?g.Children.count(s)>1?g.Children.only(null):g.isValidElement(s)?s.props.children:null:l);return p.jsx(JN,{...r,ref:t,children:g.isValidElement(s)?g.cloneElement(s,void 0,a):null})}return p.jsx(JN,{...r,ref:t,children:n})});s_.displayName="Slot";var JN=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const i=EFe(n);return g.cloneElement(n,{..._Fe(r,n.props),ref:t?Yee(t,i):i})}return g.Children.count(n)>1?g.Children.only(null):null});JN.displayName="SlotClone";var bFe=({children:e})=>p.jsx(p.Fragment,{children:e});function xFe(e){return g.isValidElement(e)&&e.type===bFe}function _Fe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function EFe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function SFe(e){const t=e+"CollectionProvider",[n,r]=Zee(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:_,children:y}=v,w=Ze.useRef(null),b=Ze.useRef(new Map).current;return p.jsx(i,{scope:_,itemMap:b,collectionRef:w,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Ze.forwardRef((v,_)=>{const{scope:y,children:w}=v,b=o(a,y),x=o_(_,b.collectionRef);return p.jsx(s_,{ref:x,children:w})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=Ze.forwardRef((v,_)=>{const{scope:y,children:w,...b}=v,x=Ze.useRef(null),S=o_(_,x),$=o(c,y);return Ze.useEffect(()=>($.itemMap.set(x,{ref:x,...b}),()=>void $.itemMap.delete(x))),p.jsx(s_,{[u]:"",ref:S,children:w})});f.displayName=c;function m(v){const _=o(e+"CollectionConsumer",v);return Ze.useCallback(()=>{const w=_.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(_.itemMap.values()).sort(($,P)=>b.indexOf($.ref.current)-b.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},m,r]}var eA=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},$Fe=fa.useId||(()=>{}),CFe=0;function Xee(e){const[t,n]=g.useState($Fe());return eA(()=>{n(r=>r??String(CFe++))},[e]),e||(t?`radix-${t}`:"")}var PFe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Dp=PFe.reduce((e,t)=>{const n=g.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?s_:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mk(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=RFe({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Mk(n),l=g.useCallback(c=>{if(o){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else i(c)},[o,e,i,a]);return[s,l]}function RFe({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,i=g.useRef(r),o=Mk(t);return g.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var TFe=g.createContext(void 0);function Jee(e){const t=g.useContext(TFe);return e||t||"ltr"}var TR="rovingFocusGroup.onEntryFocus",NFe={bubbles:!1,cancelable:!0},G2="RovingFocusGroup",[tA,ete,AFe]=SFe(G2),[jFe,tte]=Zee(G2,[AFe]),[OFe,kFe]=jFe(G2),nte=g.forwardRef((e,t)=>p.jsx(tA.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(tA.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(IFe,{...e,ref:t})})}));nte.displayName=G2;var IFe=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,m=g.useRef(null),v=o_(t,m),_=Jee(o),[y=null,w]=Qee({prop:s,defaultProp:a,onChange:l}),[b,x]=g.useState(!1),S=Mk(c),$=ete(n),P=g.useRef(!1),[C,T]=g.useState(0);return g.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(TR,S),()=>A.removeEventListener(TR,S)},[S]),p.jsx(OFe,{scope:n,orientation:r,dir:_,loop:i,currentTabStopId:y,onItemFocus:g.useCallback(A=>w(A),[w]),onItemShiftTab:g.useCallback(()=>x(!0),[]),onFocusableItemAdd:g.useCallback(()=>T(A=>A+1),[]),onFocusableItemRemove:g.useCallback(()=>T(A=>A-1),[]),children:p.jsx(Dp.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:il(e.onMouseDown,()=>{P.current=!0}),onFocus:il(e.onFocus,A=>{const D=!P.current;if(A.target===A.currentTarget&&D&&!b){const z=new CustomEvent(TR,NFe);if(A.currentTarget.dispatchEvent(z),!z.defaultPrevented){const K=$().filter(fe=>fe.focusable),B=K.find(fe=>fe.active),te=K.find(fe=>fe.id===y),oe=[B,te,...K].filter(Boolean).map(fe=>fe.ref.current);ote(oe,u)}}P.current=!1}),onBlur:il(e.onBlur,()=>x(!1))})})}),rte="RovingFocusGroupItem",ite=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=Xee(),l=o||a,c=kFe(rte,n),u=c.currentTabStopId===l,f=ete(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=c;return g.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),p.jsx(tA.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:p.jsx(Dp.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:il(e.onMouseDown,_=>{r?c.onItemFocus(l):_.preventDefault()}),onFocus:il(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:il(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){c.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=LFe(_,c.orientation,c.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let b=f().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const x=b.indexOf(_.currentTarget);b=c.loop?FFe(b,x+1):b.slice(x+1)}setTimeout(()=>ote(b))}})})})});ite.displayName=rte;var MFe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DFe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LFe(e,t,n){const r=DFe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return MFe[r]}function ote(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VFe=nte,zFe=ite;function UFe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var ste=e=>{const{present:t,children:n}=e,r=qFe(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=o_(r.ref,HFe(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:o}):null};ste.displayName="Presence";function qFe(e){const[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),o=g.useRef("none"),s=e?"mounted":"unmounted",[a,l]=UFe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=yb(r.current);o.current=a==="mounted"?c:"none"},[a]),eA(()=>{const c=r.current,u=i.current;if(u!==e){const m=o.current,v=yb(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),eA(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=v=>{const y=yb(r.current).includes(v.animationName);if(v.target===t&&y&&(l("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=v=>{v.target===t&&(o.current=yb(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function yb(e){return(e==null?void 0:e.animationName)||"none"}function HFe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dk="Tabs",[BFe,B9e]=gFe(Dk,[tte]),ate=tte(),[WFe,Lk]=BFe(Dk),lte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Jee(a),[f,m]=Qee({prop:r,onChange:i,defaultProp:o});return p.jsx(WFe,{scope:n,baseId:Xee(),value:f,onValueChange:m,orientation:s,dir:u,activationMode:l,children:p.jsx(Dp.div,{dir:u,"data-orientation":s,...c,ref:t})})});lte.displayName=Dk;var cte="TabsList",ute=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Lk(cte,n),s=ate(n);return p.jsx(VFe,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:p.jsx(Dp.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});ute.displayName=cte;var dte="TabsTrigger",fte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=Lk(dte,n),a=ate(n),l=mte(s.baseId,r),c=gte(s.baseId,r),u=r===s.value;return p.jsx(zFe,{asChild:!0,...a,focusable:!i,active:u,children:p.jsx(Dp.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:il(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:il(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:il(e.onFocus,()=>{const f=s.activationMode!=="manual";!u&&!i&&f&&s.onValueChange(r)})})})});fte.displayName=dte;var hte="TabsContent",pte=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=Lk(hte,n),l=mte(a.baseId,r),c=gte(a.baseId,r),u=r===a.value,f=g.useRef(u);return g.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(ste,{present:i||u,children:({present:m})=>p.jsx(Dp.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&o})})});pte.displayName=hte;function mte(e,t){return`${e}-trigger-${t}`}function gte(e,t){return`${e}-content-${t}`}var GFe=lte,KFe=ute,ZFe=fte,YFe=pte;const fz=[{label:"MCP",value:"mcp",items:[{title:"Installing the MCP Inspector",description:"Set up the MCP Inspector locally and start testing your MCP server with ease.",icon:iQ,link:{href:"https://zuplo.com/docs/handlers/mcp-server#mcp-inspector",text:"Get Started"}},{title:"MCP Quickstart",description:"Learn how to start using Model Context Protocol to pass context into any model call.",icon:lQ,link:{href:"https://zuplo.com/docs/articles/mcp-quickstart",text:"Get Started"}},{title:"Using OAuth with MCP",description:"Authenticate users securely by integrating OAuth flows into your Model Context Protocol setup.",icon:aQ,link:{href:"https://zuplo.com/docs/articles/configuring-auth0-for-mcp-auth",text:"Get Started"}}]},{label:"Rate Limiting",value:"rate-limiting",items:[{title:"Adding Rate Limiting",description:"Control traffic and protect your APIs by setting up flexible, customizable rate limits.",icon:nQ,link:{href:"https://zuplo.com/docs/articles/step-2-add-rate-limiting",text:"Get Started"}},{title:"Complex Rate Limiting",description:"Implement advanced rules to rate limit by user, IP, plan, or custom logic.",icon:rQ,link:{href:"https://zuplo.com/docs/policies/complex-rate-limit-inbound",text:"Get Started"}},{title:"Dynamic Rate Limits",description:"Set rate limits that adapt in real-time based on headers, tokens, or user context.",icon:sQ,link:{href:"https://zuplo.com/examples/dynamic-rate-limits",text:"Get Started"}}]},{label:"Authentication",value:"authentication",items:[{title:"Using API Keys",description:"Authenticate and manage access to your APIs with simple, secure API key workflows.",icon:uQ,link:{href:"https://zuplo.com/docs/policies/api-key-inbound",text:"Get Started"}},{title:"Using Auth0",description:"Connect your APIs to Auth0 for streamlined authentication and powerful identity management.",icon:dQ,link:{href:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound",text:"Get Started"}},{title:"Using Okta",description:"Integrate Okta with your APIs to enable secure, enterprise-grade authentication and authorization.",icon:oQ,link:{href:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound",text:"Get Started"}}]},{label:"Dev Portal",value:"dev-portal",items:[{title:"Setup your API Reference",description:"Instantly generate an interactive reference by importing your OpenAPI spec—no manual work needed.",icon:eQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/configuration/api-reference",text:"Get Started"}},{title:"Adding Authentication",description:"Guide users through secure API access by adding auth flows to your developer portal.",icon:cQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication",text:"Get Started"}},{title:"Creating API Catalogs",description:"Organize your APIs into searchable, user-friendly catalogs for easier discovery and onboarding.",icon:tQ,link:{href:"https://zuplo.com/docs/dev-portal/zudoku/guides/using-multiple-apis",text:"Get Started"}}]}],XFe=()=>p.jsxs(GFe,{defaultValue:"mcp",className:"flex flex-col my-8",children:[p.jsx(KFe,{className:"flex gap-8 border-b border-gray-200 mb-8 ml-1",children:fz.map(e=>p.jsx(ZFe,{value:e.value,className:"relative py-2 text-sm font-medium text-gray-600 hover:text-gray-900 data-[state=active]:text-gray-900 border-b-2 border-transparent data-[state=active]:border-black transition-colors",children:e.label},e.value))}),fz.map(e=>p.jsx(YFe,{value:e.value,className:"grid grid-cols-3 gap-4",children:e.items.map(t=>p.jsxs($r,{className:"flex flex-col gap-2 text-muted-foreground text-gray-700 ",children:[p.jsxs(_d,{className:"flex gap-2",children:[p.jsx(t.icon,{size:24,weight:"duotone",className:"[&_[opacity='0.2']]:fill-pink-500"}),p.jsx(Ac,{className:"gap-x-2 text-lg font-semibold",children:t.title})]}),p.jsx($h,{className:"text-md",children:t.description}),p.jsx(N2,{className:"flex-1 items-end border-0 mb-4",children:p.jsx(ot,{variant:"white",asChild:!0,size:"sm",className:"w-full",children:p.jsx(Di,{href:t.link.href,variant:"ghost",children:t.link.text})})})]},t.title))},e.value))]}),QFe=({title:e,url:t,className:n})=>{const{copyToClipboard:r,state:i}=O2(t??"",{showValue:!1});return p.jsxs($r,{className:We("col-span-full md:col-span-5 py-2 px-4 flex items-center text-sm gap-x-2",n),children:[p.jsx("div",{className:"bg-green-600 rounded-full w-4 h-4 p-0.5",children:p.jsx(oo,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold",children:e}),p.jsx("div",{className:"flex-1",children:t?p.jsx(Di,{href:t,className:"ml-2 font-medium line-clamp-1 break-all",children:t}):p.jsx(pi,{className:"ml-2 h-4 w-8/12"})}),p.jsx(ot,{variant:"secondary",size:"xs",onClick:r,children:p.jsxs(Ug,{loading:i==="copied",alternative:p.jsx(oo,{size:12,className:"text-green-600",strokeWidth:3}),className:"flex",children:[p.jsx(b_,{size:16,className:"mr-2",strokeWidth:1.5}),"Copy URL"]})})]})},JFe="/static/img/hero-CA-QKTbm.svg",e9e=()=>{const{deploymentDevPortalUrl:e}=ILe();return p.jsxs($r,{className:"col-span-full md:col-span-3 py-2 px-4 flex items-center text-sm gap-x-2",children:[p.jsx("div",{className:We(" rounded-full w-4 h-4 p-0.5",e?"bg-green-500":"bg-gray-500"),children:e?p.jsx(oo,{className:"text-white",size:12}):p.jsx(Fq,{className:"text-white",size:12})}),p.jsx("span",{className:"font-semibold flex-1 line-clamp-1 break-all",children:"Developer Portal"}),p.jsx(ot,{variant:"secondary",size:"xs",asChild:!0,title:e?"":"Not available",disabled:!e,children:p.jsxs(Di,{href:e,variant:"ghost",children:[p.jsx(Dg,{size:16,strokeWidth:1.5,className:"mr-2"}),"Open Portal"]})})]})},t9e=()=>{const{account:e,project:t}=Vr(["account","project"]),{logEvent:n}=vn();return p.jsxs("div",{className:"flex flex-col space-y-4",children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Support"}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(G8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Talk to an API expert"}),p.jsx(Sh,{className:"text-md",children:"Get a free technical consultation with one of our API experts."})]}),p.jsx(ot,{onClick:()=>{n("getting-started-book-a-meeting-clicked",{account:e.name}),window.open(B8,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Di,{href:B8,variant:"ghost",children:[p.jsx(fue,{className:"mr-2",size:16}),"Book a Meeting"]})})]})}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(W8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Feeling Stuck?"}),p.jsx(Sh,{className:"text-md",children:"Check out our various support options to get help with your API"})]}),p.jsx(ot,{size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Mg,{to:B0(ag.Support,{account:e.name}),children:[p.jsx(W8,{className:"h-4 w-4 mr-2 mb-0.5"}),"Get Help"]})})]})}),p.jsx($r,{offset:"md",className:"p-6",children:p.jsxs("div",{className:"flex w-full gap-4 items-center",children:[p.jsx("div",{className:"rounded-lg bg-gray-100 w-20 h-20 grid place-items-center",children:p.jsx(G8,{size:38,strokeWidth:1.6,fill:"#FF99E5",fillOpacity:.2})}),p.jsxs("div",{className:"flex-1",children:[p.jsx(Ac,{className:"text-base",children:"Join the Zuplo API Community"}),p.jsx(Sh,{className:"text-md",children:"Come chat with fellow Zuplo users and the Zuplo team in our Discord channel."})]}),p.jsx(ot,{onClick:()=>{n("getting-started-join-discord-clicked",{account:e.name,project:t.name}),window.open(vT,"_blank")},size:"sm",className:"min-w-40",variant:"secondary",asChild:!0,children:p.jsxs(Di,{href:vT,variant:"ghost",children:[p.jsx($de,{className:"mr-2",size:16}),"Join Us"]})})]})})]})},n9e=()=>p.jsxs("div",{children:[p.jsxs(_d,{children:[p.jsx(Ac,{className:"text-base",children:"Welcome to your Gateway"}),p.jsx(Sh,{className:"text-base",children:"You can get started by configuring your routes and setting up policies in our visual Route Designer."})]}),p.jsxs(N2,{className:"border-0 gap-2 py-6",children:[p.jsx(ot,{asChild:!0,size:"sm",className:"gap-2 px-8",variant:"outline-primary",children:p.jsxs(Mg,{to:"/dev/project/local/edit",children:[p.jsx(yT,{size:16}),"Start Building"]})}),p.jsx(ot,{className:"gap-x-2 px-8",variant:"secondary",size:"sm",asChild:!0,children:p.jsxs(Di,{variant:"ghost",href:"https://zuplo.com/docs/articles/step-1-setup-basic-gateway",children:[p.jsx(Dg,{size:16})," Quickstart"]})})]})]}),r9e=()=>{const{project:e,environment:t}=Vr(),n=dp(t);return p.jsx("div",{className:"bg-neutral-50 h-full overflow-y-auto",children:p.jsxs("div",{className:"pt-4 max-w-6xl pb-16 m-auto px-5 flex flex-col gap-4",children:[p.jsx("h1",{className:"text-2xl font-semibold",children:e.name}),p.jsxs("div",{className:"grid grid-cols-8 gap-3",children:[p.jsx(QFe,{title:"Gateway",url:n}),p.jsx(e9e,{})]}),p.jsxs($r,{className:"relative grid md:grid-cols-2 overflow-hidden min-h-[220px]",children:[p.jsx(n9e,{}),p.jsx("img",{src:JFe,alt:e.name,className:"self-end w-full hidden md:block object-cover object-left h-full"})]}),p.jsx(XFe,{}),p.jsx(t9e,{})]})})},i9e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAGWElEQVR4nO2dy4oeVRSFo4gXUBEnJqMEzESciIPMvIGCQxUzc6JkojhylKFvEB/Dl7CjCQYj0Yhi1BBFHPkGDiu9/C1S/nTnr+o+q9beZ68PNjR0d11OfVVn17nVicEYAifUB2D6xGIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLFMhQslqFgsQwFi2UoWCxDwWIZChbLULBYhoLF2uazv4bhwi/D8Op39+LU1WF46qtN4Ofp7/C3+B/zP2qL9fnfw/D2jxtZHvhivzSOGdgGtoVtYtuFqScWnjCtRJorGvZZjBpiXdqvqs5eW0em+0mGYyjyJOtbrIu/b/IilUyHBY7pUt95WZ9ioep5aE8v0K7AMXZaTfYlFqqZiE+oOU+wzqrIPsT6859hePFbvSDHDZwDzqUD8ouFOz1DtTc3cC4dPL1yi4UGSrUIrEBbWGJyioXqImMutTTQBpa0aswnFgr6scv6i75W4FwTypVLLOQeykZOVSTMu/KIVVWqMXDuieTKIVZ1qRLKFV8s5BeW6l6gWkyQc8UWq1qiPjcSJPSxxarQpHDUQFNEYOKK9UrHjZ+t4q24jagxxUKCqr5oWSJoMh9PLOQOPfX9sSNoMh9PrBeu6y9WtkCZBSOWWK4Cjx7BqsRYYvkt8OiBsgtEHLE+uKW/ONkDZRiEOGIpEvYH9+PRy+vEGueDMgxCDLEwm0Zxh5/5ehg+/WO9uHhnM/yYKVqQ2T8xxFLlVmuLNY3Xvuf0gQbJtfRi4Q5TSKUWC/H+rU113Pq8Arwh6sV69lpdsRDv/tT+yYUyFaMXSzkkJoJYiLONby6UqRitWOomhihiIalvfYPhhUiIVqyTVy3WGKcal8VJ7bAarVjqkaGRxHqp8TAhcXWoEytCv2AksZDEtz4/4duhTiwMUlOLhYZKyMWKN39YJlfr8xMOBNSJVaHD+fEv50vFuNGEjaU6sdQXfY14/eZ8sZ7/pv3+hXmWxYogFYLVf6i6vJK9fvyb/sJHkuqj27xjQVkL0Ij18g39xUc8d30Yzt1YFs9caSsVArkY6xzf0STwGrFOC/sHjyPAGzfbb/Mc+SY7rek3rClWFKl2bdNiLUQpViWpyomlmjdYTSrEI3uSS1xHrIpSIUTj4GuIVVUqi2WpaFGqKlwrea8uFaJU8r6GWJbKYjUPNDpGkOq9n7VSlROL2aWDoSKtpXr6yvKunyjf9inVpcPshP7w11xVFTtKdUL/u2dCIT65YGAdAiM81ReeHarLK9szYyIFJiTMleo8YaJotBAuEqITizH1CxMS5or1BHGoSpQQTgHrazLFkmoQEjInUqy1dNH9ouRkCsb0r/MLnljsgFxqsUpO/wKtc5yl0616FqvshFXQOs/CNHW1UFHEKj3FvvWiIFhrSi1UFLFKLwoCWleHUabNK8Uqv4wRaL3wGgo1QhKvFMsLrw2ct8MIcinF8lKR/8FYxwFyoSO4mlhe3HYCczluNFRCsE9u1xDLy3FvscZw5Yf31vtgAGM15F2BL68GIY5Y6vVIewh/8uQQKqyZxYogudVILLEiLB+ZNQK8CU6JJRbwhzCXB76fHYx4YvnTvcvCn+5dgKvE+RGsChyJKRaIsKpy9BAO5NtFXLGA+ssVkUM8LGYXscVC7oBGP/VFjBYok4B51ZTYYgEUYO+zaZZE0GR9m/hiASSolmtTBkGT9W1yiAWqy5VIKpBHLFBVLlR/iaQCucQC1RL6BIn6QeQTC6CgKzRF4BwTSgVyijXScyNq4MbPOeQWCyD36KlvMWE+dRD5xQKoLnoYFYFRCkmrvm36EGsEd3rGwYI45g6eUlP6EmsEQ3QzVI944ws0nLglfYo1ghkrEZ9gOKYgs2lY9C3WCKoZzA5WNq5i3ziGzqq8w6gh1hTMYUT70BqSYR/Yl3iBDgX1xJqCpwfai1qJhrwO28I2izyZDqO2WAeB3AdPGLz6jwFZkBch8PP0d/jbzvOlo2CxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQsFiGgsUyFCyWoWCxDAWLZShYLEPBYhkKFstQuAuHQWblXH1mCgAAAABJRU5ErkJggg==";function o9e(){const[e,t]=g.useState(!1);return g.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="initial"}),[]),p.jsxs("div",{className:"flex flex-row justify-center h-full w-full relative items-center",children:[p.jsx("img",{src:i9e,className:We("size-20",e&&"hidden")}),p.jsx("img",{src:"/zuplo.apng",className:We("h-20 w-20",!e&&"hidden"),onLoad:()=>t(!0)})]})}const s9e=g.createContext(null);function a9e(e,t){const n=new Set(e.requirements),r={...e.timestamps};switch(t.type){case"add":return n.add(t.id),r[t.id]=Date.now(),{requirements:[...n],timestamps:r};case"remove":return n.delete(t.id),delete r[t.id],{requirements:[...n],timestamps:r};default:throw new Error}}const l9e=({children:e})=>{const[t,n]=g.useReducer(a9e,{requirements:[],timestamps:{}}),r=g.useRef(null),i=g.useRef(new Set),o=g.useCallback(a=>n({type:"add",id:a}),[]),s=g.useCallback(a=>n({type:"remove",id:a}),[]);return g.useEffect(()=>(t.requirements.length>0?r.current=setInterval(()=>{const a=Date.now(),l=2e3;t.requirements.forEach(c=>{const u=t.timestamps[c];u&&a-u>l&&(i.current.has(c)||(console.warn(`🐌 Slow loading detected: "${c}" has been loading for ${Math.round((a-u)/1e3)} seconds`),i.current.add(c)))})},2e3):(r.current&&(clearInterval(r.current),r.current=null),i.current.clear()),()=>{r.current&&clearInterval(r.current)}),[t.requirements,t.timestamps]),p.jsxs(s9e.Provider,{value:{add:o,remove:s},children:[t.requirements.length>0&&p.jsx(o9e,{}),e]})},vte=({slots:e={}}={})=>{const t=new Map(Object.entries(e).map(([r,i])=>[r,[{id:r,content:i,type:"replace",sequence:0}]])),n=[];return rO()((r,i)=>({items:t,sequences:new Map,getItems:o=>i().items.get(o)??n,setSlot:(o,s,a,l)=>r(c=>{if(a==null)return c;const u=new Map(c.items),f=new Map(c.sequences),v=(u.get(s)??[]).filter(b=>b.id!==o),y=(f.get(s)??0)+1;f.set(s,y);const w={id:o,content:a,type:l,sequence:l==="prepend"?-y:y};if(l==="replace"){const b=v.filter(x=>x.type!=="replace");u.set(s,[...b,w])}else u.set(s,[...v,w]);return{items:u,sequences:f}}),clearSlot:(o,s)=>r(a=>{const l=new Map(a.items),c=new Map(a.sequences),f=(l.get(s)??[]).filter(m=>m.id!==o);return f.length===0?(l.delete(s),c.delete(s)):l.set(s,f),{items:l,sequences:c}})}))},c9e=g.createContext(vte()),u9e=({children:e,slots:t})=>{const n=g.useRef(vte({slots:t})).current;return p.jsx(c9e.Provider,{value:n,children:e})},d9e={email:"local@example.com",name:"Local Developer",userId:"local-user-id",asUser:void 0},f9e=({children:e})=>p.jsx(tO.Provider,{value:d9e,children:e}),h9e=new Gfe({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}}),p9e=({children:e})=>p.jsx(p.Fragment,{children:e}),hz=e=>({account:{id:"local",name:"local",label:"Local Development",createdOn:new Date().toISOString(),isSharingEnabled:!1,isMfaEnforced:!1,isSsoAutoJoinEnabled:!1,requireSsoAuth:!1,plan:"FREE_V1",supportPin:void 0,logoUrl:null,entitlements:{customDomains:0,aliasDomains:!1,devPortalZuploBranding:!0,egressGbPerMonth:100,kvStoreEnabled:!0,numberOfApiKeys:100,numberOfProjects:10,numberOfUsers:5,requestsPerMonth:1e6,advancedAnalyticsEnabled:!1,premiumSupport:!1,emergencyPhoneSupport:!1,rbacEnabled:!1,mfaEnforcement:!1,enterpriseSingleSignOn:!1,auditLogsEnabled:!1},customDomainsInUse:0,tenantId:null},project:{sourceControlProvider:"GITHUB",accountName:"local",name:"local-project",productType:"standard",createdOn:new Date().toISOString(),sourceRepoUrl:null,defaultBranch:null,hasWorkingCopy:!0,hasCurrentUserWorkingCopy:!0,deployedEnvironmentCount:0,isProjectMember:!0,id:"local-project-id",type:"managed-edge"},environment:{name:"local",label:"local",urlParameter:"local",createdOn:Date.now(),accountName:"local",projectName:"local-project",state:"STARTED",message:null,branchName:null,environmentType:nd.WORKING_COPY,customDomain:void 0,updatedOn:Date.now(),deploymentVersion:e}});function m9e({children:e}){const[t,n]=g.useState(()=>hz());return g.useEffect(()=>{(async()=>{try{const o=await(await Z_("/deployments/local")).json();n(hz(o.deploymentVersion))}catch(i){Nn.error("Failed to fetch deployment info:",i)}})()},[]),p.jsx(f9e,{children:p.jsx(Kfe,{client:h9e,children:p.jsx(u9e,{children:p.jsx(l9e,{children:p.jsx(X$e,{children:p.jsx(p9e,{children:p.jsx(YW.Provider,{value:t,children:p.jsx(X2e,{children:e})})})})})})})})}const g9e=()=>p.jsx(m9e,{children:p.jsx(hA,{})}),v9e=Pse(Moe),y9e=v9e(foe(p.jsxs(zu,{path:"/",element:p.jsx(g9e,{}),errorElement:p.jsx(Bde,{id:"root"}),children:[p.jsx(zu,{path:"/:account/:project/:environment",element:p.jsx(uFe,{}),children:p.jsxs(zu,{element:p.jsx(mFe,{}),children:[p.jsx(zu,{index:!0,element:p.jsx(r9e,{})}),p.jsx(zu,{path:"edit",element:p.jsx(ULe,{})})]})}),p.jsx(zu,{path:"*",element:p.jsx(Wde,{})})]})));Vh.config({paths:{vs:"/monaco/min/vs"}});window.getAccessTokenSilently=async()=>"local-dev-token";window.addEventListener("unhandledrejection",e=>{var t;((t=e.reason)==null?void 0:t.type)==="cancelation"&&e.preventDefault()});Mre.createRoot(document.getElementById("root")).render(p.jsx(g.StrictMode,{children:p.jsx(g.Suspense,{fallback:null,children:p.jsx(loe,{router:y9e})})}));export{Nn as l};
2074
+ //# sourceMappingURL=main-CIyp_ifb.js.map