Files
misode.github.io/assets/index.d18e5316.js
2022-05-08 14:25:37 +00:00

113 lines
366 KiB
JavaScript

var cu=Object.defineProperty,uu=Object.defineProperties;var du=Object.getOwnPropertyDescriptors;var Rr=Object.getOwnPropertySymbols;var to=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable;var eo=(e,t,n)=>t in e?cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))to.call(t,n)&&eo(e,n,t[n]);if(Rr)for(var n of Rr(t))no.call(t,n)&&eo(e,n,t[n]);return e},ye=(e,t)=>uu(e,du(t));var ji=e=>typeof e=="symbol"?e:e+"",ro=(e,t)=>{var n={};for(var r in e)to.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rr)for(var r of Rr(e))t.indexOf(r)<0&&no.call(e,r)&&(n[r]=e[r]);return n};const hu=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};hu();var U,Qn,Ra,io,Pa,ni={},ks=[],fu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Pt(e,t){for(var n in t)e[n]=t[n];return e}function $a(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var r,i,s,o=arguments,a={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return er(e,a,r,i,null)}function er(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++U.__v:i};return U.vnode!=null&&U.vnode(s),s}function pu(){return{current:null}}function te(e){return e.children}function mt(e,t){this.props=e,this.context=t}function sr(e,t){if(t==null)return e.__?sr(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?sr(e):null}function Da(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Da(e)}}function es(e){(!e.__d&&(e.__d=!0)&&Qn.push(e)&&!ri.__r++||io!==U.debounceRendering)&&((io=U.debounceRendering)||Ra)(ri)}function ri(){for(var e;ri.__r=Qn.length;)e=Qn.sort(function(t,n){return t.__v.__b-n.__v.__b}),Qn=[],e.some(function(t){var n,r,i,s,o,a;t.__d&&(o=(s=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Pt({},s)).__v=s.__v+1,Ss(a,s,i,n.__n,a.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o==null?sr(s):o,s.__h),ja(r,s),s.__e!=o&&Da(s)))})}function Ba(e,t,n,r,i,s,o,a,l,u){var c,h,p,d,w,v,g,_=r&&r.__k||ks,y=_.length;for(n.__k=[],c=0;c<t.length;c++)if((d=n.__k[c]=(d=t[c])==null||typeof d=="boolean"?null:typeof d=="string"||typeof d=="number"||typeof d=="bigint"?er(null,d,null,null,d):Array.isArray(d)?er(te,{children:d},null,null,null):d.__b>0?er(d.type,d.props,d.key,null,d.__v):d)!=null){if(d.__=n,d.__b=n.__b+1,(p=_[c])===null||p&&d.key==p.key&&d.type===p.type)_[c]=void 0;else for(h=0;h<y;h++){if((p=_[h])&&d.key==p.key&&d.type===p.type){_[h]=void 0;break}p=null}Ss(e,d,p=p||ni,i,s,o,a,l,u),w=d.__e,(h=d.ref)&&p.ref!=h&&(g||(g=[]),p.ref&&g.push(p.ref,null,d),g.push(h,d.__c||w,d)),w!=null?(v==null&&(v=w),typeof d.type=="function"&&d.__k!=null&&d.__k===p.__k?d.__d=l=Fa(d,l,e):l=za(e,d,p,_,w,l),u||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&p.__e==l&&l.parentNode!=e&&(l=sr(p))}for(n.__e=v,c=y;c--;)_[c]!=null&&(typeof n.type=="function"&&_[c].__e!=null&&_[c].__e==n.__d&&(n.__d=sr(r,c+1)),Ha(_[c],_[c]));if(g)for(c=0;c<g.length;c++)Va(g[c],g[++c],g[++c])}function Fa(e,t,n){var r,i;for(r=0;r<e.__k.length;r++)(i=e.__k[r])&&(i.__=e,t=typeof i.type=="function"?Fa(i,t,n):za(n,i,i,e.__k,i.__e,t));return t}function gt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){gt(n,t)}):t.push(e)),t}function za(e,t,n,r,i,s){var o,a,l;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function mu(e,t,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in t||ii(e,s,null,n[s],r);for(s in t)i&&typeof t[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===t[s]||ii(e,s,t[s],n[s],r)}function so(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||fu.test(t)?n:n+"px"}function ii(e,t,n,r,i){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||so(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||so(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?ao:oo,s):e.removeEventListener(t,s?ao:oo,s);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function oo(e){this.l[e.type+!1](U.event?U.event(e):e)}function ao(e){this.l[e.type+!0](U.event?U.event(e):e)}function Ss(e,t,n,r,i,s,o,a,l){var u,c,h,p,d,w,v,g,_,y,m,b=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(u=U.__b)&&u(t);try{e:if(typeof b=="function"){if(g=t.props,_=(u=b.contextType)&&r[u.__c],y=u?_?_.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in b&&b.prototype.render?t.__c=c=new b(g,y):(t.__c=c=new mt(g,y),c.constructor=b,c.render=_u),_&&_.sub(c),c.props=g,c.state||(c.state={}),c.context=y,c.__n=r,h=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),b.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Pt({},c.__s)),Pt(c.__s,b.getDerivedStateFromProps(g,c.__s))),p=c.props,d=c.state,h)b.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b.getDerivedStateFromProps==null&&g!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,y),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,y)===!1||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,y),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,d,w)})}c.context=y,c.props=g,c.state=c.__s,(u=U.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,c.getChildContext!=null&&(r=Pt(Pt({},r),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(w=c.getSnapshotBeforeUpdate(p,d)),m=u!=null&&u.type===te&&u.key==null?u.props.children:u,Ba(e,Array.isArray(m)?m:[m],t,n,r,i,s,o,a,l),c.base=t.__e,t.__h=null,c.__h.length&&o.push(c),v&&(c.__E=c.__=null),c.__e=!1}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=gu(n.__e,t,n,r,i,s,o,l);(u=U.diffed)&&u(t)}catch(A){t.__v=null,(l||s!=null)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),U.__e(A,t,n)}}function ja(e,t){U.__c&&U.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){U.__e(r,n.__v)}})}function gu(e,t,n,r,i,s,o,a){var l,u,c,h,p=n.props,d=t.props,w=t.type,v=0;if(w==="svg"&&(i=!0),s!=null){for(;v<s.length;v++)if((l=s[v])&&(l===e||(w?l.localName==w:l.nodeType==3))){e=l,s[v]=null;break}}if(e==null){if(w===null)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,d.is&&d),s=null,a=!1}if(w===null)p===d||a&&e.data===d||(e.data=d);else{if(s=s&&ks.slice.call(e.childNodes),u=(p=n.props||ni).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!a){if(s!=null)for(p={},h=0;h<e.attributes.length;h++)p[e.attributes[h].name]=e.attributes[h].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(mu(e,d,p,i,a),c)t.__k=[];else if(v=t.props.children,Ba(e,Array.isArray(v)?v:[v],t,n,r,i&&w!=="foreignObject",s,o,e.firstChild,a),s!=null)for(v=s.length;v--;)s[v]!=null&&$a(s[v]);a||("value"in d&&(v=d.value)!==void 0&&(v!==e.value||w==="progress"&&!v)&&ii(e,"value",v,p.value,!1),"checked"in d&&(v=d.checked)!==void 0&&v!==e.checked&&ii(e,"checked",v,p.checked,!1))}return e}function Va(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){U.__e(r,n)}}function Ha(e,t,n){var r,i,s;if(U.unmount&&U.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Va(r,null,t)),n||typeof e.type=="function"||(n=(i=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){U.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Ha(r[s],t,n);i!=null&&$a(i)}function _u(e,t,n){return this.constructor(e,n)}function In(e,t,n){var r,i,s;U.__&&U.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],Ss(t,e=(!r&&n||t).__k=f(te,null,[e]),i||ni,ni,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?ks.slice.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),ja(s,e)}function Ua(e,t){In(e,t,Ua)}function Ga(e,t,n){var r,i,s,o=arguments,a=Pt({},e.props);for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);return n!=null&&(a.children=n),er(e.type,a,r||e.key,i||e.ref,null)}function Dn(e,t){var n={__c:t="__cC"+Pa++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(es)},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}U={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(s){e=s}throw e},__v:0},mt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Pt({},this.state),typeof e=="function"&&(e=e(Pt({},n),this.props)),e&&Pt(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),es(this))},mt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),es(this))},mt.prototype.render=te,Qn=[],Ra=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ri.__r=0,Pa=0;var vu={};function Ya(e,t){for(var n in t)e[n]=t[n];return e}function Wa(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),s={},o;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");s[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=ts(e.replace(r,"")),t=ts(t||"");for(var c=Math.max(e.length,t.length),h=0;h<c;h++)if(t[h]&&t[h].charAt(0)===":"){var p=t[h].replace(/(^:|[+*?]+$)/g,""),d=(t[h].match(/[+*?]+$/)||vu)[0]||"",w=~d.indexOf("+"),v=~d.indexOf("*"),g=e[h]||"";if(!g&&!v&&(d.indexOf("?")<0||w)){o=!1;break}if(s[p]=decodeURIComponent(g),w||v){s[p]=e.slice(h).map(decodeURIComponent).join("/");break}}else if(t[h]!==e[h]){o=!1;break}return n.default!==!0&&o===!1?!1:s}function wu(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function yu(e,t){return e.index=t,e.rank=Au(e),e.props}function ts(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function bu(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function xu(e){return ts(e).map(bu).join("")}function Au(e){return e.props.default?0:xu(e.props.path)}var tt=null,Kt=[],ns=[],ku={};function Su(e,t){t===void 0&&(t="push"),tt&&tt[t]?tt[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Cn(){var e;return tt&&tt.location?e=tt.location:tt&&tt.getCurrentLocation?e=tt.getCurrentLocation():e=typeof location!="undefined"?location:ku,""+(e.pathname||"")+(e.search||"")}function Yt(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),Eu(e)&&Su(e,t?"replace":"push"),qa(e)}function Eu(e){for(var t=Kt.length;t--;)if(Kt[t].canRoute(e))return!0;return!1}function qa(e){for(var t=!1,n=0;n<Kt.length;n++)Kt[n].routeTo(e)===!0&&(t=!0);for(var r=ns.length;r--;)ns[r](e);return t}function Za(e){if(!(!e||!e.getAttribute)){var t=e.getAttribute("href"),n=e.getAttribute("target");if(!(!t||!t.match(/^\//g)||n&&!n.match(/^_?self$/i)))return Yt(t)}}function Iu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return Za(e.currentTarget||e.target||this),Xa(e)}function Xa(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Cu(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0)){var t=e.target;do if(String(t.nodeName).toUpperCase()==="A"&&t.getAttribute("href")){if(t.hasAttribute("native"))return;if(Za(t))return Xa(e)}while(t=t.parentNode)}}var lo=!1;function Mu(){lo||(typeof addEventListener=="function"&&(tt||addEventListener("popstate",function(){qa(Cn())}),addEventListener("click",Cu)),lo=!0)}var Dt=function(e){function t(n){e.call(this,n),n.history&&(tt=n.history),this.state={url:n.url||Cn()},Mu()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(r){return r.static!==!0?!0:r.url!==this.props.url||r.onChange!==this.props.onChange},t.prototype.canRoute=function(r){var i=gt(this.props.children);return this.getMatchingChildren(i,r,!1).length>0},t.prototype.routeTo=function(r){this.setState({url:r});var i=this.canRoute(r);return this.updating||this.forceUpdate(),i},t.prototype.componentWillMount=function(){Kt.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;tt&&(this.unlisten=tt.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),Kt.splice(Kt.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,s){return r.filter(yu).sort(wu).map(function(o){var a=Wa(i,o.props.path,o.props);if(a){if(s!==!1){var l={url:i,matches:a};return Ya(l,a),delete l.ref,delete l.key,Ga(o,l)}return o}}).filter(Boolean)},t.prototype.render=function(r,i){var s=r.children,o=r.onChange,a=i.url,l=this.getMatchingChildren(gt(s),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof o=="function"&&o({router:this,url:a,previous:c,active:l,current:u})),u},t}(mt),Ja=function(e){return f("a",Ya({onClick:Iu},e))},Ou=function(e){return f(e.component,e)};Dt.subscribers=ns;Dt.getCurrentUrl=Cn;Dt.route=Yt;Dt.Router=Dt;Dt.Route=Ou;Dt.Link=Ja;Dt.exec=Wa;var Me;(e=>{const t="Site",n="Generator";function u(m,b,A){ga("send","event",m,b,A)}function c(m,b){ga("set",`dimension${m}`,b)}function h(m){ga("set","page",m),ga("send","pageview")}e.pageview=h;function p(m){c(4,m),u(t,"set-language",m)}e.setLanguage=p;function d(m){c(1,m),u(t,"set-theme",m)}e.setTheme=d;function w(m){c(3,m),u(n,"set-version",m)}e.setVersion=w;function v(m){c(5,m),u(n,"set-preview",m)}e.setPreview=v;function g(m){c(6,m)}e.setGenerator=g;function _(m){c(7,m)}e.setPrefersColorScheme=_;function y(m,b){u(n,m,b)}e.generatorEvent=y})(Me||(Me={}));var ln,De,co,Mn=0,rs=[],uo=U.__b,ho=U.__r,fo=U.diffed,po=U.__c,mo=U.unmount;function Bn(e,t){U.__h&&U.__h(De,e,Mn||t),Mn=0;var n=De.__H||(De.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function $(e){return Mn=1,Ka(tl,e)}function Ka(e,t,n){var r=Bn(ln++,2);return r.t=e,r.__c||(r.__=[n?n(t):tl(void 0,t),function(i){var s=r.t(r.__[0],i);r.__[0]!==s&&(r.__=[s,r.__[1]],r.__c.setState({}))}],r.__c=De),r.__}function Q(e,t){var n=Bn(ln++,3);!U.__s&&Es(n.__H,t)&&(n.__=e,n.__H=t,De.__H.__h.push(n))}function Qa(e,t){var n=Bn(ln++,4);!U.__s&&Es(n.__H,t)&&(n.__=e,n.__H=t,De.__h.push(n))}function me(e){return Mn=5,be(function(){return{current:e}},[])}function Tu(e,t,n){Mn=6,Qa(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function be(e,t){var n=Bn(ln++,7);return Es(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ie(e,t){return Mn=8,be(function(){return e},t)}function Fn(e){var t=De.context[e.__c],n=Bn(ln++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(De)),t.props.value):e.__}function Nu(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function el(e){var t=Bn(ln++,10),n=$();return t.__=e,De.componentDidCatch||(De.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Lu(){rs.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Ur),e.__H.__h.forEach(is),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}),rs=[]}U.__b=function(e){De=null,uo&&uo(e)},U.__r=function(e){ho&&ho(e),ln=0;var t=(De=e.__c).__H;t&&(t.__h.forEach(Ur),t.__h.forEach(is),t.__h=[])},U.diffed=function(e){fo&&fo(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(rs.push(t)!==1&&co===U.requestAnimationFrame||((co=U.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(s),go&&cancelAnimationFrame(r),setTimeout(n)},s=setTimeout(i,100);go&&(r=requestAnimationFrame(i))})(Lu)),De=void 0},U.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ur),n.__h=n.__h.filter(function(r){return!r.__||is(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],U.__e(r,n.__v)}}),po&&po(e,t)},U.unmount=function(e){mo&&mo(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ur)}catch(n){U.__e(n,t.__v)}};var go=typeof requestAnimationFrame=="function";function Ur(e){var t=De;typeof e.__c=="function"&&e.__c(),De=t}function is(e){var t=De;e.__c=e.__(),De=t}function Es(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function tl(e,t){return typeof t=="function"?t(e):t}function vr({type:e,id:t}){return Q(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&&ethicalads.load()},[]),f("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function q({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:s,onClick:o}){return f("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${s!=null?s:"sw"}`:""}${n?" tip-shown":""}`,onClick:o,"aria-label":i},e&&ie[e],t&&f("span",null,t))}var Pr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function nl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var D={},It={},kt={};Object.defineProperty(kt,"__esModule",{value:!0});kt.ModelPath=kt.Path=kt.relativePath=void 0;function Ru(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}kt.relativePath=Ru;class Ot{constructor(t,n){this.modelArr=t!=null?t:[],this.contextArr=n!=null?n:[]}last(){return this.modelArr[this.modelArr.length-1]}slice(t,n){return new Ot(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Ot(this.modelArr.slice(1),this.contextArr)}pop(){return new Ot(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Ot([...this.modelArr,t],[...this.contextArr])}contextPush(t){if(typeof t=="number")return this.copy();const n=t.startsWith("minecraft:")?t.slice(10):t;return new Ot([...this.modelArr],[...this.contextArr,n])}copy(){return new Ot([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Tt(t,this)}getContext(){return this.contextArr}equals(t){return t.modelArr.length===this.modelArr.length&&t.modelArr.every((n,r)=>n===this.modelArr[r])}startsWith(t){return this.modelArr.length<t.modelArr.length?!1:t.modelArr.every((n,r)=>n===this.modelArr[r])}endsWith(t){const n=this.modelArr.length-t.modelArr.length;return n<0?!1:t.modelArr.every((r,i)=>r===this.modelArr[n+i])}toString(){return this.modelArr.map(t=>typeof t=="string"?`.${t}`:`[${t}]`).join("").replace(/^\./,"")}forEach(t,n){return this.modelArr.forEach(t,n)}}kt.Path=Ot;class Tt extends Ot{constructor(t,n){super(n==null?void 0:n.modelArr,n==null?void 0:n.contextArr),this.model=t}getModel(){return this.model}get(){var t;return(t=this.model)===null||t===void 0?void 0:t.get(this)}set(t){var n;(n=this.model)===null||n===void 0||n.set(this,t)}slice(t,n){return new Tt(this.model,super.slice(t,n))}shift(){return new Tt(this.model,super.shift())}pop(){return new Tt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Tt(this.model,super.modelPush(t))}contextPush(t){return new Tt(this.model,super.contextPush(t))}copy(){return new Tt(this.model,super.copy())}}kt.ModelPath=Tt;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});zn.Errors=void 0;class Pu{constructor(){this.errors=[]}add(t,n,...r){return this.errors.push({path:t,error:n,params:r}),!1}get(t,n=!1){return n?this.errors.filter(r=>r.path.equals(t)):this.errors.filter(r=>r.path.startsWith(t))}getAll(){return this.errors}clear(){this.errors=[]}count(){return this.errors.length}*[Symbol.iterator](){for(const t of this.errors)yield t}}zn.Errors=Pu;var St={};Object.defineProperty(St,"__esModule",{value:!0});St.hexId=St.quoteString=St.escapeString=void 0;function rl(e){return e.replace(/(\\|")/g,"\\$1")}St.escapeString=rl;function $u(e){return`"${rl(e)}"`}St.quoteString=$u;const Du=e=>("0"+e.toString(16)).substr(-2);function Bu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Du).join("")}St.hexId=Bu;Object.defineProperty(It,"__esModule",{value:!0});It.DataModel=void 0;const Fu=kt,_o=zn,Vi=St;class Is{constructor(t,n){var r,i,s,o;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(s=n==null?void 0:n.wrapLists)!==null&&s!==void 0?s:!1,this.schema=t;const a=(o=n==null?void 0:n.initialData)!==null&&o!==void 0?o:t.default();this.data=this.wrapLists?Is.wrapLists(a):a,this.listeners=[],this.errors=new _o.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(s=>{(i[s]===void 0||typeof i[s]=="string"||typeof i[s]=="number")&&(this.wrapLists&&typeof s=="number"?i[s]={node:{},id:(0,Vi.hexId)()}:i[s]={}),this.wrapLists&&typeof s=="number"?i=i[s].node:i=i[s]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,Vi.hexId)()}:i[t.last()]=n,!r&&(this.verbose&&console.log("Set",t.toString(),JSON.stringify(n)),this.validate(!0),this.invalidate()))}undo(){this.historyIndex>0&&(this.historyIndex-=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}redo(){this.historyIndex<this.history.length-1&&(this.historyIndex+=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}validate(t){var n;const r=new Fu.Path().withModel(this);this.errors.clear(),this.data=(n=this.schema.validate(r,this.data,this.errors,{loose:t,wrapLists:this.wrapLists}))!==null&&n!==void 0?n:{}}error(t,n,...r){const i=new _o.Errors;i.add(t,n,r),this.listeners.forEach(s=>{s.errors&&s.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,Vi.hexId)()}));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.wrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}static unwrapLists(t){if(Array.isArray(t)){const n=t.map(r=>this.unwrapLists(r.node));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.unwrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}}It.DataModel=Is;var Vt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:s=>s,suggest:()=>[],validate:(s,o)=>o,validationOption:()=>{},hook(s,o,...a){return s.base({node:this},o,...a)},canUpdate:()=>!1,update:()=>[]};const t=(s,o)=>J(J({},s),typeof o=="function"?o(s):o);e.Mod=t;const n=(s,o)=>(0,e.Mod)(o,{enabled:a=>a.push(s).get()!==void 0});e.Has=n;function r(s){return ye(J({},s),{optional:()=>!0})}e.Opt=r;function i(s){return ye(J({},s),{keep:()=>!0})}e.Keep=i})(Vt);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.BooleanNode=void 0;const zu=It,ju=Vt,Vu=()=>ye(J({},ju.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?zu.DataModel.wrapLists(this.default()):this.default()),(typeof t!="boolean"||t===void 0)&&n.add(e,"error.expected_boolean"),t},hook(e,t,...n){var r;return((r=e.boolean)!==null&&r!==void 0?r:e.base).call(e,{node:this},t,...n)}});Ai.BooleanNode=Vu;var il={},wr={};Object.defineProperty(wr,"__esModule",{value:!0});wr.ListNode=void 0;const Hu=It,Uu=Vt,Gu=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,s=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,o=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return ye(J({},Uu.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,l){const u=l+1;return a.getArray().length<=u?this:e.navigate(a,u)},pathPush(a,l){return a.push(parseInt(l.toString())).contextPush("entry")},validate(a,l,u,c){if(c.loose&&!Array.isArray(l)&&(l=c.wrapLists?Hu.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))o&&(l.length<i||l.length>s)?i===s?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,s):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>s&&u.add(a,"error.invalid_list_range.larger",l.length,s);else return u.add(a,"error.expected_list"),l;const h=l.map((p,d)=>{const w=e.validate(a.push(d),c.wrapLists?p.node:p,u,c);return c.wrapLists?{node:w,id:p.id}:w});for(const p of Object.getOwnPropertySymbols(l))h[p]=l[p];return h},hook(a,l,...u){var c;return((c=a.list)!==null&&c!==void 0?c:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},l,...u)}})};wr.ListNode=Gu;var yr={};Object.defineProperty(yr,"__esModule",{value:!0});yr.SwitchNode=void 0;const Yu=Vt,Wu=e=>ye(J({},Yu.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(s=>s.match(t)).map(s=>s.node.suggest(t,n)).reduce((s,o)=>s.concat(o))},validate(t,n,r,i){let s=this.activeCase(t);return s===void 0?n:s.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(s,o)=>{var a,l;return((a=o.priority)!==null&&a!==void 0?a:0)-((l=s.priority)!==null&&l!==void 0?l:0)},i=e.filter(s=>s.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});yr.SwitchNode=Wu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=wr,n=yr,r=(o,a)=>{const l=(c,h)=>{if(c.match)return c.match(h);switch(c.type){case"list":return Array.isArray(h);case"object":return typeof h=="object"&&!Array.isArray(h);default:return typeof h===c.type}},u=(0,n.SwitchNode)(o.map(c=>({type:c.type,priority:c.priority,match:h=>l(c,h.get()),node:c.node})));return ye(J({},u),{validate(c,h,p,d){let w=u.activeCase(c,!0);return w.node.optional()?h:w.node.validate(c,h,p,d)},hook(c,h,...p){var d;return((d=c.choice)!==null&&d!==void 0?d:c.base).call(c,{node:this,choices:o,config:a!=null?a:{},switchNode:u},h,...p)}})};e.ChoiceNode=r;const i=o=>(a,l)=>(0,e.ChoiceNode)([{type:o,node:a,change:u=>{var c;return(c=u[0])!==null&&c!==void 0?c:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const s=(o,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:o,change:u=>Object.keys(l)[0]},{type:"object",node:a,change:u=>{var c;return(c=l[u])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=s})(il);var ki={};Object.defineProperty(ki,"__esModule",{value:!0});ki.MapNode=void 0;const qu=Vt,Zu=It,Xu=(e,t,n)=>ye(J({},qu.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const s=i+1;return r.getArray().length<=s?this:t.navigate(r,s)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,s,o){if(o.loose&&typeof i!="object"&&(i=o.wrapLists?Zu.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return s.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,s,o),a[l]=t.validate(r.push(l),i[l],s,o)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...s){var o;return((o=r.map)!==null&&o!==void 0?o:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...s)}});ki.MapNode=Xu;var sl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=D,n=It,r=Vt,i=o=>{var a,l,u;const c=o!=null&&o.color?!0:(a=o==null?void 0:o.integer)!==null&&a!==void 0?a:!1,h=o!=null&&o.color?0:(l=o==null?void 0:o.min)!==null&&l!==void 0?l:-1/0,p=o!=null&&o.color?16777215:(u=o==null?void 0:o.max)!==null&&u!==void 0?u:1/0,d=(o==null?void 0:o.min)!==void 0&&(o==null?void 0:o.max)!==void 0;return ye(J({},r.Base),{type:()=>"number",default:()=>h>0?h:0,validate(w,v,g,_){return _.loose&&typeof v!="number"&&(v=_.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof v!="number"?g.add(w,"error.expected_number"):c&&!Number.isInteger(v)?g.add(w,"error.expected_integer"):d&&(v<h||v>p)?g.add(w,"error.invalid_number_range.between",v,h,p):v<h?g.add(w,"error.invalid_number_range.smaller",v,h):v>p&&g.add(w,"error.invalid_number_range.larger",v,p),v},hook(w,v,...g){var _;return((_=w.number)!==null&&_!==void 0?_:w.base).call(w,{node:this,integer:c,min:h,max:p,between:d,config:o!=null?o:{}},v,...g)}})};e.NumberNode=i;const s=({integer:o,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:o}),l=>({validate:(u,c,h,p)=>(c=l.validate(u,c,h,p),a.includes(c)||h.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=s})(sl);var ol={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Vt,n=kt,r=zn,i=St,s=It;e.Switch=Symbol("switch"),e.Case=Symbol("case");const o=(a,l)=>{var w,v;const g=a,{[w=e.Switch]:u,[v=e.Case]:c}=g,h=ro(g,[ji(w),ji(v)]),p=_=>{if(u===void 0)return h;const y=(0,n.relativePath)(_,u).get(),m=c[y];return J(J({},h),m)},d=(_,y)=>{var m;const b=u?(0,n.relativePath)(_,u).get():void 0,A=u?(m=c[b])!==null&&m!==void 0?m:{}:{},k=Object.keys(A),S=l!=null&&l.context?new n.ModelPath(_.getModel(),new n.Path(_.getArray(),[l.context])):_;return(!(l!=null&&l.disableSwitchContext)&&b&&k.includes(y)?S.contextPush(b):S).push(y)};return ye(J({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(_,y){const m=y+1,b=_.getArray();if(b.length<=m)return this;const k=p(_.slice(0,m))[b[m]];return k==null?void 0:k.navigate(_,m)},pathPush(_,y){return d(_,y.toString())},suggest(_,y){const m=p(_),b=Object.keys(typeof y=="object"?y:{});return Object.keys(m).filter(A=>m[A].enabled(_)).filter(A=>!b.includes(A)).map(i.quoteString)},validate(_,y,m,b){if(b.loose&&typeof y!="object"&&(y=b.wrapLists?s.DataModel.wrapLists(this.default()):this.default()),typeof y!="object"||y===null)return m.add(_,"error.expected_object"),y;let A=h;if(u){const M=(0,n.relativePath)(_,u);let N=M.get();if(_.equals(M.pop())){const B=M.last();N=h[B].validate(_.push(B),y[B],new r.Errors,b)}A=J(J({},A),c[N])}const k=Object.keys(A),S=k.filter(M=>!A[M].optional()),I=new Set([...S,...Object.keys(y)]),C={};I.forEach(M=>{if(k.includes(M)){if(!A[M].enabled(_))return;const N=A[M].validate(_.push(M),y[M],m,b);!A[M].keep()&&A[M].optional()&&(N===void 0||Array.isArray(N)&&N.length===0||N.constructor===Object&&Object.keys(N).length===0)?delete C[M]:(C[M]=N,_.getModel().set(_.push(M),N,!0))}else C[M]=y[M]});for(const M of Object.getOwnPropertySymbols(y))C[M]=y[M];return C},hook(_,y,...m){var b;return((b=_.object)!==null&&b!==void 0?b:_.base).call(_,{node:this,fields:h,config:l!=null?l:{},filter:u,cases:c,getActiveFields:p,getChildModelPath:d},y,...m)}})};e.ObjectNode=o})(ol);var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.Reference=void 0;const Ju=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,s){return e.get(t).validate.bind(this)(n,r,i,s)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});Si.Reference=Ju;var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.StringNode=void 0;const Ku=Vt,Qu=St,ed=It,vo=e=>!!(e!=null&&e.enum),wo=e=>!!(e!=null&&e.validator),td=(e,t)=>{const n=()=>{var r,i,s,o;if(vo(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(s=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&s!==void 0?s:[]:[],...(o=e==null?void 0:e.get(a))!==null&&o!==void 0?o:[]]}return t.params.pool}return[]};return ye(J({},Ku.Base),{type:()=>"string",default:()=>"",validate(r,i,s,o){if(o.loose&&typeof i!="string"&&(i=(o.wrapLists?ed.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return s.add(r,"error.expected_string"),i;if(wo(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return s.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return s.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return s.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return s.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||t.params.isDefinition||t.params.allowUnknown))return i}if(vo(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&s.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Qu.quoteString),validationOption(){return wo(t)?t:void 0},hook(r,i,...s){var o;return((o=r.string)!==null&&o!==void 0?o:r.base).call(r,{node:this,getValues:n,config:t},i,...s)}})};Ei.StringNode=td;var al={};Object.defineProperty(al,"__esModule",{value:!0});var On={};Object.defineProperty(On,"__esModule",{value:!0});On.CollectionRegistry=On.SchemaRegistry=void 0;class nd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.error(`Tried to access schema "${t}", but that doesn't exist.`),n}}On.SchemaRegistry=nd;class rd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.warn(`Tried to access collection "${t}", but that doesn't exist.`),n!=null?n:[]}}On.CollectionRegistry=rd;var ll={};Object.defineProperty(ll,"__esModule",{value:!0});(function(e){var t=Pr&&Pr.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=Pr&&Pr.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(It,e),n(kt,e),n(zn,e),n(Vt,e),n(Ai,e),n(il,e),n(wr,e),n(ki,e),n(sl,e),n(ol,e),n(Si,e),n(Ei,e),n(yr,e),n(al,e),n(On,e),n(ll,e)})(D);var Ee={},br={},ct={};function cl(e){return typeof e=="undefined"||e===null}function id(e){return typeof e=="object"&&e!==null}function sd(e){return Array.isArray(e)?e:cl(e)?[]:[e]}function od(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function ad(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function ld(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ct.isNothing=cl;ct.isObject=id;ct.toArray=sd;ct.repeat=ad;ct.isNegativeZero=ld;ct.extend=od;function or(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}or.prototype=Object.create(Error.prototype);or.prototype.constructor=or;or.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var xr=or,yo=ct;function Cs(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}Cs.prototype.getSnippet=function(t,n){var r,i,s,o,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(s="",o=this.position;o<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>n/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),yo.repeat(" ",t)+r+a+s+`
`+yo.repeat(" ",t+this.position-i+r.length)+"^"};Cs.prototype.toString=function(t){var n,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(r+=`:
`+n)),r};var cd=Cs,bo=xr,ud=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dd=["scalar","sequence","mapping"];function hd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function fd(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(ud.indexOf(n)===-1)throw new bo('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=hd(t.styleAliases||null),dd.indexOf(this.kind)===-1)throw new bo('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var $e=fd,xo=ct,Gr=xr,pd=$e;function ss(e,t,n){var r=[];return e.include.forEach(function(i){n=ss(i,t,n)}),e[t].forEach(function(i){n.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&r.push(o)}),n.push(i)}),n.filter(function(i,s){return r.indexOf(s)===-1})}function md(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,n;function r(i){e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function wn(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Gr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=ss(this,"implicit",[]),this.compiledExplicit=ss(this,"explicit",[]),this.compiledTypeMap=md(this.compiledImplicit,this.compiledExplicit)}wn.DEFAULT=null;wn.create=function(){var t,n;switch(arguments.length){case 1:t=wn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Gr("Wrong number of arguments for Schema.create function")}if(t=xo.toArray(t),n=xo.toArray(n),!t.every(function(r){return r instanceof wn}))throw new Gr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof pd}))throw new Gr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new wn({include:t,explicit:n})};var jn=wn,gd=$e,_d=new gd("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),vd=$e,wd=new vd("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),yd=$e,bd=new yd("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),xd=jn,Ms=new xd({explicit:[_d,wd,bd]}),Ad=$e;function kd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Sd(){return null}function Ed(e){return e===null}var Id=new Ad("tag:yaml.org,2002:null",{kind:"scalar",resolve:kd,construct:Sd,predicate:Ed,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Cd=$e;function Md(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Od(e){return e==="true"||e==="True"||e==="TRUE"}function Td(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Nd=new Cd("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Md,construct:Od,predicate:Td,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),Ld=ct,Rd=$e;function Pd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function $d(e){return 48<=e&&e<=55}function Dd(e){return 48<=e&&e<=57}function Bd(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Pd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!$d(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(i===":")break;if(!Dd(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Fd(e){var t=e,n=1,r,i,s=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(o){s.unshift(parseInt(o,10))}),t=0,i=1,s.forEach(function(o){t+=o*i,i*=60}),n*t):n*parseInt(t,10)}function zd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ld.isNegativeZero(e)}var jd=new Rd("tag:yaml.org,2002:int",{kind:"scalar",resolve:Bd,construct:Fd,predicate:zd,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ul=ct,Vd=$e,Hd=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ud(e){return!(e===null||!Hd.test(e)||e[e.length-1]==="_")}function Gd(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))}),t=0,r=1,i.forEach(function(s){t+=s*r,r*=60}),n*t):n*parseFloat(t,10)}var Yd=/^[-+]?[0-9]+e/;function Wd(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ul.isNegativeZero(e))return"-0.0";return n=e.toString(10),Yd.test(n)?n.replace("e",".e"):n}function qd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ul.isNegativeZero(e))}var Zd=new Vd("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ud,construct:Gd,predicate:qd,represent:Wd,defaultStyle:"lowercase"}),Xd=jn,dl=new Xd({include:[Ms],implicit:[Id,Nd,jd,Zd]}),Jd=jn,hl=new Jd({include:[dl]}),Kd=$e,fl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Qd(e){return e===null?!1:fl.exec(e)!==null||pl.exec(e)!==null}function eh(e){var t,n,r,i,s,o,a,l=0,u=null,c,h,p;if(t=fl.exec(e),t===null&&(t=pl.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],h=+(t[11]||0),u=(c*60+h)*6e4,t[9]==="-"&&(u=-u)),p=new Date(Date.UTC(n,r,i,s,o,a,l)),u&&p.setTime(p.getTime()-u),p}function th(e){return e.toISOString()}var nh=new Kd("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Qd,construct:eh,instanceOf:Date,represent:th}),rh=$e;function ih(e){return e==="<<"||e===null}var sh=new rh("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ih}),Jt;try{var oh=nl;Jt=oh("buffer").Buffer}catch{}var ah=$e,Os=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function lh(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=Os;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function ch(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=Os,o=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):n===18?(a.push(o>>10&255),a.push(o>>2&255)):n===12&&a.push(o>>4&255),Jt?Jt.from?Jt.from(a):new Jt(a):a}function uh(e){var t="",n=0,r,i,s=e.length,o=Os;for(r=0;r<s;r++)r%3===0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function dh(e){return Jt&&Jt.isBuffer(e)}var hh=new ah("tag:yaml.org,2002:binary",{kind:"scalar",resolve:lh,construct:ch,predicate:dh,represent:uh}),fh=$e,ph=Object.prototype.hasOwnProperty,mh=Object.prototype.toString;function gh(e){if(e===null)return!0;var t=[],n,r,i,s,o,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],o=!1,mh.call(i)!=="[object Object]")return!1;for(s in i)if(ph.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function _h(e){return e!==null?e:[]}var vh=new fh("tag:yaml.org,2002:omap",{kind:"sequence",resolve:gh,construct:_h}),wh=$e,yh=Object.prototype.toString;function bh(e){if(e===null)return!0;var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],yh.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function xh(e){if(e===null)return[];var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var Ah=new wh("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:bh,construct:xh}),kh=$e,Sh=Object.prototype.hasOwnProperty;function Eh(e){if(e===null)return!0;var t,n=e;for(t in n)if(Sh.call(n,t)&&n[t]!==null)return!1;return!0}function Ih(e){return e!==null?e:{}}var Ch=new kh("tag:yaml.org,2002:set",{kind:"mapping",resolve:Eh,construct:Ih}),Mh=jn,Ar=new Mh({include:[hl],implicit:[nh,sh],explicit:[hh,vh,Ah,Ch]}),Oh=$e;function Th(){return!0}function Nh(){}function Lh(){return""}function Rh(e){return typeof e=="undefined"}var Ph=new Oh("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Th,construct:Nh,predicate:Rh,represent:Lh}),$h=$e;function Dh(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";return!(t[0]==="/"&&(n&&(r=n[1]),r.length>3||t[t.length-r.length-1]!=="/"))}function Bh(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function Fh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function zh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var jh=new $h("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Dh,construct:Bh,predicate:zh,represent:Fh}),si;try{var Vh=nl;si=Vh("esprima")}catch{typeof window!="undefined"&&(si=window.esprima)}var Hh=$e;function Uh(e){if(e===null)return!1;try{var t="("+e+")",n=si.parse(t,{range:!0});return!(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Gh(e){var t="("+e+")",n=si.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(s){r.push(s.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function Yh(e){return e.toString()}function Wh(e){return Object.prototype.toString.call(e)==="[object Function]"}var qh=new Hh("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Uh,construct:Gh,predicate:Wh,represent:Yh}),Ao=jn,Ii=Ao.DEFAULT=new Ao({include:[Ar],explicit:[Ph,jh,qh]}),Lt=ct,ml=xr,Zh=cd,gl=Ar,Xh=Ii,Wt=Object.prototype.hasOwnProperty,oi=1,_l=2,vl=3,ai=4,Hi=1,Jh=2,ko=3,Kh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Qh=/[\x85\u2028\u2029]/,ef=/[,\[\]\{\}]/,wl=/^(?:!|!!|![a-z\-]+!)$/i,yl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function So(e){return Object.prototype.toString.call(e)}function Et(e){return e===10||e===13}function Qt(e){return e===9||e===32}function qe(e){return e===9||e===32||e===10||e===13}function yn(e){return e===44||e===91||e===93||e===123||e===125}function tf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function nf(e){return e===120?2:e===117?4:e===85?8:0}function rf(e){return 48<=e&&e<=57?e-48:-1}function Eo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function sf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var bl=new Array(256),xl=new Array(256);for(var pn=0;pn<256;pn++)bl[pn]=Eo(pn)?1:0,xl[pn]=Eo(pn);function of(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Xh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Al(e,t){return new ml(t,new Zh(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Z(e,t){throw Al(e,t)}function li(e,t){e.onWarning&&e.onWarning.call(null,Al(e,t))}var Io={YAML:function(t,n,r){var i,s,o;t.version!==null&&Z(t,"duplication of %YAML directive"),r.length!==1&&Z(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Z(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&Z(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&li(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],wl.test(i)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Wt.call(t.tagMap,i)&&Z(t,'there is a previously declared suffix for "'+i+'" tag handle'),yl.test(s)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=s}};function Gt(e,t,n,r){var i,s,o,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||Z(e,"expected valid JSON character");else Kh.test(a)&&Z(e,"the stream contains non-printable characters");e.result+=a}}function Co(e,t,n,r){var i,s,o,a;for(Lt.isObject(n)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;o<a;o+=1)s=i[o],Wt.call(t,s)||(t[s]=n[s],r[s]=!0)}function bn(e,t,n,r,i,s,o,a){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&Z(e,"nested arrays are not supported inside keys"),typeof i=="object"&&So(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&So(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,u=s.length;l<u;l+=1)Co(e,t,s[l],n);else Co(e,t,s,n);else!e.json&&!Wt.call(n,i)&&Wt.call(t,i)&&(e.line=o||e.line,e.position=a||e.position,Z(e,"duplicated mapping key")),t[i]=s,delete n[i];return t}function Ts(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Oe(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Qt(i);)i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Et(i))for(Ts(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&li(e,"deficient indentation"),r}function Ci(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||qe(n)))}function Ns(e,t){t===1?e.result+=" ":t>1&&(e.result+=Lt.repeat(`
`,t-1))}function af(e,t,n){var r,i,s,o,a,l,u,c,h=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),qe(d)||yn(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(i=e.input.charCodeAt(e.position+1),qe(i)||n&&yn(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;d!==0;){if(d===58){if(i=e.input.charCodeAt(e.position+1),qe(i)||n&&yn(i))break}else if(d===35){if(r=e.input.charCodeAt(e.position-1),qe(r))break}else{if(e.position===e.lineStart&&Ci(e)||n&&yn(d))break;if(Et(d))if(l=e.line,u=e.lineStart,c=e.lineIndent,Oe(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(Gt(e,s,o,!1),Ns(e,e.line-l),s=o=e.position,a=!1),Qt(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Gt(e,s,o,!1),e.result?!0:(e.kind=h,e.result=p,!1)}function lf(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Gt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Et(n)?(Gt(e,r,i,!0),Ns(e,Oe(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ci(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}function cf(e,t){var n,r,i,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Gt(e,n,e.position,!0),e.position++,!0;if(a===92){if(Gt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Et(a))Oe(e,!1,t);else if(a<256&&bl[a])e.result+=xl[a],e.position++;else if((o=nf(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=tf(a))>=0?s=(s<<4)+o:Z(e,"expected hexadecimal character");e.result+=sf(s),e.position++}else Z(e,"unknown escape sequence");n=r=e.position}else Et(a)?(Gt(e,n,r,!0),Ns(e,Oe(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ci(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}function uf(e,t){var n=!0,r,i=e.tag,s,o=e.anchor,a,l,u,c,h,p={},d,w,v,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,h=!1,s=[];else if(g===123)l=125,h=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),g=e.input.charCodeAt(++e.position);g!==0;){if(Oe(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=i,e.anchor=o,e.kind=h?"mapping":"sequence",e.result=s,!0;n||Z(e,"missed comma between flow collection entries"),w=d=v=null,u=c=!1,g===63&&(a=e.input.charCodeAt(e.position+1),qe(a)&&(u=c=!0,e.position++,Oe(e,!0,t))),r=e.line,Tn(e,t,oi,!1,!0),w=e.tag,d=e.result,Oe(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(u=!0,g=e.input.charCodeAt(++e.position),Oe(e,!0,t),Tn(e,t,oi,!1,!0),v=e.result),h?bn(e,s,p,w,d,v):u?s.push(bn(e,null,p,w,d,v)):s.push(d),Oe(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}Z(e,"unexpected end of the stream within a flow collection")}function df(e,t){var n,r,i=Hi,s=!1,o=!1,a=t,l=0,u=!1,c,h;if(h=e.input.charCodeAt(e.position),h===124)r=!1;else if(h===62)r=!0;else return!1;for(e.kind="scalar",e.result="";h!==0;)if(h=e.input.charCodeAt(++e.position),h===43||h===45)Hi===i?i=h===43?ko:Jh:Z(e,"repeat of a chomping mode identifier");else if((c=rf(h))>=0)c===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Z(e,"repeat of an indentation width identifier"):(a=t+c-1,o=!0);else break;if(Qt(h)){do h=e.input.charCodeAt(++e.position);while(Qt(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!Et(h)&&h!==0)}for(;h!==0;){for(Ts(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&h===32;)e.lineIndent++,h=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),Et(h)){l++;continue}if(e.lineIndent<a){i===ko?e.result+=Lt.repeat(`
`,s?1+l:l):i===Hi&&s&&(e.result+=`
`);break}for(r?Qt(h)?(u=!0,e.result+=Lt.repeat(`
`,s?1+l:l)):u?(u=!1,e.result+=Lt.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Lt.repeat(`
`,l):e.result+=Lt.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,n=e.position;!Et(h)&&h!==0;)h=e.input.charCodeAt(++e.position);Gt(e,n,e.position,!1)}return!0}function Mo(e,t){var n,r=e.tag,i=e.anchor,s=[],o,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(o=e.input.charCodeAt(e.position+1),!qe(o)));){if(a=!0,e.position++,Oe(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Tn(e,t,vl,!1,!0),s.push(e.result),Oe(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function hf(e,t,n){var r,i,s,o,a=e.tag,l=e.anchor,u={},c={},h=null,p=null,d=null,w=!1,v=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),g=e.input.charCodeAt(e.position);g!==0;){if(r=e.input.charCodeAt(e.position+1),s=e.line,o=e.position,(g===63||g===58)&&qe(r))g===63?(w&&(bn(e,u,c,h,p,null),h=p=d=null),v=!0,w=!0,i=!0):w?(w=!1,i=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=r;else if(Tn(e,n,_l,!1,!0))if(e.line===s){for(g=e.input.charCodeAt(e.position);Qt(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),qe(g)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(bn(e,u,c,h,p,null),h=p=d=null),v=!0,w=!1,i=!1,h=e.tag,p=e.result;else if(v)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(v)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=l,!0;else break;if((e.line===s||e.lineIndent>t)&&(Tn(e,t,ai,!0,i)&&(w?p=e.result:d=e.result),w||(bn(e,u,c,h,p,d,s,o),h=p=d=null),Oe(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return w&&bn(e,u,c,h,p,null),v&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),v}function ff(e){var t,n=!1,r=!1,i,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!qe(o);)o===33&&(r?Z(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),wl.test(i)||Z(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ef.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}return s&&!yl.test(s)&&Z(e,"tag name cannot contain such characters: "+s),n?e.tag=s:Wt.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:Z(e,'undeclared tag handle "'+i+'"'),!0}function pf(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!qe(n)&&!yn(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function mf(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qe(r)&&!yn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Wt.call(e.anchorMap,n)||Z(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Oe(e,!0,-1),!0}function Tn(e,t,n,r,i){var s,o,a,l=1,u=!1,c=!1,h,p,d,w,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=ai===n||vl===n,r&&Oe(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;ff(e)||pf(e);)Oe(e,!0,-1)?(u=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||ai===n)&&(oi===n||_l===n?w=t:w=t+1,v=e.position-e.lineStart,l===1?a&&(Mo(e,v)||hf(e,v,w))||uf(e,w)?c=!0:(o&&df(e,w)||lf(e,w)||cf(e,w)?c=!0:mf(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):af(e,w,oi===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&Mo(e,v))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),h=0,p=e.implicitTypes.length;h<p;h+=1)if(d=e.implicitTypes[h],d.resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Wt.call(e.typeMap[e.kind||"fallback"],e.tag)?(d=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&d.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result)?(e.result=d.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Z(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function gf(e){var t=e.position,n,r,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(o=e.input.charCodeAt(e.position))!==0&&(Oe(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!qe(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Z(e,"directive name must not be less than one character in length");o!==0;){for(;Qt(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Et(o));break}if(Et(o))break;for(n=e.position;o!==0&&!qe(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Ts(e),Wt.call(Io,r)?Io[r](e,r,i):li(e,'unknown document directive "'+r+'"')}if(Oe(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Oe(e,!0,-1)):s&&Z(e,"directives end mark is expected"),Tn(e,e.lineIndent-1,ai,!1,!0),Oe(e,!0,-1),e.checkLineBreaks&&Qh.test(e.input.slice(t,e.position))&&li(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ci(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Oe(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}function kl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new of(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Z(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)gf(n);return n.documents}function Sl(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=kl(e,n);if(typeof t!="function")return r;for(var i=0,s=r.length;i<s;i+=1)t(r[i])}function El(e,t){var n=kl(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new ml("expected a single document in the stream, but found more")}}function _f(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Sl(e,t,Lt.extend({schema:gl},n))}function vf(e,t){return El(e,Lt.extend({schema:gl},t))}br.loadAll=Sl;br.load=El;br.safeLoadAll=_f;br.safeLoad=vf;var Ls={},kr=ct,Sr=xr,wf=Ii,yf=Ar,Il=Object.prototype.toString,Cl=Object.prototype.hasOwnProperty,bf=9,ar=10,xf=13,Af=32,kf=33,Sf=34,Ml=35,Ef=37,If=38,Cf=39,Mf=42,Ol=44,Of=45,Tl=58,Tf=61,Nf=62,Lf=63,Rf=64,Nl=91,Ll=93,Pf=96,Rl=123,$f=124,Pl=125,Fe={};Fe[0]="\\0";Fe[7]="\\a";Fe[8]="\\b";Fe[9]="\\t";Fe[10]="\\n";Fe[11]="\\v";Fe[12]="\\f";Fe[13]="\\r";Fe[27]="\\e";Fe[34]='\\"';Fe[92]="\\\\";Fe[133]="\\N";Fe[160]="\\_";Fe[8232]="\\L";Fe[8233]="\\P";var Df=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Bf(e,t){var n,r,i,s,o,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)o=r[i],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Cl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[o]=a;return n}function Oo(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Sr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+kr.repeat("0",r-t.length)+t}function Ff(e){this.schema=e.schema||wf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=kr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Bf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function To(e,t){for(var n=kr.repeat(" ",t),r=0,i=-1,s="",o,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(o=e.slice(r),r=a):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
`&&(s+=n),s+=o;return s}function os(e,t){return`
`+kr.repeat(" ",e.indent*t)}function zf(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function Rs(e){return e===Af||e===bf}function Nn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function jf(e){return Nn(e)&&!Rs(e)&&e!==65279&&e!==xf&&e!==ar}function No(e,t){return Nn(e)&&e!==65279&&e!==Ol&&e!==Nl&&e!==Ll&&e!==Rl&&e!==Pl&&e!==Tl&&(e!==Ml||t&&jf(t))}function Vf(e){return Nn(e)&&e!==65279&&!Rs(e)&&e!==Of&&e!==Lf&&e!==Tl&&e!==Ol&&e!==Nl&&e!==Ll&&e!==Rl&&e!==Pl&&e!==Ml&&e!==If&&e!==Mf&&e!==kf&&e!==$f&&e!==Tf&&e!==Nf&&e!==Cf&&e!==Sf&&e!==Ef&&e!==Rf&&e!==Pf}function $l(e){var t=/^\n* /;return t.test(e)}var Dl=1,Bl=2,Fl=3,zl=4,Yr=5;function Hf(e,t,n,r,i){var s,o,a,l=!1,u=!1,c=r!==-1,h=-1,p=Vf(e.charCodeAt(0))&&!Rs(e.charCodeAt(e.length-1));if(t)for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),!Nn(o))return Yr;a=s>0?e.charCodeAt(s-1):null,p=p&&No(o,a)}else{for(s=0;s<e.length;s++){if(o=e.charCodeAt(s),o===ar)l=!0,c&&(u=u||s-h-1>r&&e[h+1]!==" ",h=s);else if(!Nn(o))return Yr;a=s>0?e.charCodeAt(s-1):null,p=p&&No(o,a)}u=u||c&&s-h-1>r&&e[h+1]!==" "}return!l&&!u?p&&!i(e)?Dl:Bl:n>9&&$l(e)?Yr:u?zl:Fl}function Uf(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Df.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return zf(e,l)}switch(Hf(t,o,e.indent,s,a)){case Dl:return t;case Bl:return"'"+t.replace(/'/g,"''")+"'";case Fl:return"|"+Lo(t,e.indent)+Ro(To(t,i));case zl:return">"+Lo(t,e.indent)+Ro(To(Gf(t,s),i));case Yr:return'"'+Yf(t)+'"';default:throw new Sr("impossible error: invalid scalar style")}}()}function Lo(e,t){var n=$l(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),s=i?"+":r?"":"-";return n+s+`
`}function Ro(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Gf(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Po(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",s,o;o=n.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",r+=a+(!i&&!s&&l!==""?`
`:"")+Po(l,t),i=s}return r}function Po(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,o=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(s=o>i?o:a,l+=`
`+e.slice(i,s),i=s+1),o=a;return l+=`
`,e.length-i>t&&o>i?l+=e.slice(i,o)+`
`+e.slice(o+1):l+=e.slice(i),l.slice(1)}function Yf(e){for(var t="",n,r,i,s=0;s<e.length;s++){if(n=e.charCodeAt(s),n>=55296&&n<=56319&&(r=e.charCodeAt(s+1),r>=56320&&r<=57343)){t+=Oo((n-55296)*1024+r-56320+65536),s++;continue}i=Fe[n],t+=!i&&Nn(n)?e[s]:i||Oo(n)}return t}function Wf(e,t,n){var r="",i=e.tag,s,o;for(s=0,o=n.length;s<o;s+=1)nn(e,t,n[s],!1,!1)&&(s!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function qf(e,t,n,r){var i="",s=e.tag,o,a;for(o=0,a=n.length;o<a;o+=1)nn(e,t+1,n[o],!0,!0)&&((!r||o!==0)&&(i+=os(e,t)),e.dump&&ar===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Zf(e,t,n){var r="",i=e.tag,s=Object.keys(n),o,a,l,u,c;for(o=0,a=s.length;o<a;o+=1)c="",o!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[o],u=n[l],nn(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),nn(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function Xf(e,t,n,r){var i="",s=e.tag,o=Object.keys(n),a,l,u,c,h,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Sr("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)p="",(!r||a!==0)&&(p+=os(e,t)),u=o[a],c=n[u],nn(e,t+1,u,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&ar===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,h&&(p+=os(e,t)),nn(e,t+1,c,!0,h)&&(e.dump&&ar===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=s,e.dump=i||"{}"}function $o(e,t,n){var r,i,s,o,a,l;for(i=n?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,Il.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Cl.call(a.represent,l))r=a.represent[l](t,l);else throw new Sr("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function nn(e,t,n,r,i,s){e.tag=null,e.dump=n,$o(e,n,!1)||$o(e,n,!0);var o=Il.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=o==="[object Object]"||o==="[object Array]",l,u;if(a&&(l=e.duplicates.indexOf(n),u=l!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(Xf(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Zf(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(qf(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Wf(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(o==="[object String]")e.tag!=="?"&&Uf(e,e.dump,t,s);else{if(e.skipInvalid)return!1;throw new Sr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Jf(e,t){var n=[],r=[],i,s;for(as(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function as(e,t,n){var r,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)as(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)as(e[r[i]],t,n)}function jl(e,t){t=t||{};var n=new Ff(t);return n.noRefs||Jf(e,n),nn(n,0,e,!0,!0)?n.dump+`
`:""}function Kf(e,t){return jl(e,kr.extend({schema:yf},t))}Ls.dump=jl;Ls.safeDump=Kf;var Mi=br,Vl=Ls;function Oi(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Ee.Type=$e;Ee.Schema=jn;Ee.FAILSAFE_SCHEMA=Ms;Ee.JSON_SCHEMA=dl;Ee.CORE_SCHEMA=hl;Ee.DEFAULT_SAFE_SCHEMA=Ar;Ee.DEFAULT_FULL_SCHEMA=Ii;Ee.load=Mi.load;Ee.loadAll=Mi.loadAll;Ee.safeLoad=Mi.safeLoad;Ee.safeLoadAll=Mi.safeLoadAll;Ee.dump=Vl.dump;Ee.safeDump=Vl.safeDump;Ee.YAMLException=xr;Ee.MINIMAL_SCHEMA=Ms;Ee.SAFE_SCHEMA=Ar;Ee.DEFAULT_SCHEMA=Ii;Ee.scan=Oi("scan");Ee.parse=Oi("parse");Ee.compose=Oi("compose");Ee.addConstructor=Oi("addConstructor");var Qf=Ee,ls=Qf,e0=t0;function xn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function t0(e){if(e=e||{},e.circles)return n0(e);return e.proto?r:n;function t(i,s){for(var o=Object.keys(i),a=new Array(o.length),l=0;l<o.length;l++){var u=o[l],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=xn(c):a[u]=s(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var s={};for(var o in i)if(Object.hasOwnProperty.call(i,o)!==!1){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),n)):a instanceof Set?s[o]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?s[o]=xn(a):s[o]=n(a)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var s={};for(var o in i){var a=i[o];typeof a!="object"||a===null?s[o]=a:a instanceof Date?s[o]=new Date(a):a instanceof Map?s[o]=new Map(t(Array.from(a),r)):a instanceof Set?s[o]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?s[o]=xn(a):s[o]=r(a)}return s}}function n0(e){var t=[],n=[];return e.proto?s:i;function r(o,a){for(var l=Object.keys(o),u=new Array(l.length),c=0;c<l.length;c++){var h=l[c],p=o[h];if(typeof p!="object"||p===null)u[h]=p;else if(p instanceof Date)u[h]=new Date(p);else if(ArrayBuffer.isView(p))u[h]=xn(p);else{var d=t.indexOf(p);d!==-1?u[h]=n[d]:u[h]=a(p)}}return u}function i(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,i);if(o instanceof Map)return new Map(r(Array.from(o),i));if(o instanceof Set)return new Set(r(Array.from(o),i));var a={};t.push(o),n.push(a);for(var l in o)if(Object.hasOwnProperty.call(o,l)!==!1){var u=o[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),i));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),i));else if(ArrayBuffer.isView(u))a[l]=xn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function s(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return r(o,s);if(o instanceof Map)return new Map(r(Array.from(o),s));if(o instanceof Set)return new Set(r(Array.from(o),s));var a={};t.push(o),n.push(a);for(var l in o){var u=o[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),s));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),s));else if(ArrayBuffer.isView(u))a[l]=xn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=s(u)}}return t.pop(),n.pop(),a}}var pe=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Espa\xF1ol"},{"code":"fr","name":"Fran\xE7ais"},{"code":"it","name":"Italiano"},{"code":"ja","name":"\u65E5\u672C\u8A9E"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Portugu\xEAs"},{"code":"ru","name":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{"code":"sk","name":"Sloven\u010Dina","schemas":false},{"code":"zh-cn","name":"\u7B80\u4F53\u4E2D\u6587"},{"code":"zh-tw","name":"\u6B63\u9AD4\u4E2D\u6587"}],"versions":[{"id":"1.15","ref":"1.15.2","pack_format":5},{"id":"1.16","ref":"1.16.5","pack_format":6},{"id":"1.17","ref":"1.17.1","pack_format":7},{"id":"1.18","ref":"1.18.1","pack_format":8},{"id":"1.18.2","ref":"1.18.2","pack_format":9},{"id":"1.19","dynamic":true,"pack_format":10}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table"},{"id":"predicate","url":"predicate","path":"predicates","schema":"predicate"},{"id":"item_modifier","url":"item-modifier","path":"item_modifiers","schema":"item_modifier","minVersion":"1.17"},{"id":"advancement","url":"advancement","path":"advancements","schema":"advancement"},{"id":"recipe","url":"recipe","path":"recipes","schema":"recipe"},{"id":"text_component","url":"text-component","schema":"text_component"},{"id":"chat_type","url":"chat-type","schema":"chat_type","minVersion":"1.19"},{"id":"dimension","url":"dimension","schema":"dimension","category":"worldgen","minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","category":"worldgen","minVersion":"1.16"},{"id":"world","url":"world","schema":"world_settings","category":"worldgen","minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","category":"worldgen","schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","category":"worldgen","schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","category":"worldgen","schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/density_function","url":"worldgen/density-function","category":"worldgen","schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","category":"worldgen","schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/noise","url":"worldgen/noise","category":"worldgen","schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","category":"worldgen","schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","category":"worldgen","schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","category":"worldgen","schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","category":"worldgen","schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","category":"worldgen","schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","category":"worldgen","schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","category":"worldgen","schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","category":"worldgen","schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"}]}');function cn(e){return typeof e=="object"&&e!==null}const r0=e=>("0"+e.toString(16)).substr(-2);function en(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,r0).join("")}function Bt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function Hl(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new D.Path(["dimensions"]));e.set(new D.Path(["seed"]),t,!0),cn(n)&&Object.keys(n).forEach(r=>{e.set(new D.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new D.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new D.Path(["placement","salt"]),Math.abs(t),!0),e.set(new D.Path(["generator","seed"]),t,!0),e.set(new D.Path(["generator","biome_source","seed"]),t)}function Ul(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function Ft(e){return`/${e}/`.replaceAll("//","/")}function i0(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),Ft(e)}function Gl(e){const t=i0(e).replace(/^\//,"").replace(/\/$/,"");return pe.generators.find(n=>n.url===t)}function Yl({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?Ft(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Yt(i,r)}function s0(e){const t=ls.load(e.substring(3,e.indexOf("---",3)));return cn(t)?t:{}}function o0(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const s=a0(e,i+2),o=e.indexOf("#[",i+1);let a="";if(o>=0&&o<s){const l=e.indexOf("]",o+2);e.substring(o+2,l)===t&&(a=e.substring(l+1,s).trim())}else{const l=e.substring(i+2,s),u=pe.versions.find(c=>c.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(s+2),n=i}return e}function a0(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),s=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(s<0){if(n===0)return i;n-=1,t=i+2}else if(s<i)n+=1,t=s+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function Wl(e){const t=Math.abs(Ul(e));return[t%256,(t>>8)%256,(t>>16)%256]}function Gn(e){return e*e}function nt(e,t,n){return Math.max(e,Math.min(t,n))}function Ui(e,t,n){return n<0?e:n>1?t:Wr(n,e,t)}function Wr(e,t,n){return t+e*(n-t)}function l0(e,t,n,r,i,s){return Wr(t,Wr(e,n,r),Wr(e,i,s))}function lt(e){return e instanceof Error?e.message:`${e}`}const Ti=e0();function rn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=0;r<n;r++)if(!rn(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!rn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}class c0{constructor(){this.forward=new Map,this.backward=new Map}set(t,n){this.forward.set(t,n),this.backward.set(n,t)}getA(t){return this.backward.get(t)}getB(t){return this.forward.get(t)}getOrPut(t,n){const r=this.forward.get(t);return r===void 0?(this.set(t,n),n):r}}function qr({icon:e,label:t,large:n,larger:r,doSelect:i,value:s,placeholder:o,dataList:a,onChange:l}){const u=l===void 0?()=>{}:p=>{const d=p.target.value;l==null||l(d)},c=me(null);Q(()=>{i&&c.current&&c.current.select()},[i]);const h=a&&en();return f("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:p=>p.stopPropagation()},e&&ie[e],t&&f("span",null,t),f("input",{ref:c,type:"text",value:s,onChange:u,placeholder:o,list:h}),a&&f("datalist",{id:h},a.map(p=>f("option",{value:p}))))}function qn({cooldown:e,invert:t,initial:n}={}){const[r,i]=$(n),s=me(void 0);return[r,()=>{i(!t),s.current!==void 0&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}const cs=Symbol("async-cancel");function u0(e,t=[],n={loading:!1}){const[r,i]=$(n),s=me(!1),o=me(0);Q(()=>(s.current=!0,()=>s.current=!1),[]);const a=Ie((...l)=>{const u=++o.current;return r.loading||i(c=>ye(J({},c),{loading:!0})),e(...l).then(c=>(s.current&&u===o.current&&c!==cs&&i({value:c,loading:!1}),c),c=>{s.current&&u===o.current&&i({error:c,loading:!1})})},t);return[r,a]}function Er(e,t=[],n={loading:!0}){const[r,i]=u0(e,t,n);return Q(()=>{i()},[i]),r}function Ir({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},s){const o=me(null),a=me(),l=me(),u=me([0,0]),c=me(!1);Q(()=>{if(!o.current)return;const d=_=>{a.current=[_.offsetX,_.offsetY]},w=_=>{if(a.current===void 0){if(!o.current)return;const b=_.offsetX/o.current.clientWidth,A=_.offsetY/o.current.clientHeight;r==null||r(b,A);return}if(!n)return;const y=_.offsetX-a.current[0],m=_.offsetY-a.current[1];y===0&&m===0||(u.current=[u.current[0]+y,u.current[1]+m],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!o.current)return;c.current=!0;const b=u.current[0]/o.current.clientWidth,A=u.current[1]/o.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(b,A)),c.current=!1}))),a.current=[_.offsetX,_.offsetY]},v=()=>{a.current=void 0},g=()=>{i==null||i()};return o.current.addEventListener("mousedown",d),o.current.addEventListener("mousemove",w),o.current.addEventListener("mouseleave",g),document.body.addEventListener("mouseup",v),()=>{var _,y,m;(_=o.current)==null||_.removeEventListener("mousedown",d),(y=o.current)==null||y.removeEventListener("mousemove",w),(m=o.current)==null||m.removeEventListener("mouseleave",g),document.body.removeEventListener("mouseup",v)}},[...s!=null?s:[],o.current]);const h=me(),p=me(0);return h.current=async()=>{if(!o.current)return;const d=o.current.getContext("2d"),w=e();o.current.width=w[0],o.current.height=w[1];const v=d.getImageData(0,0,w[0],w[1]),g=p.current+=1;try{await t(v)}catch(_){throw _}g===p.current&&d.putImageData(v,0,0)},{canvas:o,redraw:h.current}}function Ps(){const[e,t]=$(!1),n=()=>{t(!1)};return Q(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)}),[e]),[e,()=>t(!0)]}function d0(){const[e,t]=$(window.location.hash),n=Ie(()=>{t(window.location.hash)},[]);Q(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ie(i=>{i!==e&&Yl({hash:i})},[e]);return[e,r]}function Do(e){const[t,n]=$(matchMedia(e).matches),r=i=>{n(i.matches)};return Q(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Ni(e,t,n){const r={invalidated(){e&&t(e)}};Q(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Bo=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function lr(e){const t=window.location,[n,r]=$(Bo(t.search,e));Q(()=>{const s=()=>{r(Bo(t.search,e))};return window.addEventListener("popstate",s),window.addEventListener("pushstate",s),window.addEventListener("replacestate",s),()=>{window.removeEventListener("popstate",s),window.removeEventListener("pushstate",s),window.removeEventListener("replacestate",s)}},[]);const i=Ie((s,o)=>{if(s!==n){r(s);const a=new URLSearchParams(t.search);s===void 0||s.length===0?a.delete(e):a.set(e,s),Yl({search:a.toString().replaceAll("%7C","|"),replace:o})}},[n]);return[n,i]}function Ze(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:s,children:o}=e,[a,l]=Ps();return f("div",J({class:`btn-menu${r===!1?" no-relative":""}`},e),f(q,{icon:t,label:n,tooltip:i,tooltipLoc:s,onClick:l}),a&&f("div",{class:"btn-group"},o))}const h0="modulepreload",Fo={},f0="/",ae=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${f0}${r}`,r in Fo)return;Fo[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":h0,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((a,l)=>{o.addEventListener("load",a),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},ie={alert:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"})),archive:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z"})),arrow_left:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"})),arrow_right:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})),check:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})),chevron_down:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})),chevron_right:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})),chevron_up:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z"})),clippy:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"})),code:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})),dash:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z"})),device_desktop:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"})),dot_fill:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),duplicate:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{d:"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z"}),f("path",{"fill-rule":"evenodd",d:"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z"}),f("path",{d:"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z"})),eye:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"})),eye_closed:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z"})),file:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"})),file_directory:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})),gear:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"})),globe:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),history:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"})),info:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"})),issue_opened:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"})),kebab_horizontal:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{d:"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})),link:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"})),link_external:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"})),mark_github:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})),moon:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),play:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"})),plus:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"})),plus_circle:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"})),repo:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})),search:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"})),sort_asc:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z"})),sort_desc:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z"}),f("path",{d:"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z"})),square:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z"})),square_fill:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z"})),stack:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z"})),sun:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z"})),sync:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z"})),tag:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"})),terminal:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"})),three_bars:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"})),trashcan:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"})),unfold:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{d:"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z"})),upload:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),x:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),x_circle:f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},f("path",{"fill-rule":"evenodd",d:"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"}))};function An({error:e,onDismiss:t}){const[n,r]=$(!1),[i,s]=$(void 0);Q(()=>{if(e instanceof Error){const a=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));s(a.join(`
`)),ae(()=>import("./sourcemapped-stacktrace.b34a9789.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
`),u=>{const c=u.map(h=>h.replace(/..\/..\/src\//,"src/")).join(`
`);s(c)})})}},[e]);const o=be(()=>{let a="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(a+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(a+=`&body=${encodeURIComponent(`\`\`\`
${e.name}: ${e.message}
${i}
\`\`\`
`)}`)):a+=`?title=${encodeURIComponent(e.toString())}`,a},[e,i]);return f("div",{class:"error"},t&&f("div",{class:"error-dismiss",onClick:t},ie.x),f("h3",null,e instanceof Error?e.message:e,i&&f("span",{onClick:()=>r(!n)},ie.info)),i&&n&&f("pre",null,i),f("p",null,"If you think this is a bug, you can report it ",f("a",{href:o,target:"_blank"},"on GitHub")))}function p0({label:e,value:t,onChange:n}){const r=en();return f("label",{class:"checkbox"},f("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function $s(e,t,n){const r=i=>{const s=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),o=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return f("input",ye(J({},i),{type:t,onChange:s,onKeyDown:o}))};return r.displayName=e,r}const sn=$s("TextInput","text",e=>e),m0=$s("NumberInput","number",e=>Number(e)),zo=$s("RangeInput","range",e=>Number(e));function jo({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,s]=$(""),o=be(()=>{var l;const a=i.trim().split(" ");return(l=e==null?void 0:e.filter(u=>a.every(c=>u.includes(c))))!=null?l:[]},[e,i]);return f(te,null,f(qr,{icon:"search",large:!0,value:i,onChange:s,doSelect:1,placeholder:n!=null?n:"Search"}),f("div",{class:"result-list"},o.map(a=>f(q,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),o.length===0&&f(q,{label:r!=null?r:"No results"})))}const Ds="https://raw.githubusercontent.com/misode/technical-changes/main";let Gi=null;async function ql(){if(!Gi){const e=await(await fetch(`${Ds}/index.json`)).json();Gi=(await Promise.all(e.map((t,n)=>g0(Zl(t),n)))).flat().map(t=>ye(J({},t),{tags:[t.group.id,...t.tags]}))}return Gi}async function g0(e,t){const n=await(await fetch(`${Ds}/${e.id}/index.json`)).json();return(await Promise.all(n.map((r,i)=>_0(e,Zl(r),t,i)))).flat()}async function _0(e,t,n,r){const i=await(await fetch(`${Ds}/${e.id}/${t.id}.md`)).text();return v0(i).map(s=>J({version:t,group:e,order:n*1e3+r},s))}function v0(e){return e.split(`
`).map(t=>{const n=t.indexOf("|");return{tags:t.substring(0,n).trim().split(" "),content:t.slice(n+1).trim().replaceAll("->","\u2192").replaceAll(`
...
`,`
`)}})}function Zl(e){return typeof e=="string"?{id:e,article:e.match(/\d\dw\d\d[a-z]/)?"minecraft-snapshot-"+e:e.match(/\d+\.\d+(\.\d+)?-pre[0-9]+/)?"minecraft-"+e.replaceAll(".","-").replaceAll("pre","pre-release-"):null}:cn(e)?e:{id:"unknown",article:null}}["1.15","1.16","1.17"].forEach(e=>localStorage.removeItem(`cache_${e}`));["mcdata_master","vanilla_datapack_summary"].forEach(e=>localStorage.removeItem(`cached_${e}`));caches.delete("misode-v1");const kn="misode-v2",Vo="cached_latest_version",Yi="22w18a",Zn="https://raw.githubusercontent.com/misode/mcmeta";function qt(e,t){return`${Zn}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Li(e){e.dynamic&&(localStorage.getItem(Vo)!==Yi&&(await E0(t=>t.startsWith(`${Zn}/summary/`)||t.startsWith(`${Zn}/data/`)||t.startsWith(`${Zn}/assets/`)||t.startsWith(`${Zn}/registries/`)),localStorage.setItem(Vo,Yi)),e.ref=Yi)}async function w0(e,t,n){const r=pe.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(pe.versions)}`);return}await Li(r),await Promise.all([y0(r,t),b0(r,n)])}async function y0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await Ln(`${qt(e,"summary")}/registries/data.min.json`);for(const r in n)t.register(r,n[r].map(i=>"minecraft:"+i))}catch(n){console.warn("Error occurred while fetching registries:",lt(n))}}async function b0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await Ln(`${qt(e,"summary")}/blocks/data.min.json`);for(const r in n)t["minecraft:"+r]={properties:n[r][0],default:n[r][1]}}catch(n){console.warn("Error occurred while fetching block state map:",lt(n))}}async function Xl(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=pe.versions.find(i=>i.id===e);try{const i=["blockstates","models"].includes(t)?"assets":"data",s=`${qt(r,i)}/${i}/minecraft/${t}/${n}.json`;return await(await fetch(s)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${lt(i)}`)}}async function x0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=pe.versions.find(r=>r.id===e);await Li(n);try{const r=await Ln(`${qt(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await Ln(`${qt(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${lt(r)}`)}}async function A0(e){const t=pe.versions.find(n=>n.id===e);await Li(t);try{const n=`${qt(t,"summary")}/sounds/data.min.json`;return await Ln(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${lt(n)}`)}}function k0(e,t){const n=pe.versions.find(r=>r.id===e);return`${qt(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function S0(){const e=pe.versions[pe.versions.length-1];await Li(e);try{return Ln(`${qt(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${lt(t)}`)}}async function Ln(e,t=n=>n){try{const n=await caches.open(kn);console.debug(`[getData] Opened cache ${kn} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),s=t(await i.json());return await n.put(e,new Response(JSON.stringify(s))),s}catch(n){console.warn(`[getData] Failed to open cache ${kn}: ${lt(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function E0(e){try{const t=await caches.open(kn);console.debug(`[deleteMatching] Opened cache ${kn}`);const n=[];for(const r of await t.keys())e(r.url)&&n.push(t.delete(r));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache ${kn}: ${lt(t)}`)}}const Jl=["1.15","1.16","1.17","1.18","1.18.2","1.19"],mn={},gn={},I0={1.15:()=>ae(()=>import("./index.2f7cfa87.js").then(function(e){return e.i}),[]),1.16:()=>ae(()=>import("./index.3b68817d.js").then(function(e){return e.i}),[]),1.17:()=>ae(()=>import("./index.730d014e.js").then(function(e){return e.i}),[]),1.18:()=>ae(()=>import("./index.395a846b.js").then(function(e){return e.i}),[]),"1.18.2":()=>ae(()=>import("./index.e5eb614b.js").then(function(e){return e.i}),[]),1.19:()=>ae(()=>import("./index.07816b33.js").then(function(e){return e.i}),[])};let Kl,Ql,Zr;async function Bs(e){return mn[e]||(mn[e]=(async()=>{try{const t=await I0[e](),n=t.getCollections(),r={};await w0(e,n,r);const i=t.getSchemas(n);return mn[e]={collections:n,schemas:i,blockStates:r},mn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${lt(t)}`)}})()),mn[e]}async function C0(e,t){var n;if(!gn[t]||gn[t].version!==e){const r=await Bs(e);Kl=D.Reference(r.schemas,"configured_decorator"),Ql=D.ChoiceNode([{type:"string",node:D.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:D.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=pe.generators.find(s=>s.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const s=r.schemas.get(i),o=new D.DataModel(s,{wrapLists:!0});gn[t]?o.reset(gn[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),gn[t]={model:o,version:e}}catch(s){const o=new Error(`Cannot get generator "${t}" for version "${e}": ${lt(s)}`);throw s instanceof Error&&(o.stack=s.stack),o}}return gn[t].model}async function M0(e){const t=await Bs(e);return Zr=t.collections,t.collections}async function O0(e){return(await Bs(e)).blockStates}function Xe(e,t,n){const r=pe.versions.findIndex(o=>o.id===e),i=t?pe.versions.findIndex(o=>o.id===t):0,s=n?pe.versions.findIndex(o=>o.id===n):pe.versions.length-1;return i<=r&&r<=s}var ec={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,u){if(!s[l]){s[l]={};for(var c=0;c<l.length;c++)s[l][l.charAt(c)]=c}return s[l][u]}var a={compressToBase64:function(l){if(l==null)return"";var u=a._compress(l,6,function(c){return r.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(u){return o(r,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=a.compress(l),c=new Uint8Array(u.length*2),h=0,p=u.length;h<p;h++){var d=u.charCodeAt(h);c[h*2]=d>>>8,c[h*2+1]=d%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,h=u.length;c<h;c++)u[c]=l[c*2]*256+l[c*2+1];var p=[];return u.forEach(function(d){p.push(n(d))}),a.decompress(p.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(u){return o(i,l.charAt(u))}))},compress:function(l){return a._compress(l,16,function(u){return n(u)})},_compress:function(l,u,c){if(l==null)return"";var h,p,d={},w={},v="",g="",_="",y=2,m=3,b=2,A=[],k=0,S=0,I;for(I=0;I<l.length;I+=1)if(v=l.charAt(I),Object.prototype.hasOwnProperty.call(d,v)||(d[v]=m++,w[v]=!0),g=_+v,Object.prototype.hasOwnProperty.call(d,g))_=g;else{if(Object.prototype.hasOwnProperty.call(w,_)){if(_.charCodeAt(0)<256){for(h=0;h<b;h++)k=k<<1,S==u-1?(S=0,A.push(c(k)),k=0):S++;for(p=_.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1}else{for(p=1,h=0;h<b;h++)k=k<<1|p,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=0;for(p=_.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1}y--,y==0&&(y=Math.pow(2,b),b++),delete w[_]}else for(p=d[_],h=0;h<b;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1;y--,y==0&&(y=Math.pow(2,b),b++),d[g]=m++,_=String(v)}if(_!==""){if(Object.prototype.hasOwnProperty.call(w,_)){if(_.charCodeAt(0)<256){for(h=0;h<b;h++)k=k<<1,S==u-1?(S=0,A.push(c(k)),k=0):S++;for(p=_.charCodeAt(0),h=0;h<8;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1}else{for(p=1,h=0;h<b;h++)k=k<<1|p,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=0;for(p=_.charCodeAt(0),h=0;h<16;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1}y--,y==0&&(y=Math.pow(2,b),b++),delete w[_]}else for(p=d[_],h=0;h<b;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1;y--,y==0&&(y=Math.pow(2,b),b++)}for(p=2,h=0;h<b;h++)k=k<<1|p&1,S==u-1?(S=0,A.push(c(k)),k=0):S++,p=p>>1;for(;;)if(k=k<<1,S==u-1){A.push(c(k));break}else S++;return A.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var h=[],p=4,d=4,w=3,v="",g=[],_,y,m,b,A,k,S,I={val:c(0),position:u,index:1};for(_=0;_<3;_+=1)h[_]=_;for(m=0,A=Math.pow(2,2),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;switch(m){case 0:for(m=0,A=Math.pow(2,8),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;S=n(m);break;case 1:for(m=0,A=Math.pow(2,16),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;S=n(m);break;case 2:return""}for(h[3]=S,y=S,g.push(S);;){if(I.index>l)return"";for(m=0,A=Math.pow(2,w),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;switch(S=m){case 0:for(m=0,A=Math.pow(2,8),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;h[d++]=n(m),S=d-1,p--;break;case 1:for(m=0,A=Math.pow(2,16),k=1;k!=A;)b=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),m|=(b>0?1:0)*k,k<<=1;h[d++]=n(m),S=d-1,p--;break;case 2:return g.join("")}if(p==0&&(p=Math.pow(2,w),w++),h[S])v=h[S];else if(S===d)v=y+y.charAt(0);else return null;g.push(v),h[d++]=y+v.charAt(0),p--,y=v,p==0&&(p=Math.pow(2,w),w++)}}};return a}();e!=null&&(e.exports=t)})(ec);var tc=ec.exports;const T0="https://z15g7can.directus.app/items",us="share",Ho=new Map;async function N0(e,t,n,r){try{const i=tc.compressToBase64(JSON.stringify(n)),s=btoa(JSON.stringify(n));console.log("Compression rate",s.length/i.length);const o=JSON.stringify({data:i,type:e,version:t,show_preview:r});let a=Ho.get(o);if(!a){const u=await nc("/snippets",o);Ho.set(o,u.id),a=u.id}const l=pe.generators.find(u=>u.id===e);return`${location.protocol}//${location.host}/${l.url}/?${us}=${a}`}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function L0(e){var t;try{const n=await nc(`/snippets/${e}`);return ye(J({},n),{data:JSON.parse((t=tc.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function nc(e,t){var i,s,o;const r=await(await fetch(T0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((o=(s=(i=r.errors)==null?void 0:i[0])==null?void 0:s.message)!=null?o:"Unknown error")}var rc=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","any_version":"Any","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","chat_type":"Chat Type","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","guides.all":"All guides","guides.search":"Search guides","guides.no_results.version":"No guides for this version","guides.no_results.query":"No guides for this query","hide_output":"Hide output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.minified":"Minified","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","layer.biomes":"Biomes","layer.temperature":"Temperature","layer.humidity":"Humidity","layer.continentalness":"Continentalness","layer.erosion":"Erosion","layer.weirdness":"Weirdness","layer.offset":"Offset","layer.factor":"Factor","layer.jaggedness":"Jaggedness","highlighting":"Highlighting","loading":"Loading...","loot_table":"Loot Table","model":"Model","more":"More","move_down":"Move down","move_up":"Move up","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.guides":"Data Pack Guides","title.home":"Data Pack Generators","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),R0=Object.freeze(Object.defineProperty({__proto__:null,default:rc},Symbol.toStringTag,{value:"Module"})),Pe;(e=>{e.ID_LANGUAGE="language",e.ID_THEME="theme",e.ID_VERSION="schema_version",e.ID_INDENT="indentation",e.ID_FORMAT="output_format",e.ID_HIGHLIGHTING="output_highlighting",e.ID_SOUNDS_VERSION="minecraft_sounds_version",e.ID_PROJECTS="misode_projects",e.ID_BACKUPS="misode_generator_backups";function t(){var m;return(m=localStorage.getItem(e.ID_LANGUAGE))!=null?m:"en"}e.getLanguage=t;function n(){var m;return(m=localStorage.getItem(e.ID_THEME))!=null?m:"dark"}e.getTheme=n;function r(){const m=localStorage.getItem(e.ID_VERSION);return m&&Jl.includes(m)?m:"1.18.2"}e.getVersion=r;function i(){var m;return(m=localStorage.getItem(e.ID_INDENT))!=null?m:"2_spaces"}e.getIndent=i;function s(){var m;return(m=localStorage.getItem(e.ID_FORMAT))!=null?m:"json"}e.getFormat=s;function o(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=o;function a(){var m;return(m=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?m:"latest"}e.getSoundsVersion=a;function l(){const m=localStorage.getItem(e.ID_PROJECTS);return m?JSON.parse(m):[ci]}e.getProjects=l;function u(m){var A;return JSON.parse((A=localStorage.getItem(e.ID_BACKUPS))!=null?A:"{}")[m]}e.getBackup=u;function c(m){m&&localStorage.setItem(e.ID_LANGUAGE,m)}e.setLanguage=c;function h(m){m&&localStorage.setItem(e.ID_THEME,m)}e.setTheme=h;function p(m){m&&localStorage.setItem(e.ID_VERSION,m)}e.setVersion=p;function d(m){m&&localStorage.setItem(e.ID_INDENT,m)}e.setIndent=d;function w(m){m&&localStorage.setItem(e.ID_FORMAT,m)}e.setFormat=w;function v(m){m!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,m.toString())}e.setHighlighting=v;function g(m){m&&localStorage.setItem(e.ID_SOUNDS_VERSION,m)}e.setSoundsVersion=g;function _(m){m&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(m))}e.setProjects=_;function y(m,b){var k;const A=JSON.parse((k=localStorage.getItem(e.ID_BACKUPS))!=null?k:"{}");b===void 0?delete A[m]:A[m]=b,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(A))}e.setBackup=y})(Pe||(Pe={}));function P0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return ae(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return ae(()=>import("./de.8e2383d8.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return ae(()=>import("./en.4ab98cb7.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return ae(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return ae(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return ae(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return ae(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return ae(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return ae(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return ae(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return ae(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return ae(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return ae(()=>import("./zh-tw.bdc36a24.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function $0(e){switch(e){case"../../locales/de.json":return ae(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return ae(()=>Promise.resolve().then(function(){return R0}),void 0);case"../../locales/es.json":return ae(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return ae(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return ae(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return ae(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return ae(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return ae(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return ae(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return ae(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return ae(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return ae(()=>import("./zh-tw.42e9d37d.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}const ic=Dn({lang:"none",locale:e=>e,changeLanguage:()=>{}}),tr={fallback:rc};function ce(e,t,...n){var i,s,o,a,l;const r=(l=(a=(o=(i=tr[e])==null?void 0:i[t])!=null?o:(s=tr.en)==null?void 0:s[t])!=null?a:tr.fallback[t])!=null?l:t;return D0(r,n)}function D0(e,t){return e.replace(/%\d+%/g,n=>{const r=parseInt(n.slice(1,-1));return(t==null?void 0:t[r])!==void 0?t[r]:n})}async function Wi(e){if(tr[e])return;const t=pe.languages.find(i=>i.code===e);if(!t)return;const n=await $0(`../../locales/${e}.json`),r=t.schemas!==!1&&await P0(`../../../node_modules/@mcschema/locales/src/${e}.json`);tr[e]=J(J({},n.default),r.default)}function ke(){return Fn(ic)}function B0({children:e}){const[t,n]=$("none"),r=Ie((o,...a)=>ce(t,o,...a),[t]),i=Ie(async o=>{await Wi(o),Me.setLanguage(o),Pe.setLanguage(o),n(o)},[]);Q(()=>{(async()=>{const o=Pe.getLanguage();await Promise.all([Wi("en"),...o!=="en"?[Wi(o)]:[]]),n(o)})()},[]);const s={lang:t,locale:r,changeLanguage:i};return f(ic.Provider,{value:s},e)}const ci={name:"Drafts",namespace:"draft",files:[]},sc=Dn({project:ci,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function oc(){return Fn(sc)}function F0({children:e}){const[t,n]=$(Pe.getProjects()),[r,i]=$(ci.name),s=be(()=>{var v;return(v=t.find(g=>g.name===r))!=null?v:ci},[t,r]),[o,a]=$(void 0),l=be(()=>{if(!!o)return s.files.find(v=>v.type===o[0]&&v.id===o[1])},[s,o]),u=Ie(v=>{Pe.setProjects(v),n(v)},[]),c=Ie(v=>{u(t.map(g=>g.name===r?J(J({},g),v):g))},[t,r]),h=Ie((v,g,_)=>{var y;if(!_.id)c({files:s.files.filter(m=>m.type!==v||m.id!==g)});else{const m=_.id.includes(":")?_.id:`${s.namespace}:${_.id}`,b=s.files.some(A=>A.type===v&&A.id===m);if(g){if((l==null?void 0:l.id)===g&&g!==m&&b)return!1;c({files:s.files.map(A=>A.type===v&&A.id===g?ye(J(J({},A),_),{id:m}):A)}),(l==null?void 0:l.id)===g&&a([v,m])}else{if(b)return!1;c({files:[...s.files,{type:v,id:m,data:(y=_.data)!=null?y:{}}]}),a([v,m])}}return!0},[c,s,l]),p=Ie((v,g)=>{const _=pe.generators.find(y=>y.id===v||y.path===v);if(!_)throw new Error(`Cannot find generator of type ${v}`);a([_.id,g]),Yt(Ft(_.url))},[]),d=Ie(()=>{a(void 0)},[]),w={project:s,file:l,changeProject:i,updateProject:c,updateFile:h,openFile:p,closeFile:d};return f(sc.Provider,{value:w},e)}function z0(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],r=pe.generators.find(s=>s.id===e.type);if(!r)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const ac=Dn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function lc(){return Fn(ac)}function j0({children:e}){const[t,n]=$(Pe.getTheme()),r=Do("(prefers-color-scheme: light)"),i=Do("(prefers-color-scheme: dark)");Q(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=Ie(a=>{Me.setTheme(a),Pe.setTheme(a),n(a)},[]);Q(()=>{Me.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]);const o={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:s};return f(ac.Provider,{value:o},e)}const V0=3,cc=Dn({title:"",changeTitle:()=>{}});function _t(e,t){const n=Fn(cc);return Q(()=>{e&&n.changeTitle(e,t)},[e,t]),n}function H0({children:e}){const{locale:t}=ke(),[n,r]=$(t("title.home")),i=Ie((o,a)=>{a!=null||(a=pe.versions.map(u=>u.id));const l=a.slice(-V0);document.title=`${o} Minecraft ${l.join(", ")}`,r(o)},[]),s={title:n,changeTitle:i};return f(cc.Provider,{value:s},e)}const U0="version",uc=Dn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Vn(){return Fn(uc)}function G0({children:e}){const[t,n]=$(Pe.getVersion()),[r,i]=lr(U0);Q(()=>{Jl.includes(r)&&t!==r&&n(r)},[t,r]);const s=Ie((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(Me.setVersion(a),Pe.setVersion(a)),n(a)},[r]),o={version:t,changeVersion:s,changeTargetVersion:i};return f(uc.Provider,{value:o},e)}let ne,dc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});dc.decode();let $r=null;function Y0(){return($r===null||$r.buffer!==ne.memory.buffer)&&($r=new Uint8Array(ne.memory.buffer)),$r}function W0(e,t){return dc.decode(Y0().subarray(e,e+t))}const ds=new Uint32Array(2),q0=new BigInt64Array(ds.buffer);let Dr=null;function cr(){return(Dr===null||Dr.buffer!==ne.memory.buffer)&&(Dr=new Int32Array(ne.memory.buffer)),Dr}let Br=null;function hc(){return(Br===null||Br.buffer!==ne.memory.buffer)&&(Br=new Float64Array(ne.memory.buffer)),Br}function Z0(e,t){return hc().subarray(e/8,e/8+t)}let Se=0;function Te(e,t){const n=t(e.length*8);return hc().set(e,n/8),Se=e.length,n}let Fr=null;function X0(){return(Fr===null||Fr.buffer!==ne.memory.buffer)&&(Fr=new Uint32Array(ne.memory.buffer)),Fr}function J0(e,t){const n=t(e.length*4);return X0().set(e,n/4),Se=e.length,n}function K0(e,t,n,r,i,s,o,a,l,u,c,h,p,d){var w=Te(e,ne.__wbindgen_malloc),v=Se,g=Te(t,ne.__wbindgen_malloc),_=Se,y=Te(n,ne.__wbindgen_malloc),m=Se,b=Te(r,ne.__wbindgen_malloc),A=Se,k=Te(i,ne.__wbindgen_malloc),S=Se,I=Te(s,ne.__wbindgen_malloc),C=Se,M=Te(o,ne.__wbindgen_malloc),N=Se,B=Te(a,ne.__wbindgen_malloc),se=Se,le=Te(l,ne.__wbindgen_malloc),de=Se,O=Te(u,ne.__wbindgen_malloc),P=Se,G=Te(c,ne.__wbindgen_malloc),T=Se,x=Te(h,ne.__wbindgen_malloc),E=Se,L=Te(p,ne.__wbindgen_malloc),j=Se,X=J0(d,ne.__wbindgen_malloc),ue=Se,ze=ne.biome_parameters(w,v,g,_,y,m,b,A,k,S,I,C,M,N,B,se,le,de,O,P,G,T,x,E,L,j,X,ue);return Ri.__wrap(ze)}function Q0(e,t,n,r,i,s,o,a,l,u,c,h,p){q0[0]=e;const d=ds[0],w=ds[1];var v=Te(n,ne.__wbindgen_malloc),g=Se,_=Te(i,ne.__wbindgen_malloc),y=Se,m=Te(o,ne.__wbindgen_malloc),b=Se,A=Te(l,ne.__wbindgen_malloc),k=Se,S=Te(c,ne.__wbindgen_malloc),I=Se,C=Te(p,ne.__wbindgen_malloc),M=Se,N=ne.climate_sampler(d,w,t,v,g,r,_,y,s,m,b,a,A,k,u,S,I,h,C,M);return Cr.__wrap(N)}function hs(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function ep(e,t){return cr().subarray(e/4,e/4+t)}function Uo(e,t,n,r,i,s,o,a,l,u,c){try{const w=ne.__wbindgen_add_to_stack_pointer(-16);hs(e,Ri),hs(t,Cr),ne.multi_noise(w,e.ptr,t.ptr,n,r,i,s,o,a,l,u,c);var h=cr()[w/4+0],p=cr()[w/4+1],d=ep(h,p).slice();return ne.__wbindgen_free(h,p*4),d}finally{ne.__wbindgen_add_to_stack_pointer(16)}}function Go(e,t,n,r,i,s,o,a,l,u){try{const d=ne.__wbindgen_add_to_stack_pointer(-16);hs(e,Cr),ne.climate_noise(d,e.ptr,t,n,r,i,s,o,a,l,u);var c=cr()[d/4+0],h=cr()[d/4+1],p=Z0(c,h).slice();return ne.__wbindgen_free(c,h*8),p}finally{ne.__wbindgen_add_to_stack_pointer(16)}}class Ri{static __wrap(t){const n=Object.create(Ri.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ne.__wbg_parameterlist_free(t)}}class Cr{static __wrap(t){const n=Object.create(Cr.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ne.__wbg_sampler_free(t)}}async function tp(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function fc(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,s){throw new Error(W0(i,s))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await tp(await e,t);return ne=n.exports,fc.__wbindgen_wasm_module=r,ne}var Yo="/assets/deepslate_rs_bg.4990c219.wasm",pc={exports:{}},mc={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,s=0;i<n.length;i++,s+=8)r[s>>>5]|=n[i]<<24-s%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var s=n[i]<<16|n[i+1]<<8|n[i+2],o=0;o<4;o++)i*8+o*6<=n.length*8?r.push(e.charAt(s>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,s=0;i<n.length;s=++i%4)s!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(i))>>>6-s*2);return r}};mc.exports=t})();var fs={utf8:{stringToBytes:function(e){return fs.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(fs.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},Wo=fs;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var np=function(e){return e!=null&&(gc(e)||rp(e)||!!e._isBuffer)};function gc(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function rp(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&gc(e.slice(0,0))}(function(){var e=mc.exports,t=Wo.utf8,n=np,r=Wo.bin,i=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=r.stringToBytes(s):s=t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),l=s.length*8,u=1732584193,c=-271733879,h=-1732584194,p=271733878,d=0;d<a.length;d++)a[d]=(a[d]<<8|a[d]>>>24)&16711935|(a[d]<<24|a[d]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var w=i._ff,v=i._gg,g=i._hh,_=i._ii,d=0;d<a.length;d+=16){var y=u,m=c,b=h,A=p;u=w(u,c,h,p,a[d+0],7,-680876936),p=w(p,u,c,h,a[d+1],12,-389564586),h=w(h,p,u,c,a[d+2],17,606105819),c=w(c,h,p,u,a[d+3],22,-1044525330),u=w(u,c,h,p,a[d+4],7,-176418897),p=w(p,u,c,h,a[d+5],12,1200080426),h=w(h,p,u,c,a[d+6],17,-1473231341),c=w(c,h,p,u,a[d+7],22,-45705983),u=w(u,c,h,p,a[d+8],7,1770035416),p=w(p,u,c,h,a[d+9],12,-1958414417),h=w(h,p,u,c,a[d+10],17,-42063),c=w(c,h,p,u,a[d+11],22,-1990404162),u=w(u,c,h,p,a[d+12],7,1804603682),p=w(p,u,c,h,a[d+13],12,-40341101),h=w(h,p,u,c,a[d+14],17,-1502002290),c=w(c,h,p,u,a[d+15],22,1236535329),u=v(u,c,h,p,a[d+1],5,-165796510),p=v(p,u,c,h,a[d+6],9,-1069501632),h=v(h,p,u,c,a[d+11],14,643717713),c=v(c,h,p,u,a[d+0],20,-373897302),u=v(u,c,h,p,a[d+5],5,-701558691),p=v(p,u,c,h,a[d+10],9,38016083),h=v(h,p,u,c,a[d+15],14,-660478335),c=v(c,h,p,u,a[d+4],20,-405537848),u=v(u,c,h,p,a[d+9],5,568446438),p=v(p,u,c,h,a[d+14],9,-1019803690),h=v(h,p,u,c,a[d+3],14,-187363961),c=v(c,h,p,u,a[d+8],20,1163531501),u=v(u,c,h,p,a[d+13],5,-1444681467),p=v(p,u,c,h,a[d+2],9,-51403784),h=v(h,p,u,c,a[d+7],14,1735328473),c=v(c,h,p,u,a[d+12],20,-1926607734),u=g(u,c,h,p,a[d+5],4,-378558),p=g(p,u,c,h,a[d+8],11,-2022574463),h=g(h,p,u,c,a[d+11],16,1839030562),c=g(c,h,p,u,a[d+14],23,-35309556),u=g(u,c,h,p,a[d+1],4,-1530992060),p=g(p,u,c,h,a[d+4],11,1272893353),h=g(h,p,u,c,a[d+7],16,-155497632),c=g(c,h,p,u,a[d+10],23,-1094730640),u=g(u,c,h,p,a[d+13],4,681279174),p=g(p,u,c,h,a[d+0],11,-358537222),h=g(h,p,u,c,a[d+3],16,-722521979),c=g(c,h,p,u,a[d+6],23,76029189),u=g(u,c,h,p,a[d+9],4,-640364487),p=g(p,u,c,h,a[d+12],11,-421815835),h=g(h,p,u,c,a[d+15],16,530742520),c=g(c,h,p,u,a[d+2],23,-995338651),u=_(u,c,h,p,a[d+0],6,-198630844),p=_(p,u,c,h,a[d+7],10,1126891415),h=_(h,p,u,c,a[d+14],15,-1416354905),c=_(c,h,p,u,a[d+5],21,-57434055),u=_(u,c,h,p,a[d+12],6,1700485571),p=_(p,u,c,h,a[d+3],10,-1894986606),h=_(h,p,u,c,a[d+10],15,-1051523),c=_(c,h,p,u,a[d+1],21,-2054922799),u=_(u,c,h,p,a[d+8],6,1873313359),p=_(p,u,c,h,a[d+15],10,-30611744),h=_(h,p,u,c,a[d+6],15,-1560198380),c=_(c,h,p,u,a[d+13],21,1309151649),u=_(u,c,h,p,a[d+4],6,-145523070),p=_(p,u,c,h,a[d+11],10,-1120210379),h=_(h,p,u,c,a[d+2],15,718787259),c=_(c,h,p,u,a[d+9],21,-343485551),u=u+y>>>0,c=c+m>>>0,h=h+b>>>0,p=p+A>>>0}return e.endian([u,c,h,p])};i._ff=function(s,o,a,l,u,c,h){var p=s+(o&a|~o&l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._gg=function(s,o,a,l,u,c,h){var p=s+(o&l|a&~l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._hh=function(s,o,a,l,u,c,h){var p=s+(o^a^l)+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._ii=function(s,o,a,l,u,c,h){var p=s+(a^(o|~l))+(u>>>0)+h;return(p<<c|p>>>32-c)+o},i._blocksize=16,i._digestsize=16,pc.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(i(s,o));return o&&o.asBytes?a:o&&o.asString?r.bytesToString(a):e.bytesToHex(a)}})();var _c=pc.exports,R;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function s(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=s;function o(c,h){if(!!Array.isArray(c))return c.map(p=>h(p))}e.readArray=o;function a(c,h){var d;const p=(d=s(c))!=null?d:{};return Object.fromEntries(Object.entries(p).map(([w,v])=>[w,h(v)]))}e.readMap=a;function l(c,h,p){const d=h(c);return d?p(d):void 0}e.compose=l;function u(c,h){return typeof c!="string"?h[0]:h.includes(c)?c:h[0]}e.readEnum=u})(R||(R={}));function nr(e){let t=null;return()=>(t==null&&(t=e()),t)}function Mr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Ct(e){return e*e}function ur(e,t,n){return Math.max(t,Math.min(n,e))}function $t(e,t,n){return t+e*(n-t)}function ui(e,t,n,r,i,s){return $t(t,$t(e,n,r),$t(e,i,s))}function vc(e,t,n,r,i,s,o,a,l,u,c){return $t(n,ui(e,t,r,i,s,o),ui(e,t,a,l,u,c))}function rr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function ps(e,t,n,r,i,s){return rr(t,()=>rr(e,n,r),()=>rr(e,i,s))}function wc(e,t,n,r,i,s,o,a,l,u,c){return rr(n,()=>ps(e,t,r,i,s,o),()=>ps(e,t,a,l,u,c))}function Pi(e,t,n){return n<0?e:n>1?t:$t(n,e,t)}function Fs(e,t,n){return(e-t)/(n-t)}function Xr(e){return e*e*e*(e*(e*6-15)+10)}function dr(e,t,n,r,i){return $t(Fs(e,t,n),r,i)}function $i(e,t,n,r,i){return Pi(r,i,Fs(e,t,n))}function yc(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),s=e+i;if(n(s)){r=i;continue}e=s+1,r-=i+1}return e}function zs(e,t,n){let r=BigInt(e*3129871)^BigInt(n)*BigInt(116129781)^BigInt(t);return r=r*r*BigInt(42317861)+r*BigInt(11),r>>BigInt(16)}function di(e,t,n,r,i,s,o,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(s)<<BigInt(16)|BigInt(o)<<BigInt(8)|BigInt(a)}function ip(e){return(e&e-1)===0}function sp(e){return e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>18,e|=e>>32,e+1}var hi;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(hi||(hi={}));var fi;(function(e){function t(i,s){var u,c,h,p;if(typeof i=="number")return new n(i);const o=(u=R.readObject(i))!=null?u:{},a=new r(s(o.coordinate)),l=(c=R.readArray(o.points,d=>{var w;return(w=R.readObject(d))!=null?w:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const d of l){const w=(h=R.readNumber(d.location))!=null?h:0,v=t(d.value,s),g=(p=R.readNumber(d.derivative))!=null?p:0;a.addPoint(w,v,g)}return a}e.fromJson=t;class n{constructor(s){this.value=s}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(s,o=[],a=[],l=[]){this.coordinate=s,this.locations=o,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(s){const o=this.coordinate.compute(s),a=yc(0,this.locations.length,m=>o<this.locations[m])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(s)+this.derivatives[0]*(o-this.locations[0]);if(a===l)return this.values[l].compute(s)+this.derivatives[l]*(o-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],h=this.derivatives[a],p=this.derivatives[a+1],d=(o-u)/(c-u),w=this.values[a].compute(s),v=this.values[a+1].compute(s),g=h*(c-u)-(v-w),_=-p*(c-u)+(v-w);return $t(d,w,v)+d*(1-d)*$t(d,g,_)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(s){return new r(s(this.coordinate),this.locations,this.values.map(o=>o.mapAll(s)),this.derivatives)}addPoint(s,o,a=0){return this.locations.push(s),this.values.push(typeof o=="number"?new e.Constant(o):o),this.derivatives.push(a),this}calculateMinMax(){if(!hi.is(this.coordinate))return;const s=this.locations.length-1;var o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const h of this.values)h.calculateMinMax();if(l<this.locations[0]){const h=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),p=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);o=Math.min(o,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}if(u>this.locations[s]){const h=r.linearExtend(u,this.locations,this.values[s].min(),this.derivatives,s),p=r.linearExtend(u,this.locations,this.values[s].max(),this.derivatives,s);o=Math.min(o,Math.min(h,p)),a=Math.max(a,Math.max(h,p))}for(const h of this.values)o=Math.min(o,h.min()),a=Math.max(a,h.max());for(var c=0;c<s;++c){const h=this.locations[c],d=this.locations[c+1]-h,w=this.values[c],v=this.values[c+1],g=w.min(),_=w.max(),y=v.min(),m=v.max(),b=this.derivatives[c],A=this.derivatives[c+1];if(b!==0||A!==0){const k=b*d,S=A*d,I=Math.min(g,y),C=Math.max(_,m),M=k-m+g,N=k-y+_,B=-S+y-_,se=-S+m-g,le=Math.min(M,B),de=Math.max(N,se);o=Math.min(o,I+.25*le),a=Math.max(a,C+.25*de)}}this.calculatedMin=o,this.calculatedMax=a}static linearExtend(s,o,a,l,u){const c=l[u];return c==0?a:a+c*(s-o[u])}}e.MultiPoint=r})(fi||(fi={}));const xt=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new xt(this.nextLong())}forkPositional(){return new bc(this.nextLong())}setSeed(e){this.seed=e^xt.MULTIPLIER&xt.MODULUS_MASK}advance(){this.seed=this.seed*xt.MULTIPLIER+xt.INCREMENT&xt.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(xt.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(e===void 0)return this.next(32);if((e&e-1)==0)return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,n;for(;(t=this.next(31))-(n=t%e)+(e-1)<0;);return n}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*xt.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*xt.DOUBLE_MULTIPLIER}};let Je=xt;Je.MODULUS_BITS=48;Je.MODULUS_MASK=BigInt("281474976710655");Je.MULTIPLIER=BigInt("25214903917");Je.INCREMENT=BigInt("11");Je.FLOAT_MULTIPLIER=1/Math.pow(2,24);Je.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class bc{constructor(t){this.seed=t}at(t,n,r){const i=zs(t,n,r);return new Je(i^this.seed)}fromHashOf(t){const n=_c(t,{asBytes:!0}),r=di(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new Je(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const K=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new K(K.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>K.BIGINT_30)*K.STAFFORD_1&K.MAX_ULONG,e=(e^e>>K.BIGINT_27)*K.STAFFORD_2&K.MAX_ULONG,(e^e>>K.BIGINT_31)&K.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=K.POW2_60);const t=e^K.SILVER_RATIO_64,n=t+K.GOLDEN_RATIO_64&K.MAX_ULONG;return[K.mixStafford13(t),K.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&K.MAX_ULONG|e>>K.BIGINT_64-t}setSeed(e){this.seed=K.upgradeSeedTo128bit(e)}fork(){return new K([this.next(),this.next()])}forkPositional(){return new xc(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=K.rotateLeft(e+t&K.MAX_ULONG,K.BIGINT_17)+e&K.MAX_ULONG;return t^=e,this.seed=[K.rotateLeft(e,K.BIGINT_49)^t^t<<K.BIGINT_21&K.MAX_ULONG,K.rotateLeft(t,K.BIGINT_28)],n}nextLong(){let e=this.next();return e>K.POW2_63&&(e-=K.POW2_60),e}consume(e){let t=this.seed[0],n=this.seed[1];for(let r=0;r<e;r+=1)n^=t,t=K.rotateLeft(t,K.BIGINT_49)^n^n<<K.BIGINT_21,n=K.rotateLeft(n,K.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&K.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&K.MAX_UINT;if(i<n){const o=((~n&K.MAX_UINT)+K.BIGINT_1)%n;for(;i<o;)t=this.next()&K.MAX_UINT,r=t*n,i=r&K.MAX_UINT}const s=r>>K.BIGINT_32;return Number(s)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*K.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*K.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let xe=K;xe.SILVER_RATIO_64=BigInt("7640891576956012809");xe.GOLDEN_RATIO_64=BigInt("-7046029254386353131");xe.FLOAT_MULTIPLIER=1/Math.pow(2,24);xe.DOUBLE_MULTIPLIER=11102230246251565e-32;xe.BIGINT_1=BigInt(1);xe.BIGINT_17=BigInt(17);xe.BIGINT_21=BigInt(21);xe.BIGINT_27=BigInt(27);xe.BIGINT_28=BigInt(28);xe.BIGINT_30=BigInt(30);xe.BIGINT_31=BigInt(31);xe.BIGINT_32=BigInt(32);xe.BIGINT_49=BigInt(49);xe.BIGINT_64=BigInt(64);xe.STAFFORD_1=BigInt("-4658895280553007687");xe.STAFFORD_2=BigInt("-7723592293110705685");xe.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");xe.POW2_60=BigInt("0x10000000000000000");xe.POW2_63=BigInt("0x8000000000000000");xe.MAX_UINT=BigInt(4294967295);class xc{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const s=zs(t,n,r)^this.seedLo;return new xe([s,this.seedHi])}fromHashOf(t){const n=_c(t,{asBytes:!0}),r=di(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=di(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new xe([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Mt=class{constructor(e){this.xo=e.nextDouble()*256,this.yo=e.nextDouble()*256,this.zo=e.nextDouble()*256,this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const n=e.nextInt(256-t),r=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=r}}sample2D(e,t){let n,r,i;const s=(e+t)*Mt.F2,o=Math.floor(e+s),a=o-(n=(o+(r=Math.floor(t+s)))*Mt.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const h=l-u+Mt.G2,p=i-c+Mt.G2,d=l-1+2*Mt.G2,w=i-1+2*Mt.G2,v=o&255,g=r&255,_=this.P(v+this.P(g))%12,y=this.P(v+u+this.P(g+c))%12,m=this.P(v+1+this.P(g+1))%12,b=this.getCornerNoise3D(_,l,i,0,.5),A=this.getCornerNoise3D(y,h,p,0,.5),k=this.getCornerNoise3D(m,d,w,0,.5);return 70*(b+A+k)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),s=Math.floor(t+r),o=Math.floor(n+r),a=(i+s+o)*.16666666666666666,l=e-(i-a),u=t-(s-a),c=n-(o-a);let h,p,d,w,v,g;l>=u?u>=c?(h=1,p=0,d=0,w=1,v=1,g=0):l>=c?(h=1,p=0,d=0,w=1,v=0,g=1):(h=0,p=0,d=1,w=1,v=0,g=1):u<c?(h=0,p=0,d=1,w=0,v=1,g=1):l<c?(h=0,p=1,d=0,w=0,v=1,g=1):(h=0,p=1,d=0,w=1,v=1,g=0);const _=l-h+.16666666666666666,y=u-p+.16666666666666666,m=c-d+.16666666666666666,b=l-w+.3333333333333333,A=u-v+.3333333333333333,k=c-g+.3333333333333333,S=l-.5,I=u-.5,C=c-.5,M=i&255,N=s&255,B=o&255,se=this.P(M+this.P(N+this.P(B)))%12,le=this.P(M+h+this.P(N+p+this.P(B+d)))%12,de=this.P(M+w+this.P(N+v+this.P(B+g)))%12,O=this.P(M+1+this.P(N+1+this.P(B+1)))%12,P=this.getCornerNoise3D(se,l,u,c,.6),G=this.getCornerNoise3D(le,_,y,m,.6),T=this.getCornerNoise3D(de,b,A,k,.6),x=this.getCornerNoise3D(O,S,I,C,.6);return 32*(P+G+T+x)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let s,o=i-t*t-n*n-r*r;return o<0?s=0:(o*=o,s=o*o*Mt.gradDot(e,t,n,r)),s}static gradDot(e,t,n,r){const i=Mt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Ye=Mt;Ye.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]];Ye.F2=.5*(Math.sqrt(3)-1);Ye.G2=(3-Math.sqrt(3))/6;class ms{constructor(t){this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,s=0){const o=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(o),c=Math.floor(a),h=Math.floor(l),p=o-u,d=a-c,w=l-h;let v=0;if(i!==0){const g=s>=0&&s<d?s:d;v=Math.floor(g/i+1e-7)*i}return this.sampleAndLerp(u,c,h,p,d-v,w,d)}sampleAndLerp(t,n,r,i,s,o,a){const l=this.P(t),u=this.P(t+1),c=this.P(l+n),h=this.P(l+n+1),p=this.P(u+n),d=this.P(u+n+1),w=Ye.gradDot(this.P(c+r),i,s,o),v=Ye.gradDot(this.P(p+r),i-1,s,o),g=Ye.gradDot(this.P(h+r),i,s-1,o),_=Ye.gradDot(this.P(d+r),i-1,s-1,o),y=Ye.gradDot(this.P(c+r+1),i,s,o-1),m=Ye.gradDot(this.P(p+r+1),i-1,s,o-1),b=Ye.gradDot(this.P(h+r+1),i,s-1,o-1),A=Ye.gradDot(this.P(d+r+1),i-1,s-1,o-1),k=Xr(i),S=Xr(a),I=Xr(o);return vc(k,S,I,w,v,g,_,y,m,b,A)}P(t){return this.p[t&255]&255}}class _e{constructor(t,n,r){if(t instanceof xe){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let s=0;s<r.length;s++)if(r[s]!==0){const o=n+s;this.noiseLevels[s]=new ms(i.fromHashOf("octave_"+o))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new ms(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,s=0,o=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const h=this.noiseLevels[c];h&&(a+=this.amplitudes[c]*u*h.sample(_e.wrap(t*l),o?-h.yo:_e.wrap(n*l),_e.wrap(r*l),i*l,s*l)),l*=2,u/=2}return a}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,r=this.lowestFreqValueFactor;for(let i=0;i<this.noiseLevels.length;i+=1)this.noiseLevels[i]&&(n+=this.amplitudes[i]*t*r),r/=2;return n}static wrap(t){return t-Math.floor(t/33554432+.5)*33554432}}class Ac{constructor(t,n,r,i,s,o){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=s,this.smearScaleMultiplier=o,this.minLimitNoise=new _e(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new _e(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new _e(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,s=n*this.yMultiplier,o=r*this.xzMultiplier,a=i/this.xzFactor,l=s/this.yFactor,u=o/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,h=c/this.yFactor;let p,d=0,w=1;for(let _=0;_<8;_+=1){if(p=this.mainNoise.getOctaveNoise(_),p){const y=_e.wrap(a*w),m=_e.wrap(l*w),b=_e.wrap(u*w);d+=p.sample(y,m,b,h*w,l*w)/w}w/=2}d=(d/10+1)/2,w=1;let v=0,g=0;for(let _=0;_<16;_+=1){const y=_e.wrap(i*w),m=_e.wrap(s*w),b=_e.wrap(o*w),A=c*w;d<1&&(p=this.minLimitNoise.getOctaveNoise(_))&&(v+=p.sample(y,m,b,A,s*w)/w),d>0&&(p=this.maxLimitNoise.getOctaveNoise(_))&&(g+=p.sample(y,m,b,A,s*w)/w),w/=2}return Pi(v/512,g/512,d)/128}}const Jr=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new _e(e,t,n),this.second=new _e(e,t,n);let r=1/0,i=-1/0;for(let o=0;o<n.length;o+=1)n[o]!==0&&(r=Math.min(r,o),i=Math.max(i,o));const s=.1*(1+1/(i-r+1));this.valueFactor=1/6/s,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*Jr.INPUT_FACTOR,i=t*Jr.INPUT_FACTOR,s=n*Jr.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,s))*this.valueFactor}};let Or=Jr;Or.INPUT_FACTOR=1.0181268882175227;var Rn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var s,o,a;const i=(s=R.readObject(r))!=null?s:{};return{firstOctave:(o=R.readInt(i.firstOctave))!=null?o:0,amplitudes:(a=R.readArray(i.amplitudes,l=>{var u;return(u=R.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(Rn||(Rn={}));class op{constructor(t,n){const r=n[n.length-1],s=-n[0]+r+1,o=new Set(n),a=new Ye(t);this.noiseLevels=Array(s),r>=0&&r<s&&o.has(0)&&(this.noiseLevels[r]=a);for(let l=r+1;l<s;l+=1)l>=0&&o.has(r-l)?this.noiseLevels[l]=new Ye(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,s)-1)}sample(t,n,r){let i=0,s=this.highestFreqInputFactor,o=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const l=this.noiseLevels[a];l&&(i+=o*l.sample2D(t*s+(r?l.xo:0),n*s+(r?l.yo:0))),s/=2,o*=2}return i}}var at;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(at||(at={}));const ap={[at.UP]:[0,1,0],[at.DOWN]:[0,-1,0],[at.NORTH]:[0,0,-1],[at.EAST]:[1,0,0],[at.SOUTH]:[0,0,1],[at.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return ap[n]}e.normal=t})(at||(at={}));var We;(function(e){function t(o,a,l){return[o,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(o,a,l,u){return[o[0]+a,o[1]+l,o[2]+u]}e.offset=n;function r(o,a){return e.offset(o,...at.normal(a))}e.towards=r;function i(o,a){return o===a?!0:o[0]===a[0]&&o[1]===a[1]&&o[2]===a[2]}e.equals=i;function s(o){return o[0]*o[0]+o[1]*o[1]+o[2]*o[2]}e.magnitude=s})(We||(We={}));function Sn(e,t,n){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==n)throw new Error(`Expected ${t} to be of type ${n}, but found ${e[t].type}`);return e[t].value}function zr(e,t,n,r){const i=Sn(e,t,"list");if(i.type!==n)throw new Error(`Expected ${t} to be a list of ${n}s, but found ${i.type}s`);if(r&&i.value.length!==r)throw new Error(`Expected ${t} to be a list of length ${r}, but found length ${i.value.length}`);return i.value}function kc(e,t){try{return e()}catch{return t}}const Kr=class{constructor(e,t){if(this.namespace=e,this.path=t,!e.match(/^[a-z0-9._-]+$/))throw new Error(`Non [a-z0-9._-] character in namespace of ${e}:${t}`);if(!t.match(/^[a-z0-9/._-]+$/))throw new Error(`Non [a-z0-9/._-] character in path of ${e}:${t}`)}equals(e){return this===e?!0:this.namespace===e.namespace&&this.path===e.path}toString(){return`${this.namespace}:${this.path}`}static create(e){return new Kr(this.DEFAULT_NAMESPACE,e)}static parse(e){const t=e.indexOf(this.SEPARATOR);if(t>=0){const n=t>=1?e.substring(0,t):this.DEFAULT_NAMESPACE,r=e.substring(t+1);return new Kr(n,r)}return new Kr(this.DEFAULT_NAMESPACE,e)}};let ve=Kr;ve.DEFAULT_NAMESPACE="minecraft";ve.SEPARATOR=":";const At=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?ve.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(At.WATER)||this.is(At.LAVA)}equals(e){return this.name.equals(e.name)?Object.keys(this.properties).every(t=>e.properties[t]===this.properties[t]):!1}is(e){return this.name.equals(e.name)}toString(){return Object.keys(this.properties).length===0?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map(([e,t])=>e+"="+t).join(",")}]`}static fromNbt(e){const t=ve.parse(Sn(e.value,"Name","string")),n=kc(()=>Sn(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,s)=>ye(J({},i),{[s]:Sn(n,s,"string")}),{});return new At(t,r)}static fromJson(e){var i,s;const t=(i=R.readObject(e))!=null?i:{},n=ve.parse((s=R.readString(t.Name))!=null?s:At.STONE.name.toString()),r=R.readMap(t.Properties,o=>{var a;return(a=R.readString(o))!=null?a:""});return new At(n,r)}};let ge=At;ge.AIR=new At(ve.create("air"));ge.STONE=new At(ve.create("stone"));ge.WATER=new At(ve.create("water"),{level:"0"});ge.LAVA=new At(ve.create("lava"),{level:"0"});const ir=class{constructor(e){this.minY=e,this.storage=Array(ir.SIZE).fill(0),this.palette=[ge.AIR]}get minBlockY(){return this.minY<<4}index(e,t,n){return(e<<8)+(t<<4)+n}getBlockState(e,t,n){var i;const r=this.storage[this.index(e,t,n)];return(i=this.palette[r])!=null?i:ge.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(s=>s.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let Di=ir;Di.WIDTH=16;Di.SIZE=ir.WIDTH*ir.WIDTH*ir.WIDTH;class lp{constructor(t,n,r){this.minY=t,this.height=n,this.pos=r,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return(this.maxY-1>>4)+1}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var o;const[n,r,i]=t,s=this.sections[this.getSectionIndex(r)];return(o=s==null?void 0:s.getBlockState(n&15,r&15,i&15))!=null?o:ge.AIR}setBlockState(t,n){const[r,i,s]=t,o=this.getSectionIndex(i);let a=this.sections[o];if(a===null){if(n.equals(ge.AIR))return;a=this.getOrCreateSection(o)}a.setBlockState(r&15,i&15,s&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new Di(this.minSection+t)),this.sections[t]}}var He;(function(e){function t(c,h){return[c,h]}e.create=t;function n(c){return[c[0]>>4,c[2]>>4]}e.fromBlockPos=n;function r(c){return[Number(c)&4294967295,Number(c>>BigInt(32))]}e.fromLong=r;function i(c){return s(c[0],c[1])}e.toLong=i;function s(c,h){return BigInt(c&4294967295)|BigInt(h&4294967295)<<BigInt(32)}e.asLong=s;function o(c){return c[0]<<4}e.minBlockX=o;function a(c){return c[1]<<4}e.minBlockZ=a;function l(c){return(c[0]<<4)+15}e.maxBlockX=l;function u(c){return(c[1]<<4)+15}e.maxBlockZ=u})(He||(He={}));var on;(function(e){function t(i,s){return o=>typeof o=="string"?r(i,ve.parse(o)):n(s(o))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,s){return{value:()=>i.getOrThrow(s),key:()=>s}}e.reference=r})(on||(on={}));const js=class{constructor(e,t){this.key=e,this.parser=t,this.storage=new Map,this.builtin=new Map}register(e,t,n){return this.storage.set(e.toString(),t),n&&this.builtin.set(e.toString(),t),on.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>ve.parse(e))}get(e){return this.storage.get(e.toString())}getOrThrow(e){const t=this.storage.get(e.toString());if(t===void 0)throw new Error(`Missing key in ${this.key.toString()}: ${e.toString()}`);return t}parse(e){if(!this.parser)throw new Error(`No parser exists for ${this.key.toString()}`);return this.parser(e)}clear(){this.storage.clear();for(const[e,t]of this.builtin.entries())this.storage.set(e,t);return this}assign(e){if(!this.key.equals(e.key))throw new Error(`Cannot assign registry of type ${e.key.toString()} to registry of type ${this.key.toString()}`);for(const t of e.keys())this.storage.set(t.toString(),e.getOrThrow(t));return this}cloneEmpty(){return new js(this.key,this.parser)}};let pi=js;pi.REGISTRY=new js(ve.create("root"));class Vs{constructor(t,n=[],r=[]){this.size=t,this.palette=n,this.blocks=r,this.blocksMap=[],r.forEach(i=>{if(!this.isInside(i.pos))throw new Error(`Found block at ${i.pos} which is outside the structure bounds ${this.size}`);this.blocksMap[i.pos[0]*t[1]*t[2]+i.pos[1]*t[2]+i.pos[2]]=i})}getSize(){return this.size}addBlock(t,n,r,i){if(!this.isInside(t))throw new Error(`Cannot add block at ${t} outside the structure bounds ${this.size}`);const s=new ge(n,r);let o=this.palette.findIndex(a=>a.equals(s));return o===-1&&(o=this.palette.length,this.palette.push(s)),this.blocks.push({pos:t,state:o,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:o,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]<this.size[0]&&t[1]>=0&&t[1]<this.size[1]&&t[2]>=0&&t[2]<this.size[2]}static fromNbt(t){const n=zr(t.value,"size","int",3),r=zr(t.value,"palette","compound").map(s=>ge.fromNbt({name:"",value:s})),i=zr(t.value,"blocks","compound").map(s=>{const o=zr(s,"pos","int",3),a=Sn(s,"state","int"),l=kc(()=>Sn(s,"nbt","compound"),void 0);return{pos:o,state:a,nbt:l}});return new Vs(n,r,i)}}var an;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new pi(ve.create(n));return pi.REGISTRY.register(r.key,r),r}})(an||(an={}));class oe{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(T,x,E){return{x:T,y:x,z:E}}e.context=t;class n extends e{constructor(x){super(),this.input=x}compute(x){return this.transform(x,this.input.compute(x))}}const r=on.parser(an.NOISE,Rn.fromJson);function i(T,x=i){var j,X,ue,ze,ut,je,Ne,Le,Ht,Ue,Ke,Ge,Zt,wt,V,dt,Ae,he,yt,Qe;if(typeof T=="string")return new a(on.reference(an.DENSITY_FUNCTION,ve.parse(T)));if(typeof T=="number")return new o(T);const E=(j=R.readObject(T))!=null?j:{},L=(X=R.readString(E.type))==null?void 0:X.replace(/^minecraft:/,"");switch(L){case"blend_alpha":return new l(1,0,1);case"blend_offset":return new l(0,-1/0,1/0);case"beardifier":return new l(0,-1/0,1/0);case"old_blended_noise":return new u((ue=R.readNumber(E.xz_scale))!=null?ue:1,(ze=R.readNumber(E.y_scale))!=null?ze:1,(ut=R.readNumber(E.xz_factor))!=null?ut:80,(je=R.readNumber(E.y_factor))!=null?je:160,(Ne=R.readNumber(E.smear_scale_multiplier))!=null?Ne:8);case"flat_cache":return new h(x(E.argument));case"interpolated":return new v(x(E.argument));case"cache_2d":return new d(x(E.argument));case"cache_once":return new w(x(E.argument));case"cache_all_in_cell":return new p(x(E.argument));case"noise":return new g((Le=R.readNumber(E.xz_scale))!=null?Le:1,(Ht=R.readNumber(E.y_scale))!=null?Ht:1,r(E.noise));case"end_islands":return new _;case"weird_scaled_sampler":return new b(x(E.input),R.readEnum(E.rarity_value_mapper,y),r(E.noise));case"shifted_noise":return new A(x(E.shift_x),x(E.shift_y),x(E.shift_z),(Ue=R.readNumber(E.xz_scale))!=null?Ue:1,(Ke=R.readNumber(E.y_scale))!=null?Ke:1,r(E.noise));case"range_choice":return new k(x(E.input),(Ge=R.readNumber(E.min_inclusive))!=null?Ge:0,(Zt=R.readNumber(E.max_exclusive))!=null?Zt:1,x(E.when_in_range),x(E.when_out_of_range));case"shift_a":return new I(r(E.argument));case"shift_b":return new C(r(E.argument));case"shift":return new M(r(E.argument));case"blend_density":return new N(x(E.argument));case"clamp":return new B(x(E.input),(wt=R.readNumber(E.min))!=null?wt:0,(V=R.readNumber(E.max))!=null?V:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new le(L,x(E.argument));case"add":case"mul":case"min":case"max":return new O(R.readEnum(L,de),x(E.argument1),x(E.argument2));case"spline":return new P(fi.fromJson(E.spline,x));case"constant":return new o((dt=R.readNumber(E.argument))!=null?dt:0);case"y_clamped_gradient":return new G((Ae=R.readInt(E.from_y))!=null?Ae:-4064,(he=R.readInt(E.to_y))!=null?he:4062,(yt=R.readNumber(E.from_value))!=null?yt:-4064,(Qe=R.readNumber(E.to_value))!=null?Qe:4062)}return o.ZERO}e.fromJson=i;const s=class extends e{constructor(T){super(),this.value=T}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let o=s;o.ZERO=new s(0),o.ONE=new s(1),e.Constant=o;class a extends e{constructor(x){super(),this.holder=x}compute(x){return this.holder.value().compute(x)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(x,E,L){super(x),this.min=E,this.max=L}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(x,E,L,j,X,ue){super(),this.xzScale=x,this.yScale=E,this.xzFactor=L,this.yFactor=j,this.smearScaleMultiplier=X,this.blendedNoise=ue}compute(x){var E,L;return(L=(E=this.blendedNoise)==null?void 0:E.sample(x.x,x.y,x.z))!=null?L:0}maxValue(){var x,E;return(E=(x=this.blendedNoise)==null?void 0:x.maxValue)!=null?E:0}}e.OldBlendedNoise=u;class c extends e{constructor(x){super(),this.wrapped=x}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class h extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x>>2,L=x.z>>2;return(this.lastQuartX!==E||this.lastQuartZ!==L)&&(this.lastValue=this.wrapped.compute(e.context(E<<2,0,L<<2)),this.lastQuartX=E,this.lastQuartZ=L),this.lastValue}mapAll(x){return x.map(new h(this.wrapped.mapAll(x)))}}e.FlatCache=h;class p extends c{constructor(x){super(x)}compute(x){return this.wrapped.compute(x)}mapAll(x){return x.map(new p(this.wrapped.mapAll(x)))}}e.CacheAllInCell=p;class d extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x,L=x.z;return(this.lastBlockX!==E||this.lastBlockZ!==L)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=E,this.lastBlockZ=L),this.lastValue}mapAll(x){return x.map(new d(this.wrapped.mapAll(x)))}}e.Cache2D=d;class w extends c{constructor(x){super(x),this.lastValue=0}compute(x){const E=x.x,L=x.y,j=x.z;return(this.lastBlockX!==E||this.lastBlockY!==L||this.lastBlockZ!==j)&&(this.lastValue=this.wrapped.compute(x),this.lastBlockX=E,this.lastBlockY=L,this.lastBlockZ=j),this.lastValue}mapAll(x){return x.map(new w(this.wrapped.mapAll(x)))}}e.CacheOnce=w;class v extends c{constructor(x,E=4,L=4){super(x),this.cellWidth=E,this.cellHeight=L,this.values=new Map}compute({x,y:E,z:L}){const j=this.cellWidth,X=this.cellHeight,ue=(x%j+j)%j/j,ze=(E%X+X)%X/X,ut=(L%j+j)%j/j,je=Math.floor(x/j)*j,Ne=Math.floor(E/X)*X,Le=Math.floor(L/j)*j;return wc(ue,ze,ut,()=>this.computeCorner(je,Ne,Le),()=>this.computeCorner(je+j,Ne,Le),()=>this.computeCorner(je,Ne+X,Le),()=>this.computeCorner(je+j,Ne+X,Le),()=>this.computeCorner(je,Ne,Le+j),()=>this.computeCorner(je+j,Ne,Le+j),()=>this.computeCorner(je,Ne+X,Le+j),()=>this.computeCorner(je+j,Ne+X,Le+j))}computeCorner(x,E,L){return Mr(this.values,`${x} ${E} ${L}`,()=>this.wrapped.compute(e.context(x,E,L)))}mapAll(x){return x.map(new v(this.wrapped.mapAll(x)))}withCellSize(x,E){return new v(this.wrapped,x,E)}}e.Interpolated=v;class g extends e{constructor(x,E,L,j){super(),this.xzScale=x,this.yScale=E,this.noiseData=L,this.noise=j}compute(x){var E,L;return(L=(E=this.noise)==null?void 0:E.sample(x.x*this.xzScale,x.y*this.yScale,x.z*this.xzScale))!=null?L:0}maxValue(){var x,E;return(E=(x=this.noise)==null?void 0:x.maxValue)!=null?E:2}}e.Noise=g;class _ extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const y=["type_1","type_2"],m=class extends n{constructor(T,x,E,L){super(T),this.rarityValueMapper=x,this.noiseData=E,this.noise=L,this.mapper=m.ValueMapper[this.rarityValueMapper]}transform(T,x){if(!this.noise)return 0;const E=this.mapper(x);return E*Math.abs(this.noise.sample(T.x/E,T.y/E,T.z/E))}mapAll(T){return T.map(new m(this.input.mapAll(T),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(T){return T<-.5?.75:T<0?1:T<.5?1.5:2}static rarityValueMapper2(T){return T<-.75?.5:T<-.5?.75:T<.5?1:T<.75?2:3}};let b=m;b.ValueMapper={type_1:m.rarityValueMapper1,type_2:m.rarityValueMapper2},e.WeirdScaledSampler=b;class A extends g{constructor(x,E,L,j,X,ue,ze){super(j,X,ue,ze),this.shiftX=x,this.shiftY=E,this.shiftZ=L}compute(x){var X,ue;const E=x.x*this.xzScale+this.shiftX.compute(x),L=x.y*this.yScale+this.shiftY.compute(x),j=x.z*this.xzScale+this.shiftZ.compute(x);return(ue=(X=this.noise)==null?void 0:X.sample(E,L,j))!=null?ue:0}mapAll(x){return x.map(new A(this.shiftX.mapAll(x),this.shiftY.mapAll(x),this.shiftZ.mapAll(x),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=A;class k extends e{constructor(x,E,L,j,X){super(),this.input=x,this.minInclusive=E,this.maxExclusive=L,this.whenInRange=j,this.whenOutOfRange=X}compute(x){const E=this.input.compute(x);return this.minInclusive<=E&&E<this.maxExclusive?this.whenInRange.compute(x):this.whenOutOfRange.compute(x)}mapAll(x){return x.map(new k(this.input.mapAll(x),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(x),this.whenOutOfRange.mapAll(x)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=k;class S extends e{constructor(x,E){super(),this.noiseData=x,this.offsetNoise=E}compute(x){var E,L;return(L=(E=this.offsetNoise)==null?void 0:E.sample(x.x*.25,x.y*.25,x.z*.25))!=null?L:0}maxValue(){var x,E;return((E=(x=this.offsetNoise)==null?void 0:x.maxValue)!=null?E:2)*4}}e.ShiftNoise=S;class I extends S{constructor(x,E){super(x,E)}compute(x){return super.compute(e.context(x.x,0,x.z))}withNewNoise(x){return new I(this.noiseData,x)}}e.ShiftA=I;class C extends S{constructor(x,E){super(x,E)}compute(x){return super.compute(e.context(x.z,x.x,0))}withNewNoise(x){return new C(this.noiseData,x)}}e.ShiftB=C;class M extends S{constructor(x,E){super(x,E)}withNewNoise(x){return new M(this.noiseData,x)}}e.Shift=M;class N extends n{constructor(x){super(x)}transform(x,E){return E}mapAll(x){return x.map(new N(this.input.mapAll(x)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=N;class B extends n{constructor(x,E,L){super(x),this.min=E,this.max=L}transform(x,E){return ur(E,this.min,this.max)}mapAll(x){return x.map(new B(this.input.mapAll(x),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=B;const se=class extends n{constructor(T,x,E,L){super(x),this.type=T,this.min=E,this.max=L,this.transformer=se.MappedTypes[this.type]}transform(T,x){return this.transformer(x)}mapAll(T){return T.map(new se(this.type,this.input.mapAll(T)))}minValue(){var T;return(T=this.min)!=null?T:-1/0}maxValue(){var T;return(T=this.max)!=null?T:1/0}withMinMax(){const T=this.input.minValue();let x=this.transformer(T),E=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(E=Math.max(x,E),x=Math.max(0,T)),new se(this.type,this.input,x,E)}};let le=se;le.MappedTypes={abs:T=>Math.abs(T),square:T=>T*T,cube:T=>T*T*T,half_negative:T=>T>0?T:T*.5,quarter_negative:T=>T>0?T:T*.25,squeeze:T=>{const x=ur(T,-1,1);return x/2-x*x*x/24}},e.Mapped=le;const de=["add","mul","min","max"];class O extends e{constructor(x,E,L,j,X){super(),this.type=x,this.argument1=E,this.argument2=L,this.min=j,this.max=X}compute(x){const E=this.argument1.compute(x);switch(this.type){case"add":return E+this.argument2.compute(x);case"mul":return E===0?0:E*this.argument2.compute(x);case"min":return E<this.argument2.minValue()?E:Math.min(E,this.argument2.compute(x));case"max":return E>this.argument2.maxValue()?E:Math.max(E,this.argument2.compute(x))}}mapAll(x){return x.map(new O(this.type,this.argument1.mapAll(x),this.argument2.mapAll(x)))}minValue(){var x;return(x=this.min)!=null?x:-1/0}maxValue(){var x;return(x=this.max)!=null?x:1/0}withMinMax(){const x=this.argument1.minValue(),E=this.argument2.minValue(),L=this.argument1.maxValue(),j=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(x>=j||E>=L)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let X,ue;switch(this.type){case"add":X=x+E,ue=L+j;break;case"mul":X=x>0&&E>0?x*E||0:L<0&&j<0?L*j||0:Math.min(x*j||0,E*L||0),ue=x>0&&E>0?L*j||0:L<0&&j<0?x*E||0:Math.max(x*E||0,L*j||0);break;case"min":X=Math.min(x,E),ue=Math.min(L,j);break;case"max":X=Math.max(x,E),ue=Math.max(L,j);break}return new O(this.type,this.argument1,this.argument2,X,ue)}}e.Ap2=O;class P extends e{constructor(x){super(),this.spline=x}compute(x){return this.spline.compute(x)}mapAll(x){const E=this.spline.mapAll(L=>L instanceof e?L.mapAll(x):L);return E.calculateMinMax(),x.map(new P(E))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=P;class G extends e{constructor(x,E,L,j){super(),this.fromY=x,this.toY=E,this.fromValue=L,this.toValue=j}compute(x){return $i(x.y,this.fromY,this.toY,this.fromValue,this.toValue)}minValue(){return Math.min(this.fromValue,this.toValue)}maxValue(){return Math.max(this.fromValue,this.toValue)}}e.YClampedGradient=G})(oe||(oe={}));class hr{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ge.AIR}}var mi;(function(e){function t(n){return{compute({x:r,y:i,z:s},o){if(!(o>0))return n(r,i,s).at(i)}}}e.createDisabled=t})(mi||(mi={}));const ft=class{constructor(e,t,n,r,i,s,o,a,l,u){this.noiseChunk=e,this.barrierNoise=n,this.fluidLevelFloodednessNoise=r,this.fluidLevelSpreadNoise=i,this.lavaNoise=s,this.random=o,this.globalFluidPicker=u,this.minGridX=this.gridX(He.minBlockX(t))-1,this.gridSizeX=this.gridX(He.maxBlockX(t))+1-this.minGridX+1,this.minGridY=this.gridY(a)-1,this.minGridZ=this.gridZ(He.minBlockZ(t))-1,this.gridSizeZ=this.gridZ(He.maxBlockZ(t))+1-this.minGridZ+1;const c=this.gridY(a+l)+1-this.minGridY+1;this.gridSize=this.gridSizeX*c*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(We.ZERO)}compute({x:e,y:t,z:n},r){if(r<=0){if(this.globalFluidPicker(e,t,n).at(t).is(ge.LAVA))return ge.LAVA;{const i=this.gridX(e-5),s=this.gridY(t+1),o=this.gridZ(n-5);let a=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=We.ZERO,h=We.ZERO,p=We.ZERO;for(let b=0;b<=1;b+=1)for(let A=-1;A<=1;A+=1)for(let k=0;k<=1;k+=1){const S=this.getLocation(i+b,s+A,o+k),I=We.magnitude(S);a>=I?(p=h,h=c,c=S,u=l,l=a,a=I):l>=I?(p=h,h=S,u=l,l=I):u>=I&&(p=S,u=I)}const d=this.getStatus(c),w=this.getStatus(h),v=this.getStatus(p),g=ft.similarity(a,l),_=ft.similarity(a,u),y=ft.similarity(l,u);let m;if(d.at(t).is(ge.WATER)&&this.globalFluidPicker(e,t-1,n).at(t-1).is(ge.LAVA))m=1;else if(g>-1){const b=nr(()=>this.barrierNoise.compute(oe.context(e,t*.5,n))),A=this.calculatePressure(t,d,w,b),k=this.calculatePressure(t,d,v,b),S=this.calculatePressure(t,w,v,b),I=Math.max(A,k*Math.max(0,_),S*Math.max(y));m=Math.max(0,2*Math.max(0,g)*I)}else m=0;if(r+m<=0)return d.at(t)}}}static similarity(e,t){return 1-Math.abs(t-e)/25}calculatePressure(e,t,n,r){const i=t.at(e),s=n.at(e);if(i.is(ge.LAVA)&&s.is(ge.WATER)||i.is(ge.WATER)&&s.is(ge.LAVA))return 1;const o=Math.abs(t.level-n.level);if(o===0)return 0;const a=(t.level+n.level)/2,l=e+.5-a,u=o/2-Math.abs(l),c=l>0?u>0?u/1.5:u/2.5:u>-3?(u+3)/3:(u+3)/10;return c<-2||c>2?c:c+r()}getStatus(e){const[t,n,r]=e,i=this.getIndex(this.gridX(t),this.gridY(n),this.gridZ(r)),s=this.aquiferCache[i];if(s!==void 0)return s;const o=this.computeStatus(t,n,r);return this.aquiferCache[i]=o,o}computeStatus(e,t,n){const r=this.globalFluidPicker(e,t,n);let i=Number.MAX_SAFE_INTEGER,s=!1;for(const[d,w]of ft.SURFACE_SAMPLING){const v=e+(w<<4),g=n+(w<<4),_=this.noiseChunk.getPreliminarySurfaceLevel(v,g);i=Math.min(i,_);const y=d===0&&w===0;if(y&&t-12>_+8)return r;if(y||t+12>_+8){const m=this.globalFluidPicker(v,_+8,g);if(!m.at(_+8).is(ge.AIR)){if(y)return m;s=!0}}}const o=s?$i(i+8-t,0,64,1,0):0,a=ur(this.fluidLevelFloodednessNoise.compute(oe.context(e,t*.67,n)),-1,1);if(a>dr(o,1,0,-.3,.8))return r;if(a<=dr(o,1,0,-.8,.4))return new hr(Number.MIN_SAFE_INTEGER,r.type);const l=Math.floor(t/40),u=this.fluidLevelSpreadNoise.compute(oe.context(Math.floor(e/16),l,Math.floor(n/16))),c=l*40+20+Math.floor(u/3)*3,h=Math.min(i,c),p=this.getFluidType(e,t,n,r.type,c);return new hr(h,p)}getFluidType(e,t,n,r,i){if(i<=-10){const s=this.lavaNoise.compute(oe.context(Math.floor(e/64),Math.floor(t/40),Math.floor(n/64)));if(Math.abs(s)>.3)return ge.LAVA}return r}getLocation(e,t,n){const r=this.getIndex(e,t,n),i=this.aquiferLocationCache[r];if(We.equals(i,We.ZERO))return i;const s=this.random.at(e,t,n),o=We.create(e*ft.X_SPACING+s.nextInt(10),t*ft.Y_SPACING+s.nextInt(9),n*ft.Z_SPACING+s.nextInt(10));return this.aquiferLocationCache[r]=o,o}getIndex(e,t,n){const r=e-this.minGridX,i=t-this.minGridY,s=n-this.minGridZ,o=(i*this.gridSizeZ+s)*this.gridSizeX+r;if(o<0||o>=this.gridSize)throw new Error(`Invalid aquifer index at ${e} ${t} ${n}: 0 <= ${o} < ${this.gridSize}`);return o}gridX(e){return Math.floor(e/ft.X_SPACING)}gridY(e){return Math.floor(e/ft.Y_SPACING)}gridZ(e){return Math.floor(e/ft.Z_SPACING)}};let Tr=ft;Tr.X_SPACING=16;Tr.Y_SPACING=12;Tr.Z_SPACING=16;Tr.SURFACE_SAMPLING=[[-2,-1],[-1,-1],[0,-1],[1,-1],[-3,0],[-2,0],[-1,0],[0,0],[1,0],[-2,1],[-1,1],[0,1],[1,1]];var fr;(function(e){function n(v,g,_,y,m,b){return new a(v,g,_,y,m,b)}e.target=n;function r(v,g,_,y,m,b,A){return new o(i(v),i(g),i(_),i(y),i(m),i(b),A)}e.parameters=r;function i(v,g){return typeof v=="number"?new s(v,g!=null?g:v):v}e.param=i;class s{constructor(g,_){this.min=g,this.max=_}distance(g){const _=(typeof g=="number"?g:g.min)-this.max,y=this.min-(typeof g=="number"?g:g.max);return _>0?_:Math.max(y,0)}union(g){return new s(Math.min(this.min,g.min),Math.max(this.max,g.max))}static fromJson(g){var m;if(typeof g=="number")return new s(g,g);const[_,y]=(m=R.readArray(g,b=>R.readNumber(b)))!=null?m:[];return new s(_!=null?_:0,y!=null?y:0)}}e.Param=s;class o{constructor(g,_,y,m,b,A,k){this.temperature=g,this.humidity=_,this.continentalness=y,this.erosion=m,this.depth=b,this.weirdness=A,this.offset=k}fittness(g){return Ct(this.temperature.distance(g.temperature))+Ct(this.humidity.distance(g.humidity))+Ct(this.continentalness.distance(g.continentalness))+Ct(this.erosion.distance(g.erosion))+Ct(this.depth.distance(g.depth))+Ct(this.weirdness.distance(g.weirdness))+Ct(this.offset-g.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new s(this.offset,this.offset)]}static fromJson(g){var y,m;const _=(y=R.readObject(g))!=null?y:{};return new o(s.fromJson(_.temperature),s.fromJson(_.humidity),s.fromJson(_.continentalness),s.fromJson(_.erosion),s.fromJson(_.depth),s.fromJson(_.weirdness),(m=R.readInt(_.offset))!=null?m:0)}}e.ParamPoint=o;class a{constructor(g,_,y,m,b,A){this.temperature=g,this.humidity=_,this.continentalness=y,this.erosion=m,this.depth=b,this.weirdness=A}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=a;class l{constructor(g){this.things=g,this.index=new h(g)}find(g){return this.index.search(g,(_,y)=>_.distance(y))}}e.Parameters=l;class u{constructor(g,_,y,m,b,A){this.temperature=g,this.humidity=_,this.continentalness=y,this.erosion=m,this.depth=b,this.weirdness=A}static fromRouter(g){return new e.Sampler(g.temperature,g.vegetation,g.continents,g.erosion,g.depth,g.ridges)}sample(g,_,y){const m=oe.context(g<<2,_<<2,y<<2);return e.target(this.temperature.compute(m),this.humidity.compute(m),this.continentalness.compute(m),this.erosion.compute(m),this.depth.compute(m),this.weirdness.compute(m))}}e.Sampler=u;const c=class{constructor(v){this.root=c.build(v.map(([g,_])=>new w(g,_)))}static build(v){if(v.length===1)return v[0];if(v.length<=c.CHILDREN_PER_NODE){const m=v.map(b=>{let A=0;for(let k=0;k<7;k+=1){const S=b.space[k];A+=Math.abs((S.min+S.max)/2)}return{key:A,node:b}}).sort((b,A)=>b.key-A.key).map(({node:b})=>b);return new d(m)}let g=1/0,_=-1,y=[];for(let m=0;m<7;++m){v=c.sort(v,m,!1),y=c.bucketize(v);let b=0;for(const A of y)b+=c.area(A.space);g>b&&(g=b,_=m)}return v=c.sort(v,_,!1),y=c.bucketize(v),y=c.sort(y,_,!0),new d(y.map(m=>c.build(m.children)))}static sort(v,g,_){return v.map(y=>{const m=y.space[g],b=(m.min+m.max)/2;return{key:_?Math.abs(b):b,node:y}}).sort((y,m)=>y.key-m.key).map(({node:y})=>y)}static bucketize(v){const g=[];let _=[];const y=Math.pow(10,Math.floor(Math.log(v.length-.01)/Math.log(10)));for(const m of v)_.push(m),!(_.length<y)&&(g.push(new d(_)),_=[]);return _.length!==0&&g.push(new d(_)),g}static area(v){let g=0;for(const _ of v)g+=Math.abs(_.max-_.min);return g}search(v,g){return this.root.search(v.toArray(),g).thing()}};let h=c;h.CHILDREN_PER_NODE=10,e.RTree=h;class p{constructor(g){this.space=g}distance(g){let _=0;for(let y=0;y<7;y+=1)_+=Ct(this.space[y].distance(g[y]));return _}}e.RNode=p;class d extends p{constructor(g){super(d.buildSpace(g)),this.children=g}static buildSpace(g){let _=[...Array(7)].map(()=>new s(1/0,-1/0));for(const y of g)_=[...Array(7)].map((m,b)=>_[b].union(y.space[b]));return _}search(g,_){let y=1/0,m=null;for(const b of this.children){const A=_(b,g);if(y<=A)continue;const k=b.search(g,_),S=b==k?A:_(k,g);y<=S||(y=S,m=k)}return m}}e.RSubTree=d;class w extends p{constructor(g,_){super(g.space()),this.thing=_}search(){return this}}e.RLeaf=w})(fr||(fr={}));class pr{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,s;const n=(i=R.readObject(t))!=null?i:{},r=ve.parse((s=R.readString(n.biome))!=null?s:"minecraft:the_void");return new pr(r)}}class Hs{constructor(t){this.parameters=t}getBiome(t,n,r,i){const s=i.sample(t,n,r);return this.parameters.find(s)}static fromJson(t){var s,o;const n=(s=R.readObject(t))!=null?s:{},i=((o=R.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:ve.parse((c=R.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:fr.ParamPoint.fromJson(u.parameters)}})((l=R.readObject(a))!=null?l:{})}))!=null?o:[]).map(a=>[a.parameters,()=>a.biome]);return new Hs(new fr.Parameters(i))}}var pt;(function(e){e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);function t(i,s,o){return an.NOISE.register(ve.create(i),Rn.create(s,o))}const n=new Map;function r(i,s){var c;const o=(c=s.key())==null?void 0:c.toString();if(!o)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(o);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Or(i.fromHashOf(o),s.value());return n.set(o,[a[0],a[1],u]),u}e.instantiate=r})(pt||(pt={}));var Be;(function(e){function t(o){var l,u,c,h,p;const a=(l=R.readObject(o))!=null?l:{};return{minY:(u=R.readInt(a.min_y))!=null?u:0,height:(c=R.readInt(a.height))!=null?c:256,xzSize:(h=R.readInt(a.size_horizontal))!=null?h:1,ySize:(p=R.readInt(a.size_vertical))!=null?p:1}}e.fromJson=t;function n(o){return o.ySize<<2}e.cellHeight=n;function r(o){return o.xzSize<<2}e.cellWidth=r;function i(o){return o.height/n(o)}e.cellCountY=i;function s(o){return Math.floor(o.minY/n(o))}e.minCellY=s})(Be||(Be={}));var gs;(function(e){function t(r){var s,o,a,l;const i=(s=R.readObject(r))!=null?s:{};return{target:(o=R.readNumber(i.target))!=null?o:0,size:(a=R.readInt(i.size))!=null?a:0,offset:(l=R.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,s){if(r.size<=0)return i;const o=(s-r.offset)/r.size;return Pi(r.target,i,o)}e.apply=n})(gs||(gs={}));var Pn;(function(e){const t=a=>on.parser(an.DENSITY_FUNCTION,oe.fromJson)(a).value();function n(a){var u;const l=(u=R.readObject(a))!=null?u:{};return{barrier:t(l.barrier),fluidLevelFloodedness:t(l.fluid_level_floodedness),fluidLevelSpread:t(l.fluid_level_spread),lava:t(l.lava),temperature:t(l.temperature),vegetation:t(l.vegetation),continents:t(l.continents),erosion:t(l.erosion),depth:t(l.depth),ridges:t(l.ridges),initialDensityWithoutJaggedness:t(l.initial_density_without_jaggedness),finalDensity:t(l.final_density),veinToggle:t(l.vein_toggle),veinRidged:t(l.vein_ridged),veinGap:t(l.vein_gap)}}e.fromJson=n;function r(a){return J({barrier:oe.Constant.ZERO,fluidLevelFloodedness:oe.Constant.ZERO,fluidLevelSpread:oe.Constant.ZERO,lava:oe.Constant.ZERO,temperature:oe.Constant.ZERO,vegetation:oe.Constant.ZERO,continents:oe.Constant.ZERO,erosion:oe.Constant.ZERO,depth:oe.Constant.ZERO,ridges:oe.Constant.ZERO,initialDensityWithoutJaggedness:oe.Constant.ZERO,finalDensity:oe.Constant.ZERO,veinToggle:oe.Constant.ZERO,veinRidged:oe.Constant.ZERO,veinGap:oe.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const h=(c?new Je(u):xe.create(u)).forkPositional(),p=new s(h,l);return ye(J({},p.mapAll(a)),{aquiferPositionalRandomFactory:h.fromHashOf(ve.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:h.fromHashOf(ve.create("ore").toString()).forkPositional()})}e.withSettings=i;class s{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof oe.HolderHolder){const u=l.holder.key();if(u!==void 0&&this.mapped.has(u.toString()))return this.mapped.get(u.toString());{const c=l.holder.value().mapAll(this);return u!==void 0&&this.mapped.set(u.toString(),c),c}}if(l instanceof oe.Interpolated)return l.withCellSize(Be.cellWidth(this.settings),Be.cellHeight(this.settings));if(l instanceof oe.ShiftedNoise){const u=pt.instantiate(this.random,l.noiseData);return new oe.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof oe.Noise?new oe.Noise(l.xzScale,l.yScale,l.noiseData,pt.instantiate(this.random,l.noiseData)):l instanceof oe.ShiftNoise?l.withNewNoise(pt.instantiate(this.random,l.noiseData)):l instanceof oe.WeirdScaledSampler?new oe.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,pt.instantiate(this.random,l.noiseData)):l instanceof oe.OldBlendedNoise?new oe.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new Ac(this.random.fromHashOf(ve.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof oe.Mapped||l instanceof oe.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=s;function o(a,l,u,c){const h=Be.minCellY(a)+Be.cellCountY(a),p=Be.minCellY(a),d=Be.cellHeight(a);for(let w=h;w>=p;w-=1){const v=w*d;if(ur(l.compute(oe.context(u,v,c)),-64,64)>=.390625)return v}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=o})(Pn||(Pn={}));class Sc{constructor(t,n,r,i,s,o,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=s,this.minZ=o,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Be.cellWidth(a),this.cellHeight=Be.cellHeight(a),this.firstCellX=Math.floor(s/this.cellWidth),this.firstCellZ=Math.floor(o/this.cellWidth),this.firstNoiseX=s>>2,this.firstNoiseZ=o>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=mi.createDisabled(u);const c=this.router.finalDensity;this.materialRule=gi.fromList([h=>this.aquifer.compute(h,c.compute(h))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Mr(this.preliminarySurfaceLevel,He.asLong(t,n),()=>Pn.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var gi;(function(e){function t(n){return r=>{for(const i of n){const s=i(r);if(s)return s}}}e.fromList=t})(gi||(gi={}));var En;(function(e){function t(s){var a,l,u,c;const o=(a=R.readObject(s))!=null?a:{};return o.absolute!==void 0?n((l=R.readNumber(o.absolute))!=null?l:0):o.above_bottom!==void 0?r((u=R.readNumber(o.above_bottom))!=null?u:0):o.below_top!==void 0?i((c=R.readNumber(o.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(s){return()=>s}function r(s){return o=>o.minY+s}function i(s){return o=>o.maxY-s}})(En||(En={}));var _i;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(_i||(_i={}));class Ec{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=xe.create(r).forkPositional(),this.surfaceNoise=pt.instantiate(this.random,pt.SURFACE),this.surfaceSecondaryNoise=pt.instantiate(this.random,pt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const s=He.minBlockX(t.pos),o=He.minBlockZ(t.pos),a=new Ic(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=s+u;for(let h=0;h<1;h+=1){const p=o+h;a.updateXZ(c,p);let d=0,w=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER;for(let g=t.maxY;g>=t.minY;g-=1){const _=We.create(c,g,p),y=t.getBlockState(_);if(y.equals(ge.AIR)){d=0,w=Number.MIN_SAFE_INTEGER;continue}if(y.isFluid()){w===Number.MIN_SAFE_INTEGER&&(w=g+1);continue}if(v>=g){v=Number.MIN_SAFE_INTEGER;for(let A=g-1;A>=t.minY;A-=1){const k=t.getBlockState(We.create(c,A,p));if(k.equals(ge.AIR)||k.isFluid()){v=A+1;break}}}d+=1;const m=g-v+1;if(!y.equals(this.defaultBlock))continue;a.updateY(d,m,w,g);const b=l(c,g,p);b&&t.setBlockState(_,b)}}}}getSurfaceDepth(t,n){const r=this.surfaceNoise.sample(t,0,n),i=this.random.at(t,0,n).nextDouble()*.25;return r*2.75+3+i}getSurfaceSecondary(t,n){return this.surfaceSecondaryNoise.sample(t,0,n)}getRandom(t){return Mr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class Ic{constructor(t,n,r,i,s){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=s,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=nr(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=nr(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=nr(()=>this.getBiome(We.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(ui((t&15)/16,(n&15)/16,s,o,a,l))+this.surfaceDepth-8}}var vi;(function(e){e.NOOP=()=>()=>{};function t(s){var l,u,c;const o=(l=R.readObject(s))!=null?l:{};switch((u=R.readString(o.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(ge.fromJson(o.result_state));case"sequence":return r((c=R.readArray(o.sequence,e.fromJson))!=null?c:[]);case"condition":return i(wi.fromJson(o.if_true),e.fromJson(o.then_run))}return e.NOOP}e.fromJson=t;function n(s){return()=>()=>s}e.block=n;function r(s){return o=>{const a=s.map(l=>l(o));return(l,u,c)=>{for(const h of a){const p=h(l,u,c);if(p)return p}}}}e.sequence=r;function i(s,o){return a=>(l,u,c)=>{if(s(a))return o(a)(l,u,c)}}e.condition=i})(vi||(vi={}));var wi;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var p,d,w,v,g,_,y,m,b,A,k,S;const c=(p=R.readObject(u))!=null?p:{};switch((d=R.readString(c.type))==null?void 0:d.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((w=R.readArray(c.biome_is,I=>{var C;return(C=R.readString(I))!=null?C:""}))!=null?w:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return s((v=R.readInt(c.offset))!=null?v:0,(g=R.readBoolean(c.add_surface_depth))!=null?g:!1,(_=R.readInt(c.secondary_depth_range))!=null?_:0,R.readString(c.surface_type)==="ceiling");case"vertical_gradient":return o((y=R.readString(c.random_name))!=null?y:"",En.fromJson(c.true_at_and_below),En.fromJson(c.false_at_and_above));case"water":return a((m=R.readInt(c.offset))!=null?m:0,(b=R.readInt(c.surface_depth_multiplier))!=null?b:0,(A=R.readBoolean(c.add_surface_depth))!=null?A:!1);case"y_above":return l(En.fromJson(c.anchor),(k=R.readInt(c.surface_depth_multiplier))!=null?k:0,(S=R.readBoolean(c.add_surface_depth))!=null?S:!1)}return e.FALSE}e.fromJson=t;function n(){return u=>u.blockY>=u.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(u){const c=new Set(u);return h=>c.has(h.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function s(u,c,h,p){return d=>{const w=p?d.stoneDepthBelow:d.stoneDepthAbove,v=c?d.surfaceDepth:0,g=h===0?0:dr(d.surfaceSecondary(),-1,1,0,h);return w<=1+u+v+g}}e.stoneDepth=s;function o(u,c,h){return p=>{const d=c(p.context),w=h(p.context);if(p.blockY<=d)return!0;if(p.blockY>=w)return!1;const v=p.system.getRandom(u),g=dr(p.blockY,d,w,1,0);return v.nextFloat()<g}}e.verticalGradient=o;function a(u,c,h){return p=>{if(p.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const d=h?p.stoneDepthAbove:0;return p.blockY+d>=p.waterHeight+u+p.surfaceDepth*c}}e.water=a;function l(u,c,h){return p=>{const d=h?p.stoneDepthAbove:0;return p.blockY+d>=u(p.context)+p.surfaceDepth*c}}e.yAbove=l})(wi||(wi={}));class cp{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=Pn.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new Ec(r.surfaceRule,r.defaultBlock,t);const i=new hr(-54,ge.LAVA),s=new hr(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(o,a,l)=>a<Math.min(-54,r.seaLevel)?i:s}fill(t,n=!1){var d;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),s=Be.cellWidth(this.settings.noise),o=Be.cellHeight(this.settings.noise),a=Math.floor(16/s),l=Math.floor(r/o),u=Math.floor((i-r)/o),c=He.minBlockX(t.pos),h=He.minBlockZ(t.pos),p=this.getNoiseChunk(t);for(let w=0;w<a;w+=1)for(let v=0;v<(n?1:a);v+=1){let g=t.getOrCreateSection(t.sectionsCount-1);for(let _=u-1;_>=0;_-=1)for(let y=o-1;y>=0;y-=1){const m=(l+_)*o+y,b=m&15,A=t.getSectionIndex(m);t.getSectionIndex(g.minBlockY)!==A&&(g=t.getOrCreateSection(A));for(let k=0;k<s;k+=1){const S=c+w*s+k,I=S&15;for(let C=0;C<(n?1:s);C+=1){const M=h+v*s+C,N=M&15,B=(d=p.getFinalState(S,m,M))!=null?d:this.settings.defaultBlock;g.setBlockState(I,b,N,B)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=_i.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Mr(this.noiseChunkCache,He.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),r=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),i=Be.cellWidth(this.settings.noise),s=Be.cellHeight(this.settings.noise),o=Math.floor(16/i),a=Math.floor(n/s),l=Math.floor((r-n)/s),u=He.minBlockX(t.pos),c=He.minBlockZ(t.pos);return new Sc(o,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var _s;(function(e){function t(n){var i,s,o,a,l,u;const r=(i=R.readObject(n))!=null?i:{};return{surfaceRule:vi.fromJson(r.surface_rule),noise:Be.fromJson(r.noise),defaultBlock:ge.fromJson(r.default_block),defaultFluid:ge.fromJson(r.default_fluid),noiseRouter:Pn.fromJson(r.noise_router),seaLevel:(s=R.readInt(r.sea_level))!=null?s:0,disableMobGeneration:(o=R.readBoolean(r.disable_mob_generation))!=null?o:!1,aquifersEnabled:(a=R.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=R.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=R.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(_s||(_s={}));var qo=Object.freeze(Object.defineProperty({__proto__:null,get Aquifer(){return mi},BlendedNoise:Ac,get BlockPos(){return We},BlockState:ge,Chunk:lp,get ChunkPos(){return He},ChunkSection:Di,get Climate(){return fr},get CubicSpline(){return fi},get DensityFunction(){return oe},get Direction(){return at},FixedBiome:pr,FluidStatus:hr,get Holder(){return on},Identifier:ve,ImprovedNoise:ms,get Json(){return R},LegacyPositionalRandom:bc,LegacyRandom:Je,get MaterialRule(){return gi},get MinMaxNumberFunction(){return hi},MultiNoise:Hs,NoiseAquifer:Tr,NoiseChunk:Sc,NoiseChunkGenerator:cp,get NoiseGeneratorSettings(){return _s},get NoiseParameters(){return Rn},get NoiseRouter(){return Pn},get NoiseSettings(){return Be},get NoiseSlideSettings(){return gs},get Noises(){return pt},NormalNoise:Or,PerlinNoise:_e,PerlinSimplexNoise:op,Registry:pi,SimplexNoise:Ye,Structure:Vs,get SurfaceCondition(){return wi},SurfaceContext:Ic,get SurfaceRule(){return vi},SurfaceSystem:Ec,get VerticalAnchor(){return En},get WorldgenContext(){return _i},get WorldgenRegistries(){return an},XoroshiroPositionalRandom:xc,XoroshiroRandom:xe,binarySearch:yc,clamp:ur,clampedLerp:Pi,clampedMap:$i,computeIfAbsent:Mr,getSeed:zs,inverseLerp:Fs,isPowerOfTwo:ip,lazy:nr,lazyLerp:rr,lazyLerp2:ps,lazyLerp3:wc,lerp:$t,lerp2:ui,lerp3:vc,longfromBytes:di,map:dr,smoothstep:Xr,square:Ct,upperPowerOfTwo:sp},Symbol.toStringTag,{value:"Module"}));let Zo=!1;async function up(){Zo||(await fc(Yo),Zo=!0,console.debug(`Loaded deepslate-rs from "${Yo}"`))}const dp={temperature:[-1,1],humidity:[-1,1],continentalness:[-1.1,1],erosion:[-1,1],weirdness:[-1,1],offset:[-1,1],factor:[0,12],jaggedness:[0,1]};let Xo,Jo;async function hp(e,t,n){var w,v,g;const{biomeSource:r}=await Cc(e,n),i=t.data,s=-Math.round(n.offset[0])-100+n.res/2,o=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[s*n.scale,(200+s)*n.scale,n.res*n.scale],c=[o*n.scale,(200+o)*n.scale,n.res*n.scale],h=n.layers.has("biomes")?(w=r.getBiomes)==null?void 0:w.call(r,...u,64,65,1,...c):void 0,p=[...n.layers].filter(_=>_!=="biomes"),d=p.length===0||(v=r.getClimates)==null?void 0:v.call(r,...u,64,65,1,...c);for(let _=0;_<200;_+=n.res)for(let y=0;y<200;y+=n.res){const m=y*a+_*l,b=_/n.res*200/n.res+y/n.res,A=(_+s)*n.scale,k=(y+o)*n.scale;let S=[50,50,50];if(n.layers.has("biomes")){const I=(g=h==null?void 0:h[b])!=null?g:r.getBiome(A,64,k);S=mp(I.toString(),n.biomeColors)}else if(d&&p[0]){const I=d[b][p[0]],[C,M]=dp[p[0]],N=(I-C)/(M-C)*256;S=[N,N,N]}i[m]=S[0],i[m+1]=S[1],i[m+2]=S[2],i[m+3]=255}}async function fp(e,t,n,r){var a;const{biomeSource:i}=await Cc(e,r),[s,o]=gp([t,n],r);return J({biome:i.getBiome(s,64,o).toString()},(a=i.getClimate)==null?void 0:a.call(i,s,64,o))}async function Cc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return rn(n,Xo)||(Xo=Ti(n),Jo=await pp(e,t)),{biomeSource:Jo}}async function pp(e,t){var n,r,i,s,o;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new pr(ve.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(s=(i=e.biomes)==null?void 0:i.length)!=null?s:0;return{getBiome(u,c,h){var d;const p=(((u>>a)+(h>>a))%l+l)%l;return ve.parse((d=e.biomes)==null?void 0:d[p].node)}};case"multi_noise":switch((o=e.preset)==null?void 0:o.replace(/^minecraft:/,"")){case"nether":e=Xe(t.version,"1.18")?wp:vp;break;case"overworld":e=Xe(t.version,"1.18")?await yp():e;break}if(e=D.DataModel.unwrapLists(e),Xe(t.version,"1.18")){await up();const u=new c0,c=N=>typeof N=="number"?[N,N]:N,[h,p,d,w,v,g,_,y,m,b,A,k,S,I]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const N of e.biomes){const{temperature:B,humidity:se,continentalness:le,erosion:de,weirdness:O,depth:P,offset:G}=N.parameters;h.push(c(B)[0]),p.push(c(B)[1]),d.push(c(se)[0]),w.push(c(se)[1]),v.push(c(le)[0]),g.push(c(le)[1]),_.push(c(de)[0]),y.push(c(de)[1]),m.push(c(O)[0]),b.push(c(O)[1]),A.push(c(P)[0]),k.push(c(P)[1]),S.push(G),I.push(u.getOrPut(N.biome,Math.floor(Math.random()*2147483647)))}const C=K0(new Float64Array(h),new Float64Array(p),new Float64Array(d),new Float64Array(w),new Float64Array(v),new Float64Array(g),new Float64Array(_),new Float64Array(y),new Float64Array(m),new Float64Array(b),new Float64Array(A),new Float64Array(k),new Float64Array(S),new Int32Array(I)),M=Q0(t.seed,t.octaves.temperature.firstOctave,new Float64Array(t.octaves.temperature.amplitudes),t.octaves.humidity.firstOctave,new Float64Array(t.octaves.humidity.amplitudes),t.octaves.continentalness.firstOctave,new Float64Array(t.octaves.continentalness.amplitudes),t.octaves.erosion.firstOctave,new Float64Array(t.octaves.erosion.amplitudes),t.octaves.weirdness.firstOctave,new Float64Array(t.octaves.weirdness.amplitudes),t.octaves.shift.firstOctave,new Float64Array(t.octaves.shift.amplitudes));return{getBiome(N,B,se){var de;const le=Uo(C,M,N,N+1,1,B,B+1,1,se,se+1,1);return ve.parse((de=u.getA(le[0]))!=null?de:"unknown")},getBiomes(N,B,se,le,de,O,P,G,T){return[...Uo(C,M,N,B,se,le,de,O,P,G,T)].map(E=>{var L;return ve.parse((L=u.getA(E))!=null?L:"unknown")})},getClimate(N,B,se){const le=Go(M,N,N+1,1,B,B+1,1,se,se+1,1),[de,O,P,G,T]=le.slice(0,5);return{temperature:de,humidity:O,continentalness:P,erosion:G,weirdness:T}},getClimates(N,B,se,le,de,O,P,G,T){const x=Go(M,N,B,se,le,de,O,P,G,T),E=[];for(let L=0;L<x.length;L+=7){const[j,X,ue,ze,ut]=x.slice(L,L+5);E.push({temperature:j,humidity:X,continentalness:ue,erosion:ze,weirdness:ut})}return E}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,h)=>{var d;const p=e[`${c}_noise`];return p.firstOctave=nt((d=p.firstOctave)!=null?d:-7,-100,-1),new Or(new Je(t.seed+BigInt(h)),p)});return!Array.isArray(e.biomes)||e.biomes.length===0?new pr(ve.create("unknown")):{getBiome(c,h,p){const d=u.map(g=>g.sample(c,p,0));let w=1/0,v="";for(const{biome:g,parameters:_}of e.biomes){const y=Gn(_.altitude-d[0])+Gn(_.temperature-d[1])+Gn(_.humidity-d[2])+Gn(_.weirdness-d[3])+Gn(_.offset);y<w&&(w=y,v=g)}return ve.parse(v)}}}}throw new Error("Unknown biome source")}function mp(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:_p[e];return n===void 0?Wl(e):n}function gp([e,t],n){const r=(e-n.offset[0]-100+n.res/2)*n.scale,i=(t-n.offset[1]-100+n.res/2)*n.scale;return[r,i]}const _p={"minecraft:badlands":[217,69,21],"minecraft:badlands_plateau":[202,140,101],"minecraft:bamboo_jungle":[118,142,20],"minecraft:bamboo_jungle_hills":[59,71,10],"minecraft:basalt_deltas":[64,54,54],"minecraft:beach":[250,222,85],"minecraft:birch_forest":[48,116,68],"minecraft:birch_forest_hills":[31,95,50],"minecraft:cold_ocean":[32,32,112],"minecraft:crimson_forest":[221,8,8],"minecraft:dark_forest":[64,81,26],"minecraft:dark_forest_hills":[104,121,66],"minecraft:deep_cold_ocean":[32,32,56],"minecraft:deep_frozen_ocean":[64,64,144],"minecraft:deep_lukewarm_ocean":[0,0,64],"minecraft:deep_ocean":[0,0,48],"minecraft:deep_warm_ocean":[0,0,80],"minecraft:desert":[250,148,24],"minecraft:desert_hills":[210,95,18],"minecraft:desert_lakes":[255,188,64],"minecraft:end_barrens":[128,128,255],"minecraft:end_highlands":[128,128,255],"minecraft:end_midlands":[128,128,255],"minecraft:eroded_badlands":[255,109,61],"minecraft:flower_forest":[45,142,73],"minecraft:forest":[5,102,33],"minecraft:frozen_ocean":[112,112,214],"minecraft:frozen_river":[160,160,255],"minecraft:giant_spruce_taiga":[129,142,121],"minecraft:old_growth_spruce_taiga":[129,142,121],"minecraft:giant_spruce_taiga_hills":[109,119,102],"minecraft:giant_tree_taiga":[89,102,81],"minecraft:old_growth_pine_taiga":[89,102,81],"minecraft:giant_tree_taiga_hills":[69,79,62],"minecraft:gravelly_hills":[136,136,136],"minecraft:gravelly_mountains":[136,136,136],"minecraft:windswept_gravelly_hills":[136,136,136],"minecraft:ice_spikes":[180,220,220],"minecraft:jungle":[83,123,9],"minecraft:jungle_edge":[98,139,23],"minecraft:sparse_jungle":[98,139,23],"minecraft:jungle_hills":[44,66,5],"minecraft:lukewarm_ocean":[0,0,144],"minecraft:modified_badlands_plateau":[242,180,141],"minecraft:modified_gravelly_mountains":[120,152,120],"minecraft:modified_jungle":[123,163,49],"minecraft:modified_jungle_edge":[138,179,63],"minecraft:modified_wooded_badlands_plateau":[216,191,141],"minecraft:mountain_edge":[114,120,154],"minecraft:extreme_hills":[96,96,96],"minecraft:mountains":[96,96,96],"minecraft:windswept_hills":[96,96,96],"minecraft:mushroom_field_shore":[160,0,255],"minecraft:mushroom_fields":[255,0,255],"minecraft:nether_wastes":[191,59,59],"minecraft:ocean":[0,0,112],"minecraft:plains":[141,179,96],"minecraft:river":[0,0,255],"minecraft:savanna":[189,178,95],"minecraft:savanna_plateau":[167,157,100],"minecraft:shattered_savanna":[229,218,135],"minecraft:windswept_savanna":[229,218,135],"minecraft:shattered_savanna_plateau":[207,197,140],"minecraft:small_end_islands":[128,128,255],"minecraft:snowy_beach":[250,240,192],"minecraft:snowy_mountains":[160,160,160],"minecraft:snowy_taiga":[49,85,74],"minecraft:snowy_taiga_hills":[36,63,54],"minecraft:snowy_taiga_mountains":[89,125,114],"minecraft:snowy_tundra":[255,255,255],"minecraft:snowy_plains":[255,255,255],"minecraft:soul_sand_valley":[94,56,48],"minecraft:stone_shore":[162,162,132],"minecraft:stony_shore":[162,162,132],"minecraft:sunflower_plains":[181,219,136],"minecraft:swamp":[7,249,178],"minecraft:swamp_hills":[47,255,218],"minecraft:taiga":[11,102,89],"minecraft:taiga_hills":[22,57,51],"minecraft:taiga_mountains":[51,142,129],"minecraft:tall_birch_forest":[88,156,108],"minecraft:old_growth_birch_forest":[88,156,108],"minecraft:tall_birch_hills":[71,135,90],"minecraft:the_end":[128,128,255],"minecraft:the_void":[0,0,0],"minecraft:warm_ocean":[0,0,172],"minecraft:warped_forest":[73,144,123],"minecraft:wooded_badlands_plateau":[176,151,101],"minecraft:wooded_badlands":[176,151,101],"minecraft:wooded_hills":[34,85,28],"minecraft:wooded_mountains":[80,112,80],"minecraft:windswept_forest":[80,112,80],"minecraft:snowy_slopes":[140,195,222],"minecraft:lofty_peaks":[196,168,193],"minecraft:jagged_peaks":[196,168,193],"minecraft:snowcapped_peaks":[200,198,200],"minecraft:frozen_peaks":[200,198,200],"minecraft:stony_peaks":[82,92,103],"minecraft:grove":[150,150,189],"minecraft:meadow":[169,197,80],"minecraft:lush_caves":[112,255,79],"minecraft:dripstone_caves":[140,124,0]},vp={type:"minecraft:multi_noise",seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:"minecraft:nether_wastes",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{altitude:0,temperature:0,humidity:-.5,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{altitude:0,temperature:.4,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{altitude:0,temperature:0,humidity:.5,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{altitude:0,temperature:-.5,humidity:0,weirdness:0,offset:.175}}]},wp={type:"minecraft:multi_noise",biomes:[{biome:"minecraft:nether_wastes",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{temperature:0,humidity:-.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{temperature:.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{temperature:0,humidity:.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{temperature:-.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.175}}]};async function yp(){return(await Xl("1.18","dimension","overworld")).generator.biome_source}const Xt=[50,50,51,51,52,52,53,54,56,57,57,58,58,59,60,60,60,59,59,59,60,61,61,62,63,63,64,64,64,65,65,66,66,65,65,66,66,67,67,67,68,69,71,73,74,76,79,80,81,81,82,83,83,82,82,81,81,80,80,80,81,81,82,82],Ko=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function bp(e,t,n){const r=new Je(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new _e(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:o=>r.nextInt(o),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(o){return xp(o,this)}};for(let o=0;o<n.size[0]/16;o+=1)for(let a=0;a<n.size[2]/16;a+=1)Xe(n.version,void 0,"1.17")?vn([o*16,0,a*16],D.DataModel.unwrapLists(e),i):Ep([o*16,0,a*16],D.DataModel.unwrapLists(e.placement),i);const s=t.data;t.data.fill(255);for(const[o,a]of i.placements){if(o[0]<0||o[1]<0||o[2]<0||o[0]>=n.size[0]||o[1]>=n.size[1]||o[2]>=n.size[2])continue;const l=o[2]*(t.width*4)+o[0]*4,u=a<Ko.length?Ko[a]:Wl(i.features[a]);s[l]=nt(50,205,u[0]),s[l+1]=nt(50,205,u[1]),s[l+2]=nt(50,205,u[2]),s[l+3]=255}for(let o=0;o<n.size[0];o+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(o/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+o*4;for(let u=0;u<3;u+=1)s[l+u]=.85*s[l+u]}}function $n(e){return e.startsWith("minecraft:")?e.slice(10):e}function ot(e,t){return[[e[0],t,e[2]]]}function xp(e,t){var n,r;if(typeof e=="number")return e;if(e.base)return(r=e.base)!=null?r:1+t.nextInt(1+((n=e.spread)!=null?n:0));switch($n(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return nt(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const i=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(nt(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const s=e.distribution.reduce((a,l)=>a+l.weight,0);let o=t.nextInt(s);for(const a of e.distribution)if(o-=a.weight,o<0)return t.sampleInt(a.data);return 0}return 1}function bt(e,t){if(!cn(e))throw new Error("Invalid vertical anchor");if(e.absolute)return e.absolute;if(e.above_bottom)return e.above_bottom;if(e.below_top)return 256-e.below_top;throw new Error("Invalid vertical anchor")}function Ap(e,t){var n,r,i,s;if(!cn(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return bt(e);switch($n(e.type)){case"constant":return bt(e.value);case"uniform":{const o=bt(e.min_inclusive),a=bt(e.max_inclusive);return o+t.nextInt(a-o+1)}case"biased_to_bottom":{const o=bt(e.min_inclusive),a=bt(e.max_inclusive),l=t.nextInt(a-o-((n=e.inner)!=null?n:1)+1);return o+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const o=bt(e.min_inclusive),a=bt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=o+l+t.nextInt(a-o-l+1),c=o+t.nextInt(u-o);return o+t.nextInt(c-o+l)}case"trapezoid":{const o=bt(e.min_inclusive),a=bt(e.max_inclusive),l=(s=e.plateau)!=null?s:0;if(l>=a-o)return o+t.nextInt(a-o+1);const u=(a-o-l)/2,c=a-o-u;return o+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function Qo(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function vn(e,t,n){var s;if(typeof t=="string"){n.placements.push([e,Qo(t,n)]);return}const r=$n((s=t==null?void 0:t.type)!=null?s:"no_op"),i=kp[r];i?i(t.config,e,n):n.placements.push([e,Qo(JSON.stringify(t),n)])}function vs(e,t,n){var s;const r=$n((s=t==null?void 0:t.type)!=null?s:"nope"),i=Sp[r];return i?i(t==null?void 0:t.config,e,n):[e]}const kp={decorated:(e,t,n)=>{vs(t,e==null?void 0:e.decorator,n).forEach(i=>vn(i,e==null?void 0:e.feature,n))},random_boolean_selector:(e,t,n)=>{const r=n.nextFloat()<.5?e==null?void 0:e.feature_true:e==null?void 0:e.feature_false;vn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const s of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=s==null?void 0:s.chance)!=null?i:0)){vn(t,s.feature,n);return}vn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,s,o;const r=(o=e==null?void 0:e.features)==null?void 0:o[n.nextInt((s=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?s:0)];vn(t,r,n)}},Sp={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,s;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(s=e.extra_count)!=null?s:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((i+((o=e.noise_offset)!=null?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const s=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],o=Math.max(n.seaLevel,Xt[nt(0,63,s)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[s,o,a]}),decorated:(e,t,n)=>vs(t,e==null?void 0:e.outer,n).flatMap(r=>vs(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,s,o,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((s=e==null?void 0:e.spread)!=null?s:0)-((o=e.spread)!=null?o:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return ot(t,r)},emerald_ore:(e,t,n)=>{const r=3+n.nextInt(6);return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)])},fire:(e,t,n)=>{const r=1+n.nextInt(n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},glowstone:(e,t,n)=>{const r=n.nextInt(1+n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},heightmap:(e,t,n)=>{const r=Math.max(n.seaLevel,Xt[nt(0,63,t[0])]);return ot(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Xt[nt(0,63,t[0])]);return ot(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Xt[nt(0,63,t[0])]);return ot(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const s=n.nextInt(n.nextInt(248)+8);if(s<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const o=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[o,s,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,s,o;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0);return ot(t,r)},range_biased:(e,t,n)=>{var i,s,o;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0));return ot(t,r)},range_very_biased:(e,t,n)=>{var i,s,o,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return ot(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return ot(t,r)},top_solid_heightmap:(e,t)=>{const n=Xt[nt(0,63,t[0])];return ot(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return ot(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var s,o;const n=Xt[nt(0,63,t[0])],r=n+((s=e==null?void 0:e.min_inclusive)!=null?s:-1/0),i=n+((o=e==null?void 0:e.max_inclusive)!=null?o:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function Ep(e,t,n){var i;let r=[e];for(const s of t)!ea[$n((i=s==null?void 0:s.type)!=null?i:"nope")]||(r=r.flatMap(a=>ea[$n(s.type)](s,a,n)));for(const s of r)n.placements.push([s,0])}const ea={count:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t).map(r=>[r[0]+n.nextInt(16),r[1],r[2]+n.nextInt(16)]),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>ot(t,Ap(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Xt[nt(0,63,e[0])]);return ot(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const s=Math.max(1,t),o=i.biomeInfoNoise.sample(r[0]/s,0,r[2]/s),a=Math.max(0,Math.ceil((o+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const o=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(o).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]},ws=class{constructor(){this.d=qo,this.registriesLoaded=new Set,this.chunksCache=[]}async loadVersion(e){if(console.debug("Load deepslate version",this.loadedVersion,"->",e),Xe(e,"1.19")?this.d=qo:Xe(e,"1.18.2")?this.d=await ae(()=>import("./deepslate.esm.5a95867d.js"),["assets/deepslate.esm.5a95867d.js","assets/vec3.7a0b0b73.js"]):this.d=await ae(()=>import("./deepslate.esm.8fdd9665.js"),["assets/deepslate.esm.8fdd9665.js","assets/vec3.7a0b0b73.js"]),this.d.WorldgenRegistries&&!this.registriesLoaded.has(e)){const t=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(t.map(async([n,r,i])=>{const s=await x0(e,n),o=new this.d.Registry(this.d.Identifier.create(n));for(const[a,l]of s.entries())o.register(this.d.Identifier.parse(a),i.fromJson(l));this.d.WorldgenRegistries[r].assign(o)})),this.registriesLoaded.add(e)}console.debug("Finished loading deepslate version",this.loadedVersion,"->",e),this.loadedVersion=e}loadChunkGenerator(e,t,n="unknown"){const r=[e,`${t}`,n];if(!rn(this.cacheState,r)){const i=new this.d.FixedBiome(this.d.Identifier.parse(n)),s=this.d.NoiseGeneratorSettings.fromJson(D.DataModel.unwrapLists(e)),o=new this.d.NoiseChunkGenerator(t,i,s);this.settingsCache=s.noise,this.generatorCache=o,this.chunksCache=[],this.cacheState=Ti(r)}}generateChunks(e,t,n="unknown"){if(e=Math.floor(e),!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const r=this.settingsCache.minY,i=this.settingsCache.height;return[...Array(Math.ceil(t/16)+1)].map((s,o)=>{const a=(e>>4)+o,l=this.chunksCache.find(c=>c.pos[0]===a);if(l)return l;const u=new this.d.Chunk(r,i,this.d.ChunkPos.create(a,ws.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(u,!0),this.generatorCache.buildSurface(u,n),this.chunksCache.push(u),u})}loadDensityFunction(e,t){const n=this.d.XoroshiroRandom.create(t).forkPositional(),r=this.d.NoiseSettings.fromJson({min_y:-64,height:384,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},bottom_slide:{target:.1171875,size:3,offset:0},top_slide:{target:-.078125,size:2,offset:8},terrain_shaper:{offset:.044,factor:4,jaggedness:0}});return this.settingsCache=r,this.d.DensityFunction.fromJson(e).mapAll(new this.d.NoiseRouter.Visitor(n,r))}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(e,t){e=Math.floor(e),t=Math.floor(t);const n=this.chunksCache.find(r=>this.d.ChunkPos.minBlockX(r.pos)<=e&&this.d.ChunkPos.maxBlockX(r.pos)>=e);return n==null?void 0:n.getBlockState(this.d.BlockPos.create(e,t,ws.Z))}};let Mc=ws;Mc.Z=0;class Ip{constructor(t){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const n=new Je(t);this.minLimitPerlinNoise=new _e(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new _e(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new _e(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new _e(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,s){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(s).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,s=this.fillNoiseColumn(r),o=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const u=l/this.chunkHeight,c=a*this.chunkHeight+l;n[c]=l0(u,i,s[a],s[a+1],o[a],o[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,s=684.412*this.settings.sampling.y_scale,o=i/this.settings.sampling.xz_factor,a=s/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let c=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,s,o,a);const d=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=d*(d>0?4:1),this.settings.top_slide.size>0&&(c=Ui(this.settings.top_slide.target,c,(this.chunkCountY-u-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(c=Ui(this.settings.bottom_slide.target,c,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,s,o,a){let l=0,u=0,c=0,h=1;for(let p=0;p<16;p+=1){const d=_e.wrap(t*i*h),w=_e.wrap(n*s*h),v=_e.wrap(r*i*h),g=s*h,_=this.minLimitPerlinNoise.getOctaveNoise(p);_&&(l+=_.sample(d,w,v,g,n*g)/h);const y=this.maxLimitPerlinNoise.getOctaveNoise(p);if(y&&(u+=y.sample(d,w,v,g,n*g)/h),p<8){const m=this.mainPerlinNoise.getOctaveNoise(p);m&&(c+=m.sample(_e.wrap(t*o*h),_e.wrap(n*a*h),_e.wrap(r*o*h),a*h,n*a*h)/h)}h/=2}return Ui(l/512,u/512,(c/10+1)/2)}}const Cp={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]},Rt=new Mc;async function Mp(e,t,n){var o,a,l,u;if(Xe(n.version,"1.18")){await Rt.loadVersion(n.version),Rt.loadChunkGenerator(e,n.seed,n.biome),Rt.generateChunks(-n.offset,n.width,n.biome);const c=Rt.getNoiseSettings(),h=t.data;for(let p=0;p<n.width;p+=1)for(let d=0;d<c.height;d+=1){const w=p*4+(c.height-d-1)*4*t.width,v=(o=Rt.getBlockState(p-n.offset,d+c.minY))!=null?o:ge.AIR,g=(a=Cp[v.getName().toString()])!=null?a:[0,0,0];h[w]=g[0],h[w+1]=g[1],h[w+2]=g[2],h[w+3]=255}return}const r=new Ip(n.seed);r.reset(e.noise,(l=n.biomeDepth)!=null?l:0,(u=n.biomeScale)!=null?u:0,n.offset,n.width);const i=t.data,s=t.width*4;for(let c=0;c<n.width;c+=1){const h=r.iterateNoiseColumn(c-n.offset).reverse();for(let p=0;p<e.noise.height;p+=1){const d=p*s+c*4,w=Np(h,p);i[d]=w,i[d+1]=w,i[d+2]=w,i[d+3]=255}}}function Op(e,t){return Rt.getBlockState(e,t)}async function Tp(e,t,n){await Rt.loadVersion(n.version);const r=Rt.loadDensityFunction(e,n.seed),i=Rt.getNoiseSettings(),s=Array(n.width*i.height);let o=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const h=u+(i.height-c-1)*n.width,p=r.compute(oe.context(u-n.offset,c,0));o=Math.min(o,p),a=Math.max(a,p),s[h]=p}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor($i(s[u],o,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}function Np(e,t){return e[t]>0?0:e[t+1]>0?150:255}function Lp(e,t,n){const r=new Je(n.seed),i=Rn.fromJson(D.DataModel.unwrapLists(e)),s=new Or(r,i),o=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let u=0;u<256;u+=1)for(let c=0;c<256;c+=1){const h=u*4+c*4*256,p=(u+o)*n.scale,d=(c+a)*n.scale,w=(s.sample(p,d,0)+1)*128;l[h]=w,l[h+1]=w,l[h+2]=w,l[h+3]=255}}const Rp=["biomes","temperature","humidity","continentalness","erosion","weirdness"],Pp=({model:e,data:t,shown:n,version:r})=>{var k,S;const{locale:i}=ke(),[s]=$(Bt()),[o,a]=$(2),[l,u]=$(void 0),[c,h]=$(new Set(["biomes"])),p=me([0,0]),d=me(1),w=me(),v=BigInt((k=e.get(new D.Path(["generator","seed"])))!=null?k:s),g=be(()=>{if(!!n)return Dp(e.get(new D.Path(["generator","settings"])))},[n]),_=n?$p(t,g):"",y=(S=t.type)==null?void 0:S.replace(/^minecraft:/,""),{canvas:m,redraw:b}=Ir({size(){return[200/d.current,200/d.current]},async draw(I){const C={octaves:g,biomeColors:{},layers:c,offset:p.current,scale:o,seed:v,res:d.current,version:r};await hp(t,I,C),d.current===4&&(clearTimeout(w.current),w.current=setTimeout(()=>{d.current=1,b()},150))},async onDrag(I,C){p.current[0]=p.current[0]+I*200,p.current[1]=p.current[1]+C*200,clearTimeout(w.current),d.current=y==="multi_noise"?4:1,b()},async onHover(I,C){const M={octaves:g,biomeColors:{},layers:c,offset:p.current,scale:o,seed:s,res:1,version:r},N=await fp(t,Math.floor(I*200),Math.floor(C*200),M);u(N)},onLeave(){u(void 0)}},[r,_,o,s,c]);Q(()=>{n&&(d.current=y==="multi_noise"?4:1,b())},[r,_,o,s,c,n]);const A=I=>{p.current[0]=p.current[0]*o/I,p.current[1]=p.current[1]*o/I,a(I)};return f(te,null,f("div",{class:"controls preview-controls"},l&&f(q,{label:l.biome,class:"no-pointer"}),y==="multi_noise"&&f(Ze,{icon:"stack",tooltip:i("configure_layers")},Rp.map(I=>{const C=c.has(I);return f(q,{label:i(`layer.${I}`),active:C,tooltip:i(C?"enabled":"disabled"),onClick:M=>{h(new Set([I])),M.stopPropagation()}})})),(y==="multi_noise"||y==="checkerboard")&&f(te,null,f(q,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>A(o*1.5)}),f(q,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>A(o/1.5)})),y==="multi_noise"&&f(q,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Hl(e)})),(l==null?void 0:l.temperature)!==void 0&&f("div",{class:"controls secondary-controls"},f(q,{class:"no-pointer",label:Object.entries(l).filter(([I])=>I!=="biome").map(([I,C])=>`${I[0].toUpperCase()}: ${C.toFixed(2)}`).join(" ")})),f("canvas",{ref:m,width:"200",height:"200"}))};function $p(e,t){return JSON.stringify([e,t])}function Dp(e){switch(typeof e!="string"&&(e=e.legacy_random_source?"minecraft:nether":"minecraft:overworld"),e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}const Bp=({data:e,version:t,shown:n})=>{const{locale:r}=ke(),[i,s]=$(4),[o,a]=$(Bt()),l=JSON.stringify(e),{canvas:u,redraw:c}=Ir({size(){return[i*16,i*16]},async draw(h){bp(e,h,{seed:o,version:t,size:[i*16,128,i*16]})}},[t,l,o]);return Q(()=>{n&&c()},[t,l,i,o,n]),f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>s(Math.min(16,i+1))}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>s(Math.max(1,i-1))}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Bt())})),f("canvas",{ref:u,width:"64",height:"64"}))},Fp=({data:e,shown:t,version:n})=>{var g,_;const{locale:r}=ke(),[i,s]=$(Bt()),[o,a]=$(!1),[l,u]=$(void 0),c=me(0),h=me(void 0),p=JSON.stringify([e]),d=(_=(g=e==null?void 0:e.noise)==null?void 0:g.height)!=null?_:256,{canvas:w,redraw:v}=Ir({size(){return[d,d]},async draw(y){const m={offset:c.current,width:y.width,seed:i,version:n};await Tp(e,y,m)},async onDrag(y){c.current+=y*d,v()},async onHover(y,m){var k,S;const b=Math.floor(y*d-c.current),A=d-Math.max(1,Math.ceil(m*d))+((S=(k=e==null?void 0:e.noise)==null?void 0:k.min_y)!=null?S:0);u(`X=${b} Y=${A}`)},onLeave(){u(void 0)}},[n,p,i]);return Q(()=>{h.current&&clearInterval(h.current),t&&(v(),o&&(h.current=setInterval(()=>{c.current-=8,v()},100)))},[n,p,i,t,o]),f(te,null,f("div",{class:"controls preview-controls"},l&&f(q,{label:l,class:"no-pointer"}),f(Ze,{icon:"gear",tooltip:r("terrain_settings")},f(q,{icon:o?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!o)})),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:w,width:d,height:d}))},zp=({data:e,shown:t,version:n})=>{const{locale:r}=ke(),[i,s]=$(Bt()),[o,a]=$(2),l=me([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:h}=Ir({size(){return[256,256]},async draw(d){const w={offset:l.current,scale:o,seed:i,version:n};Lp(e,d,w)},async onDrag(d,w){l.current[0]=l.current[0]+d*256,l.current[1]=l.current[1]+w*256,h()}},[n,u,o,i]);Q(()=>{t&&h()},[n,u,o,i,t]);const p=d=>{l.current[0]=l.current[0]*o/d,l.current[1]=l.current[1]*o/d,a(d)};return f(te,null,f("div",{class:"controls preview-controls"},f(q,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>p(o*1.5)}),f(q,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>p(o/1.5)}),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:c,width:"256",height:"256"}))},jp=({data:e,shown:t,version:n})=>{var S,I;const{locale:r}=ke(),[i,s]=$(Bt()),[o,a]=$("minecraft:plains"),[l,u]=$(.2),[c,h]=$(.1),[p,d]=$(!1),[w,v]=$(void 0),g=me(0),_=me(void 0),y=JSON.stringify([e,l,c]),m=(I=(S=e==null?void 0:e.noise)==null?void 0:S.height)!=null?I:256,{canvas:b,redraw:A}=Ir({size(){return[m,m]},async draw(C){const M={biome:o,biomeDepth:c,biomeScale:l,offset:g.current,width:C.width,seed:i,version:n};await Mp(e,C,M)},async onDrag(C){g.current+=C*m,A()},async onHover(C,M){var le,de;const N=Math.floor(C*m-g.current),B=m-Math.max(1,Math.ceil(M*m))+((de=(le=e==null?void 0:e.noise)==null?void 0:le.min_y)!=null?de:0),se=Op(N,B);v(se?`Y=${B} (${se.getName().path})`:`Y=${B}`)},onLeave(){v(void 0)}},[y,i]);Q(()=>{_.current&&clearInterval(_.current),t&&(async()=>{try{await A(),p&&(_.current=setInterval(()=>{g.current-=8,A()},100))}catch(C){throw C}})()},[n,y,i,t,o,l,c,p]);const k=be(()=>{var C;return(C=Zr==null?void 0:Zr.get("worldgen/biome"))!=null?C:[]},[n]);return f(te,null,f("div",{class:"controls preview-controls"},w&&f(q,{label:w,class:"no-pointer"}),f(Ze,{icon:"gear",tooltip:r("terrain_settings")},Xe(n,void 0,"1.17")?f(te,null,f(qr,{label:r("preview.scale"),value:`${l}`,onChange:C=>u(Number(C))}),f(qr,{label:r("preview.depth"),value:`${c}`,onChange:C=>h(Number(C))})):f(qr,{label:r("preview.biome"),value:o,onChange:a,dataList:k,larger:!0}),f(q,{icon:p?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>d(!p)})),f(q,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(Bt())})),f("canvas",{ref:b,width:m,height:m}))},Vp=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function Hp({model:e,version:t,id:n,shown:r}){var s;const[,i]=$(0);if(Ni(e,()=>{i(o=>o+1)}),!e)return f(te,null);if(n==="dimension"&&((s=e.get(new D.Path(["generator","type"])))==null?void 0:s.endsWith("noise"))){const o=e.get(new D.Path(["generator","biome_source"]));if(o)return f(Pp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/density_function"){const o=e.get(new D.Path([]));if(o)return f(Fp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise"){const o=e.get(new D.Path([]));if(o)return f(zp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise_settings"){const o=e.get(new D.Path([]));if(o)return f(jp,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&Xe(t,"1.16","1.17")){const o=e.get(new D.Path([]));if(o)return f(Bp,{model:e,version:t,shown:r,data:o})}return f(te,null)}function Qr(e,t){return e.schema.hook(Up,new D.ModelPath(e),e.data,{blockStates:t})}const Up={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((s,o)=>e.hook(this,t.push(o),s.node,r));for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const s=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[D.relativePath(n,t.validation.params.id).get()]:null,o={};Object.keys(r).forEach(u=>{var c;s&&!Object.keys((c=s.properties)!=null?c:{}).includes(u)||(o[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))o[u]=r[u];return o},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},s=e(t);Object.keys(s).filter(o=>s[o].enabled(t)).forEach(o=>{const a=s[o].hook(this,t.push(o),n[o],r);a!=null&&(i[o]=a)});for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i}},qi={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Yn=null;const Zi={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Yn=await ae(()=>import("./index.cde12050.js").then(function(n){return n.i}),[]),Yn.parse(e)}},stringify:(e,t)=>(Yn!=null?Yn:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>ls.load(e),stringify:(e,t)=>ls.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function Gp({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:s,copySuccess:o,onError:a}){const{locale:l}=ke(),[u,c]=$(Pe.getIndent()),[h,p]=$(Pe.getFormat()),[d,w]=$(Pe.getHighlighting()),[v,g]=$(!1),_=me(null),y=me(()=>{}),m=me(async()=>{}),b=me(null),A=me(),k=Ie((M,N)=>{const B=Qr(M,N);return Zi[h].stringify(B,qi[u])},[u,h]);Q(()=>{y.current=()=>{if(!!A.current&&!(!t||!n))try{const M=k(t,n);A.current.setValue(M)}catch(M){M instanceof Error?(M.message=`Error getting JSON output: ${M.message}`,a(M)):a(`Error getting JSON output: ${lt(M)}`),console.error(M),A.current.setValue("")}},m.current=async()=>{if(!A.current)return;const M=A.current.getValue();if(M.length!==0)try{const N=await Zi[h].parse(M);t==null||t.reset(D.DataModel.wrapLists(N),!1)}catch(N){N instanceof Error?(N.message=`Error importing: ${N.message}`,a(N)):a(`Error importing: ${lt(N)}`),console.error(N)}}},[t,n,u,h,d]),Q(()=>{d?(g(!1),A.current={getValue(){return""},setValue(){},configure(){},select(){}},ae(()=>import("./index.8ac52a74.js").then(function(M){return M.i}),[]).then(async M=>{await Promise.all([ae(()=>import("./json.c327d69b.js").then(function(B){return B.j}),[]),ae(()=>import("./yaml.e8f3b9ab.js"),[])]);const N=M.edit("editor");N.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),N.$blockScrolling=1/0,N.on("blur",()=>m.current()),N.getSession().setMode("ace/mode/json"),A.current={getValue(){return N.getSession().getValue()},setValue(B){N.getSession().setValue(B)},configure(B,se){N.setOption("useSoftTabs",B!=="tabs"),N.setOption("tabSize",B==="tabs"?4:qi[B]),N.getSession().setMode(`ace/mode/${se}`)},select(){N.selectAll()}},g(!0)})):A.current={getValue(){return b.current?b.current.value:""},setValue(M){!b.current||(b.current.value=M)},configure(){},select(){}}},[d]),Ni(t,()=>{!y.current||y.current()}),Q(()=>{!y.current||t&&y.current()},[t]),Q(()=>{!A.current||!y.current||(!d||v)&&(A.current.configure(u,h),y.current())},[u,h,d,v]),Q(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{o()})},[r]),Q(()=>{if(i&&t&&n&&_.current){const M=encodeURIComponent(k(t,n));_.current.setAttribute("href",`data:text/json;charset=utf-8,${M}`),_.current.setAttribute("download",`${e}.${h}`),_.current.click()}},[i]),Q(()=>{s&&A.current&&(A.current.setValue(""),A.current.select())},[s]);const S=M=>{Pe.setIndent(M),c(M)},I=M=>{Pe.setFormat(M),p(M)},C=M=>{Pe.setHighlighting(M),w(M)};return f(te,null,f("div",{class:"controls source-controls"},f(Ze,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(qi).map(([M])=>f(q,{label:l(`indentation.${M}`),active:u===M,onClick:()=>S(M)})),f("hr",null),Object.keys(Zi).map(M=>f(q,{label:l(`format.${M}`),active:h===M,onClick:()=>I(M)})),f("hr",null),f(q,{icon:d?"square_fill":"square",label:l("highlighting"),onClick:()=>C(!d)}))),d?f("pre",{id:"editor",class:"source"}):f("textarea",{ref:b,class:"source",spellcheck:!1,autocorrect:"off",onBlur:m.current}),f("a",{ref:_,style:"display: none;"}))}function Oc(e,t){for(var n in t)e[n]=t[n];return e}function ys(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function bs(e){this.props=e}function Tc(e,t){function n(i){var s=this.props.ref,o=s==i.ref;return!o&&s&&(s.call?s(null):s.current=null),t?!t(this.props,i)||!o:ys(this.props,i)}function r(i){return this.shouldComponentUpdate=n,f(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bs.prototype=new mt).isPureReactComponent=!0,bs.prototype.shouldComponentUpdate=function(e,t){return ys(this.props,e)||ys(this.state,t)};var ta=U.__b;U.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ta&&ta(e)};var Yp=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Wp(e){function t(n,r){var i=Oc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=Yp,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var na=function(e,t){return e==null?null:gt(gt(e).map(t))},qp={map:na,forEach:na,count:function(e){return e?gt(e).length:0},only:function(e){var t=gt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:gt},Zp=U.__e;U.__e=function(e,t,n){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}Zp(e,t,n)};var ra=U.unmount;function ei(){this.__u=0,this.t=null,this.__b=null}function Nc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Xp(e){var t,n,r;function i(s){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return f(n,s)}return i.displayName="Lazy",i.__f=!0,i}function Xn(){this.u=null,this.o=null}U.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ra&&ra(e)},(ei.prototype=new mt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Nc(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function h(p,d,w){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(v){return h(v,d,w)}),p.__c&&p.__c.__P===d&&(p.__e&&w.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=w)),p}(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__e:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(o,o)},ei.prototype.componentWillUnmount=function(){this.t=[]},ei.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function s(o,a,l){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),o.__c.__H=null),(o=Oc({},o)).__c!=null&&(o.__c.__P===l&&(o.__c.__P=a),o.__c=null),o.__k=o.__k&&o.__k.map(function(u){return s(u,a,l)})),o}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&f(te,null,e.fallback);return i&&(i.__h=null),[f(te,null,t.__e?null:e.children),i]};var ia=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Jp(e){return this.getChildContext=function(){return e.context},e.children}function Kp(e){var t=this,n=e.i;t.componentWillUnmount=function(){In(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),In(f(Jp,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Qp(e,t){return f(Kp,{__v:e,i:t})}(Xn.prototype=new mt).__e=function(e){var t=this,n=Nc(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),ia(t,e,r)):i()};n?n(s):s()}},Xn.prototype.render=function(e){this.u=null,this.o=new Map;var t=gt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Xn.prototype.componentDidUpdate=Xn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ia(e,n,t)})};var Lc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,e1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,t1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function n1(e,t,n){return t.__k==null&&(t.textContent=""),In(e,t),typeof n=="function"&&n(),e?e.__c:null}function r1(e,t,n){return Ua(e,t),typeof n=="function"&&n(),e?e.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(mt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var sa=U.event;function i1(){}function s1(){return this.cancelBubble}function o1(){return this.defaultPrevented}U.event=function(e){return sa&&(e=sa(e)),e.persist=i1,e.isPropagationStopped=s1,e.isDefaultPrevented=o1,e.nativeEvent=e};var Rc,oa={configurable:!0,get:function(){return this.class}},aa=U.vnode;U.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var i in r={},n){var s=n[i];i==="value"&&"defaultValue"in n&&s==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!t1(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():e1.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),r[i]=s)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=gt(n.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=gt(n.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),e.props=r}t&&n.class!=n.className&&(oa.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",oa)),e.$$typeof=Lc,aa&&aa(e)};var la=U.__r;U.__r=function(e){la&&la(e),Rc=e.__c};var a1={ReactCurrentDispatcher:{current:{readContext:function(e){return Rc.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function l1(e){return f.bind(null,e)}function Pc(e){return!!e&&e.$$typeof===Lc}function c1(e){return Pc(e)?Ga.apply(null,arguments):e}function u1(e){return!!e.__k&&(In(null,e),!0)}function d1(e){return e&&(e.base||e.nodeType===1&&e)||null}var h1=function(e,t){return e(t)},xs={useState:$,useReducer:Ka,useEffect:Q,useLayoutEffect:Qa,useRef:me,useImperativeHandle:Tu,useMemo:be,useCallback:Ie,useContext:Fn,useDebugValue:Nu,version:"16.8.0",Children:qp,render:n1,hydrate:r1,unmountComponentAtNode:u1,createPortal:Qp,createElement:f,createContext:Dn,createFactory:l1,cloneElement:c1,createRef:pu,Fragment:te,isValidElement:Pc,findDOMNode:d1,Component:mt,PureComponent:bs,memo:Tc,forwardRef:Wp,unstable_batchedUpdates:h1,StrictMode:te,Suspense:ei,SuspenseList:Xn,lazy:Xp,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:a1};class $c extends D.DataModel{constructor(t,n,r,i){super(t),this.mapper=n,this.getter=r,this.setter=i}map(t){return this.mapper(t)}get(t){return this.getter(t)}set(t,n,r){return this.setter(t,n,r)}}const f1=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","recipe.type","dimension.generator.type","dimension.generator.biome_source.type","dimension.generator.biome_source.preset","carver.type","feature.type","decorator.type","feature.tree.minimum_size.type","block_state_provider.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","int_provider.type","float_provider.type","height_provider.type","structure_feature.type","surface_builder.type","processor.processor_type","rule_test.predicate_type","pos_rule_test.predicate_type","template_element.element_type","block_placer.type","block_predicate.type","material_rule.type","material_condition.type","structure_placement.type","density_function.type","root_placer.type","entity.type_specific.cat.variant","entity.type_specific.frog.variant"],p1=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],m1=["feature.config","decorator.config","int_provider.value","float_provider.value","block_state_provider.simple_state_provider.state","block_state_provider.rotated_block_provider.state","block_state_provider.weighted_state_provider.entries.entry.data","rule_test.block_state","structure_feature.config","surface_builder.config","template_pool.elements.entry.element","decorator.block_survives_filter.state","material_rule.block.result_state"],g1=["loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","feature.type","decorator.type","block_state_provider.type","feature.tree.minimum_size.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","block_placer.type","rule_test.predicate_type","processor.processor_type","template_element.element_type","nbt_operation.op","number_provider.value","score_provider.name","score_provider.target","nbt_provider.source","nbt_provider.target","generator_biome.biome","block_predicate.type","material_rule.type","material_condition.type","density_function.type","root_placer.type","entity.type_specific.type"],_1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],v1=["generator_biome.parameters.temperature","generator_biome.parameters.humidity","generator_biome.parameters.continentalness","generator_biome.parameters.erosion","generator_biome.parameters.depth","generator_biome.parameters.weirdness","feature.end_spike.crystal_beam_target","feature.end_gateway.exit","decorator.block_filter.offset","block_predicate.matching_blocks.offset","block_predicate.matching_fluids.offset","model_element.from","model_element.to","model_element.rotation.origin","model_element.faces.uv","item_transform.rotation","item_transform.translation","item_transform.scale","generator_structure.random_spread.locate_offset"],ca=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],w1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],y1=e=>pe.generators.find(t=>t.id===e.replace(/^\$/,"")),b1=new D.DataModel(D.MapNode(D.StringNode(),D.StringNode()),{historyMax:0});function x1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new D.ModelPath(e),[s,o,a]=e.schema.hook(Dc,i,Ti(e.data),t,n,r,{});return(l=o==null?void 0:o.props)!=null&&l.children.some(u=>u)?f("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},f("div",{class:"node-header"},s,o),f("div",{class:"node-body"},a)):a}const Dc={base(){return[null,null,null]},boolean(e,t,n,r,i,s,o){return[null,f(A1,J({},ye(J({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},choice({choices:e,config:t,switchNode:n},r,i,s,o,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new D.ModelPath(r.getModel(),new D.Path(r.getArray(),[t.context])):r,[h,p,d]=u.node.hook(this,c,i,s,o,a,l);if(e.length===1)return[h,p,d];const w=t!=null&&t.choiceContext?new D.Path([],[t.choiceContext]):t!=null&&t.context?new D.Path([],[t.context]):r,v=_=>{var A;const y=(A=e.find(k=>k.type===_))!=null?A:u,m=y.node.default(),b=y.change?y.change(D.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(m==null?void 0:m.type)==="minecraft:decorated"?m.config.feature:m;r.model.set(r,D.DataModel.wrapLists(b))},g=f("select",{value:u.type,onChange:_=>v(_.target.value)},e.map(_=>f("option",{value:_.type},yi(s,w.contextPush(_.type)))));return[h,f(te,null,g,p),d]},list({children:e,config:t},n,r,i,s,o,a){const{expand:l,collapse:u,isToggled:c}=Xi(),[h,p]=$(50),d=n.getContext().join(".");if(v1.includes(d)){const y=f(te,null,[...Array(t.maxLength)].map((b,A)=>f(Jn,{lang:i,path:n.modelPush(A)})),f("div",{class:"fixed-list"})),m=f(te,null,[...Array(t.maxLength)].map((b,A)=>{var S;return e.hook(this,n.modelPush(A),(S=r==null?void 0:r[A])==null?void 0:S.node,i,s,o,a)[1]}));return[y,m,null]}const w=()=>{Array.isArray(r)||(r=[]);const y=D.DataModel.wrapLists(e.default());n.model.set(n,[{node:y,id:en()},...r])},v=()=>{Array.isArray(r)||(r=[]);const y=D.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:y,id:en()}])},g=f("button",{class:"add tooltipped tip-se","aria-label":ce(i,"add_top"),onClick:w},ie.plus_circle),_=f(te,null,r&&Array.isArray(r)&&r.map(({node:y,id:m},b)=>{if(b===h)return f("div",{class:"node node-header"},f("label",null,ce(i,"entries_hidden",`${r.length-h}`)),f("button",{onClick:()=>p(Math.min(h+50,r.length))},ce(i,"entries_hidden.more","50")),f("button",{onClick:()=>p(r.length)},ce(i,"entries_hidden.all")));if(b>h)return null;const A=n.push(b).contextPush("entry"),k=e.type(A)==="object",S=c(m);if(k&&(S===!1||S===void 0&&r.length>20))return f("div",{class:"node node-header","data-category":e.category(A)},f(Jn,{lang:i,path:A,nested:!0}),f("button",{class:"toggle tooltipped tip-se","aria-label":`${ce(i,"expand")}
${ce(i,"expand_all","Ctrl")}`,onClick:l(m)},ie.chevron_right),f("label",null,yi(i,A,`${b}`)),f(ua,{key:m,path:A,value:y,schema:e}));const I=()=>A.set(void 0),C=()=>{const B=[...n.get()];[B[b-1],B[b]]=[B[b],B[b-1]],n.model.set(n,B)},M=()=>{const B=[...n.get()];[B[b+1],B[b]]=[B[b],B[b+1]],n.model.set(n,B)};return f(Ji,{key:m,path:A,schema:e,value:y,lang:i,version:s,states:o,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const B=[...n.get()];B.splice(b,0,{id:en(),node:Ti(y)}),n.model.set(n,B)}}],ctx:ye(J({},a),{index:(b===0?1:0)+(b===r.length-1?2:0)})},k&&f("button",{class:"toggle tooltipped tip-se","aria-label":`${ce(i,"collapse")}
${ce(i,"collapse_all","Ctrl")}`,onClick:u(m)},ie.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":ce(i,"remove"),onClick:I},ie.trashcan),r.length>1&&f("div",{class:"node-move"},f("button",{class:"move tooltipped tip-se","aria-label":ce(i,"move_up"),onClick:C,disabled:b===0},ie.chevron_up),f("button",{class:"move tooltipped tip-se","aria-label":ce(i,"move_down"),onClick:M,disabled:b===r.length-1},ie.chevron_down)))}),r&&r.length>0&&r.length<=h&&f("div",{class:"node node-header"},f("button",{class:"add tooltipped tip-se","aria-label":ce(i,"add_bottom"),onClick:v},ie.plus_circle)));return[null,g,_]},map({children:e,keys:t,config:n},r,i,s,o,a,l){var y,m,b,A,k;const{expand:u,collapse:c,isToggled:h}=Xi(),p=new D.ModelPath(b1,new D.Path([I1(r.toString())])),d=()=>{const S=p.get();r.model.set(r.push(S),D.DataModel.wrapLists(e.default()))},w=((y=n.validation)==null?void 0:y.validator)==="block_state_map"?a==null?void 0:a[D.relativePath(r,n.validation.params.id).get()]:null,v=w!=null&&w.properties?D.StringNode(null,{enum:Object.keys((m=w.properties)!=null?m:{})}):t;if(w&&r.last()==="Properties"){typeof i!="object"&&(i={});const S=Object.entries((b=w.properties)!=null?b:{}).map(([I,C])=>[I,D.StringNode(null,{enum:C})]);return Object.entries((A=w.properties)!=null?A:{}).forEach(([I,C])=>{typeof i[I]!="string"?r.model.errors.add(r.push(I),"error.expected_string"):C.includes(i[I])||r.model.errors.add(r.push(I),"error.invalid_enum_option",i[I])}),D.ObjectNode(Object.fromEntries(S)).hook(this,r,i,s,o,a,l)}const g=f(te,null,v.hook(this,p,(k=p.get())!=null?k:"",s,o,a,l)[1],f("button",{class:"add tooltipped tip-se","aria-label":ce(s,"add"),onClick:d},ie.plus_circle)),_=f(te,null,typeof i=="object"&&Object.entries(i).map(([S,I])=>{var le,de,O,P;const C=r.modelPush(S),M=e.type(C)==="object",N=h(S);if(M&&(N===!1||N===void 0&&i.length>20))return f("div",{class:"node node-header","data-category":e.category(C)},f(Jn,{lang:s,path:C,nested:!0}),f("button",{class:"toggle tooltipped tip-se","aria-label":`${ce(s,"expand")}
${ce(s,"expand_all","Ctrl")}`,onClick:u(S)},ie.chevron_right),f("label",null,S),f(ua,{key:S,path:C,value:I,schema:e}));const B=w?D.StringNode(null,{enum:(de=(le=w.properties)==null?void 0:le[S])!=null?de:[]}):e;((O=w==null?void 0:w.properties)==null?void 0:O[S])&&typeof I=="string"&&!((P=w.properties)!=null&&P[S].includes(I))&&r.model.errors.add(C,"error.invalid_enum_option",I);const se=()=>C.set(void 0);return f(Ji,{key:S,schema:B,path:C,value:I,lang:s,version:o,states:a,ctx:l,label:S},M&&f("button",{class:"toggle tooltipped tip-se","aria-label":`${ce(s,"collapse")}
${ce(s,"collapse_all","Ctrl")}`,onClick:c(S)},ie.chevron_down),f("button",{class:"remove tooltipped tip-se","aria-label":ce(s,"remove"),onClick:se},ie.trashcan))}));return[null,g,_]},number(e,t,n,r,i,s,o){return[null,f(k1,J({},ye(J({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,s,o,a,l,u){var y;const{expand:c,collapse:h,isToggled:p}=Xi();if(i.getArray().length==0&&C1(t.context,s)){const{wrapper:m,fields:b}=M1(n(i),i,s);s=m.data,n=()=>b,r=(A,k)=>new D.ModelPath(m,new D.Path(A.getArray(),["feature"])).push(k)}let d=null,w=null;if(e.optional())if(s===void 0){const m=()=>i.set(D.DataModel.wrapLists(e.default()));w=f("button",{class:"collapse closed tooltipped tip-se","aria-label":ce(o,"expand"),onClick:m},ie.plus_circle)}else{const m=()=>i.set(void 0);w=f("button",{class:"collapse open tooltipped tip-se","aria-label":ce(o,"remove"),onClick:m},ie.trashcan)}const v=i.getContext().join(".");if(w1.includes(v)||ca.includes(v)){const m=p(""),b=ca.includes(v)?m:!m;if(d=f(te,null,f("button",{class:"toggle tooltipped tip-se","aria-label":ce(o,b?"collapse":"expand"),onClick:m?h(""):c("")},b?ie.chevron_down:ie.chevron_right)),!b)return[d,w,null]}const g=typeof s=="object"&&s!==null&&((y=e.default())==null?void 0:y.pools)?ye(J({},u),{loot:s==null?void 0:s.type}):u,_=f(te,null,typeof s=="object"&&s!==null&&!(e.optional()&&s===void 0)&&Object.entries(n(i)).filter(([m,b])=>b.enabled(i)).map(([m,b])=>{const A=r(i,m),k=A.getContext().join(".");if(p1.includes(k))return null;const[S,I,C]=b.hook(this,A,s[m],o,a,l,g),M=b.type(A)==="object"&&m1.includes(k),N=g1.includes(k);return M||N?(d=f(te,null,d,f(Jn,{lang:o,path:A}),f(Bc,{lang:o,path:A}),S),w=f(te,null,w,I),M?C:null):f(Ji,{key:m,schema:b,path:A,value:s[m],lang:o,version:a,states:l,ctx:g})}));return[d,w,_]},string(e,t,n,r,i,s,o){return[null,f(S1,J({},ye(J({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o}))),null]}};function ua({path:e,value:t}){var r,i,s,o,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return f("label",null,(i=(r=t==null?void 0:t.entries)==null?void 0:r.length)!=null?i:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return f("label",null,(a=(s=t==null?void 0:t.name)==null?void 0:s.replace(/^minecraft:/,""))!=null?a:(o=t==null?void 0:t.type)==null?void 0:o.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return f("label",null,l.replace(/^minecraft:/,""));return null}function Xi(){const[e,t]=$(new Map),[n,r]=$(void 0);return{expand:a=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(u=>new Map(u.set(a,!0)))},collapse:a=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(u=>new Map(u.set(a,!1)))},isToggled:a=>{var l;return e instanceof Map?(l=e.get(a))!=null?l:n:!1}}}function A1({path:e,node:t,value:n,lang:r}){const i=s=>{e.model.set(e,t.optional()&&n===s?void 0:s)};return f(te,null,f("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},ce(r,"false")),f("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},ce(r,"true")))}function k1({path:e,config:t,integer:n,value:r,lang:i}){var a;const s=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},o=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return f(te,null,f("input",{type:"text",value:r!=null?r:"",onBlur:s,onKeyDown:l=>{l.key==="Enter"&&s(l)}}),(t==null?void 0:t.color)&&f("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:o}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&f("button",{onClick:()=>Hl(e.model),class:"tooltipped tip-se","aria-label":ce(i,"generate_new_seed")},ie.sync))}function S1({path:e,getValues:t,config:n,node:r,value:i,lang:s,version:o,states:a}){var p;const l=d=>{d.stopPropagation();const w=d.target.value;w!==i&&e.model.set(e,w.length===0?void 0:w)},u=t(),c=e.getContext().join("."),h=!Wn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(_1.includes(c))return f("textarea",{value:i!=null?i:"",onBlur:l});if(Wn(n)&&!n.additional||f1.includes(c)){let d=new D.Path([]);return Wn(n)&&typeof n.enum=="string"?d=d.contextPush(n.enum):h?d=d.contextPush(h):Wn(n)&&(d=e),f("select",{value:i!=null?i:"",onChange:l},r.optional()&&f("option",{value:""},ce(s,"unset")),u.map(w=>f("option",{value:w},yi(s,d.contextPush(w.replace(/^minecraft:/,""))))))}else if(!Wn(n)&&(n==null?void 0:n.validator)==="block_state_key"){const d=a==null?void 0:a[D.relativePath(e,n.params.id).get()],w=Object.keys((p=d==null?void 0:d.properties)!=null?p:{});return f("select",{value:i!=null?i:"",onChange:l},w.map(v=>f("option",null,v)))}else{const d=en(),w=h?y1(h):void 0;return f(te,null,f("input",{value:i!=null?i:"",onBlur:l,onKeyDown:v=>{v.key==="Enter"&&l(v)},list:u.length>0?d:""}),u.length>0&&f("datalist",{id:d},u.map(v=>f("option",{value:v}))),w&&u.includes(i)&&i.startsWith("minecraft:")&&f("a",{href:`/${w.url}/?version=${o}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":ce(s,"follow_reference")},ie.link_external))}}function E1({label:e,schema:t,path:n,value:r,lang:i,version:s,states:o,ctx:a,actions:l,children:u}){var b;const c=t.type(n),h=t.category(n),p=n.getContext().join("."),[d,w]=Ps(),v=A=>{A.preventDefault(),w()},g=ye(J({},a),{depth:((b=a.depth)!=null?b:0)+1});delete g.index;const[_,y,m]=t.hook(Dc,n,r,i,s,o,g);return f("div",{class:`node ${c}-node`,"data-category":h},f("div",{class:"node-header",onContextMenu:v},f(Jn,{lang:i,path:n}),f(Bc,{lang:i,path:n}),u,_,f("label",null,e!=null?e:yi(i,n,`${n.last()}`),d&&f("div",{class:"node-menu"},l==null?void 0:l.map(A=>{var k;return f("div",{key:A.label,class:"menu-item"},f(q,{icon:A.icon,tooltip:ce(i,A.label),tooltipLoc:"se",onClick:()=>A.onSelect()}),f("span",null,(k=A.description)!=null?k:ce(i,A.label)))}),f("div",{class:"menu-item"},f(q,{icon:"clippy",tooltip:ce(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(p)}),f("span",null,p)))),y),m&&f("div",{class:"node-body"},m))}const Ji=Tc(E1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&rn(e.ctx,t.ctx)&&rn(e.value,t.value));function Wn(e){return!!(e!=null&&e.enum)}function I1(e){var t=0,n,r;for(n=0;n<e.length;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t}function yi(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const s=r.slice(i).join("."),o=ce(e,s,...n);if(s!==o)return o}return r[r.length-1]}function Jn({lang:e,path:t,nested:n}){var s;t.model instanceof $c&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(o=>o.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=ce(e,r[0].error,...(s=r[0].params)!=null?s:[]);return Fc("node-error","issue_opened",i)}function Bc({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=ce(e,n);return r===n?null:Fc("node-help","info",r)}const Fc=(e,t,n)=>{const[r,i]=Ps();return f("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},ie[t],f("span",{class:"icon-popup"},n))};function C1(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&cn(t==null?void 0:t.config)}function M1(e,t,n){const r=[],i=Kn(n,r),s={type:e.type,config:D.ObjectNode({decorators:D.ListNode(Kl),feature:Ql},{context:"feature.decorated"})},o=D.ObjectNode(s,{context:"feature"}),a=new D.Path(["config","feature"]),l=new D.Path(["config","decorators"]),u=t.getModel(),c=new $c(o,h=>{if(h.startsWith(a))return new D.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...h.modelArr]);if(h.startsWith(l)){if(h.modelArr.length===2)return new D.Path([]);const p=h.modelArr[2];if(typeof p=="number")return new D.Path([...[...Array(p)].flatMap(()=>["config","feature"]),"config","decorator",...h.modelArr.slice(3)])}return h},h=>{if(h.equals(l)){const p=[];return Kn(u.data,p),p}return u.get(c.map(h))},(h,p,d)=>{if(h.startsWith(a)){const w=[];Kn(u.data,w);const v=new D.Path([...[...Array(w.length-1)].flatMap(()=>["config","feature"]),...h.modelArr]);return u.set(v,p,d)}else if(h.startsWith(l)){const w=h.modelArr[2];if(h.modelArr.length===2){const v=c.get(a);return u.set(new D.Path,As(v,p),d)}else if(typeof w=="number")if(h.modelArr.length===3&&p===void 0){const v=c.get(a),g=[];Kn(u.data,g),g.splice(w,1);const _=As(v,g);return u.set(new D.Path,_,d)}else{const v=new D.Path([...[...Array(w)].flatMap(()=>["config","feature"]),"config","decorator",...h.modelArr.slice(3)]);return u.set(v,p,d)}}u.set(h,p,d)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:s,wrapper:c}}function Kn(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!cn(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),Kn((r=e.config.feature)!=null?r:"",t))}function As(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:As(e,t)}}}function O1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=ke();if(!t||!n||i==="none")return f(te,null);const[s]=el(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(s)return f(te,null);const[,o]=$(0);return Ni(t,()=>{o(a=>a+1)}),f("div",{class:"tree","data-cy":"tree"},f(x1,{model:t,lang:i,version:e,blockStates:n}))}var T1=Object.defineProperty,N1=Object.defineProperties,L1=Object.getOwnPropertyDescriptors,da=Object.getOwnPropertySymbols,R1=Object.prototype.hasOwnProperty,P1=Object.prototype.propertyIsEnumerable,ha=(e,t,n)=>t in e?T1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zc=(e,t)=>{for(var n in t||(t={}))R1.call(t,n)&&ha(e,n,t[n]);if(da)for(var n of da(t))P1.call(t,n)&&ha(e,n,t[n]);return e};const fa="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function jr(e){return`[giscus] An error occurred. Error message: "${e}".`}function pa(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function $1(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent=`
.giscus, .giscus-frame {
width: 100%;
}
.giscus-frame {
border: none;
color-scheme: normal;
}
`,document.head.prepend(e)}function D1(e){const[t,n]=$(""),r=function({repo:o,repoId:a,category:l="",categoryId:u="",mapping:c,term:h="",theme:p="light",reactionsEnabled:d="1",emitMetadata:w="0",inputPosition:v="bottom",lang:g="en",session:_,origin:y}){const m=new URL(location.href);m.searchParams.delete("giscus");const b=m.toString(),A={origin:y=y||b,session:_,theme:p,reactionsEnabled:d,emitMetadata:w,inputPosition:v,repo:o,repoId:a,category:l,categoryId:u,description:pa("description")};switch(c){case"url":A.term=b;break;case"title":A.term=document.title;break;case"og:title":A.term=pa("title");break;case"specific":A.term=h;break;case"number":A.number=h;break;case"pathname":default:A.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${g}/widget?${new URLSearchParams(A)}`}((i=zc({},e),N1(i,L1({session:t}))));var i;const s=me(null);return Q(()=>{const o=location.href,a=new URL(o),l=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${jr(c==null?void 0:c.message)} Session has been cleared.`)}},[]),Q($1,[]),Q(()=>{const o=function(a,l=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:c}=u;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const h=c.giscus.error;if(h.includes("Bad credentials")||h.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${jr(h)} Session has been cleared.`);console.error(`${jr(h)} No session is stored initially. ${fa}`)}h.includes("Discussion not found")?console.warn(`[giscus] ${h}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${jr(h)} ${fa}`)}}(()=>n(""),s.current);return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),xs.createElement("div",{className:"giscus"},xs.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:s}))}function B1(e){const[t,n]=$(!1);return Q(()=>n(!0),[]),t?xs.createElement(D1,zc({},e)):null}function Us({term:e}){const{actualTheme:t}=lc(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return f(B1,{repo:"misode/misode.github.io",repoId:"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=",category:"Site",categoryId:"DIC_kwDOC3WRFs4COB8r",mapping:e?"specific":"pathname",term:e,reactionsEnabled:"1",emitMetadata:"0",inputPosition:"top",theme:r,lang:"en"})}function jc(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Hn=jc();function F1(e){Hn=e}const z1=/[&<>"']/,j1=/[&<>"']/g,V1=/[<>"']|&(?!#?\w+;)/,H1=/[<>"']|&(?!#?\w+;)/g,U1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ma=e=>U1[e];function Re(e,t){if(t){if(z1.test(e))return e.replace(j1,ma)}else if(V1.test(e))return e.replace(H1,ma);return e}const G1=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Vc(e){return e.replace(G1,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Y1=/(^|[^\[])\^/g;function we(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Y1,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const W1=/[^\w:]/g,q1=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _a(e,t,n){if(e){let r;try{r=decodeURIComponent(Vc(n)).replace(W1,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!q1.test(n)&&(n=K1(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Vr={},Z1=/^[^:]+:\/*[^/]*$/,X1=/^([^:]+:)[\s\S]*$/,J1=/^([^:]+:\/*[^/]*)[\s\S]*$/;function K1(e,t){Vr[" "+e]||(Z1.test(e)?Vr[" "+e]=e+"/":Vr[" "+e]=ti(e,"/",!0)),e=Vr[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(X1,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(J1,"$1")+t:e+t}const bi={exec:function(){}};function vt(e){let t=1,n,r;for(;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function va(e,t){const n=e.replace(/\|/g,(s,o,a)=>{let l=!1,u=o;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r[r.length-1].trim()||r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function ti(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const s=e.charAt(r-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.substr(0,r-i)}function Q1(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Hc(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function wa(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function ya(e,t,n,r){const i=t.href,s=t.title?Re(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:s,text:Re(o)}}function em(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(`
`)}class Gs{constructor(t){this.options=t||Hn}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ti(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=em(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const s=ti(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,s,o,a,l,u,c,h,p,d,w,v=n[1].trim();const g=v.length>1,_={type:"list",raw:"",ordered:g,start:g?+v.slice(0,-1):"",loose:!1,items:[]};v=g?`\\d{1,9}\\${v.slice(-1)}`:`\\${v}`,this.options.pedantic&&(v=g?v:"[*+-]");const y=new RegExp(`^( {0,3}${v})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(w=!1,!(!(n=y.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
`,1)[0],h=t.split(`
`,1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=n[1].length),l=!1,!c&&/^ *$/.test(h)&&(r+=h+`
`,t=t.substring(h.length+1),w=!0),!w){const b=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split(`
`,1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c));){if(c.search(/[^ ]/)>=o||!c.trim())d+=`
`+c.slice(o);else if(!l)d+=`
`+c;else break;!l&&!c.trim()&&(l=!0),r+=p+`
`,t=t.substring(p.length+1)}}_.loose||(u?_.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(d),i&&(s=i[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),_.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:d}),_.raw+=r}_.items[_.items.length-1].raw=r.trimRight(),_.items[_.items.length-1].text=d.trimRight(),_.raw=_.raw.trimRight();const m=_.items.length;for(a=0;a<m;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);const b=_.items[a].tokens.filter(k=>k.type==="space"),A=b.every(k=>{const S=k.raw.split("");let I=0;for(const C of S)if(C===`
`&&(I+=1),I>1)return!0;return!1});!_.loose&&b.length&&A&&(_.loose=!0,_.items[a].loose=!0)}return _}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):Re(n[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){const n=this.rules.block.def.exec(t);if(n){n[3]&&(n[3]=n[3].substring(1,n[3].length-1));const r=n[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:r,raw:n[0],href:n[2],title:n[3]}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:va(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,o,a,l;for(s=0;s<i;s++)/^ *-+: *$/.test(r.align[s])?r.align[s]="right":/^ *:-+: *$/.test(r.align[s])?r.align[s]="center":/^ *:-+ *$/.test(r.align[s])?r.align[s]="left":r.align[s]=null;for(i=r.rows.length,s=0;s<i;s++)r.rows[s]=va(r.rows[s],r.header.length).map(u=>({text:u}));for(i=r.header.length,o=0;o<i;o++)r.header[o].tokens=[],this.lexer.inlineTokens(r.header[o].text,r.header[o].tokens);for(i=r.rows.length,o=0;o<i;o++)for(l=r.rows[o],a=0;a<l.length;a++)l[a].tokens=[],this.lexer.inlineTokens(l[a].text,l[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:Re(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Re(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const o=ti(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=Q1(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),ya(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return ya(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,u=o,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,n=n.slice(-1*t.length+o);(i=h.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(o,l)%2){const d=t.slice(1,o+i.index+l);return{type:"em",raw:t.slice(0,o+i.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}const p=t.slice(2,o+i.index+l-1);return{type:"strong",raw:t.slice(0,o+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Re(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=Re(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=Re(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=Re(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=Re(r[0]),r[1]==="www."?s="http://"+i:s=i}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Re(r[0]):r[0]:i=Re(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const W={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bi,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};W._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;W._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;W.def=we(W.def).replace("label",W._label).replace("title",W._title).getRegex();W.bullet=/(?:[*+-]|\d{1,9}[.)])/;W.listItemStart=we(/^( *)(bull) */).replace("bull",W.bullet).getRegex();W.list=we(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex();W._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";W._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;W.html=we(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();W.paragraph=we(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.blockquote=we(W.blockquote).replace("paragraph",W.paragraph).getRegex();W.normal=vt({},W);W.gfm=vt({},W.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});W.gfm.table=we(W.gfm.table).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.gfm.paragraph=we(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",W.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",W._tag).getRegex();W.pedantic=vt({},W.normal,{html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bi,paragraph:we(W.normal._paragraph).replace("hr",W.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bi,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";z.punctuation=we(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex();z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;z.escapedEmSt=/\\\*|\\_/g;z._comment=we(W._comment).replace("(?:-->|$)","-->").getRegex();z.emStrong.lDelim=we(z.emStrong.lDelim).replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimAst=we(z.emStrong.rDelimAst,"g").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimUnd=we(z.emStrong.rDelimUnd,"g").replace(/punct/g,z._punctuation).getRegex();z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;z.autolink=we(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex();z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;z.tag=we(z.tag).replace("comment",z._comment).replace("attribute",z._attribute).getRegex();z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;z.link=we(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex();z.reflink=we(z.reflink).replace("label",z._label).replace("ref",W._label).getRegex();z.nolink=we(z.nolink).replace("ref",W._label).getRegex();z.reflinkSearch=we(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex();z.normal=vt({},z);z.pedantic=vt({},z.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()});z.gfm=vt({},z.normal,{escape:we(z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/});z.gfm.url=we(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex();z.breaks=vt({},z.gfm,{br:we(z.br).replace("{2,}","*").getRegex(),text:we(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function tm(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ba(e){let t="",n,r;const i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class zt{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hn,this.options.tokenizer=this.options.tokenizer||new Gs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:W.normal,inline:z.normal};this.options.pedantic?(n.block=W.pedantic,n.inline=z.pedantic):this.options.gfm&&(n.block=W.gfm,this.options.breaks?n.inline=z.breaks:n.inline=z.gfm),this.tokenizer.rules=n}static get rules(){return{block:W,inline:z}}static lex(t,n){return new zt(n).lex(t)}static lexInline(t,n){return new zt(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,s,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&i.type==="paragraph"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),o=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,s,o=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+wa("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+wa("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,o,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,ba)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,ba))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const h=t.slice(1);let p;this.options.extensions.startInline.forEach(function(d){p=d.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(s=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(s,tm)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Ys{constructor(t){this.options=t||Hn}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+Re(i,!0)+'">'+(r?t:Re(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:Re(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
`+t+`</blockquote>
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+i.slug(r)+'">'+t+"</h"+n+`>
`:"<h"+n+">"+t+"</h"+n+`>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,r){const i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
`+t+"</"+i+`>
`}listitem(t){return"<li>"+t+`</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
`+t+`</tr>
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=_a(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+Re(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=_a(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<img src="'+t+'" alt="'+r+'"';return n&&(i+=' title="'+n+'"'),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class Uc{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class Gc{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class jt{constructor(t){this.options=t||Hn,this.options.renderer=this.options.renderer||new Ys,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Uc,this.slugger=new Gc}static parse(t,n){return new jt(n).parse(t)}static parseInline(t,n){return new jt(n).parseInline(t)}parse(t,n=!0){let r="",i,s,o,a,l,u,c,h,p,d,w,v,g,_,y,m,b,A,k;const S=t.length;for(i=0;i<S;i++){if(d=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(k=this.options.extensions.renderers[d.type].call({parser:this},d),k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))){r+=k||"";continue}switch(d.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Vc(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(d.text,d.lang,d.escaped);continue}case"table":{for(h="",c="",a=d.header.length,s=0;s<a;s++)c+=this.renderer.tablecell(this.parseInline(d.header[s].tokens),{header:!0,align:d.align[s]});for(h+=this.renderer.tablerow(c),p="",a=d.rows.length,s=0;s<a;s++){for(u=d.rows[s],c="",l=u.length,o=0;o<l;o++)c+=this.renderer.tablecell(this.parseInline(u[o].tokens),{header:!1,align:d.align[o]});p+=this.renderer.tablerow(c)}r+=this.renderer.table(h,p);continue}case"blockquote":{p=this.parse(d.tokens),r+=this.renderer.blockquote(p);continue}case"list":{for(w=d.ordered,v=d.start,g=d.loose,a=d.items.length,p="",s=0;s<a;s++)y=d.items[s],m=y.checked,b=y.task,_="",y.task&&(A=this.renderer.checkbox(m),g?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=A+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=A+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:A}):_+=A),_+=this.parse(y.tokens,g),p+=this.renderer.listitem(_,b,m);r+=this.renderer.list(p,w,v);continue}case"html":{r+=this.renderer.html(d.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(d.tokens));continue}case"text":{for(p=d.tokens?this.parseInline(d.tokens):d.text;i+1<S&&t[i+1].type==="text";)d=t[++i],p+=`
`+(d.tokens?this.parseInline(d.tokens):d.text);r+=n?this.renderer.paragraph(p):p;continue}default:{const I='Token with "'+d.type+'" type was not found.';if(this.options.silent){console.error(I);return}else throw new Error(I)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,s,o;const a=t.length;for(i=0;i<a;i++){if(s=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){r+=o||"";continue}switch(s.type){case"escape":{r+=n.text(s.text);break}case"html":{r+=n.html(s.text);break}case"link":{r+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{r+=n.image(s.href,s.title,s.text);break}case"strong":{r+=n.strong(this.parseInline(s.tokens,n));break}case"em":{r+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{r+=n.codespan(s.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(s.tokens,n));break}case"text":{r+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function ee(e,t,n){if(typeof e=="undefined"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=vt({},ee.defaults,t||{}),Hc(t),n){const r=t.highlight;let i;try{i=zt.lex(e,t)}catch(a){return n(a)}const s=function(a){let l;if(!a)try{t.walkTokens&&ee.walkTokens(i,t.walkTokens),l=jt.parse(i,t)}catch(u){a=u}return t.highlight=r,a?n(a):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return s();let o=0;ee.walkTokens(i,function(a){a.type==="code"&&(o++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return s(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),o--,o===0&&s()})},0))}),o===0&&s();return}try{const r=zt.lex(e,t);return t.walkTokens&&ee.walkTokens(r,t.walkTokens),jt.parse(r,t)}catch(r){if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+Re(r.message+"",!0)+"</pre>";throw r}}ee.options=ee.setOptions=function(e){return vt(ee.defaults,e),F1(ee.defaults),ee};ee.getDefaults=jc;ee.defaults=Hn;ee.use=function(...e){const t=vt({},...e),n=ee.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=n.renderers?n.renderers[s.name]:null;o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[s.level]?n[s.level].unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}s.childTokens&&(n.childTokens[s.name]=s.childTokens)})),i.renderer){const s=ee.defaults.renderer||new Ys;for(const o in i.renderer){const a=s[o];s[o]=(...l)=>{let u=i.renderer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.renderer=s}if(i.tokenizer){const s=ee.defaults.tokenizer||new Gs;for(const o in i.tokenizer){const a=s[o];s[o]=(...l)=>{let u=i.tokenizer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.tokenizer=s}if(i.walkTokens){const s=ee.defaults.walkTokens;t.walkTokens=function(o){i.walkTokens.call(this,o),s&&s.call(this,o)}}r&&(t.extensions=n),ee.setOptions(t)})};ee.walkTokens=function(e,t){for(const n of e)switch(t.call(ee,n),n.type){case"table":{for(const r of n.header)ee.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)ee.walkTokens(i.tokens,t);break}case"list":{ee.walkTokens(n.items,t);break}default:ee.defaults.extensions&&ee.defaults.extensions.childTokens&&ee.defaults.extensions.childTokens[n.type]?ee.defaults.extensions.childTokens[n.type].forEach(function(r){ee.walkTokens(n[r],t)}):n.tokens&&ee.walkTokens(n.tokens,t)}};ee.parseInline=function(e,t){if(typeof e=="undefined"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=vt({},ee.defaults,t||{}),Hc(t);try{const n=zt.lexInline(e,t);return t.walkTokens&&ee.walkTokens(n,t.walkTokens),jt.parseInline(n,t)}catch(n){if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+Re(n.message+"",!0)+"</pre>";throw n}};ee.Parser=jt;ee.parser=jt.parse;ee.Renderer=Ys;ee.TextRenderer=Uc;ee.Lexer=zt;ee.lexer=zt.lex;ee.Tokenizer=Gs;ee.Slugger=Gc;ee.parse=ee;jt.parse;zt.lex;function nm({change:e,activeTags:t,toggleTag:n}){return f("div",{class:"changelog-entry"},f("div",{class:"changelog-version"},f(xa,J({},e.version)),f(xa,J({},e.group))),f("div",{class:"changelog-tags"},e.tags.map(r=>f(Nr,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),f("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:ee(e.content)}}))}function xa({id:e,article:t}){return t===null?f("span",null,e):f("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function Nr({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Ul(e)%360;return f("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&ie.alert,e)}function Yc({changes:e,defaultOrder:t}){const{locale:n}=ke(),[r,i]=$(""),[s,o]=$([]),a=p=>{s.includes(p)?o(s.filter(d=>d!==p)):o([...s,p])},l=be(()=>{const p=r.split(" ").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);return p.length===0&&s.length===0?e:e==null?void 0:e.filter(d=>{if(!s.every(v=>d.tags.includes(v)))return!1;const w=d.tags.join(" ")+" "+d.content.toLowerCase();return p.every(v=>v.startsWith("!")?v.length===1||!w.includes(v.slice(1)):w.includes(v))})},[e,r,s]),[u,c]=$(t==="desc"),h=be(()=>l==null?void 0:l.sort((p,d)=>u?d.order-p.order:p.order-d.order),[l,u]);return f(te,null,f("div",{class:"changelog-query"},f(sn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:i}),f(q,{icon:u?"sort_desc":"sort_asc",label:u?"Newest first":"Oldest first",onClick:()=>c(!u)})),s.length>0&&f("div",{class:"changelog-tags"},s.map(p=>f(Nr,{label:p,onClick:()=>o(s.filter(d=>d!==p))}))),f("div",{class:"changelog-list"},h===void 0?f("span",{class:"note"},n("loading")):h.length===0?f("span",{class:"note"},n("changelog.no_results")):h.map(p=>f(nm,{change:p,activeTags:s,toggleTag:a}))))}function rm({version:e}){const{locale:t}=ke(),[n,r]=$("changelog"),[i,s]=$(void 0);Q(()=>{ql().then(a=>s(a.map(l=>ye(J({},l),{tags:l.tags.filter(u=>u!==l.group.id)})))).catch(a=>console.error(a))},[]);const o=be(()=>i==null?void 0:i.filter(a=>a.version.id===e.id||a.group.id===e.id),[e.id,i]);return f(te,null,f("div",{class:"version-detail"},f("h2",null,e.name),f("div",{class:"version-info"},f(Nt,{label:t("versions.released"),value:Wc(e)}),f(Nt,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),f(Nt,{label:t("versions.data_version"),value:e.data_version}),f(Nt,{label:t("versions.protocol_version"),value:e.protocol_version}),f(Nt,{label:t("versions.data_pack_format"),value:e.data_pack_version}),f(Nt,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),f("div",{class:"version-tabs"},f("span",{class:n==="changelog"?"selected":"",onClick:()=>r("changelog")},t("versions.technical_changes")),f("span",{class:n==="discussion"?"selected":"",onClick:()=>r("discussion")},t("versions.discussion"))),f("div",{class:"version-tab"},n==="changelog"&&f(Yc,{changes:o,defaultOrder:"asc"}),n==="discussion"&&f(Us,{term:`version/${e.id}`}))))}function Wc(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function im({version:e,link:t}){const{locale:n}=ke();return f("a",{class:"version-entry",href:t},f("span",{class:"version-id"},e.id),f(Nt,{label:n("versions.released"),value:Wc(e),compact:!0}),f(Nt,{label:n("versions.data_version"),value:e.data_version,optional:!0}),f(Nt,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function sm({versions:e,link:t}){const{locale:n}=ke(),[r,i]=$(!0),[s,o]=$(""),a=be(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(s)),[e,r,s]);return f(te,null,f("div",{class:"versions-controls"},f(sn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:s,onChange:o}),f(p0,{label:"Include snapshots",value:r,onChange:i})),f("div",{class:"version-list"},a.map(l=>f(im,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&f("span",null,n("versions.no_results"))))}function Nt({label:e,value:t,link:n,compact:r,optional:i}){return f("div",{class:`version-metadata${i?" version-metadata-hide":""}`},f("span",{class:r?"version-metadata-hide":void 0},e,": "),f("span",{class:"version-metadata-value"},t),n&&f("a",{href:n,class:"version-metadata-link"},ie.link_external))}function om({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:s}){const o=a=>l=>{s&&s(a),l.preventDefault(),l.stopImmediatePropagation()};return f("a",{class:"guide-card",href:t},f("span",{class:"guide-versions"},n.join(" \u2022 ")),f("h3",null,e),f("div",{class:"guide-tags"},r.sort().map(a=>f(Nr,{label:a,onClick:o(a),active:i==null?void 0:i.includes(a)}))))}const Aa={system:"device_desktop",dark:"moon",light:"sun"};function am(){const{lang:e,locale:t,changeLanguage:n}=ke(),{theme:r,changeTheme:i}=lc(),{version:s}=Vn(),{title:o}=_t(),a=Gl(Cn());return f("header",null,f("div",{class:"title"},f(Ja,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},qc.home),f("h1",null,o),a&&f(Ze,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},pe.generators.filter(l=>l.category===(a==null?void 0:a.category)&&Xe(s,l.minVersion)).map(l=>f(q,{label:t(l.id),active:l.id===a.id,onClick:()=>Yt(Ft(l.url))})))),f("nav",null,f("ul",null,f("li",{"data-cy":"language-switcher"},f(Ze,{icon:"globe",tooltip:t("language")},pe.languages.map(({code:l,name:u})=>f(q,{label:u,active:l===e,onClick:()=>n(l)})))),f("li",{"data-cy":"theme-switcher"},f(Ze,{icon:Aa[r],tooltip:t("theme")},Object.entries(Aa).map(([l,u])=>f(q,{icon:u,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),f("li",{class:"dimmed"},f("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},ie.mark_github)))))}const qc={home:f("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),f("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),f("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),f("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),f("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),f("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:f("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},f("path",{d:"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z",fill:"#6ACC5D"}),f("path",{d:"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z",fill:"#FF4C4C"}),f("path",{d:"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z",fill:"#E5B442"}),f("path",{d:"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z",fill:"#2BAD1D"}),f("path",{d:"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z",fill:"#C10B0B"}),f("path",{d:"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z",fill:"#CC8E00"})),sounds:f("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},f("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),f("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z",fill:"#C5A5E6"}))};function lm({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:s,onEdit:o,onDelete:a,delayedPlay:l}){const{locale:u}=ke(),{version:c}=Vn(),[h,p]=$(!0),[d,w]=$(!1),[v,g]=$(!1),_=me([]),y=`playsound minecraft:${n} master @s ~ ~ ~ ${s} ${i}`;Q(()=>{var M,N,B;const C=t[n];g(((N=(M=C==null?void 0:C.sounds)==null?void 0:M.length)!=null?N:0)===0),_.current.forEach(se=>se.stop()),_.current=((B=C==null?void 0:C.sounds)!=null?B:[]).map(se=>{const le=typeof se=="string"?se:se.name,de=k0(c,le),O=e({src:[de],format:["ogg"],volume:s,rate:i});O.on("end",()=>{w(!1)});const P=()=>{h&&_.current.every(G=>G.state()==="loaded")&&p(!1)};return O.state()==="loaded"?setTimeout(()=>P()):O.on("load",()=>{P()}),O}),p(!0)},[n,t]),Q(()=>{_.current.forEach(C=>C.rate(i))},[i]),Q(()=>{_.current.forEach(C=>C.volume(s))},[s]);const m=()=>{if(h||v)return;b();const C=Math.floor(Math.random()*_.current.length);_.current[C].play(),w(!0)},b=()=>{_.current.forEach(C=>C.stop())};Q(()=>{l&&setTimeout(()=>m(),r*50)},[l]),Q(()=>()=>b(),[]);const[A,k]=$(!1),S=me(void 0),I=()=>{navigator.clipboard.writeText(y),k(!0),S.current!==void 0&&clearTimeout(S.current),S.current=setTimeout(()=>{k(!1)},2e3)};return f("div",{class:`sound-config${h?" loading":d?" playing":""}${v?" invalid":""}`},f(q,{class:"play",icon:v?"alert":h?"sync":"play",label:u("sounds.play"),onClick:m,tooltip:u(v?"sounds.unknown_sound":h?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),f(sn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:C=>o({sound:C})}),f("label",{class:"delay-label"},u("sounds.delay"),": "),f(m0,{class:"btn btn-input delay",min:0,value:r,onChange:C=>o({delay:C})}),f("label",{class:"pitch-label"},u("sounds.pitch"),": "),f(zo,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":i.toFixed(2),style:`--x: ${(i-.5)*(100/1.5)}%`,value:i,onChange:C=>o({pitch:C})}),f("label",{class:"volume-label"},u("sounds.volume"),": "),f(zo,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":s.toFixed(2),style:`--x: ${s*100}%`,value:s,onChange:C=>o({volume:C})}),f(q,{class:`copy${A?" active":""}`,icon:A?"check":"terminal",label:u("copy"),tooltip:u(A?"copied":"sounds.copy_command"),onClick:I}),f(q,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),b()}}))}function st({title:e,desc:t,link:n,icon:r,children:i}){const s=f(te,null,f("div",{class:"tool-head"},r&&qc[r],f("div",null,f("h3",null,e),f("p",null,t))),i&&f("div",{class:"tool-body"},i));return n?f("a",{class:"tool-card",href:n},s):f("div",{class:"tool-card"},s)}const ka="/";function Zc({entries:e,onSelect:t,indent:n}){const r=be(()=>{var u;const l={};for(const c of e){const h=c.indexOf(ka);if(h>=0){const p=c.slice(0,h);((u=l[p])!=null?u:l[p]=[]).push(c.slice(h+1))}}return Object.entries(l)},e),i=be(()=>e.filter(l=>!l.includes(ka)),e),[s,o]=$(new Set),a=l=>{s.has(l)?s.delete(l):s.add(l),o(new Set(s))};return f("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>f("div",null,f(Sa,{icon:s.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!s.has(l)&&f(Zc,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>f(Sa,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function Sa({icon:e,label:t,onClick:n}){return f("div",{class:"entry",onClick:n},ie[e],t)}function Ea({category:e}){const{locale:t}=ke();return _t(t("title.generator_category",t(e))),f("main",null,f("div",{class:"category"},pe.generators.filter(n=>n.category===e).map(n=>f(st,{title:t(n.id),link:Ft(n.url)}))))}function cm({}){const{locale:e}=ke();_t(e("title.changelog"));const{value:t,error:n}=Er(ql,[]);return f("main",null,f(vr,{type:"text",id:"changelog"}),n&&f(An,{error:n}),f("div",{class:"changelog"},f(Yc,{changes:t,defaultOrder:"desc"})))}function um({}){var Qs;const{locale:e}=ke(),{version:t,changeVersion:n,changeTargetVersion:r}=Vn(),{project:i,file:s,updateFile:o,openFile:a,closeFile:l}=oc(),[u,c]=$(null),[h,p]=el();if(h)return h.message=`Something went wrong rendering the generator: ${h.message}`,f("main",null,f(An,{error:h,onDismiss:p}));const d=Gl(Cn());if(!d)return f("main",null,f(An,{error:`Cannot find generator "${Cn()}"`}));const w=be(()=>pe.versions.filter(Y=>Xe(Y.id,d.minVersion,d.maxVersion)).map(Y=>Y.id).reverse(),[d.minVersion,d.maxVersion]);_t(e("title.generator",e(d.id)),w),Xe(t,d.minVersion)||c(`The minimum version for this generator is ${d.minVersion}`),Xe(t,void 0,d.maxVersion)||c(`This generator is not available in versions above ${d.maxVersion}`);const[v,g]=lr("preset"),[_,y]=lr(us),m=me(!1),b=be(()=>Pe.getBackup(d.id),[d.id]),A=()=>{b!==void 0&&(S==null||S.reset(D.DataModel.wrapLists(b),!1))},{value:k}=Er(async()=>{let Y;if(v&&_)return y(void 0),cs;if(v)Y=await ut(v);else if(_){const rt=await L0(_);let it=!1;if(rt.version&&rt.version!==t&&(n(rt.version,!1),it=!0),rt.type&&rt.type!==d.id){const fn=pe.generators.find(lu=>lu.id===rt.type);fn&&(Yt(`${Ft(fn.url)}?${us}=${rt.id}`),it=!0)}if(it)return cs;rt.show_preview&&!et&&(Un(!0),dt(!1)),Y=rt.data}const[Ve,Lr]=await Promise.all([C0(t,d.id),O0(t)]);return Y&&(m.current=!0,Ve.reset(D.DataModel.wrapLists(Y),!1)),Me.setGenerator(d.id),{model:Ve,blockStates:Lr}},[d.id,t,_,v]),S=k==null?void 0:k.model,I=k==null?void 0:k.blockStates,[C,M]=$(!1);Ni(S,()=>{m.current||(g(void 0,!0),y(void 0,!0)),m.current=!1,Pe.setBackup(d.id,D.DataModel.unwrapLists(S==null?void 0:S.data)),c(null),M(!0)},[d.id,g,y]);const[N,B]=$(""),[se,le]=qn(),[de,O]=qn(),P=()=>{if(N!==(s==null?void 0:s.id)&&N&&S&&I){const Y=Qr(S,I);o(d.id,s==null?void 0:s.id,{id:N,data:Y})?le():(O(),s&&B(s==null?void 0:s.id))}else s&&B(s==null?void 0:s.id)},G=()=>{s&&o(d.id,s.id,{})};Q(()=>{s&&B(s.id)},[s]),Q(()=>{var Y;S&&(B((Y=s==null?void 0:s.id)!=null?Y:""),s&&d.id===s.type&&S.reset(D.DataModel.wrapLists(s.data)),M(!1))},[s,S]);const T=()=>{Me.generatorEvent("reset"),S==null||S.reset(D.DataModel.wrapLists(S.schema.default()),!0)},x=Y=>{Y.stopPropagation(),Me.generatorEvent("undo","Menu"),S==null||S.undo()},E=Y=>{Y.stopPropagation(),Me.generatorEvent("redo","Menu"),S==null||S.redo()},L=Y=>{Y.ctrlKey&&Y.key==="z"?(Me.generatorEvent("undo","Hotkey"),S==null||S.undo()):Y.ctrlKey&&Y.key==="y"&&(Me.generatorEvent("redo","Hotkey"),S==null||S.redo())},j=Y=>{if(Y.ctrlKey&&Y.key==="s"&&(Y.preventDefault(),S&&I&&s)){Me.generatorEvent("save","Hotkey");const Ve=Qr(S,I);o(d.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:Ve}),M(!1),le()}};Q(()=>(document.addEventListener("keyup",L),document.addEventListener("keydown",j),()=>{document.removeEventListener("keyup",L),document.removeEventListener("keydown",j)}),[S,I,s]);const[X,ue]=$([]);Q(()=>{M0(t).then(Y=>{ue(Y.get(d.id).map(Ve=>Ve.slice(10)))}).catch(Y=>{console.error(Y),c(Y)})},[t,d.id]);const ze=Y=>{Me.generatorEvent("load-preset",Y),y(void 0,!0),r(t,!0),g(Y)},ut=async Y=>{var Ve,Lr,rt;try{const it=await Xl(t,(Ve=d.path)!=null?Ve:d.id,Y),fn=S==null?void 0:S.get(new D.Path(["generator","seed"]));return((Lr=it==null?void 0:it.generator)==null?void 0:Lr.seed)!==void 0&&fn!==void 0&&(it.generator.seed=fn,((rt=it.generator.biome_source)==null?void 0:rt.seed)!==void 0&&(it.generator.biome_source.seed=fn)),it}catch{c(`Cannot load preset ${Y} in ${t}`),g(void 0,!0)}},je=Y=>{y(void 0,!0),n(Y)},[Ne,Le]=$(void 0),[Ht,Ue]=$(!1),[Ke,Ge]=qn({cooldown:3e3}),Zt=()=>{if(Ht){Ue(!1);return}if(v)Le(`${location.origin}/${d.url}/?version=${t}&preset=${v}`),Ue(!0),wt();else if(S&&I){const Y=Qr(S,I);rn(Y,S.schema.default())?(Le(`${location.origin}/${d.url}/?version=${t}`),Ue(!0)):N0(d.id,t,Y,et).then(Ve=>{Le(Ve),Ue(!0)}).catch(Ve=>{Ve instanceof Error&&c(Ve)})}},wt=()=>{navigator.clipboard.writeText(Ne!=null?Ne:""),Ge()};Q(()=>{Ke||(Le(void 0),Ue(!1))},[Ke]);const[V,dt]=$(window.innerWidth>820),[Ae,he]=$(0),[yt,Qe]=$(0),[dn,hn]=$(0),F=()=>{Me.generatorEvent("copy"),he(Ae+1)},H=()=>{Me.generatorEvent("download"),Qe(yt+1)},re=()=>{Me.generatorEvent("import"),dt(!0),hn(dn+1)},fe=()=>{Me.generatorEvent("toggle-output",V?"hidden":"visible"),dt(!V),he(0),Qe(0),hn(0)},[Ce,ht]=qn(),[et,Un]=$(!1),Fi=Vp.includes(d.id)&&!(d.id==="worldgen/configured_feature"&&Xe(t,"1.18"));et&&!Fi&&Un(!1);let zi=2;Fi&&(zi+=1),V&&(zi+=2);const au=()=>{Me.generatorEvent("toggle-preview",et?"hidden":"visible"),Un(!et),!et&&V&&dt(!1)};return f(te,null,f("main",{class:et?"has-preview":""},f(vr,{id:"data-pack-generator",type:"text"}),f("div",{class:"controls"},f("div",{class:`project-controls ${s&&"has-file"}`},f("div",{class:"btn-row"},f(Ze,{icon:"repo",label:i.name,relative:!1},f(q,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Yt("/project")}),s&&f(q,{icon:"file",label:e("project.new_file"),onClick:l}),b!==void 0&&f(q,{icon:"history",label:e("restore_backup"),onClick:A}),f(jo,{searchPlaceholder:e(i.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:i.files.filter(Y=>Y.type===d.id).map(Y=>Y.id),onSelect:Y=>a(d.id,Y)})),f(sn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:N,onChange:B,onEnter:P,onBlur:P}),s&&f(q,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:G})),C?f("div",{class:"status-icon"},ie.dot_fill):se?f("div",{class:"status-icon active"},ie.check):de&&f("div",{class:"status-icon danger"},ie.x)),f("div",{class:"generator-controls"},f(q,{icon:"upload",label:e("import"),onClick:re}),f(Ze,{icon:"archive",label:e("presets"),relative:!1},f(jo,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:X,onSelect:ze})),f(Ze,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},w.map(Y=>f(q,{label:Y,active:Y===t,onClick:()=>je(Y)}))),f(Ze,{icon:"kebab_horizontal",tooltip:e("more")},f(q,{icon:"history",label:e("reset"),onClick:T}),f(q,{icon:"arrow_left",label:e("undo"),onClick:x}),f(q,{icon:"arrow_right",label:e("redo"),onClick:E})))),u&&f(An,{error:u,onDismiss:()=>c(null)}),f(O1,{model:S,version:t,blockStates:I,onError:c})),f("div",{class:"popup-actions",style:`--offset: -${8+zi*50}px;`},f("div",{class:`popup-action action-preview${Fi?" shown":""} tooltipped tip-nw`,"aria-label":e(et?"hide_preview":"show_preview"),onClick:au},et?ie.x_circle:ie.play),f("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:Zt},ie.link),f("div",{class:`popup-action action-download${V?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:H},ie.download),f("div",{class:`popup-action action-copy${V?" shown":""}${Ce?" active":""} tooltipped tip-nw`,"aria-label":e(Ce?"copied":"copy"),onClick:F},Ce?ie.check:ie.clippy),f("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(V?"hide_output":"show_output"),onClick:fe},V?ie.chevron_right:ie.code)),f("div",{class:`popup-preview${et?" shown":""}`},f(Hp,{model:S,version:t,id:d.id,shown:et,onError:c})),f("div",{class:`popup-source${V?" shown":""}`},f(Gp,{model:S,blockStates:I,doCopy:Ae,doDownload:yt,doImport:dn,name:(Qs=d.schema)!=null?Qs:"data",copySuccess:ht,onError:c})),f("div",{class:`popup-share${Ht?" shown":""}`},f(sn,{value:Ne,readonly:!0}),f(q,{icon:Ke?"check":"clippy",onClick:wt,tooltip:e(Ke?"copied":"copy_share"),tooltipLoc:"nw",active:Ke,showTooltip:Ke})))}var Ws={exports:{}};function qs(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];typeof n=="object"&&!Object.isFrozen(n)&&qs(n)}),e}Ws.exports=qs;Ws.exports.default=qs;var dm=Ws.exports;class Ia{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Xc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Ut(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const hm="</span>",Ca=e=>!!e.kind,fm=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class pm{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Xc(t)}openNode(t){if(!Ca(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=fm(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Ca(t)||(this.buffer+=hm)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class Zs{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n={kind:t,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Zs._collapse(n)})))}}class mm extends Zs{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.kind=n,r.sublanguage=!0,this.add(r)}toHTML(){return new pm(this,this.options).value()}finalize(){return!0}}function mr(e){return e?typeof e=="string"?e:e.source:null}function Jc(e){return un("(?=",e,")")}function gm(e){return un("(?:",e,")*")}function _m(e){return un("(?:",e,")?")}function un(...e){return e.map(n=>mr(n)).join("")}function vm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Xs(...e){const t=vm(e);return"("+(t.capture?"":"?:")+e.map(r=>mr(r)).join("|")+")"}function Kc(e){return new RegExp(e.toString()+"|").exec("").length-1}function wm(e,t){const n=e&&e.exec(t);return n&&n.index===0}const ym=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Js(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=mr(r),o="";for(;s.length>0;){const a=ym.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const bm=/\b\B/,Qc="[a-zA-Z]\\w*",Ks="[a-zA-Z_]\\w*",eu="\\b\\d+(\\.\\d+)?",tu="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",nu="\\b(0b[01]+)",xm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Am=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=un(t,/.*\b/,e.binary,/\b.*/)),Ut({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},gr={begin:"\\\\[\\s\\S]",relevance:0},km={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[gr]},Sm={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[gr]},Em={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bi=function(e,t,n={}){const r=Ut({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Xs("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:un(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Im=Bi("//","$"),Cm=Bi("/\\*","\\*/"),Mm=Bi("#","$"),Om={scope:"number",begin:eu,relevance:0},Tm={scope:"number",begin:tu,relevance:0},Nm={scope:"number",begin:nu,relevance:0},Lm={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[gr,{begin:/\[/,end:/\]/,relevance:0,contains:[gr]}]}]},Rm={scope:"title",begin:Qc,relevance:0},Pm={scope:"title",begin:Ks,relevance:0},$m={begin:"\\.\\s*"+Ks,relevance:0},Dm=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Hr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:bm,IDENT_RE:Qc,UNDERSCORE_IDENT_RE:Ks,NUMBER_RE:eu,C_NUMBER_RE:tu,BINARY_NUMBER_RE:nu,RE_STARTERS_RE:xm,SHEBANG:Am,BACKSLASH_ESCAPE:gr,APOS_STRING_MODE:km,QUOTE_STRING_MODE:Sm,PHRASAL_WORDS_MODE:Em,COMMENT:Bi,C_LINE_COMMENT_MODE:Im,C_BLOCK_COMMENT_MODE:Cm,HASH_COMMENT_MODE:Mm,NUMBER_MODE:Om,C_NUMBER_MODE:Tm,BINARY_NUMBER_MODE:Nm,REGEXP_MODE:Lm,TITLE_MODE:Rm,UNDERSCORE_TITLE_MODE:Pm,METHOD_GUARD:$m,END_SAME_AS_BEGIN:Dm});function Bm(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Fm(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function zm(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Bm,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function jm(e,t){!Array.isArray(e.illegal)||(e.illegal=Xs(...e.illegal))}function Vm(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Hm(e,t){e.relevance===void 0&&(e.relevance=1)}const Um=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=un(n.beforeMatch,Jc(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Gm=["of","and","for","in","not","or","if","then","parent","list","value"],Ym="keyword";function ru(e,t,n=Ym){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,ru(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,Wm(l[0],l[1])]})}}function Wm(e,t){return t?Number(t):qm(e)?0:1}function qm(e){return Gm.includes(e.toLowerCase())}const Ma={},tn=e=>{console.error(e)},Oa=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_n=(e,t)=>{Ma[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ma[`${e}/${t}`]=!0)},xi=new Error;function iu(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Kc(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function Zm(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw tn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xi;if(typeof e.beginScope!="object"||e.beginScope===null)throw tn("beginScope must be object"),xi;iu(e,e.begin,{key:"beginScope"}),e.begin=Js(e.begin,{joinWith:""})}}function Xm(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw tn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xi;if(typeof e.endScope!="object"||e.endScope===null)throw tn("endScope must be object"),xi;iu(e,e.end,{key:"endScope"}),e.end=Js(e.end,{joinWith:""})}}function Jm(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Km(e){Jm(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Zm(e),Xm(e)}function Qm(e){function t(o,a){return new RegExp(mr(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Kc(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(Js(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const u=l.findIndex((h,p)=>p>0&&h!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[Fm,Vm,Km,Um].forEach(c=>c(o,a)),e.compilerExtensions.forEach(c=>c(o,a)),o.__beforeBegin=null,[zm,jm,Hm].forEach(c=>c(o,a)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=ru(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=mr(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(c){return eg(c==="self"?o:c)})),o.contains.forEach(function(c){s(c,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ut(e.classNameAliases||{}),s(e)}function su(e){return e?e.endsWithParent||su(e.starts):!1}function eg(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ut(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:su(e)?Ut(e,{starts:e.starts?Ut(e.starts):null}):Object.isFrozen(e)?Ut(e):e}var tg="11.5.1";class ng extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ki=Xc,Ta=Ut,Na=Symbol("nomatch"),rg=7,ig=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:mm};function l(O){return a.noHighlightRe.test(O)}function u(O){let P=O.className+" ";P+=O.parentNode?O.parentNode.className:"";const G=a.languageDetectRe.exec(P);if(G){const T=C(G[1]);return T||(Oa(s.replace("{}",G[1])),Oa("Falling back to no-highlight mode for this block.",O)),T?G[1]:"no-highlight"}return P.split(/\s+/).find(T=>l(T)||C(T))}function c(O,P,G){let T="",x="";typeof P=="object"?(T=O,G=P.ignoreIllegals,x=P.language):(_n("10.7.0","highlight(lang, code, ...args) has been deprecated."),_n("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),x=O,T=P),G===void 0&&(G=!0);const E={code:T,language:x};le("before:highlight",E);const L=E.result?E.result:h(E.language,E.code,G);return L.code=E.code,le("after:highlight",L),L}function h(O,P,G,T){const x=Object.create(null);function E(F,H){return F.keywords[H]}function L(){if(!V.keywords){Ae.addText(he);return}let F=0;V.keywordPatternRe.lastIndex=0;let H=V.keywordPatternRe.exec(he),re="";for(;H;){re+=he.substring(F,H.index);const fe=Ge.case_insensitive?H[0].toLowerCase():H[0],Ce=E(V,fe);if(Ce){const[ht,et]=Ce;if(Ae.addText(re),re="",x[fe]=(x[fe]||0)+1,x[fe]<=rg&&(yt+=et),ht.startsWith("_"))re+=H[0];else{const Un=Ge.classNameAliases[ht]||ht;Ae.addKeyword(H[0],Un)}}else re+=H[0];F=V.keywordPatternRe.lastIndex,H=V.keywordPatternRe.exec(he)}re+=he.substr(F),Ae.addText(re)}function j(){if(he==="")return;let F=null;if(typeof V.subLanguage=="string"){if(!t[V.subLanguage]){Ae.addText(he);return}F=h(V.subLanguage,he,!0,dt[V.subLanguage]),dt[V.subLanguage]=F._top}else F=d(he,V.subLanguage.length?V.subLanguage:null);V.relevance>0&&(yt+=F.relevance),Ae.addSublanguage(F._emitter,F.language)}function X(){V.subLanguage!=null?j():L(),he=""}function ue(F,H){let re=1;const fe=H.length-1;for(;re<=fe;){if(!F._emit[re]){re++;continue}const Ce=Ge.classNameAliases[F[re]]||F[re],ht=H[re];Ce?Ae.addKeyword(ht,Ce):(he=ht,L(),he=""),re++}}function ze(F,H){return F.scope&&typeof F.scope=="string"&&Ae.openNode(Ge.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(Ae.addKeyword(he,Ge.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),he=""):F.beginScope._multi&&(ue(F.beginScope,H),he="")),V=Object.create(F,{parent:{value:V}}),V}function ut(F,H,re){let fe=wm(F.endRe,re);if(fe){if(F["on:end"]){const Ce=new Ia(F);F["on:end"](H,Ce),Ce.isMatchIgnored&&(fe=!1)}if(fe){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return ut(F.parent,H,re)}function je(F){return V.matcher.regexIndex===0?(he+=F[0],1):(hn=!0,0)}function Ne(F){const H=F[0],re=F.rule,fe=new Ia(re),Ce=[re.__beforeBegin,re["on:begin"]];for(const ht of Ce)if(!!ht&&(ht(F,fe),fe.isMatchIgnored))return je(H);return re.skip?he+=H:(re.excludeBegin&&(he+=H),X(),!re.returnBegin&&!re.excludeBegin&&(he=H)),ze(re,F),re.returnBegin?0:H.length}function Le(F){const H=F[0],re=P.substr(F.index),fe=ut(V,F,re);if(!fe)return Na;const Ce=V;V.endScope&&V.endScope._wrap?(X(),Ae.addKeyword(H,V.endScope._wrap)):V.endScope&&V.endScope._multi?(X(),ue(V.endScope,F)):Ce.skip?he+=H:(Ce.returnEnd||Ce.excludeEnd||(he+=H),X(),Ce.excludeEnd&&(he=H));do V.scope&&Ae.closeNode(),!V.skip&&!V.subLanguage&&(yt+=V.relevance),V=V.parent;while(V!==fe.parent);return fe.starts&&ze(fe.starts,F),Ce.returnEnd?0:H.length}function Ht(){const F=[];for(let H=V;H!==Ge;H=H.parent)H.scope&&F.unshift(H.scope);F.forEach(H=>Ae.openNode(H))}let Ue={};function Ke(F,H){const re=H&&H[0];if(he+=F,re==null)return X(),0;if(Ue.type==="begin"&&H.type==="end"&&Ue.index===H.index&&re===""){if(he+=P.slice(H.index,H.index+1),!i){const fe=new Error(`0 width match regex (${O})`);throw fe.languageName=O,fe.badRule=Ue.rule,fe}return 1}if(Ue=H,H.type==="begin")return Ne(H);if(H.type==="illegal"&&!G){const fe=new Error('Illegal lexeme "'+re+'" for mode "'+(V.scope||"<unnamed>")+'"');throw fe.mode=V,fe}else if(H.type==="end"){const fe=Le(H);if(fe!==Na)return fe}if(H.type==="illegal"&&re==="")return 1;if(dn>1e5&&dn>H.index*3)throw new Error("potential infinite loop, way more iterations than matches");return he+=re,re.length}const Ge=C(O);if(!Ge)throw tn(s.replace("{}",O)),new Error('Unknown language: "'+O+'"');const Zt=Qm(Ge);let wt="",V=T||Zt;const dt={},Ae=new a.__emitter(a);Ht();let he="",yt=0,Qe=0,dn=0,hn=!1;try{for(V.matcher.considerAll();;){dn++,hn?hn=!1:V.matcher.considerAll(),V.matcher.lastIndex=Qe;const F=V.matcher.exec(P);if(!F)break;const H=P.substring(Qe,F.index),re=Ke(H,F);Qe=F.index+re}return Ke(P.substr(Qe)),Ae.closeAllNodes(),Ae.finalize(),wt=Ae.toHTML(),{language:O,value:wt,relevance:yt,illegal:!1,_emitter:Ae,_top:V}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:O,value:Ki(P),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:Qe,context:P.slice(Qe-100,Qe+100),mode:F.mode,resultSoFar:wt},_emitter:Ae};if(i)return{language:O,value:Ki(P),illegal:!1,relevance:0,errorRaised:F,_emitter:Ae,_top:V};throw F}}function p(O){const P={value:Ki(O),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return P._emitter.addText(O),P}function d(O,P){P=P||a.languages||Object.keys(t);const G=p(O),T=P.filter(C).filter(N).map(X=>h(X,O,!1));T.unshift(G);const x=T.sort((X,ue)=>{if(X.relevance!==ue.relevance)return ue.relevance-X.relevance;if(X.language&&ue.language){if(C(X.language).supersetOf===ue.language)return 1;if(C(ue.language).supersetOf===X.language)return-1}return 0}),[E,L]=x,j=E;return j.secondBest=L,j}function w(O,P,G){const T=P&&n[P]||G;O.classList.add("hljs"),O.classList.add(`language-${T}`)}function v(O){let P=null;const G=u(O);if(l(G))return;if(le("before:highlightElement",{el:O,language:G}),O.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(O)),a.throwUnescapedHTML))throw new ng("One of your code blocks includes unescaped HTML.",O.innerHTML);P=O;const T=P.textContent,x=G?c(T,{language:G,ignoreIllegals:!0}):d(T);O.innerHTML=x.value,w(O,G,x.language),O.result={language:x.language,re:x.relevance,relevance:x.relevance},x.secondBest&&(O.secondBest={language:x.secondBest.language,relevance:x.secondBest.relevance}),le("after:highlightElement",{el:O,result:x,text:T})}function g(O){a=Ta(a,O)}const _=()=>{b(),_n("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){b(),_n("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let m=!1;function b(){if(document.readyState==="loading"){m=!0;return}document.querySelectorAll(a.cssSelector).forEach(v)}function A(){m&&b()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function k(O,P){let G=null;try{G=P(e)}catch(T){if(tn("Language definition for '{}' could not be registered.".replace("{}",O)),i)tn(T);else throw T;G=o}G.name||(G.name=O),t[O]=G,G.rawDefinition=P.bind(null,e),G.aliases&&M(G.aliases,{languageName:O})}function S(O){delete t[O];for(const P of Object.keys(n))n[P]===O&&delete n[P]}function I(){return Object.keys(t)}function C(O){return O=(O||"").toLowerCase(),t[O]||t[n[O]]}function M(O,{languageName:P}){typeof O=="string"&&(O=[O]),O.forEach(G=>{n[G.toLowerCase()]=P})}function N(O){const P=C(O);return P&&!P.disableAutodetect}function B(O){O["before:highlightBlock"]&&!O["before:highlightElement"]&&(O["before:highlightElement"]=P=>{O["before:highlightBlock"](Object.assign({block:P.el},P))}),O["after:highlightBlock"]&&!O["after:highlightElement"]&&(O["after:highlightElement"]=P=>{O["after:highlightBlock"](Object.assign({block:P.el},P))})}function se(O){B(O),r.push(O)}function le(O,P){const G=O;r.forEach(function(T){T[G]&&T[G](P)})}function de(O){return _n("10.7.0","highlightBlock will be removed entirely in v12.0"),_n("10.7.0","Please use highlightElement now."),v(O)}Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:b,highlightElement:v,highlightBlock:de,configure:g,initHighlighting:_,initHighlightingOnLoad:y,registerLanguage:k,unregisterLanguage:S,listLanguages:I,getLanguage:C,registerAliases:M,autoDetection:N,inherit:Ta,addPlugin:se}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=tg,e.regex={concat:un,lookahead:Jc,either:Xs,optional:_m,anyNumberOfTimes:gm};for(const O in Hr)typeof Hr[O]=="object"&&dm(Hr[O]);return Object.assign(e,Hr),e};var _r=ig({}),sg=_r;_r.HighlightJS=_r;_r.default=_r;var ou=sg;function og(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const ag='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M6.368 1.01a.75.75 0 01.623.859L6.57 4.5h3.98l.46-2.868a.75.75 0 011.48.237L12.07 4.5h2.18a.75.75 0 010 1.5h-2.42l-.64 4h2.56a.75.75 0 010 1.5h-2.8l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H5.45l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H1.75a.75.75 0 010-1.5h2.42l.64-4H2.25a.75.75 0 010-1.5h2.8l.46-2.868a.75.75 0 01.858-.622zM9.67 10l.64-4H6.33l-.64 4h3.98z"></path></svg>';ou.registerLanguage("json",og);ee.use({highlight:(e,t)=>{if(t!=="")return ou.highlight(e,{language:t}).value}});function lg({id:e}){const{locale:t}=ke(),{version:n,changeVersion:r}=Vn(),{changeTitle:i}=_t(),{value:s}=Er(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),o=be(()=>{if(!s)return;const m=s0(s);return i(m==null?void 0:m.title,m==null?void 0:m.versions),m},[s]),a=be(()=>{var b;const m=pe.versions.map(A=>A.id);return(b=o==null?void 0:o.versions)==null?void 0:b.sort((A,k)=>m.indexOf(k)-m.indexOf(A))},[o==null?void 0:o.versions]),l=be(()=>!a||a.includes(n)?n:a[0],[n,o==null?void 0:o.versions]),u=be(()=>{if(!s)return;ee.use({renderer:{link(A,k,S){if(A===null)return S;const I=k?` title="${k}"`:"",C=A!=null&&A.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${A}"${I}${C}>${S}</a>`},heading(A,k,S,I){const C=I.slug(S),M=`<span id="guide-${C}" href="?version=${n}#${C}">${ag}</span>`;return`<h${k}>${M}${A}</h${k}>`}}});const m=s.substring(s.indexOf("---",3)+3),b=o0(m,l);return ee(b,{version:"1.19"})},[l,s]),[c,h]=d0(),p=Ie(()=>{if(!u)return;const m=document.querySelector(`[id=guide-${c.slice(1)}]`);if(m){const b=m.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:b-68,behavior:"smooth"})}},[u,c]);Q(()=>{p()},[u===void 0,c]);const d=Ie(m=>{if(!(m.target instanceof HTMLSpanElement))return;const b="#"+m.target.id.replace(/^guide-/,"");r(n,!1,!0),h(b),b===c&&p()},[p,c,n]),[w,v]=qn(),g=Ie(()=>{const m=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(m),v()},[e,n]),_=Ie(m=>{Yt(`/guides/?tags=${m}`)},[]),[y]=$(window.innerWidth>600);return f("main",null,f("div",{class:"guide"},f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/guides/"},ie.arrow_left,t("guides.all")),f(q,{icon:w?"check":"link",label:t("share"),onClick:g,active:w,tooltip:t(w?"copied":"copy_share"),class:"guide-share"}),a&&f(Ze,{icon:"tag",label:l,tooltip:t("switch_version")},a.map(m=>f(q,{label:m,active:m===l,onClick:()=>r(m)})))),(o==null?void 0:o.tags)&&o.tags.length>0&&f("div",{class:"guide-tags"},o.tags.map(m=>f(Nr,{label:m,active:!0,onClick:()=>_(m)}))),u&&f(te,null,f(vr,{id:"guide",type:y?"image":"text"}),f("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:u},onClick:d}),f(Us,null))))}const cg="tags",Qi="|";function ug({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Vn();_t(e("title.guides"));const[r,i]=$(""),[s,o]=lr(cg),a=be(()=>{var d;return(d=s==null?void 0:s.split(Qi))!=null?d:[]},[s]),l=d=>{a.includes(d)?o(a.filter(w=>w!==d).join(Qi)):o([...a,d].sort().join(Qi))},[u,c]=$(!1),h=be(()=>u===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}].filter(d=>{var w;return(w=d.versions)==null?void 0:w.includes(t)}),[t,u]),p=be(()=>{const d=r.split(" ").map(w=>w.trim().toLowerCase()).filter(w=>w.length>0);return h.filter(w=>{var g;if(!a.every(_=>{var y;return(y=w.tags)==null?void 0:y.includes(_)}))return!1;const v=((g=w.tags)==null?void 0:g.join(" "))+" "+w.title.toLowerCase();return d.every(_=>_.startsWith("!")?_.length===1||!v.includes(_.slice(1)):v.includes(_))})},[h,r,s]);return f("main",null,f("div",{class:"guides"},f("div",{class:"changelog-query"},f(sn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),f(Ze,{icon:"tag",label:u?t:e("any_version"),tooltip:e("switch_version")},f(q,{label:e("any_version"),active:!u,onClick:()=>c(!u)}),pe.versions.slice().reverse().map(d=>f(q,{label:d.id,active:u&&d.id===t,onClick:()=>{n(d.id),c(!0)}})))),a.length>0&&f("div",{class:"changelog-tags"},a.map(d=>f(Nr,{label:d,onClick:()=>l(d)}))),h.length===0?f(te,null,f("span",{class:"note"},e("guides.no_results.version"))):p.length===0?f(te,null,f("span",{class:"note"},e("guides.no_results.query"))):p.map(d=>{var w,v;return f(om,{title:d.title,link:`/guides/${d.id}/`,tags:(w=d.tags)!=null?w:[],versions:(v=d.versions)!=null?v:[],activeTags:a,toggleTag:l})})))}function dg({}){const{locale:e}=ke();return _t(e("title.home")),f("main",null,f("div",{class:"home"},f(st,{title:"Data packs"},pe.generators.filter(t=>!t.category).map(t=>f(st,{title:e(t.id),link:Ft(t.url)})),f(st,{title:e("worldgen"),link:"/worldgen/"})),f(st,{title:"Resource packs"},pe.generators.filter(t=>t.category==="assets").map(t=>f(st,{title:e(t.id),link:Ft(t.url)}))),f(st,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),f(st,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),f(st,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),f(st,{title:"Technical Changelog",link:"/changelog/"}),f(st,{title:"Minecraft Versions",link:"/versions/"}),f(st,{title:"Data Pack Guides",link:"/guides/"}),f(Us,null)))}function hg({}){const{locale:e}=ke(),{project:t,openFile:n}=oc();_t(e("title.project",t.name));const r=be(()=>t.files.map(z0),t.files),i=Ie(s=>{const[,o,a,...l]=s.split("/");n(a,`${o}:${l}`)},[n]);return f("main",null,f(vr,{id:"data-pack-project",type:"text"}),f("div",{class:"project"},f("h2",null,t.name),f("div",{class:"file-view"},f(Zc,{entries:r,onSelect:i}))))}function fg({}){const{locale:e}=ke(),{version:t,changeVersion:n}=Vn();_t(e("title.sounds"));const[r,i]=$(void 0);Q(()=>{(async()=>{const b=await ae(()=>import("./howler.6e908779.js").then(function(A){return A.h}),[]);i(()=>A=>new b.Howl(A))})()},[]);const{value:s,error:o}=Er(async()=>await A0(t),[t]),a=be(()=>Object.keys(s!=null?s:{}),[s]),[l,u]=$(""),[c,h]=$([]),p=()=>{h([{id:en(),sound:l,delay:0,pitch:1,volume:1},...c])},d=b=>A=>{h(c.map(k=>k.id===b?J(J({},k),A):k))},w=b=>()=>{h(c.filter(A=>A.id!==b))},[v,g]=$(0),_=()=>{g(v+1)},y=me(null),m=()=>{if(!y.current)return;const b=c.some(k=>k.delay>0),A=c.sort((k,S)=>k.delay-S.delay).map(k=>`${b?`execute if score @s delay matches ${k.delay} run `:""}playsound minecraft:${k.sound} master @s ~ ~ ~ ${k.volume} ${k.pitch}`).join(`
`);y.current.setAttribute("href","data:text/plain;charset=utf-8,"+A+"%0A"),y.current.setAttribute("download","sounds.mcfunction"),y.current.click()};return f("main",null,o&&f(An,{error:o}),a.length>0&&f(te,null,f("div",{class:"controls sounds-controls"},f("div",{class:"sound-search-group"},f(sn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:u,onEnter:p}),f(q,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:p})),c.length>1&&f(q,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:_}),f("div",{class:"spacer"}),f(q,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:m}),f(Ze,{icon:"tag",label:t,tooltip:e("switch_version")},pe.versions.slice().reverse().map(b=>f(q,{label:b.id,active:b.id===t,onClick:()=>n(b.id)})))),f("div",{class:"sounds"},s&&r&&c.map(b=>f(lm,ye(J({key:b.id},b),{howler:r,sounds:s,delayedPlay:v,onEdit:d(b.id),onDelete:w(b.id)})))),f("a",{ref:y,style:"display: none;"}),f("datalist",{id:"sound-list"},a.map(b=>f("option",{key:b,value:b})))))}function pg({}){const{locale:e}=ke();_t(e("title.versions"));const{value:t,error:n}=Er(S0,[]),[r]=lr("id"),i=(t!=null?t:[]).find(a=>a.id===r);_t(i?i.name:"Versions Explorer",i?[]:void 0);const s=i&&La(t!=null?t:[],i,-1),o=i&&La(t!=null?t:[],i,1);return f("main",null,f(vr,{type:"text",id:"versions"}),n&&f(An,{error:n}),f("div",{class:"versions"},r?f(te,null,f("div",{class:"navigation"},f("a",{class:"btn btn-link",href:"/versions/"},ie.three_bars,e("versions.all")),f("a",J({class:"btn btn-link"},o?{href:`/versions/?id=${o.id}`}:{disabled:!0}),ie.arrow_left,e("versions.previous")),f("a",J({class:"btn btn-link"},s?{href:`/versions/?id=${s.id}`}:{disabled:!0}),e("versions.next"),ie.arrow_right)),i?f(rm,{version:i}):f("div",{class:"version-detail"},f("h2",null,r),f("div",{class:"version-info"},f("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):f(sm,{versions:t!=null?t:[],link:a=>`/versions/?id=${a}`})))}function La(e,t,n){const i=e.findIndex(s=>s.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function mg(){return f(te,null,f(am,null),f(Dt,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Me.pageview(Ft(t.url)))}},f(dg,{path:"/"}),f(Ea,{path:"/worldgen",category:"worldgen"}),f(Ea,{path:"/assets",category:"assets"}),f(fg,{path:"/sounds"}),f(cm,{path:"/changelog"}),f(pg,{path:"/versions"}),f(hg,{path:"/project"}),f(ug,{path:"/guides/"}),f(lg,{path:"/guides/:id"}),f(um,{default:!0})))}function gg(){return f(B0,null,f(j0,null,f(G0,null,f(H0,null,f(F0,null,f(mg,null))))))}In(f(gg,null),document.body);export{Pr as c,_c as e,D as l};
//# sourceMappingURL=index.d18e5316.js.map