vscode-behavior3 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ import{a as e,i as t,r as n,t as r}from"./rolldown-runtime-BYbx6iT9.js";import{N as i,c as a}from"./ui-vendor-CpXf__no.js";import{h as o,m as s}from"./graph-vendor-ww5KcpJ-.js";var c=e(i());function l(){if(console&&console.warn){var e=[...arguments];_(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}var u={};function d(){var e=[...arguments];_(e[0])&&u[e[0]]||(_(e[0])&&(u[e[0]]=new Date),l(...e))}var f=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},p=(e,t,n)=>{e.loadNamespaces(t,f(e,n))},m=(e,t,n,r)=>{_(n)&&(n=[n]),n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,f(e,r))},h=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()===`cimode`)return!0;let o=(e,n)=>{let r=t.services.backendConnector.state[`${e}|${n}`];return r===-1||r===2};return n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(a,e)))},g=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(d(`i18n.languages were undefined or empty`,t.languages),!0):t.options.ignoreJSONStructure===void 0?h(e,t,n):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}})},_=e=>typeof e==`string`,v=e=>typeof e==`object`&&!!e,y=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,b={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},ee=e=>b[e],x={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(y,ee)},S=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};x={...x,...e}},te=()=>x,C,w=e=>{C=e},T=()=>C,E={type:`3rdParty`,init(e){S(e.options.react),w(e)}},ne=(0,c.createContext)(),re=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces=()=>Object.keys(this.usedNamespaces)},ie=(e,t)=>{let n=(0,c.useRef)();return(0,c.useEffect)(()=>{n.current=t?n.current:e},[e,t]),n.current},ae=(e,t,n,r)=>e.getFixedT(t,n,r),oe=(e,t,n,r)=>(0,c.useCallback)(ae(e,t,n,r),[e,t,n,r]),se=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{i18n:n}=t,{i18n:r,defaultNS:i}=(0,c.useContext)(ne)||{},a=n||r||T();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new re),!a){d(`You will need to pass in an i18next instance by using initReactI18next`);let e=(e,t)=>_(t)?t:v(t)&&_(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react&&a.options.react.wait!==void 0&&d(`It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);let o={...te(),...a.options.react,...t},{useSuspense:s,keyPrefix:l}=o,u=e||i||a.options&&a.options.defaultNS;u=_(u)?[u]:u||[`translation`],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);let f=(a.isInitialized||a.initializedStoreOnce)&&u.every(e=>g(e,a,o)),h=oe(a,t.lng||null,o.nsMode===`fallback`?u:u[0],l),y=()=>h,b=()=>ae(a,t.lng||null,o.nsMode===`fallback`?u:u[0],l),[ee,x]=(0,c.useState)(y),S=u.join();t.lng&&(S=`${t.lng}${S}`);let C=ie(S),w=(0,c.useRef)(!0);(0,c.useEffect)(()=>{let{bindI18n:e,bindI18nStore:n}=o;w.current=!0,!f&&!s&&(t.lng?m(a,t.lng,u,()=>{w.current&&x(b)}):p(a,u,()=>{w.current&&x(b)})),f&&C&&C!==S&&w.current&&x(b);let r=()=>{w.current&&x(b)};return e&&a&&a.on(e,r),n&&a&&a.store.on(n,r),()=>{w.current=!1,e&&a&&e.split(` `).forEach(e=>a.off(e,r)),n&&a&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,S]),(0,c.useEffect)(()=>{w.current&&f&&x(y)},[a,l,f]);let E=[ee,a,f];if(E.t=ee,E.i18n=a,E.ready=f,f||!f&&!s)return E;throw new Promise(e=>{t.lng?m(a,t.lng,u,()=>e()):p(a,u,()=>e())})},ce=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},le=(e=>e?ce(e):ce),ue=e=>e;function de(e,t=ue){let n=c.useSyncExternalStore(e.subscribe,c.useCallback(()=>t(e.getState()),[e,t]),c.useCallback(()=>t(e.getInitialState()),[e,t]));return c.useDebugValue(n),n}var D=e=>typeof e==`string`,O=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},fe=e=>e==null?``:``+e,pe=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},me=/###/g,he=e=>e&&e.indexOf(`###`)>-1?e.replace(me,`.`):e,ge=e=>!e||D(e),k=(e,t,n)=>{let r=D(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ge(e))return{};let t=he(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ge(e)?{}:{obj:e,k:he(r[i])}},A=(e,t,n)=>{let{obj:r,k:i}=k(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=k(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=k(e,o,Object),s&&s.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},_e=(e,t,n,r)=>{let{obj:i,k:a}=k(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ve=(e,t)=>{let{obj:n,k:r}=k(e,t);if(n)return n[r]},ye=(e,t,n)=>{let r=ve(e,n);return r===void 0?ve(t,n):r},be=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?D(e[r])||e[r]instanceof String||D(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):be(e[r],t[r],n):e[r]=t[r]);return e},j=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),M={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},xe=e=>D(e)?e.replace(/[&<>"'\/]/g,e=>M[e]):e,Se=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},N=[` `,`,`,`?`,`!`,`;`],Ce=new Se(20),we=(e,t,n)=>{t||=``,n||=``;let r=N.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Ce.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},P=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`.`;if(!e)return;if(e[t])return e[t];let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Te=e=>e&&e.replace(`_`,`-`),F={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}},I=new class e{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||`i18next:`,this.logger=e||F,this.options=t,this.debug=t.debug}log(){var e=[...arguments];return this.forward(e,`log`,``,!0)}warn(){var e=[...arguments];return this.forward(e,`warn`,``,!0)}error(){var e=[...arguments];return this.forward(e,`error`,``)}deprecate(){var e=[...arguments];return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(D(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Ee=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){var t=[...arguments].slice(1);this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[n,r]=e;for(let e=0;e<r;e++)n(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(n=>{let[r,i]=n;for(let n=0;n<i;n++)r.apply(r,[e,...t])})}},De=class extends Ee{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:[`translation`],defaultNS:`translation`};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):D(n)&&i?o.push(...n.split(i)):o.push(n)));let s=ve(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!D(n)?s:P(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),A(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let r in n)(D(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=ve(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?be(s,n,i):s={...s,...n},A(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.options.compatibilityAPI===`v1`?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Oe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))}),t}},ke={},Ae=class e extends Ee{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),pe([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=I.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;let n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!we(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:D(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:D(i)?[i]:i}}translate(t,n,r){if(typeof n!=`object`&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n==`object`&&(n={...n}),n||={},t==null)return``;Array.isArray(t)||(t=[String(t)]);let i=n.returnDetails===void 0?this.options.returnDetails:n.returnDetails,a=n.keySeparator===void 0?this.options.keySeparator:n.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],n),c=s[s.length-1],l=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()===`cimode`){if(u){let e=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${e}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}let d=this.resolve(t,n),f=d&&d.res,p=d&&d.usedKey||o,m=d&&d.exactUsedKey||o,h=Object.prototype.toString.apply(f),g=[`[object Number]`,`[object Function]`,`[object RegExp]`],_=n.joinArrays===void 0?this.options.joinArrays:n.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!D(f)&&typeof f!=`boolean`&&typeof f!=`number`;if(v&&f&&y&&g.indexOf(h)<0&&!(D(_)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(n),d):e}if(a){let e=Array.isArray(f),t=e?[]:{},r=e?m:p;for(let e in f)if(Object.prototype.hasOwnProperty.call(f,e)){let i=`${r}${a}${e}`;t[e]=this.translate(i,{...n,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=f[e])}f=t}}else if(v&&D(_)&&Array.isArray(f))f=f.join(_),f&&=this.extendTranslation(f,t,n,r);else{let i=!1,s=!1,u=n.count!==void 0&&!D(n.count),p=e.hasDefaultValue(n),m=u?this.pluralResolver.getSuffix(l,n.count,n):``,h=n.ordinal&&u?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):``,g=u&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),_=g&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${m}`]||n[`defaultValue${h}`]||n.defaultValue;!this.isValidLookup(f)&&p&&(i=!0,f=_),this.isValidLookup(f)||(s=!0,f=o);let v=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:f,y=p&&_!==f&&this.options.updateMissing;if(s||i||y){if(this.logger.log(y?`updateKey`:`missingKey`,l,c,o,y?_:f),a){let e=this.resolve(o,{...n,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let i=p&&r!==f?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,i,y,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,c,t,i,y,n),this.emit(`missingKey`,e,c,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);g&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],o+t,n[`defaultValue${t}`]||_)})}):r(e,o,_))}f=this.extendTranslation(f,t,n,d,r),s&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${o}`),(s||i)&&this.options.parseMissingKeyHandler&&(f=this.options.compatibilityAPI===`v1`?this.options.parseMissingKeyHandler(f):this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,i?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,t,n,r,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let o=D(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),s;if(o){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&!D(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||r.usedLng,n),o){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;s<r&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!==`v1`&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){var e=[...arguments];return i&&i[0]===e[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):a.translate(...e,t)},n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,s=D(o)?[o]:o;return e!=null&&s&&s.length&&n.applyPostProcessor!==!1&&(e=Oe.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,r,i,a,o;return D(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!D(t.count),d=u&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),f=t.context!==void 0&&(D(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!ke[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(ke[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(o.push(c+e),t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator}${t.context}`;o.push(r),u&&(o.push(r+e),t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!D(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},je=e=>e.charAt(0).toUpperCase()+e.slice(1),L=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=I.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Te(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Te(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(D(e)&&e.indexOf(`-`)>-1){if(typeof Intl<`u`&&Intl.getCanonicalLocales!==void 0)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch{}let t=[`hans`,`hant`,`latn`,`cyrl`,`cans`,`mong`,`arab`],n=e.split(`-`);return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=je(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!==`sgn`&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=je(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=je(n[2].toLowerCase()))),n.join(`-`)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(e.indexOf(`-`)<0&&n.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&n.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===n||e.indexOf(n)===0&&n.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),D(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return D(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):D(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Me=[{lngs:[`ach`,`ak`,`am`,`arn`,`br`,`fil`,`gun`,`ln`,`mfe`,`mg`,`mi`,`oc`,`pt`,`pt-BR`,`tg`,`tl`,`ti`,`tr`,`uz`,`wa`],nr:[1,2],fc:1},{lngs:`af.an.ast.az.bg.bn.ca.da.de.dev.el.en.eo.es.et.eu.fi.fo.fur.fy.gl.gu.ha.hi.hu.hy.ia.it.kk.kn.ku.lb.mai.ml.mn.mr.nah.nap.nb.ne.nl.nn.no.nso.pa.pap.pms.ps.pt-PT.rm.sco.se.si.so.son.sq.sv.sw.ta.te.tk.ur.yo`.split(`.`),nr:[1,2],fc:2},{lngs:[`ay`,`bo`,`cgg`,`fa`,`ht`,`id`,`ja`,`jbo`,`ka`,`km`,`ko`,`ky`,`lo`,`ms`,`sah`,`su`,`th`,`tt`,`ug`,`vi`,`wo`,`zh`],nr:[1],fc:3},{lngs:[`be`,`bs`,`cnr`,`dz`,`hr`,`ru`,`sr`,`uk`],nr:[1,2,5],fc:4},{lngs:[`ar`],nr:[0,1,2,3,11,100],fc:5},{lngs:[`cs`,`sk`],nr:[1,2,5],fc:6},{lngs:[`csb`,`pl`],nr:[1,2,5],fc:7},{lngs:[`cy`],nr:[1,2,3,8],fc:8},{lngs:[`fr`],nr:[1,2],fc:9},{lngs:[`ga`],nr:[1,2,3,7,11],fc:10},{lngs:[`gd`],nr:[1,2,3,20],fc:11},{lngs:[`is`],nr:[1,2],fc:12},{lngs:[`jv`],nr:[0,1],fc:13},{lngs:[`kw`],nr:[1,2,3,4],fc:14},{lngs:[`lt`],nr:[1,2,10],fc:15},{lngs:[`lv`],nr:[1,2,0],fc:16},{lngs:[`mk`],nr:[1,2],fc:17},{lngs:[`mnk`],nr:[0,1,2],fc:18},{lngs:[`mt`],nr:[1,2,11,20],fc:19},{lngs:[`or`],nr:[2,1],fc:2},{lngs:[`ro`],nr:[1,2,20],fc:20},{lngs:[`sl`],nr:[5,1,2,3],fc:21},{lngs:[`he`,`iw`],nr:[1,2,20,21],fc:22}],Ne={1:e=>Number(e>1),2:e=>Number(e!=1),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(e==1?0:e>=2&&e<=4?1:2),7:e=>Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(e==1?0:e==2?1:e!=8&&e!=11?2:3),9:e=>Number(e>=2),10:e=>Number(e==1?0:e==2?1:e<7?2:e<11?3:4),11:e=>Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(e!==0),14:e=>Number(e==1?0:e==2?1:e==3?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:e===0?2:1),17:e=>Number(e==1||e%10==1&&e%100!=11?0:1),18:e=>Number(e==0?0:e==1?1:2),19:e=>Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(e==1?0:e==0||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)},Pe=[`v1`,`v2`,`v3`],Fe=[`v4`],Ie={zero:0,one:1,two:2,few:3,many:4,other:5},Le=()=>{let e={};return Me.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Ne[t.fc]}})}),e},Re=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=I.create(`pluralResolver`),(!this.options.compatibilityJSON||Fe.includes(this.options.compatibilityJSON))&&(typeof Intl>`u`||!Intl.PluralRules)&&(this.options.compatibilityJSON=`v3`,this.logger.error(`Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.`)),this.rules=Le(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){let n=Te(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(!e.match(/-|_/))return;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>Ie[e]-Ie[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),``)}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r=`plural`:r===1&&(r=``));let i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON===`v1`?r===1?``:typeof r==`number`?`_plural_${r.toString()}`:i():this.options.compatibilityJSON===`v2`||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Pe.includes(this.options.compatibilityJSON)}},ze=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`.`,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=ye(e,t,n);return!a&&i&&D(n)&&(a=P(e,n,r),a===void 0&&(a=P(t,n,r))),a},Be=e=>e.replace(/\$/g,`$$$$`),Ve=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=I.create(`interpolator`),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?xe:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?j(i):a||`{{`,this.suffix=o?j(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?j(d):f||j(`$t(`),this.nestingSuffix=p?j(p):m||j(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=ze(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ze(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Be(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Be(this.escape(e)):Be(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=D(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !D(a)&&!this.useRawValueToEscape&&(a=fe(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!D(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){let e=r[1].split(this.formatSeparator).map(e=>e.trim());r[1]=e.shift(),s=e,c=!0}if(i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!D(i))return i;D(i)||(i=fe(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),c&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},He=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Ue=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Te(r),i),t[o]=s),s(n)}},We=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=I.create(`formatter`),this.options=e,this.formats={number:Ue((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:Ue((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:Ue((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:Ue((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:Ue((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||`,`}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ue(t)}format(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=He(t);if(this.formats[i]){let t=e;try{let o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Ge=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ke=class extends Ee{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=I.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{_e(n.loaded,[i],a),Ge(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();D(e)&&(e=this.languageUtils.toResolveHierarchy(e)),D(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend&&this.backend.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},qe=()=>({debug:!1,initImmediate:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),D(e[1])&&(t.defaultValue=e[1]),D(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0}}),Je=e=>(D(e.ns)&&(e.ns=[e.ns]),D(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),D(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Ye=()=>{},Xe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Ze=class e extends Ee{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Je(e),this.services={},this.logger=I,this.modules={external:[]},Xe(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t==`function`&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(D(t.ns)?t.defaultNS=t.ns:t.ns.indexOf(`translation`)<0&&(t.defaultNS=t.ns[0]));let r=qe();this.options={...r,...this.options,...Je(t)},this.options.compatibilityAPI!==`v1`&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);let i=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?I.init(i(this.modules.logger),this.options):I.init(null,this.options);let t;this.modules.formatter?t=this.modules.formatter:typeof Intl<`u`&&(t=We);let n=new L(this.options);this.store=new De(this.options.resources,this.options);let a=this.services;a.logger=I,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new Re(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(a.formatter=i(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new Ve(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new Ke(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on(`*`,function(t){var n=[...arguments].slice(1);e.emit(t,...n)}),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new Ae(this.services,this.options),this.translator.on(`*`,function(t){var n=[...arguments].slice(1);e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||=Ye,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let a=O(),o=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),a.resolve(t),n(e,t)};if(this.languages&&this.options.compatibilityAPI!==`v1`&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?o():setTimeout(o,0),a}loadResources(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ye,n=D(e)?e:this.language;if(typeof e==`function`&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&n.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return t();let e=[],r=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e)),this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){let r=O();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Ye,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Oe.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let r=O();this.emit(`languageChanging`,e);let i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},o=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=D(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{a(e,n)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,t,n){var r=this;let i=function(e,t){let a;if(typeof t!=`object`){var o=[...arguments].slice(2);a=r.options.overloadTranslationOptionHandler([e,t].concat(o))}else a={...t};a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||i.keyPrefix);let s=r.options.keySeparator||`.`,c;return c=a.keyPrefix&&Array.isArray(e)?e.map(e=>`${a.keyPrefix}${s}${e}`):a.keyPrefix?`${a.keyPrefix}${s}${e}`:e,r.t(c,a)};return D(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=O();return this.options.ns?(D(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=O();D(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return`rtl`;let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services&&this.services.languageUtils||new L(qe());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(){return new e(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ye,r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new De(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Ae(a.services,i),a.translator.on(`*`,function(e){var t=[...arguments].slice(1);a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},R=Ze.createInstance();R.createInstance=Ze.createInstance,R.createInstance,R.dir,R.init,R.loadResources,R.reloadResources,R.use,R.changeLanguage,R.getFixedT,R.t,R.exists,R.setDefaultNamespace,R.hasLoadedNamespace,R.loadNamespaces,R.loadLanguages;var Qe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=i();function n(e){var n=(0,t.useRef)(e);return n.current=e,n}e.default=n})),$e=r(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),et=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.isUndef=e.isString=e.isObject=e.isNumber=e.isFunction=e.isBoolean=void 0;var n=t($e());e.isObject=function(e){return e!==null&&(0,n.default)(e)===`object`},e.isFunction=function(e){return typeof e==`function`},e.isString=function(e){return typeof e==`string`},e.isBoolean=function(e){return typeof e==`boolean`},e.isNumber=function(e){return typeof e==`number`},e.isUndef=function(e){return e===void 0}})),tt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=!!(typeof window<`u`&&window.document&&window.document.createElement)})),nt=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.getTargetElement=i;var n=et(),r=t(tt());function i(e,t){if(r.default)return e?(0,n.isFunction)(e)?e():`current`in e?e.current:e:t}})),rt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=!1})),it=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=t($e()),r=i(),o=t(Qe()),s=et(),c=t(rt());e.default=function(e){c.default&&((0,s.isFunction)(e)||console.error(`useUnmount expected parameter is a function, got ${(0,n.default)(e)}`));var t=(0,o.default)(e);(0,r.useEffect)(function(){return function(){t.current()}},[])}})),at=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;function t(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}e.default=t})),ot=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=i(),r=t(it()),o=t(at()),s=nt();e.default=function(e){return function(t,i,a){var c=(0,n.useRef)(!1),l=(0,n.useRef)([]),u=(0,n.useRef)([]),d=(0,n.useRef)(void 0);e(function(){var e,n=(Array.isArray(a)?a:[a]).map(function(e){return(0,s.getTargetElement)(e)});if(!c.current){c.current=!0,l.current=n,u.current=i,d.current=t();return}(n.length!==l.current.length||!(0,o.default)(l.current,n)||!(0,o.default)(u.current,i))&&((e=d.current)==null||e.call(d),l.current=n,u.current=i,d.current=t())}),(0,r.default)(function(){var e;(e=d.current)==null||e.call(d),c.current=!1})}}})),st=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=i();e.default=(0,t(ot()).default)(n.useEffect)})),ct=r(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),lt=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.depsEqual=void 0;var n=t(ct());e.depsEqual=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,n.default)(e,t)}})),ut=r((e=>{var t=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=i(),r=t(st()),o=lt();e.default=function(e,t,i){var a=(0,n.useRef)(void 0),s=(0,n.useRef)(0);(0,o.depsEqual)(t,a.current)||(s.current+=1),a.current=t,(0,r.default)(e,[s.current],i)}})),dt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``)})),ft=r((e=>{var n=a();Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var r=(s(),t(o)),i=n(Qe()),c=et(),l=nt(),u=n(ut()),d={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:n(dt()).default?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},f={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type===`keyup`?d.meta.includes(e.keyCode):e.metaKey}};function p(e){return(0,c.isString)(e)||(0,c.isNumber)(e)}function m(e){var t=Object.keys(f).reduce(function(t,n){return f[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function h(e,t,n){var i,a;if(!e.key)return!1;if((0,c.isNumber)(t))return e.keyCode===t?t:!1;var o=t.split(`.`),s=0;try{for(var l=(0,r.__values)(o),u=l.next();!u.done;u=l.next()){var p=u.value,h=f[p],g=d[p.toLowerCase()];(h&&h(e)||g&&g===e.keyCode)&&s++}}catch(e){i={error:e}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return n?s===o.length&&m(e)===o.length?t:!1:s===o.length?t:!1}function g(e,t){return(0,c.isFunction)(e)?e:p(e)?function(n){return h(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return h(n,e,t)})}:function(){return!!e}}var _=[`keydown`];function v(e,t,n){var a=n||{},o=a.events,s=o===void 0?_:o,c=a.target,d=a.exactMatch,f=d===void 0?!1:d,m=a.useCapture,h=m===void 0?!1:m,v=(0,i.default)(t),y=(0,i.default)(e);(0,u.default)(function(){var e,t,n,i=(0,l.getTargetElement)(c,window);if(i){var a=function(e){var t=e,n=g(y.current,f)(t),r=p(n)?n:t.key;if(n)return v.current?.call(v,t,r)};try{for(var o=(0,r.__values)(s),u=o.next();!u.done;u=o.next()){var d=u.value;(n=i?.addEventListener)==null||n.call(i,d,a,h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=(0,r.__values)(s),c=o.next();!c.done;c=o.next()){var l=c.value;(n=i?.removeEventListener)==null||n.call(i,l,a,h)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[s],c)}e.default=v})),pt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),(function(e){e.Unidentified=`Unidentified`,e.Alt=`Alt`,e.AltGraph=`AltGraph`,e.CapsLock=`CapsLock`,e.Control=`Control`,e.Fn=`Fn`,e.FnLock=`FnLock`,e.Hyper=`Hyper`,e.Meta=`Meta`,e.NumLock=`NumLock`,e.ScrollLock=`ScrollLock`,e.Shift=`Shift`,e.Super=`Super`,e.Symbol=`Symbol`,e.SymbolLock=`SymbolLock`,e.Enter=`Enter`,e.Tab=`Tab`,e.ArrowDown=`ArrowDown`,e.ArrowLeft=`ArrowLeft`,e.ArrowRight=`ArrowRight`,e.ArrowUp=`ArrowUp`,e.End=`End`,e.Home=`Home`,e.PageDown=`PageDown`,e.PageUp=`PageUp`,e.Backspace=`Backspace`,e.Clear=`Clear`,e.Copy=`Copy`,e.CrSel=`CrSel`,e.Cut=`Cut`,e.Delete=`Delete`,e.EraseEof=`EraseEof`,e.ExSel=`ExSel`,e.Insert=`Insert`,e.Paste=`Paste`,e.Redo=`Redo`,e.Undo=`Undo`,e.Accept=`Accept`,e.Again=`Again`,e.Attn=`Attn`,e.Cancel=`Cancel`,e.ContextMenu=`ContextMenu`,e.Escape=`Escape`,e.Execute=`Execute`,e.Find=`Find`,e.Finish=`Finish`,e.Help=`Help`,e.Pause=`Pause`,e.Play=`Play`,e.Props=`Props`,e.Select=`Select`,e.ZoomIn=`ZoomIn`,e.ZoomOut=`ZoomOut`,e.BrightnessDown=`BrightnessDown`,e.BrightnessUp=`BrightnessUp`,e.Eject=`Eject`,e.LogOff=`LogOff`,e.Power=`Power`,e.PowerOff=`PowerOff`,e.PrintScreen=`PrintScreen`,e.Hibernate=`Hibernate`,e.Standby=`Standby`,e.WakeUp=`WakeUp`,e.AllCandidates=`AllCandidates`,e.Alphanumeric=`Alphanumeric`,e.CodeInput=`CodeInput`,e.Compose=`Compose`,e.Convert=`Convert`,e.Dead=`Dead`,e.FinalMode=`FinalMode`,e.GroupFirst=`GroupFirst`,e.GroupLast=`GroupLast`,e.GroupNext=`GroupNext`,e.GroupPrevious=`GroupPrevious`,e.ModeChange=`ModeChange`,e.NextCandidate=`NextCandidate`,e.NonConvert=`NonConvert`,e.PreviousCandidate=`PreviousCandidate`,e.Process=`Process`,e.SingleCandidate=`SingleCandidate`,e.HangulMode=`HangulMode`,e.HanjaMode=`HanjaMode`,e.JunjaMode=`JunjaMode`,e.Eisu=`Eisu`,e.Hankaku=`Hankaku`,e.Hiragana=`Hiragana`,e.HiraganaKatakana=`HiraganaKatakana`,e.KanaMode=`KanaMode`,e.KanjiMode=`KanjiMode`,e.Katakana=`Katakana`,e.Romaji=`Romaji`,e.Zenkaku=`Zenkaku`,e.ZenkakuHanaku=`ZenkakuHanaku`,e.F1=`F1`,e.F2=`F2`,e.F3=`F3`,e.F4=`F4`,e.F5=`F5`,e.F6=`F6`,e.F7=`F7`,e.F8=`F8`,e.F9=`F9`,e.F10=`F10`,e.F11=`F11`,e.F12=`F12`,e.F13=`F13`,e.F14=`F14`,e.F15=`F15`,e.F16=`F16`,e.F17=`F17`,e.F18=`F18`,e.F19=`F19`,e.F20=`F20`,e.Soft1=`Soft1`,e.Soft2=`Soft2`,e.Soft3=`Soft3`,e.Soft4=`Soft4`,e.AppSwitch=`AppSwitch`,e.Call=`Call`,e.Camera=`Camera`,e.CameraFocus=`CameraFocus`,e.EndCall=`EndCall`,e.GoBack=`GoBack`,e.GoHome=`GoHome`,e.HeadsetHook=`HeadsetHook`,e.LastNumberRedial=`LastNumberRedial`,e.Notification=`Notification`,e.MannerMode=`MannerMode`,e.VoiceDial=`VoiceDial`,e.ChannelDown=`ChannelDown`,e.ChannelUp=`ChannelUp`,e.MediaFastForward=`MediaFastForward`,e.MediaPause=`MediaPause`,e.MediaPlay=`MediaPlay`,e.MediaPlayPause=`MediaPlayPause`,e.MediaRecord=`MediaRecord`,e.MediaRewind=`MediaRewind`,e.MediaStop=`MediaStop`,e.MediaTrackNext=`MediaTrackNext`,e.MediaTrackPrevious=`MediaTrackPrevious`,e.AudioBalanceLeft=`AudioBalanceLeft`,e.AudioBalanceRight=`AudioBalanceRight`,e.AudioBassDown=`AudioBassDown`,e.AudioBassBoostDown=`AudioBassBoostDown`,e.AudioBassBoostToggle=`AudioBassBoostToggle`,e.AudioBassBoostUp=`AudioBassBoostUp`,e.AudioBassUp=`AudioBassUp`,e.AudioFaderFront=`AudioFaderFront`,e.AudioFaderRear=`AudioFaderRear`,e.AudioSurroundModeNext=`AudioSurroundModeNext`,e.AudioTrebleDown=`AudioTrebleDown`,e.AudioTrebleUp=`AudioTrebleUp`,e.AudioVolumeDown=`AudioVolumeDown`,e.AudioVolumeMute=`AudioVolumeMute`,e.AudioVolumeUp=`AudioVolumeUp`,e.MicrophoneToggle=`MicrophoneToggle`,e.MicrophoneVolumeDown=`MicrophoneVolumeDown`,e.MicrophoneVolumeMute=`MicrophoneVolumeMute`,e.MicrophoneVolumeUp=`MicrophoneVolumeUp`,e.TV=`TV`,e.TV3DMode=`TV3DMode`,e.TVAntennaCable=`TVAntennaCable`,e.TVAudioDescription=`TVAudioDescription`,e.TVAudioDescriptionMixDown=`TVAudioDescriptionMixDown`,e.TVAudioDescriptionMixUp=`TVAudioDescriptionMixUp`,e.TVContentsMenu=`TVContentsMenu`,e.TVDataService=`TVDataService`,e.TVInput=`TVInput`,e.TVInputComponent1=`TVInputComponent1`,e.TVInputComponent2=`TVInputComponent2`,e.TVInputComposite1=`TVInputComposite1`,e.TVInputComposite2=`TVInputComposite2`,e.TVInputHDMI1=`TVInputHDMI1`,e.TVInputHDMI2=`TVInputHDMI2`,e.TVInputHDMI3=`TVInputHDMI3`,e.TVInputHDMI4=`TVInputHDMI4`,e.TVInputVGA1=`TVInputVGA1`,e.TVMediaContext=`TVMediaContext`,e.TVNetwork=`TVNetwork`,e.TVNumberEntry=`TVNumberEntry`,e.TVPower=`TVPower`,e.TVRadioService=`TVRadioService`,e.TVSatellite=`TVSatellite`,e.TVSatelliteBS=`TVSatelliteBS`,e.TVSatelliteCS=`TVSatelliteCS`,e.TVSatelliteToggle=`TVSatelliteToggle`,e.TVTerrestrialAnalog=`TVTerrestrialAnalog`,e.TVTerrestrialDigital=`TVTerrestrialDigital`,e.TVTimer=`TVTimer`,e.AVRInput=`AVRInput`,e.AVRPower=`AVRPower`,e.ColorF0Red=`ColorF0Red`,e.ColorF1Green=`ColorF1Green`,e.ColorF2Yellow=`ColorF2Yellow`,e.ColorF3Blue=`ColorF3Blue`,e.ColorF4Grey=`ColorF4Grey`,e.ColorF5Brown=`ColorF5Brown`,e.ClosedCaptionToggle=`ClosedCaptionToggle`,e.Dimmer=`Dimmer`,e.DisplaySwap=`DisplaySwap`,e.DVR=`DVR`,e.Exit=`Exit`,e.FavoriteClear0=`FavoriteClear0`,e.FavoriteClear1=`FavoriteClear1`,e.FavoriteClear2=`FavoriteClear2`,e.FavoriteClear3=`FavoriteClear3`,e.FavoriteRecall0=`FavoriteRecall0`,e.FavoriteRecall1=`FavoriteRecall1`,e.FavoriteRecall2=`FavoriteRecall2`,e.FavoriteRecall3=`FavoriteRecall3`,e.FavoriteStore0=`FavoriteStore0`,e.FavoriteStore1=`FavoriteStore1`,e.FavoriteStore2=`FavoriteStore2`,e.FavoriteStore3=`FavoriteStore3`,e.Guide=`Guide`,e.GuideNextDay=`GuideNextDay`,e.GuidePreviousDay=`GuidePreviousDay`,e.Info=`Info`,e.InstantReplay=`InstantReplay`,e.Link=`Link`,e.ListProgram=`ListProgram`,e.LiveContent=`LiveContent`,e.Lock=`Lock`,e.MediaApps=`MediaApps`,e.MediaAudioTrack=`MediaAudioTrack`,e.MediaLast=`MediaLast`,e.MediaSkipBackward=`MediaSkipBackward`,e.MediaSkipForward=`MediaSkipForward`,e.MediaStepBackward=`MediaStepBackward`,e.MediaStepForward=`MediaStepForward`,e.MediaTopMenu=`MediaTopMenu`,e.NavigateIn=`NavigateIn`,e.NavigateNext=`NavigateNext`,e.NavigateOut=`NavigateOut`,e.NavigatePrevious=`NavigatePrevious`,e.NextFavoriteChannel=`NextFavoriteChannel`,e.NextUserProfile=`NextUserProfile`,e.OnDemand=`OnDemand`,e.Pairing=`Pairing`,e.PinPDown=`PinPDown`,e.PinPMove=`PinPMove`,e.PinPToggle=`PinPToggle`,e.PinPUp=`PinPUp`,e.PlaySpeedDown=`PlaySpeedDown`,e.PlaySpeedReset=`PlaySpeedReset`,e.PlaySpeedUp=`PlaySpeedUp`,e.RandomToggle=`RandomToggle`,e.RcLowBattery=`RcLowBattery`,e.RecordSpeedNext=`RecordSpeedNext`,e.RfBypass=`RfBypass`,e.ScanChannelsToggle=`ScanChannelsToggle`,e.ScreenModeNext=`ScreenModeNext`,e.Settings=`Settings`,e.SplitScreenToggle=`SplitScreenToggle`,e.STBInput=`STBInput`,e.STBPower=`STBPower`,e.Subtitle=`Subtitle`,e.Teletext=`Teletext`,e.VideoModeNext=`VideoModeNext`,e.Wink=`Wink`,e.ZoomToggle=`ZoomToggle`,e.SpeechCorrectionList=`SpeechCorrectionList`,e.SpeechInputToggle=`SpeechInputToggle`,e.Close=`Close`,e.New=`New`,e.Open=`Open`,e.Print=`Print`,e.Save=`Save`,e.SpellCheck=`SpellCheck`,e.MailForward=`MailForward`,e.MailReply=`MailReply`,e.MailSend=`MailSend`,e.LaunchCalculator=`LaunchCalculator`,e.LaunchCalendar=`LaunchCalendar`,e.LaunchContacts=`LaunchContacts`,e.LaunchMail=`LaunchMail`,e.LaunchMediaPlayer=`LaunchMediaPlayer`,e.LaunchMusicPlayer=`LaunchMusicPlayer`,e.LaunchMyComputer=`LaunchMyComputer`,e.LaunchPhone=`LaunchPhone`,e.LaunchScreenSaver=`LaunchScreenSaver`,e.LaunchSpreadsheet=`LaunchSpreadsheet`,e.LaunchWebBrowser=`LaunchWebBrowser`,e.LaunchWebCam=`LaunchWebCam`,e.LaunchWordProcessor=`LaunchWordProcessor`,e.LaunchApplication1=`LaunchApplication1`,e.LaunchApplication2=`LaunchApplication2`,e.LaunchApplication3=`LaunchApplication3`,e.LaunchApplication4=`LaunchApplication4`,e.LaunchApplication5=`LaunchApplication5`,e.LaunchApplication6=`LaunchApplication6`,e.LaunchApplication7=`LaunchApplication7`,e.LaunchApplication8=`LaunchApplication8`,e.LaunchApplication9=`LaunchApplication9`,e.LaunchApplication10=`LaunchApplication10`,e.LaunchApplication11=`LaunchApplication11`,e.LaunchApplication12=`LaunchApplication12`,e.LaunchApplication13=`LaunchApplication13`,e.LaunchApplication14=`LaunchApplication14`,e.LaunchApplication15=`LaunchApplication15`,e.LaunchApplication16=`LaunchApplication16`,e.BrowserBack=`BrowserBack`,e.BrowserFavorites=`BrowserFavorites`,e.BrowserForward=`BrowserForward`,e.BrowserHome=`BrowserHome`,e.BrowserRefresh=`BrowserRefresh`,e.BrowserSearch=`BrowserSearch`,e.BrowserStop=`BrowserStop`,e.Decimal=`Decimal`,e.Key11=`Key11`,e.Key12=`Key12`,e.Multiply=`Multiply`,e.Add=`Add`,e.Divide=`Divide`,e.Subtract=`Subtract`,e.Separator=`Separator`})(e.Key||={})})),mt=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},`a`,{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),`a`,{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},ee=!1,x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:ee?`pure`:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),te=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},C=function(e,t,n){if(te(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},w=`prototype`,T=function(e,r,i){var a=e&T.F,o=e&T.G,s=e&T.S,c=e&T.P,l=e&T.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[w],d=o?n:n[r]||(n[r]={}),f=d[w]||(d[w]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?C(g,t):c&&typeof g==`function`?C(Function.call,g):g,u&&S(u,p,g,e&T.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128;var E=T,ne=Math.ceil,re=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},ae=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},oe=function(e){return function(t,n){var r=String(ae(t)),i=ie(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);E(E.P,`String`,{codePointAt:function(e){return oe(this,e)}}),n.String.codePointAt;var se=Math.max,ce=Math.min,le=function(e,t){return e=ie(e),e<0?se(e+t,0):ce(e,t)},ue=String.fromCharCode,de=String.fromCodePoint;E(E.S+E.F*(!!de&&de.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],le(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?ue(a):ue(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var D={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},O={isSpaceSeparator:function(e){return typeof e==`string`&&D.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||D.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===`‌`||e===`‍`||D.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},fe,pe,me,he,ge,k,A,_e,ve,ye=function(e,t){fe=String(e),pe=`start`,me=[],he=0,ge=1,k=0,A=void 0,_e=void 0,ve=void 0;do A=Ce(),ke[pe]();while(A.type!==`eof`);return typeof t==`function`?be({"":ve},``,t):ve};function be(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=be(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=be(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var j,M,xe,Se,N;function Ce(){for(j=`default`,M=``,xe=!1,Se=1;;){N=we();var e=Te[j]();if(e)return e}}function we(){if(fe[he])return String.fromCodePoint(fe.codePointAt(he))}function P(){var e=we();return e===`
2
+ `?(ge++,k=0):e?k+=e.length:k++,e&&(he+=e.length),e}var Te={default:function(){switch(N){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
3
+ `:case`\r`:case`\u2028`:case`\u2029`:P();return;case`/`:P(),j=`comment`;return;case void 0:return P(),F(`eof`)}if(O.isSpaceSeparator(N)){P();return}return Te[pe]()},comment:function(){switch(N){case`*`:P(),j=`multiLineComment`;return;case`/`:P(),j=`singleLineComment`;return}throw L(P())},multiLineComment:function(){switch(N){case`*`:P(),j=`multiLineCommentAsterisk`;return;case void 0:throw L(P())}P()},multiLineCommentAsterisk:function(){switch(N){case`*`:P();return;case`/`:P(),j=`default`;return;case void 0:throw L(P())}P(),j=`multiLineComment`},singleLineComment:function(){switch(N){case`
4
+ `:case`\r`:case`\u2028`:case`\u2029`:P(),j=`default`;return;case void 0:return P(),F(`eof`)}P()},value:function(){switch(N){case`{`:case`[`:return F(`punctuator`,P());case`n`:return P(),I(`ull`),F(`null`,null);case`t`:return P(),I(`rue`),F(`boolean`,!0);case`f`:return P(),I(`alse`),F(`boolean`,!1);case`-`:case`+`:P()===`-`&&(Se=-1),j=`sign`;return;case`.`:M=P(),j=`decimalPointLeading`;return;case`0`:M=P(),j=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:M=P(),j=`decimalInteger`;return;case`I`:return P(),I(`nfinity`),F(`numeric`,1/0);case`N`:return P(),I(`aN`),F(`numeric`,NaN);case`"`:case`'`:xe=P()===`"`,M=``,j=`string`;return}throw L(P())},identifierNameStartEscape:function(){if(N!==`u`)throw L(P());P();var e=Oe();switch(e){case`$`:case`_`:break;default:if(!O.isIdStartChar(e))throw Ne();break}M+=e,j=`identifierName`},identifierName:function(){switch(N){case`$`:case`_`:case`‌`:case`‍`:M+=P();return;case`\\`:P(),j=`identifierNameEscape`;return}if(O.isIdContinueChar(N)){M+=P();return}return F(`identifier`,M)},identifierNameEscape:function(){if(N!==`u`)throw L(P());P();var e=Oe();switch(e){case`$`:case`_`:case`‌`:case`‍`:break;default:if(!O.isIdContinueChar(e))throw Ne();break}M+=e,j=`identifierName`},sign:function(){switch(N){case`.`:M=P(),j=`decimalPointLeading`;return;case`0`:M=P(),j=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:M=P(),j=`decimalInteger`;return;case`I`:return P(),I(`nfinity`),F(`numeric`,Se*(1/0));case`N`:return P(),I(`aN`),F(`numeric`,NaN)}throw L(P())},zero:function(){switch(N){case`.`:M+=P(),j=`decimalPoint`;return;case`e`:case`E`:M+=P(),j=`decimalExponent`;return;case`x`:case`X`:M+=P(),j=`hexadecimal`;return}return F(`numeric`,Se*0)},decimalInteger:function(){switch(N){case`.`:M+=P(),j=`decimalPoint`;return;case`e`:case`E`:M+=P(),j=`decimalExponent`;return}if(O.isDigit(N)){M+=P();return}return F(`numeric`,Se*Number(M))},decimalPointLeading:function(){if(O.isDigit(N)){M+=P(),j=`decimalFraction`;return}throw L(P())},decimalPoint:function(){switch(N){case`e`:case`E`:M+=P(),j=`decimalExponent`;return}if(O.isDigit(N)){M+=P(),j=`decimalFraction`;return}return F(`numeric`,Se*Number(M))},decimalFraction:function(){switch(N){case`e`:case`E`:M+=P(),j=`decimalExponent`;return}if(O.isDigit(N)){M+=P();return}return F(`numeric`,Se*Number(M))},decimalExponent:function(){switch(N){case`+`:case`-`:M+=P(),j=`decimalExponentSign`;return}if(O.isDigit(N)){M+=P(),j=`decimalExponentInteger`;return}throw L(P())},decimalExponentSign:function(){if(O.isDigit(N)){M+=P(),j=`decimalExponentInteger`;return}throw L(P())},decimalExponentInteger:function(){if(O.isDigit(N)){M+=P();return}return F(`numeric`,Se*Number(M))},hexadecimal:function(){if(O.isHexDigit(N)){M+=P(),j=`hexadecimalInteger`;return}throw L(P())},hexadecimalInteger:function(){if(O.isHexDigit(N)){M+=P();return}return F(`numeric`,Se*Number(M))},string:function(){switch(N){case`\\`:P(),M+=Ee();return;case`"`:if(xe)return P(),F(`string`,M);M+=P();return;case`'`:if(!xe)return P(),F(`string`,M);M+=P();return;case`
5
+ `:case`\r`:throw L(P());case`\u2028`:case`\u2029`:Pe(N);break;case void 0:throw L(P())}M+=P()},start:function(){switch(N){case`{`:case`[`:return F(`punctuator`,P())}j=`value`},beforePropertyName:function(){switch(N){case`$`:case`_`:M=P(),j=`identifierName`;return;case`\\`:P(),j=`identifierNameStartEscape`;return;case`}`:return F(`punctuator`,P());case`"`:case`'`:xe=P()===`"`,j=`string`;return}if(O.isIdStartChar(N)){M+=P(),j=`identifierName`;return}throw L(P())},afterPropertyName:function(){if(N===`:`)return F(`punctuator`,P());throw L(P())},beforePropertyValue:function(){j=`value`},afterPropertyValue:function(){switch(N){case`,`:case`}`:return F(`punctuator`,P())}throw L(P())},beforeArrayValue:function(){if(N===`]`)return F(`punctuator`,P());j=`value`},afterArrayValue:function(){switch(N){case`,`:case`]`:return F(`punctuator`,P())}throw L(P())},end:function(){throw L(P())}};function F(e,t){return{type:e,value:t,line:ge,column:k}}function I(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(we()!==r)throw L(P());P()}}function Ee(){switch(we()){case`b`:return P(),`\b`;case`f`:return P(),`\f`;case`n`:return P(),`
6
+ `;case`r`:return P(),`\r`;case`t`:return P(),` `;case`v`:return P(),`\v`;case`0`:if(P(),O.isDigit(we()))throw L(P());return`\0`;case`x`:return P(),De();case`u`:return P(),Oe();case`
7
+ `:case`\u2028`:case`\u2029`:return P(),``;case`\r`:return P(),we()===`
8
+ `&&P(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw L(P());case void 0:throw L(P())}return P()}function De(){var e=``,t=we();if(!O.isHexDigit(t)||(e+=P(),t=we(),!O.isHexDigit(t)))throw L(P());return e+=P(),String.fromCodePoint(parseInt(e,16))}function Oe(){for(var e=``,t=4;t-- >0;){var n=we();if(!O.isHexDigit(n))throw L(P());e+=P()}return String.fromCodePoint(parseInt(e,16))}var ke={start:function(){if(A.type===`eof`)throw Me();Ae()},beforePropertyName:function(){switch(A.type){case`identifier`:case`string`:_e=A.value,pe=`afterPropertyName`;return;case`punctuator`:je();return;case`eof`:throw Me()}},afterPropertyName:function(){if(A.type===`eof`)throw Me();pe=`beforePropertyValue`},beforePropertyValue:function(){if(A.type===`eof`)throw Me();Ae()},beforeArrayValue:function(){if(A.type===`eof`)throw Me();if(A.type===`punctuator`&&A.value===`]`){je();return}Ae()},afterPropertyValue:function(){if(A.type===`eof`)throw Me();switch(A.value){case`,`:pe=`beforePropertyName`;return;case`}`:je()}},afterArrayValue:function(){if(A.type===`eof`)throw Me();switch(A.value){case`,`:pe=`beforeArrayValue`;return;case`]`:je()}},end:function(){}};function Ae(){var e;switch(A.type){case`punctuator`:switch(A.value){case`{`:e={};break;case`[`:e=[];break}break;case`null`:case`boolean`:case`numeric`:case`string`:e=A.value;break}if(ve===void 0)ve=e;else{var t=me[me.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,_e,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)me.push(e),pe=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{var n=me[me.length-1];pe=n==null?`end`:Array.isArray(n)?`afterArrayValue`:`afterPropertyValue`}}function je(){me.pop();var e=me[me.length-1];pe=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function L(e){return Ie(e===void 0?`JSON5: invalid end of input at `+ge+`:`+k:`JSON5: invalid character '`+Fe(e)+`' at `+ge+`:`+k)}function Me(){return Ie(`JSON5: invalid end of input at `+ge+`:`+k)}function Ne(){return k-=5,Ie(`JSON5: invalid identifier character at `+ge+`:`+k)}function Pe(e){console.warn(`JSON5: '`+Fe(e)+`' in strings is not valid ECMAScript; consider escaping`)}function Fe(e){var t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){var n=e.charCodeAt(0).toString(16);return`\\x`+(`00`+n).substring(n.length)}return e}function Ie(e){var t=SyntaxError(e);return t.lineNumber=ge,t.columnNumber=k,t}return{parse:ye,stringify:function(e,t,n){var r=[],i=``,a,o,s=``,c;if(typeof t==`object`&&t&&!Array.isArray(t)&&(n=t.space,c=t.quote,t=t.replacer),typeof t==`function`)o=t;else if(Array.isArray(t)){a=[];for(var l=0,u=t;l<u.length;l+=1){var d=u[l],f=void 0;typeof d==`string`?f=d:(typeof d==`number`||d instanceof String||d instanceof Number)&&(f=String(d)),f!==void 0&&a.indexOf(f)<0&&a.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n==`number`?n>0&&(n=Math.min(10,Math.floor(n)),s=` `.substr(0,n)):typeof n==`string`&&(s=n.substr(0,10)),p(``,{"":e});function p(e,t){var n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),o&&(n=o.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return m(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?_(n):h(n)}function m(e){for(var t={"'":.1,'"':.2},n={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},r=``,i=0;i<e.length;i++){var a=e[i];switch(a){case`'`:case`"`:t[a]++,r+=a;continue;case`\0`:if(O.isDigit(e[i+1])){r+=`\\x00`;continue}}if(n[a]){r+=n[a];continue}if(a<` `){var o=a.charCodeAt(0).toString(16);r+=`\\x`+(`00`+o).substring(o.length);continue}r+=a}var s=c||Object.keys(t).reduce(function(e,n){return t[e]<t[n]?e:n});return r=r.replace(new RegExp(s,`g`),n[s]),s+r+s}function h(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=a||Object.keys(e),o=[],c=0,l=n;c<l.length;c+=1){var u=l[c],d=p(u,e);if(d!==void 0){var f=g(u)+`:`;s!==``&&(f+=` `),f+=d,o.push(f)}}var m;if(o.length===0)m=`{}`;else{var h;if(s===``)h=o.join(`,`),m=`{`+h+`}`;else{var _=`,
9
+ `+i;h=o.join(_),m=`{
10
+ `+i+h+`,
11
+ `+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!O.isIdStartChar(t))return m(e,!0);for(var n=t.length;n<e.length;n++)if(!O.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return m(e,!0);return e}function _(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=[],a=0;a<e.length;a++){var o=p(String(a),e);n.push(o===void 0?`null`:o)}var c;if(n.length===0)c=`[]`;else if(s===``)c=`[`+n.join(`,`)+`]`;else{var l=`,
12
+ `+i,u=n.join(l);c=`[
13
+ `+i+u+`,
14
+ `+t+`]`}return r.pop(),i=t,c}}}}))})),ht=e=>crypto.getRandomValues(new Uint8Array(e)),gt=(e,t,n)=>{let r=(2<<Math.log2(e.length-1))-1,i=-~(1.6*r*t/e.length);return(a=t)=>{let o=``;for(;;){let t=n(i),s=i|0;for(;s--;)if(o+=e[t[s]&r]||``,o.length>=a)return o}}},_t=(e,t=21)=>gt(e,t|0,ht),z=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},vt=`__PRIVATE_VAR`,yt=`__TEMP_VAR`,bt=class{constructor(e){this._values={},this._tree=e}get values(){return this._values}eval(e){return this._tree.context.compileCode(e)(this._values)}get(e){if(e)return this._values[e]}set(e,t){e&&(t==null?delete this._values[e]:this._values[e]=t)}clear(){this._values={}}static makePrivateVar(e,t){return typeof e==`string`?`${vt}_${e}`:`${vt}_NODE#${e.id}_${t}`}static isPrivateVar(e){return e.startsWith(vt)}static makeTempVar(e,t){return`${yt}_NODE#${e.id}_${t}`}static isTempVar(e){return e.startsWith(yt)}},B;(function(e){e[e.NUMBER=0]=`NUMBER`,e[e.STRING=1]=`STRING`,e[e.BOOLEAN=2]=`BOOLEAN`,e[e.NEGATION=3]=`NEGATION`,e[e.POSITIVE=4]=`POSITIVE`,e[e.DOT=5]=`DOT`,e[e.NOT=6]=`NOT`,e[e.BNOT=7]=`BNOT`,e[e.GT=8]=`GT`,e[e.GE=9]=`GE`,e[e.EQ=10]=`EQ`,e[e.NEQ=11]=`NEQ`,e[e.LT=12]=`LT`,e[e.LE=13]=`LE`,e[e.ADD=14]=`ADD`,e[e.SUB=15]=`SUB`,e[e.MUL=16]=`MUL`,e[e.DIV=17]=`DIV`,e[e.MOD=18]=`MOD`,e[e.QUESTION=19]=`QUESTION`,e[e.COLON=20]=`COLON`,e[e.AND=21]=`AND`,e[e.OR=22]=`OR`,e[e.BAND=23]=`BAND`,e[e.BOR=24]=`BOR`,e[e.BXOR=25]=`BXOR`,e[e.SHL=26]=`SHL`,e[e.SHR=27]=`SHR`,e[e.SHRU=28]=`SHRU`,e[e.SQUARE_BRACKET=29]=`SQUARE_BRACKET`,e[e.PARENTHESIS=30]=`PARENTHESIS`})(B||={});var xt=/^(<<|>>>|>>|>=|<=|==|!=|>|<|&&|&|\|\||[-+*%!?/:.|^()[\]])/,St=/^(\d+\.\d+|\d+)/,Ct=/^(\w+)/,wt=class{constructor(e){this._args=null,this._expr=e,this._postfix=this._convertToPostfix(this._parse(this._expr))}_parse(e){let t=[];for(;e.length;){let n=e[0],r=null;if(n===`'`||n===`"`){let r=n,i=1;for(;i<e.length&&e[i]!==r;)i++;if(i>=e.length)throw Error(`invalid expression: '${e}' in '${this._expr}'`);let a=e.slice(0,i+1);t.push(a),e=e.slice(i+1).replace(/^\s+/,``);continue}if(/^\d/.test(n)?r=e.match(St):/^\w/.test(n)?r=e.match(Ct):/^[-+*%/()<>=?&|:^.![\]]/.test(n)&&(r=e.match(xt)),!r)throw Error(`invalid expression: '${e}' in '${this._expr}'`);t.push(r[1]),e=e.slice(r[1].length).replace(/^\s+/,``)}return t}evaluate(e){let t=[];this._args=e;for(let e of this._postfix){let n=e.type;if(n===B.NUMBER||n===B.BOOLEAN||n===B.STRING)t.push(e.value);else if(n===B.QUESTION){let e=t.pop(),n=t.pop(),r=t.pop();t.push(this._toValue(e,!1)?n:r)}else if(n===B.POSITIVE)t.push(this._toValue(t.pop(),!1));else if(n===B.NEGATION)t.push(-this._toValue(t.pop(),!1));else if(n===B.NOT)t.push(!this._toValue(t.pop(),!1));else if(n===B.BNOT)t.push(~this._toValue(t.pop(),!1));else{let r=t.pop(),i=t.pop();switch(n){case B.DOT:{let e=this._toObject(i);t.push(this._toValue(e[r]));break}case B.SQUARE_BRACKET:{let e=this._toObject(i),n=this._toValue(r);t.push(this._toObject(e[n]));break}case B.GT:t.push(this._toValue(i)>this._toValue(r));break;case B.GE:t.push(this._toValue(i)>=this._toValue(r));break;case B.EQ:t.push(this._toValue(i,!1)===this._toValue(r,!1));break;case B.NEQ:t.push(this._toValue(i,!1)!==this._toValue(r,!1));break;case B.LT:t.push(this._toValue(i)<this._toValue(r));break;case B.LE:t.push(this._toValue(i)<=this._toValue(r));break;case B.ADD:t.push(this._toValue(i)+this._toValue(r));break;case B.SUB:t.push(this._toValue(i)-this._toValue(r));break;case B.MUL:t.push(this._toValue(i)*this._toValue(r));break;case B.DIV:t.push(this._toValue(i)/this._toValue(r));break;case B.MOD:t.push(this._toValue(i)%this._toValue(r));break;case B.COLON:t.push(this._toValue(i)),t.push(this._toValue(r));break;case B.SHL:t.push(this._toValue(i)<<this._toValue(r));break;case B.SHR:t.push(this._toValue(i)>>this._toValue(r));break;case B.SHRU:t.push(this._toValue(i)>>>this._toValue(r));break;case B.BAND:t.push(this._toValue(i)&this._toValue(r));break;case B.BOR:t.push(this._toValue(i)|this._toValue(r));break;case B.BXOR:t.push(this._toValue(i)^this._toValue(r));break;case B.AND:t.push(this._toValue(i)&&this._toValue(r));break;case B.OR:t.push(this._toValue(i)||this._toValue(r));break;default:throw Error(`unsupport operator: ${e.value}`)}}}return this._args=null,t.pop()}_toObject(e){if(typeof e==`string`){let t=this._args?.[e];if(typeof t==`object`)return t;throw Error(`value indexed by '${e}' is not a object`)}else return e}_toValue(e,t=!0){let n=typeof e;if(n===`number`||n===`boolean`||e===null)return e;if(typeof e==`string`){let n=e.match(/^(['"])(.*)\1$/);if(n){let r=n[2];if(t)throw Error(`value indexed by '${e}' is not a number'`);return r}let r=this._args?.[e];if(r===void 0)throw Error(`value indexed by '${e}' is not found`);if(t&&typeof r!=`number`)throw Error(`value indexed by '${e}' is not a number'`);return r}else throw Error(`token '${e}' type not support!`)}_makeToken(e,t){if((e===`-`||e===`+`)&&(t===void 0||/^[-+*%<>=!&~^?:(|[]+$/.test(t)))return{type:e===`-`?B.NEGATION:B.POSITIVE,precedence:15,value:`${e}N`};if(e.startsWith(`'`)&&e.endsWith(`'`)||e.startsWith(`"`)&&e.endsWith(`"`))return{type:B.STRING,precedence:0,value:e};if(St.test(e))return{type:B.NUMBER,precedence:0,value:parseFloat(e)};if(e===`true`||e===`false`)return{type:B.BOOLEAN,precedence:0,value:e===`true`};if(Ct.test(e))return{type:B.STRING,precedence:0,value:e};if(e===`.`)return{type:B.DOT,precedence:18,value:e};if(e===`(`||e===`)`)return{type:B.PARENTHESIS,precedence:0,value:e};if(e===`[`||e===`]`)return{type:B.SQUARE_BRACKET,precedence:18,value:e};if(e===`!`)return{type:B.NOT,precedence:15,value:e};if(e===`~`)return{type:B.BNOT,precedence:15,value:e};if(e===`%`)return{type:B.MOD,precedence:13,value:e};if(e===`*`)return{type:B.MUL,precedence:13,value:e};if(e===`/`)return{type:B.DIV,precedence:13,value:e};if(e===`+`)return{type:B.ADD,precedence:12,value:e};if(e===`-`)return{type:B.SUB,precedence:12,value:e};if(e===`<<`)return{type:B.SHL,precedence:11,value:e};if(e===`>>`)return{type:B.SHR,precedence:11,value:e};if(e===`>>>`)return{type:B.SHRU,precedence:11,value:e};if(e===`>`)return{type:B.GT,precedence:10,value:e};if(e===`>=`)return{type:B.GE,precedence:10,value:e};if(e===`<`)return{type:B.LT,precedence:10,value:e};if(e===`<=`)return{type:B.LE,precedence:10,value:e};if(e===`==`)return{type:B.EQ,precedence:9,value:e};if(e===`!=`)return{type:B.NEQ,precedence:9,value:e};if(e===`&`)return{type:B.BAND,precedence:8,value:e};if(e===`&`)return{type:B.BXOR,precedence:7,value:e};if(e===`|`)return{type:B.BOR,precedence:6,value:e};if(e===`&&`)return{type:B.AND,precedence:5,value:e};if(e===`||`)return{type:B.OR,precedence:4,value:e};if(e===`:`)return{type:B.COLON,precedence:2,value:e};if(e===`?`)return{type:B.QUESTION,precedence:1.9,value:e};throw Error(`unsupport token: ${e}`)}_convertToPostfix(e){let t=[],n=[];for(let r=0;r<e.length;r++){let i=this._makeToken(e[r],e[r-1]);if(i.type===B.NUMBER||i.type===B.BOOLEAN||i.type===B.STRING)t.push(i);else if(i.value===`(`||i.value===`[`)n.push(i);else if(i.value===`)`||i.value===`]`){for(;n.length&&n[n.length-1].value!==`(`&&n[n.length-1].value!==`[`;)t.push(n.pop());let e=n[n.length-1];if(i.value===`)`&&e.value!==`(`)throw Error(`unmatched parentheses: '('`);if(i.value===`]`&&e.value!==`[`)throw Error(`unmatched parentheses: '['`);i.value===`]`?t.push(n.pop()):n.pop()}else{for(;n.length&&i.precedence<=n[n.length-1].precedence;)t.push(n.pop());n.push(i)}}for(;n.length;)t.push(n.pop());return t}dryRun(){let e=[];try{for(let t of this._postfix){let n=t.type;if(n===B.NUMBER||n===B.BOOLEAN||n===B.STRING)e.push(t);else if(n===B.QUESTION){if(e.length<3)return console.error(`not enough operands for ternary operator: ${t.value}`),!1;e.pop(),e.pop()}else if(n===B.POSITIVE||n===B.NEGATION||n===B.NOT||n===B.BNOT){if(e.length<1)return console.error(`not enough operands for unary operator: ${t.value}`),!1}else{if(e.length<2)return console.error(`not enough operands for binary operator: ${t.value}`),!1;let r=e.pop(),i=e.pop();if(e.push(i),n===B.DOT){if(i.type!==B.STRING||r.type!==B.STRING)return console.error(`invalid operands for dot operator: ${i.value} and ${r.value}`),!1}else n===B.COLON&&e.push(r)}}return e.length!==1&&console.error(`invalid number of operands remaining: ${e.map(e=>e.value).join(`, `)}`),e.length===1}catch{return!1}}},V=class e{constructor(t,n){this.args={},this.input=[],this.output=[],this._parent=null,this._children=[],this._context=t,this._cfg=n,Object.keys(n.args).forEach(e=>{let t=n.args[e];t&&typeof t==`object`?(this._stringifiedArgs=this._stringifiedArgs??{},this._stringifiedArgs[e]=JSON.stringify(t)):this.args[e]=t});for(let r of n.children)if(!r.disabled){let n=e.create(t,r);n._parent=this,this._children.push(n)}}get __yield(){return this._yield||=bt.makeTempVar(this,`YIELD`)}get cfg(){return this._cfg}get id(){return this.cfg.id}get name(){return this.cfg.name}get parent(){return this._parent}get children(){return this._children}tick(e){let{stack:t,blackboard:n}=e,{cfg:r,input:i,output:a,args:o}=this;if(t.top()!==this&&t.push(this),i.length=0,a.length=0,r.input.forEach((e,t)=>i[t]=n.get(e)),this._stringifiedArgs)for(let e in this._stringifiedArgs)o[e]=JSON.parse(this._stringifiedArgs[e]);e.__runningNode=this;let s=`failure`;try{s=this.onTick(e,e.__lastStatus)}catch(t){t instanceof Error?this.error(`${t.message}\n ${t.stack}`):console.error(t),e.interrupt()}if(e.__interrupted)return`running`;if(s===`running`?n.get(this.__yield)===void 0&&n.set(this.__yield,!0):(r.output.forEach((e,t)=>n.set(e,a[t])),t.pop()),e.__lastStatus=s,r.debug||e.debug){let i=``;for(let e in n.values)bt.isTempVar(e)||bt.isPrivateVar(e)||(i+=`${e}:${n.values[e]}, `);let a=e.debug?` `.repeat(t.length):``;console.info(`[DEBUG] behavior3 -> ${a}${this.name}: tree:${this.cfg.tree.name} tree_id:${e.id}, node:${this.id}, status:${s}, values:{${i}} args:${JSON.stringify(r.args)}`)}return s}assert(e,t){e||this.throw(t)}throw(e){throw Error(`${this.cfg.tree.name}->${this.name}#${this.id}: ${e}`)}error(e){console.error(`${this.cfg.tree.name}->${this.name}#${this.id}: ${e}`)}warn(e){console.warn(`${this.cfg.tree.name}->${this.name}#${this.id}: ${e}`)}debug(e){console.debug(`${this.cfg.tree.name}->${this.name}#${this.id}: ${e}`)}info(e){console.info(`${this.cfg.tree.name}->${this.name}#${this.id}: ${e}`)}_checkOneof(e,t,n){let r=this.input[e],i=this.cfg.input[e],a;return i?(r===void 0&&(n===void 0?this.throw:this.warn).call(this,`missing input '${i}'`),a=r):a=t,a??n}static get descriptor(){throw Error(`descriptor not found in '${this.name}'`)}static create(t,n){let r=t.nodeCtors[n.name],i=t.nodeDefs[n.name];if(!r||!i)throw Error(`behavior3: node '${n.tree.name}->${n.name}' is not registered`);let a=new r(t,n);if(a.tick!==e.prototype.tick)throw Error(`don't override 'tick' function`);return i.children!==void 0&&i.children!==-1&&i.children!==a.children.length&&(i.children===0?a.warn(`no children is required`):a.children.length<i.children?a.throw(`at least ${i.children} children are required`):a.warn(`exactly ${i.children} children`)),a}},Tt=new Map;function H(e){let t=e.descriptor;if(Tt.has(t.name))throw Error(`node ${t.name} already registered`);if(t.doc){let e=t.doc.replace(/^[\r\n]+/,``),n=e.match(/^ */)?.[0];n&&(e=e.substring(n.length).replace(RegExp(`[\r\n]${n}`,`g`),`
15
+ `).replace(/ +$/,``)),t.doc=e}Tt.set(t.name,{ctor:e,descriptor:t})}var Et=class{constructor(e){this._nodes=[],this._tree=e}get length(){return this._nodes.length}indexOf(e){return this._nodes.indexOf(e)}top(){let e=this._nodes;return e[e.length-1]}push(e){this._nodes.push(e)}pop(){let e=this._nodes.pop();return e&&this._tree.blackboard.set(e.__yield,void 0),e}popTo(e){for(;this._nodes.length>e;)this.pop()}move(e,t,n){e._nodes.push(...this._nodes.splice(t,n))}clear(){this.popTo(0)}},Dt=class extends V{constructor(e,t){super(e,t),(typeof this.args.value!=`string`||this.args.value.length===0)&&this.throw(`args.value is not a expr string`),e.compileCode(this.args.value)}onTick(e,t){let n=e.blackboard.eval(this.args.value);return this.output.push(n),`success`}static get descriptor(){return{name:`Calculate`,type:`Action`,children:0,status:[`success`],desc:`简单的数值公式计算`,args:[{name:`value`,type:`expr`,desc:`计算公式`}],output:[`计算结果`],doc:`
16
+ + 做简单的数值公式计算,返回结果到输出
17
+ `}}};Dt=z([H],Dt);var Ot=class extends V{onTick(e,t){let[n,r]=this.input;return!Array.isArray(n)||!Array.isArray(r)?(this.error(`invalid array: ${n} or ${r}`),`error`):(this.output.push(n.concat(r)),`success`)}static get descriptor(){return{name:`Concat`,type:`Action`,children:0,status:[`success`,`failure`],desc:`将两个输入合并为一个数组,并返回新数组`,input:[`数组1`,`数组2`],output:[`新数组`],doc:`
18
+ + 如果输入不是数组,则返回 \`failure\`
19
+ `}}};Ot=z([H],Ot);var kt=class extends V{onTick(e,t){let[n]=this.input;if(typeof n!=`object`||!n)return this.error(`invalid object: ${n}`),`error`;let r=this.args,i=this._checkOneof(1,r.field),a=n[i];return typeof i!=`string`&&typeof i!=`number`?(this.error(`invalid field: ${i}`),`error`):a==null?`failure`:(this.output.push(a),`success`)}static get descriptor(){return{name:`GetField`,type:`Action`,children:0,status:[`success`,`failure`],desc:`获取对象的字段值`,args:[{name:`field`,type:`string?`,desc:`字段(field)`,oneof:`字段(field)`}],input:[`对象`,`字段(field)?`],output:[`字段值(value)`],doc:"\n + 合法元素不包括 `undefined` 和 `null`\n + 只有获取到合法元素时候才会返回 `success`,否则返回 `failure`\n "}}};kt=z([H],kt);var At=class extends V{onTick(e,t){let[n]=this.input;if(!Array.isArray(n))return this.error(`invalid array: ${n}`),`error`;let r=this._checkOneof(1,this.args.index),i=n[r];return i==null?typeof r!=`number`||isNaN(r)?(this.error(`invalid index: ${r}`),`error`):`failure`:(this.output.push(i),`success`)}static get descriptor(){return{name:`Index`,type:`Action`,children:0,status:[`success`,`failure`],desc:`索引输入的数组`,args:[{name:`index`,type:`int?`,desc:`索引`,oneof:`索引`}],input:[`数组`,`索引?`],output:[`值`],doc:"\n + 合法元素不包括 `undefined` 和 `null`\n + 索引数组的时候,第一个元素的索引为 0\n + 只有索引到有合法元素时候才会返回 `success`,否则返回 `failure`\n "}}};At=z([H],At);var jt=class extends V{onTick(e,t){return`failure`}static get descriptor(){return{name:`JustFailure`,type:`Action`,children:0,status:[`failure`],desc:`什么都不干,只返回失败`}}};jt=z([H],jt);var Mt=class extends V{onTick(e,t){return`success`}static get descriptor(){return{name:`JustSuccess`,type:`Action`,children:0,status:[`success`],desc:`什么都不干,只返回成功`}}};Mt=z([H],Mt);var Nt=class extends V{onTick(e,t){let n=this._checkOneof(0,this.args.value,null);return this.output.push(n),`success`}static get descriptor(){return{name:`Let`,type:`Action`,children:0,status:[`success`],desc:`定义新的变量名`,input:[`已存在变量名?`],args:[{name:`value`,type:`json?`,desc:`值(value)`,oneof:`已存在变量名`}],output:[`新变量名`],doc:"\n + 如果有输入变量,则给已有变量重新定义一个名字\n + 如果`值(value)`为 `null`,则清除变量\n "}}};Nt=z([H],Nt);var Pt;(function(e){e.LOG=`log`,e.INFO=`info`,e.DEBUG=`debug`,e.WARN=`warn`,e.ERROR=`error`})(Pt||={});var Ft=class extends V{onTick(e,t){let[n]=this.input,r=this.args,i=r.level??Pt.LOG,a=console.log,o=``;switch(i){case Pt.INFO:a=console.info,o=`behavior3 -> info:`;break;case Pt.DEBUG:a=console.debug,o=`behavior3 -> debug:`;break;case Pt.WARN:a=console.warn,o=`behavior3 -> warn:`;break;case Pt.ERROR:a=console.error,o=`behavior3 -> error:`;break;case Pt.LOG:default:a=console.log,o=`behavior3 -> log:`;break}return a.call(console,o,r.message,n??``),`success`}static get descriptor(){return{name:`Log`,type:`Action`,children:0,status:[`success`],desc:`打印日志`,input:[`日志?`],args:[{name:`message`,type:`string`,desc:`日志`},{name:`level`,type:`string`,desc:`日志级别`,default:Pt.LOG,options:[{source:[{name:`LOG`,value:Pt.LOG},{name:`INFO`,value:Pt.INFO},{name:`DEBUG`,value:Pt.DEBUG},{name:`WARN`,value:Pt.WARN},{name:`ERROR`,value:Pt.ERROR}]}]}]}}};Ft=z([H],Ft);var U;(function(e){e[e.abs=0]=`abs`,e[e.ceil=1]=`ceil`,e[e.floor=2]=`floor`,e[e.round=3]=`round`,e[e.sign=4]=`sign`,e[e.sin=5]=`sin`,e[e.cos=6]=`cos`,e[e.tan=7]=`tan`,e[e.atan2=8]=`atan2`,e[e.pow=9]=`pow`,e[e.sqrt=10]=`sqrt`,e[e.log=11]=`log`,e[e.min=12]=`min`,e[e.max=13]=`max`,e[e.random=14]=`random`,e[e.randInt=15]=`randInt`,e[e.randFloat=16]=`randFloat`,e[e.sum=17]=`sum`,e[e.average=18]=`average`,e[e.product=19]=`product`})(U||={});var It=class extends V{constructor(e,t){if(super(e,t),this._op=U[t.args.op],this._op===void 0)throw Error(`unknown op: ${t.args.op}`)}onTick(e,t){let n=this._op,r=this.args,i=this.input.filter(e=>e!==void 0).map(Number),a=[];if(r.value1===void 0?i.length>0&&(a[0]=i[0]):a[0]=r.value1,r.value2===void 0?i.length>1&&(a[1]=i[1]):a[1]=r.value2,i.length>2&&a.push(...i.slice(2)),a.length===0&&n!==U.random&&n!==U.randInt&&n!==U.randFloat)return this.error(`at least one parameter is required`),`failure`;let o;switch(n){case U.abs:if(a.length!==1)return this.error(`abs operation requires exactly one parameter`),`failure`;o=Math.abs(a[0]);break;case U.ceil:if(a.length!==1)return this.error(`ceil operation requires exactly one parameter`),`failure`;o=Math.ceil(a[0]);break;case U.floor:if(a.length!==1)return this.error(`floor operation requires exactly one parameter`),`failure`;o=Math.floor(a[0]);break;case U.round:if(a.length!==1)return this.error(`round operation requires exactly one parameter`),`failure`;o=Math.round(a[0]);break;case U.sin:if(a.length!==1)return this.error(`sin operation requires exactly one parameter`),`failure`;o=Math.sin(a[0]);break;case U.cos:if(a.length!==1)return this.error(`cos operation requires exactly one parameter`),`failure`;o=Math.cos(a[0]);break;case U.tan:if(a.length!==1)return this.error(`tan operation requires exactly one parameter`),`failure`;o=Math.tan(a[0]);break;case U.pow:if(a.length!==2)return this.error(`pow operation requires exactly two parameters`),`failure`;o=a[0]**+a[1];break;case U.sqrt:if(a.length!==1)return this.error(`sqrt operation requires exactly one parameter`),`failure`;o=Math.sqrt(a[0]);break;case U.log:if(a.length!==1)return this.error(`log operation requires exactly one parameter`),`failure`;o=Math.log(a[0]);break;case U.min:o=Math.min(...a);break;case U.max:o=Math.max(...a);break;case U.sum:o=a.reduce((e,t)=>e+t,0);break;case U.average:o=a.reduce((e,t)=>e+t,0)/a.length;break;case U.product:o=a.reduce((e,t)=>e*t,1);break;case U.sign:if(a.length!==1)return this.error(`sign operation requires exactly one parameter`),`failure`;o=Math.sign(a[0]);break;case U.atan2:if(a.length!==2)return this.error(`atan2 operation requires exactly two parameters`),`failure`;o=Math.atan2(a[0],a[1]);break;case U.random:o=Math.random();break;case U.randInt:{if(a.length!==2)return this.error(`randInt operation requires two parameters (min and max)`),`failure`;let e=Math.ceil(a[0]),t=Math.floor(a[1]);if(e>t)return this.error(`minimum value cannot be greater than maximum value`),`failure`;o=Math.floor(Math.random()*(t-e+1))+e;break}case U.randFloat:if(a.length!==2)return this.error(`randFloat operation requires two parameters (min and max)`),`failure`;if(a[0]>a[1])return this.error(`minimum value cannot be greater than maximum value`),`failure`;o=Math.random()*(a[1]-a[0])+a[0];break;default:return`failure`}return isNaN(o)?(this.error(`result is NaN: ${o}`),`error`):(this.output.push(o),`success`)}static get descriptor(){return{name:`Math`,type:`Action`,desc:`执行数学运算`,input:[`参数...`],output:[`结果`],status:[`success`,`failure`],args:[{name:`op`,type:`string`,desc:`数学运算类型`,options:[{source:[{name:`绝对值`,value:U[U.abs]},{name:`向上取整`,value:U[U.ceil]},{name:`向下取整`,value:U[U.floor]},{name:`四舍五入`,value:U[U.round]},{name:`符号`,value:U[U.sign]},{name:`正弦`,value:U[U.sin]},{name:`余弦`,value:U[U.cos]},{name:`正切`,value:U[U.tan]},{name:`反正切2`,value:U[U.atan2]},{name:`幂运算`,value:U[U.pow]},{name:`平方根`,value:U[U.sqrt]},{name:`自然对数`,value:U[U.log]},{name:`最小值`,value:U[U.min]},{name:`最大值`,value:U[U.max]},{name:`随机数`,value:U[U.random]},{name:`随机整数`,value:U[U.randInt]},{name:`随机浮点数`,value:U[U.randFloat]},{name:`求和`,value:U[U.sum]},{name:`平均值`,value:U[U.average]},{name:`乘积`,value:U[U.product]}]}]},{name:`value1`,type:`float?`,desc:`参数1(优先使用)`},{name:`value2`,type:`float?`,desc:`参数2(优先使用)`}]}}};It=z([H],It);var Lt=class extends V{onTick(e,t){return this.output.push(e.context.time),`success`}static get descriptor(){return{name:`Now`,type:`Action`,children:0,status:[`success`],desc:`获取当前时间`,output:[`当前时间`]}}};Lt=z([H],Lt);var Rt=class extends V{onTick(e,t){let[n,r]=this.input;return Array.isArray(n)?(n.push(r),`success`):(this.error(`arr is not an array: ${n}`),`error`)}static get descriptor(){return{name:`Push`,type:`Action`,children:0,status:[`success`,`failure`],desc:`向数组中添加元素`,input:[`数组`,`元素`],doc:"\n + 当变量`数组`不是数组类型时返回 `failure`\n + 其余返回 `success`\n "}}};Rt=z([H],Rt);var zt=class extends V{onTick(e,t){let[n]=this.input;if(!(n instanceof Array))return`error`;if(n.length===0)return`failure`;let r=Math.floor(Math.random()*n.length),i=n[r];return i==null?`failure`:(this.output.push(i),this.output.push(r),`success`)}static get descriptor(){return{name:`RandomIndex`,type:`Action`,children:0,status:[`success`,`failure`],desc:`随机返回输入的其中一个!`,input:[`输入目标`],output:[`随机目标`,`索引?`],doc:"\n + 合法元素不包括 `undefined` 和 `null`\n + 在输入数组中,随机返回其中一个\n + 当输入数组为空时,或者没有合法元素,返回 `failure`\n "}}};zt=z([H],zt);var Bt=class extends V{onTick(e,t){let[n]=this.input;if(typeof n!=`object`||!n)return this.error(`invalid object: ${n}`),`error`;let r=this.args,i=this._checkOneof(1,r.field),a=this._checkOneof(2,r.value,null);return typeof i!=`string`&&typeof i!=`number`?(this.error(`invalid field: ${i}`),`error`):a==null?(delete n[i],`success`):(n[i]=a,`success`)}static get descriptor(){return{name:`SetField`,type:`Action`,children:0,status:[`success`,`failure`],desc:`设置对象字段值`,input:[`输入对象`,`字段(field)?`,`值(value)?`],args:[{name:`field`,type:`string?`,desc:`字段(field)`,oneof:`字段(field)`},{name:`value`,type:`json?`,desc:`值(value)`,oneof:`值(value)`}],doc:"\n + 对输入对象设置 `field` 和 `value`\n + 输入参数1必须为对象,否则返回 `failure`\n + 如果 `field` 不为 `string`, 也返回 `failure`\n + 如果 `value` 为 `undefined` 或 `null`, 则删除 `field` 的值\n "}}};Bt=z([H],Bt);var Vt=class extends V{onTick(e,t){let n=e.resume(this);if(typeof n==`number`)return e.context.time>=n?`success`:`running`;{let t=this.args,n=this._checkOneof(0,t.time,0);return t.random&&(n+=(Math.random()-.5)*t.random),e.yield(this,e.context.time+n)}}static get descriptor(){return{name:`Wait`,type:`Action`,children:0,status:[`success`,`running`],desc:`等待`,input:[`等待时间?`],args:[{name:`time`,type:`float?`,desc:`等待时间`,oneof:`等待时间`},{name:`random`,type:`float?`,desc:`随机范围`}]}}};Vt=z([H],Vt);var Ht=class extends V{constructor(e,t){super(e,t),this._triggerKey=bt.makeTempVar(this,`trigger`),this._expiredKey=bt.makeTempVar(this,`expired`)}onTick(e){let t=this._triggerKey,n=e.blackboard.get(t),r=this._expiredKey,i=e.blackboard.get(r)??e.context.time;return n===!0?(e.blackboard.set(t,void 0),e.blackboard.set(r,void 0),`success`):(n===void 0?(e.blackboard.set(t,!1),e.blackboard.set(r,e.context.time+5),e.context.on(this.args.event,()=>{e.blackboard.set(t,!0),e.context.off(this.args.event,e),e.context.off(`treeInterrupted`,e)},e),e.context.on(`treeInterrupted`,()=>{e.blackboard.set(t,void 0),e.blackboard.set(r,void 0),e.context.off(this.args.event,e),e.context.off(`treeInterrupted`,e)},e)):e.context.time>=i&&(e.blackboard.set(r,e.context.time+5),this.debug(`wait for event: ${this.args.event}`)),`running`)}static get descriptor(){return{name:`WaitForEvent`,type:`Action`,children:0,status:[`success`,`running`],desc:`等待事件触发`,args:[{name:`event`,type:`string`,desc:`事件名称`}]}}};Ht=z([H],Ht);var Ut=class extends V{_ifelse(e,t){if(t===`error`)return`error`;let n=t===`success`?1:2,r=this.children[n].tick(e);return r===`running`?e.yield(this,n):r}onTick(e,t){let n=e.resume(this);if(n!==void 0)if(t===`running`)this.throw(`unexpected status error`);else if(n===0)return this._ifelse(e,t);else return t;return t=this.children[0].tick(e),t===`running`?e.yield(this,0):this._ifelse(e,t)}static get descriptor(){return{name:`IfElse`,type:`Composite`,children:3,status:[`|success`,`|failure`,`|running`],desc:`条件执行`,doc:`
20
+ + 必须有三个子节点
21
+ + 第一个子节点为条件节点
22
+ + 第二个子节点为条件为 \`success\` 时执行的节点
23
+ + 第三个子节点为条件为 \`failure\` 时执行的节点,
24
+ `}}};Ut=z([H],Ut);var Wt=new Et(null),Gt=class extends V{onTick(e,t){let n=e.resume(this)??[],r=e.stack,i=r.length,a=this.children,o=0;for(let s=0;s<a.length;s++){let c=n[s];if(c===void 0)t=a[s].tick(e);else if(c.length>0)for(c.move(r,0,c.length);r.length>i&&(t=r.top().tick(e),t!==`running`););else t=`success`;t===`running`?(c===void 0&&(c=new Et(e)),r.move(c,i,r.length-i)):(o++,c=Wt),n[s]=c}return o===a.length?`success`:e.yield(this,n)}static get descriptor(){return{name:`Parallel`,type:`Composite`,status:[`success`,`|running`],children:-1,desc:`并行执行`,doc:"\n + 并行执行所有子节点\n + 当有子节点返回 `running` 时,返回 `running` 状态\n + 执行完所有子节点后,返回 `success`"}}};Gt=z([H],Gt);var Kt=new Et(null),qt=class extends V{onTick(e,t){let n=e.resume(this)??[],r=e.stack,i=r.length,a=this.children,o=0;for(let s=0;s<a.length;s++){let c=n[s];if(t=`failure`,c===void 0)t=a[s].tick(e);else if(c.length>0)for(c.move(r,0,c.length);r.length>i&&(t=r.top().tick(e),t!==`running`););if(t===`running`)c===void 0&&(c=new Et(e)),r.move(c,i,r.length-i);else if(t===`success`)return n.forEach(e=>e!==Kt&&e.clear()),`success`;else o++,c=Kt;n[s]=c}return o===a.length?`failure`:e.yield(this,n)}static get descriptor(){return{name:`Race`,type:`Composite`,status:[`|success`,`&failure`,`|running`],children:-1,desc:`竞争执行`,doc:"\n + 并行执行所有子节点\n + 当有子节点返回 `success` 时,立即返回 `success` 状态,并中断其他子节点\n + 如果所有子节点返回 `failure`或 `error` 则返回 `failure`"}}};qt=z([H],qt);var Jt=class extends V{onTick(e,t){let n=e.resume(this),r=this.children,i=0;if(typeof n==`number`)if(t===`failure`||t===`error`)i=n+1;else if(t===`success`)return`success`;else this.throw(`unexpected status error`);for(;i<r.length;i++){if(t=r[i].tick(e),t===`success`)return`success`;if(t===`running`)return e.yield(this,i)}return`failure`}static get descriptor(){return{name:`Selector`,type:`Composite`,children:-1,desc:`选择执行`,status:[`|success`,`&failure`,`|running`],doc:"\n + 一直往下执行,直到有子节点返回 `success` 则返回 `success`\n + 若全部节点返回 `failure`或 `error` 则返回 `failure`"}}};Jt=z([H],Jt);var Yt=class extends V{onTick(e,t){let n=e.resume(this),r=this.children,i=0;if(typeof n==`number`)if(t===`success`)i=n+1;else if(t===`failure`||t===`error`)return t;else this.throw(`unexpected status error: ${t}`);for(;i<r.length;i++){if(t=r[i].tick(e),t===`failure`||t===`error`)return t;if(t===`running`)return e.yield(this,i)}return`success`}static get descriptor(){return{name:`Sequence`,type:`Composite`,children:-1,status:[`&success`,`|failure`,`|running`],desc:`顺序执行`,doc:"\n + 一直往下执行,只有当所有子节点都返回 `success`, 才返回 `success`\n + 若子节点返回 `failure`,则直接返回 `failure` 状态\n + 其余情况返回 `running` 状态\n "}}};Yt=z([H],Yt);var Xt=class extends V{constructor(e,t){super(e,t),this.children.forEach(e=>{e.name!==`Case`&&this.throw(`only allow Case node`)})}onTick(e,t){let n=e.resume(this),r=this.children;if(typeof n==`number`)if(t===`running`&&this.throw(`unexpected status error`),n%2==0)t===`success`?n+=1:n+=2;else return t;else n=0;for(let i=n>>>1;i<r.length;i++){let[a,o]=r[i].children;if(n%2==0){if(t=a.tick(e),t===`running`)return e.yield(this,n);n=t===`success`?i*2+1:i*2+2}if(n%2==1)return t=o.tick(e),t===`running`?e.yield(this,n):t}return`failure`}static get descriptor(){return{name:`Switch`,type:`Composite`,children:-1,status:[`|success`,`|failure`,`|running`],desc:`分支执行`,doc:"\n + 按顺序测试 `Case` 节点的判断条件(第一个子节点)\n + 若测试返回 `success` 则执行 `Case` 第二个子节点,并返回子节点的执行状态\n + 若没有判断为 `success` 的 `Case` 节点,则返回 `failure`\n "}}};Xt=z([H],Xt);var Zt=class extends V{onTick(e,t){throw Error(`tick children by Switch`)}static get descriptor(){return{name:`Case`,type:`Composite`,children:2,status:[`&success`,`|failure`,`|running`],desc:`分支选择`,doc:`
25
+ + 必须有两个子节点
26
+ + 第一个子节点为判断条件
27
+ + 第二个子节点为判断为 \`success\` 时执行的节点
28
+ + 此节点不会真正意义的执行,而是交由 \`Switch\` 节点来执行
29
+ `}}};Zt=z([H],Zt);var Qt=class extends V{onTick(e,t){let n=e.resume(this),r=e.stack.length,i=e.__lastStatus;if(t=this.children[0].tick(e),e.__lastStatus=i,t===`running`)return this.error(`unexpected status error: running`),`error`;if(t===`error`)return t;if(t===`failure`)return this.children[2].tick(e),e.stack.popTo(r),`failure`;if(n===void 0)t=this.children[1].tick(e);else for(n.move(e.stack,0,n.length);e.stack.length>r&&(t=e.stack.top().tick(e),t!==`running`););return t===`running`?(n===void 0&&(n=new Et(e)),e.stack.move(n,r,e.stack.length-r),e.yield(this,n)):t}static get descriptor(){return{name:`Watchdog`,type:`Composite`,children:3,status:[`|success`,`|failure`,`|running`],desc:`测试执行`,doc:"\n + 必须有3个子节点\n + 第一个子节点为条件节点,返回 `success` 或 `failure` 状态\n + 第二个子节点为条件为 `success` 时执行的节点\n + 第三个子节点为条件为 `failure` 时执行的节点,不管子节点返回什么状态,都直接返回 `failure`\n + 当第二个子节点返回 `running` 时,由本节点维护其运行状态\n + 每一次 tick 都会先执行测试节点,只有当测试节点返回 `success`,才执行第二个子节点\n "}}};Qt=z([H],Qt);var $t=class extends V{constructor(e,t){super(e,t),(typeof this.args.value!=`string`||this.args.value.length===0)&&this.throw(`args.value is not a expr string`),e.compileCode(this.args.value)}onTick(e,t){return e.blackboard.eval(this.args.value)?`success`:`failure`}static get descriptor(){return{name:`Check`,type:`Condition`,children:0,status:[`success`,`failure`],desc:`检查True或False`,args:[{name:`value`,type:`expr`,desc:`值`}],doc:"\n + 做简单数值公式判定,返回 `success` 或 `failure`\n "}}};$t=z([H],$t);var en=class extends V{onTick(e,t){let[n,r]=this.input;return Array.isArray(n)?r==null?`failure`:n.indexOf(r)>=0?`success`:`failure`:(this.error(`invalid array: ${n}`),`error`)}static get descriptor(){return{name:`Includes`,type:`Condition`,children:0,status:[`success`,`failure`],desc:`判断元素是否在数组中`,input:[`数组`,`元素`],doc:"\n + 若输入的元素不合法,返回 `failure`\n + 只有数组包含元素时返回 `success`,否则返回 `failure`\n "}}};en=z([H],en);var tn=class extends V{onTick(e,t){let[n]=this.input;return n==null?`success`:`failure`}static get descriptor(){return{name:`IsNull`,type:`Condition`,children:0,status:[`success`,`failure`],desc:`判断变量是否不存在`,input:[`判断的变量`]}}};tn=z([H],tn);var nn=class extends V{onTick(e,t){let[n]=this.input;return n==null?`failure`:`success`}static get descriptor(){return{name:`NotNull`,type:`Condition`,children:0,status:[`success`,`failure`],desc:`判断变量是否存在`,input:[`判断的变量`]}}};nn=z([H],nn);var rn=class extends V{onTick(e,t){return typeof e.resume(this)==`boolean`?(t===`running`&&this.throw(`unexpected status error`),`failure`):(t=this.children[0].tick(e),t===`running`?e.yield(this):`failure`)}static get descriptor(){return{name:`AlwaysFailure`,type:`Decorator`,children:1,status:[`failure`,`|running`],desc:`始终返回失败`,doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 当子节点返回 `running` 时,返回 `running`\n + 其它情况,不管子节点是否成功都返回 `failure`\n "}}};rn=z([H],rn);var an=class extends V{onTick(e,t){return this.children[0].tick(e),`running`}static get descriptor(){return{name:`AlwaysRunning`,type:`Decorator`,children:1,status:[`running`],desc:`始终返回运行中状态`,doc:`
30
+ + 只能有一个子节点,多个仅执行第一个
31
+ + 始终返回 \`running\`
32
+ `}}};an=z([H],an);var on=class extends V{onTick(e,t){return typeof e.resume(this)==`boolean`?(t===`running`&&this.throw(`unexpected status error`),`success`):(t=this.children[0].tick(e),t===`running`?e.yield(this):`success`)}static get descriptor(){return{name:`AlwaysSuccess`,type:`Decorator`,children:1,status:[`success`,`|running`],desc:`始终返回成功`,doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 当子节点返回 `running` 时,返回 `running`\n + 其它情况,不管子节点是否成功都返回 `success`\n "}}};on=z([H],on);var sn=class extends V{onTick(e,t){let n=this.args;if(typeof e.resume(this)==`boolean`){if(t===`running`&&this.throw(`unexpected status error`),t===`success`)return`success`;this.throw(n.message)}return t=this.children[0].tick(e),t===`success`?`success`:t===`running`?e.yield(this):(this.throw(n.message),`success`)}static get descriptor(){return{name:`Assert`,type:`Decorator`,children:1,status:[`success`],desc:`断言`,args:[{name:`message`,type:`string`,desc:`消息`}],doc:`
33
+ + 只能有一个子节点,多个仅执行第一个
34
+ + 当子节点返回 \`failure\` 时,抛出异常
35
+ + 其余情况返回子节点的执行状态
36
+ `}}};sn=z([H],sn);var cn=class extends V{onTick(e,t){let n=this.args,r=this._checkOneof(0,n.delay,0),i=e.blackboard,a=n.cacheVars??[],o=a.map(e=>i.get(e));return e.context.delay(r,()=>{let n=a.map(e=>i.get(e));a.forEach((e,t)=>i.set(e,o[t]));let r=e.stack.length;t=this.children[0].tick(e),t===`running`&&e.stack.popTo(r),a.forEach((e,t)=>i.set(e,n[t]))},e),`success`}static get descriptor(){return{name:`Delay`,type:`Decorator`,children:1,status:[`success`],desc:`延时执行子节点`,input:[`延时时间?`],args:[{name:`delay`,type:`float?`,desc:`延时时间`,oneof:`延时时间`},{name:`cacheVars`,type:`string[]?`,desc:`暂存环境变量`}],doc:`
37
+ + 当延时触发时,执行第一个子节点,多个仅执行第一个
38
+ + 如果子节点返回 \`running\`,会中断执行并清理执行栈`}}};cn=z([H],cn);var ln=class extends V{onTick(e,t){let[n]=this.input;if(!(n instanceof Array))return`error`;if(n.length===0)return`failure`;let r=e.resume(this),i,a;r instanceof Array?([i,a]=r,t===`running`?this.throw(`unexpected status error`):t===`success`&&a.push(n[i]),i++):(i=0,a=[]);let o=this.children[0];for(i=0;i<n.length;i++){if(e.blackboard.set(this.cfg.output[0],n[i]),t=o.tick(e),t===`running`)return r instanceof Array?(r[0]=i,r[1]=a):r=[i,a],e.yield(this,r);t===`success`&&a.push(n[i])}return this.output.push(void 0,a),a.length===0?`failure`:`success`}static get descriptor(){return{name:`Filter`,type:`Decorator`,children:1,status:[`success`,`failure`,`|running`],desc:`返回满足条件的元素`,input:[`输入数组`],output:[`变量`,`新数组`],doc:`
39
+ + 只能有一个子节点,多个仅执行第一个
40
+ + 遍历输入数组,将当前元素写入\`变量\`,满足条件的元素放入新数组
41
+ + 只有当新数组不为空时,才返回 \`success\`
42
+ `}}};ln=z([H],ln);var un=class extends V{onTick(e,t){let[n]=this.input,[r,i]=this.cfg.output,a=e.resume(this);if(a!==void 0){if(t===`running`)this.throw(`unexpected status error`);else if(t===`failure`||t===`error`)return t;a++}else a=0;for(;a<n.length;a++){if(e.blackboard.set(r,n[a]),i&&e.blackboard.set(i,a),t=this.children[0].tick(e),t===`running`)return e.yield(this,a);if(t===`failure`||t===`error`)return t}return`success`}static get descriptor(){return{name:`ForEach`,type:`Decorator`,children:1,status:[`success`,`|running`,`|failure`],desc:`遍历数组`,input:[`数组`],output:[`变量`,`索引?`],doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 遍历输入数组,将当前元素写入`变量`\n + 当子节点返回 `failure` 时,退出遍历并返回 `failure` 状态\n + 执行完所有子节点后,返回 `success`"}}};un=z([H],un);var dn=class extends V{onTick(e,t){return typeof e.resume(this)==`boolean`?(t===`running`&&this.throw(`unexpected status error`),this._invert(t)):(t=this.children[0].tick(e),t===`running`?e.yield(this):this._invert(t))}_invert(e){return e===`error`?`error`:e===`failure`?`success`:`failure`}static get descriptor(){return{name:`Invert`,type:`Decorator`,children:1,status:[`!success`,`!failure`,`|running`],desc:`反转子节点运行结果`,doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 当子节点返回 `success` 时返回 `failure`\n + 当子节点返回 `failure` 时返回 `success`\n + 当子节点返回 `error` 时返回 `error`\n "}}};dn=z([H],dn);var fn=[{name:`行为树被中断`,value:`treeInterrupted`},{name:`行为树开始执行前`,value:`treeBeforeTicked`},{name:`行为树执行完成后`,value:`treeAfterTicked`},{name:`行为树执行成功后`,value:`treeTickedSuccess`},{name:`行为树执行失败后`,value:`treeTickedFailure`},{name:`行为树被清理`,value:`treeCleaned`}],pn=class extends V{_isBuiltinEvent(e){return!!fn.find(t=>t.value===e)}_processOutput(e,t,...n){let[r]=this.cfg.output;r&&e.blackboard.set(r,t);for(let t=1;t<this.cfg.output.length;t++){let r=this.cfg.output[t];r&&e.blackboard.set(r,n[t-1])}}onTick(e,t){let[n]=this.input,r=this.args;this._isBuiltinEvent(r.event)&&(n!==void 0&&this.warn(`invalid target ${n} for builtin event ${r.event}`),n=e);let i=n=>(...r)=>{this._processOutput(e,n,...r);let i=e.stack.length;t=this.children[0].tick(e),t===`running`&&e.stack.popTo(i)};return n===void 0?e.context.on(r.event,i(void 0),e):n instanceof Array?n.forEach(t=>{e.context.on(r.event,t,i(t),e)}):e.context.on(r.event,n,i(n),e),`success`}static get descriptor(){return{name:`Listen`,type:`Decorator`,children:1,status:[`success`],desc:`侦听事件`,input:[`目标对象?`],output:[`事件目标?`,`事件参数...`],args:[{name:`event`,type:`string`,desc:`事件`,options:[{source:fn.slice()}]}],doc:`
43
+ + 当事件触发时,执行第一个子节点,多个仅执行第一个
44
+ + 如果子节点返回 \`running\`,会中断执行并清理执行栈`}}};pn=z([H],pn);var mn=class extends V{constructor(e,t){super(e,t),this._onceKey=bt.makePrivateVar(this,`ONCE`)}onTick(e,t){let n=this._onceKey;return e.blackboard.get(n)===!0?`failure`:typeof e.resume(this)==`boolean`?(t===`running`&&this.throw(`unexpected status error`),e.blackboard.set(n,!0),`success`):(t=this.children[0].tick(e),t===`running`?e.yield(this):(e.blackboard.set(n,!0),`success`))}static get descriptor(){return{name:`Once`,type:`Decorator`,children:1,status:[`success`,`failure`,`|running`],desc:`只执行一次`,doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 第一次执行完全部子节点时返回 `success`,之后永远返回 `failure`"}}};mn=z([H],mn);var hn=class extends V{onTick(e,t){let n=this._checkOneof(0,this.args.count,2**53-1),r=e.resume(this);if(r!==void 0){if(t===`running`)this.throw(`unexpected status error`);else if(t===`failure`||t===`error`)return t;r++}else r=0;for(;r<n;r++){if(t=this.children[0].tick(e),t===`running`)return e.yield(this,r);if(t===`failure`||t===`error`)return t}return`success`}static get descriptor(){return{name:`Repeat`,type:`Decorator`,children:1,status:[`success`,`|running`,`|failure`],desc:`循环执行`,input:[`循环次数?`],args:[{name:`count`,type:`int?`,desc:`循环次数`,oneof:`循环次数`}],doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 当子节点返回 `failure` 时,退出遍历并返回 `failure` 状态\n + 执行完所有子节点后,返回 `success`\n "}}};hn=z([H],hn);var gn=class extends V{onTick(e,t){let n=this._checkOneof(0,this.args.count,2**53-1),r=e.resume(this);if(typeof r==`number`){if(t===`error`)return`error`;if(t===`failure`)return`success`;if(r>=n)return`failure`;r++}else r=1;return t=this.children[0].tick(e),t===`error`?`error`:t===`failure`?`success`:e.yield(this,r)}static get descriptor(){return{name:`RetryUntilFailure`,type:`Decorator`,children:1,status:[`!success`,`failure`,`running`],desc:`一直尝试直到子节点返回失败`,input:[`最大尝试次数?`],args:[{name:`count`,type:`int?`,desc:`最大尝试次数`}],doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 只有当子节点返回 `failure` 时,才返回 `success`,其它情况返回 `running` 状态\n + 如果设定了尝试次数,超过指定次数则返回 `failure`"}}};gn=z([H],gn);var _n=class extends V{onTick(e,t){let n=this._checkOneof(0,this.args.count,2**53-1),r=e.resume(this);if(typeof r==`number`){if(t===`error`)return`error`;if(t===`success`)return`success`;if(r>=n)return`failure`;r++}else r=1;return t=this.children[0].tick(e),t===`error`?`error`:t===`success`?`success`:e.yield(this,r)}static get descriptor(){return{name:`RetryUntilSuccess`,type:`Decorator`,children:1,status:[`|success`,`failure`,`running`],desc:`一直尝试直到子节点返回成功`,input:[`最大尝试次数?`],args:[{name:`count`,type:`int?`,desc:`最大尝试次数`}],doc:"\n + 只能有一个子节点,多个仅执行第一个\n + 只有当子节点返回 `success` 时,才返回 `success`,其它情况返回 `running` 状态\n + 如果设定了尝试次数,超过指定次数则返回 `failure`"}}};_n=z([H],_n);var vn=class extends V{onTick(e,t){let{stack:n,context:r}=e,i=n.length,a=e.resume(this);if(t=`failure`,a===void 0)t=this.children[0].tick(e);else if(r.time>=a.expired)return a.stack.clear(),`failure`;else for(a.stack.move(n,0,a.stack.length);n.length>i&&(t=n.top().tick(e),t!==`running`););if(t===`running`){if(a===void 0){let t=this._checkOneof(0,this.args.time,0);a={stack:new Et(e),expired:r.time+t}}return n.move(a.stack,i,n.length-i),e.yield(this,a)}else return t}static get descriptor(){return{name:`Timeout`,type:`Decorator`,children:1,status:[`|success`,`|running`,`failure`],desc:`超时`,input:[`超时时间?`],args:[{name:`time`,type:`float?`,desc:`超时时间`,oneof:`超时时间`}],doc:`
45
+ + 只能有一个子节点,多个仅执行第一个
46
+ + 当子节点执行超时或返回 \`failure\` 时,返回 \`failure\`
47
+ + 其余情况返回子节点的执行状态
48
+ `}}};vn=z([H],vn);var yn=r((e=>{var t=i(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),a=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var i,c={},l=null,u=null;for(i in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)a.call(t,i)&&!s.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)c[i]===void 0&&(c[i]=t[i]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:o.current}}e.Fragment=r,e.jsx=c,e.jsxs=c})),bn=r(((e,t)=>{t.exports=yn()}));function xn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Sn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wn={};function Tn(e,t){return((t||wn).jsx?Cn:Sn).test(e)}var En=/[ \t\n\f\r]/g;function Dn(e){return typeof e==`object`?e.type===`text`?On(e.value):!1:On(e)}function On(e){return e.replace(En,``)===``}var kn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};kn.prototype.normal={},kn.prototype.property={},kn.prototype.space=void 0;function An(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new kn(n,r,t)}function jn(e){return e.toLowerCase()}var W=class{constructor(e,t){this.attribute=t,this.property=e}};W.prototype.attribute=``,W.prototype.booleanish=!1,W.prototype.boolean=!1,W.prototype.commaOrSpaceSeparated=!1,W.prototype.commaSeparated=!1,W.prototype.defined=!1,W.prototype.mustUseProperty=!1,W.prototype.number=!1,W.prototype.overloadedBoolean=!1,W.prototype.property=``,W.prototype.spaceSeparated=!1,W.prototype.space=void 0;var Mn=n({boolean:()=>G,booleanish:()=>K,commaOrSpaceSeparated:()=>In,commaSeparated:()=>Fn,number:()=>q,overloadedBoolean:()=>Pn,spaceSeparated:()=>J}),Nn=0,G=Ln(),K=Ln(),Pn=Ln(),q=Ln(),J=Ln(),Fn=Ln(),In=Ln();function Ln(){return 2**++Nn}var Rn=Object.keys(Mn),zn=class extends W{constructor(e,t,n,r){let i=-1;if(super(e,t),Bn(this,`space`,r),typeof n==`number`)for(;++i<Rn.length;){let e=Rn[i];Bn(this,Rn[i],(n&Mn[e])===Mn[e])}}};zn.prototype.defined=!0;function Bn(e,t,n){n&&(e[t]=n)}function Vn(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new zn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[jn(r)]=r,n[jn(a.attribute)]=r}return new kn(t,n,e.space)}var Hn=Vn({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:K,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:J,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:q,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:J,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:K,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Un(e,t){return t in e?e[t]:t}function Wn(e,t){return Un(e,t.toLowerCase())}var Gn=Vn({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Fn,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:G,allowPaymentRequest:G,allowUserMedia:G,alt:null,as:null,async:G,autoCapitalize:null,autoComplete:J,autoFocus:G,autoPlay:G,blocking:J,capture:null,charSet:null,checked:G,cite:null,className:J,cols:q,colSpan:null,content:null,contentEditable:K,controls:G,controlsList:J,coords:q|Fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:G,defer:G,dir:null,dirName:null,disabled:G,download:Pn,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:G,formTarget:null,headers:J,height:q,hidden:Pn,high:q,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:G,inputMode:null,integrity:null,is:null,isMap:G,itemId:null,itemProp:J,itemRef:J,itemScope:G,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:G,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:G,muted:G,name:null,nonce:null,noModule:G,noValidate:G,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:G,optimum:q,pattern:null,ping:J,placeholder:null,playsInline:G,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:G,referrerPolicy:null,rel:J,required:G,reversed:G,rows:q,rowSpan:q,sandbox:J,scope:null,scoped:G,seamless:G,selected:G,shadowRootClonable:G,shadowRootDelegatesFocus:G,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:G,useMap:null,value:K,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:G,declare:G,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:G,noHref:G,noShade:G,noWrap:G,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:G,disableRemotePlayback:G,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:Wn}),Kn=Vn({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:In,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:G,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fn,g2:Fn,glyphName:Fn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Un}),qn=Vn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Jn=Vn({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Wn}),Yn=Vn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Xn={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Zn=/[A-Z]/g,Qn=/-[a-z]/g,$n=/^data[-\w.:]+$/i;function er(e,t){let n=jn(t),r=t,i=W;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&$n.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Qn,nr);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Qn.test(e)){let n=e.replace(Zn,tr);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=zn}return new i(r,t)}function tr(e){return`-`+e.toLowerCase()}function nr(e){return e.charAt(1).toUpperCase()}var rr=An([Hn,Gn,qn,Jn,Yn],`html`),ir=An([Hn,Kn,qn,Jn,Yn],`svg`);function ar(e){return e.join(` `).trim()}var or=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
49
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),S(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function ee(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function x(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function S(){x(i)}function te(e){var t;for(e||=[];t=C();)t!==!1&&e.push(t);return e}function C(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return ee(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function w(){var e=y(),t=x(a);if(t){if(C(),!x(o))return ee(`property missing ':'`);var r=x(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return x(c),i}}function T(){var e=[];te(e);for(var t;t=w();)t!==!1&&(e.push(t),te(e));return e}return S(),T()}function _(e){return e?e.replace(l,p):p}t.exports=g})),sr=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(or());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),cr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),lr=r(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(sr()),r=cr();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ur=fr(`end`),dr=fr(`start`);function fr(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function pr(e){let t=dr(e),n=ur(e);if(t&&n)return{start:t,end:n}}function mr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?gr(e.position):`start`in e||`end`in e?gr(e):`line`in e||`column`in e?hr(e):``}function hr(e){return _r(e&&e.line)+`:`+_r(e&&e.column)}function gr(e){return hr(e&&e.start)+`-`+hr(e&&e.end)}function _r(e){return e&&typeof e==`number`?e:1}var Y=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=mr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Y.prototype.file=``,Y.prototype.name=``,Y.prototype.reason=``,Y.prototype.message=``,Y.prototype.stack=``,Y.prototype.column=void 0,Y.prototype.line=void 0,Y.prototype.ancestors=void 0,Y.prototype.cause=void 0,Y.prototype.fatal=void 0,Y.prototype.place=void 0,Y.prototype.ruleId=void 0,Y.prototype.source=void 0;var vr=e(lr(),1),yr={}.hasOwnProperty,br=new Map,xr=/[A-Z]/g,Sr=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Cr=new Set([`td`,`th`]),wr=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Tr(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Ir(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Fr(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ir:rr,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Er(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Er(e,t,n){if(t.type===`element`)return Dr(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Or(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ar(e,t,n);if(t.type===`mdxjsEsm`)return kr(e,t);if(t.type===`root`)return jr(e,t,n);if(t.type===`text`)return Mr(e,t)}function Dr(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ir,e.schema=i),e.ancestors.push(t);let a=Hr(e,t.tagName,!1),o=Lr(e,t),s=zr(e,t);return Sr.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Dn(e):!0})),Nr(e,o,a,t),Pr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Or(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ur(e,t.position)}function kr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ur(e,t.position)}function Ar(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ir,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Hr(e,t.name,!0),o=Rr(e,t),s=zr(e,t);return Nr(e,o,a,t),Pr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jr(e,t,n){let r={};return Pr(r,zr(e,t)),e.create(t,e.Fragment,r,n)}function Mr(e,t){return t.value}function Nr(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Fr(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Ir(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=dr(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Lr(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&yr.call(t.properties,i)){let a=Br(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Cr.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Rr(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ur(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Ur(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function zr(e,t){let n=[],r=-1,i=e.passKeys?new Map:br;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Er(e,a,o);s!==void 0&&n.push(s)}return n}function Br(e,t,n){let r=er(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xn(n):ar(n)),r.property===`style`){let t=typeof n==`object`?n:Vr(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Wr(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Xn[r.property]||r.property:r.attribute,n]}}function Vr(e,t){try{return(0,vr.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Y("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=wr+`#cannot-parse-style-attribute`,r}}function Hr(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Tn(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Tn(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return yr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ur(e)}function Ur(e,t){let n=new Y("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=wr+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Wr(e){let t={},n;for(n in e)yr.call(e,n)&&(t[Gr(n)]=e[n]);return t}function Gr(e){let t=e.replace(xr,Kr);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Kr(e){return`-`+e.toLowerCase()}var qr={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Jr={};function Yr(e,t){let n=t||Jr;return Xr(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Xr(e,t,n){if(Qr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Zr(e.children,t,n)}return Array.isArray(e)?Zr(e,t,n):``}function Zr(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Xr(e[i],t,n);return r.join(``)}function Qr(e){return!!(e&&typeof e==`object`)}var $r=document.createElement(`i`);function ei(e){let t=`&`+e+`;`;$r.innerHTML=t;let n=$r.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function ti(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ni(e,t){return e.length>0?(ti(e,e.length,0,t),e):t}var ri={}.hasOwnProperty;function ii(e){let t={},n=-1;for(;++n<e.length;)ai(t,e[n]);return t}function ai(e,t){let n;for(n in t){let r=(ri.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ri.call(r,a)||(r[a]=[]);let e=i[a];oi(r[a],Array.isArray(e)?e:e?[e]:[])}}}function oi(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ti(e,0,0,r)}function si(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ci(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var li=vi(/[A-Za-z]/),ui=vi(/[\dA-Za-z]/),di=vi(/[#-'*+\--9=?A-Z^-~]/);function fi(e){return e!==null&&(e<32||e===127)}var pi=vi(/\d/),mi=vi(/[\dA-Fa-f]/),hi=vi(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var gi=vi(/\p{P}|\p{S}/u),_i=vi(/\s/);function vi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function yi(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&ui(e.charCodeAt(n+1))&&ui(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var bi={tokenize:xi};function xi(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Si={tokenize:wi},Ci={tokenize:Ti};function wi(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return ti(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ci,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ci,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;ti(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ti(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ei(e){if(e===null||Z(e)||_i(e))return 1;if(gi(e))return 2}function Di(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Oi={name:`attention`,resolveAll:ki,tokenize:Ai};function ki(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};ji(d,-c),ji(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ni(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=ni(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=ni(l,Di(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ni(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=ni(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ti(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Ai(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ei(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ei(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ji(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Mi={name:`autolink`,tokenize:Ni};function Ni(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return li(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ui(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ui(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||fi(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):di(t)?(e.consume(t),l):n(t)}function u(e){return ui(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ui(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Pi={partial:!0,tokenize:Fi};function Fi(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var Ii={continuation:{tokenize:Ri},exit:zi,name:`blockQuote`,tokenize:Li};function Li(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ri(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ii,t,n)(r)}}function zi(e){e.exit(`blockQuote`)}var Bi={name:`characterEscape`,tokenize:Vi};function Vi(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return hi(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Hi={name:`characterReference`,tokenize:Ui};function Ui(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ui,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=mi,u):(e.enter(`characterReferenceValue`),a=7,o=pi,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ui&&!ei(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Wi={partial:!0,tokenize:qi},Gi={concrete:!0,name:`codeFenced`,tokenize:Ki};function Ki(e,t,n){let r=this,i={partial:!0,tokenize:ee},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Wi,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(Wi,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function ee(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function qi(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ji={name:`codeIndented`,tokenize:Xi},Yi={partial:!0,tokenize:Zi};function Xi(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(Yi,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Zi(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var Qi={name:`codeText`,previous:ea,resolve:$i,tokenize:ta};function $i(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ea(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ta(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var na=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ra(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ra(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ra(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);ra(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ra(this.left,t.reverse())}}};function ra(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ia(e){let t={},n=-1,r,i,a,o,s,c,l,u=new na(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,aa(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ti(e,0,1/0,u.slice(0)),!l}function aa(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var oa={resolve:ca,tokenize:la},sa={partial:!0,tokenize:ua};function ca(e){return ia(e),e}function la(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(sa,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ua(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function da(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||fi(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Z(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||fi(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function fa(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function pa(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ma(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ha={name:`definition`,tokenize:_a},ga={partial:!0,tokenize:va};function _a(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return fa.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Z(t)?ma(e,l)(t):l(t)}function l(t){return da(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(ga,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function va(e,t,n){return r;function r(t){return Z(t)?ma(e,i)(t):n(t)}function i(t){return pa(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var ya={name:`hardBreakEscape`,tokenize:ba};function ba(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var xa={name:`headingAtx`,resolve:Sa,tokenize:Ca};function Sa(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ti(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ca(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Z(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Z(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var wa=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ta=[`pre`,`script`,`style`,`textarea`],Ea={concrete:!0,name:`htmlFlow`,resolveTo:ka,tokenize:Aa},Da={partial:!0,tokenize:Ma},Oa={partial:!0,tokenize:ja};function ka(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Aa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:le):li(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):li(a)?(e.consume(a),i=4,r.interrupt?t:le):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:le):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:E:m):n(i)}function h(t){return li(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Z(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ta.includes(l)?(i=1,r.interrupt?t(s):E(s)):wa.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ui(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:E):n(i)}function v(t){return Q(t)?(e.consume(t),v):w(t)}function y(t){return t===47?(e.consume(t),w):t===58||t===95||li(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):w(t)}function b(t){return t===45||t===46||t===58||t===95||ui(t)?(e.consume(t),b):ee(t)}function ee(t){return t===61?(e.consume(t),x):Q(t)?(e.consume(t),ee):y(t)}function x(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):Q(t)?(e.consume(t),x):te(t)}function S(t){return t===c?(e.consume(t),c=null,C):t===null||X(t)?n(t):(e.consume(t),S)}function te(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Z(t)?ee(t):(e.consume(t),te)}function C(e){return e===47||e===62||Q(e)?y(e):n(e)}function w(t){return t===62?(e.consume(t),T):n(t)}function T(t){return t===null||X(t)?E(t):Q(t)?(e.consume(t),T):n(t)}function E(t){return t===45&&i===2?(e.consume(t),ae):t===60&&i===1?(e.consume(t),oe):t===62&&i===4?(e.consume(t),ue):t===63&&i===3?(e.consume(t),le):t===93&&i===5?(e.consume(t),ce):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Da,de,ne)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),E)}function ne(t){return e.check(Oa,re,de)(t)}function re(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return t===null||X(t)?ne(t):(e.enter(`htmlFlowData`),E(t))}function ae(t){return t===45?(e.consume(t),le):E(t)}function oe(t){return t===47?(e.consume(t),o=``,se):E(t)}function se(t){if(t===62){let n=o.toLowerCase();return Ta.includes(n)?(e.consume(t),ue):E(t)}return li(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),se):E(t)}function ce(t){return t===93?(e.consume(t),le):E(t)}function le(t){return t===62?(e.consume(t),ue):t===45&&i===2?(e.consume(t),le):E(t)}function ue(t){return t===null||X(t)?(e.exit(`htmlFlowData`),de(t)):(e.consume(t),ue)}function de(n){return e.exit(`htmlFlow`),t(n)}}function ja(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Ma(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Pi,t,n)}}var Na={name:`htmlText`,tokenize:Pa};function Pa(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),ee):t===63?(e.consume(t),y):li(t)?(e.consume(t),te):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):li(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,oe(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ae(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,oe(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ae(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ae(t):X(t)?(o=v,oe(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,oe(t)):(e.consume(t),y)}function b(e){return e===62?ae(e):y(e)}function ee(t){return li(t)?(e.consume(t),x):n(t)}function x(t){return t===45||ui(t)?(e.consume(t),x):S(t)}function S(t){return X(t)?(o=S,oe(t)):Q(t)?(e.consume(t),S):ae(t)}function te(t){return t===45||ui(t)?(e.consume(t),te):t===47||t===62||Z(t)?C(t):n(t)}function C(t){return t===47?(e.consume(t),ae):t===58||t===95||li(t)?(e.consume(t),w):X(t)?(o=C,oe(t)):Q(t)?(e.consume(t),C):ae(t)}function w(t){return t===45||t===46||t===58||t===95||ui(t)?(e.consume(t),w):T(t)}function T(t){return t===61?(e.consume(t),E):X(t)?(o=T,oe(t)):Q(t)?(e.consume(t),T):C(t)}function E(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ne):X(t)?(o=E,oe(t)):Q(t)?(e.consume(t),E):(e.consume(t),re)}function ne(t){return t===i?(e.consume(t),i=void 0,ie):t===null?n(t):X(t)?(o=ne,oe(t)):(e.consume(t),ne)}function re(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Z(t)?C(t):(e.consume(t),re)}function ie(e){return e===47||e===62||Z(e)?C(e):n(e)}function ae(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function oe(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),se}function se(t){return Q(t)?$(e,ce,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ce(t)}function ce(t){return e.enter(`htmlTextData`),o(t)}}var Fa={name:`labelEnd`,resolveAll:za,resolveTo:Ba,tokenize:Va},Ia={tokenize:Ha},La={tokenize:Ua},Ra={tokenize:Wa};function za(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ti(e,0,e.length,n),e}function Ba(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=ni(s,e.slice(a+1,a+r+3)),s=ni(s,[[`enter`,u,t]]),s=ni(s,Di(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=ni(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=ni(s,e.slice(o+1)),s=ni(s,[[`exit`,c,t]]),ti(e,a,e.length,s),e}function Va(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ci(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ia,u,o?u:d)(t):t===91?e.attempt(La,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ra,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Ha(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Z(t)?ma(e,a)(t):a(t)}function a(t){return t===41?u(t):da(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Z(t)?ma(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?pa(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Z(t)?ma(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ua(e,t,n){let r=this;return i;function i(t){return fa.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ci(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Wa(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Ga={name:`labelStartImage`,resolveAll:Fa.resolveAll,tokenize:Ka};function Ka(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var qa={name:`labelStartLink`,resolveAll:Fa.resolveAll,tokenize:Ja};function Ja(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Ya={name:`lineEnding`,tokenize:Xa};function Xa(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var Za={name:`thematicBreak`,tokenize:Qa};function Qa(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var $a={continuation:{tokenize:ro},exit:ao,name:`list`,tokenize:no},eo={partial:!0,tokenize:oo},to={partial:!0,tokenize:io};function no(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:pi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Za,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return pi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Pi,r.interrupt?n:u,e.attempt(eo,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ro(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Pi,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(to,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt($a,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function io(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ao(e){e.exit(this.containerState.type)}function oo(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var so={name:`setextUnderline`,resolveTo:co,tokenize:lo};function co(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function lo(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var uo={tokenize:fo};function fo(e){let t=this,n=e.attempt(Pi,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oa,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var po={resolveAll:_o()},mo=go(`string`),ho=go(`text`);function go(e){return{resolveAll:_o(e===`text`?vo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function _o(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function vo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var yo=n({attentionMarkers:()=>Do,contentInitial:()=>xo,disable:()=>Oo,document:()=>bo,flow:()=>Co,flowInitial:()=>So,insideSpan:()=>Eo,string:()=>wo,text:()=>To}),bo={42:$a,43:$a,45:$a,48:$a,49:$a,50:$a,51:$a,52:$a,53:$a,54:$a,55:$a,56:$a,57:$a,62:Ii},xo={91:ha},So={[-2]:Ji,[-1]:Ji,32:Ji},Co={35:xa,42:Za,45:[so,Za],60:Ea,61:so,95:Za,96:Gi,126:Gi},wo={38:Hi,92:Bi},To={[-5]:Ya,[-4]:Ya,[-3]:Ya,33:Ga,38:Hi,42:Oi,60:[Mi,Na],91:qa,92:[ya,Bi],93:Fa,95:Oi,96:Qi},Eo={null:[Oi,po]},Do={null:[42,95]},Oo={null:[]};function ko(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(ee),check:S(x),consume:v,enter:y,exit:b,interrupt:S(x,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ni(o,e),g(),o[o.length-1]===null?(te(t,0),l.events=Di(a,l.events,l),l.events):[]}function f(e,t){return jo(p(e),t)}function p(e){return Ao(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,w()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,w()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function ee(e,t){te(e,t.from)}function x(e,t){t.restore()}function S(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=C(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function te(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ti(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function C(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ao(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function jo(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
50
+ `;break;case-3:o=`\r
51
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Mo(e){let t={constructs:ii([yo,...(e||{}).extensions||[]]),content:n(bi),defined:[],document:n(Si),flow:n(uo),lazy:{},string:n(mo),text:n(ho)};return t;function n(e){return n;function n(n){return ko(t,e,n)}}}function No(e){for(;!ia(e););return e}var Po=/[\0\t\n\r]/g;function Fo(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Po.lastIndex=u,c=Po.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Io=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lo(e){return e.replace(Io,Ro)}function Ro(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return si(n.slice(t?2:1),t?16:10)}return ei(n)||e}var zo={}.hasOwnProperty;function Bo(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Vo(n)(No(Mo(n).document().write(Fo()(e,t,!0))))}function Vo(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Se),autolinkProtocol:C,autolinkEmail:C,atxHeading:a(be),blockQuote:a(k),characterEscape:C,characterReference:C,codeFenced:a(A),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(A,o),codeText:a(_e,o),codeTextData:C,data:C,codeFlowValue:C,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ye),hardBreakEscape:a(j),hardBreakTrailing:a(j),htmlFlow:a(M,o),htmlFlowData:C,htmlText:a(M,o),htmlTextData:C,image:a(xe),label:o,link:a(Se),listItem:a(Ce),listItemValue:f,listOrdered:a(N,d),listUnordered:a(N),paragraph:a(we),reference:D,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(be),strong:a(P),thematicBreak:a(F)},exit:{atxHeading:c(),atxHeadingSequence:ee,autolink:c(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(_),codeText:c(ie),codeTextData:w,data:w,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(E),hardBreakTrailing:c(E),htmlFlow:c(ne),htmlFlowData:w,htmlText:c(re),htmlTextData:w,image:c(oe),label:ce,labelText:se,lineEnding:T,link:c(ae),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:O,resourceDestinationString:le,resourceTitleString:ue,resource:de,setextHeading:c(te),setextHeadingLineSequence:S,setextHeadingText:x,strong:c(),thematicBreak:c()}};Uo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];zo.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Go).call(a,void 0,e[0])}for(r.position={start:Ho(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ho(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ho(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Go).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+mr({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ho(e.end)}function u(){return Yr(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ci(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function x(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function te(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Te(),n.position={start:Ho(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ho(e.end)}function T(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ho(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),w.call(this,e))}function E(){this.data.atHardBreak=!0}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function se(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Lo(t),n.identifier=ci(t).toLowerCase()}function ce(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ue(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function de(){this.data.inReference=void 0}function D(){this.data.referenceType=`collapsed`}function O(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ci(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=si(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ei(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=Ho(e.end)}function he(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function k(){return{type:`blockquote`,children:[]}}function A(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function ve(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ye(){return{type:`emphasis`,children:[]}}function be(){return{type:`heading`,depth:0,children:[]}}function j(){return{type:`break`}}function M(){return{type:`html`,value:``}}function xe(){return{type:`image`,title:null,url:``,alt:null}}function Se(){return{type:`link`,title:null,url:``,children:[]}}function N(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function we(){return{type:`paragraph`,children:[]}}function P(){return{type:`strong`,children:[]}}function Te(){return{type:`text`,value:``}}function F(){return{type:`thematicBreak`}}}function Ho(e){return{line:e.line,column:e.column,offset:e.offset}}function Uo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Uo(e,r):Wo(e,r)}}function Wo(e,t){let n;for(n in t)if(zo.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Go(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+mr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mr({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+mr({start:t.start,end:t.end})+`) is still open`)}function Ko(e){let t=this;t.parser=n;function n(n){return Bo(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function qo(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Jo(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
52
+ `}]}function Yo(e,t){let n=t.value?t.value+`
53
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Xo(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zo(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qo(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=yi(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function $o(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function es(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ts(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ns(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ts(e,t);let i={src:yi(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function rs(e,t){let n={src:yi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function is(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function as(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ts(e,t);let i={href:yi(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function os(e,t){let n={href:yi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ss(e,t,n){let r=e.all(t),i=n?cs(n):ls(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
54
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
55
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function cs(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ls(n[r])}return t}function ls(e){return e.spread??e.children.length>1}function us(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function ds(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fs(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ps(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ms(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=dr(t.children[1]),o=ur(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function hs(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function gs(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var _s=9,vs=32;function ys(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(bs(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(bs(t.slice(i),i>0,!1)),a.join(``)}function bs(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===_s||t===vs;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===_s||t===vs;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function xs(e,t){let n={type:`text`,value:ys(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ss(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Cs={blockquote:qo,break:Jo,code:Yo,delete:Xo,emphasis:Zo,footnoteReference:Qo,heading:$o,html:es,imageReference:ns,image:rs,inlineCode:is,linkReference:as,link:os,listItem:ss,list:us,paragraph:ds,root:fs,strong:ps,table:ms,tableCell:gs,tableRow:hs,text:xs,thematicBreak:Ss,toml:ws,yaml:ws,definition:ws,footnoteDefinition:ws};function ws(){}var Ts=typeof self==`object`?self:globalThis,Es=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Ts[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Ts[a](o),i)};return r},Ds=e=>Es(new Map,e)(0),Os=``,{toString:ks}={},{keys:As}=Object,js=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ks.call(e).slice(8,-1);switch(n){case`Array`:return[1,Os];case`Object`:return[2,Os];case`Date`:return[3,Os];case`RegExp`:return[4,Os];case`Map`:return[5,Os];case`Set`:return[6,Os];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Ms=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ns=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=js(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of As(r))(e||!Ms(js(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ms(js(n))||Ms(js(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ms(js(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Ps=(e,{json:t,lossy:n}={})=>{let r=[];return Ns(!(t||n),!!t,new Map,r)(e),r},Fs=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Ds(Ps(e,t)):structuredClone(e):(e,t)=>Ds(Ps(e,t));function Is(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ls(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Rs(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Is,r=e.options.footnoteBackLabel||Ls,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=yi(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Fs(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
56
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
57
+ `}]}}var zs=(function(e){if(e==null)return Ws;if(typeof e==`function`)return Us(e);if(typeof e==`object`)return Array.isArray(e)?Bs(e):Vs(e);if(typeof e==`string`)return Hs(e);throw Error(`Expected function, string, or object as test`)});function Bs(e){let t=[],n=-1;for(;++n<e.length;)t[n]=zs(e[n]);return Us(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Vs(e){let t=e;return Us(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Hs(e){return Us(t);function t(t){return t&&t.type===e}}function Us(e){return t;function t(t,n,r){return!!(Gs(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ws(){return!0}function Gs(e){return typeof e==`object`&&!!e&&`type`in e}function Ks(e){return e}var qs=[];function Js(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=zs(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Ks(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=qs,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ys(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Ys(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?qs:[e]}function Xs(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Js(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Zs={}.hasOwnProperty,Qs={};function $s(e,t){let n=t||Qs,r=new Map,i=new Map,a={all:s,applyData:tc,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Cs,...n.handlers},one:o,options:n,patch:ec,wrap:rc};return Xs(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Zs.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Fs(n);return r.children=a.all(e),r}return Fs(e)}return(a.options.unknownHandler||nc)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=ic(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=ic(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function ec(e,t){e.position&&(t.position=pr(e))}function tc(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Fs(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function nc(e,t){let n=t.data||{},r=`value`in t&&!(Zs.call(n,`hProperties`)||Zs.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rc(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
58
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
59
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
60
+ `}),n}function ic(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ac(e,t){let n=$s(e,t),r=n.one(e,void 0),i=Rs(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
61
+ `},i)),a}function oc(e,t){return e&&`run`in e?async function(n,r){let i=ac(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ac(n,{file:r,...e||t})}}function sc(e){if(e)throw e}var cc=e(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function lc(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function uc(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?dc(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function dc(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var fc={basename:pc,dirname:mc,extname:hc,join:gc,sep:`/`};function pc(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);yc(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function mc(e){if(yc(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function hc(e){yc(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function gc(...e){let t=-1,n;for(;++t<e.length;)yc(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:_c(n)}function _c(e){yc(e);let t=e.codePointAt(0)===47,n=vc(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function vc(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function yc(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var bc={cwd:xc};function xc(){return`/`}function Sc(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Cc(e){if(typeof e==`string`)e=new URL(e);else if(!Sc(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return wc(e)}function wc(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Tc=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ec=class{constructor(e){let t;t=e?Sc(e)?{path:e}:typeof e==`string`||Ac(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:bc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Tc.length;){let e=Tc[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Tc.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?fc.basename(this.path):void 0}set basename(e){Oc(e,`basename`),Dc(e,`basename`),this.path=fc.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?fc.dirname(this.path):void 0}set dirname(e){kc(this.basename,`dirname`),this.path=fc.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?fc.extname(this.path):void 0}set extname(e){if(Dc(e,`extname`),kc(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=fc.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Sc(e)&&(e=Cc(e)),Oc(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?fc.basename(this.path,this.extname):void 0}set stem(e){Oc(e,`stem`),Dc(e,`stem`),this.path=fc.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Y(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Dc(e,t){if(e&&e.includes(fc.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+fc.sep+"`")}function Oc(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function kc(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Ac(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var jc=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Mc={}.hasOwnProperty,Nc=new class e extends jc{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=uc()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,cc.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Ic(`data`,this.frozen),this.namespace[e]=t,this):Mc.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ic(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=zc(e),n=this.parser||this.Parser;return Pc(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Pc(`process`,this.parser||this.Parser),Fc(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=zc(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Vc(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Pc(`processSync`,this.parser||this.Parser),Fc(`processSync`,this.compiler||this.Compiler),this.process(e,r),Rc(`processSync`,`process`,t),n;function r(e,r){t=!0,sc(e),n=r}}run(e,t,n){Lc(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=zc(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Rc(`runSync`,`run`,n),r;function i(e,t){sc(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=zc(t),r=this.compiler||this.Compiler;return Fc(`stringify`,r),Lc(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Ic(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,cc.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];lc(o)&&lc(r)&&(r=(0,cc.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Pc(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Fc(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Ic(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Lc(e){if(!lc(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Rc(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function zc(e){return Bc(e)?e:new Ec(e)}function Bc(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Vc(e){return typeof e==`string`||Hc(e)}function Hc(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Uc=bn(),Wc=[],Gc={allowDangerousHtml:!0},Kc=/^(https?|ircs?|mailto|xmpp)$/i,qc=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Jc(e){let t=Yc(e),n=Xc(e);return Zc(t.runSync(t.parse(n),n),e)}function Yc(e){let t=e.rehypePlugins||Wc,n=e.remarkPlugins||Wc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gc}:Gc;return Nc().use(Ko).use(n).use(oc,r).use(t)}function Xc(e){let t=e.children||``,n=new Ec;return typeof t==`string`?n.value=t:``+t,n}function Zc(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Qc;for(let e of qc)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),Xs(e,l),Tr(e,{Fragment:Uc.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Uc.jsx,jsxs:Uc.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in qr)if(Object.hasOwn(qr,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=qr[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Qc(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Kc.test(e.slice(0,t))?e:``}var $c={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},el=c.createContext&&c.createContext($c),tl=[`attr`,`size`,`title`];function nl(e,t){if(e==null)return{};var n,r,i=rl(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rl(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function il(){return il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},il.apply(null,arguments)}function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?al(Object(n),!0).forEach(function(t){sl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sl(e,t,n){return(t=cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e){var t=ll(e,`string`);return typeof t==`symbol`?t:t+``}function ll(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ul(e){return e&&e.map((e,t)=>c.createElement(e.tag,ol({key:t},e.attr),ul(e.child)))}function dl(e){return t=>c.createElement(fl,il({attr:ol({},e.attr)},t),ul(e.child))}function fl(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=nl(e,tl),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),c.createElement(`svg`,il({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:ol(ol({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&c.createElement(`title`,null,i),e.children)};return el===void 0?t($c):c.createElement(el.Consumer,null,e=>t(e))}function pl(e){return dl({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 1L13.001 4.06201C16.6192 4.51365 19.4869 7.38163 19.9381 11L23 11V13L19.938 13.001C19.4864 16.6189 16.6189 19.4864 13.001 19.938L13 23H11L11 19.9381C7.38163 19.4869 4.51365 16.6192 4.06201 13.001L1 13V11L4.06189 11C4.51312 7.38129 7.38129 4.51312 11 4.06189L11 1H13ZM12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6ZM12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10Z`},child:[]}]})(e)}function ml(e){return dl({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8.85352 11.7021H7.85449L7.03809 9.54297H3.77246L3.00439 11.7021H2L4.9541 4H5.88867L8.85352 11.7021ZM6.74268 8.73193L5.53418 5.4502C5.49479 5.34277 5.4554 5.1709 5.41602 4.93457H5.39453C5.35872 5.15299 5.31755 5.32487 5.271 5.4502L4.07324 8.73193H6.74268Z`},child:[]},{tag:`path`,attr:{d:`M13.756 11.7021H12.8752V10.8428H12.8537C12.4706 11.5016 11.9066 11.8311 11.1618 11.8311C10.6139 11.8311 10.1843 11.686 9.87273 11.396C9.56479 11.106 9.41082 10.721 9.41082 10.2412C9.41082 9.21354 10.016 8.61556 11.2262 8.44727L12.8752 8.21631C12.8752 7.28174 12.4974 6.81445 11.7419 6.81445C11.0794 6.81445 10.4815 7.04004 9.94793 7.49121V6.58887C10.4886 6.24512 11.1117 6.07324 11.8171 6.07324C13.1097 6.07324 13.756 6.75716 13.756 8.125V11.7021ZM12.8752 8.91992L11.5485 9.10254C11.1403 9.15983 10.8324 9.26188 10.6247 9.40869C10.417 9.55192 10.3132 9.80794 10.3132 10.1768C10.3132 10.4453 10.4081 10.6655 10.5978 10.8374C10.7912 11.0057 11.0472 11.0898 11.3659 11.0898C11.8027 11.0898 12.1626 10.9377 12.4455 10.6333C12.7319 10.3254 12.8752 9.93685 12.8752 9.46777V8.91992Z`},child:[]}]})(e)}export{wt as a,pt as c,de as d,le as f,bn as i,ft as l,E as m,pl as n,_t as o,se as p,Jc as r,mt as s,ml as t,R as u};