@swagger-api/apidom-parser-adapter-openapi-yaml-2 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("fs"),require("path")):"function"==typeof define&&define.amd?define(["exports","fs","path"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).apidomParserAdapterOpenapiYaml2={},e.fs,e.path)}(this,(function(exports,require$$0,require$$1){"use strict";var F=function(){return!1},T=function(){return!0};function _isPlaceholder(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function _curry1(e){return function t(r){return 0===arguments.length||_isPlaceholder(r)?t:e.apply(this,arguments)}}function _curry2(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(r)?t:_curry1((function(t){return e(r,t)}));default:return _isPlaceholder(r)&&_isPlaceholder(n)?t:_isPlaceholder(r)?_curry1((function(t){return e(t,n)})):_isPlaceholder(n)?_curry1((function(t){return e(r,t)})):e(r,n)}}}function _concat(e,t){var r;t=t||[];var n=(e=e||[]).length,s=t.length,i=[];for(r=0;r<n;)i[i.length]=e[r],r+=1;for(r=0;r<s;)i[i.length]=t[r],r+=1;return i}function _arity(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,s){return t.apply(this,arguments)};case 5:return function(e,r,n,s,i){return t.apply(this,arguments)};case 6:return function(e,r,n,s,i,o){return t.apply(this,arguments)};case 7:return function(e,r,n,s,i,o,a){return t.apply(this,arguments)};case 8:return function(e,r,n,s,i,o,a,u){return t.apply(this,arguments)};case 9:return function(e,r,n,s,i,o,a,u,l){return t.apply(this,arguments)};case 10:return function(e,r,n,s,i,o,a,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(e,t,r){return function(){for(var n=[],s=0,i=e,o=0,a=!1;o<t.length||s<arguments.length;){var u;o<t.length&&(!_isPlaceholder(t[o])||s>=arguments.length)?u=t[o]:(u=arguments[s],s+=1),n[o]=u,_isPlaceholder(u)?a=!0:i-=1,o+=1}return!a&&i<=0?r.apply(this,n):_arity(Math.max(0,i),_curryN(e,n,r))}}var curryN=_curry2((function(e,t){return 1===e?_curry1(t):_arity(e,_curryN(e,[],t))}));function _curry3(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(r)?t:_curry2((function(t,n){return e(r,t,n)}));case 2:return _isPlaceholder(r)&&_isPlaceholder(n)?t:_isPlaceholder(r)?_curry2((function(t,r){return e(t,n,r)})):_isPlaceholder(n)?_curry2((function(t,n){return e(r,t,n)})):_curry1((function(t){return e(r,n,t)}));default:return _isPlaceholder(r)&&_isPlaceholder(n)&&_isPlaceholder(s)?t:_isPlaceholder(r)&&_isPlaceholder(n)?_curry2((function(t,r){return e(t,r,s)})):_isPlaceholder(r)&&_isPlaceholder(s)?_curry2((function(t,r){return e(t,n,r)})):_isPlaceholder(n)&&_isPlaceholder(s)?_curry2((function(t,n){return e(r,t,n)})):_isPlaceholder(r)?_curry1((function(t){return e(t,n,s)})):_isPlaceholder(n)?_curry1((function(t){return e(r,t,s)})):_isPlaceholder(s)?_curry1((function(t){return e(r,n,t)})):e(r,n,s)}}}const _isArray=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function _isTransformer(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function _dispatchable(e,t,r){return function(){if(0===arguments.length)return r();var n=arguments[arguments.length-1];if(!_isArray(n)){for(var s=0;s<e.length;){if("function"==typeof n[e[s]])return n[e[s]].apply(n,Array.prototype.slice.call(arguments,0,-1));s+=1}if(_isTransformer(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return r.apply(this,arguments)}}function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var XAll=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=_reduced(this.xf["@@transducer/step"](e,!1))),e},e}();function _xall(e){return function(t){return new XAll(e,t)}}var all=_curry2(_dispatchable(["all"],_xall,(function(e,t){for(var r=0;r<t.length;){if(!e(t[r]))return!1;r+=1}return!0})));function _arrayFromIterator(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function _includesWith(e,t,r){for(var n=0,s=r.length;n<s;){if(e(t,r[n]))return!0;n+=1}return!1}function _functionName(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function _objectIs$1(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}const _objectIs="function"==typeof Object.is?Object.is:_objectIs$1;var toString$2=Object.prototype.toString,_isArguments=function(){return"[object Arguments]"===toString$2.call(arguments)?function(e){return"[object Arguments]"===toString$2.call(e)}:function(e){return _has("callee",e)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},keys="function"!=typeof Object.keys||hasArgsEnumBug?_curry1((function(e){if(Object(e)!==e)return[];var t,r,n=[],s=hasArgsEnumBug&&_isArguments(e);for(t in e)!_has(t,e)||s&&"length"===t||(n[n.length]=t);if(hasEnumBug)for(r=nonEnumerableProps.length-1;r>=0;)_has(t=nonEnumerableProps[r],e)&&!contains(n,t)&&(n[n.length]=t),r-=1;return n})):_curry1((function(e){return Object(e)!==e?[]:Object.keys(e)})),type=_curry1((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function _uniqContentEquals(e,t,r,n){var s=_arrayFromIterator(e);function i(e,t){return _equals(e,t,r.slice(),n.slice())}return!_includesWith((function(e,t){return!_includesWith(i,t,e)}),_arrayFromIterator(t),s)}function _equals(e,t,r,n){if(_objectIs(e,t))return!0;var s=type(e);if(s!==type(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===_functionName(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!_objectIs(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!_objectIs(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return n[i]===t;i-=1}switch(s){case"Map":return e.size===t.size&&_uniqContentEquals(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&_uniqContentEquals(e.values(),t.values(),r.concat([e]),n.concat([t]));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=keys(e);if(o.length!==keys(t).length)return!1;var a=r.concat([e]),u=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!_has(l,t)||!_equals(t[l],e[l],a,u))return!1;i-=1}return!0}var equals=_curry2((function(e,t){return _equals(e,t,[],[])}));function _indexOf(e,t,r){var n,s;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;r<e.length;){if(0===(s=e[r])&&1/s===n)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(s=e[r])&&s!=s)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(equals(e[r],t))return r;r+=1}return-1}function _includes(e,t){return _indexOf(t,e,0)>=0}function _map(e,t){for(var r=0,n=t.length,s=Array(n);r<n;)s[r]=e(t[r]),r+=1;return s}function _quote(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pad=function(e){return(e<10?"0":"")+e},_toISOString="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+pad(e.getUTCMonth()+1)+"-"+pad(e.getUTCDate())+"T"+pad(e.getUTCHours())+":"+pad(e.getUTCMinutes())+":"+pad(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(e){return function(){return!e.apply(this,arguments)}}function _arrayReduce(e,t,r){for(var n=0,s=r.length;n<s;)t=e(t,r[n]),n+=1;return t}function _filter(e,t){for(var r=0,n=t.length,s=[];r<n;)e(t[r])&&(s[s.length]=t[r]),r+=1;return s}function _isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}var XFilter=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function _xfilter(e){return function(t){return new XFilter(e,t)}}var filter=_curry2(_dispatchable(["fantasy-land/filter","filter"],_xfilter,(function(e,t){return _isObject(t)?_arrayReduce((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},keys(t)):_filter(e,t)}))),reject=_curry2((function(e,t){return filter(_complement(e),t)}));function _toString(e,t){var r=function(r){var n=t.concat([e]);return _includes(r,n)?"<Circular>":_toString(r,n)},n=function(e,t){return _map((function(t){return _quote(t)+": "+r(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+_map(r,e).join(", ")+"))";case"[object Array]":return"["+_map(r,e).concat(n(e,reject((function(e){return/^\d+$/.test(e)}),keys(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):_quote(_toISOString(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":_quote(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var s=e.toString();if("[object Object]"!==s)return s}return"{"+n(e,keys(e)).join(", ")+"}"}}var toString$1=_curry1((function(e){return _toString(e,[])})),max=_curry2((function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var n=r(e,t);if(void 0!==n)return n;var s=r(typeof e,typeof t);if(void 0!==s)return s===typeof e?e:t;var i=toString$1(e),o=r(i,toString$1(t));return void 0!==o&&o===i?e:t})),XMap=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),_xmap=function(e){return function(t){return new XMap(e,t)}},map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return curryN(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return _arrayReduce((function(r,n){return r[n]=e(t[n]),r}),{},keys(t));default:return _map(e,t)}})));const _isInteger=Number.isInteger||function(e){return(e|0)===e};function _isString(e){return"[object String]"===Object.prototype.toString.call(e)}function _nth(e,t){var r=e<0?t.length+e:e;return _isString(t)?t.charAt(r):t[r]}var prop=_curry2((function(e,t){if(null!=t)return _isInteger(e)?_nth(e,t):t[e]})),pluck=_curry2((function(e,t){return map(prop(e),t)})),_isArrayLike=_curry1((function(e){return!!_isArray(e)||!!e&&("object"==typeof e&&(!_isString(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),symIterator="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function _createReduce(e,t,r){return function(n,s,i){if(_isArrayLike(i))return e(n,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return t(n,s,i,"fantasy-land/reduce");if(null!=i[symIterator])return r(n,s,i[symIterator]());if("function"==typeof i.next)return r(n,s,i);if("function"==typeof i.reduce)return t(n,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function _xArrayReduce(e,t,r){for(var n=0,s=r.length;n<s;){if((t=e["@@transducer/step"](t,r[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var bind=_curry2((function(e,t){return _arity(e.length,(function(){return e.apply(t,arguments)}))}));function _xIterableReduce(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function _xMethodReduce(e,t,r,n){return e["@@transducer/result"](r[n](bind(e["@@transducer/step"],e),t))}var _xReduce=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce),XWrap=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function _xwrap(e){return new XWrap(e)}var reduce=_curry3((function(e,t,r){return _xReduce("function"==typeof e?_xwrap(e):e,t,r)})),allPass=_curry1((function(e){return curryN(reduce(max,0,pluck("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0}))})),always=_curry1((function(e){return function(){return e}})),and=_curry2((function(e,t){return e&&t})),anyPass=_curry1((function(e){return curryN(reduce(max,0,pluck("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1}))}));function _iterableReduce(e,t,r){for(var n=r.next();!n.done;)t=e(t,n.value),n=r.next();return t}function _methodReduce(e,t,r,n){return r[n](e,t)}var _reduce=_createReduce(_arrayReduce,_methodReduce,_iterableReduce),ap=_curry2((function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:_reduce((function(e,r){return _concat(e,map(r,t))}),[],e)})),apply=_curry2((function(e,t){return e.apply(this,t)})),curry=_curry1((function(e){return curryN(e.length,e)})),isNil=_curry1((function(e){return null==e}));function _isFunction(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}var liftN=_curry2((function(e,t){var r=curryN(e,t);return curryN(e,(function(){return _arrayReduce(ap,map(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),lift=_curry1((function(e){return liftN(e.length,e)})),both=_curry2((function(e,t){return _isFunction(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:lift(and)(e,t)})),comparator=_curry1((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),not=_curry1((function(e){return!e})),complement=lift(not);function _pipe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function _checkForMethod(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return _isArray(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}var slice=_curry3(_checkForMethod("slice",(function(e,t,r){return Array.prototype.slice.call(r,e,t)}))),tail=_curry1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce(_pipe,arguments[0],tail(arguments)))}var reverse=_curry1((function(e){return _isString(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()}));function compose(){if(0===arguments.length)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse(arguments))}var head=_curry1((function(e){return _nth(0,e)}));function _identity(e){return e}var identity=_curry1(_identity),concat=_curry2((function(e,t){if(_isArray(e)){if(_isArray(t))return e.concat(t);throw new TypeError(toString$1(t)+" is not an array")}if(_isString(e)){if(_isString(t))return e+t;throw new TypeError(toString$1(t)+" is not a string")}if(null!=e&&_isFunction(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&_isFunction(e.concat))return e.concat(t);throw new TypeError(toString$1(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),converge=_curry2((function(e,t){return curryN(reduce(max,0,pluck("length",t)),(function(){var r=arguments,n=this;return e.apply(n,_map((function(e){return e.apply(n,r)}),t))}))})),defaultTo=_curry2((function(e,t){return null==t||t!=t?e:t})),last=_curry1((function(e){return _nth(-1,e)})),XDropWhile=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function _xdropWhile(e){return function(t){return new XDropWhile(e,t)}}var dropWhile=_curry2(_dispatchable(["dropWhile"],_xdropWhile,(function(e,t){for(var r=0,n=t.length;r<n&&e(t[r]);)r+=1;return slice(r,1/0,t)}))),or=_curry2((function(e,t){return e||t})),either=_curry2((function(e,t){return _isFunction(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:lift(or)(e,t)}));function _isTypedArray(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}var empty=_curry1((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():_isArray(e)?[]:_isString(e)?"":_isObject(e)?{}:_isArguments(e)?function(){return arguments}():_isTypedArray(e)?e.constructor.from(""):void 0})),flip=_curry1((function(e){return curryN(e.length,(function(t,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=t,e.apply(this,n)}))})),gt=_curry2((function(e,t){return e>t})),hasPath=_curry2((function(e,t){if(0===e.length||isNil(t))return!1;for(var r=t,n=0;n<e.length;){if(isNil(r)||!_has(e[n],r))return!1;r=r[e[n]],n+=1}return!0})),has=_curry2((function(e,t){return hasPath([e],t)})),identical=function(e,t){switch(arguments.length){case 0:return identical;case 1:return function t(r){return 0===arguments.length?t:_objectIs(e,r)};default:return _objectIs(e,t)}},ifElse=_curry3((function(e,t,r){return curryN(Math.max(e.length,t.length,r.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)}))})),includes=_curry2(_includes),init=slice(0,-1);function _objectAssign$1(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var s=arguments[r];if(null!=s)for(var i in s)_has(i,s)&&(t[i]=s[i]);r+=1}return t}const _objectAssign="function"==typeof Object.assign?Object.assign:_objectAssign$1;var invoker=_curry2((function(e,t){return curryN(e+1,(function(){var r=arguments[e];if(null!=r&&_isFunction(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(toString$1(r)+' does not have a method named "'+t+'"')}))})),isEmpty=_curry1((function(e){return null!=e&&equals(e,empty(e))})),isNotEmpty=_curry1((function(e){return!isEmpty(e)})),join=invoker(1,"join");function _path(e,t){for(var r=t,n=0;n<e.length;n+=1){if(null==r)return;var s=e[n];r=_isInteger(s)?_nth(s,r):r[s]}return r}var mapObjIndexed=_curry2((function(e,t){return _arrayReduce((function(r,n){return r[n]=e(t[n],n,t),r}),{},keys(t))})),mergeWithKey=_curry3((function(e,t,r){var n,s={};for(n in r=r||{},t=t||{})_has(n,t)&&(s[n]=_has(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)_has(n,r)&&!_has(n,s)&&(s[n]=r[n]);return s})),mergeDeepWithKey=_curry3((function e(t,r,n){return mergeWithKey((function(r,n,s){return _isObject(n)&&_isObject(s)?e(t,n,s):t(r,n,s)}),r,n)})),mergeDeepRight=_curry2((function(e,t){return mergeDeepWithKey((function(e,t,r){return r}),e,t)})),mergeRight=_curry2((function(e,t){return _objectAssign({},e,t)})),omit=_curry2((function(e,t){for(var r={},n={},s=0,i=e.length;s<i;)n[e[s]]=1,s+=1;for(var o in t)n.hasOwnProperty(o)||(r[o]=t[o]);return r})),path$1=_curry2(_path),pathOr=_curry3((function(e,t,r){return defaultTo(e,_path(t,r))})),pathSatisfies=_curry3((function(e,t,r){return e(_path(t,r))})),pick=_curry2((function(e,t){for(var r={},n=0;n<e.length;)e[n]in t&&(r[e[n]]=t[e[n]]),n+=1;return r})),propOr=_curry3((function(e,t,r){return defaultTo(e,prop(t,r))})),propSatisfies=_curry3((function(e,t,r){return e(prop(t,r))})),reduced=_curry1(_reduced),replace=_curry3((function(e,t,r){return r.replace(e,t)})),sort=_curry2((function(e,t){return Array.prototype.slice.call(t,0).sort(e)})),split=invoker(1,"split"),transduce=curryN(4,(function(e,t,r,n){return _xReduce(e("function"==typeof t?_xwrap(t):t),r,n)})),ws="\t\n\v\f\r \u2028\u2029\ufeff",zeroWidth="",hasProtoTrim="function"==typeof String.prototype.trim,trim=_curry1(hasProtoTrim&&!ws.trim()&&zeroWidth.trim()?function(e){return e.trim()}:function(e){var t=new RegExp("^["+ws+"]["+ws+"]*"),r=new RegExp("["+ws+"]["+ws+"]*$");return e.replace(t,"").replace(r,"")}),stubUndefined=always(void 0),isUndefined=equals(stubUndefined()),isNotUndefined=complement(isUndefined),isNull=equals(null),isNotNull=complement(isNull),isNotNil=complement(isNil),isGeneratorFunction=curryN(1,pipe(type,identical("GeneratorFunction"))),isAsyncFunction=curryN(1,pipe(type,identical("AsyncFunction"))),isFunction=anyPass([pipe(type,identical("Function")),isGeneratorFunction,isAsyncFunction]),isArray=curryN(1,isFunction(Array.isArray)?Array.isArray:pipe(type,identical("Array"))),isEmptyArray=both(isArray,isEmpty),isNonEmptyArray=both(isArray,isNotEmpty),isString=curryN(1,pipe(type,identical("String"))),isEmptyString=equals("");function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var isOfTypeObject=function(e){return"object"===_typeof(e)},isObj=curryN(1,both(isNotNull,either(isOfTypeObject,isFunction))),isNotObj=complement(isObj),isNonEmptyString=allPass([isString,isNotObj,isNotEmpty]),isNotFunction=complement(isFunction),isObjLike=curryN(1,both(isNotNull,isOfTypeObject)),isObject$1=pipe(type,identical("Object")),isObjectConstructor=pipe(toString$1,equals(toString$1(Object))),hasObjectConstructor=pathSatisfies(both(isFunction,isObjectConstructor),["constructor"]),isPlainObj=curryN(1,(function(e){if(!isObjLike(e)||!isObject$1(e))return!1;var t=Object.getPrototypeOf(e);return!!isNull(t)||hasObjectConstructor(t)})),isNumber=curryN(1,pipe(type,identical("Number"))),isNegative=curryN(1,both(isNumber,gt(0))),isFinitePonyfill$1=both(isNumber,isFinite),isFinitePonyfill=curryN(1,isFinitePonyfill$1),_isFinite=isFunction(Number.isFinite)?curryN(1,bind(Number.isFinite,Number)):isFinitePonyfill,isNotFinite=complement(_isFinite),isIntegerPonyfill$1=both(_isFinite,converge(equals,[Math.floor,identity])),isIntegerPonyfill=curryN(1,isIntegerPonyfill$1),isInteger=isFunction(Number.isInteger)?curryN(1,bind(Number.isInteger,Number)):isIntegerPonyfill;function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var byArity=comparator((function(e,t){return e.length>t.length})),getMaxArity=pipe(sort(byArity),head,prop("length")),iteratorFn=curry((function(e,t,r){var n=r.apply(void 0,_toConsumableArray(e));return isNotNil(n)?reduced(n):t})),dispatchImpl=function(e){var t=getMaxArity(e);return curryN(t,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return reduce(iteratorFn(r),void 0,e)}))},dispatch=ifElse(isNonEmptyArray,dispatchImpl,stubUndefined),concatRight=flip(concat),included=flip(includes),repeat=function(e,t){var r=Number(t);if(r!==t&&(r=0),isNegative(r))throw new RangeError("repeat count must be non-negative");if(isNotFinite(r))throw new RangeError("repeat count must be less than infinity");if(r=Math.floor(r),0===e.length||0===r)return"";if(e.length*r>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var n=e.length*r;r=Math.floor(Math.log(r)/Math.log(2));for(var s=e;r;)s+=e,r-=1;return s+=s.substring(0,n-s.length)},repeatStrPonyfill=curry(repeat),repeatStrInvoker=flip(invoker(1,"repeat")),repeatStr=isFunction(String.prototype.repeat)?repeatStrInvoker:repeatStrPonyfill,invokeArgs=curryN(3,(function(e,t,r){var n=path$1(e,r),s=path$1(init(e),r);if(!isNotFunction(n)&&!isEmptyArray(e)){var i=bind(n,s);return apply(i,t)}})),trimStart$2=replace(/^[\s\uFEFF\xA0]+/,""),trimStartPonyfill=trimStart$2,trimStartInvoker=invoker(0,"trimStart"),trimStart$1=isFunction(String.prototype.trimStart)?trimStartInvoker:trimStartPonyfill,trimStart=replace(/[\s\uFEFF\xA0]+$/,""),trimEndPonyfill=trimStart,trimEndInvoker=invoker(0,"trimEnd"),trimEnd=isFunction(String.prototype.trimEnd)?trimEndInvoker:trimEndPonyfill,trimCharsStart=curry((function(e,t){return pipe(split(""),dropWhile(included(e)),join(""))(t)})),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var minim={},isNull_1,hasRequiredIsNull,_freeGlobal,hasRequired_freeGlobal,_root,hasRequired_root,_Symbol,hasRequired_Symbol,_getRawTag,hasRequired_getRawTag,_objectToString,hasRequired_objectToString,_baseGetTag,hasRequired_baseGetTag,isArray_1,hasRequiredIsArray,isObjectLike_1,hasRequiredIsObjectLike,isString_1,hasRequiredIsString,isNumber_1,hasRequiredIsNumber,isBoolean_1,hasRequiredIsBoolean,isObject_1,hasRequiredIsObject$1,JSONSerialiser_1,hasRequiredJSONSerialiser,_listCacheClear,hasRequired_listCacheClear,eq_1,hasRequiredEq,_assocIndexOf,hasRequired_assocIndexOf,_listCacheDelete,hasRequired_listCacheDelete,_listCacheGet,hasRequired_listCacheGet,_listCacheHas,hasRequired_listCacheHas,_listCacheSet,hasRequired_listCacheSet,_ListCache,hasRequired_ListCache,_stackClear,hasRequired_stackClear,_stackDelete,hasRequired_stackDelete,_stackGet,hasRequired_stackGet,_stackHas,hasRequired_stackHas,isFunction_1,hasRequiredIsFunction,_coreJsData,hasRequired_coreJsData,_isMasked,hasRequired_isMasked,_toSource,hasRequired_toSource,_baseIsNative,hasRequired_baseIsNative,_getValue,hasRequired_getValue,_getNative,hasRequired_getNative,_Map,hasRequired_Map,_nativeCreate,hasRequired_nativeCreate,_hashClear,hasRequired_hashClear,_hashDelete,hasRequired_hashDelete,_hashGet,hasRequired_hashGet,_hashHas,hasRequired_hashHas,_hashSet,hasRequired_hashSet,_Hash,hasRequired_Hash,_mapCacheClear,hasRequired_mapCacheClear,_isKeyable,hasRequired_isKeyable,_getMapData,hasRequired_getMapData,_mapCacheDelete,hasRequired_mapCacheDelete,_mapCacheGet,hasRequired_mapCacheGet,_mapCacheHas,hasRequired_mapCacheHas,_mapCacheSet,hasRequired_mapCacheSet,_MapCache,hasRequired_MapCache,_stackSet,hasRequired_stackSet,_Stack,hasRequired_Stack,_setCacheAdd,hasRequired_setCacheAdd,_setCacheHas,hasRequired_setCacheHas,_SetCache,hasRequired_SetCache,_arraySome,hasRequired_arraySome,_cacheHas,hasRequired_cacheHas,_equalArrays,hasRequired_equalArrays,_Uint8Array,hasRequired_Uint8Array,_mapToArray,hasRequired_mapToArray,_setToArray,hasRequired_setToArray,_equalByTag,hasRequired_equalByTag,_arrayPush,hasRequired_arrayPush,_baseGetAllKeys,hasRequired_baseGetAllKeys,_arrayFilter,hasRequired_arrayFilter,stubArray_1,hasRequiredStubArray,_getSymbols,hasRequired_getSymbols,_baseTimes,hasRequired_baseTimes,_baseIsArguments,hasRequired_baseIsArguments,isArguments_1,hasRequiredIsArguments;function requireIsNull(){if(hasRequiredIsNull)return isNull_1;return hasRequiredIsNull=1,isNull_1=function(e){return null===e}}function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e}function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root=r}function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root().Symbol;return _Symbol=e}function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,s=e?e.toStringTag:void 0;return _getRawTag=function(e){var t=r.call(e,s),i=e[s];try{e[s]=void 0;var o=!0}catch(e){}var a=n.call(e);return o&&(t?e[s]=i:delete e[s]),a}}function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype.toString;return _objectToString=function(t){return e.call(t)}}function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),r=require_objectToString(),n=e?e.toStringTag:void 0;return _baseGetTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?t(e):r(e)}}function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e}function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;return hasRequiredIsObjectLike=1,isObjectLike_1=function(e){return null!=e&&"object"==typeof e}}function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),r=requireIsObjectLike();return isString_1=function(n){return"string"==typeof n||!t(n)&&r(n)&&"[object String]"==e(n)}}function requireIsNumber(){if(hasRequiredIsNumber)return isNumber_1;hasRequiredIsNumber=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isNumber_1=function(r){return"number"==typeof r||t(r)&&"[object Number]"==e(r)}}function requireIsBoolean(){if(hasRequiredIsBoolean)return isBoolean_1;hasRequiredIsBoolean=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isBoolean_1=function(r){return!0===r||!1===r||t(r)&&"[object Boolean]"==e(r)}}function requireIsObject$1(){if(hasRequiredIsObject$1)return isObject_1;return hasRequiredIsObject$1=1,isObject_1=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},isObject_1}function requireJSONSerialiser(){if(hasRequiredJSONSerialiser)return JSONSerialiser_1;hasRequiredJSONSerialiser=1;return JSONSerialiser_1=class{constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));const r=this.serialiseContent(e.content);return void 0!==r&&(t.content=r),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}serialiseObject(e){const t={};if(e.forEach(((e,r)=>{e&&(t[r.toValue()]=this.serialise(e))})),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}},JSONSerialiser_1}function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;return hasRequired_listCacheClear=1,_listCacheClear=function(){this.__data__=[],this.size=0}}function requireEq(){if(hasRequiredEq)return eq_1;return hasRequiredEq=1,eq_1=function(e,t){return e===t||e!=e&&t!=t}}function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();return _assocIndexOf=function(t,r){for(var n=t.length;n--;)if(e(t[n][0],r))return n;return-1}}function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype.splice;return _listCacheDelete=function(r){var n=this.__data__,s=e(n,r);return!(s<0)&&(s==n.length-1?n.pop():t.call(n,s,1),--this.size,!0)}}function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();return _listCacheGet=function(t){var r=this.__data__,n=e(r,t);return n<0?void 0:r[n][1]}}function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();return _listCacheHas=function(t){return e(this.__data__,t)>-1}}function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();return _listCacheSet=function(t,r){var n=this.__data__,s=e(n,t);return s<0?(++this.size,n.push([t,r])):n[s][1]=r,this}}function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),r=require_listCacheGet(),n=require_listCacheHas(),s=require_listCacheSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_ListCache=i}function require_stackClear(){if(hasRequired_stackClear)return _stackClear;hasRequired_stackClear=1;var e=require_ListCache();return _stackClear=function(){this.__data__=new e,this.size=0}}function require_stackDelete(){if(hasRequired_stackDelete)return _stackDelete;return hasRequired_stackDelete=1,_stackDelete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}}function require_stackGet(){if(hasRequired_stackGet)return _stackGet;return hasRequired_stackGet=1,_stackGet=function(e){return this.__data__.get(e)}}function require_stackHas(){if(hasRequired_stackHas)return _stackHas;return hasRequired_stackHas=1,_stackHas=function(e){return this.__data__.has(e)}}function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject$1();return isFunction_1=function(r){if(!t(r))return!1;var n=e(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root()["__core-js_shared__"];return _coreJsData=e}function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();return _isMasked=function(e){return!!t&&t in e}}function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype.toString;return _toSource=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),r=requireIsObject$1(),n=require_toSource(),s=/^\[object .+?Constructor\]$/,i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,l=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return _baseIsNative=function(i){return!(!r(i)||t(i))&&(e(i)?l:s).test(n(i))}}function require_getValue(){if(hasRequired_getValue)return _getValue;return hasRequired_getValue=1,_getValue=function(e,t){return null==e?void 0:e[t]}}function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();return _getNative=function(r,n){var s=t(r,n);return e(s)?s:void 0}}function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative()(require_root(),"Map");return _Map=e}function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative()(Object,"create");return _nativeCreate=e}function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();return _hashClear=function(){this.__data__=e?e(null):{},this.size=0}}function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;return hasRequired_hashDelete=1,_hashDelete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}}function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t=Object.prototype.hasOwnProperty;return _hashGet=function(r){var n=this.__data__;if(e){var s=n[r];return"__lodash_hash_undefined__"===s?void 0:s}return t.call(n,r)?n[r]:void 0}}function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype.hasOwnProperty;return _hashHas=function(r){var n=this.__data__;return e?void 0!==n[r]:t.call(n,r)}}function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate();return _hashSet=function(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e&&void 0===r?"__lodash_hash_undefined__":r,this}}function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),r=require_hashGet(),n=require_hashHas(),s=require_hashSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_Hash=i}function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),r=require_Map();return _mapCacheClear=function(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;return hasRequired_isKeyable=1,_isKeyable=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},_isKeyable}function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();return _getMapData=function(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map},_getMapData}function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();return _mapCacheDelete=function(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}}function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();return _mapCacheGet=function(t){return e(this,t).get(t)}}function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();return _mapCacheHas=function(t){return e(this,t).has(t)}}function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();return _mapCacheSet=function(t,r){var n=e(this,t),s=n.size;return n.set(t,r),this.size+=n.size==s?0:1,this}}function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),r=require_mapCacheGet(),n=require_mapCacheHas(),s=require_mapCacheSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_MapCache=i}function require_stackSet(){if(hasRequired_stackSet)return _stackSet;hasRequired_stackSet=1;var e=require_ListCache(),t=require_Map(),r=require_MapCache();return _stackSet=function(n,s){var i=this.__data__;if(i instanceof e){var o=i.__data__;if(!t||o.length<199)return o.push([n,s]),this.size=++i.size,this;i=this.__data__=new r(o)}return i.set(n,s),this.size=i.size,this}}function require_Stack(){if(hasRequired_Stack)return _Stack;hasRequired_Stack=1;var e=require_ListCache(),t=require_stackClear(),r=require_stackDelete(),n=require_stackGet(),s=require_stackHas(),i=require_stackSet();function o(t){var r=this.__data__=new e(t);this.size=r.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=s,o.prototype.set=i,_Stack=o}function require_setCacheAdd(){if(hasRequired_setCacheAdd)return _setCacheAdd;hasRequired_setCacheAdd=1;return _setCacheAdd=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function require_setCacheHas(){if(hasRequired_setCacheHas)return _setCacheHas;return hasRequired_setCacheHas=1,_setCacheHas=function(e){return this.__data__.has(e)}}function require_SetCache(){if(hasRequired_SetCache)return _SetCache;hasRequired_SetCache=1;var e=require_MapCache(),t=require_setCacheAdd(),r=require_setCacheHas();function n(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e;++r<n;)this.add(t[r])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,_SetCache=n}function require_arraySome(){if(hasRequired_arraySome)return _arraySome;return hasRequired_arraySome=1,_arraySome=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}}function require_cacheHas(){if(hasRequired_cacheHas)return _cacheHas;return hasRequired_cacheHas=1,_cacheHas=function(e,t){return e.has(t)}}function require_equalArrays(){if(hasRequired_equalArrays)return _equalArrays;hasRequired_equalArrays=1;var e=require_SetCache(),t=require_arraySome(),r=require_cacheHas();return _equalArrays=function(n,s,i,o,a,u){var l=1&i,c=n.length,d=s.length;if(c!=d&&!(l&&d>c))return!1;var p=u.get(n),h=u.get(s);if(p&&h)return p==s&&h==n;var m=-1,_=!0,f=2&i?new e:void 0;for(u.set(n,s),u.set(s,n);++m<c;){var g=n[m],y=s[m];if(o)var b=l?o(y,g,m,s,n,u):o(g,y,m,n,s,u);if(void 0!==b){if(b)continue;_=!1;break}if(f){if(!t(s,(function(e,t){if(!r(f,t)&&(g===e||a(g,e,i,o,u)))return f.push(t)}))){_=!1;break}}else if(g!==y&&!a(g,y,i,o,u)){_=!1;break}}return u.delete(n),u.delete(s),_}}function require_Uint8Array(){if(hasRequired_Uint8Array)return _Uint8Array;hasRequired_Uint8Array=1;var e=require_root().Uint8Array;return _Uint8Array=e}function require_mapToArray(){if(hasRequired_mapToArray)return _mapToArray;return hasRequired_mapToArray=1,_mapToArray=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},_mapToArray}function require_setToArray(){if(hasRequired_setToArray)return _setToArray;return hasRequired_setToArray=1,_setToArray=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}}function require_equalByTag(){if(hasRequired_equalByTag)return _equalByTag;hasRequired_equalByTag=1;var e=require_Symbol(),t=require_Uint8Array(),r=requireEq(),n=require_equalArrays(),s=require_mapToArray(),i=require_setToArray(),o=e?e.prototype:void 0,a=o?o.valueOf:void 0;return _equalByTag=function(e,o,u,l,c,d,p){switch(u){case"[object DataView]":if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=o.byteLength||!d(new t(e),new t(o)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+o);case"[object Error]":return e.name==o.name&&e.message==o.message;case"[object RegExp]":case"[object String]":return e==o+"";case"[object Map]":var h=s;case"[object Set]":var m=1&l;if(h||(h=i),e.size!=o.size&&!m)return!1;var _=p.get(e);if(_)return _==o;l|=2,p.set(e,o);var f=n(h(e),h(o),l,c,d,p);return p.delete(e),f;case"[object Symbol]":if(a)return a.call(e)==a.call(o)}return!1}}function require_arrayPush(){if(hasRequired_arrayPush)return _arrayPush;return hasRequired_arrayPush=1,_arrayPush=function(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}}function require_baseGetAllKeys(){if(hasRequired_baseGetAllKeys)return _baseGetAllKeys;hasRequired_baseGetAllKeys=1;var e=require_arrayPush(),t=requireIsArray();return _baseGetAllKeys=function(r,n,s){var i=n(r);return t(r)?i:e(i,s(r))}}function require_arrayFilter(){if(hasRequired_arrayFilter)return _arrayFilter;return hasRequired_arrayFilter=1,_arrayFilter=function(e,t){for(var r=-1,n=null==e?0:e.length,s=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[s++]=o)}return i}}function requireStubArray(){if(hasRequiredStubArray)return stubArray_1;return hasRequiredStubArray=1,stubArray_1=function(){return[]}}function require_getSymbols(){if(hasRequired_getSymbols)return _getSymbols;hasRequired_getSymbols=1;var e=require_arrayFilter(),t=requireStubArray(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return _getSymbols=n?function(t){return null==t?[]:(t=Object(t),e(n(t),(function(e){return r.call(t,e)})))}:t}function require_baseTimes(){if(hasRequired_baseTimes)return _baseTimes;return hasRequired_baseTimes=1,_baseTimes=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}}function require_baseIsArguments(){if(hasRequired_baseIsArguments)return _baseIsArguments;hasRequired_baseIsArguments=1;var e=require_baseGetTag(),t=requireIsObjectLike();return _baseIsArguments=function(r){return t(r)&&"[object Arguments]"==e(r)}}function requireIsArguments(){if(hasRequiredIsArguments)return isArguments_1;hasRequiredIsArguments=1;var e=require_baseIsArguments(),t=requireIsObjectLike(),r=Object.prototype,n=r.hasOwnProperty,s=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&n.call(e,"callee")&&!s.call(e,"callee")};return isArguments_1=i}var isBuffer={exports:{}},stubFalse_1,hasRequiredStubFalse,hasRequiredIsBuffer,_isIndex,hasRequired_isIndex,isLength_1,hasRequiredIsLength,_baseIsTypedArray,hasRequired_baseIsTypedArray,_baseUnary,hasRequired_baseUnary;function requireStubFalse(){if(hasRequiredStubFalse)return stubFalse_1;return hasRequiredStubFalse=1,stubFalse_1=function(){return!1}}function requireIsBuffer(){return hasRequiredIsBuffer||(hasRequiredIsBuffer=1,function(e,t){var r=require_root(),n=requireStubFalse(),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,o=i&&i.exports===s?r.Buffer:void 0,a=(o?o.isBuffer:void 0)||n;e.exports=a}(isBuffer,isBuffer.exports)),isBuffer.exports}function require_isIndex(){if(hasRequired_isIndex)return _isIndex;hasRequired_isIndex=1;var e=/^(?:0|[1-9]\d*)$/;return _isIndex=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r},_isIndex}function requireIsLength(){if(hasRequiredIsLength)return isLength_1;hasRequiredIsLength=1;return isLength_1=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var e=require_baseGetTag(),t=requireIsLength(),r=requireIsObjectLike(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,_baseIsTypedArray=function(s){return r(s)&&t(s.length)&&!!n[e(s)]}}function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;return hasRequired_baseUnary=1,_baseUnary=function(e){return function(t){return e(t)}}}isBuffer.exports;var _nodeUtil={exports:{}},hasRequired_nodeUtil,isTypedArray_1,hasRequiredIsTypedArray,_arrayLikeKeys,hasRequired_arrayLikeKeys,_isPrototype,hasRequired_isPrototype,_overArg,hasRequired_overArg,_nativeKeys,hasRequired_nativeKeys,_baseKeys,hasRequired_baseKeys,isArrayLike_1,hasRequiredIsArrayLike,keys_1,hasRequiredKeys,_getAllKeys,hasRequired_getAllKeys,_equalObjects,hasRequired_equalObjects,_DataView,hasRequired_DataView,_Promise,hasRequired_Promise,_Set,hasRequired_Set,_WeakMap,hasRequired_WeakMap,_getTag,hasRequired_getTag,_baseIsEqualDeep,hasRequired_baseIsEqualDeep,_baseIsEqual,hasRequired_baseIsEqual,isEqual_1,hasRequiredIsEqual,KeyValuePair_1,hasRequiredKeyValuePair,negate_1,hasRequiredNegate,ArraySlice_1,hasRequiredArraySlice,Element_1,hasRequiredElement,NullElement_1,hasRequiredNullElement,StringElement_1,hasRequiredStringElement,NumberElement_1,hasRequiredNumberElement,BooleanElement_1,hasRequiredBooleanElement,ArrayElement_1,hasRequiredArrayElement,MemberElement_1,hasRequiredMemberElement,ObjectSlice_1,hasRequiredObjectSlice,ObjectElement_1,hasRequiredObjectElement,LinkElement_1,hasRequiredLinkElement,RefElement_1,hasRequiredRefElement,elements,hasRequiredElements,Namespace_1,hasRequiredNamespace,JSON06Serialiser_1,hasRequiredJSON06Serialiser,hasRequiredMinim;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,function(e,t){var r=require_freeGlobal(),n=t&&!t.nodeType&&t,s=n&&e&&!e.nodeType&&e,i=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var e=require_baseIsTypedArray(),t=require_baseUnary(),r=require_nodeUtil(),n=r&&r.isTypedArray,s=n?t(n):e;return isTypedArray_1=s}function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var e=require_baseTimes(),t=requireIsArguments(),r=requireIsArray(),n=requireIsBuffer(),s=require_isIndex(),i=requireIsTypedArray(),o=Object.prototype.hasOwnProperty;return _arrayLikeKeys=function(a,u){var l=r(a),c=!l&&t(a),d=!l&&!c&&n(a),p=!l&&!c&&!d&&i(a),h=l||c||d||p,m=h?e(a.length,String):[],_=m.length;for(var f in a)!u&&!o.call(a,f)||h&&("length"==f||d&&("offset"==f||"parent"==f)||p&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||s(f,_))||m.push(f);return m}}function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var e=Object.prototype;return _isPrototype=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}}function require_overArg(){if(hasRequired_overArg)return _overArg;return hasRequired_overArg=1,_overArg=function(e,t){return function(r){return e(t(r))}}}function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var e=require_overArg()(Object.keys,Object);return _nativeKeys=e}function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var e=require_isPrototype(),t=require_nativeKeys(),r=Object.prototype.hasOwnProperty;return _baseKeys=function(n){if(!e(n))return t(n);var s=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&s.push(i);return s}}function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var e=requireIsFunction(),t=requireIsLength();return isArrayLike_1=function(r){return null!=r&&t(r.length)&&!e(r)}}function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var e=require_arrayLikeKeys(),t=require_baseKeys(),r=requireIsArrayLike();return keys_1=function(n){return r(n)?e(n):t(n)}}function require_getAllKeys(){if(hasRequired_getAllKeys)return _getAllKeys;hasRequired_getAllKeys=1;var e=require_baseGetAllKeys(),t=require_getSymbols(),r=requireKeys();return _getAllKeys=function(n){return e(n,r,t)}}function require_equalObjects(){if(hasRequired_equalObjects)return _equalObjects;hasRequired_equalObjects=1;var e=require_getAllKeys(),t=Object.prototype.hasOwnProperty;return _equalObjects=function(r,n,s,i,o,a){var u=1&s,l=e(r),c=l.length;if(c!=e(n).length&&!u)return!1;for(var d=c;d--;){var p=l[d];if(!(u?p in n:t.call(n,p)))return!1}var h=a.get(r),m=a.get(n);if(h&&m)return h==n&&m==r;var _=!0;a.set(r,n),a.set(n,r);for(var f=u;++d<c;){var g=r[p=l[d]],y=n[p];if(i)var b=u?i(y,g,p,n,r,a):i(g,y,p,r,n,a);if(!(void 0===b?g===y||o(g,y,s,i,a):b)){_=!1;break}f||(f="constructor"==p)}if(_&&!f){var E=r.constructor,w=n.constructor;E==w||!("constructor"in r)||!("constructor"in n)||"function"==typeof E&&E instanceof E&&"function"==typeof w&&w instanceof w||(_=!1)}return a.delete(r),a.delete(n),_}}function require_DataView(){if(hasRequired_DataView)return _DataView;hasRequired_DataView=1;var e=require_getNative()(require_root(),"DataView");return _DataView=e}function require_Promise(){if(hasRequired_Promise)return _Promise;hasRequired_Promise=1;var e=require_getNative()(require_root(),"Promise");return _Promise=e}function require_Set(){if(hasRequired_Set)return _Set;hasRequired_Set=1;var e=require_getNative()(require_root(),"Set");return _Set=e}function require_WeakMap(){if(hasRequired_WeakMap)return _WeakMap;hasRequired_WeakMap=1;var e=require_getNative()(require_root(),"WeakMap");return _WeakMap=e}function require_getTag(){if(hasRequired_getTag)return _getTag;hasRequired_getTag=1;var e=require_DataView(),t=require_Map(),r=require_Promise(),n=require_Set(),s=require_WeakMap(),i=require_baseGetTag(),o=require_toSource(),a="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",p=o(e),h=o(t),m=o(r),_=o(n),f=o(s),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=a||r&&g(r.resolve())!=u||n&&g(new n)!=l||s&&g(new s)!=c)&&(g=function(e){var t=i(e),r="[object Object]"==t?e.constructor:void 0,n=r?o(r):"";if(n)switch(n){case p:return d;case h:return a;case m:return u;case _:return l;case f:return c}return t}),_getTag=g}function require_baseIsEqualDeep(){if(hasRequired_baseIsEqualDeep)return _baseIsEqualDeep;hasRequired_baseIsEqualDeep=1;var e=require_Stack(),t=require_equalArrays(),r=require_equalByTag(),n=require_equalObjects(),s=require_getTag(),i=requireIsArray(),o=requireIsBuffer(),a=requireIsTypedArray(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return _baseIsEqualDeep=function(p,h,m,_,f,g){var y=i(p),b=i(h),E=y?l:s(p),w=b?l:s(h),q=(E=E==u?c:E)==c,S=(w=w==u?c:w)==c,v=E==w;if(v&&o(p)){if(!o(h))return!1;y=!0,q=!1}if(v&&!q)return g||(g=new e),y||a(p)?t(p,h,m,_,f,g):r(p,h,E,m,_,f,g);if(!(1&m)){var R=q&&d.call(p,"__wrapped__"),O=S&&d.call(h,"__wrapped__");if(R||O){var I=R?p.value():p,P=O?h.value():h;return g||(g=new e),f(I,P,m,_,g)}}return!!v&&(g||(g=new e),n(p,h,m,_,f,g))}}function require_baseIsEqual(){if(hasRequired_baseIsEqual)return _baseIsEqual;hasRequired_baseIsEqual=1;var e=require_baseIsEqualDeep(),t=requireIsObjectLike();return _baseIsEqual=function r(n,s,i,o,a){return n===s||(null==n||null==s||!t(n)&&!t(s)?n!=n&&s!=s:e(n,s,i,o,r,a))},_baseIsEqual}function requireIsEqual(){if(hasRequiredIsEqual)return isEqual_1;hasRequiredIsEqual=1;var e=require_baseIsEqual();return isEqual_1=function(t,r){return e(t,r)}}function requireKeyValuePair(){if(hasRequiredKeyValuePair)return KeyValuePair_1;hasRequiredKeyValuePair=1;class e{constructor(e,t){this.key=e,this.value=t}clone(){const t=new e;return this.key&&(t.key=this.key.clone()),this.value&&(t.value=this.value.clone()),t}}return KeyValuePair_1=e}function requireNegate(){if(hasRequiredNegate)return negate_1;hasRequiredNegate=1;return negate_1=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},negate_1}function requireArraySlice(){if(hasRequiredArraySlice)return ArraySlice_1;hasRequiredArraySlice=1;const e=requireNegate();function t(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}class r{constructor(e){this.elements=e||[]}toValue(){return this.elements.map((e=>e.toValue()))}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(e,n){return e=t(e),new r(this.elements.filter(e,n))}reject(n,s){return n=t(n),new r(this.elements.filter(e(n),s))}find(e,r){return e=t(e),this.elements.find(e,r)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some((t=>t.equals(e)))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}return"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),ArraySlice_1=r}function requireElement(){if(hasRequiredElement)return Element_1;hasRequiredElement=1;const e=requireIsEqual(),t=requireKeyValuePair(),r=requireArraySlice();class n{constructor(e,t,r){t&&(this.meta=t),r&&(this.attributes=r),this.content=e}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((e=>{e.parent=this,e.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map((e=>e.clone())):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof n?this.content.toValue():this.content instanceof t?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((e=>e.toValue()),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){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 n=e.pop();let s=new r;const i=(e,t)=>(e.push(t),e),o=(e,r)=>{r.element===n&&e.push(r);const s=r.findRecursive(n);return s&&s.reduce(i,e),r.content instanceof t&&(r.content.key&&o(e,r.content.key),r.content.value&&o(e,r.content.value)),e};return this.content&&(this.content.element&&o(s,this.content),Array.isArray(this.content)&&this.content.reduce(o,s)),e.isEmpty||(s=s.filter((t=>{let r=t.parents.map((e=>e.element));for(const t in e){const n=e[t],s=r.indexOf(n);if(-1===s)return!1;r=r.splice(0,s)}return!0}))),s}set(e){return this.content=e,this}equals(t){return e(this.toValue(),t)}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof n)this._content=e;else if(e instanceof r)this.content=e.elements;else if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"null"===e||null==e)this._content=e;else if(e instanceof t)this._content=e;else if(Array.isArray(e))this._content=e.map(this.refract);else{if("object"!=typeof e)throw new Error("Cannot set content to given value");this._content=Object.keys(e).map((t=>new this.MemberElement(t,e[t])))}}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof this.ObjectElement?this._meta=e:this.meta.set(e||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof this.ObjectElement?this._attributes=e:this.attributes.set(e||{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new r;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new r(this.content);if(this.content instanceof t){const e=new r([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof n?new r([this.content]):new r}get recursiveChildren(){const e=new r;return this.children.forEach((t=>{e.push(t),t.recursiveChildren.forEach((t=>{e.push(t)}))})),e}}return Element_1=n}function requireNullElement(){if(hasRequiredNullElement)return NullElement_1;hasRequiredNullElement=1;const e=requireElement();return NullElement_1=class extends e{constructor(e,t,r){super(e||null,t,r),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}}function requireStringElement(){if(hasRequiredStringElement)return StringElement_1;hasRequiredStringElement=1;const e=requireElement();return StringElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}}function requireNumberElement(){if(hasRequiredNumberElement)return NumberElement_1;hasRequiredNumberElement=1;const e=requireElement();return NumberElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="number"}primitive(){return"number"}}}function requireBooleanElement(){if(hasRequiredBooleanElement)return BooleanElement_1;hasRequiredBooleanElement=1;const e=requireElement();return BooleanElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="boolean"}primitive(){return"boolean"}}}function requireArrayElement(){if(hasRequiredArrayElement)return ArrayElement_1;hasRequiredArrayElement=1;const e=requireNegate(),t=requireElement(),r=requireArraySlice();class n extends t{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this.content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(e,t){return new r(this.content.filter(e,t))}reject(t,r){return this.filter(e(t),r)}reduce(e,t){let r,n;void 0!==t?(r=0,n=this.refract(t)):(r=1,n="object"===this.primitive()?this.first.value:this.first);for(let t=r;t<this.length;t+=1){const r=this.content[t];n="object"===this.primitive()?this.refract(e(n,r.value,r.key,r,this)):this.refract(e(n,r,t,this))}return n}forEach(e,t){this.content.forEach(((r,n)=>{e.bind(t)(r,this.refract(n))}))}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const r=t||{},n=!!r.recursive,s=void 0===r.results?[]:r.results;return this.forEach(((t,r,i)=>{n&&void 0!==t.findElements&&t.findElements(e,{results:s,recursive:n}),e(t,r,i)&&s.push(t)})),s}find(e){return new r(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find((t=>t.element===e))}findByClass(e){return this.find((t=>t.classes.includes(e)))}getById(e){return this.find((t=>t.id.toValue()===e)).first}includes(e){return this.content.some((t=>t.equals(e)))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map((t=>e(t)),this).reduce(((e,t)=>e.concat(t)),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}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,"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),ArrayElement_1=n}function requireMemberElement(){if(hasRequiredMemberElement)return MemberElement_1;hasRequiredMemberElement=1;const e=requireKeyValuePair(),t=requireElement();return MemberElement_1=class extends t{constructor(t,r,n,s){super(new e,n,s),this.element="member",this.key=t,this.value=r}get key(){return this.content.key}set key(e){this.content.key=this.refract(e)}get value(){return this.content.value}set value(e){this.content.value=this.refract(e)}}}function requireObjectSlice(){if(hasRequiredObjectSlice)return ObjectSlice_1;hasRequiredObjectSlice=1;const e=requireNegate(),t=requireArraySlice();class r extends t{map(e,t){return this.elements.map((r=>e.bind(t)(r.value,r.key,r)))}filter(e,t){return new r(this.elements.filter((r=>e.bind(t)(r.value,r.key,r))))}reject(t,r){return this.filter(e(t.bind(r)))}forEach(e,t){return this.elements.forEach(((r,n)=>{e.bind(t)(r.value,r.key,r,n)}))}keys(){return this.map(((e,t)=>t.toValue()))}values(){return this.map((e=>e.toValue()))}}return ObjectSlice_1=r}function requireObjectElement(){if(hasRequiredObjectElement)return ObjectElement_1;hasRequiredObjectElement=1;const e=requireNegate(),t=requireIsObject$1(),r=requireArrayElement(),n=requireMemberElement(),s=requireObjectSlice();return ObjectElement_1=class extends r{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e)),{})}get(e){const t=this.getMember(e);if(t)return t.value}getMember(e){if(void 0!==e)return this.content.find((t=>t.key.toValue()===e))}remove(e){let t=null;return this.content=this.content.filter((r=>r.key.toValue()!==e||(t=r,!1))),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,r){if(t(e))return Object.keys(e).forEach((t=>{this.set(t,e[t])})),this;const s=e,i=this.getMember(s);return i?i.value=r:this.content.push(new n(s,r)),this}keys(){return this.content.map((e=>e.key.toValue()))}values(){return this.content.map((e=>e.value.toValue()))}hasKey(e){return this.content.some((t=>t.key.equals(e)))}items(){return this.content.map((e=>[e.key.toValue(),e.value.toValue()]))}map(e,t){return this.content.map((r=>e.bind(t)(r.value,r.key,r)))}compactMap(e,t){const r=[];return this.forEach(((n,s,i)=>{const o=e.bind(t)(n,s,i);o&&r.push(o)})),r}filter(e,t){return new s(this.content).filter(e,t)}reject(t,r){return this.filter(e(t),r)}forEach(e,t){return this.content.forEach((r=>e.bind(t)(r.value,r.key,r)))}}}function requireLinkElement(){if(hasRequiredLinkElement)return LinkElement_1;hasRequiredLinkElement=1;const e=requireElement();return LinkElement_1=class extends e{constructor(e,t,r){super(e||[],t,r),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}}}function requireRefElement(){if(hasRequiredRefElement)return RefElement_1;hasRequiredRefElement=1;const e=requireElement();return RefElement_1=class extends e{constructor(e,t,r){super(e||[],t,r),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}}}function requireElements(){if(hasRequiredElements)return elements;hasRequiredElements=1;const e=requireElement(),t=requireNullElement(),r=requireStringElement(),n=requireNumberElement(),s=requireBooleanElement(),i=requireArrayElement(),o=requireMemberElement(),a=requireObjectElement(),u=requireLinkElement(),l=requireRefElement(),c=requireArraySlice(),d=requireObjectSlice(),p=requireKeyValuePair();function h(o){if(o instanceof e)return o;if("string"==typeof o)return new r(o);if("number"==typeof o)return new n(o);if("boolean"==typeof o)return new s(o);if(null===o)return new t;if(Array.isArray(o))return new i(o.map(h));if("object"==typeof o){return new a(o)}return o}return e.prototype.ObjectElement=a,e.prototype.RefElement=l,e.prototype.MemberElement=o,e.prototype.refract=h,c.prototype.refract=h,elements={Element:e,NullElement:t,StringElement:r,NumberElement:n,BooleanElement:s,ArrayElement:i,MemberElement:o,ObjectElement:a,LinkElement:u,RefElement:l,refract:h,ArraySlice:c,ObjectSlice:d,KeyValuePair:p}}function requireNamespace(){if(hasRequiredNamespace)return Namespace_1;hasRequiredNamespace=1;const e=requireIsNull(),t=requireIsString(),r=requireIsNumber(),n=requireIsBoolean(),s=requireIsObject$1(),i=requireJSONSerialiser(),o=requireElements();class a{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=o.Element,this.KeyValuePair=o.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.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(e,o.NullElement,!1).detect(t,o.StringElement,!1).detect(r,o.NumberElement,!1).detect(n,o.BooleanElement,!1).detect(Array.isArray,o.ArrayElement,!1).detect(s,o.ObjectElement,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,r){return void 0===r||r?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(let r=0;r<this.elementDetection.length;r+=1){const n=this.elementDetection[r][0],s=this.elementDetection[r][1];if(n(e)){t=new s(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]}))),this._elements}get serialiser(){return new i(this)}}return i.prototype.Namespace=a,Namespace_1=a}function requireJSON06Serialiser(){if(hasRequiredJSON06Serialiser)return JSON06Serialiser_1;hasRequiredJSON06Serialiser=1;const e=requireJSONSerialiser();return JSON06Serialiser_1=class extends e{serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);let t;e._attributes&&e.attributes.get("variable")&&(t=e.attributes.get("variable"));const r={element:e.element};e._meta&&e._meta.length>0&&(r.meta=this.serialiseObject(e.meta));const n="enum"===e.element||-1!==e.attributes.keys().indexOf("enumerations");if(n){const t=this.enumSerialiseAttributes(e);t&&(r.attributes=t)}else if(e._attributes&&e._attributes.length>0){let{attributes:n}=e;n.get("metadata")&&(n=n.clone(),n.set("meta",n.get("metadata")),n.remove("metadata")),"member"===e.element&&t&&(n=n.clone(),n.remove("variable")),n.length>0&&(r.attributes=this.serialiseObject(n))}if(n)r.content=this.enumSerialiseContent(e,r);else if(this[`${e.element}SerialiseContent`])r.content=this[`${e.element}SerialiseContent`](e,r);else if(void 0!==e.content){let n;t&&e.content.key?(n=e.content.clone(),n.key.attributes.set("variable",t),n=this.serialiseContent(n)):n=this.serialiseContent(e.content),this.shouldSerialiseContent(e,n)&&(r.content=n)}else this.shouldSerialiseContent(e,e.content)&&e instanceof this.namespace.elements.Array&&(r.content=[]);return r}shouldSerialiseContent(e,t){return"parseResult"===e.element||"httpRequest"===e.element||"httpResponse"===e.element||"category"===e.element||"link"===e.element||void 0!==t&&(!Array.isArray(t)||0!==t.length)}refSerialiseContent(e,t){return delete t.attributes,{href:e.toValue(),path:e.path.toValue()}}sourceMapSerialiseContent(e){return e.toValue()}dataStructureSerialiseContent(e){return[this.serialiseContent(e.content)]}enumSerialiseAttributes(e){const t=e.attributes.clone(),r=t.remove("enumerations")||new this.namespace.elements.Array([]),n=t.get("default");let s=t.get("samples")||new this.namespace.elements.Array([]);if(n&&n.content&&(n.content.attributes&&n.content.attributes.remove("typeAttributes"),t.set("default",new this.namespace.elements.Array([n.content]))),s.forEach((e=>{e.content&&e.content.element&&e.content.attributes.remove("typeAttributes")})),e.content&&0!==r.length&&s.unshift(e.content),s=s.map((e=>e instanceof this.namespace.elements.Array?[e]:new this.namespace.elements.Array([e.content]))),s.length&&t.set("samples",s),t.length>0)return this.serialiseObject(t)}enumSerialiseContent(e){if(e._attributes){const t=e.attributes.get("enumerations");if(t&&t.length>0)return t.content.map((e=>{const t=e.clone();return t.attributes.remove("typeAttributes"),this.serialise(t)}))}if(e.content){const t=e.content.clone();return t.attributes.remove("typeAttributes"),[this.serialise(t)]}return[]}deserialise(e){if("string"==typeof e)return new this.namespace.elements.String(e);if("number"==typeof e)return new this.namespace.elements.Number(e);if("boolean"==typeof e)return new this.namespace.elements.Boolean(e);if(null===e)return new this.namespace.elements.Null;if(Array.isArray(e))return new this.namespace.elements.Array(e.map(this.deserialise,this));const t=this.namespace.getElementClass(e.element),r=new t;r.element!==e.element&&(r.element=e.element),e.meta&&this.deserialiseObject(e.meta,r.meta),e.attributes&&this.deserialiseObject(e.attributes,r.attributes);const n=this.deserialiseContent(e.content);if(void 0===n&&null!==r.content||(r.content=n),"enum"===r.element){r.content&&r.attributes.set("enumerations",r.content);let e=r.attributes.get("samples");if(r.attributes.remove("samples"),e){const n=e;e=new this.namespace.elements.Array,n.forEach((n=>{n.forEach((n=>{const s=new t(n);s.element=r.element,e.push(s)}))}));const s=e.shift();r.content=s?s.content:void 0,r.attributes.set("samples",e)}else r.content=void 0;let n=r.attributes.get("default");if(n&&n.length>0){n=n.get(0);const e=new t(n);e.element=r.element,r.attributes.set("default",e)}}else if("dataStructure"===r.element&&Array.isArray(r.content))[r.content]=r.content;else if("category"===r.element){const e=r.attributes.get("meta");e&&(r.attributes.set("metadata",e),r.attributes.remove("meta"))}else"member"===r.element&&r.key&&r.key._attributes&&r.key._attributes.getValue("variable")&&(r.attributes.set("variable",r.key.attributes.get("variable")),r.key.attributes.remove("variable"));return r}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}return e&&e.map?e.map(this.serialise,this):e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}shouldRefract(e){return!!(e._attributes&&e.attributes.keys().length||e._meta&&e.meta.keys().length)||"enum"!==e.element&&(e.element!==e.primitive()||"member"===e.element)}convertKeyToRefract(e,t){return this.shouldRefract(t)?this.serialise(t):"enum"===t.element?this.serialiseEnum(t):"array"===t.element?t.map((t=>this.shouldRefract(t)||"default"===e?this.serialise(t):"array"===t.element||"object"===t.element||"enum"===t.element?t.children.map((e=>this.serialise(e))):t.toValue())):"object"===t.element?(t.content||[]).map(this.serialise,this):t.toValue()}serialiseEnum(e){return e.children.map((e=>this.serialise(e)))}serialiseObject(e){const t={};return e.forEach(((e,r)=>{if(e){const n=r.toValue();t[n]=this.convertKeyToRefract(n,e)}})),t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}}}function requireMinim(){if(hasRequiredMinim)return minim;hasRequiredMinim=1;const e=requireNamespace(),t=requireElements();return minim.Namespace=e,minim.namespace=function(t){return new e(t)},minim.KeyValuePair=requireKeyValuePair(),minim.ArraySlice=t.ArraySlice,minim.ObjectSlice=t.ObjectSlice,minim.Element=t.Element,minim.StringElement=t.StringElement,minim.NumberElement=t.NumberElement,minim.BooleanElement=t.BooleanElement,minim.NullElement=t.NullElement,minim.ArrayElement=t.ArrayElement,minim.ObjectElement=t.ObjectElement,minim.MemberElement=t.MemberElement,minim.RefElement=t.RefElement,minim.LinkElement=t.LinkElement,minim.refract=t.refract,minim.JSONSerialiser=requireJSONSerialiser(),minim.JSON06Serialiser=requireJSON06Serialiser(),minim}_nodeUtil.exports;var minimExports=requireMinim();class Annotation extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}class Comment extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="comment"}}let ParseResult$1=class extends minimExports.ArrayElement{constructor(e,t,r){super(e,t,r),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=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if(isUndefined(t))return!1;const r=this.content.findIndex((e=>e===t));return-1!==r&&(this.content[r]=e,!0)}};const hasMethod=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],hasBasicElementProps=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,primitiveEq=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&("function"==typeof t.primitive&&t.primitive()===e),hasClass=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof minimExports.ArrayElement)&&t.classes.includes(e),isElementType=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,createPredicate=e=>e({hasMethod:hasMethod,hasBasicElementProps:hasBasicElementProps,primitiveEq:primitiveEq,isElementType:isElementType,hasClass:hasClass}),isElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.Element||e(r)&&t(void 0,r))),isStringElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.StringElement||e(r)&&t("string",r))),isNumberElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.NumberElement||e(r)&&t("number",r))),isNullElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.NullElement||e(r)&&t("null",r))),isBooleanElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.BooleanElement||e(r)&&t("boolean",r))),isObjectElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof minimExports.ObjectElement||e(n)&&t("object",n)&&r("keys",n)&&r("values",n)&&r("items",n))),isArrayElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof minimExports.ArrayElement&&!(n instanceof minimExports.ObjectElement)||e(n)&&t("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n))),isMemberElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.MemberElement||e(n)&&t("member",n)&&r(void 0,n))),isLinkElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.LinkElement||e(n)&&t("link",n)&&r(void 0,n))),isRefElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.RefElement||e(n)&&t("ref",n)&&r(void 0,n))),isAnnotationElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Annotation||e(n)&&t("annotation",n)&&r("array",n))),isCommentElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Comment||e(n)&&t("comment",n)&&r("string",n))),isParseResultElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof ParseResult$1||e(n)&&t("parseResult",n)&&r("array",n))),isPrimitiveElement=e=>isElementType("object",e)||isElementType("array",e)||isElementType("boolean",e)||isElementType("number",e)||isElementType("string",e)||isElementType("null",e)||isElementType("member",e),hasElementSourceMap=e=>!!isElement(e)&&(Number.isInteger(e.startPositionRow)&&Number.isInteger(e.startPositionColumn)&&Number.isInteger(e.startIndex)&&Number.isInteger(e.endPositionRow)&&Number.isInteger(e.endPositionColumn)&&Number.isInteger(e.endIndex)),includesSymbols=(e,t)=>{if(0===e.length)return!0;const r=t.attributes.get("symbols");return!!isArrayElement(r)&&all(included(r.toValue()),e)},includesClasses=(e,t)=>0===e.length||all(included(t.classes.toValue()),e),basePredicates=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:hasElementSourceMap,includesClasses:includesClasses,includesSymbols:includesSymbols,isAnnotationElement:isAnnotationElement,isArrayElement:isArrayElement,isBooleanElement:isBooleanElement,isCommentElement:isCommentElement,isElement:isElement,isLinkElement:isLinkElement,isMemberElement:isMemberElement,isNullElement:isNullElement,isNumberElement:isNumberElement,isObjectElement:isObjectElement,isParseResultElement:isParseResultElement,isPrimitiveElement:isPrimitiveElement,isRefElement:isRefElement,isStringElement:isStringElement},Symbol.toStringTag,{value:"Module"}));class Namespace extends minimExports.Namespace{constructor(){super(),this.register("annotation",Annotation),this.register("comment",Comment),this.register("parseResult",ParseResult$1)}}const namespace$1=new Namespace,createNamespace=e=>{const t=new Namespace;return isPlainObj(e)&&t.use(e),t},createToolbox$1=()=>({predicates:{...basePredicates},namespace:namespace$1});class Node{static type="node";type="node";isMissing;children;startPositionRow;startPositionColumn;startIndex;endPositionRow;endPositionColumn;endIndex;constructor({children:e=[],isMissing:t=!1,startPositionRow:r,startPositionColumn:n,startIndex:s,endPositionRow:i,endPositionColumn:o,endIndex:a}={}){this.type=this.constructor.type,this.isMissing=t,this.children=e,this.startPositionRow=r,this.startPositionColumn=n,this.startIndex=s,this.endPositionRow=i,this.endPositionColumn=o,this.endIndex=a}clone(){const e=Object.create(Object.getPrototypeOf(this));return Object.getOwnPropertyNames(this).forEach((t=>{const r=Object.getOwnPropertyDescriptor(this,t);Object.defineProperty(e,t,r)})),e}}const isNodeType=(e,t)=>null!=t&&"object"==typeof t&&"type"in t&&t.type===e;class YamlAlias extends Node{static type="alias";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlNode extends Node{anchor;tag;style;styleGroup;constructor({anchor:e,tag:t,style:r,styleGroup:n,...s}){super({...s}),this.anchor=e,this.tag=t,this.style=r,this.styleGroup=n}}class YamlCollection extends YamlNode{}class YamlComment extends Node{static type="comment";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlDirective extends Node{static type="directive";name;parameters;constructor({name:e,parameters:t,...r}){super({...r}),this.name=e,this.parameters=mergeRight({version:void 0,handle:void 0,prefix:void 0},t)}}class YamlDocument extends Node{static type="document"}const isDocument=e=>isNodeType("document",e),isMapping=e=>isNodeType("mapping",e),isSequence=e=>isNodeType("sequence",e),isKeyValuePair=e=>isNodeType("keyValuePair",e),isAnchor=e=>isNodeType("anchor",e),isScalar=e=>isNodeType("scalar",e),isAlias=e=>isNodeType("alias",e),isComment=e=>isNodeType("comment",e);class YamlKeyValuePair extends Node{static type="keyValuePair";styleGroup;constructor({styleGroup:e,...t}){super({...t}),this.styleGroup=e}}Object.defineProperties(YamlKeyValuePair.prototype,{key:{get(){return this.children.filter((e=>isScalar(e)||isMapping(e)||isSequence(e)))[0]},enumerable:!0},value:{get(){const{key:e,children:t}=this;return t.filter((t=>(t=>t!==e)(t)&&(e=>isScalar(e)||isMapping(e)||isSequence(e)||isAlias(e))(t)))[0]},enumerable:!0}});class YamlMapping extends YamlCollection{static type="mapping"}Object.defineProperty(YamlMapping.prototype,"content",{get(){return Array.isArray(this.children)?this.children.filter(isKeyValuePair):[]},enumerable:!0});class YamlScalar extends YamlNode{static type="scalar";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlSequence extends YamlCollection{static type="sequence"}Object.defineProperty(YamlSequence.prototype,"content",{get(){const{children:e}=this;return Array.isArray(e)?e.filter((e=>isSequence(e)||isMapping(e)||isScalar(e)||isAlias(e))):[]},enumerable:!0});class YamlStream extends Node{static type="stream"}Object.defineProperty(YamlStream.prototype,"content",{get(){return Array.isArray(this.children)?this.children.filter((e=>isDocument(e)||isComment(e))):[]},enumerable:!0});let YamlNodeKind=function(e){return e.Scalar="Scalar",e.Sequence="Sequence",e.Mapping="Mapping",e}({});class YamlTag extends Node{static type="tag";explicitName;kind;constructor({explicitName:e,kind:t,...r}){super({...r}),this.explicitName=e,this.kind=t}}class YamlAnchor extends Node{static type="anchor";name;constructor({name:e,...t}){super({...t}),this.name=e}}let YamlStyle=function(e){return e.Plain="Plain",e.SingleQuoted="SingleQuoted",e.DoubleQuoted="DoubleQuoted",e.Literal="Literal",e.Folded="Folded",e.Explicit="Explicit",e.SinglePair="SinglePair",e.NextLine="NextLine",e.InLine="InLine",e}({}),YamlStyleGroup=function(e){return e.Flow="Flow",e.Block="Block",e}({});var esnext_aggregateError={},es_aggregateError={},es_aggregateError_constructor={},globalThis_1,hasRequiredGlobalThis,fails,hasRequiredFails,functionBindNative,hasRequiredFunctionBindNative,functionApply,hasRequiredFunctionApply,functionUncurryThis,hasRequiredFunctionUncurryThis,classofRaw,hasRequiredClassofRaw,functionUncurryThisClause,hasRequiredFunctionUncurryThisClause,isCallable,hasRequiredIsCallable;function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var e=function(e){return e&&e.Math===Math&&e};return globalThis_1=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof commonjsGlobal&&commonjsGlobal)||e("object"==typeof globalThis_1&&globalThis_1)||function(){return this}()||Function("return this")()}function requireFails(){return hasRequiredFails?fails:(hasRequiredFails=1,fails=function(e){try{return!!e()}catch(e){return!0}})}function requireFunctionBindNative(){return hasRequiredFunctionBindNative?functionBindNative:(hasRequiredFunctionBindNative=1,functionBindNative=!requireFails()((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})))}function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var e=requireFunctionBindNative(),t=Function.prototype,r=t.apply,n=t.call;return functionApply="object"==typeof Reflect&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),functionApply}function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var e=requireFunctionBindNative(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return functionUncurryThis=e?n:function(e){return function(){return r.apply(e,arguments)}},functionUncurryThis}function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var e=requireFunctionUncurryThis(),t=e({}.toString),r=e("".slice);return classofRaw=function(e){return r(t(e),8,-1)}}function requireFunctionUncurryThisClause(){if(hasRequiredFunctionUncurryThisClause)return functionUncurryThisClause;hasRequiredFunctionUncurryThisClause=1;var e=requireClassofRaw(),t=requireFunctionUncurryThis();return functionUncurryThisClause=function(r){if("Function"===e(r))return t(r)}}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var e="object"==typeof document&&document.all;return isCallable=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var objectGetOwnPropertyDescriptor={},descriptors,hasRequiredDescriptors,functionCall,hasRequiredFunctionCall;function requireDescriptors(){return hasRequiredDescriptors?descriptors:(hasRequiredDescriptors=1,descriptors=!requireFails()((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})))}function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var e=requireFunctionBindNative(),t=Function.prototype.call;return functionCall=e?t.bind(t):function(){return t.apply(t,arguments)},functionCall}var objectPropertyIsEnumerable={},hasRequiredObjectPropertyIsEnumerable,createPropertyDescriptor,hasRequiredCreatePropertyDescriptor,indexedObject,hasRequiredIndexedObject,isNullOrUndefined,hasRequiredIsNullOrUndefined,requireObjectCoercible,hasRequiredRequireObjectCoercible,toIndexedObject,hasRequiredToIndexedObject,isObject,hasRequiredIsObject,path,hasRequiredPath,getBuiltIn,hasRequiredGetBuiltIn,objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf,environmentUserAgent,hasRequiredEnvironmentUserAgent,environmentV8Version,hasRequiredEnvironmentV8Version,symbolConstructorDetection,hasRequiredSymbolConstructorDetection,useSymbolAsUid,hasRequiredUseSymbolAsUid,isSymbol,hasRequiredIsSymbol,tryToString,hasRequiredTryToString,aCallable,hasRequiredACallable,getMethod,hasRequiredGetMethod,ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive;function requireObjectPropertyIsEnumerable(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return objectPropertyIsEnumerable.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,objectPropertyIsEnumerable}function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor?createPropertyDescriptor:(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function requireIndexedObject(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var e=requireFunctionUncurryThis(),t=requireFails(),r=requireClassofRaw(),n=Object,s=e("".split);return indexedObject=t((function(){return!n("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?s(e,""):n(e)}:n}function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined?isNullOrUndefined:(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(e){return null==e})}function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var e=requireIsNullOrUndefined(),t=TypeError;return requireObjectCoercible=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var e=requireIndexedObject(),t=requireRequireObjectCoercible();return toIndexedObject=function(r){return e(t(r))}}function requireIsObject(){if(hasRequiredIsObject)return isObject;hasRequiredIsObject=1;var e=requireIsCallable();return isObject=function(t){return"object"==typeof t?null!==t:e(t)}}function requirePath(){return hasRequiredPath?path:(hasRequiredPath=1,path={})}function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var e=requirePath(),t=requireGlobalThis(),r=requireIsCallable(),n=function(e){return r(e)?e:void 0};return getBuiltIn=function(r,s){return arguments.length<2?n(e[r])||n(t[r]):e[r]&&e[r][s]||t[r]&&t[r][s]},getBuiltIn}function requireObjectIsPrototypeOf(){return hasRequiredObjectIsPrototypeOf?objectIsPrototypeOf:(hasRequiredObjectIsPrototypeOf=1,objectIsPrototypeOf=requireFunctionUncurryThis()({}.isPrototypeOf))}function requireEnvironmentUserAgent(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var e=requireGlobalThis().navigator,t=e&&e.userAgent;return environmentUserAgent=t?String(t):""}function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var e,t,r=requireGlobalThis(),n=requireEnvironmentUserAgent(),s=r.process,i=r.Deno,o=s&&s.versions||i&&i.version,a=o&&o.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),environmentV8Version=t}function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var e=requireEnvironmentV8Version(),t=requireFails(),r=requireGlobalThis().String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function requireUseSymbolAsUid(){return hasRequiredUseSymbolAsUid?useSymbolAsUid:(hasRequiredUseSymbolAsUid=1,useSymbolAsUid=requireSymbolConstructorDetection()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var e=requireGetBuiltIn(),t=requireIsCallable(),r=requireObjectIsPrototypeOf(),n=Object;return isSymbol=requireUseSymbolAsUid()?function(e){return"symbol"==typeof e}:function(s){var i=e("Symbol");return t(i)&&r(i.prototype,n(s))}}function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var e=String;return tryToString=function(t){try{return e(t)}catch(e){return"Object"}}}function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var e=requireIsCallable(),t=requireTryToString(),r=TypeError;return aCallable=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var e=requireACallable(),t=requireIsNullOrUndefined();return getMethod=function(r,n){var s=r[n];return t(s)?void 0:e(s)}}function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var e=requireFunctionCall(),t=requireIsCallable(),r=requireIsObject(),n=TypeError;return ordinaryToPrimitive=function(s,i){var o,a;if("string"===i&&t(o=s.toString)&&!r(a=e(o,s)))return a;if(t(o=s.valueOf)&&!r(a=e(o,s)))return a;if("string"!==i&&t(o=s.toString)&&!r(a=e(o,s)))return a;throw new n("Can't convert object to primitive value")}}var sharedStore={exports:{}},isPure,hasRequiredIsPure,defineGlobalProperty,hasRequiredDefineGlobalProperty,hasRequiredSharedStore,shared,hasRequiredShared,toObject,hasRequiredToObject,hasOwnProperty_1,hasRequiredHasOwnProperty,uid,hasRequiredUid,wellKnownSymbol,hasRequiredWellKnownSymbol,toPrimitive,hasRequiredToPrimitive,toPropertyKey,hasRequiredToPropertyKey,documentCreateElement,hasRequiredDocumentCreateElement,ie8DomDefine,hasRequiredIe8DomDefine,hasRequiredObjectGetOwnPropertyDescriptor,isForced_1,hasRequiredIsForced,functionBindContext,hasRequiredFunctionBindContext;function requireIsPure(){return hasRequiredIsPure?isPure:(hasRequiredIsPure=1,isPure=!0)}function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var e=requireGlobalThis(),t=Object.defineProperty;return defineGlobalProperty=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var e=requireIsPure(),t=requireGlobalThis(),r=requireDefineGlobalProperty(),n="__core-js_shared__",s=sharedStore.exports=t[n]||r(n,{});return(s.versions||(s.versions=[])).push({version:"3.42.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var e=requireSharedStore();return shared=function(t,r){return e[t]||(e[t]=r||{})}}function requireToObject(){if(hasRequiredToObject)return toObject;hasRequiredToObject=1;var e=requireRequireObjectCoercible(),t=Object;return toObject=function(r){return t(e(r))}}function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var e=requireFunctionUncurryThis(),t=requireToObject(),r=e({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(e,n){return r(t(e),n)}}function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var e=requireFunctionUncurryThis(),t=0,r=Math.random(),n=e(1..toString);return uid=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var e=requireGlobalThis(),t=requireShared(),r=requireHasOwnProperty(),n=requireUid(),s=requireSymbolConstructorDetection(),i=requireUseSymbolAsUid(),o=e.Symbol,a=t("wks"),u=i?o.for||o:o&&o.withoutSetter||n;return wellKnownSymbol=function(e){return r(a,e)||(a[e]=s&&r(o,e)?o[e]:u("Symbol."+e)),a[e]}}function requireToPrimitive(){if(hasRequiredToPrimitive)return toPrimitive;hasRequiredToPrimitive=1;var e=requireFunctionCall(),t=requireIsObject(),r=requireIsSymbol(),n=requireGetMethod(),s=requireOrdinaryToPrimitive(),i=TypeError,o=requireWellKnownSymbol()("toPrimitive");return toPrimitive=function(a,u){if(!t(a)||r(a))return a;var l,c=n(a,o);if(c){if(void 0===u&&(u="default"),l=e(c,a,u),!t(l)||r(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),s(a,u)}}function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey;hasRequiredToPropertyKey=1;var e=requireToPrimitive(),t=requireIsSymbol();return toPropertyKey=function(r){var n=e(r,"string");return t(n)?n:n+""}}function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var e=requireGlobalThis(),t=requireIsObject(),r=e.document,n=t(r)&&t(r.createElement);return documentCreateElement=function(e){return n?r.createElement(e):{}}}function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var e=requireDescriptors(),t=requireFails(),r=requireDocumentCreateElement();return ie8DomDefine=!e&&!t((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))}function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var e=requireDescriptors(),t=requireFunctionCall(),r=requireObjectPropertyIsEnumerable(),n=requireCreatePropertyDescriptor(),s=requireToIndexedObject(),i=requireToPropertyKey(),o=requireHasOwnProperty(),a=requireIe8DomDefine(),u=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=e?u:function(e,l){if(e=s(e),l=i(l),a)try{return u(e,l)}catch(e){}if(o(e,l))return n(!t(r.f,e,l),e[l])},objectGetOwnPropertyDescriptor}function requireIsForced(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var e=requireFails(),t=requireIsCallable(),r=/#|\.prototype\./,n=function(r,n){var u=i[s(r)];return u===a||u!==o&&(t(n)?e(n):!!n)},s=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",a=n.POLYFILL="P";return isForced_1=n}function requireFunctionBindContext(){if(hasRequiredFunctionBindContext)return functionBindContext;hasRequiredFunctionBindContext=1;var e=requireFunctionUncurryThisClause(),t=requireACallable(),r=requireFunctionBindNative(),n=e(e.bind);return functionBindContext=function(e,s){return t(e),void 0===s?e:r?n(e,s):function(){return e.apply(s,arguments)}},functionBindContext}var objectDefineProperty={},v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug,anObject,hasRequiredAnObject,hasRequiredObjectDefineProperty,createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty,_export,hasRequired_export,sharedKey,hasRequiredSharedKey,correctPrototypeGetter,hasRequiredCorrectPrototypeGetter,objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf,functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor,isPossiblePrototype,hasRequiredIsPossiblePrototype,aPossiblePrototype,hasRequiredAPossiblePrototype,objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf;function requireV8PrototypeDefineBug(){return hasRequiredV8PrototypeDefineBug?v8PrototypeDefineBug:(hasRequiredV8PrototypeDefineBug=1,v8PrototypeDefineBug=requireDescriptors()&&requireFails()((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})))}function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var e=requireIsObject(),t=String,r=TypeError;return anObject=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var e=requireDescriptors(),t=requireIe8DomDefine(),r=requireV8PrototypeDefineBug(),n=requireAnObject(),s=requireToPropertyKey(),i=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return objectDefineProperty.f=e?r?function(e,t,r){if(n(e),t=s(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=a(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return o(e,t,r)}:o:function(e,r,a){if(n(e),r=s(r),n(a),t)try{return o(e,r,a)}catch(e){}if("get"in a||"set"in a)throw new i("Accessors not supported");return"value"in a&&(e[r]=a.value),e},objectDefineProperty}function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var e=requireDescriptors(),t=requireObjectDefineProperty(),r=requireCreatePropertyDescriptor();return createNonEnumerableProperty=e?function(e,n,s){return t.f(e,n,r(1,s))}:function(e,t,r){return e[t]=r,e}}function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var e=requireGlobalThis(),t=requireFunctionApply(),r=requireFunctionUncurryThisClause(),n=requireIsCallable(),s=requireObjectGetOwnPropertyDescriptor().f,i=requireIsForced(),o=requirePath(),a=requireFunctionBindContext(),u=requireCreateNonEnumerableProperty(),l=requireHasOwnProperty(),c=function(e){var r=function(n,s,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,s)}return new e(n,s,i)}return t(e,this,arguments)};return r.prototype=e.prototype,r};return _export=function(t,d){var p,h,m,_,f,g,y,b,E,w=t.target,q=t.global,S=t.stat,v=t.proto,R=q?e:S?e[w]:e[w]&&e[w].prototype,O=q?o:o[w]||u(o,w,{})[w],I=O.prototype;for(_ in d)h=!(p=i(q?_:w+(S?".":"#")+_,t.forced))&&R&&l(R,_),g=O[_],h&&(y=t.dontCallGetSet?(E=s(R,_))&&E.value:R[_]),f=h&&y?y:d[_],(p||v||typeof g!=typeof f)&&(b=t.bind&&h?a(f,e):t.wrap&&h?c(f):v&&n(f)?r(f):f,(t.sham||f&&f.sham||g&&g.sham)&&u(b,"sham",!0),u(O,_,b),v&&(l(o,m=w+"Prototype")||u(o,m,{}),u(o[m],_,f),t.real&&I&&(p||!I[_])&&u(I,_,f)))}}function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var e=requireShared(),t=requireUid(),r=e("keys");return sharedKey=function(e){return r[e]||(r[e]=t(e))}}function requireCorrectPrototypeGetter(){return hasRequiredCorrectPrototypeGetter||(hasRequiredCorrectPrototypeGetter=1,correctPrototypeGetter=!requireFails()((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))),correctPrototypeGetter}function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var e=requireHasOwnProperty(),t=requireIsCallable(),r=requireToObject(),n=requireSharedKey(),s=requireCorrectPrototypeGetter(),i=n("IE_PROTO"),o=Object,a=o.prototype;return objectGetPrototypeOf=s?o.getPrototypeOf:function(n){var s=r(n);if(e(s,i))return s[i];var u=s.constructor;return t(u)&&s instanceof u?u.prototype:s instanceof o?a:null}}function requireFunctionUncurryThisAccessor(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var e=requireFunctionUncurryThis(),t=requireACallable();return functionUncurryThisAccessor=function(r,n,s){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[s]))}catch(e){}}}function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var e=requireIsObject();return isPossiblePrototype=function(t){return e(t)||null===t}}function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var e=requireIsPossiblePrototype(),t=String,r=TypeError;return aPossiblePrototype=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var e=requireFunctionUncurryThisAccessor(),t=requireIsObject(),r=requireRequireObjectCoercible(),n=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var s,i=!1,o={};try{(s=e(Object.prototype,"__proto__","set"))(o,[]),i=o instanceof Array}catch(e){}return function(e,o){return r(e),n(o),t(e)?(i?s(e,o):e.__proto__=o,e):e}}():void 0)}var objectGetOwnPropertyNames={},mathTrunc,hasRequiredMathTrunc,toIntegerOrInfinity,hasRequiredToIntegerOrInfinity,toAbsoluteIndex,hasRequiredToAbsoluteIndex,toLength,hasRequiredToLength,lengthOfArrayLike,hasRequiredLengthOfArrayLike,arrayIncludes,hasRequiredArrayIncludes,hiddenKeys,hasRequiredHiddenKeys,objectKeysInternal,hasRequiredObjectKeysInternal,enumBugKeys,hasRequiredEnumBugKeys,hasRequiredObjectGetOwnPropertyNames;function requireMathTrunc(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var e=Math.ceil,t=Math.floor;return mathTrunc=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)}}function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var e=requireMathTrunc();return toIntegerOrInfinity=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var e=requireToIntegerOrInfinity(),t=Math.max,r=Math.min;return toAbsoluteIndex=function(n,s){var i=e(n);return i<0?t(i+s,0):r(i,s)}}function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var e=requireToIntegerOrInfinity(),t=Math.min;return toLength=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var e=requireToLength();return lengthOfArrayLike=function(t){return e(t.length)}}function requireArrayIncludes(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var e=requireToIndexedObject(),t=requireToAbsoluteIndex(),r=requireLengthOfArrayLike(),n=function(n){return function(s,i,o){var a=e(s),u=r(a);if(0===u)return!n&&-1;var l,c=t(o,u);if(n&&i!=i){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((n||c in a)&&a[c]===i)return n||c||0;return!n&&-1}};return arrayIncludes={includes:n(!0),indexOf:n(!1)}}function requireHiddenKeys(){return hasRequiredHiddenKeys?hiddenKeys:(hasRequiredHiddenKeys=1,hiddenKeys={})}function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var e=requireFunctionUncurryThis(),t=requireHasOwnProperty(),r=requireToIndexedObject(),n=requireArrayIncludes().indexOf,s=requireHiddenKeys(),i=e([].push);return objectKeysInternal=function(e,o){var a,u=r(e),l=0,c=[];for(a in u)!t(s,a)&&t(u,a)&&i(c,a);for(;o.length>l;)t(u,a=o[l++])&&(~n(c,a)||i(c,a));return c}}function requireEnumBugKeys(){return hasRequiredEnumBugKeys?enumBugKeys:(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function requireObjectGetOwnPropertyNames(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var e=requireObjectKeysInternal(),t=requireEnumBugKeys().concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(r){return e(r,t)},objectGetOwnPropertyNames}var objectGetOwnPropertySymbols={},hasRequiredObjectGetOwnPropertySymbols,ownKeys,hasRequiredOwnKeys,copyConstructorProperties,hasRequiredCopyConstructorProperties;function requireObjectGetOwnPropertySymbols(){return hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols}function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys;hasRequiredOwnKeys=1;var e=requireGetBuiltIn(),t=requireFunctionUncurryThis(),r=requireObjectGetOwnPropertyNames(),n=requireObjectGetOwnPropertySymbols(),s=requireAnObject(),i=t([].concat);return ownKeys=e("Reflect","ownKeys")||function(e){var t=r.f(s(e)),o=n.f;return o?i(t,o(e)):t},ownKeys}function requireCopyConstructorProperties(){if(hasRequiredCopyConstructorProperties)return copyConstructorProperties;hasRequiredCopyConstructorProperties=1;var e=requireHasOwnProperty(),t=requireOwnKeys(),r=requireObjectGetOwnPropertyDescriptor(),n=requireObjectDefineProperty();return copyConstructorProperties=function(s,i,o){for(var a=t(i),u=n.f,l=r.f,c=0;c<a.length;c++){var d=a[c];e(s,d)||o&&e(o,d)||u(s,d,l(i,d))}},copyConstructorProperties}var objectDefineProperties={},objectKeys,hasRequiredObjectKeys,hasRequiredObjectDefineProperties,html,hasRequiredHtml,objectCreate,hasRequiredObjectCreate,installErrorCause,hasRequiredInstallErrorCause,errorStackClear,hasRequiredErrorStackClear,errorStackInstallable,hasRequiredErrorStackInstallable,errorStackInstall,hasRequiredErrorStackInstall,iterators,hasRequiredIterators,isArrayIteratorMethod,hasRequiredIsArrayIteratorMethod,toStringTagSupport,hasRequiredToStringTagSupport,classof,hasRequiredClassof,getIteratorMethod,hasRequiredGetIteratorMethod,getIterator,hasRequiredGetIterator,iteratorClose,hasRequiredIteratorClose,iterate,hasRequiredIterate,toString,hasRequiredToString,normalizeStringArgument,hasRequiredNormalizeStringArgument,hasRequiredEs_aggregateError_constructor,hasRequiredEs_aggregateError,hasRequiredEsnext_aggregateError;function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var e=requireObjectKeysInternal(),t=requireEnumBugKeys();return objectKeys=Object.keys||function(r){return e(r,t)}}function requireObjectDefineProperties(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var e=requireDescriptors(),t=requireV8PrototypeDefineBug(),r=requireObjectDefineProperty(),n=requireAnObject(),s=requireToIndexedObject(),i=requireObjectKeys();return objectDefineProperties.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var o,a=s(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,o=u[c++],a[o]);return e},objectDefineProperties}function requireHtml(){return hasRequiredHtml?html:(hasRequiredHtml=1,html=requireGetBuiltIn()("document","documentElement"))}function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var e,t=requireAnObject(),r=requireObjectDefineProperties(),n=requireEnumBugKeys(),s=requireHiddenKeys(),i=requireHtml(),o=requireDocumentCreateElement(),a="prototype",u="script",l=requireSharedKey()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},p=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,s;h="undefined"!=typeof document?document.domain&&e?p(e):(r=o("iframe"),s="java"+u+":",r.style.display="none",i.appendChild(r),r.src=String(s),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):p(e);for(var l=n.length;l--;)delete h[a][n[l]];return h()};return s[l]=!0,objectCreate=Object.create||function(e,n){var s;return null!==e?(c[a]=t(e),s=new c,c[a]=null,s[l]=e):s=h(),void 0===n?s:r.f(s,n)}}function requireInstallErrorCause(){if(hasRequiredInstallErrorCause)return installErrorCause;hasRequiredInstallErrorCause=1;var e=requireIsObject(),t=requireCreateNonEnumerableProperty();return installErrorCause=function(r,n){e(n)&&"cause"in n&&t(r,"cause",n.cause)}}function requireErrorStackClear(){if(hasRequiredErrorStackClear)return errorStackClear;hasRequiredErrorStackClear=1;var e=Error,t=requireFunctionUncurryThis()("".replace),r=String(new e("zxcasd").stack),n=/\n\s*at [^:]*:[^\n]*/,s=n.test(r);return errorStackClear=function(r,i){if(s&&"string"==typeof r&&!e.prepareStackTrace)for(;i--;)r=t(r,n,"");return r}}function requireErrorStackInstallable(){if(hasRequiredErrorStackInstallable)return errorStackInstallable;hasRequiredErrorStackInstallable=1;var e=requireFails(),t=requireCreatePropertyDescriptor();return errorStackInstallable=!e((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)}))}function requireErrorStackInstall(){if(hasRequiredErrorStackInstall)return errorStackInstall;hasRequiredErrorStackInstall=1;var e=requireCreateNonEnumerableProperty(),t=requireErrorStackClear(),r=requireErrorStackInstallable(),n=Error.captureStackTrace;return errorStackInstall=function(s,i,o,a){r&&(n?n(s,i):e(s,"stack",t(o,a)))}}function requireIterators(){return hasRequiredIterators?iterators:(hasRequiredIterators=1,iterators={})}function requireIsArrayIteratorMethod(){if(hasRequiredIsArrayIteratorMethod)return isArrayIteratorMethod;hasRequiredIsArrayIteratorMethod=1;var e=requireWellKnownSymbol(),t=requireIterators(),r=e("iterator"),n=Array.prototype;return isArrayIteratorMethod=function(e){return void 0!==e&&(t.Array===e||n[r]===e)}}function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var e={};return e[requireWellKnownSymbol()("toStringTag")]="z",toStringTagSupport="[object z]"===String(e)}function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var e=requireToStringTagSupport(),t=requireIsCallable(),r=requireClassofRaw(),n=requireWellKnownSymbol()("toStringTag"),s=Object,i="Arguments"===r(function(){return arguments}());return classof=e?r:function(e){var o,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(o=s(e),n))?a:i?r(o):"Object"===(u=r(o))&&t(o.callee)?"Arguments":u}}function requireGetIteratorMethod(){if(hasRequiredGetIteratorMethod)return getIteratorMethod;hasRequiredGetIteratorMethod=1;var e=requireClassof(),t=requireGetMethod(),r=requireIsNullOrUndefined(),n=requireIterators(),s=requireWellKnownSymbol()("iterator");return getIteratorMethod=function(i){if(!r(i))return t(i,s)||t(i,"@@iterator")||n[e(i)]}}function requireGetIterator(){if(hasRequiredGetIterator)return getIterator;hasRequiredGetIterator=1;var e=requireFunctionCall(),t=requireACallable(),r=requireAnObject(),n=requireTryToString(),s=requireGetIteratorMethod(),i=TypeError;return getIterator=function(o,a){var u=arguments.length<2?s(o):a;if(t(u))return r(e(u,o));throw new i(n(o)+" is not iterable")},getIterator}function requireIteratorClose(){if(hasRequiredIteratorClose)return iteratorClose;hasRequiredIteratorClose=1;var e=requireFunctionCall(),t=requireAnObject(),r=requireGetMethod();return iteratorClose=function(n,s,i){var o,a;t(n);try{if(!(o=r(n,"return"))){if("throw"===s)throw i;return i}o=e(o,n)}catch(e){a=!0,o=e}if("throw"===s)throw i;if(a)throw o;return t(o),i}}function requireIterate(){if(hasRequiredIterate)return iterate;hasRequiredIterate=1;var e=requireFunctionBindContext(),t=requireFunctionCall(),r=requireAnObject(),n=requireTryToString(),s=requireIsArrayIteratorMethod(),i=requireLengthOfArrayLike(),o=requireObjectIsPrototypeOf(),a=requireGetIterator(),u=requireGetIteratorMethod(),l=requireIteratorClose(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},p=d.prototype;return iterate=function(h,m,_){var f,g,y,b,E,w,q,S=_&&_.that,v=!(!_||!_.AS_ENTRIES),R=!(!_||!_.IS_RECORD),O=!(!_||!_.IS_ITERATOR),I=!(!_||!_.INTERRUPTED),P=e(m,S),A=function(e){return f&&l(f,"normal",e),new d(!0,e)},T=function(e){return v?(r(e),I?P(e[0],e[1],A):P(e[0],e[1])):I?P(e,A):P(e)};if(R)f=h.iterator;else if(O)f=h;else{if(!(g=u(h)))throw new c(n(h)+" is not iterable");if(s(g)){for(y=0,b=i(h);b>y;y++)if((E=T(h[y]))&&o(p,E))return E;return new d(!1)}f=a(h,g)}for(w=R?h.next:f.next;!(q=t(w,f)).done;){try{E=T(q.value)}catch(e){l(f,"throw",e)}if("object"==typeof E&&E&&o(p,E))return E}return new d(!1)}}function requireToString(){if(hasRequiredToString)return toString;hasRequiredToString=1;var e=requireClassof(),t=String;return toString=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function requireNormalizeStringArgument(){if(hasRequiredNormalizeStringArgument)return normalizeStringArgument;hasRequiredNormalizeStringArgument=1;var e=requireToString();return normalizeStringArgument=function(t,r){return void 0===t?arguments.length<2?"":r:e(t)},normalizeStringArgument}function requireEs_aggregateError_constructor(){if(hasRequiredEs_aggregateError_constructor)return es_aggregateError_constructor;hasRequiredEs_aggregateError_constructor=1;var e=require_export(),t=requireObjectIsPrototypeOf(),r=requireObjectGetPrototypeOf(),n=requireObjectSetPrototypeOf(),s=requireCopyConstructorProperties(),i=requireObjectCreate(),o=requireCreateNonEnumerableProperty(),a=requireCreatePropertyDescriptor(),u=requireInstallErrorCause(),l=requireErrorStackInstall(),c=requireIterate(),d=requireNormalizeStringArgument(),p=requireWellKnownSymbol()("toStringTag"),h=Error,m=[].push,_=function(e,s){var a,g=t(f,this);n?a=n(new h,g?r(this):f):(a=g?this:i(f),o(a,p,"Error")),void 0!==s&&o(a,"message",d(s)),l(a,_,a.stack,1),arguments.length>2&&u(a,arguments[2]);var y=[];return c(e,m,{that:y}),o(a,"errors",y),a};n?n(_,h):s(_,h,{name:!0});var f=_.prototype=i(h.prototype,{constructor:a(1,_),message:a(1,""),name:a(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:_}),es_aggregateError_constructor}function requireEs_aggregateError(){return hasRequiredEs_aggregateError||(hasRequiredEs_aggregateError=1,requireEs_aggregateError_constructor()),es_aggregateError}function requireEsnext_aggregateError(){return hasRequiredEsnext_aggregateError||(hasRequiredEsnext_aggregateError=1,requireEs_aggregateError()),esnext_aggregateError}var es_error_cause={},proxyAccessor,hasRequiredProxyAccessor,inheritIfRequired,hasRequiredInheritIfRequired,wrapErrorConstructorWithCause,hasRequiredWrapErrorConstructorWithCause,hasRequiredEs_error_cause;function requireProxyAccessor(){if(hasRequiredProxyAccessor)return proxyAccessor;hasRequiredProxyAccessor=1;var e=requireObjectDefineProperty().f;return proxyAccessor=function(t,r,n){n in t||e(t,n,{configurable:!0,get:function(){return r[n]},set:function(e){r[n]=e}})}}function requireInheritIfRequired(){if(hasRequiredInheritIfRequired)return inheritIfRequired;hasRequiredInheritIfRequired=1;var e=requireIsCallable(),t=requireIsObject(),r=requireObjectSetPrototypeOf();return inheritIfRequired=function(n,s,i){var o,a;return r&&e(o=s.constructor)&&o!==i&&t(a=o.prototype)&&a!==i.prototype&&r(n,a),n}}function requireWrapErrorConstructorWithCause(){if(hasRequiredWrapErrorConstructorWithCause)return wrapErrorConstructorWithCause;hasRequiredWrapErrorConstructorWithCause=1;var e=requireGetBuiltIn(),t=requireHasOwnProperty(),r=requireCreateNonEnumerableProperty(),n=requireObjectIsPrototypeOf(),s=requireObjectSetPrototypeOf(),i=requireCopyConstructorProperties(),o=requireProxyAccessor(),a=requireInheritIfRequired(),u=requireNormalizeStringArgument(),l=requireInstallErrorCause(),c=requireErrorStackInstall(),d=requireDescriptors(),p=requireIsPure();return wrapErrorConstructorWithCause=function(h,m,_,f){var g="stackTraceLimit",y=f?2:1,b=h.split("."),E=b[b.length-1],w=e.apply(null,b);if(w){var q=w.prototype;if(!p&&t(q,"cause")&&delete q.cause,!_)return w;var S=e("Error"),v=m((function(e,t){var s=u(f?t:e,void 0),i=f?new w(e):new w;return void 0!==s&&r(i,"message",s),c(i,v,i.stack,2),this&&n(q,this)&&a(i,this,v),arguments.length>y&&l(i,arguments[y]),i}));if(v.prototype=q,"Error"!==E?s?s(v,S):i(v,S,{name:!0}):d&&g in w&&(o(v,w,g),o(v,w,"prepareStackTrace")),i(v,w),!p)try{q.name!==E&&r(q,"name",E),q.constructor=v}catch(e){}return v}},wrapErrorConstructorWithCause}function requireEs_error_cause(){if(hasRequiredEs_error_cause)return es_error_cause;hasRequiredEs_error_cause=1;var e=require_export(),t=requireGlobalThis(),r=requireFunctionApply(),n=requireWrapErrorConstructorWithCause(),s="WebAssembly",i=t[s],o=7!==new Error("e",{cause:7}).cause,a=function(t,r){var s={};s[t]=n(t,r,o),e({global:!0,constructor:!0,arity:1,forced:o},s)},u=function(t,r){if(i&&i[t]){var a={};a[t]=n(s+"."+t,r,o),e({target:s,stat:!0,constructor:!0,arity:1,forced:o},a)}};return a("Error",(function(e){return function(t){return r(e,this,arguments)}})),a("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),a("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),a("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),a("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),a("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),a("URIError",(function(e){return function(t){return r(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}})),es_error_cause}var es_aggregateError_cause={},hasRequiredEs_aggregateError_cause,addToUnscopables,hasRequiredAddToUnscopables,weakMapBasicDetection,hasRequiredWeakMapBasicDetection,internalState,hasRequiredInternalState,functionName,hasRequiredFunctionName,defineBuiltIn,hasRequiredDefineBuiltIn,iteratorsCore,hasRequiredIteratorsCore,objectToString,hasRequiredObjectToString,setToStringTag,hasRequiredSetToStringTag,iteratorCreateConstructor,hasRequiredIteratorCreateConstructor,iteratorDefine,hasRequiredIteratorDefine,createIterResultObject,hasRequiredCreateIterResultObject,es_array_iterator,hasRequiredEs_array_iterator;function requireEs_aggregateError_cause(){if(hasRequiredEs_aggregateError_cause)return es_aggregateError_cause;hasRequiredEs_aggregateError_cause=1;var e=require_export(),t=requireGetBuiltIn(),r=requireFunctionApply(),n=requireFails(),s=requireWrapErrorConstructorWithCause(),i="AggregateError",o=t(i),a=!n((function(){return 1!==o([1]).errors[0]}))&&n((function(){return 7!==o([1],i,{cause:7}).cause}));return e({global:!0,constructor:!0,arity:2,forced:a},{AggregateError:s(i,(function(e){return function(t,n){return r(e,this,arguments)}}),a,!0)}),es_aggregateError_cause}function requireAddToUnscopables(){return hasRequiredAddToUnscopables?addToUnscopables:(hasRequiredAddToUnscopables=1,addToUnscopables=function(){})}function requireWeakMapBasicDetection(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var e=requireGlobalThis(),t=requireIsCallable(),r=e.WeakMap;return weakMapBasicDetection=t(r)&&/native code/.test(String(r))}function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var e,t,r,n=requireWeakMapBasicDetection(),s=requireGlobalThis(),i=requireIsObject(),o=requireCreateNonEnumerableProperty(),a=requireHasOwnProperty(),u=requireSharedStore(),l=requireSharedKey(),c=requireHiddenKeys(),d="Object already initialized",p=s.TypeError,h=s.WeakMap;if(n||u.state){var m=u.state||(u.state=new h);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new p(d);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},r=function(e){return m.has(e)}}else{var _=l("state");c[_]=!0,e=function(e,t){if(a(e,_))throw new p(d);return t.facade=e,o(e,_,t),t},t=function(e){return a(e,_)?e[_]:{}},r=function(e){return a(e,_)}}return internalState={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}}}}function requireFunctionName(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var e=requireDescriptors(),t=requireHasOwnProperty(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,s=t(r,"name"),i=s&&"something"===function(){}.name,o=s&&(!e||e&&n(r,"name").configurable);return functionName={EXISTS:s,PROPER:i,CONFIGURABLE:o}}function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var e=requireCreateNonEnumerableProperty();return defineBuiltIn=function(t,r,n,s){return s&&s.enumerable?t[r]=n:e(t,r,n),t}}function requireIteratorsCore(){if(hasRequiredIteratorsCore)return iteratorsCore;hasRequiredIteratorsCore=1;var e,t,r,n=requireFails(),s=requireIsCallable(),i=requireIsObject(),o=requireObjectCreate(),a=requireObjectGetPrototypeOf(),u=requireDefineBuiltIn(),l=requireWellKnownSymbol(),c=requireIsPure(),d=l("iterator"),p=!1;return[].keys&&("next"in(r=[].keys())?(t=a(a(r)))!==Object.prototype&&(e=t):p=!0),!i(e)||n((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=o(e)),s(e[d])||u(e,d,(function(){return this})),iteratorsCore={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:p}}function requireObjectToString(){if(hasRequiredObjectToString)return objectToString;hasRequiredObjectToString=1;var e=requireToStringTagSupport(),t=requireClassof();return objectToString=e?{}.toString:function(){return"[object "+t(this)+"]"}}function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var e=requireToStringTagSupport(),t=requireObjectDefineProperty().f,r=requireCreateNonEnumerableProperty(),n=requireHasOwnProperty(),s=requireObjectToString(),i=requireWellKnownSymbol()("toStringTag");return setToStringTag=function(o,a,u,l){var c=u?o:o&&o.prototype;c&&(n(c,i)||t(c,i,{configurable:!0,value:a}),l&&!e&&r(c,"toString",s))}}function requireIteratorCreateConstructor(){if(hasRequiredIteratorCreateConstructor)return iteratorCreateConstructor;hasRequiredIteratorCreateConstructor=1;var e=requireIteratorsCore().IteratorPrototype,t=requireObjectCreate(),r=requireCreatePropertyDescriptor(),n=requireSetToStringTag(),s=requireIterators(),i=function(){return this};return iteratorCreateConstructor=function(o,a,u,l){var c=a+" Iterator";return o.prototype=t(e,{next:r(+!l,u)}),n(o,c,!1,!0),s[c]=i,o}}function requireIteratorDefine(){if(hasRequiredIteratorDefine)return iteratorDefine;hasRequiredIteratorDefine=1;var e=require_export(),t=requireFunctionCall(),r=requireIsPure(),n=requireFunctionName(),s=requireIsCallable(),i=requireIteratorCreateConstructor(),o=requireObjectGetPrototypeOf(),a=requireObjectSetPrototypeOf(),u=requireSetToStringTag(),l=requireCreateNonEnumerableProperty(),c=requireDefineBuiltIn(),d=requireWellKnownSymbol(),p=requireIterators(),h=requireIteratorsCore(),m=n.PROPER,_=n.CONFIGURABLE,f=h.IteratorPrototype,g=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",q=function(){return this};return iteratorDefine=function(n,d,h,S,v,R,O){i(h,d,S);var I,P,A,T=function(e){if(e===v&&j)return j;if(!g&&e&&e in M)return M[e];switch(e){case b:case E:case w:return function(){return new h(this,e)}}return function(){return new h(this)}},x=d+" Iterator",C=!1,M=n.prototype,N=M[y]||M["@@iterator"]||v&&M[v],j=!g&&N||T(v),F="Array"===d&&M.entries||N;if(F&&(I=o(F.call(new n)))!==Object.prototype&&I.next&&(r||o(I)===f||(a?a(I,f):s(I[y])||c(I,y,q)),u(I,x,!0,!0),r&&(p[x]=q)),m&&v===E&&N&&N.name!==E&&(!r&&_?l(M,"name",E):(C=!0,j=function(){return t(N,this)})),v)if(P={values:T(E),keys:R?j:T(b),entries:T(w)},O)for(A in P)(g||C||!(A in M))&&c(M,A,P[A]);else e({target:d,proto:!0,forced:g||C},P);return r&&!O||M[y]===j||c(M,y,j,{name:v}),p[d]=j,P}}function requireCreateIterResultObject(){return hasRequiredCreateIterResultObject?createIterResultObject:(hasRequiredCreateIterResultObject=1,createIterResultObject=function(e,t){return{value:e,done:t}})}function requireEs_array_iterator(){if(hasRequiredEs_array_iterator)return es_array_iterator;hasRequiredEs_array_iterator=1;var e=requireToIndexedObject(),t=requireAddToUnscopables(),r=requireIterators(),n=requireInternalState(),s=requireObjectDefineProperty().f,i=requireIteratorDefine(),o=requireCreateIterResultObject(),a=requireIsPure(),u=requireDescriptors(),l="Array Iterator",c=n.set,d=n.getterFor(l);es_array_iterator=i(Array,"Array",(function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})}),(function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case"keys":return o(r,!1);case"values":return o(t[r],!1)}return o([r,t[r]],!1)}),"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}return es_array_iterator}var es_string_iterator={},stringMultibyte,hasRequiredStringMultibyte,hasRequiredEs_string_iterator,aggregateError$5,hasRequiredAggregateError$5;function requireStringMultibyte(){if(hasRequiredStringMultibyte)return stringMultibyte;hasRequiredStringMultibyte=1;var e=requireFunctionUncurryThis(),t=requireToIntegerOrInfinity(),r=requireToString(),n=requireRequireObjectCoercible(),s=e("".charAt),i=e("".charCodeAt),o=e("".slice),a=function(e){return function(a,u){var l,c,d=r(n(a)),p=t(u),h=d.length;return p<0||p>=h?e?"":void 0:(l=i(d,p))<55296||l>56319||p+1===h||(c=i(d,p+1))<56320||c>57343?e?s(d,p):l:e?o(d,p,p+2):c-56320+(l-55296<<10)+65536}};return stringMultibyte={codeAt:a(!1),charAt:a(!0)}}function requireEs_string_iterator(){if(hasRequiredEs_string_iterator)return es_string_iterator;hasRequiredEs_string_iterator=1;var e=requireStringMultibyte().charAt,t=requireToString(),r=requireInternalState(),n=requireIteratorDefine(),s=requireCreateIterResultObject(),i="String Iterator",o=r.set,a=r.getterFor(i);return n(String,"String",(function(e){o(this,{type:i,string:t(e),index:0})}),(function(){var t,r=a(this),n=r.string,i=r.index;return i>=n.length?s(void 0,!0):(t=e(n,i),r.index+=t.length,s(t,!1))})),es_string_iterator}function requireAggregateError$5(){return hasRequiredAggregateError$5?aggregateError$5:(hasRequiredAggregateError$5=1,requireEs_error_cause(),requireEs_aggregateError(),requireEs_aggregateError_cause(),requireEs_array_iterator(),requireEs_string_iterator(),aggregateError$5=requirePath().AggregateError)}var web_domCollections_iterator={},domIterables,hasRequiredDomIterables,hasRequiredWeb_domCollections_iterator,aggregateError$4,hasRequiredAggregateError$4,aggregateError$3,hasRequiredAggregateError$3,aggregateError$2,hasRequiredAggregateError$2,aggregateError$1,hasRequiredAggregateError$1,aggregateError,hasRequiredAggregateError;function requireDomIterables(){return hasRequiredDomIterables?domIterables:(hasRequiredDomIterables=1,domIterables={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})}function requireWeb_domCollections_iterator(){if(hasRequiredWeb_domCollections_iterator)return web_domCollections_iterator;hasRequiredWeb_domCollections_iterator=1,requireEs_array_iterator();var e=requireDomIterables(),t=requireGlobalThis(),r=requireSetToStringTag(),n=requireIterators();for(var s in e)r(t[s],s),n[s]=n.Array;return web_domCollections_iterator}function requireAggregateError$4(){if(hasRequiredAggregateError$4)return aggregateError$4;hasRequiredAggregateError$4=1,requireEsnext_aggregateError();var e=requireAggregateError$5();return requireWeb_domCollections_iterator(),aggregateError$4=e}function requireAggregateError$3(){return hasRequiredAggregateError$3?aggregateError$3:(hasRequiredAggregateError$3=1,aggregateError$3=requireAggregateError$4())}function requireAggregateError$2(){return hasRequiredAggregateError$2?aggregateError$2:(hasRequiredAggregateError$2=1,requireEsnext_aggregateError(),aggregateError$2=requireAggregateError$3())}function requireAggregateError$1(){return hasRequiredAggregateError$1?aggregateError$1:(hasRequiredAggregateError$1=1,aggregateError$1=requireAggregateError$2())}function requireAggregateError(){return hasRequiredAggregateError?aggregateError:(hasRequiredAggregateError=1,aggregateError=requireAggregateError$1())}var aggregateErrorExports=requireAggregateError();const _AggregateError=getDefaultExportFromCjs(aggregateErrorExports);class ApiDOMAggregateError extends _AggregateError{constructor(e,t,r){if(super(e,t,r),this.name=this.constructor.name,"string"==typeof t&&(this.message=t),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:e}=r;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class ApiDOMError extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class ApiDOMStructuredError extends ApiDOMError{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}class UnsupportedOperationError extends ApiDOMError{}class NotImplementedError extends UnsupportedOperationError{}class YamlError extends ApiDOMStructuredError{}class YamlSchemaError extends YamlError{}class YamlTagError extends YamlSchemaError{specificTagName;explicitTagName;tagKind;tagStartPositionRow;tagStartPositionColumn;tagStartPositionIndex;tagEndPositionRow;tagEndPositionColumn;tagEndPositionIndex;nodeCanonicalContent;node;constructor(e,t){super(e,t),void 0!==t&&(this.specificTagName=t.specificTagName,this.explicitTagName=t.explicitTagName,this.tagKind=t.tagKind,this.tagStartPositionRow=t.tagStartPositionRow,this.tagStartPositionColumn=t.tagStartPositionColumn,this.tagStartPositionIndex=t.tagStartPositionIndex,this.tagEndPositionRow=t.tagEndPositionRow,this.tagEndPositionColumn=t.tagEndPositionColumn,this.tagEndPositionIndex=t.tagEndPositionIndex,this.nodeCanonicalContent=t.nodeCanonicalContent,this.node=t.node)}}let Tag$1=class{static uri="";tag="";constructor(){this.tag=this.constructor.uri}test(e){return!0}resolve(e){return e}};class GenericMapping extends Tag$1{static uri="tag:yaml.org,2002:map";test(e){return e.tag.kind===YamlNodeKind.Mapping}}class GenericSequence extends Tag$1{static uri="tag:yaml.org,2002:seq";test(e){return e.tag.kind===YamlNodeKind.Sequence}}class GenericString extends Tag$1{static uri="tag:yaml.org,2002:str"}var dist={},errors={},hasRequiredErrors,hasRequiredDist;function requireErrors(){return hasRequiredErrors||(hasRequiredErrors=1,e=errors,Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0,function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"}(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])),errors;var e,t}function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=requireErrors();function r(e,r,n){const s=function(e){return e.match(/[^a-f0-9]/i)?NaN:parseInt(e,16)}(e);if(Number.isNaN(s)||void 0!==n&&n!==e.length)throw new SyntaxError(t.errorMessages.get(r));return s}function n(e,n){const s=r(e,t.ErrorType.MalformedUnicode,4);if(void 0!==n){const e=r(n,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(s,e)}return String.fromCharCode(s)}Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});const s=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","\t"],["v","\v"],["0","\0"]]);const i=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function o(e,o=!1){return e.replace(i,(function(e,i,a,u,l,c,d,p,h){if(void 0!==i)return"\\";if(void 0!==a)return function(e){const n=r(e,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(n)}(a);if(void 0!==u)return function(e){if("{"!==(n=e).charAt(0)||"}"!==n.charAt(n.length-1))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));var n;const s=r(e.slice(1,-1),t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(s)}catch(e){throw e instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):e}}(u);if(void 0!==l)return n(l,c);if(void 0!==d)return n(d);if("0"===p)return"\0";if(void 0!==p)return function(e,r=!1){if(r)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const n=parseInt(e,8);return String.fromCharCode(n)}(p,!o);if(void 0!==h)return m=h,s.get(m)||m;var m;throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))}))}e.unraw=o,e.default=o}(dist)),dist}var distExports=requireDist();const blockStyleRegExp=/^(?<style>[|>])(?<chomping>[+-]?)(?<indentation>[0-9]*)\s/,getIndentationIndicator=e=>{const t=e.match(blockStyleRegExp),r=pathOr("",["groups","indentation"],t);return isEmptyString(r)?void 0:parseInt(r,10)},getIndentation=e=>{const t=getIndentationIndicator(e);if(isInteger(t))return repeatStr(" ",t);const r=pathOr("",[1],e.split("\n")),n=pathOr(0,["groups","indentation","length"],r.match(/^(?<indentation>[ ]*)/));return repeatStr(" ",n)},getChompingIndicator=e=>{const t=e.match(blockStyleRegExp),r=pathOr("",["groups","chomping"],t);return isEmptyString(r)?void 0:r},chomp=(e,t)=>isUndefined(e)?`${trimEnd(t)}\n`:"-"===e?trimEnd(t):t,normalizeLineBreaks=e=>e.replace(/\r\n/g,"\n"),preventLineBreakCollapseToSpace=e=>e.replace(/\\\n\s*/g,""),collapseLineBreakToSpace=e=>e.replace(/(\n)?\n([^\n]+)/g,((e,t,r)=>t?e:` ${r.trimStart()}`)).replace(/[\n]{2}/g,"\n"),removeQuotes=curry(((e,t)=>t.replace(new RegExp(`^${e}`),"").replace(new RegExp(`${e}$`),""))),formatFlowPlain=pipe(normalizeLineBreaks,trim,collapseLineBreakToSpace,split("\n"),map(trimStart$1),join("\n")),formatFlowSingleQuoted=pipe(normalizeLineBreaks,trim,collapseLineBreakToSpace,split("\n"),map(trimStart$1),join("\n"),removeQuotes("'")),formatFlowDoubleQuoted=pipe(normalizeLineBreaks,trim,preventLineBreakCollapseToSpace,collapseLineBreakToSpace,distExports.unraw,split("\n"),map(trimStart$1),join("\n"),removeQuotes('"')),formatBlockLiteral=e=>{const t=getIndentation(e),r=getChompingIndicator(e),n=normalizeLineBreaks(e),s=tail(n.split("\n")),i=compose(map(trimCharsStart(t)),map(concatRight("\n"))),o=transduce(i,concat,"",s);return chomp(r,o)},formatBlockFolded=e=>{const t=getIndentation(e),r=getChompingIndicator(e),n=normalizeLineBreaks(e),s=tail(n.split("\n")),i=compose(map(trimCharsStart(t)),map(concatRight("\n"))),o=transduce(i,concat,"",s),a=collapseLineBreakToSpace(o);return chomp(r,a)};class ScalarTag{static test(e){return e.tag.kind===YamlNodeKind.Scalar&&"string"==typeof e.content}static canonicalFormat(e){let t=e.content;const r=e.clone();return e.style===YamlStyle.Plain?t=formatFlowPlain(e.content):e.style===YamlStyle.SingleQuoted?t=formatFlowSingleQuoted(e.content):e.style===YamlStyle.DoubleQuoted?t=formatFlowDoubleQuoted(e.content):e.style===YamlStyle.Literal?t=formatBlockLiteral(e.content):e.style===YamlStyle.Folded&&(t=formatBlockFolded(e.content)),r.content=t,r}static resolve(e){return e}}class FailsafeSchema{tags;tagDirectives;constructor(){this.tags=[],this.tagDirectives=[],this.registerTag(new GenericMapping),this.registerTag(new GenericSequence),this.registerTag(new GenericString)}toSpecificTagName(e){let t=e.tag.explicitName;return"!"===e.tag.explicitName?e.tag.kind===YamlNodeKind.Scalar?t=GenericString.uri:e.tag.kind===YamlNodeKind.Sequence?t=GenericSequence.uri:e.tag.kind===YamlNodeKind.Mapping&&(t=GenericMapping.uri):e.tag.explicitName.startsWith("!<")?t=e.tag.explicitName.replace(/^!</,"").replace(/>$/,""):e.tag.explicitName.startsWith("!!")&&(t=`tag:yaml.org,2002:${e.tag.explicitName.replace(/^!!/,"")}`),t}registerTagDirective(e){this.tagDirectives.push({handle:e.parameters.handle,prefix:e.parameters.prefix})}registerTag(e,t=!1){return t?this.tags.unshift(e):this.tags.push(e),this}overrideTag(e){return this.tags=this.tags.filter((t=>t.tag===e.tag)),this.tags.push(e),this}resolve(e){const t=this.toSpecificTagName(e);if("?"===t)return e;let r=e;ScalarTag.test(e)&&(r=ScalarTag.canonicalFormat(e));const n=this.tags.find((e=>(null==e?void 0:e.tag)===t));if(void 0===n)throw new YamlTagError(`Tag "${t}" was not recognized.`,{specificTagName:t,explicitTagName:e.tag.explicitName,tagKind:e.tag.kind,tagStartPositionRow:e.tag.startPositionRow,tagStartPositionColumn:e.tag.startPositionColumn,tagStartPositionIndex:e.tag.startIndex,tagEndPositionRow:e.tag.endPositionRow,tagEndPositionColumn:e.tag.endPositionColumn,tagEndPositionIndex:e.tag.endIndex,node:e.clone()});if(!n.test(r))throw new YamlTagError(`Node couldn't be resolved against the tag "${t}"`,{specificTagName:t,explicitTagName:e.tag.explicitName,tagKind:e.tag.kind,tagStartPositionRow:e.tag.startPositionRow,tagStartPositionColumn:e.tag.startPositionColumn,tagStartPositionIndex:e.tag.startIndex,tagEndPositionRow:e.tag.endPositionRow,tagEndPositionColumn:e.tag.endPositionColumn,tagEndPositionIndex:e.tag.endIndex,nodeCanonicalContent:r.content,node:e.clone()});return n.resolve(r)}}let Boolean$1=class extends Tag$1{static uri="tag:yaml.org,2002:bool";test(e){return/^(true|false)$/.test(e.content)}resolve(e){const t="true"===e.content,r=e.clone();return r.content=t,r}};class FloatingPoint extends Tag$1{static uri="tag:yaml.org,2002:float";test(e){return/^-?(0|[1-9][0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?$/.test(e.content)}resolve(e){const t=parseFloat(e.content),r=e.clone();return r.content=t,r}}class Integer extends Tag$1{static uri="tag:yaml.org,2002:int";test(e){return/^-?(0|[1-9][0-9]*)$/.test(e.content)}resolve(e){const t=parseInt(e.content,10),r=e.clone();return r.content=t,r}}class Null extends Tag$1{static uri="tag:yaml.org,2002:null";test(e){return/^null$/.test(e.content)}resolve(e){const t=e.clone();return t.content=null,t}}class JsonSchema extends FailsafeSchema{constructor(){super(),this.registerTag(new Boolean$1,!0),this.registerTag(new FloatingPoint,!0),this.registerTag(new Integer,!0),this.registerTag(new Null,!0)}toSpecificTagName(e){let t=super.toSpecificTagName(e);if("?"===t)if(e.tag.vkind===YamlNodeKind.Sequence)t=GenericSequence.uri;else if(e.tag.kind===YamlNodeKind.Mapping)t=GenericMapping.uri;else if(e.tag.kind===YamlNodeKind.Scalar){const r=this.tags.find((t=>t.test(e)));t=(null==r?void 0:r.tag)||"?"}return t}}class YamlReferenceError extends YamlError{}class ReferenceManager{addAnchor(e){if(!isAnchor(e.anchor))throw new YamlReferenceError("Expected YAML anchor to be attached the the YAML AST node.",{node:e})}resolveAlias(e){return new YamlScalar({content:e.content,style:YamlStyle.Plain,styleGroup:YamlStyleGroup.Flow})}}class Literal extends Node{static type="literal";value;constructor({value:e,...t}={}){super({...t}),this.value=e}}let Error$1=class extends Node{static type="error";value;isUnexpected;constructor({value:e,isUnexpected:t=!1,...r}={}){super({...r}),this.value=e,this.isUnexpected=t}};class ParseResult extends Node{static type="parseResult";get rootNode(){return head(this.children)}}const getVisitFn=(e,t,r)=>{const n=e[t];if(null!=n){if(!r&&"function"==typeof n)return n;const e=r?n.leave:n.enter;if("function"==typeof e)return e}else{const n=r?e.leave:e.enter;if(null!=n){if("function"==typeof n)return n;const e=n[t];if("function"==typeof e)return e}}return null},BREAK={},getNodeType$3=e=>null==e?void 0:e.type,isNode$3=e=>"string"==typeof getNodeType$3(e),cloneNode$1=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),mergeAll=(e,{visitFnGetter:t=getVisitFn,nodeTypeGetter:r=getNodeType$3,breakSymbol:n=BREAK,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),u=new Array(e.length).fill(a);return{enter(l,c,d,p,h,m){let _=l,f=!1;const g={...m,replaceWith(e,t){m.replaceWith(e,t),_=e}};for(let l=0;l<e.length;l+=1)if(u[l]===a){const a=t(e[l],r(_),!1);if("function"==typeof a){const t=a.call(e[l],_,c,d,p,h,g);if("function"==typeof(null==t?void 0:t.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:e[l],visitFn:a});if(t===i)u[l]=_;else if(t===n)u[l]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;_=t,f=!0}}}}return f?_:void 0},leave(s,o,l,c,d,p){let h=s;const m={...p,replaceWith(e,t){p.replaceWith(e,t),h=e}};for(let s=0;s<e.length;s+=1)if(u[s]===a){const a=t(e[s],r(h),!0);if("function"==typeof a){const t=a.call(e[s],h,o,l,c,d,m);if("function"==typeof(null==t?void 0:t.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:e[s],visitFn:a});if(t===n)u[s]=n;else if(void 0!==t&&t!==i)return t}}else u[s]===h&&(u[s]=a)}}},mergeAllAsync=(e,{visitFnGetter:t=getVisitFn,nodeTypeGetter:r=getNodeType$3,breakSymbol:n=BREAK,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),u=new Array(e.length).fill(a);return{async enter(l,c,d,p,h,m){let _=l,f=!1;const g={...m,replaceWith(e,t){m.replaceWith(e,t),_=e}};for(let l=0;l<e.length;l+=1)if(u[l]===a){const a=t(e[l],r(_),!1);if("function"==typeof a){const t=await a.call(e[l],_,c,d,p,h,g);if(t===i)u[l]=_;else if(t===n)u[l]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;_=t,f=!0}}}}return f?_:void 0},async leave(s,o,l,c,d,p){let h=s;const m={...p,replaceWith(e,t){p.replaceWith(e,t),h=e}};for(let s=0;s<e.length;s+=1)if(u[s]===a){const a=t(e[s],r(h),!0);if("function"==typeof a){const t=await a.call(e[s],h,o,l,c,d,m);if(t===n)u[s]=n;else if(void 0!==t&&t!==i)return t}}else u[s]===h&&(u[s]=a)}}};mergeAll[Symbol.for("nodejs.util.promisify.custom")]=mergeAllAsync;const visit$2=(e,t,{keyMap:r=null,state:n={},breakSymbol:s=BREAK,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=getVisitFn,nodeTypeGetter:u=getNodeType$3,nodePredicate:l=isNode$3,nodeCloneFn:c=cloneNode$1,detectCycles:d=!0,detectCyclesCallback:p=null}={})=>{const h=r||{};let m,_,f=Array.isArray(e),g=[e],y=-1,b=[],E=e;const w=[],q=[];do{y+=1;const e=y===g.length;let r;const R=e&&0!==b.length;if(e){if(r=0===q.length?void 0:w.pop(),E=_,_=q.pop(),R)if(f){E=E.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(E.splice(n,1),e+=1):E[n]=r}}else{E=c(E);for(const[e,t]of b)E[e]=t}y=m.index,g=m.keys,b=m.edits,f=m.inArray,m=m.prev}else if(_!==i&&void 0!==_){if(r=f?y:g[y],E=_[r],E===i||void 0===E)continue;w.push(r)}let O;if(!Array.isArray(E)){var S;if(!l(E))throw new ApiDOMStructuredError(`Invalid AST Node: ${String(E)}`,{node:E});if(d&&q.includes(E)){"function"==typeof p&&p(E,r,_,w,q),w.pop();continue}const i=a(t,u(E),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,E,r,_,w,q):_&&(_[r]=t),e||(E=t)}};O=i.call(t,E,r,_,w,q,s)}if("function"==typeof(null===(S=O)||void 0===S?void 0:S.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(O===s)break;if(O===o){if(!e){w.pop();continue}}else if(void 0!==O&&(b.push([r,O]),!e)){if(!l(O)){w.pop();continue}E=O}}var v;if(void 0===O&&R&&b.push([r,E]),!e)m={inArray:f,index:y,keys:g,edits:b,prev:m},f=Array.isArray(E),g=f?E:null!==(v=h[u(E)])&&void 0!==v?v:[],y=-1,b=[],_!==i&&void 0!==_&&q.push(_),_=E}while(void 0!==m);return 0!==b.length?b[b.length-1][1]:e};visit$2[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=null,state:n={},breakSymbol:s=BREAK,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=getVisitFn,nodeTypeGetter:u=getNodeType$3,nodePredicate:l=isNode$3,nodeCloneFn:c=cloneNode$1,detectCycles:d=!0,detectCyclesCallback:p=null}={})=>{const h=r||{};let m,_,f=Array.isArray(e),g=[e],y=-1,b=[],E=e;const w=[],q=[];do{y+=1;const e=y===g.length;let r;const v=e&&0!==b.length;if(e){if(r=0===q.length?void 0:w.pop(),E=_,_=q.pop(),v)if(f){E=E.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(E.splice(n,1),e+=1):E[n]=r}}else{E=c(E);for(const[e,t]of b)E[e]=t}y=m.index,g=m.keys,b=m.edits,f=m.inArray,m=m.prev}else if(_!==i&&void 0!==_){if(r=f?y:g[y],E=_[r],E===i||void 0===E)continue;w.push(r)}let R;if(!Array.isArray(E)){if(!l(E))throw new ApiDOMStructuredError(`Invalid AST Node: ${String(E)}`,{node:E});if(d&&q.includes(E)){"function"==typeof p&&p(E,r,_,w,q),w.pop();continue}const i=a(t,u(E),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,E,r,_,w,q):_&&(_[r]=t),e||(E=t)}};R=await i.call(t,E,r,_,w,q,s)}if(R===s)break;if(R===o){if(!e){w.pop();continue}}else if(void 0!==R&&(b.push([r,R]),!e)){if(!l(R)){w.pop();continue}E=R}}var S;if(void 0===R&&v&&b.push([r,E]),!e)m={inArray:f,index:y,keys:g,edits:b,prev:m},f=Array.isArray(E),g=f?E:null!==(S=h[u(E)])&&void 0!==S?S:[],y=-1,b=[],_!==i&&void 0!==_&&q.push(_),_=E}while(void 0!==m);return 0!==b.length?b[b.length-1][1]:e};class CloneError extends ApiDOMStructuredError{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class DeepCloneError extends CloneError{}class ShallowCloneError extends CloneError{}const dereference=(e,t)=>{const r=defaultTo(e,t);return mapObjIndexed((e=>{if(isPlainObj(e)&&has("$ref",e)&&propSatisfies(isString,"$ref",e)){const t=path$1(["$ref"],e),n=trimCharsStart("#/",t);return path$1(n.split("/"),r)}return isPlainObj(e)?dereference(e,r):e}),e)},assignSourceMap=(e,t)=>(e.startPositionRow=null==t?void 0:t.startPositionRow,e.startPositionColumn=null==t?void 0:t.startPositionColumn,e.startIndex=null==t?void 0:t.startIndex,e.endPositionRow=null==t?void 0:t.endPositionRow,e.endPositionColumn=null==t?void 0:t.endPositionColumn,e.endIndex=null==t?void 0:t.endIndex,e),cloneDeep=(e,t={})=>{const{visited:r=new WeakMap}=t,n={...t,visited:r};if(r.has(e))return r.get(e);if(e instanceof minimExports.KeyValuePair){const{key:t,value:s}=e,i=isElement(t)?cloneDeep(t,n):t,o=isElement(s)?cloneDeep(s,n):s,a=new minimExports.KeyValuePair(i,o);return r.set(e,a),a}if(e instanceof minimExports.ObjectSlice){const t=e=>cloneDeep(e,n),s=[...e].map(t),i=new minimExports.ObjectSlice(s);return r.set(e,i),i}if(e instanceof minimExports.ArraySlice){const t=e=>cloneDeep(e,n),s=[...e].map(t),i=new minimExports.ArraySlice(s);return r.set(e,i),i}if(isElement(e)){const t=cloneShallow(e);if(r.set(e,t),e.content)if(isElement(e.content))t.content=cloneDeep(e.content,n);else if(e.content instanceof minimExports.KeyValuePair)t.content=cloneDeep(e.content,n);else if(Array.isArray(e.content)){const r=e=>cloneDeep(e,n);t.content=e.content.map(r)}else t.content=e.content;else t.content=e.content;return t}throw new DeepCloneError("Value provided to cloneDeep function couldn't be cloned",{value:e})};cloneDeep.safe=e=>{try{return cloneDeep(e)}catch{return e}};const cloneShallowKeyValuePair=e=>{const{key:t,value:r}=e;return new minimExports.KeyValuePair(t,r)},cloneShallowArraySlice=e=>{const t=[...e];return new minimExports.ArraySlice(t)},cloneShallowObjectSlice=e=>{const t=[...e];return new minimExports.ObjectSlice(t)},cloneShallowElement=e=>{const t=new e.constructor;if(t.element=e.element,hasElementSourceMap(e)&&assignSourceMap(t,e),e.meta.length>0&&(t._meta=cloneDeep(e.meta)),e.attributes.length>0&&(t._attributes=cloneDeep(e.attributes)),isElement(e.content)){const r=e.content;t.content=cloneShallowElement(r)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof minimExports.KeyValuePair?t.content=cloneShallowKeyValuePair(e.content):t.content=e.content;return t},cloneShallow=e=>{if(e instanceof minimExports.KeyValuePair)return cloneShallowKeyValuePair(e);if(e instanceof minimExports.ObjectSlice)return cloneShallowObjectSlice(e);if(e instanceof minimExports.ArraySlice)return cloneShallowArraySlice(e);if(isElement(e))return cloneShallowElement(e);throw new ShallowCloneError("Value provided to cloneShallow function couldn't be cloned",{value:e})};cloneShallow.safe=e=>{try{return cloneShallow(e)}catch{return e}};const getNodeType$2=e=>isObjectElement(e)?"ObjectElement":isArrayElement(e)?"ArrayElement":isMemberElement(e)?"MemberElement":isStringElement(e)?"StringElement":isBooleanElement(e)?"BooleanElement":isNumberElement(e)?"NumberElement":isNullElement(e)?"NullElement":isLinkElement(e)?"LinkElement":isRefElement(e)?"RefElement":void 0,cloneNode=e=>isElement(e)?cloneShallow(e):cloneNode$1(e),isNode$2=pipe(getNodeType$2,isString),keyMapDefault$1={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"]},visit$1=(e,t,{keyMap:r=keyMapDefault$1,...n}={})=>visit$2(e,t,{keyMap:r,nodeTypeGetter:getNodeType$2,nodePredicate:isNode$2,nodeCloneFn:cloneNode,...n});visit$1[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=keyMapDefault$1,...n}={})=>visit$2[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:r,nodeTypeGetter:getNodeType$2,nodePredicate:isNode$2,nodeCloneFn:cloneNode,...n});const defaultDispatchPluginsOptions={toolboxCreator:createToolbox$1,visitorOptions:{nodeTypeGetter:getNodeType$2,exposeEdits:!0}},dispatchPluginsSync=(e,t,r={})=>{if(0===t.length)return e;const n=mergeDeepRight(defaultDispatchPluginsOptions,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),a=t.map((e=>e(o))),u=mergeAll(a.map(propOr({},"visitor")),{...i});a.forEach(invokeArgs(["pre"],[]));const l=visit$1(e,u,i);return a.forEach(invokeArgs(["post"],[])),l},dispatchPluginsAsync=async(e,t,r={})=>{if(0===t.length)return e;const n=mergeDeepRight(defaultDispatchPluginsOptions,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),a=t.map((e=>e(o))),u=mergeAll[Symbol.for("nodejs.util.promisify.custom")],l=visit$1[Symbol.for("nodejs.util.promisify.custom")],c=u(a.map(propOr({},"visitor")),{...i});await Promise.allSettled(a.map(invokeArgs(["pre"],[])));const d=await l(e,c,i);return await Promise.allSettled(a.map(invokeArgs(["post"],[]))),d};dispatchPluginsSync[Symbol.for("nodejs.util.promisify.custom")]=dispatchPluginsAsync;class MediaTypes extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new NotImplementedError("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new NotImplementedError("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new NotImplementedError("latest method in MediaTypes class is not yet implemented.")}}const refract$1=(e,{Type:t,plugins:r=[]})=>{const n=new t(e);return isElement(e)&&(e.meta.length>0&&(n.meta=cloneDeep(e.meta)),e.attributes.length>0&&(n.attributes=cloneDeep(e.attributes))),dispatchPluginsSync(n,r,{toolboxCreator:createToolbox$1,visitorOptions:{nodeTypeGetter:getNodeType$2}})},createRefractor$1=e=>(t,r={})=>refract$1(t,{...r,Type:e});minimExports.ObjectElement.refract=createRefractor$1(minimExports.ObjectElement),minimExports.ArrayElement.refract=createRefractor$1(minimExports.ArrayElement),minimExports.StringElement.refract=createRefractor$1(minimExports.StringElement),minimExports.BooleanElement.refract=createRefractor$1(minimExports.BooleanElement),minimExports.NullElement.refract=createRefractor$1(minimExports.NullElement),minimExports.NumberElement.refract=createRefractor$1(minimExports.NumberElement),minimExports.LinkElement.refract=createRefractor$1(minimExports.LinkElement),minimExports.RefElement.refract=createRefractor$1(minimExports.RefElement),Annotation.refract=createRefractor$1(Annotation),Comment.refract=createRefractor$1(Comment),ParseResult$1.refract=createRefractor$1(ParseResult$1);const nodeTypeGetter=e=>"string"==typeof(null==e?void 0:e.type)?e.type:getNodeType$2(e),keyMapDefault={EphemeralObject:["content"],EphemeralArray:["content"],...keyMapDefault$1},visit=(e,t,{keyMap:r=keyMapDefault,...n}={})=>visit$1(e,t,{keyMap:r,nodeTypeGetter:nodeTypeGetter,nodePredicate:T,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});visit[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=keyMapDefault,...r}={})=>visit$1[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:nodeTypeGetter,nodePredicate:T,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});class EphemeralArray{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 EphemeralObject{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 Visitor$1=class{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new EphemeralObject(e.content);return this.references.set(e,t),t}};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 t=new EphemeralArray(e.content);return this.references.set(e,t),t}};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,...t){var r;const n=t[3];return"EphemeralObject"===(null===(r=n[n.length-1])||void 0===r?void 0:r.type)?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return isStringElement(e.href)?e.href.toValue():""}};const serializer=e=>isElement(e)?isStringElement(e)||isNumberElement(e)||isBooleanElement(e)||isNullElement(e)?e.toValue():visit(e,new Visitor$1):e,emptyElement=e=>{const t=e.meta.length>0?cloneDeep(e.meta):void 0,r=e.attributes.length>0?cloneDeep(e.attributes):void 0;return new e.constructor(void 0,t,r)},cloneUnlessOtherwiseSpecified=(e,t)=>t.clone&&t.isMergeableElement(e)?deepmerge(emptyElement(e),e,t):e,getMergeFunction=(e,t)=>{if("function"!=typeof t.customMerge)return deepmerge;const r=t.customMerge(e,t);return"function"==typeof r?r:deepmerge},getMetaMergeFunction=e=>"function"!=typeof e.customMetaMerge?e=>cloneDeep(e):e.customMetaMerge,getAttributesMergeFunction=e=>"function"!=typeof e.customAttributesMerge?e=>cloneDeep(e):e.customAttributesMerge,mergeArrayElement=(e,t,r)=>e.concat(t)["fantasy-land/map"]((e=>cloneUnlessOtherwiseSpecified(e,r))),mergeObjectElement=(e,t,r)=>{const n=isObjectElement(e)?emptyElement(e):emptyElement(t);return isObjectElement(e)&&e.forEach(((e,t,s)=>{const i=cloneShallow(s);i.value=cloneUnlessOtherwiseSpecified(e,r),n.content.push(i)})),t.forEach(((t,s,i)=>{const o=serializer(s);let a;if(isObjectElement(e)&&e.hasKey(o)&&r.isMergeableElement(t)){const n=e.get(o);a=cloneShallow(i),a.value=getMergeFunction(s,r)(n,t,r)}else a=cloneShallow(i),a.value=cloneUnlessOtherwiseSpecified(t,r);n.remove(o),n.content.push(a)})),n},defaultOptions={clone:!0,isMergeableElement:e=>isObjectElement(e)||isArrayElement(e),arrayElementMerge:mergeArrayElement,objectElementMerge:mergeObjectElement,customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},deepmerge=(e,t,r)=>{var n,s,i;const o={...defaultOptions,...r};o.isMergeableElement=null!==(n=o.isMergeableElement)&&void 0!==n?n:defaultOptions.isMergeableElement,o.arrayElementMerge=null!==(s=o.arrayElementMerge)&&void 0!==s?s:defaultOptions.arrayElementMerge,o.objectElementMerge=null!==(i=o.objectElementMerge)&&void 0!==i?i:defaultOptions.objectElementMerge;const a=isArrayElement(t);if(!(a===isArrayElement(e)))return cloneUnlessOtherwiseSpecified(t,o);const u=a&&"function"==typeof o.arrayElementMerge?o.arrayElementMerge(e,t,o):o.objectElementMerge(e,t,o);return u.meta=getMetaMergeFunction(o)(e.meta,t.meta),u.attributes=getAttributesMergeFunction(o)(e.attributes,t.attributes),u};deepmerge.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new minimExports.ObjectElement:e.reduce(((e,r)=>deepmerge(e,r,t)),emptyElement(e[0]))};const treeSitterWasm="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/0327c07adfa215ef7ce8dfd6d8cbfc6b.wasm").href:new URL("0327c07adfa215ef7ce8dfd6d8cbfc6b.wasm","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href,realFetch=globalThis.fetch;isFunction(realFetch)&&(globalThis.fetch=(...e)=>isString(e[0])&&e[0].endsWith("tree-sitter.wasm")?realFetch.apply(globalThis,[treeSitterWasm,tail(e)]):realFetch.apply(globalThis,e));const treeSitterYaml="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/77eb67fad227c765659b848dfcc82388.wasm").href:new URL("77eb67fad227c765659b848dfcc82388.wasm","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href;var treeSitter={exports:{}},hasRequiredTreeSitter;function requireTreeSitter(){return hasRequiredTreeSitter||(hasRequiredTreeSitter=1,function(module,exports$1){var Module=void 0!==Module?Module:{},ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,TreeSitter=function(){var initPromise,document="object"==typeof window?{currentScript:window.document.currentScript}:null;class Parser{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise((resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},scriptDirectory="",readAsync,readBinary;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}if(ENVIRONMENT_IS_NODE){var fs=require$$0,nodePath=require$$1;scriptDirectory=__dirname+"/",readBinary=e=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e)),readAsync=(e,t=!0)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),new Promise(((r,n)=>{fs.readFile(e,t?void 0:"utf8",((e,s)=>{e?n(e):r(t?s.buffer:s)}))}))),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),module.exports=Module,quit_=(e,t)=>{throw process.exitCode=e,t}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:void 0!==document&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=scriptDirectory.startsWith("blob:")?"":scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=e=>isFileURI(e)?new Promise(((t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{(200==n.status||0==n.status&&n.response)&&r(n.response),t(n.status)},n.onerror=t,n.send(null)})):fetch(e,{credentials:"same-origin"}).then((e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary,wasmMemory;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP_DATA_VIEW;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAP32=new Int32Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=new Float32Array(e),Module.HEAPF64=new Float64Array(e)}if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies?.(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){throw Module.onAbort?.(e),err(e="Aborted("+e+")"),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://"),wasmBinaryFile;function findWasmBinary(){var e="tree-sitter.wasm";return isDataURI(e)?e:locateFile(e)}function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return wasmBinary?Promise.resolve().then((()=>getBinarySync(e))):readAsync(e).then((e=>new Uint8Array(e)),(()=>getBinarySync(e)))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then((e=>WebAssembly.instantiate(e,t))).then(r,(e=>{err(`failed to asynchronously prepare wasm: ${e}`),abort(e)}))}function instantiateAsync(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(t)||isFileURI(t)||ENVIRONMENT_IS_NODE||"function"!=typeof fetch?instantiateArrayBuffer(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return err(`wasm streaming compile failed: ${e}`),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,n)}))))}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var e=getWasmImports();function t(e,t){wasmExports=e.exports,wasmExports=relocateExports(wasmExports,1024);var r=getDylinkMetadata(t);return r.neededDynlibs&&(dynamicLibraries=r.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports),LDSO.init(),loadDylibs(),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency(),wasmExports}if(addRunDependency(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return err(`Module.instantiateWasm callback failed with error: ${e}`),!1}return wasmBinaryFile||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,e,(function(e){t(e.instance,e.module)})),{}}function ExitStatus(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},LE_HEAP_LOAD_F32=e=>HEAP_DATA_VIEW.getFloat32(e,!0),LE_HEAP_LOAD_F64=e=>HEAP_DATA_VIEW.getFloat64(e,!0),LE_HEAP_LOAD_I16=e=>HEAP_DATA_VIEW.getInt16(e,!0),LE_HEAP_LOAD_I32=e=>HEAP_DATA_VIEW.getInt32(e,!0),LE_HEAP_LOAD_U32=e=>HEAP_DATA_VIEW.getUint32(e,!0),LE_HEAP_STORE_F32=(e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),LE_HEAP_STORE_F64=(e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),LE_HEAP_STORE_I16=(e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),LE_HEAP_STORE_I32=(e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),LE_HEAP_STORE_U32=(e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=(e,t,r)=>{for(var n=t+r,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var i="";t<s;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var u=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|u:(7&o)<<18|a<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(o);else{var l=o-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},getDylinkMetadata=e=>{var t=0,r=0;function n(){for(var r=0,n=1;;){var s=e[t++];if(r+=(127&s)*n,n*=128,!(128&s))break}return r}function s(){var r=n();return UTF8ArrayToString(e,(t+=r)-r,r)}function i(e,t){if(e)throw new Error(t)}var o="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,o);0===a.length&&(o="dylink",a=WebAssembly.Module.customSections(e,o)),i(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{var u=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer);i(!(1836278016==u[0]||6386541==u[0]),"need to see wasm magic number"),i(0!==e[8],"need the dylink section to be first"),t=9;var l=n();r=t+l,o=s()}var c={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==o){c.memorySize=n(),c.memoryAlign=n(),c.tableSize=n(),c.tableAlign=n();for(var d=n(),p=0;p<d;++p){var h=s();c.neededDynlibs.push(h)}}else{i("dylink.0"!==o);for(;t<r;){var m=e[t++],_=n();if(1===m)c.memorySize=n(),c.memoryAlign=n(),c.tableSize=n(),c.tableAlign=n();else if(2===m)for(d=n(),p=0;p<d;++p)h=s(),c.neededDynlibs.push(h);else if(3===m)for(var f=n();f--;){var g=s();256&n()&&c.tlsExports.add(g)}else if(4===m)for(f=n();f--;){s();g=s();1==(3&n())&&c.weakImports.add(g)}else t+=_}}return c};function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16(2*(e>>1));case"i32":return LE_HEAP_LOAD_I32(4*(e>>2));case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return LE_HEAP_LOAD_F32(4*(e>>2));case"double":return LE_HEAP_LOAD_F64(8*(e>>3));case"*":return LE_HEAP_LOAD_U32(4*(e>>2));default:abort(`invalid type for getValue: ${t}`)}}var newDSO=(e,t,r)=>{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,null!=t&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78112,zeroMemory=(e,t)=>(HEAPU8.fill(0,e,e+t),e),alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return zeroMemory(_malloc(e),e);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},n=1;n<e.length;++n)r.parameters.push(t[e[n]]);return r},generateFuncType=(e,t)=>{var r=e.slice(0,1),n=e.slice(1),s={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),uleb128Encode(n.length,t);for(var i=0;i<n.length;++i)t.push(s[n[i]]);"v"==r?t.push(0):t.push(1,s[r])},convertJsFunctionToWasm=(e,t)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var s=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(s,{e:{f:e}}).exports.f},wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:28,element:"anyfunc"}),getWasmTableEntry=e=>{var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t},updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}},functionsInTableMap,getFunctionAddress=e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return wasmTable.length-1},setWasmTableEntry=(e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(r){if(!(r instanceof TypeError))throw r;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,s)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||0==GOT[r].value)&&("function"==typeof n?GOT[r].value=addFunction(n):"number"==typeof n?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},relocateExports=(e,t,r)=>{var n={};for(var s in e){var i=e[s];"object"==typeof i&&(i=i.value),"number"==typeof i&&(i+=t),n[s]=i}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},dynCallLegacy=(e,t,r)=>(e=e.replace(/p/g,"i"),(0,Module["dynCall_"+e])(t,...r)),dynCall=(e,t,r=[])=>e.includes("j")?dynCallLegacy(e,t,r):getWasmTableEntry(t)(...r),stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}},resolveGlobalSymbol=(e,t=!1)=>{var r;return t&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},UTF8ToString=(e,t)=>e?UTF8ArrayToString(HEAPU8,e,t):"",loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0,tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length,moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];var r;t in e||(e[t]=(...e)=>(r||=resolveSymbol(t),r(...e)));return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&-1!=body.indexOf("$"+arity);arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;eval(func)}if(updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),"void"!=cSig)for(var i in cSig=cSig.split(","),cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then((e=>postInstantiation(e.module,e.instance)))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return currentModuleWeakSymbols=metadata.weakImports,flags.loadAsync?metadata.neededDynlibs.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,flags,localScope)))),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach((e=>loadDynamicLibrary(e,flags,localScope))),loadModule())},mergeLibSymbols=(e,t)=>{for(var[r,n]of Object.entries(e)){const e=e=>{isSymbolDefined(e)||(wasmImports[e]=n)};e(r);const t="__main_argc_argv";"main"==r&&e(t),r==t&&e("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=n)}},asyncLoad=(e,t,r,n)=>{var s=getUniqueRunDependency(`al ${e}`);readAsync(e).then((e=>{t(new Uint8Array(e)),s&&removeRunDependency()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),s&&addRunDependency()};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var s=LDSO.loadedLibsByName[e];if(s)return t.global&&(s.global||(s.global=!0,mergeLibSymbols(s.exports))),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,!t.loadAsync||Promise.resolve(!0);function i(){var r=locateFile(e);if(t.loadAsync)return new Promise((function(e,t){asyncLoad(r,e,t)}));if(!readBinary)throw new Error(`${r}: file not found, and synchronous loading of external files is not available`);return readBinary(r)}function o(){return t.loadAsync?i().then((n=>loadWebAssemblyModule(n,t,e,r))):loadWebAssemblyModule(i(),t,e,r)}function a(e){s.global&&mergeLibSymbols(e),s.exports=e}return(s=newDSO(e,n,"loading")).refcount=t.nodelete?1/0:1,s.global=t.global,t.loadAsync?o().then((e=>(a(e),!0))):(a(o()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(0==t.value){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if("function"==typeof r)t.value=addFunction(r,r.sig);else{if("number"!=typeof r)throw new Error(`bad export type for '${e}': ${typeof r}`);t.value=r}}},loadDylibs=()=>{dynamicLibraries.length?(addRunDependency(),dynamicLibraries.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})))),Promise.resolve()).then((()=>{reportUndefinedSymbols(),removeRunDependency()}))):reportUndefinedSymbols()};function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16(2*(e>>1),t);break;case"i32":LE_HEAP_STORE_I32(4*(e>>2),t);break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":LE_HEAP_STORE_F32(4*(e>>2),t);break;case"double":LE_HEAP_STORE_F64(8*(e>>3),t);break;case"*":LE_HEAP_STORE_U32(4*(e>>2),t);break;default:abort(`invalid type for setValue: ${r}`)}}Module.noExitRuntime;var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78112),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=()=>{abort("")};__abort_js.sig="v";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var __emscripten_memcpy_js=(e,t,r)=>HEAPU8.copyWithin(e,t,t+r),_emscripten_get_now;__emscripten_memcpy_js.sig="vppp",_emscripten_get_now=()=>performance.now(),_emscripten_get_now.sig="d";var getHeapMax=()=>2147483648,growMemory=e=>{var t=(e-wasmMemory.buffer.byteLength+65535)/65536;try{return wasmMemory.grow(t),updateMemoryViews(),1}catch(e){}},_emscripten_resize_heap=e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n,s,i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((s=65536)-n%s)%s);if(growMemory(a))return!0}return!1};_emscripten_resize_heap.sig="ip";var _fd_close=e=>52;function _fd_seek(e,t,r,n,s){return 70}_fd_close.sig="ii",_fd_seek.sig="iiiiip";var printCharBuffers=[null,[],[]],printChar=(e,t)=>{var r=printCharBuffers[e];0===t||10===t?((1===e?out:err)(UTF8ArrayToString(r,0)),r.length=0):r.push(t)},_fd_write=(e,t,r,n)=>{for(var s=0,i=0;i<r;i++){var o=LE_HEAP_LOAD_U32(4*(t>>2)),a=LE_HEAP_LOAD_U32(4*(t+4>>2));t+=8;for(var u=0;u<a;u++)printChar(e,HEAPU8[o+u]);s+=a}return LE_HEAP_STORE_U32(4*(n>>2),s),0};function _tree_sitter_log_callback(e,t){if(currentLogCallback){const r=UTF8ToString(t);currentLogCallback(r,0!==e)}}function _tree_sitter_parse_callback(e,t,r,n,s){const i=currentParseCallback(t,{row:r,column:n});"string"==typeof i?(setValue(s,i.length,"i32"),stringToUTF16(i,e,10240)):setValue(s,0,"i32")}_fd_write.sig="iippp";var _proc_exit=e=>{EXITSTATUS=e,quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)},lengthBytesUTF8=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(!(n>0))return 0;for(var s=r,i=r+n-1,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=i)break;t[r++]=a}else if(a<=2047){if(r+1>=i)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=i)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-s},stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},stringToUTF16=(e,t,r)=>{if(r??=2147483647,r<2)return 0;for(var n=t,s=(r-=2)<2*e.length?r/2:e.length,i=0;i<s;++i){var o=e.charCodeAt(i);LE_HEAP_STORE_I16(2*(t>>1),o),t+=2}return LE_HEAP_STORE_I16(2*(t>>1),0),t-n},AsciiToString=e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_memcpy_js:__emscripten_memcpy_js,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},wasmExports=createWasm(),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e);Module._calloc=(e,t)=>(Module._calloc=wasmExports.calloc)(e,t),Module._realloc=(e,t)=>(Module._realloc=wasmExports.realloc)(e,t),Module._free=e=>(Module._free=wasmExports.free)(e),Module._ts_language_symbol_count=e=>(Module._ts_language_symbol_count=wasmExports.ts_language_symbol_count)(e),Module._ts_language_state_count=e=>(Module._ts_language_state_count=wasmExports.ts_language_state_count)(e),Module._ts_language_version=e=>(Module._ts_language_version=wasmExports.ts_language_version)(e),Module._ts_language_field_count=e=>(Module._ts_language_field_count=wasmExports.ts_language_field_count)(e),Module._ts_language_next_state=(e,t,r)=>(Module._ts_language_next_state=wasmExports.ts_language_next_state)(e,t,r),Module._ts_language_symbol_name=(e,t)=>(Module._ts_language_symbol_name=wasmExports.ts_language_symbol_name)(e,t),Module._ts_language_symbol_for_name=(e,t,r,n)=>(Module._ts_language_symbol_for_name=wasmExports.ts_language_symbol_for_name)(e,t,r,n),Module._strncmp=(e,t,r)=>(Module._strncmp=wasmExports.strncmp)(e,t,r),Module._ts_language_symbol_type=(e,t)=>(Module._ts_language_symbol_type=wasmExports.ts_language_symbol_type)(e,t),Module._ts_language_field_name_for_id=(e,t)=>(Module._ts_language_field_name_for_id=wasmExports.ts_language_field_name_for_id)(e,t),Module._ts_lookahead_iterator_new=(e,t)=>(Module._ts_lookahead_iterator_new=wasmExports.ts_lookahead_iterator_new)(e,t),Module._ts_lookahead_iterator_delete=e=>(Module._ts_lookahead_iterator_delete=wasmExports.ts_lookahead_iterator_delete)(e),Module._ts_lookahead_iterator_reset_state=(e,t)=>(Module._ts_lookahead_iterator_reset_state=wasmExports.ts_lookahead_iterator_reset_state)(e,t),Module._ts_lookahead_iterator_reset=(e,t,r)=>(Module._ts_lookahead_iterator_reset=wasmExports.ts_lookahead_iterator_reset)(e,t,r),Module._ts_lookahead_iterator_next=e=>(Module._ts_lookahead_iterator_next=wasmExports.ts_lookahead_iterator_next)(e),Module._ts_lookahead_iterator_current_symbol=e=>(Module._ts_lookahead_iterator_current_symbol=wasmExports.ts_lookahead_iterator_current_symbol)(e),Module._memset=(e,t,r)=>(Module._memset=wasmExports.memset)(e,t,r),Module._memcpy=(e,t,r)=>(Module._memcpy=wasmExports.memcpy)(e,t,r),Module._ts_parser_delete=e=>(Module._ts_parser_delete=wasmExports.ts_parser_delete)(e),Module._ts_parser_reset=e=>(Module._ts_parser_reset=wasmExports.ts_parser_reset)(e),Module._ts_parser_set_language=(e,t)=>(Module._ts_parser_set_language=wasmExports.ts_parser_set_language)(e,t),Module._ts_parser_timeout_micros=e=>(Module._ts_parser_timeout_micros=wasmExports.ts_parser_timeout_micros)(e),Module._ts_parser_set_timeout_micros=(e,t,r)=>(Module._ts_parser_set_timeout_micros=wasmExports.ts_parser_set_timeout_micros)(e,t,r),Module._ts_parser_set_included_ranges=(e,t,r)=>(Module._ts_parser_set_included_ranges=wasmExports.ts_parser_set_included_ranges)(e,t,r),Module._memmove=(e,t,r)=>(Module._memmove=wasmExports.memmove)(e,t,r),Module._memcmp=(e,t,r)=>(Module._memcmp=wasmExports.memcmp)(e,t,r),Module._ts_query_new=(e,t,r,n,s)=>(Module._ts_query_new=wasmExports.ts_query_new)(e,t,r,n,s),Module._ts_query_delete=e=>(Module._ts_query_delete=wasmExports.ts_query_delete)(e),Module._iswspace=e=>(Module._iswspace=wasmExports.iswspace)(e),Module._iswalnum=e=>(Module._iswalnum=wasmExports.iswalnum)(e),Module._ts_query_pattern_count=e=>(Module._ts_query_pattern_count=wasmExports.ts_query_pattern_count)(e),Module._ts_query_capture_count=e=>(Module._ts_query_capture_count=wasmExports.ts_query_capture_count)(e),Module._ts_query_string_count=e=>(Module._ts_query_string_count=wasmExports.ts_query_string_count)(e),Module._ts_query_capture_name_for_id=(e,t,r)=>(Module._ts_query_capture_name_for_id=wasmExports.ts_query_capture_name_for_id)(e,t,r),Module._ts_query_string_value_for_id=(e,t,r)=>(Module._ts_query_string_value_for_id=wasmExports.ts_query_string_value_for_id)(e,t,r),Module._ts_query_predicates_for_pattern=(e,t,r)=>(Module._ts_query_predicates_for_pattern=wasmExports.ts_query_predicates_for_pattern)(e,t,r),Module._ts_query_disable_capture=(e,t,r)=>(Module._ts_query_disable_capture=wasmExports.ts_query_disable_capture)(e,t,r),Module._ts_tree_copy=e=>(Module._ts_tree_copy=wasmExports.ts_tree_copy)(e),Module._ts_tree_delete=e=>(Module._ts_tree_delete=wasmExports.ts_tree_delete)(e),Module._ts_init=()=>(Module._ts_init=wasmExports.ts_init)(),Module._ts_parser_new_wasm=()=>(Module._ts_parser_new_wasm=wasmExports.ts_parser_new_wasm)(),Module._ts_parser_enable_logger_wasm=(e,t)=>(Module._ts_parser_enable_logger_wasm=wasmExports.ts_parser_enable_logger_wasm)(e,t),Module._ts_parser_parse_wasm=(e,t,r,n,s)=>(Module._ts_parser_parse_wasm=wasmExports.ts_parser_parse_wasm)(e,t,r,n,s),Module._ts_parser_included_ranges_wasm=e=>(Module._ts_parser_included_ranges_wasm=wasmExports.ts_parser_included_ranges_wasm)(e),Module._ts_language_type_is_named_wasm=(e,t)=>(Module._ts_language_type_is_named_wasm=wasmExports.ts_language_type_is_named_wasm)(e,t),Module._ts_language_type_is_visible_wasm=(e,t)=>(Module._ts_language_type_is_visible_wasm=wasmExports.ts_language_type_is_visible_wasm)(e,t),Module._ts_tree_root_node_wasm=e=>(Module._ts_tree_root_node_wasm=wasmExports.ts_tree_root_node_wasm)(e),Module._ts_tree_root_node_with_offset_wasm=e=>(Module._ts_tree_root_node_with_offset_wasm=wasmExports.ts_tree_root_node_with_offset_wasm)(e),Module._ts_tree_edit_wasm=e=>(Module._ts_tree_edit_wasm=wasmExports.ts_tree_edit_wasm)(e),Module._ts_tree_included_ranges_wasm=e=>(Module._ts_tree_included_ranges_wasm=wasmExports.ts_tree_included_ranges_wasm)(e),Module._ts_tree_get_changed_ranges_wasm=(e,t)=>(Module._ts_tree_get_changed_ranges_wasm=wasmExports.ts_tree_get_changed_ranges_wasm)(e,t),Module._ts_tree_cursor_new_wasm=e=>(Module._ts_tree_cursor_new_wasm=wasmExports.ts_tree_cursor_new_wasm)(e),Module._ts_tree_cursor_delete_wasm=e=>(Module._ts_tree_cursor_delete_wasm=wasmExports.ts_tree_cursor_delete_wasm)(e),Module._ts_tree_cursor_reset_wasm=e=>(Module._ts_tree_cursor_reset_wasm=wasmExports.ts_tree_cursor_reset_wasm)(e),Module._ts_tree_cursor_reset_to_wasm=(e,t)=>(Module._ts_tree_cursor_reset_to_wasm=wasmExports.ts_tree_cursor_reset_to_wasm)(e,t),Module._ts_tree_cursor_goto_first_child_wasm=e=>(Module._ts_tree_cursor_goto_first_child_wasm=wasmExports.ts_tree_cursor_goto_first_child_wasm)(e),Module._ts_tree_cursor_goto_last_child_wasm=e=>(Module._ts_tree_cursor_goto_last_child_wasm=wasmExports.ts_tree_cursor_goto_last_child_wasm)(e),Module._ts_tree_cursor_goto_first_child_for_index_wasm=e=>(Module._ts_tree_cursor_goto_first_child_for_index_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_index_wasm)(e),Module._ts_tree_cursor_goto_first_child_for_position_wasm=e=>(Module._ts_tree_cursor_goto_first_child_for_position_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_position_wasm)(e),Module._ts_tree_cursor_goto_next_sibling_wasm=e=>(Module._ts_tree_cursor_goto_next_sibling_wasm=wasmExports.ts_tree_cursor_goto_next_sibling_wasm)(e),Module._ts_tree_cursor_goto_previous_sibling_wasm=e=>(Module._ts_tree_cursor_goto_previous_sibling_wasm=wasmExports.ts_tree_cursor_goto_previous_sibling_wasm)(e),Module._ts_tree_cursor_goto_descendant_wasm=(e,t)=>(Module._ts_tree_cursor_goto_descendant_wasm=wasmExports.ts_tree_cursor_goto_descendant_wasm)(e,t),Module._ts_tree_cursor_goto_parent_wasm=e=>(Module._ts_tree_cursor_goto_parent_wasm=wasmExports.ts_tree_cursor_goto_parent_wasm)(e),Module._ts_tree_cursor_current_node_type_id_wasm=e=>(Module._ts_tree_cursor_current_node_type_id_wasm=wasmExports.ts_tree_cursor_current_node_type_id_wasm)(e),Module._ts_tree_cursor_current_node_state_id_wasm=e=>(Module._ts_tree_cursor_current_node_state_id_wasm=wasmExports.ts_tree_cursor_current_node_state_id_wasm)(e),Module._ts_tree_cursor_current_node_is_named_wasm=e=>(Module._ts_tree_cursor_current_node_is_named_wasm=wasmExports.ts_tree_cursor_current_node_is_named_wasm)(e),Module._ts_tree_cursor_current_node_is_missing_wasm=e=>(Module._ts_tree_cursor_current_node_is_missing_wasm=wasmExports.ts_tree_cursor_current_node_is_missing_wasm)(e),Module._ts_tree_cursor_current_node_id_wasm=e=>(Module._ts_tree_cursor_current_node_id_wasm=wasmExports.ts_tree_cursor_current_node_id_wasm)(e),Module._ts_tree_cursor_start_position_wasm=e=>(Module._ts_tree_cursor_start_position_wasm=wasmExports.ts_tree_cursor_start_position_wasm)(e),Module._ts_tree_cursor_end_position_wasm=e=>(Module._ts_tree_cursor_end_position_wasm=wasmExports.ts_tree_cursor_end_position_wasm)(e),Module._ts_tree_cursor_start_index_wasm=e=>(Module._ts_tree_cursor_start_index_wasm=wasmExports.ts_tree_cursor_start_index_wasm)(e),Module._ts_tree_cursor_end_index_wasm=e=>(Module._ts_tree_cursor_end_index_wasm=wasmExports.ts_tree_cursor_end_index_wasm)(e),Module._ts_tree_cursor_current_field_id_wasm=e=>(Module._ts_tree_cursor_current_field_id_wasm=wasmExports.ts_tree_cursor_current_field_id_wasm)(e),Module._ts_tree_cursor_current_depth_wasm=e=>(Module._ts_tree_cursor_current_depth_wasm=wasmExports.ts_tree_cursor_current_depth_wasm)(e),Module._ts_tree_cursor_current_descendant_index_wasm=e=>(Module._ts_tree_cursor_current_descendant_index_wasm=wasmExports.ts_tree_cursor_current_descendant_index_wasm)(e),Module._ts_tree_cursor_current_node_wasm=e=>(Module._ts_tree_cursor_current_node_wasm=wasmExports.ts_tree_cursor_current_node_wasm)(e),Module._ts_node_symbol_wasm=e=>(Module._ts_node_symbol_wasm=wasmExports.ts_node_symbol_wasm)(e),Module._ts_node_field_name_for_child_wasm=(e,t)=>(Module._ts_node_field_name_for_child_wasm=wasmExports.ts_node_field_name_for_child_wasm)(e,t),Module._ts_node_children_by_field_id_wasm=(e,t)=>(Module._ts_node_children_by_field_id_wasm=wasmExports.ts_node_children_by_field_id_wasm)(e,t),Module._ts_node_first_child_for_byte_wasm=e=>(Module._ts_node_first_child_for_byte_wasm=wasmExports.ts_node_first_child_for_byte_wasm)(e),Module._ts_node_first_named_child_for_byte_wasm=e=>(Module._ts_node_first_named_child_for_byte_wasm=wasmExports.ts_node_first_named_child_for_byte_wasm)(e),Module._ts_node_grammar_symbol_wasm=e=>(Module._ts_node_grammar_symbol_wasm=wasmExports.ts_node_grammar_symbol_wasm)(e),Module._ts_node_child_count_wasm=e=>(Module._ts_node_child_count_wasm=wasmExports.ts_node_child_count_wasm)(e),Module._ts_node_named_child_count_wasm=e=>(Module._ts_node_named_child_count_wasm=wasmExports.ts_node_named_child_count_wasm)(e),Module._ts_node_child_wasm=(e,t)=>(Module._ts_node_child_wasm=wasmExports.ts_node_child_wasm)(e,t),Module._ts_node_named_child_wasm=(e,t)=>(Module._ts_node_named_child_wasm=wasmExports.ts_node_named_child_wasm)(e,t),Module._ts_node_child_by_field_id_wasm=(e,t)=>(Module._ts_node_child_by_field_id_wasm=wasmExports.ts_node_child_by_field_id_wasm)(e,t),Module._ts_node_next_sibling_wasm=e=>(Module._ts_node_next_sibling_wasm=wasmExports.ts_node_next_sibling_wasm)(e),Module._ts_node_prev_sibling_wasm=e=>(Module._ts_node_prev_sibling_wasm=wasmExports.ts_node_prev_sibling_wasm)(e),Module._ts_node_next_named_sibling_wasm=e=>(Module._ts_node_next_named_sibling_wasm=wasmExports.ts_node_next_named_sibling_wasm)(e),Module._ts_node_prev_named_sibling_wasm=e=>(Module._ts_node_prev_named_sibling_wasm=wasmExports.ts_node_prev_named_sibling_wasm)(e),Module._ts_node_descendant_count_wasm=e=>(Module._ts_node_descendant_count_wasm=wasmExports.ts_node_descendant_count_wasm)(e),Module._ts_node_parent_wasm=e=>(Module._ts_node_parent_wasm=wasmExports.ts_node_parent_wasm)(e),Module._ts_node_descendant_for_index_wasm=e=>(Module._ts_node_descendant_for_index_wasm=wasmExports.ts_node_descendant_for_index_wasm)(e),Module._ts_node_named_descendant_for_index_wasm=e=>(Module._ts_node_named_descendant_for_index_wasm=wasmExports.ts_node_named_descendant_for_index_wasm)(e),Module._ts_node_descendant_for_position_wasm=e=>(Module._ts_node_descendant_for_position_wasm=wasmExports.ts_node_descendant_for_position_wasm)(e),Module._ts_node_named_descendant_for_position_wasm=e=>(Module._ts_node_named_descendant_for_position_wasm=wasmExports.ts_node_named_descendant_for_position_wasm)(e),Module._ts_node_start_point_wasm=e=>(Module._ts_node_start_point_wasm=wasmExports.ts_node_start_point_wasm)(e),Module._ts_node_end_point_wasm=e=>(Module._ts_node_end_point_wasm=wasmExports.ts_node_end_point_wasm)(e),Module._ts_node_start_index_wasm=e=>(Module._ts_node_start_index_wasm=wasmExports.ts_node_start_index_wasm)(e),Module._ts_node_end_index_wasm=e=>(Module._ts_node_end_index_wasm=wasmExports.ts_node_end_index_wasm)(e),Module._ts_node_to_string_wasm=e=>(Module._ts_node_to_string_wasm=wasmExports.ts_node_to_string_wasm)(e),Module._ts_node_children_wasm=e=>(Module._ts_node_children_wasm=wasmExports.ts_node_children_wasm)(e),Module._ts_node_named_children_wasm=e=>(Module._ts_node_named_children_wasm=wasmExports.ts_node_named_children_wasm)(e),Module._ts_node_descendants_of_type_wasm=(e,t,r,n,s,i,o)=>(Module._ts_node_descendants_of_type_wasm=wasmExports.ts_node_descendants_of_type_wasm)(e,t,r,n,s,i,o),Module._ts_node_is_named_wasm=e=>(Module._ts_node_is_named_wasm=wasmExports.ts_node_is_named_wasm)(e),Module._ts_node_has_changes_wasm=e=>(Module._ts_node_has_changes_wasm=wasmExports.ts_node_has_changes_wasm)(e),Module._ts_node_has_error_wasm=e=>(Module._ts_node_has_error_wasm=wasmExports.ts_node_has_error_wasm)(e),Module._ts_node_is_error_wasm=e=>(Module._ts_node_is_error_wasm=wasmExports.ts_node_is_error_wasm)(e),Module._ts_node_is_missing_wasm=e=>(Module._ts_node_is_missing_wasm=wasmExports.ts_node_is_missing_wasm)(e),Module._ts_node_is_extra_wasm=e=>(Module._ts_node_is_extra_wasm=wasmExports.ts_node_is_extra_wasm)(e),Module._ts_node_parse_state_wasm=e=>(Module._ts_node_parse_state_wasm=wasmExports.ts_node_parse_state_wasm)(e),Module._ts_node_next_parse_state_wasm=e=>(Module._ts_node_next_parse_state_wasm=wasmExports.ts_node_next_parse_state_wasm)(e),Module._ts_query_matches_wasm=(e,t,r,n,s,i,o,a,u,l,c)=>(Module._ts_query_matches_wasm=wasmExports.ts_query_matches_wasm)(e,t,r,n,s,i,o,a,u,l,c),Module._ts_query_captures_wasm=(e,t,r,n,s,i,o,a,u,l,c)=>(Module._ts_query_captures_wasm=wasmExports.ts_query_captures_wasm)(e,t,r,n,s,i,o,a,u,l,c),Module._iswalpha=e=>(Module._iswalpha=wasmExports.iswalpha)(e),Module._iswblank=e=>(Module._iswblank=wasmExports.iswblank)(e),Module._iswdigit=e=>(Module._iswdigit=wasmExports.iswdigit)(e),Module._iswlower=e=>(Module._iswlower=wasmExports.iswlower)(e),Module._iswupper=e=>(Module._iswupper=wasmExports.iswupper)(e),Module._iswxdigit=e=>(Module._iswxdigit=wasmExports.iswxdigit)(e),Module._memchr=(e,t,r)=>(Module._memchr=wasmExports.memchr)(e,t,r),Module._strlen=e=>(Module._strlen=wasmExports.strlen)(e),Module._strcmp=(e,t)=>(Module._strcmp=wasmExports.strcmp)(e,t),Module._strncat=(e,t,r)=>(Module._strncat=wasmExports.strncat)(e,t,r),Module._strncpy=(e,t,r)=>(Module._strncpy=wasmExports.strncpy)(e,t,r),Module._towlower=e=>(Module._towlower=wasmExports.towlower)(e),Module._towupper=e=>(Module._towupper=wasmExports.towupper)(e);var _setThrew=(e,t)=>(_setThrew=wasmExports.setThrew)(e,t),__emscripten_stack_restore=e=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(e),__emscripten_stack_alloc=e=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(e),_emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),calledRun;function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc(4*(r+1)),s=n;e.forEach((e=>{LE_HEAP_STORE_U32(4*(s>>2),stringToUTF8OnStack(e)),s+=4})),LE_HEAP_STORE_U32(4*(s>>2),0);try{var i=t(r,n);return exitJS(i,!0),i}catch(e){return handleException(e)}}}function run(e=arguments_){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized?.(),shouldRunNow&&callMain(e),postRun()))}runDependencies>0||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t()))}if(Module.dynCall_jiji=(e,t,r,n,s)=>(Module.dynCall_jiji=wasmExports.dynCall_jiji)(e,t,r,n,s),Module._orig$ts_parser_timeout_micros=e=>(Module._orig$ts_parser_timeout_micros=wasmExports.orig$ts_parser_timeout_micros)(e),Module._orig$ts_parser_set_timeout_micros=(e,t)=>(Module._orig$ts_parser_set_timeout_micros=wasmExports.orig$ts_parser_set_timeout_micros)(e,t),Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();const C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/;let VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const r=C._ts_language_version(t);if(r<MIN_COMPATIBLE_VERSION||VERSION<r)throw new Error(`Incompatible language version ${r}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`)}}else t=0,e=null;return this.language=e,C._ts_parser_set_language(this[0],t),this}getLanguage(){return this.language}parse(e,t,r){if("string"==typeof e)currentParseCallback=(t,r)=>e.slice(t);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");currentParseCallback=e}this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let n=0,s=0;if(r?.includedRanges){n=r.includedRanges.length,s=C._calloc(n,SIZE_OF_RANGE);let e=s;for(let t=0;t<n;t++)marshalRange(e,r.includedRanges[t]),e+=SIZE_OF_RANGE}const i=C._ts_parser_parse_wasm(this[0],this[1],t?t[0]:0,s,n);if(!i)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");const o=new Tree(INTERNAL,i,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,o}reset(){C._ts_parser_reset(this[0])}getIncludedRanges(){C._ts_parser_included_ranges_wasm(this[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=new Array(e);if(e>0){let n=t;for(let t=0;t<e;t++)r[t]=unmarshalRange(n),n+=SIZE_OF_RANGE;C._free(t)}return r}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setTimeoutMicros(e){C._ts_parser_set_timeout_micros(this[0],e)}setLogger(e){if(e){if("function"!=typeof e)throw new Error("Logger callback must be a function")}else e=null;return this.logCallback=e,this}getLogger(){return this.logCallback}}class Tree{constructor(e,t,r,n){assertInternal(e),this[0]=t,this.language=r,this.textCallback=n}copy(){const e=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,e,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(e){marshalEdit(e),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(e,t){const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),marshalPoint(r+SIZE_OF_INT,t),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(e){if(e.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],e[0]);const t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let e=r;for(let r=0;r<t;r++)n[r]=unmarshalRange(e),e+=SIZE_OF_RANGE;C._free(r)}return n}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=new Array(e);if(e>0){let n=t;for(let t=0;t<e;t++)r[t]=unmarshalRange(n),n+=SIZE_OF_RANGE;C._free(t)}return r}}class Node{constructor(e,t){assertInternal(e),this.tree=t}get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get text(){return getText(this.tree,this.startIndex,this.endIndex)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}get isNamed(){return marshalNode(this),1===C._ts_node_is_named_wasm(this.tree[0])}get hasError(){return marshalNode(this),1===C._ts_node_has_error_wasm(this.tree[0])}get hasChanges(){return marshalNode(this),1===C._ts_node_has_changes_wasm(this.tree[0])}get isError(){return marshalNode(this),1===C._ts_node_is_error_wasm(this.tree[0])}get isMissing(){return marshalNode(this),1===C._ts_node_is_missing_wasm(this.tree[0])}get isExtra(){return marshalNode(this),1===C._ts_node_is_extra_wasm(this.tree[0])}equals(e){return this.id===e.id}child(e){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}namedChild(e){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldId(e){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldName(e){const t=this.tree.language.fields.indexOf(e);return-1!==t?this.childForFieldId(t):null}fieldNameForChild(e){marshalNode(this);const t=C._ts_node_field_name_for_child_wasm(this.tree[0],e);if(!t)return null;return AsciiToString(t)}childrenForFieldName(e){const t=this.tree.language.fields.indexOf(e);return-1!==t&&0!==t?this.childrenForFieldId(t):[]}childrenForFieldId(e){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],e);const t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let e=r;for(let r=0;r<t;r++)n[r]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE;C._free(r)}return n}firstChildForIndex(e){marshalNode(this);return setValue(TRANSFER_BUFFER+SIZE_OF_NODE,e,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(e){marshalNode(this);return setValue(TRANSFER_BUFFER+SIZE_OF_NODE,e,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=new Array(e),e>0){let r=t;for(let t=0;t<e;t++)this._children[t]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE;C._free(t)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=new Array(e),e>0){let r=t;for(let t=0;t<e;t++)this._namedChildren[t]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE;C._free(t)}}return this._namedChildren}descendantsOfType(e,t,r){Array.isArray(e)||(e=[e]),t||(t=ZERO_POINT),r||(r=ZERO_POINT);const n=[],s=this.tree.language.types;for(let t=0,r=s.length;t<r;t++)e.includes(s[t])&&n.push(t);const i=C._malloc(SIZE_OF_INT*n.length);for(let e=0,t=n.length;e<t;e++)setValue(i+e*SIZE_OF_INT,n[e],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],i,n.length,t.row,t.column,r.row,r.column);const o=getValue(TRANSFER_BUFFER,"i32"),a=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),u=new Array(o);if(o>0){let e=a;for(let t=0;t<o;t++)u[t]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE}return C._free(a),C._free(i),u}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),setValue(r+SIZE_OF_INT,t,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),setValue(r+SIZE_OF_INT,t,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw new Error("Arguments must be {row, column} objects");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(r,e),marshalPoint(r+SIZE_OF_POINT,t),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw new Error("Arguments must be {row, column} objects");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(r,e),marshalPoint(r+SIZE_OF_POINT,t),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}toString(){marshalNode(this);const e=C._ts_node_to_string_wasm(this.tree[0]),t=AsciiToString(e);return C._free(e),t}}class TreeCursor{constructor(e,t){assertInternal(e),this.tree=t,unmarshalTreeCursor(this)}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(e){marshalNode(e),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(e){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(e,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],e.tree[0]),unmarshalTreeCursor(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){marshalTreeCursor(this);const e=C._ts_tree_cursor_start_index_wasm(this.tree[0]),t=C._ts_tree_cursor_end_index_wasm(this.tree[0]);return getText(this.tree,e,t)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoLastChild(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoFirstChildForIndex(e){marshalTreeCursor(this),setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,e,"i32");const t=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoFirstChildForPosition(e){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,e);const t=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoNextSibling(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoPreviousSibling(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoDescendant(e){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],e),unmarshalTreeCursor(this)}gotoParent(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}}class Language{constructor(e,t){assertInternal(e),this[0]=t,this.types=new Array(C._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e<t;e++)C._ts_language_symbol_type(this[0],e)<2&&(this.types[e]=UTF8ToString(C._ts_language_symbol_name(this[0],e)));this.fields=new Array(C._ts_language_field_count(this[0])+1);for(let e=0,t=this.fields.length;e<t;e++){const t=C._ts_language_field_name_for_id(this[0],e);this.fields[e]=0!==t?UTF8ToString(t):null}}get version(){return C._ts_language_version(this[0])}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(e){const t=this.fields.indexOf(e);return-1!==t?t:null}fieldNameForId(e){return this.fields[e]||null}idForNodeType(e,t){const r=lengthBytesUTF8(e),n=C._malloc(r+1);stringToUTF8(e,n,r+1);const s=C._ts_language_symbol_for_name(this[0],n,r,t);return C._free(n),s||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(e){const t=C._ts_language_symbol_name(this[0],e);return t?UTF8ToString(t):null}nodeTypeIsNamed(e){return!!C._ts_language_type_is_named_wasm(this[0],e)}nodeTypeIsVisible(e){return!!C._ts_language_type_is_visible_wasm(this[0],e)}nextState(e,t){return C._ts_language_next_state(this[0],e,t)}lookaheadIterator(e){const t=C._ts_lookahead_iterator_new(this[0],e);return t?new LookaheadIterable(INTERNAL,t,this):null}query(e){const t=lengthBytesUTF8(e),r=C._malloc(t+1);stringToUTF8(e,r,t+1);const n=C._ts_query_new(this[0],r,t,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!n){const t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=getValue(TRANSFER_BUFFER,"i32"),s=UTF8ToString(r,n).length,i=e.substr(s,100).split("\n")[0];let o,a=i.match(QUERY_WORD_REGEX)[0];switch(t){case 2:o=new RangeError(`Bad node name '${a}'`);break;case 3:o=new RangeError(`Bad field name '${a}'`);break;case 4:o=new RangeError(`Bad capture name @${a}`);break;case 5:o=new TypeError(`Bad pattern structure at offset ${s}: '${i}'...`),a="";break;default:o=new SyntaxError(`Bad syntax at offset ${s}: '${i}'...`),a=""}throw o.index=s,o.length=a.length,C._free(r),o}const s=C._ts_query_string_count(n),i=C._ts_query_capture_count(n),o=C._ts_query_pattern_count(n),a=new Array(i),u=new Array(s);for(let e=0;e<i;e++){const t=C._ts_query_capture_name_for_id(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");a[e]=UTF8ToString(t,r)}for(let e=0;e<s;e++){const t=C._ts_query_string_value_for_id(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");u[e]=UTF8ToString(t,r)}const l=new Array(o),c=new Array(o),d=new Array(o),p=new Array(o),h=new Array(o);for(let e=0;e<o;e++){const t=C._ts_query_predicates_for_pattern(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");p[e]=[],h[e]=[];const s=[];let i=t;for(let t=0;t<r;t++){const t=getValue(i,"i32");i+=SIZE_OF_INT;const r=getValue(i,"i32");if(i+=SIZE_OF_INT,t===PREDICATE_STEP_TYPE_CAPTURE)s.push({type:"capture",name:a[r]});else if(t===PREDICATE_STEP_TYPE_STRING)s.push({type:"string",value:u[r]});else if(s.length>0){if("string"!==s[0].type)throw new Error("Predicates must begin with a literal value");const t=s[0].value;let r,n=!0,i=!0;switch(t){case"any-not-eq?":case"not-eq?":n=!1;case"any-eq?":case"eq?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}"`);if(i=!t.startsWith("any-"),"capture"===s[2].type){const t=s[1].name,r=s[2].name;h[e].push((e=>{const s=[],o=[];for(const n of e)n.name===t&&s.push(n.node),n.name===r&&o.push(n.node);const a=(e,t,r)=>r?e.text===t.text:e.text!==t.text;return i?s.every((e=>o.some((t=>a(e,t,n))))):s.some((e=>o.some((t=>a(e,t,n)))))}))}else{r=s[1].name;const t=s[2].value,o=e=>e.text===t,a=e=>e.text!==t;h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node);const s=n?o:a;return i?t.every(s):t.some(s)}))}break;case"any-not-match?":case"not-match?":n=!1;case"any-match?":case"match?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);if("string"!==s[2].type)throw new Error(`Second argument of \`#${t}\` predicate must be a string. Got @${s[2].value}.`);r=s[1].name;const o=new RegExp(s[2].value);i=!t.startsWith("any-"),h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node.text);const s=(e,t)=>t?o.test(e):!o.test(e);return 0===t.length?!n:i?t.every((e=>s(e,n))):t.some((e=>s(e,n)))}));break;case"set!":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][s[1].value]=s[2]?s[2].value:null;break;case"is?":case"is-not?":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const a="is?"===t?c:d;a[e]||(a[e]={}),a[e][s[1].value]=s[2]?s[2].value:null;break;case"not-any-of?":n=!1;case"any-of?":if(s.length<2)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected at least 1. Got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);for(let e=2;e<s.length;e++)if("string"!==s[e].type)throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);r=s[1].name;const u=s.slice(2).map((e=>e.value));h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node.text);return 0===t.length?!n:t.every((e=>u.includes(e)))===n}));break;default:p[e].push({operator:t,operands:s.slice(1)})}s.length=0}}Object.freeze(l[e]),Object.freeze(c[e]),Object.freeze(d[e])}return C._free(r),new Query(INTERNAL,n,a,h,p,Object.freeze(l),Object.freeze(c),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const r=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=require$$0;t=Promise.resolve(e.readFileSync(r))}else t=fetch(r).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}return t.then((e=>loadWebAssemblyModule(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>LANGUAGE_FUNCTION_REGEX.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Language(INTERNAL,n)}))}}class LookaheadIterable{constructor(e,t,r){assertInternal(e),this[0]=t,this.language=r}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(e){return C._ts_lookahead_iterator_reset_state(this[0],e)}reset(e,t){return!!C._ts_lookahead_iterator_reset(this[0],e[0],t)&&(this.language=e,!0)}[Symbol.iterator](){const e=this;return{next:()=>C._ts_lookahead_iterator_next(e[0])?{done:!1,value:e.currentType}:{done:!0,value:""}}}}class Query{constructor(e,t,r,n,s,i,o,a){assertInternal(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=s,this.setProperties=i,this.assertedProperties=o,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,{startPosition:t=ZERO_POINT,endPosition:r=ZERO_POINT,startIndex:n=0,endIndex:s=0,matchLimit:i=4294967295,maxStartDepth:o=4294967295,timeoutMicros:a=0}={}){if("number"!=typeof i)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,n,s,i,o,a);const u=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),d=new Array(u);this.exceededMatchLimit=Boolean(c);let p=0,h=l;for(let t=0;t<u;t++){const t=getValue(h,"i32");h+=SIZE_OF_INT;const r=getValue(h,"i32");h+=SIZE_OF_INT;const n=new Array(r);if(h=unmarshalCaptures(this,e.tree,h,n),this.textPredicates[t].every((e=>e(n)))){d[p]={pattern:t,captures:n};const e=this.setProperties[t];e&&(d[p].setProperties=e);const r=this.assertedProperties[t];r&&(d[p].assertedProperties=r);const s=this.refutedProperties[t];s&&(d[p].refutedProperties=s),p++}}return d.length=p,C._free(l),d}captures(e,{startPosition:t=ZERO_POINT,endPosition:r=ZERO_POINT,startIndex:n=0,endIndex:s=0,matchLimit:i=4294967295,maxStartDepth:o=4294967295,timeoutMicros:a=0}={}){if("number"!=typeof i)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,n,s,i,o,a);const u=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),d=[];this.exceededMatchLimit=Boolean(c);const p=[];let h=l;for(let t=0;t<u;t++){const t=getValue(h,"i32");h+=SIZE_OF_INT;const r=getValue(h,"i32");h+=SIZE_OF_INT;const n=getValue(h,"i32");if(h+=SIZE_OF_INT,p.length=r,h=unmarshalCaptures(this,e.tree,h,p),this.textPredicates[t].every((e=>e(p)))){const e=p[n],r=this.setProperties[t];r&&(e.setProperties=r);const s=this.assertedProperties[t];s&&(e.assertedProperties=s);const i=this.refutedProperties[t];i&&(e.refutedProperties=i),d.push(e)}}return C._free(l),d}predicatesForPattern(e){return this.predicates[e]}disableCapture(e){const t=lengthBytesUTF8(e),r=C._malloc(t+1);stringToUTF8(e,r,t+1),C._ts_query_disable_capture(this[0],r,t),C._free(r)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(e,t,r){const n=r-t;let s=e.textCallback(t,null,r);for(t+=s.length;t<r;){const n=e.textCallback(t,null,r);if(!(n&&n.length>0))break;t+=n.length,s+=n}return t>r&&(s=s.slice(0,n)),s}function unmarshalCaptures(e,t,r,n){for(let s=0,i=n.length;s<i;s++){const i=getValue(r,"i32"),o=unmarshalNode(t,r+=SIZE_OF_INT);r+=SIZE_OF_NODE,n[s]={name:e.captureNames[i],node:o}}return r}function assertInternal(e){if(e!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(e){return e&&"number"==typeof e.row&&"number"==typeof e.column}function marshalNode(e){let t=TRANSFER_BUFFER;setValue(t,e.id,"i32"),t+=SIZE_OF_INT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,e[0],"i32")}function unmarshalNode(e,t=TRANSFER_BUFFER){const r=getValue(t,"i32");if(0===r)return null;const n=getValue(t+=SIZE_OF_INT,"i32"),s=getValue(t+=SIZE_OF_INT,"i32"),i=getValue(t+=SIZE_OF_INT,"i32"),o=getValue(t+=SIZE_OF_INT,"i32"),a=new Node(INTERNAL,e);return a.id=r,a.startIndex=n,a.startPosition={row:s,column:i},a[0]=o,a}function marshalTreeCursor(e,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,e[0],"i32"),setValue(t+1*SIZE_OF_INT,e[1],"i32"),setValue(t+2*SIZE_OF_INT,e[2],"i32"),setValue(t+3*SIZE_OF_INT,e[3],"i32")}function unmarshalTreeCursor(e){e[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),e[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),e[3]=getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(e,t){setValue(e,t.row,"i32"),setValue(e+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(e){return{row:getValue(e,"i32")>>>0,column:getValue(e+SIZE_OF_INT,"i32")>>>0}}function marshalRange(e,t){marshalPoint(e,t.startPosition),marshalPoint(e+=SIZE_OF_POINT,t.endPosition),setValue(e+=SIZE_OF_POINT,t.startIndex,"i32"),setValue(e+=SIZE_OF_INT,t.endIndex,"i32"),e+=SIZE_OF_INT}function unmarshalRange(e){const t={};return t.startPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.startIndex=getValue(e,"i32")>>>0,e+=SIZE_OF_INT,t.endIndex=getValue(e,"i32")>>>0,t}function marshalEdit(e){let t=TRANSFER_BUFFER;marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.newEndPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.newEndIndex,"i32"),t+=SIZE_OF_INT}for(const e of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,e,{value:ParserImpl.prototype[e],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}})))}}return Parser}();module.exports=TreeSitter}(treeSitter)),treeSitter.exports}var treeSitterExports=requireTreeSitter();const Parser=getDefaultExportFromCjs(treeSitterExports);let parser=null,parserInitLock=null;const activeTrees=new Set,MAX_ACTIVE_TREES=5,createAnalyze=e=>async t=>{if(null===parser&&null===parserInitLock?(parserInitLock=Parser.init().then((()=>Parser.Language.load(e))).then((e=>{const t=new Parser;return t.setLanguage(e),t})).finally((()=>{parserInitLock=null})),parser=await parserInitLock):null===parser&&null!==parserInitLock&&(parser=await parserInitLock),null===parser)throw new ApiDOMError("Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.");if(activeTrees.size>=MAX_ACTIVE_TREES){const e=[...activeTrees];activeTrees.clear();for(const t of e)t.delete()}const r=parser.parse(t);activeTrees.add(r);const n=r.delete;return r.delete=function(){activeTrees.delete(this),n.call(this)},parser.reset(),r},analyze$1=createAnalyze(treeSitterYaml);class TreeCursorSyntaxNode{type;startPositionRow;startPositionColumn;startIndex;endPositionRow;endPositionColumn;endIndex;text;isNamed;isMissing;fieldName;hasError=!1;children=[];previousSibling;constructor(e){this.type=e.nodeType,this.startPositionRow=e.startPosition.row,this.startPositionColumn=e.startPosition.column,this.startIndex=e.startIndex,this.endPositionRow=e.endPosition.row,this.endPositionColumn=e.endPosition.column,this.endIndex=e.endIndex,this.text=e.nodeText,this.isNamed=e.nodeIsNamed,this.isMissing=e.nodeIsMissing}get keyNode(){if("flow_pair"===this.type||"block_mapping_pair"===this.type)return this.children.find((e=>"key"===e.fieldName))}get valueNode(){if("flow_pair"===this.type||"block_mapping_pair"===this.type)return this.children.find((e=>"value"===e.fieldName))}get tag(){let{previousSibling:e}=this;for(;void 0!==e&&"tag"!==e.type;)({previousSibling:e}=e);return e}get anchor(){let{previousSibling:e}=this;for(;void 0!==e&&"anchor"!==e.type;)({previousSibling:e}=e);return e}get firstNamedChild(){return this.children.find((e=>e.isNamed))}setFieldName(e){return this.fieldName=e.currentFieldName,this}setHasError(e){return this.hasError=e.currentNode.hasError,this}setPreviousSibling(e){this.previousSibling=e}pushChildren(...e){this.children.push(...e)}}const keyMap$2={stream:["children"],document:["children"],mapping:["children"],keyValuePair:["children"],sequence:["children"],error:["children"]},isNode$1=e=>Array.isArray(e)||isNode$3(e);class CstVisitor{static isScalar=this.isKind("scalar");static isMapping=this.isKind("mapping");static isSequence=this.isKind("sequence");static isKind(e){return t=>null!=t&&"object"==typeof t&&"type"in t&&"string"==typeof t.type&&t.type.endsWith(e)}static kindNodeToYamlAnchor(e){const{anchor:t}=e;if(void 0!==t)return new YamlAnchor(assignSourceMap({name:t.text},t))}static hasKeyValuePairEmptyKey(e){return("block_mapping_pair"===e.type||"flow_pair"===e.type)&&void 0===e.keyNode}static hasKeyValuePairEmptyValue(e){return("block_mapping_pair"===e.type||"flow_pair"===e.type)&&void 0===e.valueNode}static kindNodeToYamlTag(e){const{tag:t}=e,r=(null==t?void 0:t.text)||("plain_scalar"===e.type?"?":"!"),n=e.type.endsWith("mapping")?YamlNodeKind.Mapping:e.type.endsWith("sequence")?YamlNodeKind.Sequence:YamlNodeKind.Scalar;return new YamlTag(assignSourceMap({explicitName:r,kind:n},t))}schema;referenceManager;stream={enter:e=>new YamlStream(assignSourceMap({children:e.children,isMissing:e.isMissing},e)),leave:e=>new ParseResult({children:[e]})};yaml_directive={enter:e=>{var t;const r=null==e||null===(t=e.firstNamedChild)||void 0===t?void 0:t.text;return new YamlDirective(assignSourceMap({name:"%YAML",parameters:{version:r}},e))}};tag_directive={enter:e=>{const t=e.children[0],r=e.children[1],n=new YamlDirective(assignSourceMap({name:"%TAG",parameters:{handle:null==t?void 0:t.text,prefix:null==r?void 0:r.text}},e));return this.schema.registerTagDirective(n),n}};reserved_directive={enter:e=>{const t=e.children[0],r=e.children[1],n=e.children[2];return new YamlDirective(assignSourceMap({name:null==t?void 0:t.text,parameters:{handle:null==r?void 0:r.text,prefix:null==n?void 0:n.text}},e))}};document={enter:e=>new YamlDocument(assignSourceMap({children:e.children,isMissing:e.isMissing},e)),leave:e=>{e.children=e.children.flat()}};block_node={enter:e=>e.children};flow_node={enter:e=>{const[t]=e.children.slice(-1);if(CstVisitor.isScalar(t)||CstVisitor.isMapping(t)||CstVisitor.isSequence(t))return e.children;const r=new YamlScalar({content:"",anchor:CstVisitor.kindNodeToYamlAnchor(t),tag:CstVisitor.kindNodeToYamlTag(t),startPositionRow:t.endPositionRow,startPositionColumn:t.endPositionColumn,startIndex:t.endIndex,endPositionRow:t.endPositionRow,endPositionColumn:t.endPositionColumn,endIndex:t.endIndex,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(r),[...e.children,r]}};tag={enter:()=>null};anchor={enter:()=>null};block_mapping={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlMapping(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:YamlStyle.NextLine,isMissing:e.isMissing},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_mapping_pair={enter:e=>{const t=[...e.children];if(CstVisitor.hasKeyValuePairEmptyKey(e)){const r=this.createKeyValuePairEmptyKey(e);t.unshift(r)}if(CstVisitor.hasKeyValuePairEmptyValue(e)){const r=this.createKeyValuePairEmptyValue(e);t.push(r)}return new YamlKeyValuePair(assignSourceMap({children:t,styleGroup:YamlStyleGroup.Block,isMissing:e.isMissing},e))}};flow_mapping={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlMapping(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Explicit,isMissing:e.isMissing},e));return this.registerAnchor(n),this.schema.resolve(n)}};flow_pair={enter:e=>{const t=[...e.children];if(CstVisitor.hasKeyValuePairEmptyKey(e)){const r=this.createKeyValuePairEmptyKey(e);t.unshift(r)}if(CstVisitor.hasKeyValuePairEmptyValue(e)){const r=this.createKeyValuePairEmptyValue(e);t.push(r)}return new YamlKeyValuePair(assignSourceMap({children:t,styleGroup:YamlStyleGroup.Flow,isMissing:e.isMissing},e))}};keyValuePair={leave:e=>{e.children=e.children.flat()}};block_sequence={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlSequence(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:YamlStyle.NextLine},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_sequence_item={enter:e=>{if(e.children.length>1)return e.children;return[new YamlScalar({content:"",tag:new YamlTag({explicitName:"?",kind:YamlNodeKind.Scalar}),startPositionRow:e.endPositionRow,startPositionColumn:e.endPositionColumn,startIndex:e.endIndex,endPositionRow:e.endPositionRow,endPositionColumn:e.endPositionColumn,endIndex:e.endIndex,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain})]}};flow_sequence={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlSequence(assignSourceMap({children:e.children.flat(),anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Explicit},e));return this.registerAnchor(n),this.schema.resolve(n)}};sequence={leave:e=>{e.children=e.children.flat(1/0)}};plain_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain},e));return this.registerAnchor(n),this.schema.resolve(n)}};single_quote_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.SingleQuoted},e));return this.registerAnchor(n),this.schema.resolve(n)}};double_quote_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.DoubleQuoted},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=e.text.startsWith("|")?YamlStyle.Literal:e.text.startsWith(">")?YamlStyle.Folded:YamlStyle.Plain,s=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:n},e));return this.registerAnchor(s),this.schema.resolve(s)}};comment={enter:e=>new YamlComment({content:e.text})};alias={enter:e=>{const t=new YamlAlias({content:e.text});return this.referenceManager.resolveAlias(t)}};constructor(e){this.schema=e}enter(e){if(e instanceof TreeCursorSyntaxNode&&!e.isNamed){const t=e.type||e.text,{isMissing:r}=e;return new Literal(assignSourceMap({value:t,isMissing:r},e))}}ERROR(e,t,r,n){const s=new Error$1(assignSourceMap({children:e.children,isUnexpected:!e.hasError,isMissing:e.isMissing,value:e.text},e));return 0===n.length?new ParseResult({children:[s]}):s}registerAnchor(e){void 0!==e.anchor&&this.referenceManager.addAnchor(e)}createKeyValuePairEmptyKey(e){const{keyNode:t}=e,r=(null==t?void 0:t.children)||[],n=r.find(CstVisitor.isKind("tag")),s=r.find(CstVisitor.isKind("anchor")),i=new YamlTag(void 0!==n?assignSourceMap({explicitName:n.text,kind:YamlNodeKind.Scalar},n):{explicitName:"?",kind:YamlNodeKind.Scalar}),o=void 0!==s?new YamlAnchor(assignSourceMap({name:s.text},s)):void 0,a=new YamlScalar({content:"",startPositionRow:e.startPositionRow,startPositionColumn:e.startPositionColumn,startIndex:e.startIndex,endPositionRow:e.startPositionRow,endPositionColumn:e.startPositionColumn,endIndex:e.startIndex,tag:i,anchor:o,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(a),a}createKeyValuePairEmptyValue(e){const{valueNode:t}=e,r=(null==t?void 0:t.children)||[],n=r.find(CstVisitor.isKind("tag")),s=r.find(CstVisitor.isKind("anchor")),i=new YamlTag(void 0!==n?assignSourceMap({explicitName:n.text,kind:YamlNodeKind.Scalar},n):{explicitName:"?",kind:YamlNodeKind.Scalar}),o=void 0!==s?new YamlAnchor(assignSourceMap({name:s.text},s)):void 0,a=new YamlScalar({content:"",startPositionRow:e.endPositionRow,startPositionColumn:e.endPositionColumn,startIndex:e.endIndex,endPositionRow:e.endPositionRow,endPositionColumn:e.endPositionColumn,endIndex:e.endIndex,tag:i,anchor:o,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(a),a}}const keyMap$1={stream:["children"],document:["children"],mapping:["children"],keyValuePair:["children"],sequence:["children"],error:["children"],...keyMapDefault$1},getNodeType$1=e=>isElement(e)?getNodeType$2(e):getNodeType$3(e),isNode=e=>isElement(e)||isNode$3(e)||Array.isArray(e);class YamlAstVisitor{sourceMap=!1;annotations;namespace;processedDocumentCount=0;stream={leave:e=>{const t=new ParseResult$1;t._content=e.children.flat(1);const r=t.findElements(isPrimitiveElement);if(r.length>0){r[0].classes.push("result")}return this.annotations.forEach((e=>{t.push(e)})),this.annotations=[],t}};constructor(){this.annotations=[],this.namespace=createNamespace()}comment(e){if(0===this.processedDocumentCount){const t=new Comment(e.content);return this.maybeAddSourceMap(e,t),t}return null}document(e){const t=1===this.processedDocumentCount,r=this.processedDocumentCount>=1;if(t){const t=new Annotation("Only first document within YAML stream will be used. Rest will be discarded.");t.classes.push("warning"),this.maybeAddSourceMap(e,t),this.annotations.push(t)}return r?null:(this.processedDocumentCount+=1,e.children)}mapping(e){const t=new minimExports.ObjectElement;return t._content=e.children,this.maybeAddSourceMap(e,t),t}keyValuePair(e){const t=new minimExports.MemberElement;return t.content.key=e.key,t.content.value=e.value,this.maybeAddSourceMap(e,t),e.children.filter((e=>"error"===e.type)).forEach((t=>{this.error(t,e,[],[e])})),t}sequence(e){const t=new minimExports.ArrayElement;return t._content=e.children,this.maybeAddSourceMap(e,t),t}scalar(e){const t=this.namespace.toElement(e.content);return""===e.content&&e.style===YamlStyle.Plain&&(t.classes.push("yaml-e-node"),t.classes.push("yaml-e-scalar")),this.maybeAddSourceMap(e,t),t}literal(e){if(e.isMissing){const t=`(Missing ${e.value})`,r=new Annotation(t);r.classes.push("warning"),this.maybeAddSourceMap(e,r),this.annotations.push(r)}return null}error(e,t,r,n){const s=e.isUnexpected?"(Unexpected YAML syntax error)":"(Error YAML syntax error)",i=new Annotation(s);if(i.classes.push("error"),this.maybeAddSourceMap(e,i),0===n.length){const e=new ParseResult$1;return e.push(i),e}return this.annotations.push(i),null}maybeAddSourceMap(e,t){this.sourceMap&&assignSourceMap(t,e)}}class TreeCursorIterator{cursor;constructor(e){this.cursor=e}stream(){return new TreeCursorSyntaxNode(this.cursor)}yaml_directive(){return new TreeCursorSyntaxNode(this.cursor)}tag_directive(){return new TreeCursorSyntaxNode(this.cursor)}reserved_directive(){return new TreeCursorSyntaxNode(this.cursor)}document(){return new TreeCursorSyntaxNode(this.cursor)}block_node(){return new TreeCursorSyntaxNode(this.cursor).setFieldName(this.cursor)}flow_node(){return new TreeCursorSyntaxNode(this.cursor).setFieldName(this.cursor)}block_mapping(){return new TreeCursorSyntaxNode(this.cursor)}block_mapping_pair(){return new TreeCursorSyntaxNode(this.cursor)}flow_mapping(){return new TreeCursorSyntaxNode(this.cursor)}flow_pair(){return new TreeCursorSyntaxNode(this.cursor)}block_sequence(){return new TreeCursorSyntaxNode(this.cursor)}block_sequence_item(){return new TreeCursorSyntaxNode(this.cursor)}flow_sequence(){return new TreeCursorSyntaxNode(this.cursor)}plain_scalar(){return new TreeCursorSyntaxNode(this.cursor)}single_quote_scalar(){return new TreeCursorSyntaxNode(this.cursor)}double_quote_scalar(){return new TreeCursorSyntaxNode(this.cursor)}block_scalar(){return new TreeCursorSyntaxNode(this.cursor)}ERROR(){return new TreeCursorSyntaxNode(this.cursor).setHasError(this.cursor)}*[Symbol.iterator](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new TreeCursorSyntaxNode(this.cursor),this.cursor.gotoFirstChild()){const[t]=new TreeCursorIterator(this.cursor);for(e.pushChildren(t);this.cursor.gotoNextSibling();){const t=Array.from(new TreeCursorIterator(this.cursor));e.pushChildren(...t)}e.children.reduce(((e,t)=>(t.setPreviousSibling(e),t)),void 0),this.cursor.gotoParent()}yield e}}const analyze=(e,{sourceMap:t=!1}={})=>{const r=e.walk(),n=new TreeCursorIterator(r),[s]=Array.from(n),i=new CstVisitor,o=new YamlAstVisitor,a=new JsonSchema,u=new ReferenceManager,l=visit$2(s,i,{keyMap:keyMap$2,nodePredicate:isNode$1,state:{schema:a,sourceMap:t,referenceManager:u}});return visit$2(l.rootNode,o,{keyMap:keyMap$1,nodeTypeGetter:getNodeType$1,nodePredicate:isNode,state:{sourceMap:t}})},detect$1=async e=>{let t=null;try{return t=await analyze$1(e),!t.rootNode.isError}catch{return!1}finally{null!==t&&t.delete()}},parse$1=async(e,{sourceMap:t=!1}={})=>{let r=null;try{return r=await analyze$1(e),analyze(r,{sourceMap:t})}finally{null!==r&&r.delete()}};class JSONSchema extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 JSONReference extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class Media extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class LinkDescription extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 jsonSchemaDraft4={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",JSONSchema),t.register("jSONReference",JSONReference),t.register("media",Media),t.register("linkDescription",LinkDescription),t}},getNodeType=e=>{if(isElement(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},keyMap={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...keyMapDefault$1};class Visitor{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=deepmerge(t.meta,e.meta)),hasElementSourceMap(e)&&assignSourceMap(t,e),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=deepmerge(t.attributes,e.attributes))}}class FallbackVisitor extends Visitor{enter(e){return this.element=cloneDeep(e),BREAK}}const copyProps=(e,t,r=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of r)delete n[e];Object.defineProperties(e,n)},protoChain=(e,t=[e])=>{const r=Object.getPrototypeOf(e);return null===r?t:protoChain(r,[...t,r])},nearestCommonProto=(...e)=>{if(0===e.length)return;let t;const r=e.map((e=>protoChain(e)));for(;r.every((e=>e.length>0));){const e=r.map((e=>e.pop())),n=e[0];if(!e.every((e=>e===n)))break;t=n}return t},hardMixProtos=(e,t,r=[])=>{var n;const s=null!==(n=nearestCommonProto(...e))&&void 0!==n?n:Object.prototype,i=Object.create(s),o=protoChain(s);for(let t of e){let e=protoChain(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(copyProps(i,n,["constructor",...r]),o.push(n))}}return i.constructor=t,i},unique=e=>e.filter(((t,r)=>e.indexOf(t)==r)),mixins=new WeakMap,getMixinsForClass=e=>mixins.get(e),registerMixins=(e,t)=>mixins.set(e,t),mergeObjectsOfDecorators=(e,t)=>{var r,n;const s=unique([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=unique([...null!==(r=null==e?void 0:e[o])&&void 0!==r?r:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},mergePropertyAndMethodDecorators=(e,t)=>{var r,n,s,i;return{property:mergeObjectsOfDecorators(null!==(r=null==e?void 0:e.property)&&void 0!==r?r:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:mergeObjectsOfDecorators(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},mergeDecorators=(e,t)=>{var r,n,s,i,o,a;return{class:unique([...null!==(r=null==e?void 0:e.class)&&void 0!==r?r:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:mergePropertyAndMethodDecorators(null!==(s=null==e?void 0:e.static)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:mergePropertyAndMethodDecorators(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(a=null==t?void 0:t.instance)&&void 0!==a?a:{})}},decorators=new Map,findAllConstituentClasses=(...e)=>{var t;const r=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const s=[...protoChain(e.prototype).map((e=>e.constructor)),...null!==(t=getMixinsForClass(e))&&void 0!==t?t:[]].filter((e=>!r.has(e)));for(let e of s)n.add(e);r.add(e),n.delete(e)}return[...r]},deepDecoratorSearch=(...e)=>{const t=findAllConstituentClasses(...e).map((e=>decorators.get(e))).filter((e=>!!e));return 0==t.length?{}:1==t.length?t[0]:t.reduce(((e,t)=>mergeDecorators(e,t)))};function Mixin(...e){var t,r,n;const s=e.map((e=>e.prototype));function i(...t){for(const r of e)copyProps(this,new r(...t))}i.prototype=hardMixProtos(s,i),Object.setPrototypeOf(i,hardMixProtos(e,null,["prototype"]));let o=i;{const s=deepDecoratorSearch(...e);for(let e of null!==(t=null==s?void 0:s.class)&&void 0!==t?t:[]){const t=e(o);t&&(o=t)}applyPropAndMethodDecorators(null!==(r=null==s?void 0:s.static)&&void 0!==r?r:{},o),applyPropAndMethodDecorators(null!==(n=null==s?void 0:s.instance)&&void 0!==n?n:{},o.prototype)}return registerMixins(o,e),o}const applyPropAndMethodDecorators=(e,t)=>{const r=e.property,n=e.method;if(r)for(let e in r)for(let n of r[e])n(t,e);if(n)for(let e in n)for(let r of n[e])r(t,e,Object.getOwnPropertyDescriptor(t,e))};class SpecificationVisitor extends Visitor{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return pick(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=path$1(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return pathSatisfies(isFunction,["visitors",...e],this.specObj)?path$1(["visitors",...e],this.specObj):path$1(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r);return n instanceof FallbackVisitor&&(null==n?void 0:n.constructor)===FallbackVisitor?cloneDeep(t):(visit$1(t,n,r),n.element)}}class FixedFieldsVisitor extends SpecificationVisitor{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,n,s)=>{if(isStringElement(n)&&r.includes(serializer(n))&&!this.ignoredFields.includes(serializer(n))){const r=this.toRefractedElement([...t,"fixedFields",serializer(n)],e),i=new minimExports.MemberElement(cloneDeep(n),r);this.copyMetaAndAttributes(s,i),i.classes.push("fixed-field"),this.element.content.push(i)}else this.ignoredFields.includes(serializer(n))||this.element.content.push(cloneDeep(s))})),this.copyMetaAndAttributes(e,this.element),BREAK}}class ParentSchemaAwareVisitor{parent;constructor({parent:e}){this.parent=e}}const isJSONSchemaElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof JSONSchema||e(n)&&t("JSONSchemaDraft4",n)&&r("object",n))),isJSONReferenceElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof JSONReference||e(n)&&t("JSONReference",n)&&r("object",n))),isMediaElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Media||e(n)&&t("media",n)&&r("object",n))),isLinkDescriptionElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof LinkDescription||e(n)&&t("linkDescription",n)&&r("object",n))),jsonSchemaDraft4Predicates=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:isJSONReferenceElement,isJSONSchemaElement:isJSONSchemaElement,isLinkDescriptionElement:isLinkDescriptionElement,isMediaElement:isMediaElement},Symbol.toStringTag,{value:"Module"}));class JSONSchemaVisitor extends(Mixin(FixedFieldsVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new JSONSchema,this.specPath=always(["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,FixedFieldsVisitor.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(isUndefined(this.parent)&&!isStringElement(e.get("$schema")))this.element.setMetaProperty("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(isJSONSchemaElement(this.parent)&&!isStringElement(e.get("$schema"))){const e=defaultTo(serializer(this.parent.meta.get("inheritedDialectIdentifier")),serializer(this.parent.$schema));this.element.setMetaProperty("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const r=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty("ancestorsSchemaIdentifiers",[])):new minimExports.ArrayElement,n=serializer(e.get(t));isNonEmptyString(n)&&r.push(n),this.element.setMetaProperty("ancestorsSchemaIdentifiers",r)}}const isJSONReferenceLikeElement=e=>isObjectElement(e)&&e.hasKey("$ref");class ItemsVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){ObjectElement(e){const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),BREAK}ArrayElement(e){return this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-items"),e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class RequiredVisitor extends FallbackVisitor{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}}class PatternedFieldsVisitor extends SpecificationVisitor{specPath;ignoredFields;fieldPatternPredicate=F;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(!this.ignoredFields.includes(serializer(t))&&this.fieldPatternPredicate(serializer(t))){const n=this.specPath(e),s=this.toRefractedElement(n,e),i=new minimExports.MemberElement(cloneDeep(t),s);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(serializer(t))||this.element.content.push(cloneDeep(r))})),this.copyMetaAndAttributes(e,this.element),BREAK}}class MapVisitor extends PatternedFieldsVisitor{constructor(e){super(e),this.fieldPatternPredicate=isNonEmptyString}}class PropertiesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-properties"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class PatternPropertiesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class DependenciesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class EnumVisitor extends FallbackVisitor{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}}class TypeVisitor extends FallbackVisitor{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}}class AllOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class AnyOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class OneOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class DefinitionsVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-definitions"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class LinksVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach((e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class JSONReferenceVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new JSONReference,this.specPath=always(["document","objects","JSONReference"])}ObjectElement(e){const t=FixedFieldsVisitor.prototype.ObjectElement.call(this,e);return isStringElement(this.element.$ref)&&this.element.classes.push("reference-element"),t}}class $RefVisitor extends FallbackVisitor{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}}class AlternatingVisitor extends SpecificationVisitor{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>ifElse(e,always(t),stubUndefined))),r=dispatch(t)(e);return this.element=this.toRefractedElement(r,e),BREAK}}class SchemaOrReferenceVisitor extends AlternatingVisitor{constructor(e){super(e),this.alternator=[{predicate:isJSONReferenceLikeElement,specPath:["document","objects","JSONReference"]},{predicate:T,specPath:["document","objects","JSONSchema"]}]}}class MediaVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new Media,this.specPath=always(["document","objects","Media"])}}class LinkDescriptionVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new LinkDescription,this.specPath=always(["document","objects","LinkDescription"])}}const specification={visitors:{value:FallbackVisitor,JSONSchemaOrJSONReferenceVisitor:SchemaOrReferenceVisitor,document:{objects:{JSONSchema:{$visitor:JSONSchemaVisitor,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:SchemaOrReferenceVisitor,items:ItemsVisitor,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:RequiredVisitor,properties:PropertiesVisitor,additionalProperties:SchemaOrReferenceVisitor,patternProperties:PatternPropertiesVisitor,dependencies:DependenciesVisitor,enum:EnumVisitor,type:TypeVisitor,allOf:AllOfVisitor,anyOf:AnyOfVisitor,oneOf:OneOfVisitor,not:SchemaOrReferenceVisitor,definitions:DefinitionsVisitor,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:LinksVisitor,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:JSONReferenceVisitor,fixedFields:{$ref:$RefVisitor}},Media:{$visitor:MediaVisitor,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:LinkDescriptionVisitor,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:SchemaOrReferenceVisitor,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:SchemaOrReferenceVisitor}}}}}},createToolbox=()=>{const e=createNamespace(jsonSchemaDraft4);return{predicates:{...jsonSchemaDraft4Predicates,isStringElement:isStringElement},namespace:e}},refract=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=specification}={})=>{const s=minimExports.refract(e),i=dereference(n),o=new(path$1(t,i))({specObj:i});return visit$1(s,o),dispatchPluginsSync(o.element,r,{toolboxCreator:createToolbox,visitorOptions:{keyMap:keyMap,nodeTypeGetter:getNodeType}})},createRefractor=e=>(t,r={})=>refract(t,{specPath:e,...r});JSONSchema.refract=createRefractor(["visitors","document","objects","JSONSchema","$visitor"]),JSONReference.refract=createRefractor(["visitors","document","objects","JSONReference","$visitor"]),Media.refract=createRefractor(["visitors","document","objects","Media","$visitor"]),LinkDescription.refract=createRefractor(["visitors","document","objects","LinkDescription","$visitor"]);class OpenAPIMediaTypes extends MediaTypes{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter((e=>e.includes(t)))}findBy(e="2.0",t="generic"){const r="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find((e=>e.includes(r)))||this.unknownMediaType}latest(e="generic"){return last(this.filterByFormat(e))}}const mediaTypes=new OpenAPIMediaTypes("application/vnd.oai.openapi;version=2.0","application/vnd.oai.openapi+json;version=2.0","application/vnd.oai.openapi+yaml;version=2.0");class Swagger extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="swagger",this.classes.push("api")}get swagger(){return this.get("swagger")}set swagger(e){this.set("swagger",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get host(){return this.get("host")}set host(e){this.set("host",e)}get basePath(){return this.get("basePath")}set basePath(e){this.set("basePath",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get consumes(){return this.get("consumes")}set consumes(e){this.set("consumes",e)}get produces(){return this.get("produces")}set produces(e){this.set("produces",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get securityDefinitions(){return this.get("securityDefinitions")}set securityDefinitions(e){this.set("securityDefinitions",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)}}class SwaggerVersion extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="swaggerVersion",this.classes.push("spec-version"),this.classes.push("version")}}class Info extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Contact extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class License extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Paths extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="paths"}}class PathItem extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",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 parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}}class Operation extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new minimExports.BooleanElement(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}}class ExternalDocumentation extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Parameter extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="parameter",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Parameter class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Parameter class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Parameter class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Parameter class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Parameter class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Parameter class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Parameter class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Parameter class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Parameter class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Parameter class is not not supported.")}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){throw new UnsupportedOperationError("properties getter in Parameter class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Parameter class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Parameter class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Parameter class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Parameter class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Parameter class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Parameter class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Parameter class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Parameter class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Parameter class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Parameter class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Parameter class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Parameter class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Parameter class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Parameter class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Parameter class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Parameter class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Parameter class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Parameter class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Parameter class is not not supported.")}get description(){return this.get("description")}set description(e){this.set("description,",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){throw new UnsupportedOperationError("base getter in Parameter class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Parameter class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Parameter class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Parameter class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Parameter class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Parameter class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Parameter class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Parameter class is not not supported.")}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 schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class Items extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="items",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Items class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Items class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Items class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Items class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Items class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Items class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Items class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Items class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Items class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Items class is not not supported.")}get required(){throw new UnsupportedOperationError("required getter in Items class is not not supported.")}set required(e){throw new UnsupportedOperationError("required setter in Items class is not not supported.")}get properties(){throw new UnsupportedOperationError("properties getter in Items class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Items class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Items class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Items class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Items class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Items class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Items class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Items class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Items class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Items class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Items class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Items class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Items class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Items class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Items class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Items class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Items class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Items class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Items class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Items class is not not supported.")}get description(){throw new UnsupportedOperationError("description getter in Items class is not not supported.")}set description(e){throw new UnsupportedOperationError("description setter in Items class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Items class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Items class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Items class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Items class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Items class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Items class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Items class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Items class is not not supported.")}}class Example extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="example"}}class Responses extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}}class Response extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}}class Headers extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="headers"}}class Header extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="header",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Header class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Header class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Header class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Header class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Header class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Header class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Header class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Header class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Header class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Header class is not not supported.")}get required(){throw new UnsupportedOperationError("required getter in Header class is not not supported.")}set required(e){throw new UnsupportedOperationError("required setter in Header class is not not supported.")}get properties(){throw new UnsupportedOperationError("properties getter in Header class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Header class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Header class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Header class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Header class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Header class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Header class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Header class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Header class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Header class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Header class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Header class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Header class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Header class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Header class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Header class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Header class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Header class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Header class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Header class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Header class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Header class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Header class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Header class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Header class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Header class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Header class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Header class is not not supported.")}}class Tag extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Schema extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Schema class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Schema class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Schema class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Schema class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Schema class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Schema class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Schema class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Schema class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Schema class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Schema class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Schema class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Schema class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Schema class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Schema class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Schema class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Schema class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Schema class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Schema class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Schema class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Schema class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Schema class is not not supported.")}}class Xml extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Reference extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class Definitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="definitions"}}class ParametersDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="parametersDefinitions"}}class ResponsesDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="responsesDefinitions"}}class SecurityDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="securityDefinitions"}}class SecurityScheme extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 flow(){return this.get("flow")}set flow(e){this.set("flow",e)}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 scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}}class Scopes extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="scopes"}}class SecurityRequirement extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="securityRequirement"}}const openApi2={namespace:e=>{const{base:t}=e;return t.register("swagger",Swagger),t.register("swaggerVersion",SwaggerVersion),t.register("info",Info),t.register("contact",Contact),t.register("license",License),t.register("paths",Paths),t.register("pathItem",PathItem),t.register("operation",Operation),t.register("externalDocumentation",ExternalDocumentation),t.register("parameter",Parameter),t.register("items",Items),t.register("responses",Responses),t.register("response",Response),t.register("headers",Headers),t.register("example",Example),t.register("header",Header),t.register("tag",Tag),t.register("reference",Reference),t.register("schema",Schema),t.register("xml",Xml),t.register("definitions",Definitions),t.register("parametersDefinitions",ParametersDefinitions),t.register("responsesDefinitions",ResponsesDefinitions),t.register("securityDefinitions",SecurityDefinitions),t.register("securityScheme",SecurityScheme),t.register("scopes",Scopes),t.register("securityRequirement",SecurityRequirement),t}},yamlMediaTypes=new OpenAPIMediaTypes(...mediaTypes.filterByFormat("generic"),...mediaTypes.filterByFormat("yaml"));var __async=(e,t,r)=>new Promise(((n,s)=>{var i=e=>{try{a(r.next(e))}catch(e){s(e)}},o=e=>{try{a(r.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);a((r=r.apply(e,t)).next())}));const detectionRegExp=new RegExp('(?<YAML>^(["\']?)swagger\\2\\s*:\\s*(["\'])(?<version_yaml>2\\.0)\\3(?:\\s+|$))|(?<JSON>"swagger"\\s*:\\s*"(?<version_json>2\\.0)")',"m"),detect=e=>__async(null,null,(function*(){return detectionRegExp.test(e)&&(yield detect$1(e))})),parse=(e,...t)=>__async(null,[e,...t],(function*(e,t={}){const r=propOr({},"refractorOpts",t),n=omit(["refractorOpts"],t),s=yield parse$1(e,n),{result:i}=s;if(isNotUndefined(i)){const e=Swagger.refract(i,r);e.classes.push("result"),s.replaceResult(e)}return s})),namespace=createNamespace(openApi2);exports.detect=detect,exports.detectionRegExp=detectionRegExp,exports.mediaTypes=yamlMediaTypes,exports.namespace=namespace,exports.parse=parse,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("fs"),require("path")):"function"==typeof define&&define.amd?define(["exports","fs","path"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).apidomParserAdapterOpenapiYaml2={},e.fs,e.path)}(this,(function(exports,require$$0,require$$1){"use strict";var F=function(){return!1},T=function(){return!0};function _isPlaceholder(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function _curry1(e){return function t(r){return 0===arguments.length||_isPlaceholder(r)?t:e.apply(this,arguments)}}function _curry2(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(r)?t:_curry1((function(t){return e(r,t)}));default:return _isPlaceholder(r)&&_isPlaceholder(n)?t:_isPlaceholder(r)?_curry1((function(t){return e(t,n)})):_isPlaceholder(n)?_curry1((function(t){return e(r,t)})):e(r,n)}}}function _concat(e,t){var r;t=t||[];var n=(e=e||[]).length,s=t.length,i=[];for(r=0;r<n;)i[i.length]=e[r],r+=1;for(r=0;r<s;)i[i.length]=t[r],r+=1;return i}function _arity(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,s){return t.apply(this,arguments)};case 5:return function(e,r,n,s,i){return t.apply(this,arguments)};case 6:return function(e,r,n,s,i,o){return t.apply(this,arguments)};case 7:return function(e,r,n,s,i,o,a){return t.apply(this,arguments)};case 8:return function(e,r,n,s,i,o,a,u){return t.apply(this,arguments)};case 9:return function(e,r,n,s,i,o,a,u,l){return t.apply(this,arguments)};case 10:return function(e,r,n,s,i,o,a,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(e,t,r){return function(){for(var n=[],s=0,i=e,o=0,a=!1;o<t.length||s<arguments.length;){var u;o<t.length&&(!_isPlaceholder(t[o])||s>=arguments.length)?u=t[o]:(u=arguments[s],s+=1),n[o]=u,_isPlaceholder(u)?a=!0:i-=1,o+=1}return!a&&i<=0?r.apply(this,n):_arity(Math.max(0,i),_curryN(e,n,r))}}var curryN=_curry2((function(e,t){return 1===e?_curry1(t):_arity(e,_curryN(e,[],t))}));function _curry3(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(r)?t:_curry2((function(t,n){return e(r,t,n)}));case 2:return _isPlaceholder(r)&&_isPlaceholder(n)?t:_isPlaceholder(r)?_curry2((function(t,r){return e(t,n,r)})):_isPlaceholder(n)?_curry2((function(t,n){return e(r,t,n)})):_curry1((function(t){return e(r,n,t)}));default:return _isPlaceholder(r)&&_isPlaceholder(n)&&_isPlaceholder(s)?t:_isPlaceholder(r)&&_isPlaceholder(n)?_curry2((function(t,r){return e(t,r,s)})):_isPlaceholder(r)&&_isPlaceholder(s)?_curry2((function(t,r){return e(t,n,r)})):_isPlaceholder(n)&&_isPlaceholder(s)?_curry2((function(t,n){return e(r,t,n)})):_isPlaceholder(r)?_curry1((function(t){return e(t,n,s)})):_isPlaceholder(n)?_curry1((function(t){return e(r,t,s)})):_isPlaceholder(s)?_curry1((function(t){return e(r,n,t)})):e(r,n,s)}}}const _isArray=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function _isTransformer(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function _dispatchable(e,t,r){return function(){if(0===arguments.length)return r();var n=arguments[arguments.length-1];if(!_isArray(n)){for(var s=0;s<e.length;){if("function"==typeof n[e[s]])return n[e[s]].apply(n,Array.prototype.slice.call(arguments,0,-1));s+=1}if(_isTransformer(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return r.apply(this,arguments)}}function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var XAll=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=_reduced(this.xf["@@transducer/step"](e,!1))),e},e}();function _xall(e){return function(t){return new XAll(e,t)}}var all=_curry2(_dispatchable(["all"],_xall,(function(e,t){for(var r=0;r<t.length;){if(!e(t[r]))return!1;r+=1}return!0})));function _arrayFromIterator(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function _includesWith(e,t,r){for(var n=0,s=r.length;n<s;){if(e(t,r[n]))return!0;n+=1}return!1}function _functionName(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function _objectIs$1(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}const _objectIs="function"==typeof Object.is?Object.is:_objectIs$1;var toString$2=Object.prototype.toString,_isArguments=function(){return"[object Arguments]"===toString$2.call(arguments)?function(e){return"[object Arguments]"===toString$2.call(e)}:function(e){return _has("callee",e)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},keys="function"!=typeof Object.keys||hasArgsEnumBug?_curry1((function(e){if(Object(e)!==e)return[];var t,r,n=[],s=hasArgsEnumBug&&_isArguments(e);for(t in e)!_has(t,e)||s&&"length"===t||(n[n.length]=t);if(hasEnumBug)for(r=nonEnumerableProps.length-1;r>=0;)_has(t=nonEnumerableProps[r],e)&&!contains(n,t)&&(n[n.length]=t),r-=1;return n})):_curry1((function(e){return Object(e)!==e?[]:Object.keys(e)})),type=_curry1((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function _uniqContentEquals(e,t,r,n){var s=_arrayFromIterator(e);function i(e,t){return _equals(e,t,r.slice(),n.slice())}return!_includesWith((function(e,t){return!_includesWith(i,t,e)}),_arrayFromIterator(t),s)}function _equals(e,t,r,n){if(_objectIs(e,t))return!0;var s=type(e);if(s!==type(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===_functionName(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!_objectIs(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!_objectIs(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return n[i]===t;i-=1}switch(s){case"Map":return e.size===t.size&&_uniqContentEquals(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&_uniqContentEquals(e.values(),t.values(),r.concat([e]),n.concat([t]));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=keys(e);if(o.length!==keys(t).length)return!1;var a=r.concat([e]),u=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!_has(l,t)||!_equals(t[l],e[l],a,u))return!1;i-=1}return!0}var equals=_curry2((function(e,t){return _equals(e,t,[],[])}));function _indexOf(e,t,r){var n,s;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;r<e.length;){if(0===(s=e[r])&&1/s===n)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(s=e[r])&&s!=s)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(equals(e[r],t))return r;r+=1}return-1}function _includes(e,t){return _indexOf(t,e,0)>=0}function _map(e,t){for(var r=0,n=t.length,s=Array(n);r<n;)s[r]=e(t[r]),r+=1;return s}function _quote(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pad=function(e){return(e<10?"0":"")+e},_toISOString="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+pad(e.getUTCMonth()+1)+"-"+pad(e.getUTCDate())+"T"+pad(e.getUTCHours())+":"+pad(e.getUTCMinutes())+":"+pad(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(e){return function(){return!e.apply(this,arguments)}}function _arrayReduce(e,t,r){for(var n=0,s=r.length;n<s;)t=e(t,r[n]),n+=1;return t}function _filter(e,t){for(var r=0,n=t.length,s=[];r<n;)e(t[r])&&(s[s.length]=t[r]),r+=1;return s}function _isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}var XFilter=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function _xfilter(e){return function(t){return new XFilter(e,t)}}var filter=_curry2(_dispatchable(["fantasy-land/filter","filter"],_xfilter,(function(e,t){return _isObject(t)?_arrayReduce((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},keys(t)):_filter(e,t)}))),reject=_curry2((function(e,t){return filter(_complement(e),t)}));function _toString(e,t){var r=function(r){var n=t.concat([e]);return _includes(r,n)?"<Circular>":_toString(r,n)},n=function(e,t){return _map((function(t){return _quote(t)+": "+r(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+_map(r,e).join(", ")+"))";case"[object Array]":return"["+_map(r,e).concat(n(e,reject((function(e){return/^\d+$/.test(e)}),keys(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):_quote(_toISOString(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":_quote(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var s=e.toString();if("[object Object]"!==s)return s}return"{"+n(e,keys(e)).join(", ")+"}"}}var toString$1=_curry1((function(e){return _toString(e,[])})),max=_curry2((function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var n=r(e,t);if(void 0!==n)return n;var s=r(typeof e,typeof t);if(void 0!==s)return s===typeof e?e:t;var i=toString$1(e),o=r(i,toString$1(t));return void 0!==o&&o===i?e:t})),XMap=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),_xmap=function(e){return function(t){return new XMap(e,t)}},map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return curryN(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return _arrayReduce((function(r,n){return r[n]=e(t[n]),r}),{},keys(t));default:return _map(e,t)}})));const _isInteger=Number.isInteger||function(e){return(e|0)===e};function _isString(e){return"[object String]"===Object.prototype.toString.call(e)}function _nth(e,t){var r=e<0?t.length+e:e;return _isString(t)?t.charAt(r):t[r]}var prop=_curry2((function(e,t){if(null!=t)return _isInteger(e)?_nth(e,t):t[e]})),pluck=_curry2((function(e,t){return map(prop(e),t)})),_isArrayLike=_curry1((function(e){return!!_isArray(e)||!!e&&("object"==typeof e&&(!_isString(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),symIterator="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function _createReduce(e,t,r){return function(n,s,i){if(_isArrayLike(i))return e(n,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return t(n,s,i,"fantasy-land/reduce");if(null!=i[symIterator])return r(n,s,i[symIterator]());if("function"==typeof i.next)return r(n,s,i);if("function"==typeof i.reduce)return t(n,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function _xArrayReduce(e,t,r){for(var n=0,s=r.length;n<s;){if((t=e["@@transducer/step"](t,r[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var bind=_curry2((function(e,t){return _arity(e.length,(function(){return e.apply(t,arguments)}))}));function _xIterableReduce(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function _xMethodReduce(e,t,r,n){return e["@@transducer/result"](r[n](bind(e["@@transducer/step"],e),t))}var _xReduce=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce),XWrap=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function _xwrap(e){return new XWrap(e)}var reduce=_curry3((function(e,t,r){return _xReduce("function"==typeof e?_xwrap(e):e,t,r)})),allPass=_curry1((function(e){return curryN(reduce(max,0,pluck("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0}))})),always=_curry1((function(e){return function(){return e}})),and=_curry2((function(e,t){return e&&t})),anyPass=_curry1((function(e){return curryN(reduce(max,0,pluck("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1}))}));function _iterableReduce(e,t,r){for(var n=r.next();!n.done;)t=e(t,n.value),n=r.next();return t}function _methodReduce(e,t,r,n){return r[n](e,t)}var _reduce=_createReduce(_arrayReduce,_methodReduce,_iterableReduce),ap=_curry2((function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:_reduce((function(e,r){return _concat(e,map(r,t))}),[],e)})),apply=_curry2((function(e,t){return e.apply(this,t)})),curry=_curry1((function(e){return curryN(e.length,e)})),isNil=_curry1((function(e){return null==e}));function _isFunction(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}var liftN=_curry2((function(e,t){var r=curryN(e,t);return curryN(e,(function(){return _arrayReduce(ap,map(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),lift=_curry1((function(e){return liftN(e.length,e)})),both=_curry2((function(e,t){return _isFunction(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:lift(and)(e,t)})),comparator=_curry1((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),not=_curry1((function(e){return!e})),complement=lift(not);function _pipe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function _checkForMethod(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return _isArray(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}var slice=_curry3(_checkForMethod("slice",(function(e,t,r){return Array.prototype.slice.call(r,e,t)}))),tail=_curry1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce(_pipe,arguments[0],tail(arguments)))}var reverse=_curry1((function(e){return _isString(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()}));function compose(){if(0===arguments.length)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse(arguments))}var head=_curry1((function(e){return _nth(0,e)}));function _identity(e){return e}var identity=_curry1(_identity),concat=_curry2((function(e,t){if(_isArray(e)){if(_isArray(t))return e.concat(t);throw new TypeError(toString$1(t)+" is not an array")}if(_isString(e)){if(_isString(t))return e+t;throw new TypeError(toString$1(t)+" is not a string")}if(null!=e&&_isFunction(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&_isFunction(e.concat))return e.concat(t);throw new TypeError(toString$1(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),converge=_curry2((function(e,t){return curryN(reduce(max,0,pluck("length",t)),(function(){var r=arguments,n=this;return e.apply(n,_map((function(e){return e.apply(n,r)}),t))}))})),defaultTo=_curry2((function(e,t){return null==t||t!=t?e:t})),last=_curry1((function(e){return _nth(-1,e)})),XDropWhile=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function _xdropWhile(e){return function(t){return new XDropWhile(e,t)}}var dropWhile=_curry2(_dispatchable(["dropWhile"],_xdropWhile,(function(e,t){for(var r=0,n=t.length;r<n&&e(t[r]);)r+=1;return slice(r,1/0,t)}))),or=_curry2((function(e,t){return e||t})),either=_curry2((function(e,t){return _isFunction(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:lift(or)(e,t)}));function _isTypedArray(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}var empty=_curry1((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():_isArray(e)?[]:_isString(e)?"":_isObject(e)?{}:_isArguments(e)?function(){return arguments}():_isTypedArray(e)?e.constructor.from(""):void 0})),flip=_curry1((function(e){return curryN(e.length,(function(t,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=t,e.apply(this,n)}))})),gt=_curry2((function(e,t){return e>t})),hasPath=_curry2((function(e,t){if(0===e.length||isNil(t))return!1;for(var r=t,n=0;n<e.length;){if(isNil(r)||!_has(e[n],r))return!1;r=r[e[n]],n+=1}return!0})),has=_curry2((function(e,t){return hasPath([e],t)})),identical=function(e,t){switch(arguments.length){case 0:return identical;case 1:return function t(r){return 0===arguments.length?t:_objectIs(e,r)};default:return _objectIs(e,t)}},ifElse=_curry3((function(e,t,r){return curryN(Math.max(e.length,t.length,r.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)}))})),includes=_curry2(_includes),init=slice(0,-1);function _objectAssign$1(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var s=arguments[r];if(null!=s)for(var i in s)_has(i,s)&&(t[i]=s[i]);r+=1}return t}const _objectAssign="function"==typeof Object.assign?Object.assign:_objectAssign$1;var invoker=_curry2((function(e,t){return curryN(e+1,(function(){var r=arguments[e];if(null!=r&&_isFunction(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(toString$1(r)+' does not have a method named "'+t+'"')}))})),isEmpty=_curry1((function(e){return null!=e&&equals(e,empty(e))})),isNotEmpty=_curry1((function(e){return!isEmpty(e)})),join=invoker(1,"join");function _path(e,t){for(var r=t,n=0;n<e.length;n+=1){if(null==r)return;var s=e[n];r=_isInteger(s)?_nth(s,r):r[s]}return r}var mapObjIndexed=_curry2((function(e,t){return _arrayReduce((function(r,n){return r[n]=e(t[n],n,t),r}),{},keys(t))})),mergeWithKey=_curry3((function(e,t,r){var n,s={};for(n in r=r||{},t=t||{})_has(n,t)&&(s[n]=_has(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)_has(n,r)&&!_has(n,s)&&(s[n]=r[n]);return s})),mergeDeepWithKey=_curry3((function e(t,r,n){return mergeWithKey((function(r,n,s){return _isObject(n)&&_isObject(s)?e(t,n,s):t(r,n,s)}),r,n)})),mergeDeepRight=_curry2((function(e,t){return mergeDeepWithKey((function(e,t,r){return r}),e,t)})),mergeRight=_curry2((function(e,t){return _objectAssign({},e,t)})),omit=_curry2((function(e,t){for(var r={},n={},s=0,i=e.length;s<i;)n[e[s]]=1,s+=1;for(var o in t)n.hasOwnProperty(o)||(r[o]=t[o]);return r})),path$1=_curry2(_path),pathOr=_curry3((function(e,t,r){return defaultTo(e,_path(t,r))})),pathSatisfies=_curry3((function(e,t,r){return e(_path(t,r))})),pick=_curry2((function(e,t){for(var r={},n=0;n<e.length;)e[n]in t&&(r[e[n]]=t[e[n]]),n+=1;return r})),propOr=_curry3((function(e,t,r){return defaultTo(e,prop(t,r))})),propSatisfies=_curry3((function(e,t,r){return e(prop(t,r))})),reduced=_curry1(_reduced),replace=_curry3((function(e,t,r){return r.replace(e,t)})),sort=_curry2((function(e,t){return Array.prototype.slice.call(t,0).sort(e)})),split=invoker(1,"split"),transduce=curryN(4,(function(e,t,r,n){return _xReduce(e("function"==typeof t?_xwrap(t):t),r,n)})),ws="\t\n\v\f\r \u2028\u2029\ufeff",zeroWidth="",hasProtoTrim="function"==typeof String.prototype.trim,trim=_curry1(hasProtoTrim&&!ws.trim()&&zeroWidth.trim()?function(e){return e.trim()}:function(e){var t=new RegExp("^["+ws+"]["+ws+"]*"),r=new RegExp("["+ws+"]["+ws+"]*$");return e.replace(t,"").replace(r,"")}),stubUndefined=always(void 0),isUndefined=equals(stubUndefined()),isNotUndefined=complement(isUndefined),isNull=equals(null),isNotNull=complement(isNull),isNotNil=complement(isNil),isGeneratorFunction=curryN(1,pipe(type,identical("GeneratorFunction"))),isAsyncFunction=curryN(1,pipe(type,identical("AsyncFunction"))),isFunction=anyPass([pipe(type,identical("Function")),isGeneratorFunction,isAsyncFunction]),isArray=curryN(1,isFunction(Array.isArray)?Array.isArray:pipe(type,identical("Array"))),isEmptyArray=both(isArray,isEmpty),isNonEmptyArray=both(isArray,isNotEmpty),isString=curryN(1,pipe(type,identical("String"))),isEmptyString=equals("");function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var isOfTypeObject=function(e){return"object"===_typeof(e)},isObj=curryN(1,both(isNotNull,either(isOfTypeObject,isFunction))),isNotObj=complement(isObj),isNonEmptyString=allPass([isString,isNotObj,isNotEmpty]),isNotFunction=complement(isFunction),isObjLike=curryN(1,both(isNotNull,isOfTypeObject)),isObject$1=pipe(type,identical("Object")),isObjectConstructor=pipe(toString$1,equals(toString$1(Object))),hasObjectConstructor=pathSatisfies(both(isFunction,isObjectConstructor),["constructor"]),isPlainObj=curryN(1,(function(e){if(!isObjLike(e)||!isObject$1(e))return!1;var t=Object.getPrototypeOf(e);return!!isNull(t)||hasObjectConstructor(t)})),isNumber=curryN(1,pipe(type,identical("Number"))),isNegative=curryN(1,both(isNumber,gt(0))),isFinitePonyfill$1=both(isNumber,isFinite),isFinitePonyfill=curryN(1,isFinitePonyfill$1),_isFinite=isFunction(Number.isFinite)?curryN(1,bind(Number.isFinite,Number)):isFinitePonyfill,isNotFinite=complement(_isFinite),isIntegerPonyfill$1=both(_isFinite,converge(equals,[Math.floor,identity])),isIntegerPonyfill=curryN(1,isIntegerPonyfill$1),isInteger=isFunction(Number.isInteger)?curryN(1,bind(Number.isInteger,Number)):isIntegerPonyfill;function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var byArity=comparator((function(e,t){return e.length>t.length})),getMaxArity=pipe(sort(byArity),head,prop("length")),iteratorFn=curry((function(e,t,r){var n=r.apply(void 0,_toConsumableArray(e));return isNotNil(n)?reduced(n):t})),dispatchImpl=function(e){var t=getMaxArity(e);return curryN(t,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return reduce(iteratorFn(r),void 0,e)}))},dispatch=ifElse(isNonEmptyArray,dispatchImpl,stubUndefined),concatRight=flip(concat),included=flip(includes),repeat=function(e,t){var r=Number(t);if(r!==t&&(r=0),isNegative(r))throw new RangeError("repeat count must be non-negative");if(isNotFinite(r))throw new RangeError("repeat count must be less than infinity");if(r=Math.floor(r),0===e.length||0===r)return"";if(e.length*r>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var n=e.length*r;r=Math.floor(Math.log(r)/Math.log(2));for(var s=e;r;)s+=e,r-=1;return s+=s.substring(0,n-s.length)},repeatStrPonyfill=curry(repeat),repeatStrInvoker=flip(invoker(1,"repeat")),repeatStr=isFunction(String.prototype.repeat)?repeatStrInvoker:repeatStrPonyfill,invokeArgs=curryN(3,(function(e,t,r){var n=path$1(e,r),s=path$1(init(e),r);if(!isNotFunction(n)&&!isEmptyArray(e)){var i=bind(n,s);return apply(i,t)}})),trimStart$2=replace(/^[\s\uFEFF\xA0]+/,""),trimStartPonyfill=trimStart$2,trimStartInvoker=invoker(0,"trimStart"),trimStart$1=isFunction(String.prototype.trimStart)?trimStartInvoker:trimStartPonyfill,trimStart=replace(/[\s\uFEFF\xA0]+$/,""),trimEndPonyfill=trimStart,trimEndInvoker=invoker(0,"trimEnd"),trimEnd=isFunction(String.prototype.trimEnd)?trimEndInvoker:trimEndPonyfill,trimCharsStart=curry((function(e,t){return pipe(split(""),dropWhile(included(e)),join(""))(t)})),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var minim={},isNull_1,hasRequiredIsNull,_freeGlobal,hasRequired_freeGlobal,_root,hasRequired_root,_Symbol,hasRequired_Symbol,_getRawTag,hasRequired_getRawTag,_objectToString,hasRequired_objectToString,_baseGetTag,hasRequired_baseGetTag,isArray_1,hasRequiredIsArray,isObjectLike_1,hasRequiredIsObjectLike,isString_1,hasRequiredIsString,isNumber_1,hasRequiredIsNumber,isBoolean_1,hasRequiredIsBoolean,isObject_1,hasRequiredIsObject$1,JSONSerialiser_1,hasRequiredJSONSerialiser,_listCacheClear,hasRequired_listCacheClear,eq_1,hasRequiredEq,_assocIndexOf,hasRequired_assocIndexOf,_listCacheDelete,hasRequired_listCacheDelete,_listCacheGet,hasRequired_listCacheGet,_listCacheHas,hasRequired_listCacheHas,_listCacheSet,hasRequired_listCacheSet,_ListCache,hasRequired_ListCache,_stackClear,hasRequired_stackClear,_stackDelete,hasRequired_stackDelete,_stackGet,hasRequired_stackGet,_stackHas,hasRequired_stackHas,isFunction_1,hasRequiredIsFunction,_coreJsData,hasRequired_coreJsData,_isMasked,hasRequired_isMasked,_toSource,hasRequired_toSource,_baseIsNative,hasRequired_baseIsNative,_getValue,hasRequired_getValue,_getNative,hasRequired_getNative,_Map,hasRequired_Map,_nativeCreate,hasRequired_nativeCreate,_hashClear,hasRequired_hashClear,_hashDelete,hasRequired_hashDelete,_hashGet,hasRequired_hashGet,_hashHas,hasRequired_hashHas,_hashSet,hasRequired_hashSet,_Hash,hasRequired_Hash,_mapCacheClear,hasRequired_mapCacheClear,_isKeyable,hasRequired_isKeyable,_getMapData,hasRequired_getMapData,_mapCacheDelete,hasRequired_mapCacheDelete,_mapCacheGet,hasRequired_mapCacheGet,_mapCacheHas,hasRequired_mapCacheHas,_mapCacheSet,hasRequired_mapCacheSet,_MapCache,hasRequired_MapCache,_stackSet,hasRequired_stackSet,_Stack,hasRequired_Stack,_setCacheAdd,hasRequired_setCacheAdd,_setCacheHas,hasRequired_setCacheHas,_SetCache,hasRequired_SetCache,_arraySome,hasRequired_arraySome,_cacheHas,hasRequired_cacheHas,_equalArrays,hasRequired_equalArrays,_Uint8Array,hasRequired_Uint8Array,_mapToArray,hasRequired_mapToArray,_setToArray,hasRequired_setToArray,_equalByTag,hasRequired_equalByTag,_arrayPush,hasRequired_arrayPush,_baseGetAllKeys,hasRequired_baseGetAllKeys,_arrayFilter,hasRequired_arrayFilter,stubArray_1,hasRequiredStubArray,_getSymbols,hasRequired_getSymbols,_baseTimes,hasRequired_baseTimes,_baseIsArguments,hasRequired_baseIsArguments,isArguments_1,hasRequiredIsArguments;function requireIsNull(){if(hasRequiredIsNull)return isNull_1;return hasRequiredIsNull=1,isNull_1=function(e){return null===e}}function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e}function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root=r}function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root().Symbol;return _Symbol=e}function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,s=e?e.toStringTag:void 0;return _getRawTag=function(e){var t=r.call(e,s),i=e[s];try{e[s]=void 0;var o=!0}catch(e){}var a=n.call(e);return o&&(t?e[s]=i:delete e[s]),a}}function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype.toString;return _objectToString=function(t){return e.call(t)}}function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),r=require_objectToString(),n=e?e.toStringTag:void 0;return _baseGetTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?t(e):r(e)}}function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e}function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;return hasRequiredIsObjectLike=1,isObjectLike_1=function(e){return null!=e&&"object"==typeof e}}function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),r=requireIsObjectLike();return isString_1=function(n){return"string"==typeof n||!t(n)&&r(n)&&"[object String]"==e(n)}}function requireIsNumber(){if(hasRequiredIsNumber)return isNumber_1;hasRequiredIsNumber=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isNumber_1=function(r){return"number"==typeof r||t(r)&&"[object Number]"==e(r)}}function requireIsBoolean(){if(hasRequiredIsBoolean)return isBoolean_1;hasRequiredIsBoolean=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isBoolean_1=function(r){return!0===r||!1===r||t(r)&&"[object Boolean]"==e(r)}}function requireIsObject$1(){if(hasRequiredIsObject$1)return isObject_1;return hasRequiredIsObject$1=1,isObject_1=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},isObject_1}function requireJSONSerialiser(){if(hasRequiredJSONSerialiser)return JSONSerialiser_1;hasRequiredJSONSerialiser=1;return JSONSerialiser_1=class{constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));const r=this.serialiseContent(e.content);return void 0!==r&&(t.content=r),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}serialiseObject(e){const t={};if(e.forEach(((e,r)=>{e&&(t[r.toValue()]=this.serialise(e))})),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}},JSONSerialiser_1}function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;return hasRequired_listCacheClear=1,_listCacheClear=function(){this.__data__=[],this.size=0}}function requireEq(){if(hasRequiredEq)return eq_1;return hasRequiredEq=1,eq_1=function(e,t){return e===t||e!=e&&t!=t}}function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();return _assocIndexOf=function(t,r){for(var n=t.length;n--;)if(e(t[n][0],r))return n;return-1}}function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype.splice;return _listCacheDelete=function(r){var n=this.__data__,s=e(n,r);return!(s<0)&&(s==n.length-1?n.pop():t.call(n,s,1),--this.size,!0)}}function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();return _listCacheGet=function(t){var r=this.__data__,n=e(r,t);return n<0?void 0:r[n][1]}}function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();return _listCacheHas=function(t){return e(this.__data__,t)>-1}}function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();return _listCacheSet=function(t,r){var n=this.__data__,s=e(n,t);return s<0?(++this.size,n.push([t,r])):n[s][1]=r,this}}function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),r=require_listCacheGet(),n=require_listCacheHas(),s=require_listCacheSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_ListCache=i}function require_stackClear(){if(hasRequired_stackClear)return _stackClear;hasRequired_stackClear=1;var e=require_ListCache();return _stackClear=function(){this.__data__=new e,this.size=0}}function require_stackDelete(){if(hasRequired_stackDelete)return _stackDelete;return hasRequired_stackDelete=1,_stackDelete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}}function require_stackGet(){if(hasRequired_stackGet)return _stackGet;return hasRequired_stackGet=1,_stackGet=function(e){return this.__data__.get(e)}}function require_stackHas(){if(hasRequired_stackHas)return _stackHas;return hasRequired_stackHas=1,_stackHas=function(e){return this.__data__.has(e)}}function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject$1();return isFunction_1=function(r){if(!t(r))return!1;var n=e(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root()["__core-js_shared__"];return _coreJsData=e}function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();return _isMasked=function(e){return!!t&&t in e}}function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype.toString;return _toSource=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),r=requireIsObject$1(),n=require_toSource(),s=/^\[object .+?Constructor\]$/,i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,l=RegExp("^"+a.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return _baseIsNative=function(i){return!(!r(i)||t(i))&&(e(i)?l:s).test(n(i))}}function require_getValue(){if(hasRequired_getValue)return _getValue;return hasRequired_getValue=1,_getValue=function(e,t){return null==e?void 0:e[t]}}function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();return _getNative=function(r,n){var s=t(r,n);return e(s)?s:void 0}}function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative()(require_root(),"Map");return _Map=e}function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative()(Object,"create");return _nativeCreate=e}function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();return _hashClear=function(){this.__data__=e?e(null):{},this.size=0}}function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;return hasRequired_hashDelete=1,_hashDelete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}}function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t=Object.prototype.hasOwnProperty;return _hashGet=function(r){var n=this.__data__;if(e){var s=n[r];return"__lodash_hash_undefined__"===s?void 0:s}return t.call(n,r)?n[r]:void 0}}function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype.hasOwnProperty;return _hashHas=function(r){var n=this.__data__;return e?void 0!==n[r]:t.call(n,r)}}function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate();return _hashSet=function(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e&&void 0===r?"__lodash_hash_undefined__":r,this}}function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),r=require_hashGet(),n=require_hashHas(),s=require_hashSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_Hash=i}function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),r=require_Map();return _mapCacheClear=function(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;return hasRequired_isKeyable=1,_isKeyable=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},_isKeyable}function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();return _getMapData=function(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map},_getMapData}function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();return _mapCacheDelete=function(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}}function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();return _mapCacheGet=function(t){return e(this,t).get(t)}}function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();return _mapCacheHas=function(t){return e(this,t).has(t)}}function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();return _mapCacheSet=function(t,r){var n=e(this,t),s=n.size;return n.set(t,r),this.size+=n.size==s?0:1,this}}function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),r=require_mapCacheGet(),n=require_mapCacheHas(),s=require_mapCacheSet();function i(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=s,_MapCache=i}function require_stackSet(){if(hasRequired_stackSet)return _stackSet;hasRequired_stackSet=1;var e=require_ListCache(),t=require_Map(),r=require_MapCache();return _stackSet=function(n,s){var i=this.__data__;if(i instanceof e){var o=i.__data__;if(!t||o.length<199)return o.push([n,s]),this.size=++i.size,this;i=this.__data__=new r(o)}return i.set(n,s),this.size=i.size,this}}function require_Stack(){if(hasRequired_Stack)return _Stack;hasRequired_Stack=1;var e=require_ListCache(),t=require_stackClear(),r=require_stackDelete(),n=require_stackGet(),s=require_stackHas(),i=require_stackSet();function o(t){var r=this.__data__=new e(t);this.size=r.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=s,o.prototype.set=i,_Stack=o}function require_setCacheAdd(){if(hasRequired_setCacheAdd)return _setCacheAdd;hasRequired_setCacheAdd=1;return _setCacheAdd=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function require_setCacheHas(){if(hasRequired_setCacheHas)return _setCacheHas;return hasRequired_setCacheHas=1,_setCacheHas=function(e){return this.__data__.has(e)}}function require_SetCache(){if(hasRequired_SetCache)return _SetCache;hasRequired_SetCache=1;var e=require_MapCache(),t=require_setCacheAdd(),r=require_setCacheHas();function n(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e;++r<n;)this.add(t[r])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,_SetCache=n}function require_arraySome(){if(hasRequired_arraySome)return _arraySome;return hasRequired_arraySome=1,_arraySome=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}}function require_cacheHas(){if(hasRequired_cacheHas)return _cacheHas;return hasRequired_cacheHas=1,_cacheHas=function(e,t){return e.has(t)}}function require_equalArrays(){if(hasRequired_equalArrays)return _equalArrays;hasRequired_equalArrays=1;var e=require_SetCache(),t=require_arraySome(),r=require_cacheHas();return _equalArrays=function(n,s,i,o,a,u){var l=1&i,c=n.length,d=s.length;if(c!=d&&!(l&&d>c))return!1;var p=u.get(n),h=u.get(s);if(p&&h)return p==s&&h==n;var m=-1,_=!0,f=2&i?new e:void 0;for(u.set(n,s),u.set(s,n);++m<c;){var g=n[m],y=s[m];if(o)var b=l?o(y,g,m,s,n,u):o(g,y,m,n,s,u);if(void 0!==b){if(b)continue;_=!1;break}if(f){if(!t(s,(function(e,t){if(!r(f,t)&&(g===e||a(g,e,i,o,u)))return f.push(t)}))){_=!1;break}}else if(g!==y&&!a(g,y,i,o,u)){_=!1;break}}return u.delete(n),u.delete(s),_}}function require_Uint8Array(){if(hasRequired_Uint8Array)return _Uint8Array;hasRequired_Uint8Array=1;var e=require_root().Uint8Array;return _Uint8Array=e}function require_mapToArray(){if(hasRequired_mapToArray)return _mapToArray;return hasRequired_mapToArray=1,_mapToArray=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},_mapToArray}function require_setToArray(){if(hasRequired_setToArray)return _setToArray;return hasRequired_setToArray=1,_setToArray=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}}function require_equalByTag(){if(hasRequired_equalByTag)return _equalByTag;hasRequired_equalByTag=1;var e=require_Symbol(),t=require_Uint8Array(),r=requireEq(),n=require_equalArrays(),s=require_mapToArray(),i=require_setToArray(),o=e?e.prototype:void 0,a=o?o.valueOf:void 0;return _equalByTag=function(e,o,u,l,c,d,p){switch(u){case"[object DataView]":if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=o.byteLength||!d(new t(e),new t(o)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+o);case"[object Error]":return e.name==o.name&&e.message==o.message;case"[object RegExp]":case"[object String]":return e==o+"";case"[object Map]":var h=s;case"[object Set]":var m=1&l;if(h||(h=i),e.size!=o.size&&!m)return!1;var _=p.get(e);if(_)return _==o;l|=2,p.set(e,o);var f=n(h(e),h(o),l,c,d,p);return p.delete(e),f;case"[object Symbol]":if(a)return a.call(e)==a.call(o)}return!1}}function require_arrayPush(){if(hasRequired_arrayPush)return _arrayPush;return hasRequired_arrayPush=1,_arrayPush=function(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}}function require_baseGetAllKeys(){if(hasRequired_baseGetAllKeys)return _baseGetAllKeys;hasRequired_baseGetAllKeys=1;var e=require_arrayPush(),t=requireIsArray();return _baseGetAllKeys=function(r,n,s){var i=n(r);return t(r)?i:e(i,s(r))}}function require_arrayFilter(){if(hasRequired_arrayFilter)return _arrayFilter;return hasRequired_arrayFilter=1,_arrayFilter=function(e,t){for(var r=-1,n=null==e?0:e.length,s=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[s++]=o)}return i}}function requireStubArray(){if(hasRequiredStubArray)return stubArray_1;return hasRequiredStubArray=1,stubArray_1=function(){return[]}}function require_getSymbols(){if(hasRequired_getSymbols)return _getSymbols;hasRequired_getSymbols=1;var e=require_arrayFilter(),t=requireStubArray(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return _getSymbols=n?function(t){return null==t?[]:(t=Object(t),e(n(t),(function(e){return r.call(t,e)})))}:t}function require_baseTimes(){if(hasRequired_baseTimes)return _baseTimes;return hasRequired_baseTimes=1,_baseTimes=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}}function require_baseIsArguments(){if(hasRequired_baseIsArguments)return _baseIsArguments;hasRequired_baseIsArguments=1;var e=require_baseGetTag(),t=requireIsObjectLike();return _baseIsArguments=function(r){return t(r)&&"[object Arguments]"==e(r)}}function requireIsArguments(){if(hasRequiredIsArguments)return isArguments_1;hasRequiredIsArguments=1;var e=require_baseIsArguments(),t=requireIsObjectLike(),r=Object.prototype,n=r.hasOwnProperty,s=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&n.call(e,"callee")&&!s.call(e,"callee")};return isArguments_1=i}var isBuffer={exports:{}},stubFalse_1,hasRequiredStubFalse,hasRequiredIsBuffer,_isIndex,hasRequired_isIndex,isLength_1,hasRequiredIsLength,_baseIsTypedArray,hasRequired_baseIsTypedArray,_baseUnary,hasRequired_baseUnary;function requireStubFalse(){if(hasRequiredStubFalse)return stubFalse_1;return hasRequiredStubFalse=1,stubFalse_1=function(){return!1}}function requireIsBuffer(){return hasRequiredIsBuffer||(hasRequiredIsBuffer=1,function(e,t){var r=require_root(),n=requireStubFalse(),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,o=i&&i.exports===s?r.Buffer:void 0,a=(o?o.isBuffer:void 0)||n;e.exports=a}(isBuffer,isBuffer.exports)),isBuffer.exports}function require_isIndex(){if(hasRequired_isIndex)return _isIndex;hasRequired_isIndex=1;var e=/^(?:0|[1-9]\d*)$/;return _isIndex=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r},_isIndex}function requireIsLength(){if(hasRequiredIsLength)return isLength_1;hasRequiredIsLength=1;return isLength_1=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var e=require_baseGetTag(),t=requireIsLength(),r=requireIsObjectLike(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,_baseIsTypedArray=function(s){return r(s)&&t(s.length)&&!!n[e(s)]}}function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;return hasRequired_baseUnary=1,_baseUnary=function(e){return function(t){return e(t)}}}isBuffer.exports;var _nodeUtil={exports:{}},hasRequired_nodeUtil,isTypedArray_1,hasRequiredIsTypedArray,_arrayLikeKeys,hasRequired_arrayLikeKeys,_isPrototype,hasRequired_isPrototype,_overArg,hasRequired_overArg,_nativeKeys,hasRequired_nativeKeys,_baseKeys,hasRequired_baseKeys,isArrayLike_1,hasRequiredIsArrayLike,keys_1,hasRequiredKeys,_getAllKeys,hasRequired_getAllKeys,_equalObjects,hasRequired_equalObjects,_DataView,hasRequired_DataView,_Promise,hasRequired_Promise,_Set,hasRequired_Set,_WeakMap,hasRequired_WeakMap,_getTag,hasRequired_getTag,_baseIsEqualDeep,hasRequired_baseIsEqualDeep,_baseIsEqual,hasRequired_baseIsEqual,isEqual_1,hasRequiredIsEqual,KeyValuePair_1,hasRequiredKeyValuePair,negate_1,hasRequiredNegate,ArraySlice_1,hasRequiredArraySlice,Element_1,hasRequiredElement,NullElement_1,hasRequiredNullElement,StringElement_1,hasRequiredStringElement,NumberElement_1,hasRequiredNumberElement,BooleanElement_1,hasRequiredBooleanElement,ArrayElement_1,hasRequiredArrayElement,MemberElement_1,hasRequiredMemberElement,ObjectSlice_1,hasRequiredObjectSlice,ObjectElement_1,hasRequiredObjectElement,LinkElement_1,hasRequiredLinkElement,RefElement_1,hasRequiredRefElement,elements,hasRequiredElements,Namespace_1,hasRequiredNamespace,JSON06Serialiser_1,hasRequiredJSON06Serialiser,hasRequiredMinim;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,function(e,t){var r=require_freeGlobal(),n=t&&!t.nodeType&&t,s=n&&e&&!e.nodeType&&e,i=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var e=require_baseIsTypedArray(),t=require_baseUnary(),r=require_nodeUtil(),n=r&&r.isTypedArray,s=n?t(n):e;return isTypedArray_1=s}function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var e=require_baseTimes(),t=requireIsArguments(),r=requireIsArray(),n=requireIsBuffer(),s=require_isIndex(),i=requireIsTypedArray(),o=Object.prototype.hasOwnProperty;return _arrayLikeKeys=function(a,u){var l=r(a),c=!l&&t(a),d=!l&&!c&&n(a),p=!l&&!c&&!d&&i(a),h=l||c||d||p,m=h?e(a.length,String):[],_=m.length;for(var f in a)!u&&!o.call(a,f)||h&&("length"==f||d&&("offset"==f||"parent"==f)||p&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||s(f,_))||m.push(f);return m}}function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var e=Object.prototype;return _isPrototype=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}}function require_overArg(){if(hasRequired_overArg)return _overArg;return hasRequired_overArg=1,_overArg=function(e,t){return function(r){return e(t(r))}}}function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var e=require_overArg()(Object.keys,Object);return _nativeKeys=e}function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var e=require_isPrototype(),t=require_nativeKeys(),r=Object.prototype.hasOwnProperty;return _baseKeys=function(n){if(!e(n))return t(n);var s=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&s.push(i);return s}}function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var e=requireIsFunction(),t=requireIsLength();return isArrayLike_1=function(r){return null!=r&&t(r.length)&&!e(r)}}function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var e=require_arrayLikeKeys(),t=require_baseKeys(),r=requireIsArrayLike();return keys_1=function(n){return r(n)?e(n):t(n)}}function require_getAllKeys(){if(hasRequired_getAllKeys)return _getAllKeys;hasRequired_getAllKeys=1;var e=require_baseGetAllKeys(),t=require_getSymbols(),r=requireKeys();return _getAllKeys=function(n){return e(n,r,t)}}function require_equalObjects(){if(hasRequired_equalObjects)return _equalObjects;hasRequired_equalObjects=1;var e=require_getAllKeys(),t=Object.prototype.hasOwnProperty;return _equalObjects=function(r,n,s,i,o,a){var u=1&s,l=e(r),c=l.length;if(c!=e(n).length&&!u)return!1;for(var d=c;d--;){var p=l[d];if(!(u?p in n:t.call(n,p)))return!1}var h=a.get(r),m=a.get(n);if(h&&m)return h==n&&m==r;var _=!0;a.set(r,n),a.set(n,r);for(var f=u;++d<c;){var g=r[p=l[d]],y=n[p];if(i)var b=u?i(y,g,p,n,r,a):i(g,y,p,r,n,a);if(!(void 0===b?g===y||o(g,y,s,i,a):b)){_=!1;break}f||(f="constructor"==p)}if(_&&!f){var E=r.constructor,w=n.constructor;E==w||!("constructor"in r)||!("constructor"in n)||"function"==typeof E&&E instanceof E&&"function"==typeof w&&w instanceof w||(_=!1)}return a.delete(r),a.delete(n),_}}function require_DataView(){if(hasRequired_DataView)return _DataView;hasRequired_DataView=1;var e=require_getNative()(require_root(),"DataView");return _DataView=e}function require_Promise(){if(hasRequired_Promise)return _Promise;hasRequired_Promise=1;var e=require_getNative()(require_root(),"Promise");return _Promise=e}function require_Set(){if(hasRequired_Set)return _Set;hasRequired_Set=1;var e=require_getNative()(require_root(),"Set");return _Set=e}function require_WeakMap(){if(hasRequired_WeakMap)return _WeakMap;hasRequired_WeakMap=1;var e=require_getNative()(require_root(),"WeakMap");return _WeakMap=e}function require_getTag(){if(hasRequired_getTag)return _getTag;hasRequired_getTag=1;var e=require_DataView(),t=require_Map(),r=require_Promise(),n=require_Set(),s=require_WeakMap(),i=require_baseGetTag(),o=require_toSource(),a="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",p=o(e),h=o(t),m=o(r),_=o(n),f=o(s),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=a||r&&g(r.resolve())!=u||n&&g(new n)!=l||s&&g(new s)!=c)&&(g=function(e){var t=i(e),r="[object Object]"==t?e.constructor:void 0,n=r?o(r):"";if(n)switch(n){case p:return d;case h:return a;case m:return u;case _:return l;case f:return c}return t}),_getTag=g}function require_baseIsEqualDeep(){if(hasRequired_baseIsEqualDeep)return _baseIsEqualDeep;hasRequired_baseIsEqualDeep=1;var e=require_Stack(),t=require_equalArrays(),r=require_equalByTag(),n=require_equalObjects(),s=require_getTag(),i=requireIsArray(),o=requireIsBuffer(),a=requireIsTypedArray(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return _baseIsEqualDeep=function(p,h,m,_,f,g){var y=i(p),b=i(h),E=y?l:s(p),w=b?l:s(h),q=(E=E==u?c:E)==c,S=(w=w==u?c:w)==c,v=E==w;if(v&&o(p)){if(!o(h))return!1;y=!0,q=!1}if(v&&!q)return g||(g=new e),y||a(p)?t(p,h,m,_,f,g):r(p,h,E,m,_,f,g);if(!(1&m)){var R=q&&d.call(p,"__wrapped__"),O=S&&d.call(h,"__wrapped__");if(R||O){var I=R?p.value():p,P=O?h.value():h;return g||(g=new e),f(I,P,m,_,g)}}return!!v&&(g||(g=new e),n(p,h,m,_,f,g))}}function require_baseIsEqual(){if(hasRequired_baseIsEqual)return _baseIsEqual;hasRequired_baseIsEqual=1;var e=require_baseIsEqualDeep(),t=requireIsObjectLike();return _baseIsEqual=function r(n,s,i,o,a){return n===s||(null==n||null==s||!t(n)&&!t(s)?n!=n&&s!=s:e(n,s,i,o,r,a))},_baseIsEqual}function requireIsEqual(){if(hasRequiredIsEqual)return isEqual_1;hasRequiredIsEqual=1;var e=require_baseIsEqual();return isEqual_1=function(t,r){return e(t,r)}}function requireKeyValuePair(){if(hasRequiredKeyValuePair)return KeyValuePair_1;hasRequiredKeyValuePair=1;class e{constructor(e,t){this.key=e,this.value=t}clone(){const t=new e;return this.key&&(t.key=this.key.clone()),this.value&&(t.value=this.value.clone()),t}}return KeyValuePair_1=e}function requireNegate(){if(hasRequiredNegate)return negate_1;hasRequiredNegate=1;return negate_1=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},negate_1}function requireArraySlice(){if(hasRequiredArraySlice)return ArraySlice_1;hasRequiredArraySlice=1;const e=requireNegate();function t(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}class r{constructor(e){this.elements=e||[]}toValue(){return this.elements.map((e=>e.toValue()))}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(e,n){return e=t(e),new r(this.elements.filter(e,n))}reject(n,s){return n=t(n),new r(this.elements.filter(e(n),s))}find(e,r){return e=t(e),this.elements.find(e,r)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some((t=>t.equals(e)))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}return"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),ArraySlice_1=r}function requireElement(){if(hasRequiredElement)return Element_1;hasRequiredElement=1;const e=requireIsEqual(),t=requireKeyValuePair(),r=requireArraySlice();class n{constructor(e,t,r){t&&(this.meta=t),r&&(this.attributes=r),this.content=e}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((e=>{e.parent=this,e.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map((e=>e.clone())):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof n?this.content.toValue():this.content instanceof t?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((e=>e.toValue()),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){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 n=e.pop();let s=new r;const i=(e,t)=>(e.push(t),e),o=(e,r)=>{r.element===n&&e.push(r);const s=r.findRecursive(n);return s&&s.reduce(i,e),r.content instanceof t&&(r.content.key&&o(e,r.content.key),r.content.value&&o(e,r.content.value)),e};return this.content&&(this.content.element&&o(s,this.content),Array.isArray(this.content)&&this.content.reduce(o,s)),e.isEmpty||(s=s.filter((t=>{let r=t.parents.map((e=>e.element));for(const t in e){const n=e[t],s=r.indexOf(n);if(-1===s)return!1;r=r.splice(0,s)}return!0}))),s}set(e){return this.content=e,this}equals(t){return e(this.toValue(),t)}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof n)this._content=e;else if(e instanceof r)this.content=e.elements;else if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"null"===e||null==e)this._content=e;else if(e instanceof t)this._content=e;else if(Array.isArray(e))this._content=e.map(this.refract);else{if("object"!=typeof e)throw new Error("Cannot set content to given value");this._content=Object.keys(e).map((t=>new this.MemberElement(t,e[t])))}}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof this.ObjectElement?this._meta=e:this.meta.set(e||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof this.ObjectElement?this._attributes=e:this.attributes.set(e||{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new r;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new r(this.content);if(this.content instanceof t){const e=new r([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof n?new r([this.content]):new r}get recursiveChildren(){const e=new r;return this.children.forEach((t=>{e.push(t),t.recursiveChildren.forEach((t=>{e.push(t)}))})),e}}return Element_1=n}function requireNullElement(){if(hasRequiredNullElement)return NullElement_1;hasRequiredNullElement=1;const e=requireElement();return NullElement_1=class extends e{constructor(e,t,r){super(e||null,t,r),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}}function requireStringElement(){if(hasRequiredStringElement)return StringElement_1;hasRequiredStringElement=1;const e=requireElement();return StringElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}}function requireNumberElement(){if(hasRequiredNumberElement)return NumberElement_1;hasRequiredNumberElement=1;const e=requireElement();return NumberElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="number"}primitive(){return"number"}}}function requireBooleanElement(){if(hasRequiredBooleanElement)return BooleanElement_1;hasRequiredBooleanElement=1;const e=requireElement();return BooleanElement_1=class extends e{constructor(e,t,r){super(e,t,r),this.element="boolean"}primitive(){return"boolean"}}}function requireArrayElement(){if(hasRequiredArrayElement)return ArrayElement_1;hasRequiredArrayElement=1;const e=requireNegate(),t=requireElement(),r=requireArraySlice();class n extends t{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this.content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(e,t){return new r(this.content.filter(e,t))}reject(t,r){return this.filter(e(t),r)}reduce(e,t){let r,n;void 0!==t?(r=0,n=this.refract(t)):(r=1,n="object"===this.primitive()?this.first.value:this.first);for(let t=r;t<this.length;t+=1){const r=this.content[t];n="object"===this.primitive()?this.refract(e(n,r.value,r.key,r,this)):this.refract(e(n,r,t,this))}return n}forEach(e,t){this.content.forEach(((r,n)=>{e.bind(t)(r,this.refract(n))}))}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const r=t||{},n=!!r.recursive,s=void 0===r.results?[]:r.results;return this.forEach(((t,r,i)=>{n&&void 0!==t.findElements&&t.findElements(e,{results:s,recursive:n}),e(t,r,i)&&s.push(t)})),s}find(e){return new r(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find((t=>t.element===e))}findByClass(e){return this.find((t=>t.classes.includes(e)))}getById(e){return this.find((t=>t.id.toValue()===e)).first}includes(e){return this.content.some((t=>t.equals(e)))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map((t=>e(t)),this).reduce(((e,t)=>e.concat(t)),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}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,"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),ArrayElement_1=n}function requireMemberElement(){if(hasRequiredMemberElement)return MemberElement_1;hasRequiredMemberElement=1;const e=requireKeyValuePair(),t=requireElement();return MemberElement_1=class extends t{constructor(t,r,n,s){super(new e,n,s),this.element="member",this.key=t,this.value=r}get key(){return this.content.key}set key(e){this.content.key=this.refract(e)}get value(){return this.content.value}set value(e){this.content.value=this.refract(e)}}}function requireObjectSlice(){if(hasRequiredObjectSlice)return ObjectSlice_1;hasRequiredObjectSlice=1;const e=requireNegate(),t=requireArraySlice();class r extends t{map(e,t){return this.elements.map((r=>e.bind(t)(r.value,r.key,r)))}filter(e,t){return new r(this.elements.filter((r=>e.bind(t)(r.value,r.key,r))))}reject(t,r){return this.filter(e(t.bind(r)))}forEach(e,t){return this.elements.forEach(((r,n)=>{e.bind(t)(r.value,r.key,r,n)}))}keys(){return this.map(((e,t)=>t.toValue()))}values(){return this.map((e=>e.toValue()))}}return ObjectSlice_1=r}function requireObjectElement(){if(hasRequiredObjectElement)return ObjectElement_1;hasRequiredObjectElement=1;const e=requireNegate(),t=requireIsObject$1(),r=requireArrayElement(),n=requireMemberElement(),s=requireObjectSlice();return ObjectElement_1=class extends r{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e)),{})}get(e){const t=this.getMember(e);if(t)return t.value}getMember(e){if(void 0!==e)return this.content.find((t=>t.key.toValue()===e))}remove(e){let t=null;return this.content=this.content.filter((r=>r.key.toValue()!==e||(t=r,!1))),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,r){if(t(e))return Object.keys(e).forEach((t=>{this.set(t,e[t])})),this;const s=e,i=this.getMember(s);return i?i.value=r:this.content.push(new n(s,r)),this}keys(){return this.content.map((e=>e.key.toValue()))}values(){return this.content.map((e=>e.value.toValue()))}hasKey(e){return this.content.some((t=>t.key.equals(e)))}items(){return this.content.map((e=>[e.key.toValue(),e.value.toValue()]))}map(e,t){return this.content.map((r=>e.bind(t)(r.value,r.key,r)))}compactMap(e,t){const r=[];return this.forEach(((n,s,i)=>{const o=e.bind(t)(n,s,i);o&&r.push(o)})),r}filter(e,t){return new s(this.content).filter(e,t)}reject(t,r){return this.filter(e(t),r)}forEach(e,t){return this.content.forEach((r=>e.bind(t)(r.value,r.key,r)))}}}function requireLinkElement(){if(hasRequiredLinkElement)return LinkElement_1;hasRequiredLinkElement=1;const e=requireElement();return LinkElement_1=class extends e{constructor(e,t,r){super(e||[],t,r),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}}}function requireRefElement(){if(hasRequiredRefElement)return RefElement_1;hasRequiredRefElement=1;const e=requireElement();return RefElement_1=class extends e{constructor(e,t,r){super(e||[],t,r),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}}}function requireElements(){if(hasRequiredElements)return elements;hasRequiredElements=1;const e=requireElement(),t=requireNullElement(),r=requireStringElement(),n=requireNumberElement(),s=requireBooleanElement(),i=requireArrayElement(),o=requireMemberElement(),a=requireObjectElement(),u=requireLinkElement(),l=requireRefElement(),c=requireArraySlice(),d=requireObjectSlice(),p=requireKeyValuePair();function h(o){if(o instanceof e)return o;if("string"==typeof o)return new r(o);if("number"==typeof o)return new n(o);if("boolean"==typeof o)return new s(o);if(null===o)return new t;if(Array.isArray(o))return new i(o.map(h));if("object"==typeof o){return new a(o)}return o}return e.prototype.ObjectElement=a,e.prototype.RefElement=l,e.prototype.MemberElement=o,e.prototype.refract=h,c.prototype.refract=h,elements={Element:e,NullElement:t,StringElement:r,NumberElement:n,BooleanElement:s,ArrayElement:i,MemberElement:o,ObjectElement:a,LinkElement:u,RefElement:l,refract:h,ArraySlice:c,ObjectSlice:d,KeyValuePair:p}}function requireNamespace(){if(hasRequiredNamespace)return Namespace_1;hasRequiredNamespace=1;const e=requireIsNull(),t=requireIsString(),r=requireIsNumber(),n=requireIsBoolean(),s=requireIsObject$1(),i=requireJSONSerialiser(),o=requireElements();class a{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=o.Element,this.KeyValuePair=o.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.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(e,o.NullElement,!1).detect(t,o.StringElement,!1).detect(r,o.NumberElement,!1).detect(n,o.BooleanElement,!1).detect(Array.isArray,o.ArrayElement,!1).detect(s,o.ObjectElement,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,r){return void 0===r||r?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(let r=0;r<this.elementDetection.length;r+=1){const n=this.elementDetection[r][0],s=this.elementDetection[r][1];if(n(e)){t=new s(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]}))),this._elements}get serialiser(){return new i(this)}}return i.prototype.Namespace=a,Namespace_1=a}function requireJSON06Serialiser(){if(hasRequiredJSON06Serialiser)return JSON06Serialiser_1;hasRequiredJSON06Serialiser=1;const e=requireJSONSerialiser();return JSON06Serialiser_1=class extends e{serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);let t;e._attributes&&e.attributes.get("variable")&&(t=e.attributes.get("variable"));const r={element:e.element};e._meta&&e._meta.length>0&&(r.meta=this.serialiseObject(e.meta));const n="enum"===e.element||-1!==e.attributes.keys().indexOf("enumerations");if(n){const t=this.enumSerialiseAttributes(e);t&&(r.attributes=t)}else if(e._attributes&&e._attributes.length>0){let{attributes:n}=e;n.get("metadata")&&(n=n.clone(),n.set("meta",n.get("metadata")),n.remove("metadata")),"member"===e.element&&t&&(n=n.clone(),n.remove("variable")),n.length>0&&(r.attributes=this.serialiseObject(n))}if(n)r.content=this.enumSerialiseContent(e,r);else if(this[`${e.element}SerialiseContent`])r.content=this[`${e.element}SerialiseContent`](e,r);else if(void 0!==e.content){let n;t&&e.content.key?(n=e.content.clone(),n.key.attributes.set("variable",t),n=this.serialiseContent(n)):n=this.serialiseContent(e.content),this.shouldSerialiseContent(e,n)&&(r.content=n)}else this.shouldSerialiseContent(e,e.content)&&e instanceof this.namespace.elements.Array&&(r.content=[]);return r}shouldSerialiseContent(e,t){return"parseResult"===e.element||"httpRequest"===e.element||"httpResponse"===e.element||"category"===e.element||"link"===e.element||void 0!==t&&(!Array.isArray(t)||0!==t.length)}refSerialiseContent(e,t){return delete t.attributes,{href:e.toValue(),path:e.path.toValue()}}sourceMapSerialiseContent(e){return e.toValue()}dataStructureSerialiseContent(e){return[this.serialiseContent(e.content)]}enumSerialiseAttributes(e){const t=e.attributes.clone(),r=t.remove("enumerations")||new this.namespace.elements.Array([]),n=t.get("default");let s=t.get("samples")||new this.namespace.elements.Array([]);if(n&&n.content&&(n.content.attributes&&n.content.attributes.remove("typeAttributes"),t.set("default",new this.namespace.elements.Array([n.content]))),s.forEach((e=>{e.content&&e.content.element&&e.content.attributes.remove("typeAttributes")})),e.content&&0!==r.length&&s.unshift(e.content),s=s.map((e=>e instanceof this.namespace.elements.Array?[e]:new this.namespace.elements.Array([e.content]))),s.length&&t.set("samples",s),t.length>0)return this.serialiseObject(t)}enumSerialiseContent(e){if(e._attributes){const t=e.attributes.get("enumerations");if(t&&t.length>0)return t.content.map((e=>{const t=e.clone();return t.attributes.remove("typeAttributes"),this.serialise(t)}))}if(e.content){const t=e.content.clone();return t.attributes.remove("typeAttributes"),[this.serialise(t)]}return[]}deserialise(e){if("string"==typeof e)return new this.namespace.elements.String(e);if("number"==typeof e)return new this.namespace.elements.Number(e);if("boolean"==typeof e)return new this.namespace.elements.Boolean(e);if(null===e)return new this.namespace.elements.Null;if(Array.isArray(e))return new this.namespace.elements.Array(e.map(this.deserialise,this));const t=this.namespace.getElementClass(e.element),r=new t;r.element!==e.element&&(r.element=e.element),e.meta&&this.deserialiseObject(e.meta,r.meta),e.attributes&&this.deserialiseObject(e.attributes,r.attributes);const n=this.deserialiseContent(e.content);if(void 0===n&&null!==r.content||(r.content=n),"enum"===r.element){r.content&&r.attributes.set("enumerations",r.content);let e=r.attributes.get("samples");if(r.attributes.remove("samples"),e){const n=e;e=new this.namespace.elements.Array,n.forEach((n=>{n.forEach((n=>{const s=new t(n);s.element=r.element,e.push(s)}))}));const s=e.shift();r.content=s?s.content:void 0,r.attributes.set("samples",e)}else r.content=void 0;let n=r.attributes.get("default");if(n&&n.length>0){n=n.get(0);const e=new t(n);e.element=r.element,r.attributes.set("default",e)}}else if("dataStructure"===r.element&&Array.isArray(r.content))[r.content]=r.content;else if("category"===r.element){const e=r.attributes.get("meta");e&&(r.attributes.set("metadata",e),r.attributes.remove("meta"))}else"member"===r.element&&r.key&&r.key._attributes&&r.key._attributes.getValue("variable")&&(r.attributes.set("variable",r.key.attributes.get("variable")),r.key.attributes.remove("variable"));return r}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}return e&&e.map?e.map(this.serialise,this):e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}shouldRefract(e){return!!(e._attributes&&e.attributes.keys().length||e._meta&&e.meta.keys().length)||"enum"!==e.element&&(e.element!==e.primitive()||"member"===e.element)}convertKeyToRefract(e,t){return this.shouldRefract(t)?this.serialise(t):"enum"===t.element?this.serialiseEnum(t):"array"===t.element?t.map((t=>this.shouldRefract(t)||"default"===e?this.serialise(t):"array"===t.element||"object"===t.element||"enum"===t.element?t.children.map((e=>this.serialise(e))):t.toValue())):"object"===t.element?(t.content||[]).map(this.serialise,this):t.toValue()}serialiseEnum(e){return e.children.map((e=>this.serialise(e)))}serialiseObject(e){const t={};return e.forEach(((e,r)=>{if(e){const n=r.toValue();t[n]=this.convertKeyToRefract(n,e)}})),t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}}}function requireMinim(){if(hasRequiredMinim)return minim;hasRequiredMinim=1;const e=requireNamespace(),t=requireElements();return minim.Namespace=e,minim.namespace=function(t){return new e(t)},minim.KeyValuePair=requireKeyValuePair(),minim.ArraySlice=t.ArraySlice,minim.ObjectSlice=t.ObjectSlice,minim.Element=t.Element,minim.StringElement=t.StringElement,minim.NumberElement=t.NumberElement,minim.BooleanElement=t.BooleanElement,minim.NullElement=t.NullElement,minim.ArrayElement=t.ArrayElement,minim.ObjectElement=t.ObjectElement,minim.MemberElement=t.MemberElement,minim.RefElement=t.RefElement,minim.LinkElement=t.LinkElement,minim.refract=t.refract,minim.JSONSerialiser=requireJSONSerialiser(),minim.JSON06Serialiser=requireJSON06Serialiser(),minim}_nodeUtil.exports;var minimExports=requireMinim();class Annotation extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}class Comment extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="comment"}}let ParseResult$1=class extends minimExports.ArrayElement{constructor(e,t,r){super(e,t,r),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=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if(isUndefined(t))return!1;const r=this.content.findIndex((e=>e===t));return-1!==r&&(this.content[r]=e,!0)}};const hasMethod=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],hasBasicElementProps=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,primitiveEq=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&("function"==typeof t.primitive&&t.primitive()===e),hasClass=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof minimExports.ArrayElement)&&t.classes.includes(e),isElementType=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,createPredicate=e=>e({hasMethod:hasMethod,hasBasicElementProps:hasBasicElementProps,primitiveEq:primitiveEq,isElementType:isElementType,hasClass:hasClass}),isElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.Element||e(r)&&t(void 0,r))),isStringElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.StringElement||e(r)&&t("string",r))),isNumberElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.NumberElement||e(r)&&t("number",r))),isNullElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.NullElement||e(r)&&t("null",r))),isBooleanElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof minimExports.BooleanElement||e(r)&&t("boolean",r))),isObjectElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof minimExports.ObjectElement||e(n)&&t("object",n)&&r("keys",n)&&r("values",n)&&r("items",n))),isArrayElement=createPredicate((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof minimExports.ArrayElement&&!(n instanceof minimExports.ObjectElement)||e(n)&&t("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n))),isMemberElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.MemberElement||e(n)&&t("member",n)&&r(void 0,n))),isLinkElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.LinkElement||e(n)&&t("link",n)&&r(void 0,n))),isRefElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof minimExports.RefElement||e(n)&&t("ref",n)&&r(void 0,n))),isAnnotationElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Annotation||e(n)&&t("annotation",n)&&r("array",n))),isCommentElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Comment||e(n)&&t("comment",n)&&r("string",n))),isParseResultElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof ParseResult$1||e(n)&&t("parseResult",n)&&r("array",n))),isPrimitiveElement=e=>isElementType("object",e)||isElementType("array",e)||isElementType("boolean",e)||isElementType("number",e)||isElementType("string",e)||isElementType("null",e)||isElementType("member",e),hasElementSourceMap=e=>!!isElement(e)&&(Number.isInteger(e.startPositionRow)&&Number.isInteger(e.startPositionColumn)&&Number.isInteger(e.startIndex)&&Number.isInteger(e.endPositionRow)&&Number.isInteger(e.endPositionColumn)&&Number.isInteger(e.endIndex)),includesSymbols=(e,t)=>{if(0===e.length)return!0;const r=t.attributes.get("symbols");return!!isArrayElement(r)&&all(included(r.toValue()),e)},includesClasses=(e,t)=>0===e.length||all(included(t.classes.toValue()),e),basePredicates=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:hasElementSourceMap,includesClasses:includesClasses,includesSymbols:includesSymbols,isAnnotationElement:isAnnotationElement,isArrayElement:isArrayElement,isBooleanElement:isBooleanElement,isCommentElement:isCommentElement,isElement:isElement,isLinkElement:isLinkElement,isMemberElement:isMemberElement,isNullElement:isNullElement,isNumberElement:isNumberElement,isObjectElement:isObjectElement,isParseResultElement:isParseResultElement,isPrimitiveElement:isPrimitiveElement,isRefElement:isRefElement,isStringElement:isStringElement},Symbol.toStringTag,{value:"Module"}));class Namespace extends minimExports.Namespace{constructor(){super(),this.register("annotation",Annotation),this.register("comment",Comment),this.register("parseResult",ParseResult$1)}}const namespace$1=new Namespace,createNamespace=e=>{const t=new Namespace;return isPlainObj(e)&&t.use(e),t},createToolbox$1=()=>({predicates:{...basePredicates},namespace:namespace$1});class Node{static type="node";type="node";isMissing;children;startPositionRow;startPositionColumn;startIndex;endPositionRow;endPositionColumn;endIndex;constructor({children:e=[],isMissing:t=!1,startPositionRow:r,startPositionColumn:n,startIndex:s,endPositionRow:i,endPositionColumn:o,endIndex:a}={}){this.type=this.constructor.type,this.isMissing=t,this.children=e,this.startPositionRow=r,this.startPositionColumn=n,this.startIndex=s,this.endPositionRow=i,this.endPositionColumn=o,this.endIndex=a}clone(){const e=Object.create(Object.getPrototypeOf(this));return Object.getOwnPropertyNames(this).forEach((t=>{const r=Object.getOwnPropertyDescriptor(this,t);Object.defineProperty(e,t,r)})),e}}const isNodeType=(e,t)=>null!=t&&"object"==typeof t&&"type"in t&&t.type===e;class YamlAlias extends Node{static type="alias";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlNode extends Node{anchor;tag;style;styleGroup;constructor({anchor:e,tag:t,style:r,styleGroup:n,...s}){super({...s}),this.anchor=e,this.tag=t,this.style=r,this.styleGroup=n}}class YamlCollection extends YamlNode{}class YamlComment extends Node{static type="comment";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlDirective extends Node{static type="directive";name;parameters;constructor({name:e,parameters:t,...r}){super({...r}),this.name=e,this.parameters=mergeRight({version:void 0,handle:void 0,prefix:void 0},t)}}class YamlDocument extends Node{static type="document"}const isDocument=e=>isNodeType("document",e),isMapping=e=>isNodeType("mapping",e),isSequence=e=>isNodeType("sequence",e),isKeyValuePair=e=>isNodeType("keyValuePair",e),isAnchor=e=>isNodeType("anchor",e),isScalar=e=>isNodeType("scalar",e),isAlias=e=>isNodeType("alias",e),isComment=e=>isNodeType("comment",e);class YamlKeyValuePair extends Node{static type="keyValuePair";styleGroup;constructor({styleGroup:e,...t}){super({...t}),this.styleGroup=e}}Object.defineProperties(YamlKeyValuePair.prototype,{key:{get(){return this.children.filter((e=>isScalar(e)||isMapping(e)||isSequence(e)))[0]},enumerable:!0},value:{get(){const{key:e,children:t}=this;return t.filter((t=>(t=>t!==e)(t)&&(e=>isScalar(e)||isMapping(e)||isSequence(e)||isAlias(e))(t)))[0]},enumerable:!0}});class YamlMapping extends YamlCollection{static type="mapping"}Object.defineProperty(YamlMapping.prototype,"content",{get(){return Array.isArray(this.children)?this.children.filter(isKeyValuePair):[]},enumerable:!0});class YamlScalar extends YamlNode{static type="scalar";content;constructor({content:e,...t}){super({...t}),this.content=e}}class YamlSequence extends YamlCollection{static type="sequence"}Object.defineProperty(YamlSequence.prototype,"content",{get(){const{children:e}=this;return Array.isArray(e)?e.filter((e=>isSequence(e)||isMapping(e)||isScalar(e)||isAlias(e))):[]},enumerable:!0});class YamlStream extends Node{static type="stream"}Object.defineProperty(YamlStream.prototype,"content",{get(){return Array.isArray(this.children)?this.children.filter((e=>isDocument(e)||isComment(e))):[]},enumerable:!0});let YamlNodeKind=function(e){return e.Scalar="Scalar",e.Sequence="Sequence",e.Mapping="Mapping",e}({});class YamlTag extends Node{static type="tag";explicitName;kind;constructor({explicitName:e,kind:t,...r}){super({...r}),this.explicitName=e,this.kind=t}}class YamlAnchor extends Node{static type="anchor";name;constructor({name:e,...t}){super({...t}),this.name=e}}let YamlStyle=function(e){return e.Plain="Plain",e.SingleQuoted="SingleQuoted",e.DoubleQuoted="DoubleQuoted",e.Literal="Literal",e.Folded="Folded",e.Explicit="Explicit",e.SinglePair="SinglePair",e.NextLine="NextLine",e.InLine="InLine",e}({}),YamlStyleGroup=function(e){return e.Flow="Flow",e.Block="Block",e}({});var esnext_aggregateError={},es_aggregateError={},es_aggregateError_constructor={},globalThis_1,hasRequiredGlobalThis,fails,hasRequiredFails,functionBindNative,hasRequiredFunctionBindNative,functionApply,hasRequiredFunctionApply,functionUncurryThis,hasRequiredFunctionUncurryThis,classofRaw,hasRequiredClassofRaw,functionUncurryThisClause,hasRequiredFunctionUncurryThisClause,isCallable,hasRequiredIsCallable;function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var e=function(e){return e&&e.Math===Math&&e};return globalThis_1=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof commonjsGlobal&&commonjsGlobal)||e("object"==typeof globalThis_1&&globalThis_1)||function(){return this}()||Function("return this")()}function requireFails(){return hasRequiredFails?fails:(hasRequiredFails=1,fails=function(e){try{return!!e()}catch(e){return!0}})}function requireFunctionBindNative(){return hasRequiredFunctionBindNative?functionBindNative:(hasRequiredFunctionBindNative=1,functionBindNative=!requireFails()((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})))}function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var e=requireFunctionBindNative(),t=Function.prototype,r=t.apply,n=t.call;return functionApply="object"==typeof Reflect&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),functionApply}function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var e=requireFunctionBindNative(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return functionUncurryThis=e?n:function(e){return function(){return r.apply(e,arguments)}},functionUncurryThis}function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var e=requireFunctionUncurryThis(),t=e({}.toString),r=e("".slice);return classofRaw=function(e){return r(t(e),8,-1)}}function requireFunctionUncurryThisClause(){if(hasRequiredFunctionUncurryThisClause)return functionUncurryThisClause;hasRequiredFunctionUncurryThisClause=1;var e=requireClassofRaw(),t=requireFunctionUncurryThis();return functionUncurryThisClause=function(r){if("Function"===e(r))return t(r)}}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var e="object"==typeof document&&document.all;return isCallable=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var objectGetOwnPropertyDescriptor={},descriptors,hasRequiredDescriptors,functionCall,hasRequiredFunctionCall;function requireDescriptors(){return hasRequiredDescriptors?descriptors:(hasRequiredDescriptors=1,descriptors=!requireFails()((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})))}function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var e=requireFunctionBindNative(),t=Function.prototype.call;return functionCall=e?t.bind(t):function(){return t.apply(t,arguments)},functionCall}var objectPropertyIsEnumerable={},hasRequiredObjectPropertyIsEnumerable,createPropertyDescriptor,hasRequiredCreatePropertyDescriptor,indexedObject,hasRequiredIndexedObject,isNullOrUndefined,hasRequiredIsNullOrUndefined,requireObjectCoercible,hasRequiredRequireObjectCoercible,toIndexedObject,hasRequiredToIndexedObject,isObject,hasRequiredIsObject,path,hasRequiredPath,getBuiltIn,hasRequiredGetBuiltIn,objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf,environmentUserAgent,hasRequiredEnvironmentUserAgent,environmentV8Version,hasRequiredEnvironmentV8Version,symbolConstructorDetection,hasRequiredSymbolConstructorDetection,useSymbolAsUid,hasRequiredUseSymbolAsUid,isSymbol,hasRequiredIsSymbol,tryToString,hasRequiredTryToString,aCallable,hasRequiredACallable,getMethod,hasRequiredGetMethod,ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive;function requireObjectPropertyIsEnumerable(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return objectPropertyIsEnumerable.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,objectPropertyIsEnumerable}function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor?createPropertyDescriptor:(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function requireIndexedObject(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var e=requireFunctionUncurryThis(),t=requireFails(),r=requireClassofRaw(),n=Object,s=e("".split);return indexedObject=t((function(){return!n("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?s(e,""):n(e)}:n}function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined?isNullOrUndefined:(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(e){return null==e})}function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var e=requireIsNullOrUndefined(),t=TypeError;return requireObjectCoercible=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var e=requireIndexedObject(),t=requireRequireObjectCoercible();return toIndexedObject=function(r){return e(t(r))}}function requireIsObject(){if(hasRequiredIsObject)return isObject;hasRequiredIsObject=1;var e=requireIsCallable();return isObject=function(t){return"object"==typeof t?null!==t:e(t)}}function requirePath(){return hasRequiredPath?path:(hasRequiredPath=1,path={})}function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var e=requirePath(),t=requireGlobalThis(),r=requireIsCallable(),n=function(e){return r(e)?e:void 0};return getBuiltIn=function(r,s){return arguments.length<2?n(e[r])||n(t[r]):e[r]&&e[r][s]||t[r]&&t[r][s]},getBuiltIn}function requireObjectIsPrototypeOf(){return hasRequiredObjectIsPrototypeOf?objectIsPrototypeOf:(hasRequiredObjectIsPrototypeOf=1,objectIsPrototypeOf=requireFunctionUncurryThis()({}.isPrototypeOf))}function requireEnvironmentUserAgent(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var e=requireGlobalThis().navigator,t=e&&e.userAgent;return environmentUserAgent=t?String(t):""}function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var e,t,r=requireGlobalThis(),n=requireEnvironmentUserAgent(),s=r.process,i=r.Deno,o=s&&s.versions||i&&i.version,a=o&&o.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),environmentV8Version=t}function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var e=requireEnvironmentV8Version(),t=requireFails(),r=requireGlobalThis().String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function requireUseSymbolAsUid(){return hasRequiredUseSymbolAsUid?useSymbolAsUid:(hasRequiredUseSymbolAsUid=1,useSymbolAsUid=requireSymbolConstructorDetection()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var e=requireGetBuiltIn(),t=requireIsCallable(),r=requireObjectIsPrototypeOf(),n=Object;return isSymbol=requireUseSymbolAsUid()?function(e){return"symbol"==typeof e}:function(s){var i=e("Symbol");return t(i)&&r(i.prototype,n(s))}}function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var e=String;return tryToString=function(t){try{return e(t)}catch(e){return"Object"}}}function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var e=requireIsCallable(),t=requireTryToString(),r=TypeError;return aCallable=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var e=requireACallable(),t=requireIsNullOrUndefined();return getMethod=function(r,n){var s=r[n];return t(s)?void 0:e(s)}}function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var e=requireFunctionCall(),t=requireIsCallable(),r=requireIsObject(),n=TypeError;return ordinaryToPrimitive=function(s,i){var o,a;if("string"===i&&t(o=s.toString)&&!r(a=e(o,s)))return a;if(t(o=s.valueOf)&&!r(a=e(o,s)))return a;if("string"!==i&&t(o=s.toString)&&!r(a=e(o,s)))return a;throw new n("Can't convert object to primitive value")}}var sharedStore={exports:{}},isPure,hasRequiredIsPure,defineGlobalProperty,hasRequiredDefineGlobalProperty,hasRequiredSharedStore,shared,hasRequiredShared,toObject,hasRequiredToObject,hasOwnProperty_1,hasRequiredHasOwnProperty,uid,hasRequiredUid,wellKnownSymbol,hasRequiredWellKnownSymbol,toPrimitive,hasRequiredToPrimitive,toPropertyKey,hasRequiredToPropertyKey,documentCreateElement,hasRequiredDocumentCreateElement,ie8DomDefine,hasRequiredIe8DomDefine,hasRequiredObjectGetOwnPropertyDescriptor,isForced_1,hasRequiredIsForced,functionBindContext,hasRequiredFunctionBindContext;function requireIsPure(){return hasRequiredIsPure?isPure:(hasRequiredIsPure=1,isPure=!0)}function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var e=requireGlobalThis(),t=Object.defineProperty;return defineGlobalProperty=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var e=requireIsPure(),t=requireGlobalThis(),r=requireDefineGlobalProperty(),n="__core-js_shared__",s=sharedStore.exports=t[n]||r(n,{});return(s.versions||(s.versions=[])).push({version:"3.42.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var e=requireSharedStore();return shared=function(t,r){return e[t]||(e[t]=r||{})}}function requireToObject(){if(hasRequiredToObject)return toObject;hasRequiredToObject=1;var e=requireRequireObjectCoercible(),t=Object;return toObject=function(r){return t(e(r))}}function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var e=requireFunctionUncurryThis(),t=requireToObject(),r=e({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(e,n){return r(t(e),n)}}function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var e=requireFunctionUncurryThis(),t=0,r=Math.random(),n=e(1..toString);return uid=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var e=requireGlobalThis(),t=requireShared(),r=requireHasOwnProperty(),n=requireUid(),s=requireSymbolConstructorDetection(),i=requireUseSymbolAsUid(),o=e.Symbol,a=t("wks"),u=i?o.for||o:o&&o.withoutSetter||n;return wellKnownSymbol=function(e){return r(a,e)||(a[e]=s&&r(o,e)?o[e]:u("Symbol."+e)),a[e]}}function requireToPrimitive(){if(hasRequiredToPrimitive)return toPrimitive;hasRequiredToPrimitive=1;var e=requireFunctionCall(),t=requireIsObject(),r=requireIsSymbol(),n=requireGetMethod(),s=requireOrdinaryToPrimitive(),i=TypeError,o=requireWellKnownSymbol()("toPrimitive");return toPrimitive=function(a,u){if(!t(a)||r(a))return a;var l,c=n(a,o);if(c){if(void 0===u&&(u="default"),l=e(c,a,u),!t(l)||r(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),s(a,u)}}function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey;hasRequiredToPropertyKey=1;var e=requireToPrimitive(),t=requireIsSymbol();return toPropertyKey=function(r){var n=e(r,"string");return t(n)?n:n+""}}function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var e=requireGlobalThis(),t=requireIsObject(),r=e.document,n=t(r)&&t(r.createElement);return documentCreateElement=function(e){return n?r.createElement(e):{}}}function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var e=requireDescriptors(),t=requireFails(),r=requireDocumentCreateElement();return ie8DomDefine=!e&&!t((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))}function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var e=requireDescriptors(),t=requireFunctionCall(),r=requireObjectPropertyIsEnumerable(),n=requireCreatePropertyDescriptor(),s=requireToIndexedObject(),i=requireToPropertyKey(),o=requireHasOwnProperty(),a=requireIe8DomDefine(),u=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=e?u:function(e,l){if(e=s(e),l=i(l),a)try{return u(e,l)}catch(e){}if(o(e,l))return n(!t(r.f,e,l),e[l])},objectGetOwnPropertyDescriptor}function requireIsForced(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var e=requireFails(),t=requireIsCallable(),r=/#|\.prototype\./,n=function(r,n){var u=i[s(r)];return u===a||u!==o&&(t(n)?e(n):!!n)},s=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",a=n.POLYFILL="P";return isForced_1=n}function requireFunctionBindContext(){if(hasRequiredFunctionBindContext)return functionBindContext;hasRequiredFunctionBindContext=1;var e=requireFunctionUncurryThisClause(),t=requireACallable(),r=requireFunctionBindNative(),n=e(e.bind);return functionBindContext=function(e,s){return t(e),void 0===s?e:r?n(e,s):function(){return e.apply(s,arguments)}},functionBindContext}var objectDefineProperty={},v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug,anObject,hasRequiredAnObject,hasRequiredObjectDefineProperty,createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty,_export,hasRequired_export,sharedKey,hasRequiredSharedKey,correctPrototypeGetter,hasRequiredCorrectPrototypeGetter,objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf,functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor,isPossiblePrototype,hasRequiredIsPossiblePrototype,aPossiblePrototype,hasRequiredAPossiblePrototype,objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf;function requireV8PrototypeDefineBug(){return hasRequiredV8PrototypeDefineBug?v8PrototypeDefineBug:(hasRequiredV8PrototypeDefineBug=1,v8PrototypeDefineBug=requireDescriptors()&&requireFails()((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})))}function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var e=requireIsObject(),t=String,r=TypeError;return anObject=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var e=requireDescriptors(),t=requireIe8DomDefine(),r=requireV8PrototypeDefineBug(),n=requireAnObject(),s=requireToPropertyKey(),i=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return objectDefineProperty.f=e?r?function(e,t,r){if(n(e),t=s(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=a(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return o(e,t,r)}:o:function(e,r,a){if(n(e),r=s(r),n(a),t)try{return o(e,r,a)}catch(e){}if("get"in a||"set"in a)throw new i("Accessors not supported");return"value"in a&&(e[r]=a.value),e},objectDefineProperty}function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var e=requireDescriptors(),t=requireObjectDefineProperty(),r=requireCreatePropertyDescriptor();return createNonEnumerableProperty=e?function(e,n,s){return t.f(e,n,r(1,s))}:function(e,t,r){return e[t]=r,e}}function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var e=requireGlobalThis(),t=requireFunctionApply(),r=requireFunctionUncurryThisClause(),n=requireIsCallable(),s=requireObjectGetOwnPropertyDescriptor().f,i=requireIsForced(),o=requirePath(),a=requireFunctionBindContext(),u=requireCreateNonEnumerableProperty(),l=requireHasOwnProperty(),c=function(e){var r=function(n,s,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,s)}return new e(n,s,i)}return t(e,this,arguments)};return r.prototype=e.prototype,r};return _export=function(t,d){var p,h,m,_,f,g,y,b,E,w=t.target,q=t.global,S=t.stat,v=t.proto,R=q?e:S?e[w]:e[w]&&e[w].prototype,O=q?o:o[w]||u(o,w,{})[w],I=O.prototype;for(_ in d)h=!(p=i(q?_:w+(S?".":"#")+_,t.forced))&&R&&l(R,_),g=O[_],h&&(y=t.dontCallGetSet?(E=s(R,_))&&E.value:R[_]),f=h&&y?y:d[_],(p||v||typeof g!=typeof f)&&(b=t.bind&&h?a(f,e):t.wrap&&h?c(f):v&&n(f)?r(f):f,(t.sham||f&&f.sham||g&&g.sham)&&u(b,"sham",!0),u(O,_,b),v&&(l(o,m=w+"Prototype")||u(o,m,{}),u(o[m],_,f),t.real&&I&&(p||!I[_])&&u(I,_,f)))}}function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var e=requireShared(),t=requireUid(),r=e("keys");return sharedKey=function(e){return r[e]||(r[e]=t(e))}}function requireCorrectPrototypeGetter(){return hasRequiredCorrectPrototypeGetter||(hasRequiredCorrectPrototypeGetter=1,correctPrototypeGetter=!requireFails()((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))),correctPrototypeGetter}function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var e=requireHasOwnProperty(),t=requireIsCallable(),r=requireToObject(),n=requireSharedKey(),s=requireCorrectPrototypeGetter(),i=n("IE_PROTO"),o=Object,a=o.prototype;return objectGetPrototypeOf=s?o.getPrototypeOf:function(n){var s=r(n);if(e(s,i))return s[i];var u=s.constructor;return t(u)&&s instanceof u?u.prototype:s instanceof o?a:null}}function requireFunctionUncurryThisAccessor(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var e=requireFunctionUncurryThis(),t=requireACallable();return functionUncurryThisAccessor=function(r,n,s){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[s]))}catch(e){}}}function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var e=requireIsObject();return isPossiblePrototype=function(t){return e(t)||null===t}}function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var e=requireIsPossiblePrototype(),t=String,r=TypeError;return aPossiblePrototype=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var e=requireFunctionUncurryThisAccessor(),t=requireIsObject(),r=requireRequireObjectCoercible(),n=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var s,i=!1,o={};try{(s=e(Object.prototype,"__proto__","set"))(o,[]),i=o instanceof Array}catch(e){}return function(e,o){return r(e),n(o),t(e)?(i?s(e,o):e.__proto__=o,e):e}}():void 0)}var objectGetOwnPropertyNames={},mathTrunc,hasRequiredMathTrunc,toIntegerOrInfinity,hasRequiredToIntegerOrInfinity,toAbsoluteIndex,hasRequiredToAbsoluteIndex,toLength,hasRequiredToLength,lengthOfArrayLike,hasRequiredLengthOfArrayLike,arrayIncludes,hasRequiredArrayIncludes,hiddenKeys,hasRequiredHiddenKeys,objectKeysInternal,hasRequiredObjectKeysInternal,enumBugKeys,hasRequiredEnumBugKeys,hasRequiredObjectGetOwnPropertyNames;function requireMathTrunc(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var e=Math.ceil,t=Math.floor;return mathTrunc=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)}}function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var e=requireMathTrunc();return toIntegerOrInfinity=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var e=requireToIntegerOrInfinity(),t=Math.max,r=Math.min;return toAbsoluteIndex=function(n,s){var i=e(n);return i<0?t(i+s,0):r(i,s)}}function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var e=requireToIntegerOrInfinity(),t=Math.min;return toLength=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var e=requireToLength();return lengthOfArrayLike=function(t){return e(t.length)}}function requireArrayIncludes(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var e=requireToIndexedObject(),t=requireToAbsoluteIndex(),r=requireLengthOfArrayLike(),n=function(n){return function(s,i,o){var a=e(s),u=r(a);if(0===u)return!n&&-1;var l,c=t(o,u);if(n&&i!=i){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((n||c in a)&&a[c]===i)return n||c||0;return!n&&-1}};return arrayIncludes={includes:n(!0),indexOf:n(!1)}}function requireHiddenKeys(){return hasRequiredHiddenKeys?hiddenKeys:(hasRequiredHiddenKeys=1,hiddenKeys={})}function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var e=requireFunctionUncurryThis(),t=requireHasOwnProperty(),r=requireToIndexedObject(),n=requireArrayIncludes().indexOf,s=requireHiddenKeys(),i=e([].push);return objectKeysInternal=function(e,o){var a,u=r(e),l=0,c=[];for(a in u)!t(s,a)&&t(u,a)&&i(c,a);for(;o.length>l;)t(u,a=o[l++])&&(~n(c,a)||i(c,a));return c}}function requireEnumBugKeys(){return hasRequiredEnumBugKeys?enumBugKeys:(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function requireObjectGetOwnPropertyNames(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var e=requireObjectKeysInternal(),t=requireEnumBugKeys().concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(r){return e(r,t)},objectGetOwnPropertyNames}var objectGetOwnPropertySymbols={},hasRequiredObjectGetOwnPropertySymbols,ownKeys,hasRequiredOwnKeys,copyConstructorProperties,hasRequiredCopyConstructorProperties;function requireObjectGetOwnPropertySymbols(){return hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols}function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys;hasRequiredOwnKeys=1;var e=requireGetBuiltIn(),t=requireFunctionUncurryThis(),r=requireObjectGetOwnPropertyNames(),n=requireObjectGetOwnPropertySymbols(),s=requireAnObject(),i=t([].concat);return ownKeys=e("Reflect","ownKeys")||function(e){var t=r.f(s(e)),o=n.f;return o?i(t,o(e)):t},ownKeys}function requireCopyConstructorProperties(){if(hasRequiredCopyConstructorProperties)return copyConstructorProperties;hasRequiredCopyConstructorProperties=1;var e=requireHasOwnProperty(),t=requireOwnKeys(),r=requireObjectGetOwnPropertyDescriptor(),n=requireObjectDefineProperty();return copyConstructorProperties=function(s,i,o){for(var a=t(i),u=n.f,l=r.f,c=0;c<a.length;c++){var d=a[c];e(s,d)||o&&e(o,d)||u(s,d,l(i,d))}},copyConstructorProperties}var objectDefineProperties={},objectKeys,hasRequiredObjectKeys,hasRequiredObjectDefineProperties,html,hasRequiredHtml,objectCreate,hasRequiredObjectCreate,installErrorCause,hasRequiredInstallErrorCause,errorStackClear,hasRequiredErrorStackClear,errorStackInstallable,hasRequiredErrorStackInstallable,errorStackInstall,hasRequiredErrorStackInstall,iterators,hasRequiredIterators,isArrayIteratorMethod,hasRequiredIsArrayIteratorMethod,toStringTagSupport,hasRequiredToStringTagSupport,classof,hasRequiredClassof,getIteratorMethod,hasRequiredGetIteratorMethod,getIterator,hasRequiredGetIterator,iteratorClose,hasRequiredIteratorClose,iterate,hasRequiredIterate,toString,hasRequiredToString,normalizeStringArgument,hasRequiredNormalizeStringArgument,hasRequiredEs_aggregateError_constructor,hasRequiredEs_aggregateError,hasRequiredEsnext_aggregateError;function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var e=requireObjectKeysInternal(),t=requireEnumBugKeys();return objectKeys=Object.keys||function(r){return e(r,t)}}function requireObjectDefineProperties(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var e=requireDescriptors(),t=requireV8PrototypeDefineBug(),r=requireObjectDefineProperty(),n=requireAnObject(),s=requireToIndexedObject(),i=requireObjectKeys();return objectDefineProperties.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var o,a=s(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,o=u[c++],a[o]);return e},objectDefineProperties}function requireHtml(){return hasRequiredHtml?html:(hasRequiredHtml=1,html=requireGetBuiltIn()("document","documentElement"))}function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var e,t=requireAnObject(),r=requireObjectDefineProperties(),n=requireEnumBugKeys(),s=requireHiddenKeys(),i=requireHtml(),o=requireDocumentCreateElement(),a="prototype",u="script",l=requireSharedKey()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},p=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,s;h="undefined"!=typeof document?document.domain&&e?p(e):(r=o("iframe"),s="java"+u+":",r.style.display="none",i.appendChild(r),r.src=String(s),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):p(e);for(var l=n.length;l--;)delete h[a][n[l]];return h()};return s[l]=!0,objectCreate=Object.create||function(e,n){var s;return null!==e?(c[a]=t(e),s=new c,c[a]=null,s[l]=e):s=h(),void 0===n?s:r.f(s,n)}}function requireInstallErrorCause(){if(hasRequiredInstallErrorCause)return installErrorCause;hasRequiredInstallErrorCause=1;var e=requireIsObject(),t=requireCreateNonEnumerableProperty();return installErrorCause=function(r,n){e(n)&&"cause"in n&&t(r,"cause",n.cause)}}function requireErrorStackClear(){if(hasRequiredErrorStackClear)return errorStackClear;hasRequiredErrorStackClear=1;var e=Error,t=requireFunctionUncurryThis()("".replace),r=String(new e("zxcasd").stack),n=/\n\s*at [^:]*:[^\n]*/,s=n.test(r);return errorStackClear=function(r,i){if(s&&"string"==typeof r&&!e.prepareStackTrace)for(;i--;)r=t(r,n,"");return r}}function requireErrorStackInstallable(){if(hasRequiredErrorStackInstallable)return errorStackInstallable;hasRequiredErrorStackInstallable=1;var e=requireFails(),t=requireCreatePropertyDescriptor();return errorStackInstallable=!e((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)}))}function requireErrorStackInstall(){if(hasRequiredErrorStackInstall)return errorStackInstall;hasRequiredErrorStackInstall=1;var e=requireCreateNonEnumerableProperty(),t=requireErrorStackClear(),r=requireErrorStackInstallable(),n=Error.captureStackTrace;return errorStackInstall=function(s,i,o,a){r&&(n?n(s,i):e(s,"stack",t(o,a)))}}function requireIterators(){return hasRequiredIterators?iterators:(hasRequiredIterators=1,iterators={})}function requireIsArrayIteratorMethod(){if(hasRequiredIsArrayIteratorMethod)return isArrayIteratorMethod;hasRequiredIsArrayIteratorMethod=1;var e=requireWellKnownSymbol(),t=requireIterators(),r=e("iterator"),n=Array.prototype;return isArrayIteratorMethod=function(e){return void 0!==e&&(t.Array===e||n[r]===e)}}function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var e={};return e[requireWellKnownSymbol()("toStringTag")]="z",toStringTagSupport="[object z]"===String(e)}function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var e=requireToStringTagSupport(),t=requireIsCallable(),r=requireClassofRaw(),n=requireWellKnownSymbol()("toStringTag"),s=Object,i="Arguments"===r(function(){return arguments}());return classof=e?r:function(e){var o,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(o=s(e),n))?a:i?r(o):"Object"===(u=r(o))&&t(o.callee)?"Arguments":u}}function requireGetIteratorMethod(){if(hasRequiredGetIteratorMethod)return getIteratorMethod;hasRequiredGetIteratorMethod=1;var e=requireClassof(),t=requireGetMethod(),r=requireIsNullOrUndefined(),n=requireIterators(),s=requireWellKnownSymbol()("iterator");return getIteratorMethod=function(i){if(!r(i))return t(i,s)||t(i,"@@iterator")||n[e(i)]}}function requireGetIterator(){if(hasRequiredGetIterator)return getIterator;hasRequiredGetIterator=1;var e=requireFunctionCall(),t=requireACallable(),r=requireAnObject(),n=requireTryToString(),s=requireGetIteratorMethod(),i=TypeError;return getIterator=function(o,a){var u=arguments.length<2?s(o):a;if(t(u))return r(e(u,o));throw new i(n(o)+" is not iterable")},getIterator}function requireIteratorClose(){if(hasRequiredIteratorClose)return iteratorClose;hasRequiredIteratorClose=1;var e=requireFunctionCall(),t=requireAnObject(),r=requireGetMethod();return iteratorClose=function(n,s,i){var o,a;t(n);try{if(!(o=r(n,"return"))){if("throw"===s)throw i;return i}o=e(o,n)}catch(e){a=!0,o=e}if("throw"===s)throw i;if(a)throw o;return t(o),i}}function requireIterate(){if(hasRequiredIterate)return iterate;hasRequiredIterate=1;var e=requireFunctionBindContext(),t=requireFunctionCall(),r=requireAnObject(),n=requireTryToString(),s=requireIsArrayIteratorMethod(),i=requireLengthOfArrayLike(),o=requireObjectIsPrototypeOf(),a=requireGetIterator(),u=requireGetIteratorMethod(),l=requireIteratorClose(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},p=d.prototype;return iterate=function(h,m,_){var f,g,y,b,E,w,q,S=_&&_.that,v=!(!_||!_.AS_ENTRIES),R=!(!_||!_.IS_RECORD),O=!(!_||!_.IS_ITERATOR),I=!(!_||!_.INTERRUPTED),P=e(m,S),A=function(e){return f&&l(f,"normal",e),new d(!0,e)},T=function(e){return v?(r(e),I?P(e[0],e[1],A):P(e[0],e[1])):I?P(e,A):P(e)};if(R)f=h.iterator;else if(O)f=h;else{if(!(g=u(h)))throw new c(n(h)+" is not iterable");if(s(g)){for(y=0,b=i(h);b>y;y++)if((E=T(h[y]))&&o(p,E))return E;return new d(!1)}f=a(h,g)}for(w=R?h.next:f.next;!(q=t(w,f)).done;){try{E=T(q.value)}catch(e){l(f,"throw",e)}if("object"==typeof E&&E&&o(p,E))return E}return new d(!1)}}function requireToString(){if(hasRequiredToString)return toString;hasRequiredToString=1;var e=requireClassof(),t=String;return toString=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function requireNormalizeStringArgument(){if(hasRequiredNormalizeStringArgument)return normalizeStringArgument;hasRequiredNormalizeStringArgument=1;var e=requireToString();return normalizeStringArgument=function(t,r){return void 0===t?arguments.length<2?"":r:e(t)},normalizeStringArgument}function requireEs_aggregateError_constructor(){if(hasRequiredEs_aggregateError_constructor)return es_aggregateError_constructor;hasRequiredEs_aggregateError_constructor=1;var e=require_export(),t=requireObjectIsPrototypeOf(),r=requireObjectGetPrototypeOf(),n=requireObjectSetPrototypeOf(),s=requireCopyConstructorProperties(),i=requireObjectCreate(),o=requireCreateNonEnumerableProperty(),a=requireCreatePropertyDescriptor(),u=requireInstallErrorCause(),l=requireErrorStackInstall(),c=requireIterate(),d=requireNormalizeStringArgument(),p=requireWellKnownSymbol()("toStringTag"),h=Error,m=[].push,_=function(e,s){var a,g=t(f,this);n?a=n(new h,g?r(this):f):(a=g?this:i(f),o(a,p,"Error")),void 0!==s&&o(a,"message",d(s)),l(a,_,a.stack,1),arguments.length>2&&u(a,arguments[2]);var y=[];return c(e,m,{that:y}),o(a,"errors",y),a};n?n(_,h):s(_,h,{name:!0});var f=_.prototype=i(h.prototype,{constructor:a(1,_),message:a(1,""),name:a(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:_}),es_aggregateError_constructor}function requireEs_aggregateError(){return hasRequiredEs_aggregateError||(hasRequiredEs_aggregateError=1,requireEs_aggregateError_constructor()),es_aggregateError}function requireEsnext_aggregateError(){return hasRequiredEsnext_aggregateError||(hasRequiredEsnext_aggregateError=1,requireEs_aggregateError()),esnext_aggregateError}var es_error_cause={},proxyAccessor,hasRequiredProxyAccessor,inheritIfRequired,hasRequiredInheritIfRequired,wrapErrorConstructorWithCause,hasRequiredWrapErrorConstructorWithCause,hasRequiredEs_error_cause;function requireProxyAccessor(){if(hasRequiredProxyAccessor)return proxyAccessor;hasRequiredProxyAccessor=1;var e=requireObjectDefineProperty().f;return proxyAccessor=function(t,r,n){n in t||e(t,n,{configurable:!0,get:function(){return r[n]},set:function(e){r[n]=e}})}}function requireInheritIfRequired(){if(hasRequiredInheritIfRequired)return inheritIfRequired;hasRequiredInheritIfRequired=1;var e=requireIsCallable(),t=requireIsObject(),r=requireObjectSetPrototypeOf();return inheritIfRequired=function(n,s,i){var o,a;return r&&e(o=s.constructor)&&o!==i&&t(a=o.prototype)&&a!==i.prototype&&r(n,a),n}}function requireWrapErrorConstructorWithCause(){if(hasRequiredWrapErrorConstructorWithCause)return wrapErrorConstructorWithCause;hasRequiredWrapErrorConstructorWithCause=1;var e=requireGetBuiltIn(),t=requireHasOwnProperty(),r=requireCreateNonEnumerableProperty(),n=requireObjectIsPrototypeOf(),s=requireObjectSetPrototypeOf(),i=requireCopyConstructorProperties(),o=requireProxyAccessor(),a=requireInheritIfRequired(),u=requireNormalizeStringArgument(),l=requireInstallErrorCause(),c=requireErrorStackInstall(),d=requireDescriptors(),p=requireIsPure();return wrapErrorConstructorWithCause=function(h,m,_,f){var g="stackTraceLimit",y=f?2:1,b=h.split("."),E=b[b.length-1],w=e.apply(null,b);if(w){var q=w.prototype;if(!p&&t(q,"cause")&&delete q.cause,!_)return w;var S=e("Error"),v=m((function(e,t){var s=u(f?t:e,void 0),i=f?new w(e):new w;return void 0!==s&&r(i,"message",s),c(i,v,i.stack,2),this&&n(q,this)&&a(i,this,v),arguments.length>y&&l(i,arguments[y]),i}));if(v.prototype=q,"Error"!==E?s?s(v,S):i(v,S,{name:!0}):d&&g in w&&(o(v,w,g),o(v,w,"prepareStackTrace")),i(v,w),!p)try{q.name!==E&&r(q,"name",E),q.constructor=v}catch(e){}return v}},wrapErrorConstructorWithCause}function requireEs_error_cause(){if(hasRequiredEs_error_cause)return es_error_cause;hasRequiredEs_error_cause=1;var e=require_export(),t=requireGlobalThis(),r=requireFunctionApply(),n=requireWrapErrorConstructorWithCause(),s="WebAssembly",i=t[s],o=7!==new Error("e",{cause:7}).cause,a=function(t,r){var s={};s[t]=n(t,r,o),e({global:!0,constructor:!0,arity:1,forced:o},s)},u=function(t,r){if(i&&i[t]){var a={};a[t]=n(s+"."+t,r,o),e({target:s,stat:!0,constructor:!0,arity:1,forced:o},a)}};return a("Error",(function(e){return function(t){return r(e,this,arguments)}})),a("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),a("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),a("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),a("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),a("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),a("URIError",(function(e){return function(t){return r(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}})),es_error_cause}var es_aggregateError_cause={},hasRequiredEs_aggregateError_cause,addToUnscopables,hasRequiredAddToUnscopables,weakMapBasicDetection,hasRequiredWeakMapBasicDetection,internalState,hasRequiredInternalState,functionName,hasRequiredFunctionName,defineBuiltIn,hasRequiredDefineBuiltIn,iteratorsCore,hasRequiredIteratorsCore,objectToString,hasRequiredObjectToString,setToStringTag,hasRequiredSetToStringTag,iteratorCreateConstructor,hasRequiredIteratorCreateConstructor,iteratorDefine,hasRequiredIteratorDefine,createIterResultObject,hasRequiredCreateIterResultObject,es_array_iterator,hasRequiredEs_array_iterator;function requireEs_aggregateError_cause(){if(hasRequiredEs_aggregateError_cause)return es_aggregateError_cause;hasRequiredEs_aggregateError_cause=1;var e=require_export(),t=requireGetBuiltIn(),r=requireFunctionApply(),n=requireFails(),s=requireWrapErrorConstructorWithCause(),i="AggregateError",o=t(i),a=!n((function(){return 1!==o([1]).errors[0]}))&&n((function(){return 7!==o([1],i,{cause:7}).cause}));return e({global:!0,constructor:!0,arity:2,forced:a},{AggregateError:s(i,(function(e){return function(t,n){return r(e,this,arguments)}}),a,!0)}),es_aggregateError_cause}function requireAddToUnscopables(){return hasRequiredAddToUnscopables?addToUnscopables:(hasRequiredAddToUnscopables=1,addToUnscopables=function(){})}function requireWeakMapBasicDetection(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var e=requireGlobalThis(),t=requireIsCallable(),r=e.WeakMap;return weakMapBasicDetection=t(r)&&/native code/.test(String(r))}function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var e,t,r,n=requireWeakMapBasicDetection(),s=requireGlobalThis(),i=requireIsObject(),o=requireCreateNonEnumerableProperty(),a=requireHasOwnProperty(),u=requireSharedStore(),l=requireSharedKey(),c=requireHiddenKeys(),d="Object already initialized",p=s.TypeError,h=s.WeakMap;if(n||u.state){var m=u.state||(u.state=new h);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new p(d);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},r=function(e){return m.has(e)}}else{var _=l("state");c[_]=!0,e=function(e,t){if(a(e,_))throw new p(d);return t.facade=e,o(e,_,t),t},t=function(e){return a(e,_)?e[_]:{}},r=function(e){return a(e,_)}}return internalState={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}}}}function requireFunctionName(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var e=requireDescriptors(),t=requireHasOwnProperty(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,s=t(r,"name"),i=s&&"something"===function(){}.name,o=s&&(!e||e&&n(r,"name").configurable);return functionName={EXISTS:s,PROPER:i,CONFIGURABLE:o}}function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var e=requireCreateNonEnumerableProperty();return defineBuiltIn=function(t,r,n,s){return s&&s.enumerable?t[r]=n:e(t,r,n),t}}function requireIteratorsCore(){if(hasRequiredIteratorsCore)return iteratorsCore;hasRequiredIteratorsCore=1;var e,t,r,n=requireFails(),s=requireIsCallable(),i=requireIsObject(),o=requireObjectCreate(),a=requireObjectGetPrototypeOf(),u=requireDefineBuiltIn(),l=requireWellKnownSymbol(),c=requireIsPure(),d=l("iterator"),p=!1;return[].keys&&("next"in(r=[].keys())?(t=a(a(r)))!==Object.prototype&&(e=t):p=!0),!i(e)||n((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=o(e)),s(e[d])||u(e,d,(function(){return this})),iteratorsCore={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:p}}function requireObjectToString(){if(hasRequiredObjectToString)return objectToString;hasRequiredObjectToString=1;var e=requireToStringTagSupport(),t=requireClassof();return objectToString=e?{}.toString:function(){return"[object "+t(this)+"]"}}function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var e=requireToStringTagSupport(),t=requireObjectDefineProperty().f,r=requireCreateNonEnumerableProperty(),n=requireHasOwnProperty(),s=requireObjectToString(),i=requireWellKnownSymbol()("toStringTag");return setToStringTag=function(o,a,u,l){var c=u?o:o&&o.prototype;c&&(n(c,i)||t(c,i,{configurable:!0,value:a}),l&&!e&&r(c,"toString",s))}}function requireIteratorCreateConstructor(){if(hasRequiredIteratorCreateConstructor)return iteratorCreateConstructor;hasRequiredIteratorCreateConstructor=1;var e=requireIteratorsCore().IteratorPrototype,t=requireObjectCreate(),r=requireCreatePropertyDescriptor(),n=requireSetToStringTag(),s=requireIterators(),i=function(){return this};return iteratorCreateConstructor=function(o,a,u,l){var c=a+" Iterator";return o.prototype=t(e,{next:r(+!l,u)}),n(o,c,!1,!0),s[c]=i,o}}function requireIteratorDefine(){if(hasRequiredIteratorDefine)return iteratorDefine;hasRequiredIteratorDefine=1;var e=require_export(),t=requireFunctionCall(),r=requireIsPure(),n=requireFunctionName(),s=requireIsCallable(),i=requireIteratorCreateConstructor(),o=requireObjectGetPrototypeOf(),a=requireObjectSetPrototypeOf(),u=requireSetToStringTag(),l=requireCreateNonEnumerableProperty(),c=requireDefineBuiltIn(),d=requireWellKnownSymbol(),p=requireIterators(),h=requireIteratorsCore(),m=n.PROPER,_=n.CONFIGURABLE,f=h.IteratorPrototype,g=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",q=function(){return this};return iteratorDefine=function(n,d,h,S,v,R,O){i(h,d,S);var I,P,A,T=function(e){if(e===v&&j)return j;if(!g&&e&&e in M)return M[e];switch(e){case b:case E:case w:return function(){return new h(this,e)}}return function(){return new h(this)}},x=d+" Iterator",C=!1,M=n.prototype,N=M[y]||M["@@iterator"]||v&&M[v],j=!g&&N||T(v),F="Array"===d&&M.entries||N;if(F&&(I=o(F.call(new n)))!==Object.prototype&&I.next&&(r||o(I)===f||(a?a(I,f):s(I[y])||c(I,y,q)),u(I,x,!0,!0),r&&(p[x]=q)),m&&v===E&&N&&N.name!==E&&(!r&&_?l(M,"name",E):(C=!0,j=function(){return t(N,this)})),v)if(P={values:T(E),keys:R?j:T(b),entries:T(w)},O)for(A in P)(g||C||!(A in M))&&c(M,A,P[A]);else e({target:d,proto:!0,forced:g||C},P);return r&&!O||M[y]===j||c(M,y,j,{name:v}),p[d]=j,P}}function requireCreateIterResultObject(){return hasRequiredCreateIterResultObject?createIterResultObject:(hasRequiredCreateIterResultObject=1,createIterResultObject=function(e,t){return{value:e,done:t}})}function requireEs_array_iterator(){if(hasRequiredEs_array_iterator)return es_array_iterator;hasRequiredEs_array_iterator=1;var e=requireToIndexedObject(),t=requireAddToUnscopables(),r=requireIterators(),n=requireInternalState(),s=requireObjectDefineProperty().f,i=requireIteratorDefine(),o=requireCreateIterResultObject(),a=requireIsPure(),u=requireDescriptors(),l="Array Iterator",c=n.set,d=n.getterFor(l);es_array_iterator=i(Array,"Array",(function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})}),(function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case"keys":return o(r,!1);case"values":return o(t[r],!1)}return o([r,t[r]],!1)}),"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}return es_array_iterator}var es_string_iterator={},stringMultibyte,hasRequiredStringMultibyte,hasRequiredEs_string_iterator,aggregateError$5,hasRequiredAggregateError$5;function requireStringMultibyte(){if(hasRequiredStringMultibyte)return stringMultibyte;hasRequiredStringMultibyte=1;var e=requireFunctionUncurryThis(),t=requireToIntegerOrInfinity(),r=requireToString(),n=requireRequireObjectCoercible(),s=e("".charAt),i=e("".charCodeAt),o=e("".slice),a=function(e){return function(a,u){var l,c,d=r(n(a)),p=t(u),h=d.length;return p<0||p>=h?e?"":void 0:(l=i(d,p))<55296||l>56319||p+1===h||(c=i(d,p+1))<56320||c>57343?e?s(d,p):l:e?o(d,p,p+2):c-56320+(l-55296<<10)+65536}};return stringMultibyte={codeAt:a(!1),charAt:a(!0)}}function requireEs_string_iterator(){if(hasRequiredEs_string_iterator)return es_string_iterator;hasRequiredEs_string_iterator=1;var e=requireStringMultibyte().charAt,t=requireToString(),r=requireInternalState(),n=requireIteratorDefine(),s=requireCreateIterResultObject(),i="String Iterator",o=r.set,a=r.getterFor(i);return n(String,"String",(function(e){o(this,{type:i,string:t(e),index:0})}),(function(){var t,r=a(this),n=r.string,i=r.index;return i>=n.length?s(void 0,!0):(t=e(n,i),r.index+=t.length,s(t,!1))})),es_string_iterator}function requireAggregateError$5(){return hasRequiredAggregateError$5?aggregateError$5:(hasRequiredAggregateError$5=1,requireEs_error_cause(),requireEs_aggregateError(),requireEs_aggregateError_cause(),requireEs_array_iterator(),requireEs_string_iterator(),aggregateError$5=requirePath().AggregateError)}var web_domCollections_iterator={},domIterables,hasRequiredDomIterables,hasRequiredWeb_domCollections_iterator,aggregateError$4,hasRequiredAggregateError$4,aggregateError$3,hasRequiredAggregateError$3,aggregateError$2,hasRequiredAggregateError$2,aggregateError$1,hasRequiredAggregateError$1,aggregateError,hasRequiredAggregateError;function requireDomIterables(){return hasRequiredDomIterables?domIterables:(hasRequiredDomIterables=1,domIterables={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})}function requireWeb_domCollections_iterator(){if(hasRequiredWeb_domCollections_iterator)return web_domCollections_iterator;hasRequiredWeb_domCollections_iterator=1,requireEs_array_iterator();var e=requireDomIterables(),t=requireGlobalThis(),r=requireSetToStringTag(),n=requireIterators();for(var s in e)r(t[s],s),n[s]=n.Array;return web_domCollections_iterator}function requireAggregateError$4(){if(hasRequiredAggregateError$4)return aggregateError$4;hasRequiredAggregateError$4=1,requireEsnext_aggregateError();var e=requireAggregateError$5();return requireWeb_domCollections_iterator(),aggregateError$4=e}function requireAggregateError$3(){return hasRequiredAggregateError$3?aggregateError$3:(hasRequiredAggregateError$3=1,aggregateError$3=requireAggregateError$4())}function requireAggregateError$2(){return hasRequiredAggregateError$2?aggregateError$2:(hasRequiredAggregateError$2=1,requireEsnext_aggregateError(),aggregateError$2=requireAggregateError$3())}function requireAggregateError$1(){return hasRequiredAggregateError$1?aggregateError$1:(hasRequiredAggregateError$1=1,aggregateError$1=requireAggregateError$2())}function requireAggregateError(){return hasRequiredAggregateError?aggregateError:(hasRequiredAggregateError=1,aggregateError=requireAggregateError$1())}var aggregateErrorExports=requireAggregateError();const _AggregateError=getDefaultExportFromCjs(aggregateErrorExports);class ApiDOMAggregateError extends _AggregateError{constructor(e,t,r){if(super(e,t,r),this.name=this.constructor.name,"string"==typeof t&&(this.message=t),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:e}=r;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class ApiDOMError extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class ApiDOMStructuredError extends ApiDOMError{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}class UnsupportedOperationError extends ApiDOMError{}class NotImplementedError extends UnsupportedOperationError{}class YamlError extends ApiDOMStructuredError{}class YamlSchemaError extends YamlError{}class YamlTagError extends YamlSchemaError{specificTagName;explicitTagName;tagKind;tagStartPositionRow;tagStartPositionColumn;tagStartPositionIndex;tagEndPositionRow;tagEndPositionColumn;tagEndPositionIndex;nodeCanonicalContent;node;constructor(e,t){super(e,t),void 0!==t&&(this.specificTagName=t.specificTagName,this.explicitTagName=t.explicitTagName,this.tagKind=t.tagKind,this.tagStartPositionRow=t.tagStartPositionRow,this.tagStartPositionColumn=t.tagStartPositionColumn,this.tagStartPositionIndex=t.tagStartPositionIndex,this.tagEndPositionRow=t.tagEndPositionRow,this.tagEndPositionColumn=t.tagEndPositionColumn,this.tagEndPositionIndex=t.tagEndPositionIndex,this.nodeCanonicalContent=t.nodeCanonicalContent,this.node=t.node)}}let Tag$1=class{static uri="";tag="";constructor(){this.tag=this.constructor.uri}test(e){return!0}resolve(e){return e}};class GenericMapping extends Tag$1{static uri="tag:yaml.org,2002:map";test(e){return e.tag.kind===YamlNodeKind.Mapping}}class GenericSequence extends Tag$1{static uri="tag:yaml.org,2002:seq";test(e){return e.tag.kind===YamlNodeKind.Sequence}}class GenericString extends Tag$1{static uri="tag:yaml.org,2002:str"}var dist={},errors={},hasRequiredErrors,hasRequiredDist;function requireErrors(){return hasRequiredErrors||(hasRequiredErrors=1,e=errors,Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0,function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"}(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])),errors;var e,t}function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=requireErrors();function r(e,r,n){const s=function(e){return e.match(/[^a-f0-9]/i)?NaN:parseInt(e,16)}(e);if(Number.isNaN(s)||void 0!==n&&n!==e.length)throw new SyntaxError(t.errorMessages.get(r));return s}function n(e,n){const s=r(e,t.ErrorType.MalformedUnicode,4);if(void 0!==n){const e=r(n,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(s,e)}return String.fromCharCode(s)}Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});const s=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","\t"],["v","\v"],["0","\0"]]);const i=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function o(e,o=!1){return e.replace(i,(function(e,i,a,u,l,c,d,p,h){if(void 0!==i)return"\\";if(void 0!==a)return function(e){const n=r(e,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(n)}(a);if(void 0!==u)return function(e){if("{"!==(n=e).charAt(0)||"}"!==n.charAt(n.length-1))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));var n;const s=r(e.slice(1,-1),t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(s)}catch(e){throw e instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):e}}(u);if(void 0!==l)return n(l,c);if(void 0!==d)return n(d);if("0"===p)return"\0";if(void 0!==p)return function(e,r=!1){if(r)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const n=parseInt(e,8);return String.fromCharCode(n)}(p,!o);if(void 0!==h)return m=h,s.get(m)||m;var m;throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))}))}e.unraw=o,e.default=o}(dist)),dist}var distExports=requireDist();const blockStyleRegExp=/^(?<style>[|>])(?<chomping>[+-]?)(?<indentation>[0-9]*)\s/,getIndentationIndicator=e=>{const t=e.match(blockStyleRegExp),r=pathOr("",["groups","indentation"],t);return isEmptyString(r)?void 0:parseInt(r,10)},getIndentation=e=>{const t=getIndentationIndicator(e);if(isInteger(t))return repeatStr(" ",t);const r=pathOr("",[1],e.split("\n")),n=pathOr(0,["groups","indentation","length"],r.match(/^(?<indentation>[ ]*)/));return repeatStr(" ",n)},getChompingIndicator=e=>{const t=e.match(blockStyleRegExp),r=pathOr("",["groups","chomping"],t);return isEmptyString(r)?void 0:r},chomp=(e,t)=>isUndefined(e)?`${trimEnd(t)}\n`:"-"===e?trimEnd(t):t,normalizeLineBreaks=e=>e.replace(/\r\n/g,"\n"),preventLineBreakCollapseToSpace=e=>e.replace(/\\\n\s*/g,""),collapseLineBreakToSpace=e=>e.replace(/(\n)?\n([^\n]+)/g,((e,t,r)=>t?e:` ${r.trimStart()}`)).replace(/[\n]{2}/g,"\n"),removeQuotes=curry(((e,t)=>t.replace(new RegExp(`^${e}`),"").replace(new RegExp(`${e}$`),""))),formatFlowPlain=pipe(normalizeLineBreaks,trim,collapseLineBreakToSpace,split("\n"),map(trimStart$1),join("\n")),formatFlowSingleQuoted=pipe(normalizeLineBreaks,trim,collapseLineBreakToSpace,split("\n"),map(trimStart$1),join("\n"),removeQuotes("'")),formatFlowDoubleQuoted=pipe(normalizeLineBreaks,trim,preventLineBreakCollapseToSpace,collapseLineBreakToSpace,distExports.unraw,split("\n"),map(trimStart$1),join("\n"),removeQuotes('"')),formatBlockLiteral=e=>{const t=getIndentation(e),r=getChompingIndicator(e),n=normalizeLineBreaks(e),s=tail(n.split("\n")),i=compose(map(trimCharsStart(t)),map(concatRight("\n"))),o=transduce(i,concat,"",s);return chomp(r,o)},formatBlockFolded=e=>{const t=getIndentation(e),r=getChompingIndicator(e),n=normalizeLineBreaks(e),s=tail(n.split("\n")),i=compose(map(trimCharsStart(t)),map(concatRight("\n"))),o=transduce(i,concat,"",s),a=collapseLineBreakToSpace(o);return chomp(r,a)};class ScalarTag{static test(e){return e.tag.kind===YamlNodeKind.Scalar&&"string"==typeof e.content}static canonicalFormat(e){let t=e.content;const r=e.clone();return e.style===YamlStyle.Plain?t=formatFlowPlain(e.content):e.style===YamlStyle.SingleQuoted?t=formatFlowSingleQuoted(e.content):e.style===YamlStyle.DoubleQuoted?t=formatFlowDoubleQuoted(e.content):e.style===YamlStyle.Literal?t=formatBlockLiteral(e.content):e.style===YamlStyle.Folded&&(t=formatBlockFolded(e.content)),r.content=t,r}static resolve(e){return e}}class FailsafeSchema{tags;tagDirectives;constructor(){this.tags=[],this.tagDirectives=[],this.registerTag(new GenericMapping),this.registerTag(new GenericSequence),this.registerTag(new GenericString)}toSpecificTagName(e){let t=e.tag.explicitName;return"!"===e.tag.explicitName?e.tag.kind===YamlNodeKind.Scalar?t=GenericString.uri:e.tag.kind===YamlNodeKind.Sequence?t=GenericSequence.uri:e.tag.kind===YamlNodeKind.Mapping&&(t=GenericMapping.uri):e.tag.explicitName.startsWith("!<")?t=e.tag.explicitName.replace(/^!</,"").replace(/>$/,""):e.tag.explicitName.startsWith("!!")&&(t=`tag:yaml.org,2002:${e.tag.explicitName.replace(/^!!/,"")}`),t}registerTagDirective(e){this.tagDirectives.push({handle:e.parameters.handle,prefix:e.parameters.prefix})}registerTag(e,t=!1){return t?this.tags.unshift(e):this.tags.push(e),this}overrideTag(e){return this.tags=this.tags.filter((t=>t.tag===e.tag)),this.tags.push(e),this}resolve(e){const t=this.toSpecificTagName(e);if("?"===t)return e;let r=e;ScalarTag.test(e)&&(r=ScalarTag.canonicalFormat(e));const n=this.tags.find((e=>(null==e?void 0:e.tag)===t));if(void 0===n)throw new YamlTagError(`Tag "${t}" was not recognized.`,{specificTagName:t,explicitTagName:e.tag.explicitName,tagKind:e.tag.kind,tagStartPositionRow:e.tag.startPositionRow,tagStartPositionColumn:e.tag.startPositionColumn,tagStartPositionIndex:e.tag.startIndex,tagEndPositionRow:e.tag.endPositionRow,tagEndPositionColumn:e.tag.endPositionColumn,tagEndPositionIndex:e.tag.endIndex,node:e.clone()});if(!n.test(r))throw new YamlTagError(`Node couldn't be resolved against the tag "${t}"`,{specificTagName:t,explicitTagName:e.tag.explicitName,tagKind:e.tag.kind,tagStartPositionRow:e.tag.startPositionRow,tagStartPositionColumn:e.tag.startPositionColumn,tagStartPositionIndex:e.tag.startIndex,tagEndPositionRow:e.tag.endPositionRow,tagEndPositionColumn:e.tag.endPositionColumn,tagEndPositionIndex:e.tag.endIndex,nodeCanonicalContent:r.content,node:e.clone()});return n.resolve(r)}}let Boolean$1=class extends Tag$1{static uri="tag:yaml.org,2002:bool";test(e){return/^(true|false)$/.test(e.content)}resolve(e){const t="true"===e.content,r=e.clone();return r.content=t,r}};class FloatingPoint extends Tag$1{static uri="tag:yaml.org,2002:float";test(e){return/^-?(0|[1-9][0-9]*)(\.[0-9]*)?([eE][-+]?[0-9]+)?$/.test(e.content)}resolve(e){const t=parseFloat(e.content),r=e.clone();return r.content=t,r}}class Integer extends Tag$1{static uri="tag:yaml.org,2002:int";test(e){return/^-?(0|[1-9][0-9]*)$/.test(e.content)}resolve(e){const t=parseInt(e.content,10),r=e.clone();return r.content=t,r}}class Null extends Tag$1{static uri="tag:yaml.org,2002:null";test(e){return/^null$/.test(e.content)}resolve(e){const t=e.clone();return t.content=null,t}}class JsonSchema extends FailsafeSchema{constructor(){super(),this.registerTag(new Boolean$1,!0),this.registerTag(new FloatingPoint,!0),this.registerTag(new Integer,!0),this.registerTag(new Null,!0)}toSpecificTagName(e){let t=super.toSpecificTagName(e);if("?"===t)if(e.tag.vkind===YamlNodeKind.Sequence)t=GenericSequence.uri;else if(e.tag.kind===YamlNodeKind.Mapping)t=GenericMapping.uri;else if(e.tag.kind===YamlNodeKind.Scalar){const r=this.tags.find((t=>t.test(e)));t=(null==r?void 0:r.tag)||"?"}return t}}class YamlReferenceError extends YamlError{}class ReferenceManager{addAnchor(e){if(!isAnchor(e.anchor))throw new YamlReferenceError("Expected YAML anchor to be attached the the YAML AST node.",{node:e})}resolveAlias(e){return new YamlScalar({content:e.content,style:YamlStyle.Plain,styleGroup:YamlStyleGroup.Flow})}}class Literal extends Node{static type="literal";value;constructor({value:e,...t}={}){super({...t}),this.value=e}}let Error$1=class extends Node{static type="error";value;isUnexpected;constructor({value:e,isUnexpected:t=!1,...r}={}){super({...r}),this.value=e,this.isUnexpected=t}};class ParseResult extends Node{static type="parseResult";get rootNode(){return head(this.children)}}const getVisitFn=(e,t,r)=>{const n=e[t];if(null!=n){if(!r&&"function"==typeof n)return n;const e=r?n.leave:n.enter;if("function"==typeof e)return e}else{const n=r?e.leave:e.enter;if(null!=n){if("function"==typeof n)return n;const e=n[t];if("function"==typeof e)return e}}return null},BREAK={},getNodeType$3=e=>null==e?void 0:e.type,isNode$3=e=>"string"==typeof getNodeType$3(e),cloneNode$1=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),mergeAll=(e,{visitFnGetter:t=getVisitFn,nodeTypeGetter:r=getNodeType$3,breakSymbol:n=BREAK,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),u=new Array(e.length).fill(a);return{enter(l,c,d,p,h,m){let _=l,f=!1;const g={...m,replaceWith(e,t){m.replaceWith(e,t),_=e}};for(let l=0;l<e.length;l+=1)if(u[l]===a){const a=t(e[l],r(_),!1);if("function"==typeof a){const t=a.call(e[l],_,c,d,p,h,g);if("function"==typeof(null==t?void 0:t.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:e[l],visitFn:a});if(t===i)u[l]=_;else if(t===n)u[l]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;_=t,f=!0}}}}return f?_:void 0},leave(s,o,l,c,d,p){let h=s;const m={...p,replaceWith(e,t){p.replaceWith(e,t),h=e}};for(let s=0;s<e.length;s+=1)if(u[s]===a){const a=t(e[s],r(h),!0);if("function"==typeof a){const t=a.call(e[s],h,o,l,c,d,m);if("function"==typeof(null==t?void 0:t.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:e[s],visitFn:a});if(t===n)u[s]=n;else if(void 0!==t&&t!==i)return t}}else u[s]===h&&(u[s]=a)}}},mergeAllAsync=(e,{visitFnGetter:t=getVisitFn,nodeTypeGetter:r=getNodeType$3,breakSymbol:n=BREAK,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),u=new Array(e.length).fill(a);return{async enter(l,c,d,p,h,m){let _=l,f=!1;const g={...m,replaceWith(e,t){m.replaceWith(e,t),_=e}};for(let l=0;l<e.length;l+=1)if(u[l]===a){const a=t(e[l],r(_),!1);if("function"==typeof a){const t=await a.call(e[l],_,c,d,p,h,g);if(t===i)u[l]=_;else if(t===n)u[l]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;_=t,f=!0}}}}return f?_:void 0},async leave(s,o,l,c,d,p){let h=s;const m={...p,replaceWith(e,t){p.replaceWith(e,t),h=e}};for(let s=0;s<e.length;s+=1)if(u[s]===a){const a=t(e[s],r(h),!0);if("function"==typeof a){const t=await a.call(e[s],h,o,l,c,d,m);if(t===n)u[s]=n;else if(void 0!==t&&t!==i)return t}}else u[s]===h&&(u[s]=a)}}};mergeAll[Symbol.for("nodejs.util.promisify.custom")]=mergeAllAsync;const visit$2=(e,t,{keyMap:r=null,state:n={},breakSymbol:s=BREAK,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=getVisitFn,nodeTypeGetter:u=getNodeType$3,nodePredicate:l=isNode$3,nodeCloneFn:c=cloneNode$1,detectCycles:d=!0,detectCyclesCallback:p=null}={})=>{const h=r||{};let m,_,f=Array.isArray(e),g=[e],y=-1,b=[],E=e;const w=[],q=[];do{y+=1;const e=y===g.length;let r;const R=e&&0!==b.length;if(e){if(r=0===q.length?void 0:w.pop(),E=_,_=q.pop(),R)if(f){E=E.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(E.splice(n,1),e+=1):E[n]=r}}else{E=c(E);for(const[e,t]of b)E[e]=t}y=m.index,g=m.keys,b=m.edits,f=m.inArray,m=m.prev}else if(_!==i&&void 0!==_){if(r=f?y:g[y],E=_[r],E===i||void 0===E)continue;w.push(r)}let O;if(!Array.isArray(E)){var S;if(!l(E))throw new ApiDOMStructuredError(`Invalid AST Node: ${String(E)}`,{node:E});if(d&&q.includes(E)){"function"==typeof p&&p(E,r,_,w,q),w.pop();continue}const i=a(t,u(E),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,E,r,_,w,q):_&&(_[r]=t),e||(E=t)}};O=i.call(t,E,r,_,w,q,s)}if("function"==typeof(null===(S=O)||void 0===S?void 0:S.then))throw new ApiDOMStructuredError("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(O===s)break;if(O===o){if(!e){w.pop();continue}}else if(void 0!==O&&(b.push([r,O]),!e)){if(!l(O)){w.pop();continue}E=O}}var v;if(void 0===O&&R&&b.push([r,E]),!e)m={inArray:f,index:y,keys:g,edits:b,prev:m},f=Array.isArray(E),g=f?E:null!==(v=h[u(E)])&&void 0!==v?v:[],y=-1,b=[],_!==i&&void 0!==_&&q.push(_),_=E}while(void 0!==m);return 0!==b.length?b[b.length-1][1]:e};visit$2[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=null,state:n={},breakSymbol:s=BREAK,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=getVisitFn,nodeTypeGetter:u=getNodeType$3,nodePredicate:l=isNode$3,nodeCloneFn:c=cloneNode$1,detectCycles:d=!0,detectCyclesCallback:p=null}={})=>{const h=r||{};let m,_,f=Array.isArray(e),g=[e],y=-1,b=[],E=e;const w=[],q=[];do{y+=1;const e=y===g.length;let r;const v=e&&0!==b.length;if(e){if(r=0===q.length?void 0:w.pop(),E=_,_=q.pop(),v)if(f){E=E.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(E.splice(n,1),e+=1):E[n]=r}}else{E=c(E);for(const[e,t]of b)E[e]=t}y=m.index,g=m.keys,b=m.edits,f=m.inArray,m=m.prev}else if(_!==i&&void 0!==_){if(r=f?y:g[y],E=_[r],E===i||void 0===E)continue;w.push(r)}let R;if(!Array.isArray(E)){if(!l(E))throw new ApiDOMStructuredError(`Invalid AST Node: ${String(E)}`,{node:E});if(d&&q.includes(E)){"function"==typeof p&&p(E,r,_,w,q),w.pop();continue}const i=a(t,u(E),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,E,r,_,w,q):_&&(_[r]=t),e||(E=t)}};R=await i.call(t,E,r,_,w,q,s)}if(R===s)break;if(R===o){if(!e){w.pop();continue}}else if(void 0!==R&&(b.push([r,R]),!e)){if(!l(R)){w.pop();continue}E=R}}var S;if(void 0===R&&v&&b.push([r,E]),!e)m={inArray:f,index:y,keys:g,edits:b,prev:m},f=Array.isArray(E),g=f?E:null!==(S=h[u(E)])&&void 0!==S?S:[],y=-1,b=[],_!==i&&void 0!==_&&q.push(_),_=E}while(void 0!==m);return 0!==b.length?b[b.length-1][1]:e};class CloneError extends ApiDOMStructuredError{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class DeepCloneError extends CloneError{}class ShallowCloneError extends CloneError{}const dereference=(e,t)=>{const r=defaultTo(e,t);return mapObjIndexed((e=>{if(isPlainObj(e)&&has("$ref",e)&&propSatisfies(isString,"$ref",e)){const t=path$1(["$ref"],e),n=trimCharsStart("#/",t);return path$1(n.split("/"),r)}return isPlainObj(e)?dereference(e,r):e}),e)},assignSourceMap=(e,t)=>(e.startPositionRow=null==t?void 0:t.startPositionRow,e.startPositionColumn=null==t?void 0:t.startPositionColumn,e.startIndex=null==t?void 0:t.startIndex,e.endPositionRow=null==t?void 0:t.endPositionRow,e.endPositionColumn=null==t?void 0:t.endPositionColumn,e.endIndex=null==t?void 0:t.endIndex,e),cloneDeep=(e,t={})=>{const{visited:r=new WeakMap}=t,n={...t,visited:r};if(r.has(e))return r.get(e);if(e instanceof minimExports.KeyValuePair){const{key:t,value:s}=e,i=isElement(t)?cloneDeep(t,n):t,o=isElement(s)?cloneDeep(s,n):s,a=new minimExports.KeyValuePair(i,o);return r.set(e,a),a}if(e instanceof minimExports.ObjectSlice){const t=e=>cloneDeep(e,n),s=[...e].map(t),i=new minimExports.ObjectSlice(s);return r.set(e,i),i}if(e instanceof minimExports.ArraySlice){const t=e=>cloneDeep(e,n),s=[...e].map(t),i=new minimExports.ArraySlice(s);return r.set(e,i),i}if(isElement(e)){const t=cloneShallow(e);if(r.set(e,t),e.content)if(isElement(e.content))t.content=cloneDeep(e.content,n);else if(e.content instanceof minimExports.KeyValuePair)t.content=cloneDeep(e.content,n);else if(Array.isArray(e.content)){const r=e=>cloneDeep(e,n);t.content=e.content.map(r)}else t.content=e.content;else t.content=e.content;return t}throw new DeepCloneError("Value provided to cloneDeep function couldn't be cloned",{value:e})};cloneDeep.safe=e=>{try{return cloneDeep(e)}catch{return e}};const cloneShallowKeyValuePair=e=>{const{key:t,value:r}=e;return new minimExports.KeyValuePair(t,r)},cloneShallowArraySlice=e=>{const t=[...e];return new minimExports.ArraySlice(t)},cloneShallowObjectSlice=e=>{const t=[...e];return new minimExports.ObjectSlice(t)},cloneShallowElement=e=>{const t=new e.constructor;if(t.element=e.element,hasElementSourceMap(e)&&assignSourceMap(t,e),e.meta.length>0&&(t._meta=cloneDeep(e.meta)),e.attributes.length>0&&(t._attributes=cloneDeep(e.attributes)),isElement(e.content)){const r=e.content;t.content=cloneShallowElement(r)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof minimExports.KeyValuePair?t.content=cloneShallowKeyValuePair(e.content):t.content=e.content;return t},cloneShallow=e=>{if(e instanceof minimExports.KeyValuePair)return cloneShallowKeyValuePair(e);if(e instanceof minimExports.ObjectSlice)return cloneShallowObjectSlice(e);if(e instanceof minimExports.ArraySlice)return cloneShallowArraySlice(e);if(isElement(e))return cloneShallowElement(e);throw new ShallowCloneError("Value provided to cloneShallow function couldn't be cloned",{value:e})};cloneShallow.safe=e=>{try{return cloneShallow(e)}catch{return e}};const getNodeType$2=e=>isObjectElement(e)?"ObjectElement":isArrayElement(e)?"ArrayElement":isMemberElement(e)?"MemberElement":isStringElement(e)?"StringElement":isBooleanElement(e)?"BooleanElement":isNumberElement(e)?"NumberElement":isNullElement(e)?"NullElement":isLinkElement(e)?"LinkElement":isRefElement(e)?"RefElement":void 0,cloneNode=e=>isElement(e)?cloneShallow(e):cloneNode$1(e),isNode$2=pipe(getNodeType$2,isString),keyMapDefault$1={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"]},visit$1=(e,t,{keyMap:r=keyMapDefault$1,...n}={})=>visit$2(e,t,{keyMap:r,nodeTypeGetter:getNodeType$2,nodePredicate:isNode$2,nodeCloneFn:cloneNode,...n});visit$1[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=keyMapDefault$1,...n}={})=>visit$2[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:r,nodeTypeGetter:getNodeType$2,nodePredicate:isNode$2,nodeCloneFn:cloneNode,...n});const defaultDispatchPluginsOptions={toolboxCreator:createToolbox$1,visitorOptions:{nodeTypeGetter:getNodeType$2,exposeEdits:!0}},dispatchPluginsSync=(e,t,r={})=>{if(0===t.length)return e;const n=mergeDeepRight(defaultDispatchPluginsOptions,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),a=t.map((e=>e(o))),u=mergeAll(a.map(propOr({},"visitor")),{...i});a.forEach(invokeArgs(["pre"],[]));const l=visit$1(e,u,i);return a.forEach(invokeArgs(["post"],[])),l},dispatchPluginsAsync=async(e,t,r={})=>{if(0===t.length)return e;const n=mergeDeepRight(defaultDispatchPluginsOptions,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),a=t.map((e=>e(o))),u=mergeAll[Symbol.for("nodejs.util.promisify.custom")],l=visit$1[Symbol.for("nodejs.util.promisify.custom")],c=u(a.map(propOr({},"visitor")),{...i});await Promise.allSettled(a.map(invokeArgs(["pre"],[])));const d=await l(e,c,i);return await Promise.allSettled(a.map(invokeArgs(["post"],[]))),d};dispatchPluginsSync[Symbol.for("nodejs.util.promisify.custom")]=dispatchPluginsAsync;class MediaTypes extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new NotImplementedError("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new NotImplementedError("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new NotImplementedError("latest method in MediaTypes class is not yet implemented.")}}const refract$1=(e,{Type:t,plugins:r=[]})=>{const n=new t(e);return isElement(e)&&(e.meta.length>0&&(n.meta=cloneDeep(e.meta)),e.attributes.length>0&&(n.attributes=cloneDeep(e.attributes))),dispatchPluginsSync(n,r,{toolboxCreator:createToolbox$1,visitorOptions:{nodeTypeGetter:getNodeType$2}})},createRefractor$1=e=>(t,r={})=>refract$1(t,{...r,Type:e});minimExports.ObjectElement.refract=createRefractor$1(minimExports.ObjectElement),minimExports.ArrayElement.refract=createRefractor$1(minimExports.ArrayElement),minimExports.StringElement.refract=createRefractor$1(minimExports.StringElement),minimExports.BooleanElement.refract=createRefractor$1(minimExports.BooleanElement),minimExports.NullElement.refract=createRefractor$1(minimExports.NullElement),minimExports.NumberElement.refract=createRefractor$1(minimExports.NumberElement),minimExports.LinkElement.refract=createRefractor$1(minimExports.LinkElement),minimExports.RefElement.refract=createRefractor$1(minimExports.RefElement),Annotation.refract=createRefractor$1(Annotation),Comment.refract=createRefractor$1(Comment),ParseResult$1.refract=createRefractor$1(ParseResult$1);const nodeTypeGetter=e=>"string"==typeof(null==e?void 0:e.type)?e.type:getNodeType$2(e),keyMapDefault={EphemeralObject:["content"],EphemeralArray:["content"],...keyMapDefault$1},visit=(e,t,{keyMap:r=keyMapDefault,...n}={})=>visit$1(e,t,{keyMap:r,nodeTypeGetter:nodeTypeGetter,nodePredicate:T,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});visit[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=keyMapDefault,...r}={})=>visit$1[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:nodeTypeGetter,nodePredicate:T,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});class EphemeralArray{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 EphemeralObject{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 Visitor$1=class{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new EphemeralObject(e.content);return this.references.set(e,t),t}};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 t=new EphemeralArray(e.content);return this.references.set(e,t),t}};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,...t){var r;const n=t[3];return"EphemeralObject"===(null===(r=n[n.length-1])||void 0===r?void 0:r.type)?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return isStringElement(e.href)?e.href.toValue():""}};const serializer=e=>isElement(e)?isStringElement(e)||isNumberElement(e)||isBooleanElement(e)||isNullElement(e)?e.toValue():visit(e,new Visitor$1):e,emptyElement=e=>{const t=e.meta.length>0?cloneDeep(e.meta):void 0,r=e.attributes.length>0?cloneDeep(e.attributes):void 0;return new e.constructor(void 0,t,r)},cloneUnlessOtherwiseSpecified=(e,t)=>t.clone&&t.isMergeableElement(e)?deepmerge(emptyElement(e),e,t):e,getMergeFunction=(e,t)=>{if("function"!=typeof t.customMerge)return deepmerge;const r=t.customMerge(e,t);return"function"==typeof r?r:deepmerge},getMetaMergeFunction=e=>"function"!=typeof e.customMetaMerge?e=>cloneDeep(e):e.customMetaMerge,getAttributesMergeFunction=e=>"function"!=typeof e.customAttributesMerge?e=>cloneDeep(e):e.customAttributesMerge,mergeArrayElement=(e,t,r)=>e.concat(t)["fantasy-land/map"]((e=>cloneUnlessOtherwiseSpecified(e,r))),mergeObjectElement=(e,t,r)=>{const n=isObjectElement(e)?emptyElement(e):emptyElement(t);return isObjectElement(e)&&e.forEach(((e,t,s)=>{const i=cloneShallow(s);i.value=cloneUnlessOtherwiseSpecified(e,r),n.content.push(i)})),t.forEach(((t,s,i)=>{const o=serializer(s);let a;if(isObjectElement(e)&&e.hasKey(o)&&r.isMergeableElement(t)){const n=e.get(o);a=cloneShallow(i),a.value=getMergeFunction(s,r)(n,t,r)}else a=cloneShallow(i),a.value=cloneUnlessOtherwiseSpecified(t,r);n.remove(o),n.content.push(a)})),n},defaultOptions={clone:!0,isMergeableElement:e=>isObjectElement(e)||isArrayElement(e),arrayElementMerge:mergeArrayElement,objectElementMerge:mergeObjectElement,customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},deepmerge=(e,t,r)=>{var n,s,i;const o={...defaultOptions,...r};o.isMergeableElement=null!==(n=o.isMergeableElement)&&void 0!==n?n:defaultOptions.isMergeableElement,o.arrayElementMerge=null!==(s=o.arrayElementMerge)&&void 0!==s?s:defaultOptions.arrayElementMerge,o.objectElementMerge=null!==(i=o.objectElementMerge)&&void 0!==i?i:defaultOptions.objectElementMerge;const a=isArrayElement(t);if(!(a===isArrayElement(e)))return cloneUnlessOtherwiseSpecified(t,o);const u=a&&"function"==typeof o.arrayElementMerge?o.arrayElementMerge(e,t,o):o.objectElementMerge(e,t,o);return u.meta=getMetaMergeFunction(o)(e.meta,t.meta),u.attributes=getAttributesMergeFunction(o)(e.attributes,t.attributes),u};deepmerge.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new minimExports.ObjectElement:e.reduce(((e,r)=>deepmerge(e,r,t)),emptyElement(e[0]))};const treeSitterWasm="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/0327c07adfa215ef7ce8dfd6d8cbfc6b.wasm").href:new URL("0327c07adfa215ef7ce8dfd6d8cbfc6b.wasm","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href,realFetch=globalThis.fetch;isFunction(realFetch)&&(globalThis.fetch=(...e)=>isString(e[0])&&e[0].endsWith("tree-sitter.wasm")?realFetch.apply(globalThis,[treeSitterWasm,tail(e)]):realFetch.apply(globalThis,e));const treeSitterYaml="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/77eb67fad227c765659b848dfcc82388.wasm").href:new URL("77eb67fad227c765659b848dfcc82388.wasm","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href;var treeSitter={exports:{}},hasRequiredTreeSitter;function requireTreeSitter(){return hasRequiredTreeSitter||(hasRequiredTreeSitter=1,function(module,exports$1){var Module=void 0!==Module?Module:{},ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,TreeSitter=function(){var initPromise,document="object"==typeof window?{currentScript:window.document.currentScript}:null;class Parser{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise((resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},scriptDirectory="",readAsync,readBinary;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}if(ENVIRONMENT_IS_NODE){var fs=require$$0,nodePath=require$$1;scriptDirectory=__dirname+"/",readBinary=e=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e)),readAsync=(e,t=!0)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),new Promise(((r,n)=>{fs.readFile(e,t?void 0:"utf8",((e,s)=>{e?n(e):r(t?s.buffer:s)}))}))),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),module.exports=Module,quit_=(e,t)=>{throw process.exitCode=e,t}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:void 0!==document&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=scriptDirectory.startsWith("blob:")?"":scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=e=>isFileURI(e)?new Promise(((t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{(200==n.status||0==n.status&&n.response)&&r(n.response),t(n.status)},n.onerror=t,n.send(null)})):fetch(e,{credentials:"same-origin"}).then((e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary,wasmMemory;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP_DATA_VIEW;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAP32=new Int32Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=new Float32Array(e),Module.HEAPF64=new Float64Array(e)}if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies?.(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){throw Module.onAbort?.(e),err(e="Aborted("+e+")"),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://"),wasmBinaryFile;function findWasmBinary(){var e="tree-sitter.wasm";return isDataURI(e)?e:locateFile(e)}function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return wasmBinary?Promise.resolve().then((()=>getBinarySync(e))):readAsync(e).then((e=>new Uint8Array(e)),(()=>getBinarySync(e)))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then((e=>WebAssembly.instantiate(e,t))).then(r,(e=>{err(`failed to asynchronously prepare wasm: ${e}`),abort(e)}))}function instantiateAsync(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(t)||isFileURI(t)||ENVIRONMENT_IS_NODE||"function"!=typeof fetch?instantiateArrayBuffer(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return err(`wasm streaming compile failed: ${e}`),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,n)}))))}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var e=getWasmImports();function t(e,t){wasmExports=e.exports,wasmExports=relocateExports(wasmExports,1024);var r=getDylinkMetadata(t);return r.neededDynlibs&&(dynamicLibraries=r.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports),LDSO.init(),loadDylibs(),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency(),wasmExports}if(addRunDependency(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return err(`Module.instantiateWasm callback failed with error: ${e}`),!1}return wasmBinaryFile||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,e,(function(e){t(e.instance,e.module)})),{}}function ExitStatus(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},LE_HEAP_LOAD_F32=e=>HEAP_DATA_VIEW.getFloat32(e,!0),LE_HEAP_LOAD_F64=e=>HEAP_DATA_VIEW.getFloat64(e,!0),LE_HEAP_LOAD_I16=e=>HEAP_DATA_VIEW.getInt16(e,!0),LE_HEAP_LOAD_I32=e=>HEAP_DATA_VIEW.getInt32(e,!0),LE_HEAP_LOAD_U32=e=>HEAP_DATA_VIEW.getUint32(e,!0),LE_HEAP_STORE_F32=(e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),LE_HEAP_STORE_F64=(e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),LE_HEAP_STORE_I16=(e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),LE_HEAP_STORE_I32=(e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),LE_HEAP_STORE_U32=(e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=(e,t,r)=>{for(var n=t+r,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var i="";t<s;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var u=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|u:(7&o)<<18|a<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(o);else{var l=o-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},getDylinkMetadata=e=>{var t=0,r=0;function n(){for(var r=0,n=1;;){var s=e[t++];if(r+=(127&s)*n,n*=128,!(128&s))break}return r}function s(){var r=n();return UTF8ArrayToString(e,(t+=r)-r,r)}function i(e,t){if(e)throw new Error(t)}var o="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,o);0===a.length&&(o="dylink",a=WebAssembly.Module.customSections(e,o)),i(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{var u=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer);i(!(1836278016==u[0]||6386541==u[0]),"need to see wasm magic number"),i(0!==e[8],"need the dylink section to be first"),t=9;var l=n();r=t+l,o=s()}var c={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==o){c.memorySize=n(),c.memoryAlign=n(),c.tableSize=n(),c.tableAlign=n();for(var d=n(),p=0;p<d;++p){var h=s();c.neededDynlibs.push(h)}}else{i("dylink.0"!==o);for(;t<r;){var m=e[t++],_=n();if(1===m)c.memorySize=n(),c.memoryAlign=n(),c.tableSize=n(),c.tableAlign=n();else if(2===m)for(d=n(),p=0;p<d;++p)h=s(),c.neededDynlibs.push(h);else if(3===m)for(var f=n();f--;){var g=s();256&n()&&c.tlsExports.add(g)}else if(4===m)for(f=n();f--;){s();g=s();1==(3&n())&&c.weakImports.add(g)}else t+=_}}return c};function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16(2*(e>>1));case"i32":return LE_HEAP_LOAD_I32(4*(e>>2));case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return LE_HEAP_LOAD_F32(4*(e>>2));case"double":return LE_HEAP_LOAD_F64(8*(e>>3));case"*":return LE_HEAP_LOAD_U32(4*(e>>2));default:abort(`invalid type for getValue: ${t}`)}}var newDSO=(e,t,r)=>{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,null!=t&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78112,zeroMemory=(e,t)=>(HEAPU8.fill(0,e,e+t),e),alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return zeroMemory(_malloc(e),e);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},n=1;n<e.length;++n)r.parameters.push(t[e[n]]);return r},generateFuncType=(e,t)=>{var r=e.slice(0,1),n=e.slice(1),s={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),uleb128Encode(n.length,t);for(var i=0;i<n.length;++i)t.push(s[n[i]]);"v"==r?t.push(0):t.push(1,s[r])},convertJsFunctionToWasm=(e,t)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var s=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(s,{e:{f:e}}).exports.f},wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:28,element:"anyfunc"}),getWasmTableEntry=e=>{var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t},updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}},functionsInTableMap,getFunctionAddress=e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return wasmTable.length-1},setWasmTableEntry=(e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(r){if(!(r instanceof TypeError))throw r;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,s)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||0==GOT[r].value)&&("function"==typeof n?GOT[r].value=addFunction(n):"number"==typeof n?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},relocateExports=(e,t,r)=>{var n={};for(var s in e){var i=e[s];"object"==typeof i&&(i=i.value),"number"==typeof i&&(i+=t),n[s]=i}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},dynCallLegacy=(e,t,r)=>(e=e.replace(/p/g,"i"),(0,Module["dynCall_"+e])(t,...r)),dynCall=(e,t,r=[])=>e.includes("j")?dynCallLegacy(e,t,r):getWasmTableEntry(t)(...r),stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(e){if(stackRestore(n),e!==e+0)throw e;_setThrew(1,0)}},resolveGlobalSymbol=(e,t=!1)=>{var r;return t&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},UTF8ToString=(e,t)=>e?UTF8ArrayToString(HEAPU8,e,t):"",loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0,tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length,moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];var r;t in e||(e[t]=(...e)=>(r||=resolveSymbol(t),r(...e)));return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&-1!=body.indexOf("$"+arity);arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;eval(func)}if(updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),"void"!=cSig)for(var i in cSig=cSig.split(","),cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then((e=>postInstantiation(e.module,e.instance)))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return currentModuleWeakSymbols=metadata.weakImports,flags.loadAsync?metadata.neededDynlibs.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,flags,localScope)))),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach((e=>loadDynamicLibrary(e,flags,localScope))),loadModule())},mergeLibSymbols=(e,t)=>{for(var[r,n]of Object.entries(e)){const e=e=>{isSymbolDefined(e)||(wasmImports[e]=n)};e(r);const t="__main_argc_argv";"main"==r&&e(t),r==t&&e("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=n)}},asyncLoad=(e,t,r,n)=>{var s=getUniqueRunDependency(`al ${e}`);readAsync(e).then((e=>{t(new Uint8Array(e)),s&&removeRunDependency()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),s&&addRunDependency()};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var s=LDSO.loadedLibsByName[e];if(s)return t.global&&(s.global||(s.global=!0,mergeLibSymbols(s.exports))),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,!t.loadAsync||Promise.resolve(!0);function i(){var r=locateFile(e);if(t.loadAsync)return new Promise((function(e,t){asyncLoad(r,e,t)}));if(!readBinary)throw new Error(`${r}: file not found, and synchronous loading of external files is not available`);return readBinary(r)}function o(){return t.loadAsync?i().then((n=>loadWebAssemblyModule(n,t,e,r))):loadWebAssemblyModule(i(),t,e,r)}function a(e){s.global&&mergeLibSymbols(e),s.exports=e}return(s=newDSO(e,n,"loading")).refcount=t.nodelete?1/0:1,s.global=t.global,t.loadAsync?o().then((e=>(a(e),!0))):(a(o()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(0==t.value){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if("function"==typeof r)t.value=addFunction(r,r.sig);else{if("number"!=typeof r)throw new Error(`bad export type for '${e}': ${typeof r}`);t.value=r}}},loadDylibs=()=>{dynamicLibraries.length?(addRunDependency(),dynamicLibraries.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})))),Promise.resolve()).then((()=>{reportUndefinedSymbols(),removeRunDependency()}))):reportUndefinedSymbols()};function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16(2*(e>>1),t);break;case"i32":LE_HEAP_STORE_I32(4*(e>>2),t);break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":LE_HEAP_STORE_F32(4*(e>>2),t);break;case"double":LE_HEAP_STORE_F64(8*(e>>3),t);break;case"*":LE_HEAP_STORE_U32(4*(e>>2),t);break;default:abort(`invalid type for setValue: ${r}`)}}Module.noExitRuntime;var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78112),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=()=>{abort("")};__abort_js.sig="v";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var __emscripten_memcpy_js=(e,t,r)=>HEAPU8.copyWithin(e,t,t+r),_emscripten_get_now;__emscripten_memcpy_js.sig="vppp",_emscripten_get_now=()=>performance.now(),_emscripten_get_now.sig="d";var getHeapMax=()=>2147483648,growMemory=e=>{var t=(e-wasmMemory.buffer.byteLength+65535)/65536;try{return wasmMemory.grow(t),updateMemoryViews(),1}catch(e){}},_emscripten_resize_heap=e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n,s,i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((s=65536)-n%s)%s);if(growMemory(a))return!0}return!1};_emscripten_resize_heap.sig="ip";var _fd_close=e=>52;function _fd_seek(e,t,r,n,s){return 70}_fd_close.sig="ii",_fd_seek.sig="iiiiip";var printCharBuffers=[null,[],[]],printChar=(e,t)=>{var r=printCharBuffers[e];0===t||10===t?((1===e?out:err)(UTF8ArrayToString(r,0)),r.length=0):r.push(t)},_fd_write=(e,t,r,n)=>{for(var s=0,i=0;i<r;i++){var o=LE_HEAP_LOAD_U32(4*(t>>2)),a=LE_HEAP_LOAD_U32(4*(t+4>>2));t+=8;for(var u=0;u<a;u++)printChar(e,HEAPU8[o+u]);s+=a}return LE_HEAP_STORE_U32(4*(n>>2),s),0};function _tree_sitter_log_callback(e,t){if(currentLogCallback){const r=UTF8ToString(t);currentLogCallback(r,0!==e)}}function _tree_sitter_parse_callback(e,t,r,n,s){const i=currentParseCallback(t,{row:r,column:n});"string"==typeof i?(setValue(s,i.length,"i32"),stringToUTF16(i,e,10240)):setValue(s,0,"i32")}_fd_write.sig="iippp";var _proc_exit=e=>{EXITSTATUS=e,quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)},lengthBytesUTF8=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(!(n>0))return 0;for(var s=r,i=r+n-1,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=i)break;t[r++]=a}else if(a<=2047){if(r+1>=i)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=i)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-s},stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},stringToUTF16=(e,t,r)=>{if(r??=2147483647,r<2)return 0;for(var n=t,s=(r-=2)<2*e.length?r/2:e.length,i=0;i<s;++i){var o=e.charCodeAt(i);LE_HEAP_STORE_I16(2*(t>>1),o),t+=2}return LE_HEAP_STORE_I16(2*(t>>1),0),t-n},AsciiToString=e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_memcpy_js:__emscripten_memcpy_js,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},wasmExports=createWasm(),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e);Module._calloc=(e,t)=>(Module._calloc=wasmExports.calloc)(e,t),Module._realloc=(e,t)=>(Module._realloc=wasmExports.realloc)(e,t),Module._free=e=>(Module._free=wasmExports.free)(e),Module._ts_language_symbol_count=e=>(Module._ts_language_symbol_count=wasmExports.ts_language_symbol_count)(e),Module._ts_language_state_count=e=>(Module._ts_language_state_count=wasmExports.ts_language_state_count)(e),Module._ts_language_version=e=>(Module._ts_language_version=wasmExports.ts_language_version)(e),Module._ts_language_field_count=e=>(Module._ts_language_field_count=wasmExports.ts_language_field_count)(e),Module._ts_language_next_state=(e,t,r)=>(Module._ts_language_next_state=wasmExports.ts_language_next_state)(e,t,r),Module._ts_language_symbol_name=(e,t)=>(Module._ts_language_symbol_name=wasmExports.ts_language_symbol_name)(e,t),Module._ts_language_symbol_for_name=(e,t,r,n)=>(Module._ts_language_symbol_for_name=wasmExports.ts_language_symbol_for_name)(e,t,r,n),Module._strncmp=(e,t,r)=>(Module._strncmp=wasmExports.strncmp)(e,t,r),Module._ts_language_symbol_type=(e,t)=>(Module._ts_language_symbol_type=wasmExports.ts_language_symbol_type)(e,t),Module._ts_language_field_name_for_id=(e,t)=>(Module._ts_language_field_name_for_id=wasmExports.ts_language_field_name_for_id)(e,t),Module._ts_lookahead_iterator_new=(e,t)=>(Module._ts_lookahead_iterator_new=wasmExports.ts_lookahead_iterator_new)(e,t),Module._ts_lookahead_iterator_delete=e=>(Module._ts_lookahead_iterator_delete=wasmExports.ts_lookahead_iterator_delete)(e),Module._ts_lookahead_iterator_reset_state=(e,t)=>(Module._ts_lookahead_iterator_reset_state=wasmExports.ts_lookahead_iterator_reset_state)(e,t),Module._ts_lookahead_iterator_reset=(e,t,r)=>(Module._ts_lookahead_iterator_reset=wasmExports.ts_lookahead_iterator_reset)(e,t,r),Module._ts_lookahead_iterator_next=e=>(Module._ts_lookahead_iterator_next=wasmExports.ts_lookahead_iterator_next)(e),Module._ts_lookahead_iterator_current_symbol=e=>(Module._ts_lookahead_iterator_current_symbol=wasmExports.ts_lookahead_iterator_current_symbol)(e),Module._memset=(e,t,r)=>(Module._memset=wasmExports.memset)(e,t,r),Module._memcpy=(e,t,r)=>(Module._memcpy=wasmExports.memcpy)(e,t,r),Module._ts_parser_delete=e=>(Module._ts_parser_delete=wasmExports.ts_parser_delete)(e),Module._ts_parser_reset=e=>(Module._ts_parser_reset=wasmExports.ts_parser_reset)(e),Module._ts_parser_set_language=(e,t)=>(Module._ts_parser_set_language=wasmExports.ts_parser_set_language)(e,t),Module._ts_parser_timeout_micros=e=>(Module._ts_parser_timeout_micros=wasmExports.ts_parser_timeout_micros)(e),Module._ts_parser_set_timeout_micros=(e,t,r)=>(Module._ts_parser_set_timeout_micros=wasmExports.ts_parser_set_timeout_micros)(e,t,r),Module._ts_parser_set_included_ranges=(e,t,r)=>(Module._ts_parser_set_included_ranges=wasmExports.ts_parser_set_included_ranges)(e,t,r),Module._memmove=(e,t,r)=>(Module._memmove=wasmExports.memmove)(e,t,r),Module._memcmp=(e,t,r)=>(Module._memcmp=wasmExports.memcmp)(e,t,r),Module._ts_query_new=(e,t,r,n,s)=>(Module._ts_query_new=wasmExports.ts_query_new)(e,t,r,n,s),Module._ts_query_delete=e=>(Module._ts_query_delete=wasmExports.ts_query_delete)(e),Module._iswspace=e=>(Module._iswspace=wasmExports.iswspace)(e),Module._iswalnum=e=>(Module._iswalnum=wasmExports.iswalnum)(e),Module._ts_query_pattern_count=e=>(Module._ts_query_pattern_count=wasmExports.ts_query_pattern_count)(e),Module._ts_query_capture_count=e=>(Module._ts_query_capture_count=wasmExports.ts_query_capture_count)(e),Module._ts_query_string_count=e=>(Module._ts_query_string_count=wasmExports.ts_query_string_count)(e),Module._ts_query_capture_name_for_id=(e,t,r)=>(Module._ts_query_capture_name_for_id=wasmExports.ts_query_capture_name_for_id)(e,t,r),Module._ts_query_string_value_for_id=(e,t,r)=>(Module._ts_query_string_value_for_id=wasmExports.ts_query_string_value_for_id)(e,t,r),Module._ts_query_predicates_for_pattern=(e,t,r)=>(Module._ts_query_predicates_for_pattern=wasmExports.ts_query_predicates_for_pattern)(e,t,r),Module._ts_query_disable_capture=(e,t,r)=>(Module._ts_query_disable_capture=wasmExports.ts_query_disable_capture)(e,t,r),Module._ts_tree_copy=e=>(Module._ts_tree_copy=wasmExports.ts_tree_copy)(e),Module._ts_tree_delete=e=>(Module._ts_tree_delete=wasmExports.ts_tree_delete)(e),Module._ts_init=()=>(Module._ts_init=wasmExports.ts_init)(),Module._ts_parser_new_wasm=()=>(Module._ts_parser_new_wasm=wasmExports.ts_parser_new_wasm)(),Module._ts_parser_enable_logger_wasm=(e,t)=>(Module._ts_parser_enable_logger_wasm=wasmExports.ts_parser_enable_logger_wasm)(e,t),Module._ts_parser_parse_wasm=(e,t,r,n,s)=>(Module._ts_parser_parse_wasm=wasmExports.ts_parser_parse_wasm)(e,t,r,n,s),Module._ts_parser_included_ranges_wasm=e=>(Module._ts_parser_included_ranges_wasm=wasmExports.ts_parser_included_ranges_wasm)(e),Module._ts_language_type_is_named_wasm=(e,t)=>(Module._ts_language_type_is_named_wasm=wasmExports.ts_language_type_is_named_wasm)(e,t),Module._ts_language_type_is_visible_wasm=(e,t)=>(Module._ts_language_type_is_visible_wasm=wasmExports.ts_language_type_is_visible_wasm)(e,t),Module._ts_tree_root_node_wasm=e=>(Module._ts_tree_root_node_wasm=wasmExports.ts_tree_root_node_wasm)(e),Module._ts_tree_root_node_with_offset_wasm=e=>(Module._ts_tree_root_node_with_offset_wasm=wasmExports.ts_tree_root_node_with_offset_wasm)(e),Module._ts_tree_edit_wasm=e=>(Module._ts_tree_edit_wasm=wasmExports.ts_tree_edit_wasm)(e),Module._ts_tree_included_ranges_wasm=e=>(Module._ts_tree_included_ranges_wasm=wasmExports.ts_tree_included_ranges_wasm)(e),Module._ts_tree_get_changed_ranges_wasm=(e,t)=>(Module._ts_tree_get_changed_ranges_wasm=wasmExports.ts_tree_get_changed_ranges_wasm)(e,t),Module._ts_tree_cursor_new_wasm=e=>(Module._ts_tree_cursor_new_wasm=wasmExports.ts_tree_cursor_new_wasm)(e),Module._ts_tree_cursor_delete_wasm=e=>(Module._ts_tree_cursor_delete_wasm=wasmExports.ts_tree_cursor_delete_wasm)(e),Module._ts_tree_cursor_reset_wasm=e=>(Module._ts_tree_cursor_reset_wasm=wasmExports.ts_tree_cursor_reset_wasm)(e),Module._ts_tree_cursor_reset_to_wasm=(e,t)=>(Module._ts_tree_cursor_reset_to_wasm=wasmExports.ts_tree_cursor_reset_to_wasm)(e,t),Module._ts_tree_cursor_goto_first_child_wasm=e=>(Module._ts_tree_cursor_goto_first_child_wasm=wasmExports.ts_tree_cursor_goto_first_child_wasm)(e),Module._ts_tree_cursor_goto_last_child_wasm=e=>(Module._ts_tree_cursor_goto_last_child_wasm=wasmExports.ts_tree_cursor_goto_last_child_wasm)(e),Module._ts_tree_cursor_goto_first_child_for_index_wasm=e=>(Module._ts_tree_cursor_goto_first_child_for_index_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_index_wasm)(e),Module._ts_tree_cursor_goto_first_child_for_position_wasm=e=>(Module._ts_tree_cursor_goto_first_child_for_position_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_position_wasm)(e),Module._ts_tree_cursor_goto_next_sibling_wasm=e=>(Module._ts_tree_cursor_goto_next_sibling_wasm=wasmExports.ts_tree_cursor_goto_next_sibling_wasm)(e),Module._ts_tree_cursor_goto_previous_sibling_wasm=e=>(Module._ts_tree_cursor_goto_previous_sibling_wasm=wasmExports.ts_tree_cursor_goto_previous_sibling_wasm)(e),Module._ts_tree_cursor_goto_descendant_wasm=(e,t)=>(Module._ts_tree_cursor_goto_descendant_wasm=wasmExports.ts_tree_cursor_goto_descendant_wasm)(e,t),Module._ts_tree_cursor_goto_parent_wasm=e=>(Module._ts_tree_cursor_goto_parent_wasm=wasmExports.ts_tree_cursor_goto_parent_wasm)(e),Module._ts_tree_cursor_current_node_type_id_wasm=e=>(Module._ts_tree_cursor_current_node_type_id_wasm=wasmExports.ts_tree_cursor_current_node_type_id_wasm)(e),Module._ts_tree_cursor_current_node_state_id_wasm=e=>(Module._ts_tree_cursor_current_node_state_id_wasm=wasmExports.ts_tree_cursor_current_node_state_id_wasm)(e),Module._ts_tree_cursor_current_node_is_named_wasm=e=>(Module._ts_tree_cursor_current_node_is_named_wasm=wasmExports.ts_tree_cursor_current_node_is_named_wasm)(e),Module._ts_tree_cursor_current_node_is_missing_wasm=e=>(Module._ts_tree_cursor_current_node_is_missing_wasm=wasmExports.ts_tree_cursor_current_node_is_missing_wasm)(e),Module._ts_tree_cursor_current_node_id_wasm=e=>(Module._ts_tree_cursor_current_node_id_wasm=wasmExports.ts_tree_cursor_current_node_id_wasm)(e),Module._ts_tree_cursor_start_position_wasm=e=>(Module._ts_tree_cursor_start_position_wasm=wasmExports.ts_tree_cursor_start_position_wasm)(e),Module._ts_tree_cursor_end_position_wasm=e=>(Module._ts_tree_cursor_end_position_wasm=wasmExports.ts_tree_cursor_end_position_wasm)(e),Module._ts_tree_cursor_start_index_wasm=e=>(Module._ts_tree_cursor_start_index_wasm=wasmExports.ts_tree_cursor_start_index_wasm)(e),Module._ts_tree_cursor_end_index_wasm=e=>(Module._ts_tree_cursor_end_index_wasm=wasmExports.ts_tree_cursor_end_index_wasm)(e),Module._ts_tree_cursor_current_field_id_wasm=e=>(Module._ts_tree_cursor_current_field_id_wasm=wasmExports.ts_tree_cursor_current_field_id_wasm)(e),Module._ts_tree_cursor_current_depth_wasm=e=>(Module._ts_tree_cursor_current_depth_wasm=wasmExports.ts_tree_cursor_current_depth_wasm)(e),Module._ts_tree_cursor_current_descendant_index_wasm=e=>(Module._ts_tree_cursor_current_descendant_index_wasm=wasmExports.ts_tree_cursor_current_descendant_index_wasm)(e),Module._ts_tree_cursor_current_node_wasm=e=>(Module._ts_tree_cursor_current_node_wasm=wasmExports.ts_tree_cursor_current_node_wasm)(e),Module._ts_node_symbol_wasm=e=>(Module._ts_node_symbol_wasm=wasmExports.ts_node_symbol_wasm)(e),Module._ts_node_field_name_for_child_wasm=(e,t)=>(Module._ts_node_field_name_for_child_wasm=wasmExports.ts_node_field_name_for_child_wasm)(e,t),Module._ts_node_children_by_field_id_wasm=(e,t)=>(Module._ts_node_children_by_field_id_wasm=wasmExports.ts_node_children_by_field_id_wasm)(e,t),Module._ts_node_first_child_for_byte_wasm=e=>(Module._ts_node_first_child_for_byte_wasm=wasmExports.ts_node_first_child_for_byte_wasm)(e),Module._ts_node_first_named_child_for_byte_wasm=e=>(Module._ts_node_first_named_child_for_byte_wasm=wasmExports.ts_node_first_named_child_for_byte_wasm)(e),Module._ts_node_grammar_symbol_wasm=e=>(Module._ts_node_grammar_symbol_wasm=wasmExports.ts_node_grammar_symbol_wasm)(e),Module._ts_node_child_count_wasm=e=>(Module._ts_node_child_count_wasm=wasmExports.ts_node_child_count_wasm)(e),Module._ts_node_named_child_count_wasm=e=>(Module._ts_node_named_child_count_wasm=wasmExports.ts_node_named_child_count_wasm)(e),Module._ts_node_child_wasm=(e,t)=>(Module._ts_node_child_wasm=wasmExports.ts_node_child_wasm)(e,t),Module._ts_node_named_child_wasm=(e,t)=>(Module._ts_node_named_child_wasm=wasmExports.ts_node_named_child_wasm)(e,t),Module._ts_node_child_by_field_id_wasm=(e,t)=>(Module._ts_node_child_by_field_id_wasm=wasmExports.ts_node_child_by_field_id_wasm)(e,t),Module._ts_node_next_sibling_wasm=e=>(Module._ts_node_next_sibling_wasm=wasmExports.ts_node_next_sibling_wasm)(e),Module._ts_node_prev_sibling_wasm=e=>(Module._ts_node_prev_sibling_wasm=wasmExports.ts_node_prev_sibling_wasm)(e),Module._ts_node_next_named_sibling_wasm=e=>(Module._ts_node_next_named_sibling_wasm=wasmExports.ts_node_next_named_sibling_wasm)(e),Module._ts_node_prev_named_sibling_wasm=e=>(Module._ts_node_prev_named_sibling_wasm=wasmExports.ts_node_prev_named_sibling_wasm)(e),Module._ts_node_descendant_count_wasm=e=>(Module._ts_node_descendant_count_wasm=wasmExports.ts_node_descendant_count_wasm)(e),Module._ts_node_parent_wasm=e=>(Module._ts_node_parent_wasm=wasmExports.ts_node_parent_wasm)(e),Module._ts_node_descendant_for_index_wasm=e=>(Module._ts_node_descendant_for_index_wasm=wasmExports.ts_node_descendant_for_index_wasm)(e),Module._ts_node_named_descendant_for_index_wasm=e=>(Module._ts_node_named_descendant_for_index_wasm=wasmExports.ts_node_named_descendant_for_index_wasm)(e),Module._ts_node_descendant_for_position_wasm=e=>(Module._ts_node_descendant_for_position_wasm=wasmExports.ts_node_descendant_for_position_wasm)(e),Module._ts_node_named_descendant_for_position_wasm=e=>(Module._ts_node_named_descendant_for_position_wasm=wasmExports.ts_node_named_descendant_for_position_wasm)(e),Module._ts_node_start_point_wasm=e=>(Module._ts_node_start_point_wasm=wasmExports.ts_node_start_point_wasm)(e),Module._ts_node_end_point_wasm=e=>(Module._ts_node_end_point_wasm=wasmExports.ts_node_end_point_wasm)(e),Module._ts_node_start_index_wasm=e=>(Module._ts_node_start_index_wasm=wasmExports.ts_node_start_index_wasm)(e),Module._ts_node_end_index_wasm=e=>(Module._ts_node_end_index_wasm=wasmExports.ts_node_end_index_wasm)(e),Module._ts_node_to_string_wasm=e=>(Module._ts_node_to_string_wasm=wasmExports.ts_node_to_string_wasm)(e),Module._ts_node_children_wasm=e=>(Module._ts_node_children_wasm=wasmExports.ts_node_children_wasm)(e),Module._ts_node_named_children_wasm=e=>(Module._ts_node_named_children_wasm=wasmExports.ts_node_named_children_wasm)(e),Module._ts_node_descendants_of_type_wasm=(e,t,r,n,s,i,o)=>(Module._ts_node_descendants_of_type_wasm=wasmExports.ts_node_descendants_of_type_wasm)(e,t,r,n,s,i,o),Module._ts_node_is_named_wasm=e=>(Module._ts_node_is_named_wasm=wasmExports.ts_node_is_named_wasm)(e),Module._ts_node_has_changes_wasm=e=>(Module._ts_node_has_changes_wasm=wasmExports.ts_node_has_changes_wasm)(e),Module._ts_node_has_error_wasm=e=>(Module._ts_node_has_error_wasm=wasmExports.ts_node_has_error_wasm)(e),Module._ts_node_is_error_wasm=e=>(Module._ts_node_is_error_wasm=wasmExports.ts_node_is_error_wasm)(e),Module._ts_node_is_missing_wasm=e=>(Module._ts_node_is_missing_wasm=wasmExports.ts_node_is_missing_wasm)(e),Module._ts_node_is_extra_wasm=e=>(Module._ts_node_is_extra_wasm=wasmExports.ts_node_is_extra_wasm)(e),Module._ts_node_parse_state_wasm=e=>(Module._ts_node_parse_state_wasm=wasmExports.ts_node_parse_state_wasm)(e),Module._ts_node_next_parse_state_wasm=e=>(Module._ts_node_next_parse_state_wasm=wasmExports.ts_node_next_parse_state_wasm)(e),Module._ts_query_matches_wasm=(e,t,r,n,s,i,o,a,u,l,c)=>(Module._ts_query_matches_wasm=wasmExports.ts_query_matches_wasm)(e,t,r,n,s,i,o,a,u,l,c),Module._ts_query_captures_wasm=(e,t,r,n,s,i,o,a,u,l,c)=>(Module._ts_query_captures_wasm=wasmExports.ts_query_captures_wasm)(e,t,r,n,s,i,o,a,u,l,c),Module._iswalpha=e=>(Module._iswalpha=wasmExports.iswalpha)(e),Module._iswblank=e=>(Module._iswblank=wasmExports.iswblank)(e),Module._iswdigit=e=>(Module._iswdigit=wasmExports.iswdigit)(e),Module._iswlower=e=>(Module._iswlower=wasmExports.iswlower)(e),Module._iswupper=e=>(Module._iswupper=wasmExports.iswupper)(e),Module._iswxdigit=e=>(Module._iswxdigit=wasmExports.iswxdigit)(e),Module._memchr=(e,t,r)=>(Module._memchr=wasmExports.memchr)(e,t,r),Module._strlen=e=>(Module._strlen=wasmExports.strlen)(e),Module._strcmp=(e,t)=>(Module._strcmp=wasmExports.strcmp)(e,t),Module._strncat=(e,t,r)=>(Module._strncat=wasmExports.strncat)(e,t,r),Module._strncpy=(e,t,r)=>(Module._strncpy=wasmExports.strncpy)(e,t,r),Module._towlower=e=>(Module._towlower=wasmExports.towlower)(e),Module._towupper=e=>(Module._towupper=wasmExports.towupper)(e);var _setThrew=(e,t)=>(_setThrew=wasmExports.setThrew)(e,t),__emscripten_stack_restore=e=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(e),__emscripten_stack_alloc=e=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(e),_emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),calledRun;function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc(4*(r+1)),s=n;e.forEach((e=>{LE_HEAP_STORE_U32(4*(s>>2),stringToUTF8OnStack(e)),s+=4})),LE_HEAP_STORE_U32(4*(s>>2),0);try{var i=t(r,n);return exitJS(i,!0),i}catch(e){return handleException(e)}}}function run(e=arguments_){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized?.(),shouldRunNow&&callMain(e),postRun()))}runDependencies>0||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t()))}if(Module.dynCall_jiji=(e,t,r,n,s)=>(Module.dynCall_jiji=wasmExports.dynCall_jiji)(e,t,r,n,s),Module._orig$ts_parser_timeout_micros=e=>(Module._orig$ts_parser_timeout_micros=wasmExports.orig$ts_parser_timeout_micros)(e),Module._orig$ts_parser_set_timeout_micros=(e,t)=>(Module._orig$ts_parser_set_timeout_micros=wasmExports.orig$ts_parser_set_timeout_micros)(e,t),Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();const C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/;let VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const r=C._ts_language_version(t);if(r<MIN_COMPATIBLE_VERSION||VERSION<r)throw new Error(`Incompatible language version ${r}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`)}}else t=0,e=null;return this.language=e,C._ts_parser_set_language(this[0],t),this}getLanguage(){return this.language}parse(e,t,r){if("string"==typeof e)currentParseCallback=(t,r)=>e.slice(t);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");currentParseCallback=e}this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let n=0,s=0;if(r?.includedRanges){n=r.includedRanges.length,s=C._calloc(n,SIZE_OF_RANGE);let e=s;for(let t=0;t<n;t++)marshalRange(e,r.includedRanges[t]),e+=SIZE_OF_RANGE}const i=C._ts_parser_parse_wasm(this[0],this[1],t?t[0]:0,s,n);if(!i)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");const o=new Tree(INTERNAL,i,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,o}reset(){C._ts_parser_reset(this[0])}getIncludedRanges(){C._ts_parser_included_ranges_wasm(this[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=new Array(e);if(e>0){let n=t;for(let t=0;t<e;t++)r[t]=unmarshalRange(n),n+=SIZE_OF_RANGE;C._free(t)}return r}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setTimeoutMicros(e){C._ts_parser_set_timeout_micros(this[0],e)}setLogger(e){if(e){if("function"!=typeof e)throw new Error("Logger callback must be a function")}else e=null;return this.logCallback=e,this}getLogger(){return this.logCallback}}class Tree{constructor(e,t,r,n){assertInternal(e),this[0]=t,this.language=r,this.textCallback=n}copy(){const e=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,e,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(e){marshalEdit(e),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(e,t){const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),marshalPoint(r+SIZE_OF_INT,t),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(e){if(e.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],e[0]);const t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let e=r;for(let r=0;r<t;r++)n[r]=unmarshalRange(e),e+=SIZE_OF_RANGE;C._free(r)}return n}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),r=new Array(e);if(e>0){let n=t;for(let t=0;t<e;t++)r[t]=unmarshalRange(n),n+=SIZE_OF_RANGE;C._free(t)}return r}}class Node{constructor(e,t){assertInternal(e),this.tree=t}get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get text(){return getText(this.tree,this.startIndex,this.endIndex)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}get isNamed(){return marshalNode(this),1===C._ts_node_is_named_wasm(this.tree[0])}get hasError(){return marshalNode(this),1===C._ts_node_has_error_wasm(this.tree[0])}get hasChanges(){return marshalNode(this),1===C._ts_node_has_changes_wasm(this.tree[0])}get isError(){return marshalNode(this),1===C._ts_node_is_error_wasm(this.tree[0])}get isMissing(){return marshalNode(this),1===C._ts_node_is_missing_wasm(this.tree[0])}get isExtra(){return marshalNode(this),1===C._ts_node_is_extra_wasm(this.tree[0])}equals(e){return this.id===e.id}child(e){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}namedChild(e){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldId(e){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],e),unmarshalNode(this.tree)}childForFieldName(e){const t=this.tree.language.fields.indexOf(e);return-1!==t?this.childForFieldId(t):null}fieldNameForChild(e){marshalNode(this);const t=C._ts_node_field_name_for_child_wasm(this.tree[0],e);if(!t)return null;return AsciiToString(t)}childrenForFieldName(e){const t=this.tree.language.fields.indexOf(e);return-1!==t&&0!==t?this.childrenForFieldId(t):[]}childrenForFieldId(e){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],e);const t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let e=r;for(let r=0;r<t;r++)n[r]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE;C._free(r)}return n}firstChildForIndex(e){marshalNode(this);return setValue(TRANSFER_BUFFER+SIZE_OF_NODE,e,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(e){marshalNode(this);return setValue(TRANSFER_BUFFER+SIZE_OF_NODE,e,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=new Array(e),e>0){let r=t;for(let t=0;t<e;t++)this._children[t]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE;C._free(t)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);const e=getValue(TRANSFER_BUFFER,"i32"),t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=new Array(e),e>0){let r=t;for(let t=0;t<e;t++)this._namedChildren[t]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE;C._free(t)}}return this._namedChildren}descendantsOfType(e,t,r){Array.isArray(e)||(e=[e]),t||(t=ZERO_POINT),r||(r=ZERO_POINT);const n=[],s=this.tree.language.types;for(let t=0,r=s.length;t<r;t++)e.includes(s[t])&&n.push(t);const i=C._malloc(SIZE_OF_INT*n.length);for(let e=0,t=n.length;e<t;e++)setValue(i+e*SIZE_OF_INT,n[e],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],i,n.length,t.row,t.column,r.row,r.column);const o=getValue(TRANSFER_BUFFER,"i32"),a=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),u=new Array(o);if(o>0){let e=a;for(let t=0;t<o;t++)u[t]=unmarshalNode(this.tree,e),e+=SIZE_OF_NODE}return C._free(a),C._free(i),u}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),setValue(r+SIZE_OF_INT,t,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,e,"i32"),setValue(r+SIZE_OF_INT,t,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw new Error("Arguments must be {row, column} objects");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(r,e),marshalPoint(r+SIZE_OF_POINT,t),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(e,t=e){if(!isPoint(e)||!isPoint(t))throw new Error("Arguments must be {row, column} objects");marshalNode(this);const r=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(r,e),marshalPoint(r+SIZE_OF_POINT,t),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}toString(){marshalNode(this);const e=C._ts_node_to_string_wasm(this.tree[0]),t=AsciiToString(e);return C._free(e),t}}class TreeCursor{constructor(e,t){assertInternal(e),this.tree=t,unmarshalTreeCursor(this)}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(e){marshalNode(e),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(e){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(e,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],e.tree[0]),unmarshalTreeCursor(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){marshalTreeCursor(this);const e=C._ts_tree_cursor_start_index_wasm(this.tree[0]),t=C._ts_tree_cursor_end_index_wasm(this.tree[0]);return getText(this.tree,e,t)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoLastChild(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoFirstChildForIndex(e){marshalTreeCursor(this),setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,e,"i32");const t=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoFirstChildForPosition(e){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,e);const t=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===t}gotoNextSibling(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoPreviousSibling(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}gotoDescendant(e){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],e),unmarshalTreeCursor(this)}gotoParent(){marshalTreeCursor(this);const e=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===e}}class Language{constructor(e,t){assertInternal(e),this[0]=t,this.types=new Array(C._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e<t;e++)C._ts_language_symbol_type(this[0],e)<2&&(this.types[e]=UTF8ToString(C._ts_language_symbol_name(this[0],e)));this.fields=new Array(C._ts_language_field_count(this[0])+1);for(let e=0,t=this.fields.length;e<t;e++){const t=C._ts_language_field_name_for_id(this[0],e);this.fields[e]=0!==t?UTF8ToString(t):null}}get version(){return C._ts_language_version(this[0])}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(e){const t=this.fields.indexOf(e);return-1!==t?t:null}fieldNameForId(e){return this.fields[e]||null}idForNodeType(e,t){const r=lengthBytesUTF8(e),n=C._malloc(r+1);stringToUTF8(e,n,r+1);const s=C._ts_language_symbol_for_name(this[0],n,r,t);return C._free(n),s||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(e){const t=C._ts_language_symbol_name(this[0],e);return t?UTF8ToString(t):null}nodeTypeIsNamed(e){return!!C._ts_language_type_is_named_wasm(this[0],e)}nodeTypeIsVisible(e){return!!C._ts_language_type_is_visible_wasm(this[0],e)}nextState(e,t){return C._ts_language_next_state(this[0],e,t)}lookaheadIterator(e){const t=C._ts_lookahead_iterator_new(this[0],e);return t?new LookaheadIterable(INTERNAL,t,this):null}query(e){const t=lengthBytesUTF8(e),r=C._malloc(t+1);stringToUTF8(e,r,t+1);const n=C._ts_query_new(this[0],r,t,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!n){const t=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=getValue(TRANSFER_BUFFER,"i32"),s=UTF8ToString(r,n).length,i=e.substr(s,100).split("\n")[0];let o,a=i.match(QUERY_WORD_REGEX)[0];switch(t){case 2:o=new RangeError(`Bad node name '${a}'`);break;case 3:o=new RangeError(`Bad field name '${a}'`);break;case 4:o=new RangeError(`Bad capture name @${a}`);break;case 5:o=new TypeError(`Bad pattern structure at offset ${s}: '${i}'...`),a="";break;default:o=new SyntaxError(`Bad syntax at offset ${s}: '${i}'...`),a=""}throw o.index=s,o.length=a.length,C._free(r),o}const s=C._ts_query_string_count(n),i=C._ts_query_capture_count(n),o=C._ts_query_pattern_count(n),a=new Array(i),u=new Array(s);for(let e=0;e<i;e++){const t=C._ts_query_capture_name_for_id(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");a[e]=UTF8ToString(t,r)}for(let e=0;e<s;e++){const t=C._ts_query_string_value_for_id(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");u[e]=UTF8ToString(t,r)}const l=new Array(o),c=new Array(o),d=new Array(o),p=new Array(o),h=new Array(o);for(let e=0;e<o;e++){const t=C._ts_query_predicates_for_pattern(n,e,TRANSFER_BUFFER),r=getValue(TRANSFER_BUFFER,"i32");p[e]=[],h[e]=[];const s=[];let i=t;for(let t=0;t<r;t++){const t=getValue(i,"i32");i+=SIZE_OF_INT;const r=getValue(i,"i32");if(i+=SIZE_OF_INT,t===PREDICATE_STEP_TYPE_CAPTURE)s.push({type:"capture",name:a[r]});else if(t===PREDICATE_STEP_TYPE_STRING)s.push({type:"string",value:u[r]});else if(s.length>0){if("string"!==s[0].type)throw new Error("Predicates must begin with a literal value");const t=s[0].value;let r,n=!0,i=!0;switch(t){case"any-not-eq?":case"not-eq?":n=!1;case"any-eq?":case"eq?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}"`);if(i=!t.startsWith("any-"),"capture"===s[2].type){const t=s[1].name,r=s[2].name;h[e].push((e=>{const s=[],o=[];for(const n of e)n.name===t&&s.push(n.node),n.name===r&&o.push(n.node);const a=(e,t,r)=>r?e.text===t.text:e.text!==t.text;return i?s.every((e=>o.some((t=>a(e,t,n))))):s.some((e=>o.some((t=>a(e,t,n)))))}))}else{r=s[1].name;const t=s[2].value,o=e=>e.text===t,a=e=>e.text!==t;h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node);const s=n?o:a;return i?t.every(s):t.some(s)}))}break;case"any-not-match?":case"not-match?":n=!1;case"any-match?":case"match?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);if("string"!==s[2].type)throw new Error(`Second argument of \`#${t}\` predicate must be a string. Got @${s[2].value}.`);r=s[1].name;const o=new RegExp(s[2].value);i=!t.startsWith("any-"),h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node.text);const s=(e,t)=>t?o.test(e):!o.test(e);return 0===t.length?!n:i?t.every((e=>s(e,n))):t.some((e=>s(e,n)))}));break;case"set!":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][s[1].value]=s[2]?s[2].value:null;break;case"is?":case"is-not?":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const a="is?"===t?c:d;a[e]||(a[e]={}),a[e][s[1].value]=s[2]?s[2].value:null;break;case"not-any-of?":n=!1;case"any-of?":if(s.length<2)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected at least 1. Got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);for(let e=2;e<s.length;e++)if("string"!==s[e].type)throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);r=s[1].name;const u=s.slice(2).map((e=>e.value));h[e].push((e=>{const t=[];for(const n of e)n.name===r&&t.push(n.node.text);return 0===t.length?!n:t.every((e=>u.includes(e)))===n}));break;default:p[e].push({operator:t,operands:s.slice(1)})}s.length=0}}Object.freeze(l[e]),Object.freeze(c[e]),Object.freeze(d[e])}return C._free(r),new Query(INTERNAL,n,a,h,p,Object.freeze(l),Object.freeze(c),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const r=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=require$$0;t=Promise.resolve(e.readFileSync(r))}else t=fetch(r).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}return t.then((e=>loadWebAssemblyModule(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>LANGUAGE_FUNCTION_REGEX.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Language(INTERNAL,n)}))}}class LookaheadIterable{constructor(e,t,r){assertInternal(e),this[0]=t,this.language=r}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(e){return C._ts_lookahead_iterator_reset_state(this[0],e)}reset(e,t){return!!C._ts_lookahead_iterator_reset(this[0],e[0],t)&&(this.language=e,!0)}[Symbol.iterator](){const e=this;return{next:()=>C._ts_lookahead_iterator_next(e[0])?{done:!1,value:e.currentType}:{done:!0,value:""}}}}class Query{constructor(e,t,r,n,s,i,o,a){assertInternal(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=s,this.setProperties=i,this.assertedProperties=o,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,{startPosition:t=ZERO_POINT,endPosition:r=ZERO_POINT,startIndex:n=0,endIndex:s=0,matchLimit:i=4294967295,maxStartDepth:o=4294967295,timeoutMicros:a=0}={}){if("number"!=typeof i)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,n,s,i,o,a);const u=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),d=new Array(u);this.exceededMatchLimit=Boolean(c);let p=0,h=l;for(let t=0;t<u;t++){const t=getValue(h,"i32");h+=SIZE_OF_INT;const r=getValue(h,"i32");h+=SIZE_OF_INT;const n=new Array(r);if(h=unmarshalCaptures(this,e.tree,h,n),this.textPredicates[t].every((e=>e(n)))){d[p]={pattern:t,captures:n};const e=this.setProperties[t];e&&(d[p].setProperties=e);const r=this.assertedProperties[t];r&&(d[p].assertedProperties=r);const s=this.refutedProperties[t];s&&(d[p].refutedProperties=s),p++}}return d.length=p,C._free(l),d}captures(e,{startPosition:t=ZERO_POINT,endPosition:r=ZERO_POINT,startIndex:n=0,endIndex:s=0,matchLimit:i=4294967295,maxStartDepth:o=4294967295,timeoutMicros:a=0}={}){if("number"!=typeof i)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,n,s,i,o,a);const u=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),d=[];this.exceededMatchLimit=Boolean(c);const p=[];let h=l;for(let t=0;t<u;t++){const t=getValue(h,"i32");h+=SIZE_OF_INT;const r=getValue(h,"i32");h+=SIZE_OF_INT;const n=getValue(h,"i32");if(h+=SIZE_OF_INT,p.length=r,h=unmarshalCaptures(this,e.tree,h,p),this.textPredicates[t].every((e=>e(p)))){const e=p[n],r=this.setProperties[t];r&&(e.setProperties=r);const s=this.assertedProperties[t];s&&(e.assertedProperties=s);const i=this.refutedProperties[t];i&&(e.refutedProperties=i),d.push(e)}}return C._free(l),d}predicatesForPattern(e){return this.predicates[e]}disableCapture(e){const t=lengthBytesUTF8(e),r=C._malloc(t+1);stringToUTF8(e,r,t+1),C._ts_query_disable_capture(this[0],r,t),C._free(r)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(e,t,r){const n=r-t;let s=e.textCallback(t,null,r);for(t+=s.length;t<r;){const n=e.textCallback(t,null,r);if(!(n&&n.length>0))break;t+=n.length,s+=n}return t>r&&(s=s.slice(0,n)),s}function unmarshalCaptures(e,t,r,n){for(let s=0,i=n.length;s<i;s++){const i=getValue(r,"i32"),o=unmarshalNode(t,r+=SIZE_OF_INT);r+=SIZE_OF_NODE,n[s]={name:e.captureNames[i],node:o}}return r}function assertInternal(e){if(e!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(e){return e&&"number"==typeof e.row&&"number"==typeof e.column}function marshalNode(e){let t=TRANSFER_BUFFER;setValue(t,e.id,"i32"),t+=SIZE_OF_INT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,e[0],"i32")}function unmarshalNode(e,t=TRANSFER_BUFFER){const r=getValue(t,"i32");if(0===r)return null;const n=getValue(t+=SIZE_OF_INT,"i32"),s=getValue(t+=SIZE_OF_INT,"i32"),i=getValue(t+=SIZE_OF_INT,"i32"),o=getValue(t+=SIZE_OF_INT,"i32"),a=new Node(INTERNAL,e);return a.id=r,a.startIndex=n,a.startPosition={row:s,column:i},a[0]=o,a}function marshalTreeCursor(e,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,e[0],"i32"),setValue(t+1*SIZE_OF_INT,e[1],"i32"),setValue(t+2*SIZE_OF_INT,e[2],"i32"),setValue(t+3*SIZE_OF_INT,e[3],"i32")}function unmarshalTreeCursor(e){e[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),e[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),e[3]=getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(e,t){setValue(e,t.row,"i32"),setValue(e+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(e){return{row:getValue(e,"i32")>>>0,column:getValue(e+SIZE_OF_INT,"i32")>>>0}}function marshalRange(e,t){marshalPoint(e,t.startPosition),marshalPoint(e+=SIZE_OF_POINT,t.endPosition),setValue(e+=SIZE_OF_POINT,t.startIndex,"i32"),setValue(e+=SIZE_OF_INT,t.endIndex,"i32"),e+=SIZE_OF_INT}function unmarshalRange(e){const t={};return t.startPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.startIndex=getValue(e,"i32")>>>0,e+=SIZE_OF_INT,t.endIndex=getValue(e,"i32")>>>0,t}function marshalEdit(e){let t=TRANSFER_BUFFER;marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.newEndPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.newEndIndex,"i32"),t+=SIZE_OF_INT}for(const e of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,e,{value:ParserImpl.prototype[e],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}})))}}return Parser}();module.exports=TreeSitter}(treeSitter)),treeSitter.exports}var treeSitterExports=requireTreeSitter();const Parser=getDefaultExportFromCjs(treeSitterExports);let parser=null,parserInitLock=null;const activeTrees=new Set,MAX_ACTIVE_TREES=10,createAnalyze=e=>async t=>{if(null===parser&&null===parserInitLock?(parserInitLock=Parser.init().then((()=>Parser.Language.load(e))).then((e=>{const t=new Parser;return t.setLanguage(e),t})).finally((()=>{parserInitLock=null})),parser=await parserInitLock):null===parser&&null!==parserInitLock&&(parser=await parserInitLock),null===parser)throw new ApiDOMError("Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.");if(activeTrees.size>=MAX_ACTIVE_TREES){const e=[...activeTrees];activeTrees.clear();for(const t of e)t.delete()}const r=parser.parse(t);activeTrees.add(r);const n=r.delete;return r.delete=function(){activeTrees.delete(this),n.call(this)},parser.reset(),r},analyze$1=createAnalyze(treeSitterYaml);class TreeCursorSyntaxNode{type;startPositionRow;startPositionColumn;startIndex;endPositionRow;endPositionColumn;endIndex;text;isNamed;isMissing;fieldName;hasError=!1;children=[];previousSibling;constructor(e){this.type=e.nodeType,this.startPositionRow=e.startPosition.row,this.startPositionColumn=e.startPosition.column,this.startIndex=e.startIndex,this.endPositionRow=e.endPosition.row,this.endPositionColumn=e.endPosition.column,this.endIndex=e.endIndex,this.text=e.nodeText,this.isNamed=e.nodeIsNamed,this.isMissing=e.nodeIsMissing}get keyNode(){if("flow_pair"===this.type||"block_mapping_pair"===this.type)return this.children.find((e=>"key"===e.fieldName))}get valueNode(){if("flow_pair"===this.type||"block_mapping_pair"===this.type)return this.children.find((e=>"value"===e.fieldName))}get tag(){let{previousSibling:e}=this;for(;void 0!==e&&"tag"!==e.type;)({previousSibling:e}=e);return e}get anchor(){let{previousSibling:e}=this;for(;void 0!==e&&"anchor"!==e.type;)({previousSibling:e}=e);return e}get firstNamedChild(){return this.children.find((e=>e.isNamed))}setFieldName(e){return this.fieldName=e.currentFieldName,this}setHasError(e){return this.hasError=e.currentNode.hasError,this}setPreviousSibling(e){this.previousSibling=e}pushChildren(...e){this.children.push(...e)}}const keyMap$2={stream:["children"],document:["children"],mapping:["children"],keyValuePair:["children"],sequence:["children"],error:["children"]},isNode$1=e=>Array.isArray(e)||isNode$3(e);class CstVisitor{static isScalar=this.isKind("scalar");static isMapping=this.isKind("mapping");static isSequence=this.isKind("sequence");static isKind(e){return t=>null!=t&&"object"==typeof t&&"type"in t&&"string"==typeof t.type&&t.type.endsWith(e)}static kindNodeToYamlAnchor(e){const{anchor:t}=e;if(void 0!==t)return new YamlAnchor(assignSourceMap({name:t.text},t))}static hasKeyValuePairEmptyKey(e){return("block_mapping_pair"===e.type||"flow_pair"===e.type)&&void 0===e.keyNode}static hasKeyValuePairEmptyValue(e){return("block_mapping_pair"===e.type||"flow_pair"===e.type)&&void 0===e.valueNode}static kindNodeToYamlTag(e){const{tag:t}=e,r=(null==t?void 0:t.text)||("plain_scalar"===e.type?"?":"!"),n=e.type.endsWith("mapping")?YamlNodeKind.Mapping:e.type.endsWith("sequence")?YamlNodeKind.Sequence:YamlNodeKind.Scalar;return new YamlTag(assignSourceMap({explicitName:r,kind:n},t))}schema;referenceManager;stream={enter:e=>new YamlStream(assignSourceMap({children:e.children,isMissing:e.isMissing},e)),leave:e=>new ParseResult({children:[e]})};yaml_directive={enter:e=>{var t;const r=null==e||null===(t=e.firstNamedChild)||void 0===t?void 0:t.text;return new YamlDirective(assignSourceMap({name:"%YAML",parameters:{version:r}},e))}};tag_directive={enter:e=>{const t=e.children[0],r=e.children[1],n=new YamlDirective(assignSourceMap({name:"%TAG",parameters:{handle:null==t?void 0:t.text,prefix:null==r?void 0:r.text}},e));return this.schema.registerTagDirective(n),n}};reserved_directive={enter:e=>{const t=e.children[0],r=e.children[1],n=e.children[2];return new YamlDirective(assignSourceMap({name:null==t?void 0:t.text,parameters:{handle:null==r?void 0:r.text,prefix:null==n?void 0:n.text}},e))}};document={enter:e=>new YamlDocument(assignSourceMap({children:e.children,isMissing:e.isMissing},e)),leave:e=>{e.children=e.children.flat()}};block_node={enter:e=>e.children};flow_node={enter:e=>{const[t]=e.children.slice(-1);if(CstVisitor.isScalar(t)||CstVisitor.isMapping(t)||CstVisitor.isSequence(t))return e.children;const r=new YamlScalar({content:"",anchor:CstVisitor.kindNodeToYamlAnchor(t),tag:CstVisitor.kindNodeToYamlTag(t),startPositionRow:t.endPositionRow,startPositionColumn:t.endPositionColumn,startIndex:t.endIndex,endPositionRow:t.endPositionRow,endPositionColumn:t.endPositionColumn,endIndex:t.endIndex,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(r),[...e.children,r]}};tag={enter:()=>null};anchor={enter:()=>null};block_mapping={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlMapping(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:YamlStyle.NextLine,isMissing:e.isMissing},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_mapping_pair={enter:e=>{const t=[...e.children];if(CstVisitor.hasKeyValuePairEmptyKey(e)){const r=this.createKeyValuePairEmptyKey(e);t.unshift(r)}if(CstVisitor.hasKeyValuePairEmptyValue(e)){const r=this.createKeyValuePairEmptyValue(e);t.push(r)}return new YamlKeyValuePair(assignSourceMap({children:t,styleGroup:YamlStyleGroup.Block,isMissing:e.isMissing},e))}};flow_mapping={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlMapping(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Explicit,isMissing:e.isMissing},e));return this.registerAnchor(n),this.schema.resolve(n)}};flow_pair={enter:e=>{const t=[...e.children];if(CstVisitor.hasKeyValuePairEmptyKey(e)){const r=this.createKeyValuePairEmptyKey(e);t.unshift(r)}if(CstVisitor.hasKeyValuePairEmptyValue(e)){const r=this.createKeyValuePairEmptyValue(e);t.push(r)}return new YamlKeyValuePair(assignSourceMap({children:t,styleGroup:YamlStyleGroup.Flow,isMissing:e.isMissing},e))}};keyValuePair={leave:e=>{e.children=e.children.flat()}};block_sequence={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlSequence(assignSourceMap({children:e.children,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:YamlStyle.NextLine},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_sequence_item={enter:e=>{if(e.children.length>1)return e.children;return[new YamlScalar({content:"",tag:new YamlTag({explicitName:"?",kind:YamlNodeKind.Scalar}),startPositionRow:e.endPositionRow,startPositionColumn:e.endPositionColumn,startIndex:e.endIndex,endPositionRow:e.endPositionRow,endPositionColumn:e.endPositionColumn,endIndex:e.endIndex,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain})]}};flow_sequence={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlSequence(assignSourceMap({children:e.children.flat(),anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Explicit},e));return this.registerAnchor(n),this.schema.resolve(n)}};sequence={leave:e=>{e.children=e.children.flat(1/0)}};plain_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain},e));return this.registerAnchor(n),this.schema.resolve(n)}};single_quote_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.SingleQuoted},e));return this.registerAnchor(n),this.schema.resolve(n)}};double_quote_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.DoubleQuoted},e));return this.registerAnchor(n),this.schema.resolve(n)}};block_scalar={enter:e=>{const t=CstVisitor.kindNodeToYamlTag(e),r=CstVisitor.kindNodeToYamlAnchor(e),n=e.text.startsWith("|")?YamlStyle.Literal:e.text.startsWith(">")?YamlStyle.Folded:YamlStyle.Plain,s=new YamlScalar(assignSourceMap({content:e.text,anchor:r,tag:t,styleGroup:YamlStyleGroup.Block,style:n},e));return this.registerAnchor(s),this.schema.resolve(s)}};comment={enter:e=>new YamlComment({content:e.text})};alias={enter:e=>{const t=new YamlAlias({content:e.text});return this.referenceManager.resolveAlias(t)}};constructor(e){this.schema=e}enter(e){if(e instanceof TreeCursorSyntaxNode&&!e.isNamed){const t=e.type||e.text,{isMissing:r}=e;return new Literal(assignSourceMap({value:t,isMissing:r},e))}}ERROR(e,t,r,n){const s=new Error$1(assignSourceMap({children:e.children,isUnexpected:!e.hasError,isMissing:e.isMissing,value:e.text},e));return 0===n.length?new ParseResult({children:[s]}):s}registerAnchor(e){void 0!==e.anchor&&this.referenceManager.addAnchor(e)}createKeyValuePairEmptyKey(e){const{keyNode:t}=e,r=(null==t?void 0:t.children)||[],n=r.find(CstVisitor.isKind("tag")),s=r.find(CstVisitor.isKind("anchor")),i=new YamlTag(void 0!==n?assignSourceMap({explicitName:n.text,kind:YamlNodeKind.Scalar},n):{explicitName:"?",kind:YamlNodeKind.Scalar}),o=void 0!==s?new YamlAnchor(assignSourceMap({name:s.text},s)):void 0,a=new YamlScalar({content:"",startPositionRow:e.startPositionRow,startPositionColumn:e.startPositionColumn,startIndex:e.startIndex,endPositionRow:e.startPositionRow,endPositionColumn:e.startPositionColumn,endIndex:e.startIndex,tag:i,anchor:o,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(a),a}createKeyValuePairEmptyValue(e){const{valueNode:t}=e,r=(null==t?void 0:t.children)||[],n=r.find(CstVisitor.isKind("tag")),s=r.find(CstVisitor.isKind("anchor")),i=new YamlTag(void 0!==n?assignSourceMap({explicitName:n.text,kind:YamlNodeKind.Scalar},n):{explicitName:"?",kind:YamlNodeKind.Scalar}),o=void 0!==s?new YamlAnchor(assignSourceMap({name:s.text},s)):void 0,a=new YamlScalar({content:"",startPositionRow:e.endPositionRow,startPositionColumn:e.endPositionColumn,startIndex:e.endIndex,endPositionRow:e.endPositionRow,endPositionColumn:e.endPositionColumn,endIndex:e.endIndex,tag:i,anchor:o,styleGroup:YamlStyleGroup.Flow,style:YamlStyle.Plain});return this.registerAnchor(a),a}}const keyMap$1={stream:["children"],document:["children"],mapping:["children"],keyValuePair:["children"],sequence:["children"],error:["children"],...keyMapDefault$1},getNodeType$1=e=>isElement(e)?getNodeType$2(e):getNodeType$3(e),isNode=e=>isElement(e)||isNode$3(e)||Array.isArray(e);class YamlAstVisitor{sourceMap=!1;annotations;namespace;processedDocumentCount=0;stream={leave:e=>{const t=new ParseResult$1;t._content=e.children.flat(1);const r=t.findElements(isPrimitiveElement);if(r.length>0){r[0].classes.push("result")}return this.annotations.forEach((e=>{t.push(e)})),this.annotations=[],t}};constructor(){this.annotations=[],this.namespace=createNamespace()}comment(e){if(0===this.processedDocumentCount){const t=new Comment(e.content);return this.maybeAddSourceMap(e,t),t}return null}document(e){const t=1===this.processedDocumentCount,r=this.processedDocumentCount>=1;if(t){const t=new Annotation("Only first document within YAML stream will be used. Rest will be discarded.");t.classes.push("warning"),this.maybeAddSourceMap(e,t),this.annotations.push(t)}return r?null:(this.processedDocumentCount+=1,e.children)}mapping(e){const t=new minimExports.ObjectElement;return t._content=e.children,this.maybeAddSourceMap(e,t),t}keyValuePair(e){const t=new minimExports.MemberElement;return t.content.key=e.key,t.content.value=e.value,this.maybeAddSourceMap(e,t),e.children.filter((e=>"error"===e.type)).forEach((t=>{this.error(t,e,[],[e])})),t}sequence(e){const t=new minimExports.ArrayElement;return t._content=e.children,this.maybeAddSourceMap(e,t),t}scalar(e){const t=this.namespace.toElement(e.content);return""===e.content&&e.style===YamlStyle.Plain&&(t.classes.push("yaml-e-node"),t.classes.push("yaml-e-scalar")),this.maybeAddSourceMap(e,t),t}literal(e){if(e.isMissing){const t=`(Missing ${e.value})`,r=new Annotation(t);r.classes.push("warning"),this.maybeAddSourceMap(e,r),this.annotations.push(r)}return null}error(e,t,r,n){const s=e.isUnexpected?"(Unexpected YAML syntax error)":"(Error YAML syntax error)",i=new Annotation(s);if(i.classes.push("error"),this.maybeAddSourceMap(e,i),0===n.length){const e=new ParseResult$1;return e.push(i),e}return this.annotations.push(i),null}maybeAddSourceMap(e,t){this.sourceMap&&assignSourceMap(t,e)}}class TreeCursorIterator{cursor;constructor(e){this.cursor=e}stream(){return new TreeCursorSyntaxNode(this.cursor)}yaml_directive(){return new TreeCursorSyntaxNode(this.cursor)}tag_directive(){return new TreeCursorSyntaxNode(this.cursor)}reserved_directive(){return new TreeCursorSyntaxNode(this.cursor)}document(){return new TreeCursorSyntaxNode(this.cursor)}block_node(){return new TreeCursorSyntaxNode(this.cursor).setFieldName(this.cursor)}flow_node(){return new TreeCursorSyntaxNode(this.cursor).setFieldName(this.cursor)}block_mapping(){return new TreeCursorSyntaxNode(this.cursor)}block_mapping_pair(){return new TreeCursorSyntaxNode(this.cursor)}flow_mapping(){return new TreeCursorSyntaxNode(this.cursor)}flow_pair(){return new TreeCursorSyntaxNode(this.cursor)}block_sequence(){return new TreeCursorSyntaxNode(this.cursor)}block_sequence_item(){return new TreeCursorSyntaxNode(this.cursor)}flow_sequence(){return new TreeCursorSyntaxNode(this.cursor)}plain_scalar(){return new TreeCursorSyntaxNode(this.cursor)}single_quote_scalar(){return new TreeCursorSyntaxNode(this.cursor)}double_quote_scalar(){return new TreeCursorSyntaxNode(this.cursor)}block_scalar(){return new TreeCursorSyntaxNode(this.cursor)}ERROR(){return new TreeCursorSyntaxNode(this.cursor).setHasError(this.cursor)}*[Symbol.iterator](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new TreeCursorSyntaxNode(this.cursor),this.cursor.gotoFirstChild()){const[t]=new TreeCursorIterator(this.cursor);for(e.pushChildren(t);this.cursor.gotoNextSibling();){const t=Array.from(new TreeCursorIterator(this.cursor));e.pushChildren(...t)}e.children.reduce(((e,t)=>(t.setPreviousSibling(e),t)),void 0),this.cursor.gotoParent()}yield e}}const analyze=(e,{sourceMap:t=!1}={})=>{const r=e.walk(),n=new TreeCursorIterator(r),[s]=Array.from(n),i=new CstVisitor,o=new YamlAstVisitor,a=new JsonSchema,u=new ReferenceManager,l=visit$2(s,i,{keyMap:keyMap$2,nodePredicate:isNode$1,state:{schema:a,sourceMap:t,referenceManager:u}});return visit$2(l.rootNode,o,{keyMap:keyMap$1,nodeTypeGetter:getNodeType$1,nodePredicate:isNode,state:{sourceMap:t}})},detect$1=async e=>{let t=null;try{return t=await analyze$1(e),!t.rootNode.isError}catch{return!1}finally{null!==t&&t.delete()}},parse$1=async(e,{sourceMap:t=!1}={})=>{let r=null;try{return r=await analyze$1(e),analyze(r,{sourceMap:t})}finally{null!==r&&r.delete()}};class JSONSchema extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 JSONReference extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class Media extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class LinkDescription extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 jsonSchemaDraft4={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",JSONSchema),t.register("jSONReference",JSONReference),t.register("media",Media),t.register("linkDescription",LinkDescription),t}},getNodeType=e=>{if(isElement(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},keyMap={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...keyMapDefault$1};class Visitor{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=deepmerge(t.meta,e.meta)),hasElementSourceMap(e)&&assignSourceMap(t,e),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=deepmerge(t.attributes,e.attributes))}}class FallbackVisitor extends Visitor{enter(e){return this.element=cloneDeep(e),BREAK}}const copyProps=(e,t,r=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of r)delete n[e];Object.defineProperties(e,n)},protoChain=(e,t=[e])=>{const r=Object.getPrototypeOf(e);return null===r?t:protoChain(r,[...t,r])},nearestCommonProto=(...e)=>{if(0===e.length)return;let t;const r=e.map((e=>protoChain(e)));for(;r.every((e=>e.length>0));){const e=r.map((e=>e.pop())),n=e[0];if(!e.every((e=>e===n)))break;t=n}return t},hardMixProtos=(e,t,r=[])=>{var n;const s=null!==(n=nearestCommonProto(...e))&&void 0!==n?n:Object.prototype,i=Object.create(s),o=protoChain(s);for(let t of e){let e=protoChain(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(copyProps(i,n,["constructor",...r]),o.push(n))}}return i.constructor=t,i},unique=e=>e.filter(((t,r)=>e.indexOf(t)==r)),mixins=new WeakMap,getMixinsForClass=e=>mixins.get(e),registerMixins=(e,t)=>mixins.set(e,t),mergeObjectsOfDecorators=(e,t)=>{var r,n;const s=unique([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=unique([...null!==(r=null==e?void 0:e[o])&&void 0!==r?r:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},mergePropertyAndMethodDecorators=(e,t)=>{var r,n,s,i;return{property:mergeObjectsOfDecorators(null!==(r=null==e?void 0:e.property)&&void 0!==r?r:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:mergeObjectsOfDecorators(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},mergeDecorators=(e,t)=>{var r,n,s,i,o,a;return{class:unique([...null!==(r=null==e?void 0:e.class)&&void 0!==r?r:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:mergePropertyAndMethodDecorators(null!==(s=null==e?void 0:e.static)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:mergePropertyAndMethodDecorators(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(a=null==t?void 0:t.instance)&&void 0!==a?a:{})}},decorators=new Map,findAllConstituentClasses=(...e)=>{var t;const r=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const s=[...protoChain(e.prototype).map((e=>e.constructor)),...null!==(t=getMixinsForClass(e))&&void 0!==t?t:[]].filter((e=>!r.has(e)));for(let e of s)n.add(e);r.add(e),n.delete(e)}return[...r]},deepDecoratorSearch=(...e)=>{const t=findAllConstituentClasses(...e).map((e=>decorators.get(e))).filter((e=>!!e));return 0==t.length?{}:1==t.length?t[0]:t.reduce(((e,t)=>mergeDecorators(e,t)))};function Mixin(...e){var t,r,n;const s=e.map((e=>e.prototype));function i(...t){for(const r of e)copyProps(this,new r(...t))}i.prototype=hardMixProtos(s,i),Object.setPrototypeOf(i,hardMixProtos(e,null,["prototype"]));let o=i;{const s=deepDecoratorSearch(...e);for(let e of null!==(t=null==s?void 0:s.class)&&void 0!==t?t:[]){const t=e(o);t&&(o=t)}applyPropAndMethodDecorators(null!==(r=null==s?void 0:s.static)&&void 0!==r?r:{},o),applyPropAndMethodDecorators(null!==(n=null==s?void 0:s.instance)&&void 0!==n?n:{},o.prototype)}return registerMixins(o,e),o}const applyPropAndMethodDecorators=(e,t)=>{const r=e.property,n=e.method;if(r)for(let e in r)for(let n of r[e])n(t,e);if(n)for(let e in n)for(let r of n[e])r(t,e,Object.getOwnPropertyDescriptor(t,e))};class SpecificationVisitor extends Visitor{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return pick(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=path$1(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return pathSatisfies(isFunction,["visitors",...e],this.specObj)?path$1(["visitors",...e],this.specObj):path$1(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r);return n instanceof FallbackVisitor&&(null==n?void 0:n.constructor)===FallbackVisitor?cloneDeep(t):(visit$1(t,n,r),n.element)}}class FixedFieldsVisitor extends SpecificationVisitor{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,n,s)=>{if(isStringElement(n)&&r.includes(serializer(n))&&!this.ignoredFields.includes(serializer(n))){const r=this.toRefractedElement([...t,"fixedFields",serializer(n)],e),i=new minimExports.MemberElement(cloneDeep(n),r);this.copyMetaAndAttributes(s,i),i.classes.push("fixed-field"),this.element.content.push(i)}else this.ignoredFields.includes(serializer(n))||this.element.content.push(cloneDeep(s))})),this.copyMetaAndAttributes(e,this.element),BREAK}}class ParentSchemaAwareVisitor{parent;constructor({parent:e}){this.parent=e}}const isJSONSchemaElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof JSONSchema||e(n)&&t("JSONSchemaDraft4",n)&&r("object",n))),isJSONReferenceElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof JSONReference||e(n)&&t("JSONReference",n)&&r("object",n))),isMediaElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Media||e(n)&&t("media",n)&&r("object",n))),isLinkDescriptionElement=createPredicate((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof LinkDescription||e(n)&&t("linkDescription",n)&&r("object",n))),jsonSchemaDraft4Predicates=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:isJSONReferenceElement,isJSONSchemaElement:isJSONSchemaElement,isLinkDescriptionElement:isLinkDescriptionElement,isMediaElement:isMediaElement},Symbol.toStringTag,{value:"Module"}));class JSONSchemaVisitor extends(Mixin(FixedFieldsVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new JSONSchema,this.specPath=always(["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,FixedFieldsVisitor.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(isUndefined(this.parent)&&!isStringElement(e.get("$schema")))this.element.setMetaProperty("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(isJSONSchemaElement(this.parent)&&!isStringElement(e.get("$schema"))){const e=defaultTo(serializer(this.parent.meta.get("inheritedDialectIdentifier")),serializer(this.parent.$schema));this.element.setMetaProperty("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const r=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty("ancestorsSchemaIdentifiers",[])):new minimExports.ArrayElement,n=serializer(e.get(t));isNonEmptyString(n)&&r.push(n),this.element.setMetaProperty("ancestorsSchemaIdentifiers",r)}}const isJSONReferenceLikeElement=e=>isObjectElement(e)&&e.hasKey("$ref");class ItemsVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){ObjectElement(e){const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),BREAK}ArrayElement(e){return this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-items"),e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class RequiredVisitor extends FallbackVisitor{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}}class PatternedFieldsVisitor extends SpecificationVisitor{specPath;ignoredFields;fieldPatternPredicate=F;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(!this.ignoredFields.includes(serializer(t))&&this.fieldPatternPredicate(serializer(t))){const n=this.specPath(e),s=this.toRefractedElement(n,e),i=new minimExports.MemberElement(cloneDeep(t),s);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(serializer(t))||this.element.content.push(cloneDeep(r))})),this.copyMetaAndAttributes(e,this.element),BREAK}}class MapVisitor extends PatternedFieldsVisitor{constructor(e){super(e),this.fieldPatternPredicate=isNonEmptyString}}class PropertiesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-properties"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class PatternPropertiesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class DependenciesVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class EnumVisitor extends FallbackVisitor{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}}class TypeVisitor extends FallbackVisitor{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}}class AllOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class AnyOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class OneOfVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach((e=>{const t=isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class DefinitionsVisitor extends(Mixin(MapVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ObjectElement,this.element.classes.push("json-schema-definitions"),this.specPath=e=>isJSONReferenceLikeElement(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}class LinksVisitor extends(Mixin(SpecificationVisitor,ParentSchemaAwareVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new minimExports.ArrayElement,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach((e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)})),this.copyMetaAndAttributes(e,this.element),BREAK}}class JSONReferenceVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new JSONReference,this.specPath=always(["document","objects","JSONReference"])}ObjectElement(e){const t=FixedFieldsVisitor.prototype.ObjectElement.call(this,e);return isStringElement(this.element.$ref)&&this.element.classes.push("reference-element"),t}}class $RefVisitor extends FallbackVisitor{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}}class AlternatingVisitor extends SpecificationVisitor{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>ifElse(e,always(t),stubUndefined))),r=dispatch(t)(e);return this.element=this.toRefractedElement(r,e),BREAK}}class SchemaOrReferenceVisitor extends AlternatingVisitor{constructor(e){super(e),this.alternator=[{predicate:isJSONReferenceLikeElement,specPath:["document","objects","JSONReference"]},{predicate:T,specPath:["document","objects","JSONSchema"]}]}}class MediaVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new Media,this.specPath=always(["document","objects","Media"])}}class LinkDescriptionVisitor extends(Mixin(FixedFieldsVisitor,FallbackVisitor)){constructor(e){super(e),this.element=new LinkDescription,this.specPath=always(["document","objects","LinkDescription"])}}const specification={visitors:{value:FallbackVisitor,JSONSchemaOrJSONReferenceVisitor:SchemaOrReferenceVisitor,document:{objects:{JSONSchema:{$visitor:JSONSchemaVisitor,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:SchemaOrReferenceVisitor,items:ItemsVisitor,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:RequiredVisitor,properties:PropertiesVisitor,additionalProperties:SchemaOrReferenceVisitor,patternProperties:PatternPropertiesVisitor,dependencies:DependenciesVisitor,enum:EnumVisitor,type:TypeVisitor,allOf:AllOfVisitor,anyOf:AnyOfVisitor,oneOf:OneOfVisitor,not:SchemaOrReferenceVisitor,definitions:DefinitionsVisitor,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:LinksVisitor,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:JSONReferenceVisitor,fixedFields:{$ref:$RefVisitor}},Media:{$visitor:MediaVisitor,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:LinkDescriptionVisitor,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:SchemaOrReferenceVisitor,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:SchemaOrReferenceVisitor}}}}}},createToolbox=()=>{const e=createNamespace(jsonSchemaDraft4);return{predicates:{...jsonSchemaDraft4Predicates,isStringElement:isStringElement},namespace:e}},refract=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=specification}={})=>{const s=minimExports.refract(e),i=dereference(n),o=new(path$1(t,i))({specObj:i});return visit$1(s,o),dispatchPluginsSync(o.element,r,{toolboxCreator:createToolbox,visitorOptions:{keyMap:keyMap,nodeTypeGetter:getNodeType}})},createRefractor=e=>(t,r={})=>refract(t,{specPath:e,...r});JSONSchema.refract=createRefractor(["visitors","document","objects","JSONSchema","$visitor"]),JSONReference.refract=createRefractor(["visitors","document","objects","JSONReference","$visitor"]),Media.refract=createRefractor(["visitors","document","objects","Media","$visitor"]),LinkDescription.refract=createRefractor(["visitors","document","objects","LinkDescription","$visitor"]);class OpenAPIMediaTypes extends MediaTypes{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter((e=>e.includes(t)))}findBy(e="2.0",t="generic"){const r="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find((e=>e.includes(r)))||this.unknownMediaType}latest(e="generic"){return last(this.filterByFormat(e))}}const mediaTypes=new OpenAPIMediaTypes("application/vnd.oai.openapi;version=2.0","application/vnd.oai.openapi+json;version=2.0","application/vnd.oai.openapi+yaml;version=2.0");class Swagger extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="swagger",this.classes.push("api")}get swagger(){return this.get("swagger")}set swagger(e){this.set("swagger",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get host(){return this.get("host")}set host(e){this.set("host",e)}get basePath(){return this.get("basePath")}set basePath(e){this.set("basePath",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get consumes(){return this.get("consumes")}set consumes(e){this.set("consumes",e)}get produces(){return this.get("produces")}set produces(e){this.set("produces",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get securityDefinitions(){return this.get("securityDefinitions")}set securityDefinitions(e){this.set("securityDefinitions",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)}}class SwaggerVersion extends minimExports.StringElement{constructor(e,t,r){super(e,t,r),this.element="swaggerVersion",this.classes.push("spec-version"),this.classes.push("version")}}class Info extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Contact extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class License extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Paths extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="paths"}}class PathItem extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",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 parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}}class Operation extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new minimExports.BooleanElement(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}}class ExternalDocumentation extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Parameter extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="parameter",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Parameter class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Parameter class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Parameter class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Parameter class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Parameter class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Parameter class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Parameter class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Parameter class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Parameter class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Parameter class is not not supported.")}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){throw new UnsupportedOperationError("properties getter in Parameter class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Parameter class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Parameter class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Parameter class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Parameter class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Parameter class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Parameter class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Parameter class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Parameter class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Parameter class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Parameter class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Parameter class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Parameter class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Parameter class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Parameter class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Parameter class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Parameter class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Parameter class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Parameter class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Parameter class is not not supported.")}get description(){return this.get("description")}set description(e){this.set("description,",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){throw new UnsupportedOperationError("base getter in Parameter class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Parameter class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Parameter class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Parameter class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Parameter class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Parameter class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Parameter class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Parameter class is not not supported.")}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 schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class Items extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="items",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Items class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Items class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Items class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Items class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Items class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Items class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Items class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Items class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Items class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Items class is not not supported.")}get required(){throw new UnsupportedOperationError("required getter in Items class is not not supported.")}set required(e){throw new UnsupportedOperationError("required setter in Items class is not not supported.")}get properties(){throw new UnsupportedOperationError("properties getter in Items class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Items class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Items class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Items class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Items class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Items class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Items class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Items class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Items class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Items class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Items class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Items class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Items class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Items class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Items class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Items class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Items class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Items class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Items class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Items class is not not supported.")}get description(){throw new UnsupportedOperationError("description getter in Items class is not not supported.")}set description(e){throw new UnsupportedOperationError("description setter in Items class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Items class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Items class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Items class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Items class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Items class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Items class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Items class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Items class is not not supported.")}}class Example extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="example"}}class Responses extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}}class Response extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}}class Headers extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="headers"}}class Header extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="header",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Header class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Header class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Header class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Header class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Header class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Header class is not not supported.")}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxProperties(){throw new UnsupportedOperationError("maxProperties getter in Header class is not not supported.")}set maxProperties(e){throw new UnsupportedOperationError("maxProperties setter in Header class is not not supported.")}get minProperties(){throw new UnsupportedOperationError("minProperties getter in Header class is not not supported.")}set minProperties(e){throw new UnsupportedOperationError("minProperties setter in Header class is not not supported.")}get required(){throw new UnsupportedOperationError("required getter in Header class is not not supported.")}set required(e){throw new UnsupportedOperationError("required setter in Header class is not not supported.")}get properties(){throw new UnsupportedOperationError("properties getter in Header class is not not supported.")}set properties(e){throw new UnsupportedOperationError("properties setter in Header class is not not supported.")}get additionalProperties(){throw new UnsupportedOperationError("additionalProperties getter in Header class is not not supported.")}set additionalProperties(e){throw new UnsupportedOperationError("additionalProperties setter in Header class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Header class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Header class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Header class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Header class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new UnsupportedOperationError("allOf getter in Header class is not not supported.")}set allOf(e){throw new UnsupportedOperationError("allOf setter in Header class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Header class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Header class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Header class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Header class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Header class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Header class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Header class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Header class is not not supported.")}get title(){throw new UnsupportedOperationError("title getter in Header class is not not supported.")}set title(e){throw new UnsupportedOperationError("title setter in Header class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Header class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Header class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Header class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Header class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Header class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Header class is not not supported.")}get readOnly(){throw new UnsupportedOperationError("readOnly getter in Header class is not not supported.")}set readOnly(e){throw new UnsupportedOperationError("readOnly setter in Header class is not not supported.")}}class Tag extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Schema extends JSONSchema{constructor(e,t,r){super(e,t,r),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new UnsupportedOperationError("idProp getter in Schema class is not not supported.")}set idProp(e){throw new UnsupportedOperationError("idProp setter in Schema class is not not supported.")}get $schema(){throw new UnsupportedOperationError("$schema getter in Schema class is not not supported.")}set $schema(e){throw new UnsupportedOperationError("$schema setter in Schema class is not not supported.")}get additionalItems(){throw new UnsupportedOperationError("additionalItems getter in Schema class is not not supported.")}set additionalItems(e){throw new UnsupportedOperationError("additionalItems setter in Schema class is not not supported.")}get patternProperties(){throw new UnsupportedOperationError("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new UnsupportedOperationError("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new UnsupportedOperationError("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new UnsupportedOperationError("dependencies setter in Schema class is not not supported.")}get anyOf(){throw new UnsupportedOperationError("anyOf getter in Schema class is not not supported.")}set anyOf(e){throw new UnsupportedOperationError("anyOf setter in Schema class is not not supported.")}get oneOf(){throw new UnsupportedOperationError("oneOf getter in Schema class is not not supported.")}set oneOf(e){throw new UnsupportedOperationError("oneOf setter in Schema class is not not supported.")}get not(){throw new UnsupportedOperationError("not getter in Schema class is not not supported.")}set not(e){throw new UnsupportedOperationError("not setter in Schema class is not not supported.")}get definitions(){throw new UnsupportedOperationError("definitions getter in Schema class is not not supported.")}set definitions(e){throw new UnsupportedOperationError("definitions setter in Schema class is not not supported.")}get base(){throw new UnsupportedOperationError("base getter in Schema class is not not supported.")}set base(e){throw new UnsupportedOperationError("base setter in Schema class is not not supported.")}get links(){throw new UnsupportedOperationError("links getter in Schema class is not not supported.")}set links(e){throw new UnsupportedOperationError("links setter in Schema class is not not supported.")}get media(){throw new UnsupportedOperationError("media getter in Schema class is not not supported.")}set media(e){throw new UnsupportedOperationError("media setter in Schema class is not not supported.")}}class Xml extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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)}}class Reference extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class Definitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="definitions"}}class ParametersDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="parametersDefinitions"}}class ResponsesDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="responsesDefinitions"}}class SecurityDefinitions extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="securityDefinitions"}}class SecurityScheme extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),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 flow(){return this.get("flow")}set flow(e){this.set("flow",e)}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 scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}}class Scopes extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="scopes"}}class SecurityRequirement extends minimExports.ObjectElement{constructor(e,t,r){super(e,t,r),this.element="securityRequirement"}}const openApi2={namespace:e=>{const{base:t}=e;return t.register("swagger",Swagger),t.register("swaggerVersion",SwaggerVersion),t.register("info",Info),t.register("contact",Contact),t.register("license",License),t.register("paths",Paths),t.register("pathItem",PathItem),t.register("operation",Operation),t.register("externalDocumentation",ExternalDocumentation),t.register("parameter",Parameter),t.register("items",Items),t.register("responses",Responses),t.register("response",Response),t.register("headers",Headers),t.register("example",Example),t.register("header",Header),t.register("tag",Tag),t.register("reference",Reference),t.register("schema",Schema),t.register("xml",Xml),t.register("definitions",Definitions),t.register("parametersDefinitions",ParametersDefinitions),t.register("responsesDefinitions",ResponsesDefinitions),t.register("securityDefinitions",SecurityDefinitions),t.register("securityScheme",SecurityScheme),t.register("scopes",Scopes),t.register("securityRequirement",SecurityRequirement),t}},yamlMediaTypes=new OpenAPIMediaTypes(...mediaTypes.filterByFormat("generic"),...mediaTypes.filterByFormat("yaml"));var __async=(e,t,r)=>new Promise(((n,s)=>{var i=e=>{try{a(r.next(e))}catch(e){s(e)}},o=e=>{try{a(r.throw(e))}catch(e){s(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);a((r=r.apply(e,t)).next())}));const detectionRegExp=new RegExp('(?<YAML>^(["\']?)swagger\\2\\s*:\\s*(["\'])(?<version_yaml>2\\.0)\\3(?:\\s+|$))|(?<JSON>"swagger"\\s*:\\s*"(?<version_json>2\\.0)")',"m"),detect=e=>__async(null,null,(function*(){return detectionRegExp.test(e)&&(yield detect$1(e))})),parse=(e,...t)=>__async(null,[e,...t],(function*(e,t={}){const r=propOr({},"refractorOpts",t),n=omit(["refractorOpts"],t),s=yield parse$1(e,n),{result:i}=s;if(isNotUndefined(i)){const e=Swagger.refract(i,r);e.classes.push("result"),s.replaceResult(e)}return s})),namespace=createNamespace(openApi2);exports.detect=detect,exports.detectionRegExp=detectionRegExp,exports.mediaTypes=yamlMediaTypes,exports.namespace=namespace,exports.parse=parse,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}));
|