1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Jae(e,r),i=t||Object.keys(Lae({},r,{},e));return i.every(n)}function Jae(t,e){return function(r){if(typeof r=="string")return oo.is(e[r],t[r]);if(Array.isArray(r))return oo.is(vF(e,r),vF(t,r));throw new TypeError("Invalid key: expected Array or string: "+r)}}var Gae=(function(t){Fae(e,t);function e(){return Dae(this,e),Uae(this,$C(e).apply(this,arguments))}return qae(e,[{key:"shouldComponentUpdate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return!bF(this.updateOnProps,this.props,n,"updateOnProps")||!bF(this.updateOnStates,this.state,i,"updateOnStates")}}]),e})(Ya.Component),nd={},Wx,EF;function Kae(){if(EF)return Wx;EF=1;var t="Expected a function",e=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt,c=typeof ui=="object"&&ui&&ui.Object===Object&&ui,f=typeof self=="object"&&self&&self.Object===Object&&self,p=c||f||Function("return this")(),h=Object.prototype,v=h.toString,g=Math.max,E=Math.min,S=function(){return p.Date.now()};function _(O,N,M){var D,q,H,P,V,U,se=0,ue=!1,W=!1,te=!0;if(typeof O!="function")throw new TypeError(t);N=R(N)||0,A(M)&&(ue=!!M.leading,W="maxWait"in M,H=W?g(R(M.maxWait)||0,N):H,te="trailing"in M?!!M.trailing:te);function ne(X){var Ae=D,Te=q;return D=q=void 0,se=X,P=O.apply(Te,Ae),P}function ce(X){return se=X,V=setTimeout(re,N),ue?ne(X):P}function ge(X){var Ae=X-U,Te=X-se,tt=N-Ae;return W?E(tt,H-Te):tt}function G(X){var Ae=X-U,Te=X-se;return U===void 0||Ae>=N||Ae<0||W&&Te>=H}function re(){var X=S();if(G(X))return he(X);V=setTimeout(re,ge(X))}function he(X){return V=void 0,te&&D?ne(X):(D=q=void 0,P)}function pe(){V!==void 0&&clearTimeout(V),se=0,D=U=q=V=void 0}function le(){return V===void 0?P:he(S())}function Q(){var X=S(),Ae=G(X);if(D=arguments,q=this,U=X,Ae){if(V===void 0)return ce(U);if(W)return V=setTimeout(re,N),ne(U)}return V===void 0&&(V=setTimeout(re,N)),P}return Q.cancel=pe,Q.flush=le,Q}function A(O){var N=typeof O;return!!O&&(N=="object"||N=="function")}function w(O){return!!O&&typeof O=="object"}function C(O){return typeof O=="symbol"||w(O)&&v.call(O)==r}function R(O){if(typeof O=="number")return O;if(C(O))return e;if(A(O)){var N=typeof O.valueOf=="function"?O.valueOf():O;O=A(N)?N+"":N}if(typeof O!="string")return O===0?O:+O;O=O.replace(n,"");var M=a.test(O);return M||o.test(O)?u(O.slice(2),M?2:8):i.test(O)?e:+O}return Wx=_,Wx}var SF;function Wae(){if(SF)return nd;SF=1;function t(O){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},t(O)}Object.defineProperty(nd,"__esModule",{value:!0}),nd.DebounceInput=void 0;var e=i(Lc()),r=i(Kae()),n=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function i(O){return O&&O.__esModule?O:{default:O}}function a(O,N){if(O==null)return{};var M=o(O,N),D,q;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(O);for(q=0;q=0)&&Object.prototype.propertyIsEnumerable.call(O,D)&&(M[D]=O[D])}return M}function o(O,N){if(O==null)return{};var M={},D=Object.keys(O),q,H;for(H=0;H =0)&&(M[q]=O[q]);return M}function u(O,N){var M=Object.keys(O);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(O);N&&(D=D.filter(function(q){return Object.getOwnPropertyDescriptor(O,q).enumerable})),M.push.apply(M,D)}return M}function c(O){for(var N=1;N "u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function w(O){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)},w(O)}function C(O,N,M){return N in O?Object.defineProperty(O,N,{value:M,enumerable:!0,configurable:!0,writable:!0}):O[N]=M,O}var R=(function(O){v(M,O);var N=E(M);function M(D){var q;f(this,M),q=N.call(this,D),C(_(q),"onChange",function(P){P.persist();var V=q.state.value,U=q.props.minLength;q.setState({value:P.target.value},function(){var se=q.state.value;if(se.length>=U){q.notify(P);return}V.length>se.length&&q.notify(c(c({},P),{},{target:c(c({},P.target),{},{value:""})}))})}),C(_(q),"onKeyDown",function(P){P.key==="Enter"&&q.forceNotify(P);var V=q.props.onKeyDown;V&&(P.persist(),V(P))}),C(_(q),"onBlur",function(P){q.forceNotify(P);var V=q.props.onBlur;V&&(P.persist(),V(P))}),C(_(q),"createNotifier",function(P){if(P<0)q.notify=function(){return null};else if(P===0)q.notify=q.doNotify;else{var V=(0,r.default)(function(U){q.isDebouncing=!1,q.doNotify(U)},P);q.notify=function(U){q.isDebouncing=!0,V(U)},q.flush=function(){return V.flush()},q.cancel=function(){q.isDebouncing=!1,V.cancel()}}}),C(_(q),"doNotify",function(){var P=q.props.onChange;P.apply(void 0,arguments)}),C(_(q),"forceNotify",function(P){var V=q.props.debounceTimeout;if(!(!q.isDebouncing&&V>0)){q.cancel&&q.cancel();var U=q.state.value,se=q.props.minLength;U.length>=se?q.doNotify(P):q.doNotify(c(c({},P),{},{target:c(c({},P.target),{},{value:U})}))}}),q.isDebouncing=!1,q.state={value:typeof D.value>"u"||D.value===null?"":D.value};var H=q.props.debounceTimeout;return q.createNotifier(H),q}return h(M,[{key:"componentDidUpdate",value:function(q){if(!this.isDebouncing){var H=this.props,P=H.value,V=H.debounceTimeout,U=q.debounceTimeout,se=q.value,ue=this.state.value;typeof P<"u"&&se!==P&&ue!==P&&this.setState({value:P}),V!==U&&this.createNotifier(V)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var q=this.props,H=q.element;q.onChange,q.value,q.minLength,q.debounceTimeout;var P=q.forceNotifyByEnter,V=q.forceNotifyOnBlur,U=q.onKeyDown,se=q.onBlur,ue=q.inputRef,W=a(q,n),te=this.state.value,ne;P?ne={onKeyDown:this.onKeyDown}:U?ne={onKeyDown:U}:ne={};var ce;V?ce={onBlur:this.onBlur}:se?ce={onBlur:se}:ce={};var ge=ue?{ref:ue}:{};return e.default.createElement(H,c(c(c(c({},W),{},{onChange:this.onChange,value:te},ne),ce),ge))}}]),M})(e.default.PureComponent);return nd.DebounceInput=R,C(R,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}),nd}var Yx,_F;function Yae(){if(_F)return Yx;_F=1;var t=Wae(),e=t.DebounceInput;return e.DebounceInput=e,Yx=e,Yx}var Xae=Yae();const Zae=Ct(Xae);var Qae=Zy();const ese=Ct(Qae);var Pm={exports:{}},Xx={},Zx,wF;function ng(){return wF||(wF=1,Zx={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}),Zx}var no={},xF;function nV(){if(xF)return no;xF=1;const t=ng(),e=()=>[{type:t.RANGE,from:48,to:57}],r=()=>[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(e()),n=()=>[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}],i=()=>[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}];return no.words=()=>({type:t.SET,set:r(),not:!1}),no.notWords=()=>({type:t.SET,set:r(),not:!0}),no.ints=()=>({type:t.SET,set:e(),not:!1}),no.notInts=()=>({type:t.SET,set:e(),not:!0}),no.whitespace=()=>({type:t.SET,set:n(),not:!1}),no.notWhitespace=()=>({type:t.SET,set:n(),not:!0}),no.anyChar=()=>({type:t.SET,set:i(),not:!0}),no}var AF;function tse(){return AF||(AF=1,(function(t){const e=ng(),r=nV(),n="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",i={0:0,t:9,n:10,v:11,f:12,r:13};t.strToChars=function(a){var o=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return a=a.replace(o,function(u,c,f,p,h,v,g,E){if(f)return u;var S=c?8:p?parseInt(p,16):h?parseInt(h,16):v?parseInt(v,8):g?n.indexOf(g):i[E],_=String.fromCharCode(S);return/[[\]{}^$.|?*+()]/.test(_)&&(_="\\"+_),_}),a},t.tokenizeClass=(a,o)=>{for(var u=[],c=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,f,p;(f=c.exec(a))!=null;)if(f[1])u.push(r.words());else if(f[2])u.push(r.ints());else if(f[3])u.push(r.whitespace());else if(f[4])u.push(r.notWords());else if(f[5])u.push(r.notInts());else if(f[6])u.push(r.notWhitespace());else if(f[7])u.push({type:e.RANGE,from:(f[8]||f[9]).charCodeAt(0),to:f[10].charCodeAt(0)});else if(p=f[12])u.push({type:e.CHAR,value:p.charCodeAt(0)});else return[u,c.lastIndex];t.error(o,"Unterminated character class")},t.error=(a,o)=>{throw new SyntaxError("Invalid regular expression: /"+a+"/: "+o)}})(Xx)),Xx}var uc={},OF;function rse(){if(OF)return uc;OF=1;const t=ng();return uc.wordBoundary=()=>({type:t.POSITION,value:"b"}),uc.nonWordBoundary=()=>({type:t.POSITION,value:"B"}),uc.begin=()=>({type:t.POSITION,value:"^"}),uc.end=()=>({type:t.POSITION,value:"$"}),uc}var CF;function nse(){if(CF)return Pm.exports;CF=1;const t=tse(),e=ng(),r=nV(),n=rse();return Pm.exports=i=>{var a=0,o,u,c={type:e.ROOT,stack:[]},f=c,p=c.stack,h=[],v=O=>{t.error(i,`Nothing to repeat at column ${O-1}`)},g=t.strToChars(i);for(o=g.length;a n.high)}touches(n){return!(this.high+1 n.high)}add(n){return new t(Math.min(this.low,n.low),Math.max(this.high,n.high))}subtract(n){return n.low<=this.low&&n.high>=this.high?[]:n.low>this.low&&n.high n+i.length,0)}add(n,i){var a=o=>{for(var u=0;u {for(var u=0;u {for(var c=0;c {for(var a=i.low;a<=i.high;)n.push(a),a++;return n},[])}subranges(){return this.ranges.map(n=>({low:n.low,high:n.high,length:1+n.high-n.low}))}}return Qx=e,Qx}var eA,RF;function ase(){if(RF)return eA;RF=1;const t=nse(),e=ise(),r=t.types;return eA=class md{constructor(i,a){if(this._setDefaults(i),i instanceof RegExp)this.ignoreCase=i.ignoreCase,this.multiline=i.multiline,i=i.source;else if(typeof i=="string")this.ignoreCase=a&&a.indexOf("i")!==-1,this.multiline=a&&a.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=t(i)}_setDefaults(i){this.max=i.max!=null?i.max:md.prototype.max!=null?md.prototype.max:100,this.defaultRange=i.defaultRange?i.defaultRange:this.defaultRange.clone(),i.randInt&&(this.randInt=i.randInt)}gen(){return this._gen(this.tokens,[])}_gen(i,a){var o,u,c,f,p;switch(i.type){case r.ROOT:case r.GROUP:if(i.followedBy||i.notFollowedBy)return"";for(i.remember&&i.groupNumber===void 0&&(i.groupNumber=a.push(null)-1),o=i.options?this._randSelect(i.options):i.stack,u="",f=0,p=o.length;f =c||se<0||w&&ue>=v}function D(){var U=e();if(M(U))return q(U);E=setTimeout(D,N(U))}function q(U){return E=void 0,C&&p?R(U):(p=h=void 0,g)}function H(){E!==void 0&&clearTimeout(E),_=0,p=S=h=E=void 0}function P(){return E===void 0?g:q(e())}function V(){var U=e(),se=M(U);if(p=arguments,h=this,S=U,se){if(E===void 0)return O(S);if(w)return clearTimeout(E),E=setTimeout(D,c),R(S)}return E===void 0&&(E=setTimeout(D,c)),g}return V.cancel=H,V.flush=P,V}return iA=o,iA}var gse=yse();const vse=Ct(gse);var aA,kF;function bse(){if(kF)return aA;kF=1;var t=eg(),e=tp(),r=Xd(),n=Ri(),i=pu();function a(o,u,c,f){if(!n(o))return o;u=e(u,o);for(var p=-1,h=u.length,v=h-1,g=o;g!=null&&++p
2?Ie-2:1,k&&k<=Ie?Y:i(Y,Ie)):Y}},mixin:function(Re){return function(Le){var Ie=this;if(!se(Ie))return Re(Ie,Object(Le));var Y=[];return P(W(Le),function(k){se(Le[k])&&Y.push([k,Ie.prototype[k]])}),Re(Ie,Object(Le)),P(Y,function(k){var F=k[1];se(F)?Ie.prototype[k[0]]=F:delete Ie.prototype[k[0]]}),Ie}},nthArg:function(Re){return function(Le){var Ie=Le<0?1:ne(Le)+1;return H(Re(Le),Ie)}},rearg:function(Re){return function(Le,Ie){var Y=Ie?Ie.length:0;return H(Re(Le,Ie),Y)}},runInContext:function(Re){return function(Le){return f(p,Re(Le),g)}}};function re(Re,Le){if(_.cap){var Ie=t.iterateeRearg[Re];if(Ie)return tt(Le,Ie);var Y=!E&&t.iterateeAry[Re];if(Y)return Te(Le,Y)}return Le}function he(Re,Le,Ie){return w||_.curry&&Ie>1?H(Le,Ie):Le}function pe(Re,Le,Ie){if(_.fixed&&(C||!t.skipFixed[Re])){var Y=t.methodSpread[Re],k=Y&&Y.start;return k===void 0?M(Le,Ie):u(Le,k)}return Le}function le(Re,Le,Ie){return _.rearg&&Ie>1&&(R||!t.skipRearg[Re])?te(Le,t.methodRearg[Re]||t.aryRearg[Ie]):Le}function Q(Re,Le){Le=ce(Le);for(var Ie=-1,Y=Le.length,k=Y-1,F=q(Object(Re)),ee=F;ee!=null&&++Ie 1?"& ":"")+n[a],n=n.join(i>2?", ":" "),r.replace(t,`{ +/* [wrapped with `+n+`] */ +`)}return RA=e,RA}var jA,a8;function kse(){if(a8)return jA;a8=1;function t(e){return e!==e}return jA=t,jA}var NA,s8;function Dse(){if(s8)return NA;s8=1;function t(e,r,n){for(var i=n-1,a=e.length;++i-1}return IA=e,IA}var kA,u8;function Bse(){if(u8)return kA;u8=1;var t=jR(),e=qse(),r=1,n=2,i=8,a=16,o=32,u=64,c=128,f=256,p=512,h=[["ary",c],["bind",r],["bindKey",n],["curry",i],["curryRight",a],["flip",p],["partial",o],["partialRight",u],["rearg",f]];function v(g,E){return t(h,function(S){var _="_."+S[0];E&S[1]&&!e(g,_)&&g.push(_)}),g.sort()}return kA=v,kA}var DA,c8;function hV(){if(c8)return DA;c8=1;var t=Mse(),e=Ise(),r=SR(),n=Bse();function i(a,o,u){var c=o+"";return r(a,e(c,n(t(c),u)))}return DA=i,DA}var PA,f8;function mV(){if(f8)return PA;f8=1;var t=Nse(),e=pV(),r=hV(),n=4,i=8,a=32,o=64;function u(c,f,p,h,v,g,E,S,_,A){var w=f&i,C=w?E:void 0,R=w?void 0:E,O=w?g:void 0,N=w?void 0:g;f|=w?a:o,f&=~(w?o:a),f&n||(f&=-4);var M=[c,f,v,O,C,N,R,S,_,A],D=p.apply(void 0,M);return t(c)&&e(D,M),D.placeholder=h,r(D,c,f)}return PA=u,PA}var qA,d8;function yV(){if(d8)return qA;d8=1;function t(e){var r=e;return r.placeholder}return qA=t,qA}var BA,p8;function Lse(){if(p8)return BA;p8=1;var t=Kd(),e=Xd(),r=Math.min;function n(i,a){for(var o=i.length,u=r(a.length,o),c=t(i);u--;){var f=a[u];i[u]=e(f,o)?c[f]:void 0}return i}return BA=n,BA}var LA,h8;function WR(){if(h8)return LA;h8=1;var t="__lodash_placeholder__";function e(r,n){for(var i=-1,a=r.length,o=0,u=[];++i1&&ne.reverse(),H&&D =48&&n<=57){e++;continue}return!1}return!0}function Yl(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function bV(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function JC(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var e=0,r=t.length;e 0&&c[p-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&v===void 0&&(f[g]===void 0?v=c.slice(0,p).join("/"):p==h-1&&(v=e.path),v!==void 0&&E(e,0,t,v)),p++,Array.isArray(f)){if(g==="-")g=f.length;else{if(r&&!HC(g))throw new on("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,e,t);HC(g)&&(g=~~g)}if(p>=h){if(r&&e.op==="add"&&g>f.length)throw new on("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,e,t);var o=aoe[e.op].call(e,f,g,t);if(o.test===!1)throw new on("Test operation failed","TEST_OPERATION_FAILED",a,e,t);return o}}else if(p>=h){var o=Ec[e.op].call(e,f,g,t);if(o.test===!1)throw new on("Test operation failed","TEST_OPERATION_FAILED",a,e,t);return o}if(f=f[g],r&&p 0)throw new on('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,r);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new on("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new on("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&JC(t.value))throw new on("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,r);if(r){if(t.op=="add"){var i=t.path.split("/").length,a=n.split("/").length;if(i!==a+1&&i!==a)throw new on("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,r)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==n)throw new on("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,r)}else if(t.op==="move"||t.op==="copy"){var o={op:"_get",path:t.from,value:void 0},u=SV([o],r);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new on("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,r)}}}else throw new on("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,r)}function SV(t,e,r){try{if(!Array.isArray(t))throw new on("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)Qo(Qi(e),Qi(t),r||!0);else{r=r||Sy;for(var n=0;n 0&&(t.patches=[],t.callback&&t.callback(n)),n}function ZR(t,e,r,n,i){if(e!==t){typeof e.toJSON=="function"&&(e=e.toJSON());for(var a=VC(e),o=VC(t),u=!1,c=o.length-1;c>=0;c--){var f=o[c],p=t[f];if(zC(e,f)&&!(e[f]===void 0&&p!==void 0&&Array.isArray(e)===!1)){var h=e[f];typeof p=="object"&&p!=null&&typeof h=="object"&&h!=null&&Array.isArray(p)===Array.isArray(h)?ZR(p,h,r,n+"/"+Yl(f),i):p!==h&&(i&&r.push({op:"test",path:n+"/"+Yl(f),value:Qi(p)}),r.push({op:"replace",path:n+"/"+Yl(f),value:Qi(h)}))}else Array.isArray(t)===Array.isArray(e)?(i&&r.push({op:"test",path:n+"/"+Yl(f),value:Qi(p)}),r.push({op:"remove",path:n+"/"+Yl(f)}),u=!0):(i&&r.push({op:"test",path:n,value:t}),r.push({op:"replace",path:n,value:e}))}if(!(!u&&a.length==o.length))for(var c=0;c {if(a==="enum")return(o,u)=>Array.isArray(o)&&Array.isArray(u)?[...new Set([...o,...u])]:k8(o,u)}});t=Qo(t,[ry(e.path,i)]).newDocument}else if(e.op==="add"&&e.path===""&&ru(e.value)){const n=Object.keys(e.value).reduce((i,a)=>(i.push({op:"add",path:`/${D8(a)}`,value:e.value[a]}),i),[]);Qo(t,n)}else if(e.op==="replace"&&e.path===""){let{value:n}=e;r.allowMetaPatches&&e.meta&&_y(e)&&(Array.isArray(e.value)||ru(e.value))&&(n={...n,...e.meta}),t=n}else if(Qo(t,[e]),r.allowMetaPatches&&e.meta&&_y(e)&&(Array.isArray(e.value)||ru(e.value))){const i={...i2(t,e.path),...e.meta};Qo(t,[ry(e.path,i)])}return t}function D8(t){return Array.isArray(t)?t.length<1?"":`/${t.map(e=>(e+"").replace(/~/g,"~0").replace(/\//g,"~1")).join("/")}`:t}function Eoe(t,e){return{op:"add",path:t,value:e}}function ry(t,e,r){return{op:"replace",path:t,value:e,meta:r}}function Soe(t){return{op:"remove",path:t}}function _oe(t,e){return{type:"mutation",op:"merge",path:t,value:e}}function woe(t,e){return{type:"mutation",op:"mergeDeep",path:t,value:e}}function xoe(t,e){return{type:"context",path:t,value:e}}function Aoe(t,e){try{return _V(t,WC,e)}catch(r){return r}}function Ooe(t,e){try{return _V(t,KC,e)}catch(r){return r}}function _V(t,e,r){const n=t.filter(_y).map(o=>e(o.value,r,o.path))||[],i=fp(n);return xV(i)}function KC(t,e,r){return r=r||[],Array.isArray(t)?t.map((n,i)=>KC(n,e,r.concat(i))):ru(t)?Object.keys(t).map(n=>KC(t[n],e,r.concat(n))):e(t,r[r.length-1],r)}function WC(t,e,r){r=r||[];let n=[];if(r.length>0){const i=e(t,r[r.length-1],r);i&&(n=n.concat(i))}if(Array.isArray(t)){const i=t.map((a,o)=>WC(a,e,r.concat(o)));i&&(n=n.concat(i))}else if(ru(t)){const i=Object.keys(t).map(a=>WC(t[a],e,r.concat(a)));i&&(n=n.concat(i))}return n=fp(n),n}function Coe(t,e){if(!Array.isArray(e))return!1;for(let r=0,n=e.length;r typeof n<"u"&&r?r[n]:r,t)}function Roe(t){return xV(fp(wV(t)))}function wV(t){return Array.isArray(t)?t:[t]}function fp(t){return[].concat(...t.map(e=>Array.isArray(e)?fp(e):e))}function xV(t){return t.filter(e=>typeof e<"u")}function ru(t){return t&&typeof t=="object"}function joe(t){return ru(t)&&AV(t.then)}function AV(t){return t&&typeof t=="function"}function Noe(t){return t instanceof Error}function OV(t){if(ag(t)){const{op:e}=t;return e==="add"||e==="remove"||e==="replace"}return!1}function Moe(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"}function CV(t){return OV(t)||ag(t)&&t.type==="mutation"}function _y(t){return CV(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function Ioe(t){return ag(t)&&t.type==="context"}function ag(t){return t&&typeof t=="object"}function i2(t,e){try{return Md(t,e)}catch(r){return console.error(r),{}}}var P8={},q8={},B8={},a2,L8;function QR(){if(L8)return a2;L8=1;var t=Hz(),e=Jz(),r=t("keys");return a2=function(n){return r[n]||(r[n]=e(n))},a2}var s2,F8;function koe(){if(F8)return s2;F8=1;var t=Ra();return s2=!t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),s2}var o2,$8;function ej(){if($8)return o2;$8=1;var t=as(),e=ra(),r=zR(),n=QR(),i=koe(),a=n("IE_PROTO"),o=Object,u=o.prototype;return o2=i?o.getPrototypeOf:function(c){var f=r(c);if(t(f,a))return f[a];var p=f.constructor;return e(p)&&f instanceof p?p.prototype:f instanceof o?u:null},o2}var l2,U8;function Doe(){if(U8)return l2;U8=1;var t=Vi(),e=up();return l2=function(r,n,i){try{return t(e(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},l2}var u2,z8;function Poe(){if(z8)return u2;z8=1;var t=is();return u2=function(e){return t(e)||e===null},u2}var c2,V8;function qoe(){if(V8)return c2;V8=1;var t=Poe(),e=String,r=TypeError;return c2=function(n){if(t(n))return n;throw new r("Can't set "+e(n)+" as a prototype")},c2}var f2,H8;function sg(){if(H8)return f2;H8=1;var t=Doe(),e=is(),r=rg(),n=qoe();return f2=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,a={},o;try{o=t(Object.prototype,"__proto__","set"),o(a,[]),i=a instanceof Array}catch{}return function(c,f){return r(c),n(f),e(c)&&(i?o(c,f):c.__proto__=f),c}})():void 0),f2}var d2={},J8;function Boe(){if(J8)return d2;J8=1;var t=eV(),e=JR(),r=e.concat("length","prototype");return d2.f=Object.getOwnPropertyNames||function(i){return t(i,r)},d2}var p2,G8;function Loe(){if(G8)return p2;G8=1;var t=op(),e=Vi(),r=Boe(),n=rV(),i=hu(),a=e([].concat);return p2=t("Reflect","ownKeys")||function(u){var c=r.f(i(u)),f=n.f;return f?a(c,f(u)):c},p2}var h2,K8;function TV(){if(K8)return h2;K8=1;var t=as(),e=Loe(),r=Yz(),n=Hc();return h2=function(i,a,o){for(var u=e(a),c=n.f,f=r.f,p=0;p v;)r.f(u,g=p[v++],f[g]);return u},m2}var y2,Y8;function $oe(){if(Y8)return y2;Y8=1;var t=op();return y2=t("document","documentElement"),y2}var g2,X8;function tj(){if(X8)return g2;X8=1;var t=hu(),e=Foe(),r=JR(),n=HR(),i=$oe(),a=Kz(),o=QR(),u=">",c="<",f="prototype",p="script",h=o("IE_PROTO"),v=function(){},g=function(w){return c+p+u+w+c+"/"+p+u},E=function(w){w.write(g("")),w.close();var C=w.parentWindow.Object;return w=null,C},S=function(){var w=a("iframe"),C="java"+p+":",R;return w.style.display="none",i.appendChild(w),w.src=String(C),R=w.contentWindow.document,R.open(),R.write(g("document.F=Object")),R.close(),R.F},_,A=function(){try{_=new ActiveXObject("htmlfile")}catch{}A=typeof document<"u"?document.domain&&_?E(_):S():E(_);for(var w=r.length;w--;)delete A[f][r[w]];return A()};return n[h]=!0,g2=Object.create||function(C,R){var O;return C!==null?(v[f]=t(C),O=new v,v[f]=null,O[h]=C):O=A(),R===void 0?O:e.f(O,R)},g2}var v2,Z8;function RV(){if(Z8)return v2;Z8=1;var t=is(),e=bo();return v2=function(r,n){t(n)&&"cause"in n&&e(r,"cause",n.cause)},v2}var b2,Q8;function Uoe(){if(Q8)return b2;Q8=1;var t=Vi(),e=Error,r=t("".replace),n=(function(o){return String(new e(o).stack)})("zxcasd"),i=/\n\s*at [^:]*:[^\n]*/,a=i.test(n);return b2=function(o,u){if(a&&typeof o=="string"&&!e.prepareStackTrace)for(;u--;)o=r(o,i,"");return o},b2}var E2,e$;function zoe(){if(e$)return E2;e$=1;var t=Ra(),e=ip();return E2=!t(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",e(1,7)),r.stack!==7):!0}),E2}var S2,t$;function jV(){if(t$)return S2;t$=1;var t=bo(),e=Uoe(),r=zoe(),n=Error.captureStackTrace;return S2=function(i,a,o,u){r&&(n?n(i,a):t(i,"stack",e(o,u)))},S2}var _2,r$;function Gc(){return r$||(r$=1,_2={}),_2}var w2,n$;function Voe(){if(n$)return w2;n$=1;var t=vo(),e=Gc(),r=t("iterator"),n=Array.prototype;return w2=function(i){return i!==void 0&&(e.Array===i||n[r]===i)},w2}var x2,i$;function rj(){if(i$)return x2;i$=1;var t=vo(),e=t("toStringTag"),r={};return r[e]="z",x2=String(r)==="[object z]",x2}var A2,a$;function nj(){if(a$)return A2;a$=1;var t=rj(),e=ra(),r=LR(),n=vo(),i=n("toStringTag"),a=Object,o=r((function(){return arguments})())==="Arguments",u=function(c,f){try{return c[f]}catch{}};return A2=t?r:function(c){var f,p,h;return c===void 0?"Undefined":c===null?"Null":typeof(p=u(f=a(c),i))=="string"?p:o?r(f):(h=r(f))==="Object"&&e(f.callee)?"Arguments":h},A2}var O2,s$;function NV(){if(s$)return O2;s$=1;var t=nj(),e=UR(),r=FR(),n=Gc(),i=vo(),a=i("iterator");return O2=function(o){if(!r(o))return e(o,a)||e(o,"@@iterator")||n[t(o)]},O2}var C2,o$;function Hoe(){if(o$)return C2;o$=1;var t=ll(),e=up(),r=hu(),n=$R(),i=NV(),a=TypeError;return C2=function(o,u){var c=arguments.length<2?i(o):u;if(e(c))return r(t(c,o));throw new a(n(o)+" is not iterable")},C2}var T2,l$;function Joe(){if(l$)return T2;l$=1;var t=ll(),e=hu(),r=UR();return T2=function(n,i,a){var o,u;e(n);try{if(o=r(n,"return"),!o){if(i==="throw")throw a;return a}o=t(o,n)}catch(c){u=!0,o=c}if(i==="throw")throw a;if(u)throw o;return e(o),a},T2}var R2,u$;function Goe(){if(u$)return R2;u$=1;var t=Xz(),e=ll(),r=hu(),n=$R(),i=Voe(),a=Qz(),o=lp(),u=Hoe(),c=NV(),f=Joe(),p=TypeError,h=function(g,E){this.stopped=g,this.result=E},v=h.prototype;return R2=function(g,E,S){var _=S&&S.that,A=!!(S&&S.AS_ENTRIES),w=!!(S&&S.IS_RECORD),C=!!(S&&S.IS_ITERATOR),R=!!(S&&S.INTERRUPTED),O=t(E,_),N,M,D,q,H,P,V,U=function(ue){return N&&f(N,"normal"),new h(!0,ue)},se=function(ue){return A?(r(ue),R?O(ue[0],ue[1],U):O(ue[0],ue[1])):R?O(ue,U):O(ue)};if(w)N=g.iterator;else if(C)N=g;else{if(M=c(g),!M)throw new p(n(g)+" is not iterable");if(i(M)){for(D=0,q=a(g);q>D;D++)if(H=se(g[D]),H&&o(v,H))return H;return new h(!1)}N=u(g,M)}for(P=w?g.next:N.next;!(V=e(P,N)).done;){try{H=se(V.value)}catch(ue){f(N,"throw",ue)}if(typeof H=="object"&&H&&o(v,H))return H}return new h(!1)},R2}var j2,c$;function ij(){if(c$)return j2;c$=1;var t=nj(),e=String;return j2=function(r){if(t(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},j2}var N2,f$;function MV(){if(f$)return N2;f$=1;var t=ij();return N2=function(e,r){return e===void 0?arguments.length<2?"":r:t(e)},N2}var d$;function Koe(){if(d$)return B8;d$=1;var t=Jc(),e=lp(),r=ej(),n=sg(),i=TV(),a=tj(),o=bo(),u=ip(),c=RV(),f=jV(),p=Goe(),h=MV(),v=vo(),g=v("toStringTag"),E=Error,S=[].push,_=function(C,R){var O=e(A,this),N;n?N=n(new E,O?r(this):A):(N=O?this:a(A),o(N,g,"Error")),R!==void 0&&o(N,"message",h(R)),f(N,_,N.stack,1),arguments.length>2&&c(N,arguments[2]);var M=[];return p(C,S,{that:M}),o(N,"errors",M),N};n?n(_,E):i(_,E,{name:!0});var A=_.prototype=a(E.prototype,{constructor:u(1,_),message:u(1,""),name:u(1,"AggregateError")});return t({global:!0,constructor:!0,arity:2},{AggregateError:_}),B8}var p$;function IV(){return p$||(p$=1,Koe()),q8}var h$;function kV(){return h$||(h$=1,IV()),P8}var m$={},M2,y$;function Woe(){if(y$)return M2;y$=1;var t=Hc().f;return M2=function(e,r,n){n in e||t(e,n,{configurable:!0,get:function(){return r[n]},set:function(i){r[n]=i}})},M2}var I2,g$;function Yoe(){if(g$)return I2;g$=1;var t=ra(),e=is(),r=sg();return I2=function(n,i,a){var o,u;return r&&t(o=i.constructor)&&o!==a&&e(u=o.prototype)&&u!==a.prototype&&r(n,u),n},I2}var k2,v$;function DV(){if(v$)return k2;v$=1;var t=op(),e=as(),r=bo(),n=lp(),i=sg(),a=TV(),o=Woe(),u=Yoe(),c=MV(),f=RV(),p=jV(),h=Ts(),v=cp();return k2=function(g,E,S,_){var A="stackTraceLimit",w=_?2:1,C=g.split("."),R=C[C.length-1],O=t.apply(null,C);if(O){var N=O.prototype;if(!v&&e(N,"cause")&&delete N.cause,!S)return O;var M=t("Error"),D=E(function(q,H){var P=c(_?H:q,void 0),V=_?new O(q):new O;return P!==void 0&&r(V,"message",P),p(V,D,V.stack,2),this&&n(N,this)&&u(V,this,D),arguments.length>w&&f(V,arguments[w]),V});if(D.prototype=N,R!=="Error"?i?i(D,M):a(D,M,{name:!0}):h&&A in O&&(o(D,O,A),o(D,O,"prepareStackTrace")),a(D,O),!v)try{N.name!==R&&r(N,"name",R),N.constructor=D}catch{}return D}},k2}var b$;function Xoe(){if(b$)return m$;b$=1;var t=Jc(),e=zi(),r=BR(),n=DV(),i="WebAssembly",a=e[i],o=new Error("e",{cause:7}).cause!==7,u=function(f,p){var h={};h[f]=n(f,p,o),t({global:!0,constructor:!0,arity:1,forced:o},h)},c=function(f,p){if(a&&a[f]){var h={};h[f]=n(i+"."+f,p,o),t({target:i,stat:!0,constructor:!0,arity:1,forced:o},h)}};return u("Error",function(f){return function(h){return r(f,this,arguments)}}),u("EvalError",function(f){return function(h){return r(f,this,arguments)}}),u("RangeError",function(f){return function(h){return r(f,this,arguments)}}),u("ReferenceError",function(f){return function(h){return r(f,this,arguments)}}),u("SyntaxError",function(f){return function(h){return r(f,this,arguments)}}),u("TypeError",function(f){return function(h){return r(f,this,arguments)}}),u("URIError",function(f){return function(h){return r(f,this,arguments)}}),c("CompileError",function(f){return function(h){return r(f,this,arguments)}}),c("LinkError",function(f){return function(h){return r(f,this,arguments)}}),c("RuntimeError",function(f){return function(h){return r(f,this,arguments)}}),m$}var E$={},S$;function Zoe(){if(S$)return E$;S$=1;var t=Jc(),e=op(),r=BR(),n=Ra(),i=DV(),a="AggregateError",o=e(a),u=!n(function(){return o([1]).errors[0]!==1})&&n(function(){return o([1],a,{cause:7}).cause!==7});return t({global:!0,constructor:!0,arity:2,forced:u},{AggregateError:i(a,function(c){return function(p,h){return r(c,this,arguments)}},u,!0)}),E$}var D2,_$;function Qoe(){return _$||(_$=1,D2=function(){}),D2}var P2,w$;function ele(){if(w$)return P2;w$=1;var t=zi(),e=ra(),r=t.WeakMap;return P2=e(r)&&/native code/.test(String(r)),P2}var q2,x$;function PV(){if(x$)return q2;x$=1;var t=ele(),e=zi(),r=is(),n=bo(),i=as(),a=Vz(),o=QR(),u=HR(),c="Object already initialized",f=e.TypeError,p=e.WeakMap,h,v,g,E=function(w){return g(w)?v(w):h(w,{})},S=function(w){return function(C){var R;if(!r(C)||(R=v(C)).type!==w)throw new f("Incompatible receiver, "+w+" required");return R}};if(t||a.state){var _=a.state||(a.state=new p);_.get=_.get,_.has=_.has,_.set=_.set,h=function(w,C){if(_.has(w))throw new f(c);return C.facade=w,_.set(w,C),C},v=function(w){return _.get(w)||{}},g=function(w){return _.has(w)}}else{var A=o("state");u[A]=!0,h=function(w,C){if(i(w,A))throw new f(c);return C.facade=w,n(w,A,C),C},v=function(w){return i(w,A)?w[A]:{}},g=function(w){return i(w,A)}}return q2={set:h,get:v,has:g,enforce:E,getterFor:S},q2}var B2,A$;function tle(){if(A$)return B2;A$=1;var t=Ts(),e=as(),r=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,i=e(r,"name"),a=i&&(function(){}).name==="something",o=i&&(!t||t&&n(r,"name").configurable);return B2={EXISTS:i,PROPER:a,CONFIGURABLE:o},B2}var L2,O$;function qV(){if(O$)return L2;O$=1;var t=bo();return L2=function(e,r,n,i){return i&&i.enumerable?e[r]=n:t(e,r,n),e},L2}var F2,C$;function BV(){if(C$)return F2;C$=1;var t=Ra(),e=ra(),r=is(),n=tj(),i=ej(),a=qV(),o=vo(),u=cp(),c=o("iterator"),f=!1,p,h,v;[].keys&&(v=[].keys(),"next"in v?(h=i(i(v)),h!==Object.prototype&&(p=h)):f=!0);var g=!r(p)||t(function(){var E={};return p[c].call(E)!==E});return g?p={}:u&&(p=n(p)),e(p[c])||a(p,c,function(){return this}),F2={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:f},F2}var $2,T$;function rle(){if(T$)return $2;T$=1;var t=rj(),e=nj();return $2=t?{}.toString:function(){return"[object "+e(this)+"]"},$2}var U2,R$;function aj(){if(R$)return U2;R$=1;var t=rj(),e=Hc().f,r=bo(),n=as(),i=rle(),a=vo(),o=a("toStringTag");return U2=function(u,c,f,p){var h=f?u:u&&u.prototype;h&&(n(h,o)||e(h,o,{configurable:!0,value:c}),p&&!t&&r(h,"toString",i))},U2}var z2,j$;function nle(){if(j$)return z2;j$=1;var t=BV().IteratorPrototype,e=tj(),r=ip(),n=aj(),i=Gc(),a=function(){return this};return z2=function(o,u,c,f){var p=u+" Iterator";return o.prototype=e(t,{next:r(+!f,c)}),n(o,p,!1,!0),i[p]=a,o},z2}var V2,N$;function LV(){if(N$)return V2;N$=1;var t=Jc(),e=ll(),r=cp(),n=tle(),i=ra(),a=nle(),o=ej(),u=sg(),c=aj(),f=bo(),p=qV(),h=vo(),v=Gc(),g=BV(),E=n.PROPER,S=n.CONFIGURABLE,_=g.IteratorPrototype,A=g.BUGGY_SAFARI_ITERATORS,w=h("iterator"),C="keys",R="values",O="entries",N=function(){return this};return V2=function(M,D,q,H,P,V,U){a(q,D,H);var se=function(pe){if(pe===P&&ce)return ce;if(!A&&pe&&pe in te)return te[pe];switch(pe){case C:return function(){return new q(this,pe)};case R:return function(){return new q(this,pe)};case O:return function(){return new q(this,pe)}}return function(){return new q(this)}},ue=D+" Iterator",W=!1,te=M.prototype,ne=te[w]||te["@@iterator"]||P&&te[P],ce=!A&&ne||se(P),ge=D==="Array"&&te.entries||ne,G,re,he;if(ge&&(G=o(ge.call(new M)),G!==Object.prototype&&G.next&&(!r&&o(G)!==_&&(u?u(G,_):i(G[w])||p(G,w,N)),c(G,ue,!0,!0),r&&(v[ue]=N))),E&&P===R&&ne&&ne.name!==R&&(!r&&S?f(te,"name",R):(W=!0,ce=function(){return e(ne,this)})),P)if(re={values:se(R),keys:V?ce:se(C),entries:se(O)},U)for(he in re)(A||W||!(he in te))&&p(te,he,re[he]);else t({target:D,proto:!0,forced:A||W},re);return(!r||U)&&te[w]!==ce&&p(te,w,ce,{name:P}),v[D]=ce,re},V2}var H2,M$;function FV(){return M$||(M$=1,H2=function(t,e){return{value:t,done:e}}),H2}var J2,I$;function $V(){if(I$)return J2;I$=1;var t=ap(),e=Qoe(),r=Gc(),n=PV(),i=Hc().f,a=LV(),o=FV(),u=cp(),c=Ts(),f="Array Iterator",p=n.set,h=n.getterFor(f);J2=a(Array,"Array",function(g,E){p(this,{type:f,target:t(g),index:0,kind:E})},function(){var g=h(this),E=g.target,S=g.index++;if(!E||S>=E.length)return g.target=null,o(void 0,!0);switch(g.kind){case"keys":return o(S,!1);case"values":return o(E[S],!1)}return o([S,E[S]],!1)},"values");var v=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!u&&c&&v.name!=="values")try{i(v,"name",{value:"values"})}catch{}return J2}var k$={},G2,D$;function ile(){if(D$)return G2;D$=1;var t=Vi(),e=VR(),r=ij(),n=rg(),i=t("".charAt),a=t("".charCodeAt),o=t("".slice),u=function(c){return function(f,p){var h=r(n(f)),v=e(p),g=h.length,E,S;return v<0||v>=g?c?"":void 0:(E=a(h,v),E<55296||E>56319||v+1===g||(S=a(h,v+1))<56320||S>57343?c?i(h,v):E:c?o(h,v,v+2):(E-55296<<10)+(S-56320)+65536)}};return G2={codeAt:u(!1),charAt:u(!0)},G2}var P$;function ale(){if(P$)return k$;P$=1;var t=ile().charAt,e=ij(),r=PV(),n=LV(),i=FV(),a="String Iterator",o=r.set,u=r.getterFor(a);return n(String,"String",function(c){o(this,{type:a,string:e(c),index:0})},function(){var f=u(this),p=f.string,h=f.index,v;return h>=p.length?i(void 0,!0):(v=t(p,h),f.index+=v.length,i(v,!1))}),k$}var K2,q$;function sle(){if(q$)return K2;q$=1,Xoe(),IV(),Zoe(),$V(),ale();var t=sp();return K2=t.AggregateError,K2}var B$={},W2,L$;function ole(){return L$||(L$=1,W2={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),W2}var F$;function lle(){if(F$)return B$;F$=1,$V();var t=ole(),e=zi(),r=aj(),n=Gc();for(var i in t)r(e[i],i),n[i]=n.Array;return B$}var Y2,$$;function ule(){if($$)return Y2;$$=1,kV();var t=sle();return lle(),Y2=t,Y2}var X2,U$;function cle(){if(U$)return X2;U$=1;var t=ule();return X2=t,X2}var Z2,z$;function fle(){if(z$)return Z2;z$=1,kV();var t=cle();return Z2=t,Z2}var Q2,V$;function dle(){return V$||(V$=1,Q2=fle()),Q2}var eO,H$;function ple(){return H$||(H$=1,eO=dle()),eO}var hle=ple();const mle=Ct(hle);class yle extends mle{constructor(e,r,n){if(super(e,r,n),this.name=this.constructor.name,typeof r=="string"&&(this.message=r),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(r).stack,n!=null&&typeof n=="object"&&Object.hasOwn(n,"cause")&&!("cause"in this)){const{cause:i}=n;this.cause=i,i instanceof Error&&"stack"in i&&(this.stack=`${this.stack} +CAUSE: ${i.stack}`)}}}class tn extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(yle,e)}constructor(e,r){if(super(e,r),this.name=this.constructor.name,typeof e=="string"&&(this.message=e),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,r!=null&&typeof r=="object"&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:n}=r;this.cause=n,n instanceof Error&&"stack"in n&&(this.stack=`${this.stack} +CAUSE: ${n.stack}`)}}}class xs extends tn{constructor(e,r){if(super(e,r),r!=null&&typeof r=="object"){const{cause:n,...i}=r;Object.assign(this,i)}}}class er extends tn{}class tO extends er{}var sj=function(){return!1},Eo=function(){return!0};function Wr(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Cr(t){return function e(r){return arguments.length===0||Wr(r)?e:t.apply(this,arguments)}}function zt(t){return function e(r,n){switch(arguments.length){case 0:return e;case 1:return Wr(r)?e:Cr(function(i){return t(r,i)});default:return Wr(r)&&Wr(n)?e:Wr(r)?Cr(function(i){return t(i,n)}):Wr(n)?Cr(function(i){return t(r,i)}):t(r,n)}}}function gle(t,e){t=t||[],e=e||[];var r,n=t.length,i=e.length,a=[];for(r=0;r =arguments.length)?c=e[o]:(c=arguments[i],i+=1),n[o]=c,Wr(c)?u=!0:a-=1,o+=1}return!u&&a<=0?r.apply(this,n):og(Math.max(0,a),oj(t,n,r))}}var wn=zt(function(e,r){return e===1?Cr(r):og(e,oj(e,[],r))});function fi(t){return function e(r,n,i){switch(arguments.length){case 0:return e;case 1:return Wr(r)?e:zt(function(a,o){return t(r,a,o)});case 2:return Wr(r)&&Wr(n)?e:Wr(r)?zt(function(a,o){return t(a,n,o)}):Wr(n)?zt(function(a,o){return t(r,a,o)}):Cr(function(a){return t(r,n,a)});default:return Wr(r)&&Wr(n)&&Wr(i)?e:Wr(r)&&Wr(n)?zt(function(a,o){return t(a,o,i)}):Wr(r)&&Wr(i)?zt(function(a,o){return t(a,n,o)}):Wr(n)&&Wr(i)?zt(function(a,o){return t(r,a,o)}):Wr(r)?Cr(function(a){return t(a,n,i)}):Wr(n)?Cr(function(a){return t(r,a,i)}):Wr(i)?Cr(function(a){return t(r,n,a)}):t(r,n,i)}}}const mu=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function vle(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function ul(t,e,r){return function(){if(arguments.length===0)return r();var n=arguments[arguments.length-1];if(!mu(n)){for(var i=0;i =0;)r=K$[n],xa(r,e)&&!xle(i,r)&&(i[i.length]=r),n-=1;return i}),es=Cr(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Y$(t,e,r,n){var i=J$(t),a=J$(e);function o(u,c){return uj(u,c,r.slice(),n.slice())}return!wy(function(u,c){return!wy(o,c,u)},a,i)}function uj(t,e,r,n){if(_d(t,e))return!0;var i=es(t);if(i!==es(e))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof e.equals=="function")return typeof t.equals=="function"&&t.equals(e)&&typeof e.equals=="function"&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&Sle(t.constructor)==="Promise")return t===e;break;case"Boolean":case"Number":case"String":if(!(typeof t==typeof e&&_d(t.valueOf(),e.valueOf())))return!1;break;case"Date":if(!_d(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(!(t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.sticky===e.sticky&&t.unicode===e.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===t)return n[a]===e;a-=1}switch(i){case"Map":return t.size!==e.size?!1:Y$(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size!==e.size?!1:Y$(t.values(),e.values(),r.concat([t]),n.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=su(t);if(o.length!==su(e).length)return!1;var u=r.concat([t]),c=n.concat([e]);for(a=o.length-1;a>=0;){var f=o[a];if(!(xa(f,e)&&uj(e[f],t[f],u,c)))return!1;a-=1}return!0}var cl=zt(function(e,r){return uj(e,r,[],[])});function Ale(t,e,r){var n,i;if(typeof t.indexOf=="function")switch(typeof e){case"number":if(e===0){for(n=1/e;r =0}function ny(t,e){for(var r=0,n=e.length,i=Array(n);r ":VV(o,u)},n=function(a,o){return ny(function(u){return rO(u)+": "+r(a[u])},o.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+ny(r,t).join(", ")+"))";case"[object Array]":return"["+ny(r,t).concat(n(t,Nle(function(a){return/^\d+$/.test(a)},su(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):rO(Ole(t)))+")";case"[object Map]":return"new Map("+r(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+r(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+r(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+r(t.valueOf())+")":rO(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var i=t.toString();if(i!=="[object Object]")return i}return"{"+n(t,su(t)).join(", ")+"}"}}var Rc=Cr(function(e){return VV(e,[])}),HV=zt(function(e,r){if(e===r)return r;function n(c,f){if(c>f!=f>c)return f>c?f:c}var i=n(e,r);if(i!==void 0)return i;var a=n(typeof e,typeof r);if(a!==void 0)return a===typeof e?e:r;var o=Rc(e),u=n(o,Rc(r));return u!==void 0&&u===o?e:r}),Mle=(function(){function t(e,r){this.xf=r,this.f=e}return t.prototype["@@transducer/init"]=ta.init,t.prototype["@@transducer/result"]=ta.result,t.prototype["@@transducer/step"]=function(e,r){return this.xf["@@transducer/step"](e,this.f(r))},t})(),Ile=function(e){return function(r){return new Mle(e,r)}},ug=zt(ul(["fantasy-land/map","map"],Ile,function(e,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return wn(r.length,function(){return e.call(this,r.apply(this,arguments))});case"[object Object]":return dp(function(n,i){return n[i]=e(r[i]),n},{},su(r));default:return ny(e,r)}}));const Kc=Number.isInteger||function(e){return e<<0===e};function cj(t){return Object.prototype.toString.call(t)==="[object String]"}function cg(t,e){var r=t<0?e.length+t:t;return cj(e)?e.charAt(r):e[r]}var pp=zt(function(e,r){if(r!=null)return Kc(e)?cg(e,r):r[e]}),JV=zt(function(e,r){return ug(pp(e),r)}),kle=Cr(function(e){return mu(e)?!0:!e||typeof e!="object"||cj(e)?!1:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),X$=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function GV(t,e,r){return function(i,a,o){if(kle(o))return t(i,a,o);if(o==null)return a;if(typeof o["fantasy-land/reduce"]=="function")return e(i,a,o,"fantasy-land/reduce");if(o[X$]!=null)return r(i,a,o[X$]());if(typeof o.next=="function")return r(i,a,o);if(typeof o.reduce=="function")return e(i,a,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Dle(t,e,r){for(var n=0,i=r.length;n1){var a=!Oy(n)&&xa(i,n)&&typeof n[i]=="object"?n[i]:Kc(e[1])?[]:{};r=t(Array.prototype.slice.call(e,1),r,a)}return Gle(i,r,n)}),Kle=fi(function(e,r,n){return at([e],r,n)});function pj(t){var e=Object.prototype.toString.call(t);return e==="[object Function]"||e==="[object AsyncFunction]"||e==="[object GeneratorFunction]"||e==="[object AsyncGeneratorFunction]"}var Wle=zt(function(e,r){var n=wn(e,r);return wn(e,function(){return dp(Hle,ug(n,arguments[0]),Array.prototype.slice.call(arguments,1))})}),hj=Cr(function(e){return Wle(e.length,e)}),hp=zt(function(e,r){return pj(e)?function(){return e.apply(this,arguments)&&r.apply(this,arguments)}:hj(Fle)(e,r)});function YV(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}function XV(t,e,r){if(r||(r=new Xle),Yle(t))return t;var n=function(a){var o=r.get(t);if(o)return o;r.set(t,a);for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(a[u]=t[u]);return a};switch(es(t)){case"Object":return n(Object.create(Object.getPrototypeOf(t)));case"Array":return n(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return YV(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}function Yle(t){var e=typeof t;return t==null||e!="object"&&e!="function"}var Xle=(function(){function t(){this.map={},this.length=0}return t.prototype.set=function(e,r){var n=this.hash(e),i=this.map[n];i||(this.map[n]=i=[]),i.push([e,r]),this.length+=1},t.prototype.hash=function(e){var r=[];for(var n in e)r.push(Object.prototype.toString.call(e[n]));return r.join()},t.prototype.get=function(e){if(this.length<=180){for(var r in this.map)for(var o=this.map[r],n=0;n =0&&this.i>=this.n?lg(n):n},t})();function pue(t){return function(e){return new due(t,e)}}var hue=zt(ul(["take"],pue,function(e,r){return yp(0,e<0?1/0:e,r)}));function mue(t,e){for(var r=e.length-1;r>=0&&t(e[r]);)r-=1;return yp(0,r+1,e)}var yue=(function(){function t(e,r){this.f=e,this.retained=[],this.xf=r}return t.prototype["@@transducer/init"]=ta.init,t.prototype["@@transducer/result"]=function(e){return this.retained=null,this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,r){return this.f(r)?this.retain(e,r):this.flush(e,r)},t.prototype.flush=function(e,r){return e=fj(this.xf,e,this.retained),this.retained=[],this.xf["@@transducer/step"](e,r)},t.prototype.retain=function(e,r){return this.retained.push(r),e},t})();function gue(t){return function(e){return new yue(t,e)}}var vue=zt(ul([],gue,mue)),fg=Cr(function(t){return cg(-1,t)}),bue=(function(){function t(e,r){this.xf=r,this.f=e}return t.prototype["@@transducer/init"]=ta.init,t.prototype["@@transducer/result"]=ta.result,t.prototype["@@transducer/step"]=function(e,r){if(this.f){if(this.f(r))return e;this.f=null}return this.xf["@@transducer/step"](e,r)},t})();function Eue(t){return function(e){return new bue(t,e)}}var Sue=zt(ul(["dropWhile"],Eue,function(e,r){for(var n=0,i=r.length;nt.length)&&(e=t.length);for(var r=0,n=Array(e);r e.length}),pce=ti(Fue(dce),rue,pp("length")),hce=dj(function(t,e,r){var n=r.apply(void 0,oce(t));return Gue(n)?Lue(n):e}),mce=function(e){var r=pce(e);return wn(r,function(){for(var n=arguments.length,i=new Array(n),a=0;a 1)for(var A=1;A pg(zue(/^win/),["platform"],Ty),Ej=t=>{try{const e=new URL(t);return wce(":",e.protocol)}catch{return}};ti(Ej,lH);const Oce=t=>{const e=t.lastIndexOf(".");return e>=0?t.substring(e).toLowerCase():""},mH=t=>{if(Ty.browser)return!1;const e=Ej(t);return dl(e)||e==="file"||/^[a-zA-Z]$/.test(e)},Sj=t=>{const e=Ej(t);return e==="http"||e==="https"},yH=(t,e)=>{const r=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],n=Cy(!1,"keepFileProtocol",e),i=Cy(bj,"isWindows",e);let a=decodeURI(t);for(let u=0;u {const e=[/\?/g,"%3F",/#/g,"%23"];let r=t;bj()&&(r=r.replace(/\\/g,"/")),r=encodeURI(r);for(let n=0;n {const e=t.indexOf("#");return e!==-1?t.substring(e):"#"},Pr=t=>{const e=t.indexOf("#");let r=t;return e>=0&&(r=t.substring(0,e)),r},ZC=()=>{if(Ty.browser)return Pr(globalThis.location.href);const t=Ty.cwd(),e=fg(t);return["/","\\"].includes(e)?t:t+(bj()?"\\":"/")},Xn=(t,e)=>{const r=new URL(e,new URL(t,"resolve://"));if(r.protocol==="resolve:"){const{pathname:n,search:i,hash:a}=r;return n+i+a}return r.toString()},gg=t=>{if(mH(t))return Cce(yH(t));try{return new URL(t).toString()}catch{return encodeURI(decodeURI(t)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},bs=t=>mH(t)?yH(t):decodeURI(t);let Nc=class{uri;mediaType;data;parseResult;constructor({uri:e,mediaType:r="text/plain",data:n,parseResult:i}){this.uri=e,this.mediaType=r,this.data=n,this.parseResult=i}get extension(){return gu(this.uri)?Oce(this.uri):""}toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(es(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}};class Mc{rootRef;refs;circular;constructor({refs:e=[],circular:r=!1}={}){this.refs=[],this.circular=r,e.forEach(this.add.bind(this))}get size(){return this.refs.length}add(e){return this.has(e)||(this.refs.push(e),this.rootRef=this.rootRef===void 0?e:this.rootRef,e.refSet=this),this}merge(e){for(const r of e.values())this.add(r);return this}has(e){const r=gu(e)?e:e.uri;return lH(this.find(n=>n.uri===r))}find(e){return this.refs.find(e)}*values(){yield*this.refs}clean(){this.refs.forEach(e=>{e.refSet=void 0}),this.rootRef=void 0,this.refs.length=0}}const vH={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:ZV,immutable:!0,dereferenceOpts:{}},bundle:{strategies:[],refSet:null,maxDepth:1/0}},Tce=Nue(qn(["resolve","baseURI"]),at(["resolve","baseURI"])),Rce=t=>Zue(t)?ZC():t,bH=(t,e)=>{const r=dg(t,e);return Pue(Tce,Rce,r)};class jce extends tn{plugin;constructor(e,r){super(e,{cause:r.cause}),this.plugin=r.plugin}}const _j=async(t,e,r)=>{const n=await Promise.all(r.map(kd([t],e)));return r.filter((i,a)=>n[a])},wj=async(t,e,r)=>{let n;for(const i of r)try{const a=await i[t].call(i,...e);return{plugin:i,result:a}}catch(a){n=new jce("Error while running plugin",{cause:a,plugin:i})}return Promise.reject(n)};class QC extends tn{}class Ry extends tn{}class EH extends Ry{}class SH extends EH{}const _H="apidom-file-cache",Nce=async({cacheKey:t,cacheTTL:e})=>{if(e===0)return{cachedResult:null,cachedError:null};try{const r=await caches.open(_H),n=await r.match(t);if(n){const{cachedResult:i,cachedError:a,timestamp:o}=await n.json();if(Date.now()-o {if(n!==0)try{const i={cachedResult:e,cachedError:r,timestamp:Date.now()},a=await caches.open(_H),o=new Response(JSON.stringify(i),{headers:{"Content-Type":"application/json"}});await a.put(t,o)}catch{console.error("CacheStorage is not available")}},Mce=async(t,e)=>{const{cacheTTL:r=0}=e.resolve.resolverOpts,n=`read_${t.uri}`,{cachedResult:i,cachedError:a}=await Nce({cacheKey:n,cacheTTL:r});if(i!==null)return i;if(a!==null)throw new Ry(`Error while reading file "${t.uri}"`,{cause:a});const o=e.resolve.resolvers.map(h=>{const v=Object.create(h);return Object.assign(v,e.resolve.resolverOpts)}),u=await _j("canRead",[t,e],o);if(gp(u))throw new SH(t.uri);try{const{result:h}=await wj("read",[t],u),v=new Nc({...t,data:h}).toString();return await rU({cacheKey:n,result:v,error:null,cacheTTL:r}),h}catch(h){var c,f,p;throw await rU({cacheKey:n,result:null,error:(c=(f=h==null||(p=h.cause)===null||p===void 0?void 0:p.cause)!==null&&f!==void 0?f:h?.cause)!==null&&c!==void 0?c:h,cacheTTL:r}),new Ry(`Error while reading file "${t.uri}"`,{cause:h})}},Ice=async(t,e)=>{const r=e.parse.parsers.map(i=>{const a=Object.create(i);return Object.assign(a,e.parse.parserOpts)}),n=await _j("canParse",[t,e],r);if(gp(n))throw new SH(t.uri);try{const{plugin:i,result:a}=await wj("parse",[t,e],n);return!i.allowEmpty&&a.isEmpty?Promise.reject(new QC(`Error while parsing file "${t.uri}". File is empty.`)):a}catch(i){throw new QC(`Error while parsing file "${t.uri}"`,{cause:i})}},kce=async(t,e)=>{const r=new Nc({uri:gg(Pr(t)),mediaType:e.parse.mediaType}),n=await Mce(r,e);return Ice(new Nc({...r,data:n}),e)};var Sn={},iO,nU;function Dce(){if(nU)return iO;nU=1;function t(e){return e===null}return iO=t,iO}var aO,iU;function Pce(){if(iU)return aO;iU=1;var t=Cs(),e=ji(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return aO=n,aO}var sO,aU;function qce(){if(aU)return sO;aU=1;var t=Cs(),e=ji(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return sO=n,sO}var oO,sU;function xj(){if(sU)return oO;sU=1;class t{constructor(r){this.namespace=r||new this.Namespace}serialise(r){if(!(r instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${r}\` is not an Element instance`);const n={element:r.element};r._meta&&r._meta.length>0&&(n.meta=this.serialiseObject(r.meta)),r._attributes&&r._attributes.length>0&&(n.attributes=this.serialiseObject(r.attributes));const i=this.serialiseContent(r.content);return i!==void 0&&(n.content=i),n}deserialise(r){if(!r.element)throw new Error("Given value is not an object containing an element name");const n=this.namespace.getElementClass(r.element),i=new n;i.element!==r.element&&(i.element=r.element),r.meta&&this.deserialiseObject(r.meta,i.meta),r.attributes&&this.deserialiseObject(r.attributes,i.attributes);const a=this.deserialiseContent(r.content);return(a!==void 0||i.content===null)&&(i.content=a),i}serialiseContent(r){if(r instanceof this.namespace.elements.Element)return this.serialise(r);if(r instanceof this.namespace.KeyValuePair){const n={key:this.serialise(r.key)};return r.value&&(n.value=this.serialise(r.value)),n}return r&&r.map?r.length===0?void 0:r.map(this.serialise,this):r}deserialiseContent(r){if(r){if(r.element)return this.deserialise(r);if(r.key){const n=new this.namespace.KeyValuePair(this.deserialise(r.key));return r.value&&(n.value=this.deserialise(r.value)),n}if(r.map)return r.map(this.deserialise,this)}return r}serialiseObject(r){const n={};if(r.forEach((i,a)=>{i&&(n[a.toValue()]=this.serialise(i))}),Object.keys(n).length!==0)return n}deserialiseObject(r,n){Object.keys(r).forEach(i=>{n.set(i,this.deserialise(r[i]))})}}return oO=t,oO}var lO,oU;function Bce(){if(oU)return lO;oU=1;var t=OR();function e(r,n){return t(r,n)}return lO=e,lO}var uO,lU;function vg(){if(lU)return uO;lU=1;class t{constructor(r,n){this.key=r,this.value=n}clone(){const r=new t;return this.key&&(r.key=this.key.clone()),this.value&&(r.value=this.value.clone()),r}}return uO=t,uO}var cO,uU;function bg(){if(uU)return cO;uU=1;var t="Expected a function";function e(r){if(typeof r!="function")throw new TypeError(t);return function(){var n=arguments;switch(n.length){case 0:return!r.call(this);case 1:return!r.call(this,n[0]);case 2:return!r.call(this,n[0],n[1]);case 3:return!r.call(this,n[0],n[1],n[2])}return!r.apply(this,n)}}return cO=e,cO}var fO,cU;function Eg(){if(cU)return fO;cU=1;const t=bg();function e(n){return typeof n=="string"?i=>i.element===n:n.constructor&&n.extend?i=>i instanceof n:n}class r{constructor(i){this.elements=i||[]}toValue(){return this.elements.map(i=>i.toValue())}map(i,a){return this.elements.map(i,a)}flatMap(i,a){return this.map(i,a).reduce((o,u)=>o.concat(u),[])}compactMap(i,a){const o=[];return this.forEach(u=>{const c=i.bind(a)(u);c&&o.push(c)}),o}filter(i,a){return i=e(i),new r(this.elements.filter(i,a))}reject(i,a){return i=e(i),new r(this.elements.filter(t(i),a))}find(i,a){return i=e(i),this.elements.find(i,a)}forEach(i,a){this.elements.forEach(i,a)}reduce(i,a){return this.elements.reduce(i,a)}includes(i){return this.elements.some(a=>a.equals(i))}shift(){return this.elements.shift()}unshift(i){this.elements.unshift(this.refract(i))}push(i){return this.elements.push(this.refract(i)),this}add(i){this.push(i)}get(i){return this.elements[i]}getValue(i){const a=this.elements[i];if(a)return a.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}}return typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),fO=r,fO}var dO,fU;function So(){if(fU)return dO;fU=1;const t=Bce(),e=vg(),r=Eg();class n{constructor(a,o,u){o&&(this.meta=o),u&&(this.attributes=u),this.content=a}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(a=>{a.parent=this,a.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const a=new this.constructor;return a.element=this.element,this.meta.length&&(a._meta=this.meta.clone()),this.attributes.length&&(a._attributes=this.attributes.clone()),this.content?this.content.clone?a.content=this.content.clone():Array.isArray(this.content)?a.content=this.content.map(o=>o.clone()):a.content=this.content:a.content=this.content,a}toValue(){return this.content instanceof n?this.content.toValue():this.content instanceof e?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(a=>a.toValue(),this):this.content}toRef(a){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const o=new this.RefElement(this.id.toValue());return a&&(o.path=a),o}findRecursive(...a){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const o=a.pop();let u=new r;const c=(p,h)=>(p.push(h),p),f=(p,h)=>{h.element===o&&p.push(h);const v=h.findRecursive(o);return v&&v.reduce(c,p),h.content instanceof e&&(h.content.key&&f(p,h.content.key),h.content.value&&f(p,h.content.value)),p};return this.content&&(this.content.element&&f(u,this.content),Array.isArray(this.content)&&this.content.reduce(f,u)),a.isEmpty||(u=u.filter(p=>{let h=p.parents.map(v=>v.element);for(const v in a){const g=a[v],E=h.indexOf(g);if(E!==-1)h=h.splice(0,E);else return!1}return!0})),u}set(a){return this.content=a,this}equals(a){return t(this.toValue(),a)}getMetaProperty(a,o){if(!this.meta.hasKey(a)){if(this.isFrozen){const u=this.refract(o);return u.freeze(),u}this.meta.set(a,o)}return this.meta.get(a)}setMetaProperty(a,o){this.meta.set(a,o)}get element(){return this._storedElement||"element"}set element(a){this._storedElement=a}get content(){return this._content}set content(a){if(a instanceof n)this._content=a;else if(a instanceof r)this.content=a.elements;else if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a==="null"||a==null)this._content=a;else if(a instanceof e)this._content=a;else if(Array.isArray(a))this._content=a.map(this.refract);else if(typeof a=="object")this._content=Object.keys(a).map(o=>new this.MemberElement(o,a[o]));else throw new Error("Cannot set content to given value")}get meta(){if(!this._meta){if(this.isFrozen){const a=new this.ObjectElement;return a.freeze(),a}this._meta=new this.ObjectElement}return this._meta}set meta(a){a instanceof this.ObjectElement?this._meta=a:this.meta.set(a||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const a=new this.ObjectElement;return a.freeze(),a}this._attributes=new this.ObjectElement}return this._attributes}set attributes(a){a instanceof this.ObjectElement?this._attributes=a:this.attributes.set(a||{})}get id(){return this.getMetaProperty("id","")}set id(a){this.setMetaProperty("id",a)}get classes(){return this.getMetaProperty("classes",[])}set classes(a){this.setMetaProperty("classes",a)}get title(){return this.getMetaProperty("title","")}set title(a){this.setMetaProperty("title",a)}get description(){return this.getMetaProperty("description","")}set description(a){this.setMetaProperty("description",a)}get links(){return this.getMetaProperty("links",[])}set links(a){this.setMetaProperty("links",a)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:a}=this;const o=new r;for(;a;)o.push(a),a=a.parent;return o}get children(){if(Array.isArray(this.content))return new r(this.content);if(this.content instanceof e){const a=new r([this.content.key]);return this.content.value&&a.push(this.content.value),a}return this.content instanceof n?new r([this.content]):new r}get recursiveChildren(){const a=new r;return this.children.forEach(o=>{a.push(o),o.recursiveChildren.forEach(u=>{a.push(u)})}),a}}return dO=n,dO}var pO,dU;function Lce(){if(dU)return pO;dU=1;const t=So();class e extends t{constructor(n,i,a){super(n||null,i,a),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}return pO=e,pO}var hO,pU;function Fce(){if(pU)return hO;pU=1;const t=So();return hO=class extends t{constructor(r,n,i){super(r,n,i),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},hO}var mO,hU;function $ce(){if(hU)return mO;hU=1;const t=So();return mO=class extends t{constructor(r,n,i){super(r,n,i),this.element="number"}primitive(){return"number"}},mO}var yO,mU;function Uce(){if(mU)return yO;mU=1;const t=So();return yO=class extends t{constructor(r,n,i){super(r,n,i),this.element="boolean"}primitive(){return"boolean"}},yO}var gO,yU;function wH(){if(yU)return gO;yU=1;const t=bg(),e=So(),r=Eg();class n extends e{constructor(a,o,u){super(a||[],o,u),this.element="array"}primitive(){return"array"}get(a){return this.content[a]}getValue(a){const o=this.get(a);if(o)return o.toValue()}getIndex(a){return this.content[a]}set(a,o){return this.content[a]=this.refract(o),this}remove(a){const o=this.content.splice(a,1);return o.length?o[0]:null}map(a,o){return this.content.map(a,o)}flatMap(a,o){return this.map(a,o).reduce((u,c)=>u.concat(c),[])}compactMap(a,o){const u=[];return this.forEach(c=>{const f=a.bind(o)(c);f&&u.push(f)}),u}filter(a,o){return new r(this.content.filter(a,o))}reject(a,o){return this.filter(t(a),o)}reduce(a,o){let u,c;o!==void 0?(u=0,c=this.refract(o)):(u=1,c=this.primitive()==="object"?this.first.value:this.first);for(let f=u;f {a.bind(o)(u,this.refract(c))})}shift(){return this.content.shift()}unshift(a){this.content.unshift(this.refract(a))}push(a){return this.content.push(this.refract(a)),this}add(a){this.push(a)}findElements(a,o){const u=o||{},c=!!u.recursive,f=u.results===void 0?[]:u.results;return this.forEach((p,h,v)=>{c&&p.findElements!==void 0&&p.findElements(a,{results:f,recursive:c}),a(p,h,v)&&f.push(p)}),f}find(a){return new r(this.findElements(a,{recursive:!0}))}findByElement(a){return this.find(o=>o.element===a)}findByClass(a){return this.find(o=>o.classes.includes(a))}getById(a){return this.find(o=>o.id.toValue()===a).first}includes(a){return this.content.some(o=>o.equals(a))}contains(a){return this.includes(a)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(a){return new this.constructor(this.content.concat(a.content))}"fantasy-land/concat"(a){return this.concat(a)}"fantasy-land/map"(a){return new this.constructor(this.map(a))}"fantasy-land/chain"(a){return this.map(o=>a(o),this).reduce((o,u)=>o.concat(u),this.empty())}"fantasy-land/filter"(a){return new this.constructor(this.content.filter(a))}"fantasy-land/reduce"(a,o){return this.content.reduce(a,o)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}return n.empty=function(){return new this},n["fantasy-land/empty"]=n.empty,typeof Symbol<"u"&&(n.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),gO=n,gO}var vO,gU;function xH(){if(gU)return vO;gU=1;const t=vg(),e=So();return vO=class extends e{constructor(n,i,a,o){super(new t,a,o),this.element="member",this.key=n,this.value=i}get key(){return this.content.key}set key(n){this.content.key=this.refract(n)}get value(){return this.content.value}set value(n){this.content.value=this.refract(n)}},vO}var bO,vU;function AH(){if(vU)return bO;vU=1;const t=bg(),e=Eg();class r extends e{map(i,a){return this.elements.map(o=>i.bind(a)(o.value,o.key,o))}filter(i,a){return new r(this.elements.filter(o=>i.bind(a)(o.value,o.key,o)))}reject(i,a){return this.filter(t(i.bind(a)))}forEach(i,a){return this.elements.forEach((o,u)=>{i.bind(a)(o.value,o.key,o,u)})}keys(){return this.map((i,a)=>a.toValue())}values(){return this.map(i=>i.toValue())}}return bO=r,bO}var EO,bU;function zce(){if(bU)return EO;bU=1;const t=bg(),e=Ri(),r=wH(),n=xH(),i=AH();class a extends r{constructor(u,c,f){super(u||[],c,f),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce((u,c)=>(u[c.key.toValue()]=c.value?c.value.toValue():void 0,u),{})}get(u){const c=this.getMember(u);if(c)return c.value}getMember(u){if(u!==void 0)return this.content.find(c=>c.key.toValue()===u)}remove(u){let c=null;return this.content=this.content.filter(f=>f.key.toValue()===u?(c=f,!1):!0),c}getKey(u){const c=this.getMember(u);if(c)return c.key}set(u,c){if(e(u))return Object.keys(u).forEach(h=>{this.set(h,u[h])}),this;const f=u,p=this.getMember(f);return p?p.value=c:this.content.push(new n(f,c)),this}keys(){return this.content.map(u=>u.key.toValue())}values(){return this.content.map(u=>u.value.toValue())}hasKey(u){return this.content.some(c=>c.key.equals(u))}items(){return this.content.map(u=>[u.key.toValue(),u.value.toValue()])}map(u,c){return this.content.map(f=>u.bind(c)(f.value,f.key,f))}compactMap(u,c){const f=[];return this.forEach((p,h,v)=>{const g=u.bind(c)(p,h,v);g&&f.push(g)}),f}filter(u,c){return new i(this.content).filter(u,c)}reject(u,c){return this.filter(t(u),c)}forEach(u,c){return this.content.forEach(f=>u.bind(c)(f.value,f.key,f))}}return EO=a,EO}var SO,EU;function Vce(){if(EU)return SO;EU=1;const t=So();return SO=class extends t{constructor(r,n,i){super(r||[],n,i),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(r){this.attributes.set("relation",r)}get href(){return this.attributes.get("href")}set href(r){this.attributes.set("href",r)}},SO}var _O,SU;function Hce(){if(SU)return _O;SU=1;const t=So();return _O=class extends t{constructor(r,n,i){super(r||[],n,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(r){this.attributes.set("path",r)}},_O}var wO,_U;function OH(){if(_U)return wO;_U=1;const t=So(),e=Lce(),r=Fce(),n=$ce(),i=Uce(),a=wH(),o=xH(),u=zce(),c=Vce(),f=Hce(),p=Eg(),h=AH(),v=vg();function g(E){return E instanceof t?E:typeof E=="string"?new r(E):typeof E=="number"?new n(E):typeof E=="boolean"?new i(E):E===null?new e:Array.isArray(E)?new a(E.map(g)):typeof E=="object"?new u(E):E}return t.prototype.ObjectElement=u,t.prototype.RefElement=f,t.prototype.MemberElement=o,t.prototype.refract=g,p.prototype.refract=g,wO={Element:t,NullElement:e,StringElement:r,NumberElement:n,BooleanElement:i,ArrayElement:a,MemberElement:o,ObjectElement:u,LinkElement:c,RefElement:f,refract:g,ArraySlice:p,ObjectSlice:h,KeyValuePair:v},wO}var xO,wU;function Jce(){if(wU)return xO;wU=1;const t=Dce(),e=iV(),r=Pce(),n=qce(),i=Ri(),a=xj(),o=OH();class u{constructor(f){this.elementMap={},this.elementDetection=[],this.Element=o.Element,this.KeyValuePair=o.KeyValuePair,(!f||!f.noDefault)&&this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(f){return f.namespace&&f.namespace({base:this}),f.load&&f.load({base:this}),this}useDefault(){return this.register("null",o.NullElement).register("string",o.StringElement).register("number",o.NumberElement).register("boolean",o.BooleanElement).register("array",o.ArrayElement).register("object",o.ObjectElement).register("member",o.MemberElement).register("ref",o.RefElement).register("link",o.LinkElement),this.detect(t,o.NullElement,!1).detect(e,o.StringElement,!1).detect(r,o.NumberElement,!1).detect(n,o.BooleanElement,!1).detect(Array.isArray,o.ArrayElement,!1).detect(i,o.ObjectElement,!1),this}register(f,p){return this._elements=void 0,this.elementMap[f]=p,this}unregister(f){return this._elements=void 0,delete this.elementMap[f],this}detect(f,p,h){return(h===void 0?!0:h)?this.elementDetection.unshift([f,p]):this.elementDetection.push([f,p]),this}toElement(f){if(f instanceof this.Element)return f;let p;for(let h=0;h {const p=f[0].toUpperCase()+f.substr(1);this._elements[p]=this.elementMap[f]})),this._elements}get serialiser(){return new a(this)}}return a.prototype.Namespace=u,xO=u,xO}var AO,xU;function Gce(){if(xU)return AO;xU=1;const t=xj();return AO=class extends t{serialise(r){if(!(r instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${r}\` is not an Element instance`);let n;r._attributes&&r.attributes.get("variable")&&(n=r.attributes.get("variable"));const i={element:r.element};r._meta&&r._meta.length>0&&(i.meta=this.serialiseObject(r.meta));const a=r.element==="enum"||r.attributes.keys().indexOf("enumerations")!==-1;if(a){const o=this.enumSerialiseAttributes(r);o&&(i.attributes=o)}else if(r._attributes&&r._attributes.length>0){let{attributes:o}=r;o.get("metadata")&&(o=o.clone(),o.set("meta",o.get("metadata")),o.remove("metadata")),r.element==="member"&&n&&(o=o.clone(),o.remove("variable")),o.length>0&&(i.attributes=this.serialiseObject(o))}if(a)i.content=this.enumSerialiseContent(r,i);else if(this[`${r.element}SerialiseContent`])i.content=this[`${r.element}SerialiseContent`](r,i);else if(r.content!==void 0){let o;n&&r.content.key?(o=r.content.clone(),o.key.attributes.set("variable",n),o=this.serialiseContent(o)):o=this.serialiseContent(r.content),this.shouldSerialiseContent(r,o)&&(i.content=o)}else this.shouldSerialiseContent(r,r.content)&&r instanceof this.namespace.elements.Array&&(i.content=[]);return i}shouldSerialiseContent(r,n){return r.element==="parseResult"||r.element==="httpRequest"||r.element==="httpResponse"||r.element==="category"||r.element==="link"?!0:!(n===void 0||Array.isArray(n)&&n.length===0)}refSerialiseContent(r,n){return delete n.attributes,{href:r.toValue(),path:r.path.toValue()}}sourceMapSerialiseContent(r){return r.toValue()}dataStructureSerialiseContent(r){return[this.serialiseContent(r.content)]}enumSerialiseAttributes(r){const n=r.attributes.clone(),i=n.remove("enumerations")||new this.namespace.elements.Array([]),a=n.get("default");let o=n.get("samples")||new this.namespace.elements.Array([]);if(a&&a.content&&(a.content.attributes&&a.content.attributes.remove("typeAttributes"),n.set("default",new this.namespace.elements.Array([a.content]))),o.forEach(u=>{u.content&&u.content.element&&u.content.attributes.remove("typeAttributes")}),r.content&&i.length!==0&&o.unshift(r.content),o=o.map(u=>u instanceof this.namespace.elements.Array?[u]:new this.namespace.elements.Array([u.content])),o.length&&n.set("samples",o),n.length>0)return this.serialiseObject(n)}enumSerialiseContent(r){if(r._attributes){const n=r.attributes.get("enumerations");if(n&&n.length>0)return n.content.map(i=>{const a=i.clone();return a.attributes.remove("typeAttributes"),this.serialise(a)})}if(r.content){const n=r.content.clone();return n.attributes.remove("typeAttributes"),[this.serialise(n)]}return[]}deserialise(r){if(typeof r=="string")return new this.namespace.elements.String(r);if(typeof r=="number")return new this.namespace.elements.Number(r);if(typeof r=="boolean")return new this.namespace.elements.Boolean(r);if(r===null)return new this.namespace.elements.Null;if(Array.isArray(r))return new this.namespace.elements.Array(r.map(this.deserialise,this));const n=this.namespace.getElementClass(r.element),i=new n;i.element!==r.element&&(i.element=r.element),r.meta&&this.deserialiseObject(r.meta,i.meta),r.attributes&&this.deserialiseObject(r.attributes,i.attributes);const a=this.deserialiseContent(r.content);if((a!==void 0||i.content===null)&&(i.content=a),i.element==="enum"){i.content&&i.attributes.set("enumerations",i.content);let o=i.attributes.get("samples");if(i.attributes.remove("samples"),o){const c=o;o=new this.namespace.elements.Array,c.forEach(p=>{p.forEach(h=>{const v=new n(h);v.element=i.element,o.push(v)})});const f=o.shift();f?i.content=f.content:i.content=void 0,i.attributes.set("samples",o)}else i.content=void 0;let u=i.attributes.get("default");if(u&&u.length>0){u=u.get(0);const c=new n(u);c.element=i.element,i.attributes.set("default",c)}}else if(i.element==="dataStructure"&&Array.isArray(i.content))[i.content]=i.content;else if(i.element==="category"){const o=i.attributes.get("meta");o&&(i.attributes.set("metadata",o),i.attributes.remove("meta"))}else i.element==="member"&&i.key&&i.key._attributes&&i.key._attributes.getValue("variable")&&(i.attributes.set("variable",i.key.attributes.get("variable")),i.key.attributes.remove("variable"));return i}serialiseContent(r){if(r instanceof this.namespace.elements.Element)return this.serialise(r);if(r instanceof this.namespace.KeyValuePair){const n={key:this.serialise(r.key)};return r.value&&(n.value=this.serialise(r.value)),n}return r&&r.map?r.map(this.serialise,this):r}deserialiseContent(r){if(r){if(r.element)return this.deserialise(r);if(r.key){const n=new this.namespace.KeyValuePair(this.deserialise(r.key));return r.value&&(n.value=this.deserialise(r.value)),n}if(r.map)return r.map(this.deserialise,this)}return r}shouldRefract(r){return r._attributes&&r.attributes.keys().length||r._meta&&r.meta.keys().length?!0:r.element==="enum"?!1:r.element!==r.primitive()||r.element==="member"}convertKeyToRefract(r,n){return this.shouldRefract(n)?this.serialise(n):n.element==="enum"?this.serialiseEnum(n):n.element==="array"?n.map(i=>this.shouldRefract(i)||r==="default"?this.serialise(i):i.element==="array"||i.element==="object"||i.element==="enum"?i.children.map(a=>this.serialise(a)):i.toValue()):n.element==="object"?(n.content||[]).map(this.serialise,this):n.toValue()}serialiseEnum(r){return r.children.map(n=>this.serialise(n))}serialiseObject(r){const n={};return r.forEach((i,a)=>{if(i){const o=a.toValue();n[o]=this.convertKeyToRefract(o,i)}}),n}deserialiseObject(r,n){Object.keys(r).forEach(i=>{n.set(i,this.deserialise(r[i]))})}},AO}var AU;function Kce(){if(AU)return Sn;AU=1;const t=Jce(),e=OH();return Sn.Namespace=t,Sn.namespace=function(n){return new t(n)},Sn.KeyValuePair=vg(),Sn.ArraySlice=e.ArraySlice,Sn.ObjectSlice=e.ObjectSlice,Sn.Element=e.Element,Sn.StringElement=e.StringElement,Sn.NumberElement=e.NumberElement,Sn.BooleanElement=e.BooleanElement,Sn.NullElement=e.NullElement,Sn.ArrayElement=e.ArrayElement,Sn.ObjectElement=e.ObjectElement,Sn.MemberElement=e.MemberElement,Sn.RefElement=e.RefElement,Sn.LinkElement=e.LinkElement,Sn.refract=e.refract,Sn.JSONSerialiser=xj(),Sn.JSON06Serialiser=Gce(),Sn}var Oe=Kce();class jy extends Oe.StringElement{constructor(e,r,n){super(e,r,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}class Ny extends Oe.StringElement{constructor(e,r,n){super(e,r,n),this.element="comment"}}class rs extends Oe.ArrayElement{constructor(e,r,n){super(e,r,n),this.element="parseResult"}get api(){return this.children.filter(e=>e.classes.contains("api")).first}get results(){return this.children.filter(e=>e.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(e=>e.element==="annotation")}get warnings(){return this.children.filter(e=>e.element==="annotation"&&e.classes.contains("warning"))}get errors(){return this.children.filter(e=>e.element==="annotation"&&e.classes.contains("error"))}get isEmpty(){return this.children.reject(e=>e.element==="annotation").isEmpty}replaceResult(e){const{result:r}=this;if(dl(r))return!1;const n=this.content.findIndex(i=>i===r);return n===-1?!1:(this.content[n]=e,!0)}}const Wce=(t,e)=>typeof e=="object"&&e!==null&&t in e&&typeof e[t]=="function",Yce=t=>typeof t=="object"&&t!=null&&"_storedElement"in t&&typeof t._storedElement=="string"&&"_content"in t,Xce=(t,e)=>typeof e=="object"&&e!==null&&"primitive"in e?typeof e.primitive=="function"&&e.primitive()===t:!1,Zce=(t,e)=>typeof e=="object"&&e!==null&&"classes"in e&&(Array.isArray(e.classes)||e.classes instanceof Oe.ArrayElement)&&e.classes.includes(t),Yo=(t,e)=>typeof e=="object"&&e!==null&&"element"in e&&e.element===t,st=t=>t({hasMethod:Wce,hasBasicElementProps:Yce,primitiveEq:Xce,isElementType:Yo,hasClass:Zce}),ln=st(({hasBasicElementProps:t,primitiveEq:e})=>r=>r instanceof Oe.Element||t(r)&&e(void 0,r)),Bt=st(({hasBasicElementProps:t,primitiveEq:e})=>r=>r instanceof Oe.StringElement||t(r)&&e("string",r)),Aj=st(({hasBasicElementProps:t,primitiveEq:e})=>r=>r instanceof Oe.NumberElement||t(r)&&e("number",r)),Oj=st(({hasBasicElementProps:t,primitiveEq:e})=>r=>r instanceof Oe.NullElement||t(r)&&e("null",r)),vp=st(({hasBasicElementProps:t,primitiveEq:e})=>r=>r instanceof Oe.BooleanElement||t(r)&&e("boolean",r)),dr=st(({hasBasicElementProps:t,primitiveEq:e,hasMethod:r})=>n=>n instanceof Oe.ObjectElement||t(n)&&e("object",n)&&r("keys",n)&&r("values",n)&&r("items",n)),ei=st(({hasBasicElementProps:t,primitiveEq:e,hasMethod:r})=>n=>n instanceof Oe.ArrayElement&&!(n instanceof Oe.ObjectElement)||t(n)&&e("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n)),ss=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Oe.MemberElement||t(n)&&e("member",n)&&r(void 0,n)),CH=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Oe.LinkElement||t(n)&&e("link",n)&&r(void 0,n)),TH=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Oe.RefElement||t(n)&&e("ref",n)&&r(void 0,n)),Qce=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof jy||t(n)&&e("annotation",n)&&r("array",n)),efe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Ny||t(n)&&e("comment",n)&&r("string",n)),RH=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof rs||t(n)&&e("parseResult",n)&&r("array",n)),nu=t=>Yo("object",t)||Yo("array",t)||Yo("boolean",t)||Yo("number",t)||Yo("string",t)||Yo("null",t)||Yo("member",t),Yc=t=>ln(t)?Number.isInteger(t.startPositionRow)&&Number.isInteger(t.startPositionColumn)&&Number.isInteger(t.startIndex)&&Number.isInteger(t.endPositionRow)&&Number.isInteger(t.endPositionColumn)&&Number.isInteger(t.endIndex):!1,tfe=(t,e)=>{if(t.length===0)return!0;const r=e.attributes.get("symbols");return ei(r)?lj(yg(r.toValue()),t):!1},Ic=(t,e)=>t.length===0?!0:lj(yg(e.classes.toValue()),t),rfe=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:Yc,includesClasses:Ic,includesSymbols:tfe,isAnnotationElement:Qce,isArrayElement:ei,isBooleanElement:vp,isCommentElement:efe,isElement:ln,isLinkElement:CH,isMemberElement:ss,isNullElement:Oj,isNumberElement:Aj,isObjectElement:dr,isParseResultElement:RH,isPrimitiveElement:nu,isRefElement:TH,isStringElement:Bt},Symbol.toStringTag,{value:"Module"}));class jH extends Oe.Namespace{constructor(){super(),this.register("annotation",jy),this.register("comment",Ny),this.register("parseResult",rs)}}const NH=new jH,_o=t=>{const e=new jH;return ts(t)&&e.use(t),e},MH=()=>({predicates:{...rfe},namespace:NH}),Sg=(t,e,r)=>{const n=t[e];if(n!=null){if(!r&&typeof n=="function")return n;const i=r?n.leave:n.enter;if(typeof i=="function")return i}else{const i=r?t.leave:t.enter;if(i!=null){if(typeof i=="function")return i;const a=i[e];if(typeof a=="function")return a}}return null},ir={},bp=t=>t?.type,IH=t=>typeof bp(t)=="string",Cj=t=>Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),_g=(t,{visitFnGetter:e=Sg,nodeTypeGetter:r=bp,breakSymbol:n=ir,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:a=!1,exposeEdits:o=!1}={})=>{const u=Symbol("skip"),c=new Array(t.length).fill(u);return{enter(f,p,h,v,g,E){let S=f,_=!1;const A={...E,replaceWith(w,C){E.replaceWith(w,C),S=w}};for(let w=0;w {const u=Symbol("skip"),c=new Array(t.length).fill(u);return{async enter(f,p,h,v,g,E){let S=f,_=!1;const A={...E,replaceWith(w,C){E.replaceWith(w,C),S=w}};for(let w=0;w {const g=r||{};let E,S=Array.isArray(t),_=[t],A=-1,w,C=[],R=t;const O=[],N=[];do{A+=1;const q=A===_.length;let H;const P=q&&C.length!==0;if(q){if(H=N.length===0?void 0:O.pop(),R=w,w=N.pop(),P)if(S){R=R.slice();let U=0;for(const[se,ue]of C){const W=se-U;ue===a?(R.splice(W,1),U+=1):R[W]=ue}}else{R=p(R);for(const[U,se]of C)R[U]=se}A=E.index,_=E.keys,C=E.edits,S=E.inArray,E=E.prev}else if(w!==a&&w!==void 0){if(H=S?A:_[A],R=w[H],R===a||R===void 0)continue;O.push(H)}let V;if(!Array.isArray(R)){var M;if(!f(R))throw new xs(`Invalid AST Node: ${String(R)}`,{node:R});if(h&&N.includes(R)){typeof v=="function"&&v(R,H,w,O,N),O.pop();continue}const U=u(e,c(R),q);if(U){for(const[ue,W]of Object.entries(n))e[ue]=W;const se={replaceWith(ue,W){typeof W=="function"?W(ue,R,H,w,O,N):w&&(w[H]=ue),q||(R=ue)}};V=U.call(e,R,H,w,O,N,se)}if(typeof((M=V)===null||M===void 0?void 0:M.then)=="function")throw new xs("Async visitor not supported in sync mode",{visitor:e,visitFn:U});if(V===i)break;if(V===o){if(!q){O.pop();continue}}else if(V!==void 0&&(C.push([H,V]),!q))if(f(V))R=V;else{O.pop();continue}}if(V===void 0&&P&&C.push([H,R]),!q){var D;E={inArray:S,index:A,keys:_,edits:C,prev:E},S=Array.isArray(R),_=S?R:(D=g[c(R)])!==null&&D!==void 0?D:[],A=-1,C=[],w!==a&&w!==void 0&&N.push(w),w=R}}while(E!==void 0);return C.length!==0?C[C.length-1][1]:t};Tj[Symbol.for("nodejs.util.promisify.custom")]=async(t,e,{keyMap:r=null,state:n={},breakSymbol:i=ir,deleteNodeSymbol:a=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:u=Sg,nodeTypeGetter:c=bp,nodePredicate:f=IH,nodeCloneFn:p=Cj,detectCycles:h=!0,detectCyclesCallback:v=null}={})=>{const g=r||{};let E,S=Array.isArray(t),_=[t],A=-1,w,C=[],R=t;const O=[],N=[];do{A+=1;const D=A===_.length;let q;const H=D&&C.length!==0;if(D){if(q=N.length===0?void 0:O.pop(),R=w,w=N.pop(),H)if(S){R=R.slice();let V=0;for(const[U,se]of C){const ue=U-V;se===a?(R.splice(ue,1),V+=1):R[ue]=se}}else{R=p(R);for(const[V,U]of C)R[V]=U}A=E.index,_=E.keys,C=E.edits,S=E.inArray,E=E.prev}else if(w!==a&&w!==void 0){if(q=S?A:_[A],R=w[q],R===a||R===void 0)continue;O.push(q)}let P;if(!Array.isArray(R)){if(!f(R))throw new xs(`Invalid AST Node: ${String(R)}`,{node:R});if(h&&N.includes(R)){typeof v=="function"&&v(R,q,w,O,N),O.pop();continue}const V=u(e,c(R),D);if(V){for(const[se,ue]of Object.entries(n))e[se]=ue;const U={replaceWith(se,ue){typeof ue=="function"?ue(se,R,q,w,O,N):w&&(w[q]=se),D||(R=se)}};P=await V.call(e,R,q,w,O,N,U)}if(P===i)break;if(P===o){if(!D){O.pop();continue}}else if(P!==void 0&&(C.push([q,P]),!D))if(f(P))R=P;else{O.pop();continue}}if(P===void 0&&H&&C.push([q,R]),!D){var M;E={inArray:S,index:A,keys:_,edits:C,prev:E},S=Array.isArray(R),_=S?R:(M=g[c(R)])!==null&&M!==void 0?M:[],A=-1,C=[],w!==a&&w!==void 0&&N.push(w),w=R}}while(E!==void 0);return C.length!==0?C[C.length-1][1]:t};class kH extends xs{value;constructor(e,r){super(e,r),typeof r<"u"&&(this.value=r.value)}}class ife extends kH{}class afe extends kH{}const pl=(t,e)=>{const r=jc(t,e);return Mue(n=>{if(ts(n)&&wd("$ref",n)&&que(gu,"$ref",n)){const i=qn(["$ref"],n),a=hH("#/",i);return qn(a.split("/"),r)}return ts(n)?pl(n,r):n},t)},Rj=(t,e)=>(t.startPositionRow=e?.startPositionRow,t.startPositionColumn=e?.startPositionColumn,t.startIndex=e?.startIndex,t.endPositionRow=e?.endPositionRow,t.endPositionColumn=e?.endPositionColumn,t.endIndex=e?.endIndex,t),mt=(t,e={})=>{const{visited:r=new WeakMap}=e,n={...e,visited:r};if(r.has(t))return r.get(t);if(t instanceof Oe.KeyValuePair){const{key:i,value:a}=t,o=ln(i)?mt(i,n):i,u=ln(a)?mt(a,n):a,c=new Oe.KeyValuePair(o,u);return r.set(t,c),c}if(t instanceof Oe.ObjectSlice){const i=u=>mt(u,n),a=[...t].map(i),o=new Oe.ObjectSlice(a);return r.set(t,o),o}if(t instanceof Oe.ArraySlice){const i=u=>mt(u,n),a=[...t].map(i),o=new Oe.ArraySlice(a);return r.set(t,o),o}if(ln(t)){const i=Pn(t);if(r.set(t,i),t.content)if(ln(t.content))i.content=mt(t.content,n);else if(t.content instanceof Oe.KeyValuePair)i.content=mt(t.content,n);else if(Array.isArray(t.content)){const a=o=>mt(o,n);i.content=t.content.map(a)}else i.content=t.content;else i.content=t.content;return i}throw new ife("Value provided to cloneDeep function couldn't be cloned",{value:t})};mt.safe=t=>{try{return mt(t)}catch{return t}};const DH=t=>{const{key:e,value:r}=t;return new Oe.KeyValuePair(e,r)},sfe=t=>{const e=[...t];return new Oe.ArraySlice(e)},ofe=t=>{const e=[...t];return new Oe.ObjectSlice(e)},PH=t=>{const e=new t.constructor;if(e.element=t.element,Yc(t)&&Rj(e,t),t.meta.length>0&&(e._meta=mt(t.meta)),t.attributes.length>0&&(e._attributes=mt(t.attributes)),ln(t.content)){const r=t.content;e.content=PH(r)}else Array.isArray(t.content)?e.content=[...t.content]:t.content instanceof Oe.KeyValuePair?e.content=DH(t.content):e.content=t.content;return e},Pn=t=>{if(t instanceof Oe.KeyValuePair)return DH(t);if(t instanceof Oe.ObjectSlice)return ofe(t);if(t instanceof Oe.ArraySlice)return sfe(t);if(ln(t))return PH(t);throw new afe("Value provided to cloneShallow function couldn't be cloned",{value:t})};Pn.safe=t=>{try{return Pn(t)}catch{return t}};const Xc=t=>dr(t)?"ObjectElement":ei(t)?"ArrayElement":ss(t)?"MemberElement":Bt(t)?"StringElement":vp(t)?"BooleanElement":Aj(t)?"NumberElement":Oj(t)?"NullElement":CH(t)?"LinkElement":TH(t)?"RefElement":void 0,qH=t=>ln(t)?Pn(t):Cj(t),BH=ti(Xc,gu),Rs={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"]};class LH{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:e=sj,returnOnTrue:r,returnOnFalse:n}={}){this.result=[],this.predicate=e,this.returnOnTrue=r,this.returnOnFalse=n}enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}const xn=(t,e,{keyMap:r=Rs,...n}={})=>Tj(t,e,{keyMap:r,nodeTypeGetter:Xc,nodePredicate:BH,nodeCloneFn:qH,...n});xn[Symbol.for("nodejs.util.promisify.custom")]=async(t,e,{keyMap:r=Rs,...n}={})=>Tj[Symbol.for("nodejs.util.promisify.custom")](t,e,{keyMap:r,nodeTypeGetter:Xc,nodePredicate:BH,nodeCloneFn:qH,...n});const FH={toolboxCreator:MH,visitorOptions:{nodeTypeGetter:Xc,exposeEdits:!0}},js=(t,e,r={})=>{if(e.length===0)return t;const n=dg(FH,r),{toolboxCreator:i,visitorOptions:a}=n,o=i(),u=e.map(p=>p(o)),c=_g(u.map(Cy({},"visitor")),{...a});u.forEach(kd(["pre"],[]));const f=xn(t,c,a);return u.forEach(kd(["post"],[])),f},lfe=async(t,e,r={})=>{if(e.length===0)return t;const n=dg(FH,r),{toolboxCreator:i,visitorOptions:a}=n,o=i(),u=e.map(v=>v(o)),c=_g[Symbol.for("nodejs.util.promisify.custom")],f=xn[Symbol.for("nodejs.util.promisify.custom")],p=c(u.map(Cy({},"visitor")),{...a});await Promise.allSettled(u.map(kd(["pre"],[])));const h=await f(t,p,a);return await Promise.allSettled(u.map(kd(["post"],[]))),h};js[Symbol.for("nodejs.util.promisify.custom")]=lfe;var OO={exports:{}},OU;function ufe(){return OU||(OU=1,(function(t){var e=(()=>{var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(R,O,N)=>O in R?r(R,O,{enumerable:!0,configurable:!0,writable:!0,value:N}):R[O]=N,f=(R,O)=>{for(var N in O||(O={}))o.call(O,N)&&c(R,N,O[N]);if(a)for(var N of a(O))u.call(O,N)&&c(R,N,O[N]);return R},p=(R,O)=>{for(var N in O)r(R,N,{get:O[N],enumerable:!0})},h=(R,O,N,M)=>{if(O&&typeof O=="object"||typeof O=="function")for(let D of i(O))!o.call(R,D)&&D!==N&&r(R,D,{get:()=>O[D],enumerable:!(M=n(O,D))||M.enumerable});return R},v=R=>h(r({},"__esModule",{value:!0}),R),g=(R,O,N)=>c(R,typeof O!="symbol"?O+"":O,N),E={};p(E,{DEFAULT_OPTIONS:()=>A,DEFAULT_UUID_LENGTH:()=>_,default:()=>C});var S="5.3.2",_=6,A={dictionary:"alphanum",shuffle:!0,debug:!1,length:_,counter:0},w=class{constructor(O={}){g(this,"counter"),g(this,"debug"),g(this,"dict"),g(this,"version"),g(this,"dictIndex",0),g(this,"dictRange",[]),g(this,"lowerBound",0),g(this,"upperBound",0),g(this,"dictLength",0),g(this,"uuidLength"),g(this,"_digit_first_ascii",48),g(this,"_digit_last_ascii",58),g(this,"_alpha_lower_first_ascii",97),g(this,"_alpha_lower_last_ascii",123),g(this,"_hex_last_ascii",103),g(this,"_alpha_upper_first_ascii",65),g(this,"_alpha_upper_last_ascii",91),g(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),g(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),g(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),g(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),g(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),g(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),g(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),g(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),g(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),g(this,"log",(...P)=>{const V=[...P];if(V[0]="[short-unique-id] ".concat(P[0]),this.debug===!0&&typeof console<"u"&&console!==null){console.log(...V);return}}),g(this,"_normalizeDictionary",(P,V)=>{let U;if(P&&Array.isArray(P)&&P.length>1)U=P;else{U=[],this.dictIndex=0;const se="_".concat(P,"_dict_ranges"),ue=this._dict_ranges[se];let W=0;for(const[,ne]of Object.entries(ue)){const[ce,ge]=ne;W+=Math.abs(ge-ce)}U=new Array(W);let te=0;for(const[,ne]of Object.entries(ue)){this.dictRange=ne,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const ce=this.lowerBound<=this.upperBound,ge=this.lowerBound,G=this.upperBound;if(ce)for(let re=ge;re G;re--)U[te++]=String.fromCharCode(re),this.dictIndex=re}U.length=te}if(V){const se=U.length;for(let ue=se-1;ue>0;ue--){const W=Math.floor(Math.random()*(ue+1));[U[ue],U[W]]=[U[W],U[ue]]}}return U}),g(this,"setDictionary",(P,V)=>{this.dict=this._normalizeDictionary(P,V),this.dictLength=this.dict.length,this.setCounter(0)}),g(this,"seq",()=>this.sequentialUUID()),g(this,"sequentialUUID",()=>{const P=this.dictLength,V=this.dict;let U=this.counter;const se=[];do{const W=U%P;U=Math.trunc(U/P),se.push(V[W])}while(U!==0);const ue=se.join("");return this.counter+=1,ue}),g(this,"rnd",(P=this.uuidLength||_)=>this.randomUUID(P)),g(this,"randomUUID",(P=this.uuidLength||_)=>{if(P===null||typeof P>"u"||P<1)throw new Error("Invalid UUID Length Provided");const V=new Array(P),U=this.dictLength,se=this.dict;for(let ue=0;ue this.formattedUUID(P,V)),g(this,"formattedUUID",(P,V)=>{const U={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return P.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,ue=>{const W=ue.slice(0,2),te=Number.parseInt(ue.slice(2),10);return W==="$s"?U[W]().padStart(te,"0"):W==="$t"&&V?U[W](te,V):U[W](te)})}),g(this,"availableUUIDs",(P=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**P).toFixed(0))),g(this,"_collisionCache",new Map),g(this,"approxMaxBeforeCollision",(P=this.availableUUIDs(this.uuidLength))=>{const V=P,U=this._collisionCache.get(V);if(U!==void 0)return U;const se=Number.parseFloat(Math.sqrt(Math.PI/2*P).toFixed(20));return this._collisionCache.set(V,se),se}),g(this,"collisionProbability",(P=this.availableUUIDs(this.uuidLength),V=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(P)/this.availableUUIDs(V)).toFixed(20))),g(this,"uniqueness",(P=this.availableUUIDs(this.uuidLength))=>{const V=Number.parseFloat((1-this.approxMaxBeforeCollision(P)/P).toFixed(20));return V>1?1:V<0?0:V}),g(this,"getVersion",()=>this.version),g(this,"stamp",(P,V)=>{const U=Math.floor(+(V||new Date)/1e3).toString(16);if(typeof P=="number"&&P===0)return U;if(typeof P!="number"||P<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(` +`));const se=P-9,ue=Math.round(Math.random()*(se>15?15:se)),W=this.randomUUID(se);return"".concat(W.substring(0,ue)).concat(U).concat(W.substring(ue)).concat(ue.toString(16))}),g(this,"parseStamp",(P,V)=>{if(V&&!/t0|t[1-9]\d{1,}/.test(V))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const U=V?V.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,ue=>{const W={$r:ce=>[...Array(ce)].map(()=>"r").join(""),$s:ce=>[...Array(ce)].map(()=>"s").join(""),$t:ce=>[...Array(ce)].map(()=>"t").join("")},te=ue.slice(0,2),ne=Number.parseInt(ue.slice(2),10);return W[te](ne)}).replace(/^(.*?)(t{8,})(.*)$/g,(ue,W,te)=>P.substring(W.length,W.length+te.length)):P;if(U.length===8)return new Date(Number.parseInt(U,16)*1e3);if(U.length<10)throw new Error("Stamp length invalid");const se=Number.parseInt(U.substring(U.length-1),16);return new Date(Number.parseInt(U.substring(se,se+8),16)*1e3)}),g(this,"setCounter",P=>{this.counter=P}),g(this,"validate",(P,V)=>{const U=V?this._normalizeDictionary(V):this.dict;return P.split("").every(se=>U.includes(se))});const N=f(f({},A),O);this.counter=0,this.debug=!1,this.dict=[],this.version=S;const{dictionary:M,shuffle:D,length:q,counter:H}=N;this.uuidLength=q,this.setDictionary(M,D),this.setCounter(H),this.debug=N.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};g(w,"default",w);var C=w;return v(E)})();t.exports=e.default,typeof window<"u"&&(e=e.default)})(OO)),OO.exports}var cfe=ufe();const ffe=Ct(cfe);class dfe extends xs{value;constructor(e,r){super(e,r),typeof r<"u"&&(this.value=r.value)}}class jj{uuid;identityMap;constructor({length:e=6}={}){this.uuid=new ffe({length:e}),this.identityMap=new WeakMap}identify(e){if(!ln(e))throw new dfe("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:e});if(e.meta.hasKey("id")&&Bt(e.meta.get("id"))&&!e.meta.get("id").equals(""))return e.id;if(this.identityMap.has(e))return this.identityMap.get(e);const r=new Oe.StringElement(this.generateId());return this.identityMap.set(e,r),r}forget(e){return this.identityMap.has(e)?(this.identityMap.delete(e),!0):!1}generateId(){return this.uuid.randomUUID()}}new jj;class pfe extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new tO("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new tO("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new tO("latest method in MediaTypes class is not yet implemented.")}}const hfe=(t,{Type:e,plugins:r=[]})=>{const n=new e(t);return ln(t)&&(t.meta.length>0&&(n.meta=mt(t.meta)),t.attributes.length>0&&(n.attributes=mt(t.attributes))),js(n,r,{toolboxCreator:MH,visitorOptions:{nodeTypeGetter:Xc}})},os=t=>(e,r={})=>hfe(e,{...r,Type:t});Oe.ObjectElement.refract=os(Oe.ObjectElement);Oe.ArrayElement.refract=os(Oe.ArrayElement);Oe.StringElement.refract=os(Oe.StringElement);Oe.BooleanElement.refract=os(Oe.BooleanElement);Oe.NullElement.refract=os(Oe.NullElement);Oe.NumberElement.refract=os(Oe.NumberElement);Oe.LinkElement.refract=os(Oe.LinkElement);Oe.RefElement.refract=os(Oe.RefElement);jy.refract=os(jy);Ny.refract=os(Ny);rs.refract=os(rs);const mfe=(t,e)=>{const r=new LH({predicate:t});return xn(e,r),new Oe.ArraySlice(r.result)},$H=(t,e)=>{const r=new LH({predicate:t,returnOnTrue:ir});return xn(e,r),rH(void 0,[0],r.result)},iy=(t,e=new WeakMap)=>(ss(t)?(e.set(t.key,t),iy(t.key,e),e.set(t.value,t),iy(t.value,e)):t.children.forEach(r=>{e.set(r,t),iy(r,e)}),e),yfe=(t,e,r)=>{const n=r.get(t);ss(n)&&(n.key===t&&(n.key=e,r.delete(t),r.set(e,n)),n.value===t&&(n.value=e,r.delete(t),r.set(e,n)))},gfe=(t,e,r)=>{const n=r.get(t);dr(n)&&(n.content=n.map((i,a,o)=>o===t?(r.delete(t),r.set(e,n),e):o))},vfe=(t,e,r)=>{const n=r.get(t);ei(n)&&(n.content=n.map(i=>i===t?(r.delete(t),r.set(e,n),e):i))};class bfe{element;edges;constructor({element:e}){this.element=e}transclude(e,r){var n;if(e===this.element)return r;if(e===r)return this.element;this.edges=(n=this.edges)!==null&&n!==void 0?n:iy(this.element);const i=this.edges.get(e);if(!dl(i))return dr(i)?gfe(e,r,this.edges):ei(i)?vfe(e,r,this.edges):ss(i)&&yfe(e,r,this.edges),this.element}}const Efe=(t,e,r)=>new bfe({element:r}).transclude(t,e),UH=(t,e=NH)=>{if(gu(t))try{return e.fromRefract(JSON.parse(t))}catch{}return ts(t)&&wd("element",t)?e.fromRefract(t):e.toElement(t)},zH=t=>typeof t?.type=="string"?t.type:Xc(t),VH={EphemeralObject:["content"],EphemeralArray:["content"],...Rs},HH=(t,e,{keyMap:r=VH,...n}={})=>xn(t,e,{keyMap:r,nodeTypeGetter:zH,nodePredicate:Eo,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});HH[Symbol.for("nodejs.util.promisify.custom")]=async(t,{keyMap:e=VH,...r}={})=>xn[Symbol.for("nodejs.util.promisify.custom")](t,visitor,{keyMap:e,nodeTypeGetter:zH,nodePredicate:Eo,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});class Sfe{type="EphemeralArray";content=[];reference=void 0;constructor(e){this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class _fe{type="EphemeralObject";content=[];reference=void 0;constructor(e){this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}let wfe=class{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const r=new _fe(e.content);return this.references.set(e,r),r}};EphemeralObject={leave:e=>e.toObject()};MemberElement={enter:e=>[e.key,e.value]};ArrayElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const r=new Sfe(e.content);return this.references.set(e,r),r}};EphemeralArray={leave:e=>e.toArray()};references=new WeakMap;BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e,...r){var n;const i=r[3];return((n=i[i.length-1])===null||n===void 0?void 0:n.type)==="EphemeralObject"?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return Bt(e.href)?e.href.toValue():""}};const He=t=>ln(t)?Bt(t)||Aj(t)||vp(t)||Oj(t)?t.toValue():HH(t,new wfe):t,My=t=>{const e=t.meta.length>0?mt(t.meta):void 0,r=t.attributes.length>0?mt(t.attributes):void 0;return new t.constructor(void 0,e,r)},Iy=(t,e)=>e.clone&&e.isMergeableElement(t)?Oa(My(t),t,e):t,xfe=(t,e)=>{if(typeof e.customMerge!="function")return Oa;const r=e.customMerge(t,e);return typeof r=="function"?r:Oa},Afe=t=>typeof t.customMetaMerge!="function"?e=>mt(e):t.customMetaMerge,Ofe=t=>typeof t.customAttributesMerge!="function"?e=>mt(e):t.customAttributesMerge,Cfe=(t,e,r)=>t.concat(e)["fantasy-land/map"](n=>Iy(n,r)),Tfe=(t,e,r)=>{const n=dr(t)?My(t):My(e);return dr(t)&&t.forEach((i,a,o)=>{const u=Pn(o);u.value=Iy(i,r),n.content.push(u)}),e.forEach((i,a,o)=>{const u=He(a);let c;if(dr(t)&&t.hasKey(u)&&r.isMergeableElement(i)){const f=t.get(u);c=Pn(o),c.value=xfe(a,r)(f,i,r)}else c=Pn(o),c.value=Iy(i,r);n.remove(u),n.content.push(c)}),n},qm={clone:!0,isMergeableElement:t=>dr(t)||ei(t),arrayElementMerge:Cfe,objectElementMerge:Tfe,customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Oa=(t,e,r)=>{var n,i,a;const o={...qm,...r};o.isMergeableElement=(n=o.isMergeableElement)!==null&&n!==void 0?n:qm.isMergeableElement,o.arrayElementMerge=(i=o.arrayElementMerge)!==null&&i!==void 0?i:qm.arrayElementMerge,o.objectElementMerge=(a=o.objectElementMerge)!==null&&a!==void 0?a:qm.objectElementMerge;const u=ei(e),c=ei(t);if(!(u===c))return Iy(e,o);const p=u&&typeof o.arrayElementMerge=="function"?o.arrayElementMerge(t,e,o):o.objectElementMerge(t,e,o);return p.meta=Afe(o)(t.meta,e.meta),p.attributes=Ofe(o)(t.attributes,e.attributes),p};Oa.all=(t,e)=>{if(!Array.isArray(t))throw new TypeError("First argument of deepmerge should be an array.");return t.length===0?new Oe.ObjectElement:t.reduce((r,n)=>Oa(r,n,e),My(t[0]))};class Nj extends tn{}class JH extends Nj{}const Rfe=async(t,e)=>{let r=t,n=!1;if(!RH(t)){const o=Pn(t);o.classes.push("result"),r=new rs([o]),n=!0}const i=new Nc({uri:e.resolve.baseURI,parseResult:r,mediaType:e.parse.mediaType}),a=await _j("canDereference",[i,e],e.dereference.strategies);if(gp(a))throw new JH(i.uri);try{const{result:o}=await wj("dereference",[i,e],a);return n?o.get(0):o}catch(o){throw new Nj(`Error while dereferencing file "${i.uri}"`,{cause:o})}};let Ep=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:e,allowEmpty:r=!0,sourceMap:n=!1,fileExtensions:i=[],mediaTypes:a=[]}){this.name=e,this.allowEmpty=r,this.sourceMap=n,this.fileExtensions=i,this.mediaTypes=a}};class jfe{name;constructor({name:e}){this.name=e}}class Nfe extends jfe{timeout;redirects;withCredentials;constructor(e){const{name:r="http-resolver",timeout:n=5e3,redirects:i=5,withCredentials:a=!1}=e??{};super({name:r}),this.timeout=n,this.redirects=i,this.withCredentials=a}canRead(e){return Sj(e.uri)}}class Mfe{name;constructor({name:e}){this.name=e}}class Ife{name;constructor({name:e}){this.name=e}}class CO extends Array{includesCycle(e){return this.filter(r=>r.has(e)).length>1}includes(e,r){return e instanceof Set?super.includes(e,r):this.some(n=>n.has(e))}findItem(e){for(const r of this)for(const n of r)if(ln(n)&&e(n))return n}}let co=class{uri;depth;value;refSet;errors;constructor({uri:e,depth:r=0,refSet:n,value:i}){this.uri=e,this.value=i,this.depth=r,this.refSet=n,this.errors=[]}};class GH extends tn{}class kfe extends GH{}class Dfe extends tn{}class Mj extends Dfe{}class Pfe extends GH{constructor(e){super(`Invalid JSON Schema $anchor "${e}".`)}}class Ac extends Nj{}class qfe extends Ry{}class ho extends QC{}const Bfe=async(t,e={})=>{const r=bH(vH,e);return Rfe(t,r)},{fetch:Lfe,Response:Ffe,Headers:$fe,Request:Ufe,FormData:zfe,File:Vfe,Blob:Hfe}=globalThis;typeof globalThis.fetch>"u"&&(globalThis.fetch=Lfe);typeof globalThis.Headers>"u"&&(globalThis.Headers=$fe);typeof globalThis.Request>"u"&&(globalThis.Request=Ufe);typeof globalThis.Response>"u"&&(globalThis.Response=Ffe);typeof globalThis.FormData>"u"&&(globalThis.FormData=zfe);typeof globalThis.File>"u"&&(globalThis.File=Vfe);typeof globalThis.Blob>"u"&&(globalThis.Blob=Hfe);function CU(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r
"u"?"undefined":Oc(t))==="object"&&t!==null){var r;if(ZH(t))r=[];else if(ede(t))r=new Date(t.getTime?t.getTime():t);else if(tde(t))r=new RegExp(t);else if(rde(t))r={message:t.message};else if(nde(t)||ide(t)||ade(t))r=Object(t);else{if(XH(t))return t.slice();r=Object.create(Object.getPrototypeOf(t))}var n=e.includeSymbols?Ij:Object.keys,i=!0,a=!1,o=void 0;try{for(var u=n(t)[Symbol.iterator](),c;!(i=(c=u.next()).done);i=!0){var f=c.value;r[f]=t[f]}}catch(p){a=!0,o=p}finally{try{!i&&u.return!=null&&u.return()}finally{if(a)throw o}}return r}return t}var eJ={includeSymbols:!1,immutable:!1};function RU(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eJ,n=[],i=[],a=!0,o=r.includeSymbols?Ij:Object.keys,u=!!r.immutable;return(function c(f){var p=u?QH(f,r):f,h={},v=!0,g={node:p,node_:f,path:[].concat(n),parent:i[i.length-1],parents:i,key:n[n.length-1],isRoot:n.length===0,level:n.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(V){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;g.isRoot||(g.parent.node[g.key]=V),g.node=V,U&&(v=!1)},delete:function(V){delete g.parent.node[g.key],V&&(v=!1)},remove:function(V){ZH(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],V&&(v=!1)},keys:null,before:function(V){h.before=V},after:function(V){h.after=V},pre:function(V){h.pre=V},post:function(V){h.post=V},stop:function(){a=!1},block:function(){v=!1}};if(!a)return g;function E(){if(Oc(g.node)==="object"&&g.node!==null){(!g.keys||g.node_!==g.node)&&(g.keys=o(g.node)),g.isLeaf=g.keys.length===0;for(var P=0;P 1&&arguments[1]!==void 0?arguments[1]:eJ;Gfe(this,t),TU(this,Li),TU(this,Xo),TO(this,Li,e),TO(this,Xo,r)}return Wfe(t,[{key:"get",value:function(r){for(var n=Si(this,Li),i=0;n&&i "u"?"undefined":Oc(a))==="symbol")return;n=n[a]}return n}},{key:"has",value:function(r){for(var n=Si(this,Li),i=0;n&&i "u"?"undefined":Oc(a))==="symbol")return!1;n=n[a]}return!0}},{key:"set",value:function(r,n){var i=Si(this,Li),a=0;for(a=0;a "u"?"undefined":Oc(o))==="object"&&o!==null){var c=QH(o,i);r.push(o),n.push(c);var f=i.includeSymbols?Ij:Object.keys,p=!0,h=!1,v=void 0;try{for(var g=f(o)[Symbol.iterator](),E;!(p=(E=g.next()).done);p=!0){var S=E.value;c[S]=a(o[S])}}catch(_){h=!0,v=_}finally{try{!p&&g.return!=null&&g.return()}finally{if(h)throw v}}return r.pop(),n.pop(),c}return o})(Si(this,Li))}}]),t})();Li=new WeakMap;Xo=new WeakMap;var Ms=function(t,e){return new Ns(t,e)};Ms.get=function(t,e,r){return new Ns(t,r).get(e)};Ms.set=function(t,e,r,n){return new Ns(t,n).set(e,r)};Ms.has=function(t,e,r){return new Ns(t,r).has(e)};Ms.map=function(t,e,r){return new Ns(t,r).map(e)};Ms.forEach=function(t,e,r){return new Ns(t,r).forEach(e)};Ms.reduce=function(t,e,r,n){return new Ns(t,n).reduce(e,r)};Ms.paths=function(t,e){return new Ns(t,e).paths()};Ms.nodes=function(t,e){return new Ns(t,e).nodes()};Ms.clone=function(t,e){return new Ns(t,e).clone()};var cde=Ms;const tJ="application/json, application/yaml",ky="https://swagger.io",fde=Object.freeze({url:"/"}),rJ=3e3,dde=["properties"],pde=["properties"],hde=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],mde=["schema/example","items/example"];function nJ(t){const e=t[t.length-1],r=t[t.length-2],n=t.join("/");return dde.indexOf(e)>-1&&pde.indexOf(r)===-1||hde.indexOf(n)>-1||mde.some(i=>n.indexOf(i)>-1)}function yde(t,e,{specmap:r,getBaseUrlForNodePath:n=a=>r.getContext([...e,...a]).baseDoc,targetKeys:i=["$ref","$$ref"]}={}){const a=[];return cde(t).forEach(function(){if(i.includes(this.key)&&typeof this.node=="string"){const u=this.path,c=e.concat(this.path),f=eT(this.node,n(u));a.push(r.replace(c,f))}}),a}function eT(t,e){const[r,n]=t.split("#"),i=e??"",a=r??"";let o;if(Sj(i))o=Xn(i,a);else{const u=Xn(ky,i),f=Xn(u,a).replace(ky,"");o=a.startsWith("/")?f:f.substring(1)}return n?`${o}#${n}`:o}const gde=/^([a-z]+:\/\/|\/\/)/i;class kc extends xs{}const uo={},jU=new WeakMap,vde=[t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"],bde=t=>vde.some(e=>e(t)),Ede={key:"$ref",plugin:(t,e,r,n)=>{const i=n.getInstance(),a=r.slice(0,-1);if(nJ(a)||bde(a))return;const{baseDoc:o}=n.getContext(r);if(typeof t!="string")return new kc("$ref: must be a string (JSON-Ref)",{$ref:t,baseDoc:o,fullPath:r});const u=aJ(t),c=u[0],f=u[1]||"";let p;try{p=o||c?iJ(c,o):null}catch(S){return tT(S,{pointer:f,$ref:t,basePath:p,fullPath:r})}let h,v;if(Ade(f,p,a,n)&&!i.useCircularStructures){const S=eT(t,p);return t===S?null:Or.replace(r,S)}if(p==null?(v=Dj(f),h=n.get(v),typeof h>"u"&&(h=new kc(`Could not resolve reference: ${t}`,{pointer:f,$ref:t,baseDoc:o,fullPath:r}))):(h=sJ(p,f),h.__value!=null?h=h.__value:h=h.catch(S=>{throw tT(S,{pointer:f,$ref:t,baseDoc:o,fullPath:r})})),h instanceof Error)return[Or.remove(r),h];const g=eT(t,p),E=Or.replace(a,h,{$$ref:g});if(p&&p!==o)return[E,Or.context(a,{baseDoc:p})];try{if(!Ode(n.state,E)||i.useCircularStructures)return E}catch{return null}}},kj=Object.assign(Ede,{docCache:uo,absoluteify:iJ,clearCache:Sde,JSONRefError:kc,wrapError:tT,getDoc:oJ,split:aJ,extractFromDoc:sJ,fetchJSON:_de,extract:rT,jsonPointerToArray:Dj,unescapeJsonPointerToken:lJ});function iJ(t,e){if(!gde.test(t)){if(!e)throw new kc(`Tried to resolve a relative URL, without having a basePath. path: '${t}' basePath: '${e}'`);return Xn(e,t)}return t}function tT(t,e){let r;return t&&t.response&&t.response.body?r=`${t.response.body.code} ${t.response.body.message}`:r=t.message,new kc(`Could not resolve reference: ${r}`,{...e,cause:t})}function aJ(t){return(t+"").split("#")}function sJ(t,e){const r=uo[t];if(r&&!Or.isPromise(r))try{const n=rT(e,r);return Object.assign(Promise.resolve(n),{__value:n})}catch(n){return Promise.reject(n)}return oJ(t).then(n=>rT(e,n))}function Sde(t){typeof t<"u"?delete uo[t]:Object.keys(uo).forEach(e=>{delete uo[e]})}function oJ(t){const e=uo[t];return e?Or.isPromise(e)?e:Promise.resolve(e):(uo[t]=kj.fetchJSON(t).then(r=>(uo[t]=r,r)),uo[t])}function _de(t){return fetch(t,{headers:{Accept:tJ},loadSpec:!0}).then(e=>e.text()).then(e=>au.load(e))}function rT(t,e){const r=Dj(t);if(r.length<1)return e;const n=Or.getIn(e,r);if(typeof n>"u")throw new kc(`Could not resolve pointer: ${t} does not exist in document`,{pointer:t});return n}function Dj(t){if(typeof t!="string")throw new TypeError(`Expected a string, got a ${typeof t}`);return t[0]==="/"&&(t=t.substr(1)),t===""?[]:t.split("/").map(lJ)}function lJ(t){return typeof t!="string"?t:new URLSearchParams(`=${t.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function uJ(t){return new URLSearchParams([["",t.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function wde(t){return t.length===0?"":`/${t.map(uJ).join("/")}`}const xde=t=>!t||t==="/"||t==="#";function RO(t,e){if(xde(e))return!0;const r=t.charAt(e.length),n=e.slice(-1);return t.indexOf(e)===0&&(!r||r==="/"||r==="#")&&n!=="#"}function Ade(t,e,r,n){let i=jU.get(n);i||(i={},jU.set(n,i));const a=wde(r),o=`${e||" "}#${t}`,u=a.replace(/allOf\/\d+\/?/g,""),c=n.contextTree.get([]).baseDoc;if(e===c&&RO(u,t))return!0;let f="";if(r.some(h=>(f=`${f}/${uJ(h)}`,i[f]&&i[f].some(v=>RO(v,o)||RO(o,v)))))return!0;i[u]=(i[u]||[]).concat(o)}function Ode(t,e){const r=[t];return e.path.reduce((i,a)=>(r.push(i[a]),i[a]),t),n(e.value);function n(i){return Or.isObject(i)&&(r.indexOf(i)>=0||Object.keys(i).some(a=>n(i[a])))}}const Cde={key:"allOf",plugin:(t,e,r,n,i)=>{if(i.meta&&i.meta.$$ref)return;const a=r.slice(0,-1);if(nJ(a))return;if(!Array.isArray(t)){const f=new TypeError("allOf must be an array");return f.fullPath=r,f}let o=!1,u=i.value;if(a.forEach(f=>{u&&(u=u[f])}),u={...u},Object.keys(u).length===0)return;delete u.allOf;const c=[];return c.push(n.replace(a,{})),t.forEach((f,p)=>{if(!n.isObject(f)){if(o)return null;o=!0;const g=new TypeError("Elements in allOf must be objects");return g.fullPath=r,c.push(g)}c.push(n.mergeDeep(a,f));const h=r.slice(0,-1),v=yde(f,h,{getBaseUrlForNodePath:g=>n.getContext([...r,p,...g]).baseDoc,specmap:n});c.push(...v)}),u.example&&c.push(n.remove([].concat(a,"example"))),c.push(n.mergeDeep(a,u)),u.$$ref||c.push(n.remove([].concat(a,"$$ref"))),c}},Tde={key:"parameters",plugin:(t,e,r,n)=>{if(Array.isArray(t)&&t.length){const i=Object.assign([],t),a=r.slice(0,-1),o={...Or.getIn(n.spec,a)};for(let u=0;u {const i={...t};for(const o in t)try{i[o].default=n.modelPropertyMacro(i[o])}catch(u){const c=new Error(u);return c.fullPath=r,c}return Or.replace(r,i)}};class jde{constructor(e){this.root=jO(e||{})}set(e,r){const n=this.getParent(e,!0);if(!n){Dy(this.root,r,null);return}const i=e[e.length-1],{children:a}=n;if(a[i]){Dy(a[i],r,n);return}a[i]=jO(r,n)}get(e){if(e=e||[],e.length<1)return this.root.value;let r=this.root,n,i;for(let a=0;a {if(!n)return n;const{children:a}=n;return!a[i]&&r&&(a[i]=jO(null,n)),a[i]},this.root)}}function jO(t,e){return Dy({children:{}},t,e)}function Dy(t,e,r){return t.value=e||{},t.protoValue=r?{...r.protoValue,...t.value}:t.value,Object.keys(t.children).forEach(n=>{const i=t.children[n];t.children[n]=Dy(i,i.value,t)}),t}const NU=100,MU=()=>{};class Nde{static getPluginName(e){return e.pluginName}static getPatchesOfType(e,r){return e.filter(r)}constructor(e){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new jde,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),Or,{getInstance:()=>this}),allowMetaPatches:!1},e),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(Or.isFunction),this.patches.push(Or.add([],this.spec)),this.patches.push(Or.context([],this.context)),this.updatePatches(this.patches)}debug(e,...r){this.debugLevel===e&&console.log(...r)}verbose(e,...r){this.debugLevel==="verbose"&&console.log(`[${e}] `,...r)}wrapPlugin(e,r){const{pathDiscriminator:n}=this;let i=null,a;return e[this.pluginProp]?(i=e,a=e[this.pluginProp]):Or.isFunction(e)?a=e:Or.isObject(e)&&(a=o(e)),Object.assign(a.bind(i),{pluginName:e.name||r,isGenerator:Or.isGenerator(a)});function o(u){const c=(f,p)=>Array.isArray(f)?f.every((h,v)=>h===p[v]):!0;return function*(p,h){const v={};for(const[E,S]of p.filter(Or.isAdditiveMutation).entries())if(E this.getMutationsForPlugin(e).length>0)}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map(e=>e.value))}getPluginHistory(e){const r=this.constructor.getPluginName(e);return this.pluginHistory[r]||[]}getPluginRunCount(e){return this.getPluginHistory(e).length}getPluginHistoryTip(e){const r=this.getPluginHistory(e);return r&&r[r.length-1]||{}}getPluginMutationIndex(e){const r=this.getPluginHistoryTip(e).mutationIndex;return typeof r!="number"?-1:r}updatePluginHistory(e,r){const n=this.constructor.getPluginName(e);this.pluginHistory[n]=this.pluginHistory[n]||[],this.pluginHistory[n].push(r)}updatePatches(e){Or.normalizeArray(e).forEach(r=>{if(r instanceof Error){this.errors.push(r);return}try{if(!Or.isObject(r)){this.debug("updatePatches","Got a non-object patch",r);return}if(this.showDebug&&this.allPatches.push(r),Or.isPromise(r.value)){this.promisedPatches.push(r),this.promisedPatchThen(r);return}if(Or.isContextPatch(r)){this.setContext(r.path,r.value);return}Or.isMutation(r)&&this.updateMutations(r)}catch(n){console.error(n),this.errors.push(n)}})}updateMutations(e){typeof e.value=="object"&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value={...e.value});const r=Or.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});r&&(this.mutations.push(e),this.state=r)}removePromisedPatch(e){const r=this.promisedPatches.indexOf(e);if(r<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}this.promisedPatches.splice(r,1)}promisedPatchThen(e){return e.value=e.value.then(r=>{const n={...e,value:r};this.removePromisedPatch(e),this.updatePatches(n)}).catch(r=>{this.removePromisedPatch(e),this.updatePatches(r)}),e.value}getMutations(e,r){return e=e||0,typeof r!="number"&&(r=this.mutations.length),this.mutations.slice(e,r)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(e){const r=this.getPluginMutationIndex(e);return this.getMutations(r+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(e){return Or.getIn(this.state,e)}_getContext(e){return this.contextTree.get(e)}setContext(e,r){return this.contextTree.set(e,r)}_hasRun(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}dispatch(){const e=this,r=this.nextPlugin();if(!r){const a=this.nextPromisedPatch();if(a)return a.then(()=>this.dispatch()).catch(()=>this.dispatch());const o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),Promise.resolve(o)}if(e.pluginCount=e.pluginCount||new WeakMap,e.pluginCount.set(r,(e.pluginCount.get(r)||0)+1),e.pluginCount[r]>NU)return Promise.resolve({spec:e.state,errors:e.errors.concat(new Error(`We've reached a hard limit of ${NU} plugin runs`))});if(r!==this.currentPlugin&&this.promisedPatches.length){const a=this.promisedPatches.map(o=>o.value);return Promise.all(a.map(o=>o.then(MU,MU))).then(()=>this.dispatch())}return n();function n(){e.currentPlugin=r;const a=e.getCurrentMutations(),o=e.mutations.length-1;try{if(r.isGenerator)for(const u of r(a,e.getLib()))i(u);else{const u=r(a,e.getLib());i(u)}}catch(u){console.error(u),i([Object.assign(Object.create(u),{plugin:r})])}finally{e.updatePluginHistory(r,{mutationIndex:o})}return e.dispatch()}function i(a){a&&(a=Or.fullyNormalizeArray(a),e.updatePatches(a,r))}}}function Mde(t){return new Nde(t).dispatch()}const cc={refs:kj,allOf:Cde,parameters:Tde,properties:Rde};function cJ(t,e={}){const{requestInterceptor:r,responseInterceptor:n}=e,i=t.withCredentials?"include":"same-origin";return a=>t({url:a,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:tJ},credentials:i}).then(o=>o.body)}function Pj(t,e){return!e&&typeof navigator<"u"&&(e=navigator),e&&e.product==="ReactNative"?!!(t&&typeof t=="object"&&typeof t.uri=="string"):typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||ArrayBuffer.isView(t)?!0:t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function fJ(t,e){return Array.isArray(t)&&t.some(r=>Pj(r,e))}class nT extends File{constructor(e,r="",n={}){super([e],r,n),this.data=e}valueOf(){return this.data}toString(){return this.valueOf()}}const Ide=t=>":/?#[]@!$&'()*+,;=".indexOf(t)>-1,kde=t=>/^[a-z0-9\-._~]+$/i.test(t);function dJ(t,e="reserved"){return[...t].map(r=>{if(kde(r)||Ide(r)&&e==="unsafe")return r;const n=new TextEncoder;return Array.from(n.encode(r)).map(a=>`0${a.toString(16).toUpperCase()}`.slice(-2)).map(a=>`%${a}`).join("")}).join("")}function qj(t){const{value:e}=t;return Array.isArray(e)?Dde(t):typeof e=="object"?Pde(t):qde(t)}function Zn(t,e=!1){return Array.isArray(t)||t!==null&&typeof t=="object"?t=JSON.stringify(t):(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),e&&typeof t=="string"&&t.length>0?dJ(t,e):t??""}function Dde({key:t,value:e,style:r,explode:n,escape:i}){if(r==="simple")return e.map(a=>Zn(a,i)).join(",");if(r==="label")return`.${e.map(a=>Zn(a,i)).join(".")}`;if(r==="matrix")return e.map(a=>Zn(a,i)).reduce((a,o)=>!a||n?`${a||""};${t}=${o}`:`${a},${o}`,"");if(r==="form"){const a=n?`&${t}=`:",";return e.map(o=>Zn(o,i)).join(a)}if(r==="spaceDelimited"){const a=n?`${t}=`:"";return e.map(o=>Zn(o,i)).join(` ${a}`)}if(r==="pipeDelimited"){const a=n?`${t}=`:"";return e.map(o=>Zn(o,i)).join(`|${a}`)}}function Pde({key:t,value:e,style:r,explode:n,escape:i}){const a=Object.keys(e);if(r==="simple")return a.reduce((o,u)=>{const c=Zn(e[u],i),f=n?"=":",";return`${o?`${o},`:""}${u}${f}${c}`},"");if(r==="label")return a.reduce((o,u)=>{const c=Zn(e[u],i),f=n?"=":".";return`${o?`${o}.`:"."}${u}${f}${c}`},"");if(r==="matrix"&&n)return a.reduce((o,u)=>{const c=Zn(e[u],i);return`${o?`${o};`:";"}${u}=${c}`},"");if(r==="matrix")return a.reduce((o,u)=>{const c=Zn(e[u],i);return`${o?`${o},`:`;${t}=`}${u},${c}`},"");if(r==="form")return a.reduce((o,u)=>{const c=Zn(e[u],i);return`${o?`${o}${n?"&":","}`:""}${u}${n?"=":","}${c}`},"")}function qde({key:t,value:e,style:r,escape:n}){if(r==="simple")return Zn(e,n);if(r==="label")return`.${Zn(e,n)}`;if(r==="matrix")return`;${t}=${Zn(e,n)}`;if(r==="form"||r==="deepObject")return Zn(e,n)}const Bde={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Lde={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function pJ(t,e,r=!1){const{collectionFormat:n,allowEmptyValue:i,serializationOption:a,encoding:o}=e,u=typeof e=="object"&&!Array.isArray(e)?e.value:e,c=r?p=>p.toString():p=>encodeURIComponent(p),f=c(t);if(typeof u>"u"&&i)return[[f,""]];if(Pj(u)||fJ(u))return[[f,u]];if(a)return IU(t,u,r,a);if(o){if([typeof o.style,typeof o.explode,typeof o.allowReserved].some(p=>p!=="undefined")){const{style:p,explode:h,allowReserved:v}=o;return IU(t,u,r,{style:p,explode:h,allowReserved:v})}if(typeof o.contentType=="string"){if(o.contentType.startsWith("application/json")){const v=typeof u=="string"?u:JSON.stringify(u),g=c(v),E=new nT(g,"blob",{type:o.contentType});return[[f,E]]}const p=c(String(u)),h=new nT(p,"blob",{type:o.contentType});return[[f,h]]}return typeof u!="object"?[[f,c(u)]]:Array.isArray(u)&&u.every(p=>typeof p!="object")?[[f,u.map(c).join(",")]]:[[f,c(JSON.stringify(u))]]}return typeof u!="object"?[[f,c(u)]]:Array.isArray(u)?n==="multi"?[[f,u.map(c)]]:[[f,u.map(c).join(Lde[n||"csv"])]]:[[f,""]]}function IU(t,e,r,n){const i=n.style||"form",a=typeof n.explode>"u"?i==="form":n.explode,o=r?!1:n&&n.allowReserved?"unsafe":"reserved",u=f=>Zn(f,o),c=r?f=>f:f=>u(f);return typeof e!="object"?[[c(t),u(e)]]:Array.isArray(e)?a?[[c(t),e.map(u)]]:[[c(t),e.map(u).join(Bde[i])]]:i==="deepObject"?Object.keys(e).map(f=>[c(`${t}[${f}]`),u(e[f])]):a?Object.keys(e).map(f=>[c(f),u(e[f])]):[[c(t),Object.keys(e).map(f=>[`${c(f)},${u(e[f])}`]).join(",")]]}function Fde(t){return Object.entries(t).reduce((e,[r,n])=>{for(const[i,a]of pJ(r,n,!0))if(Array.isArray(a))for(const o of a)if(ArrayBuffer.isView(o)){const u=new Blob([o]);e.append(i,u)}else e.append(i,o);else if(ArrayBuffer.isView(a)){const o=new Blob([a]);e.append(i,o)}else e.append(i,a);return e},new FormData)}const $de=(t,{encode:e=!0}={})=>{const r=(a,o,u)=>(Array.isArray(u)?u.reduce((c,f)=>r(a,o,f),a):u instanceof Date?a.append(o,u.toISOString()):typeof u=="object"?Object.entries(u).reduce((c,[f,p])=>r(a,`${o}[${f}]`,p),a):a.append(o,u),a),n=Object.entries(t).reduce((a,[o,u])=>r(a,o,u),new URLSearchParams),i=String(n);return e?i:decodeURIComponent(i)};function kU(t){const e=Object.keys(t).reduce((r,n)=>{for(const[i,a]of pJ(n,t[n]))a instanceof nT?r[i]=a.valueOf():r[i]=a;return r},{});return $de(e,{encode:!1})}function Bj(t={}){const{url:e="",query:r,form:n}=t,i=(...a)=>{const o=a.filter(u=>u).join("&");return o?`?${o}`:""};if(n){const a=Object.keys(n).some(u=>{const{value:c}=n[u];return Pj(c)||fJ(c)}),o=t.headers["content-type"]||t.headers["Content-Type"];if(a||/multipart\/form-data/i.test(o)){const u=Fde(t.form);t.formdata=u,t.body=u}else t.body=kU(n);delete t.form}if(r){const[a,o]=e.split("?");let u="";if(o){const f=new URLSearchParams(o);Object.keys(r).forEach(h=>f.delete(h)),u=String(f)}const c=i(u,kU(r));t.url=a+c,delete t.query}return t}const Ude=(t="")=>/(json|xml|yaml|text)\b/.test(t);function zde(t,e){if(e){if(e.indexOf("application/json")===0||e.indexOf("+json")>0)return JSON.parse(t);if(e.indexOf("application/xml")===0||e.indexOf("+xml")>0)return t}return au.load(t)}function Vde(t){return t.includes(", ")?t.split(", "):t}function Hde(t={}){return typeof t.entries!="function"?{}:Array.from(t.entries()).reduce((e,[r,n])=>(e[r]=Vde(n),e),{})}function hJ(t,e,{loadSpec:r=!1}={}){const n={ok:t.ok,url:t.url||e,status:t.status,statusText:t.statusText,headers:Hde(t.headers)},i=n.headers["content-type"],a=r||Ude(i);return(a?t.text:t.blob||t.buffer).call(t).then(u=>{if(n.text=u,n.data=u,a)try{const c=zde(u,i);n.body=c,n.obj=c}catch(c){n.parseError=c}return n})}async function Dd(t,e={}){typeof t=="object"&&(e=t,t=e.url),e.headers=e.headers||{},e=Bj(e),e.headers&&Object.keys(e.headers).forEach(i=>{const a=e.headers[i];typeof a=="string"&&(e.headers[i]=a.replace(/\n+/g," "))}),e.requestInterceptor&&(e=await e.requestInterceptor(e)||e);const r=e.headers["content-type"]||e.headers["Content-Type"];/multipart\/form-data/i.test(r)&&(delete e.headers["content-type"],delete e.headers["Content-Type"]);let n;try{n=await(e.userFetch||fetch)(e.url,e),n=await hJ(n,t,e),e.responseInterceptor&&(n=await e.responseInterceptor(n)||n)}catch(i){if(!n)throw i;const a=new Error(n.statusText||`response status is ${n.status}`);throw a.status=n.status,a.statusCode=n.status,a.responseError=i,a}if(!n.ok){const i=new Error(n.statusText||`response status is ${n.status}`);throw i.status=n.status,i.statusCode=n.status,i.response=n,i}return n}function Jde(t,e,r){return r=r||(n=>n),e=e||(n=>n),n=>(typeof n=="string"&&(n={url:n}),n=Bj(n),n=e(n),r(t(n)))}const Lj=t=>{var e,r;const{baseDoc:n,url:i}=t,a=(e=n??i)!==null&&e!==void 0?e:"";return typeof((r=globalThis.document)===null||r===void 0?void 0:r.baseURI)=="string"?String(new URL(a,globalThis.document.baseURI)):a},mJ=t=>{const{fetch:e,http:r}=t;return e||r||Dd};async function Fj(t){const{spec:e,mode:r,allowMetaPatches:n=!0,pathDiscriminator:i,modelPropertyMacro:a,parameterMacro:o,requestInterceptor:u,responseInterceptor:c,skipNormalization:f=!1,useCircularStructures:p,strategies:h}=t,v=Lj(t),g=mJ(t),E=h.find(_=>_.match(e));return S(e);async function S(_){v&&(cc.refs.docCache[v]=_),cc.refs.fetchJSON=cJ(g,{requestInterceptor:u,responseInterceptor:c});const A=[cc.refs];typeof o=="function"&&A.push(cc.parameters),typeof a=="function"&&A.push(cc.properties),r!=="strict"&&A.push(cc.allOf);const w=await Mde({spec:_,context:{baseDoc:v},plugins:A,allowMetaPatches:n,pathDiscriminator:i,parameterMacro:o,modelPropertyMacro:a,useCircularStructures:p});return f||(w.spec=E.normalize(w.spec)),w}}const yJ=t=>t.replace(/\W/gi,"_");function Gde(t,e,{v2OperationIdCompatibilityMode:r}={}){if(r){let n=`${e.toLowerCase()}_${t}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return n=n||`${t.substring(1)}_${e}`,n.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${e.toLowerCase()}${yJ(t)}`}function wg(t,e,r="",{v2OperationIdCompatibilityMode:n}={}){return!t||typeof t!="object"?null:(t.operationId||"").replace(/\s/g,"").length?yJ(t.operationId):Gde(e,r,{v2OperationIdCompatibilityMode:n})}function $j(t){const{spec:e}=t,{paths:r}=e,n={};if(!r||e.$$normalized)return t;for(const i in r){const a=r[i];if(a==null||!["object","function"].includes(typeof a))continue;const o=a.parameters;for(const u in a){const c=a[u];if(c==null||!["object","function"].includes(typeof c))continue;const f=wg(c,i,u);if(f){n[f]?n[f].push(c):n[f]=[c];const p=n[f];if(p.length>1)p.forEach((h,v)=>{h.__originalOperationId=h.__originalOperationId||h.operationId,h.operationId=`${f}${v+1}`});else if(typeof c.operationId<"u"){const h=p[0];h.__originalOperationId=h.__originalOperationId||c.operationId,h.operationId=f}}if(u!=="parameters"){const p=[],h={};for(const v in e)(v==="produces"||v==="consumes"||v==="security")&&(h[v]=e[v],p.push(h));if(o&&(h.parameters=o,p.push(h)),p.length){for(const v of p)for(const g in v)if(!Array.isArray(c[g]))c[g]=v[g];else if(g==="parameters")for(const E of v[g])c[g].some(_=>!ts(_)&&!ts(E)?!1:_===E?!0:["name","$ref","$$ref"].some(A=>typeof _[A]=="string"&&typeof E[A]=="string"&&_[A]===E[A]))||c[g].push(E)}}}}return e.$$normalized=!0,t}const gJ={name:"generic",match(){return!0},normalize(t){const{spec:e}=$j({spec:t});return e},async resolve(t){return Fj(t)}};async function Kde(t){return Fj(t)}const Wde=t=>{try{const{swagger:e}=t;return e==="2.0"}catch{return!1}},vJ=t=>{try{const{openapi:e}=t;return typeof e=="string"&&/^3\.0\.(?:[1-9]\d*|0)$/.test(e)}catch{return!1}},Uj=t=>{try{const{openapi:e}=t;return typeof e=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(e)}catch{return!1}},bJ=t=>vJ(t)||Uj(t),EJ={name:"openapi-2",match(t){return Wde(t)},normalize(t){const{spec:e}=$j({spec:t});return e},async resolve(t){return Kde(t)}};async function Yde(t){return Fj(t)}const SJ={name:"openapi-3-0",match(t){return vJ(t)},normalize(t){const{spec:e}=$j({spec:t});return e},async resolve(t){return Yde(t)}},Xde=t=>{try{const e=t.startsWith("#")?t.slice(1):t;return decodeURIComponent(e)}catch{return t}},wa=t=>{const e=t.indexOf("#"),r=e===-1?"#":t.substring(e);return Xde(r)};function Sp(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+=`; JavaScript Object Notation (JSON) Pointer ABNF syntax +`,e+=`; https://datatracker.ietf.org/doc/html/rfc6901 +`,e+=`json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used +`,e+=`reference-token = *( unescaped / escaped ) +`,e+=`unescaped = %x00-2E / %x30-7D / %x7F-10FFFF +`,e+=` ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped' +`,e+=`escaped = "~" ( "0" / "1" ) +`,e+=` ; representing '~' and '/', respectively +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc6901#section-4 +`,e+=`array-location = array-index / array-dash +`,e+=`array-index = %x30 / ( %x31-39 *(%x30-39) ) +`,e+=` ; "0", or digits without a leading "0" +`,e+=`array-dash = "-" +`,e+=` +`,e+=`; Surrogate named rules +`,e+=`slash = "/" +`,e}}const ja=function(){const e=Yt,r=na,n=this,i="parser.js: Parser(): ",a=function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};n.ast=void 0,n.stats=void 0,n.trace=void 0,n.callbacks=[];let o=0,u=0,c=0,f=0,p=0,h,v,g,E,S=new a,_,A,w;const C=()=>{o=0,u=0,c=0,f=0,p=0,h=void 0,v=void 0,g=void 0,E=void 0,S.refresh(),_=void 0,A=void 0,w=void 0},R=()=>{const ne=`${i}initializeCallbacks(): `;let ce;for(_=[],A=[],ce=0;ce {const re=`${i}parse(): `;C(),E=r.stringToChars(ge),h=ne.rules,v=ne.udts;const he=ce.toLowerCase();let pe;for(const Q in h)if(h.hasOwnProperty(Q)&&he===h[Q].lower){pe=h[Q].index;break}if(pe===void 0)throw new Error(`${re}start rule name '${startRule}' not recognized`);R(),n.trace&&n.trace.init(h,v,E),n.stats&&n.stats.init(h,v),n.ast&&n.ast.init(h,v,E),w=G,g=[{type:e.RNM,index:pe}],te(0,0),g=void 0;let le=!1;switch(S.state){case e.ACTIVE:throw new Error(`${re}final state should never be 'ACTIVE'`);case e.NOMATCH:le=!1;break;case e.EMPTY:case e.MATCH:S.phraseLength===E.length?le=!0:le=!1;break;default:throw new Error("unrecognized state")}return{success:le,state:S.state,stateName:e.idName(S.state),length:E.length,matched:S.phraseLength,maxMatched:p,maxTreeDepth:c,nodeHits:f}};const O=(ne,ce)=>{const ge=g[ne];for(let G=0;G {let ge,G,re,he;const pe=g[ne];n.ast&&(G=n.ast.getLength()),ge=!0,re=ce,he=0;for(let le=0;le {let ge,G,re,he;const pe=g[ne];if(pe.max===0){S.state=e.EMPTY,S.phraseLength=0;return}for(G=ce,re=0,he=0,n.ast&&(ge=n.ast.getLength());!(G>=E.length||(te(ne+1,G),S.state===e.NOMATCH)||S.state===e.EMPTY||(he+=1,re+=S.phraseLength,G+=S.phraseLength,he===pe.max)););S.state===e.EMPTY||he>=pe.min?(S.state=re===0?e.EMPTY:e.MATCH,S.phraseLength=re):(S.state=e.NOMATCH,S.phraseLength=0,n.ast&&n.ast.setLength(ge))},D=(ne,ce,ge,G)=>{if(ce.phraseLength>ge){let re=`${i}opRNM(${ne.name}): callback function error: `;throw re+=`sysData.phraseLength: ${ce.phraseLength}`,re+=` must be <= remaining chars: ${ge}`,new Error(re)}switch(ce.state){case e.ACTIVE:if(!G)throw new Error(`${i}opRNM(${ne.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:ce.phraseLength=0;break;case e.MATCH:ce.phraseLength===0&&(ce.state=e.EMPTY);break;case e.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${i}opRNM(${ne.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},q=(ne,ce)=>{let ge,G,re;const he=g[ne],pe=h[he.index],le=_[pe.index];if(o||(G=n.ast&&n.ast.ruleDefined(he.index),G&&(ge=n.ast.getLength(),n.ast.down(he.index,h[he.index].name))),le){const Q=E.length-ce;le(S,E,ce,w),D(pe,S,Q,!0),S.state===e.ACTIVE&&(re=g,g=pe.opcodes,te(0,ce),g=re,le(S,E,ce,w),D(pe,S,Q,!1))}else re=g,g=pe.opcodes,te(0,ce),g=re;o||G&&(S.state===e.NOMATCH?n.ast.setLength(ge):n.ast.up(he.index,pe.name,ce,S.phraseLength))},H=(ne,ce)=>{const ge=g[ne];S.state=e.NOMATCH,ce {const ge=g[ne],G=ge.string.length;if(S.state=e.NOMATCH,ce+G<=E.length){for(let re=0;re {let ge;const G=g[ne];S.state=e.NOMATCH;const re=G.string.length;if(re===0){S.state=e.EMPTY;return}if(ce+re<=E.length){for(let he=0;he =65&&ge<=90&&(ge+=32),ge!==G.string[he])return;S.state=e.MATCH,S.phraseLength=re}},U=(ne,ce,ge)=>{if(ce.phraseLength>ge){let G=`${i}opUDT(${ne.name}): callback function error: `;throw G+=`sysData.phraseLength: ${ce.phraseLength}`,G+=` must be <= remaining chars: ${ge}`,new Error(G)}switch(ce.state){case e.ACTIVE:throw new Error(`${i}opUDT(${ne.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(ne.empty)ce.phraseLength=0;else throw new Error(`${i}opUDT(${ne.name}) may not return EMPTY.`);break;case e.MATCH:if(ce.phraseLength===0)if(ne.empty)ce.state=e.EMPTY;else throw new Error(`${i}opUDT(${ne.name}) may not return EMPTY.`);break;case e.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${i}opUDT(${ne.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},se=(ne,ce)=>{let ge,G,re;const he=g[ne],pe=v[he.index];S.UdtIndex=pe.index,o||(re=n.ast&&n.ast.udtDefined(he.index),re&&(G=h.length+he.index,ge=n.ast.getLength(),n.ast.down(G,pe.name)));const le=E.length-ce;A[he.index](S,E,ce,w),U(pe,S,le),o||re&&(S.state===e.NOMATCH?n.ast.setLength(ge):n.ast.up(G,pe.name,ce,S.phraseLength))},ue=(ne,ce)=>{switch(o+=1,te(ne+1,ce),o-=1,S.phraseLength=0,S.state){case e.EMPTY:S.state=e.EMPTY;break;case e.MATCH:S.state=e.EMPTY;break;case e.NOMATCH:S.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${S.state}`)}},W=(ne,ce)=>{switch(o+=1,te(ne+1,ce),o-=1,S.phraseLength=0,S.state){case e.EMPTY:case e.MATCH:S.state=e.NOMATCH;break;case e.NOMATCH:S.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${S.state}`)}},te=(ne,ce)=>{const ge=`${i}opExecute(): `,G=g[ne];switch(f+=1,u>c&&(c=u),u+=1,S.refresh(),n.trace&&n.trace.down(G,ce),G.type){case e.ALT:O(ne,ce);break;case e.CAT:N(ne,ce);break;case e.REP:M(ne,ce);break;case e.RNM:q(ne,ce);break;case e.TRG:H(ne,ce);break;case e.TBS:P(ne,ce);break;case e.TLS:V(ne,ce);break;case e.UDT:se(ne,ce);break;case e.AND:ue(ne,ce);break;case e.NOT:W(ne,ce);break;default:throw new Error(`${ge}unrecognized operator`)}o||ce+S.phraseLength>p&&(p=ce+S.phraseLength),n.stats&&n.stats.collect(G,S),n.trace&&n.trace.up(G,S.state,ce,S.phraseLength),u-=1}},zj=function(){const e="parser.js: Ast()): ",r=Yt,n=na,i=this;let a,o,u,c=0;const f=[],p=[],h=[];i.callbacks=[],i.init=(g,E,S)=>{p.length=0,h.length=0,c=0,a=g,o=E,u=S;let _;const A=[];for(_=0;_ !!f[g],i.udtDefined=g=>!!f[a.length+g],i.down=(g,E)=>{const S=h.length;return p.push(S),h.push({name:E,thisIndex:S,thatIndex:void 0,state:r.SEM_PRE,callbackIndex:g,phraseIndex:void 0,phraseLength:void 0,stack:p.length}),S},i.up=(g,E,S,_)=>{const A=h.length,w=p.pop();return h.push({name:E,thisIndex:A,thatIndex:w,state:r.SEM_POST,callbackIndex:g,phraseIndex:S,phraseLength:_,stack:p.length}),h[w].thatIndex=A,h[w].phraseIndex=S,h[w].phraseLength=_,A},i.translate=g=>{let E,S;for(let _=0;_ {h.length=g,g>0?p.length=h[g-1].stack:p.length=0},i.getLength=()=>h.length;function v(g){let E="";for(;g-- >0;)E+=" ";return E}i.toXml=()=>{let g="",E=0;return g+=` +`,g+=` +`,g+=` +`,g+=v(E+2),g+=n.charsToString(u),g+=` +`,h.forEach(S=>{S.state===r.SEM_PRE?(E+=1,g+=v(E),g+=` +`,g}},Zde=function(){const e=Yt,r=na,n="parser.js: Trace(): ";let i,a,o,u="",c=0;const f=100,p=this,h=g=>{let E="",S=0;if(g>=0)for(;g--;)S+=1,S===5?(E+="|",S=0):E+=".";return E};p.init=(g,E,S)=>{a=g,o=E,i=S};const v=g=>{let E;switch(g.type){case e.ALT:E="ALT";break;case e.CAT:E="CAT";break;case e.REP:g.max===1/0?E=`REP(${g.min},inf)`:E=`REP(${g.min},${g.max})`;break;case e.RNM:E=`RNM(${a[g.index].name})`;break;case e.TRG:E=`TRG(${g.min},${g.max})`;break;case e.TBS:g.string.length>6?E=`TBS(${r.charsToString(g.string,0,3)}...)`:E=`TBS(${r.charsToString(g.string,0,6)})`;break;case e.TLS:g.string.length>6?E=`TLS(${r.charsToString(g.string,0,3)}...)`:E=`TLS(${r.charsToString(g.string,0,6)})`;break;case e.UDT:E=`UDT(${o[g.index].name})`;break;case e.AND:E="AND";break;case e.NOT:E="NOT";break;default:throw new Error(`${n}Trace: opName: unrecognized opcode`)}return E};p.down=(g,E)=>{const S=h(c),_=Math.min(f,i.length-E);let A=r.charsToString(i,E,_);_+`,g+=v(E+2),g+=n.charsToString(u,S.phraseIndex,S.phraseLength),g+=` +`):(g+=v(E),g+=` +`,E-=1)}),g+=`{const A=`${n}trace.up: `;c-=1;const w=h(c);let C,R,O;switch(E){case e.EMPTY:O="|E|",R="''";break;case e.MATCH:O="|M|",C=Math.min(f,_),C<_?R=`'${r.charsToString(i,S,C)}...'`:R=`'${r.charsToString(i,S,C)}'`;break;case e.NOMATCH:O="|N|",R="";break;default:throw new Error(`${A} unrecognized state`)}R=`${w}${O}[${v(g)}]${R} +`,u+=R},p.displayTrace=()=>u},Qde=function(){const e=Yt,r="parser.js: Stats(): ";let n,i,a;const o=[],u=[],c=[];this.init=(_,A)=>{n=_,i=A,E()},this.collect=(_,A)=>{S(a,A.state,A.phraseLength),S(o[_.type],A.state,A.phraseLength),_.type===e.RNM&&S(u[_.index],A.state,A.phraseLength),_.type===e.UDT&&S(c[_.index],A.state,A.phraseLength)},this.displayStats=()=>{let _="";const A={match:0,empty:0,nomatch:0,total:0},w=(C,R,O,N,M)=>{A.match+=R,A.empty+=O,A.nomatch+=N,A.total+=M;const D=f(R),q=f(O),H=f(N),P=f(M);return`${C} | ${D} | ${q} | ${H} | ${P} | +`};return _+=` OPERATOR STATS +`,_+=` | MATCH | EMPTY | NOMATCH | TOTAL | +`,_+=w(" ALT",o[e.ALT].match,o[e.ALT].empty,o[e.ALT].nomatch,o[e.ALT].total),_+=w(" CAT",o[e.CAT].match,o[e.CAT].empty,o[e.CAT].nomatch,o[e.CAT].total),_+=w(" REP",o[e.REP].match,o[e.REP].empty,o[e.REP].nomatch,o[e.REP].total),_+=w(" RNM",o[e.RNM].match,o[e.RNM].empty,o[e.RNM].nomatch,o[e.RNM].total),_+=w(" TRG",o[e.TRG].match,o[e.TRG].empty,o[e.TRG].nomatch,o[e.TRG].total),_+=w(" TBS",o[e.TBS].match,o[e.TBS].empty,o[e.TBS].nomatch,o[e.TBS].total),_+=w(" TLS",o[e.TLS].match,o[e.TLS].empty,o[e.TLS].nomatch,o[e.TLS].total),_+=w(" UDT",o[e.UDT].match,o[e.UDT].empty,o[e.UDT].nomatch,o[e.UDT].total),_+=w(" AND",o[e.AND].match,o[e.AND].empty,o[e.AND].nomatch,o[e.AND].total),_+=w(" NOT",o[e.NOT].match,o[e.NOT].empty,o[e.NOT].nomatch,o[e.NOT].total),_+=w("TOTAL",A.match,A.empty,A.nomatch,A.total),_},this.displayHits=_=>{let A="";const w=(C,R,O,N,M)=>{a.match+=C,a.empty+=R,a.nomatch+=O,a.total+=N;const D=f(C),q=f(R),H=f(O),P=f(N);return`| ${D} | ${q} | ${H} | ${P} | ${M} +`};typeof _=="string"&&_.toLowerCase()[0]==="a"?(u.sort(p),c.sort(p),A+=` RULES/UDTS ALPHABETICALLY +`):typeof _=="string"&&_.toLowerCase()[0]==="i"?(u.sort(v),c.sort(v),A+=` RULES/UDTS BY INDEX +`):(u.sort(h),c.sort(h),A+=` RULES/UDTS BY HIT COUNT +`),A+=`| MATCH | EMPTY | NOMATCH | TOTAL | NAME +`;for(let C=0;C _<10?` ${_}`:_<100?` ${_}`:_<1e3?` ${_}`:_<1e4?` ${_}`:_<1e5?` ${_}`:_<1e6?` ${_}`:`${_}`,p=(_,A)=>_.lower A.lower?1:0,h=(_,A)=>_.total A.total?-1:p(_,A),v=(_,A)=>_.index A.index?1:0,g=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},E=()=>{o.length=0,a=new g,o[e.ALT]=new g,o[e.CAT]=new g,o[e.REP]=new g,o[e.RNM]=new g,o[e.TRG]=new g,o[e.TBS]=new g,o[e.TLS]=new g,o[e.UDT]=new g,o[e.AND]=new g,o[e.NOT]=new g,u.length=0;for(let _=0;_ 0){c.length=0;for(let _=0;_ {switch(_.total+=1,A){case e.EMPTY:_.empty+=1;break;case e.MATCH:_.match+=1;break;case e.NOMATCH:_.nomatch+=1;break;default:throw new Error(`${r}collect(): incStat(): unrecognized state: ${A}`)}}},na={stringToChars:t=>[...t].map(e=>e.codePointAt(0)),charsToString:(t,e,r)=>{let n=t;for(;!(e===void 0||e<0);){if(r===void 0){n=t.slice(e);break}if(r<=0)return"";n=t.slice(e,e+r);break}return String.fromCodePoint(...n)}},Yt={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:t=>{switch(t){case Yt.ALT:return"ALT";case Yt.CAT:return"CAT";case Yt.REP:return"REP";case Yt.RNM:return"RNM";case Yt.TRG:return"TRG";case Yt.TBS:return"TBS";case Yt.TLS:return"TLS";case Yt.UDT:return"UDT";case Yt.AND:return"AND";case Yt.NOT:return"NOT";case Yt.ACTIVE:return"ACTIVE";case Yt.EMPTY:return"EMPTY";case Yt.MATCH:return"MATCH";case Yt.NOMATCH:return"NOMATCH";case Yt.SEM_PRE:return"SEM_PRE";case Yt.SEM_POST:return"SEM_POST";case Yt.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};class el extends Error{constructor(e,r=void 0){if(super(e,r),this.name=this.constructor.name,typeof e=="string"&&(this.message=e),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,r!=null&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"cause")&&!("cause"in this)){const{cause:n}=r;this.cause=n,n instanceof Error&&"stack"in n&&(this.stack=`${this.stack} +CAUSE: ${n.stack}`)}if(r!=null&&typeof r=="object"){const{cause:n,...i}=r;Object.assign(this,i)}}}class _J extends el{}const NO=t=>(e,r,n,i,a)=>{if(!(typeof a=="object"&&a!==null&&!Array.isArray(a)))throw new _J("parser's user data must be an object");if(e===Yt.SEM_PRE){const o={type:t,text:na.charsToString(r,n,i),start:n,length:i,children:[]};a.stack.length>0?a.stack[a.stack.length-1].children.push(o):a.root=o,a.stack.push(o)}e===Yt.SEM_POST&&a.stack.pop()};class epe extends zj{constructor(){super(),this.callbacks["json-pointer"]=NO("json-pointer"),this.callbacks["reference-token"]=NO("reference-token"),this.callbacks.slash=NO("text")}getTree(){const e={stack:[],root:null};return this.translate(e),delete e.stack,e}}const tpe=t=>{if(typeof t!="string")throw new TypeError("Reference token must be a string");return t.replace(/~1/g,"/").replace(/~0/g,"~")};class rpe extends epe{getTree(){const{root:e}=super.getTree();return e.children.filter(({type:r})=>r==="reference-token").map(({text:r})=>tpe(r))}}class npe extends Array{toString(){return this.map(e=>`"${String(e)}"`).join(", ")}}class ipe extends Zde{inferExpectations(){const e=this.displayTrace().split(` +`),r=new Set;let n=-1;for(let i=0;i n){const o=a.match(/N\|\[TLS\(([^)]+)\)]/);o&&r.add(o[1])}}return new npe(...r)}}const ape=new Sp,spe=(t,{translator:e=new rpe,stats:r=!1,trace:n=!1}={})=>{if(typeof t!="string")throw new TypeError("JSON Pointer must be a string");try{const i=new ja;e&&(i.ast=e),r&&(i.stats=new Qde),n&&(i.trace=new ipe);const a=i.parse(ape,"json-pointer",t);return{result:a,tree:a.success&&e?i.ast.getTree():void 0,stats:i.stats,trace:i.trace}}catch(i){throw new _J("Unexpected error during JSON Pointer parsing",{cause:i,jsonPointer:t})}};new Sp;new ja;new Sp;new ja;const ope=new Sp,lpe=new ja,upe=t=>{if(typeof t!="string")return!1;try{return lpe.parse(ope,"array-index",t).success}catch{return!1}},cpe=new Sp,fpe=new ja,dpe=t=>{if(typeof t!="string")return!1;try{return fpe.parse(cpe,"array-dash",t).success}catch{return!1}},ppe=t=>{if(typeof t!="string"&&typeof t!="number")throw new TypeError("Reference token must be a string or number");return String(t).replace(/~/g,"~0").replace(/\//g,"~1")};class hpe extends el{}const wJ=t=>{if(!Array.isArray(t))throw new TypeError("Reference tokens must be a list of strings or numbers");try{return t.length===0?"":`/${t.map(e=>{if(typeof e!="string"&&typeof e!="number")throw new TypeError("Reference token must be a string or number");return ppe(String(e))}).join("/")}`}catch(e){throw new hpe("Unexpected error during JSON Pointer compilation",{cause:e,referenceTokens:t})}};class mpe{#e;#t;#r;constructor(e,r={}){this.#e=e,this.#e.steps=[],this.#e.failed=!1,this.#e.failedAt=-1,this.#e.message=`JSON Pointer "${r.jsonPointer}" was successfully evaluated against the provided value`,this.#e.context={...r,realm:r.realm.name},this.#t=[],this.#r=r.realm}step({referenceToken:e,input:r,output:n,success:i=!0,reason:a}){const o=this.#t.length;this.#t.push(e);const u={referenceToken:e,referenceTokenPosition:o,input:r,inputType:this.#r.isObject(r)?"object":this.#r.isArray(r)?"array":"unrecognized",output:n,success:i};a&&(u.reason=a),this.#e.steps.push(u),i||(this.#e.failed=!0,this.#e.failedAt=o,this.#e.message=a)}}class xJ{name="";isArray(e){throw new el("Realm.isArray(node) must be implemented in a subclass")}isObject(e){throw new el("Realm.isObject(node) must be implemented in a subclass")}sizeOf(e){throw new el("Realm.sizeOf(node) must be implemented in a subclass")}has(e,r){throw new el("Realm.has(node) must be implemented in a subclass")}evaluate(e,r){throw new el("Realm.evaluate(node) must be implemented in a subclass")}}class iu extends el{}class Sc extends iu{}class ype extends xJ{name="json";isArray(e){return Array.isArray(e)}isObject(e){return typeof e=="object"&&e!==null&&!this.isArray(e)}sizeOf(e){return this.isArray(e)?e.length:this.isObject(e)?Object.keys(e).length:0}has(e,r){if(this.isArray(e)){const n=Number(r),i=n>>>0;if(n!==i)throw new Sc(`Invalid array index "${r}": index must be an unsinged 32-bit integer`,{referenceToken:r,currentValue:e,realm:this.name});return i {const{result:o,tree:u,trace:c}=spe(e,{trace:!!a}),f=typeof a=="object"&&a!==null?new mpe(a,{jsonPointer:e,referenceTokens:u,strictArrays:r,strictObjects:n,realm:i,value:t}):null;try{let p;if(!o.success){let h=`Invalid JSON Pointer: "${e}". Syntax error at position ${o.maxMatched}`;throw h+=c?`, expected ${c.inferExpectations()}`:"",new iu(h,{jsonPointer:e,currentValue:t,realm:i.name})}return u.reduce((h,v,g)=>{if(i.isArray(h)){if(dpe(v)){if(r)throw new Sc(`Invalid array index "-" at position ${g} in "${e}". The "-" token always refers to a nonexistent element during evaluation`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name});return p=i.evaluate(h,String(i.sizeOf(h))),f?.step({referenceToken:v,input:h,output:p}),p}if(!upe(v))throw new Sc(`Invalid array index "${v}" at position ${g} in "${e}": index MUST be "0", or digits without a leading "0"`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name});const E=Number(v);if(!Number.isSafeInteger(E))throw new Sc(`Invalid array index "${v}" at position ${g} in "${e}": index must be a safe integer`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name});if(!i.has(h,v)&&r)throw new Sc(`Invalid array index "${v}" at position ${g} in "${e}": index not found in array`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name});return p=i.evaluate(h,v),f?.step({referenceToken:v,input:h,output:p}),p}if(i.isObject(h)){if(!i.has(h,v)&&n)throw new AJ(`Invalid object key "${v}" at position ${g} in "${e}": key not found in object`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name});return p=i.evaluate(h,v),f?.step({referenceToken:v,input:h,output:p}),p}throw new gpe(`Invalid reference token "${v}" at position ${g} in "${e}": cannot be applied to a non-object/non-array value`,{jsonPointer:e,referenceTokens:u,referenceToken:v,referenceTokenPosition:g,currentValue:h,realm:i.name})},t)}catch(p){throw f?.step({referenceToken:p.referenceToken,input:p.currentValue,success:!1,reason:p.message}),p instanceof iu?p:new iu("Unexpected error during JSON Pointer evaluation",{cause:p,jsonPointer:e,referenceTokens:u})}};class bpe extends xJ{name="apidom";isArray(e){return ei(e)}isObject(e){return dr(e)}sizeOf(e){return this.isArray(e)||this.isObject(e)?e.length:0}has(e,r){if(this.isArray(e)){const n=Number(r),i=n>>>0;if(n!==i)throw new Sc(`Invalid array index "${r}": index must be an unsinged 32-bit integer`,{referenceToken:r,currentValue:e,realm:this.name});return i vpe(t,e,{...r,realm:new bpe});class Vj extends pfe{filterByFormat(e="generic"){const r=e==="generic"?"openapi;version":e;return this.filter(n=>n.includes(r))}findBy(e="3.1.0",r="generic"){const n=r==="generic"?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${r};version=${e}`;return this.find(a=>a.includes(n))||this.unknownMediaType}latest(e="generic"){return fg(this.filterByFormat(e))}}const Dc=new Vj("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let _p=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="callback"}},wp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="components"}get schemas(){return this.get("schemas")}set schemas(e){this.set("schemas",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get requestBodies(){return this.get("requestBodies")}set requestBodies(e){this.set("requestBodies",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(e){this.set("securitySchemes",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}},xp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="contact"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}get email(){return this.get("email")}set email(e){this.set("email",e)}},Ap=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(e){this.set("propertyName",e)}get mapping(){return this.get("mapping")}set mapping(e){this.set("mapping",e)}},xg=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(e){this.set("contentType",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(e){this.set("allowedReserved",e)}},Op=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="example"}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}get externalValue(){return this.get("externalValue")}set externalValue(e){this.set("externalValue",e)}},Cp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="externalDocumentation"}get description(){return this.get("description")}set description(e){this.set("description",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},Qc=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Oe.BooleanElement(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Oe.BooleanElement(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(Qc.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Tp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get termsOfService(){return this.get("termsOfService")}set termsOfService(e){this.set("termsOfService",e)}get contact(){return this.get("contact")}set contact(e){this.set("contact",e)}get license(){return this.get("license")}set license(e){this.set("license",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}},Rp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="license"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},jp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(e){this.set("operationRef",e)}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get operation(){if(Bt(this.operationRef)){var e;return(e=this.operationRef)===null||e===void 0?void 0:e.meta.get("operation")}if(Bt(this.operationId)){var r;return(r=this.operationId)===null||r===void 0?void 0:r.meta.get("operation")}}set operation(e){this.set("operation",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get server(){return this.get("server")}set server(e){this.set("server",e)}},Np=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="mediaType"}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get encoding(){return this.get("encoding")}set encoding(e){this.set("encoding",e)}},Ag=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(e){this.set("authorizationUrl",e)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(e){this.set("tokenUrl",e)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(e){this.set("refreshUrl",e)}get scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}},Og=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(e){this.set("implicit",e)}get password(){return this.get("password")}set password(e){this.set("password",e)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(e){this.set("clientCredentials",e)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(e){this.set("authorizationCode",e)}},Mp=class extends Oe.StringElement{constructor(e,r,n){super(e,r,n),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class Cg extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}}let Ip=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="operation"}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}set externalDocs(e){this.set("externalDocs",e)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Oe.BooleanElement(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get servers(){return this.get("severs")}set servers(e){this.set("servers",e)}},ef=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="parameter"}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get required(){return this.hasKey("required")?this.get("required"):new Oe.BooleanElement(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Oe.BooleanElement(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(ef.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let kp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}},Dp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="paths"}},Pp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}},qp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="requestBody"}get description(){return this.get("description")}set description(e){this.set("description",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get required(){return this.hasKey("required")?this.get("required"):new Oe.BooleanElement(!1)}set required(e){this.set("required",e)}},Bp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}},Lp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}},tf=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};class rf extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class Fp extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}}let $p=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const Epe={namespace:t=>{const{base:e}=t;return e.register("jSONSchemaDraft4",tf),e.register("jSONReference",rf),e.register("media",Fp),e.register("linkDescription",$p),e}},Up=t=>{if(ln(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Spe={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Rs};let OJ=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,r){(e.meta.length>0||r.meta.length>0)&&(r.meta=Oa(r.meta,e.meta)),Yc(e)&&Rj(r,e),(e.attributes.length>0||e.meta.length>0)&&(r.attributes=Oa(r.attributes,e.attributes))}},mr=class extends OJ{enter(e){return this.element=mt(e),ir}};const CJ=(t,e,r=[])=>{const n=Object.getOwnPropertyDescriptors(e);for(let i of r)delete n[i];Object.defineProperties(t,n)},Pd=(t,e=[t])=>{const r=Object.getPrototypeOf(t);return r===null?e:Pd(r,[...e,r])},_pe=(...t)=>{if(t.length===0)return;let e;const r=t.map(n=>Pd(n));for(;r.every(n=>n.length>0);){const n=r.map(a=>a.pop()),i=n[0];if(n.every(a=>a===i))e=i;else break}return e},DU=(t,e,r=[])=>{var n;const i=(n=_pe(...t))!==null&&n!==void 0?n:Object.prototype,a=Object.create(i),o=Pd(i);for(let u of t){let c=Pd(u);for(let f=c.length-1;f>=0;f--){let p=c[f];o.indexOf(p)===-1&&(CJ(a,p,["constructor",...r]),o.push(p))}}return a.constructor=e,a},iT=t=>t.filter((e,r)=>t.indexOf(e)==r),TJ=new WeakMap,wpe=t=>TJ.get(t),xpe=(t,e)=>TJ.set(t,e),PU=(t,e)=>{var r,n;const i=iT([...Object.getOwnPropertyNames(t),...Object.getOwnPropertyNames(e)]),a={};for(let o of i)a[o]=iT([...(r=t?.[o])!==null&&r!==void 0?r:[],...(n=e?.[o])!==null&&n!==void 0?n:[]]);return a},qU=(t,e)=>{var r,n,i,a;return{property:PU((r=t?.property)!==null&&r!==void 0?r:{},(n=e?.property)!==null&&n!==void 0?n:{}),method:PU((i=t?.method)!==null&&i!==void 0?i:{},(a=e?.method)!==null&&a!==void 0?a:{})}},Ape=(t,e)=>{var r,n,i,a,o,u;return{class:iT([...(r=t?.class)!==null&&r!==void 0?r:[],...(n=e?.class)!==null&&n!==void 0?n:[]]),static:qU((i=t?.static)!==null&&i!==void 0?i:{},(a=e?.static)!==null&&a!==void 0?a:{}),instance:qU((o=t?.instance)!==null&&o!==void 0?o:{},(u=e?.instance)!==null&&u!==void 0?u:{})}},Ope=new Map,Cpe=(...t)=>{var e;const r=new Set,n=new Set([...t]);for(;n.size>0;)for(let i of n){const a=Pd(i.prototype).map(f=>f.constructor),o=(e=wpe(i))!==null&&e!==void 0?e:[],c=[...a,...o].filter(f=>!r.has(f));for(let f of c)n.add(f);r.add(i),n.delete(i)}return[...r]},Tpe=(...t)=>{const e=Cpe(...t).map(r=>Ope.get(r)).filter(r=>!!r);return e.length==0?{}:e.length==1?e[0]:e.reduce((r,n)=>Ape(r,n))};function it(...t){var e,r,n;const i=t.map(u=>u.prototype);function a(...u){for(const c of t)CJ(this,new c(...u))}a.prototype=DU(i,a),Object.setPrototypeOf(a,DU(t,null,["prototype"]));let o=a;{const u=Tpe(...t);for(let c of(e=u?.class)!==null&&e!==void 0?e:[]){const f=c(o);f&&(o=f)}BU((r=u?.static)!==null&&r!==void 0?r:{},o),BU((n=u?.instance)!==null&&n!==void 0?n:{},o.prototype)}return xpe(o,t),o}const BU=(t,e)=>{const r=t.property,n=t.method;if(r)for(let i in r)for(let a of r[i])a(e,i);if(n)for(let i in n)for(let a of n[i])a(e,i,Object.getOwnPropertyDescriptor(e,i))};let ia=class extends OJ{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...r}){super({...r}),this.specObj=e}retrievePassingOptions(){return nH(this.passingOptionsNames,this)}retrieveFixedFields(e){const r=qn(["visitors",...e,"fixedFields"],this.specObj);return typeof r=="object"&&r!==null?Object.keys(r):[]}retrieveVisitor(e){return pg(yu,["visitors",...e],this.specObj)?qn(["visitors",...e],this.specObj):qn(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,r={}){const n=this.retrievePassingOptions(),i=this.retrieveVisitor(e),a={...n,...r};return new i(a)}toRefractedElement(e,r,n={}){const i=this.retrieveVisitorInstance(e,n);return i instanceof mr&&i?.constructor===mr?mt(r):(xn(r,i,n),i.element)}},ou=class extends ia{specPath;ignoredFields;constructor({specPath:e,ignoredFields:r,...n}){super({...n}),this.specPath=e,this.ignoredFields=r||[]}ObjectElement(e){const r=this.specPath(e),n=this.retrieveFixedFields(r);return e.forEach((i,a,o)=>{if(Bt(a)&&n.includes(He(a))&&!this.ignoredFields.includes(He(a))){const u=this.toRefractedElement([...r,"fixedFields",He(a)],i),c=new Oe.MemberElement(mt(a),u);this.copyMetaAndAttributes(o,c),c.classes.push("fixed-field"),this.element.content.push(c)}else this.ignoredFields.includes(He(a))||this.element.content.push(mt(o))}),this.copyMetaAndAttributes(e,this.element),ir}};class An{parent;constructor({parent:e}){this.parent=e}}const RJ=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof tf||t(n)&&e("JSONSchemaDraft4",n)&&r("object",n)),Hj=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof rf||t(n)&&e("JSONReference",n)&&r("object",n)),jJ=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Fp||t(n)&&e("media",n)&&r("object",n)),Rpe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof $p||t(n)&&e("linkDescription",n)&&r("object",n)),jpe=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:Hj,isJSONSchemaElement:RJ,isLinkDescriptionElement:Rpe,isMediaElement:jJ},Symbol.toStringTag,{value:"Module"}));let NJ=class extends it(ou,An,mr){constructor(e){super(e),this.element=new tf,this.specPath=kt(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){return this.handleDialectIdentifier(e),this.handleSchemaIdentifier(e),this.parent=this.element,ou.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(dl(this.parent)&&!Bt(e.get("$schema")))this.element.setMetaProperty("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(RJ(this.parent)&&!Bt(e.get("$schema"))){const r=jc(He(this.parent.meta.get("inheritedDialectIdentifier")),He(this.parent.$schema));this.element.setMetaProperty("inheritedDialectIdentifier",r)}}handleSchemaIdentifier(e,r="id"){const n=this.parent!==void 0?mt(this.parent.getMetaProperty("ancestorsSchemaIdentifiers",[])):new Oe.ArrayElement,i=He(e.get(r));mg(i)&&n.push(i),this.element.setMetaProperty("ancestorsSchemaIdentifiers",n)}};const As=t=>dr(t)&&t.hasKey("$ref");let MJ=class extends it(ia,An,mr){ObjectElement(e){const r=As(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(r,e),ir}ArrayElement(e){return this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-items"),e.forEach(r=>{const n=As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}};class Npe extends mr{ArrayElement(e){const r=this.enter(e);return this.element.classes.push("json-schema-required"),r}}let Mpe=class extends ia{specPath;ignoredFields;fieldPatternPredicate=sj;constructor({specPath:e,ignoredFields:r,fieldPatternPredicate:n,...i}){super({...i}),this.specPath=e,this.ignoredFields=r||[],typeof n=="function"&&(this.fieldPatternPredicate=n)}ObjectElement(e){return e.forEach((r,n,i)=>{if(!this.ignoredFields.includes(He(n))&&this.fieldPatternPredicate(He(n))){const a=this.specPath(r),o=this.toRefractedElement(a,r),u=new Oe.MemberElement(mt(n),o);this.copyMetaAndAttributes(i,u),u.classes.push("patterned-field"),this.element.content.push(u)}else this.ignoredFields.includes(He(n))||this.element.content.push(mt(i))}),this.copyMetaAndAttributes(e,this.element),ir}},hl=class extends Mpe{constructor(e){super(e),this.fieldPatternPredicate=mg}},Ipe=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-properties"),this.specPath=r=>As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},kpe=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-patternProperties"),this.specPath=r=>As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class Dpe extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-dependencies"),this.specPath=r=>As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class Ppe extends mr{ArrayElement(e){const r=this.enter(e);return this.element.classes.push("json-schema-enum"),r}}let qpe=class extends mr{StringElement(e){const r=this.enter(e);return this.element.classes.push("json-schema-type"),r}ArrayElement(e){const r=this.enter(e);return this.element.classes.push("json-schema-type"),r}},Bpe=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach(r=>{const n=As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}},Lpe=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach(r=>{const n=As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}},Fpe=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach(r=>{const n=As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}};class $pe extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-definitions"),this.specPath=r=>As(r)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let Upe=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach(r=>{const n=this.toRefractedElement(["document","objects","LinkDescription"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}};class zpe extends it(ou,mr){constructor(e){super(e),this.element=new rf,this.specPath=kt(["document","objects","JSONReference"])}ObjectElement(e){const r=ou.prototype.ObjectElement.call(this,e);return Bt(this.element.$ref)&&this.element.classes.push("reference-element"),r}}let Vpe=class extends mr{StringElement(e){const r=this.enter(e);return this.element.classes.push("reference-value"),r}},Hpe=class extends ia{alternator;constructor({alternator:e,...r}){super({...r}),this.alternator=e}enter(e){const r=this.alternator.map(({predicate:i,specPath:a})=>yj(i,kt(a),hg)),n=pH(r)(e);return this.element=this.toRefractedElement(n,e),ir}},fc=class extends Hpe{constructor(e){super(e),this.alternator=[{predicate:As,specPath:["document","objects","JSONReference"]},{predicate:Eo,specPath:["document","objects","JSONSchema"]}]}};class Jpe extends it(ou,mr){constructor(e){super(e),this.element=new Fp,this.specPath=kt(["document","objects","Media"])}}let IJ=class extends it(ou,mr){constructor(e){super(e),this.element=new $p,this.specPath=kt(["document","objects","LinkDescription"])}};const Yn={visitors:{value:mr,JSONSchemaOrJSONReferenceVisitor:fc,document:{objects:{JSONSchema:{$visitor:NJ,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:fc,items:MJ,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:Npe,properties:Ipe,additionalProperties:fc,patternProperties:kpe,dependencies:Dpe,enum:Ppe,type:qpe,allOf:Bpe,anyOf:Lpe,oneOf:Fpe,not:fc,definitions:$pe,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:Upe,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:zpe,fixedFields:{$ref:Vpe}},Media:{$visitor:Jpe,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:IJ,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:fc,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:fc}}}}}},Gpe=()=>{const t=_o(Epe);return{predicates:{...jpe,isStringElement:Bt},namespace:t}},Kpe=(t,{specPath:e=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=Yn}={})=>{const i=Oe.refract(t),a=pl(n),o=qn(e,a),u=new o({specObj:a});return xn(i,u),js(u.element,r,{toolboxCreator:Gpe,visitorOptions:{keyMap:Spe,nodeTypeGetter:Up}})},Tg=t=>(e,r={})=>Kpe(e,{specPath:t,...r});tf.refract=Tg(["visitors","document","objects","JSONSchema","$visitor"]);rf.refract=Tg(["visitors","document","objects","JSONReference","$visitor"]);Fp.refract=Tg(["visitors","document","objects","Media","$visitor"]);$p.refract=Tg(["visitors","document","objects","LinkDescription","$visitor"]);let Rg=class extends tf{constructor(e,r,n){super(e,r,n),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new er("idProp getter in Schema class is not not supported.")}set idProp(e){throw new er("idProp setter in Schema class is not not supported.")}get $schema(){throw new er("$schema getter in Schema class is not not supported.")}set $schema(e){throw new er("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){throw new er("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new er("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new er("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new er("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){throw new er("definitions getter in Schema class is not not supported.")}set definitions(e){throw new er("definitions setter in Schema class is not not supported.")}get base(){throw new er("base getter in Schema class is not not supported.")}set base(e){throw new er("base setter in Schema class is not not supported.")}get links(){throw new er("links getter in Schema class is not not supported.")}set links(e){throw new er("links setter in Schema class is not not supported.")}get media(){throw new er("media getter in Schema class is not not supported.")}set media(e){throw new er("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(e){this.set("nullable",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}},zp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="securityRequirement"}},Vp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="securityScheme"}get type(){return this.get("type")}set type(e){this.set("type",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get scheme(){return this.get("scheme")}set scheme(e){this.set("scheme",e)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(e){this.set("bearerFormat",e)}get flows(){return this.get("flows")}set flows(e){this.set("flows",e)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(e){this.set("openIdConnectUrl",e)}},Hp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="server"}get url(){return this.get("url")}set url(e){this.set("url",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get variables(){return this.get("variables")}set variables(e){this.set("variables",e)}},Jp=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}},jg=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="tag"}get name(){return this.get("name")}set name(e){this.set("name",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}},Ng=class extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="xml"}get name(){return this.get("name")}set name(e){this.set("name",e)}get namespace(){return this.get("namespace")}set namespace(e){this.set("namespace",e)}get prefix(){return this.get("prefix")}set prefix(e){this.set("prefix",e)}get attribute(){return this.get("attribute")}set attribute(e){this.set("attribute",e)}get wrapped(){return this.get("wrapped")}set wrapped(e){this.set("wrapped",e)}};const Wpe={namespace:t=>{const{base:e}=t;return e.register("callback",_p),e.register("components",wp),e.register("contact",xp),e.register("discriminator",Ap),e.register("encoding",xg),e.register("example",Op),e.register("externalDocumentation",Cp),e.register("header",Qc),e.register("info",Tp),e.register("license",Rp),e.register("link",jp),e.register("mediaType",Np),e.register("oAuthFlow",Ag),e.register("oAuthFlows",Og),e.register("openapi",Mp),e.register("openApi3_0",Cg),e.register("operation",Ip),e.register("parameter",ef),e.register("pathItem",kp),e.register("paths",Dp),e.register("reference",Pp),e.register("requestBody",qp),e.register("response",Bp),e.register("responses",Lp),e.register("schema",Rg),e.register("securityRequirement",zp),e.register("securityScheme",Vp),e.register("server",Hp),e.register("serverVariable",Jp),e.register("tag",jg),e.register("xml",Ng),e}};class Mg extends Oe.ArrayElement{static primaryClass="servers";constructor(e,r,n){super(e,r,n),this.classes.push(Mg.primaryClass)}}class Jj extends Oe.ArrayElement{static primaryClass="security";constructor(e,r,n){super(e,r,n),this.classes.push(Jj.primaryClass)}}class Gj extends Oe.ArrayElement{static primaryClass="tags";constructor(e,r,n){super(e,r,n),this.classes.push(Gj.primaryClass)}}class Kj extends Oe.ObjectElement{static primaryClass="server-variables";constructor(e,r,n){super(e,r,n),this.classes.push(Kj.primaryClass)}}class Ig extends Oe.ObjectElement{static primaryClass="components-schemas";constructor(e,r,n){super(e,r,n),this.classes.push(Ig.primaryClass)}}class Wj extends Oe.ObjectElement{static primaryClass="components-responses";constructor(e,r,n){super(e,r,n),this.classes.push(Wj.primaryClass)}}class Yj extends Oe.ObjectElement{static primaryClass="components-parameters";constructor(e,r,n){super(e,r,n),this.classes.push(Yj.primaryClass),this.classes.push("parameters")}}class Xj extends Oe.ObjectElement{static primaryClass="components-examples";constructor(e,r,n){super(e,r,n),this.classes.push(Xj.primaryClass),this.classes.push("examples")}}class Zj extends Oe.ObjectElement{static primaryClass="components-request-bodies";constructor(e,r,n){super(e,r,n),this.classes.push(Zj.primaryClass)}}class Qj extends Oe.ObjectElement{static primaryClass="components-headers";constructor(e,r,n){super(e,r,n),this.classes.push(Qj.primaryClass)}}class eN extends Oe.ObjectElement{static primaryClass="components-security-schemes";constructor(e,r,n){super(e,r,n),this.classes.push(eN.primaryClass)}}class tN extends Oe.ObjectElement{static primaryClass="components-links";constructor(e,r,n){super(e,r,n),this.classes.push(tN.primaryClass)}}class rN extends Oe.ObjectElement{static primaryClass="components-callbacks";constructor(e,r,n){super(e,r,n),this.classes.push(rN.primaryClass)}}class nN extends Oe.ArrayElement{static primaryClass="path-item-servers";constructor(e,r,n){super(e,r,n),this.classes.push(nN.primaryClass),this.classes.push("servers")}}class iN extends Oe.ArrayElement{static primaryClass="path-item-parameters";constructor(e,r,n){super(e,r,n),this.classes.push(iN.primaryClass),this.classes.push("parameters")}}class kg extends Oe.ArrayElement{static primaryClass="operation-parameters";constructor(e,r,n){super(e,r,n),this.classes.push(kg.primaryClass),this.classes.push("parameters")}}class aN extends Oe.ObjectElement{static primaryClass="parameter-examples";constructor(e,r,n){super(e,r,n),this.classes.push(aN.primaryClass),this.classes.push("examples")}}class sN extends Oe.ObjectElement{static primaryClass="parameter-content";constructor(e,r,n){super(e,r,n),this.classes.push(sN.primaryClass),this.classes.push("content")}}class oN extends Oe.ArrayElement{static primaryClass="operation-tags";constructor(e,r,n){super(e,r,n),this.classes.push(oN.primaryClass)}}class lN extends Oe.ObjectElement{static primaryClass="operation-callbacks";constructor(e,r,n){super(e,r,n),this.classes.push(lN.primaryClass)}}class Dg extends Oe.ArrayElement{static primaryClass="operation-security";constructor(e,r,n){super(e,r,n),this.classes.push(Dg.primaryClass),this.classes.push("security")}}let Ype=class kJ extends Oe.ArrayElement{static primaryClass="operation-servers";constructor(e,r,n){super(e,r,n),this.classes.push(kJ.primaryClass),this.classes.push("servers")}};class uN extends Oe.ObjectElement{static primaryClass="request-body-content";constructor(e,r,n){super(e,r,n),this.classes.push(uN.primaryClass),this.classes.push("content")}}class cN extends Oe.ObjectElement{static primaryClass="media-type-examples";constructor(e,r,n){super(e,r,n),this.classes.push(cN.primaryClass),this.classes.push("examples")}}class fN extends Oe.ObjectElement{static primaryClass="media-type-encoding";constructor(e,r,n){super(e,r,n),this.classes.push(fN.primaryClass)}}class dN extends Oe.ObjectElement{static primaryClass="encoding-headers";constructor(e,r,n){super(e,r,n),this.classes.push(dN.primaryClass)}}class pN extends Oe.ObjectElement{static primaryClass="response-headers";constructor(e,r,n){super(e,r,n),this.classes.push(pN.primaryClass)}}class hN extends Oe.ObjectElement{static primaryClass="response-content";constructor(e,r,n){super(e,r,n),this.classes.push(hN.primaryClass),this.classes.push("content")}}class mN extends Oe.ObjectElement{static primaryClass="response-links";constructor(e,r,n){super(e,r,n),this.classes.push(mN.primaryClass)}}class yN extends Oe.ObjectElement{static primaryClass="discriminator-mapping";constructor(e,r,n){super(e,r,n),this.classes.push(yN.primaryClass)}}class gN extends Oe.ObjectElement{static primaryClass="oauth-flow-scopes";constructor(e,r,n){super(e,r,n),this.classes.push(gN.primaryClass)}}class vN extends Oe.ObjectElement{static primaryClass="link-parameters";constructor(e,r,n){super(e,r,n),this.classes.push(vN.primaryClass)}}class bN extends Oe.ObjectElement{static primaryClass="header-examples";constructor(e,r,n){super(e,r,n),this.classes.push(bN.primaryClass),this.classes.push("examples")}}class EN extends Oe.ObjectElement{static primaryClass="header-content";constructor(e,r,n){super(e,r,n),this.classes.push(EN.primaryClass),this.classes.push("content")}}const Xpe=t=>{if(ln(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Zpe={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Rs};class DJ{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,r){(e.meta.length>0||r.meta.length>0)&&(r.meta=Oa(r.meta,e.meta)),Yc(e)&&Rj(r,e),(e.attributes.length>0||e.meta.length>0)&&(r.attributes=Oa(r.attributes,e.attributes))}}class lt extends DJ{enter(e){return this.element=mt(e),ir}}class ls extends DJ{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:e,passingOptionsNames:r,openApiGenericElement:n,openApiSemanticElement:i,...a}){super({...a}),this.specObj=e,this.openApiGenericElement=n,this.openApiSemanticElement=i,Array.isArray(r)&&(this.passingOptionsNames=r)}retrievePassingOptions(){return nH(this.passingOptionsNames,this)}retrieveFixedFields(e){const r=qn(["visitors",...e,"fixedFields"],this.specObj);return typeof r=="object"&&r!==null?Object.keys(r):[]}retrieveVisitor(e){return pg(yu,["visitors",...e],this.specObj)?qn(["visitors",...e],this.specObj):qn(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,r={}){const n=this.retrievePassingOptions(),i=this.retrieveVisitor(e),a={...n,...r};return new i(a)}toRefractedElement(e,r,n={}){const i=this.retrieveVisitorInstance(e,n);return i instanceof lt&&i?.constructor===lt?mt(r):(xn(r,i,n),i.element)}}const zr=t=>dr(t)&&t.hasKey("$ref"),Qpe=dr,ehe=dr,PJ=t=>Bt(t.key)&&$ue("x-",He(t.key));class Xt extends ls{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=PJ;constructor({specPath:e,ignoredFields:r,canSupportSpecificationExtensions:n,specificationExtensionPredicate:i,...a}){super({...a}),this.specPath=e,this.ignoredFields=r||[],typeof n=="boolean"&&(this.canSupportSpecificationExtensions=n),typeof i=="function"&&(this.specificationExtensionPredicate=i)}ObjectElement(e){const r=this.specPath(e),n=this.retrieveFixedFields(r);return e.forEach((i,a,o)=>{if(Bt(a)&&n.includes(He(a))&&!this.ignoredFields.includes(He(a))){const u=this.toRefractedElement([...r,"fixedFields",He(a)],i),c=new Oe.MemberElement(mt(a),u);this.copyMetaAndAttributes(o,c),c.classes.push("fixed-field"),this.element.content.push(c)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(o)){const u=this.toRefractedElement(["document","extension"],o);this.element.content.push(u)}else this.ignoredFields.includes(He(a))||this.element.content.push(mt(o))}),this.copyMetaAndAttributes(e,this.element),ir}}class the extends it(Xt,lt){constructor(e){super(e),this.element=new Cg,this.specPath=kt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){return Xt.prototype.ObjectElement.call(this,e)}}class rhe extends it(ls,lt){StringElement(e){const r=new Mp(He(e));return this.copyMetaAndAttributes(e,r),this.element=r,ir}}class nhe extends ls{MemberElement(e){return this.element=mt(e),this.element.classes.push("specification-extension"),ir}}let ihe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Tp,this.specPath=kt(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};class ahe extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("api-version"),this.element.classes.push("version"),r}}let she=class extends it(Xt,lt){constructor(e){super(e),this.element=new xp,this.specPath=kt(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},ohe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Rp,this.specPath=kt(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},lhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new jp,this.specPath=kt(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return(Bt(this.element.operationId)||Bt(this.element.operationRef))&&this.element.classes.push("reference-element"),r}};class uhe extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}}class che extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}}class Pc extends ls{specPath;ignoredFields;fieldPatternPredicate=sj;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=PJ;constructor({specPath:e,ignoredFields:r,fieldPatternPredicate:n,canSupportSpecificationExtensions:i,specificationExtensionPredicate:a,...o}){super({...o}),this.specPath=e,this.ignoredFields=r||[],typeof n=="function"&&(this.fieldPatternPredicate=n),typeof i=="boolean"&&(this.canSupportSpecificationExtensions=i),typeof a=="function"&&(this.specificationExtensionPredicate=a)}ObjectElement(e){return e.forEach((r,n,i)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(i)){const a=this.toRefractedElement(["document","extension"],i);this.element.content.push(a)}else if(!this.ignoredFields.includes(He(n))&&this.fieldPatternPredicate(He(n))){const a=this.specPath(r),o=this.toRefractedElement(a,r),u=new Oe.MemberElement(mt(n),o);this.copyMetaAndAttributes(i,u),u.classes.push("patterned-field"),this.element.content.push(u)}else this.ignoredFields.includes(He(n))||this.element.content.push(mt(i))}),this.copyMetaAndAttributes(e,this.element),ir}}class Gt extends Pc{constructor(e){super(e),this.fieldPatternPredicate=mg}}let fhe=class extends it(Gt,lt){constructor(e){super(e),this.element=new vN,this.specPath=kt(["value"])}},dhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Hp,this.specPath=kt(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}};class phe extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("server-url"),r}}let SN=class extends it(ls,lt){constructor(e){super(e),this.element=new Mg}ArrayElement(e){return e.forEach(r=>{const n=Qpe(r)?["document","objects","Server"]:["value"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}},hhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Jp,this.specPath=kt(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class mhe extends it(Gt,lt){constructor(e){super(e),this.element=new Kj,this.specPath=kt(["document","objects","ServerVariable"])}}let yhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Np,this.specPath=kt(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class Os extends ls{alternator;constructor({alternator:e,...r}){super({...r}),this.alternator=e||[]}enter(e){const r=this.alternator.map(({predicate:i,specPath:a})=>yj(i,kt(a),hg)),n=pH(r)(e);return this.element=this.toRefractedElement(n,e),ir}}const ghe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof _p||t(n)&&e("callback",n)&&r("object",n)),vhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof wp||t(n)&&e("components",n)&&r("object",n)),bhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof xp||t(n)&&e("contact",n)&&r("object",n)),Ehe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Op||t(n)&&e("example",n)&&r("object",n)),She=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Cp||t(n)&&e("externalDocumentation",n)&&r("object",n)),nf=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Qc||t(n)&&e("header",n)&&r("object",n)),_he=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Tp||t(n)&&e("info",n)&&r("object",n)),whe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Rp||t(n)&&e("license",n)&&r("object",n)),xhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof jp||t(n)&&e("link",n)&&r("object",n)),Ahe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Mp||t(n)&&e("openapi",n)&&r("string",n)),Ohe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r,hasClass:n})=>i=>i instanceof Cg||t(i)&&e("openApi3_0",i)&&r("object",i)&&n("api",i)),qJ=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Ip||t(n)&&e("operation",n)&&r("object",n)),Che=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof ef||t(n)&&e("parameter",n)&&r("object",n)),_N=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof kp||t(n)&&e("pathItem",n)&&r("object",n)),The=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Dp||t(n)&&e("paths",n)&&r("object",n)),Br=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Pp||t(n)&&e("reference",n)&&r("object",n)),Rhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof qp||t(n)&&e("requestBody",n)&&r("object",n)),Pg=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Bp||t(n)&&e("response",n)&&r("object",n)),jhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Lp||t(n)&&e("responses",n)&&r("object",n)),Nhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Rg||t(n)&&e("schema",n)&&r("object",n)),Mhe=t=>vp(t)&&t.classes.includes("boolean-json-schema"),Ihe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof zp||t(n)&&e("securityRequirement",n)&&r("object",n)),khe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Vp||t(n)&&e("securityScheme",n)&&r("object",n)),Dhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Hp||t(n)&&e("server",n)&&r("object",n)),Phe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Jp||t(n)&&e("serverVariable",n)&&r("object",n)),qg=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Np||t(n)&&e("mediaType",n)&&r("object",n)),BJ=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r,hasClass:n})=>i=>i instanceof Mg||t(i)&&e("array",i)&&r("array",i)&&n("servers",i)),qhe=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Ap||t(n)&&e("discriminator",n)&&r("object",n)),Bhe=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:Mhe,isCallbackElement:ghe,isComponentsElement:vhe,isContactElement:bhe,isDiscriminatorElement:qhe,isExampleElement:Ehe,isExternalDocumentationElement:She,isHeaderElement:nf,isInfoElement:_he,isLicenseElement:whe,isLinkElement:xhe,isMediaTypeElement:qg,isOpenApi3_0Element:Ohe,isOpenapiElement:Ahe,isOperationElement:qJ,isParameterElement:Che,isPathItemElement:_N,isPathsElement:The,isReferenceElement:Br,isRequestBodyElement:Rhe,isResponseElement:Pg,isResponsesElement:jhe,isSchemaElement:Nhe,isSecurityRequirementElement:Ihe,isSecuritySchemeElement:khe,isServerElement:Dhe,isServerVariableElement:Phe,isServersElement:BJ},Symbol.toStringTag,{value:"Module"}));let Lhe=class extends it(Os,lt){constructor(e){super(e),this.alternator=[{predicate:zr,specPath:["document","objects","Reference"]},{predicate:Eo,specPath:["document","objects","Schema"]}]}ObjectElement(e){const r=Os.prototype.enter.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","schema"),r}},wN=class extends it(Gt,lt){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("examples"),this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","example")}),r}},Fhe=class extends wN{constructor(e){super(e),this.element=new cN}},$he=class extends it(Gt,lt){constructor(e){super(e),this.element=new fN,this.specPath=kt(["document","objects","Encoding"])}},Uhe=class extends it(Gt,lt){constructor(e){super(e),this.element=new zp,this.specPath=kt(["value"])}},zhe=class extends it(ls,lt){constructor(e){super(e),this.element=new Jj}ArrayElement(e){return e.forEach(r=>{if(dr(r)){const n=this.toRefractedElement(["document","objects","SecurityRequirement"],r);this.element.push(n)}else this.element.push(mt(r))}),this.copyMetaAndAttributes(e,this.element),ir}},Vhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new wp,this.specPath=kt(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},Hhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new jg,this.specPath=kt(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},Jhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Pp,this.specPath=kt(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return Bt(this.element.$ref)&&this.element.classes.push("reference-element"),r}},Ghe=class extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}},Khe=class extends it(Xt,lt){constructor(e){super(e),this.element=new ef,this.specPath=kt(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return dr(this.element.contentProp)&&this.element.contentProp.filter(qg).forEach((n,i)=>{n.setMetaProperty("media-type",He(i))}),r}},Whe=class extends it(Os,lt){constructor(e){super(e),this.alternator=[{predicate:zr,specPath:["document","objects","Reference"]},{predicate:Eo,specPath:["document","objects","Schema"]}]}ObjectElement(e){const r=Os.prototype.enter.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","schema"),r}},Yhe=class extends it(Xt,lt){constructor(e){super(e),this.element=new Qc,this.specPath=kt(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},Xhe=class extends it(Os,lt){constructor(e){super(e),this.alternator=[{predicate:zr,specPath:["document","objects","Reference"]},{predicate:Eo,specPath:["document","objects","Schema"]}]}ObjectElement(e){const r=Os.prototype.enter.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","schema"),r}},Zhe=class extends wN{constructor(e){super(e),this.element=new bN}},Bg=class extends it(Gt,lt){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("content"),this.specPath=kt(["document","objects","MediaType"])}},Qhe=class extends Bg{constructor(e){super(e),this.element=new EN}},eme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Rg,this.specPath=kt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const LU=Yn.visitors.document.objects.JSONSchema.fixedFields.allOf;let tme=class extends LU{ArrayElement(e){const r=LU.prototype.ArrayElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","schema")}),r}};const FU=Yn.visitors.document.objects.JSONSchema.fixedFields.anyOf;let rme=class extends FU{ArrayElement(e){const r=FU.prototype.ArrayElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","schema")}),r}};const $U=Yn.visitors.document.objects.JSONSchema.fixedFields.oneOf;let nme=class extends $U{ArrayElement(e){const r=$U.prototype.ArrayElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","schema")}),r}};const UU=Yn.visitors.document.objects.JSONSchema.fixedFields.items;let ime=class extends UU{ObjectElement(e){const r=UU.prototype.ObjectElement.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","schema"),r}ArrayElement(e){return this.enter(e)}};const zU=Yn.visitors.document.objects.JSONSchema.fixedFields.properties;let ame=class extends zU{ObjectElement(e){const r=zU.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","schema")}),r}};const sme=Yn.visitors.document.objects.JSONSchema.fixedFields.type;class ome extends sme{ArrayElement(e){return this.enter(e)}}const VU=Yn.visitors.JSONSchemaOrJSONReferenceVisitor;class HU extends VU{ObjectElement(e){const r=VU.prototype.enter.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","schema"),r}}let lme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Ap,this.specPath=kt(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class ume extends it(Gt,lt){constructor(e){super(e),this.element=new yN,this.specPath=kt(["value"])}}let cme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Ng,this.specPath=kt(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},fme=class extends wN{constructor(e){super(e),this.element=new aN}},dme=class extends Bg{constructor(e){super(e),this.element=new sN}},pme=class extends it(Gt,lt){constructor(e){super(e),this.element=new Ig,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","schema")}),r}},hme=class extends it(Gt,lt){constructor(e){super(e),this.element=new Wj,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","response")}),this.element.filter(Pg).forEach((n,i)=>{n.setMetaProperty("http-status-code",He(i))}),r}},mme=class extends it(Gt,lt){constructor(e){super(e),this.element=new Yj,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","parameter")}),r}},yme=class extends it(Gt,lt){constructor(e){super(e),this.element=new Xj,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","example")}),r}};class gme extends it(Gt,lt){constructor(e){super(e),this.element=new Zj,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","requestBody")}),r}}let vme=class extends it(Gt,lt){constructor(e){super(e),this.element=new Qj,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","header")}),this.element.filter(nf).forEach((n,i)=>{n.setMetaProperty("header-name",He(i))}),r}};class bme extends it(Gt,lt){constructor(e){super(e),this.element=new eN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","securityScheme")}),r}}let Eme=class extends it(Gt,lt){constructor(e){super(e),this.element=new tN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","link")}),r}},Sme=class extends it(Gt,lt){constructor(e){super(e),this.element=new rN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","callback")}),r}},_me=class extends it(Xt,lt){constructor(e){super(e),this.element=new Op,this.specPath=kt(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return Bt(this.element.externalValue)&&this.element.classes.push("reference-element"),r}};class wme extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}}let xme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Cp,this.specPath=kt(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},Ame=class extends it(Xt,lt){constructor(e){super(e),this.element=new xg,this.specPath=kt(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return dr(this.element.headers)&&this.element.headers.filter(nf).forEach((n,i)=>{n.setMetaProperty("header-name",He(i))}),r}},Ome=class extends it(Gt,lt){constructor(e){super(e),this.element=new dN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","header")}),this.element.forEach((n,i)=>{if(!nf(n))return;const a=He(i);n.setMetaProperty("headerName",a)}),r}},Cme=class extends it(Pc,lt){constructor(e){super(e),this.element=new Dp,this.specPath=kt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=Eo}ObjectElement(e){const r=Pc.prototype.ObjectElement.call(this,e);return this.element.filter(_N).forEach((n,i)=>{i.classes.push("openapi-path-template"),i.classes.push("path-template"),n.setMetaProperty("path",mt(i))}),r}},Tme=class extends it(Xt,lt){constructor(e){super(e),this.element=new qp,this.specPath=kt(["document","objects","RequestBody"])}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return dr(this.element.contentProp)&&this.element.contentProp.filter(qg).forEach((n,i)=>{n.setMetaProperty("media-type",He(i))}),r}},Rme=class extends Bg{constructor(e){super(e),this.element=new uN}},jme=class extends it(Pc,lt){constructor(e){super(e),this.element=new _p,this.specPath=kt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=r=>/{(? [^}]{1,2083})}/.test(String(r))}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(_N).forEach((n,i)=>{n.setMetaProperty("runtime-expression",He(i))}),r}},Nme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Bp,this.specPath=kt(["document","objects","Response"])}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return dr(this.element.contentProp)&&this.element.contentProp.filter(qg).forEach((n,i)=>{n.setMetaProperty("media-type",He(i))}),dr(this.element.headers)&&this.element.headers.filter(nf).forEach((n,i)=>{n.setMetaProperty("header-name",He(i))}),r}};class Mme extends it(Gt,lt){constructor(e){super(e),this.element=new pN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","header")}),this.element.forEach((n,i)=>{if(!nf(n))return;const a=He(i);n.setMetaProperty("header-name",a)}),r}}class Ime extends Bg{constructor(e){super(e),this.element=new hN}}class kme extends it(Gt,lt){constructor(e){super(e),this.element=new mN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","link")}),r}}class JU extends it(Xt,Pc){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:e,specPathPatternedFields:r,...n}){super({...n}),this.specPathFixedFields=e,this.specPathPatternedFields=r}ObjectElement(e){const{specPath:r,ignoredFields:n}=this;try{this.specPath=this.specPathFixedFields;const i=this.retrieveFixedFields(this.specPath(e));this.ignoredFields=[...n,...lue(e.keys(),i)],Xt.prototype.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=i,Pc.prototype.ObjectElement.call(this,e)}catch(i){throw this.specPath=r,i}return ir}}let Dme=class extends it(JU,lt){constructor(e){super(e),this.element=new Lp,this.specPathFixedFields=kt(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=r=>zr(r)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=r=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${Bue(100,600).join("|")})$`).test(String(r))}ObjectElement(e){const r=JU.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","response")}),this.element.filter(Pg).forEach((n,i)=>{const a=mt(i);this.fieldPatternPredicate(He(a))&&n.setMetaProperty("http-status-code",a)}),r}};class Pme extends it(Os,lt){constructor(e){super(e),this.alternator=[{predicate:zr,specPath:["document","objects","Reference"]},{predicate:Eo,specPath:["document","objects","Response"]}]}ObjectElement(e){const r=Os.prototype.enter.call(this,e);return Br(this.element)?this.element.setMetaProperty("referenced-element","response"):Pg(this.element)&&this.element.setMetaProperty("http-status-code","default"),r}}let qme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Ip,this.specPath=kt(["document","objects","Operation"])}},Bme=class extends lt{constructor(e){super(e),this.element=new oN}ArrayElement(e){return this.element=this.element.concat(mt(e)),ir}},LJ=class extends it(ls,lt){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("parameters")}ArrayElement(e){return e.forEach(r=>{const n=zr(r)?["document","objects","Reference"]:["document","objects","Parameter"],i=this.toRefractedElement(n,r);Br(i)&&i.setMetaProperty("referenced-element","parameter"),this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}},Lme=class extends LJ{constructor(e){super(e),this.element=new kg}},Fme=class extends Os{constructor(e){super(e),this.alternator=[{predicate:zr,specPath:["document","objects","Reference"]},{predicate:Eo,specPath:["document","objects","RequestBody"]}]}ObjectElement(e){const r=Os.prototype.enter.call(this,e);return Br(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),r}};class $me extends it(Gt,lt){specPath;constructor(e){super(e),this.element=new lN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Br).forEach(n=>{n.setMetaProperty("referenced-element","callback")}),r}}class Ume extends it(ls,lt){constructor(e){super(e),this.element=new Dg}ArrayElement(e){return e.forEach(r=>{const n=dr(r)?["document","objects","SecurityRequirement"]:["value"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}}let zme=class extends SN{constructor(e){super(e),this.element=new Ype}},Vme=class extends it(Xt,lt){constructor(e){super(e),this.element=new kp,this.specPath=kt(["document","objects","PathItem"])}ObjectElement(e){const r=Xt.prototype.ObjectElement.call(this,e);return this.element.filter(qJ).forEach((n,i)=>{const a=mt(i);a.content=He(a).toUpperCase(),n.setMetaProperty("http-method",a)}),Bt(this.element.$ref)&&this.element.classes.push("reference-element"),r}};class Hme extends lt{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}}class Jme extends SN{constructor(e){super(e),this.element=new nN}}class Gme extends LJ{constructor(e){super(e),this.element=new iN}}let Kme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Vp,this.specPath=kt(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},Wme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Og,this.specPath=kt(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},Yme=class extends it(Xt,lt){constructor(e){super(e),this.element=new Ag,this.specPath=kt(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class Xme extends it(Gt,lt){constructor(e){super(e),this.element=new gN,this.specPath=kt(["value"])}}class Zme extends it(ls,lt){constructor(e){super(e),this.element=new Gj}ArrayElement(e){return e.forEach(r=>{const n=ehe(r)?["document","objects","Tag"]:["value"],i=this.toRefractedElement(n,r);this.element.push(i)}),this.copyMetaAndAttributes(e,this.element),ir}}const{fixedFields:Tn}=Yn.visitors.document.objects.JSONSchema,Pe={visitors:{value:lt,document:{objects:{OpenApi:{$visitor:the,fixedFields:{openapi:rhe,info:{$ref:"#/visitors/document/objects/Info"},servers:SN,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:zhe,tags:Zme,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:ihe,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:ahe}},Contact:{$visitor:she,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:ohe,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:dhe,fixedFields:{url:phe,description:{$ref:"#/visitors/value"},variables:mhe}},ServerVariable:{$visitor:hhe,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:Vhe,fixedFields:{schemas:pme,responses:hme,parameters:mme,examples:yme,requestBodies:gme,headers:vme,securitySchemes:bme,links:Eme,callbacks:Sme}},Paths:{$visitor:Cme},PathItem:{$visitor:Vme,fixedFields:{$ref:Hme,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:Jme,parameters:Gme}},Operation:{$visitor:qme,fixedFields:{tags:Bme,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:Lme,requestBody:Fme,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:$me,deprecated:{$ref:"#/visitors/value"},security:Ume,servers:zme}},ExternalDocumentation:{$visitor:xme,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:Khe,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:Whe,example:{$ref:"#/visitors/value"},examples:fme,content:dme}},RequestBody:{$visitor:Tme,fixedFields:{description:{$ref:"#/visitors/value"},content:Rme,required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:yhe,fixedFields:{schema:Lhe,example:{$ref:"#/visitors/value"},examples:Fhe,encoding:$he}},Encoding:{$visitor:Ame,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:Ome,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:Dme,fixedFields:{default:Pme}},Response:{$visitor:Nme,fixedFields:{description:{$ref:"#/visitors/value"},headers:Mme,content:Ime,links:kme}},Callback:{$visitor:jme},Example:{$visitor:_me,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:wme}},Link:{$visitor:lhe,fixedFields:{operationRef:uhe,operationId:che,parameters:fhe,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:Yhe,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:Xhe,example:{$ref:"#/visitors/value"},examples:Zhe,content:Qhe}},Tag:{$visitor:Hhe,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:Jhe,fixedFields:{$ref:Ghe}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:eme,fixedFields:{title:Tn.title,multipleOf:Tn.multipleOf,maximum:Tn.maximum,exclusiveMaximum:Tn.exclusiveMaximum,minimum:Tn.minimum,exclusiveMinimum:Tn.exclusiveMinimum,maxLength:Tn.maxLength,minLength:Tn.minLength,pattern:Tn.pattern,maxItems:Tn.maxItems,minItems:Tn.minItems,uniqueItems:Tn.uniqueItems,maxProperties:Tn.maxProperties,minProperties:Tn.minProperties,required:Tn.required,enum:Tn.enum,type:ome,allOf:tme,anyOf:rme,oneOf:nme,not:HU,items:ime,properties:ame,additionalProperties:HU,description:Tn.description,format:Tn.format,default:Tn.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:lme,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:ume}},XML:{$visitor:cme,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:Kme,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:Wme,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:Yme,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:Xme}},SecurityRequirement:{$visitor:Uhe}},extension:{$visitor:nhe}}}},Qme=()=>{const t=_o(Wpe);return{predicates:{...Bhe,isElement:ln,isStringElement:Bt,isArrayElement:ei,isObjectElement:dr,isMemberElement:ss,includesClasses:Ic,hasElementSourceMap:Yc},namespace:t}},eye=(t,{specPath:e=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=Oe.refract(t),i=pl(Pe),a=qn(e,i),o=new a({specObj:i});return xn(n,o),js(o.element,r,{toolboxCreator:Qme,visitorOptions:{keyMap:Zpe,nodeTypeGetter:Xpe}})},Ar=t=>(e,r={})=>eye(e,{specPath:t,...r});_p.refract=Ar(["visitors","document","objects","Callback","$visitor"]);wp.refract=Ar(["visitors","document","objects","Components","$visitor"]);xp.refract=Ar(["visitors","document","objects","Contact","$visitor"]);Op.refract=Ar(["visitors","document","objects","Example","$visitor"]);Ap.refract=Ar(["visitors","document","objects","Discriminator","$visitor"]);xg.refract=Ar(["visitors","document","objects","Encoding","$visitor"]);Cp.refract=Ar(["visitors","document","objects","ExternalDocumentation","$visitor"]);Qc.refract=Ar(["visitors","document","objects","Header","$visitor"]);Tp.refract=Ar(["visitors","document","objects","Info","$visitor"]);Rp.refract=Ar(["visitors","document","objects","License","$visitor"]);jp.refract=Ar(["visitors","document","objects","Link","$visitor"]);Np.refract=Ar(["visitors","document","objects","MediaType","$visitor"]);Ag.refract=Ar(["visitors","document","objects","OAuthFlow","$visitor"]);Og.refract=Ar(["visitors","document","objects","OAuthFlows","$visitor"]);Mp.refract=Ar(["visitors","document","objects","OpenApi","fixedFields","openapi"]);Cg.refract=Ar(["visitors","document","objects","OpenApi","$visitor"]);Ip.refract=Ar(["visitors","document","objects","Operation","$visitor"]);ef.refract=Ar(["visitors","document","objects","Parameter","$visitor"]);kp.refract=Ar(["visitors","document","objects","PathItem","$visitor"]);Dp.refract=Ar(["visitors","document","objects","Paths","$visitor"]);Pp.refract=Ar(["visitors","document","objects","Reference","$visitor"]);qp.refract=Ar(["visitors","document","objects","RequestBody","$visitor"]);Bp.refract=Ar(["visitors","document","objects","Response","$visitor"]);Lp.refract=Ar(["visitors","document","objects","Responses","$visitor"]);Rg.refract=Ar(["visitors","document","objects","Schema","$visitor"]);zp.refract=Ar(["visitors","document","objects","SecurityRequirement","$visitor"]);Vp.refract=Ar(["visitors","document","objects","SecurityScheme","$visitor"]);Hp.refract=Ar(["visitors","document","objects","Server","$visitor"]);Jp.refract=Ar(["visitors","document","objects","ServerVariable","$visitor"]);jg.refract=Ar(["visitors","document","objects","Tag","$visitor"]);Ng.refract=Ar(["visitors","document","objects","XML","$visitor"]);class Lg extends _p{}class Fg extends wp{get pathItems(){return this.get("pathItems")}set pathItems(e){this.set("pathItems",e)}}let $g=class extends xp{};class xN extends Ap{}class AN extends xg{}let Ug=class extends Op{};class zg extends Cp{}class Vg extends Qc{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}let Hg=class extends Tp{get license(){return this.get("license")}set license(e){this.set("license",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}};class vu extends Oe.StringElement{static default=new vu("https://spec.openapis.org/oas/3.1/dialect/base");constructor(e,r,n){super(e,r,n),this.element="jsonSchemaDialect"}}let Jg=class extends Rp{get identifier(){return this.get("identifier")}set identifier(e){this.set("identifier",e)}},Gg=class extends jp{};class Kg extends Np{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class ON extends Ag{}class CN extends Og{}class TN extends Mp{}class ml extends Oe.ObjectElement{constructor(e,r,n){super(e,r,n),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(e){this.set("jsonSchemaDialect",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get webhooks(){return this.get("webhooks")}set webhooks(e){this.set("webhooks",e)}}let Gp=class extends Ip{get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}};class Wg extends ef{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class sl extends kp{get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}}class Yg extends Dp{}class yl extends Pp{}Object.defineProperty(yl.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});Object.defineProperty(yl.prototype,"summary",{get(){return this.get("summary")},set(t){this.set("summary",t)},enumerable:!0});class Xg extends qp{}let Zg=class extends Bp{},Qg=class extends Lp{},Kp=class extends tf{constructor(e,r,n){super(e,r,n),this.element="JSONSchemaDraft6"}get idProp(){throw new er("id keyword from Core vocabulary has been renamed to $id.")}set idProp(e){throw new er("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}},Wp=class extends $p{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new er("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new er("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new er("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new er("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new er("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new er("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};const tye={namespace:t=>{const{base:e}=t;return e.register("jSONSchemaDraft6",Kp),e.register("jSONReference",rf),e.register("media",Fp),e.register("linkDescription",Wp),e}},rye={JSONSchemaDraft6Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Rs};let FJ=class extends NJ{constructor(e){super(e),this.element=new Kp}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){const r=this.enter(e);return this.element.classes.push("boolean-json-schema"),r}handleSchemaIdentifier(e,r="$id"){return super.handleSchemaIdentifier(e,r)}},nye=class extends MJ{BooleanElement(e){return this.element=this.toRefractedElement(["document","objects","JSONSchema"],e),ir}};class iye extends mr{ArrayElement(e){const r=this.enter(e);return this.element.classes.push("json-schema-examples"),r}}let $J=class extends IJ{constructor(e){super(e),this.element=new Wp}};const Kn=ti(at(["visitors","document","objects","JSONSchema","$visitor"],FJ),ea(["visitors","document","objects","JSONSchema","fixedFields","id"]),at(["visitors","document","objects","JSONSchema","fixedFields","$id"],Yn.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","contains"],Yn.visitors.JSONSchemaOrJSONReferenceVisitor),at(["visitors","document","objects","JSONSchema","fixedFields","items"],nye),at(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Yn.visitors.JSONSchemaOrJSONReferenceVisitor),at(["visitors","document","objects","JSONSchema","fixedFields","const"],Yn.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","examples"],iye),at(["visitors","document","objects","LinkDescription","$visitor"],$J),at(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Yn.visitors.JSONSchemaOrJSONReferenceVisitor),ea(["visitors","document","objects","LinkDescription","fixedFields","schema"]),at(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Yn.visitors.JSONSchemaOrJSONReferenceVisitor),ea(["visitors","document","objects","LinkDescription","fixedFields","method"]),ea(["visitors","document","objects","LinkDescription","fixedFields","encType"]),at(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],Yn.visitors.value))(Yn),aye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Kp||t(n)&&e("JSONSchemaDraft6",n)&&r("object",n)),sye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Wp||t(n)&&e("linkDescription",n)&&r("object",n)),oye=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:Hj,isJSONSchemaElement:aye,isLinkDescriptionElement:sye,isMediaElement:jJ},Symbol.toStringTag,{value:"Module"})),lye=()=>{const t=_o(tye);return{predicates:{...oye,isStringElement:Bt},namespace:t}},uye=(t,{specPath:e=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=Kn}={})=>{const i=Oe.refract(t),a=pl(n),o=qn(e,a),u=new o({specObj:a});return xn(i,u),js(u.element,r,{toolboxCreator:lye,visitorOptions:{keyMap:rye,nodeTypeGetter:Up}})},UJ=t=>(e,r={})=>uye(e,{specPath:t,...r});Kp.refract=UJ(["visitors","document","objects","JSONSchema","$visitor"]);Wp.refract=UJ(["visitors","document","objects","LinkDescription","$visitor"]);let Yp=class extends Kp{constructor(e,r,n){super(e,r,n),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new er('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new er('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}},Xp=class extends Wp{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new er("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new er("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new er("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new er("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}};const cye={namespace:t=>{const{base:e}=t;return e.register("jSONSchemaDraft7",Yp),e.register("jSONReference",rf),e.register("linkDescription",Xp),e}},fye={JSONSchemaDraft7Element:["content"],JSONReferenceElement:["content"],LinkDescriptionElement:["content"],...Rs};let zJ=class extends FJ{constructor(e){super(e),this.element=new Yp}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}},VJ=class extends $J{constructor(e){super(e),this.element=new Xp}};const Zo=ti(at(["visitors","document","objects","JSONSchema","$visitor"],zJ),at(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Kn.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","if"],Kn.visitors.JSONSchemaOrJSONReferenceVisitor),at(["visitors","document","objects","JSONSchema","fixedFields","then"],Kn.visitors.JSONSchemaOrJSONReferenceVisitor),at(["visitors","document","objects","JSONSchema","fixedFields","else"],Kn.visitors.JSONSchemaOrJSONReferenceVisitor),ea(["visitors","document","objects","JSONSchema","fixedFields","media"]),at(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Kn.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Kn.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","$visitor"],VJ),at(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Kn.visitors.value),ea(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),at(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","fixedFields","description"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Kn.visitors.value),at(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Kn.visitors.JSONSchemaOrJSONReferenceVisitor),ea(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),at(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Kn.visitors.value))(Kn),dye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Yp||t(n)&&e("JSONSchemaDraft7",n)&&r("object",n)),pye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Xp||t(n)&&e("linkDescription",n)&&r("object",n)),hye=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:Hj,isJSONSchemaElement:dye,isLinkDescriptionElement:pye},Symbol.toStringTag,{value:"Module"})),mye=()=>{const t=_o(cye);return{predicates:{...hye,isStringElement:Bt},namespace:t}},yye=(t,{specPath:e=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=Zo}={})=>{const i=Oe.refract(t),a=pl(n),o=qn(e,a),u=new o({specObj:a});return xn(i,u),js(u.element,r,{toolboxCreator:mye,visitorOptions:{keyMap:fye,nodeTypeGetter:Up}})},HJ=t=>(e,r={})=>yye(e,{specPath:t,...r});Yp.refract=HJ(["visitors","document","objects","JSONSchema","$visitor"]);Xp.refract=HJ(["visitors","document","objects","LinkDescription","$visitor"]);let Zp=class extends Yp{constructor(e,r,n){super(e,r,n),this.element="JSONSchema201909"}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $recursiveAnchor(){return this.get("$recursiveAnchor")}set $recursiveAnchor(e){this.set("$recursiveAnchor",e)}get $recursiveRef(){return this.get("$recursiveRef")}set $recursiveRef(e){this.set("$recursiveRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get definitions(){throw new er("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new er("definitions keyword from Validation vocabulary has been renamed to $defs.")}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get dependencies(){throw new er("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new er("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}},Qp=class extends Xp{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const gye={namespace:t=>{const{base:e}=t;return e.register("jSONSchema201909",Zp),e.register("linkDescription",Qp),e}},vye={JSONSchema201909Element:["content"],LinkDescriptionElement:["content"],...Rs};let Wn=class extends zJ{constructor(e){super(e),this.element=new Zp}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2019-09/schema"}ObjectElement(e){this.handleDialectIdentifier(e),this.handleSchemaIdentifier(e),this.parent=this.element;const r=ou.prototype.ObjectElement.call(this,e);return Bt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),r}};class bye extends mr{ObjectElement(e){const r=super.enter(e);return this.element.classes.push("json-schema-$vocabulary"),r}}class Eye extends mr{StringElement(e){const r=super.enter(e);return this.element.classes.push("reference-value"),r}}let JJ=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-$defs"),this.specPath=kt(["document","objects","JSONSchema"])}},GJ=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach(r=>{const n=this.toRefractedElement(["document","objects","JSONSchema"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}},KJ=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach(r=>{const n=this.toRefractedElement(["document","objects","JSONSchema"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}},WJ=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach(r=>{const n=this.toRefractedElement(["document","objects","JSONSchema"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}},YJ=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=kt(["document","objects","JSONSchema"])}};class Sye extends it(ia,An,mr){ObjectElement(e){return this.element=this.toRefractedElement(["document","objects","JSONSchema"],e),ir}ArrayElement(e){return this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-items"),e.forEach(r=>{const n=this.toRefractedElement(["document","objects","JSONSchema"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}BooleanElement(e){return this.element=this.toRefractedElement(["document","objects","JSONSchema"],e),ir}}let XJ=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-properties"),this.specPath=kt(["document","objects","JSONSchema"])}},ZJ=class extends it(hl,An,mr){constructor(e){super(e),this.element=new Oe.ObjectElement,this.element.classes.push("json-schema-patternProperties"),this.specPath=kt(["document","objects","JSONSchema"])}};class _ye extends mr{ObjectElement(e){const r=super.enter(e);return this.element.classes.push("json-schema-dependentRequired"),r}}let QJ=class extends VJ{constructor(e){super(e),this.element=new Qp}};const sy=ti(at(["visitors","document","objects","JSONSchema","$visitor"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],bye),at(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],Zo.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],Zo.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],Zo.visitors.value),ea(["visitors","document","objects","JSONReference","$visitor"]),at(["visitors","document","objects","JSONSchema","fixedFields","$ref"],Eye),ea(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),at(["visitors","document","objects","JSONSchema","fixedFields","$defs"],JJ),at(["visitors","document","objects","JSONSchema","fixedFields","allOf"],GJ),at(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],KJ),at(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],WJ),at(["visitors","document","objects","JSONSchema","fixedFields","not"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","if"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","then"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","else"],Wn),ea(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),at(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],YJ),at(["visitors","document","objects","JSONSchema","fixedFields","items"],Sye),at(["visitors","document","objects","JSONSchema","fixedFields","contains"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","properties"],XJ),at(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],ZJ),at(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Wn),at(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],Zo.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","minContains"],Zo.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],_ye),at(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],Zo.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Wn),at(["visitors","document","objects","LinkDescription","$visitor"],QJ),at(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Wn),at(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Wn),at(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Wn),at(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Wn))(Zo),wye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Zp||t(n)&&e("JSONSchema201909",n)&&r("object",n)),xye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Qp||t(n)&&e("linkDescription",n)&&r("object",n)),Aye=Object.freeze(Object.defineProperty({__proto__:null,isJSONSchemaElement:wye,isLinkDescriptionElement:xye},Symbol.toStringTag,{value:"Module"})),Oye=()=>{const t=_o(gye);return{predicates:{...Aye,isStringElement:Bt},namespace:t}},Cye=(t,{specPath:e=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=sy}={})=>{const i=Oe.refract(t),a=pl(n),o=qn(e,a),u=new o({specObj:a});return xn(i,u),js(u.element,r,{toolboxCreator:Oye,visitorOptions:{keyMap:vye,nodeTypeGetter:Up}})},eG=t=>(e,r={})=>Cye(e,{specPath:t,...r});Zp.refract=eG(["visitors","document","objects","JSONSchema","$visitor"]);Qp.refract=eG(["visitors","document","objects","LinkDescription","$visitor"]);class eh extends Zp{constructor(e,r,n){super(e,r,n),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new er("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new er("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $recursiveRef(){throw new er("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new er("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}}class ev extends Qp{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}}const Tye={namespace:t=>{const{base:e}=t;return e.register("jSONSchema202012",eh),e.register("linkDescription",ev),e}},Rye={JSONSchema202012Element:["content"],LinkDescriptionElement:["content"],...Rs};let Rn=class extends Wn{constructor(e){super(e),this.element=new eh}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}},tG=class extends it(ia,An,mr){constructor(e){super(e),this.element=new Oe.ArrayElement,this.element.classes.push("json-schema-prefixItems")}ArrayElement(e){return e.forEach(r=>{const n=this.toRefractedElement(["document","objects","JSONSchema"],r);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),ir}},jye=class extends QJ{constructor(e){super(e),this.element=new ev}};const rG=ti(at(["visitors","document","objects","JSONSchema","$visitor"],Rn),ea(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),at(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],sy.visitors.value),ea(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),at(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],sy.visitors.value),at(["visitors","document","objects","JSONSchema","fixedFields","not"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","if"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","then"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","else"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],tG),at(["visitors","document","objects","JSONSchema","fixedFields","items"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","contains"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Rn),ea(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),at(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Rn),at(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Rn),at(["visitors","document","objects","LinkDescription","$visitor"],jye),at(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Rn),at(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Rn),at(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Rn),at(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Rn))(sy),Nye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof eh||t(n)&&e("JSONSchema202012",n)&&r("object",n)),Mye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof ev||t(n)&&e("linkDescription",n)&&r("object",n)),Iye=Object.freeze(Object.defineProperty({__proto__:null,isJSONSchemaElement:Nye,isLinkDescriptionElement:Mye},Symbol.toStringTag,{value:"Module"})),kye=()=>{const t=_o(Tye);return{predicates:{...Iye,isStringElement:Bt},namespace:t}},Dye=(t,{specPath:e=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=rG}={})=>{const i=Oe.refract(t),a=pl(n),o=qn(e,a),u=new o({specObj:a});return xn(i,u),js(u.element,r,{toolboxCreator:kye,visitorOptions:{keyMap:Rye,nodeTypeGetter:Up}})},nG=t=>(e,r={})=>Dye(e,{specPath:t,...r});eh.refract=nG(["visitors","document","objects","JSONSchema","$visitor"]);ev.refract=nG(["visitors","document","objects","LinkDescription","$visitor"]);class ol extends eh{constructor(e,r,n){super(e,r,n),this.element="schema"}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}}class tv extends zp{}class rv extends Vp{}class nv extends Hp{}class iv extends Jp{}class RN extends jg{}class jN extends Ng{}const NN={namespace:t=>{const{base:e}=t;return e.register("callback",Lg),e.register("components",Fg),e.register("contact",$g),e.register("discriminator",xN),e.register("encoding",AN),e.register("example",Ug),e.register("externalDocumentation",zg),e.register("header",Vg),e.register("info",Hg),e.register("jsonSchemaDialect",vu),e.register("license",Jg),e.register("link",Gg),e.register("mediaType",Kg),e.register("oAuthFlow",ON),e.register("oAuthFlows",CN),e.register("openapi",TN),e.register("openApi3_1",ml),e.register("operation",Gp),e.register("parameter",Wg),e.register("pathItem",sl),e.register("paths",Yg),e.register("reference",yl),e.register("requestBody",Xg),e.register("response",Zg),e.register("responses",Qg),e.register("schema",ol),e.register("securityRequirement",tv),e.register("securityScheme",rv),e.register("server",nv),e.register("serverVariable",iv),e.register("tag",RN),e.register("xml",jN),e}};class MN extends Oe.ObjectElement{static primaryClass="components-path-items";constructor(e,r,n){super(e,r,n),this.classes.push(MN.primaryClass)}}class IN extends Oe.ObjectElement{static primaryClass="webhooks";constructor(e,r,n){super(e,r,n),this.classes.push(IN.primaryClass)}}const Aa=t=>{if(ln(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Za={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Rs};class th{internalStore;constructor(e,r,n){this.storageElement=e,this.storageField=r,this.storageSubField=n}get store(){if(!this.internalStore){let e=this.storageElement.get(this.storageField);dr(e)||(e=new Oe.ObjectElement,this.storageElement.set(this.storageField,e));let r=e.get(this.storageSubField);ei(r)||(r=new Oe.ArrayElement,e.set(this.storageSubField,r)),this.internalStore=r}return this.internalStore}append(e){this.includes(e)||this.store.push(e)}includes(e){return this.store.includes(e)}}const Pye=({storageField:t="x-normalized"}={})=>e=>{const{predicates:r,ancestorLineageToJSONPointer:n}=e,i=(u,c)=>!r.isParameterElement(u)||!r.isParameterElement(c)||!r.isStringElement(u.name)||!r.isStringElement(u.in)||!r.isStringElement(c.name)||!r.isStringElement(c.in)?!1:He(u.name)===He(c.name)&&He(u.in)===He(c.in),a=[];let o;return{visitor:{OpenApi3_1Element:{enter(u){o=new th(u,t,"parameters")},leave(){o=void 0}},PathItemElement:{enter(u,c,f,p,h){if(h.some(r.isComponentsElement))return;const{parameters:v}=u;r.isArrayElement(v)?a.push([...v.content]):a.push([])},leave(){a.pop()}},OperationElement:{leave(u,c,f,p,h){const v=fg(a);if(!Array.isArray(v)||v.length===0)return;const g=n([...h,f,u]);if(o.includes(g))return;const E=rH([],["parameters","content"],u),S=oH(i,[...E,...v]);u.parameters=new kg(S),o.append(g)}}}}},qye=({storageField:t="x-normalized"}={})=>e=>{const{predicates:r,ancestorLineageToJSONPointer:n}=e;let i,a;return{visitor:{OpenApi3_1Element:{enter(o){a=new th(o,t,"security-requirements"),r.isArrayElement(o.security)&&(i=o.security)},leave(){a=void 0,i=void 0}},OperationElement:{leave(o,u,c,f,p){if(p.some(r.isComponentsElement))return;const h=n([...p,c,o]);if(a.includes(h))return;if(typeof o.security>"u"&&typeof i<"u"){var E;o.security=new Dg((E=i)===null||E===void 0?void 0:E.content),a.append(h)}}}}}},aT=t=>t.replace(/\s/g,""),sT=t=>t.replace(/\W/gi,"_"),Bye=(t,e)=>{const r=sT(aT(e.toLowerCase())),n=sT(aT(t));return`${r}${n}`},Lye=(t,e,r)=>{const n=aT(t);return n.length>0?sT(n):Bye(e,r)},Fye=({storageField:t="x-normalized",operationIdNormalizer:e=Lye}={})=>r=>{const{predicates:n,ancestorLineageToJSONPointer:i,namespace:a}=r,o=[],u=[],c=[];let f;return{visitor:{OpenApi3_1Element:{enter(p){f=new th(p,t,"operation-ids")},leave(){const p=Cue(h=>He(h.operationId),u);Object.entries(p).forEach(([h,v])=>{Array.isArray(v)&&(v.length<=1||v.forEach((g,E)=>{const S=`${h}${E+1}`;g.operationId=new a.elements.String(S)}))}),c.forEach(h=>{if(typeof h.operationId>"u")return;const v=String(He(h.operationId)),g=u.find(E=>He(E.meta.get("originalOperationId"))===v);typeof g>"u"||(h.operationId=mt.safe(g.operationId),h.meta.set("originalOperationId",v),h.set("__originalOperationId",v))}),u.length=0,c.length=0,f=void 0}},PathItemElement:{enter(p){const h=jc("path",He(p.meta.get("path")));o.push(h)},leave(){o.pop()}},OperationElement:{enter(p,h,v,g,E){if(typeof p.operationId>"u")return;const S=i([...E,v,p]);if(f.includes(S))return;const _=String(He(p.operationId)),A=fg(o),w=jc("method",He(p.meta.get("http-method"))),C=e(_,A,w);_!==C&&(p.operationId=new a.elements.String(C),p.set("__originalOperationId",_),p.meta.set("originalOperationId",_),u.push(p),f.append(S))}},LinkElement:{leave(p){n.isLinkElement(p)&&(typeof p.operationId>"u"||c.push(p))}}}}},$ye=({storageField:t="x-normalized"}={})=>e=>{const{predicates:r,ancestorLineageToJSONPointer:n}=e;let i;return{visitor:{OpenApi3_1Element:{enter(a){i=new th(a,t,"parameter-examples")},leave(){i=void 0}},ParameterElement:{leave(a,o,u,c,f){var p,h;if(f.some(r.isComponentsElement)||typeof a.schema>"u"||!r.isSchemaElement(a.schema)||typeof((p=a.schema)===null||p===void 0?void 0:p.example)>"u"&&typeof((h=a.schema)===null||h===void 0?void 0:h.examples)>"u")return;const v=n([...f,u,a]);if(!i.includes(v)){if(typeof a.examples<"u"&&r.isObjectElement(a.examples)){const g=a.examples.map(E=>mt.safe(E.value));typeof a.schema.examples<"u"&&(a.schema.set("examples",g),i.append(v)),typeof a.schema.example<"u"&&(a.schema.set("example",g[0]),i.append(v));return}typeof a.example<"u"&&(typeof a.schema.examples<"u"&&(a.schema.set("examples",[mt(a.example)]),i.append(v)),typeof a.schema.example<"u"&&(a.schema.set("example",mt(a.example)),i.append(v)))}}}}}},Uye=({storageField:t="x-normalized"}={})=>e=>{const{predicates:r,ancestorLineageToJSONPointer:n}=e;let i;return{visitor:{OpenApi3_1Element:{enter(a){i=new th(a,t,"header-examples")},leave(){i=void 0}},HeaderElement:{leave(a,o,u,c,f){var p,h;if(f.some(r.isComponentsElement)||typeof a.schema>"u"||!r.isSchemaElement(a.schema)||typeof((p=a.schema)===null||p===void 0?void 0:p.example)>"u"&&typeof((h=a.schema)===null||h===void 0?void 0:h.examples)>"u")return;const v=n([...f,u,a]);if(!i.includes(v)){if(typeof a.examples<"u"&&r.isObjectElement(a.examples)){const g=a.examples.map(E=>mt.safe(E.value));typeof a.schema.examples<"u"&&(a.schema.set("examples",g),i.append(v)),typeof a.schema.example<"u"&&(a.schema.set("example",g[0]),i.append(v));return}typeof a.example<"u"&&(typeof a.schema.examples<"u"&&(a.schema.set("examples",[mt(a.example)]),i.append(v)),typeof a.schema.example<"u"&&(a.schema.set("example",mt(a.example)),i.append(v)))}}}}}},zye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Lg||t(n)&&e("callback",n)&&r("object",n)),Vye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Fg||t(n)&&e("components",n)&&r("object",n)),Hye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof $g||t(n)&&e("contact",n)&&r("object",n)),Jye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Ug||t(n)&&e("example",n)&&r("object",n)),Gye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof zg||t(n)&&e("externalDocumentation",n)&&r("object",n)),Kye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Vg||t(n)&&e("header",n)&&r("object",n)),Wye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Hg||t(n)&&e("info",n)&&r("object",n)),iG=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof vu||t(n)&&e("jsonSchemaDialect",n)&&r("string",n)),Yye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Jg||t(n)&&e("license",n)&&r("object",n)),Xye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Gg||t(n)&&e("link",n)&&r("object",n)),Zye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof TN||t(n)&&e("openapi",n)&&r("string",n)),aG=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r,hasClass:n})=>i=>i instanceof ml||t(i)&&e("openApi3_1",i)&&r("object",i)&&n("api",i)),sG=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Gp||t(n)&&e("operation",n)&&r("object",n)),Qye=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Wg||t(n)&&e("parameter",n)&&r("object",n)),lu=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof sl||t(n)&&e("pathItem",n)&&r("object",n)),ege=t=>{if(!lu(t)||!Bt(t.$ref))return!1;const e=He(t.$ref);return typeof e=="string"&&e.length>0&&!e.startsWith("#")},tge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Yg||t(n)&&e("paths",n)&&r("object",n)),bu=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof yl||t(n)&&e("reference",n)&&r("object",n)),rge=t=>{if(!bu(t)||!Bt(t.$ref))return!1;const e=He(t.$ref);return typeof e=="string"&&e.length>0&&!e.startsWith("#")},nge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Xg||t(n)&&e("requestBody",n)&&r("object",n)),ige=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Zg||t(n)&&e("response",n)&&r("object",n)),age=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Qg||t(n)&&e("responses",n)&&r("object",n)),Qa=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof ol||t(n)&&e("schema",n)&&r("object",n)),kN=t=>vp(t)&&t.classes.includes("boolean-json-schema"),sge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof tv||t(n)&&e("securityRequirement",n)&&r("object",n)),oge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof rv||t(n)&&e("securityScheme",n)&&r("object",n)),lge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof nv||t(n)&&e("server",n)&&r("object",n)),uge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof iv||t(n)&&e("serverVariable",n)&&r("object",n)),cge=st(({hasBasicElementProps:t,isElementType:e,primitiveEq:r})=>n=>n instanceof Kg||t(n)&&e("mediaType",n)&&r("object",n)),fge=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:kN,isCallbackElement:zye,isComponentsElement:Vye,isContactElement:Hye,isExampleElement:Jye,isExternalDocumentationElement:Gye,isHeaderElement:Kye,isInfoElement:Wye,isJsonSchemaDialectElement:iG,isLicenseElement:Yye,isLinkElement:Xye,isMediaTypeElement:cge,isOpenApi3_1Element:aG,isOpenapiElement:Zye,isOperationElement:sG,isParameterElement:Qye,isPathItemElement:lu,isPathItemElementExternal:ege,isPathsElement:tge,isReferenceElement:bu,isReferenceElementExternal:rge,isRequestBodyElement:nge,isResponseElement:ige,isResponsesElement:age,isSchemaElement:Qa,isSecurityRequirementElement:sge,isSecuritySchemeElement:oge,isServerElement:lge,isServerVariableElement:uge},Symbol.toStringTag,{value:"Module"})),dge=t=>{const e=t.reduce((r,n,i)=>{if(ss(n)){const a=String(He(n.key));r.push(a)}else if(ei(t[i-2])){const a=String(t[i-2].content.indexOf(n));r.push(a)}return r},[]);return wJ(e)},oG=()=>{const t=_o(NN);return{predicates:{...fge,isElement:ln,isStringElement:Bt,isArrayElement:ei,isObjectElement:dr,isMemberElement:ss,isServersElement:BJ,includesClasses:Ic,hasElementSourceMap:Yc},ancestorLineageToJSONPointer:dge,namespace:t}};class pge extends it(Xt,lt){constructor(e){super(e),this.element=new ml,this.specPath=kt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(e){return this.openApiGenericElement=e,Xt.prototype.ObjectElement.call(this,e)}}const hge=Pe.visitors.document.objects.Info.$visitor;class mge extends hge{constructor(e){super(e),this.element=new Hg}}const yge=Pe.visitors.document.objects.Contact.$visitor;class gge extends yge{constructor(e){super(e),this.element=new $g}}const vge=Pe.visitors.document.objects.License.$visitor;class bge extends vge{constructor(e){super(e),this.element=new Jg}}const Ege=Pe.visitors.document.objects.Link.$visitor;class Sge extends Ege{constructor(e){super(e),this.element=new Gg}}class _ge extends it(ls,lt){StringElement(e){const r=new vu(He(e));return this.copyMetaAndAttributes(e,r),this.element=r,ir}}const wge=Pe.visitors.document.objects.Server.$visitor;class xge extends wge{constructor(e){super(e),this.element=new nv}}const Age=Pe.visitors.document.objects.ServerVariable.$visitor;class Oge extends Age{constructor(e){super(e),this.element=new iv}}const Cge=Pe.visitors.document.objects.MediaType.$visitor;class Tge extends Cge{constructor(e){super(e),this.element=new Kg}}const Rge=Pe.visitors.document.objects.SecurityRequirement.$visitor;class jge extends Rge{constructor(e){super(e),this.element=new tv}}const Nge=Pe.visitors.document.objects.Components.$visitor;class Mge extends Nge{constructor(e){super(e),this.element=new Fg}}const Ige=Pe.visitors.document.objects.Tag.$visitor;class kge extends Ige{constructor(e){super(e),this.element=new RN}}const Dge=Pe.visitors.document.objects.Reference.$visitor;class Pge extends Dge{constructor(e){super(e),this.element=new yl}}const qge=Pe.visitors.document.objects.Parameter.$visitor;class Bge extends qge{constructor(e){super(e),this.element=new Wg}}const Lge=Pe.visitors.document.objects.Header.$visitor;class Fge extends Lge{constructor(e){super(e),this.element=new Vg}}class $ge extends it(Xt,An,lt){constructor(e){super(e),this.element=new ol,this.specPath=kt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=vu.default,this.passingOptionsNames.push("parent")}ObjectElement(e){this.handleDialectIdentifier(e),this.handleSchemaIdentifier(e),this.parent=this.element;const r=Xt.prototype.ObjectElement.call(this,e);return Bt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),r}BooleanElement(e){return Rn.prototype.BooleanElement.call(this,e)}get defaultDialectIdentifier(){let e;return this.openApiSemanticElement!==void 0&&iG(this.openApiSemanticElement.jsonSchemaDialect)?e=He(this.openApiSemanticElement.jsonSchemaDialect):this.openApiGenericElement!==void 0&&Bt(this.openApiGenericElement.get("jsonSchemaDialect"))?e=He(this.openApiGenericElement.get("jsonSchemaDialect")):e=He(this.jsonSchemaDefaultDialect),e}handleDialectIdentifier(e){return Rn.prototype.handleDialectIdentifier.call(this,e)}handleSchemaIdentifier(e){return Rn.prototype.handleSchemaIdentifier.call(this,e)}}class Uge extends JJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}let zge=class extends GJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}};class Vge extends KJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}class Hge extends WJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}class Jge extends YJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}class Gge extends tG{constructor(e){super(e),this.passingOptionsNames.push("parent")}}class Kge extends XJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}class Wge extends ZJ{constructor(e){super(e),this.passingOptionsNames.push("parent")}}const Yge=Pe.visitors.document.objects.Discriminator.$visitor;class Xge extends Yge{constructor(e){super(e),this.element=new xN,this.canSupportSpecificationExtensions=!0}}const Zge=Pe.visitors.document.objects.XML.$visitor;class Qge extends Zge{constructor(e){super(e),this.element=new jN}}class eve extends it(Gt,lt){constructor(e){super(e),this.element=new Ig,this.specPath=kt(["document","objects","Schema"])}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(Qa).forEach((n,i)=>{n.setMetaProperty("schemaName",He(i))}),r}}class tve extends it(Gt,lt){constructor(e){super(e),this.element=new MN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(bu).forEach(n=>{n.setMetaProperty("referenced-element","pathItem")}),r}}const rve=Pe.visitors.document.objects.Example.$visitor;class nve extends rve{constructor(e){super(e),this.element=new Ug}}const ive=Pe.visitors.document.objects.ExternalDocumentation.$visitor;class ave extends ive{constructor(e){super(e),this.element=new zg}}const sve=Pe.visitors.document.objects.Encoding.$visitor;class ove extends sve{constructor(e){super(e),this.element=new AN}}const lve=Pe.visitors.document.objects.Paths.$visitor;class uve extends lve{constructor(e){super(e),this.element=new Yg}}const cve=Pe.visitors.document.objects.RequestBody.$visitor;class fve extends cve{constructor(e){super(e),this.element=new Xg}}const GU=Pe.visitors.document.objects.Callback.$visitor;class dve extends GU{constructor(e){super(e),this.element=new Lg,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const r=GU.prototype.ObjectElement.call(this,e);return this.element.filter(bu).forEach(n=>{n.setMetaProperty("referenced-element","pathItem")}),r}}const pve=Pe.visitors.document.objects.Response.$visitor;class hve extends pve{constructor(e){super(e),this.element=new Zg}}const mve=Pe.visitors.document.objects.Responses.$visitor;class yve extends mve{constructor(e){super(e),this.element=new Qg}}const gve=Pe.visitors.document.objects.Operation.$visitor;class vve extends gve{constructor(e){super(e),this.element=new Gp}}const bve=Pe.visitors.document.objects.PathItem.$visitor;class Eve extends bve{constructor(e){super(e),this.element=new sl}}const Sve=Pe.visitors.document.objects.SecurityScheme.$visitor;class _ve extends Sve{constructor(e){super(e),this.element=new rv}}const wve=Pe.visitors.document.objects.OAuthFlows.$visitor;class xve extends wve{constructor(e){super(e),this.element=new CN}}const Ave=Pe.visitors.document.objects.OAuthFlow.$visitor;class Ove extends Ave{constructor(e){super(e),this.element=new ON}}class Cve extends it(Gt,lt){constructor(e){super(e),this.element=new IN,this.specPath=r=>zr(r)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const r=Gt.prototype.ObjectElement.call(this,e);return this.element.filter(bu).forEach(n=>{n.setMetaProperty("referenced-element","pathItem")}),this.element.filter(lu).forEach((n,i)=>{n.setMetaProperty("webhook-name",He(i))}),r}}const{JSONSchema:Tve,LinkDescription:Rve}=rG.visitors.document.objects,jve={visitors:{value:Pe.visitors.value,document:{objects:{OpenApi:{$visitor:pge,fixedFields:{openapi:Pe.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:_ge,servers:Pe.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:Cve,components:{$ref:"#/visitors/document/objects/Components"},security:Pe.visitors.document.objects.OpenApi.fixedFields.security,tags:Pe.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:mge,fixedFields:{title:Pe.visitors.document.objects.Info.fixedFields.title,description:Pe.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:Pe.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Pe.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:gge,fixedFields:{name:Pe.visitors.document.objects.Contact.fixedFields.name,url:Pe.visitors.document.objects.Contact.fixedFields.url,email:Pe.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:bge,fixedFields:{name:Pe.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:Pe.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:xge,fixedFields:{url:Pe.visitors.document.objects.Server.fixedFields.url,description:Pe.visitors.document.objects.Server.fixedFields.description,variables:Pe.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:Oge,fixedFields:{enum:Pe.visitors.document.objects.ServerVariable.fixedFields.enum,default:Pe.visitors.document.objects.ServerVariable.fixedFields.default,description:Pe.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:Mge,fixedFields:{schemas:eve,responses:Pe.visitors.document.objects.Components.fixedFields.responses,parameters:Pe.visitors.document.objects.Components.fixedFields.parameters,examples:Pe.visitors.document.objects.Components.fixedFields.examples,requestBodies:Pe.visitors.document.objects.Components.fixedFields.requestBodies,headers:Pe.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Pe.visitors.document.objects.Components.fixedFields.securitySchemes,links:Pe.visitors.document.objects.Components.fixedFields.links,callbacks:Pe.visitors.document.objects.Components.fixedFields.callbacks,pathItems:tve}},Paths:{$visitor:uve},PathItem:{$visitor:Eve,fixedFields:{$ref:Pe.visitors.document.objects.PathItem.fixedFields.$ref,summary:Pe.visitors.document.objects.PathItem.fixedFields.summary,description:Pe.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:Pe.visitors.document.objects.PathItem.fixedFields.servers,parameters:Pe.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:vve,fixedFields:{tags:Pe.visitors.document.objects.Operation.fixedFields.tags,summary:Pe.visitors.document.objects.Operation.fixedFields.summary,description:Pe.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:Pe.visitors.document.objects.Operation.fixedFields.operationId,parameters:Pe.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Pe.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:Pe.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Pe.visitors.document.objects.Operation.fixedFields.deprecated,security:Pe.visitors.document.objects.Operation.fixedFields.security,servers:Pe.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:ave,fixedFields:{description:Pe.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Pe.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:Bge,fixedFields:{name:Pe.visitors.document.objects.Parameter.fixedFields.name,in:Pe.visitors.document.objects.Parameter.fixedFields.in,description:Pe.visitors.document.objects.Parameter.fixedFields.description,required:Pe.visitors.document.objects.Parameter.fixedFields.required,deprecated:Pe.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Pe.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Pe.visitors.document.objects.Parameter.fixedFields.style,explode:Pe.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Pe.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Pe.visitors.document.objects.Parameter.fixedFields.example,examples:Pe.visitors.document.objects.Parameter.fixedFields.examples,content:Pe.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:fve,fixedFields:{description:Pe.visitors.document.objects.RequestBody.fixedFields.description,content:Pe.visitors.document.objects.RequestBody.fixedFields.content,required:Pe.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:Tge,fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:Pe.visitors.document.objects.MediaType.fixedFields.example,examples:Pe.visitors.document.objects.MediaType.fixedFields.examples,encoding:Pe.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:ove,fixedFields:{contentType:Pe.visitors.document.objects.Encoding.fixedFields.contentType,headers:Pe.visitors.document.objects.Encoding.fixedFields.headers,style:Pe.visitors.document.objects.Encoding.fixedFields.style,explode:Pe.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Pe.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:yve,fixedFields:{default:Pe.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:hve,fixedFields:{description:Pe.visitors.document.objects.Response.fixedFields.description,headers:Pe.visitors.document.objects.Response.fixedFields.headers,content:Pe.visitors.document.objects.Response.fixedFields.content,links:Pe.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:dve},Example:{$visitor:nve,fixedFields:{summary:Pe.visitors.document.objects.Example.fixedFields.summary,description:Pe.visitors.document.objects.Example.fixedFields.description,value:Pe.visitors.document.objects.Example.fixedFields.value,externalValue:Pe.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:Sge,fixedFields:{operationRef:Pe.visitors.document.objects.Link.fixedFields.operationRef,operationId:Pe.visitors.document.objects.Link.fixedFields.operationId,parameters:Pe.visitors.document.objects.Link.fixedFields.parameters,requestBody:Pe.visitors.document.objects.Link.fixedFields.requestBody,description:Pe.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:Fge,fixedFields:{description:Pe.visitors.document.objects.Header.fixedFields.description,required:Pe.visitors.document.objects.Header.fixedFields.required,deprecated:Pe.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Pe.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Pe.visitors.document.objects.Header.fixedFields.style,explode:Pe.visitors.document.objects.Header.fixedFields.explode,allowReserved:Pe.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Pe.visitors.document.objects.Header.fixedFields.example,examples:Pe.visitors.document.objects.Header.fixedFields.examples,content:Pe.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:kge,fixedFields:{name:Pe.visitors.document.objects.Tag.fixedFields.name,description:Pe.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:Pge,fixedFields:{$ref:Pe.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},LinkDescription:{...Rve},Schema:{$visitor:$ge,fixedFields:{...Tve.fixedFields,$defs:Uge,allOf:zge,anyOf:Vge,oneOf:Hge,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:Jge,prefixItems:Gge,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:Kge,patternProperties:Wge,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:Xge,fixedFields:{propertyName:Pe.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Pe.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:Qge,fixedFields:{name:Pe.visitors.document.objects.XML.fixedFields.name,namespace:Pe.visitors.document.objects.XML.fixedFields.namespace,prefix:Pe.visitors.document.objects.XML.fixedFields.prefix,attribute:Pe.visitors.document.objects.XML.fixedFields.attribute,wrapped:Pe.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:_ve,fixedFields:{type:Pe.visitors.document.objects.SecurityScheme.fixedFields.type,description:Pe.visitors.document.objects.SecurityScheme.fixedFields.description,name:Pe.visitors.document.objects.SecurityScheme.fixedFields.name,in:Pe.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Pe.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Pe.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Pe.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:xve,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:Ove,fixedFields:{authorizationUrl:Pe.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Pe.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Pe.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Pe.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:jge}},extension:{$visitor:Pe.visitors.document.extension.$visitor}}}},Nve=(t,{specPath:e=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=Oe.refract(t),i=pl(jve),a=qn(e,i),o=new a({specObj:i});return xn(n,o),js(o.element,r,{toolboxCreator:oG,visitorOptions:{keyMap:Za,nodeTypeGetter:Aa}})},Er=t=>(e,r={})=>Nve(e,{specPath:t,...r});Lg.refract=Er(["visitors","document","objects","Callback","$visitor"]);Fg.refract=Er(["visitors","document","objects","Components","$visitor"]);$g.refract=Er(["visitors","document","objects","Contact","$visitor"]);Ug.refract=Er(["visitors","document","objects","Example","$visitor"]);xN.refract=Er(["visitors","document","objects","Discriminator","$visitor"]);AN.refract=Er(["visitors","document","objects","Encoding","$visitor"]);zg.refract=Er(["visitors","document","objects","ExternalDocumentation","$visitor"]);Vg.refract=Er(["visitors","document","objects","Header","$visitor"]);Hg.refract=Er(["visitors","document","objects","Info","$visitor"]);vu.refract=Er(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]);Jg.refract=Er(["visitors","document","objects","License","$visitor"]);Gg.refract=Er(["visitors","document","objects","Link","$visitor"]);Kg.refract=Er(["visitors","document","objects","MediaType","$visitor"]);ON.refract=Er(["visitors","document","objects","OAuthFlow","$visitor"]);CN.refract=Er(["visitors","document","objects","OAuthFlows","$visitor"]);TN.refract=Er(["visitors","document","objects","OpenApi","fixedFields","openapi"]);ml.refract=Er(["visitors","document","objects","OpenApi","$visitor"]);Gp.refract=Er(["visitors","document","objects","Operation","$visitor"]);Wg.refract=Er(["visitors","document","objects","Parameter","$visitor"]);sl.refract=Er(["visitors","document","objects","PathItem","$visitor"]);Yg.refract=Er(["visitors","document","objects","Paths","$visitor"]);yl.refract=Er(["visitors","document","objects","Reference","$visitor"]);Xg.refract=Er(["visitors","document","objects","RequestBody","$visitor"]);Zg.refract=Er(["visitors","document","objects","Response","$visitor"]);Qg.refract=Er(["visitors","document","objects","Responses","$visitor"]);ol.refract=Er(["visitors","document","objects","Schema","$visitor"]);tv.refract=Er(["visitors","document","objects","SecurityRequirement","$visitor"]);rv.refract=Er(["visitors","document","objects","SecurityScheme","$visitor"]);nv.refract=Er(["visitors","document","objects","Server","$visitor"]);iv.refract=Er(["visitors","document","objects","ServerVariable","$visitor"]);RN.refract=Er(["visitors","document","objects","Tag","$visitor"]);jN.refract=Er(["visitors","document","objects","XML","$visitor"]);class Mve extends Ep{constructor(e){super({...e??{},name:"binary"})}canParse(e){return this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension)}parse(e){try{const r=unescape(encodeURIComponent(e.toString())),n=btoa(r),i=new rs;if(n.length!==0){const a=new Oe.StringElement(n);a.classes.push("result"),i.push(a)}return i}catch(r){throw new ho(`Error parsing "${e.uri}"`,{cause:r})}}}class Ive extends Mfe{constructor(e){super({...e??{},name:"openapi-3-1"})}canResolve(e,r){const n=r.dereference.strategies.find(i=>i.name==="openapi-3-1");return n===void 0?!1:n.canDereference(e,r)}async resolve(e,r){const n=r.dereference.strategies.find(o=>o.name==="openapi-3-1");if(n===void 0)throw new JH('"openapi-3-1" dereference strategy is not available.');const i=new Mc,a=bH(r,{resolve:{internal:!1},dereference:{refSet:i}});return await n.dereference(e,a),i}}const{AbortController:kve,AbortSignal:Dve}=globalThis;typeof globalThis.AbortController>"u"&&(globalThis.AbortController=kve);typeof globalThis.AbortSignal>"u"&&(globalThis.AbortSignal=Dve);class Pve extends Nfe{swaggerHTTPClient=Dd;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:e=Dd,swaggerHTTPClientConfig:r={},...n}={}){super({...n,name:"http-swagger-client"}),this.swaggerHTTPClient=e,this.swaggerHTTPClientConfig=r}getHttpClient(){return this.swaggerHTTPClient}async read(e){const r=this.getHttpClient(),n=new AbortController,{signal:i}=n,a=setTimeout(()=>{n.abort()},this.timeout),o=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",u=this.redirects===0?"error":"follow",c=this.redirects>0?this.redirects:void 0;try{return(await r({url:e.uri,signal:i,userFetch:async(p,h)=>{let v=await fetch(p,h);try{v.headers.delete("Content-Type")}catch{v=new Response(v.body,{...v,headers:new Headers(v.headers)}),v.headers.delete("Content-Type")}return v},credentials:o,redirect:u,follow:c,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(f){throw new EH(`Error downloading "${e.uri}"`,{cause:f})}finally{clearTimeout(a)}}}class qve extends Ep{constructor(e={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...e})}async canParse(e){const r=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),n=this.mediaTypes.includes(e.mediaType);if(!r)return!1;if(n)return!0;if(!n)try{return JSON.parse(e.toString()),!0}catch{return!1}return!1}async parse(e){if(this.sourceMap)throw new ho("json-swagger-client parser plugin doesn't support sourceMaps option");const r=new rs,n=e.toString();if(this.allowEmpty&&n.trim()==="")return r;try{const i=UH(JSON.parse(n));return i.classes.push("result"),r.push(i),r}catch(i){throw new ho(`Error parsing "${e.uri}"`,{cause:i})}}}class Bve extends Ep{constructor(e={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...e})}async canParse(e){const r=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),n=this.mediaTypes.includes(e.mediaType);if(!r)return!1;if(n)return!0;if(!n)try{return au.load(e.toString(),{schema:Nd}),!0}catch{return!1}return!1}async parse(e){if(this.sourceMap)throw new ho("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const r=new rs,n=e.toString();try{const i=au.load(n,{schema:Nd});if(this.allowEmpty&&typeof i>"u")return r;const a=UH(i);return a.classes.push("result"),r.push(a),r}catch(i){throw new ho(`Error parsing "${e.uri}"`,{cause:i})}}}class Lve extends Ep{detectionRegExp=/"openapi"\s*:\s*"(? 3\.1\.(?:[1-9]\d*|0))"/;constructor(e={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new Vj(...Dc.filterByFormat("generic"),...Dc.filterByFormat("json")),...e})}async canParse(e){const r=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),n=this.mediaTypes.includes(e.mediaType);if(!r)return!1;if(n)return!0;if(!n)try{const i=e.toString();return JSON.parse(i),this.detectionRegExp.test(i)}catch{return!1}return!1}async parse(e){if(this.sourceMap)throw new ho("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const r=new rs,n=e.toString();if(this.allowEmpty&&n.trim()==="")return r;try{const i=JSON.parse(n),a=ml.refract(i,this.refractorOpts);return a.classes.push("result"),r.push(a),r}catch(i){throw new ho(`Error parsing "${e.uri}"`,{cause:i})}}}class Fve extends Ep{detectionRegExp=/(? ^(["']?)openapi\2\s*:\s*(["']?)(? 3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(? "openapi"\s*:\s*"(? 3\.1\.(?:[1-9]\d*|0))")/m;constructor(e={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new Vj(...Dc.filterByFormat("generic"),...Dc.filterByFormat("yaml")),...e})}async canParse(e){const r=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),n=this.mediaTypes.includes(e.mediaType);if(!r)return!1;if(n)return!0;if(!n)try{const i=e.toString();return au.load(i),this.detectionRegExp.test(i)}catch{return!1}return!1}async parse(e){if(this.sourceMap)throw new ho("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const r=new rs,n=e.toString();try{const i=au.load(n,{schema:Nd});if(this.allowEmpty&&typeof i>"u")return r;const a=ml.refract(i,this.refractorOpts);return a.classes.push("result"),r.push(a),r}catch(i){throw new ho(`Error parsing "${e.uri}"`,{cause:i})}}}const av=t=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(t),qc=t=>{const e=gH(t);return hH("#",e)},$ve=t=>{if(!av(t))throw new Pfe(t);return t},DN=(t,e)=>{const r=$ve(t),n=$H(i=>Qa(i)&&He(i.$anchor)===r,e);if(dl(n))throw new kfe(`Evaluation failed on token: "${r}"`);return n},lG=(t,e)=>{if(typeof e.$ref>"u")return;const r=gH(He(e.$ref)),n=He(e.meta.get("ancestorsSchemaIdentifiers"));return`${Wc((a,o)=>Xn(a,gg(Pr(o))),t,[...n,He(e.$ref)])}${r==="#"?"":r}`},Uve=(t,e)=>{if(typeof e.$id>"u")return;const r=He(e.meta.get("ancestorsSchemaIdentifiers"));return Wc((n,i)=>Xn(n,gg(Pr(i))),t,r)},xd=t=>{if(xd.cache.has(t))return xd.cache.get(t);const e=ol.refract(t);return xd.cache.set(t,e),e};xd.cache=new WeakMap;const li=t=>nu(t)?xd(t):t,sv=(t,e)=>{const{cache:r}=sv,n=Pr(t),i=o=>Qa(o)&&typeof o.$id<"u";if(!r.has(e)){const o=mfe(i,e);r.set(e,Array.from(o))}const a=r.get(e).find(o=>Uve(n,o)===n);if(dl(a))throw new Mj(`Evaluation failed on URI: "${t}"`);return av(qc(t))?DN(qc(t),a):Xa(a,wa(t))};sv.cache=new WeakMap;const Bm=xn[Symbol.for("nodejs.util.promisify.custom")],Gn=new jj,ba=(t,e,r,n)=>{ss(n)?n.value=t:Array.isArray(n)&&(n[r]=t)};class Xl{indirections;namespace;reference;options;ancestors;refractCache;allOfDiscriminatorMapping;constructor({reference:e,namespace:r,options:n,indirections:i=[],ancestors:a=new CO,refractCache:o=new Map,allOfDiscriminatorMapping:u=new Map}){this.indirections=i,this.namespace=r,this.reference=e,this.options=n,this.ancestors=new CO(...a),this.refractCache=o,this.allOfDiscriminatorMapping=u}handleDereferenceError(e,r,n){var i;if((i=this.options.dereference.dereferenceOpts)!==null&&i!==void 0&&i.continueOnError){var a;if(n){const u=[...n].find(c=>dr(c)&&c.getMetaProperty("ref-referencing-element"));if(u){var o;(o=this.options.dereference.dereferenceOpts)===null||o===void 0||o.errors.push({error:e,refEl:u.getMetaProperty("ref-referencing-element")})}}(a=this.options.dereference.dereferenceOpts)===null||a===void 0||a.errors.push({error:e,refEl:r});return}throw e}getNestedVisitorOptions(e){var r,n;return{...this.options,resolve:{...this.options.resolve,external:(r=this.options.dereference)!==null&&r!==void 0&&(r=r.dereferenceOpts)!==null&&r!==void 0&&r.skipNestedExternal&&He(e.get("$ref")).startsWith("#")?!1:this.options.resolve.external},dereference:{...this.options.dereference,dereferenceOpts:{...(n=this.options.dereference)===null||n===void 0?void 0:n.dereferenceOpts,continueOnError:!1}}}}toBaseURI(e){return Xn(this.reference.uri,gg(Pr(e)))}async toReference(e){if(this.reference.depth>=this.options.resolve.maxDepth)throw new qfe(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const r=this.toBaseURI(e),{refSet:n}=this.reference;if(n.has(r))return n.find(iH(r,"uri"));const i=await kce(bs(r),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),a=new co({uri:r,value:mt(i),depth:this.reference.depth+1});if(n.add(a),this.options.dereference.immutable){const o=new co({uri:`immutable://${r}`,value:i,depth:this.reference.depth+1});n.add(o)}return a}toAncestorLineage(e){const r=new Set(e.filter(ln));return[new CO(...this.ancestors,r),r]}OpenApi3_1Element={leave:(e,r,n,i,a,o)=>{var u;if(!((u=this.options.dereference.strategyOpts["openapi-3-1"])!==null&&u!==void 0&&u.dereferenceDiscriminatorMapping))return;const c=Pn(e);return c.setMetaProperty("allOfDiscriminatorMapping",Object.fromEntries(this.allOfDiscriminatorMapping)),o.replaceWith(c,ba),n?void 0:c}};async ReferenceElement(e,r,n,i,a,o){var u,c;if(this.indirections.includes(e))return!1;const[f,p]=this.toAncestorLineage([...a,n]),h=this.toBaseURI(He(e.$ref)),v=Pr(this.reference.uri)===h,g=!v;if(!this.options.resolve.internal&&v||!this.options.resolve.external&&g)return!1;let E;try{E=await this.toReference(He(e.$ref))}catch(M){return this.handleDereferenceError(M,e,p)}const S=Xn(h,He(e.$ref));this.indirections.push(e);const _=wa(S);let A;try{A=Xa(E.value.result,_)}catch(M){return this.indirections.pop(),this.handleDereferenceError(M,e,p)}if(A.id=Gn.identify(A),nu(A)){const M=He(e.meta.get("referenced-element")),D=`${M}-${He(Gn.identify(A))}`;this.refractCache.has(D)?A=this.refractCache.get(D):zr(A)?(A=yl.refract(A),A.setMetaProperty("referenced-element",M),this.refractCache.set(D,A)):(A=this.namespace.getElementClass(M).refract(A),this.refractCache.set(D,A))}if(e===A){const M=new tn("Recursive Reference Object detected");return this.indirections.pop(),this.handleDereferenceError(M,e,p)}if(this.indirections.length>this.options.dereference.maxDepth){const M=new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);return this.indirections.pop(),this.handleDereferenceError(M,e,p)}if(f.includes(A)){if(E.refSet.circular=!0,this.options.dereference.circular==="error"){const M=new tn("Circular reference detected");return this.indirections.pop(),this.handleDereferenceError(M,e,p)}if(this.options.dereference.circular==="replace"){var w,C;const M=new Oe.RefElement(A.id,{type:"reference",uri:E.uri,$ref:He(e.$ref)}),q=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(M);return o.replaceWith(q,ba),n?!1:q}}const R=Pr(E.refSet.rootRef.uri)!==E.uri,O=["error","replace"].includes(this.options.dereference.circular);if((g||R||bu(A)||O||(u=this.options.dereference.dereferenceOpts)!==null&&u!==void 0&&u.continueOnError)&&!f.includesCycle(A)){p.add(e);const M=new Xl({reference:E,namespace:this.namespace,indirections:[...this.indirections],options:this.getNestedVisitorOptions(e),refractCache:this.refractCache,ancestors:f,allOfDiscriminatorMapping:this.allOfDiscriminatorMapping});try{A=await Bm(A,M,{keyMap:Za,nodeTypeGetter:Aa})}catch(D){return this.indirections.pop(),this.handleDereferenceError(D,e,p)}p.delete(e)}this.indirections.pop();const N=Pn(A);return N.setMetaProperty("id",Gn.generateId()),N.setMetaProperty("ref-fields",{$ref:He(e.$ref),description:He(e.description),summary:He(e.summary)}),N.setMetaProperty("ref-origin",E.uri),N.setMetaProperty("ref-referencing-element-id",mt(Gn.identify(e))),(c=this.options.dereference.dereferenceOpts)!==null&&c!==void 0&&c.continueOnError&&N.setMetaProperty("ref-referencing-element",e),dr(A)&&dr(N)&&(e.hasKey("description")&&"description"in A&&(N.remove("description"),N.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in A&&(N.remove("summary"),N.set("summary",e.get("summary")))),o.replaceWith(N,ba),n?!1:N}async PathItemElement(e,r,n,i,a,o){var u;if(!Bt(e.$ref))return;if(this.indirections.includes(e))return!1;const[c,f]=this.toAncestorLineage([...a,n]),p=this.toBaseURI(He(e.$ref)),h=Pr(this.reference.uri)===p,v=!h;if(!this.options.resolve.internal&&h||!this.options.resolve.external&&v)return;let g;try{g=await this.toReference(He(e.$ref))}catch(N){return this.handleDereferenceError(N,e,f)}const E=Xn(p,He(e.$ref));this.indirections.push(e);const S=wa(E);let _;try{_=Xa(g.value.result,S)}catch(N){return this.indirections.pop(),this.handleDereferenceError(N,e,f)}if(_.id=Gn.identify(_),nu(_)){const N=`path-item-${He(Gn.identify(_))}`;this.refractCache.has(N)?_=this.refractCache.get(N):(_=sl.refract(_),this.refractCache.set(N,_))}if(e===_){const N=new tn("Recursive Path Item Object reference detected");return this.indirections.pop(),this.handleDereferenceError(N,e,f)}if(this.indirections.length>this.options.dereference.maxDepth){const N=new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);return this.indirections.pop(),this.handleDereferenceError(N,e,f)}if(c.includes(_)){if(g.refSet.circular=!0,this.options.dereference.circular==="error"){const N=new tn("Circular reference detected");return this.indirections.pop(),this.handleDereferenceError(N,e,f)}if(this.options.dereference.circular==="replace"){var A,w;const N=new Oe.RefElement(_.id,{type:"path-item",uri:g.uri,$ref:He(e.$ref)}),D=((A=(w=this.options.dereference.strategyOpts["openapi-3-1"])===null||w===void 0?void 0:w.circularReplacer)!==null&&A!==void 0?A:this.options.dereference.circularReplacer)(N);return o.replaceWith(D,ba),n?!1:D}}const C=Pr(g.refSet.rootRef.uri)!==g.uri,R=["error","replace"].includes(this.options.dereference.circular);if((v||C||lu(_)&&Bt(_.$ref)||R||(u=this.options.dereference.dereferenceOpts)!==null&&u!==void 0&&u.continueOnError)&&!c.includesCycle(_)){f.add(e);const N=new Xl({reference:g,namespace:this.namespace,indirections:[...this.indirections],options:this.getNestedVisitorOptions(e),refractCache:this.refractCache,ancestors:c,allOfDiscriminatorMapping:this.allOfDiscriminatorMapping});try{_=await Bm(_,N,{keyMap:Za,nodeTypeGetter:Aa})}catch(M){return this.indirections.pop(),this.handleDereferenceError(M,e,f)}f.delete(e)}if(this.indirections.pop(),lu(_)){var O;const N=new sl([..._.content],mt(_.meta),mt(_.attributes));N.setMetaProperty("id",Gn.generateId()),e.forEach((M,D,q)=>{N.remove(He(D)),N.content.push(q)}),N.remove("$ref"),N.setMetaProperty("ref-fields",{$ref:He(e.$ref)}),N.setMetaProperty("ref-origin",g.uri),N.setMetaProperty("ref-referencing-element-id",mt(Gn.identify(e))),(O=this.options.dereference.dereferenceOpts)!==null&&O!==void 0&&O.continueOnError&&N.setMetaProperty("ref-referencing-element",e),_=N}return o.replaceWith(_,ba),n?void 0:_}async LinkElement(e,r,n,i,a,o){if(!Bt(e.operationRef)&&!Bt(e.operationId))return;if(Bt(e.operationRef)&&Bt(e.operationId)){const p=new tn("LinkElement operationRef and operationId fields are mutually exclusive.");return this.handleDereferenceError(p,e)}let u;if(Bt(e.operationRef)){var c;const p=wa(He(e.operationRef)),h=this.toBaseURI(He(e.operationRef)),v=Pr(this.reference.uri)===h,g=!v;if(!this.options.resolve.internal&&v||!this.options.resolve.external&&g)return;let E;try{E=await this.toReference(He(e.operationRef)),u=Xa(E.value.result,p)}catch(_){return this.handleDereferenceError(_,e)}if(nu(u)){const _=`operation-${He(Gn.identify(u))}`;this.refractCache.has(_)?u=this.refractCache.get(_):(u=Gp.refract(u),this.refractCache.set(_,u))}u=Pn(u),u.setMetaProperty("ref-origin",E.uri);const S=Pn(e);return(c=S.operationRef)===null||c===void 0||c.meta.set("operation",u),o.replaceWith(S,ba),n?void 0:S}if(Bt(e.operationId)){var f;const p=He(e.operationId);let h;try{h=await this.toReference(bs(this.reference.uri))}catch(g){return this.handleDereferenceError(g,e)}if(u=$H(g=>sG(g)&&ln(g.operationId)&&g.operationId.equals(p),h.value.result),dl(u)){const g=new tn(`OperationElement(operationId=${p}) not found.`);return this.handleDereferenceError(g,e)}const v=Pn(e);return(f=v.operationId)===null||f===void 0||f.meta.set("operation",u),o.replaceWith(v,ba),n?void 0:v}}async ExampleElement(e,r,n,i,a,o){if(!Bt(e.externalValue))return;if(e.hasKey("value")&&Bt(e.externalValue)){const g=new tn("ExampleElement value and externalValue fields are mutually exclusive.");return this.handleDereferenceError(g,e)}const u=this.toBaseURI(He(e.externalValue)),c=Pr(this.reference.uri)===u,f=!c;if(!this.options.resolve.internal&&c||!this.options.resolve.external&&f)return;let p;try{p=await this.toReference(He(e.externalValue))}catch(g){return this.handleDereferenceError(g,e)}const h=Pn(p.value.result);h.setMetaProperty("ref-origin",p.uri);const v=Pn(e);return v.value=h,o.replaceWith(v,ba),n?void 0:v}async MemberElement(e,r,n,i,a,o){var u;const c=a[a.length-1];if(!dr(c)||!c.classes.contains("discriminator-mapping"))return;if(!((u=this.options.dereference.strategyOpts["openapi-3-1"])!==null&&u!==void 0&&u.dereferenceDiscriminatorMapping)||!Bt(e.key)||!Bt(e.value)||this.indirections.includes(e))return!1;this.indirections.push(e);const[f,p]=this.toAncestorLineage([...a,n]),h=[...p].findLast(Qa),v=mt(h.getMetaProperty("ancestorsSchemaIdentifiers")),g=He(e.value),S=/^[a-zA-Z0-9\\.\\-_]+$/.test(g)?`#/components/schemas/${g}`:g,_=new ol({$ref:S});_.setMetaProperty("ancestorsSchemaIdentifiers",v),p.add(_);const A=new Xl({reference:this.reference,namespace:this.namespace,indirections:[...this.indirections],options:this.getNestedVisitorOptions(_),refractCache:this.refractCache,ancestors:f,allOfDiscriminatorMapping:this.allOfDiscriminatorMapping});let w;try{w=await Bm(_,A,{keyMap:Za,nodeTypeGetter:Aa})}catch(R){return this.handleDereferenceError(R,_,p)}p.delete(_),this.indirections.pop();const C=Pn(e);return C.value.setMetaProperty("ref-schema",w),o.replaceWith(C,ba),n?void 0:C}async SchemaElement(e,r,n,i,a,o){var u;if(!Bt(e.$ref))return;if(this.indirections.includes(e))return!1;const[c,f]=this.toAncestorLineage([...a,n]);let p;try{p=await this.toReference(bs(this.reference.uri))}catch(V){return this.handleDereferenceError(V,e,f)}let{uri:h}=p;const v=lG(h,e),g=Pr(v),E=new Nc({uri:g}),S=Due(V=>V.canRead(E),this.options.resolve.resolvers),_=!S;let A=Pr(this.reference.uri)===v,w=!A;this.indirections.push(e);let C;try{if(S||_){h=this.toBaseURI(v);const V=v,U=li(p.value.result);if(C=sv(V,U),C=li(C),C.id=Gn.identify(C),!this.options.resolve.internal&&A||!this.options.resolve.external&&w)return}else{if(h=this.toBaseURI(v),A=Pr(this.reference.uri)===h,w=!A,!this.options.resolve.internal&&A||!this.options.resolve.external&&w)return;p=await this.toReference(bs(v));const V=wa(v),U=li(p.value.result);C=Xa(U,V),C=li(C),C.id=Gn.identify(C)}}catch(V){if(_&&V instanceof Mj)if(av(qc(v))){if(A=Pr(this.reference.uri)===h,w=!A,!this.options.resolve.internal&&A||!this.options.resolve.external&&w)return;try{p=await this.toReference(bs(v))}catch(ue){return this.indirections.pop(),this.handleDereferenceError(ue,e,f)}const U=qc(v),se=li(p.value.result);try{C=DN(U,se)}catch(ue){return this.indirections.pop(),this.handleDereferenceError(ue,e,f)}C=li(C),C.id=Gn.identify(C)}else{if(h=this.toBaseURI(v),A=Pr(this.reference.uri)===h,w=!A,!this.options.resolve.internal&&A||!this.options.resolve.external&&w)return;try{p=await this.toReference(bs(v))}catch(ue){return this.indirections.pop(),this.handleDereferenceError(ue,e,f)}const U=wa(v),se=li(p.value.result);try{C=Xa(se,U)}catch(ue){return this.indirections.pop(),this.handleDereferenceError(ue,e,f)}C=li(C),C.id=Gn.identify(C)}else return this.indirections.pop(),this.handleDereferenceError(V,e,f)}if(e===C){const V=new tn("Recursive Schema Object reference detected");return this.indirections.pop(),this.handleDereferenceError(V,e,f)}if(this.indirections.length>this.options.dereference.maxDepth){const V=new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);return this.indirections.pop(),this.handleDereferenceError(V,e,f)}if(c.includes(C)){if(p.refSet.circular=!0,this.options.dereference.circular==="error"){const V=new tn("Circular reference detected");return this.indirections.pop(),this.handleDereferenceError(V,e,f)}if(this.options.dereference.circular==="replace"){var R,O;const V=new Oe.RefElement(C.id,{type:"json-schema",uri:p.uri,$ref:He(e.$ref)}),se=((R=(O=this.options.dereference.strategyOpts["openapi-3-1"])===null||O===void 0?void 0:O.circularReplacer)!==null&&R!==void 0?R:this.options.dereference.circularReplacer)(V);return o.replaceWith(se,ba),n?!1:se}}const N=Pr(p.refSet.rootRef.uri)!==p.uri,M=["error","replace"].includes(this.options.dereference.circular);if((w||N||Qa(C)&&Bt(C.$ref)||M||(u=this.options.dereference.dereferenceOpts)!==null&&u!==void 0&&u.continueOnError)&&!c.includesCycle(C)){f.add(e);const V=new Xl({reference:p,namespace:this.namespace,indirections:[...this.indirections],options:this.getNestedVisitorOptions(e),refractCache:this.refractCache,ancestors:c,allOfDiscriminatorMapping:this.allOfDiscriminatorMapping});try{C=await Bm(C,V,{keyMap:Za,nodeTypeGetter:Aa})}catch(U){return this.indirections.pop(),this.handleDereferenceError(U,e,f)}f.delete(e)}if(this.indirections.pop(),kN(C)){const V=mt(C);return V.setMetaProperty("id",Gn.generateId()),V.setMetaProperty("ref-fields",{$ref:He(e.$ref),$refBaseURI:v}),V.setMetaProperty("ref-origin",p.uri),V.setMetaProperty("ref-referencing-element-id",mt(Gn.identify(e))),o.replaceWith(V,ba),n?!1:V}if(Qa(C)){var D,q;const V=new ol([...C.content],mt(C.meta),mt(C.attributes));if(V.setMetaProperty("id",Gn.generateId()),e.forEach((U,se,ue)=>{V.remove(He(se)),V.content.push(ue)}),V.remove("$ref"),V.setMetaProperty("ref-fields",{$ref:He(e.$ref),$refBaseURI:v}),V.setMetaProperty("ref-origin",p.uri),V.setMetaProperty("ref-referencing-element-id",mt(Gn.identify(e))),(D=this.options.dereference.dereferenceOpts)!==null&&D!==void 0&&D.continueOnError&&V.setMetaProperty("ref-referencing-element",e),(q=this.options.dereference.strategyOpts["openapi-3-1"])!==null&&q!==void 0&&q.dereferenceDiscriminatorMapping){var H;const U=a[a.length-1],se=[...f].findLast(Qa),ue=se?.getMetaProperty("schemaName"),W=He(V.getMetaProperty("schemaName"));if(W&&ue&&U!==null&&U!==void 0&&(H=U.classes)!==null&&H!==void 0&&H.contains("json-schema-allOf")){var P;const te=(P=this.allOfDiscriminatorMapping.get(W))!==null&&P!==void 0?P:[];te.push(se),this.allOfDiscriminatorMapping.set(W,te)}}C=V}return o.replaceWith(C,ba),n?void 0:C}}const zve=xn[Symbol.for("nodejs.util.promisify.custom")];class Vve extends Ife{constructor(e){super({...e??{},name:"openapi-3-1"})}canDereference(e){var r;return e.mediaType!=="text/plain"?Dc.includes(e.mediaType):aG((r=e.parseResult)===null||r===void 0?void 0:r.result)}async dereference(e,r){var n;const i=_o(NN),a=(n=r.dereference.refSet)!==null&&n!==void 0?n:new Mc,o=new Mc;let u=a,c;a.has(e.uri)?c=a.find(iH(e.uri,"uri")):(c=new co({uri:e.uri,value:e.parseResult}),a.add(c)),r.dereference.immutable&&(a.refs.map(h=>new co({...h,value:mt(h.value)})).forEach(h=>o.add(h)),c=o.find(h=>h.uri===e.uri),u=o);const f=new Xl({reference:c,namespace:i,options:r}),p=await zve(u.rootRef.value,f,{keyMap:Za,nodeTypeGetter:Aa});return r.dereference.immutable&&o.refs.filter(h=>h.uri.startsWith("immutable://")).map(h=>new co({...h,uri:h.uri.replace(/^immutable:\/\//,"")})).forEach(h=>a.add(h)),r.dereference.refSet===null&&a.clean(),o.clean(),p}}const Hve=t=>t.slice(2),Ka=t=>{const e=Hve(t);return e.reduce((r,n,i)=>{if(ss(n)){const a=String(He(n.key));r.push(a)}else if(ei(e[i-2])){const a=e[i-2].content.indexOf(n);r.push(a)}return r},[])};class Jve{modelPropertyMacro;options;SchemaElement={leave:(e,r,n,i,a)=>{typeof e.properties>"u"||dr(e.properties)&&e.properties.forEach(o=>{if(dr(o))try{const f=this.modelPropertyMacro(He(o));o.set("default",f)}catch(f){var u,c;const p=new Error(f,{cause:f});p.fullPath=[...Ka([...a,n,e]),"properties"],(u=this.options.dereference.dereferenceOpts)===null||u===void 0||(u=u.errors)===null||u===void 0||(c=u.push)===null||c===void 0||c.call(u,p)}})}};constructor({modelPropertyMacro:e,options:r}){this.modelPropertyMacro=e,this.options=r}}class Gve{options;SchemaElement={leave(e,r,n,i,a){if(typeof e.allOf>"u")return;if(!ei(e.allOf)){var o,u;const h=new TypeError("allOf must be an array");h.fullPath=[...Ka([...a,n,e]),"allOf"],(o=this.options.dereference.dereferenceOpts)===null||o===void 0||(o=o.errors)===null||o===void 0||(u=o.push)===null||u===void 0||u.call(o,h);return}if(e.allOf.isEmpty){e.remove("allOf");return}if(!e.allOf.content.every(Qa)){var f,p;const h=new TypeError("Elements in allOf must be objects");h.fullPath=[...Ka([...a,n,e]),"allOf"],(f=this.options.dereference.dereferenceOpts)===null||f===void 0||(f=f.errors)===null||f===void 0||(p=f.push)===null||p===void 0||p.call(f,h);return}for(;e.hasKey("allOf");){const{allOf:h}=e;e.remove("allOf");const v=Oa.all([...h.content,e],{customMerge:g=>He(g)==="enum"?(E,S)=>{if(Ic(["json-schema-enum"],E)&&Ic(["json-schema-enum"],S)){const _=(w,C)=>ei(w)||ei(C)||dr(w)||dr(C)?!1:w.equals(He(C)),A=Pn(E);return A.content=oH(_)([...E.content,...S.content]),A}return Oa(E,S)}:Oa});if(e.hasKey("$$ref")||v.remove("$$ref"),e.hasKey("example")){const g=v.getMember("example");g&&(g.value=e.get("example"))}if(e.hasKey("examples")){const g=v.getMember("examples");g&&(g.value=e.get("examples"))}e.content=v.content}}};constructor({options:e}){this.options=e}}class Kve{parameterMacro;options;#e;OperationElement={enter:e=>{this.#e=e},leave:()=>{this.#e=void 0}};ParameterElement={leave:(e,r,n,i,a)=>{const o=this.#e?He(this.#e):null,u=He(e);try{const p=this.parameterMacro(o,u);e.set("default",p)}catch(p){var c,f;const h=new Error(p,{cause:p});h.fullPath=Ka([...a,n]),(c=this.options.dereference.dereferenceOpts)===null||c===void 0||(c=c.errors)===null||c===void 0||(f=c.push)===null||f===void 0||f.call(c,h)}}};constructor({parameterMacro:e,options:r}){this.parameterMacro=e,this.options=r}}const Lm=t=>{if(t.cause==null)return t;let{cause:e}=t;for(;e.cause!=null;)e=e.cause;return e};class Wve extends xs{}const{wrapError:MO}=kj,IO=xn[Symbol.for("nodejs.util.promisify.custom")],Ea=new jj,Jl=(t,e,r,n)=>{ss(n)?n.value=t:Array.isArray(n)&&(n[r]=t)};class Ad extends Xl{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:e=!0,useCircularStructures:r=!1,basePath:n=null,...i}){super(i),this.allowMetaPatches=e,this.useCircularStructures=r,this.basePath=n}async ReferenceElement(e,r,n,i,a,o){try{if(this.indirections.includes(e))return!1;const[g,E]=this.toAncestorLineage([...a,n]),S=this.toBaseURI(He(e.$ref)),_=Pr(this.reference.uri)===S,A=!_;if(!this.options.resolve.internal&&_||!this.options.resolve.external&&A)return!1;const w=await this.toReference(He(e.$ref)),C=Xn(S,He(e.$ref));this.indirections.push(e);const R=wa(C);let O=Xa(w.value.result,R);if(O.id=Ea.identify(O),nu(O)){const q=He(e.meta.get("referenced-element")),H=`${q}-${He(Ea.identify(O))}`;this.refractCache.has(H)?O=this.refractCache.get(H):zr(O)?(O=yl.refract(O),O.setMetaProperty("referenced-element",q),this.refractCache.set(H,O)):(O=this.namespace.getElementClass(q).refract(O),this.refractCache.set(H,O))}if(e===O)throw new tn("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(g.includes(O)){if(w.refSet.circular=!0,this.options.dereference.circular==="error")throw new tn("Circular reference detected");if(this.options.dereference.circular==="replace"){var u,c;const q=new Oe.RefElement(O.id,{type:"reference",uri:w.uri,$ref:He(e.$ref),baseURI:C,referencingElement:e}),P=((u=(c=this.options.dereference.strategyOpts["openapi-3-1"])===null||c===void 0?void 0:c.circularReplacer)!==null&&u!==void 0?u:this.options.dereference.circularReplacer)(q);return o.replaceWith(q,Jl),n?!1:P}}const N=Pr(w.refSet.rootRef.uri)!==w.uri,M=["error","replace"].includes(this.options.dereference.circular);if((A||N||bu(O)||M)&&!g.includesCycle(O)){var f;E.add(e);const q=new Ad({reference:w,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:g,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(f=this.basePath)!==null&&f!==void 0?f:[...Ka([...a,n,e]),"$ref"]});O=await IO(O,q,{keyMap:Za,nodeTypeGetter:Aa}),E.delete(e)}this.indirections.pop();const D=Pn(O);if(D.setMetaProperty("ref-fields",{$ref:He(e.$ref),description:He(e.description),summary:He(e.summary)}),D.setMetaProperty("ref-origin",w.uri),D.setMetaProperty("ref-referencing-element-id",mt(Ea.identify(e))),dr(O)&&(e.hasKey("description")&&"description"in O&&(D.remove("description"),D.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in O&&(D.remove("summary"),D.set("summary",e.get("summary")))),this.allowMetaPatches&&dr(D)&&!D.hasKey("$$ref")){const q=Xn(S,C);D.set("$$ref",q)}return o.replaceWith(D,Jl),n?!1:D}catch(g){var p,h,v;const E=Lm(g),S=MO(E,{baseDoc:this.reference.uri,$ref:He(e.$ref),pointer:wa(He(e.$ref)),fullPath:(p=this.basePath)!==null&&p!==void 0?p:[...Ka([...a,n,e]),"$ref"]});(h=this.options.dereference.dereferenceOpts)===null||h===void 0||(h=h.errors)===null||h===void 0||(v=h.push)===null||v===void 0||v.call(h,S);return}}async PathItemElement(e,r,n,i,a,o){try{if(!Bt(e.$ref))return;if(this.indirections.includes(e)||Ic(["cycle"],e.$ref))return!1;const[g,E]=this.toAncestorLineage([...a,n]),S=this.toBaseURI(He(e.$ref)),_=Pr(this.reference.uri)===S,A=!_;if(!this.options.resolve.internal&&_||!this.options.resolve.external&&A)return;const w=await this.toReference(He(e.$ref)),C=Xn(S,He(e.$ref));this.indirections.push(e);const R=wa(C);let O=Xa(w.value.result,R);if(O.id=Ea.identify(O),nu(O)){const D=`path-item-${He(Ea.identify(O))}`;this.refractCache.has(D)?O=this.refractCache.get(D):(O=sl.refract(O),this.refractCache.set(D,O))}if(e===O)throw new tn("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(g.includes(O)){if(w.refSet.circular=!0,this.options.dereference.circular==="error")throw new tn("Circular reference detected");if(this.options.dereference.circular==="replace"){var u,c;const D=new Oe.RefElement(O.id,{type:"path-item",uri:w.uri,$ref:He(e.$ref),baseURI:C,referencingElement:e}),H=((u=(c=this.options.dereference.strategyOpts["openapi-3-1"])===null||c===void 0?void 0:c.circularReplacer)!==null&&u!==void 0?u:this.options.dereference.circularReplacer)(D);return o.replaceWith(D,Jl),n?!1:H}}const N=Pr(w.refSet.rootRef.uri)!==w.uri,M=["error","replace"].includes(this.options.dereference.circular);if((A||N||lu(O)&&Bt(O.$ref)||M)&&!g.includesCycle(O)){var f;E.add(e);const D=new Ad({reference:w,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:g,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(f=this.basePath)!==null&&f!==void 0?f:[...Ka([...a,n,e]),"$ref"]});O=await IO(O,D,{keyMap:Za,nodeTypeGetter:Aa}),E.delete(e)}if(this.indirections.pop(),lu(O)){const D=new sl([...O.content],mt(O.meta),mt(O.attributes));if(e.forEach((q,H,P)=>{D.remove(He(H)),D.content.push(P)}),D.remove("$ref"),D.setMetaProperty("ref-fields",{$ref:He(e.$ref)}),D.setMetaProperty("ref-origin",w.uri),D.setMetaProperty("ref-referencing-element-id",mt(Ea.identify(e))),this.allowMetaPatches&&typeof D.get("$$ref")>"u"){const q=Xn(S,C);D.set("$$ref",q)}O=D}return o.replaceWith(O,Jl),n?void 0:O}catch(g){var p,h,v;const E=Lm(g),S=MO(E,{baseDoc:this.reference.uri,$ref:He(e.$ref),pointer:wa(He(e.$ref)),fullPath:(p=this.basePath)!==null&&p!==void 0?p:[...Ka([...a,n,e]),"$ref"]});(h=this.options.dereference.dereferenceOpts)===null||h===void 0||(h=h.errors)===null||h===void 0||(v=h.push)===null||v===void 0||v.call(h,S);return}}async SchemaElement(e,r,n,i,a,o){try{if(!Bt(e.$ref))return;if(this.indirections.includes(e))return!1;const[g,E]=this.toAncestorLineage([...a,n]);let S=await this.toReference(bs(this.reference.uri)),{uri:_}=S;const A=lG(_,e),w=Pr(A),C=new Nc({uri:w}),R=!this.options.resolve.resolvers.some(P=>P.canRead(C)),O=!R;let N=Pr(this.reference.uri)===A,M=!N;this.indirections.push(e);let D;try{if(R||O){_=this.toBaseURI(A);const P=A,V=li(S.value.result);if(D=sv(P,V),D=li(D),D.id=Ea.identify(D),!this.options.resolve.internal&&N||!this.options.resolve.external&&M)return}else{if(_=this.toBaseURI(A),N=Pr(this.reference.uri)===_,M=!N,!this.options.resolve.internal&&N||!this.options.resolve.external&&M)return;S=await this.toReference(bs(A));const P=wa(A),V=li(S.value.result);D=Xa(V,P),D=li(D),D.id=Ea.identify(D)}}catch(P){if(O&&P instanceof Mj)if(av(qc(A))){if(N=Pr(this.reference.uri)===_,M=!N,!this.options.resolve.internal&&N||!this.options.resolve.external&&M)return;S=await this.toReference(bs(A));const V=qc(A),U=li(S.value.result);D=DN(V,U),D=li(D),D.id=Ea.identify(D)}else{if(_=this.toBaseURI(He(A)),N=Pr(this.reference.uri)===_,M=!N,!this.options.resolve.internal&&N||!this.options.resolve.external&&M)return;S=await this.toReference(bs(A));const V=wa(A),U=li(S.value.result);D=Xa(U,V),D=li(D),D.id=Ea.identify(D)}else throw P}if(e===D)throw new tn("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ac(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(g.includes(D)){if(S.refSet.circular=!0,this.options.dereference.circular==="error")throw new tn("Circular reference detected");if(this.options.dereference.circular==="replace"){var u,c;const P=new Oe.RefElement(D.id,{type:"json-schema",uri:S.uri,$ref:He(e.$ref),baseURI:Xn(_,A),referencingElement:e}),U=((u=(c=this.options.dereference.strategyOpts["openapi-3-1"])===null||c===void 0?void 0:c.circularReplacer)!==null&&u!==void 0?u:this.options.dereference.circularReplacer)(P);return o.replaceWith(U,Jl),n?!1:U}}const q=Pr(S.refSet.rootRef.uri)!==S.uri,H=["error","replace"].includes(this.options.dereference.circular);if((M||q||Qa(D)&&Bt(D.$ref)||H)&&!g.includesCycle(D)){var f;E.add(e);const P=new Ad({reference:S,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:g,basePath:(f=this.basePath)!==null&&f!==void 0?f:[...Ka([...a,n,e]),"$ref"]});D=await IO(D,P,{keyMap:Za,nodeTypeGetter:Aa}),E.delete(e)}if(this.indirections.pop(),kN(D)){const P=mt(D);return P.setMetaProperty("ref-fields",{$ref:He(e.$ref)}),P.setMetaProperty("ref-origin",S.uri),P.setMetaProperty("ref-referencing-element-id",mt(Ea.identify(e))),o.replaceWith(P,Jl),n?!1:P}if(Qa(D)){const P=new ol([...D.content],mt(D.meta),mt(D.attributes));if(e.forEach((V,U,se)=>{P.remove(He(U)),P.content.push(se)}),P.remove("$ref"),P.setMetaProperty("ref-fields",{$ref:He(e.$ref)}),P.setMetaProperty("ref-origin",S.uri),P.setMetaProperty("ref-referencing-element-id",mt(Ea.identify(e))),this.allowMetaPatches&&typeof P.get("$$ref")>"u"){const V=Xn(_,A);P.set("$$ref",V)}D=P}return o.replaceWith(D,Jl),n?void 0:D}catch(g){var p,h,v;const E=Lm(g),S=new Wve(`Could not resolve reference: ${E.message}`,{baseDoc:this.reference.uri,$ref:He(e.$ref),fullPath:(p=this.basePath)!==null&&p!==void 0?p:[...Ka([...a,n,e]),"$ref"],cause:E});(h=this.options.dereference.dereferenceOpts)===null||h===void 0||(h=h.errors)===null||h===void 0||(v=h.push)===null||v===void 0||v.call(h,S);return}}async LinkElement(){}async ExampleElement(e,r,n,i,a,o){try{return await super.ExampleElement(e,r,n,i,a,o)}catch(p){var u,c,f;const h=Lm(p),v=MO(h,{baseDoc:this.reference.uri,externalValue:He(e.externalValue),fullPath:(u=this.basePath)!==null&&u!==void 0?u:[...Ka([...a,n,e]),"externalValue"]});(c=this.options.dereference.dereferenceOpts)===null||c===void 0||(c=c.errors)===null||c===void 0||(f=c.push)===null||f===void 0||f.call(c,v);return}}}const Yve=_g[Symbol.for("nodejs.util.promisify.custom")];class Xve{constructor({parameterMacro:e,modelPropertyMacro:r,mode:n,options:i,...a}){const o=[];o.push(new Ad({...a,options:i})),typeof r=="function"&&o.push(new Jve({modelPropertyMacro:r,options:i})),n!=="strict"&&o.push(new Gve({options:i})),typeof e=="function"&&o.push(new Kve({parameterMacro:e,options:i}));const u=Yve(o,{nodeTypeGetter:Aa});Object.assign(this,u)}}const Zve=xn[Symbol.for("nodejs.util.promisify.custom")];class Qve extends Vve{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:e=!1,parameterMacro:r=null,modelPropertyMacro:n=null,mode:i="non-strict",ancestors:a=[],...o}={}){super({...o}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=e,this.parameterMacro=r,this.modelPropertyMacro=n,this.mode=i,this.ancestors=[...a]}async dereference(e,r){var n;const i=_o(NN),a=(n=r.dereference.refSet)!==null&&n!==void 0?n:new Mc,o=new Mc;let u=a,c;a.has(e.uri)?c=a.find(h=>h.uri===e.uri):(c=new co({uri:e.uri,value:e.parseResult}),a.add(c)),r.dereference.immutable&&(a.refs.map(h=>new co({...h,value:mt(h.value)})).forEach(h=>o.add(h)),c=o.find(h=>h.uri===e.uri),u=o);const f=new Xve({reference:c,namespace:i,options:r,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),p=await Zve(u.rootRef.value,f,{keyMap:Za,nodeTypeGetter:Aa});return r.dereference.immutable&&o.refs.filter(h=>h.uri.startsWith("immutable://")).map(h=>new co({...h,uri:h.uri.replace(/^immutable:\/\//,"")})).forEach(h=>a.add(h)),r.dereference.refSet===null&&a.clean(),o.clean(),p}}const e0e=t=>{const e=He(t.meta.get("baseURI")),r=t.meta.get("referencingElement");return new Oe.ObjectElement({$ref:e},mt(r.meta),mt(r.attributes))},ov=async t=>{const{spec:e,timeout:r,redirects:n,requestInterceptor:i,responseInterceptor:a,pathDiscriminator:o=[],allowMetaPatches:u=!1,useCircularStructures:c=!1,skipNormalization:f=!1,parameterMacro:p=null,modelPropertyMacro:h=null,mode:v="non-strict",strategies:g}=t;try{const{cache:E}=ov,S=g.find(ue=>ue.match(e)),_=Sj(ZC())?ZC():ky,A=Lj(t),w=Xn(_,A);let C;E.has(e)?C=E.get(e):(C=ml.refract(e),C.classes.push("result"),E.set(e,C));const R=new rs([C]),O=wJ(o),N=O===""?"":`#${O}`,M=Xa(C,O),D=new co({uri:w,value:R}),q=new Mc({refs:[D]});O!==""&&(q.rootRef=void 0);const H=[new Set([M])],P=[],V=await Bfe(M,{resolve:{baseURI:`${w}${N}`,resolvers:[new Pve({timeout:r||1e4,redirects:n||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:i,responseInterceptor:a}},strategies:[new Ive]},parse:{mediaType:Dc.latest(),parsers:[new Lve({allowEmpty:!1,sourceMap:!1}),new Fve({allowEmpty:!1,sourceMap:!1}),new qve({allowEmpty:!1,sourceMap:!1}),new Bve({allowEmpty:!1,sourceMap:!1}),new Mve({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new Qve({allowMetaPatches:u,useCircularStructures:c,parameterMacro:p,modelPropertyMacro:h,mode:v,ancestors:H})],refSet:q,dereferenceOpts:{errors:P},immutable:!1,circular:c?"ignore":"replace",circularReplacer:c?vH.dereference.circularReplacer:e0e}}),U=Efe(M,V,C),se=f?U:S.normalize(U);return{spec:He(se),errors:P}}catch(E){if(E instanceof iu)return{spec:e,errors:[]};throw E}};ov.cache=new WeakMap;const KU=t=>{if(!dr(t))return t;const e=[Fye({operationIdNormalizer:(n,i,a)=>wg({operationId:n},i,a,{v2OperationIdCompatibilityMode:!1})}),Pye(),qye(),$ye(),Uye()];return js(t,e,{toolboxCreator:oG,visitorOptions:{keyMap:Za,nodeTypeGetter:Aa}})},t0e=t=>e=>{const r=ml.refract(e);r.classes.push("result");const n=t(r),i=He(n);return ov.cache.set(i,n),He(n)},r0e={name:"openapi-3-1-apidom",match(t){return Uj(t)},normalize(t){if(!ln(t)&&ts(t)&&!t.$$normalized){const e=t0e(KU)(t);return e.$$normalized=!0,e}return ln(t)?KU(t):t},async resolve(t){return ov(t)}},n0e=async t=>{const{spec:e,requestInterceptor:r,responseInterceptor:n}=t,i=Lj(t),a=mJ(t),o=e||await cJ(a,{requestInterceptor:r,responseInterceptor:n})(i),u={...t,spec:o};return t.strategies.find(f=>f.match(o)).resolve(u)},uG=t=>async e=>{const r={...t,...e};return n0e(r)},i0e=uG({strategies:[SJ,EJ,gJ]});function a0e(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"DIGIT",lower:"digit",index:4,isBkr:!1},this.rules[5]={name:"HEXDIG",lower:"hexdig",index:5,isBkr:!1},this.rules[6]={name:"pct-encoded",lower:"pct-encoded",index:6,isBkr:!1},this.rules[7]={name:"ucschar",lower:"ucschar",index:7,isBkr:!1},this.rules[8]={name:"iprivate",lower:"iprivate",index:8,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4]},this.rules[2].opcodes[2]={type:5,min:0,max:122},this.rules[2].opcodes[3]={type:6,string:[124]},this.rules[2].opcodes[4]={type:5,min:126,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:5,min:38,max:59},this.rules[3].opcodes[5]={type:6,string:[61]},this.rules[3].opcodes[6]={type:5,min:63,max:91},this.rules[3].opcodes[7]={type:6,string:[93]},this.rules[3].opcodes[8]={type:6,string:[95]},this.rules[3].opcodes[9]={type:5,min:97,max:122},this.rules[3].opcodes[10]={type:6,string:[126]},this.rules[3].opcodes[11]={type:4,index:7},this.rules[3].opcodes[12]={type:4,index:8},this.rules[3].opcodes[13]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:5,min:48,max:57},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[5].opcodes[1]={type:4,index:4},this.rules[5].opcodes[2]={type:7,string:[97]},this.rules[5].opcodes[3]={type:7,string:[98]},this.rules[5].opcodes[4]={type:7,string:[99]},this.rules[5].opcodes[5]={type:7,string:[100]},this.rules[5].opcodes[6]={type:7,string:[101]},this.rules[5].opcodes[7]={type:7,string:[102]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,3]},this.rules[6].opcodes[1]={type:7,string:[37]},this.rules[6].opcodes[2]={type:4,index:5},this.rules[6].opcodes[3]={type:4,index:5},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[7].opcodes[1]={type:5,min:160,max:55295},this.rules[7].opcodes[2]={type:5,min:63744,max:64975},this.rules[7].opcodes[3]={type:5,min:65008,max:65519},this.rules[7].opcodes[4]={type:5,min:65536,max:131069},this.rules[7].opcodes[5]={type:5,min:131072,max:196605},this.rules[7].opcodes[6]={type:5,min:196608,max:262141},this.rules[7].opcodes[7]={type:5,min:262144,max:327677},this.rules[7].opcodes[8]={type:5,min:327680,max:393213},this.rules[7].opcodes[9]={type:5,min:393216,max:458749},this.rules[7].opcodes[10]={type:5,min:458752,max:524285},this.rules[7].opcodes[11]={type:5,min:524288,max:589821},this.rules[7].opcodes[12]={type:5,min:589824,max:655357},this.rules[7].opcodes[13]={type:5,min:655360,max:720893},this.rules[7].opcodes[14]={type:5,min:720896,max:786429},this.rules[7].opcodes[15]={type:5,min:786432,max:851965},this.rules[7].opcodes[16]={type:5,min:851968,max:917501},this.rules[7].opcodes[17]={type:5,min:921600,max:983037},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:57344,max:63743},this.rules[8].opcodes[2]={type:5,min:983040,max:1048573},this.rules[8].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){let e="";return e+=`; OpenAPI Server URL templating ABNF syntax +`,e+=`server-url-template = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2 +`,e+=`server-variable = "{" server-variable-name "}" +`,e+=`server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI) +`,e+=` +`,e+=`; https://www.rfc-editor.org/rfc/rfc6570#section-2.1 +`,e+=`; https://www.rfc-editor.org/errata/eid6937 +`,e+=`literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B +`,e+=` / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate +`,e+=` / pct-encoded) +`,e+=` ; any Unicode character except: CTL, SP, +`,e+=` ; DQUOTE, "%" (aside from pct-encoded), +`,e+=' ; "<", ">", "\\", "^", "`", "{", "|", "}"\n',e+=` +`,e+=`; https://www.rfc-editor.org/rfc/rfc6570#section-1.5 +`,e+=`DIGIT = %x30-39 ; 0-9 +`,e+=`HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" ; case-insensitive +`,e+=` +`,e+=`pct-encoded = "%" HEXDIG HEXDIG +`,e+=` +`,e+=`ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF +`,e+=` / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD +`,e+=` / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD +`,e+=` / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD +`,e+=` / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD +`,e+=` / %xD0000-DFFFD / %xE1000-EFFFD +`,e+=` +`,e+=`iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD +`,e}}const s0e=(t,e,r,n,i)=>{if(t===Yt.SEM_PRE){if(Array.isArray(i)===!1)throw new Error("parser's user data must be an array");i.push(["server-url-template",na.charsToString(e,r,n)])}return Yt.SEM_OK},o0e=(t,e,r,n,i)=>{if(t===Yt.SEM_PRE){if(Array.isArray(i)===!1)throw new Error("parser's user data must be an array");i.push(["server-variable",na.charsToString(e,r,n)])}return Yt.SEM_OK},l0e=(t,e,r,n,i)=>{if(t===Yt.SEM_PRE){if(Array.isArray(i)===!1)throw new Error("parser's user data must be an array");i.push(["server-variable-name",na.charsToString(e,r,n)])}return Yt.SEM_OK},u0e=(t,e,r,n,i)=>{if(t===Yt.SEM_PRE){if(Array.isArray(i)===!1)throw new Error("parser's user data must be an array");i.push(["literals",na.charsToString(e,r,n)])}return Yt.SEM_OK},c0e=new a0e,cG=t=>{const e=new ja;return e.ast=new zj,e.ast.callbacks["server-url-template"]=s0e,e.ast.callbacks["server-variable"]=o0e,e.ast.callbacks["server-variable-name"]=l0e,e.ast.callbacks.literals=u0e,{result:e.parse(c0e,"server-url-template",t),ast:e.ast}},f0e=(t,{strict:e=!1}={})=>{try{const r=cG(t);if(!r.result.success)return!1;const n=[];r.ast.translate(n);const i=n.some(([a])=>a==="server-variable");if(!e&&!i)try{return new URL(t,"https://vladimirgorej.com"),!0}catch{return!1}return e?i:!0}catch{return!1}},d0e=t=>{try{return typeof t=="string"&&decodeURIComponent(t)!==t}catch{return!1}},p0e=t=>d0e(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),h0e=["literals","server-variable-name"],m0e=(t,e,r={})=>{const i={...{encoder:p0e},...r},a=cG(t);if(!a.result.success)return t;const o=[];return a.ast.translate(o),o.filter(([c])=>h0e.includes(c)).map(([c,f])=>c==="server-variable-name"?Object.hasOwn(e,f)?i.encoder(e[f],f):`{${f}}`:f).join("")};function fG(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path-segment",lower:"path-segment",index:1,isBkr:!1},this.rules[2]={name:"slash",lower:"slash",index:2,isBkr:!1},this.rules[3]={name:"path-literal",lower:"path-literal",index:3,isBkr:!1},this.rules[4]={name:"template-expression",lower:"template-expression",index:4,isBkr:!1},this.rules[5]={name:"template-expression-param-name",lower:"template-expression-param-name",index:5,isBkr:!1},this.rules[6]={name:"pchar",lower:"pchar",index:6,isBkr:!1},this.rules[7]={name:"unreserved",lower:"unreserved",index:7,isBkr:!1},this.rules[8]={name:"pct-encoded",lower:"pct-encoded",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ALPHA",lower:"alpha",index:10,isBkr:!1},this.rules[11]={name:"DIGIT",lower:"digit",index:11,isBkr:!1},this.rules[12]={name:"HEXDIG",lower:"hexdig",index:12,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:2},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:1},this.rules[0].opcodes[5]={type:4,index:2},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:1,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:4},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:7,string:[47]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:2,children:[1,2,3]},this.rules[4].opcodes[1]={type:7,string:[123]},this.rules[4].opcodes[2]={type:4,index:5},this.rules[4].opcodes[3]={type:7,string:[125]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:3,min:1,max:1/0},this.rules[5].opcodes[1]={type:1,children:[2,3,4]},this.rules[5].opcodes[2]={type:5,min:0,max:122},this.rules[5].opcodes[3]={type:6,string:[124]},this.rules[5].opcodes[4]={type:5,min:126,max:1114111},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[6].opcodes[4]={type:7,string:[58]},this.rules[6].opcodes[5]={type:7,string:[64]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[7].opcodes[1]={type:4,index:10},this.rules[7].opcodes[2]={type:4,index:11},this.rules[7].opcodes[3]={type:7,string:[45]},this.rules[7].opcodes[4]={type:7,string:[46]},this.rules[7].opcodes[5]={type:7,string:[95]},this.rules[7].opcodes[6]={type:7,string:[126]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:2,children:[1,2,3]},this.rules[8].opcodes[1]={type:7,string:[37]},this.rules[8].opcodes[2]={type:4,index:12},this.rules[8].opcodes[3]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2]},this.rules[10].opcodes[1]={type:5,min:65,max:90},this.rules[10].opcodes[2]={type:5,min:97,max:122},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:5,min:48,max:57},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[12].opcodes[1]={type:4,index:11},this.rules[12].opcodes[2]={type:7,string:[97]},this.rules[12].opcodes[3]={type:7,string:[98]},this.rules[12].opcodes[4]={type:7,string:[99]},this.rules[12].opcodes[5]={type:7,string:[100]},this.rules[12].opcodes[6]={type:7,string:[101]},this.rules[12].opcodes[7]={type:7,string:[102]},this.toString=function(){let e="";return e+=`; OpenAPI Path Templating ABNF syntax +`,e+=`; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 +`,e+=`path-template = slash *( path-segment slash ) [ path-segment ] +`,e+=`path-segment = 1*( path-literal / template-expression ) +`,e+=`slash = "/" +`,e+=`path-literal = 1*pchar +`,e+=`template-expression = "{" template-expression-param-name "}" +`,e+=`template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI) +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 +`,e+=`pchar = unreserved / pct-encoded / sub-delims / ":" / "@" +`,e+=`unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" +`,e+=` ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 +`,e+=`pct-encoded = "%" HEXDIG HEXDIG +`,e+=` ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1 +`,e+=`sub-delims = "!" / "$" / "&" / "'" / "(" / ")" +`,e+=` / "*" / "+" / "," / ";" / "=" +`,e+=` ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1 +`,e+=`ALPHA = %x41-5A / %x61-7A ; A-Z / a-z +`,e+=`DIGIT = %x30-39 ; 0-9 +`,e+=`HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" +`,e}}const y0e=(t,e,r,n,i)=>(t===Yt.SEM_PRE&&i.push(["slash",na.charsToString(e,r,n)]),Yt.SEM_OK),g0e=(t,e,r,n,i)=>{if(t===Yt.SEM_PRE){if(Array.isArray(i)===!1)throw new Error("parser's user data must be an array");i.push(["path-template",na.charsToString(e,r,n)])}return Yt.SEM_OK},v0e=(t,e,r,n,i)=>(t===Yt.SEM_PRE&&i.push(["path-literal",na.charsToString(e,r,n)]),Yt.SEM_OK),b0e=(t,e,r,n,i)=>(t===Yt.SEM_PRE&&i.push(["template-expression",na.charsToString(e,r,n)]),Yt.SEM_OK),E0e=(t,e,r,n,i)=>(t===Yt.SEM_PRE&&i.push(["template-expression-param-name",na.charsToString(e,r,n)]),Yt.SEM_OK),S0e=new fG,_0e=t=>{const e=new ja;return e.ast=new zj,e.ast.callbacks["path-template"]=g0e,e.ast.callbacks.slash=y0e,e.ast.callbacks["path-literal"]=v0e,e.ast.callbacks["template-expression"]=b0e,e.ast.callbacks["template-expression-param-name"]=E0e,{result:e.parse(S0e,"path-template",t),ast:e.ast}},w0e=t=>{try{return typeof t=="string"&&decodeURIComponent(t)!==t}catch{return!1}},x0e=t=>w0e(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),A0e=["slash","path-literal","template-expression-param-name"],oT=(t,e,r={})=>{const i={...{encoder:x0e},...r},a=_0e(t);if(!a.result.success)return t;const o=[];return a.ast.translate(o),o.filter(([c])=>A0e.includes(c)).map(([c,f])=>c==="template-expression-param-name"?Object.prototype.hasOwnProperty.call(e,f)?i.encoder(e[f],f):`{${f}}`:f).join("")};new fG;new ja;const O0e={body:C0e,header:R0e,query:N0e,path:j0e,formData:T0e};function C0e({req:t,value:e}){e!==void 0&&(t.body=e)}function T0e({req:t,value:e,parameter:r}){if(e===!1&&r.type==="boolean"&&(e="false"),e===0&&["number","integer"].indexOf(r.type)>-1&&(e="0"),e)t.form=t.form||{},t.form[r.name]={collectionFormat:r.collectionFormat,value:e};else if(r.allowEmptyValue&&e!==void 0){t.form=t.form||{};const n=r.name;t.form[n]=t.form[n]||{},t.form[n].allowEmptyValue=!0}}function R0e({req:t,parameter:e,value:r}){t.headers=t.headers||{},typeof r<"u"&&(t.headers[e.name]=r)}function j0e({req:t,value:e,parameter:r,baseURL:n}){if(e!==void 0){const i=t.url.replace(n,""),a=oT(i,{[r.name]:e});t.url=n+a}}function N0e({req:t,value:e,parameter:r}){if(t.query=t.query||{},e===!1&&r.type==="boolean"&&(e="false"),e===0&&["number","integer"].indexOf(r.type)>-1&&(e="0"),e)t.query[r.name]={collectionFormat:r.collectionFormat,value:e};else if(r.allowEmptyValue&&e!==void 0){const n=r.name;t.query[n]=t.query[n]||{},t.query[n].allowEmptyValue=!0}}function lv(t,e){return e.includes("application/json")?typeof t=="string"?t:(Array.isArray(t)&&(t=t.map(r=>{try{return JSON.parse(r)}catch{return r}})),JSON.stringify(t)):String(t)}function rh(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"lenient-cookie-string",lower:"lenient-cookie-string",index:0,isBkr:!1},this.rules[1]={name:"lenient-cookie-entry",lower:"lenient-cookie-entry",index:1,isBkr:!1},this.rules[2]={name:"lenient-cookie-pair",lower:"lenient-cookie-pair",index:2,isBkr:!1},this.rules[3]={name:"lenient-cookie-pair-invalid",lower:"lenient-cookie-pair-invalid",index:3,isBkr:!1},this.rules[4]={name:"lenient-cookie-name",lower:"lenient-cookie-name",index:4,isBkr:!1},this.rules[5]={name:"lenient-cookie-value",lower:"lenient-cookie-value",index:5,isBkr:!1},this.rules[6]={name:"lenient-quoted-value",lower:"lenient-quoted-value",index:6,isBkr:!1},this.rules[7]={name:"lenient-quoted-char",lower:"lenient-quoted-char",index:7,isBkr:!1},this.rules[8]={name:"lenient-cookie-octet",lower:"lenient-cookie-octet",index:8,isBkr:!1},this.rules[9]={name:"cookie-string",lower:"cookie-string",index:9,isBkr:!1},this.rules[10]={name:"cookie-pair",lower:"cookie-pair",index:10,isBkr:!1},this.rules[11]={name:"cookie-name",lower:"cookie-name",index:11,isBkr:!1},this.rules[12]={name:"cookie-value",lower:"cookie-value",index:12,isBkr:!1},this.rules[13]={name:"cookie-octet",lower:"cookie-octet",index:13,isBkr:!1},this.rules[14]={name:"OWS",lower:"ows",index:14,isBkr:!1},this.rules[15]={name:"token",lower:"token",index:15,isBkr:!1},this.rules[16]={name:"tchar",lower:"tchar",index:16,isBkr:!1},this.rules[17]={name:"CHAR",lower:"char",index:17,isBkr:!1},this.rules[18]={name:"CTL",lower:"ctl",index:18,isBkr:!1},this.rules[19]={name:"separators",lower:"separators",index:19,isBkr:!1},this.rules[20]={name:"SP",lower:"sp",index:20,isBkr:!1},this.rules[21]={name:"HT",lower:"ht",index:21,isBkr:!1},this.rules[22]={name:"ALPHA",lower:"alpha",index:22,isBkr:!1},this.rules[23]={name:"DIGIT",lower:"digit",index:23,isBkr:!1},this.rules[24]={name:"DQUOTE",lower:"dquote",index:24,isBkr:!1},this.rules[25]={name:"WSP",lower:"wsp",index:25,isBkr:!1},this.rules[26]={name:"HTAB",lower:"htab",index:26,isBkr:!1},this.rules[27]={name:"CRLF",lower:"crlf",index:27,isBkr:!1},this.rules[28]={name:"CR",lower:"cr",index:28,isBkr:!1},this.rules[29]={name:"LF",lower:"lf",index:29,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5,6]},this.rules[0].opcodes[4]={type:7,string:[59]},this.rules[0].opcodes[5]={type:4,index:14},this.rules[0].opcodes[6]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:1,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4,5,6,7]},this.rules[2].opcodes[1]={type:4,index:14},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:7,string:[61]},this.rules[2].opcodes[5]={type:4,index:14},this.rules[2].opcodes[6]={type:4,index:5},this.rules[2].opcodes[7]={type:4,index:14},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,4]},this.rules[3].opcodes[1]={type:4,index:14},this.rules[3].opcodes[2]={type:3,min:1,max:1/0},this.rules[3].opcodes[3]={type:4,index:16},this.rules[3].opcodes[4]={type:4,index:14},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4]},this.rules[4].opcodes[2]={type:5,min:33,max:58},this.rules[4].opcodes[3]={type:6,string:[60]},this.rules[4].opcodes[4]={type:5,min:62,max:126},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,6]},this.rules[5].opcodes[1]={type:2,children:[2,3]},this.rules[5].opcodes[2]={type:4,index:6},this.rules[5].opcodes[3]={type:3,min:0,max:1},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:4,index:8},this.rules[5].opcodes[6]={type:3,min:0,max:1/0},this.rules[5].opcodes[7]={type:4,index:8},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,4]},this.rules[6].opcodes[1]={type:4,index:24},this.rules[6].opcodes[2]={type:3,min:0,max:1/0},this.rules[6].opcodes[3]={type:4,index:7},this.rules[6].opcodes[4]={type:4,index:24},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:5,min:32,max:33},this.rules[7].opcodes[2]={type:5,min:35,max:126},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:33,max:43},this.rules[8].opcodes[2]={type:5,min:45,max:58},this.rules[8].opcodes[3]={type:5,min:60,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:2,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:10},this.rules[9].opcodes[2]={type:3,min:0,max:1/0},this.rules[9].opcodes[3]={type:2,children:[4,5,6]},this.rules[9].opcodes[4]={type:7,string:[59]},this.rules[9].opcodes[5]={type:4,index:20},this.rules[9].opcodes[6]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:2,children:[1,2,3]},this.rules[10].opcodes[1]={type:4,index:11},this.rules[10].opcodes[2]={type:7,string:[61]},this.rules[10].opcodes[3]={type:4,index:12},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:4,index:15},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,6]},this.rules[12].opcodes[1]={type:2,children:[2,3,5]},this.rules[12].opcodes[2]={type:4,index:24},this.rules[12].opcodes[3]={type:3,min:0,max:1/0},this.rules[12].opcodes[4]={type:4,index:13},this.rules[12].opcodes[5]={type:4,index:24},this.rules[12].opcodes[6]={type:3,min:0,max:1/0},this.rules[12].opcodes[7]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[13].opcodes[1]={type:6,string:[33]},this.rules[13].opcodes[2]={type:5,min:35,max:43},this.rules[13].opcodes[3]={type:5,min:45,max:58},this.rules[13].opcodes[4]={type:5,min:60,max:91},this.rules[13].opcodes[5]={type:5,min:93,max:126},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:3,min:0,max:1/0},this.rules[14].opcodes[1]={type:2,children:[2,4]},this.rules[14].opcodes[2]={type:3,min:0,max:1},this.rules[14].opcodes[3]={type:4,index:27},this.rules[14].opcodes[4]={type:4,index:25},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:3,min:1,max:1/0},this.rules[15].opcodes[1]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[16].opcodes[1]={type:7,string:[33]},this.rules[16].opcodes[2]={type:7,string:[35]},this.rules[16].opcodes[3]={type:7,string:[36]},this.rules[16].opcodes[4]={type:7,string:[37]},this.rules[16].opcodes[5]={type:7,string:[38]},this.rules[16].opcodes[6]={type:7,string:[39]},this.rules[16].opcodes[7]={type:7,string:[42]},this.rules[16].opcodes[8]={type:7,string:[43]},this.rules[16].opcodes[9]={type:7,string:[45]},this.rules[16].opcodes[10]={type:7,string:[46]},this.rules[16].opcodes[11]={type:7,string:[94]},this.rules[16].opcodes[12]={type:7,string:[95]},this.rules[16].opcodes[13]={type:7,string:[96]},this.rules[16].opcodes[14]={type:7,string:[124]},this.rules[16].opcodes[15]={type:7,string:[126]},this.rules[16].opcodes[16]={type:4,index:23},this.rules[16].opcodes[17]={type:4,index:22},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:1,max:127},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2]},this.rules[18].opcodes[1]={type:5,min:0,max:31},this.rules[18].opcodes[2]={type:6,string:[127]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},this.rules[19].opcodes[1]={type:7,string:[40]},this.rules[19].opcodes[2]={type:7,string:[41]},this.rules[19].opcodes[3]={type:7,string:[60]},this.rules[19].opcodes[4]={type:7,string:[62]},this.rules[19].opcodes[5]={type:7,string:[64]},this.rules[19].opcodes[6]={type:7,string:[44]},this.rules[19].opcodes[7]={type:7,string:[59]},this.rules[19].opcodes[8]={type:7,string:[58]},this.rules[19].opcodes[9]={type:7,string:[92]},this.rules[19].opcodes[10]={type:6,string:[34]},this.rules[19].opcodes[11]={type:7,string:[47]},this.rules[19].opcodes[12]={type:7,string:[91]},this.rules[19].opcodes[13]={type:7,string:[93]},this.rules[19].opcodes[14]={type:7,string:[63]},this.rules[19].opcodes[15]={type:7,string:[61]},this.rules[19].opcodes[16]={type:7,string:[123]},this.rules[19].opcodes[17]={type:7,string:[125]},this.rules[19].opcodes[18]={type:4,index:20},this.rules[19].opcodes[19]={type:4,index:21},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:6,string:[32]},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:6,string:[9]},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:1,children:[1,2]},this.rules[22].opcodes[1]={type:5,min:65,max:90},this.rules[22].opcodes[2]={type:5,min:97,max:122},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:5,min:48,max:57},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:6,string:[34]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:1,children:[1,2]},this.rules[25].opcodes[1]={type:4,index:20},this.rules[25].opcodes[2]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:6,string:[9]},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:4,index:28},this.rules[27].opcodes[2]={type:4,index:29},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:6,string:[13]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:6,string:[10]},this.toString=function(){let e="";return e+=`; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1 +`,e+=`lenient-cookie-string = lenient-cookie-entry *( ";" OWS lenient-cookie-entry ) +`,e+=`lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid +`,e+=`lenient-cookie-pair = OWS lenient-cookie-name OWS "=" OWS lenient-cookie-value OWS +`,e+=`lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like "fizz" to be ignored +`,e+=`lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except "=" +`,e+=`lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet +`,e+=`lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE +`,e+=`lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE +`,e+=`lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E +`,e+=` ; Allow all printable characters except CTLs, semicolon and SP +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1 +`,e+=`cookie-string = cookie-pair *( ";" SP cookie-pair ) +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 +`,e+=`; https://www.rfc-editor.org/errata/eid5518 +`,e+=`cookie-pair = cookie-name "=" cookie-value +`,e+=`cookie-name = token +`,e+=`cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet +`,e+=` ; https://www.rfc-editor.org/errata/eid8242 +`,e+=`cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E +`,e+=` ; US-ASCII characters excluding CTLs, +`,e+=` ; whitespace, DQUOTE, comma, semicolon, +`,e+=` ; and backslash +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2 +`,e+=`OWS = *( [ CRLF ] WSP ) ; "optional" whitespace +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2 +`,e+=`token = 1*(tchar) +`,e+=`tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" +`,e+=' / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"\n',e+=` / DIGIT / ALPHA +`,e+=` ; any VCHAR, except delimiters +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 +`,e+=`CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127) +`,e+=`CTL = %x00-1F / %x7F ; any US-ASCII control character +`,e+=`separators = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\\" / %x22 / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HT +`,e+=`SP = %x20 ; US-ASCII SP, space (32) +`,e+=`HT = %x09 ; US-ASCII HT, horizontal-tab (9) +`,e+=` +`,e+=`; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1 +`,e+=`ALPHA = %x41-5A / %x61-7A ; A-Z / a-z +`,e+=`DIGIT = %x30-39 ; 0-9 +`,e+=`DQUOTE = %x22 ; " (Double Quote) +`,e+=`WSP = SP / HTAB ; white space +`,e+=`HTAB = %x09 ; horizontal tab +`,e+=`CRLF = CR LF ; Internet standard newline +`,e+=`CR = %x0D ; carriage return +`,e+=`LF = %x0A ; linefeed +`,e}}new rh;const M0e=t=>{if(typeof t!="string"||[...t].length!==1)throw new TypeError("Input must be a single character string.");const e=t.codePointAt(0);return e<=127?`%${e.toString(16).toUpperCase().padStart(2,"0")}`:encodeURIComponent(t)},I0e=t=>t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""),uv=t=>t.length>=2&&t.startsWith('"')&&t.endsWith('"'),dG=t=>uv(t)?t.slice(1,-1):t,pG=t=>`"${t}"`,hG=t=>t,k0e=new ja,D0e=new rh,PN=(t,{strict:e=!0,quoted:r=null}={})=>{try{const n=e?"cookie-value":"lenient-cookie-value",i=k0e.parse(D0e,n,t);return typeof r=="boolean"?i.success&&r===uv(t):i.success}catch{return!1}},mG=t=>{const r=new TextEncoder().encode(t).reduce((n,i)=>n+String.fromCharCode(i),"");return btoa(r)},P0e=(t,e=mG)=>{const r=String(t);if(PN(r))return r;const n=uv(r),i=n?dG(r):r,a=e(i);return n?pG(a):a},q0e=t=>I0e(mG(t)),B0e=t=>P0e(t,q0e),L0e=new ja,F0e=new rh,yG=(t,{strict:e=!0}={})=>{try{const r=e?"cookie-name":"lenient-cookie-name";return L0e.parse(F0e,r,t).success}catch{return!1}},$0e=t=>{if(!yG(t))throw new TypeError(`Invalid cookie name: ${t}`)},gG=t=>{if(!PN(t))throw new TypeError(`Invalid cookie value: ${t}`)},WU={encoders:{name:hG,value:B0e},validators:{name:$0e,value:gG}},U0e=(t,e,r={})=>{const n={...r,encoders:{...WU.encoders,...r.encoders},validators:{...WU.validators,...r.validators}},i=n.encoders.name(t),a=n.encoders.value(e);return n.validators.name(i),n.validators.value(a),`${i}=${a}`},z0e=(t,e={})=>(Array.isArray(t)?t:typeof t=="object"&&t!==null?Object.entries(t):[]).map(([n,i])=>U0e(n,i,e)).join("; "),V0e=new ja,H0e=new rh,J0e=t=>{const e=String(t);if(PN(e))return e;const r=uv(e),n=r?dG(e):e;let i="";for(const a of n)i+=V0e.parse(H0e,"cookie-octet",a).success?a:M0e(a);return r?pG(i):i};new ja;new rh;const G0e=t=>{if(!yG(t,{strict:!1}))throw new TypeError(`Invalid cookie name: ${t}`)},K0e="%3D",W0e="%26",Y0e=t=>J0e(t).replace(/[=&]/gu,e=>e==="="?K0e:W0e),lT=(t,e={})=>z0e(t,dg({encoders:{name:hG,value:Y0e},validators:{name:G0e,value:gG}},e));function X0e({req:t,value:e,parameter:r,baseURL:n}){const{name:i,style:a,explode:o,content:u}=r;if(e===void 0)return;const c=t.url.replace(n,"");let f;if(u){const p=Object.keys(u)[0];f=oT(c,{[i]:e},{encoder:h=>dJ(lv(h,p))})}else f=oT(c,{[i]:e},{encoder:p=>qj({key:r.name,value:p,style:a||"simple",explode:o??!1,escape:"reserved"})});t.url=n+f}function Z0e({req:t,value:e,parameter:r}){if(t.query=t.query||{},e!==void 0&&r.content){const n=Object.keys(r.content)[0],i=lv(e,n);if(i)t.query[r.name]=i;else if(r.allowEmptyValue){const a=r.name;t.query[a]=t.query[a]||{},t.query[a].allowEmptyValue=!0}return}if(e===!1&&(e="false"),e===0&&(e="0"),e){const{style:n,explode:i,allowReserved:a}=r;t.query[r.name]={value:e,serializationOption:{style:n,explode:i,allowReserved:a}}}else if(r.allowEmptyValue&&e!==void 0){const n=r.name;t.query[n]=t.query[n]||{},t.query[n].allowEmptyValue=!0}}const Q0e=["accept","authorization","content-type"];function ebe({req:t,parameter:e,value:r}){if(t.headers=t.headers||{},!(Q0e.indexOf(e.name.toLowerCase())>-1)){if(r!==void 0&&e.content){const n=Object.keys(e.content)[0];t.headers[e.name]=lv(r,n);return}r!==void 0&&!(Array.isArray(r)&&r.length===0)&&(t.headers[e.name]=qj({key:e.name,value:r,style:e.style||"simple",explode:typeof e.explode>"u"?!1:e.explode,escape:!1}))}}function tbe({req:t,parameter:e,value:r}){const{name:n}=e;if(t.headers=t.headers||{},r!==void 0&&e.content){const a=Object.keys(e.content)[0],o=lv(r,a);t.headers.Cookie=lT({[n]:o});return}if(r!==void 0&&!(Array.isArray(r)&&r.length===0)){var i;const a=qj({key:e.name,value:r,escape:!1,style:e.style||"form",explode:(i=e.explode)!==null&&i!==void 0?i:!1}),o=Array.isArray(r)&&e.explode?`${n}=${a}`:a;t.headers.Cookie=lT({[n]:o})}}const rbe=Object.freeze(Object.defineProperty({__proto__:null,cookie:tbe,header:ebe,path:X0e,query:Z0e},Symbol.toStringTag,{value:"Module"})),nbe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,{btoa:vG}=nbe;function ibe(t,e){const{operation:r,requestBody:n,securities:i,spec:a,attachContentTypeForEmptyPayload:o}=t;let{requestContentType:u}=t;e=abe({request:e,securities:i,operation:r,spec:a});const c=r.requestBody||{},f=Object.keys(c.content||{}),p=u&&f.indexOf(u)>-1;if(n||o){if(u&&p)e.headers["Content-Type"]=u;else if(!u){const S=f[0];S&&(e.headers["Content-Type"]=S,u=S)}}else u&&p&&(e.headers["Content-Type"]=u);if(!t.responseContentType&&r.responses){const S=Object.entries(r.responses).filter(([_,A])=>{const w=parseInt(_,10);return w>=200&&w<300&&ts(A.content)}).reduce((_,[,A])=>_.concat(Object.keys(A.content)),[]);S.length>0&&(e.headers.accept=S.join(", "))}if(n)if(u){if(f.indexOf(u)>-1)if(u==="application/x-www-form-urlencoded"||u==="multipart/form-data")if(typeof n=="object"){var h,v;const S=(h=(v=c.content[u])===null||v===void 0?void 0:v.encoding)!==null&&h!==void 0?h:{};e.form={},Object.keys(n).forEach(_=>{let A;try{A=JSON.parse(n[_])}catch{A=n[_]}e.form[_]={value:A,encoding:S[_]||{}}})}else if(typeof n=="string"){var g,E;const S=(g=(E=c.content[u])===null||E===void 0?void 0:E.encoding)!==null&&g!==void 0?g:{};try{e.form={};const _=JSON.parse(n);Object.entries(_).forEach(([A,w])=>{e.form[A]={value:w,encoding:S[A]||{}}})}catch{e.form=n}}else e.form=n;else e.body=n}else e.body=n;return e}function abe({request:t,securities:e={},operation:r={},spec:n}){var i;const a={...t},{authorized:o={}}=e,u=r.security||n.security||[],c=o&&!!Object.keys(o).length,f=(n==null||(i=n.components)===null||i===void 0?void 0:i.securitySchemes)||{};return a.headers=a.headers||{},a.query=a.query||{},!Object.keys(e).length||!c||!u||Array.isArray(r.security)&&!r.security.length?t:(u.forEach(p=>{Object.keys(p).forEach(h=>{const v=o[h],g=f[h];if(!v)return;const E=v.value||v,{type:S}=g;if(v){if(S==="apiKey")g.in==="query"&&(a.query[g.name]=E),g.in==="header"&&(a.headers[g.name]=E),g.in==="cookie"&&(a.cookies[g.name]=E);else if(S==="http"){if(/^basic$/i.test(g.scheme)){const _=E.username||"",A=E.password||"",w=vG(`${_}:${A}`);a.headers.Authorization=`Basic ${w}`}/^bearer$/i.test(g.scheme)&&(a.headers.Authorization=`Bearer ${E}`)}else if(S==="oauth2"||S==="openIdConnect"){const _=v.token||{},A=g["x-tokenName"]||"access_token",w=_[A];let C=_.token_type;(!C||C.toLowerCase()==="bearer")&&(C="Bearer"),a.headers.Authorization=`${C} ${w}`}}})}),a)}function sbe(t,e){const{spec:r,operation:n,securities:i,requestContentType:a,responseContentType:o,attachContentTypeForEmptyPayload:u}=t;if(e=obe({request:e,securities:i,operation:n,spec:r}),e.body||e.form||u)a?e.headers["Content-Type"]=a:Array.isArray(n.consumes)?[e.headers["Content-Type"]]=n.consumes:Array.isArray(r.consumes)?[e.headers["Content-Type"]]=r.consumes:n.parameters&&n.parameters.filter(c=>c.type==="file").length?e.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(c=>c.in==="formData").length&&(e.headers["Content-Type"]="application/x-www-form-urlencoded");else if(a){const c=n.parameters&&n.parameters.filter(p=>p.in==="body").length>0,f=n.parameters&&n.parameters.filter(p=>p.in==="formData").length>0;(c||f)&&(e.headers["Content-Type"]=a)}return!o&&Array.isArray(n.produces)&&n.produces.length>0&&(e.headers.accept=n.produces.join(", ")),e}function obe({request:t,securities:e={},operation:r={},spec:n}){const i={...t},{authorized:a={},specSecurity:o=[]}=e,u=r.security||o,c=a&&!!Object.keys(a).length,f=n.securityDefinitions;return i.headers=i.headers||{},i.query=i.query||{},!Object.keys(e).length||!c||!u||Array.isArray(r.security)&&!r.security.length?t:(u.forEach(p=>{Object.keys(p).forEach(h=>{const v=a[h];if(!v)return;const{token:g}=v,E=v.value||v,S=f[h],{type:_}=S,A=S["x-tokenName"]||"access_token",w=g&&g[A];let C=g&&g.token_type;if(v)if(_==="apiKey"){const R=S.in==="query"?"query":"headers";i[R]=i[R]||{},i[R][S.name]=E}else if(_==="basic")if(E.header)i.headers.authorization=E.header;else{const R=E.username||"",O=E.password||"";E.base64=vG(`${R}:${O}`),i.headers.authorization=`Basic ${E.base64}`}else _==="oauth2"&&w&&(C=!C||C.toLowerCase()==="bearer"?"Bearer":C,i.headers.authorization=`${C} ${w}`)})}),i)}function lbe(t,e,r){if(!t||typeof t!="object"||!t.paths||typeof t.paths!="object")return null;const{paths:n}=t;for(const i in n)for(const a in n[i]){if(a.toUpperCase()==="PARAMETERS")continue;const o=n[i][a];if(!o||typeof o!="object")continue;const u={spec:t,pathName:i,method:a.toUpperCase(),operation:o};if(e(u))return u}}function ube(t,e){return lbe(t,e)||null}function bG(t,e){return`${e.toLowerCase()}-${t}`}function cbe(t,e){return!t||!t.paths?null:ube(t,({pathName:r,method:n,operation:i})=>{if(!i||typeof i!="object")return!1;const a=i.operationId,o=wg(i,r,n),u=bG(r,n);return[o,u,a].some(c=>c&&c===e)})}const YU=t=>Array.isArray(t)?t:[],Od=(t,{recurse:e=!0,depth:r=1}={})=>{if(ts(t)){if(t.type==="object"||t.type==="array"||Array.isArray(t.type)&&(t.type.includes("object")||t.type.includes("array")))return t;if(!(r>rJ)&&e){const n=Array.isArray(t.oneOf)?t.oneOf.find(a=>Od(a,{recurse:e,depth:r+1})):void 0;if(n)return n;const i=Array.isArray(t.anyOf)?t.anyOf.find(a=>Od(a,{recurse:e,depth:r+1})):void 0;if(i)return i}}},kO=({value:t,silentFail:e=!1})=>{try{const r=JSON.parse(t);if(ts(r)||Array.isArray(r))return r;if(!e)throw new Error("Expected JSON serialized object or array")}catch{if(!e)throw new Error("Could not parse parameter value string as JSON Object or JSON Array")}return t},oy=t=>{try{return new URL(t)}catch{const e=new URL(t,ky),r=String(t).startsWith("/")?e.pathname:e.pathname.substring(1);return{hash:e.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:r,port:"",protocol:"",search:e.search,searchParams:e.searchParams}}};class fbe extends xs{}const dbe=(t,e)=>e.filter(r=>r.name===t),pbe=t=>{const e={};t.forEach(n=>{e[n.in]||(e[n.in]={}),e[n.in][n.name]=n});const r=[];return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{r.push(e[n][i])})}),r},hbe={buildRequest:EG};function mbe({http:t,fetch:e,spec:r,operationId:n,pathName:i,method:a,parameters:o,securities:u,...c}){const f=t||e||Dd;i&&a&&!n&&(n=bG(i,a));const p=hbe.buildRequest({spec:r,operationId:n,parameters:o,securities:u,http:f,...c});return p.body&&(ts(p.body)||Array.isArray(p.body))&&(p.body=JSON.stringify(p.body)),f(p)}function EG(t){const{spec:e,operationId:r,responseContentType:n,scheme:i,requestInterceptor:a,responseInterceptor:o,contextUrl:u,userFetch:c,server:f,serverVariables:p,http:h,signal:v,serverVariableEncoder:g}=t;let{parameters:E,parameterBuilders:S,baseURL:_}=t;const A=bJ(e);S||(A?S=rbe:S=O0e);let C={url:"",credentials:h&&h.withCredentials?"include":"same-origin",headers:{},cookies:{}};v&&(C.signal=v),a&&(C.requestInterceptor=a),o&&(C.responseInterceptor=o),c&&(C.userFetch=c);const R=cbe(e,r);if(!R)throw new fbe(`Operation ${r} not found`);const{operation:O={},method:N,pathName:M}=R;if(_=_??ybe({spec:e,scheme:i,contextUrl:u,server:f,serverVariables:p,pathName:M,method:N,serverVariableEncoder:g}),C.url+=_,!r)return delete C.cookies,C;C.url+=M,C.method=`${N}`.toUpperCase(),E=E||{};const D=e.paths[M]||{};n&&(C.headers.accept=n);const q=pbe([].concat(YU(O.parameters)).concat(YU(D.parameters)));q.forEach(P=>{const V=S[P.in];let U;if(P.in==="body"&&P.schema&&P.schema.properties&&(U=E),U=P&&P.name&&E[P.name],typeof U>"u"?U=P&&P.name&&E[`${P.in}.${P.name}`]:dbe(P.name,q).length>1&&console.warn(`Parameter '${P.name}' is ambiguous because the defined spec has more than one parameter with the name: '${P.name}' and the passed-in parameter values did not define an 'in' value.`),U!==null){if(typeof P.default<"u"&&typeof U>"u"&&(U=P.default),typeof U>"u"&&P.required&&!P.allowEmptyValue)throw new Error(`Required parameter ${P.name} is not provided`);A&&typeof U=="string"&&(wd("type",P.schema)&&typeof P.schema.type=="string"&&Od(P.schema,{recurse:!1})?U=kO({value:U,silentFail:!1}):wd("type",P.schema)&&Array.isArray(P.schema.type)&&Od(P.schema,{recurse:!1})?U=kO({value:U,silentFail:!0}):!wd("type",P.schema)&&Od(P.schema,{recurse:!0})&&(U=kO({value:U,silentFail:!0}))),V&&V({req:C,parameter:P,value:U,operation:O,spec:e,baseURL:_})}});const H={...t,operation:O};if(A?C=ibe(H,C):C=sbe(H,C),C.cookies&&Object.keys(C.cookies).length>0){const P=lT(C.cookies);mg(C.headers.Cookie)?C.headers.Cookie+=`; ${P}`:C.headers.Cookie=P}return C.cookies&&delete C.cookies,Bj(C)}const uT=t=>t?t.replace(/\W/g,""):null;function ybe(t){return bJ(t.spec)?gbe(t):bbe(t)}const DO=t=>Array.isArray(t)&&t.length>0;function gbe({spec:t,pathName:e,method:r,server:n,contextUrl:i,serverVariables:a={},serverVariableEncoder:o}){var u,c;let f=[],p="",h;const v=t==null||(u=t.paths)===null||u===void 0||(u=u[e])===null||u===void 0||(u=u[(r||"").toLowerCase()])===null||u===void 0?void 0:u.servers,g=t==null||(c=t.paths)===null||c===void 0||(c=c[e])===null||c===void 0?void 0:c.servers,E=t?.servers;if(f=DO(v)?v:DO(g)?g:DO(E)?E:[fde],n&&(h=f.find(S=>S.url===n),h&&(p=n)),p||([h]=f,p=h.url),f0e(p,{strict:!0})){const S=Object.entries({...h.variables}).reduce((_,[A,w])=>(_[A]=w.default,_),{});p=m0e(p,{...S,...a},{encoder:typeof o=="function"?o:ZV})}return vbe(p,i)}function vbe(t="",e=""){const r=oy(t&&e?Xn(e,t):t),n=oy(e),i=uT(r.protocol)||uT(n.protocol),a=r.host||n.host,o=r.pathname;let u;return i&&a?u=`${i}://${a+o}`:u=o,u[u.length-1]==="/"?u.slice(0,-1):u}function bbe({spec:t,scheme:e,contextUrl:r=""}){const n=oy(r),i=Array.isArray(t.schemes)?t.schemes[0]:null,a=e||i||uT(n.protocol)||"http",o=t.host||n.host||"",u=t.basePath||"";let c;return o?c=`${a}://${o+u}`:c=u,c[c.length-1]==="/"?c.slice(0,-1):c}const Ebe=async(t,e,r={})=>{const{returnEntireTree:n,baseDoc:i,requestInterceptor:a,responseInterceptor:o,parameterMacro:u,modelPropertyMacro:c,useCircularStructures:f,strategies:p}=r,h={spec:t,pathDiscriminator:e,baseDoc:i,requestInterceptor:a,responseInterceptor:o,parameterMacro:u,modelPropertyMacro:c,useCircularStructures:f,strategies:p},g=p.find(S=>S.match(t)).normalize(t),E=await i0e({spec:g,...h,allowMetaPatches:!0,skipNormalization:!Uj(t)});return!n&&Array.isArray(e)&&e.length&&(E.spec=e.reduce((S,_)=>S?.[_],E.spec)||null),E},Sbe=t=>async(e,r,n={})=>{const i={...t,...n};return Ebe(e,r,i)};var _be=H9();const wbe=Ct(_be);var PO={exports:{}},qO={};var XU;function xbe(){if(XU)return qO;XU=1;var t=Lc();function e(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,u=t.useDebugValue;return qO.useSyncExternalStoreWithSelector=function(c,f,p,h,v){var g=i(null);if(g.current===null){var E={hasValue:!1,value:null};g.current=E}else E=g.current;g=o(function(){function _(O){if(!A){if(A=!0,w=O,O=h(O),v!==void 0&&E.hasValue){var N=E.value;if(v(N,O))return C=N}return C=O}if(N=C,r(w,O))return N;var M=h(O);return v!==void 0&&v(N,M)?(w=O,N):(w=O,C=M)}var A=!1,w,C,R=p===void 0?null:p;return[function(){return _(f())},R===null?void 0:function(){return _(R())}]},[f,p,h,v]);var S=n(c,g[0],g[1]);return a(function(){E.hasValue=!0,E.value=S},[S]),u(S),S},qO}var ZU;function Abe(){return ZU||(ZU=1,PO.exports=xbe()),PO.exports}Abe();var Obe=jt.version.startsWith("19"),Cbe=Symbol.for(Obe?"react.transitional.element":"react.element"),Tbe=Symbol.for("react.portal"),Rbe=Symbol.for("react.fragment"),jbe=Symbol.for("react.strict_mode"),Nbe=Symbol.for("react.profiler"),Mbe=Symbol.for("react.consumer"),Ibe=Symbol.for("react.context"),SG=Symbol.for("react.forward_ref"),kbe=Symbol.for("react.suspense"),Dbe=Symbol.for("react.suspense_list"),qN=Symbol.for("react.memo"),Pbe=Symbol.for("react.lazy"),qbe=SG,Bbe=qN;function Lbe(t){if(typeof t=="object"&&t!==null){const{$$typeof:e}=t;switch(e){case Cbe:switch(t=t.type,t){case Rbe:case Nbe:case jbe:case kbe:case Dbe:return t;default:switch(t=t&&t.$$typeof,t){case Ibe:case SG:case Pbe:case qN:return t;case Mbe:return t;default:return e}}case Tbe:return e}}}function Fbe(t){return Lbe(t)===qN}function $be(t,e,r,n,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:o}){let u=!1,c,f,p,h,v;function g(w,C){return c=w,f=C,p=t(c,f),h=e(n,f),v=r(p,h,f),u=!0,v}function E(){return p=t(c,f),e.dependsOnOwnProps&&(h=e(n,f)),v=r(p,h,f),v}function S(){return t.dependsOnOwnProps&&(p=t(c,f)),e.dependsOnOwnProps&&(h=e(n,f)),v=r(p,h,f),v}function _(){const w=t(c,f),C=!o(w,p);return p=w,C&&(v=r(p,h,f)),v}function A(w,C){const R=!a(C,f),O=!i(w,c,C,f);return c=w,f=C,R&&O?E():R?S():O?_():v}return function(C,R){return u?A(C,R):g(C,R)}}function Ube(t,{initMapStateToProps:e,initMapDispatchToProps:r,initMergeProps:n,...i}){const a=e(t,i),o=r(t,i),u=n(t,i);return $be(a,o,u,t,i)}function zbe(t,e){const r={};for(const n in t){const i=t[n];typeof i=="function"&&(r[n]=(...a)=>e(i(...a)))}return r}function cT(t){return function(r){const n=t(r);function i(){return n}return i.dependsOnOwnProps=!1,i}}function QU(t){return t.dependsOnOwnProps?!!t.dependsOnOwnProps:t.length!==1}function _G(t,e){return function(n,{displayName:i}){const a=function(u,c){return a.dependsOnOwnProps?a.mapToProps(u,c):a.mapToProps(u,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(u,c){a.mapToProps=t,a.dependsOnOwnProps=QU(t);let f=a(u,c);return typeof f=="function"&&(a.mapToProps=f,a.dependsOnOwnProps=QU(f),f=a(u,c)),f},a}}function BN(t,e){return(r,n)=>{throw new Error(`Invalid value of type ${typeof t} for ${e} argument when connecting component ${n.wrappedComponentName}.`)}}function Vbe(t){return t&&typeof t=="object"?cT(e=>zbe(t,e)):t?typeof t=="function"?_G(t):BN(t,"mapDispatchToProps"):cT(e=>({dispatch:e}))}function Hbe(t){return t?typeof t=="function"?_G(t):BN(t,"mapStateToProps"):cT(()=>({}))}function Jbe(t,e,r){return{...r,...t,...e}}function Gbe(t){return function(r,{displayName:n,areMergedPropsEqual:i}){let a=!1,o;return function(c,f,p){const h=t(c,f,p);return a?i(h,o)||(o=h):(a=!0,o=h),o}}}function Kbe(t){return t?typeof t=="function"?Gbe(t):BN(t,"mergeProps"):()=>Jbe}function Wbe(t){t()}function Ybe(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Wbe(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=t;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=e={callback:r,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!n||t===null||(n=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var e5={notify(){},get:()=>[]};function wG(t,e){let r,n=e5,i=0,a=!1;function o(S){p();const _=n.subscribe(S);let A=!1;return()=>{A||(A=!0,_(),h())}}function u(){n.notify()}function c(){E.onStateChange&&E.onStateChange()}function f(){return a}function p(){i++,r||(r=e?e.addNestedSub(c):t.subscribe(c),n=Ybe())}function h(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=e5)}function v(){a||(a=!0,p())}function g(){a&&(a=!1,h())}const E={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:f,trySubscribe:v,tryUnsubscribe:g,getListeners:()=>n};return E}var Xbe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zbe=Xbe(),Qbe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",eEe=Qbe(),tEe=()=>Zbe||eEe?jt.useLayoutEffect:jt.useEffect,Py=tEe();function t5(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function BO(t,e){if(t5(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let i=0;i t(...e),r)}function mEe(t,e,r,n,i,a){t.current=n,r.current=!1,i.current&&(i.current=null,a())}function yEe(t,e,r,n,i,a,o,u,c,f,p){if(!t)return()=>{};let h=!1,v=null;const g=()=>{if(h||!u.current)return;const S=e.getState();let _,A;try{_=n(S,i.current)}catch(w){A=w,v=w}A||(v=null),_===a.current?o.current||f():(a.current=_,c.current=_,o.current=!0,p())};return r.onStateChange=g,r.trySubscribe(),g(),()=>{if(h=!0,r.tryUnsubscribe(),r.onStateChange=null,v)throw v}}function gEe(t,e){return t===e}function vEe(t,e,r,{pure:n,areStatesEqual:i=gEe,areOwnPropsEqual:a=BO,areStatePropsEqual:o=BO,areMergedPropsEqual:u=BO,forwardRef:c=!1,context:f=AG}={}){const p=f,h=Hbe(t),v=Vbe(e),g=Kbe(r),E=!!t;return _=>{const A=_.displayName||_.name||"Component",w=`Connect(${A})`,C={shouldHandleStateChanges:E,displayName:w,wrappedComponentName:A,WrappedComponent:_,initMapStateToProps:h,initMapDispatchToProps:v,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:o,areOwnPropsEqual:a,areMergedPropsEqual:u};function R(M){const[D,q,H]=jt.useMemo(()=>{const{reactReduxForwardedRef:ze,...Ke}=M;return[M.context,ze,Ke]},[M]),P=jt.useMemo(()=>{let ze=p;return D?.Consumer,ze},[D,p]),V=jt.useContext(P),U=!!M.store&&!!M.store.getState&&!!M.store.dispatch,se=!!V&&!!V.store,ue=U?M.store:V.store,W=se?V.getServerState:ue.getState,te=jt.useMemo(()=>Ube(ue.dispatch,C),[ue]),[ne,ce]=jt.useMemo(()=>{if(!E)return pEe;const ze=wG(ue,U?void 0:V.subscription),Ke=ze.notifyNestedSubs.bind(ze);return[ze,Ke]},[ue,U,V]),ge=jt.useMemo(()=>U?V:{...V,subscription:ne},[U,V,ne]),G=jt.useRef(void 0),re=jt.useRef(H),he=jt.useRef(void 0),pe=jt.useRef(!1),le=jt.useRef(!1),Q=jt.useRef(void 0);Py(()=>(le.current=!0,()=>{le.current=!1}),[]);const X=jt.useMemo(()=>()=>he.current&&H===re.current?he.current:te(ue.getState(),H),[ue,H]),Ae=jt.useMemo(()=>Ke=>ne?yEe(E,ue,ne,te,re,G,pe,le,he,ce,Ke):()=>{},[ne]);hEe(mEe,[re,G,pe,H,he,ce]);let Te;try{Te=jt.useSyncExternalStore(Ae,X,W?()=>te(W(),H):X)}catch(ze){throw Q.current&&(ze.message+=` +The error may be correlated with this previous error: +${Q.current.stack} + +`),ze}Py(()=>{Q.current=void 0,he.current=void 0,G.current=Te});const tt=jt.useMemo(()=>jt.createElement(_,{...Te,ref:q}),[q,_,Te]);return jt.useMemo(()=>E?jt.createElement(P.Provider,{value:ge},tt):tt,[P,tt,ge])}const N=jt.memo(R);if(N.WrappedComponent=_,N.displayName=R.displayName=w,c){const D=jt.forwardRef(function(H,P){return jt.createElement(N,{...H,reactReduxForwardedRef:P})});return D.displayName=w,D.WrappedComponent=_,fT(D,_)}return fT(N,_)}}var bEe=vEe;function EEe(t){const{children:e,context:r,serverState:n,store:i}=t,a=jt.useMemo(()=>{const c=wG(i);return{store:i,subscription:c,getServerState:n?()=>n:void 0}},[i,n]),o=jt.useMemo(()=>i.getState(),[i]);Py(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const u=r||AG;return jt.createElement(u.Provider,{value:a},e)}var SEe=EEe,_Ee=Qd();const wEe=Ct(_Ee);function xEe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function AEe(t,e){if(t==null)return{};var r,n,i=xEe(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n t.length)&&(e=t.length);for(var r=0,n=Array(e);r =4)return[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]}var LO={};function IEe(t){if(t.length===0||t.length===1)return t;var e=t.join(".");return LO[e]||(LO[e]=MEe(t)),LO[e]}function kEe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.filter(function(a){return a!=="token"}),i=IEe(n);return i.reduce(function(a,o){return _c(_c({},a),r[o])},e)}function s5(t){return t.join(" ")}function DEe(t,e){var r=0;return function(n){return r+=1,n.map(function(i,a){return CG({node:i,stylesheet:t,useInlineStyles:e,key:"code-segment-".concat(r,"-").concat(a)})})}}function CG(t){var e=t.node,r=t.stylesheet,n=t.style,i=n===void 0?{}:n,a=t.useInlineStyles,o=t.key,u=e.properties,c=e.type,f=e.tagName,p=e.value;if(c==="text")return p;if(f){var h=DEe(r,a),v;if(!a)v=_c(_c({},u),{},{className:s5(u.className)});else{var g=Object.keys(r).reduce(function(A,w){return w.split(".").forEach(function(C){A.includes(C)||A.push(C)}),A},[]),E=u.className&&u.className.includes("token")?["token"]:[],S=u.className&&E.concat(u.className.filter(function(A){return!g.includes(A)}));v=_c(_c({},u),{},{className:s5(S)||void 0,style:kEe(u.className,Object.assign({},u.style,i),r)})}var _=h(e.children);return Ya.createElement(f,hT({key:o},v),_)}}const PEe=(function(t,e){var r=t.listLanguages();return r.indexOf(e)!==-1});var qEe=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function o5(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tl(t){for(var e=1;e 1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];t.length===void 0&&(t=[t]);for(var n=0;n 2&&arguments[2]!==void 0?arguments[2]:[];return ly({children:O,lineNumber:N,lineNumberStyle:u,largestLineNumber:o,showInlineLineNumbers:i,lineProps:r,className:M,showLineNumbers:n,wrapLongLines:c,wrapLines:e})}function S(O,N){if(n&&N&&i){var M=RG(u,N,o);O.unshift(TG(N,M))}return O}function _(O,N){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return e||M.length>0?E(O,N,M):S(O,N)}for(var A=function(){var N=p[g],M=N.children[0].value,D=LEe(M);if(D){var q=M.split(` +`);q.forEach(function(H,P){var V=n&&h.length+a,U={type:"text",value:"".concat(H,` +`)};if(P===0){var se=p.slice(v+1,g).concat(ly({children:[U],className:N.properties.className})),ue=_(se,V);h.push(ue)}else if(P===q.length-1){var W=p[g+1]&&p[g+1].children&&p[g+1].children[0],te={type:"text",value:"".concat(H)};if(W){var ne=ly({children:[te],className:N.properties.className});p.splice(g+1,0,ne)}else{var ce=[te],ge=_(ce,V,N.properties.className);h.push(ge)}}else{var G=[U],re=_(G,V,N.properties.className);h.push(re)}}),v=g}g++};g /g,">").replace(/"/g,""").replace(/'/g,"'")}function a(Se,...Ve){const Xe=Object.create(null);for(const Et in Se)Xe[Et]=Se[Et];return Ve.forEach(function(Et){for(const Mt in Et)Xe[Mt]=Et[Mt]}),Xe}const o="",u=Se=>!!Se.kind;class c{constructor(Ve,Xe){this.buffer="",this.classPrefix=Xe.classPrefix,Ve.walk(this)}addText(Ve){this.buffer+=i(Ve)}openNode(Ve){if(!u(Ve))return;let Xe=Ve.kind;Ve.sublanguage||(Xe=`${this.classPrefix}${Xe}`),this.span(Xe)}closeNode(Ve){u(Ve)&&(this.buffer+=o)}value(){return this.buffer}span(Ve){this.buffer+=``}}class f{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Ve){this.top.children.push(Ve)}openNode(Ve){const Xe={kind:Ve,children:[]};this.add(Xe),this.stack.push(Xe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Ve){return this.constructor._walk(Ve,this.rootNode)}static _walk(Ve,Xe){return typeof Xe=="string"?Ve.addText(Xe):Xe.children&&(Ve.openNode(Xe),Xe.children.forEach(Et=>this._walk(Ve,Et)),Ve.closeNode(Xe)),Ve}static _collapse(Ve){typeof Ve!="string"&&Ve.children&&(Ve.children.every(Xe=>typeof Xe=="string")?Ve.children=[Ve.children.join("")]:Ve.children.forEach(Xe=>{f._collapse(Xe)}))}}class p extends f{constructor(Ve){super(),this.options=Ve}addKeyword(Ve,Xe){Ve!==""&&(this.openNode(Xe),this.addText(Ve),this.closeNode())}addText(Ve){Ve!==""&&this.add(Ve)}addSublanguage(Ve,Xe){const Et=Ve.root;Et.kind=Xe,Et.sublanguage=!0,this.add(Et)}toHTML(){return new c(this,this.options).value()}finalize(){return!0}}function h(Se){return new RegExp(Se.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function v(Se){return Se?typeof Se=="string"?Se:Se.source:null}function g(...Se){return Se.map(Xe=>v(Xe)).join("")}function E(...Se){return"("+Se.map(Xe=>v(Xe)).join("|")+")"}function S(Se){return new RegExp(Se.toString()+"|").exec("").length-1}function _(Se,Ve){const Xe=Se&&Se.exec(Ve);return Xe&&Xe.index===0}const A=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(Se,Ve="|"){let Xe=0;return Se.map(Et=>{Xe+=1;const Mt=Xe;let $t=v(Et),hr="";for(;$t.length>0;){const Qe=A.exec($t);if(!Qe){hr+=$t;break}hr+=$t.substring(0,Qe.index),$t=$t.substring(Qe.index+Qe[0].length),Qe[0][0]==="\\"&&Qe[1]?hr+="\\"+String(Number(Qe[1])+Mt):(hr+=Qe[0],Qe[0]==="("&&Xe++)}return hr}).map(Et=>`(${Et})`).join(Ve)}const C=/\b\B/,R="[a-zA-Z]\\w*",O="[a-zA-Z_]\\w*",N="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",D="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",H=(Se={})=>{const Ve=/^#![ ]*\//;return Se.binary&&(Se.begin=g(Ve,/.*\b/,Se.binary,/\b.*/)),a({className:"meta",begin:Ve,end:/$/,relevance:0,"on:begin":(Xe,Et)=>{Xe.index!==0&&Et.ignoreMatch()}},Se)},P={begin:"\\\\[\\s\\S]",relevance:0},V={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[P]},U={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[P]},se={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ue=function(Se,Ve,Xe={}){const Et=a({className:"comment",begin:Se,end:Ve,contains:[]},Xe);return Et.contains.push(se),Et.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),Et},W=ue("//","$"),te=ue("/\\*","\\*/"),ne=ue("#","$"),ce={className:"number",begin:N,relevance:0},ge={className:"number",begin:M,relevance:0},G={className:"number",begin:D,relevance:0},re={className:"number",begin:N+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},he={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[P,{begin:/\[/,end:/\]/,relevance:0,contains:[P]}]}]},pe={className:"title",begin:R,relevance:0},le={className:"title",begin:O,relevance:0},Q={begin:"\\.\\s*"+O,relevance:0};var Ae=Object.freeze({__proto__:null,MATCH_NOTHING_RE:C,IDENT_RE:R,UNDERSCORE_IDENT_RE:O,NUMBER_RE:N,C_NUMBER_RE:M,BINARY_NUMBER_RE:D,RE_STARTERS_RE:q,SHEBANG:H,BACKSLASH_ESCAPE:P,APOS_STRING_MODE:V,QUOTE_STRING_MODE:U,PHRASAL_WORDS_MODE:se,COMMENT:ue,C_LINE_COMMENT_MODE:W,C_BLOCK_COMMENT_MODE:te,HASH_COMMENT_MODE:ne,NUMBER_MODE:ce,C_NUMBER_MODE:ge,BINARY_NUMBER_MODE:G,CSS_NUMBER_MODE:re,REGEXP_MODE:he,TITLE_MODE:pe,UNDERSCORE_TITLE_MODE:le,METHOD_GUARD:Q,END_SAME_AS_BEGIN:function(Se){return Object.assign(Se,{"on:begin":(Ve,Xe)=>{Xe.data._beginMatch=Ve[1]},"on:end":(Ve,Xe)=>{Xe.data._beginMatch!==Ve[1]&&Xe.ignoreMatch()}})}});function Te(Se,Ve){Se.input[Se.index-1]==="."&&Ve.ignoreMatch()}function tt(Se,Ve){Ve&&Se.beginKeywords&&(Se.begin="\\b("+Se.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Se.__beforeBegin=Te,Se.keywords=Se.keywords||Se.beginKeywords,delete Se.beginKeywords,Se.relevance===void 0&&(Se.relevance=0))}function et(Se,Ve){Array.isArray(Se.illegal)&&(Se.illegal=E(...Se.illegal))}function ze(Se,Ve){if(Se.match){if(Se.begin||Se.end)throw new Error("begin & end are not supported with match");Se.begin=Se.match,delete Se.match}}function Ke(Se,Ve){Se.relevance===void 0&&(Se.relevance=1)}const rt=["of","and","for","in","not","or","if","then","parent","list","value"],Re="keyword";function Le(Se,Ve,Xe=Re){const Et={};return typeof Se=="string"?Mt(Xe,Se.split(" ")):Array.isArray(Se)?Mt(Xe,Se):Object.keys(Se).forEach(function($t){Object.assign(Et,Le(Se[$t],Ve,$t))}),Et;function Mt($t,hr){Ve&&(hr=hr.map(Qe=>Qe.toLowerCase())),hr.forEach(function(Qe){const dt=Qe.split("|");Et[dt[0]]=[$t,Ie(dt[0],dt[1])]})}}function Ie(Se,Ve){return Ve?Number(Ve):Y(Se)?0:1}function Y(Se){return rt.includes(Se.toLowerCase())}function k(Se,{plugins:Ve}){function Xe(Qe,dt){return new RegExp(v(Qe),"m"+(Se.case_insensitive?"i":"")+(dt?"g":""))}class Et{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(dt,Tt){Tt.position=this.position++,this.matchIndexes[this.matchAt]=Tt,this.regexes.push([Tt,dt]),this.matchAt+=S(dt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const dt=this.regexes.map(Tt=>Tt[1]);this.matcherRe=Xe(w(dt),!0),this.lastIndex=0}exec(dt){this.matcherRe.lastIndex=this.lastIndex;const Tt=this.matcherRe.exec(dt);if(!Tt)return null;const xt=Tt.findIndex((Fn,Ia)=>Ia>0&&Fn!==void 0),cr=this.matchIndexes[xt];return Tt.splice(0,xt),Object.assign(Tt,cr)}}class Mt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(dt){if(this.multiRegexes[dt])return this.multiRegexes[dt];const Tt=new Et;return this.rules.slice(dt).forEach(([xt,cr])=>Tt.addRule(xt,cr)),Tt.compile(),this.multiRegexes[dt]=Tt,Tt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(dt,Tt){this.rules.push([dt,Tt]),Tt.type==="begin"&&this.count++}exec(dt){const Tt=this.getMatcher(this.regexIndex);Tt.lastIndex=this.lastIndex;let xt=Tt.exec(dt);if(this.resumingScanAtSamePosition()&&!(xt&&xt.index===this.lastIndex)){const cr=this.getMatcher(0);cr.lastIndex=this.lastIndex+1,xt=cr.exec(dt)}return xt&&(this.regexIndex+=xt.position+1,this.regexIndex===this.count&&this.considerAll()),xt}}function $t(Qe){const dt=new Mt;return Qe.contains.forEach(Tt=>dt.addRule(Tt.begin,{rule:Tt,type:"begin"})),Qe.terminatorEnd&&dt.addRule(Qe.terminatorEnd,{type:"end"}),Qe.illegal&&dt.addRule(Qe.illegal,{type:"illegal"}),dt}function hr(Qe,dt){const Tt=Qe;if(Qe.isCompiled)return Tt;[ze].forEach(cr=>cr(Qe,dt)),Se.compilerExtensions.forEach(cr=>cr(Qe,dt)),Qe.__beforeBegin=null,[tt,et,Ke].forEach(cr=>cr(Qe,dt)),Qe.isCompiled=!0;let xt=null;if(typeof Qe.keywords=="object"&&(xt=Qe.keywords.$pattern,delete Qe.keywords.$pattern),Qe.keywords&&(Qe.keywords=Le(Qe.keywords,Se.case_insensitive)),Qe.lexemes&&xt)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return xt=xt||Qe.lexemes||/\w+/,Tt.keywordPatternRe=Xe(xt,!0),dt&&(Qe.begin||(Qe.begin=/\B|\b/),Tt.beginRe=Xe(Qe.begin),Qe.endSameAsBegin&&(Qe.end=Qe.begin),!Qe.end&&!Qe.endsWithParent&&(Qe.end=/\B|\b/),Qe.end&&(Tt.endRe=Xe(Qe.end)),Tt.terminatorEnd=v(Qe.end)||"",Qe.endsWithParent&&dt.terminatorEnd&&(Tt.terminatorEnd+=(Qe.end?"|":"")+dt.terminatorEnd)),Qe.illegal&&(Tt.illegalRe=Xe(Qe.illegal)),Qe.contains||(Qe.contains=[]),Qe.contains=[].concat(...Qe.contains.map(function(cr){return ee(cr==="self"?Qe:cr)})),Qe.contains.forEach(function(cr){hr(cr,Tt)}),Qe.starts&&hr(Qe.starts,dt),Tt.matcher=$t(Tt),Tt}if(Se.compilerExtensions||(Se.compilerExtensions=[]),Se.contains&&Se.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Se.classNameAliases=a(Se.classNameAliases||{}),hr(Se)}function F(Se){return Se?Se.endsWithParent||F(Se.starts):!1}function ee(Se){return Se.variants&&!Se.cachedVariants&&(Se.cachedVariants=Se.variants.map(function(Ve){return a(Se,{variants:null},Ve)})),Se.cachedVariants?Se.cachedVariants:F(Se)?a(Se,{starts:Se.starts?a(Se.starts):null}):Object.isFrozen(Se)?a(Se):Se}var fe="10.7.3";function ye(Se){return!!(Se||Se==="")}function _e(Se){const Ve={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!Se.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,i(this.code);let Et={};return this.autoDetect?(Et=Se.highlightAuto(this.code),this.detectedLanguage=Et.language):(Et=Se.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),Et.value},autoDetect(){return!this.language||ye(this.autodetect)},ignoreIllegals(){return!0}},render(Et){return Et("pre",{},[Et("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:Ve,VuePlugin:{install(Et){Et.component("highlightjs",Ve)}}}}const Ye={"after:highlightElement":({el:Se,result:Ve,text:Xe})=>{const Et=J(Se);if(!Et.length)return;const Mt=document.createElement("div");Mt.innerHTML=Ve.value,Ve.value=I(Et,J(Mt),Xe)}};function ht(Se){return Se.nodeName.toLowerCase()}function J(Se){const Ve=[];return(function Xe(Et,Mt){for(let $t=Et.firstChild;$t;$t=$t.nextSibling)$t.nodeType===3?Mt+=$t.nodeValue.length:$t.nodeType===1&&(Ve.push({event:"start",offset:Mt,node:$t}),Mt=Xe($t,Mt),ht($t).match(/br|hr|img|input/)||Ve.push({event:"stop",offset:Mt,node:$t}));return Mt})(Se,0),Ve}function I(Se,Ve,Xe){let Et=0,Mt="";const $t=[];function hr(){return!Se.length||!Ve.length?Se.length?Se:Ve:Se[0].offset!==Ve[0].offset?Se[0].offset "}function dt(xt){Mt+=""+ht(xt)+">"}function Tt(xt){(xt.event==="start"?Qe:dt)(xt.node)}for(;Se.length||Ve.length;){let xt=hr();if(Mt+=i(Xe.substring(Et,xt[0].offset)),Et=xt[0].offset,xt===Se){$t.reverse().forEach(dt);do Tt(xt.splice(0,1)[0]),xt=hr();while(xt===Se&&xt.length&&xt[0].offset===Et);$t.reverse().forEach(Qe)}else xt[0].event==="start"?$t.push(xt[0].node):$t.pop(),Tt(xt.splice(0,1)[0])}return Mt+i(Xe.substr(Et))}const B={},oe=Se=>{console.error(Se)},Ee=(Se,...Ve)=>{console.log(`WARN: ${Se}`,...Ve)},Ce=(Se,Ve)=>{B[`${Se}/${Ve}`]||(console.log(`Deprecated as of ${Se}. ${Ve}`),B[`${Se}/${Ve}`]=!0)},qe=i,ut=a,bt=Symbol("nomatch");var Ft=function(Se){const Ve=Object.create(null),Xe=Object.create(null),Et=[];let Mt=!0;const $t=/(^(<[^>]+>|\t|)+|\n)/gm,hr="Could not find the language '{}', did you forget to load/include a language module?",Qe={disableAutodetect:!0,name:"Plain text",contains:[]};let dt={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:p};function Tt(Ze){return dt.noHighlightRe.test(Ze)}function xt(Ze){let ot=Ze.className+" ";ot+=Ze.parentNode?Ze.parentNode.className:"";const Qt=dt.languageDetectRe.exec(ot);if(Qt){const yr=Dt(Qt[1]);return yr||(Ee(hr.replace("{}",Qt[1])),Ee("Falling back to no-highlight mode for this block.",Ze)),yr?Qt[1]:"no-highlight"}return ot.split(/\s+/).find(yr=>Tt(yr)||Dt(yr))}function cr(Ze,ot,Qt,yr){let Fr="",ni="";typeof ot=="object"?(Fr=Ze,Qt=ot.ignoreIllegals,ni=ot.language,yr=void 0):(Ce("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ce("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),ni=Ze,Fr=ot);const rn={code:Fr,language:ni};$n("before:highlight",rn);const Vr=rn.result?rn.result:Fn(rn.language,rn.code,Qt,yr);return Vr.code=rn.code,$n("after:highlight",Vr),Vr}function Fn(Ze,ot,Qt,yr){function Fr(St,_t){const It=Pa.case_insensitive?_t[0].toLowerCase():_t[0];return Object.prototype.hasOwnProperty.call(St.keywords,It)&&St.keywords[It]}function ni(){if(!Ht.keywords){Pt.addText(Hr);return}let St=0;Ht.keywordPatternRe.lastIndex=0;let _t=Ht.keywordPatternRe.exec(Hr),It="";for(;_t;){It+=Hr.substring(St,_t.index);const sr=Fr(Ht,_t);if(sr){const[yn,mi]=sr;if(Pt.addText(It),It="",fs+=mi,yn.startsWith("_"))It+=_t[0];else{const yi=Pa.classNameAliases[yn]||yn;Pt.addKeyword(_t[0],yi)}}else It+=_t[0];St=Ht.keywordPatternRe.lastIndex,_t=Ht.keywordPatternRe.exec(Hr)}It+=Hr.substr(St),Pt.addText(It)}function rn(){if(Hr==="")return;let St=null;if(typeof Ht.subLanguage=="string"){if(!Ve[Ht.subLanguage]){Pt.addText(Hr);return}St=Fn(Ht.subLanguage,Hr,!0,Sl[Ht.subLanguage]),Sl[Ht.subLanguage]=St.top}else St=ka(Hr,Ht.subLanguage.length?Ht.subLanguage:null);Ht.relevance>0&&(fs+=St.relevance),Pt.addSublanguage(St.emitter,St.language)}function Vr(){Ht.subLanguage!=null?rn():ni(),Hr=""}function pi(St){return St.className&&Pt.openNode(Pa.classNameAliases[St.className]||St.className),Ht=Object.create(St,{parent:{value:Ht}}),Ht}function hi(St,_t,It){let sr=_(St.endRe,It);if(sr){if(St["on:end"]){const yn=new n(St);St["on:end"](_t,yn),yn.isMatchIgnored&&(sr=!1)}if(sr){for(;St.endsParent&&St.parent;)St=St.parent;return St}}if(St.endsWithParent)return hi(St.parent,_t,It)}function wo(St){return Ht.matcher.regexIndex===0?(Hr+=St[0],1):(qa=!0,0)}function bl(St){const _t=St[0],It=St.rule,sr=new n(It),yn=[It.__beforeBegin,It["on:begin"]];for(const mi of yn)if(mi&&(mi(St,sr),sr.isMatchIgnored))return wo(_t);return It&&It.endSameAsBegin&&(It.endRe=h(_t)),It.skip?Hr+=_t:(It.excludeBegin&&(Hr+=_t),Vr(),!It.returnBegin&&!It.excludeBegin&&(Hr=_t)),pi(It),It.returnBegin?0:_t.length}function Ps(St){const _t=St[0],It=ot.substr(St.index),sr=hi(Ht,St,It);if(!sr)return bt;const yn=Ht;yn.skip?Hr+=_t:(yn.returnEnd||yn.excludeEnd||(Hr+=_t),Vr(),yn.excludeEnd&&(Hr=_t));do Ht.className&&Pt.closeNode(),!Ht.skip&&!Ht.subLanguage&&(fs+=Ht.relevance),Ht=Ht.parent;while(Ht!==sr.parent);return sr.starts&&(sr.endSameAsBegin&&(sr.starts.endRe=sr.endRe),pi(sr.starts)),yn.returnEnd?0:_t.length}function Au(){const St=[];for(let _t=Ht;_t!==Pa;_t=_t.parent)_t.className&&St.unshift(_t.className);St.forEach(_t=>Pt.openNode(_t))}let mn={};function qs(St,_t){const It=_t&&_t[0];if(Hr+=St,It==null)return Vr(),0;if(mn.type==="begin"&&_t.type==="end"&&mn.index===_t.index&&It===""){if(Hr+=ot.slice(_t.index,_t.index+1),!Mt){const sr=new Error("0 width match regex");throw sr.languageName=Ze,sr.badRule=mn.rule,sr}return 1}if(mn=_t,_t.type==="begin")return bl(_t);if(_t.type==="illegal"&&!Qt){const sr=new Error('Illegal lexeme "'+It+'" for mode "'+(Ht.className||" ")+'"');throw sr.mode=Ht,sr}else if(_t.type==="end"){const sr=Ps(_t);if(sr!==bt)return sr}if(_t.type==="illegal"&&It==="")return 1;if(ii>1e5&&ii>_t.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Hr+=It,It.length}const Pa=Dt(Ze);if(!Pa)throw oe(hr.replace("{}",Ze)),new Error('Unknown language: "'+Ze+'"');const El=k(Pa,{plugins:Et});let la="",Ht=yr||El;const Sl={},Pt=new dt.__emitter(dt);Au();let Hr="",fs=0,Jr=0,ii=0,qa=!1;try{for(Ht.matcher.considerAll();;){ii++,qa?qa=!1:Ht.matcher.considerAll(),Ht.matcher.lastIndex=Jr;const St=Ht.matcher.exec(ot);if(!St)break;const _t=ot.substring(Jr,St.index),It=qs(_t,St);Jr=St.index+It}return qs(ot.substr(Jr)),Pt.closeAllNodes(),Pt.finalize(),la=Pt.toHTML(),{relevance:Math.floor(fs),value:la,language:Ze,illegal:!1,emitter:Pt,top:Ht}}catch(St){if(St.message&&St.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:St.message,context:ot.slice(Jr-100,Jr+100),mode:St.mode},sofar:la,relevance:0,value:qe(ot),emitter:Pt};if(Mt)return{illegal:!1,relevance:0,value:qe(ot),emitter:Pt,language:Ze,top:Ht,errorRaised:St};throw St}}function Ia(Ze){const ot={relevance:0,emitter:new dt.__emitter(dt),value:qe(Ze),illegal:!1,top:Qe};return ot.emitter.addText(Ze),ot}function ka(Ze,ot){ot=ot||dt.languages||Object.keys(Ve);const Qt=Ia(Ze),yr=ot.filter(Dt).filter(ar).map(pi=>Fn(pi,Ze,!1));yr.unshift(Qt);const Fr=yr.sort((pi,hi)=>{if(pi.relevance!==hi.relevance)return hi.relevance-pi.relevance;if(pi.language&&hi.language){if(Dt(pi.language).supersetOf===hi.language)return 1;if(Dt(hi.language).supersetOf===pi.language)return-1}return 0}),[ni,rn]=Fr,Vr=ni;return Vr.second_best=rn,Vr}function Nn(Ze){return dt.tabReplace||dt.useBR?Ze.replace($t,ot=>ot===` +`?dt.useBR?"
":ot:dt.tabReplace?ot.replace(/\t/g,dt.tabReplace):ot):Ze}function Ni(Ze,ot,Qt){const yr=ot?Xe[ot]:Qt;Ze.classList.add("hljs"),yr&&Ze.classList.add(yr)}const sa={"before:highlightElement":({el:Ze})=>{dt.useBR&&(Ze.innerHTML=Ze.innerHTML.replace(/\n/g,"").replace(/
/g,` +`))},"after:highlightElement":({result:Ze})=>{dt.useBR&&(Ze.value=Ze.value.replace(/\n/g,"
"))}},Da=/^(<[^>]+>|\t)+/gm,oa={"after:highlightElement":({result:Ze})=>{dt.tabReplace&&(Ze.value=Ze.value.replace(Da,ot=>ot.replace(/\t/g,dt.tabReplace)))}};function Yr(Ze){let ot=null;const Qt=xt(Ze);if(Tt(Qt))return;$n("before:highlightElement",{el:Ze,language:Qt}),ot=Ze;const yr=ot.textContent,Fr=Qt?cr(yr,{language:Qt,ignoreIllegals:!0}):ka(yr);$n("after:highlightElement",{el:Ze,result:Fr,text:yr}),Ze.innerHTML=Fr.value,Ni(Ze,Qt,Fr.language),Ze.result={language:Fr.language,re:Fr.relevance,relavance:Fr.relevance},Fr.second_best&&(Ze.second_best={language:Fr.second_best.language,re:Fr.second_best.relevance,relavance:Fr.second_best.relevance})}function Sr(Ze){Ze.useBR&&(Ce("10.3.0","'useBR' will be removed entirely in v11.0"),Ce("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),dt=ut(dt,Ze)}const Qr=()=>{if(Qr.called)return;Qr.called=!0,Ce("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(Yr)};function di(){Ce("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),Mi=!0}let Mi=!1;function fn(){if(document.readyState==="loading"){Mi=!0;return}document.querySelectorAll("pre code").forEach(Yr)}function Zt(){Mi&&fn()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Zt,!1);function vt(Ze,ot){let Qt=null;try{Qt=ot(Se)}catch(yr){if(oe("Language definition for '{}' could not be registered.".replace("{}",Ze)),Mt)oe(yr);else throw yr;Qt=Qe}Qt.name||(Qt.name=Ze),Ve[Ze]=Qt,Qt.rawDefinition=ot.bind(null,Se),Qt.aliases&&_r(Qt.aliases,{languageName:Ze})}function ve(Ze){delete Ve[Ze];for(const ot of Object.keys(Xe))Xe[ot]===Ze&&delete Xe[ot]}function $e(){return Object.keys(Ve)}function ct(Ze){Ce("10.4.0","requireLanguage will be removed entirely in v11."),Ce("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const ot=Dt(Ze);if(ot)return ot;throw new Error("The '{}' language is required, but not loaded.".replace("{}",Ze))}function Dt(Ze){return Ze=(Ze||"").toLowerCase(),Ve[Ze]||Ve[Xe[Ze]]}function _r(Ze,{languageName:ot}){typeof Ze=="string"&&(Ze=[Ze]),Ze.forEach(Qt=>{Xe[Qt.toLowerCase()]=ot})}function ar(Ze){const ot=Dt(Ze);return ot&&!ot.disableAutodetect}function Ut(Ze){Ze["before:highlightBlock"]&&!Ze["before:highlightElement"]&&(Ze["before:highlightElement"]=ot=>{Ze["before:highlightBlock"](Object.assign({block:ot.el},ot))}),Ze["after:highlightBlock"]&&!Ze["after:highlightElement"]&&(Ze["after:highlightElement"]=ot=>{Ze["after:highlightBlock"](Object.assign({block:ot.el},ot))})}function Mn(Ze){Ut(Ze),Et.push(Ze)}function $n(Ze,ot){const Qt=Ze;Et.forEach(function(yr){yr[Qt]&&yr[Qt](ot)})}function ri(Ze){return Ce("10.2.0","fixMarkup will be removed entirely in v11.0"),Ce("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),Nn(Ze)}function Tr(Ze){return Ce("10.7.0","highlightBlock will be removed entirely in v12.0"),Ce("10.7.0","Please use highlightElement now."),Yr(Ze)}Object.assign(Se,{highlight:cr,highlightAuto:ka,highlightAll:fn,fixMarkup:ri,highlightElement:Yr,highlightBlock:Tr,configure:Sr,initHighlighting:Qr,initHighlightingOnLoad:di,registerLanguage:vt,unregisterLanguage:ve,listLanguages:$e,getLanguage:Dt,registerAliases:_r,requireLanguage:ct,autoDetection:ar,inherit:ut,addPlugin:Mn,vuePlugin:_e(Se).VuePlugin}),Se.debugMode=function(){Mt=!1},Se.safeMode=function(){Mt=!0},Se.versionString=fe;for(const Ze in Ae)typeof Ae[Ze]=="object"&&e(Ae[Ze]);return Object.assign(Se,Ae),Se.addPlugin(sa),Se.addPlugin(Ye),Se.addPlugin(oa),Se}({});return FO=Ft,FO}var $O={exports:{}},u5;function KEe(){return u5||(u5=1,(function(t){(function(){var e;e=t.exports=i,e.format=i,e.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(e.printf=r);function r(){console.log(i.apply(null,arguments))}function n(a,o){return i.apply(null,[a].concat(o))}function i(a){for(var o=1,u=[].slice.call(arguments),c=0,f=a.length,p="",h,v=!1,g,E,S=!1,_,A=function(){return u[o++]},w=function(){for(var C="";/\d/.test(a[c]);)C+=a[c++],h=a[c];return C.length>0?parseInt(C):null};cM.relevance&&(M=D),D.relevance>N.relevance&&(M=N,N=D));return M.language&&(N.secondBest=M),N}function a(_,A){t.registerLanguage(_,A)}function o(){return t.listLanguages()}function u(_,A){var w=_,C;A&&(w={},w[_]=A);for(C in w)t.registerAliases(w[C],{languageName:C})}function c(_){this.options=_,this.rootNode={children:[]},this.stack=[this.rootNode]}function f(_,A){this.openNode(A),this.addText(_),this.closeNode()}function p(_,A){var w=this.stack,C=w[w.length-1],R=_.rootNode.children,O=A?{type:"element",tagName:"span",properties:{className:[A]},children:R}:R;C.children=C.children.concat(O)}function h(_){var A=this.stack,w,C;_!==""&&(w=A[A.length-1],C=w.children[w.children.length-1],C&&C.type==="text"?C.value+=_:w.children.push({type:"text",value:_}))}function v(_){var A=this.stack,w=this.options.classPrefix+_,C=A[A.length-1],R={type:"element",tagName:"span",properties:{className:[w]},children:[]};C.children.push(R),A.push(R)}function g(){this.stack.pop()}function E(){return""}function S(){}return Gl}var XEe=YEe();const MG=Ct(XEe);var IG=JEe(MG,{});IG.registerLanguage=MG.registerLanguage;var zO,d5;function ZEe(){if(d5)return zO;d5=1;const t="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],n=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],i=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],a=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","module","global"],u=[].concat(a,o,n,i);function c(v){return v?typeof v=="string"?v:v.source:null}function f(v){return p("(?=",v,")")}function p(...v){return v.map(E=>c(E)).join("")}function h(v){const g=(W,{after:te})=>{const ne=""+W[0].slice(1);return W.input.indexOf(ne,te)!==-1},E=t,S={begin:"<>",end:">"},_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,te)=>{const ne=W[0].length+W.index,ce=W.input[ne];if(ce==="<"){te.ignoreMatch();return}ce===">"&&(g(W,{after:ne})||te.ignoreMatch())}},A={$pattern:t,keyword:e,literal:r,built_in:u},w="[0-9](_?[0-9])*",C=`\\.(${w})`,R="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",O={className:"number",variants:[{begin:`(\\b(${R})((${C})|\\.)?|(${C}))[eE][+-]?(${w})\\b`},{begin:`\\b(${R})\\b((${C})\\b|\\.)?|(${C})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},N={className:"subst",begin:"\\$\\{",end:"\\}",keywords:A,contains:[]},M={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[v.BACKSLASH_ESCAPE,N],subLanguage:"xml"}},D={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[v.BACKSLASH_ESCAPE,N],subLanguage:"css"}},q={className:"string",begin:"`",end:"`",contains:[v.BACKSLASH_ESCAPE,N]},P={className:"comment",variants:[v.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:E+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),v.C_BLOCK_COMMENT_MODE,v.C_LINE_COMMENT_MODE]},V=[v.APOS_STRING_MODE,v.QUOTE_STRING_MODE,M,D,q,O,v.REGEXP_MODE];N.contains=V.concat({begin:/\{/,end:/\}/,keywords:A,contains:["self"].concat(V)});const U=[].concat(P,N.contains),se=U.concat([{begin:/\(/,end:/\)/,keywords:A,contains:["self"].concat(U)}]),ue={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:se};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:A,exports:{PARAMS_CONTAINS:se},illegal:/#(?![$_A-z])/,contains:[v.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},v.APOS_STRING_MODE,v.QUOTE_STRING_MODE,M,D,q,P,O,{begin:p(/[{,\n]\s*/,f(p(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,E+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:E+f("\\s*:"),relevance:0}]},{begin:"("+v.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[P,v.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+v.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:v.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:se}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:S.begin,end:S.end},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:A,contains:["self",v.inherit(v.TITLE_MODE,{begin:E}),ue],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:v.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[ue,v.inherit(v.TITLE_MODE,{begin:E})]},{variants:[{begin:"\\."+E},{begin:"\\$"+E}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},v.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[v.inherit(v.TITLE_MODE,{begin:E}),"self",ue]},{begin:"(get|set)\\s+(?="+E+"\\()",end:/\{/,keywords:"get set",contains:[v.inherit(v.TITLE_MODE,{begin:E}),{begin:/\(\)/},ue]},{begin:/\$[(.]/}]}}return zO=h,zO}var QEe=ZEe();const eSe=Ct(QEe);var VO,p5;function tSe(){if(p5)return VO;p5=1;function t(e){const r={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],i=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:i,keywords:r},o={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})].concat(n),illegal:"\\S"},u={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return i.push(o,u),n.forEach(function(c){i.push(c)}),{name:"JSON",contains:i,keywords:r,illegal:"\\S"}}return VO=t,VO}var rSe=tSe();const nSe=Ct(rSe);var HO,h5;function iSe(){if(h5)return HO;h5=1;function t(o){return o?typeof o=="string"?o:o.source:null}function e(o){return n("(?=",o,")")}function r(o){return n("(",o,")?")}function n(...o){return o.map(c=>t(c)).join("")}function i(...o){return"("+o.map(c=>t(c)).join("|")+")"}function a(o){const u=n(/[A-Z_]/,r(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),c=/[A-Za-z0-9._:-]+/,f={className:"symbol",begin:/&[a-z]+;|[0-9]+;|[a-f0-9]+;/},p={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},h=o.inherit(p,{begin:/\(/,end:/\)/}),v=o.inherit(o.APOS_STRING_MODE,{className:"meta-string"}),g=o.inherit(o.QUOTE_STRING_MODE,{className:"meta-string"}),E={endsWithParent:!0,illegal:/,relevance:0,contains:[{className:"attr",begin:c,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[f]},{begin:/'/,end:/'/,contains:[f]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[p,g,v,h,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[p,h,g,v]}]}]},o.COMMENT(//,{relevance:10}),{begin://,relevance:10},f,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/