@redocly/openapi-docs 3.24.0-next.8 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{redocly-openapi-docs.min.AiChatProvider-D8o94qvX.js → redocly-openapi-docs.min.AiChatProvider-CIrPFbvX.js} +3 -3
- package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-BLTom3F-.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-eAy3scC4.js} +1 -1
- package/dist/{redocly-openapi-docs.min.AiPanel-DloIzPy9.js → redocly-openapi-docs.min.AiPanel-C6CGDyzy.js} +116 -116
- package/dist/redocly-openapi-docs.min.FileWatcher-dIKl80Ec.js +1 -0
- package/dist/redocly-openapi-docs.min.Observable-D6wKbFwB.js +1 -0
- package/dist/redocly-openapi-docs.min.SemanticSearchService-D4V6-td8.js +1 -0
- package/dist/{redocly-openapi-docs.min.SqliteDBStorage-CksbFVf-.js → redocly-openapi-docs.min.SqliteDBStorage-D9-Rb-N7.js} +1 -1
- package/dist/redocly-openapi-docs.min.TauriFileSystemAdapter-CHW6hO3z.js +1 -0
- package/dist/redocly-openapi-docs.min.TauriRootStorage-CHiKNUn2.js +1 -0
- package/dist/redocly-openapi-docs.min.ai-chat-mappers-C19k85fj.js +1 -0
- package/dist/redocly-openapi-docs.min.core-BYyFOtMX.js +1 -0
- package/dist/redocly-openapi-docs.min.external-resolver-BH7DBWU-.js +2 -0
- package/dist/redocly-openapi-docs.min.index-BQp5pipW.js +1 -0
- package/dist/redocly-openapi-docs.min.index-BuFUmOUm.js +7730 -0
- package/dist/redocly-openapi-docs.min.index-DLlCa16R.js +1 -0
- package/dist/redocly-openapi-docs.min.index-YnvLQkG_.js +1 -0
- package/dist/redocly-openapi-docs.min.index-dirYvuKs.js +1 -0
- package/dist/redocly-openapi-docs.min.index-xl_tBaHD.js +1 -0
- package/dist/redocly-openapi-docs.min.js +1 -1
- package/dist/redocly-openapi-docs.min.lint-Xu623Q1T.js +181 -0
- package/dist/{redocly-openapi-docs.min.lint-graphql-y6yM0_Y_.js → redocly-openapi-docs.min.lint-graphql-D-Nm5P1M.js} +1 -1
- package/dist/redocly-openapi-docs.min.periodic-revalidation-Dsp-n7ui.js +1 -0
- package/dist/redocly-openapi-docs.min.promise-map-limit-Db_42GvV.js +1 -0
- package/dist/{redocly-openapi-docs.min.respect-run-C77Wul9G.js → redocly-openapi-docs.min.respect-run-CWNqYysq.js} +23 -23
- package/dist/redocly-openapi-docs.min.standalone-CRo0Sa5b.js +11995 -0
- package/dist/redocly-openapi-docs.min.tauri-path-BUSVirPk.js +1 -0
- package/dist/{redocly-openapi-docs.min.useAiChatQueries-B9Y_hT0w.js → redocly-openapi-docs.min.useAiChatQueries-CXyQzME7.js} +80 -80
- package/lib/components/Callbacks/CallbackOperation.js +1 -1
- package/lib/components/Content/useAutoScroll.js +1 -1
- package/lib/components/ContentItem/useIsExpanded.js +1 -1
- package/lib/components/ContentItems/ContentItems.js +1 -1
- package/lib/components/ContentItems/VirtualList.js +1 -1
- package/lib/components/ContentItems/useScrollOnRender.js +1 -1
- package/lib/components/Responses/OperationResponseList.js +1 -1
- package/lib/components/Schema/Schema.js +1 -1
- package/lib/components/Schema/SubSchema.js +1 -1
- package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +1 -1
- package/lib/components/TagItem/OperationsNavigation.js +1 -1
- package/lib/components/TagItem/TagItem.js +1 -1
- package/lib/components/common/LinkToField.js +1 -1
- package/lib/components/common/linkify.js +1 -1
- package/lib/hooks/useRouter.js +1 -1
- package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
- package/lib/utils/path.d.ts +1 -1
- package/package.json +12 -12
- package/dist/redocly-openapi-docs.min.ai-chat-mappers-Dza6UMVG.js +0 -1
- package/dist/redocly-openapi-docs.min.external-resolver-Cm8qMSH6.js +0 -2
- package/dist/redocly-openapi-docs.min.index-CVScN5cj.js +0 -7586
- package/dist/redocly-openapi-docs.min.index-DQKkHTdL.js +0 -1
- package/dist/redocly-openapi-docs.min.index-DWPYSZX6.js +0 -1
- package/dist/redocly-openapi-docs.min.index-qqKTpI_q.js +0 -1
- package/dist/redocly-openapi-docs.min.lint-B0W-5WwE.js +0 -181
- package/dist/redocly-openapi-docs.min.standalone-BFWv5fnd.js +0 -12112
- package/dist/redocly-openapi-docs.min.tauri-path-Dc9-nUUG.js +0 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import{d as Vr,bq as _n,l as xe,br as Jh,b8 as En,bs as ic,b9 as at,ao as cc,bt as Yh,bu as Wh,aD as $a,bd as Ke,aB as lc,p as We,bi as Hh,bv as Xh,bw as Qh,bx as Zh,be as Vt,bk as ey,bg as Pn,by as vr,bz as uc,bA as pc,bB as _a,bC as Fr,bD as Qt,bE as ty,bF as ry,aJ as Zt,b4 as Sn,b5 as ny,bf as oy,bG as sy,aE as zr,aO as dc,bH as ay,a$ as iy,aG as ir,b3 as fc,aI as Ea,aH as In,bI as xn,aP as mc,aR as cy,b1 as ly,aF as Tn,bJ as uy,aS as py,aQ as hc,b6 as dy,bl as yc,aU as gc,bK as fy,bL as my,bM as vc,bb as hy,b7 as yy,bN as bc}from"./redocly-openapi-docs.min.standalone-CRo0Sa5b.js";function gy(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function Ur(e){return Array.isArray(e)&&e.length>0}function Pa(e){return e?Object.keys(e):[]}var Sa={exports:{}},vy=Sa.exports,wc;function by(){return wc||(wc=1,(function(e,t){(function(r,n){typeof gy=="function"?e.exports=n():r.pluralize=n()})(vy,function(){var r=[],n=[],o={},s={},a={};function c(S){return typeof S=="string"?new RegExp("^"+S+"$","i"):S}function i(S,b){return S===b?b:S===S.toLowerCase()?b.toLowerCase():S===S.toUpperCase()?b.toUpperCase():S[0]===S[0].toUpperCase()?b.charAt(0).toUpperCase()+b.substr(1).toLowerCase():b.toLowerCase()}function l(S,b){return S.replace(/\$(\d{1,2})/g,function($,y){return b[y]||""})}function u(S,b){return S.replace(b[0],function($,y){var d=l(b[1],arguments);return i($===""?S[y-1]:$,d)})}function f(S,b,$){if(!S.length||o.hasOwnProperty(S))return b;for(var y=$.length;y--;){var d=$[y];if(d[0].test(b))return u(b,d)}return b}function _(S,b,$){return function(y){var d=y.toLowerCase();return b.hasOwnProperty(d)?i(y,d):S.hasOwnProperty(d)?i(y,S[d]):f(d,y,$)}}function m(S,b,$,y){return function(d){var P=d.toLowerCase();return b.hasOwnProperty(P)?!0:S.hasOwnProperty(P)?!1:f(P,P,$)===P}}function w(S,b,$){var y=b===1?w.singular(S):w.plural(S);return($?b+" ":"")+y}return w.plural=_(a,s,r),w.isPlural=m(a,s,r),w.singular=_(s,a,n),w.isSingular=m(s,a,n),w.addPluralRule=function(S,b){r.push([c(S),b])},w.addSingularRule=function(S,b){n.push([c(S),b])},w.addUncountableRule=function(S){if(typeof S=="string"){o[S.toLowerCase()]=!0;return}w.addPluralRule(S,"$0"),w.addSingularRule(S,"$0")},w.addIrregularRule=function(S,b){b=b.toLowerCase(),S=S.toLowerCase(),a[S]=b,s[b]=S},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(S){return w.addIrregularRule(S[0],S[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(S){return w.addPluralRule(S[0],S[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(S){return w.addSingularRule(S[0],S[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(w.addUncountableRule),w})})(Sa)),Sa.exports}var wy=by();const $c=Vr(wy);function $y(e,t,r){return e.split(" ").map(n=>$c(n,t,r)).join(" ")}var _c={hide:{type:"boolean"},component:{type:"string",enum:["radio","checkbox"]},label:{type:"string"},items:{type:"array",items:{type:"string"}}},Br={type:"object",properties:_c,additionalProperties:!1},_y={type:"object",properties:{hide:{type:"boolean"},label:{type:"string"},placeholder:{type:"string"}},additionalProperties:!1},Gr={type:"object",properties:{hide:{type:"boolean"},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"]},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"]},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:{..._c,like:Br,dislike:Br,satisfied:Br,neutral:Br,dissatisfied:Br},additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean"},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1},optionalEmail:_y},additionalProperties:!1}},additionalProperties:!1},Ey={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string"},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},additionalProperties:!1},Ia={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},Ec={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:Gr,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string"},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:Ia,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:Ey,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"},showSchemaCatalogLinks:{type:"boolean"}},additionalProperties:!1},br={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},Py={type:"object",properties:{name:{type:"string"},items:br,queries:br,mutations:br,subscriptions:br,types:br,directives:br},required:["name"],additionalProperties:!1},Sy={properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:Py},otherItemsGroupName:{type:"string"}}},Iy={type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},additionalProperties:!1},xy={type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},identifier:{type:"string"}},additionalProperties:!1},Ty={type:"object",properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri"},contact:Iy,license:xy},additionalProperties:!1},Nn={type:"object",properties:{menu:{type:"object",properties:{...Sy.properties},additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},downloadUrls:Ia,apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},metadata:{type:"object",properties:{apiId:{type:"string"}},additionalProperties:!0},feedback:Gr,layout:{type:"string",enum:["stacked","three-panel"]},showBuiltInScalars:{type:"boolean"},showBuiltInDirectives:{type:"boolean"},excludeFromSearch:{type:"boolean"},info:Ty},additionalProperties:!1},Ny={type:"object",properties:{downloadUrls:Ia,apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},excludeFromSearch:{type:"boolean"},samplesMaxInlineArgs:{type:"number"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:Gr,layout:{type:"string",enum:["stacked","three-panel"]}},additionalProperties:!1},ky={type:"object",properties:{label:{type:"string"},lang:{type:"string",enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},Oy={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},Pc={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},jy={type:"object",properties:{beforeInfo:{type:"array",items:Pc},end:{type:"array",items:Pc}}},cr={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},kn={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Ay={type:"object",properties:Cn(cr.properties,["light","dark"])},Cy={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},Ry={type:"object",properties:{error:kn,info:kn,redirect:kn,success:kn}},Dy={type:"object",properties:wr(cr.properties,["dark"])},qy={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},Ly={type:"object",properties:{accent:cr,border:Ay,error:cr,http:Cy,primary:cr,responses:Ry,secondary:Dy,success:cr,text:qy,tonalOffset:{type:"number"},warning:cr}},On={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},My={type:"object",properties:{small:On,medium:On,large:On,xlarge:On}},Dt={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},Vy={type:"object",properties:{...wr(Dt.properties,["fontSize","lineHeight"]),borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:My}},Sc={type:"object",properties:Cn(Dt.properties,["fontSize","lineHeight"])},Fy={type:"object",properties:{medium:Sc,small:Sc}},zy={type:"object",properties:{...wr(Dt.properties,["fontSize","lineHeight"]),borderRadius:{type:"string"},color:{type:"string"},sizes:Fy}},Uy={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},By={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},Ic={type:"object",properties:{fullWidth:{type:"boolean"}}},Gy={type:"object",properties:{buttons:Vy,httpBadges:zy,layoutControls:Uy,panels:By,tryItButton:Ic,tryItSendButton:Ic}},jn={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},Ky={type:"object",properties:{maxWidth:jn}},Jy={type:"object",properties:{maxWidth:jn,middlePanelMaxWidth:jn}},Yy={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:Ky,"three-panel":Jy}},xc={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},Wy={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:xc,defaultDetailsWidth:{type:"string"},examples:xc,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},Tc={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},Hy={type:"object",properties:Cn(Tc.properties,["textTransform"])},Xy={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},Qy={type:"object",properties:{...wr(Dt.properties,["fontWeight","lineHeight"]),activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:Tc,level1items:Hy,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:Xy,textColor:{type:"string"},width:{type:"string"}}},An={type:"object",properties:{...Dt.properties,color:{type:"string"},transform:{type:"string"}}},Zy={type:"object",properties:{...Dt.properties,backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}}},eg={type:"object",properties:wr(Dt.properties,["fontSize"])},tg={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},rg={type:"object",properties:{code:Zy,fieldName:Dt,...Cn(Dt.properties,["fontSize","fontFamily"]),fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:An,heading2:An,heading3:An,headings:eg,lineHeight:{type:"string"},links:tg,optimizeSpeed:{type:"boolean"},rightPanelHeading:An,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}}},ng={type:"object",properties:{color:{type:"string"},...wr(Dt.properties,["fontWeight"])}},og={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:ng}},sg={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},ag={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},Nc={type:"object",properties:{custom:{type:"string"}}},ig={type:"object",properties:{DownloadButton:Nc,NextSectionButton:Nc}},cg={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},lg={type:"object",properties:{borderRadius:{type:"string"}}},ug={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},pg={type:"object",properties:{breakpoints:jn,codeBlock:og,colors:Ly,components:Gy,layout:Yy,logo:sg,fab:ag,overrides:ig,rightPanel:cg,schema:Wy,shape:lg,sidebar:Qy,spacing:ug,typography:rg,links:{type:"object",properties:{color:{type:"string"}}},codeSample:{type:"object",properties:{backgroundColor:{type:"string"}}}}},dg={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:ky}},required:["languages"]},fg={properties:{theme:pg,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:dg,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:Oy,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{type:"string",enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:jy,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only","path-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}}};function Cn(e,t){return Object.fromEntries(t.filter(r=>r in e).map(r=>[r,e[r]]))}function wr(e,t){return Object.fromEntries(Object.entries(e).filter(([r])=>!t.includes(r)))}var yt={nodeTypeName:void 0,type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]},description:"The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/rules#rules"},mg={rules:yt,oas2Rules:yt,oas3_0Rules:yt,oas3_1Rules:yt,oas3_2Rules:yt,async2Rules:yt,async3Rules:yt,arazzo1Rules:yt,arazzo1_1Rules:yt,overlay1Rules:yt,openrpc1Rules:yt,graphqlRules:yt},wt={nodeTypeName:void 0,type:"object",additionalProperties:!0},hg={preprocessors:wt,oas2Preprocessors:wt,oas3_0Preprocessors:wt,oas3_1Preprocessors:wt,oas3_2Preprocessors:wt,async2Preprocessors:wt,async3Preprocessors:wt,arazzo1Preprocessors:wt,arazzo1_1Preprocessors:wt,overlay1Preprocessors:wt,openrpc1Preprocessors:wt},$t={nodeTypeName:void 0,type:"object",additionalProperties:!0},yg={decorators:$t,oas2Decorators:$t,oas3_0Decorators:$t,oas3_1Decorators:$t,oas3_2Decorators:$t,async2Decorators:$t,async3Decorators:$t,arazzo1Decorators:$t,arazzo1_1Decorators:$t,overlay1Decorators:$t,openrpc1Decorators:$t},gg={nodeTypeName:void 0,type:"array",items:{type:"string"},description:"Use extends to inherit rules and their configurations from other rulesets.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/extends"},Rn={...mg,...yg,...hg,extends:gg},kc=e=>e,it=kc({RedirectSource:"RedirectSource",Redirects:"Redirects",ScorecardClassic:"ScorecardClassic",ScorecardClassicLevelList:"ScorecardClassicLevelList",ScorecardClassicLevel:"ScorecardClassicLevel",ScorecardClassicTargetList:"ScorecardClassicTargetList",ScorecardClassicTarget:"ScorecardClassicTarget",ScorecardClassicTargetWhere:"ScorecardClassicTargetWhere",ScorecardClassicTargetWhereMetadata:"ScorecardClassicTargetWhereMetadata",ScorecardClassicTeamMetadataProperty:"ScorecardClassicTeamMetadataProperty"}),Ze={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},Oc={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},xa={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean"},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"]},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}},rbac:{type:"object",additionalProperties:{type:"string"}},additionalProps:{type:"object",additionalProperties:!0}}},Ta={type:"array",items:{...xa,properties:{...xa.properties,items:{type:"array",items:xa}}}},vg={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},bg={type:"object",properties:{hide:{type:"boolean"},suggestions:{type:"array",items:{type:"string"}},prompt:{type:"string"}},additionalProperties:!1},wg={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]}},additionalProperties:!1}},$g={type:"object",properties:{facets:wg,...Ze.properties},additionalProperties:!1},_g={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},jc={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},Ac={type:"object",properties:{items:Ta,...Ze.properties},additionalProperties:!1},Cc={type:"object",additionalProperties:vg},Rc={type:"object",properties:{items:Ta,copyrightText:{type:"string"},logo:Ze,...Ze.properties},additionalProperties:!1},Dc={type:"object",properties:{separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"]},...Ze.properties},additionalProperties:!1},qc={type:"object",properties:{head:{type:"array",items:Oc},body:{type:"array",items:Oc}},additionalProperties:!1},Lc={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},Mc={type:"object",properties:{engine:{type:"string",enum:["flexsearch","typesense"]},ai:bg,filters:$g,placement:{type:"string"},shortcuts:{type:"array",items:{type:"string"}},suggestedPages:{type:"array",items:_g},...Ze.properties},additionalProperties:!1},Vc={type:"object",properties:{hide:{type:"boolean"},suggestions:{type:"array",items:{type:"string"}},prompt:{type:"string"},trigger:{type:"object",properties:{hide:{type:"boolean"},inputType:{type:"string",enum:["button","icon"]},inputIcon:{type:"string",enum:["chat","sparkles","redocly"]}},additionalProperties:!1}},additionalProperties:!1},Fc={type:"object",properties:{ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"}},...Ze.properties},additionalProperties:!1},zc={type:"string",enum:["slate","pink","coral","amber","jade","cyan","ocean","indigo","iris"]},Eg={type:"object",properties:{...Ze.properties,items:{type:"array",items:{type:"string",enum:["copy","view","chatgpt","claude","docs-mcp-cursor","docs-mcp-vscode"]}}},additionalProperties:!1},Uc={type:"object",properties:{nextButton:{type:"object",properties:{text:{type:"string"},...Ze.properties},additionalProperties:!1},previousButton:{type:"object",properties:{text:{type:"string"},...Ze.properties},additionalProperties:!1},actions:Eg},additionalProperties:!1},Bc={type:"object",properties:{elementFormat:{type:"string"},copy:{type:"object",properties:{...Ze.properties},additionalProperties:!1},report:{type:"object",properties:{tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"},...Ze.properties},additionalProperties:!1},expand:{type:"object",properties:{...Ze.properties},additionalProperties:!1},collapse:{type:"object",properties:{...Ze.properties},additionalProperties:!1}},additionalProperties:!1},Gc={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"}},partialsFolders:{type:"array",items:{type:"string"}},lastUpdatedBlock:{type:"object",properties:{format:{type:"string",enum:["timeago","iso","long","short"]},locale:{type:"string"},...Ze.properties},additionalProperties:!1},toc:{type:"object",properties:{header:{type:"string"},depth:{type:"integer",minimum:1},...Ze.properties},additionalProperties:!1},editPage:{type:"object",properties:{baseUrl:{type:"string"},...Ze.properties},additionalProperties:!1},template:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1},Dn={...Ec,properties:{...Ec.properties,...fg.properties}},Pg={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},Sg={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},Ig={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},xg={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},Tg={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},Ng={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},kg={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{type:"object",additionalProperties:!0},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},Og={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},jg={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:Og}},additionalProperties:!1,required:["trackingId"]},Kc={type:"object",properties:{adobe:Pg,amplitude:Sg,fullstory:Ig,heap:xg,rudderstack:Tg,segment:Ng,gtm:kg,ga:jg}},Jc={type:"object",properties:{items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0}},hideLoginButton:{type:"boolean"},...Ze.properties},additionalProperties:!1},Yc={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},Wc={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"},icon:{type:"string"}},additionalProperties:!1}}},additionalProperties:!1},Ag={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"]},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},Cg={type:"object",additionalProperties:!0,required:["slug","items"],properties:{show:{type:"boolean"},slug:{type:"string"},filters:{type:"array",items:Ag},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:Ta,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},qn={type:"object",patternProperties:{".*":Cg}},Ln={nodeTypeName:it.ScorecardClassic,description:"Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.",documentationLink:"https://redocly.com/docs/realm/config/scorecard-classic",type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean"},teamMetadataProperty:{nodeTypeName:it.ScorecardClassicTeamMetadataProperty,description:"Provide custom team label and team metadata property.",documentationLink:"https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object",type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{nodeTypeName:it.ScorecardClassicLevelList,description:"List of levels to score against.",type:"array",items:{nodeTypeName:it.ScorecardClassicLevel,documentationLink:"https://redocly.com/docs/realm/config/scorecard-classic#level-object",type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},...Rn},additionalProperties:!1}},targets:{nodeTypeName:it.ScorecardClassicTargetList,description:"Provide custom `minimumLevel` for specific targets.",type:"array",items:{nodeTypeName:it.ScorecardClassicTarget,type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{nodeTypeName:it.ScorecardClassicTargetWhere,description:"Specify which API descriptions to apply the `minimumLevel` to based on the metadata.",documentationLink:"https://redocly.com/docs/realm/config/scorecard-classic#where-object",type:"object",required:["metadata"],properties:{metadata:{nodeTypeName:it.ScorecardClassicTargetWhereMetadata,type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}},fromProjectUrl:{type:"string",format:"uri"}}},Rg={type:"object",required:["key"],properties:{key:{type:"string"}},additionalProperties:!1},Dg={type:"object",required:["type"],properties:{type:{type:"string"}},additionalProperties:!1},qg={type:"object",required:["property","title"],properties:{property:{type:"string"},hide:{type:"boolean"},label:{type:"string"},options:{type:"array",items:{type:"string"}},type:{type:"string",enum:["select","checkboxes","date-range"]},title:{type:"string"},titleTranslationKey:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1},Ft={type:"object",properties:{slug:{type:"string"},hide:{type:"boolean"},includes:{type:"array",items:Dg},excludes:{type:"array",items:Rg},filters:{type:"array",items:qg},titleTranslationKey:{type:"string"},descriptionTranslationKey:{type:"string"},catalogSwitcherLabelTranslationKey:{type:"string"}},additionalProperties:!1},Lg={type:"object",properties:{type:{type:"string",enum:["string","number","boolean","array","object"]},description:{type:"string"},example:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"}]},enum:{type:"array",items:{type:"string"}},pattern:{type:"string"},format:{type:"string"},minimum:{type:"number"},maximum:{type:"number"},items:{type:"object"}},additionalProperties:!0},Mg={type:"object",required:["type","properties"],properties:{type:{type:"string",enum:["object"]},description:{type:"string"},properties:{type:"object",additionalProperties:Lg},required:{type:"array",items:{type:"string"}},additionalProperties:{type:"boolean"}},additionalProperties:!0},Vg={type:"object",required:["name","description","metadataSchema"],properties:{name:{type:"string",description:"Display name of the entity type"},description:{type:"string",description:"Description of the entity type"},metadataSchema:Mg,icon:{type:"object",properties:{src:{type:"string"},srcSet:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},Fg={type:"object",additionalProperties:Vg},Hc={type:"object",properties:{show:{type:"boolean"},entityTypes:Fg,catalogs:{type:"object",properties:{all:Ft,services:Ft,domains:Ft,teams:Ft,users:Ft,apiDescriptions:Ft,dataSchemas:Ft,apiOperations:Ft},additionalProperties:Ft}},additionalProperties:!1},Xc={type:"string",enum:["eq","in","gt","gte","lt","lte","contains","startsWith","endsWith","exists","isEmpty","between","matches","some","every","none"]},Na={type:"string",enum:["and","or"]},ka={type:"object",properties:{field:{type:"string"},operator:Xc,value:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"}]},modifier:{type:"string",enum:["not"]},match:{type:"array",items:{type:"object",properties:{field:{type:"string"},operator:Xc,value:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"}]},modifier:{type:"string",enum:["not"]}}}}}},zg={type:"object",properties:{operator:Na,conditions:{type:"array",items:ka}},required:["operator","conditions"],additionalProperties:!1},Qc={type:"array",items:{oneOf:[ka,{type:"object",properties:{operator:Na,conditions:{type:"array",items:{oneOf:[ka,zg]}}},required:["operator","conditions"],additionalProperties:!1}]}},Zc={type:"object",properties:{defined:{type:"boolean"},nonEmpty:{type:"boolean"},eq:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"}]},gt:{type:"number"},gte:{type:"number"},lt:{type:"number"},lte:{type:"number"},const:{oneOf:[{type:"boolean"},{type:"string"},{type:"number"}]}},additionalProperties:!1},Ug={type:"array",items:{type:"object",properties:{subject:{type:"object",properties:{type:{type:"string",enum:["Entity","EntityMetadata","EntityRelations","EntityRelation"]},property:{type:"string"}},required:["type","property"],additionalProperties:!1},assertions:Zc},required:["subject","assertions"],additionalProperties:!1}},Bg={type:"object",properties:{title:{type:"string"},subject:{type:"object",properties:{type:{type:"string",enum:["Entity","EntityMetadata","EntityRelations","EntityRelation"]},property:{type:"string"}},required:["type","property"],additionalProperties:!1},severity:{type:"string",enum:["error","warn","off"]},message:{type:"string"},assertions:Zc,where:Ug,weight:{type:"number"}},required:["subject","assertions"],additionalProperties:!1},Gg={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object",properties:{severity:{type:"string",enum:["error","warn","off"]},weight:{type:"number"}},additionalProperties:!0},Bg]}},Kg={type:"object",properties:{name:{type:"string"},extends:Rn.extends,rules:Gg},required:["name"],additionalProperties:!1},el={type:"object",properties:{event:{type:"string",enum:["runtime","manual"]}},required:["event"],additionalProperties:!1},Jg={oneOf:[el,{type:"array",items:el}]},Yg={type:"object",properties:{name:{type:"string"},key:{type:"string"},description:{type:"string"},entities:{oneOf:[Qc,{type:"object",properties:{operator:Na,conditions:Qc},required:["operator","conditions"],additionalProperties:!1}]},levels:{type:"array",items:Kg,minItems:1},trigger:Jg},required:["name","key","entities","levels"],additionalProperties:!1},tl={type:"array",items:Yg},Wg={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:jc,navbar:Ac,products:Cc,footer:Rc,sidebar:Dc,scripts:qc,links:Lc,feedback:Gr,search:Mc,aiAssistant:Vc,colorMode:Fc,palette:zc,navigation:Uc,codeSnippet:Bc,markdown:Gc,openapi:Dn,asyncapi:Ny,graphql:Nn,analytics:Kc,userMenu:Jc,versionPicker:Yc,breadcrumbs:Wc,catalog:qn,entitiesCatalog:Hc,catalogClassic:qn,scorecard:Ln,scorecardClassic:Ln,scorecards:tl},additionalProperties:!0},Hg=(e=>(e.OIDC="OIDC",e.SAML2="SAML2",e))(Hg||{}),Xg=(e=>(e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2",e))(Xg||{}),Qg=(e=>(e.STACKED="stacked",e.THREE_PANEL="three-panel",e))(Qg||{}),Zg="^[a-z0-9]+(?:-[a-z0-9]+)*$",rl="redocly",ev=[rl,"corporate","guest"],nl=["REDOCLY","CORPORATE","GUEST"],tv={type:"object",additionalProperties:{type:"string"}},rv={type:"object",additionalProperties:!1,patternProperties:{"^[a-zA-Z0-9_-]+$":{type:"string",pattern:"^https?://[^\\s/$.?#].[^\\s]*$"}}},Mn={type:"string",enum:["error","warn","off"]},nv={type:"object",additionalProperties:!1,properties:{schemaCheck:Mn,statusCodeCheck:Mn,contentTypeCheck:Mn,successCriteriaCheck:Mn}},ov={type:"object",properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",enum:["1m","2m","5m","10m","15m","30m","1h","3h","6h","12h","1d","7d"]}},required:["event"],additionalProperties:!1},sv={type:"object",properties:{event:{type:"string",enum:["build"]}},required:["event"],additionalProperties:!1},av={type:"object",properties:{warn:{type:"number"},error:{type:"number"}},additionalProperties:!1},iv={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean"},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},ignoreRespectMonitoring:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\/|\\.\\./)"},agent:{type:"string",enum:["respect"]},trigger:{oneOf:[ov,sv]},inputs:tv,servers:rv,severity:nv,slo:av},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1},cv={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},lv={type:"object",properties:{type:{type:"string",const:"OIDC"},title:{type:"string"},pkce:{type:"boolean"},configurationUrl:{type:"string",minLength:1},configuration:cv,clientId:{type:"string",minLength:1},clientSecret:{type:"string"},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},introspectEndpoint:{type:"string"},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},uv={type:"object",properties:{type:{type:"string",const:"SAML2"},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string"},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},pv={oneOf:[lv,uv],discriminator:{propertyName:"type"}},dv={type:"object",additionalProperties:pv},ol={oneOf:[{type:"array",items:{type:"string",enum:nl},uniqueItems:!0},{type:"string",enum:nl}]},sl={type:"string",pattern:Zg,not:{enum:ev.filter(e=>e!==rl)}},al={oneOf:[{type:"array",items:sl,uniqueItems:!0},sl]},il={type:"boolean"},cl={type:"string",pattern:"^https?://.*"},ll={type:"string",pattern:"^https?://.*"},fv={type:"object",properties:{to:{type:"string"},type:{type:"number"}},additionalProperties:!1,nodeTypeName:it.RedirectSource,description:"Source is an absolute path that must start with a forward slash.",documentationLink:"https://redocly.com/docs/realm/config/redirects#sources-map"},mv={type:"object",additionalProperties:fv,nodeTypeName:it.Redirects,description:"Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.",documentationLink:"https://redocly.com/docs/realm/config/redirects"},hv={type:"string",enum:["info","success","warning","error"]},ze={type:"object",additionalProperties:{type:"string"}},yv={type:"object",properties:{trackingId:{type:"string"},content:{type:"string"},dismissible:{type:"boolean"},target:{type:"string"},color:hv,rbac:ze,startAt:{type:"string",format:"date-time"},endAt:{type:"string",format:"date-time"}},required:["content"],additionalProperties:!1},gv={type:"array",items:yv},vv={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:ze,openapi:Dn,graphql:Nn,theme:{type:"object",properties:{openapi:Dn,graphql:Nn},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},...Rn},required:["root"]},bv={type:"object",additionalProperties:!0},wv={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},$v={type:"object",properties:{hide:{type:"boolean"},title:{type:"string"},description:{type:"string"},details:{type:"object",properties:{path:{type:"string"},content:{type:"string"}},additionalProperties:!1},excludeFiles:{type:"array",items:{type:"string"}},sections:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"},includeFiles:{type:"array",items:{type:"string"}},excludeFiles:{type:"array",items:{type:"string"}}},required:["title"],additionalProperties:!1}}},additionalProperties:!1},_v={type:"object",properties:{title:{type:"string"},projectTitle:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}},llmstxt:$v},additionalProperties:!1},Ev={type:"object",properties:{folders:{type:"array",items:{type:"string"}}},additionalProperties:!1},Pv={type:"object",properties:{catalogs:{type:"object",properties:{all:ze,services:ze,domains:ze,teams:ze,users:ze,apiDescriptions:ze,dataSchemas:ze,apiOperations:ze},additionalProperties:ze},entitiesTypes:{type:"object",properties:{service:ze,domain:ze,team:ze,user:ze,apiDescription:ze,apiOperation:ze,dataSchema:ze},additionalProperties:ze},entitiesGroups:{type:"array",items:{type:"object",properties:{entities:{type:"array",items:{type:"string"}},config:ze},additionalProperties:!1}},entities:{type:"object",properties:{"**":ze},additionalProperties:ze}},additionalProperties:!1},ul={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:ze,cms:ze,reunite:ze,features:{type:"object",properties:{aiSearch:ze,mcp:ze},additionalProperties:!1},content:{type:"object",properties:{"**":ze},additionalProperties:ze},entitiesCatalog:Pv},additionalProperties:ze},Sv={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},Iv={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},xv={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean"},stage:{type:"string"},auth:{oneOf:[Sv,Iv]}},additionalProperties:!1,required:["type","apiBaseUrl"]},Tv={type:"object",properties:{type:{type:"string",const:"OAUTH2"},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},Nv={type:"object",properties:{type:{type:"string",const:"SERVICE_ACCOUNT"},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Oa={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean"},auth:{type:"object",oneOf:[Tv,Nv],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},kv={...Oa,properties:{...Oa.properties,type:{type:"string",const:"APIGEE_EDGE"}}},Ov={type:"object",oneOf:[Oa,kv,xv],discriminator:{propertyName:"type"}},jv={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:Ov}}},pl={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},Av={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},Cv={type:"object",properties:{hide:{type:"boolean"},docs:{type:"object",properties:{hide:{type:"boolean"},name:{type:"string"},ignore:{type:"array",items:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1},Rv={type:"object",properties:{hide:{type:"boolean"},excludeFiles:{type:"array",items:{type:"string"}}},additionalProperties:!1},Dv={type:"object",properties:{requiresLogin:il,logoutReturnUrl:cl,residency:ll,sso:ol,idps:al,rbac:ul},additionalProperties:!1,not:{required:["sso","idps"]},description:"Use either `access.sso` (filter by category) or `access.idps` (filter by slug), not both."},ja={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:mv,seo:_v,rbac:ul,apiFunctions:Ev,requiresLogin:il,responseHeaders:{type:"object",additionalProperties:{type:"array",items:Av}},mockServer:{type:"object",properties:{off:{type:"boolean"},position:{type:"string",enum:["first","last","replace","off"]},strictExamples:{type:"boolean"},errorIfForcedExampleNotFound:{type:"boolean"},description:{type:"string"}}},apis:{type:"object",additionalProperties:vv},...Rn,ssoDirect:dv,sso:ol,idps:al,residency:ll,logoutReturnUrl:cl,access:Dv,developerOnboarding:jv,removeAttribution:{type:"boolean"},i18n:pl,l10n:pl,metadata:bv,metadataGlobs:wv,ignore:{type:"array",items:{type:"string"}},theme:Wg,reunite:iv,logo:jc,navbar:Ac,products:Cc,footer:Rc,sidebar:Dc,scripts:qc,links:Lc,feedback:Gr,search:Mc,aiAssistant:Vc,colorMode:Fc,palette:zc,navigation:Uc,codeSnippet:Bc,markdown:Gc,openapi:Dn,graphql:Nn,analytics:Kc,userMenu:Jc,versionPicker:Yc,breadcrumbs:Wc,catalog:qn,entitiesCatalog:Hc,catalogClassic:qn,scorecard:Ln,scorecardClassic:Ln,scorecards:tl,mcp:Cv,skills:Rv,corsProxy:{type:"object",properties:{allowedTargets:{type:"array",items:{type:"string"}}},additionalProperties:!1},banner:gv},not:{required:["sso","idps"]},additionalProperties:!0},qv={...ja,additionalProperties:!1},Vn={$id:"root-redocly-config",...ja,properties:{plugins:{type:"array",items:{type:"string"}},...ja.properties,env:{type:"object",additionalProperties:qv}},additionalProperties:!1},Lv=["partOf","hasParts","creates","createdBy","owns","ownedBy","implements","implementedBy","dependsOn","dependencyOf","uses","usedBy","produces","consumes","linksTo","supersedes","supersededBy","compatibleWith","extends","extendedBy","relatesTo","hasMember","memberOf","triggers","triggeredBy","returns","returnedBy"],He=kc({UserEntity:"UserEntity",UserEntityMetadata:"UserEntityMetadata",ApiDescriptionEntity:"ApiDescriptionEntity",ApiDescriptionEntityMetadata:"ApiDescriptionEntityMetadata",ApiOperationEntity:"ApiOperationEntity",ApiOperationEntityMetadata:"ApiOperationEntityMetadata",DataSchemaEntity:"DataSchemaEntity",DataSchemaEntityMetadata:"DataSchemaEntityMetadata",ServiceEntity:"ServiceEntity",DomainEntity:"DomainEntity",TeamEntity:"TeamEntity",Entity:"Entity",EntityMetadata:"EntityMetadata",EntityLinkList:"EntityLinkList",EntityLink:"EntityLink",EntityRelation:"EntityRelation",EntityRelationList:"EntityRelationList",EntityContact:"EntityContact",EntitySlackContact:"EntitySlackContact",EntitySlackChannel:"EntitySlackChannel"}),Mv={type:"object",nodeTypeName:He.UserEntityMetadata,properties:{email:{type:"string",description:"Email of the user"}},required:["email"],additionalProperties:!0},Vv={type:"object",nodeTypeName:He.ApiDescriptionEntityMetadata,properties:{specType:{type:"string",enum:["jsonschema","openapi","asyncapi","avro","zod","graphql","protobuf","arazzo"],description:"Type of the API description"},descriptionFile:{type:"string",description:"Path to the file containing the API description"}},required:["specType","descriptionFile"],additionalProperties:!0},Fv={type:"object",nodeTypeName:He.ApiOperationEntityMetadata,properties:{method:{type:"string",enum:["GET","POST","PUT","DELETE","PATCH","MUTATION","QUERY","SUBSCRIBE","PUBLISH"],description:"HTTP method of the API operation"},path:{type:"string",description:"Path of the API operation"},payload:{type:"array",items:{type:"string",description:"Related dataSchema name"}},responses:{type:"array",items:{type:"string",description:"Related dataSchema name"}}},required:["method","path"],additionalProperties:!0},zv={type:"object",nodeTypeName:He.DataSchemaEntityMetadata,properties:{specType:{type:"string",enum:["jsonschema","openapi","asyncapi","avro","zod","graphql","protobuf","arazzo"],description:"Specification type of the data schema"},schema:{type:"string",description:"Inline schema of the data structure"},sdl:{type:"string",description:"SDL of the data structure"}},required:["specType"],additionalProperties:!0},Uv={type:"object",properties:{},nodeTypeName:He.EntityMetadata,additionalProperties:!0},Bv={type:"object",nodeTypeName:He.EntitySlackChannel,properties:{name:{type:"string",minLength:2,maxLength:150},url:{type:"string"}},required:["name"],additionalProperties:!1},Gv={type:"object",nodeTypeName:He.EntitySlackContact,properties:{channels:{type:"array",items:Bv}},required:["channels"],additionalProperties:!1},Kv={type:"object",nodeTypeName:He.EntityContact,properties:{slack:Gv},additionalProperties:!1},Jv={type:"object",nodeTypeName:He.EntityLink,properties:{label:{type:"string",minLength:2,maxLength:150},url:{type:"string"}},required:["label","url"],additionalProperties:!1},Yv={type:"object",nodeTypeName:He.EntityRelation,properties:{type:{type:"string",enum:Lv},key:{type:"string",minLength:2,maxLength:100},version:{type:"string"},revision:{type:"string"}},required:["type","key"],additionalProperties:!1},er={version:{type:"string"},key:{type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",minLength:2,maxLength:150},type:{type:"string",enum:["user","data-schema","api-operation","api-description","service","domain","team"]},title:{type:"string",minLength:2,maxLength:200},summary:{type:"string",minLength:1,maxLength:500},tags:{type:"array",items:{type:"string",minLength:1,maxLength:50}},git:{type:"array",items:{type:"string"}},contact:Kv,links:{type:"array",nodeTypeName:He.EntityLinkList,items:Jv},relations:{type:"array",nodeTypeName:He.EntityRelationList,items:Yv},metadata:Uv},Wv={type:"object",discriminator:{propertyName:"type"},oneOf:[{type:"object",properties:{...er,type:{type:"string",const:"user"},metadata:Mv},required:["key","title","type","metadata"],additionalProperties:!1,nodeTypeName:He.UserEntity},{type:"object",nodeTypeName:He.ApiOperationEntity,properties:{...er,type:{type:"string",const:"api-operation"},metadata:Fv},required:["key","title","type","metadata"],additionalProperties:!1},{type:"object",nodeTypeName:He.DataSchemaEntity,properties:{...er,type:{type:"string",const:"data-schema"},metadata:zv},required:["key","title","type","metadata"],additionalProperties:!1},{type:"object",nodeTypeName:He.ApiDescriptionEntity,properties:{...er,type:{type:"string",const:"api-description"},metadata:Vv},required:["key","title","type","metadata"],additionalProperties:!1},{type:"object",nodeTypeName:He.ServiceEntity,properties:{...er,type:{type:"string",const:"service"}},required:["key","title","type"],additionalProperties:!1},{type:"object",nodeTypeName:He.DomainEntity,properties:{...er,type:{type:"string",const:"domain"}},required:["key","title","type"],additionalProperties:!1},{type:"object",nodeTypeName:He.TeamEntity,properties:{...er,type:{type:"string",const:"team"}},required:["key","title","type"],additionalProperties:!1}]},Hv={type:"object",nodeTypeName:He.Entity,properties:{...er},required:["key","title","type"],additionalProperties:!1};const Xv=["Name","Document","OperationDefinition","VariableDefinition","SelectionSet","Field","Argument","FragmentSpread","InlineFragment","FragmentDefinition","Variable","IntValue","FloatValue","StringValue","BooleanValue","NullValue","EnumValue","ListValue","ObjectValue","ObjectField","Directive","NamedType","ListType","NonNullType","SchemaDefinition","OperationTypeDefinition","ScalarTypeDefinition","ObjectTypeDefinition","FieldDefinition","InputValueDefinition","InterfaceTypeDefinition","UnionTypeDefinition","EnumTypeDefinition","EnumValueDefinition","InputObjectTypeDefinition","DirectiveDefinition","SchemaExtension","DirectiveExtension","ScalarTypeExtension","ObjectTypeExtension","InterfaceTypeExtension","UnionTypeExtension","EnumTypeExtension","InputObjectTypeExtension","TypeCoordinate","MemberCoordinate","ArgumentCoordinate","DirectiveCoordinate","DirectiveArgumentCoordinate"];function Aa(e){return e.includes("/")}var Ca={exports:{}},dl={},zt={},lr={},fl={},ml={},hl={},yl;function Fn(){return yl||(yl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((d,P)=>`${d}${P}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((d,P)=>(P instanceof r&&(d[P.str]=(d[P.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function o($,...y){const d=[$[0]];let P=0;for(;P<y.length;)c(d,y[P]),d.push($[++P]);return new n(d)}e._=o;const s=new n("+");function a($,...y){const d=[m($[0])];let P=0;for(;P<y.length;)d.push(s),c(d,y[P]),d.push(s,m($[++P]));return i(d),new n(d)}e.str=a;function c($,y){y instanceof n?$.push(...y._items):y instanceof r?$.push(y):$.push(f(y))}e.addCodeArg=c;function i($){let y=1;for(;y<$.length-1;){if($[y]===s){const d=l($[y-1],$[y+1]);if(d!==void 0){$.splice(y-1,3,d);continue}$[y++]="+"}y++}}function l($,y){if(y==='""')return $;if($==='""')return y;if(typeof $=="string")return y instanceof r||$[$.length-1]!=='"'?void 0:typeof y!="string"?`${$.slice(0,-1)}${y}"`:y[0]==='"'?$.slice(0,-1)+y.slice(1):void 0;if(typeof y=="string"&&y[0]==='"'&&!($ instanceof r))return`"${$}${y.slice(1)}`}function u($,y){return y.emptyStr()?$:$.emptyStr()?y:a`${$}${y}`}e.strConcat=u;function f($){return typeof $=="number"||typeof $=="boolean"||$===null?$:m(Array.isArray($)?$.join(","):$)}function _($){return new n(m($))}e.stringify=_;function m($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function w($){return typeof $=="string"&&e.IDENTIFIER.test($)?new n(`.${$}`):o`[${$}]`}e.getProperty=w;function S($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new n(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=S;function b($){return new n($.toString())}e.regexpCode=b})(hl)),hl}var gl={},vl;function bl(){return vl||(vl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Fn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=o;class s extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:f}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${f}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class c extends o{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(l),{prefix:m}=_,w=(f=u.key)!==null&&f!==void 0?f:u.ref;let S=this._values[m];if(S){const y=S.get(w);if(y)return y}else S=this._values[m]=new Map;S.set(w,_);const b=this._scope[m]||(this._scope[m]=[]),$=b.length;return b[$]=u.ref,_.setValue(u,{property:m,itemIndex:$}),_}getValue(l,u){const f=this._values[l];if(f)return f.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,t._)`${l}${f.scopePath}`})}scopeCode(l=this._values,u,f){return this._reduceValues(l,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},u,f)}_reduceValues(l,u,f={},_){let m=t.nil;for(const w in l){const S=l[w];if(!S)continue;const b=f[w]=f[w]||new Map;S.forEach($=>{if(b.has($))return;b.set($,n.Started);let y=u($);if(y){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${d} ${$} = ${y};${this.opts._n}`}else if(y=_?.($))m=(0,t._)`${m}${y}${this.opts._n}`;else throw new r($);b.set($,n.Completed)})}return m}}e.ValueScope=c})(gl)),gl}var wl;function Ee(){return wl||(wl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Fn(),r=bl();var n=Fn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=bl();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(v,I){return this}}class a extends s{constructor(v,I,T){super(),this.varKind=v,this.name=I,this.rhs=T}render({es5:v,_n:I}){const T=v?r.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${M};`+I}optimizeNames(v,I){if(v[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,v,I)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(v,I,T){super(),this.lhs=v,this.rhs=I,this.sideEffects=T}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,I){if(!(this.lhs instanceof t.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,v,I),this}get names(){const v=this.lhs instanceof t.Name?{}:{...this.lhs.names};return L(v,this.rhs)}}class i extends c{constructor(v,I,T,M){super(v,T,M),this.op=I}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class l extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class u extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class f extends s{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class _ extends s{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,I){return this.code=K(this.code,v,I),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends s{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((I,T)=>I+T.render(v),"")}optimizeNodes(){const{nodes:v}=this;let I=v.length;for(;I--;){const T=v[I].optimizeNodes();Array.isArray(T)?v.splice(I,1,...T):T?v[I]=T:v.splice(I,1)}return v.length>0?this:void 0}optimizeNames(v,I){const{nodes:T}=this;let M=T.length;for(;M--;){const U=T[M];U.optimizeNames(v,I)||(le(v,U.names),T.splice(M,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((v,I)=>F(v,I.names),{})}}class w extends m{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class S extends m{}class b extends w{}b.kind="else";class $ extends w{constructor(v,I){super(I),this.condition=v}render(v){let I=`if(${this.condition})`+super.render(v);return this.else&&(I+="else "+this.else.render(v)),I}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let I=this.else;if(I){const T=I.optimizeNodes();I=this.else=Array.isArray(T)?new b(T):T}if(I)return v===!1?I instanceof $?I:I.nodes:this.nodes.length?this:new $(pe(v),I instanceof $?[I]:I.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,I){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(v,I),!!(super.optimizeNames(v,I)||this.else))return this.condition=K(this.condition,v,I),this}get names(){const v=super.names;return L(v,this.condition),this.else&&F(v,this.else.names),v}}$.kind="if";class y extends w{}y.kind="for";class d extends y{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,I){if(super.optimizeNames(v,I))return this.iteration=K(this.iteration,v,I),this}get names(){return F(super.names,this.iteration.names)}}class P extends y{constructor(v,I,T,M){super(),this.varKind=v,this.name=I,this.from=T,this.to=M}render(v){const I=v.es5?r.varKinds.var:this.varKind,{name:T,from:M,to:U}=this;return`for(${I} ${T}=${M}; ${T}<${U}; ${T}++)`+super.render(v)}get names(){const v=L(super.names,this.from);return L(v,this.to)}}class h extends y{constructor(v,I,T,M){super(),this.loop=v,this.varKind=I,this.name=T,this.iterable=M}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,I){if(super.optimizeNames(v,I))return this.iterable=K(this.iterable,v,I),this}get names(){return F(super.names,this.iterable.names)}}class g extends w{constructor(v,I,T){super(),this.name=v,this.args=I,this.async=T}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}g.kind="func";class E extends m{render(v){return"return "+super.render(v)}}E.kind="return";class O extends w{render(v){let I="try"+super.render(v);return this.catch&&(I+=this.catch.render(v)),this.finally&&(I+=this.finally.render(v)),I}optimizeNodes(){var v,I;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(I=this.finally)===null||I===void 0||I.optimizeNodes(),this}optimizeNames(v,I){var T,M;return super.optimizeNames(v,I),(T=this.catch)===null||T===void 0||T.optimizeNames(v,I),(M=this.finally)===null||M===void 0||M.optimizeNames(v,I),this}get names(){const v=super.names;return this.catch&&F(v,this.catch.names),this.finally&&F(v,this.finally.names),v}}class A extends w{constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}A.kind="catch";class q extends w{render(v){return"finally"+super.render(v)}}q.kind="finally";class z{constructor(v,I={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...I,_n:I.lines?`
|
|
2
|
+
`:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,I){const T=this._extScope.value(v,I);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(v,I){return this._extScope.getValue(v,I)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,I,T,M){const U=this._scope.toName(I);return T!==void 0&&M&&(this._constants[U.str]=T),this._leafNode(new a(v,U,T)),U}const(v,I,T){return this._def(r.varKinds.const,v,I,T)}let(v,I,T){return this._def(r.varKinds.let,v,I,T)}var(v,I,T){return this._def(r.varKinds.var,v,I,T)}assign(v,I,T){return this._leafNode(new c(v,I,T))}add(v,I){return this._leafNode(new i(v,e.operators.ADD,I))}code(v){return typeof v=="function"?v():v!==t.nil&&this._leafNode(new _(v)),this}object(...v){const I=["{"];for(const[T,M]of v)I.length>1&&I.push(","),I.push(T),(T!==M||this.opts.es5)&&(I.push(":"),(0,t.addCodeArg)(I,M));return I.push("}"),new t._Code(I)}if(v,I,T){if(this._blockNode(new $(v)),I&&T)this.code(I).else().code(T).endIf();else if(I)this.code(I).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new $(v))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode($,b)}_for(v,I){return this._blockNode(v),I&&this.code(I).endFor(),this}for(v,I){return this._for(new d(v),I)}forRange(v,I,T,M,U=this.opts.es5?r.varKinds.var:r.varKinds.let){const J=this._scope.toName(v);return this._for(new P(U,J,I,T),()=>M(J))}forOf(v,I,T,M=r.varKinds.const){const U=this._scope.toName(v);if(this.opts.es5){const J=I instanceof t.Name?I:this.var("_arr",I);return this.forRange("_i",0,(0,t._)`${J}.length`,re=>{this.var(U,(0,t._)`${J}[${re}]`),T(U)})}return this._for(new h("of",M,U,I),()=>T(U))}forIn(v,I,T,M=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,t._)`Object.keys(${I})`,T);const U=this._scope.toName(v);return this._for(new h("in",M,U,I),()=>T(U))}endFor(){return this._endBlockNode(y)}label(v){return this._leafNode(new l(v))}break(v){return this._leafNode(new u(v))}return(v){const I=new E;if(this._blockNode(I),this.code(v),I.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(v,I,T){if(!I&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new O;if(this._blockNode(M),this.code(v),I){const U=this.name("e");this._currNode=M.catch=new A(U),I(U)}return T&&(this._currNode=M.finally=new q,this.code(T)),this._endBlockNode(A,q)}throw(v){return this._leafNode(new f(v))}block(v,I){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(I),this}endBlock(v){const I=this._blockStarts.pop();if(I===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-I;if(T<0||v!==void 0&&T!==v)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${v} expected`);return this._nodes.length=I,this}func(v,I=t.nil,T,M){return this._blockNode(new g(v,I,T)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,I){const T=this._currNode;if(T instanceof v||I&&T instanceof I)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${I?`${v.kind}/${I.kind}`:v.kind}"`)}_elseNode(v){const I=this._currNode;if(!(I instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=I.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const I=this._nodes;I[I.length-1]=v}}e.CodeGen=z;function F(j,v){for(const I in v)j[I]=(j[I]||0)+(v[I]||0);return j}function L(j,v){return v instanceof t._CodeOrName?F(j,v.names):j}function K(j,v,I){if(j instanceof t.Name)return T(j);if(!M(j))return j;return new t._Code(j._items.reduce((U,J)=>(J instanceof t.Name&&(J=T(J)),J instanceof t._Code?U.push(...J._items):U.push(J),U),[]));function T(U){const J=I[U.str];return J===void 0||v[U.str]!==1?U:(delete v[U.str],J)}function M(U){return U instanceof t._Code&&U._items.some(J=>J instanceof t.Name&&v[J.str]===1&&I[J.str]!==void 0)}}function le(j,v){for(const I in v)j[I]=(j[I]||0)-(v[I]||0)}function pe(j){return typeof j=="boolean"||typeof j=="number"||j===null?!j:(0,t._)`!${V(j)}`}e.not=pe;const Se=k(e.operators.AND);function ce(...j){return j.reduce(Se)}e.and=ce;const _e=k(e.operators.OR);function R(...j){return j.reduce(_e)}e.or=R;function k(j){return(v,I)=>v===t.nil?I:I===t.nil?v:(0,t._)`${V(v)} ${j} ${V(I)}`}function V(j){return j instanceof t.Name?j:(0,t._)`(${j})`}})(ml)),ml}var Ne={},$l;function Ce(){if($l)return Ne;$l=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.checkStrictMode=Ne.getErrorPath=Ne.Type=Ne.useFunc=Ne.setEvaluated=Ne.evaluatedPropsToName=Ne.mergeEvaluated=Ne.eachItem=Ne.unescapeJsonPointer=Ne.escapeJsonPointer=Ne.escapeFragment=Ne.unescapeFragment=Ne.schemaRefOrVal=Ne.schemaHasRulesButRef=Ne.schemaHasRules=Ne.checkUnknownRules=Ne.alwaysValidSchema=Ne.toHash=void 0;const e=Ee(),t=Fn();function r(h){const g={};for(const E of h)g[E]=!0;return g}Ne.toHash=r;function n(h,g){return typeof g=="boolean"?g:Object.keys(g).length===0?!0:(o(h,g),!s(g,h.self.RULES.all))}Ne.alwaysValidSchema=n;function o(h,g=h.schema){const{opts:E,self:O}=h;if(!E.strictSchema||typeof g=="boolean")return;const A=O.RULES.keywords;for(const q in g)A[q]||P(h,`unknown keyword: "${q}"`)}Ne.checkUnknownRules=o;function s(h,g){if(typeof h=="boolean")return!h;for(const E in h)if(g[E])return!0;return!1}Ne.schemaHasRules=s;function a(h,g){if(typeof h=="boolean")return!h;for(const E in h)if(E!=="$ref"&&g.all[E])return!0;return!1}Ne.schemaHasRulesButRef=a;function c({topSchemaRef:h,schemaPath:g},E,O,A){if(!A){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${h}${g}${(0,e.getProperty)(O)}`}Ne.schemaRefOrVal=c;function i(h){return f(decodeURIComponent(h))}Ne.unescapeFragment=i;function l(h){return encodeURIComponent(u(h))}Ne.escapeFragment=l;function u(h){return typeof h=="number"?`${h}`:h.replace(/~/g,"~0").replace(/\//g,"~1")}Ne.escapeJsonPointer=u;function f(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}Ne.unescapeJsonPointer=f;function _(h,g){if(Array.isArray(h))for(const E of h)g(E);else g(h)}Ne.eachItem=_;function m({mergeNames:h,mergeToName:g,mergeValues:E,resultToName:O}){return(A,q,z,F)=>{const L=z===void 0?q:z instanceof e.Name?(q instanceof e.Name?h(A,q,z):g(A,q,z),z):q instanceof e.Name?(g(A,z,q),q):E(q,z);return F===e.Name&&!(L instanceof e.Name)?O(A,L):L}}Ne.mergeEvaluated={props:m({mergeNames:(h,g,E)=>h.if((0,e._)`${E} !== true && ${g} !== undefined`,()=>{h.if((0,e._)`${g} === true`,()=>h.assign(E,!0),()=>h.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${g})`))}),mergeToName:(h,g,E)=>h.if((0,e._)`${E} !== true`,()=>{g===!0?h.assign(E,!0):(h.assign(E,(0,e._)`${E} || {}`),S(h,E,g))}),mergeValues:(h,g)=>h===!0?!0:{...h,...g},resultToName:w}),items:m({mergeNames:(h,g,E)=>h.if((0,e._)`${E} !== true && ${g} !== undefined`,()=>h.assign(E,(0,e._)`${g} === true ? true : ${E} > ${g} ? ${E} : ${g}`)),mergeToName:(h,g,E)=>h.if((0,e._)`${E} !== true`,()=>h.assign(E,g===!0?!0:(0,e._)`${E} > ${g} ? ${E} : ${g}`)),mergeValues:(h,g)=>h===!0?!0:Math.max(h,g),resultToName:(h,g)=>h.var("items",g)})};function w(h,g){if(g===!0)return h.var("props",!0);const E=h.var("props",(0,e._)`{}`);return g!==void 0&&S(h,E,g),E}Ne.evaluatedPropsToName=w;function S(h,g,E){Object.keys(E).forEach(O=>h.assign((0,e._)`${g}${(0,e.getProperty)(O)}`,!0))}Ne.setEvaluated=S;const b={};function $(h,g){return h.scopeValue("func",{ref:g,code:b[g.code]||(b[g.code]=new t._Code(g.code))})}Ne.useFunc=$;var y;(function(h){h[h.Num=0]="Num",h[h.Str=1]="Str"})(y||(Ne.Type=y={}));function d(h,g,E){if(h instanceof e.Name){const O=g===y.Num;return E?O?(0,e._)`"[" + ${h} + "]"`:(0,e._)`"['" + ${h} + "']"`:O?(0,e._)`"/" + ${h}`:(0,e._)`"/" + ${h}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(h).toString():"/"+u(h)}Ne.getErrorPath=d;function P(h,g,E=h.opts.strictSchema){if(E){if(g=`strict mode: ${g}`,E===!0)throw new Error(g);h.self.logger.warn(g)}}return Ne.checkStrictMode=P,Ne}var zn={},_l;function pt(){if(_l)return zn;_l=1,Object.defineProperty(zn,"__esModule",{value:!0});const e=Ee(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),isAllOfVariant:new e.Name("isAllOfVariant"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return zn.default=t,zn}var El;function Un(){return El||(El=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Ee(),r=Ce(),n=pt();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:$})=>$?(0,t.str)`"${b}" keyword must be ${$} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function o(b,$=e.keywordError,y,d){const{it:P}=b,{gen:h,compositeRule:g,allErrors:E}=P,O=f(b,$,y);d??(g||E)?i(h,O):l(P,(0,t._)`[${O}]`)}e.reportError=o;function s(b,$=e.keywordError,y){const{it:d}=b,{gen:P,compositeRule:h,allErrors:g}=d,E=f(b,$,y);i(P,E),h||g||l(d,n.default.vErrors)}e.reportExtraError=s;function a(b,$){b.assign(n.default.errors,$),b.if((0,t._)`${n.default.vErrors} !== null`,()=>b.if($,()=>b.assign((0,t._)`${n.default.vErrors}.length`,$),()=>b.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function c({gen:b,keyword:$,schemaValue:y,data:d,errsCount:P,it:h}){if(P===void 0)throw new Error("ajv implementation error");const g=b.name("err");b.forRange("i",P,n.default.errors,E=>{b.const(g,(0,t._)`${n.default.vErrors}[${E}]`),b.if((0,t._)`${g}.instancePath === undefined`,()=>b.assign((0,t._)`${g}.instancePath`,(0,t.strConcat)(n.default.instancePath,h.errorPath))),b.assign((0,t._)`${g}.schemaPath`,(0,t.str)`${h.errSchemaPath}/${$}`),h.opts.verbose&&(b.assign((0,t._)`${g}.schema`,y),b.assign((0,t._)`${g}.data`,d))})}e.extendErrors=c;function i(b,$){const y=b.const("err",$);b.if((0,t._)`${n.default.vErrors} === null`,()=>b.assign(n.default.vErrors,(0,t._)`[${y}]`),(0,t._)`${n.default.vErrors}.push(${y})`),b.code((0,t._)`${n.default.errors}++`)}function l(b,$){const{gen:y,validateName:d,schemaEnv:P}=b;P.$async?y.throw((0,t._)`new ${b.ValidationError}(${$})`):(y.assign((0,t._)`${d}.errors`,$),y.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function f(b,$,y){const{createErrors:d}=b.it;return d===!1?(0,t._)`{}`:_(b,$,y)}function _(b,$,y={}){const{gen:d,it:P}=b,h=[m(P,y),w(b,y)];return S(b,$,h),d.object(...h)}function m({errorPath:b},{instancePath:$}){const y=$?(0,t.str)`${b}${(0,r.getErrorPath)($,r.Type.Str)}`:b;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,y)]}function w({keyword:b,it:{errSchemaPath:$}},{schemaPath:y,parentSchema:d}){let P=d?$:(0,t.str)`${$}/${b}`;return y&&(P=(0,t.str)`${P}${(0,r.getErrorPath)(y,r.Type.Str)}`),[u.schemaPath,P]}function S(b,{params:$,message:y},d){const{keyword:P,data:h,schemaValue:g,it:E}=b,{opts:O,propertyName:A,topSchemaRef:q,schemaPath:z}=E;d.push([u.keyword,P],[u.params,typeof $=="function"?$(b):$||(0,t._)`{}`]),O.messages&&d.push([u.message,typeof y=="function"?y(b):y]),O.verbose&&d.push([u.schema,g],[u.parentSchema,(0,t._)`${q}${z}`],[n.default.data,h]),A&&d.push([u.propertyName,A])}})(fl)),fl}var Pl;function Qv(){if(Pl)return lr;Pl=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const e=Un(),t=Ee(),r=pt(),n={message:"boolean schema is false"};function o(c){const{gen:i,schema:l,validateName:u}=c;l===!1?a(c,!1):typeof l=="object"&&l.$async===!0?i.return(r.default.data):(i.assign((0,t._)`${u}.errors`,null),i.return(!0))}lr.topBoolOrEmptySchema=o;function s(c,i){const{gen:l,schema:u}=c;u===!1?(l.var(i,!1),a(c)):l.var(i,!0)}lr.boolOrEmptySchema=s;function a(c,i){const{gen:l,data:u}=c,f={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(f,n,void 0,i)}return lr}var tt={},ur={},Sl;function Il(){if(Sl)return ur;Sl=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.getRules=ur.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(o){return typeof o=="string"&&t.has(o)}ur.isJSONType=r;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return ur.getRules=n,ur}var Ut={},xl;function Tl(){if(xl)return Ut;xl=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.shouldUseRule=Ut.shouldUseGroup=Ut.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const a=o.RULES.types[s];return a&&a!==!0&&t(n,a)}Ut.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}Ut.shouldUseGroup=t;function r(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return Ut.shouldUseRule=r,Ut}var Nl;function Bn(){if(Nl)return tt;Nl=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.reportTypeError=tt.checkDataTypes=tt.checkDataType=tt.coerceAndCheckDataType=tt.getJSONTypes=tt.getSchemaTypes=tt.DataType=void 0;const e=Il(),t=Tl(),r=Un(),n=Ee(),o=Ce();var s;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(s||(tt.DataType=s={}));function a(y){const d=c(y.type);if(d.includes("null")){if(y.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&y.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');y.nullable===!0&&d.push("null")}return d}tt.getSchemaTypes=a;function c(y){const d=Array.isArray(y)?y:y?[y]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}tt.getJSONTypes=c;function i(y,d){const{gen:P,data:h,opts:g}=y,E=u(d,g.coerceTypes),O=d.length>0&&!(E.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(y,d[0]));if(O){const A=w(d,h,g.strictNumbers,s.Wrong);P.if(A,()=>{E.length?f(y,d,E):b(y)})}return O}tt.coerceAndCheckDataType=i;const l=new Set(["string","number","integer","boolean","null"]);function u(y,d){return d?y.filter(P=>l.has(P)||d==="array"&&P==="array"):[]}function f(y,d,P){const{gen:h,data:g,opts:E}=y,O=h.let("dataType",(0,n._)`typeof ${g}`),A=h.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&h.if((0,n._)`${O} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>h.assign(g,(0,n._)`${g}[0]`).assign(O,(0,n._)`typeof ${g}`).if(w(d,g,E.strictNumbers),()=>h.assign(A,g))),h.if((0,n._)`${A} !== undefined`);for(const z of P)(l.has(z)||z==="array"&&E.coerceTypes==="array")&&q(z);h.else(),b(y),h.endIf(),h.if((0,n._)`${A} !== undefined`,()=>{h.assign(g,A),_(y,A)});function q(z){switch(z){case"string":h.elseIf((0,n._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(A,(0,n._)`""`);return;case"number":h.elseIf((0,n._)`${O} == "boolean" || ${g} === null
|
|
3
|
+
|| (${O} == "string" && ${g} && ${g} == +${g})`).assign(A,(0,n._)`+${g}`);return;case"integer":h.elseIf((0,n._)`${O} === "boolean" || ${g} === null
|
|
4
|
+
|| (${O} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(A,(0,n._)`+${g}`);return;case"boolean":h.elseIf((0,n._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(A,!1).elseIf((0,n._)`${g} === "true" || ${g} === 1`).assign(A,!0);return;case"null":h.elseIf((0,n._)`${g} === "" || ${g} === 0 || ${g} === false`),h.assign(A,null);return;case"array":h.elseIf((0,n._)`${O} === "string" || ${O} === "number"
|
|
5
|
+
|| ${O} === "boolean" || ${g} === null`).assign(A,(0,n._)`[${g}]`)}}}function _({gen:y,parentData:d,parentDataProperty:P},h){y.if((0,n._)`${d} !== undefined`,()=>y.assign((0,n._)`${d}[${P}]`,h))}function m(y,d,P,h=s.Correct){const g=h===s.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(y){case"null":return(0,n._)`${d} ${g} null`;case"array":E=(0,n._)`Array.isArray(${d})`;break;case"object":E=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":E=O((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":E=O();break;default:return(0,n._)`typeof ${d} ${g} ${y}`}return h===s.Correct?E:(0,n.not)(E);function O(A=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,A,P?(0,n._)`isFinite(${d})`:n.nil)}}tt.checkDataType=m;function w(y,d,P,h){if(y.length===1)return m(y[0],d,P,h);let g;const E=(0,o.toHash)(y);if(E.array&&E.object){const O=(0,n._)`typeof ${d} != "object"`;g=E.null?O:(0,n._)`!${d} || ${O}`,delete E.null,delete E.array,delete E.object}else g=n.nil;E.number&&delete E.integer;for(const O in E)g=(0,n.and)(g,m(O,d,P,h));return g}tt.checkDataTypes=w;const S={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:d})=>typeof y=="string"?(0,n._)`{type: ${y}}`:(0,n._)`{type: ${d}}`};function b(y){const d=$(y);(0,r.reportError)(d,S)}tt.reportTypeError=b;function $(y){const{gen:d,data:P,schema:h}=y,g=(0,o.schemaRefOrVal)(y,h,"type");return{gen:d,keyword:"type",data:P,schema:h.type,schemaCode:g,schemaValue:g,parentSchema:h,params:{},it:y}}return tt}var Kr={},kl;function Zv(){if(kl)return Kr;kl=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.assignDefaults=void 0;const e=Ee(),t=Ce();function r(o,s){const{properties:a,items:c}=o.schema;if(s==="object"&&a)for(const i in a)n(o,i,a[i].default);else s==="array"&&Array.isArray(c)&&c.forEach((i,l)=>n(o,l,i.default))}Kr.assignDefaults=r;function n(o,s,a){const{gen:c,compositeRule:i,data:l,opts:u}=o;if(a===void 0)return;const f=(0,e._)`${l}${(0,e.getProperty)(s)}`;if(i){(0,t.checkStrictMode)(o,`default is ignored for: ${f}`);return}let _=(0,e._)`${f} === undefined`;u.useDefaults==="empty"&&(_=(0,e._)`${_} || ${f} === null || ${f} === ""`),c.if(_,(0,e._)`${f} = ${(0,e.stringify)(a)}`)}return Kr}var _t={},Ue={},Jr={},Ol;function jl(){if(Ol)return Jr;Ol=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.getSkipCondition=void 0;const e=Ee(),t=pt();function r(n,o){var s;const a=(s=n.properties)===null||s===void 0?void 0:s[o];if(!a)return;const c=a.readOnly===!0,i=a.writeOnly===!0;if(!c&&!i)return;const l=[],u=(0,e._)`typeof ${t.default.this} == "object" && ${t.default.this} && ${t.default.this}.apiContext`;return c&&l.push((0,e._)`${u} === "request"`),i&&l.push((0,e._)`${u} === "response"`),(0,e.or)(...l)}return Jr.getSkipCondition=r,Jr}var Al;function Et(){if(Al)return Ue;Al=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.validateUnion=Ue.validateArray=Ue.usePattern=Ue.callValidateCode=Ue.schemaProperties=Ue.allSchemaProperties=Ue.noPropertyInData=Ue.propertyInData=Ue.isOwnProperty=Ue.hasPropFunc=Ue.reportMissingProp=Ue.checkMissingProp=Ue.checkReportMissingProp=void 0;const e=Ee(),t=Ce(),r=pt(),n=Ce(),o=jl();function s(d,P){const{gen:h,data:g,it:E}=d;h.if(f(h,g,P,E.opts.ownProperties),()=>{d.setParams({missingProperty:(0,e._)`${P}`},!0),d.error()})}Ue.checkReportMissingProp=s;function a({gen:d,data:P,it:{opts:h},parentSchema:g},E,O){return(0,e.or)(...E.map(A=>{var q;return(0,e.and)((0,e.not)((q=(0,o.getSkipCondition)(g,A))!==null&&q!==void 0?q:(0,e._)`false`),f(d,P,A,h.ownProperties),(0,e._)`${O} = ${A}`)}))}Ue.checkMissingProp=a;function c(d,P){d.setParams({missingProperty:P},!0),d.error()}Ue.reportMissingProp=c;function i(d){return d.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ue.hasPropFunc=i;function l(d,P,h){return(0,e._)`${i(d)}.call(${P}, ${h})`}Ue.isOwnProperty=l;function u(d,P,h,g){const E=(0,e._)`${P}${(0,e.getProperty)(h)} !== undefined`;return g?(0,e._)`${E} && ${l(d,P,h)}`:E}Ue.propertyInData=u;function f(d,P,h,g){const E=(0,e._)`${P}${(0,e.getProperty)(h)} === undefined`;return g?(0,e.or)(E,(0,e.not)(l(d,P,h))):E}Ue.noPropertyInData=f;function _(d){return d?Object.keys(d).filter(P=>P!=="__proto__"):[]}Ue.allSchemaProperties=_;function m(d,P){return _(P).filter(h=>!(0,t.alwaysValidSchema)(d,P[h]))}Ue.schemaProperties=m;function w({schemaCode:d,data:P,it:{gen:h,topSchemaRef:g,schemaPath:E,errorPath:O},it:A},q,z,F){const L=F?(0,e._)`${d}, ${P}, ${g}${E}`:P,K=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData],[r.default.isAllOfVariant,A.isAllOfVariant?1:0]];A.opts.dynamicRef&&K.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const le=(0,e._)`${L}, ${h.object(...K)}`;return z!==e.nil?(0,e._)`${q}.call(${z}, ${le})`:(0,e._)`${q}(${le})`}Ue.callValidateCode=w;const S=(0,e._)`new RegExp`;function b({gen:d,it:{opts:P}},h){const g=P.unicodeRegExp?"u":"",{regExp:E}=P.code,O=E(h,g);return d.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${E.code==="new RegExp"?S:(0,n.useFunc)(d,E)}(${h}, ${g})`})}Ue.usePattern=b;function $(d){const{gen:P,data:h,keyword:g,it:E}=d,O=P.name("valid");if(E.allErrors){const q=P.let("valid",!0);return A(()=>P.assign(q,!1)),q}return P.var(O,!0),A(()=>P.break()),O;function A(q){const z=P.const("len",(0,e._)`${h}.length`);P.forRange("i",0,z,F=>{d.subschema({keyword:g,dataProp:F,dataPropType:t.Type.Num},O),P.if((0,e.not)(O),q)})}}Ue.validateArray=$;function y(d){const{gen:P,schema:h,keyword:g,parentSchema:E,it:O}=d;if(!Array.isArray(h))throw new Error("ajv implementation error");if(O.opts.discriminator&&E.discriminator||h.some(z=>(0,t.alwaysValidSchema)(O,z))&&!O.opts.unevaluated)return;const A=P.let("valid",!1),q=P.name("_valid");P.block(()=>h.forEach((z,F)=>{const L=d.subschema({keyword:g,schemaProp:F,compositeRule:!0},q);P.assign(A,(0,e._)`${A} || ${q}`),d.mergeValidEvaluated(L,q)||P.if((0,e.not)(A))})),d.result(A,()=>d.reset(),()=>d.error(!0))}return Ue.validateUnion=y,Ue}var Cl;function e0(){if(Cl)return _t;Cl=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.validateKeywordUsage=_t.validSchemaType=_t.funcKeywordCode=_t.macroKeywordCode=void 0;const e=Ee(),t=pt(),r=Et(),n=Un();function o(_,m){const{gen:w,keyword:S,schema:b,parentSchema:$,it:y}=_,d=m.macro.call(y.self,b,$,y),P=l(w,S,d);y.opts.validateSchema!==!1&&y.self.validateSchema(d,!0);const h=w.name("valid");_.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${S}`,topSchemaRef:P,compositeRule:!0},h),_.pass(h,()=>_.error(!0))}_t.macroKeywordCode=o;function s(_,m){var w;const{gen:S,keyword:b,schema:$,parentSchema:y,$data:d,it:P}=_;i(P,m);const h=!d&&m.compile?m.compile.call(P.self,$,y,P):m.validate,g=l(S,b,h),E=S.let("valid");_.block$data(E,O),_.ok((w=m.valid)!==null&&w!==void 0?w:E);function O(){if(m.errors===!1)z(),m.modifying&&a(_),F(()=>_.error());else{const L=m.async?A():q();m.modifying&&a(_),F(()=>c(_,L))}}function A(){const L=S.let("ruleErrs",null);return S.try(()=>z((0,e._)`await `),K=>S.assign(E,!1).if((0,e._)`${K} instanceof ${P.ValidationError}`,()=>S.assign(L,(0,e._)`${K}.errors`),()=>S.throw(K))),L}function q(){const L=(0,e._)`${g}.errors`;return S.assign(L,null),z(e.nil),L}function z(L=m.async?(0,e._)`await `:e.nil){const K=P.opts.passContext?t.default.this:t.default.self,le=!("compile"in m&&!d||m.schema===!1);S.assign(E,(0,e._)`${L}${(0,r.callValidateCode)(_,g,K,le)}`,m.modifying)}function F(L){var K;S.if((0,e.not)((K=m.valid)!==null&&K!==void 0?K:E),L)}}_t.funcKeywordCode=s;function a(_){const{gen:m,data:w,it:S}=_;m.if(S.parentData,()=>m.assign(w,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function c(_,m){const{gen:w}=_;w.if((0,e._)`Array.isArray(${m})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${m} : ${t.default.vErrors}.concat(${m})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(_)},()=>_.error())}function i({schemaEnv:_},m){if(m.async&&!_.$async)throw new Error("async keyword in sync schema")}function l(_,m,w){if(w===void 0)throw new Error(`keyword "${m}" failed to compile`);return _.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(_,m,w=!1){return!m.length||m.some(S=>S==="array"?Array.isArray(_):S==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==S||w&&typeof _>"u")}_t.validSchemaType=u;function f({schema:_,opts:m,self:w,errSchemaPath:S},b,$){if(Array.isArray(b.keyword)?!b.keyword.includes($):b.keyword!==$)throw new Error("ajv implementation error");const y=b.dependencies;if(y?.some(d=>!Object.prototype.hasOwnProperty.call(_,d)))throw new Error(`parent schema must have dependencies of ${$}: ${y.join(",")}`);if(b.validateSchema&&!b.validateSchema(_[$])){const d=`keyword "${$}" value is invalid at path "${S}": `+w.errorsText(b.validateSchema.errors);if(m.validateSchema==="log")w.logger.error(d);else throw new Error(d)}}return _t.validateKeywordUsage=f,_t}var Bt={},Rl;function t0(){if(Rl)return Bt;Rl=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.extendSubschemaMode=Bt.extendSubschemaData=Bt.getSubschema=void 0;const e=Ee(),t=Ce();function r(s,{keyword:a,schemaProp:c,schema:i,schemaPath:l,errSchemaPath:u,topSchemaRef:f}){if(a!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const _=s.schema[a];return c===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:_[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(c)}`}}if(i!==void 0){if(l===void 0||u===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:l,topSchemaRef:f,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Bt.getSubschema=r;function n(s,a,{dataProp:c,dataPropType:i,data:l,dataTypes:u,propertyName:f}){if(l!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=a;if(c!==void 0){const{errorPath:w,dataPathArr:S,opts:b}=a,$=_.let("data",(0,e._)`${a.data}${(0,e.getProperty)(c)}`,!0);m($),s.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(c,i,b.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...S,s.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:_.let("data",l,!0);m(w),f!==void 0&&(s.propertyName=f)}u&&(s.dataTypes=u);function m(w){s.data=w,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,w]}}Bt.extendSubschemaData=n;function o(s,{jtdDiscriminator:a,jtdMetadata:c,compositeRule:i,createErrors:l,allErrors:u}){i!==void 0&&(s.compositeRule=i),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=c}return Bt.extendSubschemaMode=o,Bt}var ct={},Ra={exports:{}},Dl;function ql(){if(Dl)return Ra.exports;Dl=1;var e=Ra.exports=function(n,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var a=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(o,a,c,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,o,s,a,c,i,l,u,f,_){if(a&&typeof a=="object"&&!Array.isArray(a)){o(a,c,i,l,u,f,_);for(var m in a){var w=a[m];if(Array.isArray(w)){if(m in e.arrayKeywords)for(var S=0;S<w.length;S++)t(n,o,s,w[S],c+"/"+m+"/"+S,i,c,m,a,S)}else if(m in e.propsKeywords){if(w&&typeof w=="object")for(var b in w)t(n,o,s,w[b],c+"/"+m+"/"+r(b),i,c,m,a,b)}else(m in e.keywords||n.allKeys&&!(m in e.skipKeywords))&&t(n,o,s,w,c+"/"+m,i,c,m,a)}s(a,c,i,l,u,f,_)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ra.exports}var Ll;function Gn(){if(Ll)return ct;Ll=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.getSchemaRefs=ct.resolveUrl=ct.normalizeId=ct._getFullPath=ct.getFullPath=ct.inlineRef=void 0;const e=Ce(),t=_n(),r=ql(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(S,b=!0){return typeof S=="boolean"?!0:b===!0?!a(S):b?c(S)<=b:!1}ct.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(S){for(const b in S){if(s.has(b))return!0;const $=S[b];if(Array.isArray($)&&$.some(a)||typeof $=="object"&&a($))return!0}return!1}function c(S){let b=0;for(const $ in S)if($==="$ref"||(b++,!n.has($)&&(typeof S[$]=="object"&&(0,e.eachItem)(S[$],y=>b+=c(y)),b===1/0)))return 1/0;return b}function i(S,b="",$){$!==!1&&(b=f(b));const y=S.parse(b);return l(S,y)}ct.getFullPath=i;function l(S,b){return S.serialize(b).split("#")[0]+"#"}ct._getFullPath=l;const u=/#\/?$/;function f(S){return S?S.replace(u,""):""}ct.normalizeId=f;function _(S,b,$){return $=f($),S.resolve(b,$)}ct.resolveUrl=_;const m=/^[a-z_][-a-z0-9._]*$/i;function w(S,b){if(typeof S=="boolean")return{};const{schemaId:$,uriResolver:y}=this.opts,d=f(S[$]||b),P={"":d},h=i(y,d,!1),g={},E=new Set;return r(S,{allKeys:!0},(q,z,F,L)=>{if(L===void 0)return;const K=h+z;let le=P[L];typeof q[$]=="string"&&(le=pe.call(this,q[$])),Se.call(this,q.$anchor),Se.call(this,q.$dynamicAnchor),P[z]=le;function pe(ce){const _e=this.opts.uriResolver.resolve;if(ce=f(le?_e(le,ce):ce),E.has(ce))throw A(ce);E.add(ce);let R=this.refs[ce];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?O(q,R.schema,ce):ce!==f(K)&&(ce[0]==="#"?(O(q,g[ce],ce),g[ce]=q):this.refs[ce]=K),ce}function Se(ce){if(typeof ce=="string"){if(!m.test(ce))throw new Error(`invalid anchor "${ce}"`);pe.call(this,`#${ce}`)}}}),g;function O(q,z,F){if(z!==void 0&&!t(q,z))throw A(F)}function A(q){return new Error(`reference "${q}" resolves to more than one schema`)}}return ct.getSchemaRefs=w,ct}var Ml;function Yr(){if(Ml)return zt;Ml=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.getData=zt.KeywordCxt=zt.validateFunctionCode=void 0;const e=Qv(),t=Bn(),r=Tl(),n=Bn(),o=Zv(),s=e0(),a=t0(),c=Ee(),i=pt(),l=Gn(),u=Ce(),f=Un();function _(x){if(h(x)&&(E(x),P(x))){b(x);return}m(x,()=>(0,e.topBoolOrEmptySchema)(x))}zt.validateFunctionCode=_;function m({gen:x,validateName:N,schema:D,schemaEnv:B,opts:H},oe){H.code.es5?x.func(N,(0,c._)`${i.default.data}, ${i.default.valCxt}`,B.$async,()=>{x.code((0,c._)`"use strict"; ${y(D,H)}`),S(x,H),x.code(oe)}):x.func(N,(0,c._)`${i.default.data}, ${w(H)}`,B.$async,()=>x.code(y(D,H)).code(oe))}function w(x){return(0,c._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${x.dynamicRef?(0,c._)`, ${i.default.dynamicAnchors}={}`:c.nil}, ${i.default.isAllOfVariant} = 0}={}`}function S(x,N){x.if(i.default.valCxt,()=>{x.var(i.default.instancePath,(0,c._)`${i.default.valCxt}.${i.default.instancePath}`),x.var(i.default.parentData,(0,c._)`${i.default.valCxt}.${i.default.parentData}`),x.var(i.default.parentDataProperty,(0,c._)`${i.default.valCxt}.${i.default.parentDataProperty}`),x.var(i.default.rootData,(0,c._)`${i.default.valCxt}.${i.default.rootData}`),x.var(i.default.isAllOfVariant,(0,c._)`${i.default.valCxt}.${i.default.isAllOfVariant}`),N.dynamicRef&&x.var(i.default.dynamicAnchors,(0,c._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{x.var(i.default.instancePath,(0,c._)`""`),x.var(i.default.parentData,(0,c._)`undefined`),x.var(i.default.parentDataProperty,(0,c._)`undefined`),x.var(i.default.rootData,i.default.data),x.var(i.default.isAllOfVariant,(0,c._)`0`),N.dynamicRef&&x.var(i.default.dynamicAnchors,(0,c._)`{}`)})}function b(x){const{schema:N,opts:D,gen:B}=x;m(x,()=>{D.$comment&&N.$comment&&L(x),q(x),B.let(i.default.vErrors,null),B.let(i.default.errors,0),D.unevaluated&&$(x),O(x),K(x)})}function $(x){const{gen:N,validateName:D}=x;x.evaluated=N.const("evaluated",(0,c._)`${D}.evaluated`),N.if((0,c._)`${x.evaluated}.dynamicProps`,()=>N.assign((0,c._)`${x.evaluated}.props`,(0,c._)`undefined`)),N.if((0,c._)`${x.evaluated}.dynamicItems`,()=>N.assign((0,c._)`${x.evaluated}.items`,(0,c._)`undefined`))}function y(x,N){const D=typeof x=="object"&&x[N.schemaId];return D&&(N.code.source||N.code.process)?(0,c._)`/*# sourceURL=${D} */`:c.nil}function d(x,N){if(h(x)&&(E(x),P(x))){g(x,N);return}(0,e.boolOrEmptySchema)(x,N)}function P({schema:x,self:N}){if(typeof x=="boolean")return!x;for(const D in x)if(N.RULES.all[D])return!0;return!1}function h(x){return typeof x.schema!="boolean"}function g(x,N){const{schema:D,gen:B,opts:H}=x;H.$comment&&D.$comment&&L(x),z(x),F(x);const oe=B.const("_errs",i.default.errors);O(x,oe),B.var(N,(0,c._)`${oe} === ${i.default.errors}`)}function E(x){(0,u.checkUnknownRules)(x),A(x)}function O(x,N){if(x.opts.jtd)return pe(x,[],!1,N);const D=(0,t.getSchemaTypes)(x.schema),B=(0,t.coerceAndCheckDataType)(x,D);pe(x,D,!B,N)}function A(x){const{schema:N,errSchemaPath:D,opts:B,self:H}=x;N.$ref&&B.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(N,H.RULES)&&H.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function q(x){const{schema:N,opts:D}=x;N.default!==void 0&&D.useDefaults&&D.strictSchema&&(0,u.checkStrictMode)(x,"default is ignored in the schema root")}function z(x){const N=x.schema[x.opts.schemaId];N&&(x.baseId=(0,l.resolveUrl)(x.opts.uriResolver,x.baseId,N))}function F(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function L({gen:x,schemaEnv:N,schema:D,errSchemaPath:B,opts:H}){const oe=D.$comment;if(H.$comment===!0)x.code((0,c._)`${i.default.self}.logger.log(${oe})`);else if(typeof H.$comment=="function"){const C=(0,c.str)`${B}/$comment`,X=x.scopeValue("root",{ref:N.root});x.code((0,c._)`${i.default.self}.opts.$comment(${oe}, ${C}, ${X}.schema)`)}}function K(x){const{gen:N,schemaEnv:D,validateName:B,ValidationError:H,opts:oe}=x;D.$async?N.if((0,c._)`${i.default.errors} === 0`,()=>N.return(i.default.data),()=>N.throw((0,c._)`new ${H}(${i.default.vErrors})`)):(N.assign((0,c._)`${B}.errors`,i.default.vErrors),oe.unevaluated&&le(x),N.return((0,c._)`${i.default.errors} === 0`))}function le({gen:x,evaluated:N,props:D,items:B}){D instanceof c.Name&&x.assign((0,c._)`${N}.props`,D),B instanceof c.Name&&x.assign((0,c._)`${N}.items`,B)}function pe(x,N,D,B){const{gen:H,schema:oe,data:C,allErrors:X,opts:se,self:ee}=x,{RULES:te}=ee;if(oe.$ref&&(se.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(oe,te))){H.block(()=>M(x,"$ref",te.all.$ref.definition));return}se.jtd||ce(x,N),H.block(()=>{for(const ie of te.rules)ue(ie);ue(te.post)});function ue(ie){(0,r.shouldUseGroup)(oe,ie)&&(ie.type?(H.if((0,n.checkDataType)(ie.type,C,se.strictNumbers)),Se(x,ie),N.length===1&&N[0]===ie.type&&D&&(H.else(),(0,n.reportTypeError)(x)),H.endIf()):Se(x,ie),X||H.if((0,c._)`${i.default.errors} === ${B||0}`))}}function Se(x,N){const{gen:D,schema:B,opts:{useDefaults:H}}=x;H&&(0,o.assignDefaults)(x,N.type),D.block(()=>{for(const C of N.rules)((0,r.shouldUseRule)(B,C)||oe(B,C))&&M(x,C.keyword,C.definition,N.type)});function oe(C,X){return!!(X.keyword==="unevaluatedProperties"&&(C.properties||C.patternProperties)&&!x.isAllOfVariant&&x.opts.defaultUnevaluatedProperties===!1)}}function ce(x,N){x.schemaEnv.meta||!x.opts.strictTypes||(_e(x,N),x.opts.allowUnionTypes||R(x,N),k(x,x.dataTypes))}function _e(x,N){if(N.length){if(!x.dataTypes.length){x.dataTypes=N;return}N.forEach(D=>{j(x.dataTypes,D)||I(x,`type "${D}" not allowed by context "${x.dataTypes.join(",")}"`)}),v(x,N)}}function R(x,N){N.length>1&&!(N.length===2&&N.includes("null"))&&I(x,"use allowUnionTypes to allow union type keyword")}function k(x,N){const D=x.self.RULES.all;for(const B in D){const H=D[B];if(typeof H=="object"&&(0,r.shouldUseRule)(x.schema,H)){const{type:oe}=H.definition;oe.length&&!oe.some(C=>V(N,C))&&I(x,`missing type "${oe.join(",")}" for keyword "${B}"`)}}}function V(x,N){return x.includes(N)||N==="number"&&x.includes("integer")}function j(x,N){return x.includes(N)||N==="integer"&&x.includes("number")}function v(x,N){const D=[];for(const B of x.dataTypes)j(N,B)?D.push(B):N.includes("integer")&&B==="number"&&D.push("integer");x.dataTypes=D}function I(x,N){const D=x.schemaEnv.baseId+x.errSchemaPath;N+=` at "${D}" (strictTypes)`,(0,u.checkStrictMode)(x,N,x.opts.strictTypes)}class T{constructor(N,D,B){if((0,s.validateKeywordUsage)(N,D,B),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=B,this.data=N.data,this.schema=N.schema[B],this.$data=D.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(N,this.schema,B,this.$data),this.schemaType=D.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=D,this.$data)this.schemaCode=N.gen.const("vSchema",re(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=N.gen.const("_errs",i.default.errors))}result(N,D,B){this.failResult((0,c.not)(N),D,B)}failResult(N,D,B){this.gen.if(N),B?B():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,D){this.failResult((0,c.not)(N),void 0,D)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),N)})`)}error(N,D,B){if(D){this.setParams(D),this._error(N,B),this.setParams({});return}this._error(N,B)}_error(N,D){(N?f.reportExtraError:f.reportError)(this,this.def.error,D)}$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(N){this.allErrors||this.gen.if(N)}setParams(N,D){D?Object.assign(this.params,N):this.params=N}block$data(N,D,B=c.nil){this.gen.block(()=>{this.check$data(N,B),D()})}check$data(N=c.nil,D=c.nil){if(!this.$data)return;const{gen:B,schemaCode:H,schemaType:oe,def:C}=this;B.if((0,c.or)((0,c._)`${H} === undefined`,D)),N!==c.nil&&B.assign(N,!0),(oe.length||C.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),N!==c.nil&&B.assign(N,!1)),B.else()}invalid$data(){const{gen:N,schemaCode:D,schemaType:B,def:H,it:oe}=this;return(0,c.or)(C(),X());function C(){if(B.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");const se=Array.isArray(B)?B:[B];return(0,c._)`${(0,n.checkDataTypes)(se,D,oe.opts.strictNumbers,n.DataType.Wrong)}`}return c.nil}function X(){if(H.validateSchema){const se=N.scopeValue("validate$data",{ref:H.validateSchema});return(0,c._)`!${se}(${D})`}return c.nil}}subschema(N,D,B){const H=(0,a.getSubschema)(this.it,N);(0,a.extendSubschemaData)(H,this.it,N),(0,a.extendSubschemaMode)(H,N);const oe={...this.it,...H,items:void 0,props:void 0,isAllOfVariant:B};return d(oe,D),oe}mergeEvaluated(N,D){const{it:B,gen:H}=this;B.opts.unevaluated&&(B.props!==!0&&N.props!==void 0&&(B.props=u.mergeEvaluated.props(H,N.props,B.props,D)),B.items!==!0&&N.items!==void 0&&(B.items=u.mergeEvaluated.items(H,N.items,B.items,D)))}mergeValidEvaluated(N,D){const{it:B,gen:H}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return H.if(D,()=>this.mergeEvaluated(N,c.Name)),!0}}zt.KeywordCxt=T;function M(x,N,D,B){const H=new T(x,D,N);"code"in D?D.code(H,B):H.$data&&D.validate?(0,s.funcKeywordCode)(H,D):"macro"in D?(0,s.macroKeywordCode)(H,D):(D.compile||D.validate)&&(0,s.funcKeywordCode)(H,D)}const U=/^\/(?:[^~]|~0|~1)*$/,J=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(x,{dataLevel:N,dataNames:D,dataPathArr:B}){let H,oe;if(x==="")return i.default.rootData;if(x[0]==="/"){if(!U.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);H=x,oe=i.default.rootData}else{const ee=J.exec(x);if(!ee)throw new Error(`Invalid JSON-pointer: ${x}`);const te=+ee[1];if(H=ee[2],H==="#"){if(te>=N)throw new Error(se("property/index",te));return B[N-te]}if(te>N)throw new Error(se("data",te));if(oe=D[N-te],!H)return oe}let C=oe;const X=H.split("/");for(const ee of X)ee&&(oe=(0,c._)`${oe}${(0,c.getProperty)((0,u.unescapeJsonPointer)(ee))}`,C=(0,c._)`${C} && ${oe}`);return C;function se(ee,te){return`Cannot access ${ee} ${te} levels up, current level is ${N}`}}return zt.getData=re,zt}var Kn={},Vl;function Jn(){if(Vl)return Kn;Vl=1,Object.defineProperty(Kn,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Kn.default=e,Kn}var Yn={},Fl;function Wr(){if(Fl)return Yn;Fl=1,Object.defineProperty(Yn,"__esModule",{value:!0});const e=Gn();class t extends Error{constructor(n,o,s,a){super(a||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Yn.default=t,Yn}var ft={},zl;function Wn(){if(zl)return ft;zl=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;const e=Ee(),t=Jn(),r=pt(),n=Gn(),o=Ce(),s=Yr();class a{constructor($){var y;this.refs={},this.dynamicAnchors={};let d;typeof $.schema=="object"&&(d=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(y=$.baseId)!==null&&y!==void 0?y:(0,n.normalizeId)(d?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=d?.$async,this.refs={}}}ft.SchemaEnv=a;function c(b){const $=u.call(this,b);if($)return $;const y=(0,n.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:d,lines:P}=this.opts.code,{ownProperties:h}=this.opts,g=new e.CodeGen(this.scope,{es5:d,lines:P,ownProperties:h});let E;b.$async&&(E=g.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=g.scopeName("validate");b.validateName=O;const A={gen:g,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:g.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:O,ValidationError:E,schema:b.schema,schemaEnv:b,rootId:y,baseId:b.baseId||y,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let q;try{this._compilations.add(b),(0,s.validateFunctionCode)(A),g.optimize(this.opts.code.optimize);const z=g.toString();q=`const visitedNodesForRef = new WeakMap(); ${g.scopeRefs(r.default.scope)}return ${z}`,this.opts.code.process&&(q=this.opts.code.process(q,b));const F=new Function(`${r.default.self}`,`${r.default.scope}`,q)(this,this.scope.get());if(this.scope.value(O,{ref:F}),F.errors=null,F.schema=b.schema,F.schemaEnv=b,b.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:O,validateCode:z,scopeValues:g._values}),this.opts.unevaluated){const{props:L,items:K}=A;F.evaluated={props:L instanceof e.Name?void 0:L,items:K instanceof e.Name?void 0:K,dynamicProps:L instanceof e.Name,dynamicItems:K instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return b.validate=F,b}catch(z){throw delete b.validate,delete b.validateName,q&&this.logger.error("Error compiling schema, function code:",q),z}finally{this._compilations.delete(b)}}ft.compileSchema=c;function i(b,$,y){var d;const P=(0,n.resolveUrl)(this.opts.uriResolver,$,y),h=b.refs[P];if(h)return h;let g=_.call(this,b,P);if(g===void 0){const E=(d=b.localRefs)===null||d===void 0?void 0:d[P],{schemaId:O}=this.opts;E&&(g=new a({schema:E,schemaId:O,root:b,baseId:$}))}if(g===void 0&&this.opts.loadSchemaSync){const E=this.opts.loadSchemaSync($,y,P);E&&!(this.refs[P]||this.schemas[P])&&(this.addSchema(E,P,void 0),g=_.call(this,b,P))}if(g!==void 0)return b.refs[P]=l.call(this,g)}ft.resolveRef=i;function l(b){return(0,n.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:c.call(this,b)}function u(b){for(const $ of this._compilations)if(f($,b))return $}ft.getCompilingSchema=u;function f(b,$){return b.schema===$.schema&&b.root===$.root&&b.baseId===$.baseId}function _(b,$){let y;for(;typeof(y=this.refs[$])=="string";)$=y;return y||this.schemas[$]||m.call(this,b,$)}function m(b,$){const y=this.opts.uriResolver.parse($),d=(0,n._getFullPath)(this.opts.uriResolver,y);let P=(0,n.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&d===P)return S.call(this,y,b);const h=(0,n.normalizeId)(d),g=this.refs[h]||this.schemas[h];if(typeof g=="string"){const E=m.call(this,b,g);return typeof E?.schema!="object"?void 0:S.call(this,y,E)}if(typeof g?.schema=="object"){if(g.validate||c.call(this,g),h===(0,n.normalizeId)($)){const{schema:E}=g,{schemaId:O}=this.opts,A=E[O];return A&&(P=(0,n.resolveUrl)(this.opts.uriResolver,P,A)),new a({schema:E,schemaId:O,root:b,baseId:P})}return S.call(this,y,g)}}ft.resolveSchema=m;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(b,{baseId:$,schema:y,root:d}){var P;if(((P=b.fragment)===null||P===void 0?void 0:P[0])!=="/")return;for(const E of b.fragment.slice(1).split("/")){if(typeof y=="boolean")return;const O=y[(0,o.unescapeFragment)(E)];if(O===void 0)return;y=O;const A=typeof y=="object"&&y[this.opts.schemaId];!w.has(E)&&A&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,A))}let h;if(typeof y!="boolean"&&y.$ref&&!(0,o.schemaHasRulesButRef)(y,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,$,y.$ref);h=m.call(this,d,E)}const{schemaId:g}=this.opts;if(h=h||new a({schema:y,schemaId:g,root:d,baseId:$}),h.schema!==h.root.schema)return h}return ft}const r0="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",n0="Meta-schema for $data reference (JSON AnySchema extension proposal)",o0="object",s0=["$data"],a0={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},i0=!1,c0={$id:r0,description:n0,type:o0,required:s0,properties:a0,additionalProperties:i0};var Hn={},Hr={exports:{}},Da,Ul;function Bl(){if(Ul)return Da;Ul=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),r=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(h){let g="",E=0,O=0;for(O=0;O<h.length;O++)if(E=h[O].charCodeAt(0),E!==48){if(!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";g+=h[O];break}for(O+=1;O<h.length;O++){if(E=h[O].charCodeAt(0),!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";g+=h[O]}return g}const a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function c(h){return h.length=0,!0}function i(h,g,E){if(h.length){const O=s(h);if(O!=="")g.push(O);else return E.error=!0,!1;h.length=0}return!0}function l(h){let g=0;const E={error:!1,address:"",zone:""},O=[],A=[];let q=!1,z=!1,F=i;for(let L=0;L<h.length;L++){const K=h[L];if(!(K==="["||K==="]"))if(K===":"){if(q===!0&&(z=!0),!F(A,O,E))break;if(++g>7){E.error=!0;break}L>0&&h[L-1]===":"&&(q=!0),O.push(":");continue}else if(K==="%"){if(!F(A,O,E))break;F=c}else{A.push(K);continue}}return A.length&&(F===c?E.zone=A.join(""):z?O.push(A.join("")):O.push(s(A))),E.address=O.join(""),E}function u(h){if(f(h,":")<2)return{host:h,isIPV6:!1};const g=l(h);if(g.error)return{host:h,isIPV6:!1};{let E=g.address,O=g.address;return g.zone&&(E+="%"+g.zone,O+="%25"+g.zone),{host:E,isIPV6:!0,escapedHost:O}}}function f(h,g){let E=0;for(let O=0;O<h.length;O++)h[O]===g&&E++;return E}function _(h){let g=h;const E=[];let O=-1,A=0;for(;A=g.length;){if(A===1){if(g===".")break;if(g==="/"){E.push("/");break}else{E.push(g);break}}else if(A===2){if(g[0]==="."){if(g[1]===".")break;if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&(g[1]==="."||g[1]==="/")){E.push("/");break}}else if(A===3&&g==="/.."){E.length!==0&&E.pop(),E.push("/");break}if(g[0]==="."){if(g[1]==="."){if(g[2]==="/"){g=g.slice(3);continue}}else if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&g[1]==="."){if(g[2]==="/"){g=g.slice(2);continue}else if(g[2]==="."&&g[3]==="/"){g=g.slice(3),E.length!==0&&E.pop();continue}}if((O=g.indexOf("/",1))===-1){E.push(g);break}else E.push(g.slice(0,O)),g=g.slice(O)}return E.join("")}const m={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},w=/[@/?#:]/g,S=/[@/?#]/g;function b(h,g){const E=g?S:w;return E.lastIndex=0,h.replace(E,O=>m[O])}function $(h,g=!1){if(h.indexOf("%")===-1)return h;let E="";for(let O=0;O<h.length;O++){if(h[O]==="%"&&O+2<h.length){const A=h.slice(O+1,O+3);if(r(A)){const q=A.toUpperCase(),z=String.fromCharCode(parseInt(q,16));g&&n(z)?E+=z:E+="%"+q,O+=2;continue}}E+=h[O]}return E}function y(h){let g="";for(let E=0;E<h.length;E++){if(h[E]==="%"&&E+2<h.length){const O=h.slice(E+1,E+3);if(r(O)){const A=O.toUpperCase(),q=String.fromCharCode(parseInt(A,16));q!=="."&&n(q)?g+=q:g+="%"+A,E+=2;continue}}o(h[E])?g+=h[E]:g+=escape(h[E])}return g}function d(h){let g="";for(let E=0;E<h.length;E++){if(h[E]==="%"&&E+2<h.length){const O=h.slice(E+1,E+3);if(r(O)){g+="%"+O.toUpperCase(),E+=2;continue}}g+=escape(h[E])}return g}function P(h){const g=[];if(h.userinfo!==void 0&&(g.push(h.userinfo),g.push("@")),h.host!==void 0){let E=unescape(h.host);if(!t(E)){const O=u(E);O.isIPV6===!0?E=`[${O.escapedHost}]`:E=b(E,!1)}g.push(E)}return(typeof h.port=="number"||typeof h.port=="string")&&(g.push(":"),g.push(String(h.port))),g.length?g.join(""):void 0}return Da={nonSimpleDomain:a,recomposeAuthority:P,reescapeHostDelimiters:b,normalizePercentEncoding:$,normalizePathEncoding:y,escapePreservingEscapes:d,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:s},Da}var qa,Gl;function l0(){if(Gl)return qa;Gl=1;const{isUUID:e}=Bl(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(d){return r.indexOf(d)!==-1}function o(d){return d.secure===!0?!0:d.secure===!1?!1:d.scheme?d.scheme.length===3&&(d.scheme[0]==="w"||d.scheme[0]==="W")&&(d.scheme[1]==="s"||d.scheme[1]==="S")&&(d.scheme[2]==="s"||d.scheme[2]==="S"):!1}function s(d){return d.host||(d.error=d.error||"HTTP URIs must have a host."),d}function a(d){const P=String(d.scheme).toLowerCase()==="https";return(d.port===(P?443:80)||d.port==="")&&(d.port=void 0),d.path||(d.path="/"),d}function c(d){return d.secure=o(d),d.resourceName=(d.path||"/")+(d.query?"?"+d.query:""),d.path=void 0,d.query=void 0,d}function i(d){if((d.port===(o(d)?443:80)||d.port==="")&&(d.port=void 0),typeof d.secure=="boolean"&&(d.scheme=d.secure?"wss":"ws",d.secure=void 0),d.resourceName){const[P,h]=d.resourceName.split("?");d.path=P&&P!=="/"?P:void 0,d.query=h,d.resourceName=void 0}return d.fragment=void 0,d}function l(d,P){if(!d.path)return d.error="URN can not be parsed",d;const h=d.path.match(t);if(h){const g=P.scheme||d.scheme||"urn";d.nid=h[1].toLowerCase(),d.nss=h[2];const E=`${g}:${P.nid||d.nid}`,O=y(E);d.path=void 0,O&&(d=O.parse(d,P))}else d.error=d.error||"URN can not be parsed.";return d}function u(d,P){if(d.nid===void 0)throw new Error("URN without nid cannot be serialized");const h=P.scheme||d.scheme||"urn",g=d.nid.toLowerCase(),E=`${h}:${P.nid||g}`,O=y(E);O&&(d=O.serialize(d,P));const A=d,q=d.nss;return A.path=`${g||P.nid}:${q}`,P.skipEscape=!0,A}function f(d,P){const h=d;return h.uuid=h.nss,h.nss=void 0,!P.tolerant&&(!h.uuid||!e(h.uuid))&&(h.error=h.error||"UUID is not valid."),h}function _(d){const P=d;return P.nss=(d.uuid||"").toLowerCase(),P}const m={scheme:"http",domainHost:!0,parse:s,serialize:a},w={scheme:"https",domainHost:m.domainHost,parse:s,serialize:a},S={scheme:"ws",domainHost:!0,parse:c,serialize:i},b={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},$={http:m,https:w,ws:S,wss:b,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:f,serialize:_,skipNormalize:!0}};Object.setPrototypeOf($,null);function y(d){return d&&($[d]||$[d.toLowerCase()])||void 0}return qa={wsIsSecure:o,SCHEMES:$,isValidSchemeName:n,getSchemeHandler:y},qa}var Kl;function Jl(){if(Kl)return Hr.exports;Kl=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:a,isIPv4:c,nonSimpleDomain:i}=Bl(),{SCHEMES:l,getSchemeHandler:u}=l0();function f(A,q){return typeof A=="string"?A=h(A,q):typeof A=="object"&&(A=P(S(A,q),q)),A}function _(A,q,z){const F=z?Object.assign({scheme:"null"},z):{scheme:"null"},L=m(P(A,F),P(q,F),F,!0);return F.skipEscape=!0,S(L,F)}function m(A,q,z,F){const L={};return F||(A=P(S(A,z),z),q=P(S(q,z),z)),z=z||{},!z.tolerant&&q.scheme?(L.scheme=q.scheme,L.userinfo=q.userinfo,L.host=q.host,L.port=q.port,L.path=t(q.path||""),L.query=q.query):(q.userinfo!==void 0||q.host!==void 0||q.port!==void 0?(L.userinfo=q.userinfo,L.host=q.host,L.port=q.port,L.path=t(q.path||""),L.query=q.query):(q.path?(q.path[0]==="/"?L.path=t(q.path):((A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)&&!A.path?L.path="/"+q.path:A.path?L.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+q.path:L.path=q.path,L.path=t(L.path)),L.query=q.query):(L.path=A.path,q.query!==void 0?L.query=q.query:L.query=A.query),L.userinfo=A.userinfo,L.host=A.host,L.port=A.port),L.scheme=A.scheme),L.fragment=q.fragment,L}function w(A,q,z){const F=E(A,z),L=E(q,z);return F!==void 0&&L!==void 0&&F.toLowerCase()===L.toLowerCase()}function S(A,q){const z={host:A.host,scheme:A.scheme,userinfo:A.userinfo,port:A.port,path:A.path,query:A.query,nid:A.nid,nss:A.nss,uuid:A.uuid,fragment:A.fragment,reference:A.reference,resourceName:A.resourceName,secure:A.secure,error:""},F=Object.assign({},q),L=[],K=u(F.scheme||z.scheme);K&&K.serialize&&K.serialize(z,F),z.path!==void 0&&(F.skipEscape?z.path=n(z.path):(z.path=s(z.path),z.scheme!==void 0&&(z.path=z.path.split("%3A").join(":")))),F.reference!=="suffix"&&z.scheme&&L.push(z.scheme,":");const le=r(z);if(le!==void 0&&(F.reference!=="suffix"&&L.push("//"),L.push(le),z.path&&z.path[0]!=="/"&&L.push("/")),z.path!==void 0){let pe=z.path;!F.absolutePath&&(!K||!K.absolutePath)&&(pe=t(pe)),le===void 0&&pe[0]==="/"&&pe[1]==="/"&&(pe="/%2F"+pe.slice(2)),L.push(pe)}return z.query!==void 0&&L.push("?",z.query),z.fragment!==void 0&&L.push("#",z.fragment),L.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,$=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function y(A,q){if(q[2]!==void 0&&A.path&&A.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof A.port=="number"&&(A.port<0||A.port>65535))return"URI port is malformed."}function d(A,q){const z=Object.assign({},q),F={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let L=!1,K=!1;z.reference==="suffix"&&(z.scheme?A=z.scheme+":"+A:A="//"+A);const le=A.match($);le!==null&&le[1].indexOf("\\")!==-1&&(F.error="URI authority must not contain a literal backslash.",L=!0);const pe=A.match(b);if(pe){F.scheme=pe[1],F.userinfo=pe[3],F.host=pe[4],F.port=parseInt(pe[5],10),F.path=pe[6]||"",F.query=pe[7],F.fragment=pe[8],isNaN(F.port)&&(F.port=pe[5]);const Se=y(F,pe);if(Se!==void 0&&(F.error=F.error||Se,L=!0),F.host)if(c(F.host)===!1){const _e=e(F.host);F.host=_e.host.toLowerCase(),K=_e.isIPV6}else K=!0;F.scheme===void 0&&F.userinfo===void 0&&F.host===void 0&&F.port===void 0&&F.query===void 0&&!F.path?F.reference="same-document":F.scheme===void 0?F.reference="relative":F.fragment===void 0?F.reference="absolute":F.reference="uri",z.reference&&z.reference!=="suffix"&&z.reference!==F.reference&&(F.error=F.error||"URI is not a "+z.reference+" reference.");const ce=u(z.scheme||F.scheme);if(!z.unicodeSupport&&(!ce||!ce.unicodeSupport)&&F.host&&(z.domainHost||ce&&ce.domainHost)&&K===!1&&i(F.host))try{F.host=new URL("http://"+F.host).hostname}catch(_e){F.error=F.error||"Host's domain name can not be converted to ASCII: "+_e}if((!ce||ce&&!ce.skipNormalize)&&(A.indexOf("%")!==-1&&(F.scheme!==void 0&&(F.scheme=unescape(F.scheme)),F.host!==void 0&&(F.host=a(unescape(F.host),K))),F.path&&(F.path=o(F.path)),F.fragment))try{F.fragment=encodeURI(decodeURIComponent(F.fragment))}catch{F.error=F.error||"URI malformed"}ce&&ce.parse&&ce.parse(F,z)}else F.error=F.error||"URI can not be parsed.";return{parsed:F,malformedAuthorityOrPort:L}}function P(A,q){return d(A,q).parsed}function h(A,q){return g(A,q).normalized}function g(A,q){const{parsed:z,malformedAuthorityOrPort:F}=d(A,q);return{normalized:F?A:S(z,q),malformedAuthorityOrPort:F}}function E(A,q){if(typeof A=="string"){const{normalized:z,malformedAuthorityOrPort:F}=g(A,q);return F?void 0:z}if(typeof A=="object")return S(A,q)}const O={SCHEMES:l,normalize:f,resolve:_,resolveComponent:m,equal:w,serialize:S,parse:P};return Hr.exports=O,Hr.exports.default=O,Hr.exports.fastUri=O,Hr.exports}var Yl;function u0(){if(Yl)return Hn;Yl=1,Object.defineProperty(Hn,"__esModule",{value:!0});const e=Jl();return e.code='require("ajv/dist/runtime/uri").default',Hn.default=e,Hn}var Wl;function Hl(){return Wl||(Wl=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=Yr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Ee();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Jn(),o=Wr(),s=Il(),a=Wn(),c=Ee(),i=Gn(),l=Bn(),u=Ce(),f=c0,_=u0(),m=(R,k)=>new RegExp(R,k);m.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes","defaultUnevaluatedProperties","defaultAdditionalProperties"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function d(R){var k,V,j,v,I,T,M,U,J,re,x,N,D,B,H,oe,C,X,se,ee,te,ue,ie,de,$e;const Me=R.strict,p=(k=R.code)===null||k===void 0?void 0:k.optimize,Y=p===!0||p===void 0?1:p||0,G=(j=(V=R.code)===null||V===void 0?void 0:V.regExp)!==null&&j!==void 0?j:m,Q=(v=R.uriResolver)!==null&&v!==void 0?v:_.default;return{strictSchema:(T=(I=R.strictSchema)!==null&&I!==void 0?I:Me)!==null&&T!==void 0?T:!0,strictNumbers:(U=(M=R.strictNumbers)!==null&&M!==void 0?M:Me)!==null&&U!==void 0?U:!0,strictTypes:(re=(J=R.strictTypes)!==null&&J!==void 0?J:Me)!==null&&re!==void 0?re:"log",strictTuples:(N=(x=R.strictTuples)!==null&&x!==void 0?x:Me)!==null&&N!==void 0?N:"log",strictRequired:(B=(D=R.strictRequired)!==null&&D!==void 0?D:Me)!==null&&B!==void 0?B:!1,code:R.code?{...R.code,optimize:Y,regExp:G}:{optimize:Y,regExp:G},loopRequired:(H=R.loopRequired)!==null&&H!==void 0?H:y,loopEnum:(oe=R.loopEnum)!==null&&oe!==void 0?oe:y,meta:(C=R.meta)!==null&&C!==void 0?C:!0,messages:(X=R.messages)!==null&&X!==void 0?X:!0,inlineRefs:(se=R.inlineRefs)!==null&&se!==void 0?se:!0,schemaId:(ee=R.schemaId)!==null&&ee!==void 0?ee:"$id",addUsedSchema:(te=R.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(ue=R.validateSchema)!==null&&ue!==void 0?ue:!0,validateFormats:(ie=R.validateFormats)!==null&&ie!==void 0?ie:!0,unicodeRegExp:(de=R.unicodeRegExp)!==null&&de!==void 0?de:!0,int32range:($e=R.int32range)!==null&&$e!==void 0?$e:!0,uriResolver:Q}}class P{constructor(k={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...d(k)};const{es5:V,lines:j}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:S,es5:V,lines:j}),this.logger=F(k.logger);const v=k.validateFormats;k.validateFormats=!1,this.RULES=(0,s.getRules)(),h.call(this,b,k,"NOT SUPPORTED"),h.call(this,$,k,"DEPRECATED","warn"),this._metaOpts=q.call(this),k.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&A.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),E.call(this),k.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:k,meta:V,schemaId:j}=this.opts;let v=f;j==="id"&&(v={...f},v.id=v.$id,delete v.$id),V&&k&&this.addMetaSchema(v,v[j],!1)}defaultMeta(){const{meta:k,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[V]||k:void 0}setDefaultUnevaluatedProperties(k){this.opts.defaultUnevaluatedProperties=k}validate(k,V){let j;if(typeof k=="string"){if(j=this.getSchema(k),!j)throw new Error(`no schema with key or ref "${k}"`)}else j=this.compile(k);const v=j(V);return"$async"in j||(this.errors=j.errors),v}compile(k,V){const j=this._addSchema(k,V);return j.validate||this._compileSchemaEnv(j)}compileAsync(k,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:j}=this.opts;return v.call(this,k,V);async function v(re,x){await I.call(this,re.$schema);const N=this._addSchema(re,x);return N.validate||T.call(this,N)}async function I(re){re&&!this.getSchema(re)&&await v.call(this,{$ref:re},!0)}async function T(re){try{return this._compileSchemaEnv(re)}catch(x){if(!(x instanceof o.default))throw x;return M.call(this,x),await U.call(this,x.missingSchema),T.call(this,re)}}function M({missingSchema:re,missingRef:x}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${x} cannot be resolved`)}async function U(re){const x=await J.call(this,re);this.refs[re]||await I.call(this,x.$schema),this.refs[re]||this.addSchema(x,re,V)}async function J(re){const x=this._loading[re];if(x)return x;try{return await(this._loading[re]=j(re))}finally{delete this._loading[re]}}}addSchema(k,V,j,v=this.opts.validateSchema){if(Array.isArray(k)){for(const T of k)this.addSchema(T,void 0,j,v);return this}let I;if(typeof k=="object"){const{schemaId:T}=this.opts;if(I=k[T],I!==void 0&&typeof I!="string")throw new Error(`schema ${T} must be string`)}return V=(0,i.normalizeId)(V||I),this._checkUnique(V),this.schemas[V]=this._addSchema(k,j,V,v,!0),this}addMetaSchema(k,V,j=this.opts.validateSchema){return this.addSchema(k,V,!0,j),this}validateSchema(k,V){if(typeof k=="boolean")return!0;let j;if(j=k.$schema,j!==void 0&&typeof j!="string")throw new Error("$schema must be a string");if(j=j||this.opts.defaultMeta||this.defaultMeta(),!j)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const v=this.validate(j,k);if(!v&&V){const I="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(I);else throw new Error(I)}return v}getSchema(k){let V;for(;typeof(V=g.call(this,k))=="string";)k=V;if(V===void 0){const{schemaId:j}=this.opts,v=new a.SchemaEnv({schema:{},schemaId:j});if(V=a.resolveSchema.call(this,v,k),!V)return;this.refs[k]=V}return V.validate||this._compileSchemaEnv(V)}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 V=g.call(this,k);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[k],delete this.refs[k],this}case"object":{const V=k;this._cache.delete(V);let j=k[this.opts.schemaId];return j&&(j=(0,i.normalizeId)(j),delete this.schemas[j],delete this.refs[j]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(const V of k)this.addKeyword(V);return this}addKeyword(k,V){let j;if(typeof k=="string")j=k,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=j);else if(typeof k=="object"&&V===void 0){if(V=k,j=V.keyword,Array.isArray(j)&&!j.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,j,V),!V)return(0,u.eachItem)(j,I=>le.call(this,I)),this;Se.call(this,V);const v={...V,type:(0,l.getJSONTypes)(V.type),schemaType:(0,l.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(j,v.type.length===0?I=>le.call(this,I,v):I=>v.type.forEach(T=>le.call(this,I,v,T))),this}getKeyword(k){const V=this.RULES.all[k];return typeof V=="object"?V.definition:!!V}removeKeyword(k){const{RULES:V}=this;delete V.keywords[k],delete V.all[k];for(const j of V.rules){const v=j.rules.findIndex(I=>I.keyword===k);v>=0&&j.rules.splice(v,1)}return this}addFormat(k,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[k]=V,this}errorsText(k=this.errors,{separator:V=", ",dataVar:j="data"}={}){return!k||k.length===0?"No errors":k.map(v=>`${j}${v.instancePath} ${v.message}`).reduce((v,I)=>v+V+I)}$dataMetaSchema(k,V){const j=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(const v of V){const I=v.split("/").slice(1);let T=k;for(const M of I)T=T[M];for(const M in j){const U=j[M];if(typeof U!="object")continue;const{$data:J}=U.definition,re=T[M];J&&re&&(T[M]=_e(re))}}return k}_removeAllSchemas(k,V){for(const j in k){const v=k[j];(!V||V.test(j))&&(typeof v=="string"?delete k[j]:v&&!v.meta&&(this._cache.delete(v.schema),delete k[j]))}}_addSchema(k,V,j,v=this.opts.validateSchema,I=this.opts.addUsedSchema){let T;const{schemaId:M}=this.opts;if(typeof k=="object")T=k[M];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 U=this._cache.get(k);if(U!==void 0)return U;j=(0,i.normalizeId)(T||j);const J=i.getSchemaRefs.call(this,k,j);return U=new a.SchemaEnv({schema:k,schemaId:M,meta:V,baseId:j,localRefs:J}),this._cache.set(U.schema,U),I&&!j.startsWith("#")&&(j&&this._checkUnique(j),this.refs[j]=U),v&&this.validateSchema(k,!0),U}_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):a.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){const V=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,k)}finally{this.opts=V}}}P.ValidationError=n.default,P.MissingRefError=o.default,e.default=P;function h(R,k,V,j="error"){for(const v in R){const I=v;I in k&&this.logger[j](`${V}: option ${v}. ${R[I]}`)}}function g(R){return R=(0,i.normalizeId)(R),this.schemas[R]||this.refs[R]}function E(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const k in R)this.addSchema(R[k],k)}function O(){for(const R in this.opts.formats){const k=this.opts.formats[R];k&&this.addFormat(R,k)}}function A(R){if(Array.isArray(R)){this.addVocabulary(R);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const k in R){const V=R[k];V.keyword||(V.keyword=k),this.addKeyword(V)}}function q(){const R={...this.opts};for(const k of w)delete R[k];return R}const z={log(){},warn(){},error(){}};function F(R){if(R===!1)return z;if(R===void 0)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}const L=/^[a-z_$][a-z0-9_$:-]*$/i;function K(R,k){const{RULES:V}=this;if((0,u.eachItem)(R,j=>{if(V.keywords[j])throw new Error(`Keyword ${j} is already defined`);if(!L.test(j))throw new Error(`Keyword ${j} has invalid name`)}),!!k&&k.$data&&!("code"in k||"validate"in k))throw new Error('$data keyword must have "code" or "validate" function')}function le(R,k,V){var j;const v=k?.post;if(V&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:I}=this;let T=v?I.post:I.rules.find(({type:U})=>U===V);if(T||(T={type:V,rules:[]},I.rules.push(T)),I.keywords[R]=!0,!k)return;const M={keyword:R,definition:{...k,type:(0,l.getJSONTypes)(k.type),schemaType:(0,l.getJSONTypes)(k.schemaType)}};k.before?pe.call(this,T,M,k.before):T.rules.push(M),I.all[R]=M,(j=k.implements)===null||j===void 0||j.forEach(U=>this.addKeyword(U))}function pe(R,k,V){const j=R.rules.findIndex(v=>v.keyword===V);j>=0?R.rules.splice(j,0,k):(R.rules.push(k),this.logger.warn(`rule ${V} is not defined`))}function Se(R){let{metaSchema:k}=R;k!==void 0&&(R.$data&&this.opts.$data&&(k=_e(k)),R.validateSchema=this.compile(k,!0))}const ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(R){return{anyOf:[R,ce]}}})(dl)),dl}var Xn={},Qn={},Zn={},Xl;function p0(){if(Xl)return Zn;Xl=1,Object.defineProperty(Zn,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Zn.default=e,Zn}var tr={},Ql;function eo(){if(Ql)return tr;Ql=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.callRef=tr.getValidate=void 0;const e=Wr(),t=Et(),r=Ee(),n=pt(),o=Wn(),s=Ce(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:f,it:_}=l,{baseId:m,schemaEnv:w,validateName:S,opts:b,self:$}=_,{root:y}=w;if((f==="#"||f==="#/")&&m===y.baseId)return P();const d=o.resolveRef.call($,y,m,f);if(d===void 0)throw new e.default(_.opts.uriResolver,m,f);if(d instanceof o.SchemaEnv)return h(d);return g(d);function P(){if(w===y)return i(l,S,w,w.$async);const E=u.scopeValue("root",{ref:y});return i(l,(0,r._)`${E}.validate`,y,y.$async)}function h(E){const O=c(l,E);i(l,O,E,E.$async)}function g(E){const O=u.scopeValue("schema",b.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),A=u.name("valid"),q=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:O,errSchemaPath:f},A,_.isAllOfVariant);l.mergeEvaluated(q),l.ok(A)}}};function c(l,u){const{gen:f}=l;return u.validate?f.scopeValue("validate",{ref:u.validate}):(0,r._)`${f.scopeValue("wrapper",{ref:u})}.validate`}tr.getValidate=c;function i(l,u,f,_){const{gen:m,it:w}=l,{allErrors:S,schemaEnv:b,opts:$}=w,y=$.passContext?n.default.this:r.nil;_?d():P();function d(){if(!b.$async)throw new Error("async schema referenced by sync schema");const E=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,t.callValidateCode)(l,u,y)}`),g(u),S||m.assign(E,!0)},O=>{m.if((0,r._)`!(${O} instanceof ${w.ValidationError})`,()=>m.throw(O)),h(O),S||m.assign(E,!1)}),l.ok(E)}function P(){const E=m.name("visitedNodes");m.code((0,r._)`const ${E} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${u}) || new Set()`),m.if((0,r._)`!${E}.has(${l.data})`,()=>{m.code((0,r._)`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${u}, ${E})`),m.code((0,r._)`const dataNode = ${l.data}`),m.code((0,r._)`if (typeof dataNode === "object" && dataNode !== null) ${E}.add(dataNode)`);const O=l.result((0,t.callValidateCode)(l,u,y),()=>g(u),()=>h(u));return m.code((0,r._)`${E}.delete(dataNode)`),O})}function h(E){const O=(0,r._)`${E}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${O} : ${n.default.vErrors}.concat(${O})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function g(E){var O;if(!w.opts.unevaluated)return;const A=(O=f?.validate)===null||O===void 0?void 0:O.evaluated;if(w.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(w.props=s.mergeEvaluated.props(m,A.props,w.props));else{const q=m.var("props",(0,r._)`${E}.evaluated.props`);w.props=s.mergeEvaluated.props(m,q,w.props,r.Name)}if(w.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(w.items=s.mergeEvaluated.items(m,A.items,w.items));else{const q=m.var("items",(0,r._)`${E}.evaluated.items`);w.items=s.mergeEvaluated.items(m,q,w.items,r.Name)}}}return tr.callRef=i,tr.default=a,tr}var Zl;function d0(){if(Zl)return Qn;Zl=1,Object.defineProperty(Qn,"__esModule",{value:!0});const e=p0(),t=eo(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Qn.default=r,Qn}var to={},ro={},eu;function f0(){if(eu)return ro;eu=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=Ee(),t=e.operators,r={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}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:c,schemaCode:i}=s;s.fail$data((0,e._)`${c} ${r[a].fail} ${i} || isNaN(${c})`)}};return ro.default=o,ro}var no={},tu;function m0(){if(tu)return no;tu=1,Object.defineProperty(no,"__esModule",{value:!0});const e=Ee(),t={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:n,data:o,schemaCode:s,it:a}=r,c=a.opts.multipleOfPrecision,i=n.let("res"),l=c?(0,e._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${c}`:(0,e._)`${i} !== parseInt(${i})`;r.fail$data((0,e._)`(${s} === 0 || (${i} = ${o}/${s}, ${l}))`)}};return no.default=t,no}var oo={},so={},ru;function h0(){if(ru)return so;ru=1,Object.defineProperty(so,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,o=0,s;for(;o<r;)n++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<r&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return n}return so.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',so}var nu;function y0(){if(nu)return oo;nu=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r=h0(),n={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:c,it:i}=o,l=s==="maxLength"?e.operators.GT:e.operators.LT,u=i.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${u} ${l} ${c}`)}};return oo.default=n,oo}var ao={},ou;function g0(){if(ou)return ao;ou=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=Et(),t=Ce(),r=Ee(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,r.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,r._)`{pattern: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:i,schemaCode:l,it:u}=o,f=u.opts.unicodeRegExp?"u":"";if(c){const{regExp:_}=u.opts.code,m=_.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,_),w=s.let("valid");s.try(()=>s.assign(w,(0,r._)`${m}(${l}, ${f}).test(${a})`),()=>s.assign(w,!1)),o.fail$data((0,r._)`!${w}`)}else{const _=(0,e.usePattern)(o,i);o.fail$data((0,r._)`!${_}.test(${a})`)}}};return ao.default=n,ao}var io={},su;function v0(){if(su)return io;su=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Ee(),t={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:n}){const o=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:n,data:o,schemaCode:s}=r,a=n==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return io.default=t,io}var co={},au;function b0(){if(au)return co;au=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Et(),t=jl(),r=Ee(),n=Ce(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,r.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,r._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:c,schemaCode:i,data:l,$data:u,it:f}=s,{opts:_}=f;if(!u&&c.length===0)return;const m=c.length>=_.loopRequired;if(f.allErrors?w():S(),_.strictRequired){const y=s.parentSchema.properties,{definedProperties:d}=s.it;for(const P of c)if(y?.[P]===void 0&&!d.has(P)){const h=f.schemaEnv.baseId+f.errSchemaPath,g=`required property "${P}" is not defined at "${h}" (strictRequired)`;(0,n.checkStrictMode)(f,g,f.opts.strictRequired)}}function w(){var y;if(m||u)s.block$data(r.nil,b);else for(const d of c){const P=(y=(0,t.getSkipCondition)(s.parentSchema,d))!==null&&y!==void 0?y:(0,r._)`false`;a.if((0,r.not)(P),()=>(0,e.checkReportMissingProp)(s,d))}}function S(){const y=a.let("missing");if(m||u){const d=a.let("valid",!0);s.block$data(d,()=>$(y,d)),s.ok(d)}else a.if((0,e.checkMissingProp)(s,c,y)),(0,e.reportMissingProp)(s,y),a.else()}function b(){a.forOf("prop",i,y=>{s.setParams({missingProperty:y}),a.if((0,e.noPropertyInData)(a,l,y,_.ownProperties),()=>s.error())})}function $(y,d){s.setParams({missingProperty:y}),a.forOf(y,i,()=>{a.assign(d,(0,e.propertyInData)(a,l,y,_.ownProperties)),a.if((0,r.not)(d),()=>{s.error(),a.break()})},r.nil)}}};return co.default=o,co}var lo={},iu;function w0(){if(iu)return lo;iu=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=Ee(),t=pt(),r={keyword:"readOnly",schemaType:"boolean",error:{message:()=>(0,e.str)`must NOT be present in request context`},code(n){if(n.schema!==!0)return;const o=(0,e._)`(${t.default.this} && ${t.default.this}.apiContext)`;n.fail((0,e._)`${o} === "request"`)}};return lo.default=r,lo}var uo={},cu;function $0(){if(cu)return uo;cu=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=Ee(),t=pt(),r={keyword:"writeOnly",schemaType:"boolean",error:{message:()=>(0,e.str)`must NOT be present in response context`},code(n){if(n.schema!==!0)return;const o=(0,e._)`(${t.default.this} && ${t.default.this}.apiContext)`;n.fail((0,e._)`${o} === "response"`)}};return uo.default=r,uo}var po={},lu;function _0(){if(lu)return po;lu=1,Object.defineProperty(po,"__esModule",{value:!0});const e=Ee(),t={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:n}){const o=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:n,data:o,schemaCode:s}=r,a=n==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return po.default=t,po}var fo={},mo={},uu;function La(){if(uu)return mo;uu=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=_n();return e.code='require("ajv/dist/runtime/equal").default',mo.default=e,mo}var pu;function E0(){if(pu)return fo;pu=1,Object.defineProperty(fo,"__esModule",{value:!0});const e=Bn(),t=Ee(),r=Ce(),n=La(),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:c,$data:i,schema:l,parentSchema:u,schemaCode:f,it:_}=s;if(!i&&!l)return;const m=a.let("valid"),w=u.items?(0,e.getSchemaTypes)(u.items):[];s.block$data(m,S,(0,t._)`${f} === false`),s.ok(m);function S(){const d=a.let("i",(0,t._)`${c}.length`),P=a.let("j");s.setParams({i:d,j:P}),a.assign(m,!0),a.if((0,t._)`${d} > 1`,()=>(b()?$:y)(d,P))}function b(){return w.length>0&&!w.some(d=>d==="object"||d==="array")}function $(d,P){const h=a.name("item"),g=(0,e.checkDataTypes)(w,h,_.opts.strictNumbers,e.DataType.Wrong),E=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${d}--;`,()=>{a.let(h,(0,t._)`${c}[${d}]`),a.if(g,(0,t._)`continue`),w.length>1&&a.if((0,t._)`typeof ${h} == "string"`,(0,t._)`${h} += "_"`),a.if((0,t._)`typeof ${E}[${h}] == "number"`,()=>{a.assign(P,(0,t._)`${E}[${h}]`),s.error(),a.assign(m,!1).break()}).code((0,t._)`${E}[${h}] = ${d}`)})}function y(d,P){const h=(0,r.useFunc)(a,n.default),g=a.name("outer");a.label(g).for((0,t._)`;${d}--;`,()=>a.for((0,t._)`${P} = ${d}; ${P}--;`,()=>a.if((0,t._)`${h}(${c}[${d}], ${c}[${P}])`,()=>{s.error(),a.assign(m,!1).break(g)})))}}};return fo.default=o,fo}var ho={},du;function P0(){if(du)return ho;du=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=Ee(),t=Ce(),r=La(),n={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:c,schemaCode:i,schema:l}=o;c||l&&typeof l=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${i})`):o.fail((0,e._)`${l} !== ${a}`)}};return ho.default=n,ho}var yo={},fu;function S0(){if(fu)return yo;fu=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r=La(),n={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:c,schema:i,schemaCode:l,it:u}=o;if(!c&&i.length===0)throw new Error("enum must have non-empty array");const f=i.length>=u.opts.loopEnum;let _;const m=()=>_??(_=(0,t.useFunc)(s,r.default));let w;if(f||c)w=s.let("valid"),o.block$data(w,S);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const $=s.const("vSchema",l);w=(0,e.or)(...i.map((y,d)=>b($,d)))}o.pass(w);function S(){s.assign(w,!1),s.forOf("v",l,$=>s.if((0,e._)`${m()}(${a}, ${$})`,()=>s.assign(w,!0).break()))}function b($,y){const d=i[y];return typeof d=="object"&&d!==null?(0,e._)`${m()}(${a}, ${$}[${y}])`:(0,e._)`${a} === ${d}`}}};return yo.default=n,yo}var mu;function hu(){if(mu)return to;mu=1,Object.defineProperty(to,"__esModule",{value:!0});const e=f0(),t=m0(),r=y0(),n=g0(),o=v0(),s=b0(),a=w0(),c=$0(),i=_0(),l=E0(),u=P0(),f=S0(),_=[e.default,t.default,r.default,n.default,o.default,s.default,a.default,c.default,i.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];return to.default=_,to}var go={},$r={},yu;function gu(){if(yu)return $r;yu=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.validateAdditionalItems=void 0;const e=Ee(),t=Ce(),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:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:i,keyword:l,it:u}=o;u.items=!0;const f=a.const("len",(0,e._)`${i}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${f} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(u,c)){const m=a.var("valid",(0,e._)`${f} <= ${s.length}`);a.if((0,e.not)(m),()=>_(m)),o.ok(m)}function _(m){a.forRange("i",s.length,f,w=>{o.subschema({keyword:l,dataProp:w,dataPropType:t.Type.Num},m),u.allErrors||a.if((0,e.not)(m),()=>a.break())})}}return $r.validateAdditionalItems=n,$r.default=r,$r}var vo={},_r={},vu;function bu(){if(vu)return _r;vu=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.validateTuple=void 0;const e=Ee(),t=Ce(),r=Et(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:c}=s;if(Array.isArray(a))return o(s,"additionalItems",a);c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&s.ok((0,r.validateArray)(s))}};function o(s,a,c=s.schema){const{gen:i,parentSchema:l,data:u,keyword:f,it:_}=s;S(l),_.opts.unevaluated&&c.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(i,c.length,_.items));const m=i.name("valid"),w=i.const("len",(0,e._)`${u}.length`);c.forEach((b,$)=>{(0,t.alwaysValidSchema)(_,b)||(i.if((0,e._)`${w} > ${$}`,()=>s.subschema({keyword:f,schemaProp:$,dataProp:$},m)),s.ok(m))});function S(b){const{opts:$,errSchemaPath:y}=_,d=c.length,P=d===b.minItems&&(d===b.maxItems||b[a]===!1);if($.strictTuples&&!P){const h=`"${f}" is ${d}-tuple, but minItems or maxItems/${a} are not specified or different at path "${y}"`;(0,t.checkStrictMode)(_,h,$.strictTuples)}}}return _r.validateTuple=o,_r.default=n,_r}var wu;function I0(){if(wu)return vo;wu=1,Object.defineProperty(vo,"__esModule",{value:!0});const e=bu(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return vo.default=t,vo}var bo={},$u;function x0(){if($u)return bo;$u=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r=Et(),n=gu(),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:c,it:i}=s,{prefixItems:l}=c;i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&(l?(0,n.validateAdditionalItems)(s,l):s.ok((0,r.validateArray)(s)))}};return bo.default=o,bo}var wo={},_u;function T0(){if(_u)return wo;_u=1,Object.defineProperty(wo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:i}=n;let l,u;const{minContains:f,maxContains:_}=a;i.opts.next?(l=f===void 0?1:f,u=_):l=1;const m=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:l,max:u}),u===void 0&&l===0){(0,t.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&l>u){(0,t.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(i,s)){let y=(0,e._)`${m} >= ${l}`;u!==void 0&&(y=(0,e._)`${y} && ${m} <= ${u}`),n.pass(y);return}i.items=!0;const w=o.name("valid");u===void 0&&l===1?b(w,()=>o.if(w,()=>o.break())):l===0?(o.let(w,!0),u!==void 0&&o.if((0,e._)`${c}.length > 0`,S)):(o.let(w,!1),S()),n.result(w,()=>n.reset());function S(){const y=o.name("_valid"),d=o.let("count",0);b(y,()=>o.if(y,()=>$(d)))}function b(y,d){o.forRange("i",0,m,P=>{n.subschema({keyword:"contains",dataProp:P,dataPropType:t.Type.Num,compositeRule:!0},y),d()})}function $(y){o.code((0,e._)`${y}++`),u===void 0?o.if((0,e._)`${y} >= ${l}`,()=>o.assign(w,!0).break()):(o.if((0,e._)`${y} > ${u}`,()=>o.assign(w,!1).break()),l===1?o.assign(w,!0):o.if((0,e._)`${y} >= ${l}`,()=>o.assign(w,!0)))}}};return wo.default=r,wo}var Eu={},Pu;function Ma(){return Pu||(Pu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ee(),r=Ce(),n=Et();e.error={message:({params:{property:i,depsCount:l,deps:u}})=>{const f=l===1?"property":"properties";return(0,t.str)`must have ${f} ${u} when property ${i} is present`},params:({params:{property:i,depsCount:l,deps:u,missingProperty:f}})=>(0,t._)`{property: ${i},
|
|
6
|
+
missingProperty: ${f},
|
|
7
|
+
depsCount: ${l},
|
|
8
|
+
deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[l,u]=s(i);a(i,l),c(i,u)}};function s({schema:i}){const l={},u={};for(const f in i){if(f==="__proto__")continue;const _=Array.isArray(i[f])?l:u;_[f]=i[f]}return[l,u]}function a(i,l=i.schema){const{gen:u,data:f,it:_}=i;if(Object.keys(l).length===0)return;const m=u.let("missing");for(const w in l){const S=l[w];if(S.length===0)continue;const b=(0,n.propertyInData)(u,f,w,_.opts.ownProperties);i.setParams({property:w,depsCount:S.length,deps:S.join(", ")}),_.allErrors?u.if(b,()=>{for(const $ of S)(0,n.checkReportMissingProp)(i,$)}):(u.if((0,t._)`${b} && (${(0,n.checkMissingProp)(i,S,m)})`),(0,n.reportMissingProp)(i,m),u.else())}}e.validatePropertyDeps=a;function c(i,l=i.schema){const{gen:u,data:f,keyword:_,it:m}=i,w=u.name("valid");for(const S in l)(0,r.alwaysValidSchema)(m,l[S])||(u.if((0,n.propertyInData)(u,f,S,m.opts.ownProperties),()=>{const b=i.subschema({keyword:_,schemaProp:S},w);i.mergeValidEvaluated(b,w)},()=>u.var(w,!0)),i.ok(w))}e.validateSchemaDeps=c,e.default=o})(Eu)),Eu}var $o={},Su;function N0(){if(Su)return $o;Su=1,Object.defineProperty($o,"__esModule",{value:!0});const e=Ee(),t=Ce(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const i=o.name("valid");o.forIn("key",a,l=>{n.setParams({propertyName:l}),n.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},i),o.if((0,e.not)(i),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(i)}};return $o.default=r,$o}var _o={},Iu;function xu(){if(Iu)return _o;Iu=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=Et(),t=Ee(),r=pt(),n=Ce(),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,parentSchema:c,data:i,errsCount:l,it:u}=s,{schema:f=u.opts.defaultAdditionalProperties}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:_,opts:m}=u;if(u.props=!0,m.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(u,f))return;const w=(0,e.allSchemaProperties)(c.properties),S=(0,e.allSchemaProperties)(c.patternProperties);b(),s.ok((0,t._)`${l} === ${r.default.errors}`);function b(){a.forIn("key",i,h=>{!w.length&&!S.length?d(h):a.if($(h),()=>d(h))})}function $(h){let g;if(w.length>8){const E=(0,n.schemaRefOrVal)(u,c.properties,"properties");g=(0,e.isOwnProperty)(a,E,h)}else w.length?g=(0,t.or)(...w.map(E=>(0,t._)`${h} === ${E}`)):g=t.nil;return S.length&&(g=(0,t.or)(g,...S.map(E=>(0,t._)`${(0,e.usePattern)(s,E)}.test(${h})`))),(0,t.not)(g)}function y(h){a.code((0,t._)`delete ${i}[${h}]`)}function d(h){if(m.removeAdditional==="all"||m.removeAdditional&&f===!1){y(h);return}if(f===!1){s.setParams({additionalProperty:h}),s.error(),_||a.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(u,f)){const g=a.name("valid");m.removeAdditional==="failing"?(P(h,g,!1),a.if((0,t.not)(g),()=>{s.reset(),y(h)})):(P(h,g),_||a.if((0,t.not)(g),()=>a.break()))}}function P(h,g,E){const O={keyword:"additionalProperties",dataProp:h,dataPropType:n.Type.Str};E===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(O,g)}}};return _o.default=o,_o}var Eo={},Tu;function k0(){if(Tu)return Eo;Tu=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=Yr(),t=Et(),r=Ce(),n=xu(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:c,parentSchema:i,data:l,it:u}=s;(u.opts.removeAdditional==="all"&&i.additionalProperties===void 0||u.opts.defaultAdditionalProperties===!1)&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const f=(0,t.allSchemaProperties)(c);for(const b of f)u.definedProperties.add(b);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(f),u.props));const _=f.filter(b=>!(0,r.alwaysValidSchema)(u,c[b]));if(_.length===0)return;const m=a.name("valid");for(const b of _)w(b)?S(b):(a.if((0,t.propertyInData)(a,l,b,u.opts.ownProperties)),S(b),u.allErrors||a.else().var(m,!0),a.endIf()),s.it.definedProperties.add(b),s.ok(m);function w(b){return u.opts.useDefaults&&!u.compositeRule&&c[b].default!==void 0}function S(b){s.subschema({keyword:"properties",schemaProp:b,dataProp:b},m)}}};return Eo.default=o,Eo}var Po={},Nu;function O0(){if(Nu)return Po;Nu=1,Object.defineProperty(Po,"__esModule",{value:!0});const e=Et(),t=Ee(),r=Ce(),n=Ce(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:c,data:i,parentSchema:l,it:u}=s,{opts:f}=u,_=(0,e.allSchemaProperties)(c),m=_.filter(P=>(0,r.alwaysValidSchema)(u,c[P]));if(_.length===0||m.length===_.length&&(!u.opts.unevaluated||u.props===!0))return;const w=f.strictSchema&&!f.allowMatchingProperties&&l.properties,S=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:b}=u;$();function $(){for(const P of _)w&&y(P),u.allErrors?d(P):(a.var(S,!0),d(P),a.if(S))}function y(P){for(const h in w)new RegExp(P).test(h)&&(0,r.checkStrictMode)(u,`property ${h} matches pattern ${P} (use allowMatchingProperties)`)}function d(P){a.forIn("key",i,h=>{a.if((0,t._)`${(0,e.usePattern)(s,P)}.test(${h})`,()=>{const g=m.includes(P);g||s.subschema({keyword:"patternProperties",schemaProp:P,dataProp:h,dataPropType:n.Type.Str},S),u.opts.unevaluated&&b!==!0?a.assign((0,t._)`${b}[${h}]`,!0):!g&&!u.allErrors&&a.if((0,t.not)(S),()=>a.break())})})}}};return Po.default=o,Po}var So={},ku;function j0(){if(ku)return So;ku=1,Object.defineProperty(So,"__esModule",{value:!0});const e=Ce(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:o,it:s}=r;if((0,e.alwaysValidSchema)(s,o)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return So.default=t,So}var Io={},Ou;function A0(){if(Ou)return Io;Ou=1,Object.defineProperty(Io,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Et().validateUnion,error:{message:"must match a schema in anyOf"}};return Io.default=e,Io}var xo={},ju;function C0(){if(ju)return xo;ju=1,Object.defineProperty(xo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const i=s,l=o.let("valid",!1),u=o.let("passing",null),f=o.name("_valid");n.setParams({passing:u}),o.block(_),n.result(l,()=>n.reset(),()=>n.error(!0));function _(){i.forEach((m,w)=>{let S;(0,t.alwaysValidSchema)(c,m)?o.var(f,!0):S=n.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},f),w>0&&o.if((0,e._)`${f} && ${l}`).assign(l,!1).assign(u,(0,e._)`[${u}, ${w}]`).else(),o.if(f,()=>{o.assign(l,!0),o.assign(u,w),S&&n.mergeEvaluated(S,e.Name)})})}}};return xo.default=r,xo}var To={},Au;function R0(){if(Au)return To;Au=1,Object.defineProperty(To,"__esModule",{value:!0});const e=Ce(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:o,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");const a=n.name("valid");o.forEach((c,i)=>{if((0,e.alwaysValidSchema)(s,c))return;const l=r.subschema({keyword:"allOf",schemaProp:i},a,!0);r.ok(a),r.mergeEvaluated(l)})}};return To.default=t,To}var No={},Cu;function D0(){if(Cu)return No;Cu=1,Object.defineProperty(No,"__esModule",{value:!0});const e=Ee(),t=Ce(),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:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const i=n(c,"then"),l=n(c,"else");if(!i&&!l)return;const u=s.let("valid",!0),f=s.name("_valid");if(_(),o.reset(),i&&l){const w=s.let("ifClause");o.setParams({ifClause:w}),s.if(f,m("then",w),m("else",w))}else i?s.if(f,m("then")):s.if((0,e.not)(f),m("else"));o.pass(u,()=>o.error(!0));function _(){const w=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated(w)}function m(w,S){return()=>{const b=o.subschema({keyword:w},f);s.assign(u,f),o.mergeValidEvaluated(b,u),S?s.assign(S,(0,e._)`${w}`):o.setParams({ifClause:w})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return No.default=r,No}var ko={},Ru;function q0(){if(Ru)return ko;Ru=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=Ce(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "if" is ignored`)}};return ko.default=t,ko}var Du;function qu(){if(Du)return go;Du=1,Object.defineProperty(go,"__esModule",{value:!0});const e=gu(),t=I0(),r=bu(),n=x0(),o=T0(),s=Ma(),a=N0(),c=xu(),i=k0(),l=O0(),u=j0(),f=A0(),_=C0(),m=R0(),w=D0(),S=q0();function b($=!1){const y=[u.default,f.default,_.default,m.default,w.default,S.default,a.default,c.default,s.default,i.default,l.default];return $?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y}return go.default=b,go}var Oo={},Er={},Lu;function Mu(){if(Lu)return Er;Lu=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.dynamicAnchor=void 0;const e=Ee(),t=pt(),r=Wn(),n=eo(),o={keyword:"$dynamicAnchor",schemaType:"string",code:c=>s(c,c.schema)};function s(c,i){const{gen:l,it:u}=c;u.schemaEnv.root.dynamicAnchors[i]=!0;const f=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(i)}`,_=u.errSchemaPath==="#"?u.validateName:a(c);l.if((0,e._)`!${f}`,()=>l.assign(f,_))}Er.dynamicAnchor=s;function a(c){const{schemaEnv:i,schema:l,self:u}=c.it,{root:f,baseId:_,localRefs:m,meta:w}=i.root,{schemaId:S}=u.opts,b=new r.SchemaEnv({schema:l,schemaId:S,root:f,baseId:_,localRefs:m,meta:w});return r.compileSchema.call(u,b),(0,n.getValidate)(c,b)}return Er.default=o,Er}var Pr={},Vu;function Fu(){if(Vu)return Pr;Vu=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.dynamicRef=void 0;const e=Ee(),t=pt(),r=eo(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>o(s,s.schema)};function o(s,a){const{gen:c,keyword:i,it:l}=s;if(a[0]!=="#")throw new Error(`"${i}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)f();else{const m=c.let("valid",!1);f(m),s.ok(m)}function f(m){if(l.schemaEnv.root.dynamicAnchors[u]){const w=c.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);c.if(w,_(w,m),_(l.validateName,m))}else _(l.validateName,m)()}function _(m,w){return w?()=>c.block(()=>{(0,r.callRef)(s,m),c.let(w,!0)}):()=>(0,r.callRef)(s,m)}}return Pr.dynamicRef=o,Pr.default=n,Pr}var jo={},zu;function L0(){if(zu)return jo;zu=1,Object.defineProperty(jo,"__esModule",{value:!0});const e=Mu(),t=Ce(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return jo.default=r,jo}var Ao={},Uu;function M0(){if(Uu)return Ao;Uu=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=Fu(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Ao.default=t,Ao}var Bu;function V0(){if(Bu)return Oo;Bu=1,Object.defineProperty(Oo,"__esModule",{value:!0});const e=Mu(),t=Fu(),r=L0(),n=M0(),o=[e.default,t.default,r.default,n.default];return Oo.default=o,Oo}var Co={},Ro={},Gu;function F0(){if(Gu)return Ro;Gu=1,Object.defineProperty(Ro,"__esModule",{value:!0});const e=Ma(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return Ro.default=t,Ro}var Do={},Ku;function z0(){if(Ku)return Do;Ku=1,Object.defineProperty(Do,"__esModule",{value:!0});const e=Ma(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Do.default=t,Do}var qo={},Ju;function U0(){if(Ju)return qo;Ju=1,Object.defineProperty(qo,"__esModule",{value:!0});const e=Ce(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:o}){n.contains===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "contains" is ignored`)}};return qo.default=t,qo}var Yu;function B0(){if(Yu)return Co;Yu=1,Object.defineProperty(Co,"__esModule",{value:!0});const e=F0(),t=z0(),r=U0(),n=[e.default,t.default,r.default];return Co.default=n,Co}var Lo={},Mo={},Wu;function G0(){if(Wu)return Mo;Wu=1,Object.defineProperty(Mo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r=pt(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:s,schema:a=o.it.opts.defaultUnevaluatedProperties,data:c,errsCount:i,it:l}=o,u=o.schema===void 0&&o.it.opts.defaultUnevaluatedProperties===!1;if(!i)throw new Error("ajv implementation error");const{allErrors:f,props:_}=l;if(_ instanceof e.Name)s.if((0,e._)`${_} !== true`,()=>s.forIn("key",c,b=>s.if(w(_,b),()=>m(b))));else if(_!==!0){const b=()=>s.forIn("key",c,$=>_===void 0?m($):s.if(S(_,$),()=>m($)));u&&l.errorPath.emptyStr()&&!l.compositeRule?s.if((0,e._)`${r.default.isAllOfVariant} === 0`,b):(!l.compositeRule||o.schema!==void 0)&&b()}u||(l.props=!0),o.ok((0,e._)`${i} === ${r.default.errors}`);function m(b){if(a===!1){o.setParams({unevaluatedProperty:b}),o.error(),f||s.break();return}if(!(0,t.alwaysValidSchema)(l,a)){const $=s.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:b,dataPropType:t.Type.Str},$),f||s.if((0,e.not)($),()=>s.break())}}function w(b,$){return(0,e._)`!${b} || !${b}[${$}]`}function S(b,$){const y=[];for(const d in b)b[d]===!0&&y.push((0,e._)`${$} !== ${d}`);return(0,e.and)(...y)}}};return Mo.default=n,Mo}var Vo={},Hu;function K0(){if(Hu)return Vo;Hu=1,Object.defineProperty(Vo,"__esModule",{value:!0});const e=Ee(),t=Ce(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:n}})=>(0,e.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,e._)`{limit: ${n}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n,i=c.items||0;if(i===!0)return;const l=o.const("len",(0,e._)`${a}.length`);if(s===!1)n.setParams({len:i}),n.fail((0,e._)`${l} > ${i}`);else if(typeof s=="object"&&!(0,t.alwaysValidSchema)(c,s)){const f=o.var("valid",(0,e._)`${l} <= ${i}`);o.if((0,e.not)(f),()=>u(f,i)),n.ok(f)}c.items=!0;function u(f,_){o.forRange("i",_,l,m=>{n.subschema({keyword:"unevaluatedItems",dataProp:m,dataPropType:t.Type.Num},f),c.allErrors||o.if((0,e.not)(f),()=>o.break())})}}};return Vo.default=r,Vo}var Xu;function Qu(){if(Xu)return Lo;Xu=1,Object.defineProperty(Lo,"__esModule",{value:!0});const e=G0(),t=K0(),r=[e.default,t.default];return Lo.default=r,Lo}var Fo={},zo={},Zu;function J0(){if(Zu)return zo;Zu=1,Object.defineProperty(zo,"__esModule",{value:!0});const e=Ee(),t={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,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:i,it:l}=r,{opts:u,errSchemaPath:f,schemaEnv:_,self:m}=l;if(!u.validateFormats)return;a?w():S();function w(){const b=o.scopeValue("formats",{ref:m.formats,code:u.code.formats}),$=o.const("fDef",(0,e._)`${b}[${i}]`),y=o.let("fType"),d=o.let("format");o.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>o.assign(y,(0,e._)`${$}.type || "string"`).assign(d,(0,e._)`${$}.validate`),()=>o.assign(y,(0,e._)`"string"`).assign(d,$)),r.fail$data((0,e.or)(P(),h()));function P(){return u.strictSchema===!1?e.nil:(0,e._)`${i} && !${d}`}function h(){const g=_.$async?(0,e._)`(${$}.async ? await ${d}(${s}) : ${d}(${s}))`:(0,e._)`${d}(${s})`,E=(0,e._)`(typeof ${d} == "function" ? ${g} : ${d}.test(${s}))`;return(0,e._)`${d} && ${d} !== true && ${y} === ${n} && !${E}`}}function S(){const b=m.formats[c];if(!b){P();return}if(b===!0)return;const[$,y,d]=h(b);$===n&&r.pass(g());function P(){if(u.strictSchema===!1){m.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function h(E){const O=E instanceof RegExp?(0,e.regexpCode)(E):u.code.formats?(0,e._)`${u.code.formats}${(0,e.getProperty)(c)}`:void 0,A=o.scopeValue("formats",{key:c,ref:E,code:O});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,e._)`${A}.validate`]:["string",E,A]}function g(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${d}(${s})`}return typeof y=="function"?(0,e._)`${d}(${s})`:(0,e._)`${d}.test(${s})`}}}};return zo.default=t,zo}var ep;function tp(){if(ep)return Fo;ep=1,Object.defineProperty(Fo,"__esModule",{value:!0});const e=[J0().default];return Fo.default=e,Fo}var Sr={},rp;function Y0(){return rp||(rp=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.contentVocabulary=Sr.metadataVocabulary=void 0,Sr.metadataVocabulary=["title","description","default","deprecated","examples"],Sr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Sr}var np;function W0(){if(np)return Xn;np=1,Object.defineProperty(Xn,"__esModule",{value:!0});const e=d0(),t=hu(),r=qu(),n=V0(),o=B0(),s=Qu(),a=tp(),c=Y0(),i=[n.default,e.default,t.default,(0,r.default)(!0),a.default,c.metadataVocabulary,c.contentVocabulary,o.default,s.default];return Xn.default=i,Xn}var Uo={},Xr={},op;function H0(){if(op)return Xr;op=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Xr.DiscrError=e={})),Xr}var sp;function ap(){if(sp)return Uo;sp=1,Object.defineProperty(Uo,"__esModule",{value:!0});const e=Ee(),t=H0(),r=Wn(),n=Wr(),o=Ce(),s={message:({params:{discrError:i,tagName:l}})=>i===t.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf or anyOf`,params:({params:{discrError:i,tag:l,tagName:u}})=>(0,e._)`{error: ${i}, tag: ${u}, tagValue: ${l}}`};function a(i,l){var u;if(!(!i.allOf||!Array.isArray(i.allOf))){for(const f of i.allOf)if(!((u=f?.properties)===null||u===void 0)&&u[l])return f.properties[l]}}const c={keyword:"discriminator",type:"object",schemaType:"object",error:s,code(i){const{gen:l,data:u,schema:f,parentSchema:_,it:m}=i,w=_.oneOf?"oneOf":_.anyOf?"anyOf":void 0;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const S=f.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(!w)throw new Error("discriminator: requires oneOf or anyOf composite keyword");const b=_[w],$=l.let("valid",!1),y=l.const("tag",(0,e._)`${u}${(0,e.getProperty)(S)}`);l.if((0,e._)`typeof ${y} == "string"`,()=>d(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:y,tagName:S})),i.ok($);function d(){const g=h();l.if(!1);for(const E in g)l.elseIf((0,e._)`${y} === ${E}`),l.assign($,P(g[E]));l.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:y,tagName:S}),l.endIf()}function P(g){const E=l.name("valid"),O=i.subschema({keyword:w,schemaProp:g},E);return i.mergeEvaluated(O,e.Name),E}function h(){var g;const E={},O=q(_);let A=!0;for(let L=0;L<b.length;L++){let K=b[L];const le=K?.$ref;if(le&&f.mapping){const{mapping:Se}=f,ce=Object.keys(Se).filter(_e=>Se[_e]===K.$ref);if(ce.length){for(const _e of ce)F(_e,L);continue}}if(le&&!(0,o.schemaHasRulesButRef)(K,m.self.RULES)&&(K=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,le),K instanceof r.SchemaEnv&&(K=K.schema),K===void 0))throw new n.default(m.opts.uriResolver,m.baseId,le);let pe=(g=K?.properties)===null||g===void 0?void 0:g[S];if(!pe&&K?.allOf&&(pe=a(K,S)),typeof pe!="object")throw new Error(`discriminator: ${w} subschemas (or referenced schemas) must have "properties/${S}" or match mapping`);A=A&&(O||q(K)),z(pe,L)}if(!A)throw new Error(`discriminator: "${S}" must be required`);return E;function q(L){if(Array.isArray(L.required)&&L.required.includes(S))return!0;if(L.allOf&&Array.isArray(L.allOf))for(const K of L.allOf){const le=K;if(Array.isArray(le.required)&&le.required.includes(S))return!0}return!1}function z(L,K){if(L.const)F(L.const,K);else if(L.enum)for(const le of L.enum)F(le,K);else throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function F(L,K){if(typeof L!="string"||L in E)throw new Error(`discriminator: "${S}" values must be unique strings`);E[L]=K}}}};return Uo.default=c,Uo}var Bo={};const X0="https://json-schema.org/draft/2020-12/schema",Q0="https://json-schema.org/draft/2020-12/schema",Z0={"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},eb="meta",tb="Core and Validation specifications meta-schema",rb=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],nb=["object","boolean"],ob="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",sb={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}},ab={$schema:X0,$id:Q0,$vocabulary:Z0,$dynamicAnchor:eb,title:tb,allOf:rb,type:nb,$comment:ob,properties:sb},ib="https://json-schema.org/draft/2020-12/schema",cb="https://json-schema.org/draft/2020-12/meta/applicator",lb={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},ub="meta",pb="Applicator vocabulary meta-schema",db=["object","boolean"],fb={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"}},mb={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},hb={$schema:ib,$id:cb,$vocabulary:lb,$dynamicAnchor:ub,title:pb,type:db,properties:fb,$defs:mb},yb="https://json-schema.org/draft/2020-12/schema",gb="https://json-schema.org/draft/2020-12/meta/unevaluated",vb={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},bb="meta",wb="Unevaluated applicator vocabulary meta-schema",$b=["object","boolean"],_b={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},Eb={$schema:yb,$id:gb,$vocabulary:vb,$dynamicAnchor:bb,title:wb,type:$b,properties:_b},Pb="https://json-schema.org/draft/2020-12/schema",Sb="https://json-schema.org/draft/2020-12/meta/content",Ib={"https://json-schema.org/draft/2020-12/vocab/content":!0},xb="meta",Tb="Content vocabulary meta-schema",Nb=["object","boolean"],kb={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},Ob={$schema:Pb,$id:Sb,$vocabulary:Ib,$dynamicAnchor:xb,title:Tb,type:Nb,properties:kb},jb="https://json-schema.org/draft/2020-12/schema",Ab="https://json-schema.org/draft/2020-12/meta/core",Cb={"https://json-schema.org/draft/2020-12/vocab/core":!0},Rb="meta",Db="Core vocabulary meta-schema",qb=["object","boolean"],Lb={$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"}}},Mb={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},Vb={$schema:jb,$id:Ab,$vocabulary:Cb,$dynamicAnchor:Rb,title:Db,type:qb,properties:Lb,$defs:Mb},Fb="https://json-schema.org/draft/2020-12/schema",zb="https://json-schema.org/draft/2020-12/meta/format-annotation",Ub={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Bb="meta",Gb="Format vocabulary meta-schema for annotation results",Kb=["object","boolean"],Jb={format:{type:"string"}},Yb={$schema:Fb,$id:zb,$vocabulary:Ub,$dynamicAnchor:Bb,title:Gb,type:Kb,properties:Jb},Wb="https://json-schema.org/draft/2020-12/schema",Hb="https://json-schema.org/draft/2020-12/meta/meta-data",Xb={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Qb="meta",Zb="Meta-data vocabulary meta-schema",ew=["object","boolean"],tw={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}},rw={$schema:Wb,$id:Hb,$vocabulary:Xb,$dynamicAnchor:Qb,title:Zb,type:ew,properties:tw},nw="https://json-schema.org/draft/2020-12/schema",ow="https://json-schema.org/draft/2020-12/meta/validation",sw={"https://json-schema.org/draft/2020-12/vocab/validation":!0},aw="meta",iw="Validation vocabulary meta-schema",cw=["object","boolean"],lw={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"}}},uw={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:[]}},pw={$schema:nw,$id:ow,$vocabulary:sw,$dynamicAnchor:aw,title:iw,type:cw,properties:lw,$defs:uw};var ip;function dw(){if(ip)return Bo;ip=1,Object.defineProperty(Bo,"__esModule",{value:!0});const e=ab,t=hb,r=Eb,n=Ob,o=Vb,s=Yb,a=rw,c=pw,i=["/properties"];function l(u){return[e,t,r,n,o,f(this,s),a,f(this,c)].forEach(_=>this.addMetaSchema(_,void 0,!1)),this;function f(_,m){return u?_.$dataMetaSchema(m,i):m}}return Bo.default=l,Bo}var cp;function fw(){return cp||(cp=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=t.Ajv2020=void 0;const r=Hl(),n=W0(),o=ap(),s=dw(),a="https://json-schema.org/draft/2020-12/schema";class c extends r.default{constructor(m={}){super({...m,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:m,meta:w}=this.opts;w&&(s.default.call(this,m),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=c,e.exports=t=c,e.exports.Ajv2020=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var i=Yr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var l=Ee();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Jn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=Wr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(Ca,Ca.exports)),Ca.exports}var mw=fw();const Va=Vr(mw),hw=new Va({strictSchema:!1,allowUnionTypes:!0,useDefaults:!0,allErrors:!0,discriminator:!0,strictTypes:!1,verbose:!0});function lp(e,t){if(t.some(r=>typeof r=="function"))throw new Error("Unexpected oneOf inside oneOf.");return r=>{let n=e.findIndex(o=>hw.validate(o,r));return n===-1&&(n=0),t[n]}}function Ir(e,t,r){if(!t||typeof t=="boolean")throw new Error(`Unexpected schema in ${e}.`);if(t instanceof Array)throw new Error(`Unexpected array schema in ${e}. Try using oneOf instead.`);if(t.type==="null")throw new Error(`Unexpected null schema type in ${e} schema.`);if(t.type instanceof Array)throw new Error(`Unexpected array schema type in ${e} schema. Try using oneOf instead.`);if(t.type==="string"||t.type==="number"||t.type==="integer"||t.type==="boolean"){const{default:n,format:o,...s}=t;return s}if(t.type==="object"&&!t.properties&&!t.oneOf){if(t.additionalProperties===void 0||t.additionalProperties===!0)return{type:"object"};if(t.additionalProperties===!1)return{type:"object",properties:{}}}if(t.allOf)throw new Error(`Unexpected allOf in ${e}.`);if(t.anyOf)throw new Error(`Unexpected anyOf in ${e}.`);if(xe(t.properties)||xe(t.additionalProperties)||xe(t.items)&&(xe(t.items.properties)||xe(t.items.additionalProperties)||t.items.oneOf))return yw(e,t,r);if(t.oneOf)if(t.discriminator){const n=t.discriminator?.propertyName;if(!n)throw new Error(`Unexpected discriminator without a propertyName in ${e}.`);const o={},s=t.oneOf.map((a,c)=>{if(typeof a=="boolean")throw new Error(`Unexpected boolean schema in ${e} at position ${c} in oneOf.`);const i=a?.properties?.[n];if(!i||typeof i=="boolean")throw new Error(`Unexpected property '${i}' schema in ${e} at position ${c} in oneOf.`);const l=i.const,u=Ir(l,a,r);return typeof u=="string"&&(o[l]=u),u});return(a,c)=>{if(xe(a)){const i=a[n];if(typeof i=="string"){const l=o[i];if(l&&r[l])return l}}return lp(t.oneOf,s)(a,c)}}else{const n=t.oneOf.map((o,s)=>Ir(e+"_"+s,o,r));return lp(t.oneOf,n)}return t}function yw(e,t,r){if(!t||typeof t=="boolean")throw new Error(`Unexpected schema in ${e}.`);if(t instanceof Array)throw new Error(`Unexpected array schema in ${e}. Try using oneOf instead.`);if(t.type==="null")throw new Error(`Unexpected null schema type in ${e} schema.`);if(t.type instanceof Array)throw new Error(`Unexpected array schema type in ${e} schema. Try using oneOf instead.`);const n=t.nodeTypeName??e,o={};for(const[i,l]of Object.entries(t.properties||{}))o[i]=Ir(n+"."+i,l,r);let s;xe(t.additionalProperties)&&(s=Ir(e+"_additionalProperties",t.additionalProperties,r)),t.additionalProperties===!0&&(s={});let a;xe(t.items)&&(xe(t.items.properties)||xe(t.items.additionalProperties)||t.items.oneOf)&&(a=Ir(e+"_items",t.items,r));let c=t.required;return t.oneOf&&t.oneOf.every(i=>!!i.required)&&(c=i=>{const l=t.oneOf.map(f=>[...t.required||[],...f.required]);let u=l.findIndex(f=>f.every(_=>i[_]!==void 0));return u===-1&&(u=0),l[u]}),r[n]={properties:o,additionalProperties:s,items:a,required:c,description:t.description,documentationLink:t.documentationLink},n}function up(e,t){const r={},n=Ir(e,t,r);return{ctx:r,discriminatorResolver:typeof n=="function"?n:void 0}}const gw=["info-contact","operation-operationId","tag-description","tags-alphabetical","info-license-strict","info-license","no-ambiguous-paths","no-duplicated-enum-values","no-enum-type-mismatch","no-unsafe-markdown","no-http-verbs-in-paths","no-identical-paths","no-invalid-parameter-examples","no-invalid-schema-examples","no-path-trailing-slash","operation-2xx-response","operation-4xx-response","operation-description","operation-operationId-unique","operation-operationId-url-safe","operation-parameters-unique","operation-singular-tag","operation-summary","operation-tag-defined","parameter-description","path-declaration-must-exist","path-http-verbs-order","path-not-include-query","path-params-defined","path-parameters-defined","path-segment-plural","paths-kebab-case","required-string-property-missing-min-length","response-contains-header","scalar-property-missing-example","security-defined","security-scopes-defined","spec-strict-refs","no-required-schema-properties-undefined","no-schema-type-mismatch","boolean-parameter-prefixes","request-mime-type","response-contains-property","response-mime-type","no-duplicated-tag-names"],vw=["info-contact","operation-operationId","tag-description","tags-alphabetical","info-license-strict","info-license","no-ambiguous-paths","no-duplicated-enum-values","no-enum-type-mismatch","no-unsafe-markdown","no-http-verbs-in-paths","no-identical-paths","no-invalid-parameter-examples","no-invalid-schema-examples","no-path-trailing-slash","operation-2xx-response","operation-4xx-response","operation-description","operation-operationId-unique","operation-operationId-url-safe","operation-parameters-unique","operation-singular-tag","operation-summary","operation-tag-defined","parameter-description","path-declaration-must-exist","path-http-verbs-order","path-not-include-query","path-params-defined","path-parameters-defined","path-segment-plural","paths-kebab-case","required-string-property-missing-min-length","response-contains-header","scalar-property-missing-example","security-defined","security-scopes-defined","spec-strict-refs","no-required-schema-properties-undefined","no-schema-type-mismatch","boolean-parameter-prefixes","component-name-unique","no-empty-servers","no-example-value-and-externalValue","no-invalid-media-type-examples","no-server-example.com","no-server-trailing-slash","no-server-variables-empty-enum","no-undefined-server-variable","no-unused-components","no-mixed-number-range-constraints","operation-4xx-problem-details-rfc7807","request-mime-type","response-contains-property","response-mime-type","spec-components-invalid-map-name","array-parameter-serialization","no-duplicated-tag-names","nullable-type-sibling","spec-no-invalid-tag-parents","spec-no-invalid-encoding-combinations","spec-discriminator-defaultMapping","spec-example-values","spec-querystring-parameters"],bw=["info-contact","info-license-strict","operation-operationId","security-defined","tag-description","tags-alphabetical","channels-kebab-case","no-channel-trailing-slash","no-duplicated-tag-names","no-required-schema-properties-undefined","no-duplicated-enum-values","no-enum-type-mismatch","no-unsafe-markdown","no-mixed-number-range-constraints","no-schema-type-mismatch","security-scopes-defined"],ww=["info-contact","info-license-strict","operation-operationId","security-defined","tag-description","tags-alphabetical","channels-kebab-case","no-channel-trailing-slash","no-duplicated-tag-names","no-required-schema-properties-undefined","no-duplicated-enum-values","no-enum-type-mismatch","no-unsafe-markdown","no-mixed-number-range-constraints","no-schema-type-mismatch","security-scopes-defined"],$w=["sourceDescription-type","workflowId-unique","stepId-unique","sourceDescription-name-unique","sourceDescriptions-not-empty","spec-step-mutually-exclusive-fields","workflow-dependsOn","outputs-defined","parameters-unique","step-onSuccess-unique","step-onFailure-unique","requestBody-replacements-unique","no-criteria-xpath","criteria-unique","no-x-security-scheme-name-without-openapi","x-security-scheme-required-values","no-x-security-both-scheme-and-scheme-name","no-required-schema-properties-undefined","no-duplicated-enum-values","no-enum-type-mismatch","no-unsafe-markdown","no-mixed-number-range-constraints","no-schema-type-mismatch","x-security-scheme-name-reference"],_w=["info-contact"],Ew=["info-contact","info-license","no-unused-components","spec-no-duplicated-method-params","spec-no-required-params-after-optional"],Pw=["no-unused-types","type-description"],Sw=["struct","no-unresolved-refs"],Iw=[...gw,...vw,...bw,...ww,...$w,..._w,...Ew,...Pw,...Sw],xw=["operation-description-override","tag-description-override","info-description-override","info-override","remove-x-internal","filter-in","filter-out","remove-unused-components"],Tw=["operation-description-override","tag-description-override","info-description-override","info-override","remove-x-internal","filter-in","filter-out","media-type-examples-override","remove-unused-components"],pp=[...Tw,...xw],dp={extends:{name:"Extends",properties:{},items:e=>typeof e=="string"&&!at(e)&&!cc.extname(e)?{type:"string"}:{...Qr,directResolveAs:{name:"ConfigGovernance",...Qr}},description:"Use extends to inherit rules and their configurations from other rulesets.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/extends#extends"},plugins:{type:"array",items:{type:"string"}},rules:"Rules",oas2Rules:"Rules",oas3_0Rules:"Rules",oas3_1Rules:"Rules",oas3_2Rules:"Rules",async2Rules:"Rules",async3Rules:"Rules",arazzo1Rules:"Rules",arazzo1_1Rules:"Rules",overlay1Rules:"Rules",openrpc1Rules:"Rules",graphqlRules:"Rules",preprocessors:"Preprocessors",oas2Preprocessors:"Preprocessors",oas3_0Preprocessors:"Preprocessors",oas3_1Preprocessors:"Preprocessors",oas3_2Preprocessors:"Preprocessors",async2Preprocessors:"Preprocessors",async3Preprocessors:"Preprocessors",arazzo1Preprocessors:"Preprocessors",arazzo1_1Preprocessors:"Preprocessors",overlay1Preprocessors:"Preprocessors",openrpc1Preprocessors:"Preprocessors",decorators:"Decorators",oas2Decorators:"Decorators",oas3_0Decorators:"Decorators",oas3_1Decorators:"Decorators",oas3_2Decorators:"Decorators",async2Decorators:"Decorators",async3Decorators:"Decorators",arazzo1Decorators:"Decorators",arazzo1_1Decorators:"Decorators",overlay1Decorators:"Decorators",openrpc1Decorators:"Decorators"},Qr={properties:dp},Nw=e=>({...e.rootRedoclyConfigSchema,properties:{...e.rootRedoclyConfigSchema.properties,...Qr.properties,apis:"ConfigApis",client:"Client",telemetry:{enum:["on","off"]},resolve:{properties:{http:"ConfigHTTP",doNotResolveExamples:{type:"boolean"}}}}}),kw={properties:{},additionalProperties:"ConfigApisProperties",description:"The `apis` configuration section is used when a project contains multiple API descriptions to set up different rules and settings for individual APIs. It allows defining specific configurations for each API, which must be identified by a unique name.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/apis"},Ow=e=>({...e["rootRedoclyConfigSchema.apis_additionalProperties"],properties:{...e["rootRedoclyConfigSchema.apis_additionalProperties"]?.properties,...Wh(Qr.properties,["plugins"]),client:"Client",clientOutput:{type:"string"}}}),jw={properties:{headers:{type:"array",items:{type:"string"}}}},Aw={properties:{generators:{type:"array",items:{type:"string"}},argsStyle:{enum:["flat","grouped"]},serverUrl:{type:"string"},outputMode:{enum:["single","split"]},runtime:{enum:["inline","package"]},importExt:{enum:["js","ts"]},errorMode:{enum:["throw","result"]},dateType:{enum:["string","Date"]},mockData:{enum:["static","faker"]},mockSeed:{type:"number"},queryKeyPrefix:{type:"string"},setup:{type:"string"},pagination:"ClientPagination"}},fp={properties:{style:{enum:["cursor","offset","page","link"]},cursorParam:{type:"string"},nextCursor:{type:"string"},hasMore:{type:"string"},offsetParam:{type:"string"},limitParam:{type:"string"},items:{type:"string"}}},Cw={properties:{...fp.properties,exclude:{type:"array",items:{type:"string"}},operations:ic("ClientPaginationRule")}},Rw={properties:{},description:"The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/rules#rules",additionalProperties:(e,t)=>{if(t.startsWith("rule/"))return typeof e=="string"?{enum:["error","warn","off"]}:"ConfigurableRule";if(Iw.includes(t))return typeof e=="string"?{enum:["error","warn","off"]}:"BuiltinRule";if(Aa(t))return typeof e=="string"?{enum:["error","warn","off"]}:"CustomRule";if(t==="metadata-schema"||t==="custom-fields-schema")return"Schema"}},Dw={properties:{severity:{enum:["error","warn","off"]}},additionalProperties:{},required:["severity"],description:"Built-in rules are the default linting rules included with Redocly CLI. They enforce widely accepted API design standards and best practices. Each built-in rule has a default severity of error, but you can change the severity or turn off any built-in rule in your configuration file.",documentationLink:"https://redocly.com/docs/cli/rules/built-in-rules"},qw={properties:{severity:{enum:["error","warn","off"]}},additionalProperties:{},required:["severity"],description:"Custom rules are defined by users via plugins.",documentationLink:"https://redocly.com/docs/cli/custom-plugins/custom-rules"},Lw={properties:{},description:"Decorators define transformations that can be applied to the API document during the bundle step.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/decorators",additionalProperties:(e,t)=>{if(pp.includes(t))return typeof e=="string"?{type:"string"}:"BuiltinDecorator";if(Aa(t))return typeof e=="string"?{type:"string"}:"CustomDecorator"}},Mw={properties:{},additionalProperties:{},description:"Built-in decorators are the default decorators included with Redocly CLI.",documentationLink:"https://redocly.com/docs/cli/decorators#list-of-decorators"},Vw={properties:{},additionalProperties:{},description:"Custom decorators are defined by users via plugins.",documentationLink:"https://redocly.com/docs/cli/custom-plugins/custom-decorators"},Fw={properties:{},description:"Preprocessors define transformations that can be applied to the API document before bundling.",documentationLink:"https://redocly.com/docs/cli/configuration/reference/preprocessors",additionalProperties:(e,t)=>{if(pp.includes(t))return typeof e=="string"?{type:"string"}:"BuiltinPreprocessor";if(Aa(t))return typeof e=="string"?{type:"string"}:"CustomPreprocessor"}},zw={properties:{},additionalProperties:{},description:"Built-in preprocessors are the default preprocessors included with Redocly CLI. The available options are the same for decorators and preprocessors.",documentationLink:"https://redocly.com/docs/cli/decorators#list-of-decorators"},Uw={properties:{},additionalProperties:{},description:"Custom preprocessors are defined by users via plugins. The available options are the same for decorators and preprocessors.",documentationLink:"https://redocly.com/docs/cli/custom-plugins/custom-decorators"},Bw={properties:{properties:ic("Schema")},additionalProperties:{}};function Gw(e){return{properties:{type:{enum:[...new Set(["any",...e,"SpecExtension"])],description:"REQUIRED. Locates the API node type that the lint command evaluates.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#subject-object"},property:t=>Array.isArray(t)?{type:"array",items:{type:"string"},description:"Property name corresponding to the API node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#property-example"}:t===null?null:{type:"string",description:"Property name corresponding to the API node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#property-example"},filterInParentKeys:{type:"array",items:{type:"string"},description:"The name of the subject's parent key that locates where assertions run. An example value given the subject Operation could be filterInParentKeys: [get, put] means that only GET and PUT operations are evaluated for the assertions.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#mutuallyrequired-example"},filterOutParentKeys:{type:"array",items:{type:"string"},description:"The name of the subject's parent key that excludes where assertions run. An example value given the subject Operation could be filterOutParentKeys: [delete] means that all operations except DELETE operations are evaluated for the assertions."},matchParentKeys:{type:"string",description:"Applies a regex pattern to the subject's parent keys to determine where assertions run. An example value given the subject Operation could be matchParentKeys: /^p/ means that POST, PUT, and PATCH operations are evaluated for the assertions."}},required:["type"],description:"REQUIRED. Narrows the subject further by specifying its type, and optionally property, filterParentKeys, etc.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#subject-object"}}function Kw(e){return{...e[it.ScorecardClassicLevel],properties:{...e[it.ScorecardClassicLevel]?.properties,...dp}}}const Jw={properties:{enum:{type:"array",items:{type:"string"},description:"Asserts a value is within a predefined list of values. Providing a single value in a list is an equality check.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#enum-example"},pattern:{type:"string",description:"Asserts a value matches a regex pattern.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#pattern-example"},notPattern:{type:"string",description:"Asserts a value doesn't match a regex pattern.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#notpattern-example"},casing:{enum:["camelCase","kebab-case","snake_case","PascalCase","MACRO_CASE","COBOL-CASE","flatcase"],description:"Asserts a casing style. Supported styles are: camelCase, kebab-case, snake_case, PascalCase, MACRO_CASE, COBOL-CASE, flatcase.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#casing-example"},mutuallyExclusive:{type:"array",items:{type:"string"},description:"Asserts that listed properties (key names only) are mutually exclusive.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#mutuallyexclusive-example"},mutuallyRequired:{type:"array",items:{type:"string"},description:"Asserts that listed properties (key names only) are mutually required.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#mutuallyrequired-example"},required:{type:"array",items:{type:"string"},description:"Asserts all listed values are defined.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#required-example"},requireAny:{type:"array",items:{type:"string"},description:"Asserts that at least one of the listed properties (key names only) is defined. ",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#requireany-example"},contains:{type:"array",items:{type:"string"},description:"Asserts that all listed strings are included in the value array.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#contains-example"},disallowed:{type:"array",items:{type:"string"},description:"Asserts all listed values are not defined.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#disallowed-example"},defined:{type:"boolean",description:"Asserts a property is defined.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#defined-example"},nonEmpty:{type:"boolean",description:"Asserts a property is not empty.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#nonempty-example"},minLength:{type:"integer",description:"Asserts a minimum length (inclusive) of a string or list (array).",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#minlength-example"},maxLength:{type:"integer",description:"Asserts a maximum length (inclusive) of a string or list (array).",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#maxlength-example"},ref:e=>typeof e=="string"?{type:"string",description:"Asserts a reference object presence in object's property. A boolean value of true means the property has a $ref defined. A boolean value of false means the property has not defined a $ref (it has an in-place value). A string value means that the $ref is defined and the unresolved value must match the pattern (for example, '/paths/.*.yaml$/').",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#ref-example"}:{type:"boolean",description:"Asserts a reference object presence in object's property. A boolean value of true means the property has a $ref defined. A boolean value of false means the property has not defined a $ref (it has an in-place value). A string value means that the $ref is defined and the unresolved value must match the pattern (for example, '/paths/.*.yaml$/').",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#ref-example"},const:e=>{if(typeof e=="string")return{type:"string",description:"Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#const-example"};if(typeof e=="number")return{type:"number",description:"Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#const-example"};if(typeof e=="boolean")return{type:"boolean",description:"Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#const-example"}}},additionalProperties:(e,t)=>{if(/^\w+\/\w+$/.test(t))return{}},description:"A minimum of one assertion property is required to be defined.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#assertion-object"},Yw={properties:{subject:"Subject",assertions:"Assertions"},required:["subject","assertions"],description:"The where object is part of a where list which must be defined in order from the root node. Each node can only be used in one where object for each assertion. Each subsequent node must be a descendant of the previous one. Rules that use multiple where objects must target each one on a different node. However, the same node could be used in the last where object and in the root subject object. Nodes may be skipped in between the subject node types of the where list and those defined in the root subject type.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#where-object"},Ww={properties:{subject:"Subject",assertions:"Assertions",where:Yh("Where"),message:{type:"string"},suggest:{type:"array",items:{type:"string"}},reference:{type:"string"},severity:{enum:["error","warn","off"]}},required:["subject","assertions"],description:"Configurable rule definitions enforce your custom API design standards. Add or edit your configurable rules in the configuration file. A configurable rule is a rule that starts with a rule/ prefix followed by a unique rule name. Rule names display in the lint log if the assertions fail. More than one configurable rule may be defined, and any configurable rule may have multiple assertions.",documentationLink:"https://redocly.com/docs/cli/rules/configurable-rules#configurable-rule-object"};function Fa(e,t){const r=Jh.flatMap(o=>{const s=En(o),a=t?t.extendTypes(s,o):s;return Object.keys(a)}),{ctx:n}=up("rootRedoclyConfigSchema",e);return{...Hw,ConfigRoot:Nw(n),ConfigApisProperties:Ow(n),Subject:Gw([...r,...Xv]),...n,[it.ScorecardClassicLevel]:Kw(n)}}const Hw={ConfigurableRule:Ww,ConfigApis:kw,ConfigGovernance:Qr,ConfigHTTP:jw,Client:Aw,ClientPagination:Cw,ClientPaginationRule:fp,Where:Yw,BuiltinRule:Dw,CustomRule:qw,BuiltinDecorator:Mw,CustomDecorator:Vw,BuiltinPreprocessor:zw,CustomPreprocessor:Uw,Schema:Bw,Rules:Rw,Decorators:Lw,Preprocessors:Fw,Assertions:Jw},{theme:BI,...Xw}=Vn.properties,Qw={...Vn,properties:Xw},mp=Fa(Qw),Go=$a(mp),Zw={},e$={},t$={};function hp(e){return Array.isArray(e)&&e.length===0}function yp(e,t,r){const{parent:n,key:o}=t;let s=!1;if(Array.isArray(e))for(let a=0;a<e.length;a++){if(Ke(e[a])){const c=t.resolve(e[a]);r(c.node)&&(e.splice(a,1),s=!0,a--)}r(e[a])&&(e.splice(a,1),s=!0,a--)}else if(xe(e))for(const a of Object.keys(e)){if(Ke(e[a])){const c=t.resolve(e[a]);r(c.node)&&(delete e[a],s=!0)}r(e[a])&&(delete e[a],s=!0)}s&&(lc(e)||hp(e))&&delete n[o]}function xr(e,t,r){return e===void 0||t===void 0?!1:!Array.isArray(t)&&!Array.isArray(e)?e===t:(t=gp(t),e=gp(e),r==="any"?t.some(n=>e.includes(n)):r==="all"?t.every(n=>e.includes(n)):!1)}function gp(e){return Array.isArray(e)?e:[e]}const r$="any",vp=({property:e,value:t,matchStrategy:r,applyTo:n})=>{const o=r||r$;if(n!==void 0){if(n==="Operation"){const a=["get","post","put","delete","patch","options","head","trace","query"];return{PathItem:{enter(c,i){for(const l of a){const u=Ke(c[l])?i.resolve(c[l]).node:c[l];if(xe(u)){const f=u[e];xr(f,t,o)||delete c[l]}}a.some(l=>c[l])||c.additionalOperations||delete i.parent[i.key]}}}}if(n==="PathItem")return{PathItem:{enter(a,c){const i=a[e];xr(i,t,o)||delete c.parent[c.key]}}};throw new Error("The 'target' option must be 'Operation' or 'PathItem' when provided.")}const s=a=>a?.[e]&&!xr(a?.[e],t,o);return{any:{enter:(a,c)=>{yp(a,c,s)}}}},n$="any",bp=({property:e,value:t,matchStrategy:r,applyTo:n})=>{const o=r||n$;if(n!==void 0){if(n==="Operation"){const a=["get","post","put","delete","patch","options","head","trace","query"];return{PathItem:{enter(c,i){for(const l of a){const u=Ke(c[l])?i.resolve(c[l]).node:c[l];if(xe(u)){const f=u[e];xr(f,t,o)&&delete c[l]}}a.some(l=>c[l])||c.additionalOperations||delete i.parent[i.key]}}}}if(n==="PathItem")return{PathItem:{enter(a,c){const i=a[e];xr(i,t,o)&&delete c.parent[c.key]}}};throw new Error("The 'target' option must be 'Operation' or 'PathItem' when provided.")}const s=a=>xr(a?.[e],t,o);return{any:{enter:(a,c)=>{yp(a,c,s)}}}};function wp(e){const t=(void 0)(e,"utf-8");return Hh(t)}function Zr(e,t){return at(e)||t===void 0?e:We.resolve(We.dirname(t),e)}function za(e){return(void 0)(e,"utf-8")}const $p=({filePath:e})=>({Info:{leave(t,{report:r,location:n,config:o}){if(!e)throw new Error('Parameter "filePath" is not provided for "info-description-override" rule');try{t.description=za(Zr(e,o?.configPath))}catch(s){r({message:`Failed to read markdown override file for "info.description".
|
|
9
|
+
${s.message}`,location:n.child("description")})}}}}),_p=e=>({Info:{leave(t){if(!xe(e))throw new Error('"info-override" decorator should be called with an object');const{severity:r,...n}=e;Object.assign(t,n)}}}),Ep=({operationIds:e})=>({Operation:{leave(t,{report:r,location:n,config:o}){if(!t.operationId)return;if(!e)throw new Error('Parameter "operationIds" is not provided for "operation-description-override" rule');const s=t.operationId;if(e[s])try{const a=e[s];t.description=za(Zr(a,o?.configPath))}catch(a){r({message:`Failed to read markdown override file for operation "${s}".
|
|
10
|
+
${a.message}`,location:n.child("operationId").key()})}}}}),o$="x-internal",Pp=({internalFlagProperty:e=o$})=>{function t(n,o,s){const{parent:a,key:c}=o;let i=!1;if(Array.isArray(n))for(let l=0;l<n.length;l++){if(Ke(n[l])&&o.resolve(n[l]).node?.[e]){if(xe(a.discriminator?.mapping))for(const u in a.discriminator.mapping)s?.[u]===n[l].$ref&&delete a.discriminator.mapping[u];n.splice(l,1),i=!0,l--}n[l]?.[e]&&(n.splice(l,1),i=!0,l--)}else if(xe(n))for(const l of Object.keys(n)){if(Ke(n[l])){const u=o.resolve(n[l]);xe(u.node)&&u.node?.[e]&&(delete n[l],i=!0)}xe(n[l])&&n[l]?.[e]&&(delete n[l],i=!0)}i&&(lc(n)||hp(n))&&delete a[c]}let r={};return{DiscriminatorMapping:{enter:n=>{r=JSON.parse(JSON.stringify(n))}},any:{enter:(n,o)=>{t(n,o,r)}}}},Sp=({tagNames:e})=>({Tag:{leave(t,{report:r,config:n}){if(!e)throw new Error('Parameter "tagNames" is not provided for "tag-description-override" rule');const o=e[t.name];if(o)try{t.description=za(Zr(o,n?.configPath))}catch(s){r({message:`Failed to read markdown override file for tag "${t.name}".
|
|
11
|
+
${s.message}`})}}}}),s$={"operation-description-override":Ep,"tag-description-override":Sp,"info-description-override":$p,"info-override":_p,"remove-x-internal":Pp,"filter-in":vp,"filter-out":bp,"remove-unused-components":Xh},a$=({operationIds:e})=>({Operation:{enter(t,r){const n=t.operationId;if(!n)return;const o=e[n];if(o){if(o.responses&&t.responses)for(const s of Object.keys(o.responses)){const a=Ip(t.responses[s],r.resolve);a&&(a.content=a.content?a.content:{},Object.keys(o.responses[s]).forEach(c=>{const i=o.responses[s][c];a.content[c]={...a.content[c],examples:wp(Zr(i,r.config?.configPath))}}),t.responses[s]=a)}if(o.request&&t.requestBody){const s=Ip(t.requestBody,r.resolve);if(!s)return;s.content=s.content?s.content:{},Object.keys(o.request).forEach(a=>{const c=o.request[a];s.content[a]={...s.content[a],examples:wp(Zr(c,r.config?.configPath))}}),t.requestBody=s}}}}});function Ip(e,t){if(!Ke(e))return e;const r=t(e);return r.error?void 0:JSON.parse(JSON.stringify(r.node))}const i$={"operation-description-override":Ep,"tag-description-override":Sp,"info-description-override":$p,"info-override":_p,"remove-x-internal":Pp,"filter-in":vp,"filter-out":bp,"media-type-examples-override":a$,"remove-unused-components":Qh},c$={},l$={},u$=()=>({SourceDescriptions:{enter(e,{report:t,location:r,specVersion:n}){if(!e.length)return;const o=n==="arazzo1"?["openapi","arazzo"]:["openapi","arazzo","asyncapi"];for(const s of e)o.includes(s?.type)||t({message:`The \`type\` property of the \`sourceDescription\` object must be either ${o.map(a=>`\`${a}\``).join(" or ")}.`,location:r.child([e.indexOf(s)]),reference:"https://redocly.com/docs/cli/rules/arazzo/sourcedescription-type"})}}});function p$(e){return e}const Ua=void 0,Re=new Proxy(Zh,{get(e,t){return p$}});class d${info(t){return console.info(t)}warn(t){return console.warn(t)}error(t){return console.error(t)}output(t){return console.log(t)}printNewLine(){console.log(`
|
|
12
|
+
`)}printSeparator(t){const r=null.columns||80,n=t.repeat(Math.ceil(r/t.length)).slice(0,r);return console.log(n)}indent(t,r){return t.split(`
|
|
13
|
+
`).map(n=>" ".repeat(r)+n).join(`
|
|
14
|
+
`)}}const Oe=new d$,Ba={problems:"{{problems}}",assertionName:"{{assertionName}}",nodeType:"{{nodeType}}",key:"{{key}}",property:"{{property}}",file:"{{file}}",pointer:"{{pointer}}"};function xp(e){const{filterInParentKeys:t,filterOutParentKeys:r,matchParentKeys:n}=e,o=n&&ey(n),s=o&&(i=>o.test(i.toString())),a=Array.isArray(t)&&(i=>t.includes(i.toString())),c=Array.isArray(r)&&(i=>!r.includes(i.toString()));return[s,a,c].filter(Pn)}function Tp(e){const t=Pa(vr).filter(o=>e.assertions[o]!==void 0).map(o=>({name:o,conditions:e.assertions[o],runsOnKeys:pc.has(o),runsOnValues:uc.has(o)})),r=t.find(o=>o.runsOnKeys&&!o.runsOnValues),n=t.find(o=>o.runsOnValues&&!o.runsOnKeys);if(n&&!e.subject.property)throw new Error(`The '${n.name}' assertion can't be used on all keys. Please provide a single property.`);if(r&&e.subject.property)throw new Error(`The '${r.name}' assertion can't be used on properties. Please remove the 'property' key.`);return t}function Np({subject:e}){return(Array.isArray(e.property)?e.property:[e?.property]).filter(Boolean)}function kp(e,t,r){const n=Np(e),o=[];for(const s of t)if(n.length)for(const a of n)o.push(Cp({assert:s,ctx:r,assertionProperty:a}));else o.push(Cp({assert:s,ctx:r}));return o.flat()}function f$(e,t){const r=xp(e.subject),n=r.length?(i,l)=>!r.every(u=>u(l)):void 0,o={[e.subject.type]:{enter:t,...n&&{skip:n}}};if(!Array.isArray(e.where))return o;let s={};const a=s,c=e.where;for(let i=0;i<c.length;i++){const l=c[i];if(!Vt(l.subject?.type))throw new Error(`${e.assertionId} -> where -> [${i}]: 'type' (String) is required`);const u=xp(l.subject),f=Tp(l),_=(w,S,b)=>!u.every($=>$(S))||!!kp(l,f,{...b,node:w}).length,m={...(u.length||f.length)&&{skip:_}};l.subject.type===e.subject.type&&i===c.length-1?o[e.subject.type]={enter:t,...m.skip&&{skip:m.skip}||n&&{skip:(w,S,b)=>!!(m.skip?.(w,S,b)||n?.(w,S))}}:s=s[l.subject?.type]=m}return s[e.subject.type]=o[e.subject.type],a}function m$(e,t){return(r,n)=>{const o=Np(t),s=`${Re.blue(e)} failed because the ${Re.blue(t.subject.type)} ${Re.blue(o.join(", "))} didn't meet the assertions: ${Ba.problems}`.replace(/ +/g," "),a=kp(t,Tp(t),{...n,node:r});if(a.length)for(const c of h$(a)){const i=t.message||s,l={problems:Op(c),assertionName:e,nodeType:t.subject.type,property:o.join(", "),key:String(n.key),pointer:n.location.pointer,file:jp(n.location.source.absoluteRef)};n.report({message:Ap(i,l),location:y$(c)||n.location,forceSeverity:t.severity||"error",suggest:t.suggest||[],...t.reference&&{reference:t.reference},ruleId:e})}}}function h$(e){const t={};for(const r of e){if(!r.location)continue;const n=r.location.pointer;t[n]=t[n]||[],t[n].push(r)}return Object.values(t)}function y$(e){return e.length?e[0].location:void 0}function Op(e){return e.length===1?e[0].message??"":e.map(t=>`
|
|
15
|
+
- ${t.message??""}`).join("")}function jp(e){return at(e)?e.split("/").at(-1)||e:e.split(/[/\\]/).at(-1)||e}function Ap(e,t){let r=e;for(const n of Object.keys(Ba)){const o=Ba[n],s=t[n];o&&(r=r.split(o).join(s))}return r}function Cp({assert:e,ctx:t,assertionProperty:r}){const n=e.name==="ref"?t.rawLocation:t.location;if(r){const o=Ke(t.node[r])?t.resolve(t.node[r])?.node:t.node[r],s=t.rawNode[r],a=n.child(r);return vr[e.name](o,e.conditions,{...t,baseLocation:a,rawValue:s})}else{const o=Array.isArray(t.node)?t.node:Object.keys(t.node);return vr[e.name](o,e.conditions,{...t,rawValue:t.rawNode,baseLocation:n})}}const rr=e=>{const t=[],r=Object.values(e).filter(n=>xe(n));for(const[n,o]of r.entries()){if(!Vt(o.subject.type))throw new Error(`${o.assertionId}: 'type' (String) is required`);const s=m$(o.assertionId,o),a=f$(o,s);t.push(a)}return t},en=()=>({Schema(e,{report:t,location:r}){if(!Array.isArray(e.enum))return;const n=new Set;for(const[o,s]of e.enum.entries())n.has(s)&&t({message:`Duplicated enum value found: '${s}'.`,location:r.child(["enum",o]),reference:"https://redocly.com/docs/cli/rules/common/no-duplicated-enum-values"}),n.add(s)}});var Rp,Dp;function g$(){return Dp||(Dp=1,Rp=(function(){function e(t,r,n,o,s){return t<r||n<r?t>n?n+1:t+1:o===s?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,s=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(s-1);)o--,s--;for(var a=0;a<o&&t.charCodeAt(a)===r.charCodeAt(a);)a++;if(o-=a,s-=a,o===0||s<3)return s;var c=0,i,l,u,f,_,m,w,S,b,$,y,d,P=[];for(i=0;i<o;i++)P.push(i+1),P.push(t.charCodeAt(a+i));for(var h=P.length-1;c<s-3;)for(b=r.charCodeAt(a+(l=c)),$=r.charCodeAt(a+(u=c+1)),y=r.charCodeAt(a+(f=c+2)),d=r.charCodeAt(a+(_=c+3)),m=c+=4,i=0;i<h;i+=2)w=P[i],S=P[i+1],l=e(w,l,u,b,S),u=e(l,u,f,$,S),f=e(u,f,_,y,S),m=e(f,_,m,d,S),P[i]=m,_=f,f=u,u=l,l=w;for(;c<s;)for(b=r.charCodeAt(a+(l=c)),m=++c,i=0;i<h;i+=2)w=P[i],P[i]=m=e(w,l,m,b,P[i+1]),l=w;return m}})()),Rp}var v$=g$();const b$=Vr(v$),Ko=(e,t,r)=>{if(Ke(e)){const n=t.resolve(e,r?.source.absoluteRef);return n?{schema:n.node,location:n.location,chain:n.chain}:{schema:void 0,location:r}}return{schema:e,location:r}},Ga=(e,t,r,n,o)=>!!(e.properties&&Fr(e.properties,t)!==void 0||e.allOf?.some(s=>pr(s,t,r,n,o))||Ur(e.anyOf)&&e.anyOf.every(s=>pr(s,t,r,new Set(n),o))||Ur(e.oneOf)&&e.oneOf.every(s=>pr(s,t,r,new Set(n),o))),pr=(e,t,r,n=new Set,o)=>{if(Ke(e)&&Ga(e,t,r,n,o))return!0;const{schema:s,location:a,chain:c}=Ko(e,r,o);if(!s)return!1;if(!n.has(s)&&(n.add(s),Ga(s,t,r,n,a)))return!0;for(const i of c??[])if(!(!xe(i.node)||n.has(i.node))&&(n.add(i.node),Ga(i.node,t,r,n,i.location)))return!0;return!1};function Jo(e){return Array.isArray(e)?"array":e===null?"null":Number.isInteger(e)?"integer":typeof e}function Yo(e){const t=e?.security;return Array.isArray(t)&&t.length>0}function qp(e,t,r){if(Yo(e))return!0;if(!Array.isArray(e?.traits))return!1;for(const n of e.traits){const o=Ke(n)?t(n,r).node:n;if(Yo(o))return!0}return!1}function Wo(e,t,r){if(r&&e===null)return!0;switch(t){case"array":return Array.isArray(e);case"object":return xe(e);case"null":return e===null;case"integer":return Number.isInteger(e);default:return typeof e===t}}function Ho(e,t){return`${e} object should contain \`${t}\` field.`}function w$(e,t){return`${e} object should contain one of the fields: ${t.map(r=>`\`${r}\``).join(", ")}.`}function Lp(e,t){return`${e} object \`${t}\` must be non-empty string.`}function Tr({fieldName:e,value:t,ctx:r,reference:n}){xe(t)&&(t[e]===void 0?r.report({message:Ho(r.type.name,e),location:r.location.child([e]).key(),reference:n}):t[e]||r.report({message:Lp(r.type.name,e),location:r.location.child([e]).key(),reference:n}))}function $$({fieldNames:e,value:t,ctx:r,reference:n}){if(xe(t)){e.some(o=>t.hasOwnProperty(o))||r.report({message:w$(r.type.name,e),location:r.location.key(),reference:n});for(const o of e)t.hasOwnProperty(o)&&!t[o]&&r.report({message:Lp(r.type.name,o),location:r.location.child([o]).key(),reference:n})}}function Xo(e,t){if(e===null)return t;if(typeof e!="string"||!t.length)return[];const r=[];for(let n=0;n<t.length;n++){const o=b$(e,t[n]);o<4&&r.push({distance:o,variant:t[n]})}return r.sort((n,o)=>n.distance-o.distance),r.map(n=>n.variant)}function Mp(e){if(xe(e)){if(Qt(e.dataValue))return{value:e.dataValue,field:"dataValue"};if(Qt(e.value))return{value:e.value,field:"value"}}}function tn({example:e,schema:t,options:r,reference:n}){const{location:o,ctx:s,validator:a,allowAdditionalProperties:c,ajvContext:i}=r,{resolve:l,location:u,report:f,specVersion:_}=s;try{const{valid:m,errors:w}=a.validate(e,t,{schemaLoc:u.child("schema"),instancePath:o.pointer,resolve:l,allowAdditionalProperties:c,ajvContext:i,specVersion:_});if(!m)for(const S of w)f({message:`Example value must conform to the schema: ${S.message}.`,location:{...new _a(o.source,S.instancePath),reportOnKey:S.keyword==="unevaluatedProperties"||S.keyword==="additionalProperties"},from:u,suggest:S.suggest,reference:n})}catch(m){if(m.message==="discriminator: requires oneOf or anyOf composite keyword")return;f({message:`Example validation errored: ${m.message}.`,location:u.child("schema"),from:u,reference:n})}}const _$=10;function Vp(e,t,r,n,{report:o,location:s},a){if(e&&!e.includes(t)){const c=e.length>_$?`\`${r}\` "${t}" is not a valid value.${a?` See the supported values: ${a}.`:""}`:`\`${r}\` can be one of the following only: ${e.map(i=>`"${i}"`).join(", ")}.`;o({location:s,message:c,from:n,suggest:Xo(t,e)})}}function Qo({responseCodes:e,codeRange:t,report:r,reference:n}){const o=new RegExp(`^${t[0]}[0-9Xx]{2}$`);e.some(s=>t==="2XX"&&s==="default"||o.test(s))||r({message:`Operation must have at least one \`${t}\` response.`,location:{reportOnKey:!0},reference:n})}function Ka(e,t){return t?e.name.toLowerCase():e.name}const rn=()=>({Schema(e,{report:t,location:r}){if(!(e.enum&&!Array.isArray(e.enum))){if(e.enum&&e.type&&!Array.isArray(e.type)){const n=e.enum.filter(o=>!Wo(o,e.type,e.nullable));for(const o of n)t({message:`All values of \`enum\` field must be of the same type as the \`type\` field: expected "${e.type}" but received "${Jo(o)}".`,location:r.child(["enum",e.enum.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/common/no-enum-type-mismatch"})}if(e.enum&&e.type&&Array.isArray(e.type)){const n={};for(const o of e.enum){n[o]=[];for(const s of e.type)Wo(o,s,e.nullable)||n[o].push(s);n[o].length!==e.type.length&&delete n[o]}for(const o of Object.keys(n))t({message:`Enum value \`${o}\` must be of allowed types: \`${e.type}\`.`,location:r.child(["enum",e.enum.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/common/no-enum-type-mismatch"})}}}}),Zo=()=>({Schema(e,{report:t,location:r}){typeof e.maximum=="number"&&typeof e.exclusiveMaximum=="number"&&t({message:"Schema should not have both `maximum` and `exclusiveMaximum`. Use one or the other.",location:r.child(["exclusiveMaximum"]).key(),reference:"https://redocly.com/docs/cli/rules/common/no-mixed-number-range-constraints"}),typeof e.minimum=="number"&&typeof e.exclusiveMinimum=="number"&&t({message:"Schema should not have both `minimum` and `exclusiveMinimum`. Use one or the other.",location:r.child(["exclusiveMinimum"]).key(),reference:"https://redocly.com/docs/cli/rules/common/no-mixed-number-range-constraints"})}}),nn=()=>{const e=[],t=new Set,r=(n,o,s)=>{if(Ur(n.required))for(const[a,c]of n.required.entries())pr(n,c,s,new Set,o)||s.report({message:`Required property '${c}' is not defined.`,location:o.child(["required",a]),reference:"https://redocly.com/docs/cli/rules/common/no-required-schema-properties-undefined"})};return{ref:{leave(n,o,s){if(o.type.name!=="Schema")return;const a=[{node:n,location:o.location},...s.chain??[]];for(const{node:c,location:i}of a)!xe(c)||t.has(c)||(t.add(c),r(c,i,o))}},Schema:{leave(n){e.pop()},enter(n,o){if(e.push(n),!Ur(n.required))return;const s=(i,l)=>{const u=f=>Ko(f,o).schema===l;return!!(i.allOf?.some(u)||i.anyOf?.some(u)||i.oneOf?.some(u))},a=(i,l)=>{if(i<0)return;const u=e[i];return s(u,l)?a(i-1,u)??u:void 0},c=a(e.length-2,n);for(const[i,l]of n.required.entries())!pr(n,l,o)&&!pr(c,l,o)&&o.report({message:`Required property '${l}' is not defined.`,location:o.location.child(["required",i]),reference:"https://redocly.com/docs/cli/rules/common/no-required-schema-properties-undefined"})}}}},on=()=>({Schema(e,{report:t,location:r}){e.type==="object"&&e.items&&t({message:"Schema type mismatch: 'object' type should not contain 'items' field.",location:r.child("items"),reference:"https://redocly.com/docs/cli/rules/common/no-schema-type-mismatch"}),e.type==="array"&&e.properties&&t({message:"Schema type mismatch: 'array' type should not contain 'properties' field.",location:r.child("properties"),reference:"https://redocly.com/docs/cli/rules/common/no-schema-type-mismatch"})}}),sn=()=>({any(e,{report:t,location:r}){typeof e.description=="string"&&(/<script\b/i.test(e.description)&&t({message:"Markdown descriptions must not contain '<script>' tags.",location:r.child(["description"]),reference:"https://redocly.com/docs/cli/rules/common/no-unsafe-markdown"}),/<[a-z][^>]*\bon[a-z]+\s*=/i.test(e.description)&&t({message:"Markdown descriptions must not contain HTML event handler attributes.",location:r.child(["description"]),reference:"https://redocly.com/docs/cli/rules/common/no-unsafe-markdown"}),/(?:\]\(\s*|\b(?:href|src)\s*=\s*["']?\s*)javascript:/i.test(e.description)&&t({message:"Markdown descriptions must not contain 'javascript:' URLs.",location:r.child(["description"]),reference:"https://redocly.com/docs/cli/rules/common/no-unsafe-markdown"}))}}),Gt=()=>({any(e,{report:t,type:r,location:n,rawLocation:o,key:s,resolve:a,ignoreNextVisitorsOnNode:c}){const i=Jo(e),l=o!==n?o:void 0;if(r.items){i!=="array"&&(t({message:`Expected type \`${r.name}\` (array) but got \`${i}\``,from:l}),c());return}else if(i!=="object"){r!==ty&&t({message:`Expected type \`${r.name}\` (object) but got \`${i}\``,from:l}),c();return}const u=typeof r.required=="function"?r.required(e,s):r.required;for(const m of u||[])e.hasOwnProperty(m)||t({message:`The field \`${m}\` must be present on this level.`,from:l,location:[{reportOnKey:!0}]});const f=r.allowed?.(e);if(f&&xe(e))for(const m in e)f.includes(m)||r.extensionsPrefix&&m.startsWith(r.extensionsPrefix)||!Object.keys(r.properties).includes(m)||t({message:`The field \`${m}\` is not allowed here.`,from:l,location:n.child([m]).key()});const _=r.requiredOneOf||null;if(_){let m=!1;for(const w of _||[])e.hasOwnProperty(w)&&(m=!0);m||t({message:`Must contain at least one of the following fields: ${r.requiredOneOf?.join(", ")}.`,from:l,location:[{reportOnKey:!0}]})}for(const m of Object.keys(e)){const w=n.child([m]);let S=e[m],b=Fr(r.properties,m);if(b===void 0&&(b=r.additionalProperties),typeof b=="function"&&(b=b(S,m)),ry(b))continue;const $=b,y=Jo(S);if($===void 0){if(m.startsWith("x-"))continue;t({message:`Property \`${m}\` is not expected here.`,suggest:Xo(m,Object.keys(r.properties)),from:l,location:w.key()});continue}if($!==null){if($.resolvable!==!1&&Ke(S)&&(S=a(S).node),$.items&&$.items?.enum&&Array.isArray(S))for(let d=0;d<S.length;d++)Vp($.items?.enum,S[d],m,l,{report:t,location:n.child([m,d])},$.items?.documentationLink);if($.enum)Vp($.enum,S,m,l,{report:t,location:n.child([m])},$.documentationLink);else if($.type&&!Wo(S,$.type,!1))t({message:`Expected type \`${$.type}\` but got \`${y}\`.`,from:l,location:w}),c();else if(y==="array"&&$.items?.type){const d=$.items?.type;for(let P=0;P<S.length;P++){const h=S[P];Wo(h,d,!1)||t({message:`Expected type \`${d}\` but got \`${Jo(h)}\`.`,from:l,location:w.child([P])})}}typeof $.minimum=="number"&&$.minimum>e[m]&&t({message:`The value of the ${m} field must be greater than or equal to ${$.minimum}`,from:l,location:n.child([m])})}}}}),E$=()=>({CriterionObject:{enter(e,{report:t,location:r}){e.type&&(e.type==="xpath"||xe(e.type)&&e.type.type==="xpath")&&t({message:"The `xpath` type criteria is not supported by Respect.",location:r.child(["type"]),reference:"https://redocly.com/docs/cli/rules/respect/no-criteria-xpath"})}}}),P$=()=>{function e(t,{report:r,location:n}){if(Array.isArray(t))for(const o of t){const s=Fr(o,"scheme"),a=Fr(o,"schemeName");s&&a&&r({message:"`x-security` item must not contain both `scheme` and `schemeName`.",location:n.child(["x-security",t.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/respect/no-x-security-both-scheme-and-scheme-name"})}}return{Workflow:{enter(t,r){e(t?.["x-security"],r)}},Step:{enter(t,r){e(t?.["x-security"],r)}}}},S$=()=>({Step:{enter(e,{report:t,location:r}){if(!e?.["x-operation"])return;const n=e?.["x-security"];if(n)for(const o of n)"schemeName"in o&&t({message:"The `schemeName` can be only used in Step with OpenAPI operation, please use `scheme` instead.",location:r.child(["x-security",n.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/respect/no-x-security-scheme-name-without-openapi"})}}}),I$=()=>{let e=0;return{SourceDescriptions:{enter(t){e=Array.isArray(t)?t.length:0}},Workflow:{leave(t,{report:r,location:n}){const o=t?.["x-security"];if(!(!o||e<=1)){for(const s of o)if("schemeName"in s){const a=s.schemeName;typeof a=="string"&&a.startsWith("$sourceDescriptions.")||r({message:"When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a reference to a source description (e.g. `$sourceDescriptions.{name}.{schemeName}`)",location:n.child(["x-security",o.indexOf(s),"schemeName"]),reference:"https://redocly.com/docs/cli/rules/respect/x-security-scheme-name-reference"})}}}}}},x$={apiKey:["apiKey"],basic:["username","password"],digest:["username","password"],bearer:["token"],oauth2:["accessToken"],openIdConnect:["accessToken"],mutualTLS:[]};function Fp(e,{report:t,location:r}){if(e)for(const n of e){if("schemeName"in n)continue;const{scheme:o,values:s}=n,a=o?.type==="http"?o.scheme:o?.type;if(a==="mutualTLS"){Oe.warn("Please use CLI option to provide mutualTLS certificates for mutualTls authentication security schema.");continue}const c=x$[a];if(c)for(const i of c)(!s||!(i in s))&&t({message:`The \`${i}\` is required when using the ${a} authentication security schema.`,location:r.child(["x-security",e.indexOf(n)]),reference:"https://redocly.com/docs/cli/rules/respect/x-security-scheme-required-values"});else t({message:`The \`${a}\` authentication security schema is not supported.`,location:r.child(["x-security",e.indexOf(n)]),reference:"https://redocly.com/docs/cli/rules/respect/x-security-scheme-required-values"})}}const T$=()=>({Step:{enter(e,t){Fp(e?.["x-security"],t)}},Workflow:{enter(e,t){Fp(e?.["x-security"],t)}}}),N$=()=>({FailureActionObject:{enter(e,{report:t,location:r}){const n=e?.criteria;if(!Array.isArray(n))return;const o=new Set;for(const s of n){const a=JSON.stringify(s);o.has(a)?t({message:"The FailureAction criteria items must be unique.",location:r.child(["criteria",n.indexOf(s)]),reference:"https://redocly.com/docs/cli/rules/arazzo/criteria-unique"}):o.add(a)}}},SuccessActionObject:{enter(e,{report:t,location:r}){const n=e?.criteria;if(!Array.isArray(n))return;const o=new Set;for(const s of n){const a=JSON.stringify(s);o.has(a)?t({message:"The SuccessAction criteria items must be unique.",location:r.child(["criteria",n.indexOf(s)]),reference:"https://redocly.com/docs/cli/rules/arazzo/criteria-unique"}):o.add(a)}}},Step:{enter(e,{report:t,location:r}){const n=e?.successCriteria;if(!Array.isArray(n))return;const o=new Set;for(const s of n){const a=JSON.stringify(s);o.has(a)?t({message:"The Step SuccessCriteria items must be unique.",location:r.child(["successCriteria",n.indexOf(s)]),reference:"https://redocly.com/docs/cli/rules/arazzo/criteria-unique"}):o.add(a)}}}}),k$=()=>{const e=new Map,t=new Map,r=[];function n({value:a,report:c,location:i,path:l,definedWorkflowOutputs:u}){const f=/\$workflows\.([^.\s]+)\.outputs\.([^.\s}\]#]+)/g;let _;for(;(_=f.exec(a))!==null;){const[m,w,S]=_,b=u.get(w);b?b.includes(S)||c({message:`Output key "${S}" is not defined in workflow "${w}". Available outputs: [ ${b.join(", ")} ].`,location:i.child(l)}):c({message:`Workflow "${w}" referenced in runtime expression "${m}" is not defined or has no outputs.`,location:i.child(l)})}}function o({value:a,report:c,location:i,path:l,definedStepOutputs:u}){const f=/\$steps\.([^.\s]+)\.outputs\.([^.\s}\]#]+)/g;let _;for(;(_=f.exec(a))!==null;){const[m,w,S]=_,b=u.get(w);b?b.includes(S)||c({message:`Output key "${S}" is not defined in step "${w}". Available outputs: [ ${b.join(", ")} ].`,location:i.child(l)}):c({message:`Step "${w}" referenced in runtime expression "${m}" is not defined or has no outputs.`,location:i.child(l)})}}function s(a,c,i=[]){if(typeof a=="string")n({value:a,report:c.report,location:c.location,path:i,definedWorkflowOutputs:e}),o({value:a,report:c.report,location:c.location,path:i,definedStepOutputs:t});else if(xe(a)||Array.isArray(a))for(const[l,u]of Object.entries(a))s(u,c,[...i,l])}return{Step:{enter(a,{report:c,location:i}){a.outputs&&t.set(a.stepId,Object.keys(a.outputs))}},Workflow:{enter(a,{report:c,location:i}){a.outputs&&e.set(a.workflowId,Object.keys(a.outputs))}},Parameters:{enter(a,c){r.push(()=>{s(a,c)})}},RequestBody:{enter(a,c){r.push(()=>{s(a,c)})}},CriterionObject:{enter(a,c){r.push(()=>{s(a.condition,c)})}},Outputs:{enter(a,c){r.push(()=>{s(a,c)})}},ExtendedSecurity:{enter(a,c){r.push(()=>{s(a,c)})}},ExtendedOperation:{enter(a,c){r.push(()=>{s(a,c)})}},Root:{leave(){for(const a of r)a()}}}},O$=()=>({Parameters:{enter(e,{report:t,location:r}){if(!e)return;const n=new Set;for(const o of e)n.has(o?.name)&&t({message:"The parameter `name` must be unique amongst listed parameters.",location:r.child([e.indexOf(o)])}),n.has(o?.reference)&&t({message:"The parameter `reference` must be unique amongst listed parameters.",location:r.child([e.indexOf(o)])}),n.add(o?.name??o?.reference)}}}),j$=()=>{const e=new Set;return{Step:{leave(){e.clear()},RequestBody:{enter(t,{report:r,location:n}){if(t.replacements)for(const o of t.replacements)e.has(o.target)&&r({message:"Every `replacement` in `requestBody` must be unique.",location:n.child(["replacements",t.replacements.indexOf(o),"target"]),reference:"https://redocly.com/docs/cli/rules/arazzo/requestbody-replacements-unique"}),e.add(o.target)}}}}},A$=()=>{const e=new Set;return{SourceDescriptions:{enter(t,{report:r,location:n}){if(t.length)for(const o of t)e.has(o.name)&&r({message:"The `name` must be unique amongst all SourceDescriptions.",location:n.child([t.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/sourcedescription-name-unique"}),e.add(o.name)}}}},C$=()=>({SourceDescriptions:{enter(e,{report:t,location:r}){e?.length||t({message:"The `sourceDescriptions` list must have at least one entry.",location:r})}}}),R$=["x-operation","operationId","operationPath","channelPath","workflowId"],D$=()=>({Step:{enter(e,{report:t,location:r}){const n=R$.filter(o=>Object.hasOwn(e,o));n.length>1&&t({message:`A step can only use one of the following mutually exclusive fields: ${n.map(o=>`\`${o}\``).join(", ")}.`,location:n.map(o=>r.child([o]).key()),reference:"https://redocly.com/docs/cli/rules/arazzo/spec-step-mutually-exclusive-fields"})}}}),q$=()=>({OnFailureActionList:{enter(e,{report:t,location:r}){if(!e)return;const n=new Set;for(const o of e)n.has(o?.name)&&t({message:"The action `name` must be unique amongst listed `onFailure` actions.",location:r.child([e.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/step-onfailure-unique"}),n.has(o?.reference)&&t({message:"The action `reference` must be unique amongst listed `onFailure` actions.",location:r.child([e.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/step-onfailure-unique"}),n.add(o.name??o.reference)}}}),L$=()=>({OnSuccessActionList:{enter(e,{report:t,location:r}){if(!e)return;const n=new Set;for(const o of e)n.has(o?.name)&&t({message:"The action `name` must be unique amongst listed `onSuccess` actions.",location:r.child([e.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/step-onsuccess-unique"}),n.has(o?.reference)&&t({message:"The action `reference` must be unique amongst listed `onSuccess` actions.",location:r.child([e.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/step-onsuccess-unique"}),n.add(o?.name??o?.reference)}}}),M$=()=>({Workflow:{enter(e,{report:t,location:r}){if(!e.steps)return;const n=new Set;for(const o of e.steps){if(!o.stepId)return;n.has(o.stepId)&&t({message:"The `stepId` must be unique amongst all steps described in the workflow.",location:r.child(["steps",e.steps.indexOf(o)]),reference:"https://redocly.com/docs/cli/rules/arazzo/stepid-unique"}),n.add(o.stepId)}}}}),V$=()=>{const e=new Set,t=new Set,r=new Set;return{SourceDescriptions:{enter(n){for(const o of n)t.add(o.name)}},Workflows:{enter(n){for(const o of n)r.add(o.workflowId)}},Workflow:{leave(n,{report:o,location:s}){if(n.dependsOn)for(const a of n.dependsOn){if(a.startsWith("$sourceDescriptions.")){const c=a.split(".")[1];t.has(c)||o({message:`SourceDescription ${c} must be defined in sourceDescriptions.`,location:s.child(["dependsOn",n.dependsOn.indexOf(a)]),reference:"https://redocly.com/docs/cli/rules/arazzo/workflow-dependson"})}!a.startsWith("$sourceDescriptions")&&!r.has(a)&&o({message:`Workflow ${a} must be defined in workflows.`,location:s.child(["dependsOn",n.dependsOn.indexOf(a)]),reference:"https://redocly.com/docs/cli/rules/arazzo/workflow-dependson"}),e.has(a)&&o({message:"Every workflow in dependsOn must be unique.",location:s.child(["dependsOn"]),reference:"https://redocly.com/docs/cli/rules/arazzo/workflow-dependson"}),e.add(a)}}}}},F$=()=>{const e=new Set;return{Workflow:{enter(t,{report:r,location:n}){t.workflowId&&(e.has(t.workflowId)&&r({message:"Every workflow must have a unique `workflowId`.",location:n.child([t.workflowId]),reference:"https://redocly.com/docs/cli/rules/arazzo/workflowid-unique"}),e.add(t.workflowId))}}}},z$={assertions:rr,"criteria-unique":N$,"no-criteria-xpath":E$,"no-duplicated-enum-values":en,"no-unsafe-markdown":sn,"no-enum-type-mismatch":rn,"no-mixed-number-range-constraints":Zo,"no-required-schema-properties-undefined":nn,"no-schema-type-mismatch":on,"no-unresolved-refs":Zt,"no-x-security-both-scheme-and-scheme-name":P$,"no-x-security-scheme-name-without-openapi":S$,"outputs-defined":k$,"parameters-unique":O$,"requestBody-replacements-unique":j$,"sourceDescription-name-unique":A$,"sourceDescription-type":u$,"sourceDescriptions-not-empty":C$,"spec-step-mutually-exclusive-fields":D$,"step-onFailure-unique":q$,"step-onSuccess-unique":L$,"stepId-unique":M$,struct:Gt,"workflow-dependsOn":V$,"workflowId-unique":F$,"x-security-scheme-name-reference":I$,"x-security-scheme-required-values":T$},U$={},Nr=()=>({Info(e,{report:t,location:r}){e.contact||t({message:Ho("Info","contact"),location:r.child("contact").key(),reference:"https://redocly.com/docs/cli/rules/oas/info-contact"})}}),es=()=>{let e;return{Root:{enter(t){e=Sn(t)},License:{leave(t,r){e==="oas3_1"||e==="oas3_2"?$$({fieldNames:["url","identifier"],value:t,ctx:r,reference:"https://redocly.com/docs/cli/rules/oas/info-license-strict"}):Tr({fieldName:"url",value:t,ctx:r,reference:"https://redocly.com/docs/cli/rules/oas/info-license-strict"})}}}}},ts=({ignoreCase:e=!1})=>{const t=new Set;return{Tag:{leave(r,n){const o=Ka(r,e);t.has(o)?n.report({message:`Duplicate tag name found: '${r.name}'.`,location:n.location}):t.add(o)}}}},rs=()=>({Root:{PathItem:{Operation(e,t){Tr({fieldName:"operationId",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-operationId"})}}}});function B$(e,t,r){if("flows"in e&&e.flows){const{node:n,location:o}=Ke(e.flows)?t(e.flows,r.source.absoluteRef):{node:e.flows,location:r},s=(o??r).source.absoluteRef,a=Object.values(n??{}).flatMap(c=>{const i=Ke(c)?t(c,s).node:c;return Object.keys(i?.scopes||{})});return[...new Set(a)]}return Object.keys(e.scopes||{})}const Ja=e=>{const t=new Map,r=[];return{Root:{leave(n,{report:o}){for(const{schemeName:s,scopes:a,location:c}of r){const i=t.get(s);if(i?.type==="oauth2"){if(e.requireScopes&&a.length===0){o({message:`The "${s}" security requirement must list at least one scope.`,location:c.key(),reference:"https://redocly.com/docs/cli/rules/common/security-scopes-defined"});continue}for(let l=0;l<a.length;l++){const u=a[l];i.definedScopes.includes(u)||o({message:`The "${u}" scope is not defined in the "${s}" security scheme.`,location:c.child([l]),suggest:Xo(u,i.definedScopes),reference:"https://redocly.com/docs/cli/rules/common/security-scopes-defined"})}}}}},SecurityScheme(n,{key:o,resolve:s,location:a}){t.set(o.toString(),{type:n.type,definedScopes:n.type==="oauth2"?B$(n,s,a):[]})},SecurityRequirement(n,{location:o}){for(const[s,a]of Object.entries(n))r.push({schemeName:s,scopes:a||[],location:o.child([s])})}}},ns=()=>({Tag(e,t){Tr({fieldName:"description",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/tag-description"})}}),os=({ignoreCase:e=!1})=>({Root(t,{report:r,location:n}){if(t.tags)for(let o=0;o<t.tags.length-1;o++)Ka(t.tags[o],e)>Ka(t.tags[o+1],e)&&r({message:"The `tags` array should be in alphabetical order.",location:n.child(["tags",o]),reference:"https://redocly.com/docs/cli/rules/oas/tags-alphabetical"})}}),G$=()=>({Channel(e,{report:t,key:r}){r.split(/[/.:]/).filter(n=>n!=="").every(n=>/^{.+}$/.test(n)||/^[a-z0-9-.]+$/.test(n))||t({message:`\`${r}\` does not use kebab-case.`,location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/async/channels-kebab-case"})}}),K$=()=>({Channel(e,{report:t,key:r,location:n}){r.endsWith("/")&&r!=="/"&&t({message:`\`${r}\` should not have a trailing slash.`,location:n.key(),reference:"https://redocly.com/docs/cli/rules/async/no-channel-trailing-slash"})}}),zp="https://redocly.com/docs/cli/rules/async/security-defined",J$=()=>{const e=new Map,t=new Map,r=[];let n,o=!1;return{Root:{leave(s,{report:a}){for(const[i,l]of e.entries())if(!l.defined)for(const u of l.from)a({message:`There is no \`${i}\` security scheme defined.`,location:u.key(),reference:zp});const c=[...t.keys()];for(const{location:i,channelServers:l}of r){const u=l??c;u.length>0&&u.every(f=>t.get(f))||a({message:"Every operation should have security defined on it.",location:i.key(),reference:zp})}}},SecurityScheme(s,{key:a}){s!=null&&e.set(a.toString(),{defined:!0,from:[]})},SecurityRequirement(s,{location:a}){for(const c of Object.keys(s)){const i=e.get(c),l=a.child([c]);i?i.from.push(l):e.set(c,{from:[l]})}},Components:{enter(){o=!0},leave(){o=!1}},Server(s,{key:a}){o||t.set(a.toString(),Yo(s))},Channel:{skip(){return o},enter(s){n=Array.isArray(s?.servers)&&s.servers.length>0?s.servers:void 0},Operation(s,{location:a,resolve:c}){qp(s,c)||r.push({location:a,channelServers:n})}}}},Y$={struct:Gt,"no-unresolved-refs":Zt,assertions:rr,"info-contact":Nr,"info-license-strict":es,"operation-operationId":rs,"security-defined":J$,"channels-kebab-case":G$,"no-channel-trailing-slash":K$,"tag-description":ns,"tags-alphabetical":os,"no-duplicated-enum-values":en,"no-unsafe-markdown":sn,"no-duplicated-tag-names":ts,"no-required-schema-properties-undefined":nn,"no-enum-type-mismatch":rn,"no-mixed-number-range-constraints":Zo,"no-schema-type-mismatch":on,"security-scopes-defined":Ja},W$={},H$=()=>({Channel(e,{report:t}){(e.address||"").split(/[/.:]/).filter(r=>r!=="").every(r=>/^{.+}$/.test(r)||/^[a-z0-9-.]+$/.test(r))||t({message:`\`${e.address}\` does not use kebab-case.`,location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/async/channels-kebab-case"})}}),X$=()=>({Channel(e,{report:t,location:r}){e?.address?.endsWith("/")&&e?.address!=="/"&&t({message:`\`${e.address}\` should not have a trailing slash.`,location:r.key(),reference:"https://redocly.com/docs/cli/rules/async/no-channel-trailing-slash"})}}),Up="#/components/securitySchemes/",Q$="#/components/",Ya="https://redocly.com/docs/cli/rules/async/security-defined";function Z$(e){const t=e.indexOf("#");return t===-1?e:e.slice(t)}function e_(e){if(!e.startsWith(Up))return!1;const t=e.slice(Up.length);return t!==""&&!t.includes("/")}const t_=()=>{const e=[];let t,r,n,o,s;const a=(c,i,l)=>{const u=c.channel,f=Ke(u)?i(u,l):void 0,_=(Ke(u)?f?.node:u)?.servers;let m,w;return _&&_.length>0?(m=_,w=f?.location?.source.absoluteRef??l):(m=t?Object.values(t):[],w=r),m.length===0?!1:m.every(S=>{const b=Ke(S)?i(S,w).node:S;return Yo(b)})};return{Root:{enter(c,{location:i,resolve:l}){const u=c?.servers;if(Ke(u)){const _=l(u);t=_.node??void 0,r=_.location?.source.absoluteRef}else t=u,r=void 0;const f=c?.operations;if(Ke(f)){const _=l(f);n=_.node??void 0,o=_.location?.source.absoluteRef,s=_.location}else n=f,o=void 0,s=i.child(["operations"])},leave(c,{report:i,resolve:l}){for(const u of e){if((u.local||u.refPointer.startsWith(Q$))&&!e_(u.refPointer)){i({message:"Security scheme `$ref` must point to `#/components/securitySchemes`.",location:u.location.key(),reference:Ya});continue}u.resolved||i({message:`There is no \`${u.name}\` security scheme defined.`,location:u.location.key(),reference:Ya})}if(n&&s){const u=s;for(const[f,_]of Object.entries(n)){let m,w;if(Ke(_)){const S=l(_,o);m=S.node,w=S.location?.source.absoluteRef}else m=_,w=o;m&&(qp(m,l,w)||a(m,l,w)||i({message:"Every operation should have security defined on it.",location:u.child([f]).key(),reference:Ya}))}}}},SecuritySchemeList:{enter(c,{location:i,resolve:l}){if(c)for(let u=0;u<c.length;u++){const f=c[u];if(!Ke(f))continue;const _=i.child([u]),m=l(f),w=Z$(f.$ref),S=w.split("/").pop()??f.$ref;e.push({location:_,name:S,refPointer:w,resolved:m.node!=null,local:f.$ref.startsWith("#")})}}}}};function r_(e,t,r){if(!e.flows)return[];const{node:n,location:o}=Ke(e.flows)?t(e.flows,r.source.absoluteRef):{node:e.flows,location:r},s=(o??r).source.absoluteRef,a=Object.values(n??{}).flatMap(c=>{const i=Ke(c)?t(c,s).node:c;return Object.keys(i?.availableScopes||{})});return[...new Set(a)]}const n_=e=>{const t=new Map;return{SecuritySchemeList(r,{resolve:n,location:o}){for(let s=0;s<r.length;s++){const a=r[s],c=Ke(a)?n(a):{node:a,location:o.child([s])};!c.node||!c.location||t.set(c.location.absolutePointer,{scheme:c.node,location:c.location,availableScopes:c.node.type==="oauth2"?r_(c.node,n,c.location):[]})}},Root:{leave(r,{report:n}){for(const{scheme:o,location:s,availableScopes:a}of t.values()){if(o.type!=="oauth2")continue;if(e.requireScopes&&!o.scopes?.length){n({message:"The security scheme must list at least one scope.",location:s.key(),reference:"https://redocly.com/docs/cli/rules/common/security-scopes-defined"});continue}const c=o.scopes||[];for(let i=0;i<c.length;i++){const l=c[i];a.includes(l)||n({message:`The "${l}" scope is not defined in the available scopes of the security scheme flows.`,location:s.child(["scopes",i]),suggest:Xo(l,a),reference:"https://redocly.com/docs/cli/rules/common/security-scopes-defined"})}}}}}},o_={struct:Gt,"no-unresolved-refs":Zt,assertions:rr,"info-contact":Nr,"info-license-strict":es,"operation-operationId":rs,"security-defined":t_,"channels-kebab-case":H$,"no-channel-trailing-slash":X$,"tag-description":ns,"tags-alphabetical":os,"no-duplicated-enum-values":en,"no-unsafe-markdown":sn,"no-duplicated-tag-names":ts,"no-required-schema-properties-undefined":nn,"no-enum-type-mismatch":rn,"no-mixed-number-range-constraints":Zo,"no-schema-type-mismatch":on,"security-scopes-defined":n_},s_={};function Bp(e){return Pa(vr).filter(t=>e.assertions[t]!==void 0).map(t=>({name:t,conditions:e.assertions[t],runsOnKeys:pc.has(t),runsOnValues:uc.has(t)}))}const a_=e=>{const t=Object.values(e).filter(xe),r=[];for(const n of t){if(n.severity==="off")continue;const o=n.subject?.type;if(!o)continue;const s=Bp(n),a=i_(n);r.push({[o]:(c,i)=>{c_(c,i,a)&&l_(c,i,n,s)}})}return r};function i_(e){return Array.isArray(e.where)?e.where.map((t,r)=>{if(!Vt(t.subject?.type))throw new Error(`${e.assertionId} -> where -> [${r}]: 'type' (String) is required`);return{kind:t.subject.type,definition:t,assertsToApply:Bp(t)}}):[]}function c_(e,t,r){let n=r;const o=r.at(-1);if(o&&o.kind===e.kind){if(!Gp(e,o,t))return!1;n=r.slice(0,-1)}let s=0;for(const a of n){let c=!1;for(;s<t.ancestors.length;){const i=t.ancestors[s++];if(i.kind===a.kind&&Gp(i,a,t)){c=!0;break}}if(!c)return!1}return!0}function Gp(e,t,r){const{value:n}=Kp(e,t.definition.subject.property),o=new _a(r.source,"#/");return t.assertsToApply.every(s=>vr[s.name](n,s.conditions,{baseLocation:o,rawValue:n}).length===0)}function l_(e,t,r,n){const o=Jp(r.subject.property),{value:s,locNode:a}=Kp(e,r.subject.property),c=new _a(t.source,"#/"),i=n.flatMap(u=>vr[u.name](s,u.conditions,{baseLocation:c,rawValue:s}));if(!i.length)return;const l=`${Re.blue(r.assertionId)} failed because the ${Re.blue(r.subject.type)} ${Re.blue(o??"")} didn't meet the assertions: {{problems}}`.replace(/ +/g," ");t.report({message:Ap(r.message??l,{problems:Op(i),assertionName:r.assertionId,nodeType:r.subject.type,property:o??"",key:"",pointer:"",file:jp(t.source.absoluteRef)}),node:a,suggest:r.suggest,ruleId:r.assertionId,severity:r.severity})}function Wa(e){return e?.name?.value!==void 0?{value:e.name.value,locNode:e.name}:e?.value!==void 0?{value:e.value,locNode:e}:{value:e,locNode:e}}function Kp(e,t){const r=Jp(t);if(r===void 0)return Wa(e);const n=e[r];if(Array.isArray(n))return{value:n.map(s=>Wa(s).value),locNode:e};const o=Wa(n);return{value:o.value,locNode:u_(o.locNode)?o.locNode:e}}function u_(e){return xe(e)&&"kind"in e}function Jp(e){return Array.isArray(e)?e[0]:e}const p_=["Query","Mutation","Subscription"];function d_(e){let t=e;for(;t.kind==="ListType"||t.kind==="NonNullType";)t=t.type;return t.name.value}const f_=()=>{const e=new Map,t=new Set,r=new Set;let n=!1;const o=u=>t.add(d_(u)),s=u=>e.set(u.name.value,u.name),a=u=>{for(const f of u.interfaces??[])o(f);for(const f of u.fields??[]){o(f.type);for(const _ of f.arguments??[])o(_.type)}},c=u=>{for(const f of u.types??[])o(f)},i=u=>{for(const f of u.fields??[])o(f.type)},l=u=>{for(const f of u.operationTypes??[])r.add(f.type.name.value)};return{SchemaDefinition:u=>{n=!0,l(u)},SchemaExtension:l,DirectiveDefinition:u=>{for(const f of u.arguments??[])o(f.type)},ObjectTypeDefinition:u=>{s(u),a(u)},ObjectTypeExtension:a,InterfaceTypeDefinition:u=>{s(u),a(u)},InterfaceTypeExtension:a,UnionTypeDefinition:u=>{s(u),c(u)},UnionTypeExtension:c,InputObjectTypeDefinition:u=>{s(u),i(u)},InputObjectTypeExtension:i,EnumTypeDefinition:s,ScalarTypeDefinition:s,Document:{leave:(u,f)=>{if(!n)for(const _ of p_)e.has(_)&&r.add(_);if(r.size!==0)for(const[_,m]of e)t.has(_)||r.has(_)||f.report({message:`Type \`${_}\` is declared but never used.`,node:m})}}}};function Be(e,t){if(!e)throw new Error(t)}function dr(e){return typeof e=="object"&&e!==null}function Pt(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}const m_=/\r\n|[\n\r]/g;function ss(e,t){let r=0,n=1;for(const o of e.body.matchAll(m_)){if(typeof o.index=="number"||Pt(!1),o.index>=t)break;r=o.index+o[0].length,n+=1}return{line:n,column:t+1-r}}function h_(e){return Yp(e.source,ss(e.source,e.start))}function Yp(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,o=t.line-1,s=e.locationOffset.line-1,a=t.line+s,c=t.line===1?r:0,i=t.column+c,l=`${e.name}:${a}:${i}
|
|
16
|
+
`,u=n.split(/\r\n|[\n\r]/g),f=u[o];if(f.length>120){const _=Math.floor(i/80),m=i%80,w=[];for(let S=0;S<f.length;S+=80)w.push(f.slice(S,S+80));return l+Wp([[`${a} |`,w[0]],...w.slice(1,_+1).map(S=>["|",S]),["|","^".padStart(m)],["|",w[_+1]]])}return l+Wp([[`${a-1} |`,u[o-1]],[`${a} |`,f],["|","^".padStart(i)],[`${a+1} |`,u[o+1]]])}function Wp(e){const t=e.filter(([n,o])=>o!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,o])=>n.padStart(r)+(o?" "+o:"")).join(`
|
|
17
|
+
`)}function y_(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class ge extends Error{constructor(t,...r){var n,o,s;const{nodes:a,source:c,positions:i,path:l,originalError:u,extensions:f}=y_(r);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=u??void 0,this.nodes=Hp(Array.isArray(a)?a:a?[a]:void 0);const _=Hp((n=this.nodes)===null||n===void 0?void 0:n.map(w=>w.loc).filter(w=>w!=null));this.source=c??(_==null||(o=_[0])===null||o===void 0?void 0:o.source),this.positions=i??_?.map(w=>w.start),this.locations=i&&c?i.map(w=>ss(c,w)):_?.map(w=>ss(w.source,w.start));const m=dr(u?.extensions)?u?.extensions:void 0;this.extensions=(s=f??m)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,ge):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
|
|
18
|
+
|
|
19
|
+
`+h_(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
|
|
20
|
+
|
|
21
|
+
`+Yp(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Hp(e){return e===void 0||e.length===0?void 0:e}class g_{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class v_{constructor(t,r,n,o,s,a){this.kind=t,this.start=r,this.end=n,this.line=o,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ha={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},b_=new Set(Object.keys(Ha));function Xp(e){const t=e?.kind;return typeof t=="string"&&b_.has(t)}var gt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(gt||(gt={}));var ve;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION"})(ve||(ve={}));var W;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(W||(W={}));function Xa(e){return e===9||e===32}function Qp(e){return e>=48&&e<=57}function Zp(e){return e>=97&&e<=122||e>=65&&e<=90}function ed(e){return Zp(e)||e===95}function td(e){return Zp(e)||Qp(e)||e===95}function w_(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,o=-1;for(let a=0;a<e.length;++a){var s;const c=e[a],i=$_(c);i!==c.length&&(n=(s=n)!==null&&s!==void 0?s:a,o=a,a!==0&&i<r&&(r=i))}return e.map((a,c)=>c===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,o+1)}function $_(e){let t=0;for(;t<e.length&&Xa(e.charCodeAt(t));)++t;return t}function __(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),o=n.length===1,s=n.length>1&&n.slice(1).every(m=>m.length===0||Xa(m.charCodeAt(0))),a=r.endsWith('\\"""'),c=e.endsWith('"')&&!a,i=e.endsWith("\\"),l=c||i,u=!o||e.length>70||l||s||a;let f="";const _=o&&Xa(e.charCodeAt(0));return(u&&!_||s)&&(f+=`
|
|
22
|
+
`),f+=r,(u||l)&&(f+=`
|
|
23
|
+
`),'"""'+f+'"""'}const E_=10,rd=2;function be(e){return as(e,[])}function as(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return P_(e,t);default:return String(e)}}function P_(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(S_(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:as(n,r)}else if(Array.isArray(e))return x_(e,r);return I_(e,r)}function S_(e){return typeof e.toJSON=="function"}function I_(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>rd?"["+T_(e)+"]":"{ "+r.map(([n,o])=>n+": "+as(o,t)).join(", ")+" }"}function x_(e,t){if(e.length===0)return"[]";if(t.length>rd)return"[Array]";const r=Math.min(E_,e.length),n=e.length-r,o=[];for(let s=0;s<r;++s)o.push(as(e[s],t));return n===1?o.push("... 1 more item"):n>1&&o.push(`... ${n} more items`),"["+o.join(", ")+"]"}function T_(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const N_=globalThis.process&&!0,St=N_?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var r;const n=t.prototype[Symbol.toStringTag],o=Symbol.toStringTag in e?e[Symbol.toStringTag]:(r=e.constructor)===null||r===void 0?void 0:r.name;if(n===o){const s=be(e);throw new Error(`Cannot use ${n} "${s}" from another module or realm.
|
|
24
|
+
|
|
25
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
26
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
27
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
28
|
+
|
|
29
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
30
|
+
|
|
31
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
32
|
+
versions may have different capabilities and behavior. The data from one
|
|
33
|
+
version used in the function from another could produce confusing and
|
|
34
|
+
spurious results.`)}}return!1},k_=5;function is(e,t){const[r,n]=t?[e,t]:[void 0,e];let o=" Did you mean ";r&&(o+=r+" ");const s=n.map(i=>`"${i}"`);switch(s.length){case 0:return"";case 1:return o+s[0]+"?";case 2:return o+s[0]+" or "+s[1]+"?"}const a=s.slice(0,k_),c=a.pop();return o+a.join(", ")+", or "+c+"?"}function nd(e){return e}function kr(e,t){const r=Object.create(null);for(const n of e)r[t(n)]=n;return r}function Qa(e,t,r){const n=Object.create(null);for(const o of e)n[t(o)]=r(o);return n}function qt(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}function O_(e,t){let r=0,n=0;for(;r<e.length&&n<t.length;){let o=e.charCodeAt(r),s=t.charCodeAt(n);if(cs(o)&&cs(s)){let a=0;do++r,a=a*10+o-Za,o=e.charCodeAt(r);while(cs(o)&&a>0);let c=0;do++n,c=c*10+s-Za,s=t.charCodeAt(n);while(cs(s)&&c>0);if(a<c)return-1;if(a>c)return 1}else{if(o<s)return-1;if(o>s)return 1;++r,++n}}return e.length-t.length}const Za=48,j_=57;function cs(e){return!isNaN(e)&&Za<=e&&e<=j_}function ls(e,t){const r=Object.create(null),n=new A_(e),o=Math.floor(e.length*.4)+1;for(const s of t){const a=n.measure(s,o);a!==void 0&&(r[s]=a)}return Object.keys(r).sort((s,a)=>{const c=r[s]-r[a];return c!==0?c:O_(s,a)})}class A_{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=od(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,r){if(this._input===t)return 0;const n=t.toLowerCase();if(this._inputLowerCase===n)return 1;let o=od(n),s=this._inputArray;if(o.length<s.length){const u=o;o=s,s=u}const a=o.length,c=s.length;if(a-c>r)return;const i=this._rows;for(let u=0;u<=c;u++)i[0][u]=u;for(let u=1;u<=a;u++){const f=i[(u-1)%3],_=i[u%3];let m=_[0]=u;for(let w=1;w<=c;w++){const S=o[u-1]===s[w-1]?0:1;let b=Math.min(f[w]+1,_[w-1]+1,f[w-1]+S);if(u>1&&w>1&&o[u-1]===s[w-2]&&o[u-2]===s[w-1]){const $=i[(u-2)%3][w-2];b=Math.min(b,$+1)}b<m&&(m=b),_[w]=b}if(m>r)return}const l=i[a%3][c];return l<=r?l:void 0}}function od(e){const t=e.length,r=new Array(t);for(let n=0;n<t;++n)r[n]=e.charCodeAt(n);return r}function vt(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[r,n]of Object.entries(e))t[r]=n;return t}function C_(e){return`"${e.replace(R_,D_)}"`}const R_=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function D_(e){return q_[e.charCodeAt(0)]}const q_=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],an=Object.freeze({});function ei(e,t,r=Ha){const n=new Map;for(const $ of Object.values(W))n.set($,ad(t,$));let o,s=Array.isArray(e),a=[e],c=-1,i=[],l=e,u,f;const _=[],m=[];do{c++;const $=c===a.length,y=$&&i.length!==0;if($){if(u=m.length===0?void 0:_[_.length-1],l=f,f=m.pop(),y)if(s){l=l.slice();let P=0;for(const[h,g]of i){const E=h-P;g===null?(l.splice(E,1),P++):l[E]=g}}else{l={...l};for(const[P,h]of i)l[P]=h}c=o.index,a=o.keys,i=o.edits,s=o.inArray,o=o.prev}else if(f){if(u=s?c:a[c],l=f[u],l==null)continue;_.push(u)}let d;if(!Array.isArray(l)){var w,S;if(Xp(l)||Be(!1,`Invalid AST Node: ${be(l)}.`),d=($?(w=n.get(l.kind))===null||w===void 0?void 0:w.leave:(S=n.get(l.kind))===null||S===void 0?void 0:S.enter)?.call(t,l,u,f,_,m),d===an)break;if(d===!1){if(!$){_.pop();continue}}else if(d!==void 0&&(i.push([u,d]),!$))if(Xp(d))l=d;else{_.pop();continue}}if(d===void 0&&y&&i.push([u,l]),$)_.pop();else{var b;o={inArray:s,index:c,keys:a,edits:i,prev:o},s=Array.isArray(l),a=s?l:(b=r[l.kind])!==null&&b!==void 0?b:[],c=-1,i=[],f&&m.push(f),f=l}}while(o!==void 0);return i.length!==0?i[i.length-1][1]:e}function sd(e){const t=new Array(e.length).fill(null),r=Object.create(null);for(const n of Object.values(W)){let o=!1;const s=new Array(e.length).fill(void 0),a=new Array(e.length).fill(void 0);for(let i=0;i<e.length;++i){const{enter:l,leave:u}=ad(e[i],n);o||(o=l!=null||u!=null),s[i]=l,a[i]=u}if(!o)continue;const c={enter(...i){const l=i[0];for(let f=0;f<e.length;f++)if(t[f]===null){var u;const _=(u=s[f])===null||u===void 0?void 0:u.apply(e[f],i);if(_===!1)t[f]=l;else if(_===an)t[f]=an;else if(_!==void 0)return _}},leave(...i){const l=i[0];for(let f=0;f<e.length;f++)if(t[f]===null){var u;const _=(u=a[f])===null||u===void 0?void 0:u.apply(e[f],i);if(_===an)t[f]=an;else if(_!==void 0&&_!==!1)return _}else t[f]===l&&(t[f]=null)}};r[n]=c}return r}function ad(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Lt(e){return ei(e,M_)}const L_=80,M_={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>fe(e.definitions,`
|
|
35
|
+
|
|
36
|
+
`)},OperationDefinition:{leave(e){const t=ti(e.variableDefinitions)?Pe(`(
|
|
37
|
+
`,fe(e.variableDefinitions,`
|
|
38
|
+
`),`
|
|
39
|
+
)`):Pe("(",fe(e.variableDefinitions,", "),")"),r=Pe("",e.description,`
|
|
40
|
+
`)+fe([e.operation,fe([e.name,t]),fe(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n,description:o})=>Pe("",o,`
|
|
41
|
+
`)+e+": "+t+Pe(" = ",r)+Pe(" ",fe(n," "))},SelectionSet:{leave:({selections:e})=>It(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:o}){const s=Pe("",e,": ")+t;let a=s+Pe("(",fe(r,", "),")");return a.length>L_&&(a=s+Pe(`(
|
|
42
|
+
`,us(fe(r,`
|
|
43
|
+
`)),`
|
|
44
|
+
)`)),fe([a,fe(n," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Pe(" ",fe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>fe(["...",Pe("on ",e),fe(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:o,description:s})=>Pe("",s,`
|
|
45
|
+
`)+`fragment ${e}${Pe("(",fe(r,", "),")")} on ${t} ${Pe("",fe(n," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?__(e):C_(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+fe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+fe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Pe("(",fe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>Pe("",e,`
|
|
46
|
+
`)+fe(["schema",fe(t," "),It(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>Pe("",e,`
|
|
47
|
+
`)+fe(["scalar",t,fe(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:o})=>Pe("",e,`
|
|
48
|
+
`)+fe(["type",t,Pe("implements ",fe(r," & ")),fe(n," "),It(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:o})=>Pe("",e,`
|
|
49
|
+
`)+t+(ti(r)?Pe(`(
|
|
50
|
+
`,us(fe(r,`
|
|
51
|
+
`)),`
|
|
52
|
+
)`):Pe("(",fe(r,", "),")"))+": "+n+Pe(" ",fe(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:o})=>Pe("",e,`
|
|
53
|
+
`)+fe([t+": "+r,Pe("= ",n),fe(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:o})=>Pe("",e,`
|
|
54
|
+
`)+fe(["interface",t,Pe("implements ",fe(r," & ")),fe(n," "),It(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>Pe("",e,`
|
|
55
|
+
`)+fe(["union",t,fe(r," "),Pe("= ",fe(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>Pe("",e,`
|
|
56
|
+
`)+fe(["enum",t,fe(r," "),It(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>Pe("",e,`
|
|
57
|
+
`)+fe([t,fe(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>Pe("",e,`
|
|
58
|
+
`)+fe(["input",t,fe(r," "),It(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,directives:n,repeatable:o,locations:s})=>Pe("",e,`
|
|
59
|
+
`)+"directive @"+t+(ti(r)?Pe(`(
|
|
60
|
+
`,us(fe(r,`
|
|
61
|
+
`)),`
|
|
62
|
+
)`):Pe("(",fe(r,", "),")"))+Pe(" ",fe(n," "))+(o?" repeatable":"")+" on "+fe(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>fe(["extend schema",fe(e," "),It(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>fe(["extend scalar",e,fe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>fe(["extend type",e,Pe("implements ",fe(t," & ")),fe(r," "),It(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>fe(["extend interface",e,Pe("implements ",fe(t," & ")),fe(r," "),It(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>fe(["extend union",e,fe(t," "),Pe("= ",fe(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>fe(["extend enum",e,fe(t," "),It(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>fe(["extend input",e,fe(t," "),It(r)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>fe(["extend directive @"+e,fe(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>fe([e,Pe(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:r})=>fe([e,Pe(".",t),Pe("(",r,":)")])},DirectiveCoordinate:{leave:({name:e})=>fe(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>fe(["@",e,Pe("(",t,":)")])}};function fe(e,t=""){var r;return(r=e?.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function It(e){return Pe(`{
|
|
63
|
+
`,us(fe(e,`
|
|
64
|
+
`)),`
|
|
65
|
+
}`)}function Pe(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function us(e){return Pe(" ",e.replace(/\n/g,`
|
|
66
|
+
`))}function ti(e){var t;return(t=e?.some(r=>r.includes(`
|
|
67
|
+
`)))!==null&&t!==void 0?t:!1}function ri(e,t){switch(e.kind){case W.NULL:return null;case W.INT:return parseInt(e.value,10);case W.FLOAT:return parseFloat(e.value);case W.STRING:case W.ENUM:case W.BOOLEAN:return e.value;case W.LIST:return e.values.map(r=>ri(r,t));case W.OBJECT:return Qa(e.fields,r=>r.name.value,r=>ri(r.value,t));case W.VARIABLE:return t?.[e.name.value]}}function xt(e){if(e!=null||Be(!1,"Must provide name."),typeof e=="string"||Be(!1,"Expected name to be a string."),e.length===0)throw new ge("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!td(e.charCodeAt(t)))throw new ge(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!ed(e.charCodeAt(0)))throw new ge(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function V_(e){if(e==="true"||e==="false"||e==="null")throw new ge(`Enum values cannot be named: ${e}`);return xt(e)}function ni(e){return nr(e)||rt(e)||nt(e)||Tt(e)||bt(e)||dt(e)||Nt(e)||Xe(e)}function nr(e){return St(e,or)}function rt(e){return St(e,Kt)}function nt(e){return St(e,si)}function Tt(e){return St(e,ai)}function bt(e){return St(e,cn)}function dt(e){return St(e,ii)}function Nt(e){return St(e,mt)}function Xe(e){return St(e,je)}function ps(e){return nr(e)||bt(e)||dt(e)||oi(e)&&ps(e.ofType)}function id(e){return nr(e)||rt(e)||nt(e)||Tt(e)||bt(e)||oi(e)&&id(e.ofType)}function cd(e){return nr(e)||bt(e)}function ld(e){return nt(e)||Tt(e)}class mt{constructor(t){ni(t)||Be(!1,`Expected ${be(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class je{constructor(t){F_(t)||Be(!1,`Expected ${be(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function oi(e){return Nt(e)||Xe(e)}function F_(e){return ni(e)&&!Xe(e)}function z_(e){return nr(e)||rt(e)||nt(e)||Tt(e)||bt(e)||dt(e)}function U_(e){if(e){let t=e;for(;oi(t);)t=t.ofType;return t}}function ud(e){return typeof e=="function"?e():e}function pd(e){return typeof e=="function"?e():e}class or{constructor(t){var r,n,o,s;const a=(r=t.parseValue)!==null&&r!==void 0?r:nd;this.name=xt(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(n=t.serialize)!==null&&n!==void 0?n:nd,this.parseValue=a,this.parseLiteral=(o=t.parseLiteral)!==null&&o!==void 0?o:(c,i)=>a(ri(c,i)),this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||Be(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${be(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||Be(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Be(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Kt{constructor(t){var r;this.name=xt(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=()=>fd(t),this._interfaces=()=>dd(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||Be(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${be(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:hd(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function dd(e){var t;const r=ud((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(r)||Be(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),r}function fd(e){const t=pd(e.fields);return Or(t)||Be(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),qt(t,(r,n)=>{var o;Or(r)||Be(!1,`${e.name}.${n} field config must be an object.`),r.resolve==null||typeof r.resolve=="function"||Be(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${be(r.resolve)}.`);const s=(o=r.args)!==null&&o!==void 0?o:{};return Or(s)||Be(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:xt(n),description:r.description,type:r.type,args:md(s),resolve:r.resolve,subscribe:r.subscribe,deprecationReason:r.deprecationReason,extensions:vt(r.extensions),astNode:r.astNode}})}function md(e){return Object.entries(e).map(([t,r])=>({name:xt(t),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:vt(r.extensions),astNode:r.astNode}))}function Or(e){return dr(e)&&!Array.isArray(e)}function hd(e){return qt(e,t=>({description:t.description,type:t.type,args:yd(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function yd(e){return Qa(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function ds(e){return Xe(e.type)&&e.defaultValue===void 0}class si{constructor(t){var r;this.name=xt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=fd.bind(void 0,t),this._interfaces=dd.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Be(!1,`${this.name} must provide "resolveType" as a function, but got: ${be(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:hd(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class ai{constructor(t){var r;this.name=xt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._types=B_.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Be(!1,`${this.name} must provide "resolveType" as a function, but got: ${be(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function B_(e){const t=ud(e.types);return Array.isArray(t)||Be(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class cn{constructor(t){var r;this.name=xt(t.name),this.description=t.description,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._values=typeof t.values=="function"?t.values:gd(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=gd(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=kr(this.getValues(),r=>r.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(n=>[n.value,n])));const r=this._valueLookup.get(t);if(r===void 0)throw new ge(`Enum "${this.name}" cannot represent value: ${be(t)}`);return r.name}parseValue(t){if(typeof t!="string"){const n=be(t);throw new ge(`Enum "${this.name}" cannot represent non-string value: ${n}.`+fs(this,n))}const r=this.getValue(t);if(r==null)throw new ge(`Value "${t}" does not exist in "${this.name}" enum.`+fs(this,t));return r.value}parseLiteral(t,r){if(t.kind!==W.ENUM){const o=Lt(t);throw new ge(`Enum "${this.name}" cannot represent non-enum value: ${o}.`+fs(this,o),{nodes:t})}const n=this.getValue(t.value);if(n==null){const o=Lt(t);throw new ge(`Value "${o}" does not exist in "${this.name}" enum.`+fs(this,o),{nodes:t})}return n.value}toConfig(){const t=Qa(this.getValues(),r=>r.name,r=>({description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function fs(e,t){const r=e.getValues().map(o=>o.name),n=ls(t,r);return is("the enum value",n)}function gd(e,t){return Or(t)||Be(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([r,n])=>(Or(n)||Be(!1,`${e}.${r} must refer to an object with a "value" key representing an internal value but got: ${be(n)}.`),{name:V_(r),description:n.description,value:n.value!==void 0?n.value:r,deprecationReason:n.deprecationReason,extensions:vt(n.extensions),astNode:n.astNode}))}class ii{constructor(t){var r,n;this.name=xt(t.name),this.description=t.description,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this.isOneOf=(n=t.isOneOf)!==null&&n!==void 0?n:!1,this._fields=G_.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=qt(this.getFields(),r=>({description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function G_(e){const t=pd(e.fields);return Or(t)||Be(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),qt(t,(r,n)=>(!("resolve"in r)||Be(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:xt(n),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:vt(r.extensions),astNode:r.astNode}))}function K_(e){return Xe(e.type)&&e.defaultValue===void 0}function vd(e,t){return e===t?!0:Xe(e)&&Xe(t)||Nt(e)&&Nt(t)?vd(e.ofType,t.ofType):!1}function ms(e,t,r){return t===r?!0:Xe(r)?Xe(t)?ms(e,t.ofType,r.ofType):!1:Xe(t)?ms(e,t.ofType,r):Nt(r)?Nt(t)?ms(e,t.ofType,r.ofType):!1:Nt(t)?!1:ld(r)&&(nt(t)||rt(t))&&e.isSubType(r,t)}const ci=2147483647,li=-2147483648,J_=new or({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=ln(e);if(typeof t=="boolean")return t?1:0;let r=t;if(typeof t=="string"&&t!==""&&(r=Number(t)),typeof r!="number"||!Number.isInteger(r))throw new ge(`Int cannot represent non-integer value: ${be(t)}`);if(r>ci||r<li)throw new ge("Int cannot represent non 32-bit signed integer value: "+be(t));return r},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new ge(`Int cannot represent non-integer value: ${be(e)}`);if(e>ci||e<li)throw new ge(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==W.INT)throw new ge(`Int cannot represent non-integer value: ${Lt(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>ci||t<li)throw new ge(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),Y_=new or({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=ln(e);if(typeof t=="boolean")return t?1:0;let r=t;if(typeof t=="string"&&t!==""&&(r=Number(t)),typeof r!="number"||!Number.isFinite(r))throw new ge(`Float cannot represent non numeric value: ${be(t)}`);return r},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new ge(`Float cannot represent non numeric value: ${be(e)}`);return e},parseLiteral(e){if(e.kind!==W.FLOAT&&e.kind!==W.INT)throw new ge(`Float cannot represent non numeric value: ${Lt(e)}`,e);return parseFloat(e.value)}}),Je=new or({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=ln(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new ge(`String cannot represent value: ${be(e)}`)},parseValue(e){if(typeof e!="string")throw new ge(`String cannot represent a non string value: ${be(e)}`);return e},parseLiteral(e){if(e.kind!==W.STRING)throw new ge(`String cannot represent a non string value: ${Lt(e)}`,{nodes:e});return e.value}}),lt=new or({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=ln(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new ge(`Boolean cannot represent a non boolean value: ${be(t)}`)},parseValue(e){if(typeof e!="boolean")throw new ge(`Boolean cannot represent a non boolean value: ${be(e)}`);return e},parseLiteral(e){if(e.kind!==W.BOOLEAN)throw new ge(`Boolean cannot represent a non boolean value: ${Lt(e)}`,{nodes:e});return e.value}}),bd=new or({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=ln(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new ge(`ID cannot represent value: ${be(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new ge(`ID cannot represent value: ${be(e)}`)},parseLiteral(e){if(e.kind!==W.STRING&&e.kind!==W.INT)throw new ge("ID cannot represent a non-string and non-integer value: "+Lt(e),{nodes:e});return e.value}}),ui=Object.freeze([Je,J_,Y_,lt,bd]);function W_(e){return ui.some(({name:t})=>e.name===t)}function ln(e){if(dr(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!dr(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function wd(e){return St(e,Jt)}class Jt{constructor(t){var r,n,o;this.name=xt(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(r=t.isRepeatable)!==null&&r!==void 0?r:!1,this.deprecationReason=t.deprecationReason,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],Array.isArray(t.locations)||Be(!1,`@${t.name} locations must be an Array.`);const s=(o=t.args)!==null&&o!==void 0?o:{};dr(s)&&!Array.isArray(s)||Be(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=md(s)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:yd(this.args),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const H_=new Jt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[ve.FIELD,ve.FRAGMENT_SPREAD,ve.INLINE_FRAGMENT],args:{if:{type:new je(lt),description:"Included when true."}}}),X_=new Jt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[ve.FIELD,ve.FRAGMENT_SPREAD,ve.INLINE_FRAGMENT],args:{if:{type:new je(lt),description:"Skipped when true."}}}),Q_="No longer supported",pi=new Jt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[ve.FIELD_DEFINITION,ve.ARGUMENT_DEFINITION,ve.INPUT_FIELD_DEFINITION,ve.ENUM_VALUE,ve.DIRECTIVE_DEFINITION],args:{reason:{type:Je,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Q_}}}),$d=new Jt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[ve.SCALAR],args:{url:{type:new je(Je),description:"The URL that specifies the behavior of this scalar."}}}),_d=new Jt({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[ve.INPUT_OBJECT],args:{}}),jr=Object.freeze([H_,X_,pi,$d,_d]);function Z_(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function un(e,t){if(Xe(t)){const r=un(e,t.ofType);return r?.kind===W.NULL?null:r}if(e===null)return{kind:W.NULL};if(e===void 0)return null;if(Nt(t)){const r=t.ofType;if(Z_(e)){const n=[];for(const o of e){const s=un(o,r);s!=null&&n.push(s)}return{kind:W.LIST,values:n}}return un(e,r)}if(dt(t)){if(!dr(e))return null;const r=[];for(const n of Object.values(t.getFields())){const o=un(e[n.name],n.type);o&&r.push({kind:W.OBJECT_FIELD,name:{kind:W.NAME,value:n.name},value:o})}return{kind:W.OBJECT,fields:r}}if(cd(t)){const r=t.serialize(e);if(r==null)return null;if(typeof r=="boolean")return{kind:W.BOOLEAN,value:r};if(typeof r=="number"&&Number.isFinite(r)){const n=String(r);return Ed.test(n)?{kind:W.INT,value:n}:{kind:W.FLOAT,value:n}}if(typeof r=="string")return bt(t)?{kind:W.ENUM,value:r}:t===bd&&Ed.test(r)?{kind:W.INT,value:r}:{kind:W.STRING,value:r};throw new TypeError(`Cannot convert value to AST: ${be(r)}.`)}Pt(!1,"Unexpected input type: "+be(t))}const Ed=/^-?(?:0|[1-9][0-9]*)$/,di=new Kt({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Je,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new je(new mt(new je(Mt))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new je(Mt),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Mt,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Mt,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new je(new mt(new je(Pd))),args:{includeDeprecated:{type:new je(lt),defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.getDirectives():e.getDirectives().filter(r=>r.deprecationReason==null)}})}),Pd=new Kt({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
68
|
+
|
|
69
|
+
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new je(Je),resolve:e=>e.name},description:{type:Je,resolve:e=>e.description},isRepeatable:{type:new je(lt),resolve:e=>e.isRepeatable},locations:{type:new je(new mt(new je(Sd))),resolve:e=>e.locations},args:{type:new je(new mt(new je(hs))),args:{includeDeprecated:{type:lt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}},isDeprecated:{type:new je(lt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Je,resolve:e=>e.deprecationReason}})}),Sd=new cn({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ve.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ve.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ve.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ve.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ve.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ve.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ve.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ve.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ve.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ve.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ve.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ve.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ve.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ve.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ve.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ve.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ve.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ve.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ve.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:ve.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),Mt=new Kt({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new je(Td),resolve(e){if(nr(e))return et.SCALAR;if(rt(e))return et.OBJECT;if(nt(e))return et.INTERFACE;if(Tt(e))return et.UNION;if(bt(e))return et.ENUM;if(dt(e))return et.INPUT_OBJECT;if(Nt(e))return et.LIST;if(Xe(e))return et.NON_NULL;Pt(!1,`Unexpected type: "${be(e)}".`)}},name:{type:Je,resolve:e=>"name"in e?e.name:void 0},description:{type:Je,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Je,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new mt(new je(Id)),args:{includeDeprecated:{type:lt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(rt(e)||nt(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new mt(new je(Mt)),resolve(e){if(rt(e)||nt(e))return e.getInterfaces()}},possibleTypes:{type:new mt(new je(Mt)),resolve(e,t,r,{schema:n}){if(ld(e))return n.getPossibleTypes(e)}},enumValues:{type:new mt(new je(xd)),args:{includeDeprecated:{type:lt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(bt(e)){const r=e.getValues();return t?r:r.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new mt(new je(hs)),args:{includeDeprecated:{type:lt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(dt(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},ofType:{type:Mt,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:lt,resolve:e=>{if(dt(e))return e.isOneOf}}})}),Id=new Kt({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new je(Je),resolve:e=>e.name},description:{type:Je,resolve:e=>e.description},args:{type:new je(new mt(new je(hs))),args:{includeDeprecated:{type:lt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}},type:{type:new je(Mt),resolve:e=>e.type},isDeprecated:{type:new je(lt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Je,resolve:e=>e.deprecationReason}})}),hs=new Kt({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new je(Je),resolve:e=>e.name},description:{type:Je,resolve:e=>e.description},type:{type:new je(Mt),resolve:e=>e.type},defaultValue:{type:Je,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:r}=e,n=un(r,t);return n?Lt(n):null}},isDeprecated:{type:new je(lt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Je,resolve:e=>e.deprecationReason}})}),xd=new Kt({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new je(Je),resolve:e=>e.name},description:{type:Je,resolve:e=>e.description},isDeprecated:{type:new je(lt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Je,resolve:e=>e.deprecationReason}})});var et;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(et||(et={}));const Td=new cn({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:et.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:et.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:et.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:et.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:et.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:et.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:et.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:et.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});new je(di),new je(Je),new je(Je);const fi=Object.freeze([di,Pd,Sd,Mt,Id,hs,xd,Td]);function Nd(e){return fi.some(({name:t})=>e.name===t)}function eE(e){return St(e,kd)}function tE(e){if(!eE(e))throw new Error(`Expected ${be(e)} to be a GraphQL schema.`);return e}class kd{constructor(t){var r,n;this.__validationErrors=t.assumeValid===!0?[]:void 0,dr(t)||Be(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||Be(!1,`"types" must be Array if provided but got: ${be(t.types)}.`),!t.directives||Array.isArray(t.directives)||Be(!1,`"directives" must be Array if provided but got: ${be(t.directives)}.`),this.description=t.description,this.extensions=vt(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(n=t.directives)!==null&&n!==void 0?n:jr;const o=new Set(t.types);if(t.types!=null)for(const s of t.types)o.delete(s),kt(s,o);this._queryType!=null&&kt(this._queryType,o),this._mutationType!=null&&kt(this._mutationType,o),this._subscriptionType!=null&&kt(this._subscriptionType,o);for(const s of this._directives)if(wd(s))for(const a of s.args)kt(a.type,o);kt(di,o),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of o){if(s==null)continue;const a=s.name;if(a||Be(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[a]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=s,nt(s)){for(const c of s.getInterfaces())if(nt(c)){let i=this._implementationsMap[c.name];i===void 0&&(i=this._implementationsMap[c.name]={objects:[],interfaces:[]}),i.interfaces.push(s)}}else if(rt(s)){for(const c of s.getInterfaces())if(nt(c)){let i=this._implementationsMap[c.name];i===void 0&&(i=this._implementationsMap[c.name]={objects:[],interfaces:[]}),i.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case gt.QUERY:return this.getQueryType();case gt.MUTATION:return this.getMutationType();case gt.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Tt(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){return this._implementationsMap[t.name]??{objects:[],interfaces:[]}}isSubType(t,r){let n=this._subTypeMap[t.name];if(n===void 0){if(n=Object.create(null),Tt(t))for(const o of t.getTypes())n[o.name]=!0;else{const o=this.getImplementations(t);for(const s of o.objects)n[s.name]=!0;for(const s of o.interfaces)n[s.name]=!0}this._subTypeMap[t.name]=n}return n[r.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(r=>r.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function kt(e,t){const r=U_(e);if(!t.has(r)){if(t.add(r),Tt(r))for(const n of r.getTypes())kt(n,t);else if(rt(r)||nt(r)){for(const n of r.getInterfaces())kt(n,t);for(const n of Object.values(r.getFields())){kt(n.type,t);for(const o of n.args)kt(o.type,t)}}else if(dt(r))for(const n of Object.values(r.getFields()))kt(n.type,t)}return t}function rE(e){if(tE(e),e.__validationErrors)return e.__validationErrors;const t=new nE(e);oE(t),sE(t),aE(t);const r=t.getErrors();return e.__validationErrors=r,r}class nE{constructor(t){this._errors=[],this.schema=t}reportError(t,r){const n=Array.isArray(r)?r.filter(Boolean):r;this._errors.push(new ge(t,{nodes:n}))}getErrors(){return this._errors}}function oE(e){const t=e.schema,r=t.getQueryType();if(!r)e.reportError("Query root type must be provided.",t.astNode);else if(!rt(r)){var n;e.reportError(`Query root type must be Object type, it cannot be ${be(r)}.`,(n=mi(t,gt.QUERY))!==null&&n!==void 0?n:r.astNode)}const o=t.getMutationType();if(o&&!rt(o)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${be(o)}.`,(s=mi(t,gt.MUTATION))!==null&&s!==void 0?s:o.astNode)}const a=t.getSubscriptionType();if(a&&!rt(a)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${be(a)}.`,(c=mi(t,gt.SUBSCRIPTION))!==null&&c!==void 0?c:a.astNode)}}function mi(e,t){var r;return(r=[e.astNode,...e.extensionASTNodes].flatMap(n=>{var o;return(o=n?.operationTypes)!==null&&o!==void 0?o:[]}).find(n=>n.operation===t))===null||r===void 0?void 0:r.type}function sE(e){for(const r of e.schema.getDirectives()){if(!wd(r)){e.reportError(`Expected directive but got: ${be(r)}.`,r?.astNode);continue}fr(e,r),r.locations.length===0&&e.reportError(`Directive @${r.name} must include 1 or more locations.`,r.astNode);for(const n of r.args)if(fr(e,n),ps(n.type)||e.reportError(`The type of @${r.name}(${n.name}:) must be Input Type but got: ${be(n.type)}.`,n.astNode),ds(n)&&n.deprecationReason!=null){var t;e.reportError(`Required argument @${r.name}(${n.name}:) cannot be deprecated.`,[hi(n.astNode),(t=n.astNode)===null||t===void 0?void 0:t.type])}}}function fr(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function aE(e){const t=hE(e),r=e.schema.getTypeMap();for(const n of Object.values(r)){if(!z_(n)){e.reportError(`Expected GraphQL named type but got: ${be(n)}.`,n.astNode);continue}Nd(n)||fr(e,n),rt(n)||nt(n)?(iE(e,n),cE(e,n)):Tt(n)?pE(e,n):bt(n)?dE(e,n):dt(n)&&(fE(e,n),t(n))}}function iE(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const a of r){if(fr(e,a),!id(a.type)){var n;e.reportError(`The type of ${t.name}.${a.name} must be Output Type but got: ${be(a.type)}.`,(n=a.astNode)===null||n===void 0?void 0:n.type)}for(const c of a.args){const i=c.name;if(fr(e,c),!ps(c.type)){var o;e.reportError(`The type of ${t.name}.${a.name}(${i}:) must be Input Type but got: ${be(c.type)}.`,(o=c.astNode)===null||o===void 0?void 0:o.type)}if(ds(c)&&c.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${a.name}(${i}:) cannot be deprecated.`,[hi(c.astNode),(s=c.astNode)===null||s===void 0?void 0:s.type])}}}}function cE(e,t){const r=Object.create(null);for(const n of t.getInterfaces()){if(!nt(n)){e.reportError(`Type ${be(t)} must only implement Interface types, it cannot implement ${be(n)}.`,pn(t,n));continue}if(t===n){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,pn(t,n));continue}if(r[n.name]){e.reportError(`Type ${t.name} can only implement ${n.name} once.`,pn(t,n));continue}r[n.name]=!0,uE(e,t,n),lE(e,t,n)}}function lE(e,t,r){const n=t.getFields();for(const i of Object.values(r.getFields())){const l=i.name,u=n[l];if(!u){e.reportError(`Interface field ${r.name}.${l} expected but ${t.name} does not provide it.`,[i.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!ms(e.schema,u.type,i.type)){var o,s;e.reportError(`Interface field ${r.name}.${l} expects type ${be(i.type)} but ${t.name}.${l} is type ${be(u.type)}.`,[(o=i.astNode)===null||o===void 0?void 0:o.type,(s=u.astNode)===null||s===void 0?void 0:s.type])}for(const f of i.args){const _=f.name,m=u.args.find(w=>w.name===_);if(!m){e.reportError(`Interface field argument ${r.name}.${l}(${_}:) expected but ${t.name}.${l} does not provide it.`,[f.astNode,u.astNode]);continue}if(!vd(f.type,m.type)){var a,c;e.reportError(`Interface field argument ${r.name}.${l}(${_}:) expects type ${be(f.type)} but ${t.name}.${l}(${_}:) is type ${be(m.type)}.`,[(a=f.astNode)===null||a===void 0?void 0:a.type,(c=m.astNode)===null||c===void 0?void 0:c.type])}}for(const f of u.args){const _=f.name;!i.args.find(m=>m.name===_)&&ds(f)&&e.reportError(`Object field ${t.name}.${l} includes required argument ${_} that is missing from the Interface field ${r.name}.${l}.`,[f.astNode,i.astNode])}}}function uE(e,t,r){const n=t.getInterfaces();for(const o of r.getInterfaces())n.includes(o)||e.reportError(o===t?`Type ${t.name} cannot implement ${r.name} because it would create a circular reference.`:`Type ${t.name} must implement ${o.name} because it is implemented by ${r.name}.`,[...pn(r,o),...pn(t,r)])}function pE(e,t){const r=t.getTypes();r.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const n=Object.create(null);for(const o of r){if(n[o.name]){e.reportError(`Union type ${t.name} can only include type ${o.name} once.`,Od(t,o.name));continue}n[o.name]=!0,rt(o)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${be(o)}.`,Od(t,String(o)))}}function dE(e,t){const r=t.getValues();r.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const n of r)fr(e,n)}function fE(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of r){if(fr(e,s),!ps(s.type)){var n;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${be(s.type)}.`,(n=s.astNode)===null||n===void 0?void 0:n.type)}if(K_(s)&&s.deprecationReason!=null){var o;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[hi(s.astNode),(o=s.astNode)===null||o===void 0?void 0:o.type])}t.isOneOf&&mE(t,s,e)}}function mE(e,t,r){if(Xe(t.type)){var n;r.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(n=t.astNode)===null||n===void 0?void 0:n.type)}t.defaultValue!==void 0&&r.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function hE(e){const t=Object.create(null),r=[],n=Object.create(null);return o;function o(s){if(t[s.name])return;t[s.name]=!0,n[s.name]=r.length;const a=Object.values(s.getFields());for(const c of a)if(Xe(c.type)&&dt(c.type.ofType)){const i=c.type.ofType,l=n[i.name];if(r.push(c),l===void 0)o(i);else{const u=r.slice(l),f=u.map(_=>_.name).join(".");e.reportError(`Cannot reference Input Object "${i.name}" within itself through a series of non-null fields: "${f}".`,u.map(_=>_.astNode))}r.pop()}n[s.name]=void 0}}function pn(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(o=>{var s;return(s=o.interfaces)!==null&&s!==void 0?s:[]}).filter(o=>o.name.value===t.name)}function Od(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(o=>{var s;return(s=o.types)!==null&&s!==void 0?s:[]}).filter(o=>o.name.value===t)}function hi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(r=>r.name.value===pi.name)}function yE(e){return e.kind===W.SCHEMA_DEFINITION||dn(e)||e.kind===W.DIRECTIVE_DEFINITION}function dn(e){return e.kind===W.SCALAR_TYPE_DEFINITION||e.kind===W.OBJECT_TYPE_DEFINITION||e.kind===W.INTERFACE_TYPE_DEFINITION||e.kind===W.UNION_TYPE_DEFINITION||e.kind===W.ENUM_TYPE_DEFINITION||e.kind===W.INPUT_OBJECT_TYPE_DEFINITION}function gE(e){return e.kind===W.SCHEMA_EXTENSION||e.kind===W.DIRECTIVE_EXTENSION||yi(e)}function yi(e){return e.kind===W.SCALAR_TYPE_EXTENSION||e.kind===W.OBJECT_TYPE_EXTENSION||e.kind===W.INTERFACE_TYPE_EXTENSION||e.kind===W.UNION_TYPE_EXTENSION||e.kind===W.ENUM_TYPE_EXTENSION||e.kind===W.INPUT_OBJECT_TYPE_EXTENSION}function vE(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():jr;for(const a of n)t[a.name]=a.args.map(c=>c.name);const o=e.getDocument().definitions;for(const a of o)if(a.kind===W.DIRECTIVE_DEFINITION){var s;const c=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=c.map(i=>i.name.value)}return{Directive(a){const c=a.name.value,i=t[c];if(a.arguments&&i)for(const l of a.arguments){const u=l.name.value;if(!i.includes(u)){const f=ls(u,i);e.reportError(new ge(`Unknown argument "${u}" on directive "@${c}".`+is(f),{nodes:l}))}}return!1}}}function bE(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():jr;for(const s of n)t[s.name]=s.locations;const o=e.getDocument().definitions;for(const s of o)s.kind===W.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,c,i,l){const u=s.name.value,f=t[u];if(!f){e.reportError(new ge(`Unknown directive "@${u}".`,{nodes:s}));return}const _=wE(l);_&&!f.includes(_)&&e.reportError(new ge(`Directive "@${u}" may not be used on ${_}.`,{nodes:s}))}}}function wE(e){const t=e[e.length-1];switch("kind"in t||Pt(!1),t.kind){case W.OPERATION_DEFINITION:return $E(t.operation);case W.FIELD:return ve.FIELD;case W.FRAGMENT_SPREAD:return ve.FRAGMENT_SPREAD;case W.INLINE_FRAGMENT:return ve.INLINE_FRAGMENT;case W.FRAGMENT_DEFINITION:return ve.FRAGMENT_DEFINITION;case W.VARIABLE_DEFINITION:return ve.VARIABLE_DEFINITION;case W.SCHEMA_DEFINITION:case W.SCHEMA_EXTENSION:return ve.SCHEMA;case W.SCALAR_TYPE_DEFINITION:case W.SCALAR_TYPE_EXTENSION:return ve.SCALAR;case W.OBJECT_TYPE_DEFINITION:case W.OBJECT_TYPE_EXTENSION:return ve.OBJECT;case W.FIELD_DEFINITION:return ve.FIELD_DEFINITION;case W.INTERFACE_TYPE_DEFINITION:case W.INTERFACE_TYPE_EXTENSION:return ve.INTERFACE;case W.UNION_TYPE_DEFINITION:case W.UNION_TYPE_EXTENSION:return ve.UNION;case W.ENUM_TYPE_DEFINITION:case W.ENUM_TYPE_EXTENSION:return ve.ENUM;case W.ENUM_VALUE_DEFINITION:return ve.ENUM_VALUE;case W.INPUT_OBJECT_TYPE_DEFINITION:case W.INPUT_OBJECT_TYPE_EXTENSION:return ve.INPUT_OBJECT;case W.INPUT_VALUE_DEFINITION:{const r=e[e.length-3];return"kind"in r||Pt(!1),r.kind===W.INPUT_OBJECT_TYPE_DEFINITION?ve.INPUT_FIELD_DEFINITION:ve.ARGUMENT_DEFINITION}case W.DIRECTIVE_DEFINITION:case W.DIRECTIVE_EXTENSION:return ve.DIRECTIVE_DEFINITION;default:Pt(!1,"Unexpected kind: "+be(t.kind))}}function $E(e){switch(e){case gt.QUERY:return ve.QUERY;case gt.MUTATION:return ve.MUTATION;case gt.SUBSCRIPTION:return ve.SUBSCRIPTION}}function _E(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);for(const s of e.getDocument().definitions)dn(s)&&(n[s.name.value]=!0);const o=[...Object.keys(r),...Object.keys(n)];return{NamedType(s,a,c,i,l){const u=s.name.value;if(!r[u]&&!n[u]){var f;const _=(f=l[2])!==null&&f!==void 0?f:c,m=_!=null&&EE(_);if(m&&jd.includes(u))return;const w=ls(u,m?jd.concat(o):o);e.reportError(new ge(`Unknown type "${u}".`+is(w),{nodes:s}))}}}}const jd=[...ui,...fi].map(e=>e.name);function EE(e){return"kind"in e&&(yE(e)||gE(e))}function PE(e){var t,r,n;const o=e.getSchema(),s=(t=(r=(n=o?.astNode)!==null&&n!==void 0?n:o?.getQueryType())!==null&&r!==void 0?r:o?.getMutationType())!==null&&t!==void 0?t:o?.getSubscriptionType();let a=0;return{SchemaDefinition(c){if(s){e.reportError(new ge("Cannot define a new schema within a schema extension.",{nodes:c}));return}a>0&&e.reportError(new ge("Must provide only one schema definition.",{nodes:c})),++a}}}function SE(e){const t=e.getSchema(),r=Object.create(null);for(const o of e.getDocument().definitions)dn(o)&&(r[o.name.value]=o);return{ScalarTypeExtension:n,ObjectTypeExtension:n,InterfaceTypeExtension:n,UnionTypeExtension:n,EnumTypeExtension:n,InputObjectTypeExtension:n};function n(o){const s=o.name.value,a=r[s],c=t?.getType(s);let i;if(a?i=IE[a.kind]:c&&(i=xE(c)),i){if(i!==o.kind){const l=TE(o.kind);e.reportError(new ge(`Cannot extend non-${l} type "${s}".`,{nodes:a?[a,o]:o}))}}else{const l=Object.keys({...r,...t?.getTypeMap()}),u=ls(s,l);e.reportError(new ge(`Cannot extend type "${s}" because it is not defined.`+is(u),{nodes:o.name}))}}}const IE={[W.SCALAR_TYPE_DEFINITION]:W.SCALAR_TYPE_EXTENSION,[W.OBJECT_TYPE_DEFINITION]:W.OBJECT_TYPE_EXTENSION,[W.INTERFACE_TYPE_DEFINITION]:W.INTERFACE_TYPE_EXTENSION,[W.UNION_TYPE_DEFINITION]:W.UNION_TYPE_EXTENSION,[W.ENUM_TYPE_DEFINITION]:W.ENUM_TYPE_EXTENSION,[W.INPUT_OBJECT_TYPE_DEFINITION]:W.INPUT_OBJECT_TYPE_EXTENSION};function xE(e){if(nr(e))return W.SCALAR_TYPE_EXTENSION;if(rt(e))return W.OBJECT_TYPE_EXTENSION;if(nt(e))return W.INTERFACE_TYPE_EXTENSION;if(Tt(e))return W.UNION_TYPE_EXTENSION;if(bt(e))return W.ENUM_TYPE_EXTENSION;if(dt(e))return W.INPUT_OBJECT_TYPE_EXTENSION;Pt(!1,"Unexpected type: "+be(e))}function TE(e){switch(e){case W.SCALAR_TYPE_EXTENSION:return"scalar";case W.OBJECT_TYPE_EXTENSION:return"object";case W.INTERFACE_TYPE_EXTENSION:return"interface";case W.UNION_TYPE_EXTENSION:return"union";case W.ENUM_TYPE_EXTENSION:return"enum";case W.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Pt(!1,"Unexpected kind: "+be(e))}}function NE(e){var t;const r=Object.create(null),n=e.getSchema(),o=(t=n?.getDirectives())!==null&&t!==void 0?t:jr;for(const c of o)r[c.name]=kr(c.args.filter(ds),i=>i.name);const s=e.getDocument().definitions;for(const c of s)if(c.kind===W.DIRECTIVE_DEFINITION){var a;const i=(a=c.arguments)!==null&&a!==void 0?a:[];r[c.name.value]=kr(i.filter(kE),l=>l.name.value)}return{Directive:{leave(c){const i=c.name.value,l=r[i];if(l){var u;const f=(u=c.arguments)!==null&&u!==void 0?u:[],_=new Set(f.map(m=>m.name.value));for(const[m,w]of Object.entries(l))if(!_.has(m)){const S=ni(w.type)?be(w.type):Lt(w.type);e.reportError(new ge(`Directive "@${i}" argument "${m}" of type "${S}" is required, but it was not provided.`,{nodes:c}))}}}}}}function kE(e){return e.type.kind===W.NON_NULL_TYPE&&e.defaultValue==null}function mr(e,t,r){if(e&&e.kind!==W.VARIABLE){if(Xe(t))return e.kind===W.NULL?void 0:mr(e,t.ofType,r);if(e.kind===W.NULL)return null;if(Nt(t)){const n=t.ofType;if(e.kind===W.LIST){const s=[];for(const a of e.values)if(Ad(a,r)){if(Xe(n))return;s.push(null)}else{const c=mr(a,n,r);if(c===void 0)return;s.push(c)}return s}const o=mr(e,n,r);return o===void 0?void 0:[o]}if(dt(t)){if(e.kind!==W.OBJECT)return;const n=Object.create(null),o=kr(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const a=o[s.name];if(!a||Ad(a.value,r)){if(s.defaultValue!==void 0)n[s.name]=s.defaultValue;else if(Xe(s.type))return;continue}const c=mr(a.value,s.type,r);if(c===void 0)return;n[s.name]=c}if(t.isOneOf){const s=Object.keys(n);if(s.length!==1||n[s[0]]===null)return}return n}if(cd(t)){let n;try{n=t.parseLiteral(e,r)}catch{return}return n===void 0?void 0:n}Pt(!1,"Unexpected input type: "+be(t))}}function Ad(e,t){return e.kind===W.VARIABLE&&t==null}function OE(e,t,r){var n;const o=Object.create(null),s=(n=t.arguments)!==null&&n!==void 0?n:[],a=kr(s,c=>c.name.value);for(const c of e.args){const i=c.name,l=c.type,u=a[i];if(!u){if(c.defaultValue!==void 0)o[i]=c.defaultValue;else if(Xe(l))throw new ge(`Argument "${i}" of required type "${be(l)}" was not provided.`,{nodes:t});continue}const f=u.value;let _=f.kind===W.NULL;if(f.kind===W.VARIABLE){const w=f.name.value;{if(c.defaultValue!==void 0)o[i]=c.defaultValue;else if(Xe(l))throw new ge(`Argument "${i}" of required type "${be(l)}" was provided the variable "$${w}" which was not provided a runtime value.`,{nodes:f});continue}}if(_&&Xe(l))throw new ge(`Argument "${i}" of non-null type "${be(l)}" must not be null.`,{nodes:f});const m=mr(f,l,r);if(m===void 0)throw new ge(`Argument "${i}" has invalid value ${Lt(f)}.`,{nodes:f});o[i]=m}return{...o}}function gi(e,t,r){var n;const o=(n=t.directives)===null||n===void 0?void 0:n.find(s=>s.name.value===e.name);if(o)return OE(e,o,r)}function Cd(e,t){const r=new Map;for(const n of e){const o=t(n),s=r.get(o);s===void 0?r.set(o,[n]):s.push(n)}return r}function jE(e){return{DirectiveDefinition(n){var o;const s=(o=n.arguments)!==null&&o!==void 0?o:[];return r(`@${n.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(n){var o;const s=n.name.value,a=(o=n.fields)!==null&&o!==void 0?o:[];for(const i of a){var c;const l=i.name.value,u=(c=i.arguments)!==null&&c!==void 0?c:[];r(`${s}.${l}`,u)}return!1}function r(n,o){const s=Cd(o,a=>a.name.value);for(const[a,c]of s)c.length>1&&e.reportError(new ge(`Argument "${n}(${a}:)" can only be defined once.`,{nodes:c.map(i=>i.name)}));return!1}}function AE(e){return{Field:t,Directive:t};function t(r){var n;const o=(n=r.arguments)!==null&&n!==void 0?n:[],s=Cd(o,a=>a.name.value);for(const[a,c]of s)c.length>1&&e.reportError(new ge(`There can be only one argument named "${a}".`,{nodes:c.map(i=>i.name)}))}}function CE(e){const t=Object.create(null),r=e.getSchema();return{DirectiveDefinition(n){const o=n.name.value;if(r!=null&&r.getDirective(o)){e.reportError(new ge(`Directive "@${o}" already exists in the schema. It cannot be redefined.`,{nodes:n.name}));return}return t[o]?e.reportError(new ge(`There can be only one directive named "@${o}".`,{nodes:[t[o],n.name]})):t[o]=n.name,!1}}}function RE(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():jr;for(const i of n)t[i.name]=!i.isRepeatable;const o=e.getDocument().definitions;for(const i of o)i.kind===W.DIRECTIVE_DEFINITION&&(t[i.name.value]=!i.repeatable);const s=Object.create(null),a=Object.create(null),c=Object.create(null);return{enter(i){if(!("directives"in i)||!i.directives)return;let l;if(i.kind===W.SCHEMA_DEFINITION||i.kind===W.SCHEMA_EXTENSION)l=s;else if(dn(i)||yi(i)){const u=i.name.value;l=a[u],l===void 0&&(a[u]=l=Object.create(null))}else if(i.kind===W.DIRECTIVE_DEFINITION||i.kind===W.DIRECTIVE_EXTENSION){const u=i.name.value;l=c[u],l===void 0&&(c[u]=l=Object.create(null))}else l=Object.create(null);for(const u of i.directives){const f=u.name.value;t[f]&&(l[f]?e.reportError(new ge(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],u]})):l[f]=u)}}}}function DE(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{EnumTypeDefinition:o,EnumTypeExtension:o};function o(s){var a;const c=s.name.value;n[c]||(n[c]=Object.create(null));const i=(a=s.values)!==null&&a!==void 0?a:[],l=n[c];for(const u of i){const f=u.name.value,_=r[c];bt(_)&&_.getValue(f)?e.reportError(new ge(`Enum value "${c}.${f}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:u.name})):l[f]?e.reportError(new ge(`Enum value "${c}.${f}" can only be defined once.`,{nodes:[l[f],u.name]})):l[f]=u.name}return!1}}function qE(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{InputObjectTypeDefinition:o,InputObjectTypeExtension:o,InterfaceTypeDefinition:o,InterfaceTypeExtension:o,ObjectTypeDefinition:o,ObjectTypeExtension:o};function o(s){var a;const c=s.name.value;n[c]||(n[c]=Object.create(null));const i=(a=s.fields)!==null&&a!==void 0?a:[],l=n[c];for(const u of i){const f=u.name.value;LE(r[c],f)?e.reportError(new ge(`Field "${c}.${f}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:u.name})):l[f]?e.reportError(new ge(`Field "${c}.${f}" can only be defined once.`,{nodes:[l[f],u.name]})):l[f]=u.name}return!1}}function LE(e,t){return rt(e)||nt(e)||dt(e)?e.getFields()[t]!=null:!1}function ME(e){const t=[];let r=Object.create(null);return{ObjectValue:{enter(){t.push(r),r=Object.create(null)},leave(){const n=t.pop();n||Pt(!1),r=n}},ObjectField(n){const o=n.name.value;r[o]?e.reportError(new ge(`There can be only one input field named "${o}".`,{nodes:[r[o],n.name]})):r[o]=n.name}}}function VE(e){const t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(s){var a;const c=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const i of c){const l=i.operation,u=r[l];n[l]?e.reportError(new ge(`Type for ${l} already defined in the schema. It cannot be redefined.`,{nodes:i})):u?e.reportError(new ge(`There can be only one ${l} type in schema.`,{nodes:[u,i]})):r[l]=i}return!1}}function FE(e){const t=Object.create(null),r=e.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(o){const s=o.name.value;if(r!=null&&r.getType(s)){e.reportError(new ge(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:o.name}));return}return t[s]?e.reportError(new ge(`There can be only one type named "${s}".`,{nodes:[t[s],o.name]})):t[s]=o.name,!1}}const zE=Object.freeze([PE,VE,FE,DE,qE,jE,CE,_E,bE,RE,SE,vE,AE,ME,NE]);class UE{constructor(t,r){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=r}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let r;if(this._fragments)r=this._fragments;else{r=Object.create(null);for(const n of this.getDocument().definitions)n.kind===W.FRAGMENT_DEFINITION&&(r[n.name.value]=n);this._fragments=r}return r[t]}getFragmentSpreads(t){let r=this._fragmentSpreads.get(t);if(!r){r=[];const n=[t];let o;for(;o=n.pop();)for(const s of o.selections)s.kind===W.FRAGMENT_SPREAD?r.push(s):s.selectionSet&&n.push(s.selectionSet);this._fragmentSpreads.set(t,r)}return r}getRecursivelyReferencedFragments(t){let r=this._recursivelyReferencedFragments.get(t);if(!r){r=[];const n=Object.create(null),o=[t.selectionSet];let s;for(;s=o.pop();)for(const a of this.getFragmentSpreads(s)){const c=a.name.value;if(n[c]!==!0){n[c]=!0;const i=this.getFragment(c);i&&(r.push(i),o.push(i.selectionSet))}}this._recursivelyReferencedFragments.set(t,r)}return r}}class BE extends UE{constructor(t,r,n){super(t,n),this._schema=r}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}qt(Ha,e=>e.filter(t=>t!=="description"));function GE(e,t,r=zE){const n=[],o=new BE(e,t,a=>{n.push(a)}),s=r.map(a=>a(o));return ei(e,sd(s)),n}function KE(e){const t=GE(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(`
|
|
70
|
+
|
|
71
|
+
`))}function JE(e,t,r){var n,o,s,a;const c=[],i=Object.create(null),l=Object.create(null),u=[];let f;const _=[];for(const T of t.definitions)if(T.kind===W.SCHEMA_DEFINITION)f=T;else if(T.kind===W.SCHEMA_EXTENSION)_.push(T);else if(dn(T))c.push(T);else if(yi(T)){const M=T.name.value,U=i[M];i[M]=U?U.concat([T]):[T]}else if(T.kind===W.DIRECTIVE_DEFINITION)u.push(T);else if(T.kind===W.DIRECTIVE_EXTENSION){const M=T.name.value,U=l[M];l[M]=U?U.concat([T]):[T]}if(Object.keys(i).length===0&&c.length===0&&Object.keys(l).length===0&&u.length===0&&_.length===0&&f==null)return e;const m=Object.create(null);for(const T of e.types)m[T.name]=h(T);for(const T of c){var w;const M=T.name.value;m[M]=(w=Rd[M])!==null&&w!==void 0?w:I(T)}const S=Object.create(null);for(const T of e.directives)S[T.name]=le(T);const b={query:e.query&&d(e.query),mutation:e.mutation&&d(e.mutation),subscription:e.subscription&&d(e.subscription),...f&&K([f]),...K(_)},$=Object.values(S);return{description:(n=f)===null||n===void 0||(o=n.description)===null||o===void 0?void 0:o.value,...b,types:Object.values(m),directives:[...$.map(P),...u.map(ce)],extensions:Object.create(null),astNode:(s=f)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(_),assumeValid:(a=r?.assumeValid)!==null&&a!==void 0?a:!1};function y(T){return Nt(T)?new mt(y(T.ofType)):Xe(T)?new je(y(T.ofType)):d(T)}function d(T){return m[T.name]}function P(T){const M=T.toConfig();return new Jt({...M,args:qt(M.args,L)})}function h(T){if(Nd(T)||W_(T))return T;if(nr(T))return O(T);if(rt(T))return A(T);if(nt(T))return q(T);if(Tt(T))return z(T);if(bt(T))return E(T);if(dt(T))return g(T);Pt(!1,"Unexpected type: "+be(T))}function g(T){var M;const U=T.toConfig(),J=(M=i[U.name])!==null&&M!==void 0?M:[];return new ii({...U,fields:()=>({...qt(U.fields,re=>({...re,type:y(re.type)})),...k(J)}),extensionASTNodes:U.extensionASTNodes.concat(J)})}function E(T){var M;const U=T.toConfig(),J=(M=i[T.name])!==null&&M!==void 0?M:[];return new cn({...U,values:{...U.values,...V(J)},extensionASTNodes:U.extensionASTNodes.concat(J)})}function O(T){var M;const U=T.toConfig(),J=(M=i[U.name])!==null&&M!==void 0?M:[];let re=U.specifiedByURL;for(const N of J){var x;re=(x=Dd(N))!==null&&x!==void 0?x:re}return new or({...U,specifiedByURL:re,extensionASTNodes:U.extensionASTNodes.concat(J)})}function A(T){var M;const U=T.toConfig(),J=(M=i[U.name])!==null&&M!==void 0?M:[];return new Kt({...U,interfaces:()=>[...T.getInterfaces().map(d),...j(J)],fields:()=>({...qt(U.fields,F),..._e(J)}),extensionASTNodes:U.extensionASTNodes.concat(J)})}function q(T){var M;const U=T.toConfig(),J=(M=i[U.name])!==null&&M!==void 0?M:[];return new si({...U,interfaces:()=>[...T.getInterfaces().map(d),...j(J)],fields:()=>({...qt(U.fields,F),..._e(J)}),extensionASTNodes:U.extensionASTNodes.concat(J)})}function z(T){var M;const U=T.toConfig(),J=(M=i[U.name])!==null&&M!==void 0?M:[];return new ai({...U,types:()=>[...T.getTypes().map(d),...v(J)],extensionASTNodes:U.extensionASTNodes.concat(J)})}function F(T){return{...T,type:y(T.type),args:T.args&&qt(T.args,L)}}function L(T){return{...T,type:y(T.type)}}function K(T){const M={};for(const J of T){var U;const re=(U=J.operationTypes)!==null&&U!==void 0?U:[];for(const x of re)M[x.operation]=pe(x.type)}return M}function le(T){var M,U;const J=T.toConfig(),re=(M=l[J.name])!==null&&M!==void 0?M:[],x=(U=J.deprecationReason)!==null&&U!==void 0?U:re.map(N=>hr(N)).find(N=>N!=null);return new Jt({...J,deprecationReason:x,extensionASTNodes:J.extensionASTNodes.concat(re)})}function pe(T){var M;const U=T.name.value,J=(M=Rd[U])!==null&&M!==void 0?M:m[U];if(J===void 0)throw new Error(`Unknown type: "${U}".`);return J}function Se(T){return T.kind===W.LIST_TYPE?new mt(Se(T.type)):T.kind===W.NON_NULL_TYPE?new je(Se(T.type)):pe(T)}function ce(T){var M,U,J;const re=(M=l[T.name.value])!==null&&M!==void 0?M:[],x=(U=hr(T))!==null&&U!==void 0?U:re.map(N=>hr(N)).find(N=>N!=null);return new Jt({name:T.name.value,description:(J=T.description)===null||J===void 0?void 0:J.value,locations:T.locations.map(({value:N})=>N),isRepeatable:T.repeatable,args:R(T.arguments),deprecationReason:x,astNode:T,extensionASTNodes:re})}function _e(T){const M=Object.create(null);for(const re of T){var U;const x=(U=re.fields)!==null&&U!==void 0?U:[];for(const N of x){var J;M[N.name.value]={type:Se(N.type),description:(J=N.description)===null||J===void 0?void 0:J.value,args:R(N.arguments),deprecationReason:hr(N),astNode:N}}}return M}function R(T){const M=T??[],U=Object.create(null);for(const re of M){var J;const x=Se(re.type);U[re.name.value]={type:x,description:(J=re.description)===null||J===void 0?void 0:J.value,defaultValue:mr(re.defaultValue,x),deprecationReason:hr(re),astNode:re}}return U}function k(T){const M=Object.create(null);for(const re of T){var U;const x=(U=re.fields)!==null&&U!==void 0?U:[];for(const N of x){var J;const D=Se(N.type);M[N.name.value]={type:D,description:(J=N.description)===null||J===void 0?void 0:J.value,defaultValue:mr(N.defaultValue,D),deprecationReason:hr(N),astNode:N}}}return M}function V(T){const M=Object.create(null);for(const re of T){var U;const x=(U=re.values)!==null&&U!==void 0?U:[];for(const N of x){var J;M[N.name.value]={description:(J=N.description)===null||J===void 0?void 0:J.value,deprecationReason:hr(N),astNode:N}}}return M}function j(T){return T.flatMap(M=>{var U,J;return(U=(J=M.interfaces)===null||J===void 0?void 0:J.map(pe))!==null&&U!==void 0?U:[]})}function v(T){return T.flatMap(M=>{var U,J;return(U=(J=M.types)===null||J===void 0?void 0:J.map(pe))!==null&&U!==void 0?U:[]})}function I(T){var M;const U=T.name.value,J=(M=i[U])!==null&&M!==void 0?M:[];switch(T.kind){case W.OBJECT_TYPE_DEFINITION:{var re;const oe=[T,...J];return new Kt({name:U,description:(re=T.description)===null||re===void 0?void 0:re.value,interfaces:()=>j(oe),fields:()=>_e(oe),astNode:T,extensionASTNodes:J})}case W.INTERFACE_TYPE_DEFINITION:{var x;const oe=[T,...J];return new si({name:U,description:(x=T.description)===null||x===void 0?void 0:x.value,interfaces:()=>j(oe),fields:()=>_e(oe),astNode:T,extensionASTNodes:J})}case W.ENUM_TYPE_DEFINITION:{var N;const oe=[T,...J];return new cn({name:U,description:(N=T.description)===null||N===void 0?void 0:N.value,values:V(oe),astNode:T,extensionASTNodes:J})}case W.UNION_TYPE_DEFINITION:{var D;const oe=[T,...J];return new ai({name:U,description:(D=T.description)===null||D===void 0?void 0:D.value,types:()=>v(oe),astNode:T,extensionASTNodes:J})}case W.SCALAR_TYPE_DEFINITION:{var B;return new or({name:U,description:(B=T.description)===null||B===void 0?void 0:B.value,specifiedByURL:Dd(T),astNode:T,extensionASTNodes:J})}case W.INPUT_OBJECT_TYPE_DEFINITION:{var H;const oe=[T,...J];return new ii({name:U,description:(H=T.description)===null||H===void 0?void 0:H.value,fields:()=>k(oe),astNode:T,extensionASTNodes:J,isOneOf:YE(T)})}}}}const Rd=kr([...ui,...fi],e=>e.name);function hr(e){return gi(pi,e)?.reason}function Dd(e){return gi($d,e)?.url}function YE(e){return!!gi(_d,e)}function WE(e,t){e!=null&&e.kind===W.DOCUMENT||Be(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&KE(e);const r=JE({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const o of r.types)switch(o.name){case"Query":r.query=o;break;case"Mutation":r.mutation=o;break;case"Subscription":r.subscription=o;break}const n=[...r.directives,...jr.filter(o=>r.directives.every(s=>s.name!==o.name))];return new kd({...r,directives:n})}const HE=()=>({Document:{enter:(e,t)=>{let r;try{r=WE(e,{assumeValidSDL:!1})}catch(n){XE(n,t);return}for(const n of rE(r))qd(n,t)}}});function XE(e,t){if(e instanceof ge)qd(e,t);else if(e instanceof Error)t.report({message:e.message});else throw e}function qd(e,t){const r=e.locations?.[0];t.report({message:e.message,node:e.nodes?.[0],loc:r?{start:{line:r.line,col:r.column}}:void 0})}const QE=()=>{const e=(t,r)=>{(!t.description||t.description.value.trim()==="")&&r.report({message:`Type \`${t.name.value}\` should have a non-empty description.`,node:t.name})};return{ObjectTypeDefinition:e,InterfaceTypeDefinition:e,EnumTypeDefinition:e,InputObjectTypeDefinition:e,UnionTypeDefinition:e,ScalarTypeDefinition:e}},ZE={struct:HE,assertions:a_,"no-unused-types":f_,"type-description":QE},vi=()=>({Info(e,{report:t}){e.license||t({message:Ho("Info","license"),location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/oas/info-license"})}}),Ld=()=>({Paths(e,{report:t,location:r}){const n=[];for(const o of Object.keys(e)){const s=n.find(a=>eP(a,o));s&&t({message:`Paths should resolve unambiguously. Found two ambiguous paths: \`${s}\` and \`${o}\`.`,location:r.child([o]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-ambiguous-paths"}),n.push(o)}}});function eP(e,t){const r=e.split("/"),n=t.split("/");if(r.length!==n.length)return!1;let o=0,s=0,a=!0;for(let c=0;c<r.length;c++){const i=r[c].match(/^{.+?}$/),l=n[c].match(/^{.+?}$/);if(i||l){i&&o++,l&&s++;continue}else r[c]!==n[c]&&(a=!1)}return a&&o===s}function Md(e){return e.startsWith("{")&&e.endsWith("}")}function tP(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(Pn).map(n=>n.toLocaleLowerCase()),r=e.split(/([A-Z]{2,})/).filter(n=>n&&n===n.toUpperCase()).map(n=>n.toLocaleLowerCase());return new Set([...t,...r])}const rP=["get","head","post","put","patch","delete","options","trace"],Vd=({splitIntoWords:e,excludedPaths:t})=>({PathItem(r,{key:n,report:o,location:s}){const a=n.toString();if(!a.startsWith("/")||t?.some(i=>a===i))return;const c=a.split("/");for(const i of c){if(!i||Md(i))continue;const l=u=>e?tP(i).has(u):i.toLocaleLowerCase().includes(u);for(const u of rP)l(u)&&o({message:`path \`${a}\` should not contain http verb ${u}`,location:s.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-http-verbs-in-paths"})}}}),Fd=()=>({Paths(e,{report:t,location:r}){const n=new Map;for(const o of Object.keys(e)){const s=o.replace(/{.+?}/g,"{VARIABLE}"),a=n.get(s);a?t({message:`The path already exists which differs only by path parameter name(s): \`${a}\` and \`${o}\`.`,location:r.child([o]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-identical-paths"}):n.set(s,o)}}});var bi={exports:{}},ys={},gs={},zd;function nP(){if(zd)return gs;zd=1,Object.defineProperty(gs,"__esModule",{value:!0});const e=Ee(),t=e.operators,r={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:t.LTE,fail:t.GT},{okStr:"<",ok:t.LT,fail:t.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:t.GTE,fail:t.LT},{okStr:">",ok:t.GT,fail:t.LTE}]}},n={message:a=>(0,e.str)`must be ${s(a).okStr} ${a.schemaCode}`,params:a=>(0,e._)`{comparison: ${s(a).okStr}, limit: ${a.schemaCode}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{data:c,schemaCode:i}=a;a.fail$data((0,e._)`${c} ${s(a).fail} ${i} || isNaN(${c})`)}};function s(a){var c;const i=a.keyword,l=!((c=a.parentSchema)===null||c===void 0)&&c[r[i].exclusive]?1:0;return r[i].ops[l]}return gs.default=o,gs}var vs={},Ud;function oP(){if(Ud)return vs;Ud=1,Object.defineProperty(vs,"__esModule",{value:!0});const e={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},t={keyword:Object.keys(e),type:"number",schemaType:"boolean",code({keyword:r,parentSchema:n}){const o=e[r];if(n[o]===void 0)throw new Error(`${r} can only be used with ${o}`)}};return vs.default=t,vs}var Bd;function sP(){if(Bd)return ys;Bd=1,Object.defineProperty(ys,"__esModule",{value:!0});const e=eo(),t=qu(),r=Qu(),n=tp(),o=hu(),s=nP(),a=oP(),c=["title","description","default"],i=["$schema","id","$defs",{keyword:"$comment"},"definitions",e.default],l=[...o.default.slice(1),s.default,a.default],u=[i,l,(0,t.default)(),n.default,c,r.default];return ys.default=u,ys}const aP="http://json-schema.org/draft-04/schema#",iP="http://json-schema.org/draft-04/schema#",cP="Core schema meta-schema",lP={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},uP="object",pP={id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dP={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},fP={id:aP,$schema:iP,description:cP,definitions:lP,type:uP,properties:pP,dependencies:dP,default:{}};var Gd;function mP(){return Gd||(Gd=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=t.Ajv=void 0;const r=Hl(),n=sP(),o=ap(),s=fP,a=["/properties"],c="http://json-schema.org/draft-04/schema";class i extends r.default{constructor(w={}){super({...w,schemaId:"id",dynamicRef:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(w,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=i,e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var l=Yr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Ee();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=Jn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var _=Wr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(bi,bi.exports)),bi.exports}var hP=mP();const yP=Vr(hP);var wi={exports:{}},Kd={},Jd;function gP(){return Jd||(Jd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,F){return{validate:z,compare:F}}e.fullFormats={date:t(s,a),time:t(i(!0),l),"date-time":t(_(!0),m),"iso-time":t(i(),u),"iso-date-time":t(_(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:q,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:d,int32:{type:"number",validate:g},int64:{type:"number",validate:E},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(z){return z%4===0&&(z%100!==0||z%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(z){const F=n.exec(z);if(!F)return!1;const L=+F[1],K=+F[2],le=+F[3];return K>=1&&K<=12&&le>=1&&le<=(K===2&&r(L)?29:o[K])}function a(z,F){if(z&&F)return z>F?1:z<F?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function i(z){return function(F){const L=c.exec(F);if(!L)return!1;const K=+L[1],le=+L[2],pe=+L[3],Se=L[4],ce=L[5]==="-"?-1:1,_e=+(L[6]||0),R=+(L[7]||0);if(_e>23||R>59||z&&!Se)return!1;if(K<=23&&le<=59&&pe<60)return!0;const k=le-R*ce,V=K-_e*ce-(k<0?1:0);return(V===23||V===-1)&&(k===59||k===-1)&&pe<61}}function l(z,F){if(!(z&&F))return;const L=new Date("2020-01-01T"+z).valueOf(),K=new Date("2020-01-01T"+F).valueOf();if(L&&K)return L-K}function u(z,F){if(!(z&&F))return;const L=c.exec(z),K=c.exec(F);if(L&&K)return z=L[1]+L[2]+L[3],F=K[1]+K[2]+K[3],z>F?1:z<F?-1:0}const f=/t|\s/i;function _(z){const F=i(z);return function(L){const K=L.split(f);return K.length===2&&s(K[0])&&F(K[1])}}function m(z,F){if(!(z&&F))return;const L=new Date(z).valueOf(),K=new Date(F).valueOf();if(L&&K)return L-K}function w(z,F){if(!(z&&F))return;const[L,K]=z.split(f),[le,pe]=F.split(f),Se=a(L,le);if(Se!==void 0)return Se||l(K,pe)}const S=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function $(z){return S.test(z)&&b.test(z)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function d(z){return y.lastIndex=0,y.test(z)}const P=-2147483648,h=2**31-1;function g(z){return Number.isInteger(z)&&z<=h&&z>=P}function E(z){return Number.isInteger(z)}function O(){return!0}const A=/[^\\]\\Z/;function q(z){if(A.test(z))return!1;try{return!0}catch{return!1}}})(Kd)),Kd}var Yd={},$i={exports:{}},Wd={},Yt={},yr={},Hd={},Xd={},Qd={},Zd;function bs(){return Zd||(Zd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((d,P)=>`${d}${P}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((d,P)=>(P instanceof r&&(d[P.str]=(d[P.str]||0)+1),d),{})}}e._Code=n,e.nil=new n("");function o($,...y){const d=[$[0]];let P=0;for(;P<y.length;)c(d,y[P]),d.push($[++P]);return new n(d)}e._=o;const s=new n("+");function a($,...y){const d=[m($[0])];let P=0;for(;P<y.length;)d.push(s),c(d,y[P]),d.push(s,m($[++P]));return i(d),new n(d)}e.str=a;function c($,y){y instanceof n?$.push(...y._items):y instanceof r?$.push(y):$.push(f(y))}e.addCodeArg=c;function i($){let y=1;for(;y<$.length-1;){if($[y]===s){const d=l($[y-1],$[y+1]);if(d!==void 0){$.splice(y-1,3,d);continue}$[y++]="+"}y++}}function l($,y){if(y==='""')return $;if($==='""')return y;if(typeof $=="string")return y instanceof r||$[$.length-1]!=='"'?void 0:typeof y!="string"?`${$.slice(0,-1)}${y}"`:y[0]==='"'?$.slice(0,-1)+y.slice(1):void 0;if(typeof y=="string"&&y[0]==='"'&&!($ instanceof r))return`"${$}${y.slice(1)}`}function u($,y){return y.emptyStr()?$:$.emptyStr()?y:a`${$}${y}`}e.strConcat=u;function f($){return typeof $=="number"||typeof $=="boolean"||$===null?$:m(Array.isArray($)?$.join(","):$)}function _($){return new n(m($))}e.stringify=_;function m($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function w($){return typeof $=="string"&&e.IDENTIFIER.test($)?new n(`.${$}`):o`[${$}]`}e.getProperty=w;function S($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new n(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=S;function b($){return new n($.toString())}e.regexpCode=b})(Qd)),Qd}var ef={},tf;function rf(){return tf||(tf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=bs();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=o;class s extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:f}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${f}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class c extends o{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(l),{prefix:m}=_,w=(f=u.key)!==null&&f!==void 0?f:u.ref;let S=this._values[m];if(S){const y=S.get(w);if(y)return y}else S=this._values[m]=new Map;S.set(w,_);const b=this._scope[m]||(this._scope[m]=[]),$=b.length;return b[$]=u.ref,_.setValue(u,{property:m,itemIndex:$}),_}getValue(l,u){const f=this._values[l];if(f)return f.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,t._)`${l}${f.scopePath}`})}scopeCode(l=this._values,u,f){return this._reduceValues(l,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},u,f)}_reduceValues(l,u,f={},_){let m=t.nil;for(const w in l){const S=l[w];if(!S)continue;const b=f[w]=f[w]||new Map;S.forEach($=>{if(b.has($))return;b.set($,n.Started);let y=u($);if(y){const d=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${d} ${$} = ${y};${this.opts._n}`}else if(y=_?.($))m=(0,t._)`${m}${y}${this.opts._n}`;else throw new r($);b.set($,n.Completed)})}return m}}e.ValueScope=c})(ef)),ef}var nf;function Ie(){return nf||(nf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=bs(),r=rf();var n=bs();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=rf();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(v,I){return this}}class a extends s{constructor(v,I,T){super(),this.varKind=v,this.name=I,this.rhs=T}render({es5:v,_n:I}){const T=v?r.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${M};`+I}optimizeNames(v,I){if(v[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,v,I)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(v,I,T){super(),this.lhs=v,this.rhs=I,this.sideEffects=T}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,I){if(!(this.lhs instanceof t.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,v,I),this}get names(){const v=this.lhs instanceof t.Name?{}:{...this.lhs.names};return L(v,this.rhs)}}class i extends c{constructor(v,I,T,M){super(v,T,M),this.op=I}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class l extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class u extends s{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class f extends s{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class _ extends s{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,I){return this.code=K(this.code,v,I),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends s{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((I,T)=>I+T.render(v),"")}optimizeNodes(){const{nodes:v}=this;let I=v.length;for(;I--;){const T=v[I].optimizeNodes();Array.isArray(T)?v.splice(I,1,...T):T?v[I]=T:v.splice(I,1)}return v.length>0?this:void 0}optimizeNames(v,I){const{nodes:T}=this;let M=T.length;for(;M--;){const U=T[M];U.optimizeNames(v,I)||(le(v,U.names),T.splice(M,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((v,I)=>F(v,I.names),{})}}class w extends m{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class S extends m{}class b extends w{}b.kind="else";class $ extends w{constructor(v,I){super(I),this.condition=v}render(v){let I=`if(${this.condition})`+super.render(v);return this.else&&(I+="else "+this.else.render(v)),I}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let I=this.else;if(I){const T=I.optimizeNodes();I=this.else=Array.isArray(T)?new b(T):T}if(I)return v===!1?I instanceof $?I:I.nodes:this.nodes.length?this:new $(pe(v),I instanceof $?[I]:I.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,I){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(v,I),!!(super.optimizeNames(v,I)||this.else))return this.condition=K(this.condition,v,I),this}get names(){const v=super.names;return L(v,this.condition),this.else&&F(v,this.else.names),v}}$.kind="if";class y extends w{}y.kind="for";class d extends y{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,I){if(super.optimizeNames(v,I))return this.iteration=K(this.iteration,v,I),this}get names(){return F(super.names,this.iteration.names)}}class P extends y{constructor(v,I,T,M){super(),this.varKind=v,this.name=I,this.from=T,this.to=M}render(v){const I=v.es5?r.varKinds.var:this.varKind,{name:T,from:M,to:U}=this;return`for(${I} ${T}=${M}; ${T}<${U}; ${T}++)`+super.render(v)}get names(){const v=L(super.names,this.from);return L(v,this.to)}}class h extends y{constructor(v,I,T,M){super(),this.loop=v,this.varKind=I,this.name=T,this.iterable=M}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,I){if(super.optimizeNames(v,I))return this.iterable=K(this.iterable,v,I),this}get names(){return F(super.names,this.iterable.names)}}class g extends w{constructor(v,I,T){super(),this.name=v,this.args=I,this.async=T}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}g.kind="func";class E extends m{render(v){return"return "+super.render(v)}}E.kind="return";class O extends w{render(v){let I="try"+super.render(v);return this.catch&&(I+=this.catch.render(v)),this.finally&&(I+=this.finally.render(v)),I}optimizeNodes(){var v,I;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(I=this.finally)===null||I===void 0||I.optimizeNodes(),this}optimizeNames(v,I){var T,M;return super.optimizeNames(v,I),(T=this.catch)===null||T===void 0||T.optimizeNames(v,I),(M=this.finally)===null||M===void 0||M.optimizeNames(v,I),this}get names(){const v=super.names;return this.catch&&F(v,this.catch.names),this.finally&&F(v,this.finally.names),v}}class A extends w{constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}A.kind="catch";class q extends w{render(v){return"finally"+super.render(v)}}q.kind="finally";class z{constructor(v,I={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...I,_n:I.lines?`
|
|
72
|
+
`:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,I){const T=this._extScope.value(v,I);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(v,I){return this._extScope.getValue(v,I)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,I,T,M){const U=this._scope.toName(I);return T!==void 0&&M&&(this._constants[U.str]=T),this._leafNode(new a(v,U,T)),U}const(v,I,T){return this._def(r.varKinds.const,v,I,T)}let(v,I,T){return this._def(r.varKinds.let,v,I,T)}var(v,I,T){return this._def(r.varKinds.var,v,I,T)}assign(v,I,T){return this._leafNode(new c(v,I,T))}add(v,I){return this._leafNode(new i(v,e.operators.ADD,I))}code(v){return typeof v=="function"?v():v!==t.nil&&this._leafNode(new _(v)),this}object(...v){const I=["{"];for(const[T,M]of v)I.length>1&&I.push(","),I.push(T),(T!==M||this.opts.es5)&&(I.push(":"),(0,t.addCodeArg)(I,M));return I.push("}"),new t._Code(I)}if(v,I,T){if(this._blockNode(new $(v)),I&&T)this.code(I).else().code(T).endIf();else if(I)this.code(I).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new $(v))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode($,b)}_for(v,I){return this._blockNode(v),I&&this.code(I).endFor(),this}for(v,I){return this._for(new d(v),I)}forRange(v,I,T,M,U=this.opts.es5?r.varKinds.var:r.varKinds.let){const J=this._scope.toName(v);return this._for(new P(U,J,I,T),()=>M(J))}forOf(v,I,T,M=r.varKinds.const){const U=this._scope.toName(v);if(this.opts.es5){const J=I instanceof t.Name?I:this.var("_arr",I);return this.forRange("_i",0,(0,t._)`${J}.length`,re=>{this.var(U,(0,t._)`${J}[${re}]`),T(U)})}return this._for(new h("of",M,U,I),()=>T(U))}forIn(v,I,T,M=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,t._)`Object.keys(${I})`,T);const U=this._scope.toName(v);return this._for(new h("in",M,U,I),()=>T(U))}endFor(){return this._endBlockNode(y)}label(v){return this._leafNode(new l(v))}break(v){return this._leafNode(new u(v))}return(v){const I=new E;if(this._blockNode(I),this.code(v),I.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(v,I,T){if(!I&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new O;if(this._blockNode(M),this.code(v),I){const U=this.name("e");this._currNode=M.catch=new A(U),I(U)}return T&&(this._currNode=M.finally=new q,this.code(T)),this._endBlockNode(A,q)}throw(v){return this._leafNode(new f(v))}block(v,I){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(I),this}endBlock(v){const I=this._blockStarts.pop();if(I===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-I;if(T<0||v!==void 0&&T!==v)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${v} expected`);return this._nodes.length=I,this}func(v,I=t.nil,T,M){return this._blockNode(new g(v,I,T)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,I){const T=this._currNode;if(T instanceof v||I&&T instanceof I)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${I?`${v.kind}/${I.kind}`:v.kind}"`)}_elseNode(v){const I=this._currNode;if(!(I instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=I.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const I=this._nodes;I[I.length-1]=v}}e.CodeGen=z;function F(j,v){for(const I in v)j[I]=(j[I]||0)+(v[I]||0);return j}function L(j,v){return v instanceof t._CodeOrName?F(j,v.names):j}function K(j,v,I){if(j instanceof t.Name)return T(j);if(!M(j))return j;return new t._Code(j._items.reduce((U,J)=>(J instanceof t.Name&&(J=T(J)),J instanceof t._Code?U.push(...J._items):U.push(J),U),[]));function T(U){const J=I[U.str];return J===void 0||v[U.str]!==1?U:(delete v[U.str],J)}function M(U){return U instanceof t._Code&&U._items.some(J=>J instanceof t.Name&&v[J.str]===1&&I[J.str]!==void 0)}}function le(j,v){for(const I in v)j[I]=(j[I]||0)-(v[I]||0)}function pe(j){return typeof j=="boolean"||typeof j=="number"||j===null?!j:(0,t._)`!${V(j)}`}e.not=pe;const Se=k(e.operators.AND);function ce(...j){return j.reduce(Se)}e.and=ce;const _e=k(e.operators.OR);function R(...j){return j.reduce(_e)}e.or=R;function k(j){return(v,I)=>v===t.nil?I:I===t.nil?v:(0,t._)`${V(v)} ${j} ${V(I)}`}function V(j){return j instanceof t.Name?j:(0,t._)`(${j})`}})(Xd)),Xd}var ke={},of;function qe(){if(of)return ke;of=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.checkStrictMode=ke.getErrorPath=ke.Type=ke.useFunc=ke.setEvaluated=ke.evaluatedPropsToName=ke.mergeEvaluated=ke.eachItem=ke.unescapeJsonPointer=ke.escapeJsonPointer=ke.escapeFragment=ke.unescapeFragment=ke.schemaRefOrVal=ke.schemaHasRulesButRef=ke.schemaHasRules=ke.checkUnknownRules=ke.alwaysValidSchema=ke.toHash=void 0;const e=Ie(),t=bs();function r(h){const g={};for(const E of h)g[E]=!0;return g}ke.toHash=r;function n(h,g){return typeof g=="boolean"?g:Object.keys(g).length===0?!0:(o(h,g),!s(g,h.self.RULES.all))}ke.alwaysValidSchema=n;function o(h,g=h.schema){const{opts:E,self:O}=h;if(!E.strictSchema||typeof g=="boolean")return;const A=O.RULES.keywords;for(const q in g)A[q]||P(h,`unknown keyword: "${q}"`)}ke.checkUnknownRules=o;function s(h,g){if(typeof h=="boolean")return!h;for(const E in h)if(g[E])return!0;return!1}ke.schemaHasRules=s;function a(h,g){if(typeof h=="boolean")return!h;for(const E in h)if(E!=="$ref"&&g.all[E])return!0;return!1}ke.schemaHasRulesButRef=a;function c({topSchemaRef:h,schemaPath:g},E,O,A){if(!A){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${h}${g}${(0,e.getProperty)(O)}`}ke.schemaRefOrVal=c;function i(h){return f(decodeURIComponent(h))}ke.unescapeFragment=i;function l(h){return encodeURIComponent(u(h))}ke.escapeFragment=l;function u(h){return typeof h=="number"?`${h}`:h.replace(/~/g,"~0").replace(/\//g,"~1")}ke.escapeJsonPointer=u;function f(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}ke.unescapeJsonPointer=f;function _(h,g){if(Array.isArray(h))for(const E of h)g(E);else g(h)}ke.eachItem=_;function m({mergeNames:h,mergeToName:g,mergeValues:E,resultToName:O}){return(A,q,z,F)=>{const L=z===void 0?q:z instanceof e.Name?(q instanceof e.Name?h(A,q,z):g(A,q,z),z):q instanceof e.Name?(g(A,z,q),q):E(q,z);return F===e.Name&&!(L instanceof e.Name)?O(A,L):L}}ke.mergeEvaluated={props:m({mergeNames:(h,g,E)=>h.if((0,e._)`${E} !== true && ${g} !== undefined`,()=>{h.if((0,e._)`${g} === true`,()=>h.assign(E,!0),()=>h.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${g})`))}),mergeToName:(h,g,E)=>h.if((0,e._)`${E} !== true`,()=>{g===!0?h.assign(E,!0):(h.assign(E,(0,e._)`${E} || {}`),S(h,E,g))}),mergeValues:(h,g)=>h===!0?!0:{...h,...g},resultToName:w}),items:m({mergeNames:(h,g,E)=>h.if((0,e._)`${E} !== true && ${g} !== undefined`,()=>h.assign(E,(0,e._)`${g} === true ? true : ${E} > ${g} ? ${E} : ${g}`)),mergeToName:(h,g,E)=>h.if((0,e._)`${E} !== true`,()=>h.assign(E,g===!0?!0:(0,e._)`${E} > ${g} ? ${E} : ${g}`)),mergeValues:(h,g)=>h===!0?!0:Math.max(h,g),resultToName:(h,g)=>h.var("items",g)})};function w(h,g){if(g===!0)return h.var("props",!0);const E=h.var("props",(0,e._)`{}`);return g!==void 0&&S(h,E,g),E}ke.evaluatedPropsToName=w;function S(h,g,E){Object.keys(E).forEach(O=>h.assign((0,e._)`${g}${(0,e.getProperty)(O)}`,!0))}ke.setEvaluated=S;const b={};function $(h,g){return h.scopeValue("func",{ref:g,code:b[g.code]||(b[g.code]=new t._Code(g.code))})}ke.useFunc=$;var y;(function(h){h[h.Num=0]="Num",h[h.Str=1]="Str"})(y||(ke.Type=y={}));function d(h,g,E){if(h instanceof e.Name){const O=g===y.Num;return E?O?(0,e._)`"[" + ${h} + "]"`:(0,e._)`"['" + ${h} + "']"`:O?(0,e._)`"/" + ${h}`:(0,e._)`"/" + ${h}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(h).toString():"/"+u(h)}ke.getErrorPath=d;function P(h,g,E=h.opts.strictSchema){if(E){if(g=`strict mode: ${g}`,E===!0)throw new Error(g);h.self.logger.warn(g)}}return ke.checkStrictMode=P,ke}var ws={},sf;function Ot(){if(sf)return ws;sf=1,Object.defineProperty(ws,"__esModule",{value:!0});const e=Ie(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),isAllOfVariant:new e.Name("isAllOfVariant"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return ws.default=t,ws}var af;function $s(){return af||(af=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Ie(),r=qe(),n=Ot();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:$})=>$?(0,t.str)`"${b}" keyword must be ${$} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function o(b,$=e.keywordError,y,d){const{it:P}=b,{gen:h,compositeRule:g,allErrors:E}=P,O=f(b,$,y);d??(g||E)?i(h,O):l(P,(0,t._)`[${O}]`)}e.reportError=o;function s(b,$=e.keywordError,y){const{it:d}=b,{gen:P,compositeRule:h,allErrors:g}=d,E=f(b,$,y);i(P,E),h||g||l(d,n.default.vErrors)}e.reportExtraError=s;function a(b,$){b.assign(n.default.errors,$),b.if((0,t._)`${n.default.vErrors} !== null`,()=>b.if($,()=>b.assign((0,t._)`${n.default.vErrors}.length`,$),()=>b.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function c({gen:b,keyword:$,schemaValue:y,data:d,errsCount:P,it:h}){if(P===void 0)throw new Error("ajv implementation error");const g=b.name("err");b.forRange("i",P,n.default.errors,E=>{b.const(g,(0,t._)`${n.default.vErrors}[${E}]`),b.if((0,t._)`${g}.instancePath === undefined`,()=>b.assign((0,t._)`${g}.instancePath`,(0,t.strConcat)(n.default.instancePath,h.errorPath))),b.assign((0,t._)`${g}.schemaPath`,(0,t.str)`${h.errSchemaPath}/${$}`),h.opts.verbose&&(b.assign((0,t._)`${g}.schema`,y),b.assign((0,t._)`${g}.data`,d))})}e.extendErrors=c;function i(b,$){const y=b.const("err",$);b.if((0,t._)`${n.default.vErrors} === null`,()=>b.assign(n.default.vErrors,(0,t._)`[${y}]`),(0,t._)`${n.default.vErrors}.push(${y})`),b.code((0,t._)`${n.default.errors}++`)}function l(b,$){const{gen:y,validateName:d,schemaEnv:P}=b;P.$async?y.throw((0,t._)`new ${b.ValidationError}(${$})`):(y.assign((0,t._)`${d}.errors`,$),y.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function f(b,$,y){const{createErrors:d}=b.it;return d===!1?(0,t._)`{}`:_(b,$,y)}function _(b,$,y={}){const{gen:d,it:P}=b,h=[m(P,y),w(b,y)];return S(b,$,h),d.object(...h)}function m({errorPath:b},{instancePath:$}){const y=$?(0,t.str)`${b}${(0,r.getErrorPath)($,r.Type.Str)}`:b;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,y)]}function w({keyword:b,it:{errSchemaPath:$}},{schemaPath:y,parentSchema:d}){let P=d?$:(0,t.str)`${$}/${b}`;return y&&(P=(0,t.str)`${P}${(0,r.getErrorPath)(y,r.Type.Str)}`),[u.schemaPath,P]}function S(b,{params:$,message:y},d){const{keyword:P,data:h,schemaValue:g,it:E}=b,{opts:O,propertyName:A,topSchemaRef:q,schemaPath:z}=E;d.push([u.keyword,P],[u.params,typeof $=="function"?$(b):$||(0,t._)`{}`]),O.messages&&d.push([u.message,typeof y=="function"?y(b):y]),O.verbose&&d.push([u.schema,g],[u.parentSchema,(0,t._)`${q}${z}`],[n.default.data,h]),A&&d.push([u.propertyName,A])}})(Hd)),Hd}var cf;function vP(){if(cf)return yr;cf=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.boolOrEmptySchema=yr.topBoolOrEmptySchema=void 0;const e=$s(),t=Ie(),r=Ot(),n={message:"boolean schema is false"};function o(c){const{gen:i,schema:l,validateName:u}=c;l===!1?a(c,!1):typeof l=="object"&&l.$async===!0?i.return(r.default.data):(i.assign((0,t._)`${u}.errors`,null),i.return(!0))}yr.topBoolOrEmptySchema=o;function s(c,i){const{gen:l,schema:u}=c;u===!1?(l.var(i,!1),a(c)):l.var(i,!0)}yr.boolOrEmptySchema=s;function a(c,i){const{gen:l,data:u}=c,f={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(f,n,void 0,i)}return yr}var ot={},gr={},lf;function uf(){if(lf)return gr;lf=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.getRules=gr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(o){return typeof o=="string"&&t.has(o)}gr.isJSONType=r;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return gr.getRules=n,gr}var Wt={},pf;function df(){if(pf)return Wt;pf=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.shouldUseRule=Wt.shouldUseGroup=Wt.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const a=o.RULES.types[s];return a&&a!==!0&&t(n,a)}Wt.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}Wt.shouldUseGroup=t;function r(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return Wt.shouldUseRule=r,Wt}var ff;function _s(){if(ff)return ot;ff=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.reportTypeError=ot.checkDataTypes=ot.checkDataType=ot.coerceAndCheckDataType=ot.getJSONTypes=ot.getSchemaTypes=ot.DataType=void 0;const e=uf(),t=df(),r=$s(),n=Ie(),o=qe();var s;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(s||(ot.DataType=s={}));function a(y){const d=c(y.type);if(d.includes("null")){if(y.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&y.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');y.nullable===!0&&d.push("null")}return d}ot.getSchemaTypes=a;function c(y){const d=Array.isArray(y)?y:y?[y]:[];if(d.every(e.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ot.getJSONTypes=c;function i(y,d){const{gen:P,data:h,opts:g}=y,E=u(d,g.coerceTypes),O=d.length>0&&!(E.length===0&&d.length===1&&(0,t.schemaHasRulesForType)(y,d[0]));if(O){const A=w(d,h,g.strictNumbers,s.Wrong);P.if(A,()=>{E.length?f(y,d,E):b(y)})}return O}ot.coerceAndCheckDataType=i;const l=new Set(["string","number","integer","boolean","null"]);function u(y,d){return d?y.filter(P=>l.has(P)||d==="array"&&P==="array"):[]}function f(y,d,P){const{gen:h,data:g,opts:E}=y,O=h.let("dataType",(0,n._)`typeof ${g}`),A=h.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&h.if((0,n._)`${O} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>h.assign(g,(0,n._)`${g}[0]`).assign(O,(0,n._)`typeof ${g}`).if(w(d,g,E.strictNumbers),()=>h.assign(A,g))),h.if((0,n._)`${A} !== undefined`);for(const z of P)(l.has(z)||z==="array"&&E.coerceTypes==="array")&&q(z);h.else(),b(y),h.endIf(),h.if((0,n._)`${A} !== undefined`,()=>{h.assign(g,A),_(y,A)});function q(z){switch(z){case"string":h.elseIf((0,n._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(A,(0,n._)`""`);return;case"number":h.elseIf((0,n._)`${O} == "boolean" || ${g} === null
|
|
73
|
+
|| (${O} == "string" && ${g} && ${g} == +${g})`).assign(A,(0,n._)`+${g}`);return;case"integer":h.elseIf((0,n._)`${O} === "boolean" || ${g} === null
|
|
74
|
+
|| (${O} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(A,(0,n._)`+${g}`);return;case"boolean":h.elseIf((0,n._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(A,!1).elseIf((0,n._)`${g} === "true" || ${g} === 1`).assign(A,!0);return;case"null":h.elseIf((0,n._)`${g} === "" || ${g} === 0 || ${g} === false`),h.assign(A,null);return;case"array":h.elseIf((0,n._)`${O} === "string" || ${O} === "number"
|
|
75
|
+
|| ${O} === "boolean" || ${g} === null`).assign(A,(0,n._)`[${g}]`)}}}function _({gen:y,parentData:d,parentDataProperty:P},h){y.if((0,n._)`${d} !== undefined`,()=>y.assign((0,n._)`${d}[${P}]`,h))}function m(y,d,P,h=s.Correct){const g=h===s.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(y){case"null":return(0,n._)`${d} ${g} null`;case"array":E=(0,n._)`Array.isArray(${d})`;break;case"object":E=(0,n._)`${d} && typeof ${d} == "object" && !Array.isArray(${d})`;break;case"integer":E=O((0,n._)`!(${d} % 1) && !isNaN(${d})`);break;case"number":E=O();break;default:return(0,n._)`typeof ${d} ${g} ${y}`}return h===s.Correct?E:(0,n.not)(E);function O(A=n.nil){return(0,n.and)((0,n._)`typeof ${d} == "number"`,A,P?(0,n._)`isFinite(${d})`:n.nil)}}ot.checkDataType=m;function w(y,d,P,h){if(y.length===1)return m(y[0],d,P,h);let g;const E=(0,o.toHash)(y);if(E.array&&E.object){const O=(0,n._)`typeof ${d} != "object"`;g=E.null?O:(0,n._)`!${d} || ${O}`,delete E.null,delete E.array,delete E.object}else g=n.nil;E.number&&delete E.integer;for(const O in E)g=(0,n.and)(g,m(O,d,P,h));return g}ot.checkDataTypes=w;const S={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:d})=>typeof y=="string"?(0,n._)`{type: ${y}}`:(0,n._)`{type: ${d}}`};function b(y){const d=$(y);(0,r.reportError)(d,S)}ot.reportTypeError=b;function $(y){const{gen:d,data:P,schema:h}=y,g=(0,o.schemaRefOrVal)(y,h,"type");return{gen:d,keyword:"type",data:P,schema:h.type,schemaCode:g,schemaValue:g,parentSchema:h,params:{},it:y}}return ot}var fn={},mf;function bP(){if(mf)return fn;mf=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.assignDefaults=void 0;const e=Ie(),t=qe();function r(o,s){const{properties:a,items:c}=o.schema;if(s==="object"&&a)for(const i in a)n(o,i,a[i].default);else s==="array"&&Array.isArray(c)&&c.forEach((i,l)=>n(o,l,i.default))}fn.assignDefaults=r;function n(o,s,a){const{gen:c,compositeRule:i,data:l,opts:u}=o;if(a===void 0)return;const f=(0,e._)`${l}${(0,e.getProperty)(s)}`;if(i){(0,t.checkStrictMode)(o,`default is ignored for: ${f}`);return}let _=(0,e._)`${f} === undefined`;u.useDefaults==="empty"&&(_=(0,e._)`${_} || ${f} === null || ${f} === ""`),c.if(_,(0,e._)`${f} = ${(0,e.stringify)(a)}`)}return fn}var jt={},Ge={},mn={},hf;function yf(){if(hf)return mn;hf=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getSkipCondition=void 0;const e=Ie(),t=Ot();function r(n,o){var s;const a=(s=n.properties)===null||s===void 0?void 0:s[o];if(!a)return;const c=a.readOnly===!0,i=a.writeOnly===!0;if(!c&&!i)return;const l=[],u=(0,e._)`typeof ${t.default.this} == "object" && ${t.default.this} && ${t.default.this}.apiContext`;return c&&l.push((0,e._)`${u} === "request"`),i&&l.push((0,e._)`${u} === "response"`),(0,e.or)(...l)}return mn.getSkipCondition=r,mn}var gf;function At(){if(gf)return Ge;gf=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.validateUnion=Ge.validateArray=Ge.usePattern=Ge.callValidateCode=Ge.schemaProperties=Ge.allSchemaProperties=Ge.noPropertyInData=Ge.propertyInData=Ge.isOwnProperty=Ge.hasPropFunc=Ge.reportMissingProp=Ge.checkMissingProp=Ge.checkReportMissingProp=void 0;const e=Ie(),t=qe(),r=Ot(),n=qe(),o=yf();function s(d,P){const{gen:h,data:g,it:E}=d;h.if(f(h,g,P,E.opts.ownProperties),()=>{d.setParams({missingProperty:(0,e._)`${P}`},!0),d.error()})}Ge.checkReportMissingProp=s;function a({gen:d,data:P,it:{opts:h},parentSchema:g},E,O){return(0,e.or)(...E.map(A=>{var q;return(0,e.and)((0,e.not)((q=(0,o.getSkipCondition)(g,A))!==null&&q!==void 0?q:(0,e._)`false`),f(d,P,A,h.ownProperties),(0,e._)`${O} = ${A}`)}))}Ge.checkMissingProp=a;function c(d,P){d.setParams({missingProperty:P},!0),d.error()}Ge.reportMissingProp=c;function i(d){return d.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ge.hasPropFunc=i;function l(d,P,h){return(0,e._)`${i(d)}.call(${P}, ${h})`}Ge.isOwnProperty=l;function u(d,P,h,g){const E=(0,e._)`${P}${(0,e.getProperty)(h)} !== undefined`;return g?(0,e._)`${E} && ${l(d,P,h)}`:E}Ge.propertyInData=u;function f(d,P,h,g){const E=(0,e._)`${P}${(0,e.getProperty)(h)} === undefined`;return g?(0,e.or)(E,(0,e.not)(l(d,P,h))):E}Ge.noPropertyInData=f;function _(d){return d?Object.keys(d).filter(P=>P!=="__proto__"):[]}Ge.allSchemaProperties=_;function m(d,P){return _(P).filter(h=>!(0,t.alwaysValidSchema)(d,P[h]))}Ge.schemaProperties=m;function w({schemaCode:d,data:P,it:{gen:h,topSchemaRef:g,schemaPath:E,errorPath:O},it:A},q,z,F){const L=F?(0,e._)`${d}, ${P}, ${g}${E}`:P,K=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData],[r.default.isAllOfVariant,A.isAllOfVariant?1:0]];A.opts.dynamicRef&&K.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const le=(0,e._)`${L}, ${h.object(...K)}`;return z!==e.nil?(0,e._)`${q}.call(${z}, ${le})`:(0,e._)`${q}(${le})`}Ge.callValidateCode=w;const S=(0,e._)`new RegExp`;function b({gen:d,it:{opts:P}},h){const g=P.unicodeRegExp?"u":"",{regExp:E}=P.code,O=E(h,g);return d.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${E.code==="new RegExp"?S:(0,n.useFunc)(d,E)}(${h}, ${g})`})}Ge.usePattern=b;function $(d){const{gen:P,data:h,keyword:g,it:E}=d,O=P.name("valid");if(E.allErrors){const q=P.let("valid",!0);return A(()=>P.assign(q,!1)),q}return P.var(O,!0),A(()=>P.break()),O;function A(q){const z=P.const("len",(0,e._)`${h}.length`);P.forRange("i",0,z,F=>{d.subschema({keyword:g,dataProp:F,dataPropType:t.Type.Num},O),P.if((0,e.not)(O),q)})}}Ge.validateArray=$;function y(d){const{gen:P,schema:h,keyword:g,parentSchema:E,it:O}=d;if(!Array.isArray(h))throw new Error("ajv implementation error");if(O.opts.discriminator&&E.discriminator||h.some(z=>(0,t.alwaysValidSchema)(O,z))&&!O.opts.unevaluated)return;const A=P.let("valid",!1),q=P.name("_valid");P.block(()=>h.forEach((z,F)=>{const L=d.subschema({keyword:g,schemaProp:F,compositeRule:!0},q);P.assign(A,(0,e._)`${A} || ${q}`),d.mergeValidEvaluated(L,q)||P.if((0,e.not)(A))})),d.result(A,()=>d.reset(),()=>d.error(!0))}return Ge.validateUnion=y,Ge}var vf;function wP(){if(vf)return jt;vf=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.validateKeywordUsage=jt.validSchemaType=jt.funcKeywordCode=jt.macroKeywordCode=void 0;const e=Ie(),t=Ot(),r=At(),n=$s();function o(_,m){const{gen:w,keyword:S,schema:b,parentSchema:$,it:y}=_,d=m.macro.call(y.self,b,$,y),P=l(w,S,d);y.opts.validateSchema!==!1&&y.self.validateSchema(d,!0);const h=w.name("valid");_.subschema({schema:d,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${S}`,topSchemaRef:P,compositeRule:!0},h),_.pass(h,()=>_.error(!0))}jt.macroKeywordCode=o;function s(_,m){var w;const{gen:S,keyword:b,schema:$,parentSchema:y,$data:d,it:P}=_;i(P,m);const h=!d&&m.compile?m.compile.call(P.self,$,y,P):m.validate,g=l(S,b,h),E=S.let("valid");_.block$data(E,O),_.ok((w=m.valid)!==null&&w!==void 0?w:E);function O(){if(m.errors===!1)z(),m.modifying&&a(_),F(()=>_.error());else{const L=m.async?A():q();m.modifying&&a(_),F(()=>c(_,L))}}function A(){const L=S.let("ruleErrs",null);return S.try(()=>z((0,e._)`await `),K=>S.assign(E,!1).if((0,e._)`${K} instanceof ${P.ValidationError}`,()=>S.assign(L,(0,e._)`${K}.errors`),()=>S.throw(K))),L}function q(){const L=(0,e._)`${g}.errors`;return S.assign(L,null),z(e.nil),L}function z(L=m.async?(0,e._)`await `:e.nil){const K=P.opts.passContext?t.default.this:t.default.self,le=!("compile"in m&&!d||m.schema===!1);S.assign(E,(0,e._)`${L}${(0,r.callValidateCode)(_,g,K,le)}`,m.modifying)}function F(L){var K;S.if((0,e.not)((K=m.valid)!==null&&K!==void 0?K:E),L)}}jt.funcKeywordCode=s;function a(_){const{gen:m,data:w,it:S}=_;m.if(S.parentData,()=>m.assign(w,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function c(_,m){const{gen:w}=_;w.if((0,e._)`Array.isArray(${m})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${m} : ${t.default.vErrors}.concat(${m})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(_)},()=>_.error())}function i({schemaEnv:_},m){if(m.async&&!_.$async)throw new Error("async keyword in sync schema")}function l(_,m,w){if(w===void 0)throw new Error(`keyword "${m}" failed to compile`);return _.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(_,m,w=!1){return!m.length||m.some(S=>S==="array"?Array.isArray(_):S==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==S||w&&typeof _>"u")}jt.validSchemaType=u;function f({schema:_,opts:m,self:w,errSchemaPath:S},b,$){if(Array.isArray(b.keyword)?!b.keyword.includes($):b.keyword!==$)throw new Error("ajv implementation error");const y=b.dependencies;if(y?.some(d=>!Object.prototype.hasOwnProperty.call(_,d)))throw new Error(`parent schema must have dependencies of ${$}: ${y.join(",")}`);if(b.validateSchema&&!b.validateSchema(_[$])){const d=`keyword "${$}" value is invalid at path "${S}": `+w.errorsText(b.validateSchema.errors);if(m.validateSchema==="log")w.logger.error(d);else throw new Error(d)}}return jt.validateKeywordUsage=f,jt}var Ht={},bf;function $P(){if(bf)return Ht;bf=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.extendSubschemaMode=Ht.extendSubschemaData=Ht.getSubschema=void 0;const e=Ie(),t=qe();function r(s,{keyword:a,schemaProp:c,schema:i,schemaPath:l,errSchemaPath:u,topSchemaRef:f}){if(a!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const _=s.schema[a];return c===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:_[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(c)}`}}if(i!==void 0){if(l===void 0||u===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:l,topSchemaRef:f,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Ht.getSubschema=r;function n(s,a,{dataProp:c,dataPropType:i,data:l,dataTypes:u,propertyName:f}){if(l!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=a;if(c!==void 0){const{errorPath:w,dataPathArr:S,opts:b}=a,$=_.let("data",(0,e._)`${a.data}${(0,e.getProperty)(c)}`,!0);m($),s.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(c,i,b.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...S,s.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:_.let("data",l,!0);m(w),f!==void 0&&(s.propertyName=f)}u&&(s.dataTypes=u);function m(w){s.data=w,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,w]}}Ht.extendSubschemaData=n;function o(s,{jtdDiscriminator:a,jtdMetadata:c,compositeRule:i,createErrors:l,allErrors:u}){i!==void 0&&(s.compositeRule=i),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=c}return Ht.extendSubschemaMode=o,Ht}var ut={},wf;function Es(){if(wf)return ut;wf=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.getSchemaRefs=ut.resolveUrl=ut.normalizeId=ut._getFullPath=ut.getFullPath=ut.inlineRef=void 0;const e=qe(),t=_n(),r=ql(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(S,b=!0){return typeof S=="boolean"?!0:b===!0?!a(S):b?c(S)<=b:!1}ut.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(S){for(const b in S){if(s.has(b))return!0;const $=S[b];if(Array.isArray($)&&$.some(a)||typeof $=="object"&&a($))return!0}return!1}function c(S){let b=0;for(const $ in S)if($==="$ref"||(b++,!n.has($)&&(typeof S[$]=="object"&&(0,e.eachItem)(S[$],y=>b+=c(y)),b===1/0)))return 1/0;return b}function i(S,b="",$){$!==!1&&(b=f(b));const y=S.parse(b);return l(S,y)}ut.getFullPath=i;function l(S,b){return S.serialize(b).split("#")[0]+"#"}ut._getFullPath=l;const u=/#\/?$/;function f(S){return S?S.replace(u,""):""}ut.normalizeId=f;function _(S,b,$){return $=f($),S.resolve(b,$)}ut.resolveUrl=_;const m=/^[a-z_][-a-z0-9._]*$/i;function w(S,b){if(typeof S=="boolean")return{};const{schemaId:$,uriResolver:y}=this.opts,d=f(S[$]||b),P={"":d},h=i(y,d,!1),g={},E=new Set;return r(S,{allKeys:!0},(q,z,F,L)=>{if(L===void 0)return;const K=h+z;let le=P[L];typeof q[$]=="string"&&(le=pe.call(this,q[$])),Se.call(this,q.$anchor),Se.call(this,q.$dynamicAnchor),P[z]=le;function pe(ce){const _e=this.opts.uriResolver.resolve;if(ce=f(le?_e(le,ce):ce),E.has(ce))throw A(ce);E.add(ce);let R=this.refs[ce];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?O(q,R.schema,ce):ce!==f(K)&&(ce[0]==="#"?(O(q,g[ce],ce),g[ce]=q):this.refs[ce]=K),ce}function Se(ce){if(typeof ce=="string"){if(!m.test(ce))throw new Error(`invalid anchor "${ce}"`);pe.call(this,`#${ce}`)}}}),g;function O(q,z,F){if(z!==void 0&&!t(q,z))throw A(F)}function A(q){return new Error(`reference "${q}" resolves to more than one schema`)}}return ut.getSchemaRefs=w,ut}var $f;function Ps(){if($f)return Yt;$f=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getData=Yt.KeywordCxt=Yt.validateFunctionCode=void 0;const e=vP(),t=_s(),r=df(),n=_s(),o=bP(),s=wP(),a=$P(),c=Ie(),i=Ot(),l=Es(),u=qe(),f=$s();function _(x){if(h(x)&&(E(x),P(x))){b(x);return}m(x,()=>(0,e.topBoolOrEmptySchema)(x))}Yt.validateFunctionCode=_;function m({gen:x,validateName:N,schema:D,schemaEnv:B,opts:H},oe){H.code.es5?x.func(N,(0,c._)`${i.default.data}, ${i.default.valCxt}`,B.$async,()=>{x.code((0,c._)`"use strict"; ${y(D,H)}`),S(x,H),x.code(oe)}):x.func(N,(0,c._)`${i.default.data}, ${w(H)}`,B.$async,()=>x.code(y(D,H)).code(oe))}function w(x){return(0,c._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${x.dynamicRef?(0,c._)`, ${i.default.dynamicAnchors}={}`:c.nil}, ${i.default.isAllOfVariant} = 0}={}`}function S(x,N){x.if(i.default.valCxt,()=>{x.var(i.default.instancePath,(0,c._)`${i.default.valCxt}.${i.default.instancePath}`),x.var(i.default.parentData,(0,c._)`${i.default.valCxt}.${i.default.parentData}`),x.var(i.default.parentDataProperty,(0,c._)`${i.default.valCxt}.${i.default.parentDataProperty}`),x.var(i.default.rootData,(0,c._)`${i.default.valCxt}.${i.default.rootData}`),x.var(i.default.isAllOfVariant,(0,c._)`${i.default.valCxt}.${i.default.isAllOfVariant}`),N.dynamicRef&&x.var(i.default.dynamicAnchors,(0,c._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{x.var(i.default.instancePath,(0,c._)`""`),x.var(i.default.parentData,(0,c._)`undefined`),x.var(i.default.parentDataProperty,(0,c._)`undefined`),x.var(i.default.rootData,i.default.data),x.var(i.default.isAllOfVariant,(0,c._)`0`),N.dynamicRef&&x.var(i.default.dynamicAnchors,(0,c._)`{}`)})}function b(x){const{schema:N,opts:D,gen:B}=x;m(x,()=>{D.$comment&&N.$comment&&L(x),q(x),B.let(i.default.vErrors,null),B.let(i.default.errors,0),D.unevaluated&&$(x),O(x),K(x)})}function $(x){const{gen:N,validateName:D}=x;x.evaluated=N.const("evaluated",(0,c._)`${D}.evaluated`),N.if((0,c._)`${x.evaluated}.dynamicProps`,()=>N.assign((0,c._)`${x.evaluated}.props`,(0,c._)`undefined`)),N.if((0,c._)`${x.evaluated}.dynamicItems`,()=>N.assign((0,c._)`${x.evaluated}.items`,(0,c._)`undefined`))}function y(x,N){const D=typeof x=="object"&&x[N.schemaId];return D&&(N.code.source||N.code.process)?(0,c._)`/*# sourceURL=${D} */`:c.nil}function d(x,N){if(h(x)&&(E(x),P(x))){g(x,N);return}(0,e.boolOrEmptySchema)(x,N)}function P({schema:x,self:N}){if(typeof x=="boolean")return!x;for(const D in x)if(N.RULES.all[D])return!0;return!1}function h(x){return typeof x.schema!="boolean"}function g(x,N){const{schema:D,gen:B,opts:H}=x;H.$comment&&D.$comment&&L(x),z(x),F(x);const oe=B.const("_errs",i.default.errors);O(x,oe),B.var(N,(0,c._)`${oe} === ${i.default.errors}`)}function E(x){(0,u.checkUnknownRules)(x),A(x)}function O(x,N){if(x.opts.jtd)return pe(x,[],!1,N);const D=(0,t.getSchemaTypes)(x.schema),B=(0,t.coerceAndCheckDataType)(x,D);pe(x,D,!B,N)}function A(x){const{schema:N,errSchemaPath:D,opts:B,self:H}=x;N.$ref&&B.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(N,H.RULES)&&H.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function q(x){const{schema:N,opts:D}=x;N.default!==void 0&&D.useDefaults&&D.strictSchema&&(0,u.checkStrictMode)(x,"default is ignored in the schema root")}function z(x){const N=x.schema[x.opts.schemaId];N&&(x.baseId=(0,l.resolveUrl)(x.opts.uriResolver,x.baseId,N))}function F(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function L({gen:x,schemaEnv:N,schema:D,errSchemaPath:B,opts:H}){const oe=D.$comment;if(H.$comment===!0)x.code((0,c._)`${i.default.self}.logger.log(${oe})`);else if(typeof H.$comment=="function"){const C=(0,c.str)`${B}/$comment`,X=x.scopeValue("root",{ref:N.root});x.code((0,c._)`${i.default.self}.opts.$comment(${oe}, ${C}, ${X}.schema)`)}}function K(x){const{gen:N,schemaEnv:D,validateName:B,ValidationError:H,opts:oe}=x;D.$async?N.if((0,c._)`${i.default.errors} === 0`,()=>N.return(i.default.data),()=>N.throw((0,c._)`new ${H}(${i.default.vErrors})`)):(N.assign((0,c._)`${B}.errors`,i.default.vErrors),oe.unevaluated&&le(x),N.return((0,c._)`${i.default.errors} === 0`))}function le({gen:x,evaluated:N,props:D,items:B}){D instanceof c.Name&&x.assign((0,c._)`${N}.props`,D),B instanceof c.Name&&x.assign((0,c._)`${N}.items`,B)}function pe(x,N,D,B){const{gen:H,schema:oe,data:C,allErrors:X,opts:se,self:ee}=x,{RULES:te}=ee;if(oe.$ref&&(se.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(oe,te))){H.block(()=>M(x,"$ref",te.all.$ref.definition));return}se.jtd||ce(x,N),H.block(()=>{for(const ie of te.rules)ue(ie);ue(te.post)});function ue(ie){(0,r.shouldUseGroup)(oe,ie)&&(ie.type?(H.if((0,n.checkDataType)(ie.type,C,se.strictNumbers)),Se(x,ie),N.length===1&&N[0]===ie.type&&D&&(H.else(),(0,n.reportTypeError)(x)),H.endIf()):Se(x,ie),X||H.if((0,c._)`${i.default.errors} === ${B||0}`))}}function Se(x,N){const{gen:D,schema:B,opts:{useDefaults:H}}=x;H&&(0,o.assignDefaults)(x,N.type),D.block(()=>{for(const C of N.rules)((0,r.shouldUseRule)(B,C)||oe(B,C))&&M(x,C.keyword,C.definition,N.type)});function oe(C,X){return!!(X.keyword==="unevaluatedProperties"&&(C.properties||C.patternProperties)&&!x.isAllOfVariant&&x.opts.defaultUnevaluatedProperties===!1)}}function ce(x,N){x.schemaEnv.meta||!x.opts.strictTypes||(_e(x,N),x.opts.allowUnionTypes||R(x,N),k(x,x.dataTypes))}function _e(x,N){if(N.length){if(!x.dataTypes.length){x.dataTypes=N;return}N.forEach(D=>{j(x.dataTypes,D)||I(x,`type "${D}" not allowed by context "${x.dataTypes.join(",")}"`)}),v(x,N)}}function R(x,N){N.length>1&&!(N.length===2&&N.includes("null"))&&I(x,"use allowUnionTypes to allow union type keyword")}function k(x,N){const D=x.self.RULES.all;for(const B in D){const H=D[B];if(typeof H=="object"&&(0,r.shouldUseRule)(x.schema,H)){const{type:oe}=H.definition;oe.length&&!oe.some(C=>V(N,C))&&I(x,`missing type "${oe.join(",")}" for keyword "${B}"`)}}}function V(x,N){return x.includes(N)||N==="number"&&x.includes("integer")}function j(x,N){return x.includes(N)||N==="integer"&&x.includes("number")}function v(x,N){const D=[];for(const B of x.dataTypes)j(N,B)?D.push(B):N.includes("integer")&&B==="number"&&D.push("integer");x.dataTypes=D}function I(x,N){const D=x.schemaEnv.baseId+x.errSchemaPath;N+=` at "${D}" (strictTypes)`,(0,u.checkStrictMode)(x,N,x.opts.strictTypes)}class T{constructor(N,D,B){if((0,s.validateKeywordUsage)(N,D,B),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=B,this.data=N.data,this.schema=N.schema[B],this.$data=D.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(N,this.schema,B,this.$data),this.schemaType=D.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=D,this.$data)this.schemaCode=N.gen.const("vSchema",re(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=N.gen.const("_errs",i.default.errors))}result(N,D,B){this.failResult((0,c.not)(N),D,B)}failResult(N,D,B){this.gen.if(N),B?B():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,D){this.failResult((0,c.not)(N),void 0,D)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),N)})`)}error(N,D,B){if(D){this.setParams(D),this._error(N,B),this.setParams({});return}this._error(N,B)}_error(N,D){(N?f.reportExtraError:f.reportError)(this,this.def.error,D)}$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(N){this.allErrors||this.gen.if(N)}setParams(N,D){D?Object.assign(this.params,N):this.params=N}block$data(N,D,B=c.nil){this.gen.block(()=>{this.check$data(N,B),D()})}check$data(N=c.nil,D=c.nil){if(!this.$data)return;const{gen:B,schemaCode:H,schemaType:oe,def:C}=this;B.if((0,c.or)((0,c._)`${H} === undefined`,D)),N!==c.nil&&B.assign(N,!0),(oe.length||C.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),N!==c.nil&&B.assign(N,!1)),B.else()}invalid$data(){const{gen:N,schemaCode:D,schemaType:B,def:H,it:oe}=this;return(0,c.or)(C(),X());function C(){if(B.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");const se=Array.isArray(B)?B:[B];return(0,c._)`${(0,n.checkDataTypes)(se,D,oe.opts.strictNumbers,n.DataType.Wrong)}`}return c.nil}function X(){if(H.validateSchema){const se=N.scopeValue("validate$data",{ref:H.validateSchema});return(0,c._)`!${se}(${D})`}return c.nil}}subschema(N,D,B){const H=(0,a.getSubschema)(this.it,N);(0,a.extendSubschemaData)(H,this.it,N),(0,a.extendSubschemaMode)(H,N);const oe={...this.it,...H,items:void 0,props:void 0,isAllOfVariant:B};return d(oe,D),oe}mergeEvaluated(N,D){const{it:B,gen:H}=this;B.opts.unevaluated&&(B.props!==!0&&N.props!==void 0&&(B.props=u.mergeEvaluated.props(H,N.props,B.props,D)),B.items!==!0&&N.items!==void 0&&(B.items=u.mergeEvaluated.items(H,N.items,B.items,D)))}mergeValidEvaluated(N,D){const{it:B,gen:H}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return H.if(D,()=>this.mergeEvaluated(N,c.Name)),!0}}Yt.KeywordCxt=T;function M(x,N,D,B){const H=new T(x,D,N);"code"in D?D.code(H,B):H.$data&&D.validate?(0,s.funcKeywordCode)(H,D):"macro"in D?(0,s.macroKeywordCode)(H,D):(D.compile||D.validate)&&(0,s.funcKeywordCode)(H,D)}const U=/^\/(?:[^~]|~0|~1)*$/,J=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(x,{dataLevel:N,dataNames:D,dataPathArr:B}){let H,oe;if(x==="")return i.default.rootData;if(x[0]==="/"){if(!U.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);H=x,oe=i.default.rootData}else{const ee=J.exec(x);if(!ee)throw new Error(`Invalid JSON-pointer: ${x}`);const te=+ee[1];if(H=ee[2],H==="#"){if(te>=N)throw new Error(se("property/index",te));return B[N-te]}if(te>N)throw new Error(se("data",te));if(oe=D[N-te],!H)return oe}let C=oe;const X=H.split("/");for(const ee of X)ee&&(oe=(0,c._)`${oe}${(0,c.getProperty)((0,u.unescapeJsonPointer)(ee))}`,C=(0,c._)`${C} && ${oe}`);return C;function se(ee,te){return`Cannot access ${ee} ${te} levels up, current level is ${N}`}}return Yt.getData=re,Yt}var Ss={},_f;function _i(){if(_f)return Ss;_f=1,Object.defineProperty(Ss,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Ss.default=e,Ss}var Is={},Ef;function xs(){if(Ef)return Is;Ef=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=Es();class t extends Error{constructor(n,o,s,a){super(a||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Is.default=t,Is}var ht={},Pf;function Ei(){if(Pf)return ht;Pf=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.resolveSchema=ht.getCompilingSchema=ht.resolveRef=ht.compileSchema=ht.SchemaEnv=void 0;const e=Ie(),t=_i(),r=Ot(),n=Es(),o=qe(),s=Ps();class a{constructor($){var y;this.refs={},this.dynamicAnchors={};let d;typeof $.schema=="object"&&(d=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(y=$.baseId)!==null&&y!==void 0?y:(0,n.normalizeId)(d?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=d?.$async,this.refs={}}}ht.SchemaEnv=a;function c(b){const $=u.call(this,b);if($)return $;const y=(0,n.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:d,lines:P}=this.opts.code,{ownProperties:h}=this.opts,g=new e.CodeGen(this.scope,{es5:d,lines:P,ownProperties:h});let E;b.$async&&(E=g.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=g.scopeName("validate");b.validateName=O;const A={gen:g,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:g.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:O,ValidationError:E,schema:b.schema,schemaEnv:b,rootId:y,baseId:b.baseId||y,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let q;try{this._compilations.add(b),(0,s.validateFunctionCode)(A),g.optimize(this.opts.code.optimize);const z=g.toString();q=`const visitedNodesForRef = new WeakMap(); ${g.scopeRefs(r.default.scope)}return ${z}`,this.opts.code.process&&(q=this.opts.code.process(q,b));const F=new Function(`${r.default.self}`,`${r.default.scope}`,q)(this,this.scope.get());if(this.scope.value(O,{ref:F}),F.errors=null,F.schema=b.schema,F.schemaEnv=b,b.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:O,validateCode:z,scopeValues:g._values}),this.opts.unevaluated){const{props:L,items:K}=A;F.evaluated={props:L instanceof e.Name?void 0:L,items:K instanceof e.Name?void 0:K,dynamicProps:L instanceof e.Name,dynamicItems:K instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return b.validate=F,b}catch(z){throw delete b.validate,delete b.validateName,q&&this.logger.error("Error compiling schema, function code:",q),z}finally{this._compilations.delete(b)}}ht.compileSchema=c;function i(b,$,y){var d;const P=(0,n.resolveUrl)(this.opts.uriResolver,$,y),h=b.refs[P];if(h)return h;let g=_.call(this,b,P);if(g===void 0){const E=(d=b.localRefs)===null||d===void 0?void 0:d[P],{schemaId:O}=this.opts;E&&(g=new a({schema:E,schemaId:O,root:b,baseId:$}))}if(g===void 0&&this.opts.loadSchemaSync){const E=this.opts.loadSchemaSync($,y,P);E&&!(this.refs[P]||this.schemas[P])&&(this.addSchema(E,P,void 0),g=_.call(this,b,P))}if(g!==void 0)return b.refs[P]=l.call(this,g)}ht.resolveRef=i;function l(b){return(0,n.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:c.call(this,b)}function u(b){for(const $ of this._compilations)if(f($,b))return $}ht.getCompilingSchema=u;function f(b,$){return b.schema===$.schema&&b.root===$.root&&b.baseId===$.baseId}function _(b,$){let y;for(;typeof(y=this.refs[$])=="string";)$=y;return y||this.schemas[$]||m.call(this,b,$)}function m(b,$){const y=this.opts.uriResolver.parse($),d=(0,n._getFullPath)(this.opts.uriResolver,y);let P=(0,n.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&d===P)return S.call(this,y,b);const h=(0,n.normalizeId)(d),g=this.refs[h]||this.schemas[h];if(typeof g=="string"){const E=m.call(this,b,g);return typeof E?.schema!="object"?void 0:S.call(this,y,E)}if(typeof g?.schema=="object"){if(g.validate||c.call(this,g),h===(0,n.normalizeId)($)){const{schema:E}=g,{schemaId:O}=this.opts,A=E[O];return A&&(P=(0,n.resolveUrl)(this.opts.uriResolver,P,A)),new a({schema:E,schemaId:O,root:b,baseId:P})}return S.call(this,y,g)}}ht.resolveSchema=m;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(b,{baseId:$,schema:y,root:d}){var P;if(((P=b.fragment)===null||P===void 0?void 0:P[0])!=="/")return;for(const E of b.fragment.slice(1).split("/")){if(typeof y=="boolean")return;const O=y[(0,o.unescapeFragment)(E)];if(O===void 0)return;y=O;const A=typeof y=="object"&&y[this.opts.schemaId];!w.has(E)&&A&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,A))}let h;if(typeof y!="boolean"&&y.$ref&&!(0,o.schemaHasRulesButRef)(y,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,$,y.$ref);h=m.call(this,d,E)}const{schemaId:g}=this.opts;if(h=h||new a({schema:y,schemaId:g,root:d,baseId:$}),h.schema!==h.root.schema)return h}return ht}const _P="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",EP="Meta-schema for $data reference (JSON AnySchema extension proposal)",PP="object",SP=["$data"],IP={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},xP=!1,TP={$id:_P,description:EP,type:PP,required:SP,properties:IP,additionalProperties:xP};var Ts={},Sf;function NP(){if(Sf)return Ts;Sf=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=Jl();return e.code='require("ajv/dist/runtime/uri").default',Ts.default=e,Ts}var If;function kP(){return If||(If=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=Ps();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Ie();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=_i(),o=xs(),s=uf(),a=Ei(),c=Ie(),i=Es(),l=_s(),u=qe(),f=TP,_=NP(),m=(R,k)=>new RegExp(R,k);m.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes","defaultUnevaluatedProperties","defaultAdditionalProperties"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function d(R){var k,V,j,v,I,T,M,U,J,re,x,N,D,B,H,oe,C,X,se,ee,te,ue,ie,de,$e;const Me=R.strict,p=(k=R.code)===null||k===void 0?void 0:k.optimize,Y=p===!0||p===void 0?1:p||0,G=(j=(V=R.code)===null||V===void 0?void 0:V.regExp)!==null&&j!==void 0?j:m,Q=(v=R.uriResolver)!==null&&v!==void 0?v:_.default;return{strictSchema:(T=(I=R.strictSchema)!==null&&I!==void 0?I:Me)!==null&&T!==void 0?T:!0,strictNumbers:(U=(M=R.strictNumbers)!==null&&M!==void 0?M:Me)!==null&&U!==void 0?U:!0,strictTypes:(re=(J=R.strictTypes)!==null&&J!==void 0?J:Me)!==null&&re!==void 0?re:"log",strictTuples:(N=(x=R.strictTuples)!==null&&x!==void 0?x:Me)!==null&&N!==void 0?N:"log",strictRequired:(B=(D=R.strictRequired)!==null&&D!==void 0?D:Me)!==null&&B!==void 0?B:!1,code:R.code?{...R.code,optimize:Y,regExp:G}:{optimize:Y,regExp:G},loopRequired:(H=R.loopRequired)!==null&&H!==void 0?H:y,loopEnum:(oe=R.loopEnum)!==null&&oe!==void 0?oe:y,meta:(C=R.meta)!==null&&C!==void 0?C:!0,messages:(X=R.messages)!==null&&X!==void 0?X:!0,inlineRefs:(se=R.inlineRefs)!==null&&se!==void 0?se:!0,schemaId:(ee=R.schemaId)!==null&&ee!==void 0?ee:"$id",addUsedSchema:(te=R.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(ue=R.validateSchema)!==null&&ue!==void 0?ue:!0,validateFormats:(ie=R.validateFormats)!==null&&ie!==void 0?ie:!0,unicodeRegExp:(de=R.unicodeRegExp)!==null&&de!==void 0?de:!0,int32range:($e=R.int32range)!==null&&$e!==void 0?$e:!0,uriResolver:Q}}class P{constructor(k={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...d(k)};const{es5:V,lines:j}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:S,es5:V,lines:j}),this.logger=F(k.logger);const v=k.validateFormats;k.validateFormats=!1,this.RULES=(0,s.getRules)(),h.call(this,b,k,"NOT SUPPORTED"),h.call(this,$,k,"DEPRECATED","warn"),this._metaOpts=q.call(this),k.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&A.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),E.call(this),k.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:k,meta:V,schemaId:j}=this.opts;let v=f;j==="id"&&(v={...f},v.id=v.$id,delete v.$id),V&&k&&this.addMetaSchema(v,v[j],!1)}defaultMeta(){const{meta:k,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[V]||k:void 0}setDefaultUnevaluatedProperties(k){this.opts.defaultUnevaluatedProperties=k}validate(k,V){let j;if(typeof k=="string"){if(j=this.getSchema(k),!j)throw new Error(`no schema with key or ref "${k}"`)}else j=this.compile(k);const v=j(V);return"$async"in j||(this.errors=j.errors),v}compile(k,V){const j=this._addSchema(k,V);return j.validate||this._compileSchemaEnv(j)}compileAsync(k,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:j}=this.opts;return v.call(this,k,V);async function v(re,x){await I.call(this,re.$schema);const N=this._addSchema(re,x);return N.validate||T.call(this,N)}async function I(re){re&&!this.getSchema(re)&&await v.call(this,{$ref:re},!0)}async function T(re){try{return this._compileSchemaEnv(re)}catch(x){if(!(x instanceof o.default))throw x;return M.call(this,x),await U.call(this,x.missingSchema),T.call(this,re)}}function M({missingSchema:re,missingRef:x}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${x} cannot be resolved`)}async function U(re){const x=await J.call(this,re);this.refs[re]||await I.call(this,x.$schema),this.refs[re]||this.addSchema(x,re,V)}async function J(re){const x=this._loading[re];if(x)return x;try{return await(this._loading[re]=j(re))}finally{delete this._loading[re]}}}addSchema(k,V,j,v=this.opts.validateSchema){if(Array.isArray(k)){for(const T of k)this.addSchema(T,void 0,j,v);return this}let I;if(typeof k=="object"){const{schemaId:T}=this.opts;if(I=k[T],I!==void 0&&typeof I!="string")throw new Error(`schema ${T} must be string`)}return V=(0,i.normalizeId)(V||I),this._checkUnique(V),this.schemas[V]=this._addSchema(k,j,V,v,!0),this}addMetaSchema(k,V,j=this.opts.validateSchema){return this.addSchema(k,V,!0,j),this}validateSchema(k,V){if(typeof k=="boolean")return!0;let j;if(j=k.$schema,j!==void 0&&typeof j!="string")throw new Error("$schema must be a string");if(j=j||this.opts.defaultMeta||this.defaultMeta(),!j)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const v=this.validate(j,k);if(!v&&V){const I="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(I);else throw new Error(I)}return v}getSchema(k){let V;for(;typeof(V=g.call(this,k))=="string";)k=V;if(V===void 0){const{schemaId:j}=this.opts,v=new a.SchemaEnv({schema:{},schemaId:j});if(V=a.resolveSchema.call(this,v,k),!V)return;this.refs[k]=V}return V.validate||this._compileSchemaEnv(V)}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 V=g.call(this,k);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[k],delete this.refs[k],this}case"object":{const V=k;this._cache.delete(V);let j=k[this.opts.schemaId];return j&&(j=(0,i.normalizeId)(j),delete this.schemas[j],delete this.refs[j]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(const V of k)this.addKeyword(V);return this}addKeyword(k,V){let j;if(typeof k=="string")j=k,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=j);else if(typeof k=="object"&&V===void 0){if(V=k,j=V.keyword,Array.isArray(j)&&!j.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,j,V),!V)return(0,u.eachItem)(j,I=>le.call(this,I)),this;Se.call(this,V);const v={...V,type:(0,l.getJSONTypes)(V.type),schemaType:(0,l.getJSONTypes)(V.schemaType)};return(0,u.eachItem)(j,v.type.length===0?I=>le.call(this,I,v):I=>v.type.forEach(T=>le.call(this,I,v,T))),this}getKeyword(k){const V=this.RULES.all[k];return typeof V=="object"?V.definition:!!V}removeKeyword(k){const{RULES:V}=this;delete V.keywords[k],delete V.all[k];for(const j of V.rules){const v=j.rules.findIndex(I=>I.keyword===k);v>=0&&j.rules.splice(v,1)}return this}addFormat(k,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[k]=V,this}errorsText(k=this.errors,{separator:V=", ",dataVar:j="data"}={}){return!k||k.length===0?"No errors":k.map(v=>`${j}${v.instancePath} ${v.message}`).reduce((v,I)=>v+V+I)}$dataMetaSchema(k,V){const j=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(const v of V){const I=v.split("/").slice(1);let T=k;for(const M of I)T=T[M];for(const M in j){const U=j[M];if(typeof U!="object")continue;const{$data:J}=U.definition,re=T[M];J&&re&&(T[M]=_e(re))}}return k}_removeAllSchemas(k,V){for(const j in k){const v=k[j];(!V||V.test(j))&&(typeof v=="string"?delete k[j]:v&&!v.meta&&(this._cache.delete(v.schema),delete k[j]))}}_addSchema(k,V,j,v=this.opts.validateSchema,I=this.opts.addUsedSchema){let T;const{schemaId:M}=this.opts;if(typeof k=="object")T=k[M];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 U=this._cache.get(k);if(U!==void 0)return U;j=(0,i.normalizeId)(T||j);const J=i.getSchemaRefs.call(this,k,j);return U=new a.SchemaEnv({schema:k,schemaId:M,meta:V,baseId:j,localRefs:J}),this._cache.set(U.schema,U),I&&!j.startsWith("#")&&(j&&this._checkUnique(j),this.refs[j]=U),v&&this.validateSchema(k,!0),U}_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):a.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){const V=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,k)}finally{this.opts=V}}}P.ValidationError=n.default,P.MissingRefError=o.default,e.default=P;function h(R,k,V,j="error"){for(const v in R){const I=v;I in k&&this.logger[j](`${V}: option ${v}. ${R[I]}`)}}function g(R){return R=(0,i.normalizeId)(R),this.schemas[R]||this.refs[R]}function E(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const k in R)this.addSchema(R[k],k)}function O(){for(const R in this.opts.formats){const k=this.opts.formats[R];k&&this.addFormat(R,k)}}function A(R){if(Array.isArray(R)){this.addVocabulary(R);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const k in R){const V=R[k];V.keyword||(V.keyword=k),this.addKeyword(V)}}function q(){const R={...this.opts};for(const k of w)delete R[k];return R}const z={log(){},warn(){},error(){}};function F(R){if(R===!1)return z;if(R===void 0)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}const L=/^[a-z_$][a-z0-9_$:-]*$/i;function K(R,k){const{RULES:V}=this;if((0,u.eachItem)(R,j=>{if(V.keywords[j])throw new Error(`Keyword ${j} is already defined`);if(!L.test(j))throw new Error(`Keyword ${j} has invalid name`)}),!!k&&k.$data&&!("code"in k||"validate"in k))throw new Error('$data keyword must have "code" or "validate" function')}function le(R,k,V){var j;const v=k?.post;if(V&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:I}=this;let T=v?I.post:I.rules.find(({type:U})=>U===V);if(T||(T={type:V,rules:[]},I.rules.push(T)),I.keywords[R]=!0,!k)return;const M={keyword:R,definition:{...k,type:(0,l.getJSONTypes)(k.type),schemaType:(0,l.getJSONTypes)(k.schemaType)}};k.before?pe.call(this,T,M,k.before):T.rules.push(M),I.all[R]=M,(j=k.implements)===null||j===void 0||j.forEach(U=>this.addKeyword(U))}function pe(R,k,V){const j=R.rules.findIndex(v=>v.keyword===V);j>=0?R.rules.splice(j,0,k):(R.rules.push(k),this.logger.warn(`rule ${V} is not defined`))}function Se(R){let{metaSchema:k}=R;k!==void 0&&(R.$data&&this.opts.$data&&(k=_e(k)),R.validateSchema=this.compile(k,!0))}const ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(R){return{anyOf:[R,ce]}}})(Wd)),Wd}var Ns={},ks={},Os={},xf;function OP(){if(xf)return Os;xf=1,Object.defineProperty(Os,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Os.default=e,Os}var sr={},Tf;function jP(){if(Tf)return sr;Tf=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.callRef=sr.getValidate=void 0;const e=xs(),t=At(),r=Ie(),n=Ot(),o=Ei(),s=qe(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:f,it:_}=l,{baseId:m,schemaEnv:w,validateName:S,opts:b,self:$}=_,{root:y}=w;if((f==="#"||f==="#/")&&m===y.baseId)return P();const d=o.resolveRef.call($,y,m,f);if(d===void 0)throw new e.default(_.opts.uriResolver,m,f);if(d instanceof o.SchemaEnv)return h(d);return g(d);function P(){if(w===y)return i(l,S,w,w.$async);const E=u.scopeValue("root",{ref:y});return i(l,(0,r._)`${E}.validate`,y,y.$async)}function h(E){const O=c(l,E);i(l,O,E,E.$async)}function g(E){const O=u.scopeValue("schema",b.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),A=u.name("valid"),q=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:O,errSchemaPath:f},A,_.isAllOfVariant);l.mergeEvaluated(q),l.ok(A)}}};function c(l,u){const{gen:f}=l;return u.validate?f.scopeValue("validate",{ref:u.validate}):(0,r._)`${f.scopeValue("wrapper",{ref:u})}.validate`}sr.getValidate=c;function i(l,u,f,_){const{gen:m,it:w}=l,{allErrors:S,schemaEnv:b,opts:$}=w,y=$.passContext?n.default.this:r.nil;_?d():P();function d(){if(!b.$async)throw new Error("async schema referenced by sync schema");const E=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,t.callValidateCode)(l,u,y)}`),g(u),S||m.assign(E,!0)},O=>{m.if((0,r._)`!(${O} instanceof ${w.ValidationError})`,()=>m.throw(O)),h(O),S||m.assign(E,!1)}),l.ok(E)}function P(){const E=m.name("visitedNodes");m.code((0,r._)`const ${E} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${u}) || new Set()`),m.if((0,r._)`!${E}.has(${l.data})`,()=>{m.code((0,r._)`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${u}, ${E})`),m.code((0,r._)`const dataNode = ${l.data}`),m.code((0,r._)`if (typeof dataNode === "object" && dataNode !== null) ${E}.add(dataNode)`);const O=l.result((0,t.callValidateCode)(l,u,y),()=>g(u),()=>h(u));return m.code((0,r._)`${E}.delete(dataNode)`),O})}function h(E){const O=(0,r._)`${E}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${O} : ${n.default.vErrors}.concat(${O})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function g(E){var O;if(!w.opts.unevaluated)return;const A=(O=f?.validate)===null||O===void 0?void 0:O.evaluated;if(w.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(w.props=s.mergeEvaluated.props(m,A.props,w.props));else{const q=m.var("props",(0,r._)`${E}.evaluated.props`);w.props=s.mergeEvaluated.props(m,q,w.props,r.Name)}if(w.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(w.items=s.mergeEvaluated.items(m,A.items,w.items));else{const q=m.var("items",(0,r._)`${E}.evaluated.items`);w.items=s.mergeEvaluated.items(m,q,w.items,r.Name)}}}return sr.callRef=i,sr.default=a,sr}var Nf;function AP(){if(Nf)return ks;Nf=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=OP(),t=jP(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ks.default=r,ks}var js={},As={},kf;function CP(){if(kf)return As;kf=1,Object.defineProperty(As,"__esModule",{value:!0});const e=Ie(),t=e.operators,r={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}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:c,schemaCode:i}=s;s.fail$data((0,e._)`${c} ${r[a].fail} ${i} || isNaN(${c})`)}};return As.default=o,As}var Cs={},Of;function RP(){if(Of)return Cs;Of=1,Object.defineProperty(Cs,"__esModule",{value:!0});const e=Ie(),t={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:n,data:o,schemaCode:s,it:a}=r,c=a.opts.multipleOfPrecision,i=n.let("res"),l=c?(0,e._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${c}`:(0,e._)`${i} !== parseInt(${i})`;r.fail$data((0,e._)`(${s} === 0 || (${i} = ${o}/${s}, ${l}))`)}};return Cs.default=t,Cs}var Rs={},Ds={},jf;function DP(){if(jf)return Ds;jf=1,Object.defineProperty(Ds,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,o=0,s;for(;o<r;)n++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<r&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return n}return Ds.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ds}var Af;function qP(){if(Af)return Rs;Af=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=Ie(),t=qe(),r=DP(),n={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:c,it:i}=o,l=s==="maxLength"?e.operators.GT:e.operators.LT,u=i.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${u} ${l} ${c}`)}};return Rs.default=n,Rs}var qs={},Cf;function LP(){if(Cf)return qs;Cf=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=At(),t=qe(),r=Ie(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,r.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,r._)`{pattern: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:i,schemaCode:l,it:u}=o,f=u.opts.unicodeRegExp?"u":"";if(c){const{regExp:_}=u.opts.code,m=_.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,_),w=s.let("valid");s.try(()=>s.assign(w,(0,r._)`${m}(${l}, ${f}).test(${a})`),()=>s.assign(w,!1)),o.fail$data((0,r._)`!${w}`)}else{const _=(0,e.usePattern)(o,i);o.fail$data((0,r._)`!${_}.test(${a})`)}}};return qs.default=n,qs}var Ls={},Rf;function MP(){if(Rf)return Ls;Rf=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Ie(),t={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:n}){const o=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:n,data:o,schemaCode:s}=r,a=n==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Ls.default=t,Ls}var Ms={},Df;function VP(){if(Df)return Ms;Df=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=At(),t=yf(),r=Ie(),n=qe(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,r.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,r._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:c,schemaCode:i,data:l,$data:u,it:f}=s,{opts:_}=f;if(!u&&c.length===0)return;const m=c.length>=_.loopRequired;if(f.allErrors?w():S(),_.strictRequired){const y=s.parentSchema.properties,{definedProperties:d}=s.it;for(const P of c)if(y?.[P]===void 0&&!d.has(P)){const h=f.schemaEnv.baseId+f.errSchemaPath,g=`required property "${P}" is not defined at "${h}" (strictRequired)`;(0,n.checkStrictMode)(f,g,f.opts.strictRequired)}}function w(){var y;if(m||u)s.block$data(r.nil,b);else for(const d of c){const P=(y=(0,t.getSkipCondition)(s.parentSchema,d))!==null&&y!==void 0?y:(0,r._)`false`;a.if((0,r.not)(P),()=>(0,e.checkReportMissingProp)(s,d))}}function S(){const y=a.let("missing");if(m||u){const d=a.let("valid",!0);s.block$data(d,()=>$(y,d)),s.ok(d)}else a.if((0,e.checkMissingProp)(s,c,y)),(0,e.reportMissingProp)(s,y),a.else()}function b(){a.forOf("prop",i,y=>{s.setParams({missingProperty:y}),a.if((0,e.noPropertyInData)(a,l,y,_.ownProperties),()=>s.error())})}function $(y,d){s.setParams({missingProperty:y}),a.forOf(y,i,()=>{a.assign(d,(0,e.propertyInData)(a,l,y,_.ownProperties)),a.if((0,r.not)(d),()=>{s.error(),a.break()})},r.nil)}}};return Ms.default=o,Ms}var Vs={},qf;function FP(){if(qf)return Vs;qf=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Ie(),t=Ot(),r={keyword:"readOnly",schemaType:"boolean",error:{message:()=>(0,e.str)`must NOT be present in request context`},code(n){if(n.schema!==!0)return;const o=(0,e._)`(${t.default.this} && ${t.default.this}.apiContext)`;n.fail((0,e._)`${o} === "request"`)}};return Vs.default=r,Vs}var Fs={},Lf;function zP(){if(Lf)return Fs;Lf=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Ie(),t=Ot(),r={keyword:"writeOnly",schemaType:"boolean",error:{message:()=>(0,e.str)`must NOT be present in response context`},code(n){if(n.schema!==!0)return;const o=(0,e._)`(${t.default.this} && ${t.default.this}.apiContext)`;n.fail((0,e._)`${o} === "response"`)}};return Fs.default=r,Fs}var zs={},Mf;function UP(){if(Mf)return zs;Mf=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=Ie(),t={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:n}){const o=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:n,data:o,schemaCode:s}=r,a=n==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return zs.default=t,zs}var Us={},Bs={},Vf;function Pi(){if(Vf)return Bs;Vf=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=_n();return e.code='require("ajv/dist/runtime/equal").default',Bs.default=e,Bs}var Ff;function BP(){if(Ff)return Us;Ff=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=_s(),t=Ie(),r=qe(),n=Pi(),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:c,$data:i,schema:l,parentSchema:u,schemaCode:f,it:_}=s;if(!i&&!l)return;const m=a.let("valid"),w=u.items?(0,e.getSchemaTypes)(u.items):[];s.block$data(m,S,(0,t._)`${f} === false`),s.ok(m);function S(){const d=a.let("i",(0,t._)`${c}.length`),P=a.let("j");s.setParams({i:d,j:P}),a.assign(m,!0),a.if((0,t._)`${d} > 1`,()=>(b()?$:y)(d,P))}function b(){return w.length>0&&!w.some(d=>d==="object"||d==="array")}function $(d,P){const h=a.name("item"),g=(0,e.checkDataTypes)(w,h,_.opts.strictNumbers,e.DataType.Wrong),E=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${d}--;`,()=>{a.let(h,(0,t._)`${c}[${d}]`),a.if(g,(0,t._)`continue`),w.length>1&&a.if((0,t._)`typeof ${h} == "string"`,(0,t._)`${h} += "_"`),a.if((0,t._)`typeof ${E}[${h}] == "number"`,()=>{a.assign(P,(0,t._)`${E}[${h}]`),s.error(),a.assign(m,!1).break()}).code((0,t._)`${E}[${h}] = ${d}`)})}function y(d,P){const h=(0,r.useFunc)(a,n.default),g=a.name("outer");a.label(g).for((0,t._)`;${d}--;`,()=>a.for((0,t._)`${P} = ${d}; ${P}--;`,()=>a.if((0,t._)`${h}(${c}[${d}], ${c}[${P}])`,()=>{s.error(),a.assign(m,!1).break(g)})))}}};return Us.default=o,Us}var Gs={},zf;function GP(){if(zf)return Gs;zf=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=Ie(),t=qe(),r=Pi(),n={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:c,schemaCode:i,schema:l}=o;c||l&&typeof l=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${i})`):o.fail((0,e._)`${l} !== ${a}`)}};return Gs.default=n,Gs}var Ks={},Uf;function KP(){if(Uf)return Ks;Uf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=Ie(),t=qe(),r=Pi(),n={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:c,schema:i,schemaCode:l,it:u}=o;if(!c&&i.length===0)throw new Error("enum must have non-empty array");const f=i.length>=u.opts.loopEnum;let _;const m=()=>_??(_=(0,t.useFunc)(s,r.default));let w;if(f||c)w=s.let("valid"),o.block$data(w,S);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const $=s.const("vSchema",l);w=(0,e.or)(...i.map((y,d)=>b($,d)))}o.pass(w);function S(){s.assign(w,!1),s.forOf("v",l,$=>s.if((0,e._)`${m()}(${a}, ${$})`,()=>s.assign(w,!0).break()))}function b($,y){const d=i[y];return typeof d=="object"&&d!==null?(0,e._)`${m()}(${a}, ${$}[${y}])`:(0,e._)`${a} === ${d}`}}};return Ks.default=n,Ks}var Bf;function JP(){if(Bf)return js;Bf=1,Object.defineProperty(js,"__esModule",{value:!0});const e=CP(),t=RP(),r=qP(),n=LP(),o=MP(),s=VP(),a=FP(),c=zP(),i=UP(),l=BP(),u=GP(),f=KP(),_=[e.default,t.default,r.default,n.default,o.default,s.default,a.default,c.default,i.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];return js.default=_,js}var Js={},Ar={},Gf;function Kf(){if(Gf)return Ar;Gf=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.validateAdditionalItems=void 0;const e=Ie(),t=qe(),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:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:i,keyword:l,it:u}=o;u.items=!0;const f=a.const("len",(0,e._)`${i}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${f} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(u,c)){const m=a.var("valid",(0,e._)`${f} <= ${s.length}`);a.if((0,e.not)(m),()=>_(m)),o.ok(m)}function _(m){a.forRange("i",s.length,f,w=>{o.subschema({keyword:l,dataProp:w,dataPropType:t.Type.Num},m),u.allErrors||a.if((0,e.not)(m),()=>a.break())})}}return Ar.validateAdditionalItems=n,Ar.default=r,Ar}var Ys={},Cr={},Jf;function Yf(){if(Jf)return Cr;Jf=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.validateTuple=void 0;const e=Ie(),t=qe(),r=At(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:c}=s;if(Array.isArray(a))return o(s,"additionalItems",a);c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&s.ok((0,r.validateArray)(s))}};function o(s,a,c=s.schema){const{gen:i,parentSchema:l,data:u,keyword:f,it:_}=s;S(l),_.opts.unevaluated&&c.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(i,c.length,_.items));const m=i.name("valid"),w=i.const("len",(0,e._)`${u}.length`);c.forEach((b,$)=>{(0,t.alwaysValidSchema)(_,b)||(i.if((0,e._)`${w} > ${$}`,()=>s.subschema({keyword:f,schemaProp:$,dataProp:$},m)),s.ok(m))});function S(b){const{opts:$,errSchemaPath:y}=_,d=c.length,P=d===b.minItems&&(d===b.maxItems||b[a]===!1);if($.strictTuples&&!P){const h=`"${f}" is ${d}-tuple, but minItems or maxItems/${a} are not specified or different at path "${y}"`;(0,t.checkStrictMode)(_,h,$.strictTuples)}}}return Cr.validateTuple=o,Cr.default=n,Cr}var Wf;function YP(){if(Wf)return Ys;Wf=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=Yf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Ys.default=t,Ys}var Ws={},Hf;function WP(){if(Hf)return Ws;Hf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=Ie(),t=qe(),r=At(),n=Kf(),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:c,it:i}=s,{prefixItems:l}=c;i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&(l?(0,n.validateAdditionalItems)(s,l):s.ok((0,r.validateArray)(s)))}};return Ws.default=o,Ws}var Hs={},Xf;function HP(){if(Xf)return Hs;Xf=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=Ie(),t=qe(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:i}=n;let l,u;const{minContains:f,maxContains:_}=a;i.opts.next?(l=f===void 0?1:f,u=_):l=1;const m=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:l,max:u}),u===void 0&&l===0){(0,t.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&l>u){(0,t.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(i,s)){let y=(0,e._)`${m} >= ${l}`;u!==void 0&&(y=(0,e._)`${y} && ${m} <= ${u}`),n.pass(y);return}i.items=!0;const w=o.name("valid");u===void 0&&l===1?b(w,()=>o.if(w,()=>o.break())):l===0?(o.let(w,!0),u!==void 0&&o.if((0,e._)`${c}.length > 0`,S)):(o.let(w,!1),S()),n.result(w,()=>n.reset());function S(){const y=o.name("_valid"),d=o.let("count",0);b(y,()=>o.if(y,()=>$(d)))}function b(y,d){o.forRange("i",0,m,P=>{n.subschema({keyword:"contains",dataProp:P,dataPropType:t.Type.Num,compositeRule:!0},y),d()})}function $(y){o.code((0,e._)`${y}++`),u===void 0?o.if((0,e._)`${y} >= ${l}`,()=>o.assign(w,!0).break()):(o.if((0,e._)`${y} > ${u}`,()=>o.assign(w,!1).break()),l===1?o.assign(w,!0):o.if((0,e._)`${y} >= ${l}`,()=>o.assign(w,!0)))}}};return Hs.default=r,Hs}var Qf={},Zf;function XP(){return Zf||(Zf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ie(),r=qe(),n=At();e.error={message:({params:{property:i,depsCount:l,deps:u}})=>{const f=l===1?"property":"properties";return(0,t.str)`must have ${f} ${u} when property ${i} is present`},params:({params:{property:i,depsCount:l,deps:u,missingProperty:f}})=>(0,t._)`{property: ${i},
|
|
76
|
+
missingProperty: ${f},
|
|
77
|
+
depsCount: ${l},
|
|
78
|
+
deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[l,u]=s(i);a(i,l),c(i,u)}};function s({schema:i}){const l={},u={};for(const f in i){if(f==="__proto__")continue;const _=Array.isArray(i[f])?l:u;_[f]=i[f]}return[l,u]}function a(i,l=i.schema){const{gen:u,data:f,it:_}=i;if(Object.keys(l).length===0)return;const m=u.let("missing");for(const w in l){const S=l[w];if(S.length===0)continue;const b=(0,n.propertyInData)(u,f,w,_.opts.ownProperties);i.setParams({property:w,depsCount:S.length,deps:S.join(", ")}),_.allErrors?u.if(b,()=>{for(const $ of S)(0,n.checkReportMissingProp)(i,$)}):(u.if((0,t._)`${b} && (${(0,n.checkMissingProp)(i,S,m)})`),(0,n.reportMissingProp)(i,m),u.else())}}e.validatePropertyDeps=a;function c(i,l=i.schema){const{gen:u,data:f,keyword:_,it:m}=i,w=u.name("valid");for(const S in l)(0,r.alwaysValidSchema)(m,l[S])||(u.if((0,n.propertyInData)(u,f,S,m.opts.ownProperties),()=>{const b=i.subschema({keyword:_,schemaProp:S},w);i.mergeValidEvaluated(b,w)},()=>u.var(w,!0)),i.ok(w))}e.validateSchemaDeps=c,e.default=o})(Qf)),Qf}var Xs={},em;function QP(){if(em)return Xs;em=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Ie(),t=qe(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const i=o.name("valid");o.forIn("key",a,l=>{n.setParams({propertyName:l}),n.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},i),o.if((0,e.not)(i),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(i)}};return Xs.default=r,Xs}var Qs={},tm;function rm(){if(tm)return Qs;tm=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=At(),t=Ie(),r=Ot(),n=qe(),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,parentSchema:c,data:i,errsCount:l,it:u}=s,{schema:f=u.opts.defaultAdditionalProperties}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:_,opts:m}=u;if(u.props=!0,m.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(u,f))return;const w=(0,e.allSchemaProperties)(c.properties),S=(0,e.allSchemaProperties)(c.patternProperties);b(),s.ok((0,t._)`${l} === ${r.default.errors}`);function b(){a.forIn("key",i,h=>{!w.length&&!S.length?d(h):a.if($(h),()=>d(h))})}function $(h){let g;if(w.length>8){const E=(0,n.schemaRefOrVal)(u,c.properties,"properties");g=(0,e.isOwnProperty)(a,E,h)}else w.length?g=(0,t.or)(...w.map(E=>(0,t._)`${h} === ${E}`)):g=t.nil;return S.length&&(g=(0,t.or)(g,...S.map(E=>(0,t._)`${(0,e.usePattern)(s,E)}.test(${h})`))),(0,t.not)(g)}function y(h){a.code((0,t._)`delete ${i}[${h}]`)}function d(h){if(m.removeAdditional==="all"||m.removeAdditional&&f===!1){y(h);return}if(f===!1){s.setParams({additionalProperty:h}),s.error(),_||a.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(u,f)){const g=a.name("valid");m.removeAdditional==="failing"?(P(h,g,!1),a.if((0,t.not)(g),()=>{s.reset(),y(h)})):(P(h,g),_||a.if((0,t.not)(g),()=>a.break()))}}function P(h,g,E){const O={keyword:"additionalProperties",dataProp:h,dataPropType:n.Type.Str};E===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(O,g)}}};return Qs.default=o,Qs}var Zs={},nm;function ZP(){if(nm)return Zs;nm=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Ps(),t=At(),r=qe(),n=rm(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:c,parentSchema:i,data:l,it:u}=s;(u.opts.removeAdditional==="all"&&i.additionalProperties===void 0||u.opts.defaultAdditionalProperties===!1)&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const f=(0,t.allSchemaProperties)(c);for(const b of f)u.definedProperties.add(b);u.opts.unevaluated&&f.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(f),u.props));const _=f.filter(b=>!(0,r.alwaysValidSchema)(u,c[b]));if(_.length===0)return;const m=a.name("valid");for(const b of _)w(b)?S(b):(a.if((0,t.propertyInData)(a,l,b,u.opts.ownProperties)),S(b),u.allErrors||a.else().var(m,!0),a.endIf()),s.it.definedProperties.add(b),s.ok(m);function w(b){return u.opts.useDefaults&&!u.compositeRule&&c[b].default!==void 0}function S(b){s.subschema({keyword:"properties",schemaProp:b,dataProp:b},m)}}};return Zs.default=o,Zs}var ea={},om;function e1(){if(om)return ea;om=1,Object.defineProperty(ea,"__esModule",{value:!0});const e=At(),t=Ie(),r=qe(),n=qe(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:c,data:i,parentSchema:l,it:u}=s,{opts:f}=u,_=(0,e.allSchemaProperties)(c),m=_.filter(P=>(0,r.alwaysValidSchema)(u,c[P]));if(_.length===0||m.length===_.length&&(!u.opts.unevaluated||u.props===!0))return;const w=f.strictSchema&&!f.allowMatchingProperties&&l.properties,S=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:b}=u;$();function $(){for(const P of _)w&&y(P),u.allErrors?d(P):(a.var(S,!0),d(P),a.if(S))}function y(P){for(const h in w)new RegExp(P).test(h)&&(0,r.checkStrictMode)(u,`property ${h} matches pattern ${P} (use allowMatchingProperties)`)}function d(P){a.forIn("key",i,h=>{a.if((0,t._)`${(0,e.usePattern)(s,P)}.test(${h})`,()=>{const g=m.includes(P);g||s.subschema({keyword:"patternProperties",schemaProp:P,dataProp:h,dataPropType:n.Type.Str},S),u.opts.unevaluated&&b!==!0?a.assign((0,t._)`${b}[${h}]`,!0):!g&&!u.allErrors&&a.if((0,t.not)(S),()=>a.break())})})}}};return ea.default=o,ea}var ta={},sm;function t1(){if(sm)return ta;sm=1,Object.defineProperty(ta,"__esModule",{value:!0});const e=qe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:o,it:s}=r;if((0,e.alwaysValidSchema)(s,o)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return ta.default=t,ta}var ra={},am;function r1(){if(am)return ra;am=1,Object.defineProperty(ra,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:At().validateUnion,error:{message:"must match a schema in anyOf"}};return ra.default=e,ra}var na={},im;function n1(){if(im)return na;im=1,Object.defineProperty(na,"__esModule",{value:!0});const e=Ie(),t=qe(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const i=s,l=o.let("valid",!1),u=o.let("passing",null),f=o.name("_valid");n.setParams({passing:u}),o.block(_),n.result(l,()=>n.reset(),()=>n.error(!0));function _(){i.forEach((m,w)=>{let S;(0,t.alwaysValidSchema)(c,m)?o.var(f,!0):S=n.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},f),w>0&&o.if((0,e._)`${f} && ${l}`).assign(l,!1).assign(u,(0,e._)`[${u}, ${w}]`).else(),o.if(f,()=>{o.assign(l,!0),o.assign(u,w),S&&n.mergeEvaluated(S,e.Name)})})}}};return na.default=r,na}var oa={},cm;function o1(){if(cm)return oa;cm=1,Object.defineProperty(oa,"__esModule",{value:!0});const e=qe(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:o,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");const a=n.name("valid");o.forEach((c,i)=>{if((0,e.alwaysValidSchema)(s,c))return;const l=r.subschema({keyword:"allOf",schemaProp:i},a,!0);r.ok(a),r.mergeEvaluated(l)})}};return oa.default=t,oa}var sa={},lm;function s1(){if(lm)return sa;lm=1,Object.defineProperty(sa,"__esModule",{value:!0});const e=Ie(),t=qe(),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:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const i=n(c,"then"),l=n(c,"else");if(!i&&!l)return;const u=s.let("valid",!0),f=s.name("_valid");if(_(),o.reset(),i&&l){const w=s.let("ifClause");o.setParams({ifClause:w}),s.if(f,m("then",w),m("else",w))}else i?s.if(f,m("then")):s.if((0,e.not)(f),m("else"));o.pass(u,()=>o.error(!0));function _(){const w=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated(w)}function m(w,S){return()=>{const b=o.subschema({keyword:w},f);s.assign(u,f),o.mergeValidEvaluated(b,u),S?s.assign(S,(0,e._)`${w}`):o.setParams({ifClause:w})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return sa.default=r,sa}var aa={},um;function a1(){if(um)return aa;um=1,Object.defineProperty(aa,"__esModule",{value:!0});const e=qe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "if" is ignored`)}};return aa.default=t,aa}var pm;function i1(){if(pm)return Js;pm=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=Kf(),t=YP(),r=Yf(),n=WP(),o=HP(),s=XP(),a=QP(),c=rm(),i=ZP(),l=e1(),u=t1(),f=r1(),_=n1(),m=o1(),w=s1(),S=a1();function b($=!1){const y=[u.default,f.default,_.default,m.default,w.default,S.default,a.default,c.default,s.default,i.default,l.default];return $?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y}return Js.default=b,Js}var ia={},ca={},dm;function c1(){if(dm)return ca;dm=1,Object.defineProperty(ca,"__esModule",{value:!0});const e=Ie(),t={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,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:i,it:l}=r,{opts:u,errSchemaPath:f,schemaEnv:_,self:m}=l;if(!u.validateFormats)return;a?w():S();function w(){const b=o.scopeValue("formats",{ref:m.formats,code:u.code.formats}),$=o.const("fDef",(0,e._)`${b}[${i}]`),y=o.let("fType"),d=o.let("format");o.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>o.assign(y,(0,e._)`${$}.type || "string"`).assign(d,(0,e._)`${$}.validate`),()=>o.assign(y,(0,e._)`"string"`).assign(d,$)),r.fail$data((0,e.or)(P(),h()));function P(){return u.strictSchema===!1?e.nil:(0,e._)`${i} && !${d}`}function h(){const g=_.$async?(0,e._)`(${$}.async ? await ${d}(${s}) : ${d}(${s}))`:(0,e._)`${d}(${s})`,E=(0,e._)`(typeof ${d} == "function" ? ${g} : ${d}.test(${s}))`;return(0,e._)`${d} && ${d} !== true && ${y} === ${n} && !${E}`}}function S(){const b=m.formats[c];if(!b){P();return}if(b===!0)return;const[$,y,d]=h(b);$===n&&r.pass(g());function P(){if(u.strictSchema===!1){m.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function h(E){const O=E instanceof RegExp?(0,e.regexpCode)(E):u.code.formats?(0,e._)`${u.code.formats}${(0,e.getProperty)(c)}`:void 0,A=o.scopeValue("formats",{key:c,ref:E,code:O});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,e._)`${A}.validate`]:["string",E,A]}function g(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${d}(${s})`}return typeof y=="function"?(0,e._)`${d}(${s})`:(0,e._)`${d}.test(${s})`}}}};return ca.default=t,ca}var fm;function l1(){if(fm)return ia;fm=1,Object.defineProperty(ia,"__esModule",{value:!0});const e=[c1().default];return ia.default=e,ia}var Rr={},mm;function u1(){return mm||(mm=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.contentVocabulary=Rr.metadataVocabulary=void 0,Rr.metadataVocabulary=["title","description","default","deprecated","examples"],Rr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Rr}var hm;function p1(){if(hm)return Ns;hm=1,Object.defineProperty(Ns,"__esModule",{value:!0});const e=AP(),t=JP(),r=i1(),n=l1(),o=u1(),s=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return Ns.default=s,Ns}var la={},hn={},ym;function d1(){if(ym)return hn;ym=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(hn.DiscrError=e={})),hn}var gm;function f1(){if(gm)return la;gm=1,Object.defineProperty(la,"__esModule",{value:!0});const e=Ie(),t=d1(),r=Ei(),n=xs(),o=qe(),s={message:({params:{discrError:i,tagName:l}})=>i===t.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf or anyOf`,params:({params:{discrError:i,tag:l,tagName:u}})=>(0,e._)`{error: ${i}, tag: ${u}, tagValue: ${l}}`};function a(i,l){var u;if(!(!i.allOf||!Array.isArray(i.allOf))){for(const f of i.allOf)if(!((u=f?.properties)===null||u===void 0)&&u[l])return f.properties[l]}}const c={keyword:"discriminator",type:"object",schemaType:"object",error:s,code(i){const{gen:l,data:u,schema:f,parentSchema:_,it:m}=i,w=_.oneOf?"oneOf":_.anyOf?"anyOf":void 0;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const S=f.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(!w)throw new Error("discriminator: requires oneOf or anyOf composite keyword");const b=_[w],$=l.let("valid",!1),y=l.const("tag",(0,e._)`${u}${(0,e.getProperty)(S)}`);l.if((0,e._)`typeof ${y} == "string"`,()=>d(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:y,tagName:S})),i.ok($);function d(){const g=h();l.if(!1);for(const E in g)l.elseIf((0,e._)`${y} === ${E}`),l.assign($,P(g[E]));l.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:y,tagName:S}),l.endIf()}function P(g){const E=l.name("valid"),O=i.subschema({keyword:w,schemaProp:g},E);return i.mergeEvaluated(O,e.Name),E}function h(){var g;const E={},O=q(_);let A=!0;for(let L=0;L<b.length;L++){let K=b[L];const le=K?.$ref;if(le&&f.mapping){const{mapping:Se}=f,ce=Object.keys(Se).filter(_e=>Se[_e]===K.$ref);if(ce.length){for(const _e of ce)F(_e,L);continue}}if(le&&!(0,o.schemaHasRulesButRef)(K,m.self.RULES)&&(K=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,le),K instanceof r.SchemaEnv&&(K=K.schema),K===void 0))throw new n.default(m.opts.uriResolver,m.baseId,le);let pe=(g=K?.properties)===null||g===void 0?void 0:g[S];if(!pe&&K?.allOf&&(pe=a(K,S)),typeof pe!="object")throw new Error(`discriminator: ${w} subschemas (or referenced schemas) must have "properties/${S}" or match mapping`);A=A&&(O||q(K)),z(pe,L)}if(!A)throw new Error(`discriminator: "${S}" must be required`);return E;function q(L){if(Array.isArray(L.required)&&L.required.includes(S))return!0;if(L.allOf&&Array.isArray(L.allOf))for(const K of L.allOf){const le=K;if(Array.isArray(le.required)&&le.required.includes(S))return!0}return!1}function z(L,K){if(L.const)F(L.const,K);else if(L.enum)for(const le of L.enum)F(le,K);else throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function F(L,K){if(typeof L!="string"||L in E)throw new Error(`discriminator: "${S}" values must be unique strings`);E[L]=K}}}};return la.default=c,la}const m1="http://json-schema.org/draft-07/schema#",h1="http://json-schema.org/draft-07/schema#",y1="Core schema meta-schema",g1={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:[]}},v1=["object","boolean"],b1={$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:"#"}},w1={$schema:m1,$id:h1,title:y1,definitions:g1,type:v1,properties:b1,default:!0};var vm;function $1(){return vm||(vm=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=t.Ajv=void 0;const r=kP(),n=p1(),o=f1(),s=w1,a=["/properties"],c="http://json-schema.org/draft-07/schema";class i extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(w,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=i,e.exports=t=i,e.exports.Ajv=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var l=Ps();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Ie();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=_i();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var _=xs();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})($i,$i.exports)),$i.exports}var bm;function _1(){return bm||(bm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=$1(),r=Ie(),n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:c,schemaCode:i})=>(0,r.str)`should be ${o[c].okStr} ${i}`,params:({keyword:c,schemaCode:i})=>(0,r._)`{comparison: ${o[c].okStr}, limit: ${i}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:i,data:l,schemaCode:u,keyword:f,it:_}=c,{opts:m,self:w}=_;if(!m.validateFormats)return;const S=new t.KeywordCxt(_,w.RULES.all.format.definition,"format");S.$data?b():$();function b(){const d=i.scopeValue("formats",{ref:w.formats,code:m.code.formats}),P=i.const("fmt",(0,r._)`${d}[${S.schemaCode}]`);c.fail$data((0,r.or)((0,r._)`typeof ${P} != "object"`,(0,r._)`${P} instanceof RegExp`,(0,r._)`typeof ${P}.compare != "function"`,y(P)))}function $(){const d=S.schema,P=w.formats[d];if(!P||P===!0)return;if(typeof P!="object"||P instanceof RegExp||typeof P.compare!="function")throw new Error(`"${f}": format "${d}" does not define "compare" function`);const h=i.scopeValue("formats",{key:d,ref:P,code:m.code.formats?(0,r._)`${m.code.formats}${(0,r.getProperty)(d)}`:void 0});c.fail$data(y(h))}function y(d){return(0,r._)`${d}.compare(${l}, ${u}) ${o[f].fail} 0`}},dependencies:["format"]};const a=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=a})(Yd)),Yd}var wm;function E1(){return wm||(wm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=gP(),n=_1(),o=Ie(),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),c=(l,u={keywords:!0})=>{if(Array.isArray(u))return i(l,u,r.fullFormats,s),l;const[f,_]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,s],m=u.formats||r.formatNames;return i(l,m,f,_),u.keywords&&(0,n.default)(l),l};c.get=(l,u="full")=>{const f=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!f)throw new Error(`Unknown format "${l}"`);return f};function i(l,u,f,_){var m,w;(m=(w=l.opts.code).formats)!==null&&m!==void 0||(w.formats=(0,o._)`require("ajv-formats/dist/formats").${_}`);for(const S of u)l.addFormat(S,f[S])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(wi,wi.exports)),wi.exports}var P1=E1();const S1=Vr(P1);function $m(e){return e==="draft4"?"id":"$id"}function I1(e){return e==="oas2"||e==="oas3_0"?"draft4":"2020"}class Si{instances={};validate(t,r,n){const{schemaLoc:o,instancePath:s,resolve:a,allowAdditionalProperties:c,ajvContext:i,specVersion:l}=n,u=I1(l),f=this.getValidator(r,o,a,c,u);if(!f)return{valid:!0,errors:[]};const _={instancePath:s,parentData:{fake:{}},parentDataProperty:"fake",rootData:{},dynamicAnchors:{}};return{valid:!!f.call(i??{},t,_),errors:(f.errors||[]).map(m)};function m(w){let S=w.message;const b=w.keyword==="enum"?w.params.allowedValues:void 0;b&&(S+=` ${b.map(d=>`"${d}"`).join(", ")}`),w.keyword==="type"&&(S=`type ${S}`);const $=w.instancePath.substring(s.length+1),y=$.substring($.lastIndexOf("/")+1);if(y&&(S=`\`${y}\` property ${S}`),w.keyword==="additionalProperties"||w.keyword==="unevaluatedProperties"){const d=w.params.additionalProperty||w.params.unevaluatedProperty;S=`${S} \`${d}\``,w.instancePath+="/"+ny(d)}return{...w,message:S,suggest:b}}}getAjv(t,r){if(!this.instances[r]){const n=$m(r),o={schemaId:n,meta:!0,allErrors:!0,strictSchema:!1,inlineRefs:!1,validateSchema:!1,discriminator:!0,allowUnionTypes:!0,validateFormats:!0,passContext:!0,logger:!1,loadSchemaSync(s,a,c){const i=decodeURI(s.split("#")[0]),l=t({$ref:a},i);return!l||!l.location?!1:{[n]:encodeURI(l.location.source.absoluteRef)+"#"+c,...l.node}}};this.instances[r]=r==="2020"?new Va(o):new yP(o),S1(this.instances[r])}return this.instances[r]}getValidator(t,r,n,o,s){const a=this.getAjv(n,s),c=encodeURI(r.absolutePointer),i=$m(s);return a.getSchema(c)||(a.setDefaultUnevaluatedProperties(o),a.addSchema({[i]:c,...t},c)),a.getSchema(c)}}const _m=e=>{const t=new Si;return{Parameter:{leave(r,n){if(Qt(r.example)&&tn({example:r.example,schema:r.schema,options:{location:n.location.child("example"),ctx:n,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties,ajvContext:{apiContext:"request"}},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-parameter-examples"}),xe(r.examples))for(const[o,s]of Object.entries(r.examples)){const a=Mp(s);a&&tn({example:a.value,schema:r.schema,options:{location:n.location.child(["examples",o,a.field]),ctx:n,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties,ajvContext:{apiContext:"request"}},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-parameter-examples"})}}}}},Em=e=>{const t=new Si;return{Schema:{leave(r,n){const o=r.examples;if(Array.isArray(o))for(const s of o)tn({example:s,schema:r,options:{location:n.location.child(["examples",o.indexOf(s)]),ctx:n,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-schema-examples"});if(Qt(r.example)){if(r.nullable===!0&&r.example===null&&r.type!==void 0)return;tn({example:r.example,schema:r,options:{location:n.location.child("example"),ctx:n,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-schema-examples"})}}}}},Pm=()=>({PathItem(e,{report:t,key:r,rawLocation:n}){r.endsWith("/")&&r!=="/"&&t({message:`\`${r}\` should not have a trailing slash.`,location:n.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-path-trailing-slash"})}}),Sm=({validateWebhooks:e})=>({Paths:{Responses(t,{report:r}){const n=Object.keys(t||{});Qo({responseCodes:n,codeRange:"2XX",report:r,reference:"https://redocly.com/docs/cli/rules/oas/operation-2xx-response"})}},WebhooksMap:{Responses(t,{report:r}){if(!e)return;const n=Object.keys(t||{});Qo({responseCodes:n,codeRange:"2XX",report:r,reference:"https://redocly.com/docs/cli/rules/oas/operation-2xx-response"})}}}),Im=({validateWebhooks:e})=>({Paths:{Responses(t,{report:r}){const n=Object.keys(t||{});Qo({responseCodes:n,codeRange:"4XX",report:r,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-response"})}},WebhooksMap:{Responses(t,{report:r}){if(!e)return;const n=Object.keys(t||{});Qo({responseCodes:n,codeRange:"4XX",report:r,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-response"})}}}),xm=()=>({Operation(e,t){Tr({fieldName:"description",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-description"})}}),Tm=()=>{const e=new Set;return{Operation(t,{report:r,location:n}){t.operationId&&(e.has(t.operationId)&&r({message:"Every operation must have a unique `operationId`.",location:n.child([t.operationId]),reference:"https://redocly.com/docs/cli/rules/oas/operation-operationId-unique"}),e.add(t.operationId))}}},x1=/^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/,Nm=()=>({Operation(e,{report:t,location:r}){e.operationId&&!x1.test(e.operationId)&&t({message:"Operation `operationId` should not have URL invalid characters.",location:r.child(["operationId"]),reference:"https://redocly.com/docs/cli/rules/oas/operation-operationId-url-safe"})}}),km=()=>{let e,t;return{PathItem:{enter(){e=new Set},Parameter(r,{report:n,key:o,parentLocations:s}){const a=`${r.in}___${r.name}`;e.has(a)&&n({message:`Paths must have unique \`name\` + \`in\` parameters.
|
|
79
|
+
Repeats of \`in:${r.in}\` + \`name:${r.name}\`.`,location:s.PathItem.child(["parameters",o]),reference:"https://redocly.com/docs/cli/rules/oas/operation-parameters-unique"}),e.add(`${r.in}___${r.name}`)},Operation:{enter(){t=new Set},Parameter(r,{report:n,key:o,parentLocations:s}){const a=`${r.in}___${r.name}`;t.has(a)&&n({message:`Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${r.in}\` + \`name:${r.name}\`.`,location:s.Operation.child(["parameters",o]),reference:"https://redocly.com/docs/cli/rules/oas/operation-parameters-unique"}),t.add(a)}}}}},Om=()=>({Operation(e,{report:t,location:r}){e.tags&&e.tags.length>1&&t({message:"Operation `tags` object should have only one tag.",location:r.child(["tags"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/operation-singular-tag"})}}),jm=()=>({Operation(e,t){Tr({fieldName:"summary",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-summary"})}}),Am=()=>{let e;return{Root(t){e=new Set((t.tags??[]).map(r=>r.name))},Operation(t,{report:r,location:n}){if(t?.tags)for(let o=0;o<t.tags.length;o++)e.has(t.tags[o])||r({message:"Operation tags should be defined in global tags.",location:n.child(["tags",o]),reference:"https://redocly.com/docs/cli/rules/oas/operation-tag-defined"});else r({message:"Operation tags should be defined",location:n.key(),reference:"https://redocly.com/docs/cli/rules/oas/operation-tag-defined"})}}},Cm=()=>({Parameter(e,{report:t,location:r}){e.description===void 0?t({message:"Parameter object description must be present.",location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/oas/parameter-description"}):e.description||t({message:"Parameter object description must be non-empty string.",location:r.child(["description"]),reference:"https://redocly.com/docs/cli/rules/oas/parameter-description"})}}),Rm=()=>({PathItem(e,{report:t,key:r}){r.indexOf("{}")!==-1&&t({message:"Path parameter declarations must be non-empty. `{}` is invalid.",location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/oas/path-declaration-must-exist"})}}),T1=["get","head","post","put","patch","delete","options","query","trace"],Dm=e=>{const t=e&&e.order||T1;if(!Array.isArray(t))throw new Error("path-http-verbs-order `order` option must be an array");return{PathItem(r,{report:n,location:o}){const s=Object.keys(r).filter(a=>t.includes(a));for(let a=0;a<s.length-1;a++){const c=t.indexOf(s[a]);t.indexOf(s[a+1])<c&&n({message:"Operation http verbs must be ordered.",location:{reportOnKey:!0,...o.child(s[a+1])},reference:"https://redocly.com/docs/cli/rules/oas/path-http-verbs-order"})}}}},qm=()=>({Paths:{PathItem(e,{report:t,key:r}){r.toString().includes("?")&&t({message:"Don't put query string items in the path, they belong in parameters with `in: query`.",location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/oas/path-not-include-query"})}}}),N1=/\{([a-zA-Z0-9_.-]+)\}+/g,k1=2,ua=()=>{const e={current:null};return{PathItem:{enter(t,{key:r}){Lm(e,r)},leave(){O1(e)},Parameter(t,{report:r,location:n,rawLocation:o}){Mm({parameter:t,pathContext:e,report:r,location:n,rawLocation:o})},Operation:Vm(e,new Set)}}},Lm=(e,t)=>{e.current={path:t,templateParams:j1(t),definedParams:new Set}},O1=e=>{e.current=null},Mm=({parameter:e,pathContext:t,report:r,location:n,rawLocation:o})=>{e.in==="path"&&e.name&&t.current&&(t.current.definedParams.add(e.name),Fm({paramName:e.name,templateParams:t.current.templateParams,path:t.current.path,report:r,location:n,rawLocation:o}))},Vm=(e,t,r=0)=>{const n=(s,a,c)=>{s({message:`Maximum callback nesting depth (${c}) reached. Path parameter validation is limited beyond this depth to prevent infinite recursion.`,location:a,reference:"https://redocly.com/docs/cli/rules/oas/path-parameters-defined"})};if(r>=k1)return{enter:()=>{},leave:(s,{report:a,location:c})=>{n(a,c,r)},Parameter:()=>{},Callback:void 0};const o=()=>{let s=null;return{enter(a,{key:c}){s=e.current,Lm(e,c)},leave(){e.current=s},Parameter(a,{report:c,location:i,rawLocation:l}){Mm({parameter:a,pathContext:e,report:c,location:i,rawLocation:l})},get Operation(){return Vm(e,t,r+1)}}};return{enter(){t=new Set},leave(s,{report:a,location:c}){!e.current||!t||C1({templateParams:e.current.templateParams,definedOperationParams:t,definedPathParams:e.current.definedParams,path:e.current.path,report:a,location:c})},Parameter(s,{report:a,location:c,rawLocation:i}){A1(s,t),s.in==="path"&&s.name&&e.current&&(t.add(s.name),Fm({paramName:s.name,templateParams:e.current.templateParams,path:e.current.path,report:a,location:c,rawLocation:i}))},Callback:{get PathItem(){return o()}}}},j1=e=>new Set(Array.from(e.matchAll(N1)).map(t=>t[1])),A1=(e,t)=>{xe(e)&&"in"in e&&"name"in e&&e.in==="path"&&e.name&&t.add(e.name)},Fm=({paramName:e,templateParams:t,path:r,report:n,location:o,rawLocation:s})=>{if(!t.has(e)){const a=`Path parameter \`${e}\` is not used in the path \`${r}\`.`,c=s===o?void 0:s;n({message:a,location:o.child(["name"]),from:c,reference:"https://redocly.com/docs/cli/rules/oas/path-parameters-defined"})}},C1=({templateParams:e,definedOperationParams:t,definedPathParams:r,path:n,report:o,location:s})=>{const a=new Set([...t,...r]);for(const c of e)a.has(c)||o({message:`The operation does not define the path parameter \`{${c}}\` expected by path \`${n}\`.`,location:s.child(["parameters"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/path-parameters-defined"})},zm=e=>{const{ignoreLastPathSegment:t,exceptions:r}=e;return{PathItem:{leave(n,{report:o,key:s,location:a}){const c=s.toString();if(c.startsWith("/")){const i=c.split("/");i.shift(),t&&i.length>0&&i.pop();for(const l of i)r&&r.includes(l)||!Md(l)&&$c.isSingular(l)&&o({message:`path segment \`${l}\` should be plural.`,location:a.key(),reference:"https://redocly.com/docs/cli/rules/oas/path-segment-plural"})}}}}},Um=()=>({PathItem(e,{report:t,key:r}){r.substr(1).split("/").filter(n=>n!=="").every(n=>/^{.+}$/.test(n)||/^[a-z0-9-.]+$/.test(n))||t({message:`\`${r}\` does not use kebab-case.`,location:{reportOnKey:!0},reference:"https://redocly.com/docs/cli/rules/oas/paths-kebab-case"})}}),Bm=()=>{let e,t;return{Schema:{enter(r){if(!r?.required){e=!0;return}t=new Set(r.required),e=!1},SchemaProperties:{skip(){return e},Schema:{enter(r,{key:n,location:o,report:s}){t.has(n)&&r.type==="string"&&(r?.minLength||s({message:"Property minLength is required.",location:o.key(),reference:"https://redocly.com/docs/cli/rules/oas/required-string-property-missing-min-length"}))}}}}}};function Dr(e){return`${e}`.replace(/^(\d)\d\d$/,(t,r)=>`${r}XX`)}const Gm=e=>{const t=e.names||{};return{Operation:{Response:{enter:(r,{report:n,location:o,key:s})=>{const a=t[s]||t[Dr(s)]||t[Dr(s).toLowerCase()]||[];for(const c of a)(!r?.headers||!Object.keys(r?.headers).some(i=>i.toLowerCase()===c.toLowerCase()))&&n({message:`Response object must contain a "${c}" header.`,location:o.child("headers").key(),reference:"https://redocly.com/docs/cli/rules/oas/response-contains-header"})}}}}},Km=["string","integer","number","boolean","null"],Jm=()=>({SchemaProperties(e,{report:t,location:r,specVersion:n,resolve:o}){for(const s of Object.keys(e)){const a=o(Fr(e,s)).node;!a||!R1(a)||a.example===void 0&&a.examples===void 0&&t({message:`Scalar property should have "example"${n==="oas3_1"||n==="oas3_2"?' or "examples"':""} defined.`,location:r.child(s).key(),reference:"https://redocly.com/docs/cli/rules/oas/scalar-property-missing-example"})}}});function R1(e){return!e.type||e.allOf||e.anyOf||e.oneOf||e.format==="binary"?!1:Array.isArray(e.type)?e.type.every(t=>Km.includes(t)):Km.includes(e.type)}const Ym=e=>{const t=new Map,r=[];let n=!0,o;return{Root:{leave(s,{report:a}){for(const[c,i]of t.entries())if(!i.defined)for(const l of i.from)a({message:`There is no \`${c}\` security scheme defined.`,location:l.key(),reference:"https://redocly.com/docs/cli/rules/oas/security-defined"});if(!(s.security||n))for(const c of r)a({message:"Every operation should have security defined on it or on the root level.",location:c.key(),reference:"https://redocly.com/docs/cli/rules/oas/security-defined"})}},SecurityScheme(s,{key:a}){t.set(a.toString(),{defined:!0,from:[]})},SecurityRequirement(s,{location:a}){for(const c of Object.keys(s)){const i=t.get(c),l=a.child([c]);i?i.from.push(l):t.set(c,{from:[l]})}},PathItem:{enter(s,{key:a}){o=a},Operation(s,{location:a,key:c}){const i=e.exceptions?.some(l=>l.path===o&&(!l.methods||l.methods?.some(u=>u.toLowerCase()===c)));!s?.security&&!i&&(n=!1,r.push(a))}}}},Wm=()=>{const e=["Schema","Response","Parameter","RequestBody","Example","Header","SecurityScheme","Link","Callback","PathItem"];return{any(t,{report:r,rawNode:n,rawLocation:o,type:s}){!e.includes(s.name)&&Ke(n)&&r({message:"Field $ref is not expected here.",location:o.child("$ref").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-strict-refs"})}}},D1=e=>{const t=e.prefixes||["is","has"],r=new RegExp(`^(${t.join("|")})[A-Z-_]`),n=t.map(s=>`\`${s}\``),o=n.length===1?n[0]:n.slice(0,-1).join(", ")+" or "+n[t.length-1];return{Parameter(s,{report:a,location:c}){s.type==="boolean"&&!r.test(s.name)&&a({message:`Boolean parameter \`${s.name}\` should have ${o} prefix.`,location:c.child("name"),reference:"https://redocly.com/docs/cli/rules/oas/boolean-parameter-prefixes"})}}};function pa({type:e,value:t,ctx:r,allowedValues:n,reference:o}){const{report:s,location:a}=r,c=e==="consumes"?"request":"response";if(!n)throw new Error(`Parameter "allowedValues" is not provided for "${c}-mime-type" rule`);if(t[e])for(const i of t[e])n.includes(i)||s({message:`Mime type "${i}" is not allowed`,location:a.child(t[e].indexOf(i)).key(),reference:o})}function qr({type:e,value:t,ctx:r,allowedValues:n,reference:o}){const{report:s,location:a}=r,c=e==="consumes"?"request":"response";if(!n)throw new Error(`Parameter "allowedValues" is not provided for "${c}-mime-type" rule`);if(t.content)for(const i of Object.keys(t.content))n.includes(i)||s({message:`Mime type "${i}" is not allowed`,location:a.child("content").child(i).key(),reference:o})}const q1=({allowedValues:e})=>({Root(t,r){pa({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})},Operation:{leave(t,r){pa({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}),L1=e=>{const t=e.names||{};let r;return{Operation:{Response:{skip:(n,o)=>`${o}`=="204",enter:(n,o)=>{r=o.key},Schema(n,{report:o,location:s}){if(n.type!=="object")return;const a=t[r]||t[Dr(r)]||t[Dr(r).toLowerCase()]||[];for(const c of a)n.properties?.[c]||o({message:`Response object must contain a top-level "${c}" property.`,location:s.child("properties").key(),reference:"https://redocly.com/docs/cli/rules/oas/response-contains-property"})}}}}},M1=({allowedValues:e})=>({Root(t,r){pa({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})},Operation:{leave(t,r){pa({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}),V1={struct:Gt,"no-invalid-schema-examples":Em,"no-invalid-parameter-examples":_m,"info-contact":Nr,"info-license":vi,"info-license-strict":es,"tag-description":ns,"tags-alphabetical":os,"paths-kebab-case":Um,"no-enum-type-mismatch":rn,"boolean-parameter-prefixes":D1,"no-path-trailing-slash":Pm,"operation-2xx-response":Sm,"operation-4xx-response":Im,assertions:rr,"operation-operationId-unique":Tm,"operation-parameters-unique":km,"path-parameters-defined":ua,"operation-tag-defined":Am,"path-declaration-must-exist":Rm,"operation-operationId-url-safe":Nm,"operation-operationId":rs,"operation-summary":jm,"operation-description":xm,"path-not-include-query":qm,"path-params-defined":ua,"parameter-description":Cm,"operation-singular-tag":Om,"security-defined":Ym,"security-scopes-defined":Ja,"no-unresolved-refs":Zt,"no-identical-paths":Fd,"no-ambiguous-paths":Ld,"path-http-verbs-order":Dm,"no-http-verbs-in-paths":Vd,"request-mime-type":q1,"response-mime-type":M1,"path-segment-plural":zm,"response-contains-header":Gm,"response-contains-property":L1,"scalar-property-missing-example":Jm,"required-string-property-missing-min-length":Bm,"spec-strict-refs":Wm,"no-required-schema-properties-undefined":nn,"no-schema-type-mismatch":on,"no-duplicated-enum-values":en,"no-unsafe-markdown":sn,"no-duplicated-tag-names":ts},F1={},z1=e=>({Parameter:{leave(t,r){if(!t.schema)return;const n=Ke(t.schema)?r.resolve(t.schema).node:t.schema;n&&U1(t,n,e)&&r.report({message:`Parameter \`${t.name}\` should have \`style\` and \`explode \` fields`,location:r.location,reference:"https://redocly.com/docs/cli/rules/oas/array-parameter-serialization"})}}});function U1(e,t,r){return(t.type==="array"||t.items||t.prefixItems)&&(e.style===void 0||e.explode===void 0)&&(!r.in||e.in&&r.in?.includes(e.in))}const B1=e=>{const t=e.prefixes||["is","has"],r=new RegExp(`^(${t.join("|")})[A-Z-_]`),n=t.map(s=>`\`${s}\``),o=n.length===1?n[0]:n.slice(0,-1).join(", ")+" or "+n[t.length-1];return{Parameter:{Schema(s,{report:a,parentLocations:c},i){s.type==="boolean"&&!r.test(i.Parameter.name)&&a({message:`Boolean parameter \`${i.Parameter.name}\` should have ${o} prefix.`,location:c.Parameter.child(["name"]),reference:"https://redocly.com/docs/cli/rules/oas/boolean-parameter-prefixes"})}}}},Ii="Schema",xi="Parameter",Ti="Response",Ni="RequestBody",G1={[Ii]:"schemas",[xi]:"parameters",[Ti]:"responses",[Ni]:"requestBodies"},K1=e=>{const t=new Map,r=[];e.schemas!=="off"&&r.push(Ii),e.parameters!=="off"&&r.push(xi),e.responses!=="off"&&r.push(Ti),e.requestBodies!=="off"&&r.push(Ni);const n={ref:{leave(c,{type:i,resolve:l}){const u=i.name;if(r.includes(u)){const f=l(c);if(!f.location)return;a(u,f.location)}}},Root:{leave(c,i){t.forEach((l,u,f)=>{if(l.absolutePointers.size>1){const _=W1(u),m=J1(_.typeName),w=m?e[m]:null;for(const S of l.locations){const b=Array.from(l.absolutePointers).filter(y=>y!==S.absolutePointer.toString()).map(y=>`- ${y}`).join(`
|
|
80
|
+
`),$={message:`Component '${m}/${_.componentName}' is not unique. It is also defined at:
|
|
81
|
+
${b}`,location:S,reference:"https://redocly.com/docs/cli/rules/oas/component-name-unique"};w&&($.forceSeverity=w),i.report($)}}})}}};return e.schemas!="off"&&(n.NamedSchemas={Schema(c,{location:i}){a(Ii,i)}}),e.responses!="off"&&(n.NamedResponses={Response(c,{location:i}){a(Ti,i)}}),e.parameters!="off"&&(n.NamedParameters={Parameter(c,{location:i}){a(xi,i)}}),e.requestBodies!="off"&&(n.NamedRequestBodies={RequestBody(c,{location:i}){a(Ni,i)}}),n;function o(c){const i=c.split("/").slice(-1)[0];return oy(i)?i.slice(0,i.lastIndexOf(".")):i}function s(c,i,l){const u=Y1(c,i),f=t.get(u)??{absolutePointers:new Set,locations:[]},_=l.absolutePointer.toString();f.absolutePointers.has(_)||(f.absolutePointers.add(_),f.locations.push(l)),t.set(u,f)}function a(c,i){const l=o(i.absolutePointer.toString());s(c,l,i)}};function J1(e){return G1[e]??null}function Y1(e,t){return`${e}/${t}`}function W1(e){const[t,r]=e.split("/");return{typeName:t,componentName:r}}const H1=()=>({Root(e,{report:t,location:r}){if(!e.hasOwnProperty("servers")){t({message:"Servers must be present.",location:r.child(["openapi"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"});return}(!Array.isArray(e.servers)||e.servers.length===0)&&t({message:"Servers must be a non-empty array.",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"})}}),X1=()=>({Example(e,{report:t,location:r}){e.value&&e.externalValue&&t({message:"Example object can have either `value` or `externalValue` fields.",location:r.child(["value"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-example-value-and-externalValue"})}}),Q1=e=>{const t=new Si,r=o=>o.schema===void 0,n=o=>(s,a)=>{const{location:c,resolve:i}=a;if(Qt(s.example))l(s.example,c.child("example"));else if(xe(s.examples))for(const u of Object.keys(s.examples))l(s.examples[u],c.child(["examples",u]),!0);function l(u,f,_){if(Ke(u)){const w=i(u);if(!w.location)return;f=w.location,u=w.node}let m=u;if(_){const w=Mp(u);if(!w)return;m=w.value,f=f.child(w.field)}tn({example:m,schema:s.schema,options:{location:f,ctx:a,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties,ajvContext:o},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-media-type-examples"})}};return{Parameter:{MediaType:{skip:r,leave:n({apiContext:"request"})}},RequestBody:{MediaType:{skip:r,leave:n({apiContext:"request"})}},Response:{MediaType:{skip:r,leave:n({apiContext:"response"})}}}},Z1=()=>({Server(e,{report:t,location:r}){const n=/^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/;e.url&&n.test(e.url)&&t({message:"Server `url` should not point to example.com or localhost.",location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-example-com"})}}),eS=()=>({Server(e,{report:t,location:r}){e.url&&e.url.endsWith("/")&&e.url!=="/"&&t({message:"Server `url` should not have a trailing slash.",location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-trailing-slash"})}}),tS=()=>({Root(e,{report:t,location:r}){if(!e.servers||e.servers.length===0)return;const n=[];if(Array.isArray(e.servers))for(const o of e.servers){const s=Hm(o);s&&n.push(...s)}else{const o=Hm(e.servers);if(!o)return;n.push(...o)}for(const o of n)o==="empty"&&t({message:"Server variable with `enum` must be a non-empty array.",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"}),o==="invalidDefaultValue"&&t({message:"Server variable define `enum` and `default`. `enum` must include default value",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"})}});function Hm(e){if(e.variables&&Object.keys(e.variables).length===0)return;const t=[];for(const r in e.variables){const n=e.variables[r];if(!n.enum||(Array.isArray(n.enum)&&n.enum?.length===0&&t.push("empty"),!n.default))continue;const o=e.variables[r].default;n.enum&&!n.enum.includes(o)&&t.push("invalidDefaultValue")}if(t.length)return t}const rS=()=>({Server(e,{report:t,location:r}){if(!e?.url)return;const n=e.url.match(/{[^}]+}/g)?.map(s=>s.slice(1,s.length-1))||[],o=e?.variables&&Object.keys(e.variables)||[];for(const s of n)o.includes(s)||t({message:`The \`${s}\` variable is not defined in the \`variables\` objects.`,location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"});for(const s of o)n.includes(s)||t({message:`The \`${s}\` variable is not used in the server's \`url\` field.`,location:r.child(["variables",s]).key(),from:r.child("url"),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"})}}),nS=()=>{const e=new Map,t=new Map,r=new Set;function n(o,s,a=!1){e.set(o.absolutePointer,{used:e.get(o.absolutePointer)?.used||!1,referencesDiscriminator:a,location:o,name:s})}return{ref(o,{type:s,resolve:a,key:c,location:i}){if(["Schema","Header","Parameter","Response","Example","RequestBody","MediaTypesMap"].includes(s.name)){const l=a(o);if(!l.location)return;e.set(l.location.absolutePointer,{used:!0,name:c.toString(),location:i})}},Root:{leave(o,{report:s}){e.forEach(a=>{!a.used&&!a.referencesDiscriminator&&s({message:`Component: "${a.name}" is never used.`,location:a.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})}),t.forEach((a,c)=>{r.has(c)||s({message:`Security scheme: "${c}" is never used.`,location:a.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(o,{location:s,key:a,resolve:c}){const i=o.allOf?.some(l=>Ke(l)&&c(l)?.node?.discriminator);n(s,a.toString(),i)}},NamedParameters:{Parameter(o,{location:s,key:a}){n(s,a.toString())}},NamedResponses:{Response(o,{location:s,key:a}){n(s,a.toString())}},NamedExamples:{Example(o,{location:s,key:a}){n(s,a.toString())}},NamedRequestBodies:{RequestBody(o,{location:s,key:a}){n(s,a.toString())}},NamedHeaders:{Header(o,{location:s,key:a}){n(s,a.toString())}},NamedMediaTypes:{MediaTypesMap(o,{location:s,key:a}){n(s,a.toString())}},NamedSecuritySchemes:{SecurityScheme(o,{rawLocation:s,key:a}){t.set(a.toString(),s)}},SecurityRequirement(o){for(const s of Object.keys(o))r.add(s)}}},oS=()=>({Schema:{leave(e,t){"nullable"in e&&!("type"in e)&&t.report({message:"The `type` field must be defined when the `nullable` field is used.",location:t.location.child(["nullable"]),reference:"https://redocly.com/docs/cli/rules/oas/nullable-type-sibling"})}}}),ki="https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807",sS=()=>({Response:{skip(e,t){return!/4[Xx0-9]{2}/.test(`${t}`)},enter(e,{report:t,location:r}){(!e.content||!e.content["application/problem+json"])&&t({message:"Response `4xx` must have content-type `application/problem+json`.",location:r.key(),reference:ki})},MediaType:{skip(e,t){return t!=="application/problem+json"},enter(e,t){if(Tr({fieldName:"schema",value:e,ctx:t,reference:ki}),!e.schema)return;const{schema:r,location:n}=Ko(e.schema,t,t.location.child("schema"));if(!(!r||!n))for(const o of["type","title"])pr(e.schema,o,t)||t.report({message:Ho("SchemaProperties",o),location:r.properties?n.child(["properties",o]).key():n.key(),reference:ki})}}}}),aS=({allowedValues:e})=>({Paths:{RequestBody:{leave(t,r){qr({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}},Callback:{RequestBody(){},Response:{leave(t,r){qr({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}},WebhooksMap:{Response:{leave(t,r){qr({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}}),iS=e=>{const t=e.names||{};let r;return{Operation:{Response:{skip:(n,o)=>`${o}`=="204",enter:(n,o)=>{r=o.key},MediaType:{Schema(n,{report:o,location:s}){if(n.type!=="object")return;const a=t[r]||t[Dr(r)]||t[Dr(r).toLowerCase()]||[];for(const c of a)n.properties?.[c]||o({message:`Response object must contain a top-level "${c}" property.`,location:s.child("properties").key(),reference:"https://redocly.com/docs/cli/rules/oas/response-contains-property"})}}}}}},cS=({allowedValues:e})=>({Paths:{Response:{leave(t,r){qr({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}},Callback:{Response(){},RequestBody:{leave(t,r){qr({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}},WebhooksMap:{RequestBody:{leave(t,r){qr({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}}),lS=()=>{const e=`^[${sy}]+$`;function t(r,n,o,s){new RegExp(e).test(r)||n({message:`The map key in ${s} "${r}" does not match the regular expression "${e}"`,location:o.key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-components-invalid-map-name"})}return{NamedSchemas:{Schema(r,{key:n,report:o,location:s}){t(n,o,s,"schemas")}},NamedParameters:{Parameter(r,{key:n,report:o,location:s}){t(n,o,s,"parameters")}},NamedResponses:{Response(r,{key:n,report:o,location:s}){t(n,o,s,"responses")}},NamedExamples:{Example(r,{key:n,report:o,location:s}){t(n,o,s,"examples")}},NamedRequestBodies:{RequestBody(r,{key:n,report:o,location:s}){t(n,o,s,"requestBodies")}},NamedHeaders:{Header(r,{key:n,report:o,location:s}){t(n,o,s,"headers")}},NamedSecuritySchemes:{SecurityScheme(r,{key:n,report:o,location:s}){t(n,o,s,"securitySchemes")}},NamedLinks:{Link(r,{key:n,report:o,location:s}){t(n,o,s,"links")}},NamedCallbacks:{Callback(r,{key:n,report:o,location:s}){t(n,o,s,"callbacks")}}}},uS=()=>{let e=[];return{Root:{enter(t){e=Object.keys(t.components?.schemas||{})}},Schema:{leave(t,r){const n=t.discriminator?.propertyName;if(!n)return;const o=t.discriminator?.defaultMapping;if(o===void 0){const s=new Set,a=(c,i)=>{const l=Ko(c,r,i);return!!(!l.schema||s.has(l.schema)||(s.add(l.schema),l.schema.required?.includes(n)||l.schema.allOf?.some(u=>a(u,l.location))||l.schema.oneOf?.every(u=>a(u,l.location))||l.schema.anyOf?.every(u=>a(u,l.location))))};a(t)||r.report({message:`Discriminator with optional property '${n}' must include a defaultMapping field.`,location:r.location.child("discriminator"),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}else r.resolve({$ref:o}).node===void 0&&!e.includes(o)&&r.report({message:`defaultMapping value '${o}' does not point to an existing schema component.`,location:r.location.child(["discriminator","defaultMapping"]),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}}}},pS=()=>({Example({value:e,externalValue:t,dataValue:r,serializedValue:n},{report:o,location:s}){e!==void 0&&t!==void 0&&o({message:"The 'value' and 'externalValue' fields of an example object are mutually exclusive.",location:s,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),n!==void 0&&t!==void 0&&o({message:"The 'serializedValue' and 'externalValue' fields of an example object are mutually exclusive.",location:s,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),e!==void 0&&r!==void 0&&o({message:"The 'value' filed must be absent if 'dataValue' is present in an example object.",location:s.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),e!==void 0&&n!==void 0&&o({message:"The 'value' filed must be absent if 'serializedValue' is present in an example object.",location:s.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"})}}),dS=()=>({MediaType:{leave(e,t){("prefixEncoding"in e&&"encoding"in e||"itemEncoding"in e&&"encoding"in e)&&t.report({message:"The 'encoding' field cannot be used together with 'prefixEncoding' or 'itemEncoding'.",location:t.location.child("encoding").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-encoding-combinations"})}}}),fS=()=>{let e;return{Root:{enter(t){e=t.tags??[]}},Tag:{leave(t,{report:r,location:n}){if(t?.parent===void 0)return;if(!e.find(a=>a.name===t.parent)){r({message:`Tag parent '${t.parent}' is not defined in the API description.`,location:n.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}const o=new Set(t.name);let s=t.parent;for(;s!==void 0;){if(o.has(s)){r({message:`Circular reference detected in tag parent hierarchy for tag '${t.name}'.`,location:n.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}o.add(s),s=e.find(a=>a.name===s)?.parent}}}}};function Xm(e){return e.filter(t=>!("$ref"in t)&&t.in==="querystring").length}function Qm(e,t){const r=t.location.child("parameters");e>1&&t.report({message:"Parameters with `in: querystring` should be defined only once per path/operation parameter set.",location:r,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"})}function Zm(e,t,r,n){if(e.in==="query"){r.querystringLocation&&n.report({message:"Parameters with `in: query` cannot be used together with `in: querystring` in the same operation/path parameter set.",location:t,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),r.queryLocation??=t;return}e.in==="querystring"&&(r.queryLocation&&n.report({message:"Parameters with `in: querystring` cannot be used together with `in: query` in the same operation/path parameter set.",location:t,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),r.querystringLocation??=t)}const mS=()=>{let e={},t={},r=0;return{PathItem:{enter(n,o){e={},t={},r=0,Qm(Xm(n.parameters||[]),o)},Parameter(n,o){Zm(n,o.location,e,o),n.in==="querystring"&&(r+=1)},Operation:{enter(n,o){t={...e};const s=r+Xm(n.parameters||[]);Qm(s,o)},Parameter(n,o){Zm(n,o.location,t,o)}}}}},hS={struct:Gt,"info-contact":Nr,"info-license":vi,"info-license-strict":es,"operation-2xx-response":Sm,"operation-4xx-response":Im,"operation-4xx-problem-details-rfc7807":sS,assertions:rr,"operation-operationId-unique":Tm,"operation-parameters-unique":km,"operation-tag-defined":Am,"no-example-value-and-externalValue":X1,"no-mixed-number-range-constraints":Zo,"no-enum-type-mismatch":rn,"no-path-trailing-slash":Pm,"no-empty-servers":H1,"path-declaration-must-exist":Rm,"operation-operationId-url-safe":Nm,"operation-operationId":rs,"operation-summary":jm,"tags-alphabetical":os,"no-server-example.com":Z1,"no-server-trailing-slash":eS,"tag-description":ns,"operation-description":xm,"no-unused-components":nS,"path-not-include-query":qm,"path-parameters-defined":ua,"path-params-defined":ua,"parameter-description":Cm,"operation-singular-tag":Om,"security-defined":Ym,"security-scopes-defined":Ja,"no-unresolved-refs":Zt,"paths-kebab-case":Um,"boolean-parameter-prefixes":B1,"path-http-verbs-order":Dm,"no-invalid-media-type-examples":Q1,"no-identical-paths":Fd,"no-ambiguous-paths":Ld,"no-undefined-server-variable":rS,"no-server-variables-empty-enum":tS,"no-http-verbs-in-paths":Vd,"request-mime-type":aS,"response-mime-type":cS,"path-segment-plural":zm,"no-invalid-schema-examples":Em,"no-invalid-parameter-examples":_m,"response-contains-header":Gm,"response-contains-property":iS,"scalar-property-missing-example":Jm,"spec-components-invalid-map-name":lS,"required-string-property-missing-min-length":Bm,"spec-strict-refs":Wm,"component-name-unique":K1,"array-parameter-serialization":z1,"no-required-schema-properties-undefined":nn,"no-schema-type-mismatch":on,"no-duplicated-enum-values":en,"no-unsafe-markdown":sn,"no-duplicated-tag-names":ts,"nullable-type-sibling":oS,"spec-no-invalid-tag-parents":fS,"spec-no-invalid-encoding-combinations":dS,"spec-discriminator-defaultMapping":uS,"spec-example-values":pS,"spec-querystring-parameters":mS},yS={},gS=()=>{const e=new Map;function t(r,n){e.set(r.absolutePointer,{used:e.get(r.absolutePointer)?.used||!1,location:r,name:n})}return{ref(r,{type:n,resolve:o,key:s,location:a}){if(["Schema","ContentDescriptor","Example","Link","ErrorObject","ExamplePairing","Tag"].includes(n.name)){const c=o(r);if(!c.location)return;e.set(c.location.absolutePointer,{used:!0,name:s.toString(),location:a})}},Root:{leave(r,{report:n}){e.forEach(o=>{o.used||n({message:`Component: "${o.name}" is never used.`,location:o.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(r,{location:n,key:o}){t(n,o.toString())}},NamedContentDescriptors:{ContentDescriptor(r,{location:n,key:o}){t(n,o.toString())}},NamedExamples:{Example(r,{location:n,key:o}){t(n,o.toString())}},NamedLinks:{Link(r,{location:n,key:o}){t(n,o.toString())}},NamedErrors:{ErrorObject(r,{location:n,key:o}){t(n,o.toString())}},NamedExamplePairingObjects:{ExamplePairing(r,{location:n,key:o}){t(n,o.toString())}},NamedTags:{Tag(r,{location:n,key:o}){t(n,o.toString())}}}},vS=()=>({Method:{leave(e,{report:t,resolve:r,location:n}){if(!e.params||!Array.isArray(e.params))return;const o=new Set;e.params.forEach((s,a)=>{const c=r(s);if(!c.node)return;const i=c.node,l=i.name;l&&(o.has(l)&&t({message:`Parameter names must be unique. Duplicate parameter name '${i.name}' found.`,location:n.child([a,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-duplicated-method-params"}),o.add(l))})}}}),bS=()=>({Method:{leave(e,{report:t,resolve:r,location:n}){if(!e.params||!Array.isArray(e.params))return;let o=!1;e.params.forEach((s,a)=>{const c=r(s);if(!c.node)return;const i=c.node;i.name&&(i.required===!0?o&&t({message:`Required parameter '${i.name}' must be positioned before optional parameters.`,location:n.child([a,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-required-params-after-optional"}):o=!0)})}}}),wS={struct:Gt,"no-unresolved-refs":Zt,assertions:rr,"info-license":vi,"no-unused-components":gS,"info-contact":Nr,"spec-no-duplicated-method-params":vS,"spec-no-required-params-after-optional":bS},$S={},_S={"info-contact":Nr,struct:Gt,"no-unresolved-refs":Zt,assertions:rr},ES={},PS={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-duplicated-enum-values":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error"},oas3_0Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-duplicated-enum-values":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unsafe-markdown":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","nullable-type-sibling":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_1Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-duplicated-enum-values":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unsafe-markdown":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_2Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-duplicated-enum-values":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-unsafe-markdown":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-no-invalid-tag-parents":"error","spec-no-invalid-encoding-combinations":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-querystring-parameters":"error"},async2Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","no-duplicated-enum-values":"error","no-unsafe-markdown":"error","operation-operationId":"error","security-defined":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},async3Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","no-duplicated-enum-values":"error","no-unsafe-markdown":"error","operation-operationId":"error","security-defined":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"error"},openrpc1Rules:{"info-contact":"error","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"error"}},SS={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-unsafe-markdown":"off","operation-2xx-response":"warn","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unsafe-markdown":"off","no-unused-components":"warn","nullable-type-sibling":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unsafe-markdown":"off","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unsafe-markdown":"off","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-discriminator-defaultMapping":"off","spec-example-values":"off","spec-no-invalid-encoding-combinations":"warn","spec-no-invalid-tag-parents":"warn","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-unsafe-markdown":"off","operation-operationId":"warn","security-defined":"warn","security-scopes-defined":"off","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-unsafe-markdown":"off","operation-operationId":"warn","security-defined":"warn","security-scopes-defined":"off","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-duplicated-enum-values":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-unsafe-markdown":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-duplicated-enum-values":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-unsafe-markdown":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},graphqlRules:{"no-unused-types":"off","type-description":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"}},IS={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"error",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"error","no-unused-components":"error","nullable-type-sibling":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","operation-operationId":"error","security-defined":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-enum-values":"error","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","operation-operationId":"error","security-defined":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-unsafe-markdown":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"off"}},xS={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-unsafe-markdown":"warn","operation-2xx-response":"warn","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"warn","no-unused-components":"warn","nullable-type-sibling":"error","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unsafe-markdown":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"warn","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-unsafe-markdown":"warn","operation-operationId":"warn","security-defined":"warn","security-scopes-defined":"warn","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-enum-values":"warn","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-unsafe-markdown":"warn","operation-operationId":"warn","security-defined":"warn","security-scopes-defined":"warn","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-duplicated-enum-values":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-unsafe-markdown":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-duplicated-enum-values":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-unsafe-markdown":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-license":"warn","no-unused-components":"warn","info-contact":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"warn","type-description":"off"}},TS={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-unsafe-markdown":"off","operation-2xx-response":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"off",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unsafe-markdown":"off","no-unused-components":"off","nullable-type-sibling":"error","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unsafe-markdown":"off","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unsafe-markdown":"off","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-unsafe-markdown":"off","operation-operationId":"off","security-defined":"off","security-scopes-defined":"off","tag-description":"off","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-enum-values":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-unsafe-markdown":"off","operation-operationId":"off","security-defined":"off","security-scopes-defined":"off","tag-description":"off","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-unsafe-markdown":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-duplicated-enum-values":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-unsafe-markdown":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"off","type-description":"off"}},NS={recommended:xS,"recommended-strict":IS,minimal:SS,all:PS,spec:TS},kS={id:"",rules:{oas3:hS,oas2:V1,async2:Y$,async3:o_,arazzo1:z$,overlay1:_S,openrpc1:wS,graphql:ZE},preprocessors:{oas3:yS,oas2:F1,async2:W$,async3:s_,arazzo1:U$,overlay1:ES,openrpc1:$S},decorators:{oas3:i$,oas2:s$,async2:e$,async3:t$,arazzo1:Zw,overlay1:l$,openrpc1:c$},configs:NS},De=(e,t)=>{if(t)for(const r of Object.keys(t))xe(e[r])&&typeof t[r]=="string"?e[r]={...e[r],severity:t[r]}:e[r]=t[r]};function Ve(e,t){if(t)for(const r of Object.keys(t))e.hasOwnProperty(r)&&(xe(e[r])&&typeof t[r]=="string"?e[r]={...e[r],severity:t[r]}:e[r]=t[r])}function OS(e){if(e.indexOf("/")>-1){const[t,r]=e.split("/");return{pluginId:t,configName:r}}else return{pluginId:"",configName:e}}function Ye(e,t){if(!t)return e;const r={};for(const n of Object.keys(e))r[`${t}/${n}`]=e[n];return r}function eh(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},oas3_2Rules:{},async2Rules:{},async3Rules:{},arazzo1Rules:{},arazzo1_1Rules:{},overlay1Rules:{},openrpc1Rules:{},graphqlRules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},oas3_2Preprocessors:{},async2Preprocessors:{},async3Preprocessors:{},arazzo1Preprocessors:{},arazzo1_1Preprocessors:{},overlay1Preprocessors:{},openrpc1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},oas3_2Decorators:{},async2Decorators:{},async3Decorators:{},arazzo1Decorators:{},arazzo1_1Decorators:{},overlay1Decorators:{},openrpc1Decorators:{}};for(const r of e){if(xe(r)&&"extends"in r&&r.extends!==void 0)throw new Error(`'extends' is not supported in shared configs yet:
|
|
82
|
+
${JSON.stringify(r,null,2)}`);De(t.rules,r.rules),De(t.oas2Rules,r.oas2Rules),Ve(t.oas2Rules,r.rules),De(t.oas3_0Rules,r.oas3_0Rules),Ve(t.oas3_0Rules,r.rules),De(t.oas3_1Rules,r.oas3_1Rules),Ve(t.oas3_1Rules,r.rules),De(t.oas3_2Rules,r.oas3_2Rules),Ve(t.oas3_2Rules,r.rules),De(t.async2Rules,r.async2Rules),Ve(t.async2Rules,r.rules),De(t.async3Rules,r.async3Rules),Ve(t.async3Rules,r.rules),De(t.arazzo1Rules,r.arazzo1Rules),Ve(t.arazzo1Rules,r.rules),De(t.arazzo1_1Rules,r.arazzo1_1Rules),Ve(t.arazzo1_1Rules,r.rules),De(t.overlay1Rules,r.overlay1Rules),Ve(t.overlay1Rules,r.rules),De(t.openrpc1Rules,r.openrpc1Rules),Ve(t.openrpc1Rules,r.rules),De(t.graphqlRules,r.graphqlRules),Ve(t.graphqlRules,r.rules),De(t.preprocessors,r.preprocessors),De(t.oas2Preprocessors,r.oas2Preprocessors),Ve(t.oas2Preprocessors,r.preprocessors),De(t.oas3_0Preprocessors,r.oas3_0Preprocessors),Ve(t.oas3_0Preprocessors,r.preprocessors),De(t.oas3_1Preprocessors,r.oas3_1Preprocessors),Ve(t.oas3_1Preprocessors,r.preprocessors),De(t.oas3_2Preprocessors,r.oas3_2Preprocessors),Ve(t.oas3_2Preprocessors,r.preprocessors),De(t.async2Preprocessors,r.async2Preprocessors),Ve(t.async2Preprocessors,r.preprocessors),De(t.async3Preprocessors,r.async3Preprocessors),Ve(t.async3Preprocessors,r.preprocessors),De(t.arazzo1Preprocessors,r.arazzo1Preprocessors),Ve(t.arazzo1Preprocessors,r.preprocessors),De(t.arazzo1_1Preprocessors,r.arazzo1_1Preprocessors),Ve(t.arazzo1_1Preprocessors,r.preprocessors),De(t.overlay1Preprocessors,r.overlay1Preprocessors),Ve(t.overlay1Preprocessors,r.preprocessors),De(t.openrpc1Preprocessors,r.openrpc1Preprocessors),Ve(t.openrpc1Preprocessors,r.preprocessors),De(t.decorators,r.decorators),De(t.oas2Decorators,r.oas2Decorators),Ve(t.oas2Decorators,r.decorators),De(t.oas3_0Decorators,r.oas3_0Decorators),Ve(t.oas3_0Decorators,r.decorators),De(t.oas3_1Decorators,r.oas3_1Decorators),Ve(t.oas3_1Decorators,r.decorators),De(t.oas3_2Decorators,r.oas3_2Decorators),Ve(t.oas3_2Decorators,r.decorators),De(t.async2Decorators,r.async2Decorators),Ve(t.async2Decorators,r.decorators),De(t.async3Decorators,r.async3Decorators),Ve(t.async3Decorators,r.decorators),De(t.arazzo1Decorators,r.arazzo1Decorators),Ve(t.arazzo1Decorators,r.decorators),De(t.arazzo1_1Decorators,r.arazzo1_1Decorators),Ve(t.arazzo1_1Decorators,r.decorators),De(t.overlay1Decorators,r.overlay1Decorators),Ve(t.overlay1Decorators,r.decorators),De(t.openrpc1Decorators,r.openrpc1Decorators),Ve(t.openrpc1Decorators,r.decorators)}return t}class jS extends Error{}function AS(e){return new Map(JSON.parse(JSON.stringify([...e])))}function th(e){return xe(e)&&"id"in e}function CS(e){return typeof e=="function"}function rh({node:e,ctx:t,plugins:r}){if(!e.extends)return e;const n=(e.extends||[]).filter(Pn).map(o=>{if(!at(o)&&!cc.extname(o))return XS(o,r);const s=t.resolve({$ref:o});return s.location&&s.node!==void 0?s.node:null}).filter(Pn);return eh([...n.map(o=>rh({node:o,ctx:t,plugins:r})),{...e,extends:void 0}])}function da(e,t){if(xe(e)&&Array.isArray(e.plugins)){const{plugins:r,rootConfigDir:n}=t.getVisitorData();r.push(...e.plugins.map(o=>Ai(o,t.location.source.absoluteRef.replace(/^file:\/\//,""),n)))}}zr([{severity:"error",ruleId:iy,visitor:{ref:{},ConfigGovernance:{leave(e,t){da(e,t)}},ConfigApisProperties:{leave(e,t){da(e,t)}},[it.ScorecardClassicLevel]:{leave(e,t){da(e,t)}},ConfigRoot:{leave(e,t){da(e,t)}}}}],Go);function fa(e,t){if(xe(e)&&e.extends){const{plugins:r,skipPluginEval:n}=t.getVisitorData();if(n)return;const o=rh({node:e,ctx:t,plugins:r});Object.assign(e,o),delete e.extends}}const RS=zr([{severity:"error",ruleId:dc,visitor:{ref:{leave(e,t,r){ay(e,r,t)}},ConfigGovernance:{leave(e,t){fa(e,t)}},ConfigApisProperties:{leave(e,t){fa(e,t)}},[it.ScorecardClassicLevel]:{leave(e,t){fa(e,t)}},ConfigRoot:{leave(e,t){fa(e,t)}}}}],Go);function DS(e,t,r,n=!1){const o={plugins:r,skipPluginEval:n},s={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[dc]:o}};return In({document:e,rootType:Go.ConfigRoot,normalizedVisitors:RS,resolvedRefMap:t,ctx:s}),e.parsed??{}}async function qS(e){const{ref:t,doc:r,externalRefResolver:n=new ir(e.config.resolve),base:o=null}=e;if(!(t||r))throw new Error(`Document or reference is required.
|
|
83
|
+
`);const s=r===void 0?await n.resolveDocument(o,t,!0):r;if(s instanceof Error)throw s;return e.collectSpecData?.(s),fc({document:s,...e,externalRefResolver:n,types:En(Sn(s.parsed))})}async function LS(e){const{source:t,absoluteRef:r,externalRefResolver:n=new ir(e.config.resolve)}=e,o=Ea(t,r||"/");return fc({document:o,...e,externalRefResolver:n,types:En(Sn(o.parsed))})}function Oi(e){return!Vt(e)}const yn=new Map,ma="v";let ji=0,nh=!1;function MS(){xn.registerHooks({resolve(e,t,r){const n=r(e,t);if(!n.url.startsWith("file:")||!t.parentURL)return n;const o=new URL(t.parentURL).searchParams.get(ma);if(!o)return n;const s=new URL(n.url);return s.pathname.includes("/node_modules/")||s.searchParams.has(ma)?n:(s.searchParams.set(ma,o),{...n,url:s.href})}})}function VS(){if(!nh){if(nh=!0,typeof xn.registerHooks!="function"){Oe.warn(`Redocly plugin reload requires Node.js >= 22.15 (current: ${process.version}). ESM plugins will not pick up edits until the process restarts.
|
|
84
|
+
`);return}MS()}}function FS(e){return yn.has(e)}function zS(e){return yn.get(e)}function US(e,t){yn.set(e,t)}function BS(){return ji}function GS(e){const t=xn.createRequire(e),r=new Set,n=o=>{if(r.has(o))return;r.add(o);const s=t.cache[o];if(s){for(const a of s.children)/[/\\]node_modules[/\\]/.test(a.id)||n(a.id);delete t.cache[o]}};n(e)}const KS=()=>{const e=[...yn.keys()];for(const t of e)GS(t);yn.clear(),ji+=1,VS()};async function JS(e){const t=(void 0)(e);return t.searchParams.set(ma,String(ji)),import(t.href)}async function oh({rawConfigDocument:e,configPath:t,externalRefResolver:r,customExtends:n,skipPluginEval:o}){const s=e===void 0?cy:e.parsed;if(n!==void 0&&xe(s)&&(s.extends=n),xe(s)&&(s?.extends?.some(Oi)||s?.scorecardClassic?.levels?.some(m=>m?.extends?.some(Oi))||s?.scorecard?.levels?.some(m=>m?.extends?.some(Oi))))throw new Error("Configuration format not detected in extends: values must be strings.");const a=e??{source:new ly(t??"",JSON.stringify(s)),parsed:s},c=await Tn({rootDocument:a,rootType:Go.ConfigRoot,externalRefResolver:r??new ir(uy(s?.resolve))});let i=[],l,u="";l=[...(s?.plugins||[]).filter(m=>!Vt(m)),kS];const f=DS(a,AS(c),l,o);f.apis&&!o&&(f.apis=Object.fromEntries(Object.entries(f.apis).map(([m,w])=>{const S=eh([f,w]);return[m,{...w,...S}]})));const _=i.length?i.map(m=>WS(m)&&m.isModule?m.rawPath:m.absolutePath&&We.relative(u,m.absolutePath)).filter(Qt):void 0;return{resolvedConfig:{...f,plugins:_},resolvedRefMap:c,plugins:l}}function YS(e){for(const t of py)(void 0)(We.resolve(e,t))}function WS(e){return"isModule"in e}const Ai=(e,t,r)=>{if(!Vt(e))return e;(void 0)(We.resolve(We.dirname(t),e));try{return{absolutePath:xn.createRequire(import.meta.url??__dirname).resolve(e,{paths:[r,import.meta.url?We.dirname((void 0)(import.meta.url)):__dirname]}),isModule:!0,rawPath:e}}catch{throw new Error(`Plugin "${e}" not found.`)}};async function HS(e,t,r=!1){if(!e)return[];const n=async c=>{if(!Vt(c))return c;try{const i=We.isAbsolute(c)?c:Ai(c,We.join(t,mc),t).absolutePath;if(!FS(i)){const l=await JS(i),u=l.default||l,f={contentDir:t},_=Array.isArray(u)?u:[u];for(const S of _)S?.id&&th(S)&&Oe.info(`Deprecated plugin format detected: ${S.id}
|
|
85
|
+
`);const m=th(u)?u:CS(u)?await u(f):await u?.default?.(f),w=Array.isArray(m)?m:[m];m&&US(i,w.map(S=>({...S,path:c,absolutePath:i})))}return zS(i)}catch(i){throw new Error(`Failed to load plugin "${c}": ${i.message}
|
|
86
|
+
|
|
87
|
+
${i.stack}`)}},o=new Map,s=YS(t);s&&e.push(s);const a=new Set;if(r){const c=[];for(const i of e){if(!Vt(i)){c.push(i);continue}const l=We.isAbsolute(i)?i:Ai(i,We.join(t,mc),t).absolutePath;a.has(l)||(a.add(l),c.push({absolutePath:l}))}return c}return(await Promise.all(e.map(async c=>{if(Vt(c)){if(at(c))throw new Error(Re.red("We don't support remote plugins yet."));if(a.has(c))return;a.add(c)}const i=await n(c);if(!i)return;const l=Array.isArray(i)?i:[i];return(await Promise.all(l.map(async u=>{if(!u)return;const f=u.id;if(typeof f!="string")throw new Error(Re.red(`Plugin must define \`id\` property in ${Re.blue(c.toString())}.`));const _=u.absolutePath??c.toString(),m=o.get(f);if(m){if(_!==m)throw new Error(Re.red(`Plugin "id" must be unique. Plugin ${Re.blue(_)} uses id "${Re.blue(f)}" already seen in ${Re.blue(_)}`));return}o.set(f,_);const w={id:f,...u.configs?{configs:u.configs}:{},...u.typeExtension?{typeExtension:u.typeExtension}:{}};if(u.rules){if(!u.rules.oas3&&!u.rules.oas2&&!u.rules.async2&&!u.rules.async3&&!u.rules.arazzo1&&!u.rules.overlay1&&!u.rules.openrpc1&&!u.rules.graphql)throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, \`openrpc1\`, or \`graphql\` rules "${c}.`);w.rules={},u.rules.oas3&&(w.rules.oas3=Ye(u.rules.oas3,f)),u.rules.oas2&&(w.rules.oas2=Ye(u.rules.oas2,f)),u.rules.async2&&(w.rules.async2=Ye(u.rules.async2,f)),u.rules.async3&&(w.rules.async3=Ye(u.rules.async3,f)),u.rules.arazzo1&&(w.rules.arazzo1=Ye(u.rules.arazzo1,f)),u.rules.overlay1&&(w.rules.overlay1=Ye(u.rules.overlay1,f)),u.rules.openrpc1&&(w.rules.openrpc1=Ye(u.rules.openrpc1,f)),u.rules.graphql&&(w.rules.graphql=Ye(u.rules.graphql,f))}if(u.preprocessors){if(!u.preprocessors.oas3&&!u.preprocessors.oas2&&!u.preprocessors.async2&&!u.preprocessors.async3&&!u.preprocessors.arazzo1&&!u.preprocessors.overlay1&&!u.preprocessors.openrpc1)throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${c}.`);w.preprocessors={},u.preprocessors.oas3&&(w.preprocessors.oas3=Ye(u.preprocessors.oas3,f)),u.preprocessors.oas2&&(w.preprocessors.oas2=Ye(u.preprocessors.oas2,f)),u.preprocessors.async2&&(w.preprocessors.async2=Ye(u.preprocessors.async2,f)),u.preprocessors.async3&&(w.preprocessors.async3=Ye(u.preprocessors.async3,f)),u.preprocessors.arazzo1&&(w.preprocessors.arazzo1=Ye(u.preprocessors.arazzo1,f)),u.preprocessors.overlay1&&(w.preprocessors.overlay1=Ye(u.preprocessors.overlay1,f)),u.preprocessors.openrpc1&&(w.preprocessors.openrpc1=Ye(u.preprocessors.openrpc1,f))}if(u.decorators){if(!u.decorators.oas3&&!u.decorators.oas2&&!u.decorators.async2&&!u.decorators.async3&&!u.decorators.arazzo1&&!u.decorators.overlay1&&!u.decorators.openrpc1)throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${c}.`);w.decorators={},u.decorators.oas3&&(w.decorators.oas3=Ye(u.decorators.oas3,f)),u.decorators.oas2&&(w.decorators.oas2=Ye(u.decorators.oas2,f)),u.decorators.async2&&(w.decorators.async2=Ye(u.decorators.async2,f)),u.decorators.async3&&(w.decorators.async3=Ye(u.decorators.async3,f)),u.decorators.arazzo1&&(w.decorators.arazzo1=Ye(u.decorators.arazzo1,f)),u.decorators.overlay1&&(w.decorators.overlay1=Ye(u.decorators.overlay1,f)),u.decorators.openrpc1&&(w.decorators.openrpc1=Ye(u.decorators.openrpc1,f))}return u.assertions&&(w.assertions=u.assertions),{...u,...w}}))).filter(Qt)}))).filter(Qt).flat()}function XS(e,t){const{pluginId:r,configName:n}=OS(e),o=t.find(a=>a.id===r);if(!o)throw new Error(`Invalid config ${Re.red(e)}: plugin ${r} is not included.`);const s=o.configs?.[n];if(!s)throw new Error(r?`Invalid config ${Re.red(e)}: plugin ${r} doesn't export config with name ${n}.`:`Invalid config ${Re.red(e)}: there is no such built-in config.`);return s}function QS(e,t){const r=Object.create(null);for(const n of Object.keys(e)){const o=e[n],s=at(n)?n:yc(t,n);r[s]=Object.create(null);for(const a of Object.keys(o))r[s][a]=new Set(o[a])}return r}async function sh(e,t){const r=e?dy(e):"",n=r?yc(r,gc):gc,o=await t.resolveDocument(null,n,!0);return o instanceof Error||!o.parsed?{}:QS(o.parsed||{},r)}async function ZS(e={}){const{configPath:t=void 0,customExtends:r,externalRefResolver:n,skipPluginEval:o}=e,s=n??new ir,a=t?await s.resolveDocument(null,t,!0):void 0;if(a instanceof Error)throw a;const{resolvedConfig:c,resolvedRefMap:i,plugins:l}=await oh({rawConfigDocument:a?ah(a):void 0,customExtends:r,configPath:t,externalRefResolver:n,skipPluginEval:o}),u=await sh(t,s);return new hc(c,{configPath:t,document:a,resolvedRefMap:i,plugins:l,ignore:u})}function eI(e){}async function tI(e,{configPath:t,externalRefResolver:r,ignore:n}={}){const o=Ea(typeof e=="string"?e:"",t??"");typeof e!="string"&&e&&(o.parsed=e);const{resolvedConfig:s,resolvedRefMap:a,plugins:c}=await oh({rawConfigDocument:ah(o),configPath:t,externalRefResolver:r});return new hc(s,{configPath:t,document:o,resolvedRefMap:a,plugins:c,ignore:n})}function ah(e){if(!e.parsed)return e;const{plugins:t,resolve:r,...n}=e.parsed,o={...structuredClone(n),plugins:t?.slice(),...r&&{resolve:{...r}}};return{...e,parsed:o}}var ih={},Ct={},ch={},lh;function ha(){return lh||(lh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t;(function(i){i[i.SCALAR=0]="SCALAR",i[i.MAPPING=1]="MAPPING",i[i.MAP=2]="MAP",i[i.SEQ=3]="SEQ",i[i.ANCHOR_REF=4]="ANCHOR_REF",i[i.INCLUDE_REF=5]="INCLUDE_REF"})(t=e.Kind||(e.Kind={}));function r(i,l){var u=l?l.endPosition:i.endPosition+1,f={key:i,value:l,startPosition:i.startPosition,endPosition:u,kind:t.MAPPING,parent:null,errors:[]};return f}e.newMapping=r;function n(i,l,u,f){return{errors:[],referencesAnchor:i,value:f,startPosition:l,endPosition:u,kind:t.ANCHOR_REF,parent:null}}e.newAnchorRef=n;function o(i){i===void 0&&(i="");var l={errors:[],startPosition:-1,endPosition:-1,value:""+i,kind:t.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+i};return typeof i!="string"&&(l.valueObject=i),l}e.newScalar=o;function s(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:t.SEQ,parent:null}}e.newItems=s;function a(){return s()}e.newSeq=a;function c(i){return{errors:[],startPosition:-1,endPosition:-1,mappings:i||[],kind:t.MAP,parent:null}}e.newMap=c})(ch)),ch}var Xt={},uh;function Lr(){if(uh)return Xt;uh=1,Object.defineProperty(Xt,"__esModule",{value:!0});function e(a){return typeof a>"u"||a===null}Xt.isNothing=e;function t(a){return typeof a=="object"&&a!==null}Xt.isObject=t;function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}Xt.toArray=r;function n(a,c){var i,l,u,f;if(c)for(f=Object.keys(c),i=0,l=f.length;i<l;i+=1)u=f[i],a[u]=c[u];return a}Xt.extend=n;function o(a,c){var i="",l;for(l=0;l<c;l+=1)i+=a;return i}Xt.repeat=o;function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return Xt.isNegativeZero=s,Xt}var Ci,ph;function gn(){if(ph)return Ci;ph=1;var e=(function(){function t(r,n,o){n===void 0&&(n=null),o===void 0&&(o=!1),this.name="YAMLException",this.reason=r,this.mark=n,this.message=this.toString(!1),this.isWarning=o}return t.isInstance=function(r){if(r!=null&&r.getClassIdentifier&&typeof r.getClassIdentifier=="function")for(var n=0,o=r.getClassIdentifier();n<o.length;n++){var s=o[n];if(s==t.CLASS_IDENTIFIER)return!0}return!1},t.prototype.getClassIdentifier=function(){var r=[];return r.concat(t.CLASS_IDENTIFIER)},t.prototype.toString=function(r){r===void 0&&(r=!1);var n;return n="JS-YAML: "+(this.reason||"(unknown reason)"),!r&&this.mark&&(n+=" "+this.mark.toString()),n},t.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException",t})();return Ci=e,Ci}var Ri,dh;function rI(){if(dh)return Ri;dh=1;var e=Lr(),t=(function(){function r(n,o,s,a,c){this.name=n,this.buffer=o,this.position=s,this.line=a,this.column=c}return r.prototype.getSnippet=function(n,o){n===void 0&&(n=0),o===void 0&&(o=75);var s,a,c,i,l;if(!this.buffer)return null;for(n=n||4,o=o||75,s="",a=this.position;a>0&&`\0\r
|
|
88
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>o/2-1){s=" ... ",a+=5;break}for(c="",i=this.position;i<this.buffer.length&&`\0\r
|
|
89
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i))===-1;)if(i+=1,i-this.position>o/2-1){c=" ... ",i-=5;break}return l=this.buffer.slice(a,i),e.repeat(" ",n)+s+l+c+`
|
|
90
|
+
`+e.repeat(" ",n+this.position-a+s.length)+"^"},r.prototype.toString=function(n){n===void 0&&(n=!0);var o,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),n||(o=this.getSnippet(),o&&(s+=`:
|
|
91
|
+
`+o)),s},r})();return Ri=t,Ri}var ya={},ga={},fh;function st(){if(fh)return ga;fh=1,Object.defineProperty(ga,"__esModule",{value:!0});var e=gn(),t=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(s){var a={};return s!==null&&Object.keys(s).forEach(function(c){s[c].forEach(function(i){a[String(i)]=c})}),a}var o=(function(){function s(a,c){if(c=c||{},Object.keys(c).forEach(function(i){if(t.indexOf(i)===-1)throw new e('Unknown option "'+i+'" is met in definition of "'+a+'" YAML type.')}),this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(i){return i},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.defaultStyle=c.defaultStyle||null,this.styleAliases=n(c.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return s})();return ga.Type=o,ga}var mh;function vn(){if(mh)return ya;mh=1,Object.defineProperty(ya,"__esModule",{value:!0});var e=Lr(),t=gn(),r=st();function n(a,c,i){var l=[];return a.include.forEach(function(u){i=n(u,c,i)}),a[c].forEach(function(u){i.forEach(function(f,_){f.tag===u.tag&&l.push(_)}),i.push(u)}),i.filter(function(u,f){return l.indexOf(f)===-1})}function o(){var a={},c,i;function l(u){a[u.tag]=u}for(c=0,i=arguments.length;c<i;c+=1)arguments[c].forEach(l);return a}var s=(function(){function a(c){this.include=c.include||[],this.implicit=c.implicit||[],this.explicit=c.explicit||[],this.implicit.forEach(function(i){if(i.loadKind&&i.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=n(this,"implicit",[]),this.compiledExplicit=n(this,"explicit",[]),this.compiledTypeMap=o(this.compiledImplicit,this.compiledExplicit)}return a.DEFAULT=null,a.create=function(){var c,i;switch(arguments.length){case 1:c=a.DEFAULT,i=arguments[0];break;case 2:c=arguments[0],i=arguments[1];break;default:throw new t("Wrong number of arguments for Schema.create function")}if(c=e.toArray(c),i=e.toArray(i),!c.every(function(l){return l instanceof a}))throw new t("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!i.every(function(l){return l instanceof r.Type}))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:c,explicit:i})},a})();return ya.Schema=s,ya}var Di,hh;function nI(){if(hh)return Di;hh=1;var e=st();return Di=new e.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Di}var qi,yh;function oI(){if(yh)return qi;yh=1;var e=st();return qi=new e.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),qi}var Li,gh;function sI(){if(gh)return Li;gh=1;var e=st();return Li=new e.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Li}var Mi,vh;function aI(){if(vh)return Mi;vh=1;var e=vn();return Mi=new e.Schema({explicit:[nI(),oI(),sI()]}),Mi}var Vi,bh;function iI(){if(bh)return Vi;bh=1;var e=st();function t(o){if(o===null)return!0;var s=o.length;return s===1&&o==="~"||s===4&&(o==="null"||o==="Null"||o==="NULL")}function r(){return null}function n(o){return o===null}return Vi=new e.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Vi}var Fi,wh;function cI(){if(wh)return Fi;wh=1;var e=st();function t(o){if(o===null)return!1;var s=o.length;return s===4&&(o==="true"||o==="True"||o==="TRUE")||s===5&&(o==="false"||o==="False"||o==="FALSE")}function r(o){return o==="true"||o==="True"||o==="TRUE"}function n(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return Fi=new e.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"}),Fi}var zi,$h;function lI(){if($h)return zi;$h=1;var e=Lr(),t=st();function r(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}function n(i){return 48<=i&&i<=55}function o(i){return 48<=i&&i<=57}function s(i){if(i===null)return!1;var l=i.length,u=0,f=!1,_;if(!l)return!1;if(_=i[u],(_==="-"||_==="+")&&(_=i[++u]),_==="0"){if(u+1===l)return!0;if(_=i[++u],_==="b"){for(u++;u<l;u++)if(_=i[u],_!=="_"){if(_!=="0"&&_!=="1")return!1;f=!0}return f}if(_==="x"){for(u++;u<l;u++)if(_=i[u],_!=="_"){if(!r(i.charCodeAt(u)))return!1;f=!0}return f}for(;u<l;u++)if(_=i[u],_!=="_"){if(!n(i.charCodeAt(u)))return!1;f=!0}return f}for(;u<l;u++)if(_=i[u],_!=="_"){if(_===":")break;if(!o(i.charCodeAt(u)))return!1;f=!0}return f?_!==":"?!0:/^(:[0-5]?[0-9])+$/.test(i.slice(u)):!1}function a(i){var l=i,u=1,f,_,m=[];return l.indexOf("_")!==-1&&(l=l.replace(/_/g,"")),f=l[0],(f==="-"||f==="+")&&(f==="-"&&(u=-1),l=l.slice(1),f=l[0]),l==="0"?0:f==="0"?l[1]==="b"?u*parseInt(l.slice(2),2):l[1]==="x"?u*parseInt(l,16):u*parseInt(l,8):l.indexOf(":")!==-1?(l.split(":").forEach(function(w){m.unshift(parseInt(w,10))}),l=0,_=1,m.forEach(function(w){l+=w*_,_*=60}),u*l):u*parseInt(l,10)}function c(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!e.isNegativeZero(i)}return zi=new t.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:{binary:function(i){return"0b"+i.toString(2)},octal:function(i){return"0"+i.toString(8)},decimal:function(i){return i.toString(10)},hexadecimal:function(i){return"0x"+i.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),zi}var Ui,_h;function uI(){if(_h)return Ui;_h=1;var e=Lr(),t=st(),r=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function n(c){return!(c===null||!r.test(c))}function o(c){var i,l,u,f;return i=c.replace(/_/g,"").toLowerCase(),l=i[0]==="-"?-1:1,f=[],0<="+-".indexOf(i[0])&&(i=i.slice(1)),i===".inf"?l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:i===".nan"?NaN:0<=i.indexOf(":")?(i.split(":").forEach(function(_){f.unshift(parseFloat(_,10))}),i=0,u=1,f.forEach(function(_){i+=_*u,u*=60}),l*i):l*parseFloat(i,10)}function s(c,i){if(isNaN(c))switch(i){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(i){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(i){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";return c.toString(10)}function a(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return Ui=new t.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:o,predicate:a,represent:s,defaultStyle:"lowercase"}),Ui}var Bi,Eh;function pI(){if(Eh)return Bi;Eh=1;var e=vn();return Bi=new e.Schema({include:[aI()],implicit:[iI(),cI(),lI(),uI()]}),Bi}var Gi,Ph;function dI(){if(Ph)return Gi;Ph=1;var e=vn();return Gi=new e.Schema({include:[pI()]}),Gi}var Ki,Sh;function fI(){if(Sh)return Ki;Sh=1;var e=st(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");function r(s){if(s===null)return!1;var a;return a=t.exec(s),a!==null}function n(s){var a,c,i,l,u,f,_,m=0,w=null,S,b,$;if(a=t.exec(s),a===null)throw new Error("Date resolve error");if(c=+a[1],i=+a[2]-1,l=+a[3],!a[4])return new Date(Date.UTC(c,i,l));if(u=+a[4],f=+a[5],_=+a[6],a[7]){for(m=a[7].slice(0,3);m.length<3;)m=m+"0";m=+m}return a[9]&&(S=+a[10],b=+(a[11]||0),w=(S*60+b)*6e4,a[9]==="-"&&(w=-w)),$=new Date(Date.UTC(c,i,l,u,f,_,m)),w&&$.setTime($.getTime()-w),$}function o(s){return s.toISOString()}return Ki=new e.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:n,instanceOf:Date,represent:o}),Ki}var Ji,Ih;function mI(){if(Ih)return Ji;Ih=1;var e=st();function t(r){return r==="<<"||r===null}return Ji=new e.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ji}var Yi,xh;function hI(){if(xh)return Yi;xh=1;var e=fy().Buffer,t=st(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
92
|
+
\r`;function n(c){if(c===null)return!1;var i,l,u=0,f=c.length,_=r;for(l=0;l<f;l++)if(i=_.indexOf(c.charAt(l)),!(i>64)){if(i<0)return!1;u+=6}return u%8===0}function o(c){var i,l,u=c.replace(/[\r\n=]/g,""),f=u.length,_=r,m=0,w=[];for(i=0;i<f;i++)i%4===0&&i&&(w.push(m>>16&255),w.push(m>>8&255),w.push(m&255)),m=m<<6|_.indexOf(u.charAt(i));return l=f%4*6,l===0?(w.push(m>>16&255),w.push(m>>8&255),w.push(m&255)):l===18?(w.push(m>>10&255),w.push(m>>2&255)):l===12&&w.push(m>>4&255),e?new e(w):w}function s(c){var i="",l=0,u,f,_=c.length,m=r;for(u=0;u<_;u++)u%3===0&&u&&(i+=m[l>>18&63],i+=m[l>>12&63],i+=m[l>>6&63],i+=m[l&63]),l=(l<<8)+c[u];return f=_%3,f===0?(i+=m[l>>18&63],i+=m[l>>12&63],i+=m[l>>6&63],i+=m[l&63]):f===2?(i+=m[l>>10&63],i+=m[l>>4&63],i+=m[l<<2&63],i+=m[64]):f===1&&(i+=m[l>>2&63],i+=m[l<<4&63],i+=m[64],i+=m[64]),i}function a(c){return e&&e.isBuffer(c)}return Yi=new t.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:o,predicate:a,represent:s}),Yi}var Wi,Th;function yI(){if(Th)return Wi;Th=1;var e=st(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(s){if(s===null)return!0;var a=[],c,i,l,u,f,_=s;for(c=0,i=_.length;c<i;c+=1){if(l=_[c],f=!1,r.call(l)!=="[object Object]")return!1;for(u in l)if(t.call(l,u))if(!f)f=!0;else return!1;if(!f)return!1;if(a.indexOf(u)===-1)a.push(u);else return!1}return!0}function o(s){return s!==null?s:[]}return Wi=new e.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:o}),Wi}var Hi,Nh;function gI(){if(Nh)return Hi;Nh=1;var e=st(),t=ha(),r=Object.prototype.toString;function n(s){if(s===null)return!0;if(s.kind!=t.Kind.SEQ)return!1;var a,c,i,l=s.items;for(a=0,c=l.length;a<c;a+=1)if(i=l[a],r.call(i)!=="[object Object]"||!Array.isArray(i.mappings)||i.mappings.length!==1)return!1;return!0}function o(s){if(s===null||!Array.isArray(s.items))return[];var a,c,i,l=s.items;for(i=t.newItems(),i.parent=s.parent,i.startPosition=s.startPosition,i.endPosition=s.endPosition,a=0,c=l.length;a<c;a+=1){var u=l[a],f=u.mappings[0],_=t.newItems();_.parent=i,_.startPosition=f.key.startPosition,_.endPosition=f.value.startPosition,f.key.parent=_,f.value.parent=_,_.items=[f.key,f.value],i.items.push(_)}return i}return Hi=new e.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:o}),Hi}var Xi,kh;function vI(){if(kh)return Xi;kh=1;var e=st(),t=ha();function r(o){return o===null?!0:o.kind==t.Kind.MAP}function n(o){return o!==null?o:{}}return Xi=new e.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),Xi}var Qi,Oh;function Zi(){if(Oh)return Qi;Oh=1;var e=vn(),t=new e.Schema({include:[dI()],implicit:[fI(),mI()],explicit:[hI(),yI(),gI(),vI()]});return Qi=t,Qi}var ec,jh;function bI(){if(jh)return ec;jh=1;var e=st();function t(){return!0}function r(){}function n(){return""}function o(s){return typeof s>"u"}return ec=new e.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:t,construct:r,predicate:o,represent:n}),ec}var tc,Ah;function wI(){if(Ah)return tc;Ah=1;var e=st();function t(s){if(s===null||s.length===0)return!1;var a=s,c=/\/([gim]*)$/.exec(s),i="";if(a[0]==="/"){if(c&&(i=c[1]),i.length>3||a[a.length-i.length-1]!=="/")return!1;a=a.slice(1,a.length-i.length-1)}try{return!0}catch{return!1}}function r(s){var a=s,c=/\/([gim]*)$/.exec(s),i="";return a[0]==="/"&&(c&&(i=c[1]),a=a.slice(1,a.length-i.length-1)),new RegExp(a,i)}function n(s){var a="/"+s.source+"/";return s.global&&(a+="g"),s.multiline&&(a+="m"),s.ignoreCase&&(a+="i"),a}function o(s){return Object.prototype.toString.call(s)==="[object RegExp]"}return tc=new e.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:t,construct:r,predicate:o,represent:n}),tc}var rc,Ch;function Rh(){if(Ch)return rc;Ch=1;var e=vn(),t=new e.Schema({include:[Zi()],explicit:[bI(),wI()]});return e.Schema.DEFAULT=t,rc=t,rc}var Dh;function $I(){if(Dh)return Ct;Dh=1,Object.defineProperty(Ct,"__esModule",{value:!0});var e=ha(),t=Lr(),r=gn(),n=rI(),o=Zi(),s=Rh(),a=Object.prototype.hasOwnProperty,c=1,i=2,l=3,u=4,f=1,_=2,m=3,w=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=/[\x85\u2028\u2029]/,b=/[,\[\]\{\}]/,$=/^(?:!|!!|![a-z\-]+!)$/i,y=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(p){return p===10||p===13}function P(p){return p===9||p===32}function h(p){return p===9||p===32||p===10||p===13}function g(p){return p===44||p===91||p===93||p===123||p===125}function E(p){var Y;return 48<=p&&p<=57?p-48:(Y=p|32,97<=Y&&Y<=102?Y-97+10:-1)}function O(p){return p===120?2:p===117?4:p===85?8:0}function A(p){return 48<=p&&p<=57?p-48:-1}function q(p){return p===48?"\0":p===97?"\x07":p===98?"\b":p===116||p===9?" ":p===110?`
|
|
93
|
+
`:p===118?"\v":p===102?"\f":p===114?"\r":p===101?"\x1B":p===32?" ":p===34?'"':p===47?"/":p===92?"\\":p===78?"\x85":p===95?"\xA0":p===76?"\u2028":p===80?"\u2029":""}function z(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}for(var F=new Array(256),L=new Array(256),K=new Array(256),le=new Array(256),pe=0;pe<256;pe++)le[pe]=L[pe]=q(pe),F[pe]=L[pe]?1:0,K[pe]=1,F[pe]||(le[pe]="\\"+String.fromCharCode(pe));var Se=(function(){function p(Y,G){this.errorMap={},this.errors=[],this.lines=[],this.input=Y,this.filename=G.filename||null,this.schema=G.schema||s,this.onWarning=G.onWarning||null,this.legacy=G.legacy||!1,this.allowAnyEscape=G.allowAnyEscape||!1,this.ignoreDuplicateKeys=G.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Y.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}return p})();function ce(p,Y,G){return G===void 0&&(G=!1),new r(Y,new n(p.filename,p.input,p.position,p.line,p.position-p.lineStart),G)}function _e(p,Y,G,Q,ne){Q===void 0&&(Q=!1),ne===void 0&&(ne=!1);var Z=T(p,Y);if(Z){var ae=G+Y;if(!p.errorMap[ae]){var me=new n(p.filename,p.input,Y,Z.line,Y-Z.start);ne&&(me.toLineEnd=!0);var he=new r(G,me,Q);p.errors.push(he)}}}function R(p,Y){var G=ce(p,Y),Q=G.message+G.mark.position;if(!p.errorMap[Q]){p.errors.push(G),p.errorMap[Q]=1;for(var ne=p.position;;){if(p.position>=p.input.length-1)return;var Z=p.input.charAt(p.position);if(Z==`
|
|
94
|
+
`){p.position--,p.position==ne&&(p.position+=1);return}if(Z=="\r"){p.position--,p.position==ne&&(p.position+=1);return}p.position++}}}function k(p,Y){var G=ce(p,Y);p.onWarning&&p.onWarning.call(null,G)}var V={YAML:function(p,Y,G){var Q,ne,Z;p.version!==null&&R(p,"duplication of %YAML directive"),G.length!==1&&R(p,"YAML directive accepts exactly one argument"),Q=/^([0-9]+)\.([0-9]+)$/.exec(G[0]),Q===null&&R(p,"ill-formed argument of the YAML directive"),ne=parseInt(Q[1],10),Z=parseInt(Q[2],10),ne!==1&&R(p,"found incompatible YAML document (version 1.2 is required)"),p.version=G[0],p.checkLineBreaks=Z<2,Z!==2&&R(p,"found incompatible YAML document (version 1.2 is required)")},TAG:function(p,Y,G){var Q,ne;G.length!==2&&R(p,"TAG directive accepts exactly two arguments"),Q=G[0],ne=G[1],$.test(Q)||R(p,"ill-formed tag handle (first argument) of the TAG directive"),a.call(p.tagMap,Q)&&R(p,'there is a previously declared suffix for "'+Q+'" tag handle'),y.test(ne)||R(p,"ill-formed tag prefix (second argument) of the TAG directive"),p.tagMap[Q]=ne}};function j(p,Y,G,Q){var ne,Z,ae,me,he=p.result;if(he.startPosition==-1&&(he.startPosition=Y),Y<=G){if(me=p.input.slice(Y,G),Q)for(ne=0,Z=me.length;ne<Z;ne+=1)ae=me.charCodeAt(ne),ae===9||32<=ae&&ae<=1114111||R(p,"expected valid JSON character");else w.test(me)&&R(p,"the stream contains non-printable characters");he.value+=me,he.endPosition=G}}function v(p,Y,G,Q,ne){if(Q!=null){Y===null&&(Y={startPosition:Q.startPosition,endPosition:ne.endPosition,parent:null,errors:[],mappings:[],kind:e.Kind.MAP});var Z=e.newMapping(Q,ne);return Z.parent=Y,Q.parent=Z,ne!=null&&(ne.parent=Z),!p.ignoreDuplicateKeys&&Y.mappings.forEach(function(ae){ae.key&&ae.key.value===(Z.key&&Z.key.value)&&(_e(p,Z.key.startPosition,"duplicate key"),_e(p,ae.key.startPosition,"duplicate key"))}),Y.mappings.push(Z),Y.endPosition=ne?ne.endPosition:Q.endPosition+1,Y}}function I(p){var Y;Y=p.input.charCodeAt(p.position),Y===10?p.position++:Y===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):R(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.lines.push({start:p.lineStart,line:p.line})}function T(p,Y){for(var G,Q=0;Q<p.lines.length&&!(p.lines[Q].start>Y);Q++)G=p.lines[Q];return G||{start:0,line:0}}function M(p,Y,G){for(var Q=0,ne=p.input.charCodeAt(p.position);ne!==0;){for(;P(ne);)ne===9&&p.errors.push(ce(p,"Using tabs can lead to unpredictable results",!0)),ne=p.input.charCodeAt(++p.position);if(Y&&ne===35)do ne=p.input.charCodeAt(++p.position);while(ne!==10&&ne!==13&&ne!==0);if(d(ne))for(I(p),ne=p.input.charCodeAt(p.position),Q++,p.lineIndent=0;ne===32;)p.lineIndent++,ne=p.input.charCodeAt(++p.position);else break}return G!==-1&&Q!==0&&p.lineIndent<G&&k(p,"deficient indentation"),Q}function U(p){var Y=p.position,G;return G=p.input.charCodeAt(Y),!!((G===45||G===46)&&p.input.charCodeAt(Y+1)===G&&p.input.charCodeAt(Y+2)===G&&(Y+=3,G=p.input.charCodeAt(Y),G===0||h(G)))}function J(p,Y,G){G===1?Y.value+=" ":G>1&&(Y.value+=t.repeat(`
|
|
95
|
+
`,G-1))}function re(p,Y,G){var Q,ne,Z,ae,me,he,Fe,ye,Te=p.kind,Le=p.result,we,Ae=e.newScalar();if(Ae.plainScalar=!0,p.result=Ae,we=p.input.charCodeAt(p.position),h(we)||g(we)||we===35||we===38||we===42||we===33||we===124||we===62||we===39||we===34||we===37||we===64||we===96||(we===63||we===45)&&(ne=p.input.charCodeAt(p.position+1),h(ne)||G&&g(ne)))return!1;for(p.kind="scalar",Z=ae=p.position,me=!1;we!==0;){if(we===58){if(ne=p.input.charCodeAt(p.position+1),h(ne)||G&&g(ne))break}else if(we===35){if(Q=p.input.charCodeAt(p.position-1),h(Q))break}else{if(p.position===p.lineStart&&U(p)||G&&g(we))break;if(d(we))if(he=p.line,Fe=p.lineStart,ye=p.lineIndent,M(p,!1,-1),p.lineIndent>=Y){me=!0,we=p.input.charCodeAt(p.position);continue}else{p.position=ae,p.line=he,p.lineStart=Fe,p.lineIndent=ye;break}}if(me&&(j(p,Z,ae,!1),J(p,Ae,p.line-he),Z=ae=p.position,me=!1),P(we)||(ae=p.position+1),we=p.input.charCodeAt(++p.position),p.position>=p.input.length)return!1}return j(p,Z,ae,!1),p.result.startPosition!=-1?(Ae.rawValue=p.input.substring(Ae.startPosition,Ae.endPosition),!0):(p.kind=Te,p.result=Le,!1)}function x(p,Y){var G,Q,ne;if(G=p.input.charCodeAt(p.position),G!==39)return!1;var Z=e.newScalar();for(Z.singleQuoted=!0,p.kind="scalar",p.result=Z,Z.startPosition=p.position,p.position++,Q=ne=p.position;(G=p.input.charCodeAt(p.position))!==0;)if(G===39)if(j(p,Q,p.position,!0),G=p.input.charCodeAt(++p.position),Z.endPosition=p.position,G===39)Q=ne=p.position,p.position++;else return!0;else d(G)?(j(p,Q,ne,!0),J(p,Z,M(p,!1,Y)),Q=ne=p.position):p.position===p.lineStart&&U(p)?R(p,"unexpected end of the document within a single quoted scalar"):(p.position++,ne=p.position,Z.endPosition=p.position);R(p,"unexpected end of the stream within a single quoted scalar")}function N(p,Y){var G,Q,ne,Z,ae,me;if(me=p.input.charCodeAt(p.position),me!==34)return!1;p.kind="scalar";var he=e.newScalar();for(he.doubleQuoted=!0,p.result=he,he.startPosition=p.position,p.position++,G=Q=p.position;(me=p.input.charCodeAt(p.position))!==0;){if(me===34)return j(p,G,p.position,!0),p.position++,he.endPosition=p.position,he.rawValue=p.input.substring(he.startPosition,he.endPosition),!0;if(me===92){if(j(p,G,p.position,!0),me=p.input.charCodeAt(++p.position),d(me))M(p,!1,Y);else if(me<256&&(p.allowAnyEscape?K[me]:F[me]))he.value+=p.allowAnyEscape?le[me]:L[me],p.position++;else if((ae=O(me))>0){for(ne=ae,Z=0;ne>0;ne--)me=p.input.charCodeAt(++p.position),(ae=E(me))>=0?Z=(Z<<4)+ae:R(p,"expected hexadecimal character");he.value+=z(Z),p.position++}else R(p,"unknown escape sequence");G=Q=p.position}else d(me)?(j(p,G,Q,!0),J(p,he,M(p,!1,Y)),G=Q=p.position):p.position===p.lineStart&&U(p)?R(p,"unexpected end of the document within a double quoted scalar"):(p.position++,Q=p.position)}R(p,"unexpected end of the stream within a double quoted scalar")}function D(p,Y){var G=!0,Q,ne=p.tag,Z,ae=p.anchor,me,he,Fe,ye,Te,Le,we,Ae,Qe;if(Qe=p.input.charCodeAt(p.position),Qe===91)he=93,Te=!1,Z=e.newItems(),Z.startPosition=p.position;else if(Qe===123)he=125,Te=!0,Z=e.newMap(),Z.startPosition=p.position;else return!1;for(p.anchor!==null&&(Z.anchorId=p.anchor,p.anchorMap[p.anchor]=Z),Qe=p.input.charCodeAt(++p.position);Qe!==0;){if(M(p,!0,Y),Qe=p.input.charCodeAt(p.position),Qe===he)return p.position++,p.tag=ne,p.anchor=ae,p.kind=Te?"mapping":"sequence",p.result=Z,Z.endPosition=p.position,!0;if(!G){var wa=p.position;R(p,"missed comma between flow collection entries"),p.position=wa+1}if(we=Le=Ae=null,Fe=ye=!1,Qe===63&&(me=p.input.charCodeAt(p.position+1),h(me)&&(Fe=ye=!0,p.position++,M(p,!0,Y))),Q=p.line,ee(p,Y,c,!1,!0),we=p.tag,Le=p.result,M(p,!0,Y),Qe=p.input.charCodeAt(p.position),(ye||p.line===Q)&&Qe===58&&(Fe=!0,Qe=p.input.charCodeAt(++p.position),M(p,!0,Y),ee(p,Y,c,!1,!0),Ae=p.result),Te)v(p,Z,we,Le,Ae);else if(Fe){var $n=v(p,null,we,Le,Ae);$n.parent=Z,Z.items.push($n)}else Le&&(Le.parent=Z),Z.items.push(Le);Z.endPosition=p.position+1,M(p,!0,Y),Qe=p.input.charCodeAt(p.position),Qe===44?(G=!0,Qe=p.input.charCodeAt(++p.position)):G=!1}R(p,"unexpected end of the stream within a flow collection")}function B(p,Y){var G,Q,ne=f,Z=!1,ae=Y,me=0,he=!1,Fe,ye;if(ye=p.input.charCodeAt(p.position),ye===124)Q=!1;else if(ye===62)Q=!0;else return!1;var Te=e.newScalar();for(p.kind="scalar",p.result=Te,Te.startPosition=p.position;ye!==0;)if(ye=p.input.charCodeAt(++p.position),ye===43||ye===45)f===ne?ne=ye===43?m:_:R(p,"repeat of a chomping mode identifier");else if((Fe=A(ye))>=0)Fe===0?R(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):Z?R(p,"repeat of an indentation width identifier"):(ae=Y+Fe-1,Z=!0);else break;if(P(ye)){do ye=p.input.charCodeAt(++p.position);while(P(ye));if(ye===35)do ye=p.input.charCodeAt(++p.position);while(!d(ye)&&ye!==0)}for(;ye!==0;){for(I(p),p.lineIndent=0,ye=p.input.charCodeAt(p.position);(!Z||p.lineIndent<ae)&&ye===32;)p.lineIndent++,ye=p.input.charCodeAt(++p.position);if(!Z&&p.lineIndent>ae&&(ae=p.lineIndent),d(ye)){me++;continue}if(p.lineIndent<ae){ne===m?Te.value+=t.repeat(`
|
|
96
|
+
`,me):ne===f&&Z&&(Te.value+=`
|
|
97
|
+
`);break}for(Q?P(ye)?(he=!0,Te.value+=t.repeat(`
|
|
98
|
+
`,me+1)):he?(he=!1,Te.value+=t.repeat(`
|
|
99
|
+
`,me+1)):me===0?Z&&(Te.value+=" "):Te.value+=t.repeat(`
|
|
100
|
+
`,me):Z&&(Te.value+=t.repeat(`
|
|
101
|
+
`,me+1)),Z=!0,me=0,G=p.position;!d(ye)&&ye!==0;)ye=p.input.charCodeAt(++p.position);j(p,G,p.position,!1)}Te.endPosition=p.position;for(var Le=p.position-1;;){var we=p.input[Le];if(we=="\r"||we==`
|
|
102
|
+
`||we!=" "&&we!=" ")break;Le--}return Te.endPosition=Le,Te.rawValue=p.input.substring(Te.startPosition,Te.endPosition),!0}function H(p,Y){var G,Q=p.tag,ne=p.anchor,Z=e.newItems(),ae,me=!1,he;for(p.anchor!==null&&(Z.anchorId=p.anchor,p.anchorMap[p.anchor]=Z),Z.startPosition=p.position,he=p.input.charCodeAt(p.position);he!==0&&!(he!==45||(ae=p.input.charCodeAt(p.position+1),!h(ae)));){if(me=!0,p.position++,M(p,!0,-1)&&p.lineIndent<=Y){Z.items.push(null),he=p.input.charCodeAt(p.position);continue}if(G=p.line,ee(p,Y,l,!1,!0),p.result&&(p.result.parent=Z,Z.items.push(p.result)),M(p,!0,-1),he=p.input.charCodeAt(p.position),(p.line===G||p.lineIndent>Y)&&he!==0)R(p,"bad indentation of a sequence entry");else if(p.lineIndent<Y)break}return Z.endPosition=p.position,me?(p.tag=Q,p.anchor=ne,p.kind="sequence",p.result=Z,Z.endPosition=p.position,!0):!1}function oe(p,Y,G){var Q,ne,Z,ae=p.tag,me=p.anchor,he=e.newMap(),Fe=null,ye=null,Te=null,Le=!1,we=!1,Ae;for(he.startPosition=p.position,p.anchor!==null&&(he.anchorId=p.anchor,p.anchorMap[p.anchor]=he),Ae=p.input.charCodeAt(p.position);Ae!==0;){if(Q=p.input.charCodeAt(p.position+1),Z=p.line,(Ae===63||Ae===58)&&h(Q))Ae===63?(Le&&(v(p,he,Fe,ye,null),Fe=ye=Te=null),we=!0,Le=!0,ne=!0):Le?(Le=!1,ne=!0):R(p,"incomplete explicit mapping pair; a key node is missed"),p.position+=1,Ae=Q;else if(ee(p,G,i,!1,!0))if(p.line===Z){for(Ae=p.input.charCodeAt(p.position);P(Ae);)Ae=p.input.charCodeAt(++p.position);if(Ae===58)Ae=p.input.charCodeAt(++p.position),h(Ae)||R(p,"a whitespace character is expected after the key-value separator within a block mapping"),Le&&(v(p,he,Fe,ye,null),Fe=ye=Te=null),we=!0,Le=!1,ne=!1,Fe=p.tag,ye=p.result;else{if(p.position==p.lineStart&&U(p))break;if(we)R(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=ae,p.anchor=me,!0}}else if(we){for(R(p,"can not read a block mapping entry; a multiline key may not be an implicit key");p.position>0;)if(Ae=p.input.charCodeAt(--p.position),d(Ae)){p.position++;break}}else return p.tag=ae,p.anchor=me,!0;else break;if((p.line===Z||p.lineIndent>Y)&&(ee(p,Y,u,!0,ne)&&(Le?ye=p.result:Te=p.result),Le||(v(p,he,Fe,ye,Te),Fe=ye=Te=null),M(p,!0,-1),Ae=p.input.charCodeAt(p.position)),p.lineIndent>Y&&Ae!==0)R(p,"bad indentation of a mapping entry");else if(p.lineIndent<Y)break}return Le&&v(p,he,Fe,ye,null),we&&(p.tag=ae,p.anchor=me,p.kind="mapping",p.result=he),we}function C(p){var Y,G=!1,Q=!1,ne,Z,ae;if(ae=p.input.charCodeAt(p.position),ae!==33)return!1;if(p.tag!==null&&R(p,"duplication of a tag property"),ae=p.input.charCodeAt(++p.position),ae===60?(G=!0,ae=p.input.charCodeAt(++p.position)):ae===33?(Q=!0,ne="!!",ae=p.input.charCodeAt(++p.position)):ne="!",Y=p.position,G){do ae=p.input.charCodeAt(++p.position);while(ae!==0&&ae!==62);p.position<p.length?(Z=p.input.slice(Y,p.position),ae=p.input.charCodeAt(++p.position)):R(p,"unexpected end of the stream within a verbatim tag")}else{for(;ae!==0&&!h(ae);)ae===33&&(Q?R(p,"tag suffix cannot contain exclamation marks"):(ne=p.input.slice(Y-1,p.position+1),$.test(ne)||R(p,"named tag handle cannot contain such characters"),Q=!0,Y=p.position+1)),ae=p.input.charCodeAt(++p.position);Z=p.input.slice(Y,p.position),b.test(Z)&&R(p,"tag suffix cannot contain flow indicator characters")}return Z&&!y.test(Z)&&R(p,"tag name cannot contain such characters: "+Z),G?p.tag=Z:a.call(p.tagMap,ne)?p.tag=p.tagMap[ne]+Z:ne==="!"?p.tag="!"+Z:ne==="!!"?p.tag="tag:yaml.org,2002:"+Z:R(p,'undeclared tag handle "'+ne+'"'),!0}function X(p){var Y,G;if(G=p.input.charCodeAt(p.position),G!==38)return!1;for(p.anchor!==null&&R(p,"duplication of an anchor property"),G=p.input.charCodeAt(++p.position),Y=p.position;G!==0&&!h(G)&&!g(G);)G=p.input.charCodeAt(++p.position);return p.position===Y&&R(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(Y,p.position),!0}function se(p){var Y,G,Q;if(Q=p.input.charCodeAt(p.position),Q!==42)return!1;for(Q=p.input.charCodeAt(++p.position),Y=p.position;Q!==0&&!h(Q)&&!g(Q);)Q=p.input.charCodeAt(++p.position);return p.position<=Y&&(R(p,"name of an alias node must contain at least one character"),p.position=Y+1),G=p.input.slice(Y,p.position),p.anchorMap.hasOwnProperty(G)||(R(p,'unidentified alias "'+G+'"'),p.position<=Y&&(p.position=Y+1)),p.result=e.newAnchorRef(G,Y,p.position,p.anchorMap[G]),M(p,!0,-1),!0}function ee(p,Y,G,Q,ne){var Z,ae,me,he=1,Fe=!1,ye=!1,Te,Le,we,Ae,Qe;p.tag=null,p.anchor=null,p.kind=null,p.result=null,Z=ae=me=u===G||l===G,Q&&M(p,!0,-1)&&(Fe=!0,p.lineIndent>Y?he=1:p.lineIndent===Y?he=0:p.lineIndent<Y&&(he=-1));var wa=p.position;if(he===1)for(;C(p)||X(p);)M(p,!0,-1)?(Fe=!0,me=Z,p.lineIndent>Y?he=1:p.lineIndent===Y?he=0:p.lineIndent<Y&&(he=-1)):me=!1;if(me&&(me=Fe||ne),(he===1||u===G)&&(c===G||i===G?Ae=Y:Ae=Y+1,Qe=p.position-p.lineStart,he===1?me&&(H(p,Qe)||oe(p,Qe,Ae))||D(p,Ae)?ye=!0:(ae&&B(p,Ae)||x(p,Ae)||N(p,Ae)?ye=!0:se(p)?(ye=!0,(p.tag!==null||p.anchor!==null)&&R(p,"alias node should not have any properties")):re(p,Ae,c===G)&&(ye=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&(p.anchorMap[p.anchor]=p.result,p.result.anchorId=p.anchor)):he===0&&(ye=me&&H(p,Qe))),p.tag!==null&&p.tag!=="!")if(p.tag=="!include")p.result||(p.result=e.newScalar(),p.result.startPosition=p.position,p.result.endPosition=p.position,R(p,"!include without value")),p.result.kind=e.Kind.INCLUDE_REF;else if(p.tag==="?")for(Te=0,Le=p.implicitTypes.length;Te<Le;Te+=1){we=p.implicitTypes[Te];var $n=p.result.value;if(we.resolve($n)){p.result.valueObject=we.construct(p.result.value),p.tag=we.tag,p.anchor!==null&&(p.result.anchorId=p.anchor,p.anchorMap[p.anchor]=p.result);break}}else a.call(p.typeMap,p.tag)?(we=p.typeMap[p.tag],p.result!==null&&we.kind!==p.kind&&R(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+we.kind+'", not "'+p.kind+'"'),we.resolve(p.result)?(p.result=we.construct(p.result),p.anchor!==null&&(p.result.anchorId=p.anchor,p.anchorMap[p.anchor]=p.result)):R(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")):_e(p,wa,"unknown tag <"+p.tag+">",!1,!0);return p.tag!==null||p.anchor!==null||ye}function te(p){var Y=p.position,G,Q,ne,Z=!1,ae;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap={},p.anchorMap={};(ae=p.input.charCodeAt(p.position))!==0&&(M(p,!0,-1),ae=p.input.charCodeAt(p.position),!(p.lineIndent>0||ae!==37));){for(Z=!0,ae=p.input.charCodeAt(++p.position),G=p.position;ae!==0&&!h(ae);)ae=p.input.charCodeAt(++p.position);for(Q=p.input.slice(G,p.position),ne=[],Q.length<1&&R(p,"directive name must not be less than one character in length");ae!==0;){for(;P(ae);)ae=p.input.charCodeAt(++p.position);if(ae===35){do ae=p.input.charCodeAt(++p.position);while(ae!==0&&!d(ae));break}if(d(ae))break;for(G=p.position;ae!==0&&!h(ae);)ae=p.input.charCodeAt(++p.position);ne.push(p.input.slice(G,p.position))}ae!==0&&I(p),a.call(V,Q)?V[Q](p,Q,ne):(k(p,'unknown document directive "'+Q+'"'),p.position++)}if(M(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,M(p,!0,-1)):Z&&R(p,"directives end mark is expected"),ee(p,p.lineIndent-1,u,!1,!0),M(p,!0,-1),p.checkLineBreaks&&S.test(p.input.slice(Y,p.position))&&k(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&U(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,M(p,!0,-1));return}if(p.position<p.length-1)R(p,"end of the stream or a document separator is expected");else return}function ue(p,Y){p=String(p),Y=Y||{};var G=p.length;G!==0&&(p.charCodeAt(G-1)!==10&&p.charCodeAt(G-1)!==13&&(p+=`
|
|
103
|
+
`),p.charCodeAt(0)===65279&&(p=p.slice(1)));var Q=new Se(p,Y);for(Q.input+="\0";Q.input.charCodeAt(Q.position)===32;)Q.lineIndent+=1,Q.position+=1;for(;Q.position<Q.length-1;){var ne=Q.position;if(te(Q),Q.position<=ne)for(;Q.position<Q.length-1;Q.position++){var Z=Q.input.charAt(Q.position);if(Z==`
|
|
104
|
+
`)break}}var ae=Q.documents,me=ae.length;me>0&&(ae[me-1].endPosition=G);for(var he=0,Fe=ae;he<Fe.length;he++){var ye=Fe[he];ye.errors=Q.errors,ye.startPosition>ye.endPosition&&(ye.startPosition=ye.endPosition)}return ae}function ie(p,Y,G){G===void 0&&(G={});var Q=ue(p,G),ne,Z;for(ne=0,Z=Q.length;ne<Z;ne+=1)Y(Q[ne])}Ct.loadAll=ie;function de(p,Y){Y===void 0&&(Y={});var G=ue(p,Y);if(G.length!==0){if(G.length===1)return G[0];var Q=new r("expected a single document in the stream, but found more");return Q.mark=new n("","",0,0,0),Q.mark.position=G[0].endPosition,G[0].errors.push(Q),G[0]}}Ct.load=de;function $e(p,Y,G){G===void 0&&(G={}),ie(p,Y,t.extend({schema:o},G))}Ct.safeLoadAll=$e;function Me(p,Y){return Y===void 0&&(Y={}),de(p,t.extend({schema:o},Y))}return Ct.safeLoad=Me,Ct.loadAll=ie,Ct.load=de,Ct.safeLoadAll=$e,Ct.safeLoad=Me,Ct}var bn={},qh;function _I(){if(qh)return bn;qh=1,Object.defineProperty(bn,"__esModule",{value:!0});var e=Lr(),t=gn(),r=Rh(),n=Zi(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=9,c=10,i=13,l=32,u=33,f=34,_=35,m=37,w=38,S=39,b=42,$=44,y=45,d=58,P=62,h=63,g=64,E=91,O=93,A=96,q=123,z=124,F=125,L={};L[0]="\\0",L[7]="\\a",L[8]="\\b",L[9]="\\t",L[10]="\\n",L[11]="\\v",L[12]="\\f",L[13]="\\r",L[27]="\\e",L[34]='\\"',L[92]="\\\\",L[133]="\\N",L[160]="\\_",L[8232]="\\L",L[8233]="\\P";var K=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function le(C,X){var se,ee,te,ue,ie,de,$e;if(X===null)return{};for(se={},ee=Object.keys(X),te=0,ue=ee.length;te<ue;te+=1)ie=ee[te],de=String(X[ie]),ie.slice(0,2)==="!!"&&(ie="tag:yaml.org,2002:"+ie.slice(2)),$e=C.compiledTypeMap[ie],$e&&s.call($e.styleAliases,de)&&(de=$e.styleAliases[de]),se[ie]=de;return se}function pe(C){var X,se,ee;if(X=C.toString(16).toUpperCase(),C<=255)se="x",ee=2;else if(C<=65535)se="u",ee=4;else if(C<=4294967295)se="U",ee=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+se+e.repeat("0",ee-X.length)+X}function Se(C){this.schema=C.schema||r,this.indent=Math.max(1,C.indent||2),this.skipInvalid=C.skipInvalid||!1,this.flowLevel=e.isNothing(C.flowLevel)?-1:C.flowLevel,this.styleMap=le(this.schema,C.styles||null),this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ce(C,X){for(var se=e.repeat(" ",X),ee=0,te=-1,ue="",ie,de=C.length;ee<de;)te=C.indexOf(`
|
|
105
|
+
`,ee),te===-1?(ie=C.slice(ee),ee=de):(ie=C.slice(ee,te+1),ee=te+1),ie.length&&ie!==`
|
|
106
|
+
`&&(ue+=se),ue+=ie;return ue}function _e(C,X){return`
|
|
107
|
+
`+e.repeat(" ",C.indent*X)}function R(C,X){var se,ee,te;for(se=0,ee=C.implicitTypes.length;se<ee;se+=1)if(te=C.implicitTypes[se],te.resolve(X))return!0;return!1}function k(C){this.source=C,this.result="",this.checkpoint=0}k.prototype.takeUpTo=function(C){var X;if(C<this.checkpoint)throw X=new Error("position should be > checkpoint"),X.position=C,X.checkpoint=this.checkpoint,X;return this.result+=this.source.slice(this.checkpoint,C),this.checkpoint=C,this},k.prototype.escapeChar=function(){var C,X;return C=this.source.charCodeAt(this.checkpoint),X=L[C]||pe(C),this.result+=X,this.checkpoint+=1,this},k.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};function V(C,X,se){var ee,te,ue,ie,de,$e,Me,p,Y,G,Q,ne,Z,ae,me,he,Fe,ye,Te,Le,we;if(X.length===0){C.dump="''";return}if(X.indexOf("!include")==0){C.dump=""+X;return}if(X.indexOf("!$$$novalue")==0){C.dump="";return}if(K.indexOf(X)!==-1){C.dump="'"+X+"'";return}for(ee=!0,te=X.length?X.charCodeAt(0):0,ue=l===te||l===X.charCodeAt(X.length-1),(y===te||h===te||g===te||A===te)&&(ee=!1),ue?(ee=!1,ie=!1,de=!1):(ie=!0,de=!0),$e=!0,Me=new k(X),p=!1,Y=0,G=0,Q=C.indent*se,ne=80,Q<40?ne-=Q:ne=40,ae=0;ae<X.length;ae++){if(Z=X.charCodeAt(ae),ee)if(!I(Z))ee=!1;else continue;$e&&Z===S&&($e=!1),me=L[Z],he=T(Z),!(!me&&!he)&&(Z!==c&&Z!==f&&Z!==S?(ie=!1,de=!1):Z===c&&(p=!0,$e=!1,ae>0&&(Fe=X.charCodeAt(ae-1),Fe===l&&(de=!1,ie=!1)),ie&&(ye=ae-Y,Y=ae,ye>G&&(G=ye))),Z!==f&&($e=!1),Me.takeUpTo(ae),Me.escapeChar())}if(ee&&R(C,X)&&(ee=!1),Te="",(ie||de)&&(Le=0,X.charCodeAt(X.length-1)===c&&(Le+=1,X.charCodeAt(X.length-2)===c&&(Le+=1)),Le===0?Te="-":Le===2&&(Te="+")),de&&G<ne&&(ie=!1),p||(de=!1),ee)C.dump=X;else if($e)C.dump="'"+X+"'";else if(ie)we=j(X,ne),C.dump=">"+Te+`
|
|
108
|
+
`+ce(we,Q);else if(de)Te||(X=X.replace(/\n$/,"")),C.dump="|"+Te+`
|
|
109
|
+
`+ce(X,Q);else if(Me)Me.finish(),C.dump='"'+Me.result+'"';else throw new Error("Failed to dump scalar value")}function j(C,X){var se="",ee=0,te=C.length,ue=/\n+$/.exec(C),ie;for(ue&&(te=ue.index+1);ee<te;)ie=C.indexOf(`
|
|
110
|
+
`,ee),ie>te||ie===-1?(se&&(se+=`
|
|
111
|
+
|
|
112
|
+
`),se+=v(C.slice(ee,te),X),ee=te):(se&&(se+=`
|
|
113
|
+
|
|
114
|
+
`),se+=v(C.slice(ee,ie),X),ee=ie+1);return ue&&ue[0]!==`
|
|
115
|
+
`&&(se+=ue[0]),se}function v(C,X){if(C==="")return C;for(var se=/[^\s] [^\s]/g,ee="",te=0,ue=0,ie=se.exec(C),de,$e,Me;ie;)de=ie.index,de-ue>X&&(te!==ue?$e=te:$e=de,ee&&(ee+=`
|
|
116
|
+
`),Me=C.slice(ue,$e),ee+=Me,ue=$e+1),te=de+1,ie=se.exec(C);return ee&&(ee+=`
|
|
117
|
+
`),ue!==te&&C.length-ue>X?ee+=C.slice(ue,te)+`
|
|
118
|
+
`+C.slice(te+1):ee+=C.slice(ue),ee}function I(C){return a!==C&&c!==C&&i!==C&&$!==C&&E!==C&&O!==C&&q!==C&&F!==C&&_!==C&&w!==C&&b!==C&&u!==C&&z!==C&&P!==C&&S!==C&&f!==C&&m!==C&&d!==C&&!L[C]&&!T(C)}function T(C){return!(32<=C&&C<=126||C===133||160<=C&&C<=55295||57344<=C&&C<=65533||65536<=C&&C<=1114111)}function M(C,X,se){var ee="",te=C.tag,ue,ie;for(ue=0,ie=se.length;ue<ie;ue+=1)N(C,X,se[ue],!1,!1)&&(ue!==0&&(ee+=", "),ee+=C.dump);C.tag=te,C.dump="["+ee+"]"}function U(C,X,se,ee){var te="",ue=C.tag,ie,de;for(ie=0,de=se.length;ie<de;ie+=1)N(C,X+1,se[ie],!0,!0)&&((!ee||ie!==0)&&(te+=_e(C,X)),te+="- "+C.dump);C.tag=ue,C.dump=te||"[]"}function J(C,X,se){var ee="",te=C.tag,ue=Object.keys(se),ie,de,$e,Me,p;for(ie=0,de=ue.length;ie<de;ie+=1)p="",ie!==0&&(p+=", "),$e=ue[ie],Me=se[$e],N(C,X,$e,!1,!1)&&(C.dump.length>1024&&(p+="? "),p+=C.dump+": ",N(C,X,Me,!1,!1)&&(p+=C.dump,ee+=p));C.tag=te,C.dump="{"+ee+"}"}function re(C,X,se,ee){var te="",ue=C.tag,ie=Object.keys(se),de,$e,Me,p,Y,G;for(de=0,$e=ie.length;de<$e;de+=1)G="",(!ee||de!==0)&&(G+=_e(C,X)),Me=ie[de],p=se[Me],N(C,X+1,Me,!0,!0)&&(Y=C.tag!==null&&C.tag!=="?"||C.dump&&C.dump.length>1024,Y&&(C.dump&&c===C.dump.charCodeAt(0)?G+="?":G+="? "),G+=C.dump,Y&&(G+=_e(C,X)),N(C,X+1,p,!0,Y)&&(C.dump&&c===C.dump.charCodeAt(0)?G+=":":G+=": ",G+=C.dump,te+=G));C.tag=ue,C.dump=te||"{}"}function x(C,X,se){var ee,te,ue,ie,de,$e;for(te=se?C.explicitTypes:C.implicitTypes,ue=0,ie=te.length;ue<ie;ue+=1)if(de=te[ue],(de.instanceOf||de.predicate)&&(!de.instanceOf||typeof X=="object"&&X instanceof de.instanceOf)&&(!de.predicate||de.predicate(X))){if(C.tag=se?de.tag:"?",de.represent){if($e=C.styleMap[de.tag]||de.defaultStyle,o.call(de.represent)==="[object Function]")ee=de.represent(X,$e);else if(s.call(de.represent,$e))ee=de.represent[$e](X,$e);else throw new t("!<"+de.tag+'> tag resolver accepts not "'+$e+'" style');C.dump=ee}return!0}return!1}function N(C,X,se,ee,te){C.tag=null,C.dump=se,x(C,se,!1)||x(C,se,!0);var ue=o.call(C.dump);ee&&(ee=0>C.flowLevel||C.flowLevel>X),(C.tag!==null&&C.tag!=="?"||C.indent!==2&&X>0)&&(te=!1);var ie=ue==="[object Object]"||ue==="[object Array]",de,$e;if(ie&&(de=C.duplicates.indexOf(se),$e=de!==-1),$e&&C.usedDuplicates[de])C.dump="*ref_"+de;else{if(ie&&$e&&!C.usedDuplicates[de]&&(C.usedDuplicates[de]=!0),ue==="[object Object]")ee&&Object.keys(C.dump).length!==0?(re(C,X,C.dump,te),$e&&(C.dump="&ref_"+de+(X===0?`
|
|
119
|
+
`:"")+C.dump)):(J(C,X,C.dump),$e&&(C.dump="&ref_"+de+" "+C.dump));else if(ue==="[object Array]")ee&&C.dump.length!==0?(U(C,X,C.dump,te),$e&&(C.dump="&ref_"+de+(X===0?`
|
|
120
|
+
`:"")+C.dump)):(M(C,X,C.dump),$e&&(C.dump="&ref_"+de+" "+C.dump));else if(ue==="[object String]")C.tag!=="?"&&V(C,C.dump,X);else{if(C.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+ue)}C.tag!==null&&C.tag!=="?"&&(C.dump="!<"+C.tag+"> "+C.dump)}return!0}function D(C,X){var se=[],ee=[],te,ue;for(B(C,se,ee),te=0,ue=ee.length;te<ue;te+=1)X.duplicates.push(se[ee[te]]);X.usedDuplicates=new Array(ue)}function B(C,X,se){o.call(C);var ee,te,ue;if(C!==null&&typeof C=="object")if(te=X.indexOf(C),te!==-1)se.indexOf(te)===-1&&se.push(te);else if(X.push(C),Array.isArray(C))for(te=0,ue=C.length;te<ue;te+=1)B(C[te],X,se);else for(ee=Object.keys(C),te=0,ue=ee.length;te<ue;te+=1)B(C[ee[te]],X,se)}function H(C,X){X=X||{};var se=new Se(X);return D(C,se),N(se,0,C,!0,!0)?se.dump+`
|
|
121
|
+
`:""}bn.dump=H;function oe(C,X){return H(C,e.extend({schema:n},X))}return bn.safeDump=oe,bn}var Lh={},Mh;function EI(){return Mh||(Mh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c){if(["true","True","TRUE"].lastIndexOf(c)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(c)>=0)return!1;throw'Invalid boolean "'+c+'"'}e.parseYamlBoolean=t;function r(c){return c.lastIndexOf("0o",0)===0?parseInt(c.substring(2),8):parseInt(c)}function n(c){var i=r(c);if(isNaN(i))throw'Invalid integer "'+c+'"';return i}e.parseYamlInteger=n;function o(c){if([".nan",".NaN",".NAN"].lastIndexOf(c)>=0)return NaN;var i=/^([-+])?(?:\.inf|\.Inf|\.INF)$/,l=i.exec(c);if(l)return l[1]==="-"?-1/0:1/0;var u=parseFloat(c);if(!isNaN(u))return u;throw'Invalid float "'+c+'"'}e.parseYamlFloat=o;var s;(function(c){c[c.null=0]="null",c[c.bool=1]="bool",c[c.int=2]="int",c[c.float=3]="float",c[c.string=4]="string"})(s=e.ScalarType||(e.ScalarType={}));function a(c){if(c===void 0)return s.null;if(c.doubleQuoted||!c.plainScalar||c.singleQuoted)return s.string;var i=c.value;if(["null","Null","NULL","~",""].indexOf(i)>=0||i==null)return s.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(i)>=0)return s.bool;var l=/^[-+]?[0-9]+$/,u=/^0o[0-7]+$/,f=/^0x[0-9a-fA-F]+$/;if(l.test(i)||u.test(i)||f.test(i))return s.int;var _=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,m=/^[-+]?(\.inf|\.Inf|\.INF)$/;return _.test(i)||m.test(i)||[".nan",".NaN",".NAN"].indexOf(i)>=0?s.float:s.string}e.determineScalarType=a})(Lh)),Lh}var Vh;function PI(){return Vh||(Vh=1,(function(e){function t(o){for(var s in o)e.hasOwnProperty(s)||(e[s]=o[s])}Object.defineProperty(e,"__esModule",{value:!0});var r=$I();e.load=r.load,e.loadAll=r.loadAll,e.safeLoad=r.safeLoad,e.safeLoadAll=r.safeLoadAll;var n=_I();e.dump=n.dump,e.safeDump=n.safeDump,e.YAMLException=gn(),t(ha()),t(EI())})(ih)),ih}var wn=PI();const SI=150,II=3;function nc(e,t){Ua.enabled=t;const{start:r,end:n={line:r.line,col:r.col+1},source:o}=e,s=o.getLines(),a=r.line,c=Math.max(Math.min(n.line,s.length),r.line);let i=Math.max(c-a-II+1,0);i<2&&(i=0);const l=[];let u=0;for(let _=a;_<=c&&!(i>0&&_>=c-i);_++){const m=s[_-1]||"";m!==""&&(u=va(m));const w=_===a?r.col-1:u,S=_===c?n.col-1:m.length;l.push([`${_}`,f(m,w,S,Re.red)]),t||l.push(["",Fh(m,w,S)])}return i>0&&(l.push(["\u2026",`${oc(u)}${Re.gray(`< ${i} more lines >`)}`]),l.push([`${c}`,f(s[c-1],-1,n.col-1,Re.red)]),t||l.push(["",Fh(s[c-1],-1,n.col-1)])),xI([[`${a-2}`,f(s[a-1-2])],[`${a-1}`,f(s[a-1-1])],...l,[`${c+1}`,f(s[c-1+1])],[`${c+2}`,f(s[c-1+2])]]);function f(_,m=-1,w=1/0,S=Re.gray){return!t||!_?_:(m===-1&&(m=va(_)),w=Math.min(w,_.length),_.substr(0,m)+S(_.substring(m,w))+_.substr(w))}}function xI(e){const t=e.filter(([o,s])=>s!==void 0),r=Math.max(...t.map(([o])=>o.length)),n=Math.min(...t.map(([o,s])=>s===""?1/0:va(s)));return t.map(([o,s])=>Re.gray(NI(r,o)+" |")+(s?" "+TI(s.substring(n)):"")).join(`
|
|
122
|
+
`)}function TI(e,t=SI){const r=e.length-t;if(r>0){const n=Re.gray(`...<${r} chars>`);return e.substring(0,t-n.length)+n}else return e}function Fh(e,t=-1,r=1/0){return t===-1&&(t=va(e)),r=Math.min(r,e.length),oc(t)+"^".repeat(Math.max(r-t,1))}function oc(e){return" ".repeat(e)}function NI(e,t){return oc(e-t.length)+t}function va(e){for(let t=0;t<e.length;t++)if(e[t]!==" ")return t;return e.length}function ar(e){if(e.pointer===void 0)return e;const{source:t,pointer:r,reportOnKey:n}=e,o=t.getAst(wn.safeLoad),s=zh(o,r,!!n);return{...e,pointer:void 0,...kI(t.body,s?.startPosition??1,s?.endPosition??1)}}function kI(e,t,r){let n=1,o=1,s={line:1,col:1};for(let c=0;c<r-1;c++){if(c===t-1&&(s={line:n,col:o+1}),e[c]===`
|
|
123
|
+
`){n++,o=1,c===t-1&&(s={line:n,col:o}),e[c+1]==="\r"&&c++;continue}o++}const a=t===r?{...s}:{line:n,col:o+1};return{start:s,end:a}}function zh(e,t,r){const n=my(t.substr(2));if(e===void 0)return;let o=e;for(const s of n)if(o.kind===wn.Kind.MAP){const a=o.mappings.find(c=>c.key.value===s);if(!a||(o=a,!a?.value))break;o=a.value}else if(o.kind===wn.Kind.SEQ){const a=o.items[parseInt(s,10)];if(!a)break;o=a}if(r){const s=o.parent;return!s||s.kind===wn.Kind.SEQ?o:s.kind===wn.Kind.MAPPING?s.key:o}else return o}const OI={INVALID_SEVERITY_LEVEL:"Invalid severity level; accepted values: error or warn"},Uh={warn:e=>Re.bgYellow(Re.black(e)),error:Re.bgRed},Bh={warn:Re.yellow,error:Re.red},Mr={warn:"Warning",error:"Error"},jI={error:"critical",warn:"minor"},AI=+(vc.REDOCLY_CLI_LINT_MAX_SUGGESTIONS??5);function ba(e){return e==="error"?1:2}function Gh(e){let t=0,r=0,n=0;for(const o of e){if(o.ignored){n++;continue}o.severity==="error"&&t++,o.severity==="warn"&&r++}return{errors:t,warnings:r,ignored:n}}function CI(e,t){const{maxProblems:r=100,cwd:n="",format:o="codeframe",color:s=Ua.enabled,totals:a=Gh(e),version:c="2.0",command:i}=t;Ua.enabled=s;const l=e.length;e=e.filter(d=>!d.ignored);const u=l-e.length;if(e=e.sort((d,P)=>ba(d.severity)-ba(P.severity)).slice(0,r),!l&&o!=="json"&&o!=="junit")return;switch(o){case"json":_();break;case"codeframe":for(let d=0;d<e.length;d++){const P=e[d];i==="bundle"?Oe.info(`${w(P,d)}
|
|
124
|
+
`):Oe.output(`${w(P,d)}
|
|
125
|
+
`)}break;case"stylish":{const d=sc(e);for(const[P,{ruleIdPad:h,locationPad:g,fileProblems:E}]of Object.entries(d)){Oe.output(`${Re.blue(at(P)?P:We.relative(n,P))}:
|
|
126
|
+
`);for(let O=0;O<E.length;O++){const A=E[O];Oe.output(`${S(A,g,h)}
|
|
127
|
+
`)}Oe.output(`
|
|
128
|
+
`)}break}case"markdown":{const d=sc(e);for(const[P,{fileProblems:h}]of Object.entries(d)){Oe.output(`## Lint: ${at(P)?P:We.relative(n,P)}
|
|
129
|
+
|
|
130
|
+
`),Oe.output(`| Severity | Location | Problem | Message |
|
|
131
|
+
`),Oe.output(`|---|---|---|---|
|
|
132
|
+
`);for(let g=0;g<h.length;g++){const E=h[g];Oe.output(`${b(E)}
|
|
133
|
+
`)}Oe.output(`
|
|
134
|
+
`),a.errors>0?Oe.output(`Validation failed
|
|
135
|
+
Errors: ${a.errors}
|
|
136
|
+
`):Oe.output(`Validation successful
|
|
137
|
+
`),a.warnings>0&&Oe.output(`Warnings: ${a.warnings}
|
|
138
|
+
`),Oe.output(`
|
|
139
|
+
`)}break}case"checkstyle":{const d=sc(e);Oe.output(`<?xml version="1.0" encoding="UTF-8"?>
|
|
140
|
+
`),Oe.output(`<checkstyle version="4.3">
|
|
141
|
+
`);for(const[P,{fileProblems:h}]of Object.entries(d))Oe.output(`<file name="${Rt(at(P)?P:We.relative(n,P))}">
|
|
142
|
+
`),h.forEach($),Oe.output(`</file>
|
|
143
|
+
`);Oe.output(`</checkstyle>
|
|
144
|
+
`);break}case"junit":{const d=e.filter(g=>g.severity==="error").length,P=e.filter(g=>g.severity==="warn").length,h={};for(const g of e){const E=g.location[0].source.absoluteRef;h[E]||(h[E]=[]),h[E].push(g)}Oe.output(`<?xml version="1.0" encoding="UTF-8"?>
|
|
145
|
+
`),Oe.output(`<testsuites name="redocly lint" tests="${e.length}" errors="${d}" failures="${P}" skipped="0">
|
|
146
|
+
`);for(const[g,E]of Object.entries(h)){const O=at(g)?g:We.relative(n,g),A=E.filter(z=>z.severity==="error").length,q=E.filter(z=>z.severity==="warn").length;Oe.output(`<testsuite name="${Rt(O)}" tests="${E.length}" errors="${A}" failures="${q}">
|
|
147
|
+
`),E.forEach(z=>y(z,O)),Oe.output(`</testsuite>
|
|
148
|
+
`)}Oe.output(`</testsuites>
|
|
149
|
+
`);break}case"codeclimate":f();break;case"summary":RI(e);break;case"github-actions":qI(e,n)}l-u>r&&Oe.info(`< ... ${l-r} more problems hidden > ${Re.gray("increase with `--max-problems N`")}
|
|
150
|
+
`);function f(){const d=e.map(P=>{const h=P.location[0],g=ar(h);return{description:P.message,location:{path:at(h.source.absoluteRef)?h.source.absoluteRef:We.relative(n,h.source.absoluteRef),lines:{begin:g.start.line}},severity:jI[P.severity],fingerprint:`${P.ruleId}${P.location.length>0?"-"+P.location[0].pointer:""}`}});Oe.output(JSON.stringify(d,null,2))}function _(){const d={totals:a,version:c,problems:e.map(P=>{const h={...P,location:P.location.map(g=>({...g,source:{ref:at(g.source.absoluteRef)?g.source.absoluteRef:We.relative(n,g.source.absoluteRef)}})),from:P.from?{...P.from,source:{ref:at(P.from?.source.absoluteRef)?P.from?.source.absoluteRef:We.relative(n,P.from?.source.absoluteRef||n)}}:void 0};if(vc.FORMAT_JSON_WITH_CODEFRAMES){const g=P.location[0],E=ar(g);h.codeframe=nc(E,s)}return h})};Oe.output(JSON.stringify(d,null,2))}function m(d){const{severity:P}=d;if(!Uh[P])throw new Error(OI.INVALID_SEVERITY_LEVEL);return Uh[P]}function w(d,P){const h=m(d),g=d.location[0],E=at(g.source.absoluteRef)?g.source.absoluteRef:We.relative(n,g.source.absoluteRef),O=ar(g),A=g.pointer?Re.gray(`at ${g.pointer}`):"",q=`${E}:${O.start.line}:${O.start.col}`;return`[${P+1}] ${h(q)} ${A}
|
|
151
|
+
|
|
152
|
+
${d.message}
|
|
153
|
+
|
|
154
|
+
`+Kh(d)+nc(O,s)+`
|
|
155
|
+
|
|
156
|
+
`+DI(n,d.from)+`${Mr[d.severity]} was generated by the ${Re.blue(d.ruleId)} rule.
|
|
157
|
+
|
|
158
|
+
`+(d.reference?`Reference: ${Re.blue(d.reference)}
|
|
159
|
+
|
|
160
|
+
`:"")}function S(d,P,h){const g=Bh[d.severity];if(!Mr[d.severity])return"Error not found severity. Please check your config file. Allowed values: `warn,error,off`";const E=g(Mr[d.severity].toLowerCase().padEnd(7)),{start:O}=d.location[0];return` ${`${O.line}:${O.col}`.padEnd(P)} ${E} ${d.ruleId.padEnd(h)} ${d.message}`}function b(d){if(!Mr[d.severity])return"Error not found severity. Please check your config file. Allowed values: `warn,error,off`";const P=Mr[d.severity].toLowerCase(),{start:h}=d.location[0];return`| ${P} | line ${`${h.line}:${h.col}`} | [${d.ruleId}](https://redocly.com/docs/cli/rules/${d.ruleId}/) | ${d.message.replaceAll(`
|
|
161
|
+
`,"<br>")} |`}function $(d){const{line:P,col:h}=d.location[0].start,g=d.severity=="warn"?"warning":"error",E=Rt(d.message),O=Rt(d.ruleId);Oe.output(`<error line="${P}" column="${h}" severity="${g}" message="${E}" source="${O}" />
|
|
162
|
+
`)}function y(d,P){const h=d.location[0],{start:g}=ar(h),E=d.severity==="error"?"error":"failure",O=Rt(d.ruleId),A=Rt(d.message),q=[`Rule: ${O}`,`Severity: ${Rt(d.severity)}`,`File: ${Rt(P)}`,`Line: ${g.line}`,`Column: ${g.col}`];h.pointer&&q.push(`Pointer: ${Rt(h.pointer)}`),q.push(`Message: ${A}`),Oe.output(`<testcase classname="${O}" name="${O}" file="${Rt(P)}" line="${g.line}">
|
|
163
|
+
`),Oe.output(`<${E} message="${A}" type="${O}">${q.join(`
|
|
164
|
+
`)}</${E}>
|
|
165
|
+
`),Oe.output(`</testcase>
|
|
166
|
+
`)}}function RI(e){const t={};for(const n of e)t[n.ruleId]=t[n.ruleId]||{count:0,severity:n.severity},t[n.ruleId].count++;const r=Object.entries(t).sort(([,n],[,o])=>ba(n.severity)-ba(o.severity)||o.count-n.count);for(const[n,o]of r){const s=Bh[o.severity],a=s(Mr[o.severity].toLowerCase().padEnd(7));Oe.output(`${a} ${n}: ${o.count}
|
|
167
|
+
`)}Oe.output(`
|
|
168
|
+
`)}function DI(e,t){if(!t)return"";const r=We.relative(e,t.source.absoluteRef),n=ar(t),o=`${r}:${n.start.line}:${n.start.col}`,s=t.pointer?Re.gray(`at ${t.pointer}`):"";return`referenced from ${Re.blue(o)} ${s}
|
|
169
|
+
|
|
170
|
+
`}function Kh(e){return e.suggest.length===0?"":e.suggest.length===1?`Did you mean: ${e.suggest[0]} ?
|
|
171
|
+
|
|
172
|
+
`:`Did you mean:
|
|
173
|
+
- ${e.suggest.slice(0,AI).join(`
|
|
174
|
+
- `)}
|
|
175
|
+
|
|
176
|
+
`}const sc=e=>{const t={};for(const r of e){const n=r.location[0].source.absoluteRef;t[n]=t[n]||{fileProblems:[],ruleIdPad:0,locationPad:0};const o={...r,location:r.location.map(ar)};t[n].fileProblems.push(o),t[n].ruleIdPad=Math.max(r.ruleId.length,t[n].ruleIdPad),t[n].locationPad=Math.max(Math.max(...o.location.map(s=>`${s.start.line}:${s.start.col}`.length)),t[n].locationPad)}return t};function Rt(e){return e.replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu,t=>{switch(t){case"<":return"<";case">":return">";case"&":return"&";case'"':return""";case"'":return"'";default:return`&#${t.charCodeAt(0)};`}})}function qI(e,t){for(const a of e)for(const c of a.location.map(ar)){let i;switch(a.severity){case"error":i="error";break;case"warn":i="warning";break}const l=Kh(a),u=a.reference?`Reference: ${a.reference}
|
|
177
|
+
|
|
178
|
+
`:"",f=a.message+(l!==""||u!==""?`
|
|
179
|
+
|
|
180
|
+
`:"")+l+u,_={title:a.ruleId,file:at(c.source.absoluteRef)?c.source.absoluteRef:We.relative(t,c.source.absoluteRef),line:c.start.line,col:c.start.col,endLine:c.end?.line,endColumn:c.end?.col};Oe.output(`::${i} ${r(_)}::${o(f)}
|
|
181
|
+
`)}function r(a){return Object.entries(a).filter(([,c])=>c!=null).map(([c,i])=>`${c}=${s(i)}`).join(",")}function n(a){return a==null?"":typeof a=="string"||a instanceof String?a:JSON.stringify(a)}function o(a){return n(a).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function s(a){return n(a).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}const{theme:GI,...LI}=Vn.properties,MI={...Vn,properties:LI};async function VI(e){const{ref:t,externalRefResolver:r=new ir(e.config.resolve)}=e,n=await r.resolveDocument(null,t,!0);return e.collectSpecData?.(n),ac({document:n,...e,externalRefResolver:r})}async function FI(e){const{source:t,absoluteRef:r,externalRefResolver:n=new ir(e.config.resolve)}=e,o=Ea(t,r||"/");return ac({document:o,...e,externalRefResolver:n})}async function ac(e){const{document:t,customTypes:r,externalRefResolver:n,config:o}=e;if(hy(t.source.absoluteRef)){const{lintGraphqlDocument:m}=await import("./redocly-openapi-docs.min.lint-graphql-D-Nm5P1M.js");return m({document:t,config:o})}const s=Sn(t.parsed),a=o.getRulesForSpecVersion(yy(s)),c=$a(o.extendTypes(r??En(s),s),o),i={problems:[],specVersion:s,config:o,visitorsData:{}},l=bc(a,o,"preprocessors",s),u=bc(a,o,"rules",s);let f=await Tn({rootDocument:t,rootType:c.Root,externalRefResolver:n});l.length>0&&(In({document:t,rootType:c.Root,normalizedVisitors:zr(l,c),resolvedRefMap:f,ctx:i}),f=await Tn({rootDocument:t,rootType:c.Root,externalRefResolver:n}));const _=zr(u,c);return In({document:t,rootType:c.Root,normalizedVisitors:_,resolvedRefMap:f,ctx:i}),i.problems.map(m=>o.addProblemToIgnore(m))}async function zI(e){const{severity:t,externalRefResolver:r=new ir,config:n}=e;if(!n.document)throw new Error("Config document is not set.");const o={problems:[],specVersion:"config",config:n,visitorsData:{}},s=$a(e.externalConfigTypes||Fa(MI,n)),a=[{severity:t||"error",ruleId:"configuration struct",visitor:Gt()},{severity:t||"error",ruleId:"configuration no-unresolved-refs",visitor:Zt()}],c=zr(a,s),i=n.resolvedRefMap||await Tn({rootDocument:n.document,rootType:s.ConfigRoot,externalRefResolver:r});return In({document:n.document,rootType:s.ConfigRoot,normalizedVisitors:c,resolvedRefMap:i,ctx:o}),o.problems}export{rr as A,HS as B,Wv as C,Rt as D,Va as E,Qp as F,ge as G,ed as H,w_ as I,td as J,Be as K,be as L,St as M,W as N,gt as O,ve as P,g_ as Q,Hv as R,Gt as S,v_ as T,ss as U,ei as V,sd as W,mp as a,jS as b,tI as c,qS as d,LS as e,KS as f,up as g,Fa as h,eI as i,CI as j,zh as k,ac as l,nc as m,ar as n,BS as o,Gh as p,Ur as q,Pa as r,VI as s,He as t,zI as u,FI as v,ZS as w,sh as x,Oe as y,$y as z};
|